vendor: 404 bytes, line 1
1(function(z){'use strict';function ve(a){if(D(a))w(a.objectMaxDepth)&&(Xb.objectMaxDepth=Yb(a.objectMaxDepth)?a.objectMaxDepth:NaN),w(a.urlErrorParamsEnabled)&&Ga(a.urlErrorParamsEnabled)&&(Xb.urlErrorParamsEnabled=a.urlErrorParamsEnabled);else return Xb}function Yb(a){return X(a)&&0<a}function F(a,b){b=b||Error;return function(){var d=arguments[0],c;c="["+(a?a+":":"")+d+"] http://errors.angularjs.org
vendor: 102,504 bytes, lines 1-202
1/"+(a?a+"/":"")+d;for(d=1;d<arguments.length;d++){c=c+(1==d?"?":"&")+"p"+(d-1)+"=";var e=encodeURIComponent, 2f;f=arguments[d];f="function"==typeof f?f.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof f?"undefined":"string"!=typeof f?JSON.stringify(f):f;c+=e(f)}return new b(c)}}function za(a){if(null==a||$a(a))return!1;if(H(a)||C(a)||x&&a instanceof x)return!0;var b="length"in Object(a)&&a.length;return X(b)&&(0<=b&&b-1 in a||"function"===typeof a.item)}function r(a,b,d){var c,e;if(a)if(B(a))for(c in a)"prototype"!==c&&"length"!==c&&"name"!==c&&a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else if(H(a)|| 3za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==r)a.forEach(b,d,a);else if(Pc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&b.call(d,a[c],c,a);else for(c in a)ta.call(a,c)&&b.call(d,a[c],c,a);return a}function Qc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function Zb(a){return function(b,d){a(d,b)}}function we(){return++qb} 4function $b(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||B(g))for(var k=Object.keys(g),h=0,l=k.length;h<l;h++){var m=k[h],p=g[m];d&&D(p)?ha(p)?a[m]=new Date(p.valueOf()):ab(p)?a[m]=new RegExp(p):p.nodeName?a[m]=p.cloneNode(!0):ac(p)?a[m]=p.clone():"__proto__"!==m&&(D(a[m])||(a[m]=H(p)?[]:{}),$b(a[m],[p],!0)):a[m]=p}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return $b(a,Ha.call(arguments,1),!1)}function xe(a){return $b(a,Ha.call(arguments,1),!0)}function fa(a){return parseInt(a, 510)}function bc(a,b){return S(Object.create(a),b)}function E(){}function Ta(a){return a}function ia(a){return function(){return a}}function cc(a){return B(a.toString)&&a.toString!==la}function A(a){return"undefined"===typeof a}function w(a){return"undefined"!==typeof a}function D(a){return null!==a&&"object"===typeof a}function Pc(a){return null!==a&&"object"===typeof a&&!Rc(a)}function C(a){return"string"===typeof a}function X(a){return"number"===typeof a}function ha(a){return"[object Date]"===la.call(a)} 6function H(a){return Array.isArray(a)||a instanceof Array}function dc(a){switch(la.call(a)){case "[object Error]":return!0;case "[object Exception]":return!0;case "[object DOMException]":return!0;default:return a instanceof Error}}function B(a){return"function"===typeof a}function ab(a){return"[object RegExp]"===la.call(a)}function $a(a){return a&&a.window===a}function bb(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function ye(a){return a&&X(a.length)&&ze.test(la.call(a))} 7function ac(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Ae(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ua(a){return K(a.nodeName||a[0]&&a[0].nodeName)}function cb(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function Ia(a,b,d){function c(a,b,c){c--;if(0>c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f<g;f++)b.push(e(a[f],c))}else if(Pc(a))for(f in a)b[f]=e(a[f],c);else if(a&&"function"===typeof a.hasOwnProperty)for(f in a)a.hasOwnProperty(f)&& 8(b[f]=e(a[f],c));else for(f in a)ta.call(a,f)&&(b[f]=e(a[f],c));d?b.$$hashKey=d:delete b.$$hashKey;return b}function e(a,b){if(!D(a))return a;var d=g.indexOf(a);if(-1!==d)return k[d];if($a(a)||bb(a))throw oa("cpws");var d=!1,e=f(a);void 0===e&&(e=H(a)?[]:Object.create(Rc(a)),d=!0);g.push(a);k.push(e);return d?c(a,e,b):e}function f(a){switch(la.call(a)){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 a.constructor(e(a.buffer), 9a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(B(a.cloneNode))return a.cloneNode(!0)} 10var g=[],k=[];d=Yb(d)?d:NaN;if(b){if(ye(b)||"[object ArrayBuffer]"===la.call(b))throw oa("cpta");if(a===b)throw oa("cpi");H(b)?b.length=0:r(b,function(a,c){"$$hashKey"!==c&&delete b[c]});g.push(a);k.push(b);return c(a,b,d)}return e(a,d)}function ec(a,b){return a===b||a!==a&&b!==b}function va(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d===typeof b&&"object"===d)if(H(a)){if(!H(b))return!1;if((d=a.length)===b.length){for(c=0;c<d;c++)if(!va(a[c], 11b[c]))return!1;return!0}}else{if(ha(a))return ha(b)?ec(a.getTime(),b.getTime()):!1;if(ab(a))return ab(b)?a.toString()===b.toString():!1;if(bb(a)||bb(b)||$a(a)||$a(b)||H(b)||ha(b)||ab(b))return!1;d=T();for(c in a)if("$"!==c.charAt(0)&&!B(a[c])){if(!va(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!B(b[c]))return!1;return!0}return!1}function db(a,b,d){return a.concat(Ha.call(b,d))}function Va(a,b){var d=2<arguments.length?Ha.call(arguments,2):[];return!B(b)||b instanceof 12RegExp?b:d.length?function(){return arguments.length?b.apply(a,db(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Sc(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:$a(b)?d="$WINDOW":b&&z.document===b?d="$DOCUMENT":bb(b)&&(d="$SCOPE");return d}function eb(a,b){if(!A(a))return X(b)||(b=b?2:null),JSON.stringify(a,Sc,b)}function Tc(a){return C(a)?JSON.parse(a):a}function fc(a,b){a=a.replace(Be,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+ 13a)/6E4;return Y(d)?b:d}function Uc(a,b){a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function gc(a,b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=fc(b,c);return Uc(a,d*(b-c))}function Aa(a){a=x(a).clone().empty();var b=x("<div></div>").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Vc(a){try{return decodeURIComponent(a)}catch(b){}}function hc(a){var b={};r((a||"").split("&"), 14function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Vc(e),w(e)&&(f=w(f)?Vc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Ce(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function ic(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a, 15b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function De(a,b){var d,c,e=Qa.length;for(c=0;c<e;++c)if(d=Qa[c]+b,C(d=a.getAttribute(d)))return d;return null}function Ee(a,b){var d,c,e={};r(Qa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});r(Qa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))}); 16d&&(Fe?(e.strictDi=null!==De(d,"strict-di"),b(d,c?[c]:[],e)):z.console.error("AngularJS: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match."))}function Wc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===z.document?"document":Aa(a);throw oa("btstrpd",c.replace(/</,"<").replace(/>/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", 17function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;z&&e.test(z.name)&&(d.debugInfoEnabled=!0,z.name=z.name.replace(e,""));if(z&&!f.test(z.name))return c();z.name=z.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&& 18ca.resumeDeferredBootstrap()}function Ge(){z.name="NG_ENABLE_DEBUG_INFO!"+z.name;z.location.reload()}function He(a){a=ca.element(a).injector();if(!a)throw oa("test");return a.get("$$testability")}function Xc(a,b){b=b||"_";return a.replace(Ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function Je(){var a;if(!Yc){var b=rb();(sb=A(b)?z.jQuery:b?z[b]:void 0)&&sb.fn.on?(x=sb,S(sb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})): 19x=U;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Yc=!0}}function Ke(){U.legacyXHTMLReplacement=!0}function gb(a,b,d){if(!a)throw oa("areq",b||"?",d||"required");return a}function tb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw oa("badname", 20b);}function Le(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&B(a)?Va(e,a):a}function ub(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=x(Ha.call(a,0,e))),c.push(b);return c||a}function T(){return Object.create(null)}function jc(a){if(null==a)return"";switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=!cc(a)||H(a)||ha(a)?eb(a):a.toString()}return a}function Me(a){function b(a, 21b,c){return a[b]||(a[b]=c())}var d=F("$injector"),c=F("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||F;return b(a,"module",function(){var a={};return function(f,g,k){var h={};if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,c,d,f){f||(f=e);return function(){f[d||"push"]([b,c,arguments]);return t}}function b(a,c,d){d||(d=e);return function(b,e){e&&B(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return t}}if(!g)throw d("nomod", 22f);var e=[],n=[],s=[],G=a("$injector","invoke","push",n),t={_invokeQueue:e,_configBlocks:n,_runBlocks:s,info:function(a){if(w(a)){if(!D(a))throw c("aobj","value");h=a;return this}return h},requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator",n),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider", 23"register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:G,run:function(a){s.push(a);return this}};k&&G(k);return t})}})}function ja(a,b){if(H(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function Ne(a,b){var d=[];Yb(b)&&(a=ca.copy(a,null,b));return JSON.stringify(a,function(a,b){b=Sc(a,b);if(D(b)){if(0<=d.indexOf(b))return"...";d.push(b)}return b})} 24function Oe(a){S(a,{errorHandlingConfig:ve,bootstrap:Wc,copy:Ia,extend:S,merge:xe,equals:va,element:x,forEach:r,injector:fb,noop:E,bind:Va,toJson:eb,fromJson:Tc,identity:Ta,isUndefined:A,isDefined:w,isString:C,isFunction:B,isObject:D,isNumber:X,isElement:ac,isArray:H,version:Pe,isDate:ha,callbacks:{$$counter:0},getTestability:He,reloadWithDebugInfo:Ge,UNSAFE_restoreLegacyJqLiteXHTMLReplacement:Ke,$$minErr:F,$$csp:Ba,$$encodeUriSegment:ic,$$encodeUriQuery:ba,$$lowercase:K,$$stringify:jc,$$uppercase:vb}); 25lc=Me(z);lc("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Qe});a.provider("$compile",Zc).directive({a:Re,input:$c,textarea:$c,form:Se,script:Te,select:Ue,option:Ve,ngBind:We,ngBindHtml:Xe,ngBindTemplate:Ye,ngClass:Ze,ngClassEven:$e,ngClassOdd:af,ngCloak:bf,ngController:cf,ngForm:df,ngHide:ef,ngIf:ff,ngInclude:gf,ngInit:hf,ngNonBindable:jf,ngPluralize:kf,ngRef:lf,ngRepeat:mf,ngShow:nf,ngStyle:of,ngSwitch:pf,ngSwitchWhen:qf,ngSwitchDefault:rf,ngOptions:sf,ngTransclude:tf,ngModel:uf, 26ngList:vf,ngChange:wf,pattern:ad,ngPattern:ad,required:bd,ngRequired:bd,minlength:cd,ngMinlength:cd,maxlength:dd,ngMaxlength:dd,ngValue:xf,ngModelOptions:yf}).directive({ngInclude:zf,input:Af}).directive(wb).directive(ed);a.provider({$anchorScroll:Bf,$animate:Cf,$animateCss:Df,$$animateJs:Ef,$$animateQueue:Ff,$$AnimateRunner:Gf,$$animateAsyncRun:Hf,$browser:If,$cacheFactory:Jf,$controller:Kf,$document:Lf,$$isDocumentHidden:Mf,$exceptionHandler:Nf,$filter:fd,$$forceReflow:Of,$interpolate:Pf,$interval:Qf, 27$$intervalFactory:Rf,$http:Sf,$httpParamSerializer:Tf,$httpParamSerializerJQLike:Uf,$httpBackend:Vf,$xhrFactory:Wf,$jsonpCallbacks:Xf,$location:Yf,$log:Zf,$parse:$f,$rootScope:ag,$q:bg,$$q:cg,$sce:dg,$sceDelegate:eg,$sniffer:fg,$$taskTrackerFactory:gg,$templateCache:hg,$templateRequest:ig,$$testability:jg,$timeout:kg,$window:lg,$$rAF:mg,$$jqLite:ng,$$Map:og,$$cookieReader:pg})}]).info({})}function xb(a,b){return b.toUpperCase()}function yb(a){return a.replace(qg,xb)}function mc(a){a= 28a.nodeType;return 1===a||!a||9===a}function gd(a,b){var d,c,e,f=b.createDocumentFragment(),g=[],k;if(nc.test(a)){d=f.appendChild(b.createElement("div"));c=(rg.exec(a)||["",""])[1].toLowerCase();e=U.legacyXHTMLReplacement?a.replace(sg,"<$1></$2>"):a;if(10>wa)for(c=hb[c]||hb._default,d.innerHTML=c[1]+e+c[2],k=c[0];k--;)d=d.firstChild;else{c=qa[c]||[];for(k=c.length;-1<--k;)d.appendChild(z.document.createElement(c[k])),d=d.firstChild;d.innerHTML=e}g=db(g,d.childNodes);d=f.firstChild;d.textContent=""}else g.push(b.createTextNode(a)); 29f.textContent="";f.innerHTML="";r(g,function(a){f.appendChild(a)});return f}function U(a){if(a instanceof U)return a;var b;C(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!==a.charAt(0))throw oc("nosel");return new U(a)}if(b){b=z.document;var d;a=(d=tg.exec(a))?[b.createElement(d[1])]:(d=gd(a,b))?d.childNodes:[];pc(this,a)}else B(a)?hd(a):pc(this,a)}function qc(a){return a.cloneNode(!0)}function zb(a,b){!b&&mc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function id(a){for(var b in a)return!1; 30return!0}function jd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!id(d)||c&&!id(c)||(delete Ka[b],a.ng339=void 0)}function kd(a,b,d,c){if(w(c))throw oc("offargs");var e=(c=Ab(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f),delete e[b])};r(b.split(" "),function(a){g(a);Bb[a]&&g(Bb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f),delete e[b];jd(a)}}function rc(a,b){var d=a.ng339;if(d= 31d&&Ka[d])b?delete d.data[b]:d.data={},jd(a)}function Ab(a,b){var d=a.ng339,d=d&&Ka[d];b&&!d&&(a.ng339=d=++ug,d=Ka[d]={events:{},data:{},handle:void 0});return d}function sc(a,b,d){if(mc(a)){var c,e=w(d),f=!e&&b&&!D(b),g=!b;a=(a=Ab(a,!f))&&a.data;if(e)a[yb(b)]=d;else{if(g)return a;if(f)return a&&a[yb(b)];for(c in b)a[yb(c)]=b[c]}}}function Cb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Db(a,b){if(b&&a.setAttribute){var d= 32(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);c=c.replace(" "+a+" "," ")});c!==d&&a.setAttribute("class",V(c))}}function Eb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),c=d;r(b.split(" "),function(a){a=V(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});c!==d&&a.setAttribute("class",V(c))}}function pc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c= 330;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function ld(a,b){return Fb(a,"$"+(b||"ngController")+"Controller")}function Fb(a,b,d){9===a.nodeType&&(a=a.documentElement);for(b=H(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=x.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function md(a){for(zb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Gb(a,b){b||zb(a);var d=a.parentNode;d&&d.removeChild(a)}function vg(a,b){b=b||z;if("complete"===b.document.readyState)b.setTimeout(a); 34else x(b).on("load",a)}function hd(a){function b(){z.document.removeEventListener("DOMContentLoaded",b);z.removeEventListener("load",b);a()}"complete"===z.document.readyState?z.setTimeout(a):(z.document.addEventListener("DOMContentLoaded",b),z.addEventListener("load",b))}function nd(a,b){var d=Hb[b.toLowerCase()];return d&&od[ua(a)]&&d}function wg(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(A(c.immediatePropagationStopped)){var k= 35c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();k&&k.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var h=f.specialHandlerWrapper||xg;1<g&&(f=ja(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||h(a,c,f[l])}};d.elem=a;return d}function xg(a,b,d){d.call(a,b)}function yg(a,b,d){var c=b.relatedTarget;c&&(c===a||zg.call(a,c))||d.call(a,b)}function ng(){this.$get= 36function(){return S(U,{hasClass:function(a,b){a.attr&&(a=a[0]);return Cb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Eb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Db(a,b)}})}}function La(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"===d||"object"===d&&null!==a?a.$$hashKey=d+":"+(b||we)():d+":"+a}function pd(){this._keys=[];this._values=[];this._lastKey=NaN;this._lastIndex=-1}function qd(a){a=Function.prototype.toString.call(a).replace(Ag, 37"");return a.match(Bg)||a.match(Cg)}function Dg(a){return(a=qd(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(a,b){function d(a){return function(b,c){if(D(b))r(b,Zb(a));else return a(b,c)}}function c(a,b){Ja(a,"service");if(B(b)||H(b))b=n.instantiate(b);if(!b.$get)throw Ca("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=t.invoke(b,this);if(A(c))throw Ca("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){gb(A(a)|| 38H(a),"modulesToLoad","not an array");var b=[],c;r(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=n.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.set(a,!0);try{C(a)?(c=lc(a),t.modules[a]=c,b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):B(a)?b.push(n.invoke(a)):H(a)?b.push(n.invoke(a)):tb(a,"module")}catch(e){throw H(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ca("modulerr", 39a,e.stack||e.message||e);}}});return b}function k(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===h)throw Ca("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=h,a[b]=c(b,e),a[b]}catch(f){throw a[b]===h&&delete a[b],f;}finally{l.shift()}}function e(a,c,f){var g=[];a=fb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ca("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&& 40(d=c,c=null);c=e(a,c,d);H(a)&&(a=a[a.length-1]);d=a;if(wa||"function"!==typeof d)d=!1;else{var f=d.$$ngIsClass;Ga(f)||(f=d.$$ngIsClass=/^class\b/.test(Function.prototype.toString.call(d)));d=f}return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=H(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:fb.$$annotate,has:function(b){return p.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}} 41b=!0===b;var h={},l=[],m=new Ib,p={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ia(b),!1)}),constant:d(function(a,b){Ja(a,"constant");p[a]=b;s[a]=b}),decorator:function(a,b){var c=n.get(a+"Provider"),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},n=p.$injector=k(p,function(a,b){ca.isString(b)&&l.push(b);throw Ca("unpr",l.join(" <- "));}),s={}, 42G=k(s,function(a,b){var c=n.get(a+"Provider",b);return t.invoke(c.$get,c,void 0,a)}),t=G;p.$injectorProvider={$get:ia(G)};t.modules=n.modules=T();var N=g(a),t=G.get("$injector");t.strictDi=b;r(N,function(a){a&&t.invoke(a)});t.loadNewModules=function(a){r(g(a),function(a){a&&t.invoke(a)})};return t}function Bf(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"=== 43ua(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;B(c)?c=c():ac(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):X(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=C(a)?a:X(a)?a.toString():d.hash();var b;a?(b=k.getElementById(a))?f(b):(b=e(k.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var k=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a=== 44b&&""===a||vg(function(){c.$evalAsync(g)})});return g}]}function ib(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;H(a)&&(a=a.join(" "));H(b)&&(b=b.join(" "));return a+" "+b}function Eg(a){C(a)&&(a=a.split(" "));var b=T();r(a,function(a){a.length&&(b[a]=!0)});return b}function ra(a){return D(a)?a:{}}function Fg(a,b,d,c,e){function f(){pa=null;k()}function g(){t=y();t=A(t)?null:t;va(t,P)&&(t=P);N=P=t}function k(){var a=N;g();if(v!==h.url()||a!==t)v=h.url(),N=t,r(J,function(a){a(h.url(),t)})} 45var h=this,l=a.location,m=a.history,p=a.setTimeout,n=a.clearTimeout,s={},G=e(d);h.isMock=!1;h.$$completeOutstandingRequest=G.completeTask;h.$$incOutstandingRequestCount=G.incTaskCount;h.notifyWhenNoOutstandingRequests=G.notifyWhenNoPendingTasks;var t,N,v=l.href,kc=b.find("base"),pa=null,y=c.history?function(){try{return m.state}catch(a){}}:E;g();h.url=function(b,d,e){A(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=N===e;b=ga(b).href;if(v===b&&(!c.history||f))return h; 46var k=v&&Da(v)===Da(b);v=b;N=e;!c.history||k&&f?(k||(pa=b),d?l.replace(b):k?(d=l,e=b,f=e.indexOf("#"),e=-1===f?"":e.substr(f),d.hash=e):l.href=b,l.href!==b&&(pa=b)):(m[d?"replaceState":"pushState"](e,"",b),g());pa&&(pa=b);return h}return(pa||l.href).replace(/#$/,"")};h.state=function(){return t};var J=[],I=!1,P=null;h.onUrlChange=function(b){if(!I){if(c.history)x(a).on("popstate",f);x(a).on("hashchange",f);I=!0}J.push(b);return b};h.$$applicationDestroyed=function(){x(a).off("hashchange popstate", 47f)};h.$$checkUrlChange=k;h.baseHref=function(){var a=kc.attr("href");return a?a.replace(/^(https?:)?\/\/[^/]*/,""):""};h.defer=function(a,b,c){var d;b=b||0;c=c||G.DEFAULT_TASK_TYPE;G.incTaskCount(c);d=p(function(){delete s[d];G.completeTask(a,c)},b);s[d]=c;return d};h.defer.cancel=function(a){if(s.hasOwnProperty(a)){var b=s[a];delete s[a];n(a);G.completeTask(E,b);return!0}return!1}}function If(){this.$get=["$window","$log","$sniffer","$document","$$taskTrackerFactory",function(a,b,d,c,e){return new Fg(a, 48c,b,d,e)}]}function Jf(){this.$get=function(){function a(a,c){function e(a){a!==p&&(n?n===a&&(n=a.n):n=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!==b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw F("$cacheFactory")("iid",a);var g=0,k=S({},c,{id:a}),h=T(),l=c&&c.capacity||Number.MAX_VALUE,m=T(),p=null,n=null;return b[a]={put:function(a,b){if(!A(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in h||g++;h[a]=b;g>l&&this.remove(n.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b= 49m[a];if(!b)return;e(b)}return h[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b===p&&(p=b.p);b===n&&(n=b.n);f(b.n,b.p);delete m[a]}a in h&&(delete h[a],g--)},removeAll:function(){h=T();g=0;m=T();p=n=null},destroy:function(){m=k=h=null;delete b[a]},info:function(){return S({},k,{size:g})}}}var b={};a.info=function(){var a={};r(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function hg(){this.$get=["$cacheFactory",function(a){return a("templates")}]} 50function Zc(a,b){function d(a,b,c){var d=/^([@&]|[=<](\*?))(\??)\s*([\w$]*)$/,e=T();r(a,function(a,f){a=a.trim();if(a in p)e[f]=p[a];else{var g=a.match(d);if(!g)throw $("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(p[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==K(b))throw $("baddir",a);if(a!==a.trim())throw $("baddir",a);}function e(a){var b=a.require||a.controller&& 51a.name;!H(b)&&D(b)&&r(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive:\s*([\w-]+)\s+(.*)$/,k=/(([\w-]+)(?::([^;]+))?;?)/,h=Ae("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,p=T();this.directive=function pa(b,d){gb(b,"name");Ja(b,"directive");C(b)?(c(b),gb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];r(f[b],function(f, 52g){try{var h=a.invoke(f);B(h)?h={compile:ia(h)}:!h.compile&&h.link&&(h.compile=ia(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);var k=h,l=h.restrict;if(l&&(!C(l)||!/[EACM]/.test(l)))throw $("badrestrict",l,b);k.restrict=l||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(m){c(m)}});return d}])),f[b].push(d)):r(b,Zb(pa));return this};this.component=function y(a,b){function c(a){function e(b){return B(b)||H(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}: 53b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Gg(b.controller)||b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};r(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}if(!C(a))return r(a,Zb(Va(this,y))),this;var d=b.controller||function(){};r(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,B(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a, 54c)};this.aHrefSanitizationTrustedUrlList=function(a){return w(a)?(b.aHrefSanitizationTrustedUrlList(a),this):b.aHrefSanitizationTrustedUrlList()};Object.defineProperty(this,"aHrefSanitizationWhitelist",{get:function(){return this.aHrefSanitizationTrustedUrlList},set:function(a){this.aHrefSanitizationTrustedUrlList=a}});this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b.imgSrcSanitizationTrustedUrlList(a),this):b.imgSrcSanitizationTrustedUrlList()};Object.defineProperty(this,"imgSrcSanitizationWhitelist", 55{get:function(){return this.imgSrcSanitizationTrustedUrlList},set:function(a){this.imgSrcSanitizationTrustedUrlList=a}});var n=!0;this.debugInfoEnabled=function(a){return w(a)?(n=a,this):n};var s=!1;this.strictComponentBindingsEnabled=function(a){return w(a)?(s=a,this):s};var G=10;this.onChangesTtl=function(a){return arguments.length?(G=a,this):G};var t=!0;this.commentDirectivesEnabled=function(a){return arguments.length?(t=a,this):t};var N=!0;this.cssClassDirectivesEnabled=function(a){return arguments.length? 56(N=a,this):N};var v=T();this.addPropertySecurityContext=function(a,b,c){var d=a.toLowerCase()+"|"+b.toLowerCase();if(d in v&&v[d]!==c)throw $("ctxoverride",a,b,v[d],c);v[d]=c;return this};(function(){function a(b,c){r(c,function(a){v[a.toLowerCase()]=b})}a(W.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]);a(W.CSS,["*|style"]);a(W.URL,"area|href area|ping a|href a|ping blockquote|cite body|background del|cite input|src ins|cite q|cite".split(" "));a(W.MEDIA_URL,"audio|src img|src img|srcset source|src source|srcset track|src video|src video|poster".split(" ")); 57a(W.RESOURCE_URL,"*|formAction applet|code applet|codebase base|href embed|src frame|src form|action head|profile html|manifest iframe|src link|href media|src object|codebase object|data script|src".split(" "))})();this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate",function(a,b,c,e,p,M,L,u,R){function q(){try{if(!--Ja)throw Ua=void 0,$("infchng",G);L.$apply(function(){for(var a=0,b=Ua.length;a<b;++a)try{Ua[a]()}catch(d){c(d)}Ua= 58void 0})}finally{Ja++}}function ma(a,b){if(!a)return a;if(!C(a))throw $("srcset",b,a.toString());for(var c="",d=V(a),e=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,e=/\s/.test(d)?e:/(,)/,d=d.split(e),e=Math.floor(d.length/2),f=0;f<e;f++)var g=2*f,c=c+u.getTrustedMediaUrl(V(d[g])),c=c+(" "+V(d[g+1]));d=V(d[2*f]).split(/\s/);c+=u.getTrustedMediaUrl(V(d[0]));2===d.length&&(c+=" "+V(d[1]));return c}function w(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr= 59{};this.$$element=a}function O(a,b,c){Fa.innerHTML="<span "+b+">";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement; 60h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("<div></div>").append(a).html())):c?Wa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;m<h.length;m+=3)f=h[m],t[f]=c[f];else t=c;m=0;for(p=h.length;m< 61p;)k=t[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),da.$$addScopeInfo(x(k),l)):l=a,I=c.transcludeOnThisElement?ka(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ka(a,b):null,c(f,l,k,d,I)):f&&f(a,k.childNodes,void 0,e)}for(var h=[],k=H(a)||a instanceof x,l,m,p,I,n,t=0;t<a.length;t++){l=new w;11===wa&&jb(a,t,k);m=tc(a[t],[],l,0===t?d:void 0,e);(f=m.length?aa(m,a[t],l,b,c,null,[],[],f):null)&&f.scope&&da.$$addScopeClass(l.$$element);l=f&&f.terminal||!(p=a[t].childNodes)||!p.length?null:Xa(p, 62f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||l)h.push(t,f,l),I=!0,n=n||f;f=null}return I?g:null}function jb(a,b,c){var d=a[b],e=d.parentNode,f;if(d.nodeType===Pa)for(;;){f=e?d.nextSibling:a[b+1];if(!f||f.nodeType!==Pa)break;d.nodeValue+=f.nodeValue;f.parentNode&&f.parentNode.removeChild(f);c&&f===a[b+1]&&a.splice(b+1,1)}}function ka(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,transcludeControllers:g, 63futureParentElement:h})}var e=d.$$slots=T(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?ka(a,b.$$slots[f],c):null;return d}function tc(a,b,d,e,f){var g=d.$attr,h;switch(a.nodeType){case 1:h=ua(a);Y(b,xa(h),"E",e,f);for(var l,m,n,t,J,s=a.attributes,v=0,G=s&&s.length;v<G;v++){var P=!1,N=!1,r=!1,y=!1,u=!1,M;l=s[v];m=l.name;t=l.value;n=xa(m.toLowerCase());(J=n.match(Ra))?(r="Attr"===J[1],y="Prop"===J[1],u="On"===J[1],m=m.replace(rd,"").toLowerCase().substr(4+J[1].length).replace(/_(.)/g,function(a,b){return b.toUpperCase()})): 64(M=n.match(Sa))&&ca(M[1])&&(P=m,N=m.substr(0,m.length-5)+"end",m=m.substr(0,m.length-6));if(y||u)d[n]=t,g[n]=l.name,y?Ea(a,b,n,m):b.push(sd(p,L,c,n,m,!1));else{n=xa(m.toLowerCase());g[n]=m;if(r||!d.hasOwnProperty(n))d[n]=t,nd(a,n)&&(d[n]=!0);Ia(a,b,t,n,r);Y(b,n,"A",e,f,P,N)}}"input"===h&&"hidden"===a.getAttribute("type")&&a.setAttribute("autocomplete","off");if(!Qa)break;g=a.className;D(g)&&(g=g.animVal);if(C(g)&&""!==g)for(;a=k.exec(g);)n=xa(a[2]),Y(b,n,"C",e,f)&&(d[n]=V(a[3])),g=g.substr(a.index+ 65a[0].length);break;case Pa:na(b,a.nodeValue);break;case 8:if(!Oa)break;F(a,b,d,e,f)}b.sort(ia);return b}function F(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=xa(f[1]);Y(b,h,"M",d,e)&&(c[h]=V(f[2]))}}catch(k){}}function U(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw $("uterdir",b,c);1===a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return x(d)}function W(a,b,c){return function(d,e,f,g,h){e=U(e[0], 66b,c);return a(d,e,f,g,h)}}function Z(a,b,c,d,e,f){var g;return a?da(b,c,d,e,f):function(){g||(g=da(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function aa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=W(a,c,d));a.require=u.require;a.directiveName=Q;if(s===u||u.$$isolateScope)a=Ba(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=W(b,c,d));b.require=u.require;b.directiveName=Q;if(s===u||u.$$isolateScope)b=Ba(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;bb(a)|| 67(d=c,c=b,b=a,a=void 0);N&&(e=P);c||(c=N?Q.parent():Q);if(d){var f=l.$$slots[d];if(f)return f(a,b,e,c,R);if(A(f))throw $("noslot",d,Aa(Q));}else return l(a,b,e,c,R)}var n,u,L,y,G,P,M,Q;b===f?(g=d,Q=d.$$element):(Q=x(f),g=new w(Q,d));G=e;s?y=e.$new(!0):t&&(G=e.$parent);l&&(M=m,M.$$boundTransclude=l,M.isSlotFilled=function(a){return!!l.$$slots[a]});J&&(P=ea(Q,g,M,J,y,e,s));s&&(da.$$addScopeInfo(Q,y,!0,!(v&&(v===s||v===s.$$originalDirective))),da.$$addScopeClass(Q,!0),y.$$isolateBindings=s.$$isolateBindings, 68u=Da(e,g,y,y.$$isolateBindings,s),u.removeWatches&&y.$on("$destroy",u.removeWatches));for(n in P){u=J[n];L=P[n];var Hg=u.$$bindings.bindToController;L.instance=L();Q.data("$"+u.name+"Controller",L.instance);L.bindingInfo=Da(G,g,L.instance,Hg,u)}r(J,function(a,b){var c=a.require;a.bindToController&&!H(c)&&D(c)&&S(P[b].instance,X(b,c,Q,P))});r(P,function(a){var b=a.instance;if(B(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(B(b.$onInit))try{b.$onInit()}catch(e){c(e)}B(b.$doCheck)&& 69(G.$watch(function(){b.$doCheck()}),b.$doCheck());B(b.$onDestroy)&&G.$on("$destroy",function(){b.$onDestroy()})});n=0;for(u=h.length;n<u;n++)L=h[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);var R=e;s&&(s.template||null===s.templateUrl)&&(R=y);a&&a(R,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)L=k[n],Ca(L,L.isolateScope?y:e,Q,g,L.require&&X(L.directiveName,L.require,Q,P),M);r(P,function(a){a=a.instance;B(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE, 70t=l.newScopeDirective,J=l.controllerDirectives,s=l.newIsolateScopeDirective,v=l.templateDirective,L=l.nonTlbTranscludeDirective,G=!1,P=!1,N=l.hasElementTranscludeDirective,y=d.$$element=x(b),u,Q,M,R=e,q,ma=!1,Jb=!1,O,sa=0,C=a.length;sa<C;sa++){u=a[sa];var E=u.$$start,jb=u.$$end;E&&(y=U(b,E,jb));M=void 0;if(n>u.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&& 71!u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Jb=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],oa(f,Ha.call(M,0),b),R=Z(Jb,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=z.document.createDocumentFragment();var Xa= 72T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[xa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||z.document.createDocumentFragment(),ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Jb,R,e));M=x(M.childNodes)}else M=x(qc(b)).contents();y.empty();R=Z(Jb,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P= 73!0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=nc.test(O)?td(ja(u.templateNamespace,V(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",Q,"");oa(f,y,b);C={$attr:{}};O=tc(b,[],C);var Ig=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Ig);ga(d,C);C=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!== 74u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),C=a.length;else if(u.compile)try{q=u.compile(y,d,R);var Y=u.$$originalDirective||u;B(q)?m(null,Va(Y,q),E,jb):q&&m(Va(Y,q.pre),Va(Y,q.post),E,jb)}catch(ca){c(ca,Aa(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function X(a,b,c,d){var e;if(C(b)){var f=b.match(l);b=b.substring(f[0].length); 75var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=X(a,b[g],c,d);else D(b)&&(e={},r(b,function(b,f){e[f]=X(a,b,c,d)}));return e||null}function ea(a,b,c,d,e,f,g){var h=T(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"=== 76p&&(p=b[l.name]);m=M(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}function fa(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=bc(a[d],{$$isolateScope:b,$$newScope:c})}function Y(b,c,e,g,h,k,l){if(c===h)return null;var m=null;if(f.hasOwnProperty(c)){h=a.get(c+"Directive");for(var p=0,n=h.length;p<n;p++)if(c=h[p],(A(g)||g>c.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=bc(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null}; 77D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function ga(a,b){var c= 78b.$attr,d=a.$attr;r(a,function(d,e){"$"!==e.charAt(0)&&(b[e]&&b[e]!==d&&(d=d.length?d+(("style"===e?";":" ")+b[e]):b[e]),a.$set(e,d,!0,c[e]))});r(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ha(a,b,d,f,g,h,k,l){var m=[],p,n,t=b[0],u=a.shift(),J=bc(u,{templateUrl:null,transclude:null,replace:null,$$originalDirective:u}),s=B(u.templateUrl)?u.templateUrl(b,d):u.templateUrl,L=u.templateNamespace;b.empty();e(s).then(function(c){var e, 79I;c=Na(c);if(u.replace){c=nc.test(c)?td(ja(L,V(c))):[];e=c[0];if(1!==c.length||1!==e.nodeType)throw $("tplrt",u.name,s);c={$attr:{}};oa(f,b,e);var v=tc(e,[],c);D(u.scope)&&fa(v,!0);a=v.concat(a);ga(d,c)}else e=t,b.html(c);a.unshift(J);p=aa(a,e,d,g,b,u,h,k,l);r(f,function(a,c){a===e&&(f[c]=b[0])});for(n=Xa(b[0].childNodes,g);m.length;){c=m.shift();I=m.shift();var y=m.shift(),P=m.shift(),v=b[0];if(!c.$$destroyed){if(I!==t){var G=I.className;l.hasElementTranscludeDirective&&u.replace||(v=qc(e));oa(y, 80x(I),v);sa(x(v),G)}I=p.transcludeOnThisElement?ka(c,p.transclude,P):P;p(n,c,v,f,I)}}m=null}).catch(function(a){dc(a)&&c(a)});return function(a,b,c,d,e){a=e;b.$$destroyed||(m?m.push(b,c,d,a):(p.transcludeOnThisElement&&(a=ka(b,p.transclude,e)),p(n,b,c,d,a)))}}function ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function ba(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw $("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName), 81a,Aa(d));}function na(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&da.$$addBindingClass(a);return function(a,c){var e=c.parent();b||da.$$addBindingClass(e);da.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function ja(a,b){a=K(a||"html");switch(a){case "svg":case "math":var c=z.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function qa(a,b){if("srcdoc"=== 82b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function ya(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function za(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c, 83d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=ya(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=za;b.push({priority:100,compile:function(a,b){var e=p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=qa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",Aa(a));if(m.test(e))throw $("nodomevents");c.push({priority:100, 84compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function oa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]===d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&& 85(a.context=c);break}f&&f.replaceChild(c,d);a=z.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);x.hasData(d)&&(x.data(c,x.data(d)),x(d).off("$destroy"));x.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function Ba(a,b){return S(function(){return a.apply(null,arguments)},a,b)}function Ca(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,Aa(d))}}function ra(a,b){if(s)throw $("missingattr",a,b);}function Da(a,c,d,e,f){function g(b,c,e){B(d.$onChanges)&& 86!ec(c,e)&&(Ua||(a.$$postDigest(q),Ua=[]),m||(m={},Ua.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Kb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;r(e,function(e,h){var m=e.attrName,n=e.optional,I,t,u,s;switch(e.mode){case "@":n||ta.call(c,m)||(ra(m,f.name),d[h]=c[m]=void 0);n=c.$observe(m,function(a){if(C(a)||Ga(a))g(h,a,d[h]),d[h]=a});c.$$observers[m].$$scope=a;I=c[m];C(I)?d[h]=b(I)(a):Ga(I)&&(d[h]=I);l[h]=new Kb(uc,d[h]);k.push(n);break;case "=":if(!ta.call(c,m)){if(n)break;ra(m, 87f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);s=t.literal?va:ec;u=t.assign||function(){I=d[h]=t(a);throw $("nonassign",c[m],m,f.name);};I=d[h]=t(a);n=function(b){s(b,d[h])||(s(b,I)?u(a,b=d[h]):d[h]=b);return I=b};n.$stateful=!0;n=e.collection?a.$watchCollection(c[m],n):a.$watch(p(c[m],n),null,t.literal);k.push(n);break;case "<":if(!ta.call(c,m)){if(n)break;ra(m,f.name);c[m]=void 0}if(n&&!c[m])break;t=p(c[m]);var v=t.literal,L=d[h]=t(a);l[h]=new Kb(uc,d[h]);n=a[e.collection?"$watchCollection":"$watch"](t, 88function(a,b){if(b===a){if(b===L||v&&va(b,L))return;b=L}g(h,a,b);d[h]=a});k.push(n);break;case "&":n||ta.call(c,m)||ra(m,f.name);t=c.hasOwnProperty(m)?p(c[m]):E;if(t===E&&n)break;d[h]=function(b){return t(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var Ma=/^\w/,Fa=z.document.createElement("div"),Oa=t,Qa=N,Ja=G,Ua;w.prototype={$normalize:xa,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&& 890<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ud(a,b);c&&c.length&&R.addClass(this.$$element,c);(c=ud(b,a))&&c.length&&R.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=nd(this.$$element[0],a),g=vd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Xc(a,"-"));"img"===ua(this.$$element)&&"srcset"===a&&(this[a]=b=ma(b,"$set('srcset', value)"));!1!==d&&(null===b||A(b)?this.$$element.removeAttr(e): 90Ma.test(e)?f&&!1===b?this.$$element.removeAttr(e):this.$$element.attr(e,b):O(this.$$element[0],e,b));(a=this.$$observers)&&r(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=T()),e=d[a]||(d[a]=[]);e.push(b);L.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||A(c[a])||b(c[a])});return function(){cb(e,b)}}};var Ka=b.startSymbol(),La=b.endSymbol(),Na="{{"===Ka&&"}}"===La?Ta:function(a){return a.replace(/\{\{/g,Ka).replace(/}}/g,La)},Ra= 91/^ng(Attr|Prop|On)([A-Z].*)$/,Sa=/^(.+)Start$/;da.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||[];H(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:E;da.$$addBindingClass=n?function(a){sa(a,"ng-binding")}:E;da.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:E;da.$$addScopeClass=n?function(a,b){sa(a,b?"ng-isolate-scope":"ng-scope")}:E;da.$$createComment=function(a,b){var c="";n&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return z.document.createComment(c)}; 92return da}]}function Kb(a,b){this.previousValue=a;this.currentValue=b}function xa(a){return a.replace(rd,"").replace(Jg,function(a,d,c){return c?d.toUpperCase():d})}function ud(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],k=0;k<e.length;k++)if(g===e[k])continue a;d+=(0<d.length?" ":"")+g}return d}function td(a){a=x(a);var b=a.length;if(1>=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Kg.call(a,b,1)}return a} 93function Gg(a,b){if(b&&C(b))return b;if(C(a)){var d=wd.exec(a);if(d)return d[3]}}function Kf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&C(g)&&(l=g);if(C(c)){g=c.match(wd);if(!g)throw xd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Le(e.$scope, 94h,!0);if(!c)throw xd("ctrlreg",h);tb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Lf(){this.$get=["$window",function(a){return x(a.document)}]}function Mf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden; 95a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Nf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function vc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Tf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Qc(a,function(a,c){null===a||A(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(vc(a)))}):b.push(ba(c)+"="+ba(vc(a))))});return b.join("&")}}}function Uf(){this.$get= 96function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Qc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(vc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function wc(a,b){if(C(a)){var d=a.replace(Lg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(yd),e;(e=c)||(e=(e=d.match(Mg))&&Ng[e[0]].test(d));if(e)try{a=Tc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a} 97function zd(a){var b=T(),d;C(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&r(a,function(a,d){var f=K(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function Ad(a){var b;return function(d){b||(b=zd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function Bd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Sf(){var a=this.defaults={transformResponse:[wc],transformRequest:[function(a){return D(a)&& 98"[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(xc),put:ja(xc),patch:ja(xc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfTrustedOrigins=[];Object.defineProperty(this,"xsrfWhitelistedOrigins", 99{get:function(){return this.xsrfTrustedOrigins},set:function(a){this.xsrfTrustedOrigins=a}});this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function d(a,b){var c,e={};r(a,function(a,d){B(a)?(c=a(b),null!=c&&(e[d]=c)):e[d]=a});return e}function f(a){var b=S({},a);b.data=Bd(a.data,a.headers,a.status,g.transformResponse); 100a=a.status;return 200<=a&&300>a?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!C(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method= 101vb(g.method);g.paramSerializer=C(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b=c(b,h);b=b.then(function(b){var c=b.headers,d=Bd(b.data,Ad(c),void 0,b.transformRequest);A(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});A(b.withCredentials)&&!A(a.withCredentials)&& 102(b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,zd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300> 103b?L.resolve:L.reject)({data:a,status:b,headers:Ad(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),O=c.url;x?O=p.getTrustedResourceUrl(O):C(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache|| 104!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));A(q)&&((q=kc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0<b.length&&(a+=(-1===a.indexOf("?")? 105"?":"&")+b);return a}function t(a,b){var c=a.split("?");if(2<c.length)throw Lb("badjsonp",a);c=hc(c[1]);r(c,function(c,d){if("JSON_CALLBACK"===c)throw Lb("badjsonp",a);if(d===b)throw Lb("badjsonp",b,a);});return a+=(-1===a.indexOf("?")?"?":"&")+b+"=JSON_CALLBACK"}var N=k("$http");a.paramSerializer=C(a.paramSerializer)?m.get(a.paramSerializer):a.paramSerializer;var v=[];r(d,function(a){v.unshift(C(a)?m.get(a):m.invoke(a))});var kc=Og(c);n.pendingRequests=[];(function(a){r(arguments,function(a){n[a]= 106function(b,c){return n(S({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){r(arguments,function(a){n[a]=function(b,c,d){return n(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=a;return n}]}function Wf(){this.$get=function(){return function(){return new z.XMLHttpRequest}}}function Vf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return Pg(a,c,a.defer,b,d[0])}]}function Pg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK", 107b);var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m);f.removeEventListener("error",m);e.body.removeChild(f);f=null;var g=-1,s="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),s=a.type,g="error"===a.type?404:200);d&&d(g,s)};f.addEventListener("load",m);f.addEventListener("error",m);e.body.appendChild(f);return m}return function(e,k,h,l,m,p,n,s,G,t){function N(a){J="timeout"===a;pa&&pa();y&&y.abort()}function v(a, 108b,c,e,f,g){w(P)&&d.cancel(P);pa=y=null;a(b,c,e,f,g)}k=k||a.url();if("jsonp"===K(e))var q=c.createCallback(k),pa=f(k,q,function(a,b){var d=200===a&&c.getResponse(q);v(l,a,d,"",b,"complete");c.removeCallback(q)});else{var y=b(e,k),J=!1;y.open(e,k,!0);r(m,function(a,b){w(a)&&y.setRequestHeader(b,a)});y.onload=function(){var a=y.statusText||"",b="response"in y?y.response:y.responseText,c=1223===y.status?204:y.status;0===c&&(c=b?200:"file"===ga(k).protocol?404:0);v(l,c,b,y.getAllResponseHeaders(),a,"complete")}; 109y.onerror=function(){v(l,-1,null,null,"","error")};y.ontimeout=function(){v(l,-1,null,null,"","timeout")};y.onabort=function(){v(l,-1,null,null,"",J?"timeout":"abort")};r(G,function(a,b){y.addEventListener(b,a)});r(t,function(a,b){y.upload.addEventListener(b,a)});n&&(y.withCredentials=!0);if(s)try{y.responseType=s}catch(I){if("json"!==s)throw I;}y.send(A(h)?null:h)}if(0<p)var P=d(function(){N("timeout")},p);else p&&B(p.then)&&p.then(function(){N(w(p.$$timeoutId)?"timeout":"abort")})}}function Pf(){var a= 110"{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(p,a).replace(n,b)}function k(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function h(f,h,n,p){function v(a){try{return a=n&&!r?e.getTrusted(n,a):e.valueOf(a),p&&!w(a)?a:jc(a)}catch(b){c(Ma.interr(f,b))}}var r=n===e.URL||n===e.MEDIA_URL;if(!f.length|| 111-1===f.indexOf(a)){if(h)return;h=g(f);r&&(h=e.getTrusted(n,h));h=ia(h);h.exp=f;h.expressions=[];h.$$watchDelegate=k;return h}p=!!p;for(var q,y,J=0,I=[],P,Q=f.length,M=[],L=[],u;J<Q;)if(-1!==(q=f.indexOf(a,J))&&-1!==(y=f.indexOf(b,q+l)))J!==q&&M.push(g(f.substring(J,q))),J=f.substring(q+l,y),I.push(J),J=y+m,L.push(M.length),M.push("");else{J!==Q&&M.push(g(f.substring(J)));break}u=1===M.length&&1===L.length;var R=r&&u?void 0:v;P=I.map(function(a){return d(a,R)});if(!h||I.length){var x=function(a){for(var b= 1120,c=I.length;b<c;b++){if(p&&A(a[b]))return;M[L[b]]=a[b]}if(r)return e.getTrusted(n,u?M[0]:M.join(""));n&&1<M.length&&Ma.throwNoconcat(f);return M.join("")};return S(function(a){var b=0,d=I.length,e=Array(d);try{for(;b<d;b++)e[b]=P[b](a);return x(e)}catch(g){c(Ma.interr(f,g))}},{exp:f,expressions:I,$$watchDelegate:function(a,b){var c;return a.$watchGroup(P,function(d,e){var f=x(d);b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,p=new RegExp(a.replace(/./g,f),"g"),n=new RegExp(b.replace(/./g, 113f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function Qf(){this.$get=["$$intervalFactory","$window",function(a,b){var d={},c=function(a){b.clearInterval(a);delete d[a]},e=a(function(a,c,e){a=b.setInterval(a,c);d[a]=e;return a},c);e.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$intervalId"))throw Qg("badprom");if(!d.hasOwnProperty(a.$$intervalId))return!1;a=a.$$intervalId;var b=d[a],e=b.promise;e.$$state&&(e.$$state.pur=!0);b.reject("canceled"); 114c(a);return!0};return e}]}function Rf(){this.$get=["$browser","$q","$$q","$rootScope",function(a,b,d,c){return function(e,f){return function(g,k,h,l){function m(){p?g.apply(null,n):g(s)}var p=4<arguments.length,n=p?Ha.call(arguments,4):[],s=0,G=w(l)&&!l,t=(G?d:b).defer(),r=t.promise;h=w(h)?h:0;r.$$intervalId=e(function(){G?a.defer(m):c.$evalAsync(m);t.notify(s++);0<h&&s>=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Cd(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host= 115d.hostname;b.$$port=fa(d.port)||Rg[d.protocol]||null}function Dd(a,b,d){if(Sg.test(a))throw kb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=hc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0, 116b.length)===b}function ya(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function zc(a,b,d){this.$$html5=!0;d=d||"";Cd(a,this);this.$$parse=function(a){var d=ya(b,a);if(!C(d))throw kb("ipthprfx",a,b);Dd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ya(a,c))?(g=f,g=d&&w(f=ya(d,f))? 117b+(ya("/",f)||f):a+g):w(f=ya(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Cd(a,this);this.$$parse=function(c){var e=ya(a,c)||ya(b,c),f;A(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",A(e)&&(a=c,this.replace())):(f=ya(d,e),A(f)&&(f=e));Dd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b, 118d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Ed(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=ya(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Mb(a){return function(){return this[a]}}function Fd(a,b){return function(d){if(A(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Yf(){var a="!", 119b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||C(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a, 120b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw kb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?zc:Ed}else s=Da(n),p=Ac;var r=s.substr(0,Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i; 121f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!C(e)||!A(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!== 122n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){yc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!== 123m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Zf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){dc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& 124(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=wa||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Tg(a){return a+""}function Ug(a,b){return"undefined"!==typeof a?a: 125b}function Gd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Vg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Hd:b}function Z(a,b,d){var c,e,f=a.isPure=Vg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch= 126[];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&& 127a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left, 128b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant= 129!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Id(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Jd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Kd(a){if(1===a.body.length&&Jd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Ld(a){this.$filter=a}function Md(a){this.$filter=a}function Nb(a,b,d){this.ast= 130new q(a,d);this.astCompiler=d.csp?new Md(b):new Ld(b)}function Bc(a){return B(a.valueOf)?a.valueOf():Wg.call(a)}function $f(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(G),d=(new Nb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E, 131c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n<p;n++)l[n]=g,m[n]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var k=f[c](a);if(b||(b=!g(k,l[c],f[c].isPure)))m[c]=k,l[c]=k&&Bc(k)}b&& 132(h=d(a,void 0,void 0,m));return h},b,c,e)}function h(a,b,c,d,e){function f(){h(m)&&k()}function g(a,b,c,d){m=u&&d?d[0]:n(a,b,c,d);h(m)&&a.$$postDigest(f);return s(m)}var h=d.literal?l:w,k,m,n=d.$$intercepted||d,s=d.$$interceptor||Ta,u=d.inputs&&!n.inputs;g.literal=d.literal;g.constant=d.constant;g.inputs=d.inputs;p(g);return k=a.$watch(g,b,c,e)}function l(a){var b=!0;r(a,function(a){w(a)||(b=!1)});return b}function m(a,b,c,d){var e=a.$watch(function(a){e();return d(a)},b,c);return e}function p(a){a.constant? 133a.$$watchDelegate=m:a.oneTime?a.$$watchDelegate=h:a.inputs&&(a.$$watchDelegate=k);return a}function n(a,b){function c(d){return b(a(d))}c.$stateful=a.$stateful||b.$stateful;c.$$pure=a.$$pure&&b.$$pure;return c}function s(a,b){if(!b)return a;a.$$interceptor&&(b=n(a.$$interceptor,b),a=a.$$intercepted);var c=!1,d=function(d,e,f,g){d=c&&g?g[0]:a(d,e,f,g);return b(d)};d.$$intercepted=a;d.$$interceptor=b;d.literal=a.literal;d.oneTime=a.oneTime;d.constant=a.constant;b.$stateful||(c=!a.inputs,d.inputs=a.inputs? 134a.inputs:[a],b.$$pure||(d.inputs=d.inputs.map(function(a){return a.isPure===Hd?function(b){return a(b)}:a})));return p(d)}var G={csp:Ba().noUnsafeEval,literals:Ia(b),isIdentifierStart:B(d)&&d,isIdentifierContinue:B(c)&&c};f.$$getAst=function(a){var b=new Ob(G);return(new Nb(b,e,G)).getAst(a).ast};return f}]}function bg(){var a=!0;this.$get=["$rootScope","$exceptionHandler",function(b,d){return Nd(function(a){b.$evalAsync(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this): 135a}}function cg(){var a=!0;this.$get=["$browser","$exceptionHandler",function(b,d){return Nd(function(a){b.defer(a)},d,a)}];this.errorOnUnhandledRejections=function(b){return w(b)?(a=b,this):a}}function Nd(a,b,d){function c(){return new e}function e(){var a=this.promise=new f;this.resolve=function(b){h(a,b)};this.reject=function(b){m(a,b)};this.notify=function(b){n(a,b)}}function f(){this.$$state={status:0}}function g(){for(;!w&&x.length;){var a=x.shift();if(!a.pur){a.pur=!0;var c=a.value,c="Possibly unhandled rejection: "+ 136("function"===typeof c?c.toString().replace(/ \{[\s\S]*$/,""):A(c)?"undefined":"string"!==typeof c?Ne(c,void 0):c);dc(a.value)?b(a.value,c):b(c)}}}function k(c){!d||c.pending||2!==c.status||c.pur||(0===w&&0===x.length&&a(g),x.push(c));!c.processScheduled&&c.pending&&(c.processScheduled=!0,++w,a(function(){var e,f,k;k=c.pending;c.processScheduled=!1;c.pending=void 0;try{for(var l=0,n=k.length;l<n;++l){c.pur=!0;f=k[l][0];e=k[l][c.status];try{B(e)?h(f,e(c.value)):1===c.status?h(f,c.value):m(f,c.value)}catch(p){m(f, 137p),p&&!0===p.$$passToExceptionHandler&&b(p)}}}finally{--w,d&&0===w&&a(g)}}))}function h(a,b){a.$$state.status||(b===a?p(a,v("qcycle",b)):l(a,b))}function l(a,b){function c(b){g||(g=!0,l(a,b))}function d(b){g||(g=!0,p(a,b))}function e(b){n(a,b)}var f,g=!1;try{if(D(b)||B(b))f=b.then;B(f)?(a.$$state.status=-1,f.call(b,c,d,e)):(a.$$state.value=b,a.$$state.status=1,k(a.$$state))}catch(h){d(h)}}function m(a,b){a.$$state.status||p(a,b)}function p(a,b){a.$$state.value=b;a.$$state.status=2;k(a.$$state)}function n(c, 138d){var e=c.$$state.pending;0>=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;f<g;f++){c=e[f][0];a=e[f][3];try{n(c,B(a)?a(d):d)}catch(h){b(h)}}})}function s(a){var b=new f;m(b,a);return b}function G(a,b,c){var d=null;try{B(c)&&(d=c())}catch(e){return s(e)}return d&&B(d.then)?d.then(function(){return b(a)},s):b(a)}function t(a,b,c,d){var e=new f;h(e,a);return e.then(b,c,d)}function q(a){if(!B(a))throw v("norslvr",a);var b=new f;a(function(a){h(b,a)},function(a){m(b,a)});return b} 139var v=F("$q",TypeError),w=0,x=[];S(f.prototype,{then:function(a,b,c){if(A(a)&&A(b)&&A(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&k(this.$$state);return d},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return G(b,y,a)},function(b){return G(b,s,a)},b)}});var y=t;q.prototype=f.prototype;q.defer=c;q.reject=s;q.when=t;q.resolve=y;q.all=function(a){var b=new f,c= 1400,d=H(a)?[]:{};r(a,function(a,e){c++;t(a).then(function(a){d[e]=a;--c||h(b,d)},function(a){m(b,a)})});0===c&&h(b,d);return b};q.race=function(a){var b=c();r(a,function(a){t(a).then(b.resolve,b.reject)});return b.promise};return q}function mg(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}: 141function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function ag(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++qb;this.$$ChildScope=null;this.$$suspended=!1}b.prototype=a;return b}var b=10,d=F("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$exceptionHandler","$parse","$browser", 142function(f,g,k){function h(a){a.currentScope.$$destroyed=!0}function l(a){9===wa&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++qb;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= 1430;this.$$isolateBindings=null}function p(a){if(v.$$phase)throw d("inprog",v.$$phase);v.$$phase=a}function n(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function s(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function G(){}function t(){for(;y.length;)try{y.shift()()}catch(a){f(a)}e=null}function q(){null===e&&(e=k.defer(function(){v.$apply(t)},null,"$applyAsync"))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?(d=new m, 144d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!==this)&&d.$on("$destroy",h);return d},$watch:function(a,b,d,e){var f=g(a);b=B(b)?b:E;if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:G,get:f,exp:e||a,eq:!!d};c=null;k||(k=h.$$watchers=[],k.$$digestWatchIndex=-1);k.unshift(l); 145k.$$digestWatchIndex++;n(this,1);return function(){var a=cb(k,l);0<=a&&(n(h,-1),a<k.$$digestWatchIndex&&k.$$digestWatchIndex--);c=null}},$watchGroup:function(a,b){function c(){h=!1;try{k?(k=!1,b(e,e,g)):b(e,d,g)}finally{for(var f=0;f<a.length;f++)d[f]=e[f]}}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});r(a,function(a, 146b){var d=g.$watch(a,function(a){e[b]=a;h||(h=!0,g.$evalAsync(c))});f.push(d)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!A(e)){if(D(e))if(za(e))for(f!==n&&(f=n,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},t=0,l++);a=0;for(b in e)ta.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++, 147f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1<b.length,l=0,m=g(a,c),n=[],p={},s=!0,t=0;return this.$watch(m,function(){s?(s=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(za(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,h,l,m,n,s,r=b,q,y=w.length?v:this,N=[],A,z;p("$digest");k.$$checkUrlChange();this===v&&null!==e&&(k.defer.cancel(e), 148t());c=null;do{s=!1;q=y;for(n=0;n<w.length;n++){try{z=w[n],l=z.fn,l(z.scope,z.locals)}catch(C){f(C)}c=null}w.length=0;a:do{if(n=!q.$$suspended&&q.$$watchers)for(n.$$digestWatchIndex=n.length;n.$$digestWatchIndex--;)try{if(a=n[n.$$digestWatchIndex])if(m=a.get,(g=m(q))!==(h=a.last)&&!(a.eq?va(g,h):Y(g)&&Y(h)))s=!0,c=a,a.last=a.eq?Ia(g,null):g,l=a.fn,l(g,h===G?g:h,q),5>r&&(A=4-r,N[A]||(N[A]=[]),N[A].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s= 149!1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;J<x.length;)try{x[J++]()}catch(D){f(D)}x.length=J=0;k.$$checkUrlChange()},$suspend:function(){this.$$suspended=!0},$isSuspended:function(){return this.$$suspended},$resume:function(){this.$$suspended=!1},$destroy:function(){if(!this.$$destroyed){var a= 150this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===v&&k.$$applicationDestroyed();n(this,-this.$$watchersCount);for(var b in this.$$listenerCount)s(this,this.$$listenerCount[b],b);a&&a.$$childHead===this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail===this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply= 151this.$evalAsync=this.$applyAsync=E;this.$on=this.$watch=this.$watchGroup=function(){return E};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){v.$$phase||w.length||k.defer(function(){w.length&&v.$digest()},null,"$evalAsync");w.push({scope:this,fn:g(a),locals:b})},$$postDigest:function(a){x.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{v.$$phase=null}}catch(b){f(b)}finally{try{v.$digest()}catch(c){throw f(c), 152c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&y.push(b);a=g(a);q()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(delete c[d],s(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented= 153!0},defaultPrevented:!1},k=db([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)break;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=db([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]|| 154[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var v=new m,w=v.$$asyncQueue=[],x=v.$$postDigestQueue=[],y=v.$$applyAsyncQueue=[],J=0;return v}]}function Qe(){var a=/^\s*(https?|s?ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationTrustedUrlList=function(b){return w(b)? 155(a=b,this):a};this.imgSrcSanitizationTrustedUrlList=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f=ga(d&&d.trim()).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function Xg(a){if("self"===a)return a;if(C(a)){if(-1<a.indexOf("***"))throw Ea("iwcard",a);a=Od(a).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*");return new RegExp("^"+a+"$")}if(ab(a))return new RegExp("^"+a.source+"$");throw Ea("imatcher");}function Pd(a){var b=[];w(a)&&r(a,function(a){b.push(Xg(a))}); 156return b}function eg(){this.SCE_CONTEXTS=W;var a=["self"],b=[];this.trustedResourceUrlList=function(b){arguments.length&&(a=Pd(b));return a};Object.defineProperty(this,"resourceUrlWhitelist",{get:function(){return this.trustedResourceUrlList},set:function(a){this.trustedResourceUrlList=a}});this.bannedResourceUrlList=function(a){arguments.length&&(b=Pd(a));return b};Object.defineProperty(this,"resourceUrlBlacklist",{get:function(){return this.bannedResourceUrlList},set:function(a){this.bannedResourceUrlList= 157a}});this.$get=["$injector","$$sanitizeUri",function(d,c){function e(a,b){var c;"self"===a?(c=Cc(b,Qd))||(z.document.baseURI?c=z.document.baseURI:(Na||(Na=z.document.createElement("a"),Na.href=".",Na=Na.cloneNode(!1)),c=Na.href),c=Cc(b,c)):c=!!a.exec(b.href);return c}function f(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()}; 158return b}var g=function(a){throw Ea("unsafe");};d.has("$sanitize")&&(g=d.get("$sanitize"));var k=f(),h={};h[W.HTML]=f(k);h[W.CSS]=f(k);h[W.MEDIA_URL]=f(k);h[W.URL]=f(h[W.MEDIA_URL]);h[W.JS]=f(k);h[W.RESOURCE_URL]=f(h[W.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw Ea("icontext",a,b);if(null===b||A(b)||""===b)return b;if("string"!==typeof b)throw Ea("itype",a);return new c(b)},getTrusted:function(d,f){if(null===f||A(f)||""===f)return f;var k=h.hasOwnProperty(d)? 159h[d]:null;if(k&&f instanceof k)return f.$$unwrapTrustedValue();B(f.$$unwrapTrustedValue)&&(f=f.$$unwrapTrustedValue());if(d===W.MEDIA_URL||d===W.URL)return c(f.toString(),d===W.MEDIA_URL);if(d===W.RESOURCE_URL){var k=ga(f.toString()),n,s,r=!1;n=0;for(s=a.length;n<s;n++)if(e(a[n],k)){r=!0;break}if(r)for(n=0,s=b.length;n<s;n++)if(e(b[n],k)){r=!1;break}if(r)return f;throw Ea("insecurl",f.toString());}if(d===W.HTML)return g(f);throw Ea("unsafe");},valueOf:function(a){return a instanceof k?a.$$unwrapTrustedValue(): 160a}}}]}function dg(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>wa)throw Ea("iequirks");var c=ja(W);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(W, 161function(a,b){var d=K(b);c[("parse_as_"+d).replace(Dc,xb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,xb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,xb)]=function(b){return g(a,b)}});return c}]}function fg(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))|| 162[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&wa)return!1;if(A(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function gg(){this.$get=ia(function(a){return new Yg(a)})}function Yg(a){function b(){var a=e.pop();return a&& 163a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}): 164a()}}function ig(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!C(k)||A(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==wc}):l===wc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)}, 165function(a){h||(a=Zg("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function jg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Od(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-", 166"data-ng-","ng\\:"],k=0;k<g.length;++k){var h=a.querySelectorAll("["+g[k]+"model"+(d?"=":"*=")+'"'+b+'"]');if(h.length)return h}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function kg(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,h,l){B(f)||(l=h,h=f,f=E);var m=Ha.call(arguments,3),p=w(l)&&!l,n=(p?c:d).defer(),s=n.promise,r; 167r=b.defer(function(){try{n.resolve(f.apply(null,m))}catch(b){n.reject(b),e(b)}finally{delete g[s.$$timeoutId]}p||a.$apply()},h,"$timeout");s.$$timeoutId=r;g[r]=n;return s}var g={};f.cancel=function(a){if(!a)return!1;if(!a.hasOwnProperty("$$timeoutId"))throw $g("badprom");if(!g.hasOwnProperty(a.$$timeoutId))return!1;a=a.$$timeoutId;var c=g[a],d=c.promise;d.$$state&&(d.$$state.pur=!0);c.reject("canceled");delete g[a];return b.defer.cancel(a)};return f}]}function ga(a){if(!C(a))return a;wa&&(aa.setAttribute("href", 168a),a=aa.href);aa.setAttribute("href",a);a=aa.hostname;!ah&&-1<a.indexOf(":")&&(a="["+a+"]");return{href:aa.href,protocol:aa.protocol?aa.protocol.replace(/:$/,""):"",host:aa.host,search:aa.search?aa.search.replace(/^\?/,""):"",hash:aa.hash?aa.hash.replace(/^#/,""):"",hostname:a,port:aa.port,pathname:"/"===aa.pathname.charAt(0)?aa.pathname:"/"+aa.pathname}}function Og(a){var b=[Qd].concat(a.map(ga));return function(a){a=ga(a);return b.some(Cc.bind(null,a))}}function Cc(a,b){a=ga(a);b=ga(b);return a.protocol=== 169b.protocol&&a.host===b.host}function lg(){this.$get=ia(z)}function Rd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,k,h,l;try{a=d.cookie||""}catch(m){a=""}if(a!==e)for(e=a,a=e.split("; "),c={},k=0;k<a.length;k++)g=a[k],h=g.indexOf("="),0<h&&(l=b(g.substring(0,h)),A(c[l])&&(c[l]=b(g.substring(h+1))));return c}}function pg(){this.$get=Rd}function fd(a){function b(d,c){if(D(d)){var e={};r(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+ 170"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Sd);b("date",Td);b("filter",bh);b("json",ch);b("limitTo",dh);b("lowercase",eh);b("number",Ud);b("orderBy",Vd);b("uppercase",fh)}function bh(){return function(a,b,d,c){if(!za(a)){if(null==a)return a;throw F("filter")("notarray",a);}c=c||"$";var e;switch(Ec(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=gh(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a, 171b)}}function gh(a,b,d,c){var e=D(a)&&d in a;!0===b?b=va:B(b)||(b=function(a,b){if(A(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!cc(a))return!1;a=K(""+a);b=K(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?Fa(f,a[d],b,d,!1):Fa(f,a,b,d,c)}}function Fa(a,b,d,c,e,f){var g=Ec(a),k=Ec(b);if("string"===k&&"!"===b.charAt(0))return!Fa(a,b.substring(1),d,c,e);if(H(a))return a.some(function(a){return Fa(a,b,d,c,e)});switch(g){case "object":var h;if(e){for(h in a)if(h.charAt&& 172"$"!==h.charAt(0)&&Fa(a[h],b,d,c,!0))return!0;return f?!1:Fa(a,b,d,c,!1)}if("object"===k){for(h in b)if(f=b[h],!B(f)&&!A(f)&&(g=h===c,!Fa(g?a:a[h],f,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function Ec(a){return null===a?"null":typeof a}function Sd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){A(c)&&(c=b.CURRENCY_SYM);A(e)&&(e=b.PATTERNS[1].maxFrac);var f=c?/\u00A4/g:/\s*\u00A4\s*/g;return null==a?a:Wd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(f, 173c)}}function Ud(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Wd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function hh(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Xd))&&(a=a.replace(Xd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Yd&&(d=d.splice(0,Yd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ih(a, 174b,d,c){var e=a.d,f=e.length-a.i;b=A(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Wd(a,b,d,c,e){if(!C(a)&&!X(a)||isNaN(a))return""; 175var f=!isFinite(a),g=!1,k=Math.abs(a)+"",h="";if(f)h="\u221e";else{g=hh(k);ih(g,e,b.minFrac,b.maxFrac);h=g.d;k=g.i;e=g.e;f=[];for(g=h.reduce(function(a,b){return a&&!b},!0);0>k;)h.unshift(0),k++;0<k?f=h.splice(k,h.length):(f=h,h=[0]);k=[];for(h.length>=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+ 176h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=Fc+a;d&&(a=a.substr(a.length-b));return e+a}function ea(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function lb(a,b,d){return function(c,e){var f=c["get"+a](),g=vb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Zd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function $d(a){return function(b){var d= 177Zd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Td(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+ 178(b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;C(c)&&(c=jh.test(c)?fa(c):b(c));X(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=kh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=fc(f,m),c=gc(c,f,!0));r(k,function(b){h=lh[b];g+=h?h(c,a.DATETIME_FORMATS, 179m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ch(){return function(a,b){A(b)&&(b=2);return eb(a,b)}}function dh(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(Y(b))return a;X(a)&&(a=a.toString());if(!za(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return C(a)?a.slice(b,d):Ha.call(a,b,d)}function Vd(a){function b(b){return b.map(function(b){var c= 1801,d=Ta;if(B(b))d=b;else if(C(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c= 181h<l?-1:1)}else c="undefined"===d?1:"undefined"===h?-1:"null"===d?1:"null"===h?-1:d<h?-1:1;return c}return function(a,f,g,k){if(null==a)return a;if(!za(a))throw F("orderBy")("notarray",a);H(f)||(f=[f]);0===f.length&&(f=["+"]);var h=b(f),l=g?-1:1,m=B(k)?k:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:h.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="null";else if("object"===c)a:{if(B(e.valueOf)&&(e=e.valueOf(),d(e)))break a; 182cc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var d=0,e=h.length;d<e;d++){var f=m(a.predicateValues[d],b.predicateValues[d]);if(f)return f*h[d].descending*l}return(m(a.tieBreaker,b.tieBreaker)||c(a.tieBreaker,b.tieBreaker))*l});return a=a.map(function(a){return a.value})}}function Ra(a){B(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ia(a)}function Qb(a,b,d,c,e){this.$$controls=[];this.$error={};this.$$success={};this.$pending=void 0;this.$name=e(b.name|| 183b.ngForm||"")(d);this.$dirty=!1;this.$valid=this.$pristine=!0;this.$submitted=this.$invalid=!1;this.$$parentForm=mb;this.$$element=a;this.$$animate=c;ae(this)}function ae(a){a.$$classCache={};a.$$classCache[be]=!(a.$$classCache[nb]=a.$$element.hasClass(nb))}function ce(a){function b(a,b,c){c&&!a.$$classCache[b]?(a.$$animate.addClass(a.$$element,b),a.$$classCache[b]=!0):!c&&a.$$classCache[b]&&(a.$$animate.removeClass(a.$$element,b),a.$$classCache[b]=!1)}function d(a,c,d){c=c?"-"+Xc(c,"-"):"";b(a,nb+ 184c,!0===d);b(a,be+c,!1===d)}var c=a.set,e=a.unset;a.clazz.prototype.$setValidity=function(a,g,k){A(g)?(this.$pending||(this.$pending={}),c(this.$pending,a,k)):(this.$pending&&e(this.$pending,a,k),de(this.$pending)&&(this.$pending=void 0));Ga(g)?g?(e(this.$error,a,k),c(this.$$success,a,k)):(c(this.$error,a,k),e(this.$$success,a,k)):(e(this.$error,a,k),e(this.$$success,a,k));this.$pending?(b(this,"ng-pending",!0),this.$valid=this.$invalid=void 0,d(this,"",null)):(b(this,"ng-pending",!1),this.$valid= 185de(this.$error),this.$invalid=!this.$valid,d(this,"",this.$valid));g=this.$pending&&this.$pending[a]?void 0:this.$error[a]?!1:this.$$success[a]?!0:null;d(this,a,g);this.$$parentForm.$setValidity(a,g,this)}}function de(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}function Ic(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function Sa(a,b,d,c,e,f){var g=K(b[0].type);if(!e.android){var k=!1;b.on("compositionstart",function(){k=!0});b.on("compositionupdate", 186function(a){if(A(a.data)||""===a.data)k=!1});b.on("compositionend",function(){k=!1;l()})}var h,l=function(a){h&&(f.defer.cancel(h),h=null);if(!k){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=V(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){h||(h=f.defer(function(){h=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b|| 187m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ee[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(C(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length- 1881)&&(d=d.substring(1,d.length-1));if(mh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),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 ob(a,b,d,c){return function(e,f,g,k,h,l,m, 189p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Uc(b,fc(v)));var e=d(a,b);!isNaN(e)&&c&&(e=gc(e,c));return e}Jc(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw pb("datefmt",a);if(n(a)){q=a;var b= 190k.$options.getOption("timezone");b&&(v=b,q=gc(q,b,!0));var d=c;t&&C(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),z=s(x);k.$validators.min=function(a){return!n(a)||A(z)||d(a)>=z};g.$observe("min",function(a){a!==x&&(z=s(a),x=a,k.$validate())})}if(w(g.max)|| 191g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||A(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function fe(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(nh.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!X(b))throw pb("numfmt", 192b);b=b.toString()}return b})}function na(a){w(a)&&!X(a)&&(a=parseFloat(a));return Y(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1<a&&1>a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ge(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function he(a,b,d,c,e){if(w(c)){a= 193a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e===b[m])continue a;c.push(e)}return c}function c(a){if(!a)return a;var b=a;H(a)?b=a.map(c).join(" "):D(a)?b=Object.keys(a).filter(function(b){return a[b]}).join(" "):C(a)||(b=a+"");return b}a="ngClass"+a;var e;return["$parse",function(f){return{restrict:"AC",link:function(g, 194k,h){function l(a,b){var c=[];r(a,function(a){if(0<b||p[a])p[a]=(p[a]||0)+b,p[a]===+(0<b)&&c.push(a)});return c.join(" ")}function m(a){if(a===b){var c=s,c=l(c&&c.split(" "),1);h.$addClass(c)}else c=s,c=l(c&&c.split(" "),-1),h.$removeClass(c);n=a}var p=k.data("$classCounts"),n=!0,s;p||(p=T(),k.data("$classCounts",p));"ngClass"!==a&&(e||(e=f("$index",function(a){return a&1})),g.$watch(e,m));g.$watch(f(h[a],c),function(a){if(n===b){var c=s&&s.split(" "),e=a&&a.split(" "),f=d(c,e),c=d(e,c),f=l(f,-1), 195c=l(c,1);h.$addClass(c);h.$removeClass(f)}s=a})}}}]}function sd(a,b,d,c,e,f){return{restrict:"A",compile:function(g,k){var h=a(k[c]);return function(a,c){c.on(e,function(c){var e=function(){h(a,{$event:c})};if(b.$$phase)if(f)a.$evalAsync(e);else try{e()}catch(g){d(g)}else a.$apply(e)})}}}}function Sb(a,b,d,c,e,f,g,k,h){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners= 196[];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=h(d.name||"",!1)(a);this.$$parentForm=mb;this.$options=Tb;this.$$updateEvents="";this.$$updateEventHandler=this.$$updateEventHandler.bind(this);this.$$parsedNgModel=e(d.ngModel);this.$$parsedNgModelAssign=this.$$parsedNgModel.assign;this.$$ngModelGet=this.$$parsedNgModel;this.$$ngModelSet=this.$$parsedNgModelAssign;this.$$pendingDebounce= 197null;this.$$parserValid=void 0;this.$$parserName="parse";this.$$currentValidationRunId=0;this.$$scope=a;this.$$rootScope=a.$root;this.$$attr=d;this.$$element=c;this.$$animate=f;this.$$timeout=g;this.$$parse=e;this.$$q=k;this.$$exceptionHandler=b;ae(this);oh(this)}function oh(a){a.$$scope.$watch(function(b){b=a.$$ngModelGet(b);b===a.$modelValue||a.$modelValue!==a.$modelValue&&b!==b||a.$$setModelValue(b);return b})}function Mc(a){this.$$options=a}function ie(a,b){r(b,function(b,c){w(a[c])||(a[c]=b)})} 198function Oa(a,b){a.prop("selected",b);a.attr("selected",b)}function je(a,b,d){if(a){C(a)&&(a=new RegExp("^"+a+"$"));if(!a.test)throw F("ngPattern")("noregexp",b,a,Aa(d));return a}}function Ub(a){a=fa(a);return Y(a)?-1:a}var Xb={objectMaxDepth:5,urlErrorParamsEnabled:!0},ke=/^\/(.+)\/([a-z]*)$/,ta=Object.prototype.hasOwnProperty,K=function(a){return C(a)?a.toLowerCase():a},vb=function(a){return C(a)?a.toUpperCase():a},wa,x,sb,Ha=[].slice,Kg=[].splice,ph=[].push,la=Object.prototype.toString,Rc=Object.getPrototypeOf, 199oa=F("ng"),ca=z.angular||(z.angular={}),lc,qb=0;wa=z.document.documentMode;var Y=Number.isNaN||function(a){return a!==a};E.$inject=[];Ta.$inject=[];var ze=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,V=function(a){return C(a)?a.trim():a},Od=function(a){return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=z.document.querySelector("[ng-csp]")||z.document.querySelector("[data-ng-csp]");if(a){var b= 200a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Qa.length,c,e;for(b=0;b<d;++b)if(c=Qa[b],a=z.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return rb.name_=e},Be=/:/g,Qa=["ng-", 201"data-ng-","ng:","x-ng-"],Fe=function(a){var b=a.currentScript;if(!b)return!0;if(!(b instanceof z.HTMLScriptElement||b instanceof z.SVGScriptElement))return!1;b=b.attributes;return[b.getNamedItem("src"),b.getNamedItem("href"),b.getNamedItem("xlink:href")].every(function(b){if(!b)return!0;if(!b.value)return!1;var c=a.createElement("a");c.href=b.value;if(a.location.origin===c.origin)return!0;switch(c.protocol){case "http:":case "https:":case "ftp:":case "blob:":case "file:":case "data:":return!0;default:return!1}})}(z.document), 202Ie=/[A-Z]/g,Yc=!1,Pa=3,Pe={full:"
202",major:0,minor:0,dot:0,codeName:"
vendor: 74,250 bytes, lines 202-346
202"};U.expando="ng339";var Ka=U.cache={},ug=1;U._data=function(a){return this.cache[a[this.expando]]||{}};var qg=/-([a-z])/g,qh=/^-ms-/,Bb={mouseleave:"mouseout",mouseenter:"mouseover"},oc=F("jqLite"),tg=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,nc=/<|&#?\w+;/,rg=/<([\w:-]+)/,sg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qa={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr", 203"tbody","table"]};qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;qa.th=qa.td;var hb={option:[1,'<select multiple="multiple">',"</select>"],_default:[0,"",""]},Nc;for(Nc in qa){var le=qa[Nc],me=le.slice().reverse();hb[Nc]=[me.length,"<"+me.join("><")+">","</"+le.join("></")+">"]}hb.optgroup=hb.option;var zg=z.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=U.prototype={ready:hd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+ 204"]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:ph,sort:[].sort,splice:[].splice},Hb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Hb[K(a)]=a});var od={};r("input select option textarea button form details".split(" "),function(a){od[a]=!0});var vd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:sc,removeData:rc,hasData:function(a){for(var b in Ka[a.ng339])return!0; 205return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)rc(a[b]),kd(a[b])}},function(a,b){U[b]=a});r({data:sc,inheritedData:Fb,scope:function(a){return x.data(a,"$scope")||Fb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return x.data(a,"$isolateScope")||x.data(a,"$isolateScopeNoTemplate")},controller:ld,injector:function(a){return Fb(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:Cb,css:function(a,b,d){b=yb(b.replace(qh,"ms-"));if(w(d))a.style[b]= 206d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Pa&&2!==c&&8!==c&&a.getAttribute){var c=K(b),e=Hb[c];if(w(d))null===d||!1===d&&e?a.removeAttribute(b):a.setAttribute(b,e?c:d);else return a=a.getAttribute(b),e&&null!==a&&(a=c),null===a?void 0:a}},prop:function(a,b,d){if(w(d))a[b]=d;else return a[b]},text:function(){function a(a,d){if(A(d)){var c=a.nodeType;return 1===c||c===Pa?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(A(b)){if(a.multiple&&"select"=== 207ua(a)){var d=[];r(a.options,function(a){a.selected&&d.push(a.value||a.text)});return d}return a.value}a.value=b},html:function(a,b){if(A(b))return a.innerHTML;zb(a,!0);a.innerHTML=b},empty:md},function(a,b){U.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==md&&A(2===a.length&&a!==Cb&&a!==ld?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===sc)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=A(e)?Math.min(g,1):g;for(f=0;f<g;f++){var k=a(this[f],b,c);e=e?e+k:k}return e}for(e=0;e<g;e++)a(this[e], 208b,c);return this}});r({removeData:rc,on:function(a,b,d,c){if(w(c))throw oc("onargs");if(mc(a)){c=Ab(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=wg(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,k=function(b,c,g){var k=e[b];k||(k=e[b]=[],k.specialHandlerWrapper=c,"$destroy"===b||g||a.addEventListener(b,f));k.push(d)};g--;)b=c[g],Bb[b]?(k(Bb[b],yg),k(b,void 0,!0)):k(b)}},off:kd,one:function(a,b,d){a=x(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a, 209b){var d,c=a.parentNode;zb(a);r(new U(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];r(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=a.nodeType;if(1===d||11===d){b=new U(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;r(new U(b),function(b){a.insertBefore(b,d)})}}, 210wrap:function(a,b){var d=x(b).eq(0).clone()[0],c=a.parentNode;c&&c.replaceChild(d,a);d.appendChild(a)},remove:Gb,detach:function(a){Gb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;if(c){b=new U(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}}},addClass:Eb,removeClass:Db,toggleClass:function(a,b,d){b&&r(b.split(" "),function(b){var e=d;A(e)&&(e=!Cb(a,b));(e?Eb:Db)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling}, 211find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:qc,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=Ab(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:E,type:f,target:a},b.type&&(c=S(c, 212b)),b=ja(g),e=d?[c].concat(d):[c],r(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){U.prototype[b]=function(b,c,e){for(var f,g=0,k=this.length;g<k;g++)A(f)?(f=a(this[g],b,c,e),w(f)&&(f=x(f))):pc(f,a(this[g],b,c,e));return w(f)?f:this}});U.prototype.bind=U.prototype.on;U.prototype.unbind=U.prototype.off;var rh=Object.create(null);pd.prototype={_idx:function(a){a!==this._lastKey&&(this._lastKey=a,this._lastIndex=this._keys.indexOf(a));return this._lastIndex},_transformKey:function(a){return Y(a)? 213rh:a},get:function(a){a=this._transformKey(a);a=this._idx(a);if(-1!==a)return this._values[a]},has:function(a){a=this._transformKey(a);return-1!==this._idx(a)},set:function(a,b){a=this._transformKey(a);var d=this._idx(a);-1===d&&(d=this._lastIndex=this._keys.length);this._keys[d]=a;this._values[d]=b},delete:function(a){a=this._transformKey(a);a=this._idx(a);if(-1===a)return!1;this._keys.splice(a,1);this._values.splice(a,1);this._lastKey=NaN;this._lastIndex=-1;return!0}};var Ib=pd,og=[function(){this.$get= 214[function(){return Ib}]}],Bg=/^([^(]+?)=>/,Cg=/^[^(]*\(\s*([^)]*)\)/m,sh=/,/,th=/^\s*(_?)(\S+?)\1\s*$/,Ag=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ca=F("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw C(d)&&d||(d=a.name||Dg(a)),Ca("strictdi",d);b=qd(a);r(b[1].split(sh),function(a){a.replace(th,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,tb(a[b],"fn"),c=a.slice(0,b)):tb(a,"fn",!0);return c};var ne=F("$animate"), 215Ef=function(){this.$get=E},Ff=function(){var a=new Ib,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=C(b)?b.split(" "):H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=Eg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Eb(a,e);f&&Db(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g, 216k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Cf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ne("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g, 217d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ne("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e<d.length;e++){var f=d[e];if(1===f.nodeType){e=f;break a}}e=void 0}!e||e.parentNode||e.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on, 218off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.cancel&&a.cancel()},enter:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"enter",ra(l))},move:function(c,d,h,l){d=d&&x(d);h=h&&x(h);d=d||h.parent();b(c,d,h);return a.push(c,"move",ra(l))},leave:function(b,c){return a.push(b,"leave",ra(c),function(){b.remove()})},addClass:function(b,c,d){d=ra(d);d.addClass=ib(d.addclass,c);return a.push(b,"addClass",d)},removeClass:function(b,c,d){d=ra(d);d.removeClass=ib(d.removeClass, 219c);return a.push(b,"removeClass",d)},setClass:function(b,c,d,f){f=ra(f);f.addClass=ib(f.addClass,c);f.removeClass=ib(f.removeClass,d);return a.push(b,"setClass",f)},animate:function(b,c,d,f,m){m=ra(m);m.from=m.from?S(m.from,c):c;m.to=m.to?S(m.to,d):d;m.tempClasses=ib(m.tempClasses,f||"ng-inline-animate");return a.push(b,"animate",m)}}}]}],Hf=function(){this.$get=["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a= 220!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},Gf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){c()?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;r(a,function(a){a.done(c)})}; 221f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:E,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&& 222this.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(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(r(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return f}]},Df=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&& 223(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);k||h.complete();k=!0});return h}var g=e||{};g.$$prepared||(g=Ia(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var k,h=new d;return{start:f,end:f}}}]},$=F("$compile"),uc=new function(){};Zc.$inject=["$provide","$$sanitizeUriProvider"];Kb.prototype.isFirstChange=function(){return this.previousValue===uc};var rd=/^((?:x|data)[:\-_])/i,Jg= 224/[:\-_]+(.)/g,xd=F("$controller"),wd=/^(\S+)(\s+as\s+([\w$]+))?$/,Of=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof x&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},yd="application/json",xc={"Content-Type":yd+";charset=utf-8"},Mg=/^\[|^\{(?!\{)/,Ng={"[":/]$/,"{":/}$/},Lg=/^\)]\}',?\n/,Lb=F("$http"),Ma=ca.$interpolateMinErr=F("$interpolate");Ma.throwNoconcat=function(a){throw Ma("noconcat",a);};Ma.interr=function(a,b){return Ma("interr",a,b.toString())}; 225var Qg=F("$interval"),Xf=function(){this.$get=function(){function a(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var b=ca.callbacks,d={};return{createCallback:function(c){c="_"+(b.$$counter++).toString(36);var e="angular.callbacks."+c,f=a(c);d[e]=b[c]=f;return e},wasCalled:function(a){return d[a].called},getResponse:function(a){return d[a].data},removeCallback:function(a){delete b[d[a].id];delete d[a]}}}},uh=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Rg={http:80,https:443,ftp:21},kb=F("$location"), 226Sg=/^\s*[\\/]{2,}/,vh={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){for(var a=this.$$path,b=this.$$hash,d=Ce(this.$$search),b=b?"#"+ic(b):"",a=a.split("/"),c=a.length;c--;)a[c]=ic(a[c].replace(/%2F/g,"/"));this.$$url=a.join("/")+(d?"?"+d:"")+b;this.$$absUrl=this.$$normalizeUrl(this.$$url);this.$$urlUpdatedByLocation=!0},absUrl:Mb("$$absUrl"),url:function(a){if(A(a))return this.$$url;var b=uh.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]|| 227"");this.hash(b[5]||"");return this},protocol:Mb("$$protocol"),host:Mb("$$host"),port:Mb("$$port"),path:Fd("$$path",function(a){a=null!==a?a.toString():"";return"/"===a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(C(a)||X(a))a=a.toString(),this.$$search=hc(a);else if(D(a))a=Ia(a,{}),r(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw kb("isrcharg");break;default:A(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose(); 228return this},hash:Fd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};r([Ed,Ac,zc],function(a){a.prototype=Object.create(vh);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==zc||!this.$$html5)throw kb("nostate");this.$$state=A(b)?null:b;this.$$urlUpdatedByLocation=!0;return this}});var Ya=F("$parse"),Wg={}.constructor.prototype.valueOf,Vb=T();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Vb[a]= 229!0});var wh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index, 230text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Vb[b],e=Vb[d];Vb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"=== 231typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)}, 232isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b= 233w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=K(this.text.charAt(this.index));if("."===d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"===d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"===a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!==a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b, 234text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+ 2351,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=wh[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var q=function(a,b){this.lexer=a;this.options=b};q.Program="Program";q.ExpressionStatement="ExpressionStatement";q.AssignmentExpression="AssignmentExpression";q.ConditionalExpression= 236"ConditionalExpression";q.LogicalExpression="LogicalExpression";q.BinaryExpression="BinaryExpression";q.UnaryExpression="UnaryExpression";q.CallExpression="CallExpression";q.MemberExpression="MemberExpression";q.Identifier="Identifier";q.Literal="Literal";q.ArrayExpression="ArrayExpression";q.Property="Property";q.ObjectExpression="ObjectExpression";q.ThisExpression="ThisExpression";q.LocalsExpression="LocalsExpression";q.NGValueParameter="NGValueParameter";q.prototype={ast:function(a){this.text= 237a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:q.Program,body:a}},expressionStatement:function(){return{type:q.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a}, 238expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();if(this.expect("=")){if(!Jd(a))throw Ya("lval");a={type:q.AssignmentExpression,left:a,right:this.assignment(),operator:"="}}return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:q.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:q.LogicalExpression, 239operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:q.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:q.BinaryExpression,operator:b.text, 240left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()}, 241primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression", 242this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression()); 243return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]"); 244return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"), 245b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe", 246this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Hd=2;Ld.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[], 247body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Kd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Id(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage= 248"main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Tg,Ug,Gd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+ 249";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")}, 250recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0, 251void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right, 252b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)), 253h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b, 254m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)): 255(k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context, 256g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId(); 257h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+ 258b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a, 259b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a, 260b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(C(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(X(a))return a.toString();if(!0===a)return"true";if(!1=== 261a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Md.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Kd(a))c=this.recurse(d);d=Id(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body, 262function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left), 263e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c, 264e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n<g.length;++n)p.push(g[n](a,c,d,f));a=e.apply(void 0,p,f);return b?{context:void 0,name:void 0,value:a}:a}:function(a,c,d,f){var p=e(a,c,d,f),n;if(null!=p.value){n=[];for(var s=0;s<g.length;++s)n.push(g[s](a,c,d,f));n=p.value.apply(p.context,n)}return b? 265{value:n}:n};case q.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,f,g){var p=c(a,d,f,g);a=e(a,d,f,g);p.context[p.name]=a;return b?{value:a}:a};case q.ArrayExpression:return g=[],r(a.elements,function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case q.ObjectExpression:return g=[],r(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}): 266g.push({key:a.key.type===q.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)g[n].computed?f[g[n].key(a,c,d,e)]=g[n].value(a,c,d,e):f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case q.ThisExpression:return function(a){return b?{value:a}:a};case q.LocalsExpression:return function(a,c){return b?{value:c}:c};case q.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d, 267c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:-0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=Gd(k,c);return d?{value:k}:k}},"binary-":function(a,b,d){return function(c,e,f,g){var k=a(c,e,f,g);c=b(c,e,f,g);k=(w(k)?k:0)-(w(c)?c:0);return d?{value:k}:k}},"binary*":function(a,b, 268d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c, 269e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c= 270a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c= 271e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d, 272c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a), 273oneTime:b}}};var Ea=F("$sce"),W={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Zg=F("$templateRequest"),$g=F("$timeout"),aa=z.document.createElement("a"),Qd=ga(z.location.href),Na;aa.href="http://[::1]";var ah="[::1]"===aa.hostname;Rd.$inject=["$document"];fd.$inject=["$provide"];var Yd=22,Xd=".",Fc="0";Sd.$inject=["$locale"];Ud.$inject=["$locale"];var lh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0), 274MMMM:lb("Month"),MMM:lb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:lb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0<a?"floor":"ceil"](a/60),2)+Pb(Math.abs(a%60),2))}, 275ww:$d(2),w:$d(1),G:Gc,GG:Gc,GGG:Gc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},kh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,jh=/^-?\d+$/;Td.$inject=["$locale"];var eh=ia(K),fh=ia(vb);Vd.$inject=["$parse"];var Re=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href"; 276b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),wb={};r(Hb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});wb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(vd,function(a,b){wb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ke))){e.$set("ngPattern",new RegExp(c[1], 277c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=xa("ng-"+a);wb[b]=["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),wa&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var mb={$addControl:E,$getControls:ia([]),$$renameControl:function(a, 278b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)}, 279$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=mb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element, 280Wb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Za,Wb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==mb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element, 281"ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ce({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var oe=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass(Za).addClass(nb); 282var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))})); 283d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,mb)})}}}}}]},Se=oe(),df=oe(!0),mh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,xh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yh=/^(?=.{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])?)*$/, 284nh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,pe=/^(\d{4,})-(\d{2})-(\d{2})$/,qe=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oc=/^(\d{4,})-W(\d\d)$/,re=/^(\d{4,})-(\d\d)$/,se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ee=T();r(["date","datetime-local","month","time","week"],function(a){ee[a]=!0});var te={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c)},date:ob("date",pe,Rb(pe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",qe,Rb(qe,"yyyy MM dd HH mm ss sss".split(" ")), 285"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",se,Rb(se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Oc,function(a,b){if(ha(a))return a;if(C(a)){Oc.lastIndex=0;var d=Oc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Zd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:ob("month",re,Rb(re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Jc(a,b,d,c,"number");fe(c);Sa(a, 286b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||A(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||A(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)|| 287A(s)||ge(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||xh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||yh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==V(d.ngTrim);A(d.name)&&b.attr("name",++qb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g= 288V(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=V(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);Y(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);Y(c.$modelValue)||(m?(a=b.val(),n<a&&(b.val(n),a=n<p?p:n),c.$setViewValue(a)):c.$validate())}function l(a){s= 289na(a);Y(c.$modelValue)||(m?c.$viewValue!==b.val()&&c.$setViewValue(b.val()):c.$validate())}Jc(a,b,d,c,"range");fe(c);Sa(a,b,d,c,e,f);var m=c.$$hasNativeValidators&&"range"===b[0].type,p=m?0:void 0,n=m?100:void 0,s=m?1:void 0,r=b[0].validity;a=w(d.min);e=w(d.max);f=w(d.step);var q=c.$render;c.$render=m&&w(r.rangeUnderflow)&&w(r.rangeOverflow)?function(){q();c.$setViewValue(b.val())}:q;a&&(p=na(d.min),c.$validators.min=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(p)||b>=p},g("min",k)); 290e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:function(a,b){return c.$isEmpty(b)||A(s)||ge(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=he(k,a,"ngTrueValue",d.ngTrueValue,!0),l=he(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty= 291function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},$c=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(te[K(g.type)]||te.text)(e,f,g,k[0],b,a,d,c)}}}}],Af=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}}; 292return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&Object.defineProperty(b,"value",a)}}}}},zh=/^(true|false|\d+)$/,xf=function(){function a(a,d,c){var e=w(c)?c:9===wa?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return zh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue, 293function(b){a(d,f,b)})}}}},We=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=jc(a)})}}}}],Ye=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=A(a)?"":a})}}}}], 294Xe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],wf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ze=Lc("",!0),af=Lc("Odd",0),$e=Lc("Even",1),bf=Ra({compile:function(a, 295b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),cf=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ed={},Ah={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);ed[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return sd(d,c,e,b,a,Ah[a])}]});var ff=["$animate","$compile",function(a,b){return{multiElement:!0, 296transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=ub(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],gf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element", 297controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded", 298f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],zf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?(d.empty(),a(gd(e.template,z.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],hf=Ra({priority:450,compile:function(){return{pre:function(a, 299b,d){a.$eval(d.ngInit)}}}}),vf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!A(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",be="ng-invalid",Za="ng-pristine",Wb="ng-dirty",pb=F("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "); 300Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:E,$isEmpty:function(a){return A(a)|| 301""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(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,Wb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element, 302Za);this.$$animate.addClass(this.$$element,Wb);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(!Y(this.$modelValue)){var a= 303this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e, 304g){var h=e(a,b);if(!h||!B(h.then))throw pb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(A(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a, 305b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid= 306A(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;d<this.$parsers.length;d++)if(a=this.$parsers[d](a),A(a)){this.$$parserValid=!1;break}Y(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var c=this.$modelValue,e=this.$options.getOption("allowInvalid");this.$$rawModelValue=a;e&&(this.$modelValue=a,b.$modelValue!==c&&b.$$writeModelToScope());this.$$runValidators(a,this.$$lastCommittedViewValue,function(d){e||(b.$modelValue= 307d?a:void 0,b.$modelValue!==c&&b.$$writeModelToScope())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue);r(this.$viewChangeListeners,function(a){try{a()}catch(b){this.$$exceptionHandler(b)}},this)},$setViewValue:function(a,b){this.$viewValue=a;this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(b)},$$debounceViewValueCommit:function(a){var b=this.$options.getOption("debounce");X(b[a])?b=b[a]:X(b["default"])&&-1===this.$options.getOption("updateOn").indexOf(a)? 308b=b["default"]:X(b["*"])&&(b=b["*"]);this.$$timeout.cancel(this.$$pendingDebounce);var d=this;0<b?this.$$pendingDebounce=this.$$timeout(function(){d.$commitViewValue()},b):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){d.$commitViewValue()})},$overrideModelOptions:function(a){this.$options=this.$options.createChild(a);this.$$setUpdateOnEvents()},$processModelValue:function(){var a=this.$$format();this.$viewValue!==a&&(this.$$updateEmptyClasses(a),this.$viewValue=this.$$lastCommittedViewValue= 309a,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,E))},$$format:function(){for(var a=this.$formatters,b=a.length,d=this.$modelValue;b--;)d=a[b](d);return d},$$setModelValue:function(a){this.$modelValue=this.$$rawModelValue=a;this.$$parserValid=void 0;this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler);if(this.$$updateEvents=this.$options.getOption("updateOn"))this.$$element.on(this.$$updateEvents, 310this.$$updateEventHandler)},$$updateEventHandler:function(a){this.$$debounceViewValueCommit(a&&a.type)}};ce({clazz:Sb,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]}});var uf=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sb,priority:1,compile:function(b){b.addClass(Za).addClass("ng-untouched").addClass(nb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;if(f=f[2])g.$options=f.$options;g.$$initGetterSetters();b.$addControl(g); 311e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){function g(){k.$setTouched()}var k=f[0];k.$$setUpdateOnEvents();c.on("blur",function(){k.$touched||(a.$$phase?b.$evalAsync(g):b.$apply(g))})}}}}}],Tb,Bh=/(\s+|^)default(\s+|$)/;Mc.prototype={getOption:function(a){return this.$$options[a]},createChild:function(a){var b=!1;a=S({},a);r(a,function(d,c){"$inherit"===d?"*"===c?b=!0:(a[c]= 312this.$$options[c],"updateOn"===c&&(a.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===c&&(a.updateOnDefault=!1,a[c]=V(d.replace(Bh,function(){a.updateOnDefault=!0;return" "})))},this);b&&(delete a["*"],ie(a,this.$$options));ie(a,Tb.$$options);return new Mc(a)}};Tb=new Mc({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var yf=function(){function a(a,d){this.$$attrs=a;this.$$scope=d}a.$inject=["$attrs","$scope"];a.prototype={$onInit:function(){var a= 313this.parentCtrl?this.parentCtrl.$options:Tb,d=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=a.createChild(d)}};return{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:a}},jf=Ra({terminal:!0,priority:1E3}),Ch=F("ngOptions"),Dh=/^\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]+?))?$/, 314sf=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!r&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var p=a.match(Dh);if(!p)throw Ch("iexp",a,Aa(b));var n=p[5]||p[7],r=p[6];a=/ as /.test(p[0])&&p[1];var q=p[9];b=d(p[2]?p[1]:n);var t=a&&d(a)||b,w=q&&d(q),v=q?function(a,b){return w(c,b)}:function(a){return La(a)}, 315x=function(a,b){return v(a,B(a,b))},A=d(p[2]||p[1]),y=d(p[3]||""),J=d(p[4]||""),I=d(p[8]),z={},B=r?function(a,b){z[r]=b;z[n]=a;return z}:function(a){z[n]=a;return z};return{trackBy:q,getTrackByValue:x,getWatchables:d(I,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var k=a===d?g:d[g],l=a[k],k=B(l,k),l=v(l,k);b.push(l);if(p[2]||p[1])l=A(c,k),b.push(l);p[4]&&(k=J(c,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},d=I(c)||[],g=f(d),k=g.length,n=0;n<k;n++){var p=d=== 316g?n:g[n],r=B(d[p],p),s=t(c,r),p=v(s,r),w=A(c,r),z=y(c,r),r=J(c,r),s=new e(p,s,w,z,r);a.push(s);b[p]=s}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[x(a)]},getViewValueFromOption:function(a){return q?Ia(a.viewValue):a.viewValue}}}}}var e=z.document.createElement("option"),f=z.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=E},post:function(d,k,h,l){function m(a){var b=(a=v.getOptionFromViewValue(a))&& 317a.element;b&&!b.selected&&(b.selected=!0);return a}function p(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);b.value=a.selectValue}var n=l[0],q=l[1],A=h.multiple;l=0;for(var t=k.children(),z=t.length;l<z;l++)if(""===t[l].value){n.hasEmptyOption=!0;n.emptyOption=t.eq(l);break}k.empty();l=!!n.emptyOption;x(e.cloneNode(!1)).val("?");var v,B=c(h.ngOptions,k,d),C=b[0].createDocumentFragment();n.generateUnknownOptionValue=function(a){return"?"};A?(n.writeValue= 318function(a){if(v){var b=a&&a.map(m)||[];v.items.forEach(function(a){a.element.selected&&-1===Array.prototype.indexOf.call(b,a)&&(a.element.selected=!1)})}},n.readValue=function(){var a=k.val()||[],b=[];r(a,function(a){(a=v.selectValueMap[a])&&!a.disabled&&b.push(v.getViewValueFromOption(a))});return b},B.trackBy&&d.$watchCollection(function(){if(H(q.$viewValue))return q.$viewValue.map(function(a){return B.getTrackByValue(a)})},function(){q.$render()})):(n.writeValue=function(a){if(v){var b=k[0].options[k[0].selectedIndex], 319c=v.getOptionFromViewValue(a);b&&b.removeAttribute("selected");c?(k[0].value!==c.selectValue&&(n.removeUnknownOption(),k[0].value=c.selectValue,c.element.selected=!0),c.element.setAttribute("selected","selected")):n.selectUnknownOrEmptyOption(a)}},n.readValue=function(){var a=v.selectValueMap[k.val()];return a&&!a.disabled?(n.unselectEmptyOption(),n.removeUnknownOption(),v.getViewValueFromOption(a)):null},B.trackBy&&d.$watch(function(){return B.getTrackByValue(q.$viewValue)},function(){q.$render()})); 320l&&(a(n.emptyOption)(d),k.prepend(n.emptyOption),8===n.emptyOption[0].nodeType?(n.hasEmptyOption=!1,n.registerOption=function(a,b){""===b.val()&&(n.hasEmptyOption=!0,n.emptyOption=b,n.emptyOption.removeClass("ng-scope"),q.$render(),b.on("$destroy",function(){var a=n.$isEmptyOptionSelected();n.hasEmptyOption=!1;n.emptyOption=void 0;a&&q.$render()}))}):n.emptyOption.removeClass("ng-scope"));d.$watchCollection(B.getWatchables,function(){var a=v&&n.readValue();if(v)for(var b=v.items.length-1;0<=b;b--){var c= 321v.items[b];w(c.group)?Gb(c.element.parentNode):Gb(c.element)}v=B.getOptions();var d={};v.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1);b.appendChild(c);p(a,c)}else b=e.cloneNode(!1),C.appendChild(b),p(a,b)});k[0].appendChild(C);q.$render();q.$isEmpty(a)||(b=n.readValue(),(B.trackBy||A?va(a,b):a===b)||(q.$setViewValue(b),q.$render()))})}}}}],kf=["$locale","$interpolate","$log", 322function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,k){function h(a){g.text(a||"")}var l=k.count,m=k.$attr.when&&g.attr(k.$attr.when),p=k.offset||0,n=f.$eval(m)||{},q={},w=b.startSymbol(),t=b.endSymbol(),x=w+l+"-"+p+t,v=ca.noop,z;r(k,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+K(c[2]),n[c]=g.attr(k.$attr[b]))});r(n,function(a,d){q[d]=b(a.replace(c,x))});f.$watch(l,function(b){var c=parseFloat(b),e=Y(c);e||c in n||(c=a.pluralCat(c-p));c===z||e&&Y(z)||(v(),e=q[c],A(e)? 323(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),v=E,h()):v=f.$watch(e,h),z=c)})}}}],ue=F("ngRef"),lf=["$parse",function(a){return{priority:-1,restrict:"A",compile:function(b,d){var c=xa(ua(b)),e=a(d.ngRef),f=e.assign||function(){throw ue("nonassign",d.ngRef);};return function(a,b,h){var l;if(h.hasOwnProperty("ngRefRead"))if("$element"===h.ngRefRead)l=b;else{if(l=b.data("$"+h.ngRefRead+"Controller"),!l)throw ue("noctrl",h.ngRefRead,d.ngRef);}else l=b.data("$"+c+"Controller");l= 324l||b;f(a,l);b.on("$destroy",function(){e(a)===l&&f(a,null)})}}}}],mf=["$parse","$animate","$compile",function(a,b,d){var c=F("ngRepeat"),e=function(a,b,c,d,e,f,g){a[c]=d;e&&(a[e]=f);a.$index=b;a.$first=0===b;a.$last=b===g-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))},f=function(a,b,c){return La(c)},g=function(a,b){return b};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(k,h){var l=h.ngRepeat,m=d.$$createComment("end ngRepeat", 325l),p=l.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!p)throw c("iexp",l);var n=p[1],q=p[2],w=p[3],t=p[4],p=n.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/);if(!p)throw c("iidexp",n);var x=p[3]||p[1],v=p[2];if(w&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(w)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(w)))throw c("badident",w);var A;if(t){var z={$id:La},y=a(t);A=function(a,b,c,d){v&& 326(z[v]=b);z[x]=c;z.$index=d;return y(a,z)}}return function(a,d,h,k,n){var p=T();a.$watchCollection(q,function(h){var k,q,t=d[0],s,y=T(),B,C,E,D,H,F,K;w&&(a[w]=h);if(za(h))H=h,q=A||f;else for(K in q=A||g,H=[],h)ta.call(h,K)&&"$"!==K.charAt(0)&&H.push(K);B=H.length;K=Array(B);for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],D=q(a,C,E,k),p[D])F=p[D],delete p[D],y[D]=F,K[k]=F;else{if(y[D])throw r(K,function(a){a&&a.scope&&(p[a.id]=a)}),c("dupes",l,D,E);K[k]={id:D,scope:void 0,clone:void 0};y[D]=!0}z&&(z[x]=void 0); 327for(s in p){F=p[s];D=ub(F.clone);b.leave(D);if(D[0].parentNode)for(k=0,q=D.length;k<q;k++)D[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<B;k++)if(C=h===H?k:H[k],E=h[C],F=K[k],F.scope){s=t;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);F.clone[0]!==s&&b.move(ub(F.clone),null,t);t=F.clone[F.clone.length-1];e(F.scope,k,x,E,v,C,B)}else n(function(a,c){F.scope=c;var d=m.cloneNode(!1);a[a.length++]=d;b.enter(a,null,t);t=d;F.clone=a;y[F.id]=F;e(F.scope,k,x,E,v,C,B)});p=y})}}}}],nf=["$animate",function(a){return{restrict:"A", 328multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],ef=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],of=Ra(function(a,b,d){a.$watchCollection(d.ngStyle,function(a,d){d&&a!==d&&r(d,function(a,c){b.css(c,"")});a&&b.css(a)})}),pf=["$animate","$compile",function(a, 329b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],k=[],h=[],l=[],m=function(a,b){return function(c){!1!==c&&a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){for(var d,e;h.length;)a.cancel(h.pop());d=0;for(e=l.length;d<e;++d){var q=ub(k[d].clone);l[d].$destroy();(h[d]=a.leave(q)).done(m(h,d))}k.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&r(g,function(c){c.transclude(function(d,e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen"); 330k.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],qf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){a=d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function(a,b,c){return c[b-1]!==a});r(a,function(a){c.cases["!"+a]=c.cases["!"+a]||[];c.cases["!"+a].push({transclude:e,element:b})})}}),rf=Ra({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e, 331element:b})}}),Eh=F("ngTransclude"),tf=["$compile",function(a){return{restrict:"EAC",compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,k){function h(){d(a,function(a){b.append(a)})}if(!k)throw Eh("orphan",Aa(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;k(function(a,c){var d;if(d=a.length)a:{d=0;for(var f=a.length;d<f;d++){var g=a[d];if(g.nodeType!==Pa||g.nodeValue.trim()){d=!0;break a}}d=void 0}d?b.append(a):(h(),c.$destroy())}, 332null,f);f&&!k.isSlotFilled(f)&&h()}}}}],Te=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"===d.type&&a.put(d.id,b[0].text)}}}],Fh={$setViewValue:E,$render:E},Gh=["$element","$scope",function(a,b){function d(){g||(g=!0,b.$$postDigest(function(){g=!1;e.ngModelCtrl.$render()}))}function c(a){k||(k=!0,b.$$postDigest(function(){b.$$destroyed||(k=!1,e.ngModelCtrl.$setViewValue(e.readValue()),a&&e.ngModelCtrl.$render())}))}var e=this,f=new Ib;e.selectValueMap= 333{};e.ngModelCtrl=Fh;e.multiple=!1;e.unknownOption=x(z.document.createElement("option"));e.hasEmptyOption=!1;e.emptyOption=void 0;e.renderUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);a.prepend(e.unknownOption);Oa(e.unknownOption,!0);a.val(b)};e.updateUnknownOption=function(b){b=e.generateUnknownOptionValue(b);e.unknownOption.val(b);Oa(e.unknownOption,!0);a.val(b)};e.generateUnknownOptionValue=function(a){return"? "+La(a)+" ?"};e.removeUnknownOption=function(){e.unknownOption.parent()&& 334e.unknownOption.remove()};e.selectEmptyOption=function(){e.emptyOption&&(a.val(""),Oa(e.emptyOption,!0))};e.unselectEmptyOption=function(){e.hasEmptyOption&&Oa(e.emptyOption,!1)};b.$on("$destroy",function(){e.renderUnknownOption=E});e.readValue=function(){var b=a.val(),b=b in e.selectValueMap?e.selectValueMap[b]:b;return e.hasOption(b)?b:null};e.writeValue=function(b){var c=a[0].options[a[0].selectedIndex];c&&Oa(x(c),!1);e.hasOption(b)?(e.removeUnknownOption(),c=La(b),a.val(c in e.selectValueMap? 335c:b),Oa(x(a[0].options[a[0].selectedIndex]),!0)):e.selectUnknownOrEmptyOption(b)};e.addOption=function(a,b){if(8!==b[0].nodeType){Ja(a,'"option value"');""===a&&(e.hasEmptyOption=!0,e.emptyOption=b);var c=f.get(a)||0;f.set(a,c+1);d()}};e.removeOption=function(a){var b=f.get(a);b&&(1===b?(f.delete(a),""===a&&(e.hasEmptyOption=!1,e.emptyOption=void 0)):f.set(a,b-1))};e.hasOption=function(a){return!!f.get(a)};e.$hasEmptyOption=function(){return e.hasEmptyOption};e.$isUnknownOptionSelected=function(){return a[0].options[0]=== 336e.unknownOption[0]};e.$isEmptyOptionSelected=function(){return e.hasEmptyOption&&a[0].options[a[0].selectedIndex]===e.emptyOption[0]};e.selectUnknownOrEmptyOption=function(a){null==a&&e.emptyOption?(e.removeUnknownOption(),e.selectEmptyOption()):e.unknownOption.parent().length?e.updateUnknownOption(a):e.renderUnknownOption(a)};var g=!1,k=!1;e.registerOption=function(a,b,f,g,k){if(f.$attr.ngValue){var q,r;f.$observe("value",function(a){var d,f=b.prop("selected");w(r)&&(e.removeOption(q),delete e.selectValueMap[r], 337d=!0);r=La(a);q=a;e.selectValueMap[r]=a;e.addOption(a,b);b.attr("value",r);d&&f&&c()})}else g?f.$observe("value",function(a){e.readValue();var d,f=b.prop("selected");w(q)&&(e.removeOption(q),d=!0);q=a;e.addOption(a,b);d&&f&&c()}):k?a.$watch(k,function(a,d){f.$set("value",a);var g=b.prop("selected");d!==a&&e.removeOption(d);e.addOption(a,b);d&&g&&c()}):e.addOption(f.value,b);f.$observe("disabled",function(a){if("true"===a||a&&b.prop("selected"))e.multiple?c(!0):(e.ngModelCtrl.$setViewValue(null),e.ngModelCtrl.$render())}); 338b.on("$destroy",function(){var a=e.readValue(),b=f.value;e.removeOption(b);d();(e.multiple&&a&&-1!==a.indexOf(b)||a===b)&&c(!0)})}}],Ue=function(){return{restrict:"E",require:["select","?ngModel"],controller:Gh,priority:1,link:{pre:function(a,b,d,c){var e=c[0],f=c[1];if(f){if(e.ngModelCtrl=f,b.on("change",function(){e.removeUnknownOption();a.$apply(function(){f.$setViewValue(e.readValue())})}),d.multiple){e.multiple=!0;e.readValue=function(){var a=[];r(b.find("option"),function(b){b.selected&&!b.disabled&& 339(b=b.value,a.push(b in e.selectValueMap?e.selectValueMap[b]:b))});return a};e.writeValue=function(a){r(b.find("option"),function(b){var c=!!a&&(-1!==Array.prototype.indexOf.call(a,b.value)||-1!==Array.prototype.indexOf.call(a,e.selectValueMap[b.value]));c!==b.selected&&Oa(x(b),c)})};var g,k=NaN;a.$watch(function(){k!==f.$viewValue||va(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());k=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}else e.registerOption=E},post:function(a,b,d,c){var e= 340c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},Ve=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){var c,e;w(d.ngValue)||(w(d.value)?c=a(d.value,!0):(e=a(b.text(),!0))||d.$set("value",b.text()));return function(a,b,d){var h=b.parent();(h=h.data("$selectController")||h.parent().data("$selectController"))&&h.registerOption(a,b,d,c,e)}}}}],bd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f= 341c.hasOwnProperty("required")||a(c.ngRequired)(b);c.ngRequired||(c.required=!0);e.$validators.required=function(a,b){return!f||!e.$isEmpty(b)};c.$observe("required",function(a){f!==a&&(f=a,e.$validate())})}}}}],ad=["$parse",function(a){return{restrict:"A",require:"?ngModel",compile:function(b,d){var c,e;d.ngPattern&&(c=d.ngPattern,e="/"===d.ngPattern.charAt(0)&&ke.test(d.ngPattern)?function(){return d.ngPattern}:a(d.ngPattern));return function(a,b,d,h){if(h){var l=d.pattern;d.ngPattern?l=e(a):c=d.pattern; 342var m=je(l,c,b);d.$observe("pattern",function(a){var d=m;m=je(a,c,b);(d&&d.toString())!==(m&&m.toString())&&h.$validate()});h.$validators.pattern=function(a,b){return h.$isEmpty(b)||A(m)||m.test(b)}}}}}}],dd=["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.maxlength||a(c.ngMaxlength)(b),g=Ub(f);c.$observe("maxlength",function(a){f!==a&&(g=Ub(a),f=a,e.$validate())});e.$validators.maxlength=function(a,b){return 0>g||e.$isEmpty(b)||b.length<=g}}}}}],cd= 343["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Ub(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Ub(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];z.angular.bootstrap?z.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Je(),Oe(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1== 344b?0:a.length-b-1}a.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(" "), 345WEEKENDRANGE:[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:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a, 346c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ee(z.document,Wc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(window.angular.element("<style>").text('@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;}'));
347(root=>{var sheet;function extend(a,b){for(var k in b)b.hasOwnProperty(k)&&(a[k]=b[k]);return a}document.getElementById("sf-autocomplete-styles")||((sheet=document.createElement("style")).id="sf-autocomplete-styles",sheet.textContent=".sf-autocomplete-suggestions{position:absolute;z-index:9999;background:#fff;border:1px solid #ddd;border-top:2px solid #fb0;border-radius:12px;box-shadow:0 4px 20px rgba(227,230,236,.8);overflow:hidden;overflow-y:auto;box-sizing:border-box;display:none;padding:0;margin:0;list-style:none;contain:layout style paint}.sf-autocomplete-suggestions.sf-border-bottom{border-top:1px solid #ddd;border-bottom:2px solid #fb0}.sf-autocomplete-suggestion{color:#000;font-size:16px;line-height:18px;padding:12px 16px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sf-autocomplete-suggestion:hover,.sf-autocomplete-suggestion.sf-selected{background:#f5f5f5;color:#fb0}.sf-autocomplete-suggestion.sf-no-result{color:#999;cursor:default}.sf-autocomplete-suggestion.sf-no-result:hover{background:transparent;color:#999}.sf-autocomplete-suggestion b{font-weight:700}",document.head.appendChild(sheet));var DEFAULTS={selector:null,data:[],minChars:1,onSelect:null,noResultsResponse:"No results found",noResultsCallback:null,menuClass:"",position:"bottom",borderPosition:"top",offsetTop:0,offsetLeft:0,maxHeight:200,width:null,renderItem:null,caseSensitive:!1,disableModalSuggestions:!0};function CustomSearchField(opts){this.o=extend(extend({},DEFAULTS),opts||{}),this._dd=null,this._open=!1,this._empty=!1,this._selIdx=-1,this._items=[],this._raf=null,this._h={},this._inputTimer=0}CustomSearchField.prototype.init=function(){if(!this.o.selector)throw new Error("CustomSearchField: selector is required.");this._buildDropdown(),this._bind()},CustomSearchField.prototype.updateData=function(d){this.o.data=d},CustomSearchField.prototype.close=function(){this._hide()},CustomSearchField.prototype.destroy=function(){this._unbind(),this._dd&&this._dd.parentNode&&this._dd.parentNode.removeChild(this._dd),this._dd=null},CustomSearchField.prototype._buildDropdown=function(){var dd=document.createElement("ul"),classes="sf-autocomplete-suggestions"+(this.o.menuClass?" "+this.o.menuClass:""),_this=("bottom"===this.o.borderPosition&&(classes+=" sf-border-bottom"),dd.className=classes,this.o.maxHeight&&(dd.style.maxHeight=this.o.maxHeight+"px"),document.body.appendChild(dd),this._dd=dd,this);dd.addEventListener("mousedown",function(e){e.preventDefault()}),dd.addEventListener("click",function(e){var val,li=e.target.closest(".sf-autocomplete-suggestion");li&&(val=li.getAttribute("data-val"),li.classList.contains("sf-no-result")?(_this.o.noResultsCallback&&_this.o.noResultsCallback(e,val,li),_this.o.selector.value="",_this._hide()):(_this.o.selector.value=val,_this._hide(),_this.o.onSelect&&_this.o.onSelect(e,val,li)))})},CustomSearchField.prototype._position=function(){var ddH,dd=this._dd,rect=this.o.selector.getBoundingClientRect(),scrollX=window.pageXOffset||document.documentElement.scrollLeft,scrollY=window.pageYOffset||document.documentElement.scrollTop,w=this.o.width||rect.width,scrollX=rect.left+scrollX+(this.o.offsetLeft||0);ddH="top"===this.o.position?(ddH=dd.offsetHeight||0,rect.top+scrollY-ddH-(this.o.offsetTop||0)):rect.bottom+scrollY+(this.o.offsetTop||0),dd.style.cssText+=";width:"+w+"px;left:"+scrollX+"px;top:"+ddH+"px"},CustomSearchField.prototype._show=function(){this._dd&&(this._dd.style.display="block",this._open=!0,this._position())},CustomSearchField.prototype._hide=function(){this._dd&&(this._dd.style.display="none",this._open=!1,this._selIdx=-1)},CustomSearchField.prototype._search=function(term){var _this=this;if("function"==typeof this.o.data)this.o.data(term,function(m){_this._render(m,term)});else{for(var src=Array.isArray(this.o.data)?this.o.data:[this.o.data],ci=!this.o.caseSensitive,lt=ci?term.toLowerCase():term,m=[],i=0,len=src.length;i<len;i++)-1!==(ci?src[i].toLowerCase():src[i]).indexOf(lt)&&m.push(src[i]);this._render(m,term)}},CustomSearchField.prototype._render=function(matches,term){var dd=this._dd,frag=document.createDocumentFragment();if(this._items=[],this._selIdx=-1,matches&&matches.length){this._empty=!1;for(var i=0,len=matches.length;i<len;i++){li=this._makeLi(matches[i],term,!1);frag.appendChild(li),this._items.push({el:li,val:matches[i],nr:!1})}}else{this._empty=!0;var li=this._makeLi(this.o.noResultsResponse,term,!0);frag.appendChild(li),this._items.push({el:li,val:this.o.noResultsResponse,nr:!0})}dd.textContent="",dd.appendChild(frag),this._show()},CustomSearchField.prototype._makeLi=function(item,search,isNR){var li;if(isNR||"function"!=typeof this.o.renderItem)if((li=document.createElement("li")).setAttribute("data-val",item),isNR)li.className="sf-autocomplete-suggestion sf-no-result",li.textContent=item;else{li.className="sf-autocomplete-suggestion";for(var b,isNR=search.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),isNR=new RegExp("("+isNR+")",this.o.caseSensitive?"g":"gi"),parts=item.split(isNR),p=0;p<parts.length;p++)parts[p]&&(p%2==1?((b=document.createElement("b")).textContent=parts[p],li.appendChild(b)):li.appendChild(document.createTextNode(parts[p])))}else(isNR=this.o.renderItem(item,search))&&1===isNR.nodeType?(li=isNR).setAttribute("data-val",item):((li=document.createElement("li")).className="sf-autocomplete-suggestion",li.setAttribute("data-val",item),li.textContent="string"==typeof isNR?isNR:item);return li},CustomSearchField.prototype._move=function(dir){var items=this._items,len=items.length;len&&(0<=this._selIdx&&this._selIdx<len&&items[this._selIdx].el.classList.remove("sf-selected"),this._selIdx=((this._selIdx+dir)%len+len)%len,(dir=items[this._selIdx].el).classList.add("sf-selected"),dir.scrollIntoView({block:"nearest"}))},CustomSearchField.prototype._pick=function(e){var c;this._selIdx<0||this._selIdx>=this._items.length||((c=this._items[this._selIdx]).nr?(this.o.noResultsCallback&&this.o.noResultsCallback(e,c.val,c.el),this.o.selector.value=""):(this.o.selector.value=c.val,this.o.onSelect&&this.o.onSelect(e,c.val,c.el)),this._hide())},CustomSearchField.prototype._bind=function(){var _this=this,inp=this.o.selector;this._h.input=function(){clearTimeout(_this._inputTimer),_this._inputTimer=setTimeout(function(){var v=inp.value.trim();v.length>=_this.o.minChars?_this._search(v):_this._hide()},120)},this._h.focus=function(){inp.classList.add("sf-input--focused");var v=inp.value.trim();v.length>=_this.o.minChars&&_this._search(v)},this._h.blur=function(){setTimeout(function(){inp.classList.remove("sf-input--focused"),_this._hide()},150)},this._h.keydown=function(e){var code;_this._open&&(40===(code=e.keyCode)?(e.preventDefault(),_this._move(1)):38===code?(e.preventDefault(),_this._move(-1)):13===code?(e.preventDefault(),_this._pick(e),inp.blur()):27===code&&_this._hide())},this._h.reposition=function(){_this._open&&(_this._raf&&cancelAnimationFrame(_this._raf),_this._raf=requestAnimationFrame(function(){_this._position()}))},inp.addEventListener("input",this._h.input),inp.addEventListener("focus",this._h.focus),inp.addEventListener("blur",this._h.blur),inp.addEventListener("keydown",this._h.keydown),window.addEventListener("scroll",this._h.reposition,!0),window.addEventListener("resize",this._h.reposition)},CustomSearchField.prototype._unbind=function(){var inp=this.o.selector;inp&&this._h&&(inp.removeEventListener("input",this._h.input),inp.removeEventListener("focus",this._h.focus),inp.removeEventListener("blur",this._h.blur),inp.removeEventListener("keydown",this._h.keydown),window.removeEventListener("scroll",this._h.reposition,!0),window.removeEventListener("resize",this._h.reposition))},root.CustomSearchField=CustomSearchField})("undefined"!=typeof window?window:this); 348!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Dominar=f()}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}a=n[o]={exports:{}};t[o][0].call(a.exports,function(e){var n=t[o][1][e];return s(n||e)},a,a.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(exports=>
348{exports.forEach=function(arr,eachFn,doneFn){var i=-1,len=arr.length>>>0;!function next(result){for(var async,abort=!1===result;!(++i in arr)&&i!==len;);abort||i===len?doneFn&&doneFn(!abort,arr):(result=eachFn.call({async:function(){return async=!0,next}},arr[i],i,arr),async||next(result))}()}})("object"==typeof exports&&exports||this)},{}],2:[function(require,module,exports){function AsyncResolvers(onFailedOne,onResolvedAll){this.onResolvedAll=onResolvedAll,this.onFailedOne=onFailedOne,this.resolvers={},this.resolversCount=0,this.passed=[],this.failed=[],this.firing=!1}AsyncResolvers.prototype={add:function(rule){var index=this.resolversCount;return this.resolvers[index]=rule,this.resolversCount++,index},resolve:function(index){index=this.resolvers[index];!0===index.passes?this.passed.push(index):!1===index.passes&&(this.failed.push(index),this.onFailedOne(index)),this.fire()},isAllResolved:function(){return this.passed.length+this.failed.length===this.resolversCount},fire:function(){this.firing&&this.isAllResolved()&&this.onResolvedAll(0===this.failed.length)},enableFiring:function(){this.firing=!0}},module.exports=AsyncResolvers},{}],3:[function(require,module,exports){module.exports={replacements:{between:function(template,rule){var parameters=rule.getParameters();return this._replacePlaceholders(rule,template,{min:parameters[0],max:parameters[1]})},required_if:function(template,rule){var parameters=rule.getParameters();return this._replacePlaceholders(rule,template,{other:parameters[0],value:parameters[1]})}},formatter:function(attribute){return attribute.replace(/[_\[]/g," ").replace(/]/g,"")}}},{}],4:[function(require,module,exports){function Errors(){this.errors={}}Errors.prototype={constructor:Errors,add:function(attribute,message){this.has(attribute)||(this.errors[attribute]=[]),-1===this.errors[attribute].indexOf(message)&&this.errors[attribute].push(message)},get:function(attribute){return this.has(attribute)?this.errors[attribute]:[]},first:function(attribute){return!!this.has(attribute)&&this.errors[attribute][0]},all:function(){return this.errors},has:function(attribute){return!!this.errors.hasOwnProperty(attribute)}},module.exports=Errors},{}],5:[function(require,module,exports){var Messages=require("./messages");require("./lang/en"),module.exports={messages:{},_set:function(lang,rawMessages){this.messages[lang]=rawMessages},_setRuleMessage:function(lang,attribute,message){this._load(lang),void 0===message&&(message=this.messages[lang].def),this.messages[lang][attribute]=message},_load:function(lang){var rawMessages;this.messages[lang]||(rawMessages=require("./lang/"+lang),this._set(lang,rawMessages))},_get:function(lang){return this._load(lang),this.messages[lang]},_make:function(lang){return this._load(lang),new Messages(lang,this.messages[lang])}}},{"./lang/en":6,"./messages":7}],6:[function(require,module,exports){module.exports={accepted:"The :attribute must be accepted.",alpha:"The :attribute field must contain only alphabetic characters.",alpha_dash:"The :attribute field may only contain alpha-numeric characters, as well as dashes and underscores.",alpha_num:"The :attribute field must be alphanumeric.",between:"The :attribute field must be between :min and :max.",confirmed:"The :attribute confirmation does not match.",email:"The :attribute format is invalid.",date:"The :attribute is not a valid date format",def:"The :attribute attribute has errors.",digits:"The :attribute must be :digits digits.",different:"The :attribute and :different must be different.",in:"The selected :attribute is invalid.",integer:"The :attribute must be an integer.",min:{numeric:"The :attribute must be at least :min.",string:"The :attribute must be at least :min characters."},max:{numeric:"The :attribute may not be greater than :max.",string:"The :attribute may not be greater than :max characters."},not_in:"The selected :attribute is invalid.",numeric:"The :attribute must be a number.",required:"The :attribute field is required.",required_if:"The :attribute field is required when :other is :value.",same:"The :attribute and :same fields must match.",size:{numeric:"The :attribute must be :size.",string:"The :attribute must be :size characters."},string:"The :attribute must be a string.",url:"The :attribute format is invali
348d.",regex:"The :attribute format is invalid",attributes:{}}},{}],7:[function(require,module,exports){function Messages(lang,messages){this.lang=lang,this.messages=messages,this.customMessages={},this.attributeNames={}}var Attributes=require("./attributes");Messages.prototype={constructor:Messages,_setCustom:function(customMessages){this.customMessages=customMessages||{}},_setAttributeNames:function(attributes){this.attributeNames=attributes},_setAttributeFormatter:function(func){this.attributeFormatter=func},_getAttributeName:function(attribute){var name=attribute;return this.attributeNames.hasOwnProperty(attribute)?this.attributeNames[attribute]:(this.messages.attributes.hasOwnProperty(attribute)&&(name=this.messages.attributes[attribute]),this.attributeFormatter?this.attributeFormatter(name):name)},all:function(){return this.messages},render:function(rule){var template;return rule.customMessage||(template=this._getTemplate(rule),Attributes.replacements[rule.name]?Attributes.replacements[rule.name].apply(this,[template,rule]):this._replacePlaceholders(rule,template,{}))},_getTemplate:function(rule){for(var format,messages=this.messages,template=messages.def,customMessages=this.customMessages,formats=[rule.name+"."+rule.attribute,rule.name],i=0;i<formats.length;i++){if(customMessages.hasOwnProperty(format=formats[i])){template=customMessages[format];break}if(messages.hasOwnProperty(format)){template=messages[format];break}}return template="object"==typeof template?template[rule._getValueType()]:template},_replacePlaceholders:function(rule,template,data){var message,attribute;if(data.attribute=this._getAttributeName(rule.attribute),data[rule.name]=rule.getParameters().join(","),"string"==typeof template&&"object"==typeof data)for(attribute in message=template,data)message=message.replace(new RegExp(":"+attribute,"g"),data[attribute]);return message}},module.exports=Messages},{"./attributes":3}],8:[function(require,module,exports){var rules={required:function(val){return null!=val&&0<String(val).replace(/\s/g,"").length},required_if:function(val,req,attribute){return req=this.getParameters(),this.validator.input[req[0]]!==req[1]||this.validator.getRule("required").validate(val)},size:function(val,req,attribute){return!val||(req=parseFloat(req),this.getSize()===req)},string:function(val,req,attribute){return"string"==typeof val},min:function(val,req,attribute){return req<=this.getSize()},max:function(val,req,attribute){return this.getSize()<=req},between:function(val,req,attribute){req=this.getParameters();var size=this.getSize(),min=parseFloat(req[0],10),req=parseFloat(req[1],10);return min<=size&&size<=req},email:function(val){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(val)},numeric:function(val){var num=Number(val);return"number"==typeof num&&!isNaN(num)&&"boolean"!=typeof val},array:function(val){return val instanceof Array},url:function(url){return/^https?:\/\/\S+/.test(url)},alpha:function(val){return/^[a-zA-Z]+$/.test(val)},alpha_dash:function(val){return/^[a-zA-Z0-9_\-]+$/.test(val)},alpha_num:function(val){return/^[a-zA-Z0-9]+$/.test(val)},same:function(val,req){return this.validator.input[req]===val},different:function(val,req){return this.validator.input[req]!==val},in:function(val,req){var list,i;if(val&&(list=req.split(",")),val&&!(val instanceof Array)){for(val=String(val),i=0;i<list.length;i++)if(val===list[i])return!0;return!1}if(val&&val instanceof Array)for(i=0;i<val.length;i++)if(list.indexOf(val[i])<0)return!1;return!0},not_in:function(val,req){var list=req.split(","),len=list.length,returnVal=!0;val=String(val);for(var i=0;i<len;i++)if(val===list[i]){returnVal=!1;break}return returnVal},accepted:function(val){return"on"===val||"yes"===val||1===val||"1"===val||!0===val},confirmed:function(val,req,key){return this.validator.input[key+"_confirmation"]===val},integer:function(val){return String(parseInt(val,10))===String(val)},digits:function(val,req){return!(!this.validator.getRule("numeric").validate(val)||String(val).length!==parseInt(req))},regex:function(val,req){var mod=/[g|i|m]{1,3}$/,flag=(flag=req.match(mod))?flag[0]:"";return req=req.replace(mod,"").slice(1,-1),req=new RegExp(req,flag),!!val.match(req)},date:function(val){var valid="Invalid Date"!==new Date(val).toString();return("number"!=typeof val||12===val.toString().length)&&valid}};function Rule(name,fn,async){this.name=name,this.fn=fn,this.passes=null,this.customMessage=void 0,this.async=async}
348Rule.prototype={validate:function(inputValue,ruleValue,attribute,callback){var _this=this;return this._setValidatingData(attribute,inputValue,ruleValue),"function"==typeof callback?(this.callback=callback,callback=function(passes,message){_this.response(passes,message)},this.async?this.fn.apply(this,[inputValue,ruleValue,attribute,callback]):callback(this.fn.apply(this,[inputValue,ruleValue,attribute]))):this.fn.apply(this,[inputValue,ruleValue,attribute])},_setValidatingData:function(attribute,inputValue,ruleValue){this.attribute=attribute,this.inputValue=inputValue,this.ruleValue=ruleValue},getParameters:function(){return this.ruleValue?this.ruleValue.split(","):[]},getSize:function(){var value=this.inputValue;return value instanceof Array?value.length:"number"==typeof value?value:this.validator._hasNumericRule(this.attribute)?parseFloat(value,10):value.length},_getValueType:function(){return"number"==typeof this.inputValue||this.validator._hasNumericRule(this.attribute)?"numeric":"string"},response:function(passes,message){this.passes=void 0===passes||!0===passes,this.customMessage=message,this.callback(this.passes,message)},setValidator:function(validator){this.validator=validator}},module.exports={asyncRules:[],implicitRules:["required","required_if","accepted"],make:function(name,validator){var async=this.isAsync(name),name=new Rule(name,rules[name],async);return name.setValidator(validator),name},isAsync:function(name){for(var i=0,len=this.asyncRules.length;i<len;i++)if(this.asyncRules[i]===name)return!0;return!1},isImplicit:function(name){return-1<this.implicitRules.indexOf(name)},register:function(name,fn){rules[name]=fn},registerAsync:function(name,fn){this.register(name,fn),this.asyncRules.push(name)}}},{}],9:[function(require,module,exports){function Validator(input,rules,customMessages){var lang=Validator.getDefaultLang();this.input=input,this.messages=Lang._make(lang),this.messages._setCustom(customMessages),this.setAttributeFormatter(Validator.prototype.attributeFormatter),this.errors=new Errors,this.errorCount=0,this.hasAsync=!1,this.rules=this._parseRules(rules)}var Rules=require("./rules"),Lang=require("./lang"),Errors=require("./errors"),Attributes=require("./attributes"),AsyncResolvers=require("./async");Validator.prototype={constructor:Validator,lang:"en",numericRules:["integer","numeric"],attributeFormatter:Attributes.formatter,check:function(){for(var attribute in this.rules)for(var rule,ruleOptions,attributeRules=this.rules[attribute],inputValue=this._objectPath(this.input,attribute),i=0,len=attributeRules.length;i<len&&(ruleOptions=attributeRules[i],rule=this.getRule(ruleOptions.name),!this._isValidatable(rule,inputValue)||((ruleOptions=rule.validate(inputValue,ruleOptions.value,attribute))||this._addFailure(rule),!this._shouldStopValidating(attribute,ruleOptions)));i++);return 0===this.errorCount},checkAsync:function(passes,fails){var attribute,_this=this,asyncResolvers=(passes=passes||function(){},fails=fails||function(){},new AsyncResolvers(function(rule,message){_this._addFailure(rule,message)},function(allPassed){(allPassed?passes:fails)()}));for(attribute in this.rules)for(var rule,ruleOptions,attributeRules=this.rules[attribute],inputValue=this._objectPath(this.input,attribute),i=0,len=attributeRules.length;i<len;i++)ruleOptions=attributeRules[i],rule=this.getRule(ruleOptions.name),this._isValidatable(rule,inputValue)&&((inputValue,ruleOptions,attribute,rule)=>function(){var resolverIndex=asyncResolvers.add(rule);rule.validate(inputValue,ruleOptions.value,attribute,function(){asyncResolvers.resolve(resolverIndex)})})(inputValue,ruleOptions,attribute,rule)();asyncResolvers.enableFiring(),asyncResolvers.fire()},_addFailure:function(rule){var msg=this.messages.render(rule);this.errors.add(rule.attribute,msg),this.errorCount++},_flattenObject:function(obj){var flattened={};return obj&&function recurse(current,property){if(property||0!==Object.getOwnPropertyNames(current).length)if(Object(current)!==current||Array.isArray(current))flattened[property]=current;else{var p,isEmpty=!0;for(p in current)isEmpty=!1,recurse(current[p],property?property+"."+p:p);isEmpty&&(flattened[property]={})}}(obj),flattened},_objectPath:function(obj,path){if(Object.prototype.hasOwnProperty.call(obj,path))return obj[path];var attr,keys=path.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),copy=obj.constructor();for(attr in obj)Object.prototype.hasOwnProperty.call(obj,attr)&&(copy[attr]=obj[attr]);for(var i=0,l=keys.length;i<l;i++){if(!Object.hasOwnProperty.call(copy,keys[i]))return;copy=copy[keys[i]]}return copy},_parseRules:function(rules){var attribute,parsedRules={};for(attribute in rules=this._flattenObject(rules)){for(var rule,rulesArray=rules[attribute],attributeRules=[],i=0,len=(rulesArray="str
348ing"==typeof rulesArray?rulesArray.split("|"):rulesArray).length;i<len;i++)rule=this._extractRuleAndRuleValue(rulesArray[i]),Rules.isAsync(rule.name)&&(this.hasAsync=!0),attributeRules.push(rule);parsedRules[attribute]=attributeRules}return parsedRules},_extractRuleAndRuleValue:function(ruleString){var rule={};return 0<=(rule.name=ruleString).indexOf(":")&&(ruleString=ruleString.split(":"),rule.name=ruleString[0],rule.value=ruleString.slice(1).join(":")),rule},_hasRule:function(attribute,findRules){for(var rules=this.rules[attribute]||[],i=0,len=rules.length;i<len;i++)if(-1<findRules.indexOf(rules[i].name))return!0;return!1},_hasNumericRule:function(attribute){return this._hasRule(attribute,this.numericRules)},_isValidatable:function(rule,value){return!!Rules.isImplicit(rule.name)||this.getRule("required").validate(value)},_shouldStopValidating:function(attribute,rulePassed){var stopOnAttributes=this.stopOnAttributes;return!1!==stopOnAttributes&&!0!==rulePassed&&(!(stopOnAttributes instanceof Array)||-1<stopOnAttributes.indexOf(attribute))},setAttributeNames:function(attributes){this.messages._setAttributeNames(attributes)},setAttributeFormatter:function(func){this.messages._setAttributeFormatter(func)},getRule:function(name){return Rules.make(name,this)},stopOnError:function(attributes){this.stopOnAttributes=attributes},passes:function(passes){return this._checkAsync("passes",passes)?this.checkAsync(passes):this.check()},fails:function(fails){return this._checkAsync("fails",fails)?this.checkAsync(function(){},fails):!this.check()},_checkAsync:function(funcName,callback){callback="function"==typeof callback;if(this.hasAsync&&!callback)throw funcName+" expects a callback when async rules are being tested.";return this.hasAsync||callback}},Validator.setMessages=function(lang,messages){return Lang._set(lang,messages),this},Validator.getMessages=function(lang){return Lang._get(lang)},Validator.useLang=function(lang){this.prototype.lang=lang},Validator.getDefaultLang=function(){return this.prototype.lang},Validator.setAttributeFormatter=function(func){this.prototype.attributeFormatter=func},Validator.stopOnError=function(attributes){this.prototype.stopOnAttributes=attributes},Validator.register=function(name,fn,message){var lang=Validator.getDefaultLang();Rules.register(name,fn),Lang._setRuleMessage(lang,name,message)},Validator.updateMessage=function(name,message){var lang=Validator.getDefaultLang();Lang._setRuleMessage(lang,name,message)},Validator.registerAsync=function(name,fn,message){var lang=Validator.getDefaultLang();Rules.registerAsync(name,fn),Lang._setRuleMessage(lang,name,message)},module.exports=Validator},{"./async":2,"./attributes":3,"./errors":4,"./lang":5,"./rules":8}],10:[function(require,module,exports){var Validator=require("validatorjs"),Utils=require("./utils");function DominarField(name,fields,options,dominar){this.name=name,this.options=options,this.fields=fields,this.container=Utils.element(this.fields[0]).closest(this.options.container),this.dominar=dominar,this.options.message&&(this.message=this._getMessageElement()),this.options.feedback&&(this.feedback=this._getFeedbackElement())}DominarField.prototype={validate:function(passes,fails){function passesHandler(){field.showSuccess(),field.validatedValue=value,passes()}function failsHandler(){field.showError(validator.errors.first(field.name)),fails(validator.errors.first(field.name))}var value=this.getValue(),field=this,validator=(passes=passes||Utils.noop,fails=fails||Utils.noop,this.validator&&delete this.validator,this.validator=this.getValidator());field.validatedValue=void 0;if(validator.hasAsync)return validator.checkAsync(passesHandler,failsHandler);(validator.passes()?passesHandler:failsHandler)()},validateDelayed:function(passes,fails){var field=this,delay=this.options.delay;passes=passes||Utils.noop,fails=fails||Utils.noop,clearTimeout(this.delayTimer),delay?this.delayTimer=setTimeout(function(){field.validate.apply(field,[passes,fails])},delay):this.validate(passes,fails)},_fireValidate:function(event){event=this._getTrigger(event);event.validate&&(event.delay?this.validateDelayed():this.validate())},getValidationOptions:function(){var data={},rules={},includeValues=(data[this.name]=this.getValue(),rules[this.name]=this.getRules(),0===rules[this.name].length&&delete rules[this.name],this._getIncludeValues()),includeValues={data:data=includeValues.length?Utils.extend(data,this.dominar._getFieldValues(includeValues)):data,rules:rules,customMessages:this.options.customMessages,customAttributes:{}};return"string"==typeof this.options.customAttributes?includeValues.customAttributes[this.name]=this.options.customAttributes:includeValues.customAttributes=this.options.customAttributes,includeValues=this.options.validatorOptions?this.options.validatorOptions.call(this,includeValues):includeValues},_getIncludeValues:function(){var includeValues=this.options.includeValues||[],confirmedField=(this._hasRule("confirmed")&&(confirmedField=this.name+"_confirmation",-1===includeValues.indexOf(confirmedField))&&includeValues.push(confirmedField),this._getRuleOptions("same"));return confirmedField&&includeValues.push(confirmedField.options[0]),includeValues},getValidator:function(){var options=this.getValidationOptions(),validator=new Validator(options.data,options.rules,options.customMessages);return options.customAttributes&&validator.setAttributeNames(options.customAttributes),validator},getRules:function(){return this.options.rules},_hasRule:function(rule){return!!this._getRuleOptions(rule)},_getRuleOptions:function(rule){for(var matches,rules=this.options.rules,reg=("str
348ing"==typeof rules&&(rules=rules.split("|")),new RegExp("^"+rule+"(?:$|:(.*))","i")),i=0,len=rules.length;i<len;i++)if(matches=reg.exec(rules[i]))return{name:rule,options:void 0===matches[1]?void 0:matches[1].split(",")}},getValue:function(){return Utils.elementValues(this.fields)},getValidatedValue:function(){return this.validatedValue},_getTrigger:function(event){var eventType=event.type,isKeyup="keyup"==eventType,trigger=-1<this.options.triggers.indexOf(eventType),eventType=-1<this.options.delayTriggers.indexOf(eventType);return{validate:(isKeyup&&9!==event.keyCode||!isKeyup)&&trigger,delay:eventType}},_getMessageElement:function(){var message=this.container.getElementsByClassName("help-block");return message.length?message[0]:(message=Utils.element("span").addClass("help-block"),this.container.appendChild(message.get()),message.get())},_getFeedbackElement:function(){var feedback=this.container.getElementsByClassName("form-control-feedback");return feedback.length?feedback[0]:(feedback=Utils.element("span").addClass("form-control-feedback"),this.container.appendChild(feedback.get()),feedback.get())},_showFeedbackType:function(type){var feedback=this.options.feedback;return feedback instanceof Array?-1<feedback.indexOf(type):feedback},_show:function(type,message){this.reset(),Utils.element(this.container).addClass("has-"+type),this.options.message&&(this.message.innerHTML=message||""),this._showFeedbackType(type)&&this.showFeedback(type)},showError:function(message){this._show("error",message)},showSuccess:function(message){this._show("success",message)},showFeedback:function(type){Utils.element(this.container).addClass("has-feedback"),this.feedback.innerHTML=this.options.feedbackIcons[type]},reset:function(){var removeClasses=["has-error","has-success"];this.message&&(this.message.innerHTML=""),this.feedback&&(this.feedback.innerHTML="",removeClasses.push("has-feedback")),Utils.element(this.container).removeClass(removeClasses.join(" "))}},module.exports=DominarField},{"./utils":12,validatorjs:9}],11:[function(require,module,exports){!function(global){var Validator=require("validatorjs"),DominarField=require("./dominar-field"),forEach=require("async-foreach").forEach,Utils=require("./utils");function Dominar(form,options,config){this.form=form,this.options=options||{},this.config=Utils.extend(this.configDefaults,config),this.fields={},this._bindEvents()}Dominar.prototype={defaults:{container:".form-group",delay:300,delayTriggers:["keyup"],rules:"",triggers:["keyup","focusout","change"],message:!0,customMessages:{},customAttributes:{},feedback:!0,feedbackIcons:{success:'<i class="glyphicon glyphicon-check"></i>',error:'<i class="glyphicon glyphicon-remove"></i>'}},configDefaults:{validateOnSubmit:!0,triggers:["keyup","focusout","change"]},eventHandlers:{},_bindEvents:function(){for(var trigger,dominar=this,i=0,len=this.config.triggers.length;i<len;i++)trigger=this.config.triggers[i],null!=this.form&&(this.form.addEventListener(trigger,this.eventHandlers[trigger]=function(event){dominar._fireValidate.call(dominar,event)}),this.form.addEventListener("submit",this.eventHandlers.submit=function(event){dominar._fireSubmit.call(dominar,event)}))},_unbindEvents:function(){for(var eventType in this.eventHandlers)this.form.removeEventListener(eventType,this.eventHandlers[eventType])},getField:function(element){if("string"==typeof element){if(!(element=this.$('[name="'+element+'"]')).length)return}else element=[element];var name=element[0].name,field=this.fields[name];return field||this.options[name]&&(field=new DominarField(name,element,this._getOptions(name),this),this.fields[name]=field,this._trigger("InitField",{dominarField:field})),field},_getFieldValues:function(names){for(var name,values={},i=0,len=names.length;i<len;i++)values[name=names[i]]=Utils.elementValues(this.$('[name="'+name+'"]'));return values},_getOptions:function(name){name=this.options[name];return Utils.extend(this.defaults,name)},$:function(selector){return Utils.$(selector,this.form)},add:function(elements,options){for(var i=0,len=elements.length;i<len;i++)this.options[elements[i].name]=options;return this},addByName:function(elementName,options){return this.options[elementName]=options,this},remove:function(elementName){return delete this.options[elementName],this},_trigger:function(name,data,callback){var name="dominar"+name,event=((data=data||{}).dominar=this,document.createEvent("CustomEvent"));return event.initCustomEvent(name,!0,!0,data),this.form.dispatchEvent(event),callback&&!event.defaultPrevented&&callback(),event},_fireValidate:function(event){var tag=event.target.tagName.toLowerCase();-1!==["input","select","textarea"].indexOf(tag)&&(tag=this.getField(event.target.name))&&tag._fireValidate(event)},_fireSubmit:function(event){var submitPassed,submitFailed,dominar=this;dominar.config.validateOnSubmit&&(event.preventDefault(),submitPassed=function(){event.target.submit()},submitFailed=function(){dominar._trigger("SubmitFailed")},dominar._trigger("Submit",{},function(){dominar.validateAll(function(){dominar._trigger("SubmitPassed",{},submitPassed)},function(){dominar._trigger("SubmitFailed",{},submitFailed)})}))},validate:function(element,passes,fails){element=this.getField(element);element&&element.validate(passes,fails)},validateDelayed:function(element,passes,fails){element=this.getField(element);element&&element.validateDelayed(passes,fails)},validateAll:function(passes,fails){passes=passes||Utils.noop,fails=fails||Utils.noop;var dominar=this,fields=Object.keys(this.options),passedCount=0;forEach(fields,function(item){var done=this.async();dominar.getField(item).validate(function(){passedCount++,done()},done)},function(success){(passedCount===fields.length?passes:fails)()})},destroy:function(){for(var i in this._unbindEvents(),this.fields)this.fields[i].reset();this.fields={}}},Dominar.Validator=Validator,global.Dominar=Dominar,module.exports=Dominar}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./dominar-field":10,"./utils":12,"async-foreach":1,validatorjs:9}],12:[function(require,module,exports){function $(selector,context){return selector instanceof Array?selector:Array.prototype.slice.call(context.querySelectorAll(selector))}function matchesSelector(elem){return elem.matches||elem.webkitMatchesSelector||elem.mozMatchesSelector||elem.msMatchesSelector}function Element(element){"string"==typeof element&&(element=document.createElement(element)),this.element=element}Element.prototype={hasClass:function(className){return matchesSelector(this.element).call(this.element,"."+className)},addClass:function(className){var elementClasses=this.element.className;return this.hasClass(className)||(this.element.className+=(elementClasses.length?" ":"")+className),this},removeClass:function(className){for(var classNames=className.split(" "),elementClasses=this.element.className,i=0,len=classNames.length;i<len;i++)className=classNames[i],this.hasClass(className)&&(elementClasses=elementClasses.replace(new RegExp("(^|\\s)"+className+"(\\s|$)")," ").replace(/\s$/,""));return this.element.className=elementClasses,this},find:function(selector){return $(selector,this.element)},closest:function(selector){selector.charAt(0);for(var elem=this.element.parentElement,matchSelector=matchesSelector(elem);elem;
348){if(matchSelector.call(elem,selector))return elem;elem=elem.parentElement}return null},get:function(){return this.element}},module.exports={$:$,element:function(element){return new Element(element)},noop:function(){},extend:function(obj1,obj2){var i,obj={};for(i in obj1)obj[i]=obj1[i];for(i in obj2)obj[i]=obj2[i];return obj},elementValues:function(fields){var type=fields[0].type;if("radio"!=type&&"checkbox"!=type)return fields[0].value;for(var field,i=0,len=fields.length,values=[];i<len;i++)(field=fields[i]).checked&&values.push(field.value);return"radio"==type?values.shift():values}}},{}]},{},[11])(11)}); 349function hasClass(ele,cls){return ele.className.match(new RegExp("(\\s|^)"+cls+"(\\s|$)"))}var clearDominarErrorsOnFocus=function(dominarInstance){for(var field in dominarInstance.options){var _field=document.getElementsByName(field)[0];"pd-company-name"!=field&&"pd-gst-number"!=field&&(field="checkbox"===_field.type?"change":"focus",_field.addEventListener(field,function(dominarInstance){var parentElement=this.parentNode;hasClass(parentElement=this.getAttribute("parent-ele-dominar")?this.closest("."+this.getAttribute("parent-ele-dominar")):parentElement,"has-error")&&(parentElement.querySelector(".help-block").innerText="")}))}}; 350var _createClass=(()=>{function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Aes=(()=>{function Aes(){_classCallCheck(this,Aes)}return _createClass(Aes,null,[{key:"cipher",value:function(input,w){for(var Nr=w.length/4-1,state=[[],[],[],[]],i=0;i<16;i++)state[i%4][Math.floor(i/4)]=input[i];for(var state=Aes.addRoundKey(state,w,0,4),round=1;round<Nr;round++)state=Aes.subBytes(state,4),state=Aes.shiftRows(state,4),state=Aes.mixColumns(state,4),state=Aes.addRoundKey(state,w,round,4);state=Aes.subBytes(state,4),state=Aes.shiftRows(state,4),state=Aes.addRoundKey(state,w,Nr,4);for(var output=new Array(16),_i=0;_i<16;_i++)output[_i]=state[_i%4][Math.floor(_i/4)];return output}},{key:"keyExpansion",value:function(key){for(var Nk=key.length/4,Nr=6+Nk,w=new Array(4*(1+Nr)),temp=new Array(4),i=0;i<Nk;i++){var r=[key[4*i],key[4*i+1],key[4*i+2],key[4*i+3]];w[i]=r}for(var _i2=Nk;_i2<4*(1+Nr);_i2++){w[_i2]=new Array(4);for(var t=0;t<4;t++)temp[t]=w[_i2-1][t];if(_i2%Nk==0)for(var temp=Aes.subWord(Aes.rotWord(temp)),_t=0;_t<4;_t++)temp[_t]^=Aes.rCon[_i2/Nk][_t];else 6<Nk&&_i2%Nk==4&&(temp=Aes.subWord(temp));for(var _t2=0;_t2<4;_t2++)w[_i2][_t2]=w[_i2-Nk][_t2]^temp[_t2]}return w}},{key:"subBytes",value:function(s,Nb){for(var r=0;r<4;r++)for(var c=0;c<Nb;c++)s[r][c]=Aes.sBox[s[r][c]];return s}},{key:"shiftRows",value:function(s,Nb){for(var t=new Array(4),r=1;r<4;r++){for(var c=0;c<4;c++)t[c]=s[r][(c+r)%Nb];for(var _c=0;_c<4;_c++)s[r][_c]=t[_c]}return s}},{key:"mixColumns",value:function(s,Nb){for(var c=0;c<Nb;c++){for(var a=new Array(Nb),b=new Array(Nb),r=0;r<4;r++)a[r]=s[r][c],b[r]=s[r][c]?s[r][c]<<1^283:s[r][c]<<1;s[0][c]=b[0]^a[1]^b[1]^a[2]^a[3],s[1][c]=a[0]^b[1]^a[2]^b[2]^a[3],s[2][c]=a[0]^a[1]^b[2]^a[3]^b[3],s[3][c]=a[0]^b[0]^a[1]^a[2]^b[3]}return s}},{key:"addRoundKey",value:function(state,w,rnd,Nb){for(var r=0;r<4;r++)for(var c=0;c<Nb;c++)state[r][c]^=w[4*rnd+c][r];return state}},{key:"subWord",value:function(w){for(var i=0;i<4;i++)w[i]=Aes.sBox[w[i]];return w}},{key:"rotWord",value:function(w){for(var tmp=w[0],i=0;i<3;i++)w[i]=w[i+1];return w[3]=tmp,w}}]),Aes})();Aes.sBox=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,9
3500,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Aes.rCon=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]]; 351var _createClass=(()=>{function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(self)return!call||"object"!=typeof call&&"function"!=typeof call?self:call;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var AesCtr=(()=>{function AesCtr(){return _classCallCheck(this,AesCtr),_possibleConstructorReturn(this,(AesCtr.__proto__||Object.getPrototypeOf(AesCtr)).apply(this,arguments))}return _inherits(AesCtr,Aes),_createClass(AesCtr,null,[{key:"encrypt",value:function(plaintext,password,nBits){if(128!=nBits&&192!=nBits&&256!=nBits)throw new Error("Key size is not 128 / 192 / 256");plaintext=AesCtr.utf8Encode(String(plaintext)),password=AesCtr.utf8Encode(String(password));for(var nBytes=nBits/8,pwBytes=new Array(nBytes),i=0;i<nBytes;i++)pwBytes[i]=i<password.length?password.charCodeAt(i):0;for(var nBits=(nBits=Aes.cipher(pwBytes,Aes.keyExpansion(pwBytes))).concat(nBits.slice(0,nBytes-16)),counterBlock=new Array(16),nonce=(new Date).getTime(),nonceMs=nonce%1e3,nonceSec=Math.floor(nonce/1e3),nonceRnd=Math.floor(65535*Math.random()),_i=0;_i<2;_i++)counterBlock[_i]=nonceMs>>>8*_i&255;for(var _i2=0;_i2<2;_i2++)counterBlock[_i2+2]=nonceRnd>>>8*_i2&255;for(var _i3=0;_i3<4;_i3++)counterBlock[_i3+4]=nonceSec>>>8*_i3&255;for(var ctrTxt="",_i4=0;_i4<8;_i4++)ctrTxt+=String.fromCharCode(counterBlock[_i4]);for(var keySchedule=Aes.keyExpansion(nBits),blockCount=Math.ceil(plaintext.length/16),ciphertext="",b=0;b<blockCount;b++){for(var c=0;c<4;c++)counterBlock[15-c]=b>>>8*c&255;for(var _c=0;_c<4;_c++)counterBlock[15-_c-4]=b/4294967296>>>8*_c;for(var cipherCntr=Aes.cipher(counterBlock,keySchedule),blockLength=b<blockCount-1?16:(plaintext.length-1)%16+1,cipherChar=new Array(blockLength),_i5=0;_i5<blockLength;_i5++)cipherChar[_i5]=cipherCntr[_i5]^plaintext.charCodeAt(16*b+_i5),cipherChar[_i5]=String.fromCharCode(cipherChar[_i5]);ciphertext+=cipherChar.join(""),"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&b%1e3==0&&self.postMessage({progress:b/blockCount})}return ciphertext=AesCtr.base64Encode(ctrTxt+ciphertext)}},{key:"decrypt",value:function(ciphertext,password,nBits){if(128!=nBits&&192!=nBits&&256!=nBits)throw new Error("Key size is not 128 / 192 / 256");ciphertext=AesCtr.base64Decode(String(ciphertext)),password=AesCtr.utf8Encode(String(password));for(var nBytes=nBits/8,pwBytes=new Array(nBytes),i=0;i<nBytes;i++)pwBytes[i]=i<password.length?password.charCodeAt(i):0;for(var nBits=(nBits=Aes.cipher(pwBytes,Aes.keyExpansion(pwBytes))).concat(nBits.slice(0,nBytes-16)),counterBlock=new Array(8),ctrTxt=ciphertext.slice(0,8),_i6=0;_i6<8;_i6++)counterBlock[_i6]=ctrTxt.charCodeAt(_i6);for(var keySchedule=Aes.keyExpansion(nBits),nBlocks=Math.ceil((ciphertext.length-8)/16),ct=new Array(nBlocks),b=0;b<nBlocks;b++)ct[b]=ciphertext.slice(8+16*b,8+16*b+16);ciphertext=ct;for(var plaintext="",_b=0;_b<nBlocks;_b++){for(var c=0;c<4;c++)counterBlock[15-c]=_b>>>8*c&255;for(var _c2=0;_c2<4;_c2++)counterBlock[15-_c2-4]=(_b+1)/4294967296-1>>>8*_c2&255;for(var cipherCntr=Aes.cipher(counterBlock,keySchedule),plaintxtByte=new Array(ciphertext[_b].length),_i7=0;_i7<ciphertext[_b].length;_i7++)plaintxtByte[_i7]=cipherCntr[_i7]^ciphertext[_b].charCodeAt(_i7),plaintxtByte[_i7]=String.fromCharCode(plaintxtByte[_i7]);plaintext+=plaintxtByte.join(""),"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&_b%1e3==0&&self.postMessage({progress:_b/nBlocks})}return plaintext=AesCtr.utf8Decode(plaintext)}},{key:"utf8Encode",value:function(str){try{return(new TextEncoder).encode(str,"utf-8").reduce(function(prev,curr){return prev+String.fromCharCode(curr)},"")}catch(e){return unescape(encodeURIComponent(str))}}},{key:"utf8Decode",value:function(str){try{return(new TextEncoder).decode(str,"utf-8").reduce(function(prev,curr){return prev+String.fromCharCode(curr)},"")}catch(e){return decodeURIComponent(escape(str))}}},{key:"base64Encode",value:function(str){if("undefined"!=typeof btoa)return btoa(str);if("undefined"!=typeof Buffer)return new Buffer(str,"binary").toString("base64");throw new Error("No Base64 Encode")}},{key:"base64Decode",value:function(str){if("undefined"!=typeof atob)return atob(str);if("undefined"!=typeof Buffer)return new Buffer(str,"base64").toString("binary");throw new Error("No Base64 Decode")}}]),AesCtr})(); 352var CryptoJS=CryptoJS||(u=>{function s(){}var d={},l=d.lib={},t=l.Base={extend:function(a){s.prototype=this;var c=new s;return a&&c.mixIn(a),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.a
352pply(this,arguments)}),(c.init.prototype=c).$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[],this.sigBytes=null!=c?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;if(a=a.sigBytes,this.clamp(),j%4)for(var k=0;k<a;k++)c[j+k>>>2]|=(e[k>>>2]>>>24-k%4*8&255)<<24-(j+k)%4*8;else if(65535<e.length)for(k=0;k<a;k+=4)c[j+k>>>2]=e[k>>>2];else c.push.apply(c,e);return this.sigBytes+=a,this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<32-c%4*8,a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var c=[],e=0;e<a;e+=4)c.push(4294967296*u.random()|0);return new r.init(c,a)}}),w=d.enc={},v=w.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++){var k=c[j>>>2]>>>24-j%4*8&255;e.push((k>>>4).toString(16)),e.push((15&k).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j+=2)e[j>>>3]|=parseInt(a.substr(j,2),16)<<24-j%8*4;return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++)e.push(String.fromCharCode(c[j>>>2]>>>24-j%4*8&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j++)e[j>>>2]|=(255&a.charCodeAt(j))<<24-j%4*8;return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data")}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,k=this.blockSize,b=(j=c.sigBytes)/(4*k),b=a?u.ceil(b):u.max((0|b)-this._minBufferSize,0),j=u.min(4*(a=b*k),j);if(a){for(var q=0;q<a;q+=k)this._doProcessBlock(e,q);q=e.splice(0,a),c.sigBytes-=j}return new r.init(q,j)},clone:function(){var a=t.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),n=(l.Hasher=q.extend({cfg:t.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){q.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){return a&&this._append(a),this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,e){return new a.init(e).finalize(b)}},_createHmacHelper:function(a){return function(b,e){return new n.HMAC.init(a,e).finalize(b)}}}),d.algo={});return d})(Math);(()=>{var u=CryptoJS,p=u.lib.WordArray;u.enc.Base64={stringify:function(d){var l=d.words,p=d.sigBytes,t=this._map;d.clamp(),d=[];for(var r=0;r<p;r+=3)for(var w=(l[r>>>2]>>>24-r%4*8&255)<<16|(l[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|l[r+2>>>2]>>>24-(r+2)%4*8&255,v=0;v<4&&r+.75*v<p;v++)d.push(t.charAt(w>>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map;(t=s.charAt(64))&&-1!=(t=d.indexOf(t))&&(l=t);for(var v,b,t=[],r=0,w=0;w<l;w++)w%4&&(v=s.indexOf(d.charAt(w-1))<<w%4*2,b=s.indexOf(d.charAt(w))>>>6-w%4*2,t[r>>>2]|=(v|b)<<24-r%4*8,r++);return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(),(u=>{function p(b,n,a,c,e,j,k){return((b=b+(n&a|~n&c)+e+k)<<j|b>>>32-j)+n}function d(b,n,a,c,e,j,k){return((b=b+(n&c|a&~c)+e+k)<<j|b>>>32-j)+n}function l(b,n,a,c,e,j,k){return((b=b+(n^a^c)+e+k)<<j|b>>>32-j)+n}function s(b,n,a,c,e,j,k){return((b=b+(a^(n|~c))+e+k)<<j|b>>>32-j)+n}for(var t=CryptoJS,w=(r=t.lib).WordArray,v=r.Hasher,r=t.algo,b=[],x=0;x<64;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(q,n){for(var a=0;a<16;a++){var e=q[c=n+a];q[c]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[
352n+14],x=q[n+15],f=p(a[0],m=a[1],g=a[2],h=a[3],c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]),f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),f=d(f,m=p(m,g,h,f,x,22,b[15]),g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f,m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),f=l(f,m=d(m,g,h,f,u,20,b[31]),g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),f=s(f,m=l(m,g,h,f,j,23,b[47]),g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m,E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0,a[1]=a[1]+m|0,a[2]=a[2]+g|0,a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes,e=(n[c>>>5]|=128<<24-c%32,u.floor(a/4294967296));for(n[15+(64+c>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),n[14+(64+c>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),b.sigBytes=4*(n.length+1),this._process(),n=(b=this._hash).words,a=0;a<4;a++)c=n[a],n[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);return b},clone:function(){var b=v.clone.call(this);return b._hash=this._hash.clone(),b}}),t.MD5=v._createHelper(r),t.HmacMD5=v._createHmacHelper(r)})(Math),(()=>{var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,s=(p=u.algo).EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var s=(p=this.cfg).hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length<q;){n&&s.update(n);var n=s.update(d).finalize(r);s.reset();for(var a=1;a<p;a++)n=s.finalize(n),s.reset();b.concat(n)}return b.sigBytes=4*q,b}});u.EvpKDF=function(d,l,p){return s.create(p).compute(d,l)}})(),CryptoJS.lib.Cipher||(()=>{function x(e,a,b){var c=this._iv;c?this._iv=void 0:c=this._prevBlock;for(var d=0;d<b;d++)e[a+d]^=c[d]}var d=(p=CryptoJS).lib,l=d.Base,s=d.WordArray,t=d.BufferedBlockAlgorithm,r=p.enc.Base64,w=p.algo.EvpKDF,v=d.Cipher=t.extend({cfg:l.extend(),createEncryptor:function(e,a){return this.create(this._ENC_XFORM_MODE,e,a)},createDecryptor:function(e,a){return this.create(this._DEC_XFORM_MODE,e,a)},init:function(e,a,b){this.cfg=this.cfg.extend(b),this._xformMode=e,this._key=a,this.reset()},reset:function(){t.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(b,k,d){return("string"==typeof k?c:a).encrypt(e,b,k,d)},decrypt:function(b,k,d){return("string"==typeof k?c:a).decrypt(e,b,k,d)}}}}),b=(d.StreamCipher=v.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),p.mode={}),q=(d.BlockCipherMode=l.extend({createEncryptor:function(e,a){return this.Encryptor.create(e,a)},createDecryptor:function(e,a){return this.Decryptor.create(e,a)},init:function(e,a){this._cipher=e,this._iv=a}})).extend(),n=(q.Encryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize;x.call(this,e,a,c),b.encryptBlock(e,a),this._prevBlock=e.slice(a,a+c)}}),q.Decryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize,d=e.slice(a,a+c);b.decryptBlock(e,a),x.call(this,e,a,c),this._prevBlock=d}}),b=b.CBC=q,q=(p.pad={}).Pkcs7={pad:function(a,b){for(var c=4*b,d=(c=c-a.sigBytes%c)<<24|c<<16|c<<8|c,l=[],n=0;n<c;n+=4)l.push(d);c=s.create(l,c),a.concat(c)},unpad:function(a){a.sigBytes-=255&a.words[a.sigBytes-1>>>2]}},d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var c,b=(a=this.cfg).iv,a=a.mode;this._xformMode==this._ENC_XFORM_MODE?c=a.createEncryptor:(c=a.createDecryptor,this._minBufferSize=1),this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var b,a=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(a.pad(this._data,this.blockSize),b=this._process(!0)):(b=this._process(!0),a.unpad(b)),b},blockSize:4}),d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;return((a=a.salt)?s.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){var c,b=(a=r.parse(a)).words;return 1398893684==b[0]&&1701076831==b[1]&&(c=s.create(b.slice(2,4)),b.splice(0,4),a.sigBytes-=16),n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);return b=l.finalize(b),l=l.cfg,n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){return d=this.cfg.extend(d),b=this._parse(b,d.format),a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){return d=d||s.random(8),a=w.create({keySize:b+c}).compute(a,d),c=s.create(a.words.slice(b),4*c),a.sigBytes=4*b,n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){return d=(l=this.cfg.extend(l)).kdf.execute(d,b.keySize,b.ivSize),l.iv=d.iv,(b=a.encrypt.call(this,b,c,d.key,l)).mixIn(d),b},decrypt:function(b,c,d,l){return l=this.cfg.extend(l),c=this._parse(c,l.format),d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt),l.iv=d.iv,a.decrypt.call(this,b,c,d.key,l)}})})(),(()=>{for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;c<256;c++)a[c]=c<128?c<<1:c<<1^283;for(var e=0,j=0,c=0;c<256;c++){var k=j^j<<1^j<<2^j<<3^j<<4,z=a[s[l[e]=k=k>>>8^255&k^99]=e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8,r[e]=y<<16|y>>>16,w[e]=y<<8|y>>>24,v[e]=y,b[k]=(y=16843009*G^65537*F^257*z^16843008*e)<<24|y>>>8,x[k]=y<<16|y>>>16,q[k]=y<<8|y>>>24,n[k]=y,e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8,16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var k,c=(a=this._key).words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j<a;j++)j<d?e[j]=c[j]:(k=e[j-1],j%d?6<d&&4==j%d&&(k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[255&k]):(k=l[(k=k<<8|k>>>24)>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[255&k],k^=H[j/d|0]<<24),e[j]=e[j-d]^k);for(c=this._invKeySchedule=[],d=0;d<a;d++)j=a-d,k=d%4?e[j]:e[j-4],c[d]=d<4||j<=4?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>>8&255]]^n[l[255&k]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3],a[c+3]=d,this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s),d=a[c+1],a[c+1]=a[c+3],a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r<m;r++)var q=d[g>>>24]^e[h>>>16&255]^j[k>>>8&255]^l[255&n]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[255&g]^c[p++],t=d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[255&h]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[255&k]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[255&n])^c[p++],s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[255&g])^c[p++],t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[255&h])^c[p++],n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[255&k])^c[p++],a[b]=q,a[b+1]=s,a[b+2]=t,a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})(); 353!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s<e.length;++s)n.push(t(e[s],s));return n}function c(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,s){return xt(e,t,n,s,!0).utc()}function y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invali
353dMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=y(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function w(e){var t=_(NaN);return null!=e?c(y(t),e):y(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var p=f.momentProperties=[],t=!1;function v(e,t){var n,s,i;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=y(t)),r(t._locale)||(e._locale=t._locale),0<p.length)for(n=0;n<p.length;n++)r(i=t[s=p[n]])||(e[s]=i);return e}function k(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,f.updateOffset(this),t=!1)}function M(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function D(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return c(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,i),a){for(var e,t,n=[],s=0;s<arguments.length;s++){if(e="","object"==typeof arguments[s]){for(t in e+="\n["+s+"] ",arguments[0])m(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[s];n.push(e)}D(i+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,S={};function Y(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),S[e]||(D(t),S[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=c({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},c(s[n],e[n]),c(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=c({},s[n]));return s}function x(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};function T(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},W={};function C(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(W[e]=i),t&&(W[t[0]]=function(){return T(i.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=H(t,e.localeData()),R[t]=R[t]||function(s){for(var e,i=s.match(N),t=0,r=i.length;t<r;t++)W[i[t]]?i[t]=W[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=O(i[n])?i[n].call(e,s):i[n];return t}}(t),R[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(P.lastIndex=0;0<=n&&P.test(e);)e=e.replace(P,s),P.lastIndex=0,--n;return e}var F={};function L(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function V(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function G(e){var t,n,s={};for(n in e)m(e,n)&&(t=V(n))&&(s[t]=e[n]);return s}var E={};function A(e,t){E[e]=t}function j(e){return e%4==0&&e%100!=0||e%400==0}function I(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Z(e){var t=+e,n=0;return 0!=t&&isFinite(t)&&(n=I(t)),n}function z(t,n){return function(e){return null!=e?(q(this,t,e),f.updateOffset(this,n),this):$(this,t)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&j(e.year())&&1===e.month()&&29===e.date()?(n=Z(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var B,J=/\d/,Q=/\d\d/,X=/\d{3}/,K=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,re=/\d{1,4}/,ae=/[+-]?\d{1,6}/,oe=/\d+/,ue=/[+-]?\d+/,le=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ce(e,n,s){B[e]=O(n)?n:function(e,t){return e&&s?s:n}}function fe(e,t){return m(B,e)?B[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}B={};var _e={};function ye(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),h(n)&&(s=function(e,t){t[n]=Z(e)}),t=0;t<e.length;t++)_e[e[t]]=s}function ge(e,i){ye(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var we,pe=0,ve=1,ke=2,Me=3,De=4,Se=5,Ye=6,Oe=7,be=8;function xe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1==s?j(e)?29:28:31-s%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),L("month","M"),A("month",8),ce("M",te),ce("MM",te,Q),ce("MMM",function(e,t){return t.monthsShortRegex(e)}),ce("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[ve]=Z(e)-1}),ye(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[ve]=i:y(n).invalidMonth=e});var Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Re=de,We=de;function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Z(t);else if(!h(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ue(e){return null!=e?(Ce(this,e),f.updateOffset(this,!0),this):$(this,"Month")}function He(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=_([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=me(n[r]),s[r]=me(s[r]);for(r=0;r<24;r++)i[r]=me(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Fe(e){return j(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?T(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),L("year","y"),A("year",1),ce("Y",ue),ce("YY",te,Q),ce("YYYY",re,K),ce("YYYYY",ae,ee),ce("YYYYYY",ae,ee),ye(["YYYYY","YYYYYY"],pe),ye("YYYY",function(e,t){t[pe]=2===e.length?f.parseTwoDigitYear(e):Z(e)}),ye("YY",function(e,t){t[pe]=f.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[pe]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return Z(e)+(68<Z(e)?1900:2e3)};var Le=z("FullYear",!0);function Ve(e){var t,n;return e<100&&0<=e?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ge(e,t,n){var s=7+t-n;return s-(7+Ve(e,0,s).getUTCDay()-t)%7-1}function Ee(e,t,n,s,i){var r,a=1+7*(t-1)+(7+n-s)%7+Ge(e,s,i),o=a<=0?Fe(r=e-1)+a:a>Fe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}
353),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=at(e[r]).split("-")).length,n=(n=at(e[r+1]))?n.split("-"):null;0<t;){if(s=ut(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11<n[ve]?ve:n[ke]<1||n[ke]>xe(n[pe],n[ve])?ke:n[Me]<0||24<n[Me]||24===n[Me]&&(0!==n[De]||0!==n[Se]||0!==n[Ye])?Me:n[De]<0||59<n[De]?De:n[Se]<0||59<n[Se]?Se:n[Ye]<0||999<n[Ye]?Ye:-1,y(e)._overflowDayOfYear&&(t<pe||ke<t)&&(t=ke),y(e)._overflowWeeks&&-1===t&&(t=Oe),y(e)._overflowWeekday&&-1===t&&(t=be),y(e).overflow=t),e}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}
353/,!1]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],wt=/^\/?Date\((-?\d+)/i,pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(y(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Ot(e)}else e._isValid=!1}function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Ne.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}function Dt(e){var t,n,s,i,r=pt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(r){if(t=Mt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&ze.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()&&(y(i).weekdayMismatch=!0,!void(i._isValid=!1)))return;e._a=t,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return 60*((s-i)/100)+i}(r[8],r[9],r[10]),e._d=Ve.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function St(e,t,n){return null!=e?e:null!=t?t:n}function Yt(e){var t,n,s,i,r,a,o,u=[];if(!e._d){for(a=e,o=new Date(f.now()),s=a._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()],e._w&&null==e._a[ke]&&null==e._a[ve]&&function(e){var t,n,s,i,r,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=St(t.GG,e._a[pe],Ae(Tt(),1,4).year),s=St(t.W,1),((i=St(t.E,1))<1||7<i)&&(u=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=Ae(Tt(),r,a),n=St(t.gg,e._a[pe],l.year),s=St(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r);s<1||s>je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;c<d.length;c++)n=d[c],(t=(u.match(fe(n,e))||[])[0])&&(0<(s=u.substr(0,u.indexOf(t))).length&&y(e).unusedInput.push(s),u=u.slice(u.indexOf(t)+t.length),h+=t.length),W[n]?(t?y(e).empty=!1:y(e).unusedTokens.push(n),r=n,o=e,null!=(a=t)&&m(_e,r)&&_e[r](a,o._a,o,r)):e._strict&&!t&&y(e).unusedTokens.push(n);y(e).charsLeftOver=l-h,0<u.length&&y(e).unusedInput.push(u),e._a[Me]<=12&&!0===y(e).bigHour&&0<e._a[Me]&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Me]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[Me],e._meridiem),null!==(i=y(e).era)&&(e._a[pe]=e._locale.erasConvertYear(i,e._a[pe])),Yt(e),ct(e)}else Dt(e);else kt(e)}function bt(e){var t,n,s=e._i,i=e._f;return e._locale=e._locale||dt(e._l),null===s||void 0===i&&""===s?w({nullInput:!0}):("string"==typeof s&&(e._i=s=e._locale.preparse(s)),M(s)?new k(ct(s)):(a(s)?e._d=s:o(i)?function(e){var t,n,s,i,r,a,o=!1;if(0===e._f.length)return y(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,a=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Ot(t),g(t)&&(a=!0),r+=y(t).charsLeftOver,r+=10*y(t).unusedTokens.length,y(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));c(e,n||t)}(e):i?Ot(e):r(n=(t=e)._i)?t._d=new Date(f.now()):a(n)?t._d=new Date(n.valueOf()):"string"==typeof n?function(e){var t=wt.exec(e._i);
353null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Dt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:f.createFromInputFallback(e)))):e._d=new Date(+t[1])}(t):o(n)?(t._a=d(n.slice(0),function(e){return parseInt(e,10)}),Yt(t)):u(n)?function(e){var t,n;e._d||(n=void 0===(t=G(e._i)).day?t.date:t.day,e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yt(e))}(t):h(n)?t._d=new Date(n):f.createFromInputFallback(t),g(e)||(e._d=null),e))}function xt(e,t,n,s,i){var r,a={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new k(ct(bt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return xt(e,t,n,s,!1)}f.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};var Nt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:w()}),Pt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:w()});function Rt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var t=G(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,s=!1;for(t in e)if(m(e,t)&&(-1===we.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Wt.length;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==Z(e[Wt[n]])&&(s=!0)}return!0}(t),this._milliseconds=+h+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=dt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){C(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+T(~~(e/60),2)+n+T(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ce("Z",he),ce("ZZ",he),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(he,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(Lt)||["-",0,0])[1]+Z(n[2]))?0:"+"===n[0]?s:-s}function Gt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(M(e)||a(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),f.updateOffset(n,!1),n):Tt(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var jt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zt(e,t){var n,s,i,r=e,a=null;return Ut(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:h(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=jt.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:Z(a[ke])*n,h:Z(a[Me])*n,m:Z(a[De])*n,s:Z(a[Se])*n,ms:Z(Ht(1e3*a[Ye]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:1,r={y:zt(a[2],n),M:zt(a[3],n),w:zt(a[4],n),d:zt(a[5],n),h:zt(a[6],n),m:zt(a[7],n),s:zt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=$t(e,t):((n=$t(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ct(r),Ut(e)&&m(e,"_locale")&&(s._locale=e._locale),Ut(e)&&m(e,"_isValid")&&(s._isValid=e._isValid),s}function zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=t-e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Y(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Bt(this,Zt(e,t),s),this}}function Bt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),a=Ht(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,$(e,"Month")+a*n),r&&q(e,"Date",$(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||a))}
353Zt.fn=Ct.prototype,Zt.invalid=function(){return Zt(NaN)};var Jt=qt(1,"add"),Qt=qt(-1,"subtract");function Xt(e){return"string"==typeof e||e instanceof String}function Kt(e){return M(e)||a(e)||Xt(e)||h(e)||function(t){var e=o(t),n=!1;e&&(n=0===t.filter(function(e){return!h(e)&&Xt(t)}).length);return e&&n}(e)||function(e){var t,n,s=u(e)&&!l(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)n=r[t],i=i||m(e,n);return s&&i}(e)||null==e}function en(e,t){if(e.date()<t.date())return-en(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),i=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+i)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function sn(){return this._locale}var rn=126227808e5;function an(e,t){return(e%t+t)%t}function on(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-rn:new Date(e,t,n).valueOf()}function un(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-rn:Date.UTC(e,t,n)}function ln(e,t){return t.erasAbbrRegex(e)}function hn(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(me(i[r].name)),e.push(me(i[r].abbr)),n.push(me(i[r].narrow)),s.push(me(i[r].name)),s.push(me(i[r].abbr)),s.push(me(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function dn(e,t){C(0,[e,e.length],0,t)}function cn(e,t,n,s,i){var r;return null==e?Ae(this,s,i).year:((r=je(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ve(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),ce("N",ln),ce("NN",ln),ce("NNN",ln),ce("NNNN",function(e,t){return t.erasNameRegex(e)}),ce("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ye(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?y(n).era=i:y(n).invalidEra=e}),ce("y",oe),ce("yy",oe),ce("yyy",oe),ce("yyyy",oe),ce("yo",function(e,t){return t._eraYearOrdinalRegex||oe}),ye(["y","yy","yyy","yyyy"],pe),ye(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pe]=n._locale.eraYearOrdinalParse(e,i):t[pe]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),ce("G",ue),ce("g",ue),ce("GG",te,Q),ce("gg",te,Q),ce("GGGG",re,K),ce("gggg",re,K),ce("GGGGG",ae,ee),ce("ggggg",ae,ee),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=Z(e)}),ge(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),L("quarter","Q"),A("quarter",7),ce("Q",J),ye("Q",function(e,t){t[ve]=3*(Z(e)-1)}),C("D",["DD",2],"Do","date"),L("date","D"),A("date",9),ce("D",te),ce("DD",te,Q),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ye(["D","DD"],ke),ye("Do",function(e,t){t[ke]=Z(e.match(te)[0])});var fn=z("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),A("dayOfYear",4),ce("DDD",ie),ce("DDDD",X),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Z(e)}),C("m",["mm",2],0,"minute"),L("minute","m"),A("minute",14),ce("m",te),ce("mm",te,Q),ye(["m","mm"],De);var mn=z("Minutes",!1);C("s",["ss",2],0,"second"),L("second","s"),A("second",15),ce("s",te),ce("ss",te,Q),ye(["s","ss"],Se);var _n,yn,gn=z("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),A("millisecond",16),ce("S",ie,J),ce("SS",ie,Q),ce("SSS",ie,X),_n="SSSS";_n.length<=9;_n+="S")ce(_n,oe);
vendor: 5,376 bytes, line 353
353function wn(e,t){t[Ye]=Z(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")ye(_n,wn);yn=z("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var pn=k.prototype;function vn(e){return e}pn.add=Jt,pn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=u(e)&&!l(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||m(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var n=e||Tt(),s=Gt(n,this).startOf("day"),i=f.calendarFormat(this,s)||"sameElse",r=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},pn.clone=function(){return new k(this)},pn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=V(t)){case"year":r=en(this,s)/12;break;case"month":r=en(this,s);break;case"quarter":r=en(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:I(r)},pn.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-an(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-an(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.format=function(e){e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},pn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.fromNow=function(e){return this.from(Tt(),e)},pn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.toNow=function(e){return this.to(Tt(),e)},pn.get=function(e){return O(this[e=V(e)])?this[e]():this},pn.invalidAt=function(){return y(this).overflow},pn.isAfter=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},pn.isBefore=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},pn.isBetween=function(e,t,n,s){var i=M(e)?e:Tt(e),r=M(t)?t:Tt(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n)))},pn.isSame=function(e,t){var n,s=M(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},pn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},pn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},pn.isValid=function(){return g(this)},pn.lang=nn,pn.locale=tn,pn.localeData=sn,pn.max=Pt,pn.min=Nt,pn.parsingFlags=function(){return c({},y(this))},pn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)m(e,t)&&n.push({unit:t,priority:E[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=G(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(O(this[e=V(e)]))return this[e](t);return this},pn.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=an(t,6e4);break;case"second":t=this._d.valueOf(),t-=an(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.subtract=Qt,pn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},pn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},pn.toDate=function(){return new Date(this.valueOf())},pn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;
vendor: 15,224 bytes, line 353
353return n.year()<0||9999<n.year()?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},pn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(pn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},pn.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},pn.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},pn.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},pn.year=Le,pn.isLeapYear=function(){return j(this.year())},pn.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},pn.isoWeekYear=function(e){return cn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},pn.quarter=pn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},pn.month=Ue,pn.daysInMonth=function(){return xe(this.year(),this.month())},pn.week=pn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},pn.isoWeek=pn.isoWeeks=function(e){var t=Ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},pn.weeksInYear=function(){var e=this.localeData()._week;return je(this.year(),e.dow,e.doy)},pn.weeksInWeekYear=function(){var e=this.localeData()._week;return je(this.weekYear(),e.dow,e.doy)},pn.isoWeeksInYear=function(){return je(this.year(),1,4)},pn.isoWeeksInISOWeekYear=function(){return je(this.isoWeekYear(),1,4)},pn.date=fn,pn.day=pn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},pn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},pn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,s=(t=e,n=this.localeData(),"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?s:s-7)},pn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},pn.hour=pn.hours=tt,pn.minute=pn.minutes=mn,pn.second=pn.seconds=gn,pn.millisecond=pn.milliseconds=yn,pn.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?Bt(this,Zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},pn.utc=function(e){return this.utcOffset(0,e)},pn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},pn.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(le,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},pn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},pn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&Z(e[a])!==Z(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var kn=x.prototype;function Mn(e,t,n,s){var i=dt(),r=_().set(s,t);return i[n](r,e)}function Dn(e,t,n){if(h(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=Mn(e,i,n,"month");return s}function Sn(e,t,n,s){t=("boolean"==typeof e?h(t)&&(n=t,t=void 0):(t=e,e=!1,h(n=t)&&(n=t,t=void 0)),t||"");var i,r=dt(),a=e?r._week.dow:0,o=[];if(null!=n)return Mn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=Mn(t,(i+a)%7,s,"day");return o}kn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,n):s},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=vn,kn.postformat=vn,kn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return O(i)?i(e,t,n,s):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)m(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.eras=function(e,t){for(var n,s=this._eras||dt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},kn.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},kn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},kn.erasAbbrRegex=function(e){return m(this,"_erasAbbrRegex")||hn.call(this),e?this._erasAbbrRegex:this._erasRegex},kn.erasNameRegex=function(e){return m(this,"_erasNameRegex")||hn.call(this),e?this._erasNameRegex:this._erasRegex},kn.erasNarrowRegex=function(e){return m(this,"_erasNarrowRegex")||hn.call(this),e?this._erasNarrowRegex:this._erasRegex},kn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=_([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))||-1!==(i=we.call(this._longMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))||-1!==(i=we.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=_([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},kn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return Ae(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ie(n,this._week.dow):e?n[e.day()]:n},kn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=_([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=_([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},lt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;
353return e+(1===Z(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=n("moment.lang is deprecated. Use moment.locale instead.",lt),f.langData=n("moment.langData is deprecated. Use moment.localeData instead.",dt);var Yn=Math.abs;function On(e,t,n,s){var i=Zt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function xn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function Nn(e){return function(){return this.as(e)}}var Pn=Nn("ms"),Rn=Nn("s"),Wn=Nn("m"),Cn=Nn("h"),Un=Nn("d"),Hn=Nn("w"),Fn=Nn("M"),Ln=Nn("Q"),Vn=Nn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=Gn("milliseconds"),An=Gn("seconds"),jn=Gn("minutes"),In=Gn("hours"),Zn=Gn("days"),zn=Gn("months"),$n=Gn("years");var qn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,s){var i=Zt(e).abs(),r=qn(i.as("s")),a=qn(i.as("m")),o=qn(i.as("h")),u=qn(i.as("d")),l=qn(i.as("M")),h=qn(i.as("w")),d=qn(i.as("y")),c=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(c=c||h<=1&&["w"]||h<n.w&&["ww",h]),(c=c||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=0<+e,c[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,c)}var Qn=Math.abs;function Xn(e){return(0<e)-(e<0)||+e}function Kn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=Qn(this._milliseconds)/1e3,l=Qn(this._days),h=Qn(this._months),d=this.asSeconds();return d?(e=I(u/60),t=I(e/60),u%=60,e%=60,n=I(h/12),h%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=Xn(this._months)!==Xn(d)?"-":"",a=Xn(this._days)!==Xn(d)?"-":"",o=Xn(this._milliseconds)!==Xn(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(h?r+h+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var es=Ct.prototype;return es.isValid=function(){return this._isValid},es.abs=function(){var e=this._data;return this._milliseconds=Yn(this._milliseconds),this._days=Yn(this._days),this._months=Yn(this._months),e.milliseconds=Yn(e.milliseconds),e.seconds=Yn(e.seconds),e.minutes=Yn(e.minutes),e.hours=Yn(e.hours),e.months=Yn(e.months),e.years=Yn(e.years),this},es.add=function(e,t){return On(this,e,t,1)},es.subtract=function(e,t){return On(this,e,t,-1)},es.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+xn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},es.asMilliseconds=Pn,es.asSeconds=Rn,es.asMinutes=Wn,es.asHours=Cn,es.asDays=Un,es.asWeeks=Hn,es.asMonths=Fn,es.asQuarters=Ln,es.asYears=Vn,es.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Z(this._months/12):NaN},es._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*bn(Tn(o)+a),o=a=0),u.milliseconds=r%1e3,e=I(r/1e3),u.seconds=e%60,t=I(e/60),u.minutes=t%60,n=I(t/60),u.hours=n%24,a+=I(n/24),o+=i=I(xn(a)),a-=bn(Tn(i)),s=I(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},es.clone=function(){return Zt(this)},es.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},es.milliseconds=En,es.seconds=An,es.minutes=jn,es.hours=In,es.days=Zn,es.weeks=function(){return I(this.days()/7)},es.months=zn,es.years=$n,es.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,r=Bn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},Bn,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=this.localeData(),s=Jn(this,!i,r,n),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},es.toISOString=Kn,es.toString=Kn,es.toJSON=Kn,es.locale=tn,es.localeData=sn,es.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kn),es.lang=nn,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ce("x",ue),ce("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ye("x",function(e,t,n){n._d=new Date(Z(e))}),f.version="2.29.1",e=Tt,f.fn=pn,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=_,f.unix=function(e){return Tt(1e3*e)},f.months=function(e,t){return Dn(e,t,"months")},f.isDate=a,f.locale=lt,f.invalid=w,f.duration=Zt,f.isMoment=M,f.weekdays=function(e,t,n){return Sn(e,t,n,"weekdays")},f.parseZone=function(){return Tt.apply(null,arguments).parseZone()},f.localeData=dt,f.isDuration=Ut,f.monthsShort=function(e,t){return Dn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return Sn(e,t,n,"weekdaysMin")},f.defineLocale=ht,f.updateLocale=function(e,t){var n,s,i;return null!=t?(i=st,null!=it[e]&&null!=it[e].parentLocale?it[e].set(b(it[e]._config,t)):(null!=(s=ut(e))&&(i=s._config),t=b(i,t),null==s&&(t.abbr=e),(n=new x(t)).parentLocale=it[e],it[e]=n),lt(e)):null!=it[e]&&(null!=it[e].parentLocale?(it[e]=it[e].parentLocale,e===lt()&<(e)):null!=it[e]&&delete it[e]),it[e]},f.locales=function(){return s(it)},f.weekdaysShort=function(e,t,n){return Sn(e,t,n,"weekdaysShort")},f.normalizeUnits=V,f.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==Bn[e]&&(void 0===t?Bn[e]:(Bn[e]=t,"
353s"===e&&(Bn.ss=t-1),!0))},f.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},f.prototype=pn,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f}); 354//# sourceMappingURL=moment.min.js.map 355function convertDate(inputFormat){function pad(s){return s<10?"0"+s:s}inputFormat=new Date(inputFormat);return[pad(inputFormat.getDate()),pad(inputFormat.getMonth()+1),inputFormat.getFullYear()].join("/")}((root,factory)=>{"object"==typeof exports?module.exports=factory():"function"==typeof define&&define.amd?define(function(req){return factory()}):root.Pikaday=factory()})(this,function(moment){function addEvent(el,e,callback,capture){hasEventListeners?el.addEventListener(e,callback,!!capture):el.attachEvent("on"+e,callback)}function removeEvent(el,e,callback,capture){hasEventListeners?el.removeEventListener(e,callback,!!capture):el.detachEvent("on"+e,callback)}function hasClass(el,cn){return-1!==(" "+el.className+" ").indexOf(" "+cn+" ")}function isArray(obj){return/Array/.test(Object.prototype.toString.call(obj))}function isDate(obj){return/Date/.test(Object.prototype.toString.call(obj))&&!isNaN(obj.getTime())}function getDaysInMonth(year,month){return[31,(year=>year%4==0&&year%100!=0||year%400==0)(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]}function setToStartOfDay(date){isDate(date)&&date.setHours(0,0,0,0)}function compareDates(a,b){return a.getTime()===b.getTime()}function extend(to,from,overwrite){var prop,hasProp;for(prop in from)(hasProp=void 0!==to[prop])&&"object"==typeof from[prop]&&null!==from[prop]&&void 0===from[prop].nodeName?isDate(from[prop])?overwrite&&(to[prop]=new Date(from[prop].getTime())):isArray(from[prop])?overwrite&&(to[prop]=from[prop].slice(0)):to[prop]=extend({},from[prop],overwrite):!overwrite&&hasProp||(to[prop]=from[prop]);return to}function fireEvent(el,eventName,data){var ev;document.createEvent?((ev=document.createEvent("HTMLEvents")).initEvent(eventName,!0,!1),ev=extend(ev,data),el.dispatchEvent(ev)):document.createEventObject&&(ev=document.createEventObject(),ev=extend(ev,data),el.fireEvent("on"+eventName,ev))}function adjustCalendar(calendar){return calendar.month<0&&(calendar.year-=Math.ceil(Math.abs(calendar.month)/12),calendar.month+=12),11<calendar.month&&(calendar.year+=Math.floor(Math.abs(calendar.month)/12),calendar.month-=12),calendar}function renderTable(opts,data,randId){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+randId+'">'+(opts=>{var i,arr=[];for(opts.showWeekNumber&&arr.push("<th></th>"),i=0;i<7;i++)arr.push('<th scope="col"><abbr title="'+renderDayName(opts,i)+'">'+renderDayName(opts,i,!0)+"</abbr></th>");return"<thead><tr>"+(opts.isRTL?arr.reverse():arr).join("")+"</tr></thead>"})(opts)+"<tbody>"+data.join("")+"</tbody></table>"}function Pikaday(options){var self=this,opts=self.config(options),lastScrolling=!1,options=(self._onTouchStart=function(e){lastScrolling=!0},self._onMouseDown=function(e){if(lastScrolling)lastScrolling=!1;else if(self._v){var target=(e=e||window.event).target||e.srcElement;if(target)if(hasClass(target,"is-disabled")||(!hasClass(target,"pika-button")||hasClass(target,"is-empty")||hasClass(target.parentNode,"is-disabled")?hasClass(target,"pika-prev")?self.prevMonth():hasClass(target,"pika-next")&&self.nextMonth():(self.setDate(new Date(target.getAttribute("data-pika-year"),target.getAttribute("data-pika-month"),target.getAttribute("data-pika-day"))),opts.bound&&sto(function(){self.hide(),opts.blurFieldOnSelect&&opts.field&&opts.field.blur()},100))),hasClass(target,"pika-select"))self._c=!0;else{if(!e.preventDefault)return e.returnValue=!1;e.preventDefault()}}},self._onChange=function(e){e=(e=e||window.event).target||e.srcElement;e&&(hasClass(e,"pika-select-month")?self.gotoMonth(e.value):hasClass(e,"pika-select-year")&&self.gotoYear(e.value))},self._onKeyChange=function(e){if(e=e||window.event,self.isVisible())switch(e.keyCode){case 13:case 27:opts.field&&opts.field.blur();break;case 37:e.preventDefault(),self.adjustDate("subtract",1);break;case 38:self.adjustDate("subtract",7);break;case 39:self.adjustDate("add",1);break;case 40:self.adjustDate("add",7)}},self._onInputChange=function(e){var date;e.firedBy===self||(date=opts.parse?opts.parse(opts.field.value,opts.format):hasMoment?(date=moment(opts.field.value,opts.format,opts.formatStrict))&&date.isValid()?date.toDate():null:new Date(Date.parse(opts.field.value)),isDate(date)&&self.setDate(date),self._v)||self.show()},self._onInputFocus=function(){self.show()},self._onInputClick=function(){self.show()},self._onInputBlur=function(){var pEl=document.activeElement;do{if(hasClass(pEl,"pika-single"))return}while(pEl=pEl.parentNode);self._c||(self._b=sto(function(){self.hide()},50)),self._c=!1},self._onClick=function(e){var e=(e=e||window.event).target||e.srcElement,pEl=e;if(e){hasEventListeners||!hasClass(e,"pika-select")||e.onchange||(e.setAttribute("onchange","return;"),addEvent(e,"change",self._onChange));do{if(hasClass(pEl,"pika-single")||pEl===opts.trigger)return}while(pEl=pEl.parentNode);self._v&&e!==opts.trigger&&pEl!==opts.trigger&&self.hide()}}
355,self.el=document.createElement("div"),self.el.className="pika-single"+(opts.isRTL?" is-rtl":"")+(opts.theme?" "+opts.theme:""),addEvent(self.el,"mousedown",self._onMouseDown,!0),addEvent(self.el,"touchend",self._onMouseDown,!0),addEvent(self.el,"touchstart",self._onTouchStart,!0),addEvent(self.el,"change",self._onChange),opts.keyboardInput&&addEvent(document,"keydown",self._onKeyChange),opts.field&&(opts.container?opts.container.appendChild(self.el):opts.bound?document.body.appendChild(self.el):opts.field.parentNode.insertBefore(self.el,opts.field.nextSibling),addEvent(opts.field,"change",self._onInputChange),opts.defaultDate||(hasMoment&&opts.field.value?opts.defaultDate=moment(opts.field.value,opts.format).toDate():opts.defaultDate=new Date(Date.parse(opts.field.value)),opts.setDefaultDate=!0)),opts.defaultDate);isDate(options)?opts.setDefaultDate?self.setDate(options,!0):self.gotoDate(options):self.gotoDate(new Date),opts.bound?(this.hide(),self.el.className+=" is-bound",addEvent(opts.trigger,"click",self._onInputClick),addEvent(opts.trigger,"focus",self._onInputFocus),addEvent(opts.trigger,"blur",self._onInputBlur)):this.show()}var hasMoment="function"==typeof moment,hasEventListeners=!!window.addEventListener,document=window.document,sto=window.setTimeout,defaults={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},renderDayName=function(opts,day,abbr){for(day+=opts.firstDay;7<=day;)day-=7;return(abbr?opts.i18n.weekdaysShort:opts.i18n.weekdays)[day]};return Pikaday.prototype={config:function(options){this._o||(this._o=extend({},defaults,!0));var options=extend(this._o,options,!0),nom=(options.isRTL=!!options.isRTL,options.field=options.field&&options.field.nodeName?options.field:null,options.theme="string"==typeof options.theme&&options.theme?options.theme:null,options.bound=!!(void 0!==options.bound?options.field&&options.bound:options.field),options.trigger=options.trigger&&options.trigger.nodeName?options.trigger:options.field,options.disableWeekends=!!options.disableWeekends,options.disableDayFn="function"==typeof options.disableDayFn?options.disableDayFn:null,parseInt(options.numberOfMonths,10)||1);return options.numberOfMonths=4<nom?4:nom,isDate(options.minDate)||(options.minDate=!1),isDate(options.maxDate)||(options.maxDate=!1),options.minDate&&options.maxDate&&options.maxDate<options.minDate&&(options.maxDate=options.minDate=!1),options.minDate&&this.setMinDate(options.minDate),options.maxDate&&this.setMaxDate(options.maxDate),isArray(options.yearRange)?(nom=(new Date).getFullYear()-10,options.yearRange[0]=parseInt(options.yearRange[0],10)||nom,options.yearRange[1]=parseInt(options.yearRange[1],10)||nom):(options.yearRange=Math.abs(parseInt(options.yearRange,10))||defaults.yearRange,100<options.yearRange&&(options.yearRange=100)),options},toString:function(format){return format=format||this._o.format,isDate(this._d)?this._o.toString?this._o.toString(this._d,format):hasMoment?moment(this._d).format(format):this._d.toDateString():""},getMoment:function(){return hasMoment?moment(this._d):null},setMoment:function(date,preventOnSelect){hasMoment&&moment.isMoment(date)&&this.setDate(date.toDate(),preventOnSelect)},getDate:function(){return isDate(this._d)?new Date(this._d.getTime()):null},setDate:function(date,preventOnSelect){if(!date)return this._d=null,this._o.field&&(this._o.field.value="",fireEvent(this._o.field,"change",{firedBy:this})),this.draw();var min,max;"string"==typeof date&&(date=new Date(Date.parse(date))),isDate(date)&&(min=this._o.minDate,max=this._o.maxDate,isDate(min)&&date<min?date=min:isDate(max)&&max<date&&(date=max),this._d=new Date(date.getTime()),setToStartOfDay(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),"pd-dealership-date"==this._o.field.id&&(this._o.field.value=""),"true"==this._o.field.getAttribute("read-format")&&(this._o.field.value=convertDate(this._d)),fireEvent(this._o.field,"change",{firedBy:this})),preventOnSelect||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate()))},gotoDate:function(date){var firstVisibleDate,lastVisibleDate,visibleDate,newCalendar=!0;isDate(date)&&(this.calendars&&(firstVisibleDate=new Date(this.calendars[0].year,this.calendars[0].month,1),lastVisibleDate=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),visibleDate=date.getTime(),lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1),lastVisibleDate.setDate(lastVisibleDate.getDate()-1),newCalendar=visibleDate<firstVisibleDate.getTime()||lastVisibleDate.getTime()<visibleDate),newCalendar&&(this.calendars=[{month:date.getMonth(),year:date.getFullYear()}],"right"===this._o.mainCalendar)&&(this.calendars[0].month+=1-this._o.numberOfMonths),this.adjustCalendars())},adjustDate:function(sign,days){var newDay,day=this.getDate()||new Date,days=24*parseInt(days)*60*60*1e3;"add"===sign?newDay=new Date(day.valueOf()+days):"subtract"===sign&&(newDay=new Date(day.valueOf()-days)),this.setDate(newDay)},adjustCalendars:function(){this.calendars[0]=adjustCalendar(this.calendars[0]);for(var c=1;c<this._o.numberOfMonths;c++)this.calendars[c]=adjustCalendar({month:this.calendars[0].month+c,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(month){isNaN(month)||(this.calendars[0].month=parseInt(month,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(year){isNaN(year)||(this.calendars[0].year=parseInt(year,10),this.adjustCalendars())},setMinDate:function(value){value instanceof Date?(setToStartOfDay(value),this._o.minDate=value,this._o.minYear=value.getFullYear(),this._o.minMonth=value.getMonth()):(this._o.minDate=defaults.minDate,this._o.minYear=defaults.minYear,this._o.minMonth=defaults.minMonth,this._o.startRange=defaults.startRange),this.draw()}
355,setMaxDate:function(value){value instanceof Date?(setToStartOfDay(value),this._o.maxDate=value,this._o.maxYear=value.getFullYear(),this._o.maxMonth=value.getMonth()):(this._o.maxDate=defaults.maxDate,this._o.maxYear=defaults.maxYear,this._o.maxMonth=defaults.maxMonth,this._o.endRange=defaults.endRange),this.draw()},setStartRange:function(value){this._o.startRange=value},setEndRange:function(value){this._o.endRange=value},draw:function(force){if(this._v||force){var opts=this._o,force=opts.minYear,maxYear=opts.maxYear,minMonth=opts.minMonth,maxMonth=opts.maxMonth,html="";this._y<=force&&(this._y=force,!isNaN(minMonth))&&this._m<minMonth&&(this._m=minMonth),this._y>=maxYear&&(this._y=maxYear,!isNaN(maxMonth))&&this._m>maxMonth&&(this._m=maxMonth);for(var randId="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),c=0;c<opts.numberOfMonths;c++)html+='<div class="pika-lendar" id="'+c+'">'+((instance,c,year,month,refYear,randId)=>{for(var j,monthHtml,yearHtml,opts=instance._o,isMinYear=year===opts.minYear,isMaxYear=year===opts.maxYear,randId='<div id="'+randId+'" class="pika-title" role="heading" aria-live="assertive">',prev=!0,next=!0,arr=[],i=0;i<12;i++)arr.push('<option value="'+(year===refYear?i-c:12+i-c)+'"'+(i===month?' selected="selected"':"")+(isMinYear&&i<opts.minMonth||isMaxYear&&i>opts.maxMonth?'disabled="disabled"':"")+">"+opts.i18n.months[i]+"</option>");for(monthHtml='<div class="pika-label">'+opts.i18n.months[month]+'<select class="pika-select pika-select-month" tabindex="-1">'+arr.join("")+"</select></div>",j=isArray(opts.yearRange)?(i=opts.yearRange[0],opts.yearRange[1]+1):(i=year-opts.yearRange,1+year+opts.yearRange),arr=[];i<j&&i<=opts.maxYear;i++)i>=opts.minYear&&arr.push('<option value="'+i+'"'+(i===year?' selected="selected"':"")+">"+i+"</option>");return yearHtml='<div class="pika-label">'+year+opts.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+arr.join("")+"</select></div>",opts.showMonthAfterYear?randId+=yearHtml+monthHtml:randId+=monthHtml+yearHtml,isMinYear&&(0===month||opts.minMonth>=month)&&(prev=!1),isMaxYear&&(11===month||opts.maxMonth<=month)&&(next=!1),0===c&&(randId+='<button class="pika-prev'+(prev?"":" is-disabled")+'" type="button">'+opts.i18n.previousMonth+"</button>"),c===instance._o.numberOfMonths-1&&(randId+='<button class="pika-next'+(next?"":" is-disabled")+'" type="button">'+opts.i18n.nextMonth+"</button>"),randId+"</div>"})(this,c,this.calendars[c].year,this.calendars[c].month,this.calendars[0].year,randId)+this.render(this.calendars[c].year,this.calendars[c].month,randId)+"</div>";this.el.innerHTML=html,opts.bound&&"hidden"!==opts.field.type&&sto(function(){opts.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),opts.bound&&opts.field.setAttribute("aria-label",opts.ariaLabel)}},adjustPosition:function(){var field,pEl,width,height,viewportWidth,viewportHeight,scrollTop,left,top,clientRect;if(!this._o.container){if(this.el.style.position="absolute",pEl=field=this._o.trigger,width=this.el.offsetWidth,height=this.el.offsetHeight,viewportWidth=window.innerWidth||document.documentElement.clientWidth,viewportHeight=window.innerHeight||document.documentElement.clientHeight,scrollTop=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,"function"==typeof field.getBoundingClientRect)left=(clientRect=field.getBoundingClientRect()).left+window.pageXOffset,top=clientRect.bottom+window.pageYOffset;else for(left=pEl.offsetLeft,top=pEl.offsetTop+pEl.offsetHeight;pEl=pEl.offsetParent;)left+=pEl.offsetLeft,top+=pEl.offsetTop;(this._o.reposition&&viewportWidth<left+width||-1<this._o.position.indexOf("right")&&0<left-width+field.offsetWidth)&&(left=left-width+field.offsetWidth),(this._o.reposition&&viewportHeight+scrollTop<top+height||-1<this._o.position.indexOf("top")&&0<top-height-field.offsetHeight)&&(top=top-height-field.offsetHeight),this.el.style.left=left+"px",this.el.style.top=top+"px"}},render:function(year,month,randId){for(var opts=this._o,now=new Date,days=getDaysInMonth(year,month),before=new Date(year,month,1).getDay(),data=[],row=[],previousMonth=(setToStartOfDay(now),0<opts.firstDay&&(before-=opts.firstDay)<0&&(before+=7),0===month?11:month-1),nextMonth=11===month?0:month+1,yearOfPreviousMonth=0===month?year-1:year,yearOfNextMonth=11===month?year+1:year,daysInPreviousMonth=getDaysInMonth(yearOfPreviousMonth,previousMonth),cells=days+before,after=cells;7<after;)after-=7;cells+=7-after;for(var isWeekSelected=!1,i=0,r=0;i<cells;i++){var day=new Date(year,month,i-before+1),isSelected=!!isDate(this._d)&&compareDates(day,this._d),isToday=compareDates(day,now),hasEvent=-1!==opts.events.indexOf(day.toDateString()),isEmpty=i<before||days+before<=i,dayNumber=i-before+1,monthNumber=month,yearNumber=year,isStartRange=opts.startRange&&compareDates(opts.startRange,day),isEndRange=opts.endRange&&compareDates(opts.endRange,day),isInRange=opts.startRange&&opts.endRange&&opts.startRange<day&&day<opts.endRange,dayNumber=(isEmpty&&(yearNumber=i<before?(dayNumber=daysInPreviousMonth+dayNumber,monthNumber=previousMonth,yearOfPreviousMonth):(dayNumber-=days,monthNumber=nextMonth,yearOfNextMonth)),{day:dayNumber,month:monthNumber,year:yearNumber,hasEvent:hasEvent,isSelected:isSelected,isToday:isToday,isDisabled:opts.minDate&&day<opts.minDate||opts.maxDate&&day>opts.maxDate||opts.disableWeekends&&(date=>0===(date=date.getDay())||6===date)(day)||opts.disableDayFn&&opts.disableDayFn(day),isEmpty:isEmpty,isStartRange:isStartRange,isEndRange:isEndRange,isInRange:isInRange,showDaysInNextAndPreviousMonths:opts.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:opts.enableSelectionDaysInNextAndPreviousMonths});opts.pickWholeWeek&&isSelected&&(isWeekSelected=!0),row.push((opts=>{var arr=[],ariaSelected="false";if(opts.isEmpty){if(!opts.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';arr.push("is-outside-current-month"),opts.enableSelectionDaysInNextAndPreviousMonths||arr.push("is-selection-disabled")}return opts.isDisabled&&arr.push("is-disabled"),opts.isToday&&arr.push("is-today"),opts.isSelected&&(arr.push("is-selected"),ariaSelected="true"),opts.hasEvent&&arr.push("has-event"),opts.isInRange&&arr.push("is-inrange"),opts.isStartRange&&arr.push("is-startrange"),opts.isEndRange&&arr.push("is-endrange"),'<td data-day="'+opts.day+'" class="'+arr.join(" ")+'" aria-selected="'+ariaSelected+'"><button class="pika-button pika-day" type="button" data-pika-year="'+opts.year+'" data-pika-month="'+opts.month+'" data-pika-day="'+opts.day+'">'+opts.day+"</button></td>"})(dayNumber)),7==++r&&(opts.showWeekNumber&&row.unshift((monthNumber=i-before,yearNumber=month,hasEvent=year,isToday=void 0,isToday=new Date(hasEvent,0,1),'<td class="pika-week">'+Math.ceil(((new Date(hasEvent,yearNumber,monthNumber)-isToday)/864e5+isToday.getDay()+1)/7)+"</td>")),data.push(((days,isRTL,pickWholeWeek,isRowSelected)=>'<tr class="pika-row'+(pickWholeWeek?" pick-whole-week":"")+(isRowSelected?" is-selected":"")+'">'+(isRTL?days.reverse():days).join("")+"</tr>")(row,opts.isRTL,opts.pickWholeWeek,isWeekSelected)),r=0,isWeekSelected=!(row=[]))}return renderTable(opts,data,randId)},isVisible:function(){return this._v},show:function(){var el,cn;this.isVisible()||(this._v=!0,this.draw(),el=this.el,cn="is-hidden",el.className=(el=(" "+el.className+" ").replace(" "+cn+" "," ")).trim?el.trim():el.replace(/^\s+|\s+$/g,""),this._o.bound&&(addEvent(document,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var el,cn,v=this._v;!1!==v&&(this._o.bound&&removeEvent(document,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",el=this.el,hasClass(el,cn="is-hidden")||(el.className=""===el.className?cn:el.className+" "+cn),this._v=!1,void 0!==v)&&"function"==typeof this._o.onClose&&this._o.onClose.call(this)},destroy:function(){var opts=this._o;this.hide(),removeEvent(this.el,"mousedown",this._onMouseDown,!0),removeEvent(this.el,"touchend",this._onMouseDown,!0),removeEvent(this.el,"touchstart",this._onTouchStart,!0),removeEvent(this.el,"change",this._onChange),opts.keyboardInput&&removeEvent(document,"keydown",this._onKeyChange),opts.field&&(removeEvent(opts.field,"change",this._onInputChange),opts.bound)&&
355(removeEvent(opts.trigger,"click",this._onInputClick),removeEvent(opts.trigger,"focus",this._onInputFocus),removeEvent(opts.trigger,"blur",this._onInputBlur)),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},Pikaday}); 356let encryptCode="l0ckIt!",internationalTravelAnalytics={formatDate:function(dateToFormat){let dateToReturn=dateToFormat;if(dateToFormat){let d=new Date(dateToFormat),month=""+(d.getMonth()+1),day=""+d.getDate(),year=d.getFullYear();month.length<2&&(month="0"+month),day.length<2&&(day="0"+day),dateToReturn=[year,month,day].join("/")}return dateToReturn},getQuoteClickCapture:function(flowtype,countries,startDate,endDate,geography){var url=new URL(window.location.href),url=new URLSearchParams(url.search),countries={countries:countries,startDate:internationalTravelAnalytics.formatDate(startDate),endDate:internationalTravelAnalytics.formatDate(endDate),utm_source:url.get("utm_source"),utm_medium:url.get("utm_medium"),utm_campaign:url.get("utm_campaign"),utm_content:url.get("utm_content")};Moengage.track_event("Get Quote",countries)},ageSelectionCapture:function(ages){Moengage.track_event("TravellerDOB",{ages:ages})},birthDateCapture:function(birthDates){for(let i=0;i<birthDates.length;i++){var date=birthDates[i].split("/");0==i?Moengage.add_birthday(new Date(date[2],date[1]-1,date[0])):Moengage.add_user_attribute(`member${i}DOB`,new Date(date[2],date[1]-1,date[0]))}},InfoToolTipClick:function(value){digitalData.customLinkName=value,_satellite.track("travel_info_tool_tip")},sumInsuredPlan:function(sumInsured,coverType){digitalData.travel.sumInsured=sumInsured,digitalData.travel.coverType=coverType,digitalData.lob="travel",_satellite.track("travel_suminsured_plan")},sameCoverClick:function(){_satellite.track("travel_same_cover")},upgradedCoverClick:function(value){_satellite.track("travel_upgraded_cover")},coverageSelectionCapture:function(coverType,coverageCost,sumInsured){Moengage.track_event("PlanPage",{premium:coverageCost})},preExistingDiseaseSelection:function(diseases){_satellite.track("Coverage_continue")},chooseAddonCapture:function(addonEvent){digitalData.coverage.addOn=addonEvent,_satellite.track("coverage_addOn_chosen")},communicationDetailsCapture:function(coverType,mobileNumber,emailAddress){digitalData.travel.coverType=coverType,digitalData.coverage.mobileNumber=internationalTravelAnalytics.encrypt(mobileNumber),digitalData.coverage.emailAddress=internationalTravelAnalytics.encrypt(emailAddress);coverType="mobileNo="+mobileNumber+"&emailId="+emailAddress,mobileNumber=$().crypt({method:"md5",source:emailAddress.toLowerCase()});localStorage.setItem("hashedEmailTravel",mobileNumber),digitalData.user.hashedEmail=mobileNumber,$.ajax({type:"POST",url:"/bin/godigit/buyflow/campaign",data:coverType,success:function(data){400!=data.STATUS_CODE&&(localStorage.setItem("cryptedIdFromCampaignTravel",data.RESPONSE),digitalData.user.cryptedId=localStorage.getItem("cryptedIdFromCampaignTravel"))}}),_satellite.track("coverage_mobile_email_submit")},paymentClickedCapture:function(sumInsured,coverType,paymentPrice,appID,policyNumber,mobileNumber,emailAddress,flowName,homeInsuranceData){Moengage.track_event("Movetopayment",{premium:paymentPrice})},paymentSuccessCapture:function(coverType,paymentPrice){digitalData.travel.coverType=coverType,digitalData.coverage.price=paymentPrice,null!=localStorage.getItem("cryptedIdFromCampaignTravel")&&(digitalData.user.cryptedId=localStorage.getItem("cryptedIdFromCampaignTravel")),null!=localStorage.getItem("hashedEmailTravel")&&(digitalData.user.hashedEmail=localStorage.getItem("hashedEmailTravel"))},travellerDetailsFormSubmitCapture:function(coverType,travellerDetails,appID,policyNumber,mobileNumber,emailAddress,flowName){digitalData.travel.coverType=coverType,digitalData.travel.appid=appID,digitalData.thankYouPage.policyNumber=policyNumber,digitalData.travel.flowType=flowName,digitalData.coverage.mobileNumber=internationalTravelAnalytics.encrypt(mobileNumber),digitalData.coverage.emailAddress=internationalTravelAnalytics.encrypt(emailAddress);for(var i=0;i<travellerDetails.length;i++)digitalData.travellerDetailsForm.traveller[i]={},digitalData.travellerDetailsForm.traveller[i].fullName=internationalTravelAnalytics.encrypt
356(travellerDetails[i].name),digitalData.travellerDetailsForm.traveller[i].passportNumber=internationalTravelAnalytics.encrypt(travellerDetails[i].passport),digitalData.travellerDetailsForm.traveller[i].nomineeDetails=internationalTravelAnalytics.encrypt(travellerDetails[i].nomineeName),digitalData.travellerDetailsForm.traveller[i].relationship=internationalTravelAnalytics.encrypt(travellerDetails[i].nomineeRelation.label),digitalData.travellerDetailsForm.traveller[i].age=internationalTravelAnalytics.encrypt(travellerDetails[i].age),digitalData.travellerDetailsForm.traveller[i].dateOfBirth=internationalTravelAnalytics.encrypt(travellerDetails[i].dateOfBirth),digitalData.travellerDetailsForm.traveller[i].city=internationalTravelAnalytics.encrypt(travellerDetails[i].city)},policyPurchasedCapture:function(policyNumber,tripDuration){digitalData.thankYouPage.policyNumber=policyNumber,digitalData.thankYouPage.tripDuration=tripDuration,null!=localStorage.getItem("cryptedIdFromCampaignTravel")&&(digitalData.user.cryptedId=localStorage.getItem("cryptedIdFromCampaignTravel")),null!=localStorage.getItem("hashedEmailTravel")&&(digitalData.user.hashedEmail=localStorage.getItem("hashedEmailTravel")),_satellite.track("purchase_done")},onLoadBuyFlowCapture:function(){_satellite.track("review_payment_load")},createQuoteSuccessCapture:function(appID,policyNumber,sumInsured,mobileNumber,emailAddress,flowName){digitalData.travel.appid=appID,digitalData.travel.sumInsured=sumInsured,digitalData.thankYouPage.policyNumber=policyNumber,digitalData.travel.flowType=flowName,digitalData.coverage.mobileNumber=internationalTravelAnalytics.encrypt(mobileNumber),digitalData.coverage.emailAddress=internationalTravelAnalytics.encrypt(emailAddress),_satellite.track("appIDGenerated")},getQuoteFormErrorCapture:function(error){digitalData.getQuoteForm.error=error},captureFormError:function(error){_satellite.track("form-error"),digitalData.form.error=error},formErrors:function(){let i=0;var helpBlocks=document.querySelectorAll(".help-block");let errors="";for(;i<helpBlocks.length;)""!=helpBlocks[i].innerText&&(errors+=(errors?"|":"")+helpBlocks[i].innerText),i++},serviceError:function(errorName,url,response){digitalData.webService.errorName=errorName,digitalData.page.webServiceError.name=errorName,digitalData.page.webServiceError.url=url,digitalData.page.webServiceError.response=JSON.stringify(response),_satellite.track("web_service_error")},encrypt:function(plainText){return AesCtr.encrypt(plainText,encryptCode,256)},decrypt:function(plainText){let encrText="";return encrText=plainText?AesCtr.decrypt(plainText,encryptCode,256):encrText},captureTravellerDetails:function(travellerDetails,mobileNumber,emailId){let allNames="";for(let i=0;i<travellerDetails.length;i++)allNames+=travellerDetails[i].name,i<travellerDetails.length-1&&(allNames+=",");Moengage.add_user_name(allNames),Moengage.add_email(emailId),Moengage.add_mobile("91"+mobileNumber.toString()),Moengage.add_unique_user_id(""),Moengage.track_event("Summarypage")},paymentFaild:function(){_satellite.track("pay_gate_failed")},blacklistCountryCapture:function(country){digitalData.getQuoteForm.country=country,digitalData.geographiesvisiting="",digitalData.flowtype="Country",digitalData.page.pageInfo.platform="travel",digitalData.lob="travel",_satellite.track("blacklist_country_error")},travelDetails:function(country,geography,blacklist,startDate,endDate){Moengage.track_event("Travel Details",{"Geography Selected":geography,"Countries Selected":country,"Blacklisted Country Selected":blacklist,"Start Date":startDate+"T00:00:00.000Z","End Date":endDate+"T00:00:00.000Z"})},ariaChatIconClicked:function(policyNumber){digitalData.page.pageInfo.platform="Travel",digitalData.flowtype="travel",digitalData.quoteid=policyNumber,_satellite.track("ariachat_clicked")}}; 357var JSEncrypt,digitapp=angular.module("digitapp",[]),params={},encranalytics="l0ckIt!",mobileDevice="",url=new window.URL(window.location.href),searchParams=new URLSearchParams(url.search),cookieDuration=6048e5,cookieSecureFlag=!0,sameSite="Lax",mobileDevice=!!window.matchMedia("only screen and (max-width: 760px)").matches,mergeObjects=(obj,src)=>{for(var key in src)src.hasOwnProperty(key)&&(obj[key]=src[key]);return obj},getParameter=function(name){return new URLSearchParams(window.location.search).get(name)},encrypt=plainText=>AesCtr.encrypt(plainText,encranalytics,256),regstrationNumPattern=stateCode=>"DL"===stateCode?/^[D][L][0-9]{1,2}[A-Z]{1,3}[0-9]{1,4}$/:"BH"===stateCode?/^[2-9]{1}[0-9]{1}[B][H][0-9]{1,4}[A-Z]{1,2}/:/^[A-Z]{2}[0-9]{1,2}[A-Z0-9]{1,2}[0-9]{1,4}$/,getMinLengthForRegNo=stateCode=>"DL"===stateCode?7:6,getMaxLengthForRegNo=stateCode=>"DL"===stateCode?11:10,validateRegistrationNumberCrossProduct=(value,product)=>{product=((new Date).getFullYear()+(!product||"twoWheeler"!==product&&"Bike"!==product?1:0)).toString().substr(2,2);return!(!regstrationNumPattern(getStateCode(value)).test(value)||!("BH"!==getStateCode(value)||20<value.substr(0,2)&&value.substr(0,2)<=product))&&value.length>=getMinLengthForRegNo(getStateCode(value))&&value.length<=getMaxLengthForRegNo(getStateCode(value))};function getStateCode(value){var stateCode=value.substr(0,2);return stateCode.match(/^[A-Z]{2}/)?stateCode:value.substr(2,2)}function getTimeStamp(){return(new Date).getTime()}var workingDataNew={};function getCookie(cname){let name=cname+"=",decodedCookie=decodeURIComponent(document.cookie),ca=decodedCookie.split(";"),visitorId="";for(var i=0;i<ca.length;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1);0==c.indexOf(name)&&(visitorId=c.substring(name.length,c.length))}return"visitorId"!==cname||visitorId&&"7C5.2.0"!==visitorId&&"5.2.0"!==visitorId||(visitorId=generateQuickGuid().toUpperCase(),cookie.write("visitorId",encodeURIComponent(visitorId),cookieDuration,"/","",cookieSecureFlag,sameSite)),visitorId}
357var manageWrapping={wrapContent:function(text){return CryptoJS.AES.encrypt(text,getDataValue("ie_d_456")).toString()},unwrapContent:function(text){return text?CryptoJS.AES.decrypt(text,getDataValue("ie_d_456").trim()).toString(CryptoJS.enc.Utf8):""}};async function getProductsData(){var data={timestamp:(new Date).getTime()};fetch(window.location.origin+"/bin/godigit/configuration?"+(new Date).getTime(),{method:"POST",data:data}).then(response=>response.json()).then(res=>{res&&(sessionStorage.getItem("dft_99_sdf_43_p")||(sessionStorage.setItem(dynamicCodeSetter,workingDataNew.encodeStoredValue(JSON.stringify(res))),sessionStorage.setItem("dft_99_sdf_43_p",dynamicCodeSetter)),getDataValue("ie_d_456"))&&setData()}).catch(error=>{console.error("Error fetching configuration:",error)})}function getResponse(res){var mod=new JSEncrypt,dataValue=res.ztr_56,obj=(mod.setPrivateKey(dataValue),{});return Object.keys(res).forEach(key=>{var value=mod.decrypt(res[key]);obj[key]=value}),obj}function getDataValue(paramName){var storedKey;if(sessionStorage.getItem("dft_99_sdf_43_p"))return storedKey=sessionStorage.getItem("dft_99_sdf_43_p"),getResponse(JSON.parse(workingDataNew.dismantle(sessionStorage.getItem(storedKey))))[paramName];{let details=JSON.parse(workingDataNew.dismantle(sessionStorage.getItem(dynamicCodeSetter))),data=getResponse(details);return data[paramName]}}rawResponse=function(value){return value},getProductsData();var cityDivObj,motorCityList,motorCitesList,motorPinCodeList,digitCitiesJson={};function callCityService(){var cityUrl=serviceHost+"/residential/cities?"+(new Date).getTime(),rto=new XMLHttpRequest;rto.open("GET",cityUrl),rto.onload=function(){motorPinCodeList=200==this.status?(motorCityList=JSON.parse(manageWrapping.unwrapContent(this.response)),motorCitesList=Object.keys(motorCityList).map(function(v){return v.toLowerCase()}),Object.keys(motorCityList).map(function(key){return motorCityList[key]})):(motorCityList=digitCitiesJson,motorCitesList=Object.keys(motorCityList).map(function(v){return v.toLowerCase()}),Object.keys(motorCityList).map(function(key){return vm.cityPincodeJson[key]}))},rto.send()}function applsFlyerFlow(event_name){(appsFlyerData={}).event_name=event_name,appsFlyerData.data={},window.location.href.includes("platform=ios")||window.webkit?iosDevice(appsFlyerData):(window.location.href.includes("platform=android")||window.ReactNativeWebView)&&androidDevice(appsFlyerData)}function androidDevice(appsFLyer_data){window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(appsFLyer_data)),console.log("Android Device")}function iosDevice(appsFLyer_data){window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.ReactNativeWebView&&window.webkit.messageHandlers.ReactNativeWebView.postMessage(JSON.stringify(appsFLyer_data)),console.log("IOS Device")}function generateQuickGuid(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}document.getElementById("city_list")&&(cityDivObj=document.getElementById("city_list").getAttribute("data-cities"),digitCitiesJson=JSON.parse(cityDivObj)),setTimeout(()=>{(location.href===location.host||"/"===location.pathname||location.href.includes("car")||location.href.includes("bike")||location.href.includes("two")||location.href.includes("commercial")||location.href.includes("cv")||location.href.includes("campaigns")||location.href.includes("general")||location.host.includes("4502")&&(location.href.includes("homepage")||location.href.includes("general")))&&callCityService()},0);var cookie={write:function(name,value,duration,path="/",domain,secure,sameSite){let cookieString=name+"="+value;duration&&(cookieString+="; expires="+duration),cookieString+="; path="+path,domain&&(cookieString+="; domain="+domain),secure&&(cookieString+="; secure"),sameSite&&(cookieString+="; SameSite="+sameSite),document.cookie=cookieString},read:function(name){for(var c,nameEQ=name+"=",ca=document.cookie.split(";"),i=0;i<ca.length;i++){for(c=ca[i];" "===c.charAt(0);)c=c.substring(1,c.length);if(0===c.indexOf(nameEQ))return c.substring(nameEQ.length,c.length)}return""},delete:function(name){document.cookie=name+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;",document.cookie=name+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}};function deleteCookie(cookieName){cookie.delete(cookieName)}function upperCase(e){return"string"==typeof e?e.toString().toUpperCase():e}function readCookieForDirectHomePage(){return document.cookie}var cookie_val,visitorarray,visitorId_val,cookie_visitorid="AMCV_24CD3E23599BF2750A495D38%40AdobeOrg",EnquiryID="DIRECT-"+Math.floor(65536*Math.random()).toString(16);function ReadCookie(){var allcookies=document.cookie;cookiearray=allcookies.split(";");for(var i=0;i<cookiearray.length;i++){var cookieNameFromArray=cookiearray[i].split("=")[0]?cookiearray[i].split("=")[0].trim():"";value=cookiearray[i].split("=")[1]?cookiearray[i].split("=")[1].trim():"",cookieNameFromArray==cookie_visitorid&&(visitorarray=value.split("%"),cookie_val=visitorarray[4].slice(25),EnquiryID+="-"+cookie_val)}}function maskedValue(val){let mask="";if(val){for(let i=0;i<val.toString().length-1;i+=1)mask+="*";return val.toString().replace(val.toString().substring(2,val.toString().length-2),mask)}return""}var blockedMobNumber=function(mobileNo){return"7420985920"==mobileNo||"8828018034"==mobileNo||"9172326444"==mobileNo||"9320000567"==mobileNo||"9323397567"==mobileNo||"9529713318"==mobileNo||"9561242520"==mobileNo||"9607800567"==mobileNo||"9820027567"==mobileNo||"9999999999"==mobileNo||"9914760016"==mobileNo};function updateCookiesForRegNoCV(regNo){deleteCookie("digitQf_regNo_cv"),cookie.write("digitQf_regNo_cv",encodeURIComponent(regNo.toString()),cookieDuration,"/","",cookieSecureFlag,sameSite)}
357function vahanRequestBody(regNumber,isAgentPartnerFlow,productCode,mobileNumber){getParameter("imdKey");var imdCode=wrapContent("1000651"),webUserId="partner"===getParameter("utm_source")?"partner":"",regNumber=isAgentPartnerFlow?regNumber:wrapContent(upperCase(regNumber)),isAgentPartnerFlow=isAgentPartnerFlow?"":wrapContent(mobileNumber);return{source:"Direct Website",age:1,product:"All",make:"Maruti",breakInFlag:"All",registrationNumber:regNumber,businessType:3,imdCode:imdCode,webUserId:webUserId,visitorId:getCookie("visitorId")+"-1-"+productCode,mobileNumber:isAgentPartnerFlow}}function cityNameMatch(city){return"Bangalore"===city?"Bengaluru":"Bangalore Rural"===city?"Bengaluru Rural":city}function updateCookiesForMotor(cityName){deleteCookie("digitQf_city"),cookie.write("digitQf_city",encodeURIComponent(cityName.toString()),cookieDuration,"/","",cookieSecureFlag,sameSite)}function vehMainCodeValidation(vehCode,module){var url=new URL(window.location.href);new URLSearchParams(url.search).get("reg_no")?(url="",url="Car"!=module||"12"!=vehCode&&"13"!=vehCode?"Car"!=module||"14"!=vehCode&&"15"!=vehCode&&"16"!=vehCode?"Bike"==module&&"11"==vehCode?"The registration number you entered is of a Private Car and not for a two Wheeler.":"Bike"!=module||"14"!=vehCode&&"15"!=vehCode&&"16"!=vehCode?"Uh oh! Something went wrong, no response received. Please contact our nearest office.":"The registration number you entered is of a Commercial Vehicle and not for a two Wheeler.":"The registration number you entered is of a Commercial Vehicle and not for a Private Car.":"The registration number you entered is of a two wheeler and not for a Private Car .",document.getElementById("loadingicon").style.display="block",document.getElementById("motor-home-section").style.display="block",document.getElementById("service-error").style.display="block",document.getElementById("errorContent").innerText=url):document.querySelector(".regDateInValid"+module).innerText="11"===vehCode?"This is a private car number. Try again.":"12"===vehCode||"13"===vehCode?"This is a two-wheeler number. Please try again.":"14"===vehCode||"15"===vehCode||"16"===vehCode?"This is a commercial vehicle number. Try again.":"No response recieved. Please try again."}function checkIfBharatReg(value){return"BH"===getStateCode(value).toUpperCase()&&validateRegistrationNumberCrossProduct(value)}function dateForMateing(date){return(moment(date,"YYYY-MM-DD",!0).isValid()?moment(date,"YYYY-MM-DD"):moment(date,"DD-MMM-YYYY",!0).isValid()?moment(date,"DD-MMM-YYYY"):moment(date,"DD-MM-YYYY",!0).isValid()?moment(date,"DD-MM-YYYY"):moment(date,"DD/MM/YYYY",!0).isValid()?moment(date,"DD/MM/YYYY"):moment(date)).format("YYYY-MM-DD")}function getFirstLastName(fullName){var nameArr,fullName=fullName.replace(/[^a-zA-Z\s]/g,"").trim();return 1<fullName.split(" ").length?{firstName:(nameArr=fullName.split(/\s+/)).slice(0,-1).join(" "),lastName:nameArr.pop()}:{firstName:fullName,lastName:"."}}function getDateDiffInYears(firstDate,secondDate){firstDate=new Date(firstDate);let yearsDiff=(secondDate=new Date(secondDate)).getFullYear()-firstDate.getFullYear();return(secondDate.getMonth()<firstDate.getMonth()||secondDate.getMonth()===firstDate.getMonth()&&secondDate.getDate()<firstDate.getDate())&&yearsDiff--,yearsDiff}var trimPolicyNumber=function(policyNum){var trimmedPolicy=policyNum.split("/")[0];return trimmedPolicy&&10===trimmedPolicy.length?trimmedPolicy:policyNum};function hashSHA264(string){string=(new TextEncoder).encode(string);return crypto.subtle.digest("SHA-256",string).then(hashBuffer=>Array.from(new Uint8Array(hashBuffer)).map(bytes=>bytes.toString(16).padStart(2,"0")).join(""))}function setDynamicCodeInStorage(value){if(value)try{sessionStorage.getItem("gtu_9_3d_dsf")||(sessionStorage.setItem(dynamicCodeStorageKey,value),sessionStorage.setItem("gtu_9_3d_dsf",dynamicCodeStorageKey))}catch(e){}}function getDynamicCodeFromStorage(){try{var storedKey;return sessionStorage.getItem("gtu_9_3d_dsf")?(storedKey=sessionStorage.getItem("gtu_9_3d_dsf"),sessionStorage.getItem(storedKey)||""):sessionStorage.getItem(dynamicCodeStorageKey)||""}catch(e){return""}}function callDataLayerFunctions(event,phoneNumber,regFormName,lob,email){hashSHA264(phoneNumber).then(mobnum=>{callDataLayerAnalytics({event:"LeadSubmit",form_name:regFormName,PolicyType:lob,email:email||"",phoneNumber:mobnum||""})})}function callDataLayerAnalytics(layerData){customPageViewdataLayerGoogleAnalytics(layerData)}function checkForVisitorIdError(error){return error&&error.data&&error.data.errorMessage&&error.data.errorMessage.toLowerCase().includes("visitor id is a mandatory param")}function fetchScriptData(){fetch("/bin/godigit/s_clientlibzstreams?"+(new Date).getTime(),{credentials:"same-origin"}).then(response=>response.text()).then(data=>setDynamicCodeInStorage(data&&data.trim())).catch(error=>console.error("Error:",error))}setTimeout(function(){ReadCookie()}
357,2e3),getFlowTypeForMotor=function(data){return data.utmParams.utmCampaign&&"hero"===data.utmParams.utmCampaign.toLowerCase()?"heroFincorp":"New Flow"},getUtmParaMeter=function(){return{utmSource:getParameter("utm_source")||"",utmMedium:getParameter("utm_medium")||"",utmCampaign:getParameter("utm_campaign")||"",utmContent:getParameter("utm_content")||"",utmTerm:getParameter("utm_term")||"",utmValue:getParameter("utm_value")||"",imdCode:getParameter("imdKey")||""}},getFlowParam=function(){return getParameter("flow")||""},redirectToFourWheelerMobileFlow=function(){location.href=window.location.origin+"/motor-insurance/car-flow/car-details"+window.location.search},redirectToTwoWheelerMobileFlow=function(){location.href=window.location.origin+"/motor-insurance/bike-flow/bike-details"+window.location.search},redirectToCvMobileFlow=function(){location.href=window.location.origin+"/motor-insurance/cv-flow/cv-details"+window.location.search},checkValidJson=function(jsonString){try{return JSON.parse(jsonString),!0}catch(error){return!1}},getDynamicCode=function(){var dynamicCodeFromStorage=getDynamicCodeFromStorage();return dynamicCodeFromStorage||((dynamicCodeFromStorage=(dynamicCodeFromStorage=decodeURIComponent(document.cookie).split(";").filter(a=>a.match("_ga_dckungitdihareuescgi_"))[0])&&dynamicCodeFromStorage.split("=")[1].trim())&&setDynamicCodeInStorage(dynamicCodeFromStorage),dynamicCodeFromStorage)};var partnerLogoObj={hero:{imgLink:"https://d2h44aw7l5xdvz.cloudfront.net/assets/img/heroFuncorp.png",content:"You have been redirected to the website of Go Digit General Insurance Limited to complete the application for insurance solicited by Hero Fincorp Limited, in its capacity as a Corporate Agent."},unimoni:{imgLink:"https://cdn.godigit.com/assets/img/1784116658_WBJGZV2Q_logo.gif",content:"You have been redirected to the website of Go Digit General Insurance Limited to complete the application for insurance solicited by Wizzmoni, in its capacity as a Corporate Agent."},1196990:{imgLink:"https://d2h44aw7l5xdvz.cloudfront.net/assets/icons/Inka-Logo-04.png",content:"You have been redirected to the website of Go Digit General Insurance Limited to complete the application for insurance solicited by INKA, in its capacity as a Corporate Agent."}};function getDateDiffInDays(date){var firstDate=(new Date).getTime(),date=new Date(date);return Math.floor((date-firstDate)/864e5)}function getdateDiffInMonths(firstDate,secondDate){firstDate=new Date(firstDate),secondDate=new Date(secondDate);var firstDateYear=firstDate.getFullYear(),secondDateYear=secondDate.getFullYear(),firstDate=firstDate.getMonth();return secondDate.getMonth()+12*secondDateYear-(firstDate+12*firstDateYear)}function formatPolicyNumber(policyNumber){return policyNumber?"d"===policyNumber.toString().toLowerCase().charAt(0)?trimPolicyNumber(policyNumber):policyNumber:""}function getStartDate(date,numOfYear,isAdd){return date?dateConversion(isAdd?new Date(new Date(date.setFullYear(date.getFullYear()+numOfYear))).setDate(date.getDate()+-1):new Date(new Date(date.setFullYear(date.getFullYear()-numOfYear))).setDate(date.getDate()+1)):""}function dateConversion(inputFormat){function pad(s){return s<10?"0"+s:s}inputFormat=new Date(inputFormat);return[inputFormat.getFullYear(),pad(inputFormat.getMonth()+1),pad(inputFormat.getDate())].join("-")}function setData(data){localStorage.getItem("garbageCollected")||(localStorage.setItem(dynamicGarbageCollector,workingDataNew.encodeStoredValue(getDataValue("ie_d_456")||data)),localStorage.setItem("garbageCollected",dynamicGarbageCollector))}function commonDataLayerFunction(event,lob,title,mobileNumber,email,pincode,agent_name,posp_type_name,flowtype,existing_partner,existing_imd_code){lob={event:event,lob:lob,faq_title:"faq-click"===event?title.textContent:"NA",cta_text:"bottom_navigation_click"===event||"follow_us"===event?title.host:"NA",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",source:window.location.href,phone_number:mobileNumber||"",email:email||"",pincode:pincode||"",agent_name:agent_name||"",posp_type_name:posp_type_name||"",flow_type:flowtype||"",existing_partner:existing_partner||"",existing_imd_code:existing_imd_code||""};customPageViewdataLayerGoogleAnalytics(lob)}function dobWithSlash(event){let dateValue=event.target.value,finalvalue=(dateValue=dateValue.trim()).split("/").join(""),output=finalvalue;1===finalvalue.length&&3<Number(finalvalue)&&(finalvalue="0"+finalvalue);8!==event.keyCode&&37!==event.keyCode&&38!==event.keyCode&&39!==event.keyCode&&40!==event.keyCode&&finalvalue.length<=5&&(1<(finalvalue=3===finalvalue.length&&1<Number(finalvalue.charAt(2))?[finalvalue.slice(0,2),"0",finalvalue.slice(2)].join(""):finalvalue).length&&(output=finalvalue=[finalvalue.slice(0,2),"/",finalvalue.slice(2)].join("")),4<finalvalue.length&&(output=[finalvalue.slice(0,5),"/",finalvalue.slice(5)].join("")),event.target.value=output)}function calculateAge(dob){var[dob,month,year]=dob.split("/").map(Number),year=new Date(year,month-1,dob),month=new Date;let age=month.getFullYear()-year.getFullYear();dob=month.getMonth()-year.getMonth();return(dob<0||0==dob&&month.getDate()<year.getDate())&&age--,age}function convertStrinToJsonResponse(data,headersGetter,status){return data=data&&JSON.parse(manageWrapping.unwrapContent(data))}function convertDateToISONew(dateString){var[dateString,month,year]=dateString.split("/");return year+`-${month}-`+dateString}digitalData={page:{pageInfo:{pageName:""},category:{pageType:"",primaryCategory:""},product:{},footer:{},webServiceError:{}},commercial:{},product:{thirdParty:{},standard:{}},formInfo:{},personalDetailsForm:{previousInsurance:{},carRegistration:{}},thirdParty:{email:{}},standard:{email:{},emailQuote:{},previousPolicy:{},addon:{}},faq:{form:{}},career:{},plan:{callback:{}},thankYouPage:{},cityAbsent:{},newCity:{},notify:{},customisePopup:{},getQuoteForm:{date:{}},traveller:{disease:{}},coverage:{},travellerDetailsForm:{traveller:[]},bike:{getQuote:{},thankYouPage:{},idv:{}},popup:{},emailQuote:{},home:{date:{},coverage:{},personalDetailsForm:{},thankYouPage:{}},tanishq:{invoice:{},detailsForm:{}},blog:{},paytm:{thankYou:{}},seniors:{},renewal:{},travel:{},car:{},webService:{},form:{},user:{},health:{tax:{}}
357,ownerDetails:{},revenue:{},events:"",gmc:{},priceseen:{},crosssale:{},homeinsurance:{}},workingDataNew.encodeStoredValue=function(secret){if(!secret)return"";let nonce=CryptoJS.lib.WordArray.random(4).toString();secret=secret.split("").map((char,index)=>String.fromCharCode(char.charCodeAt(0)^nonce.charCodeAt(index%nonce.length))).join(""),secret={v:2,n:nonce,p:CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(secret)),t:Math.floor(16777216*Math.random()).toString(16)};return""+CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(JSON.stringify(secret)))},workingDataNew.dismantle=function(rawValue){if(!rawValue)return"";try{var payloadJson=CryptoJS.enc.Base64.parse(rawValue).toString(CryptoJS.enc.Utf8);let payload=JSON.parse(payloadJson);return payload&&payload.n&&payload.p?CryptoJS.enc.Base64.parse(payload.p).toString(CryptoJS.enc.Utf8).split("").map((char,index)=>String.fromCharCode(char.charCodeAt(0)^payload.n.charCodeAt(index%payload.n.length))).join(""):""}catch(e){return""}return rawValue};var operatingSystemName="android",userAgentNavigator=navigator.userAgent.toLowerCase(),osMap={android:"android",iphone:"ios",ipad:"ios",win:"windows",mac:"apple",linux:"linux",x11:"unix"};function detectOperatingSystem(){for(var key in osMap)if(-1!==userAgentNavigator.indexOf(key)){operatingSystemName=osMap[key];break}}function camundaPypReqData(lob,regDate,osn,expieryDate){return{variables:{LOB:{value:lob},Age:{value:0===getDateDiffInYears(new Date(regDate),new Date)?(getdateDiffInMonths(new Date(regDate),new Date)/12)?.toFixed(2):parseFloat((getdateDiffInMonths(new Date(regDate),new Date)/12)?.toFixed(1))},OSN:{value:parseInt(osn)||-1},vahan_flow:{value:!!expieryDate},Vehicle_registration_date:{value:regDate||""},insurance_upto:{value:expieryDate||""}},key:"pyp"}}detectOperatingSystem(); 358var dynamicValidationForCarRegistrationNumber={rules:"required|isRegistrationNumberValid|customRegNoError",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter registration number",isRegistrationNumberValid:"Enter valid registration number",customRegNoError:"Invalid registration number. Please try again."}},dynamicValidationForCity={rules:"required|isCityFromList",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter city name",isCityFromList:"Select a city from list"}},mobileNumber={rules:"isMobileNumberValid",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter Mobile Number",isMobileNumberValid:"Sorry, that mobile number looks incorrect"}},pincode={rules:"required|isPincodeValid|isPincodePresent",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter a pincode",isPincodeValid:"Please enter a valid pincode",isPincodePresent:"Sorry, we aren't present in this pincode"}}; 359const motorTwoWheelerInsuranceAnalytics={continueJourneyOnClick:function(mobNumber,email,pinCode,makeModel,plan_type,product_level_2,veh_reg_no,lastVisitedUrl){Moengage.track_event("Continue Journey",{"Mobile Number":mobNumber||"",Email:email||"",pincode:pinCode||"","make model":makeModel||"","Plan Type":plan_type||"","Product Level 2":product_level_2||"",veh_reg_no:veh_reg_no||"",URL:lastVisitedUrl||""})},viewPrice:function(regNumber,mobNumber,productType,flowType){Moengage.track_event("View Prices",{"Reg Number":regNumber||"","Mobile Number":"91"+mobNumber,product:productType,"Product Level 1":"Motor","Product Level 2":"twoWheeler","Product Level 3":"Roll Over",flow_type:flowType,"city,":"",veh_reg_no:regNumber,"Quote No":"","Drop-off url":"",Pincode:"","Policy Expiry":"",Name:"",Make:"",Model:"","Registration date":""}),Moengage.add_user_attribute("user_generation_source","web"),Moengage.add_user_attribute("user_generation_source ",""),Moengage.add_user_attribute("Product Level 1","Motor"),Moengage.add_user_attribute("Product Level 2","twoWheeler"),Moengage.add_user_attribute("Product Level 3","Roll Over"),Moengage.add_user_attribute("city",""),Moengage.add_user_attribute("veh_reg_no",regNumber),Moengage.add_user_attribute("quote_no",""),Moengage.add_user_attribute("pincode",""),Moengage.add_user_attribute("prev_policy_exp",""),Moengage.add_user_attribute("Name",""),Moengage.add_user_attribute("make",""),Moengage.add_user_attribute("model",""),Moengage.add_user_attribute("veh_reg_date","")}};
359digitapp.controller("twoWheelerHomeController",function($scope,$http,$interval){const{wrapContent:wrapContent,unwrapContent:unwrapContent}=manageWrapping;let vm=this;vm.cscPortal="",vm.cscData="",vm.isLoaded=!0,vm.isBotAllow=!1,vm.isPartnerAvailable="partner"===new URLSearchParams(location.search).get("utm_source")||location.pathname.includes("partner"),vm.isMissMatchError=!0,vm.proposalErrorHandled=!1,vm.numberType="";let expieryDate=new Date;expieryDate.setDate(expieryDate.getDate()+5),vm.isValidRegNumber=!0,vm.isFinoPage=!1;var digitCitiesJson;if(vm.showDontKnowFlow=!0,vm.hideBikeLoader=!1,vm.navigationPath=window.location.origin,digitCitiesJson=document.getElementById("city_list")?JSON.parse(document.getElementById("city_list").dataset.cities):"",window.location.href.includes("csccode=")){var url=new URL(window.location.href);vm.code=url.searchParams.get("csccode")||"",vm.cscPortal="CSC",vm.cscData=JSON.parse(localStorage.getItem("cscPartner"))||{}}var getQuoteStickyBike=document.getElementById("getquote-bottom-sticky"),twoWheelerForm=document.getElementById("mainBikeForm");let termValidatorObjBike={rules:"required",container:".input-form-group",feedback:!1,triggers:["focusout","change"],customMessages:{required:"Please accept the T&C"}},twoWheelerFormValidation=new Dominar(twoWheelerForm,{"bike-term-condition":termValidatorObjBike}),isGetQuoteMainFormBike=document.querySelector(".get-quote-main-form");var twoWheelerBottomForm=new Dominar(getQuoteStickyBike,{});let dynamicValidationForRegistrationNumber={rules:"required|isRegistrationNumberValid|isValidRegNumberError|bikeregMissMatch",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter registration number",isRegistrationNumberValid:"Enter valid registration number",isValidRegNumberError:"Invalid registration number. Please try again.",bikeregMissMatch:"This is a "+vm.numberType+" number. Try again."}},dynamicValidationForCity={rules:"required|isCityFromList",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter your city",isCityFromList:"Select a city from list"}},dynamicMerchentOrAngetCode={rules:"min:6|agentCodeValid",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter code",min:"Enter minimum 6 characters",agentCodeValid:"Please enter valid agent code"}};function initCityPincodeSearch(toppixel,residenceCityPincode,residenceCityPincodeInput,residentCities,secondSearchFieldBike){new CustomSearchField({selector:residenceCityPincodeInput,minChars:3,data:residentCities,onSelect:function(event,selected,item){vm.setCityPinCode(selected)},menuClass:secondSearchFieldBike?"scrollbar-thin last-child-search-field":"scrollbar-thin",offsetTop:residenceCityPincode.getBoundingClientRect().bottom-residenceCityPincodeInput.getBoundingClientRect().bottom-toppixel,offsetLeft:residenceCityPincode.getBoundingClientRect().left-residenceCityPincodeInput.getBoundingClientRect().left-1,noResultsResponse:"Sorry, no such city found",maxHeight:secondSearchFieldBike?50:128,borderPosition:secondSearchFieldBike?"bottom":"top"}).init()}Dominar.Validator.registerAsync("bikeregMissMatch",function(value,attribute,parameters,passes){return vm.isMissMatchError?passes(!0):passes(vm.isMissMatchError,"This is a "+vm.numberType+" number. Try again."),vm.isMissMatchError}),Dominar.Validator.register("isRegistrationNumberValid",function(value){return validateRegistrationNumberCrossProduct(value.toString().toUpperCase(),"Bike")&&vm.isValidRegNumber}),Dominar.Validator.register("isValidRegNumberError",function(value){return validateRegistrationNumberCrossProduct(value.toString().toUpperCase(),"Bike")&&vm.isValidRegNumber}),Dominar.Validator.register("isCityFromList",function(value){return(motorCitesList?motorCitesList.indexOf(value.toLowerCase())>-1:vm.citiesList.indexOf(value.toLowerCase())>-1)&&(vm.setCityPinCode(value),!0)}),Dominar.Validator.register("agentCodeValid",function(){return vm.isAgentCodeValid}),vm.capitalizeFirstLetter=function(string){return string.charAt(0).toUpperCase()+string.slice(1)},vm.getUniqueSessionValue=function(){let randomNumber=(new Date).getTime();randomNumber=(randomNumber=encrypt(randomNumber)).replace(/[0-9]/g,""),vm.uniqueSessionValue=randomNumber.replace(/[^a-zA-Z ]/g,"")},vm.showModal=function(id){new Modal($("#"+id)[0]).show()},vm.redirectPage=function(isVahanFailed=!1){return isVahanFailed?(vm.callDataLayerViewPrice(),vm.localStorageValues.servicePending=!0,vm.localStorageValues.noD
359ataFromVahaan=!0,localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),void safeWindowOpen(`/motor-insurance/bike-flow/vehicle-details-page?session=${vm.uniqueSessionValue}`,"_self")):vm.localStorageValues.isMissMatchedFlow?"Car"===vm.localStorageValues.product?void safeWindowOpen(vm.localStorageValues.flowType.registrationNumberFlow?checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber)?`/motor-insurance/car-flow/car-plan-page/city?session=${vm.uniqueSessionValue}`:`/motor-insurance/car-flow/car-plan-page?session=${vm.uniqueSessionValue}`:`/motor-insurance/car-flow/vehicle-details-page?session=${vm.uniqueSessionValue}`,"_self"):"Commercial"===vm.localStorageValues.product?void safeWindowOpen(`/motor-insurance/cv-flow/cv-plan-page?session=${vm.uniqueSessionValue}`,"_self"):void 0:void safeWindowOpen(checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike")&&vm.localStorageValues.flowType.registrationNumberFlow?`/motor-insurance/bike-flow/plan-page/city?session=${this.uniqueSessionValue}`:`/motor-insurance/bike-flow/plan-page?session=${vm.uniqueSessionValue}`,"_self")},vm.setLocalStorageValues=function(){if(vm.mobileDevice&&(vm.localStorageValues.visitorId=getDynamicCode()),searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")&&vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&(vm.localStorageValues.utmParams.utmFlow="DirectPortalPartnerStoreLink"),vm.localStorageValues.flowType.registrationNumberFlow=vm.registrationNumberCardShow&&!checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike"),vm.localStorageValues.flowType.CityFlow=!vm.registrationNumberCardShow,vm.localStorageValues.visitorId=vm.localStorageValues.visitorId||getDynamicCode(),vm.localStorageValues.cityNameList=motorCityList||vm.cityPincodeJson,vm.localStorageValues.flowJourney=vm.registrationNumberCardShow?"reg":vm.localStorageValues.vehicle.isVehicleNew?"new":"city",checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike")&&(vm.localStorageValues.flowType.registrationNumberFlow=vm.registrationNumberCardShow),vm.localStorageValues.vehicle.isVehicleNew||(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy=vm.getCurrentThirdPartyPolicyObj()),checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike")&&vm.localStorageValues.flowType.registrationNumberFlow&&(vm.localStorageValues.servicePending=!0),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.localStorageValues.flowType.registrationNumberFlow)return-1!==vm.getLocalStorageDataIndex()?void vm.motorUpdateProposalApi():void vm.motorProposalApi();setTimeout(function(){vm.redirectPage()},500)},vm.vahaanFailed=function(){vm.callDataLayerViewPrice(),vm.localStorageValues.servicePending=!0,vm.localStorageValues.noDataFromVahaan=!0,localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),safeWindowOpen(`/motor-insurance/bike-flow/vehicle-details-page?session=${vm.uniqueSessionValue}`,"_self")},vm.getmotorDetailsFromProposalData=function(){vm.isDisabled=!0;let url=`${serviceHost}/v2/motor/get/vehicle/fetchproposaldata?${(new Date).getTime()}`;const data={visitorId:vm.localStorageValues.visitorId,proposalId:vm.localStorageValues.proposalNumber},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){if(204==response.status&&(vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.vahaanFailed()),200==response.status){vm.isDisabled=!1;const motorResponse=response.data;if(Object.keys(motorResponse).forEach(ele=>{motorResponse[ele]=unwrapContent(motorResponse[ele])}),vm.localStorageValues.isNoDataFound=!1,"12"!==motorResponse.veh_code.toString().substring(0,2)&&"13"!==motorResponse.veh_code.toString().substring(0,2)&&("11"===motorResponse.veh_code.toString().substring(0,2)?vm.numberType="four-wheeler":"14"===motorResponse.veh_code.toString().substring(0,2)||"15"===motorResponse.veh_code.toString().substring(0,2)||"16"===motorResponse.veh_code.toString().substring(0,2)?vm.numberType="commercial vehicle":vm.numberType="Not a private car",vm.localStorageValues.product="four-wheeler"===vm.numberType?"Car":"commercial vehicle"===vm.numberType?"Commercial":"Bike",vm.localStorageValues.isMissMatchedFlow=!0),vm.localStorageValues.vehicle.make=motorResponse.vehicleMake,vm.localStorageValues.vehicle.model=motorResponse.vehicleModel,vm.localStorageValues.vehicle.cubicCapacity=motorResponse.cubic_capacity?.split(".")[0],vm.localStorageValues.vehicle.vehicleMaincode=motorResponse.veh_code,vm.localStorageValues.vehicle.registrationDate=motorResponse.veh_reg_date,vm.localStorageValues.vehicle.engineNumber=motorResponse.engine_no,vm.localStorageValues.vehicle.vehicleIdentificationNumber=motorResponse.vin,vm.localStorageValues.vehicle.licensePlateNumber=motorResponse.veh_reg_no,vm.localStorageValues.vehicle.variant=motorResponse.vehicleVariant?.split(".0")[0],vm.localStorageValues.person.ownerName=motorResponse.owner_name,(motorResponse.owner_serial_no||motorResponse.ownershipSerialNumber)&&(vm.localStorageValues.vehicle.ownershipSerialNumber=motorResponse.owner_serial_no?motorResponse.owner_serial_no:motorResponse.ownershipSerialNumber),vm.localStorageValues.previousInsurer.previousInsurerName="",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyInsurerName="",vm.localStorageValues.previousInsurer.previousPolicyNumber=motorResponse.insurance_policy_no?"d"===motorResponse.insurance_policy_no.toString().toLowerCase().charAt(0)?trimPolicyNumber(motorResponse.insurance_policy_no):motorResponse.insurance_policy_no:"UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber=motorResponse.insurance_policy_no?"d"===motorResponse.insurance_policy_no.toString().toLowerCase().charAt(0)?trimPolicyNumber(motorResponse.insurance_policy_no):motorResponse.insurance_policy_no:"UNKNOWN",vm.localStorageValues.noD
359ataFromVahaan=!1,vm.localStorageValues.previousInsurerDetails=motorResponse.insurance_company||"","Bike"!==vm.localStorageValues.product&&(vm.localStorageValues.person.phoneNumber="8888888888",vm.localStorageValues.servicePending=!0),"Commercial"===vm.localStorageValues.product&&(delete vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime,vm.getCategoryCode(motorResponse.propertyType),vm.localStorageValues.vehicle.permitType="PUBLIC",vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=(motorResponse.insurance_upto?vm.getExpieryDate(new Date(motorResponse.insurance_upto)):new Date((new Date).setDate((new Date).getDate()+5)))||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||""),"Car"===vm.localStorageValues.product){if(getdateDiffInMonths(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date)<="42"){getdateDiffInMonths(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date(motorResponse.insurance_upto))<=30?(vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=vm.getExpieryDate(vm.localStorageValues?.vehicle?.registrationDate?new Date(vm.localStorageValues?.vehicle?.registrationDate):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=getStartDate(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime?new Date(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime):"",3,!0)||"",vm.localStorageValues.previousInsurer.previousPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber="UNKNOWN"):(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=getStartDate(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime?new Date(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime):"",3,!1)||"",vm.localStorageValues.previousInsurer.previousPolicyNumber="UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN",vm.localStorageValues.previousInsurer.previousPolicyExpiryDate="")}else vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=getStartDate(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime?new Date(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime):"",1,!1)||"",vm.localStorageValues.previousInsurer.previousPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN"}return vm.localStorageValues.previousInsurer.previousInsurerCode=motorResponse.insurance_company_code||"106",localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.callDataLayerViewPrice(!!vm.localStorageValues.isMissMatchedFlow),void vm.redirectPage()}},function(error){vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.vahaan
359Failed()})},vm.getCategoryCode=function(propertyType){switch(propertyType){case"KFZGC":vm.localStorageValues.vehicle.vehicleCategory="Goods Carrying",vm.localStorageValues.vehicle.categoryCode="gcv";break;case"KFZPC":vm.localStorageValues.vehicle.vehicleCategory="Passenger Carrying",vm.localStorageValues.vehicle.categoryCode="pcv";break;case"KFZMD":vm.localStorageValues.vehicle.vehicleCategory="Miscellaneous",vm.localStorageValues.vehicle.categoryCode="misc_d";break;case"KFZTR":vm.localStorageValues.vehicle.vehicleCategory="Trailer",vm.localStorageValues.vehicle.categoryCode="trailer";break;default:return}},vm.getExpieryDate=function(date){return date&&"Invalid Date"!==new Date(date).toString()?date.getFullYear()+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+("0"+date.getDate()).slice(-2):""},vm.motorProposalApi=function(){if(vm.proposalErrorHandled)return;vm.isDisabled=!0;let url=`${serviceHost}/v3/motor/proposal?${(new Date).getTime()}`,previousInsurer=Object.entries(vm.localStorageValues.previousInsurer).reduce((a,[k,v])=>""!==v?(a[k]=v,a):a,{});previousInsurer.currentThirdPartyPolicy=Object.entries(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy).reduce((a,[k,v])=>""!==v?(a[k]=v,a):a,{});const data={visitorId:vm.localStorageValues.visitorId,pinCode:vm.localStorageValues.person.pinCode,product:vm.localStorageValues.product,vehicle:{isVehicleNew:vm.localStorageValues.vehicle.isVehicleNew,licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)},previousInsurer:previousInsurer};vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&(data.source=vm.localStorageValues.utmParams,vm.localStorageValues.utmParams.imdCode&&(data.contract={agentCode:vm.localStorageValues.utmParams.imdCode})),vm.localStorageValues.flowType.isCampaignFlow&&(data.externalPolicyNumber=getExeternalPolicyNumber(vm.localStorageValues)),getParameter("merchantId")&&getParameter("sessionId")&&(data.additionalDetails={merchantId:getParameter("merchantId"),sessionId:getParameter("sessionId")});const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){204==response.status&&(vm.isDisabled=!1,vm.setLocalStorageValues()),200==response.status&&(vm.localStorageValues.proposalNumber=response.data.proposalId,vm.getVehicleType())},function(error){if(400===error?.status)return vm.proposalErrorHandled=!0,vm.isDisabled=!1,void openProposalErrorModal("bike");checkForVisitorIdError(error)||(vm.isDisabled=!1,vm.setLocalStorageValues())})},vm.cityPincodeJson=digitCitiesJson,vm.cityPincodeJson={...vm.cityPincodeJson,Bangalore:"560067","Bangalore Rural":"561203"},vm.citiesList=Object.keys(vm.cityPincodeJson).map(function(v){return v.toLowerCase()}),vm.pinCodeList=Object.keys(vm.cityPincodeJson).map(function(key){return vm.cityPincodeJson[key]}),vm.getCitiesPincode=function(toppixel){setTimeout(()=>{var residenceCityPincode=document.getElementById("city-field-wrapper"),residenceCityPincodeInput=residenceCityPincode.querySelector("input"),JsonObj=motorCityList||digitCitiesJson;residentCities=Object.keys(JsonObj),initCityPincodeSearch(toppixel,residenceCityPincode,residenceCityPincodeInput,residentCities,!1)},1e3)},vm.getCitiesPincodeNew=function(toppixel){setTimeout(()=>{var residenceCityPincode=document.getElementById("city-field-wrapper-new"),residenceCityPincodeInput=residenceCityPincode.querySelector("input"),JsonObj=motorCityList||digitCitiesJson;residentCities=Object.keys(JsonObj),initCityPincodeSearch(toppixel,residenceCityPincode,residenceCityPincodeInput,residentCities,!0)},1e3)},vm.setCityPinCode=function(city){vm.localStorageValues.person.cityName=vm.capitalizeFirstLetter(city);let cityIndex=motorCitesList?motorCitesList.indexOf(city.toLowerCase()):vm.citiesList.indexOf(city.toLowerCase());vm.localStorageValues.person.pinCode=motorPinCodeList?motorPinCodeList[cityIndex]:vm.pinCodeList[cityIndex]},vm.getRtoCode=function(){vm.isDisabled=!0,"Bangalore"===vm.localStorageValues.person.cityName?vm.localStorageValues.person.cityName="Bengaluru":"Bangalore Rural"===vm.localStorageValues.person.cityName&&(vm.localStorageValues.person.cityName="Bengaluru Rural");let url=`${serviceHost}/cities/rtocode?cityName=${vm.localStorageValues.person.cityName}&${(new Date).getTime()}`;var config={responseType:"text",transformResponse:convertStrinToJsonResponse};$http.get(url,config).then(function(response){if(200==response.status)return vm.isDisabled=!1,vm.localStorageValues.vehicle.regionCode=response.data.regionCode,void vm.setLocalStorageValues()},function(error){vm.isDisabled=!1,vm.setLocalStorageValues()})},vm.validateRenewal=function(response){response.sort((a,b)=>new Date(b.policyExpiryDate).getTime()-new Date(a.policyExpiryDate).getTime());const bikeRenwalData=response&&response?.length?response[0]:null,days=bikeRenwalData&&bikeRenwalData.policyExpiryDate&&getDateDiffInDays(bikeRenwalData.policyExpiryDate)+1;if(bikeRenwalData&&days>-91&&bikeRenwalData.renewalQuoteKey)if("20101"===bikeRenwalData.productC
359ode||"20103"===bikeRenwalData.productCode||"20104"===bikeRenwalData.productCode||"20102"===bikeRenwalData.productCode){if(bikeRenwalData.agentCode&&bikeRenwalData.existingPolicyKey&&"1000651"===bikeRenwalData.agentCode&&!vm.isSIBPage)return void safeWindowOpen(vm.navigationPath+"/login/car-insurance-renewals?policyNo="+bikeRenwalData.existingPolicyKey,"_self");vm.callDataLayerViewPrice("one_pager"),safeWindowOpen(vm.isSIBPage?vm.navigationPath+"/campaigns/rollover?policyKey="+bikeRenwalData.renewalQuoteKey+"&flowtype=website_redirection&utm_source=partner&utm_medium=SIB&utm_campaign=1170920":vm.navigationPath+"/campaigns/rollover?policyKey="+bikeRenwalData.renewalQuoteKey+"&flowtype=website_redirection&source=direct","_self")}else if("20201"!==bikeRenwalData.productCode&&"20203"!==bikeRenwalData.productCode&&"20204"!==bikeRenwalData.productCode&&"20202"!==bikeRenwalData.productCode||vm.checkBlockedCampaign()){if(("20201"===bikeRenwalData.productCode||"20203"===bikeRenwalData.productCode||"20204"===bikeRenwalData.productCode||"20202"===bikeRenwalData.productCode)&&vm.checkBlockedCampaign())return void vm.showBlockedCampaignPopup();vm.setLocalStorageValues()}else{if(bikeRenwalData.agentCode&&bikeRenwalData.existingPolicyKey&&"1000651"===bikeRenwalData.agentCode&&!vm.isSIBPage)return void safeWindowOpen(vm.navigationPath+"/login/bike-insurance-renewals?policyNo="+bikeRenwalData.existingPolicyKey,"_self");vm.callDataLayerViewPrice("one_pager"),safeWindowOpen(vm.isSIBPage?vm.navigationPath+"/campaigns/rollover-bike?policyKey="+bikeRenwalData.renewalQuoteKey+"&flowtype=website_redirection&utm_source=partner&utm_medium=SIB&utm_campaign=1170920":vm.navigationPath+"/campaigns/rollover-bike?policyKey="+bikeRenwalData.renewalQuoteKey+"&flowtype=website_redirection&source=direct","_self")}else vm.setLocalStorageValues()},vm.fetchRenewalDetails=function(){vm.isDisabled=!0;let url=`${serviceHost}/motor/renewal/details?${(new Date).getTime()}`;const data={licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){204==response.status&&vm.setLocalStorageValues(),200==response.status&&(response.data&&response.data.length&&response.data.forEach((ele,index)=>{Object.keys(ele).forEach(key=>{"existingPolicyKey"!==key&&"renewalQuoteKey"!==key&&(response.data[index][key]=unwrapContent(response.data[index][key]))})}),vm.validateRenewal(response.data))},function(error){vm.setLocalStorageValues()})},vm.callDataLayerViewPrice=function(isMissmatchErrror){const sessionStorageLob=sessionStorage.getItem("lobChecked"),liTerms=sessionStorageLob?JSON.parse(sessionStorageLob)?.lob.bike:"",vehicleAge=getDateDiffInYears(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date);let dataLayer={event:"view_price_click",userId:getCookie("visitorId"),lob:vm.localStorageValues.product||"Bike",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",registration_number:vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.licensePlateNumber?vm.localStorageValues.vehicle.licensePlateNumber:"NA",flow_type:"reg"===vm.localStorageValues.flowJourney?"vahan_flow":vm.localStorageValues.vehicle.isVehicleNew?"New Flow":"city_flow",phone_number:AesCtr.encrypt("8888888888",encranalytics,256),source:window.location.href,addons_visible:this.localStorageValues?.addonList&&this.localStorageValues?.addonList[this.localStorageValues?.selectedPlan]?"Yes":"No",discounts_visible:this.localStorageValues?.quickQuoteResponse?.plans?.[this.localStorageValues.selectedPlan]?.responseBody?.discountPremium?"Yes":"No",registration_year:this.localStorageValues?.seletedYear||this.localStorageValues?.vehicle?.registrationDate&&new Date(this.localStorageValues?.vehicle?.registrationDate).getFullYear()||"NA",registration_month:this.localStorageValues?.vehicle?.registrationMonth||this.localStorageValues?.vehicle?.registrationDate&&new Date(this.localStorageValues?.vehicle?.registrationDate).getMonth()||"NA",vehicle_make:this.localStorageValues?.vehicle?.make||this.localStorageValues?.postProposalResponse?.vehicle?.make||"NA",vehicle_model:this.localStorageValues?.vehicle?.model||this.localStorageValues?.postProposalResponse?.vehicle?.model||"NA",claim_last_year_status:(this.localStorageValues?.previousInsurer?.isClaimInLastYear?"Yes":"No")||(this.localStorageValues?.quickQuoteResponse?.previousInsurer?.isClaimInLastYear?"Yes":"No")||"NA",payd_visible:(this.localStorageValues?.selectedPlan&&this.localStorageValues.selectedPlan.includes("WithPi")?"Yes":"No")||(this.localStorageValues?.quickQuoteResponse?.selectedPlan&&this.localStorageValues?.quickQuoteResponse?.selectedPlan.includes("WithPi")?"Yes":"No")||"NA",vehicle_age:vehicleAge||"NA",status:liTerms?"both":"onlygi"};isMissmatchErrror&&("one_pager"===isMissmatchErrror?dataLayer.flow_type="one_pager":dataLayer.error_response="Commercial : "+vm.numberType+" number"),vm.localStorageValues.vehicle.regionCode&&(dataLayer.RTO=vm.localStorageValues.vehicle.regionCode),vm.localStorageValues.person.pinCode&&(dataLayer.pincode=vm.localStorageValues.person.pinCode),vm.localStorageValues.person.cityName&&(dataLayer.city=vm.localStorageValues.person.cityName),customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.callDataLayerContinueJourneyClick=function(){let dataLayer={event:"continue_journey_click",lob:"Bike",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"New Flow",quote_id:vm.lastVisitedData.issuedPol
359icyInfo&&vm.lastVisitedData.issuedPolicyInfo.policyNumber||"NA",phone_number:vm.lastVisitedData.person&&vm.lastVisitedData.person.phoneNumber?AesCtr.encrypt(vm.lastVisitedData.person.phoneNumber,encranalytics,256):AesCtr.encrypt("8888888888",encranalytics,256),email:vm.lastVisitedData.person&&vm.lastVisitedData.person.emailId?AesCtr.encrypt(vm.lastVisitedData.person.emailId,encranalytics,256):"",registration_number:vm.lastVisitedData.vehicle&&vm.lastVisitedData.vehicle.licensePlateNumber?vm.lastVisitedData.vehicle.licensePlateNumber:"",default_selected_plan:vm.lastVisitedData.selectedPlan?vm.lastVisitedData.selectedPlan:"",plan_premium:vm.lastVisitedData.costBreakUp&&vm.lastVisitedData.costBreakUp.netPremium?vm.lastVisitedData.costBreakUp.netPremium:""};customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.dontKnowRegistrationNumberTab=function(){twoWheelerFormValidation.fields={},twoWheelerFormValidation.remove("registration-search"),twoWheelerFormValidation.addByName("registration-city",dynamicValidationForCity),isGetQuoteMainFormBike&&"true"===isGetQuoteMainFormBike.innerText&&twoWheelerFormValidation.addByName("bike-term-condition-2",termValidatorObjBike),getQuoteStickyBike&&(twoWheelerBottomForm.fields={},twoWheelerBottomForm.remove("registration-search"),twoWheelerBottomForm.addByName("registration-city",dynamicValidationForCity)),clearDominarErrorsOnFocus(twoWheelerFormValidation),!1===vm.localStorageValues.vehicle.isVehicleNew&&!1===vm.localStorageValues.flowType.registrationNumberFlow?vm.localStorageValues.flowType.isDontKnow=!0:vm.localStorageValues.flowType.isDontKnow=!1},vm.knowRegistrationNumberTab=function(){twoWheelerFormValidation.fields={},twoWheelerFormValidation.remove("registration-city"),isGetQuoteMainFormBike&&"true"===isGetQuoteMainFormBike.innerText&&twoWheelerFormValidation.remove("bike-term-condition-2"),twoWheelerFormValidation.addByName("registration-search",dynamicValidationForRegistrationNumber),getQuoteStickyBike&&(twoWheelerBottomForm.fields={},twoWheelerBottomForm.remove("registration-city"),twoWheelerBottomForm.addByName("registration-search",dynamicValidationForRegistrationNumber))},vm.toggleCard=function(){vm.registrationNumberCardShow=!vm.localStorageValues.vehicle.isVehicleNew&&!vm.registrationNumberCardShow,vm.registrationNumberCardShow?vm.knowRegistrationNumberTab():vm.dontKnowRegistrationNumberTab()},vm.submitInfo=function(){if(vm.isValidRegNumber=!0,vm.registrationNumberCardShow){if(motorTwoWheelerInsuranceAnalytics.viewPrice(vm.localStorageValues.vehicle.licensePlateNumber||"",vm.lastVisitedData&&vm.lastVisitedData.person&&vm.lastVisitedData.person?.phoneNumber||"","Bike",getFlowTypeForMotor(vm.localStorageValues)),callDataLayerFunctions("LeadSubmit","8888888888","Bike Registration Form","Bike"),vm.storedLocalStorageData&&vm.storedLocalStorageData.length){const index=vm.getLocalStorageDataIndex();if(-1!==index)return vm.storedLocalStorageData[index]?.vehicle?.licensePlateNumber?.toLowerCase()===vm.localStorageValues.vehicle.licensePlateNumber.toLowerCase()?void safeWindowOpen(vm.storedLocalStorageData[index].recentPageUrl,"_self"):void vm.getRtoDetail()}vm.getRtoDetail()}else vm.callDataLayerViewPrice(),motorTwoWheelerInsuranceAnalytics.viewPrice(vm.localStorageValues.vehicle.licensePlateNumber||"",vm.lastVisitedData&&vm.lastVisitedData.person&&vm.lastVisitedData.person?.phoneNumber||"","Bike",getFlowTypeForMotor(vm.localStorageValues)),callDataLayerFunctions("LeadSubmit","8888888888",vm.localStorageValues.vehicle.isVehicleNew?"Bike New Vehicle Form":"Bike don't know flow form","Bike"),vm.getRtoCode()},vm.viewPrice=function(){vm.isAgentCodeValid=!0,vm.isMissMatchError=!0,vm.partner?vm.submitInfo():twoWheelerFormValidation.validateAll(async function(){"Y"!==vm.callerCodeValue&&"YN"!==vm.callerCodeValue||!vm.agentCode||(vm.localStorageValues.flowType.isCampaignFlow=!0,vm.localStorageValues.campaignAgentCode=vm.agentCode),vm.isPartnerCampaignFlow?vm.agentDetails():vm.submitInfo()},()=>{})},vm.viewPriceBottomPopup=function(){twoWheelerBottomForm.validateAll(()=>{vm.submitInfo()})},vm.agentDetails=function(){const data={bdId:vm.agentCode,bdPrincipalType:"USER"};let url=`${serviceHost}/insurance/partner?${(new Date).getTime()}`;vm.isDisabled=!0;const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){response.data.state&&"null"!=response.data.state?(vm.isAgentCodeValid=!0,vm.agentData=response.data,vm.localStorageValues.campaignAgentCode=vm.agentCode,vm.localStorageValues.campaignAgentLocation=response.data.state,vm.agentData.name=vm.agentData.name&&toTitleCase(response.data.name),vm.agentData.spName=vm.agentData.spName&&toTitleCase(response.data.spName),vm.submitInfo()):(vm.isDisabled=!1,vm.isAgentCodeValid=!1,twoWheelerFormValidation.validateAll())},function(error){vm.isDisabled=!1,vm.isAgentCodeValid=!1})},vm.getRtoDetail=function(){vm.isDisabled=!0;let url=`${serviceHost}/cities/rtocode/region?${(new Date).getTime()}`;const reqData={regionCode:vm.localStorageValues.vehicle.licensePlateNumber,visitorId:getDynamicCode()},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(reqData)),config).then(function(response){if(response&&response.data&&response.data.length&&204!=response.status){vm.localStorageValues.person.cityName=response.data.length>1?response.data[1].registeredCityName:response.data[0].registeredCityName;let cityIndex=motorCitesList?motorCitesList.indexOf(vm.localStorageValues.person.cityName.toLowerCase()):vm.citiesList.indexOf(vm.localStorageValues.person.cityName.toLowerCase());return vm.localStorageValues.person.pinCode=motorPinCodeList?motorPinCodeList[cityIndex]:vm.pinCodeList[cityIndex],vm.localStorageValues.vehicle.licensePlateNumber=response.data[0].registrationNumber,vm.localStorageValues.vehicle.regionCode=response.data[0].regionCode,void(searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?vm.setLocalStorageValues():vm.fetchRenewalDetails())}checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike")?vm.setLocalStorageValues():(vm.isDisabled=!1,vm.isValidRegNumber=!1,twoWheelerFormValidation.validateAll())},function(error){vm.isDisabled=!1,vm.isValidRegNumber=!1,twoWheelerFormValidation.validateAll()})},vm.setExpiry=function(){let date=new Date;vm.localStorageValues.vehicle.isNewVehicle?vm.localStorageValues.isPolicyExpired=!1:vm.localStorageValues.isPolicyExpired?date.setDate(date.getDate()-7):date.setDate(date.getDate()+5),vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=date.getFullYear()+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+("0"+date.getDate()).slice(-2)},vm.getCurrentThirdPartyPolicyObj=function(){const endDate=new Date((new Date).setDate((new Date).getDate()+(vm.localStorageValues.isPolicyExpired?5:10))),temp=new Date((new Date).setDate((new Date).getDate()+(vm.localStorageValues.isPolicyExpired?5:10))),startDate=this.convertDate(new Date(new Date(temp.setFullYear(temp.getFullYear()-1))).setDate(temp.getDate()+1));return{currentThirdPartyPolicyExpiryDateTime:this.convertDate(endDate),isCurrentThirdPartyPolicyActive:!0,currentThirdPartyPolicyStartDateTime:startDate,currentThirdPartyPolicyNumber:"UNKNOWN"}},vm.convertDate=function(inputFormat){function pad(s){return s<10?"0"+s:s}const d=new Date(inputFormat);return[d.getFullYear(),pad(d.getMonth()+1),pad(d.getDate())].join("-")},vm.localStorageValues={gateway:vm.cscPortal,cscUser:vm.code,cscData:vm.cscData,vehicle:{isVehicleNew:!1,licensePlateNumber:"",regionCode:"",vehicleMaincode:"",vehicleIdentificationNumber:"",engineNumber:"",registrationDate:"",make:"",model:"",varient:"",vehicleIDV:{idv:""}},isPolicyExpired:!1,previousInsurer:{previousInsurerCode:"",previousPolicyNumber:"UNKNOWN",previousPolicyExpiryDate:expieryDate.getFullYear()+"-"+("0"+(expieryDate.getMonth()+1)).slice(-2)+"-"+("0"+expieryDate.getDate()).slice(-2),isClaimInLastYear:"",previousNoClaimBonus:"",originalPreviousPolicyType:"1OD_1TP",currentThirdPartyPolicy:{isCurrentThirdPartyPolicyActive:!0,currentThirdPartyPolicyNumber:"UNKNOWN",currentThirdPartyPolicyStartDateTime:"",currentThirdPartyPolicyExpiryDateTime:""}},person:{cityName:"",pinCode:"",ownerName:"",emailId:"",phoneNumber:"",nominee:{name:"",relationship:""}}
359,utmParams:getUtmParaMeter(),flowType:{registrationNumberFlow:!1,CityFlow:!1,isCampaignFlow:!1,isAgentPartnerFlow:!1},campaignAgentCode:"",sourceUrl:window.location.href,visitorId:getDynamicCode(),proposalNumber:"",product:"Bike",lastVisitedUrl:"",isDropOffCountinue:!1,continueJourney:!0,visitedTime:(new Date).getTime(),isCorporateOwnershipType:!1,cqCalledPlan:[]},vm.defaultSelectOwnershipType=function(){setTimeout(()=>{document.getElementById("new-individual-ownership").checked=!0},150)},vm.isPartnerFlow=function(){let serachPosition=window.location.pathname.search("campaigns/bike-insurance1");(vm.isPartnerCampaignFlow=vm.localStorageValues.flowType.isCampaignFlow=-1!==serachPosition,vm.agentCode="",vm.callerCodeValue=searchParams.get("callercoderequired")&&searchParams.get("callercoderequired").toString().toUpperCase(),!searchParams.get("reg_no")||"20201"!==searchParams.get("product")&&"20202"!==searchParams.get("product")&&"20203"!==searchParams.get("product")&&"20204"!==searchParams.get("product"))||(document.getElementsByTagName("body")[0].classList.add("noscroll"),vm.localStorageValues.vehicle.licensePlateNumber=searchParams.get("reg_no"),vm.partner=!0,vm.viewPrice());vm.isFinoImd=getParameter("imdKey")&&"815F4213FCCD0061BE1EF789F5F3EF1D"===getParameter("imdKey").toString().toUpperCase()&&!window.location.href.includes("digit-insurance-for-fino"),vm.isFinoPage=window.location.href.includes("digit-insurance-for-fino"),("Y"===vm.callerCodeValue||vm.isPartnerCampaignFlow||vm.isFinoImd)&&(("YN"!==vm.callerCodeValue||vm.isFinoImd)&&(dynamicMerchentOrAngetCode.rules+="|required"),twoWheelerFormValidation.addByName("agent-code",dynamicMerchentOrAngetCode)),getParameter("utm_campaign")&&"HERO"===getParameter("utm_campaign").toString().toUpperCase()&&(vm.isHeroPartner=!0,document.querySelector(".heroFincorpMainContainer").style.display="block",document.querySelectorAll("#addon-content").length&&document.querySelectorAll("#addon-content").forEach(item=>{item.style.display="none"})),vm.isFinoPage&&searchParams.get("mobileNumber")&&""!==searchParams.get("mobileNumber").toString().trim()&&10===searchParams.get("mobileNumber").toString().trim().length&&(vm.localStorageValues.person.phoneNumber=searchParams.get("mobileNumber").toString().trim())},vm.isPartner=function(){return vm.lastVisitedData?.utmParams?.imdCode||"partner"===getParameter("utm_source")||-1!==vm.lastVisitedData?.sourceUrl?.indexOf("partner")},vm.isSIBFlow=function(){return"sib"===getParameter("utm_medium")&&"partner"===getParameter("utm_source")&&"1170920"===getParameter("utm_campaign")},vm.getLocalStorage=function(){const filterdData=[];vm.storedLocalStorageData=[],Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"Bike"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).lastVisitedUrl&&JSON.parse(localStorage[key]).visitedTime&&!JSON.parse(localStorage[key]).isGpayFlow&&filterdData.push(JSON.parse(localStorage[key]))}),Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"Bike"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).recentPageUrl&&JSON.parse(localStorage[key]).visitedTime&&JSON.parse(localStorage[key]).proposalNumber&&vm.storedLocalStorageData.push(JSON.parse(localStorage[key]))}),filterdData.sort((a,b)=>+new Date(b.visitedTime)-+new Date(a.visitedTime)),filterdData.length&&(vm.lastVisitedData=filterdData[0],vm.lastVisitedData.showSelectedPlan=vm.lastVisitedData.selectedPlan&&vm.capitalizeFirstLetter(vm.lastVisitedData.selectedPlan).replace(/([A-Z])/g," $1").trim())},vm.continueJourney=function(){let activeKey=vm.lastVisitedData.lastVisitedUrl.toString().split("session=")[1];activeKey&&activeKey.includes("&")&&(activeKey=activeKey.toString().split("&")[0]);let localStorageData=activeKey?JSON.parse(localStorage.getItem(activeKey)):"";activeKey&&(localStorageData={...localStorageData,isDropOffCountinue:!0},localStorageData.continueJourney=!0),localStorage.setItem(activeKey,JSON.stringify(localStorageData)),motorTwoWheelerInsuranceAnalytics.continueJourneyOnClick(vm.lastVisitedData&&vm.lastVisitedData.person&&vm.lastVisitedData.person?.phoneNumber,vm.lastVisitedData&&vm.lastVisitedData.person&&vm.lastVisitedData.person?.emailId,vm.lastVisitedData.person?.pinCode,(vm.lastVisitedData.vehicle,`${vm.lastVisitedData.vehicle?.model}`),vm.lastVisitedData.selectedPlan,this.localStorageValues.product,this.lastVisitedData.vehicle&&this.lastVisitedData.vehicle.licensePlateNumber?this.lastVisitedData.vehicle.licensePlateNumber:"",vm.lastVisitedData.lastVisitedUrl),vm.callDataLayerContinueJourneyClick();var targetUrl=vm.lastVisitedData.lastVisitedUrl;safeWindowOpen(targetUrl,"_blank")},vm.getLocalStorageDataIndex=function(){return vm.storedLocalStorageData.findIndex(data=>data.visitorId===getDynamicCode())},vm.motorUpdateProposalApi=function(){if(vm.proposalErrorHandled)return;let url=`${serviceHost}/v3/motor/proposal?${(new Date).getTime()}`,data={visitorId:vm.localStorageValues.visitorId,pinCode:vm.localStorageValues.person.pinCode,proposalId:vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber,product:vm.localStorageValues.product,vehicle:{isVehicleNew:vm.localStorageValues.vehicle.isVehicleNew,licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)}};getParameter("merchantId")&&getParameter("sessionId")&&(data.additionalDetails={merchantId:getParameter("merchantId"),sessionId:getParameter("sessionId")});const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.put(url,wrapContent(JSON.stringify(data)),config).then(function(response){200===response.status&&(vm.localStorageValues.proposalNumber=data.proposalId,vm.getVehicleType())},function(error){if(400===error?.status)return vm.proposalErrorHandled=!0,vm.isDisabled=!1,void openProposalErrorModal("bike");vm.isDisabled=!1,vm.setLocalStorageValues()})},document.getElementById("bike-tab")&&(document.getElementById("bike-tab").onclick=()=>{setTimeout(()=>{vm.localStorageValues.visitorId=getDynamicCode()},200)}),vm.getVehicleType=function(){vm.isDisabled=!0;let url=`${serviceHost}/v3/motor/getVehicleType`;const data={proposalId:vm.storedLocalStorageData[vm.getLocalStorageDataIndex()]&&vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber?vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber:vm.localStorageValues.proposalNumber,visitorId:vm.localStorageValues.visitorId},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:rawResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){if(vm.isDisabled=!1,204==response.status&&(vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)),200==response.status&&response.data){vm.isDisabled=!1;const motorResponse=JSON.parse(unwrapContent(unwrapContent(response.data)));return vm.localStorageValues.isNoDataFound=!1,vm.localStorageValues.vehicle.osn=motorResponse.osn,"12"!==motorResponse.type.toString().substring(0,2)&&"13"!==motorResponse.type.toString().substring(0,2)&&("11"===motorResponse.type.toString().substring(0,2)?vm.numberType="four-wheeler":"14"===motorResponse.type.toString().substring(0,2)||"15"===motorResponse.type.toString().substring(0,2)||"16"===motorResponse.type.toString().substring(0,2)?vm.numberType="commercial vehicle":vm.numberType="Not a private car",vm.localStorageValues.product="two-wheeler"===vm.numberType?"Bike":"commercial vehicle"===vm.numberType?"Commercial":"Car",vm.localStorageValues.isMissMatchedFlow=!0),vm.callDataLayerViewPrice(),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),"Car"===vm.localStorageValues.product?(vm.localStorageValues.vehicle.registrationDate=motorResponse.vehicleRegDate||"",void vm.callCamundaForAddons(motorResponse)):"Car"!==vm.localStorageValues.product?void vm.callCamundaForPyp(motorResponse):void vm.redirectPage(!1)}},function(error){vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)})},vm.callCamundaForAddons=function(motorResponse){this.serviceRequest=!0;
359const isPartner=vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&vm.localStorageValues.utmParams.imdCode,addonPayloadReq={variables:{LOB:{value:"4W"},Premium:{value:0},Age:{value:getDateDiffInYears(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date)},Current_NCB:{value:0},OSN:{value:0},isRenewalFlow:{value:!1},isRolloverFlow:{value:!isPartner},isPartnerFlow:{value:!isPartner},isDirectFlow:{value:!isPartner},IMD_Key:{value:vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.imdCode?vm.localStorageValues.utmParams.imdCode:""},isMobileflow:{value:!(!vm.localStorageValues.utmParams||"digit_mobileapp"!==vm.localStorageValues.utmParams.utmSource)},product_code:{value:""}},key:"addon_config"};let url=`${serviceHost}/common/camunda`;const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(addonPayloadReq)),config).then(function(response){response.data?.length&&(vm.localStorageValues.addonHide=response.data[0]?.Addon_hide_on_plan_page?.value.split(","),vm.localStorageValues.addonOrder=response.data[0]?.Addon_Order?.value.split(","),vm.localStorageValues.addonPreSelection=vm.preparePreSelectionAddons(response.data[0]?.Pre_selected_addon_on_plan_page?.value),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues))),vm.callCamundaForPyp(motorResponse)},err=>{vm.callCamundaForPyp(motorResponse)})},vm.preparePreSelectionAddons=function(addonData){const dataList=addonData?.split(",");let preferredAddons=[];return dataList&&dataList.forEach(element=>{preferredAddons.push({value:0,selection:!0,componentNumber:element})}),preferredAddons},vm.addValidationForContuniueJourney=function(){const visitedTime=new Date(vm.lastVisitedData?.visitedTime);return(new Date-visitedTime)/864e5<=7};const newBikeFlowDefult=document.querySelector(".new-vehicle-new-bike");newBikeFlowDefult&&"true"===newBikeFlowDefult.innerText.trim()&&(vm.localStorageValues.vehicle.isVehicleNew=!0,vm.toggleCard(),vm.setExpiry(),vm.showDontKnowFlow=!0,vm.hideBikeLoader=!0),vm.checkTurnStileFunction=function(){const token=turnstile.getResponse();if(token){const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};let data={response:token};var url=serviceHost+"/cloudFlare/verification";$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){(response.data.success||token)&&(vm.isBotAllow=!0,vm.tokenCheckInterval&&$interval.cancel(vm.tokenCheckInterval))},function(error){token&&(vm.isBotAllow=!0)})}},vm.isAutomationTool=function(){const navigatorProperties=["webdriver","__nightmare","callPhantom","_phantom","chrome","domAutomation","domAutomationController"];for(const prop of navigatorProperties)if(navigator[prop])return vm.propName=prop,!0;return!1},vm.startTokenCheckInterval=function(){vm.tokenCheckInterval=$interval(vm.checkTurnStileFunction,500)},vm.checkIfBtnDisabled=function(){return vm.isAutomationTool()&&(vm.isDisabled||!vm.isBotAllow||(!vm.localStorageValues.vehicle.licensePlateNumber||vm.localStorageValues.vehicle.licensePlateNumber.length<6)&&(!vm.localStorageValues.person.cityName||vm.localStorageValues.person.cityName.length<3))||!vm.isAutomationTool()&&(vm.isDisabled||(!vm.localStorageValues.vehicle.licensePlateNumber||vm.localStorageValues.vehicle.licensePlateNumber.length<6)&&(!vm.localStorageValues.person.cityName||vm.localStorageValues.person.cityName.length<3))},vm.callCamundaForPyp=function(motorResponse){let url=`${serviceHost}/common/camunda`;const data=camundaPypReqData("Bike"===vm.localStorageValues.product?"2W":"Car"===vm.localStorageValues.product?"4W":"CV",motorResponse.vehicleRegDate,motorResponse.osn,motorResponse.insuranceUpto),headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){response.data?.length&&(vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=response.data[0].previousPolicyExpiryDate.value,vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=response.data[0].currentThirdPartyPolicyStartDateTime.value,vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=response.data[0].currentThirdPartyPolicyExpiryDateTime.value,vm.localStorageValues.previousInsurer.originalPreviousPolicyType=response.data[0].originalPreviousPolicyType.value,"Car"===vm.localStorageValues.product&&(vm.localStorageValues.planPageLoaded=!1,vm.localStorageValues.changeInPlan&&(vm.localStorageValues.isNoDataFound=!0),vm.localStorageValues.previousPolicyIsComp=!0,vm.localStorageValues.previousPolicyonlyTp=!1,vm.localStorageValues.isPypChange=!0,vm.localStorageValues.finalPageReached=!0),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.redirectPage(!1))},err=>{})},vm.openModalSticky=function(){const isMobileViewBike=window.innerWidth<992;getQuoteStickyBike&&(getQuoteStickyBike.classList.add("open"),getQuoteStickyBike.classList.remove("close"),isMobileViewBike&&document.body.classList.add("scroll-disabled"))},vm.closeModalSticky=function(){const isMobileViewBike=window.innerWidth<992;getQuoteStickyBike&&(getQuoteStickyBike.classList.remove("open"),getQuoteStickyBike.classList.add("close"),isMobileViewBike&&document.body.classList.remove("scroll-disabled"))},vm.checkBlockedCampaign=function(){return!!window.location.href.includes("campaigns/digit-bike-insurance-for-hdfc-customers")},vm.showBlockedCampaignPopup=function(){if(document.getElementById("blocked-campaign-overlay"))return;const handleCloseAndReload=function(){const existingOverlay=document.getElementById("blocked-campaign-overlay");existingOverlay&&existingOverlay.parentNode&&document.body.removeChild(existingOverlay),document.body.classList.remove("scroll-disabled"),window.location.reload()},overlay=document.createElement("div");overlay.id="blocked-campaign-overlay",overlay.style.cssText="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 9999; display: flex; align-items: center; justify-content: center;";const popup=document.createElement("div");popup.id="blocked-campaign-popup",popup.style.cssText="background: white; border-radius: 12px; padding: 0; max-width: 615px; width: 90%; position: relative; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);";const closeBtn=document.createElement("button");closeBtn.textContent="Ã",closeBtn.setAttribute("aria-label","Close"),closeBtn.style.cssText="position: absolute; top: 12px; right: 12px; background: transparent; border: none; font-size: 28px; color: #999; cursor: pointer; width: 30px; height: 30px; padding: 0; line-height: 1; z-index: 1;",closeBtn.addEventListener("click",handleCloseAndReload);const contentContainer=document.createElement("div");contentContainer.style.cssText="display: flex; padding: 32px 24px 24px 24px; gap: 37px;";const leftSection=document.createElement("div");leftSection.style.cssText="flex: 1; display: flex; flex-direction: column;";const icon=document.createElement("div");icon.style.cssText="width: 56px; height: 56px; background: #FDB913; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 16px;";const iconText=document.createElement("span");iconText.textContent="!",iconText.style.cssText="font-size: 32px; color: white; font-weight: bold;",icon.appendChild(iconText);const heading=document.createElement("h2");heading.textContent="Attention Needed",heading.style.cssText="font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 0 0 12px 0;";const message=document.createElement("p");message.style.cssText="font-size: 14px; color: #666; line-height: 1.6; margin: 0;";const messagePart1=document.createTextNode("Please connect with "),strongText=document.createElement("strong");strongText.textContent="Go digit general insurance helpline";
359const messagePart2=document.createTextNode(" for this renewal");message.appendChild(messagePart1),message.appendChild(strongText),message.appendChild(messagePart2),leftSection.appendChild(icon),leftSection.appendChild(heading),leftSection.appendChild(message);const rightSection=document.createElement("div");rightSection.style.cssText="width: 160px; display: flex; align-items: center; justify-content: center;";const bikeImage=document.createElement("img");bikeImage.src="https://d2h44aw7l5xdvz.cloudfront.net/assets/img/classic-motorcycle-white.svg",bikeImage.alt="Motorcycle",bikeImage.style.cssText="width: 154px; height: auto; opacity: 0.9;",rightSection.appendChild(bikeImage),contentContainer.appendChild(leftSection),contentContainer.appendChild(rightSection);const okButton=document.createElement("button");okButton.textContent="Ok",okButton.setAttribute("type","button"),okButton.style.cssText="width: 100%; margin-top: 20px; padding: 14px; background: #FDB913; color: #1a1a1a; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;",okButton.addEventListener("click",handleCloseAndReload),leftSection.appendChild(okButton),popup.appendChild(closeBtn),popup.appendChild(contentContainer),overlay.appendChild(popup),document.body.appendChild(overlay),document.body.classList.add("scroll-disabled");document.querySelectorAll("#mainBikeForm input, #mainBikeForm button").forEach(function(input){input.disabled=!0,input.style.opacity="0.5",input.style.cursor="not-allowed"})},vm.init=function(){vm.getUniqueSessionValue(),vm.isAutomationTool()&&vm.startTokenCheckInterval(),vm.toggleCard(),vm.isDisabled=!1,vm.isPartnerFlow(),vm.isSIBPage=window.location.href.includes("utm_source=partner&utm_medium=SIB&utm_campaign=1170920"),vm.isAgentCodeValid=!0,vm.getLocalStorage(),vm.mobileDevice=mobileDevice,vm.partnerLogoObj=partnerLogoObj[new URLSearchParams(location.search).get("utm_campaign")?.toLowerCase()],vm.isMuthootLogo="1117563"===new URLSearchParams(location.search).get("utm_campaign");const partnerContainer=document.getElementById("heroFincorpContainer");vm.partnerLogoObj&&vm.isPartnerAvailable&&partnerContainer&&!vm.isMuthootLogo?(partnerContainer.style.display="flex",document.getElementById("partnerContent").innerText=vm.partnerLogoObj.content,document.getElementById("partnerImg").src=vm.partnerLogoObj.imgLink):partnerContainer&&(partnerContainer.style.display="none")},vm.init();const modalOutter=document.querySelector(".modal-outer .btn-primary");window.location.href.includes("utm_medium=SIB")&&modalOutter&&modalOutter.classList.add("sib-btn");const btnFooterFloating=document.querySelector(".getquote-section .floating-button"),bottomStripe=document.querySelector(".getquote-section .stripe-floating-view");if(btnFooterFloating){const viewInstantQuoteSection=document.querySelector(".view-instant-quote");viewInstantQuoteSection&&(viewInstantQuoteSection.style.display="none");const arrowUp=document.querySelector(".bottom-side-scroller");window.addEventListener("scroll",()=>{window.scrollY>=400?(btnFooterFloating.classList.add("visible-floating-button"),arrowUp&&arrowUp.classList.add("move-arrow-up-old")):(btnFooterFloating.classList.remove("visible-floating-button"),arrowUp&&arrowUp.classList.remove("move-arrow-up-old"))})}window.innerWidth>992&&bottomStripe&&window.addEventListener("scroll",()=>{window.scrollY>=400?bottomStripe.classList.contains("close")||(btnFooterFloating.classList.remove("visible-floating-button"),bottomStripe.classList.add("open")):bottomStripe.classList.remove("open")})}); 360const motorFourWheelerInsuranceAnalytics={encrypt:function(plainText){return AesCtrMethod.encrypt(plainText,"l0ckIt!",256)},trackOfProduct:function(){digitalData.page.pageInfo.platform="car",digitalData.producttype="Car"},moengageViewPriceFunc:function(regNo,mobile,city,Quote_no,make,model,name,pincode,policy_expiry,registrationDate,seesionId=""){let viewPriceContent={"Reg Number":upperCase(regNo),"city,":city,"Product Level 1":"Motor","Product Level 2":"Car","Product Level 3":"Rollover",Referrer:""!==document.referrer&&"https://www.godigit.com/"!==document.referrer?document.referrer.replace("http://","").replace("https://","").replace("www.","").split(/[/?#]/)[0].split(".").slice(-2)[0]:"","Referring Domain":""!==document.referrer&&"https://www.godigit.com/"!==document.referrer?document.referrer.replace("http://","").replace("https://","").replace("www.","").split(/[/?#]/)[0]:"","Entry Page URL":window.location.href,utm_source:searchParams.get("utm_source"),utm_medium:searchParams.get("utm_medium"),utm_campaign:searchParams.get("utm_campaign"),utm_content:searchParams.get("utm_content"),Quote_no:Quote_no,make:make,model:model,N
360ame:name,pincode:pincode,"policy expiry":policy_expiry,"registartion date":registrationDate,session_id:seesionId};mobile&&"8888888888"!==mobile.toString()&&(viewPriceContent["Mobile Number"]="91"+mobile),Moengage.track_event("View Prices",viewPriceContent),mobile&&"8888888888"!==mobile.toString()&&Moengage.add_mobile("91"+mobile),Moengage.add_user_attribute("city",city),Moengage.add_user_attribute("Reg Number",upperCase(regNo)),Moengage.add_user_attribute("user_generation_source","web"),Moengage.add_user_attribute("policy expiry",policy_expiry)},mobileNumber10DigitTrigger:function(regNum,mobileNum){Moengage.track_event("Mobile number 10 digit trigger",{"Reg Number":regNum||"","Mobile Number":"91"+mobileNum})}};digitapp.controller("carWheelerHomeController",function($scope,$http,$interval){const{wrapContent:wrapContent,unwrapContent:unwrapContent}=manageWrapping;let vm=this;vm.isCustomRegError=!0,vm.isMissMatchError=!0,vm.vehivleMissMatchError=!1,vm.proposalErrorHandled=!1,vm.isSpcodeval=!1,vm.numberType="",vm.isBotAllow=!1,vm.hideCarLoader=!1,vm.isFinoPage=!1,vm.navigationPath=window.location.origin;var carWheelerForm=document.getElementById("carLandingPageForm"),newVehiclMobNumForm=document.getElementById("mobile-number-modal"),getQuoteSticky=document.getElementById("getquote-bottom-sticky"),getQuoteStickyMobile=document.getElementById("dontKnowStickyModal");vm.isPartnerAvailable="partner"===new URLSearchParams(location.search).get("utm_source")||location.pathname.includes("partner"),vm.isSIBPage=window.location.href.includes("utm_source=partner&utm_medium=SIB&utm_campaign=1170920");let termsValidatorObj={rules:"required",container:".input-form-group",feedback:!1,triggers:["focusout","change"],customMessages:{required:"Please accept the T&C"}},carWheelerFormValidation=new Dominar(carWheelerForm,{"car-term-condition":termsValidatorObj}),mobileNumber={rules:"isMobileNumberValid|isBlockUserMobNumber",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter your mobile number",isMobileNumberValid:"Sorry, that mobile number looks incorrect",isBlockUserMobNumber:"Please enter different Mobile Number"}},requiredMobileNumberObject={"mobile-number":{rules:"required|isMobileNumberValid|isBlockUserMobNumber",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter your mobile number",isMobileNumberValid:"Sorry, that mobile number looks incorrect",isBlockUserMobNumber:"Please enter different Mobile Number"}}},newVehicleMobileNumberValidation=new Dominar(newVehiclMobNumForm,requiredMobileNumberObject);Dominar.Validator.registerAsync("carRegMissMatch",function(value,attribute,parameters,passes){return vm.isMissMatchError?passes(!0):passes(vm.isMissMatchError,"This is a "+vm.numberType+" number. Try again."),vm.isMissMatchError}),vm.capitalizeFirstLetter=function(string){return string.charAt(0).toUpperCase()+string.slice(1)};let dynamicValidationForRegistrationNumber={rules:"required|isRegistrationNumberValid|customRegNoError|carRegMissMatch",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter registration number",isRegistrationNumberValid:"Enter valid registration number",customRegNoError:"Invalid registration number. Please try again.",carRegMissMatch:"This is a "+vm.numberType+" number. Try again."}},dynamicMerchentCode={rules:"min:6|max:15",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter merchant code",min:"Please enter valid merchant code",max:"Please enter valid merchant code"}},stickyModalDominar=new Dominar(getQuoteSticky,{"registration-search":dynamicValidationForRegistrationNumber,"mobile-number":mobileNumber}),stickyModalDominarForDontKnowRegNum=new Dominar(getQuoteStickyMobile,requiredMobileNumberObject);function leadSubmitOnlyFlow(){vm.callDataLayerViewPrice(),callDataLayerFunctions("LeadSubmit",vm.localStorageValues.phoneNumber,vm.localStorageValues.vehicle.isVehicleNew?"Car new vehicle form":"Car don't know registration form","Car"),document.querySelectorAll(".getquote-btn-primary").forEach(function(el){el&&(el.textContent="Thank You")}),document.querySelectorAll(".button-footer-getquote").forEach(function(el){el&&(el.textContent="Thank You")})}function submitNormalForm(field){vm.isMissMatchError=!0,vm.isCustomRegError=!0,field.validateAll(function(){leadSubmitOnlyFlow()})}function submitMobileDontKnowRegNum(field){field.validateAll(function(){vm.motorProposalApi(!0)})}function onlyLeadSubmitDontKnowRegNum(field){field.validateAll(function(){leadSubmitOnlyFlow()})}Dominar.Validator.register("isRegistrationNumberValid",function(value){return validateRegistrationNumberCrossProduct(value.toString().toUpperCase())}),Dominar.Validator.register("customRegNoError",function(value){return validateRegistrationNumberCrossProduct(value.toString().toUpperCase(),"Car")&&vm.isCustomRegError}),Dominar.Validator.register("isMobileNumberValid",function(value){let validNumber=10==value.length;if(validNumber){var numberArray=value.split("");validNumber=parseInt(numberArray[0])>5}return!!validNumber}),Dominar.Validator.register("isBlockUserMobNumber",function(){return!vm.blockUserMobNumber}),vm.isCustomSubmitFlowEnabled=function(){const customSubmitFlowElement=document.querySelector(".custom-submit-flow-enabled");return customSubmitFlowElement&&"true"===customSubmitFlowElement.innerText.trim()},vm.addingValidatorForCustomFlow=function(){vm.isCustomSubmitFlowEnabled()&&(mobileNumber.rules+="|required")},vm.cityPincodeJson=digitCitiesJson,vm.citiesList=Object.keys(vm.cityPincodeJson).map(function(v){return v.toLowerCase()}),vm.pinCodeList=Object.keys(vm.cityPincodeJson).map(function(key){return vm.cityPincodeJson[key]}),vm.getUniqueSessionValue=function(){let randomNumber=(new Date).getTime();randomNumber=(randomNumber=encrypt(randomNumber)).replace(/[0-9]/g,""),vm.uniqueSessionValue=randomNumber.replace(/[^a-zA-Z ]/g,"")},vm.getExpieryDate=function(date){return date&&"Invalid Date"!==new Date(date).toString()?date.getFullYear()+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+("0"+date.getDate()).slice(-2):""},vm.getCurrentThirdPartyPolicyObj=function(isExpired){const endDate=new Date((new Date).setDate((new Date).getDate()+(!1===isExpired?10:5))),temp=new Date((new Date).setDate((new Date).getDate()+(!1===isExpired?10:5))),startDate=this.convertDate(new Date(new Date(temp.setFullYear(temp.getFullYear()-1))).setDate(temp.getDate()+1));return{currentThirdPartyPolicyExpiryDateTime:this.convertDate(endDate),isCurrentThirdPartyPolicyActive:!0,currentThirdPartyPolicyStartDateTime:startDate,currentThirdPartyPolicyNumber:"UNKNOWN"}},vm.convertDate=function(inputFormat){function pad(s){return s<10?"0"+s:s}const d=new Date(inputFormat);return[d.getFullYear(),pad(d.getMonth()+1),pad(d.getDate())].join("-")},vm.callConvoxService=function(){if("two-wheeler"!==vm.numberType&&"teleblock"!==getParameter("utm_content")&&vm.localStorageValues.person.phoneNumber&&"8888888888"!==vm.localStorageValues.person.phoneNumber){var convoxServiceData,serviceUrl=serviceHost+"/v3/motor/convox",ajax=new XMLHttpRequest;ajax.onload=function(){},ajax.open("POST",serviceUrl,!0),ajax.setRequestHeader("Content-Type","application/json"),ajax.send(wrapContent(JSON.stringify((convoxServiceData={visitorId:vm.localStorageValues.visitorId,proposalId:vm.localStorageValues.proposalNumber,lastvisitedpage:"homepage"},vm.localStorageValues.flowType.registrationNumberFlow||(convoxServiceData.category="fourWheeler",vm.localStorageValues.vehicle.isVehicleNew?convoxServiceData.process="Fourwheeler":convoxServiceData.process="fourWheeler"),vm.localStorageValues.person.phoneNumber&&(convoxServiceData.mobile=vm.localStorageValues.person.phoneNumber),vm.localStorageValues.gclid&&
360(convoxServiceData.customfield3=vm.localStorageValues.gclid),convoxServiceData))))}},vm.callsuiteCrm=function(){if("teleblock"===getParameter("utm_content")||!vm.localStorageValues.person.phoneNumber||"8888888888"===vm.localStorageValues.person.phoneNumber)return;var serviceUrl=serviceHost+"/leadgini";const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:rawResponse,headers:headers};$http.post(serviceUrl,wrapContent(JSON.stringify({visitorId:vm.localStorageValues.visitorId,proposalId:vm.localStorageValues.proposalNumber})),config).then(function(response){response&&response.length>0&&response[0].data&&response[0].data.attributes&&response[0].data.attributes.diy_score&&(vm.localStorageValues.diy_score=response[0].data.attributes.diy_score)})},vm.callConvoxOntenDigits=function(){vm.localStorageValues.person.phoneNumber},vm.checkIfTeleSalesMobile=function(){vm.blockUserMobNumber=!1,vm.localStorageValues.phoneNumber&&10===vm.localStorageValues.phoneNumber.length&&vm.telesalesData&&vm.telesalesData.length&&vm.telesalesData.every(obj=>!obj.mob||obj.mob.toString()!==vm.localStorageValues.phoneNumber.toString()||(vm.blockUserMobNumber=!0,!1)),motorFourWheelerInsuranceAnalytics.mobileNumber10DigitTrigger(vm.localStorageValues.vehicle.licensePlateNumber,vm.localStorageValues.person.phoneNumber)},vm.redirectPage=function(isVahanFailed){return vm.localStorageValues.flowType.registrationNumberFlow&&vm.callDataLayerViewPrice(!!vm.localStorageValues.isMissMatchedFlow),vm.localStorageValues.person.phoneNumber=vm.localStorageValues.phoneNumber?vm.localStorageValues.phoneNumber:"8888888888",vm.localStorageValues.servicePending=!0,isVahanFailed?(vm.localStorageValues.noDataFromVahaan=!0,vm.callDataLayerViewPrice(!!vm.localStorageValues.isMissMatchedFlow),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),void safeWindowOpen(`/motor-insurance/car-flow/vehicle-details-page?session=${vm.uniqueSessionValue}`,"_self")):(vm.localStorageValues.isSIBFlow=vm.isSIBPage,localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.localStorageValues.isMissMatchedFlow&&vm.localStorageValues.flowType.isAxisPartner?(vm.vehivleMissMatchError=!0,void(vm.localStorageValues.isMissMatchedFlow=!1)):void(vm.localStorageValues.isMissMatchedFlow?"Bike"===vm.localStorageValues.product?safeWindowOpen(checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike")&&vm.localStorageValues.flowType.registrationNumberFlow?`/motor-insurance/bike-flow/plan-page/city?session=${vm.uniqueSessionValue}`:`/motor-insurance/bike-flow/plan-page?session=${vm.uniqueSessionValue}`,"_self"):"Commercial"===vm.localStorageValues.product&&safeWindowOpen(`/motor-insurance/cv-flow/cv-plan-page?session=${vm.uniqueSessionValue}`,"_self"):safeWindowOpen(vm.localStorageValues.flowType.registrationNumberFlow?checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber)?`/motor-insurance/car-flow/car-plan-page/city?session=${vm.uniqueSessionValue}`:`/motor-insurance/car-flow/car-plan-page?session=${vm.uniqueSessionValue}`:`/motor-insurance/car-flow/vehicle-details-page?session=${vm.uniqueSessionValue}`,"_self")))},vm.checkIfVehicleMissmatchErrorForAxis=function(){!vm.localStorageValues.vehicle.licensePlateNumber&&vm.localStorageValues.flowType.isAxisPartner&&!0===vm.vehivleMissMatchError&&(vm.vehivleMissMatchError=!1,$scope.$apply())},vm.setLocalStorageValues=function(){vm.mobileDevice&&(vm.localStorageValues.visitorId=getDynamicCode()),searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")&&vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&(vm.localStorageValues.utmParams.utmFlow="DirectPortalPartnerStoreLink"),vm.localStorageValues.flowType.registrationNumberFlow=vm.registrationNumberCardShow&&!vm.regCarFlow,vm.localStorageValues.flowType.CityFlow=vm.regCarFlow,vm.localStorageValues.visitorId=vm.localStorageValues.visitorId||getDynamicCode(),vm.localStorageValues.cityNameList=motorCityList||vm.cityPincodeJson,vm.localStorageValues.flowJourney=vm.registrationNumberCardShow&&!vm.regCarFlow?"reg":vm.localStorageValues.vehicle.isVehicleNew?"new":"city",vm.localStorageValues.cqCalledPlan=[];const today=new Date;if(vm.localStorageValues.vehicle.isVehicleNew||(today.setDate(today.getDate()+5),vm.localStorageValues.previousInsurer.currentThirdPartyPolicy=vm.getCurrentThirdPartyPolicyObj(!!vm.localStorageValues.flowType.registrationNumberFlow)),vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=vm.getExpieryDate(today),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.localStorageValues.vehicle.isVehicleNew&&vm.callConvoxService(),vm.localStorageValues.flowType.registrationNumberFlow)return motorFourWheelerInsuranceAnalytics.moengageViewPriceFunc(vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.licensePlateNumber?vm.localStorageValues.vehicle.licensePlateNumber:"",vm.localStorageValues.person&&vm.localStorageValues.person.phoneNumber?vm.localStorageValues.person.phoneNumber:"",vm.localStorageValues.person&&vm.localStorageValues.person.cityName?vm.localStorageValues.person.cityName:"",vm.localStorageValues.previousInsurer&&vm.localStorageValues.previousInsurer.previousPolicyNumber?vm.localStorageValues.previousInsurer.previousPolicyNumber:"",vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.make?vm.localStorageValues.vehicle.make:"",vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.model?vm.localStorageValues.vehicle.model:"",vm.localStorageValues.person&&vm.localStorageValues.person.ownerName?vm.localStorageValues.person.ownerName:"",vm.localStorageValues.person&&vm.localStorageValues.person.pinCode?vm.localStorageValues.person.pinCode:"",vm.localStorageValues.previousInsurer&&vm.localStorageValues.previousInsurer.previousPolicyExpiryDate?vm.localStorageValues.previousInsurer.previousPolicyExpiryDate:"",vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.registrationDate?vm.localStorageValues.vehicle.registrationDate:"",vm.uniqueSessionValue),-1!==vm.getLocalStorageDataIndex()?void vm.motorUpdateProposalApi():void vm.motorProposalApi(!1);setTimeout(function(){vm.redirectPage(!1)},500)},vm.validateRenewal=function(response){response.sort((a,b)=>new Date(b.policyExpiryDate).getTime()-new Date(a.policyExpiryDate).getTime());const carRenwalData=response&&response?.length?response[0]:null,days=carRenwalData&&carRenwalData.policyExpiryDate&&getDateDiffInDays(carRenwalData.policyExpiryDate)+1;if(carRenwalData&&days>-91&&carRenwalData.renewalQuoteKey)if("20101"===carRenwalData.productC
360ode||"20103"===carRenwalData.productCode||"20104"===carRenwalData.productCode||"20102"===carRenwalData.productCode){if(carRenwalData.agentCode&&carRenwalData.existingPolicyKey&&"1000651"===carRenwalData.agentCode&&!vm.isSIBPage)return void safeWindowOpen(vm.navigationPath+"/login/car-insurance-renewals?policyNo="+carRenwalData.existingPolicyKey,"_self");vm.callDataLayerViewPrice("one_pager"),safeWindowOpen(vm.isSIBPage?vm.navigationPath+"/campaigns/rollover?policyKey="+carRenwalData.renewalQuoteKey+"&flowtype=website_redirection&utm_source=partner&utm_medium=SIB&utm_campaign=1170920":vm.navigationPath+"/campaigns/rollover?policyKey="+carRenwalData.renewalQuoteKey+"&flowtype=website_redirection&source=direct","_self")}else if("20201"===carRenwalData.productCode||"20203"===carRenwalData.productCode||"20204"===carRenwalData.productCode||"20202"===carRenwalData.productCode){if(carRenwalData.agentCode&&carRenwalData.existingPolicyKey&&"1000651"===carRenwalData.agentCode&&!vm.isSIBPage)return void safeWindowOpen(vm.navigationPath+"/login/bike-insurance-renewals?policyNo="+carRenwalData.existingPolicyKey,"_self");vm.callDataLayerViewPrice("one_pager"),safeWindowOpen(vm.isSIBPage?vm.navigationPath+"/campaigns/rollover-bike?policyKey="+carRenwalData.renewalQuoteKey+"&flowtype=website_redirection&utm_source=partner&utm_medium=SIB&utm_campaign=1170920":vm.navigationPath+"/campaigns/rollover-bike?policyKey="+carRenwalData.renewalQuoteKey+"&flowtype=website_redirection&source=direct","_self")}else vm.getCityFromRto();else vm.getCityFromRto()},vm.fetchRenewalDetails=function(){vm.isDisabled=!0;let url=`${serviceHost}/motor/renewal/details?${(new Date).getTime()}`;const headers=new Headers;headers.append("Content-Type","application/json");const data={licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)};var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){204==response.status&&(vm.isDisabled=!1,vm.getCityFromRto()),200==response.status&&(response.data&&response.data.length&&response.data.forEach((ele,index)=>{Object.keys(ele).forEach(key=>{"existingPolicyKey"!==key&&"renewalQuoteKey"!==key&&(response.data[index][key]=unwrapContent(response.data[index][key]))})}),vm.validateRenewal(response.data))},function(error){vm.isDisabled=!1,vm.getCityFromRto()})},vm.validateRegistrationWithFetch=function(regNumber){return new Promise((resolve,reject)=>{if(!regNumber)return void reject("Registration number is required");let url=`${serviceHost}/cities/rtocode/region?${(new Date).getTime()}`;const reqData={regionCode:regNumber,visitorId:getDynamicCode()};fetch(url,{method:"POST",headers:{"Content-Type":"application/json"},body:wrapContent(JSON.stringify(reqData))}).then(response=>{if(200===response.status)return response.text().then(data=>{const parsedData=convertStrinToJsonResponse(data);resolve(parsedData)});204===response.status?checkIfBharatReg(regNumber)?resolve({isBharatReg:!0,status:204}):reject("Invalid registration number"):reject("Service error")}).catch(error=>{console.error("Registration validation error:",error),reject(error)})})},vm.getCityFromRto=function(){vm.isDisabled=!0;let url=`${serviceHost}/cities/rtocode/region?${(new Date).getTime()}`;const reqData={regionCode:vm.localStorageValues.vehicle.licensePlateNumber,visitorId:getDynamicCode()},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(reqData)),config).then(function(response){if(200==response.status&&response.status<=299&&204!=response.status){vm.isDisabled=!1,vm.localStorageValues.person.cityName=response.data.length>1?response.data[1].registeredCityName:response.data[0].registeredCityName;let cityIndex=motorCitesList?motorCitesList.indexOf(vm.localStorageValues.person.cityName.toLowerCase()):vm.citiesList.indexOf(vm.localStorageValues.person.cityName.toLowerCase());return vm.localStorageValues.person.pinCode=motorPinCodeList?motorPinCodeList[cityIndex]:vm.pinCodeList[cityIndex],vm.localStorageValues.vehicle.licensePlateNumber=response.data[0].registrationNumber,vm.localStorageValues.vehicle.regionCode=response.data[0].regionCode,void vm.setLocalStorageValues()}checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber)?vm.setLocalStorageValues():(vm.isDisabled=!1,vm.isCustomRegError=!1,carWheelerFormValidation.validateAll())},function(error){vm.isDisabled=!1,vm.isCustomRegError=!1,carWheelerFormValidation.validateAll()})}
360,vm.vahaanFailed=function(){vm.localStorageValues.servicePending=!0,vm.localStorageValues.noDataFromVahaan=!0,localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),safeWindowOpen(`/motor-insurance/car-flow/vehicle-details-page?session=${vm.uniqueSessionValue}`,"_self")},vm.getVehicleType=function(){vm.isDisabled=!0;let url=`${serviceHost}/v3/motor/getVehicleType`;const data={proposalId:vm.storedLocalStorageData[vm.getLocalStorageDataIndex()]&&vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber?vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber:vm.localStorageValues.proposalNumber,visitorId:vm.localStorageValues.visitorId},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:rawResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){if(vm.isDisabled=!1,204==response.status&&(vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,motorFourWheelerInsuranceAnalytics.moengageViewPriceFunc(vm.localStorageValues.vehicle.licensePlateNumber,vm.localStorageValues.person.phoneNumber,vm.localStorageValues.person.cityName,vm.localStorageValues.previousInsurer.previousPolicyNumber,vm.localStorageValues.vehicle.make,vm.localStorageValues.vehicle.model,vm.localStorageValues.person.ownerName,vm.localStorageValues.person.pinCode,vm.localStorageValues.previousInsurer.previousPolicyExpiryDate,vm.localStorageValues.vehicle.registrationDate,vm.uniqueSessionValue),vm.redirectPage(!0)),200==response.status&&response.data){vm.isDisabled=!1;const motorResponse=JSON.parse(unwrapContent(unwrapContent(response.data)));return vm.localStorageValues.isNoDataFound=!1,vm.localStorageValues.vehicle.osn=motorResponse.osn,"11"!==motorResponse.type.toString().substring(0,2)&&"mahindraOEM"!==getParameter("source")&&("12"===motorResponse.type.toString().substring(0,2)||"13"===motorResponse.type.toString().substring(0,2)?vm.numberType="two-wheeler":"14"===motorResponse.type.toString().substring(0,2)||"15"===motorResponse.type.toString().substring(0,2)||"16"===motorResponse.type.toString().substring(0,2)?vm.numberType="commercial vehicle":vm.numberType="Not a private car",vm.localStorageValues.product="two-wheeler"===vm.numberType?"Bike":"commercial vehicle"===vm.numberType?"Commercial":"Car",vm.localStorageValues.isMissMatchedFlow=!0),motorFourWheelerInsuranceAnalytics.moengageViewPriceFunc(vm.localStorageValues.vehicle.licensePlateNumber,vm.localStorageValues.person.phoneNumber,vm.localStorageValues.person.cityName,vm.localStorageValues.previousInsurer.previousPolicyNumber,motorResponse.vehicleMake,motorResponse.vehicleModel,motorResponse.owner_name,vm.localStorageValues.person.pinCode,vm.localStorageValues.previousInsurer.previousPolicyExpiryDate,motorResponse.veh_reg_date,vm.uniqueSessionValue),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),"mahindraOEM"===getParameter("source")&&"11"!==motorResponse.type.toString().substring(0,2)?(vm.localStorageValues.isNoDataFound=!0,void vm.redirectPage(!0)):"Car"!==vm.localStorageValues.product?void vm.callCamundaForPyp(motorResponse):"Car"===vm.localStorageValues.product?(vm.localStorageValues.vehicle.registrationDate=motorResponse.vehicleRegDate||"",void vm.callCamundaForAddons(motorResponse)):void vm.redirectPage(!1)}},function(error){vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)})},vm.getCategoryCode=function(propertyType){switch(propertyType){case"KFZGC":vm.localStorageValues.vehicle.vehicleCategory="Goods Carrying",vm.localStorageValues.vehicle.categoryCode="gcv";break;case"KFZPC":vm.localStorageValues.vehicle.vehicleCategory="Passenger Carrying",vm.localStorageValues.vehicle.categoryCode="pcv";break;case"KFZMD":vm.localStorageValues.vehicle.vehicleCategory="Miscellaneous",vm.localStorageValues.vehicle.categoryCode="misc_d";break;case"KFZTR":vm.localStorageValues.vehicle.vehicleCategory="Trailer",vm.localStorageValues.vehicle.categoryCode="trailer";break;default:return}},vm.motorProposalApi=function(isForNewVehicle){if(vm.proposalErrorHandled)return;vm.isDisabled=!0;let url=`${serviceHost}/v3/motor/proposal?${(new Date).getTime()}`;const data={visitorId:vm.localStorageValues.visitorId,pinCode:vm.localStorageValues.person.pinCode,product:vm.localStorageValues.product,vehicle:{isVehicleNew:vm.localStorageValues.vehicle.isVehicleNew,licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)}};"Car"===vm.localStorageValues.product&&(data.additionalDetails={os:operatingSystemName,source:vm.mobileDevice?"MOBILE-WEB":"DESKTOP-WEB",utmSource:vm.localStorageValues.utmParam
360s?vm.localStorageValues.utmParams.utmSource:"",landing_page:window.location.href,device:vm.mobileDevice?"mobile":"desktop"},vm.localStorageValues.gclid&&(data.additionalDetails.gclid=vm.localStorageValues.gclid)),vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&(data.source=vm.localStorageValues.utmParams,vm.localStorageValues.utmParams.imdCode&&(data.contract={agentCode:vm.localStorageValues.utmParams.imdCode})),vm.localStorageValues.flowType.isCampaignFlow&&(data.externalPolicyNumber=getExeternalPolicyNumber(vm.localStorageValues)),getParameter("merchantId")&&getParameter("sessionId")&&(data.additionalDetails={...data.additionalDetails,merchantId:getParameter("merchantId"),sessionId:getParameter("sessionId")}),(isForNewVehicle||vm.localStorageValues.flowType.registrationNumberFlow&&vm.localStorageValues.phoneNumber)&&(data.persons=[{communications:[{communicationType:"MOBILE",communicationId:vm.localStorageValues.phoneNumber}]}],isForNewVehicle&&(data.vehicle={isVehicleNew:!0},delete data.pinCode));const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){204==response.status&&(vm.isDisabled=!1,vm.setLocalStorageValues()),200==response.status&&(vm.localStorageValues.proposalNumber=response.data.proposalId,isForNewVehicle?(vm.postProposalCalled=!0,vm.dontKnowRegistrationNumberTab(!0)):(vm.callsuiteCrm(),vm.getVehicleType()))},function(error){if(400===error?.status)return vm.proposalErrorHandled=!0,vm.isDisabled=!1,void openProposalErrorModal("car");checkForVisitorIdError(error)||(vm.isDisabled=!1,vm.setLocalStorageValues())})},vm.callDataLayerViewPrice=function(isMissmatchErrror){const sessionStorageLob=sessionStorage.getItem("lobChecked"),liTerms=sessionStorageLob?JSON.parse(sessionStorageLob)?.lob.car:"",vehicleAge=getDateDiffInYears(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date);let dataLayer={event:"view_price_click",userId:getCookie("visitorId"),lob:vm.localStorageValues.product||"Car",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",registration_number:vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.licensePlateNumber?vm.localStorageValues.vehicle.licensePlateNumber:"NA",flow_type:"reg"===vm.localStorageValues.flowJourney?"vahan_flow":vm.localStorageValues.vehicle.isVehicleNew?"New Flow":"city_flow",phone_number:vm.localStorageValues.phoneNumber?motorFourWheelerInsuranceAnalytics.encrypt(vm.localStorageValues.phoneNumber):motorFourWheelerInsuranceAnalytics.encrypt("8888888888"),source:window.location.href,addons_visible:this.localStorageValues?.addonList&&this.localStorageValues?.addonList[this.localStorageValues?.selectedPlan]?"Yes":"No",discounts_visible:this.localStorageValues?.quickQuoteResponse?.plans?.[this.localStorageValues.selectedPlan]?.responseBody?.discountPremium?"Yes":"No",registration_year:this.localStorageValues?.seletedYear||this.localStorageValues?.vehicle?.registrationDate&&new Date(this.localStorageValues?.vehicle?.registrationDate).getFullYear()||"NA",registration_month:this.localStorageValues?.vehicle?.registrationMonth||this.localStorageValues?.vehicle?.registrationDate&&new Date(this.localStorageValues?.vehicle?.registrationDate).getMonth()||"NA",vehicle_make:this.localStorageValues?.vehicle?.make||this.localStorageValues?.postProposalResponse?.vehicle?.make||"NA",vehicle_model:this.localStorageValues?.vehicle?.model||this.localStorageValues?.postProposalResponse?.vehicle?.model||"NA",claim_last_year_status:(this.localStorageValues?.previousInsurer?.isClaimInLastYear?"Yes":"No")||(this.localStorageValues?.quickQuoteResponse?.previousInsurer?.isClaimInLastYear?"Yes":"No")||"NA",payd_visible:(this.localStorageValues?.selectedPlan&&this.localStorageValues.selectedPlan.includes("WithPi")?"Yes":"No")||(this.localStorageValues?.quickQuoteResponse?.selectedPlan&&this.localStorageValues?.quickQuoteResponse?.selectedPlan.includes("WithPi")?"Yes":"No")||"NA",vehicle_age:vehicleAge||"NA",status:liTerms?"both":"onlygi",gclid_id:vm.localStorageValues.gclid?vm.localStorageValues.gclid:"NA",diy_score:vm.localStorageValues&&vm.localStorageValues.diy_score?vm.localStorageValues.diy_score:"NA"};
360isMissmatchErrror&&("one_pager"===isMissmatchErrror?dataLayer.flow_type="one_pager":dataLayer.error_response="Commercial : "+vm.numberType+" number"),vm.localStorageValues.vehicle.regionCode&&(dataLayer.RTO=vm.localStorageValues.vehicle.regionCode),vm.localStorageValues.person.pinCode&&(dataLayer.pincode=vm.localStorageValues.person.pinCode),vm.localStorageValues.person.cityName&&(dataLayer.city=vm.localStorageValues.person.cityName),customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.callDataLayerContinueJourneyClick=function(){let dataLayer={event:"continue_journey_click",lob:"Car",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"New Flow",quote_id:vm.lastVisitedData.issuedPolicyInfo&&vm.lastVisitedData.issuedPolicyInfo.policyNumber||"NA",phone_number:vm.lastVisitedData.person&&vm.lastVisitedData.person.phoneNumber?motorFourWheelerInsuranceAnalytics.encrypt(vm.lastVisitedData.person.phoneNumber):motorFourWheelerInsuranceAnalytics.encrypt("8888888888"),email:vm.lastVisitedData.person&&vm.lastVisitedData.person.emailId?motorFourWheelerInsuranceAnalytics.encrypt(vm.lastVisitedData.person.emailId):"",registration_number:vm.lastVisitedData.vehicle&&vm.lastVisitedData.vehicle.licensePlateNumber?vm.lastVisitedData.vehicle.licensePlateNumber:"",default_selected_plan:vm.lastVisitedData.selectedPlan?vm.lastVisitedData.selectedPlan:"",plan_premium:vm.lastVisitedData.costBreakUp&&vm.lastVisitedData.costBreakUp.netPremium?vm.lastVisitedData.costBreakUp.netPremium:"",diy_score:vm.localStorageValues&&vm.localStorageValues.diy_score?vm.localStorageValues.diy_score:"NA"};customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.dontKnowRegistrationNumberTab=function(isNewVehicle,bottomForm=!1){carWheelerFormValidation.remove("registration-search"),carWheelerFormValidation.remove("merchant-code"),clearDominarErrorsOnFocus(carWheelerFormValidation);const isGetQuoteMainForm=document.querySelector(".get-quote-main-form");return isGetQuoteMainForm&&"true"===isGetQuoteMainForm.innerText&&newVehicleMobileNumberValidation.addByName("car-term-condition-2",termsValidatorObj),isNewVehicle&&!vm.localStorageValues.phoneNumber?(vm.showMobNumModal=!0,void(vm.showStickyMobNumModal=!0)):isNewVehicle&&vm.localStorageValues.phoneNumber&&!vm.postProposalCalled?vm.isCustomSubmitFlowEnabled()?void(bottomForm?(stickyModalDominarForDontKnowRegNum.remove("car-term-condition-2",termsValidatorObj),onlyLeadSubmitDontKnowRegNum(stickyModalDominarForDontKnowRegNum)):onlyLeadSubmitDontKnowRegNum(carWheelerFormValidation)):void this.motorProposalApi(!0):(!1!==isNewVehicle||vm.localStorageValues.flowType.registrationNumberFlow?vm.localStorageValues.flowType.isDontKnow=!1:vm.localStorageValues.flowType.isDontKnow=!0,void carWheelerFormValidation.validateAll(function(){vm.regCarFlow=!0,vm.localStorageValues.vehicle.isVehicleNew=isNewVehicle,vm.showMobNumModal=!1,vm.showStickyMobNumModal=!1,vm.callDataLayerViewPrice(),vm.localStorageValues.flowType.isCorporatePartnerFlow?vm.callCamundaService():vm.viewPrice()}))},vm.callCamundaService=function(){const url=`${serviceHost}/common/camunda`,data={variables:{flow:{value:"corporate"},Partnerdomain:{value:new URLSearchParams(location.search).get("Partnerdomain")}},key:"defaultemail"},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){if(response.data.length&&response.data.length&&response.data[0].default_email){if(vm.localStorageValues.person.corporateEmailId=response.data[0].default_email.value,vm.localStorageValues.corporatePartnerDetails.partnerDomain=response.data[0].default_email.value.split("@")[1]?.toLowerCase(),!vm.regCarFlow)return void vm.submitInfo();vm.viewPrice()}else vm.uwDeclineModal=!0},function(error){vm.uwDeclineModal=!0})},vm.knowRegistrationNumberTab=function(){carWheelerFormValidation.fields={},carWheelerFormValidation.addByName("registration-search",dynamicValidationForRegistrationNumber)},vm.toggleCard=function(){vm.registrationNumberCardShow=!vm.localStorageValues.vehicle.isVehicleNew&&!vm.registrationNumberCardShow,vm.registrationNumberCardShow?vm.knowRegistrationNumberTab():vm.dontKnowRegistrationNumberTab()},vm.viewPrice=function(){if(vm.localStorageValues.person.phoneNumber=vm.localStorageValues.phoneNumber,vm.isCustomSubmitFlowEnabled())submitNormalForm(carWheelerFormValidation);else if(vm.regCarFlow)carWheelerFormValidation.validateAll(function(){vm.isDisabled=!1,vm.localStorageValues.vehicle.licensePlateNumber="",vm.setLocalStorageValues(),callDataLayerFunctions("LeadSubmit","8888888888",vm.localStorageValues.vehicle.isVehicleNew?"Car new vehicle form":"Car don't know registration form","Car")});else{if(vm.isMissMatchError=!0,vm.isCustomRegError=!0,!vm.partner)return carWheelerFormValidation.validateAll(),void carWheelerFormValidation.validateAll(function(){"Y"!==vm.callerCodeValue&&"YN"!==vm.callerCodeValue||!vm.merchantCode||(vm.localStorageValues.flowType.isCampaignFlow=!0,vm.localStorageValues.campaignAgentCode=vm.merchantCode),vm.localStorageValues.flowType.isCorporatePartnerFlow?vm.callCamundaService():vm.submitInfo()});vm.submitInfo()}},vm.viewPriceStickyModal=function(){vm.localStorageValues.person.phoneNumber=vm.localStorageValues.phoneNumber,vm.isMissMatchError=!0,vm.isCustomRegError=!0,vm.isCustomSubmitFlowEnabled()?submitNormalForm(stickyModalDominar):stickyModalDominar.validateAll(function(){vm.submitInfo()})},vm.submitInfo=function(){if(callDataLayerFunctions("LeadSubmit",this.localStorageValues.phoneNumber,"Car Registration Flow Form","Car"),vm.storedLocalStorageData&&vm.storedLocalStorageData.length){const index=vm.getLocalStorageDataIndex();if(-1!==index)return vm.storedLocalStorageData[index]?.vehicle?.licensePlateNumber?.toLowerCase()===vm.localStorageValues.vehicle.licensePlateNumber.toLowerCase()?void safeWindowOpen(vm.storedLocalStorageData[index].recentPageUrl,"_self"):vm.localStorageValues.flowType.isCorporatePartnerFlow||searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?void vm.getCityFromRto():void vm.fetchRenewalDetails()}vm.localStorageValues.flowType.isCorporatePartnerFlow||searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?vm.getCityFromRto():vm.fetchRenewalDetails()},vm.isPartnerFlow=function(){if(vm.callerCodeValue=searchParams.get("callercoderequired")&&searchParams.get("callercoderequired").toString().toUpperCase(),vm.isPartnerFlow="partner"===getParameter("utm_source"),vm.isFinoImd=getParameter("imdKey")&&"815F4213FCCD0061BE1EF789F5F3EF1D"===getParameter("imdKey").toString().toUpperCase()&&!window.location.href.includes("digit-insurance-for-fino"),vm.isFinoPage=window.location.href.includes("digit-insurance-for-fino"),vm.userName=getParameter("utm_term")&&getParameter("utm_term").split(":")[0],searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")){let mobileNorenewDivNew=document.getElementById("mobileNorenew");mobileNorenewDivNew&&mobileNorenewDivNew.classList.add("media768:flex");let url=`${serviceHost}/storelinkgeneratordata?imdCode=${searchParams.get("imdKey")}&isImdCodeSerch=true&utm_term=${vm.userName}&${(new Date).getTime()}`;var config={responseType:"text",transformResponse:convertStrinToJsonResponse};$http.get(url,config).then(function(response){if(response&&response.data&&"67702398"!==response.data.userId){const partnerMobileNoNew=document.getElementById("partnerMobileNo"),storelinkMobileNoNew=document.getElementById("storelinkMobileNo"),storelinkMobileNoLinkNew=document.getElementById("storelinkMobileNoLink");partnerMobileNoNew&&response?.data?.partnerMobileNo&&(partnerMobileNoNew.textContent=response.data.partnerMobileNo),storelinkMobileNoNew&&response?.data?.partnerMobileNo&&(storelinkMobileNoNew.textContent=response.data.partnerMobileNo),storelinkMobileNoLinkNew&&response?.data?.partnerMobileNo&&storelinkMobileNoLinkNew.setAttribute("href","tel:+91"+response.data.partnerMobileNo)}})}
360else{var mobileNorenewDiv=document.getElementById("mobileNorenew");mobileNorenewDiv&&(mobileNorenewDiv.style.display="none")}!searchParams.get("reg_no")||"20101"!==searchParams.get("product")&&"20102"!==searchParams.get("product")&&"20103"!==searchParams.get("product")&&"20104"!==searchParams.get("product")||(document.getElementsByTagName("body")[0].classList.add("noscroll"),vm.localStorageValues.vehicle.licensePlateNumber=searchParams.get("reg_no"),vm.partner=!0,vm.viewPrice());if(("Y"===vm.callerCodeValue||"YN"===vm.callerCodeValue||vm.isFinoImd)&&(("YN"!==vm.callerCodeValue||vm.isFinoImd)&&(dynamicMerchentCode.rules+="|required"),carWheelerFormValidation.addByName("merchant-code",dynamicMerchentCode)),getParameter("utm_campaign")&&"HERO"===getParameter("utm_campaign").toString().toUpperCase())vm.isHeroPartner=!0,document.querySelectorAll("#addon-content").length&&document.querySelectorAll("#addon-content").forEach(item=>{item.style.display="none"}),document.querySelector("#heroFincorpContainer")&&(document.querySelector("#heroFincorpContainer").style.display="block");else if(vm.localStorageValues.flowType.isCorporatePartnerFlow&&(mobileNumber.rules+="|required"),carWheelerFormValidation.addByName("mobile-number",mobileNumber),"AE093E745F10829BA46FE9DFF11E78CA"===searchParams.get("imdKey")||"916752FEEA11BAC819D3D89F1D8F9B85"===searchParams.get("imdKey")){var storelinkMobileNo=document.getElementById("storelinkMobileNo"),storelinkMobileNoLink=document.getElementById("storelinkMobileNoLink");storelinkMobileNo&&(storelinkMobileNo.textContent="18001034448"),storelinkMobileNoLink&&storelinkMobileNoLink.setAttribute("href","tel:+9118001034448")}vm.isFinoPage&&searchParams.get("mobileNumber")&&""!==searchParams.get("mobileNumber").toString().trim()&&10===searchParams.get("mobileNumber").toString().trim().length&&(vm.localStorageValues.phoneNumber=searchParams.get("mobileNumber").toString().trim())},vm.isPartner=function(){return vm.lastVisitedData?.utmParams?.imdCode||"partner"===getParameter("utm_source")||-1!==vm.lastVisitedData?.sourceUrl?.indexOf("partner")},vm.localStorageValues={gateway:vm.cscPortal,cscUser:vm.code,cscData:vm.cscData,vehicle:{isVehicleNew:!1,licensePlateNumber:"",regionCode:"",vehicleMaincode:"",vehicleIdentificationNumber:"",engineNumber:"",registrationDate:"",make:"",model:"",variant:"",vehicleIDV:{idv:""}},previousInsurer:{previousInsurerCode:"",previousPolicyNumber:"UNKNOWN",previousPolicyExpiryDate:"",isClaimInLastYear:"",previousNoClaimBonus:"",originalPreviousPolicyType:"1OD_1TP",currentThirdPartyPolicy:{isCurrentThirdPartyPolicyActive:!0,currentThirdPartyPolicyNumber:"UNKNOWN",currentThirdPartyPolicyStartDateTime:"",currentThirdPartyPolicyExpiryDateTime:""}},person:{cityName:"",pinCode:"",ownerName:"",emailId:"",phoneNumber:"",nominee:{name:"",relationship:""}},utmParams:getUtmParaMeter(),flowType:{registrationNumberFlow:!1,CityFlow:!1,isCampaignFlow:!1,isAgentPartnerFlow:!1,isCorporatePartnerFlow:!1,isAxisPartner:!1,flowUrlParam:getFlowParam()},sourceUrl:window.location.href,gclid:getParameter("gclid")||"",visitorId:getDynamicCode(),proposalNumber:"",campaignAgentCode:"",product:"Car",visitedTime:(new Date).getTime(),phoneNumber:"",isCorporateOwnershipType:!1,lastVisitedUrl:"",axisRmId:""},vm.defaultSelectOwnershipType=function(){setTimeout(()=>{document.getElementById("new-individual-ownership").checked=!0},150)},vm.getTelesalesData=function(){const url=`${vm.navigationPath}/content/digit-partner-app/block-email-mob.model.json?${(new Date).getTime()}`;$http.get(url).then(function(response){let res=response.data;if(res&&res[":items"]&&res[":items"].root&&res[":items"].root[":items"]&&res[":items"].root[":items"].textaccordian&&res[":items"].root[":items"].textaccordian.headerText){const mobileBlockList=JSON.parse(unwrapContent(res[":items"].root[":items"].textaccordian.headerText));vm.telesalesData=mobileBlockList[":items"].root[":items"].email_mob_json.textAccordionList}else vm.telesalesData=[]},function(error){})},vm.getLocalStorage=function(){const filterdData=[];vm.storedLocalStorageData=[],Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"Car"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).lastVisitedUrl&&JSON.parse(localStorage[key]).visitedTime&&!JSON.parse(localStorage[key]).isGpayFlow&&filterdData.push(JSON.parse(localStorage[key]))}),Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"Car"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).recentPageUrl&&JSON.parse(localStorage[key]).visitedTime&&JSON.parse(localStorage[key]).proposalNumber&&vm.storedLocalStorageData.push(JSON.parse(localStorage[key]))}),filterdData.sort((a,b)=>+new Date(b.visitedTime)-+new Date(a.visitedTime)),filterdData.length&&(vm.lastVisitedData=filterdData[0],vm.lastVisitedData.showSelectedPlan=vm.lastVisitedData.selectedPlan&&vm.capitalizeFirstLetter(vm.lastVisitedData.selectedPlan).replace(/([A-Z])/g," $1").trim())},vm.continueJourney=function(){let activeKey=vm.lastVisitedData.lastVisitedUrl.toString().split("session=")[1];activeKey&&activeKey.includes("&")&&(activeKey=activeKey.toString().split("&")[0]);let localStorageData=activeKey?JSON.parse(localStorage.getItem(activeKey)):"";activeKey&&(localStorageData={...localStorageData,isDropOffCountinue:!0},localStorageData.continueJourney=!0),localStorage.setItem(activeKey,JSON.stringify(localStorageData)),fourWheelerInsuranceAnalytics.continueJourneyOnClick(vm.lastVisitedData&&vm.lastVisitedData.person&&vm.lastVisitedData.person?.phoneNumber,vm.lastVisitedData&&vm.lastVisitedData.person&&vm.lastVisitedData.person?.emailId,vm.lastVisitedData.person?.pinCode,(vm.lastVisitedData.vehicle,`${vm.lastVisitedData.vehicle?.model}`),vm.lastVisitedData.selectedPlan,this.localStorageValues.product,this.lastVisitedData.vehicle&&this.lastVisitedData.vehicle.licensePlateNumber?this.lastVisitedData.vehicle.licensePlateNumber:"",vm.lastVisitedData.lastVisitedUrl),vm.callDataLayerContinueJourneyClick(),safeWindowOpen(vm.lastVisitedData.lastVisitedUrl,"_blank")},vm.getLocalStorageDataIndex=function(){return vm.storedLocalStorageData.findIndex(data=>data.visitorId===getDynamicCode())},vm.motorUpdateProposalApi=function(){if(vm.proposalErrorHandled)return;let url=`${serviceHost}/v3/motor/proposal?${(new Date).getTime()}`,data={visitorId:vm.localStorageValues.visitorId,pinCode:vm.localStorageValues.person.pinCode,proposalId:vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber,product:vm.localStorageValues.product,vehicle:{isVehicleNew:vm.localStorageValues.vehicle.isVehicleNew,licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)}};if("Car"===vm.localStorageValues.product){const isMobileView=window.innerWidth<992;data.additionalDetails={os:operatingSystemName,source:isMobileView?"MOBILE-WEB":"DESKTOP-WEB",utmSource:vm.localStorageValues.utmParam
360s?vm.localStorageValues.utmParams.utmSource:""}}getParameter("merchantId")&&getParameter("sessionId")&&(data.additionalDetails={...data.additionalDetails,merchantId:getParameter("merchantId"),sessionId:getParameter("sessionId")});const headers=new Headers;headers.append("Content-Type","application/json");var config=convertStrinToJsonResponse;config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.put(url,wrapContent(JSON.stringify(data)),config).then(function(response){200===response.status&&(vm.localStorageValues.proposalNumber=data.proposalId,vm.callsuiteCrm(),vm.getVehicleType())},function(error){if(400===error?.status)return vm.proposalErrorHandled=!0,vm.isDisabled=!1,void openProposalErrorModal("car");vm.isDisabled=!1,vm.setLocalStorageValues()})},vm.addValidation=function(){vm.regCarFlow=!1,carWheelerFormValidation.addByName("registration-search",dynamicValidationForRegistrationNumber),("Y"===vm.callerCodeValue||"YN"===vm.callerCodeValue||vm.isFinoImd)&&(("YN"!==vm.callerCodeValue||vm.isFinoImd)&&(dynamicMerchentCode.rules+="|required"),carWheelerFormValidation.addByName("merchant-code",dynamicMerchentCode))},vm.submitMobileNumber=function(){vm.isCustomSubmitFlowEnabled()?onlyLeadSubmitDontKnowRegNum(newVehicleMobileNumberValidation):submitMobileDontKnowRegNum(newVehicleMobileNumberValidation)},vm.submitStickyMobileNumber=function(){stickyModalDominarForDontKnowRegNum.remove("car-term-condition-2"),vm.isCustomSubmitFlowEnabled()?onlyLeadSubmitDontKnowRegNum(stickyModalDominarForDontKnowRegNum):submitMobileDontKnowRegNum(stickyModalDominarForDontKnowRegNum)},vm.addValidationForContuniueJourney=function(){const visitedTime=new Date(vm.lastVisitedData?.visitedTime);return(new Date-visitedTime)/864e5<=7},document.getElementById("car-tab")&&(document.getElementById("car-tab").onclick=()=>{setTimeout(()=>{vm.localStorageValues.visitorId=getDynamicCode()},200)}),vm.checkForCorporatePartnerFlow=function(){"corporate"===new URLSearchParams(location.search).get("flow")?.toLowerCase()&&(vm.localStorageValues.flowType.isCorporatePartnerFlow=!0,vm.localStorageValues.corporatePartnerDetails={partnerName:new URLSearchParams(location.search).get("Partnerdomain")})},vm.isAxisPartner=function(){"axis"===getParameter("utm_campaign")?.toLowerCase()&&(vm.localStorageValues.flowType.isAxisPartner=!0,vm.localStorageValues.axisRmId=getParameter("agentId"))},vm.isSpCode=function(){if(window.location.href.includes("spid")){const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};let data={spCode:getParameter("spid")};var url=serviceHost+"/v3/motor/sp-codes/validate"+`?${getTimeStamp()}`;$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){vm.isSpcodeval=!1,vm.localStorageValues.encryptedSpCode=response.data.encryptedSpCode,vm.localStorageValues.spCode=response.data.spCode,vm.localStorageValues.spRmId=getParameter("agentId")},function(error){vm.spCodeErrorModal=!0,vm.isSpcodeval=!0})}},vm.closeUwModal=function(){vm.uwDeclineModal=!1,vm.spCodeErrorModal=!1,location.reload()};const newCarFlowDefult=document.querySelector(".new-vehicle-new-car");newCarFlowDefult&&"true"===newCarFlowDefult.innerText.trim()&&(vm.dontKnowRegistrationNumberTab(!0),vm.hideCarLoader=!0),vm.callDataLayerError=function(errorMsg){let dataLayer={event:"web_service_error",lob:"Car",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"New Flow",webserviceerror_name:errorMsg,webserviceerror_url:vm.propName,userId:vm.localStorageValues.visitorId,diy_score:vm.localStorageValues&&vm.localStorageValues.diy_score?vm.localStorageValues.diy_score:"NA"};vm.localStorageValues.vehicle.licensePlateNumber&&(dataLayer.registration_number=vm.localStorageValues.vehicle.licensePlateNumber),vm.localStorageValues.person.phoneNumber&&(dataLayer.phone_number=vm.localStorageValues.person.phoneNumber),customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.isAutomationTool=function(){const navigatorProperties=["webdriver","__nightmare","callPhantom","_phantom","chrome","domAutomation","domAutomationController"];for(const prop of navigatorProperties)if(navigator[prop])return vm.propName=prop,!0;return!1},vm.detectScriptInjection=function(){const originalScripts=document.scripts;setInterval(()=>{document.scripts.length!==originalScripts.length&&vm.callDataLayerError("Potential script injection detected!")},1e3)},vm.validateResourceIntegrity=function(){[{url:"/path/to/critical.js",expectedHash:"expectedHashValue"}
360].forEach(resource=>{fetch(resource.url).then(response=>response.text()).then(data=>{sha256(data)!==resource.expectedHash&&vm.callDataLayerError("Resource integrity check failed!")})})},vm.detectAutomationTool=function(){vm.isAutomationTool()&&vm.callDataLayerError("Browser automation tool detected!")},vm.checkTurnStileFunction=function(){const token=turnstile.getResponse();if(token){const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};let data={response:token};var url=serviceHost+"/cloudFlare/verification";$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){(response.data.success||token)&&(vm.isBotAllow=!0,vm.tokenCheckInterval&&$interval.cancel(vm.tokenCheckInterval))},function(error){token&&(vm.isBotAllow=!0)})}},vm.startTokenCheckInterval=function(){vm.tokenCheckInterval=$interval(vm.checkTurnStileFunction,500)},vm.checkIfButtonDisabled=function(){return vm.isAutomationTool()&&(vm.isDisabled||!vm.isBotAllow||!vm.localStorageValues.vehicle.licensePlateNumber||vm.localStorageValues.vehicle.licensePlateNumber.length<6)||!vm.isAutomationTool()&&(vm.isDisabled||!vm.localStorageValues.vehicle.licensePlateNumber||vm.localStorageValues.vehicle.licensePlateNumber.length<6)},vm.callCamundaForAddons=function(motorResponse){this.serviceRequest=!0;const isPartner=vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&vm.localStorageValues.utmParams.imdCode,addonPayloadReq={variables:{LOB:{value:"4W"},Premium:{value:0},Age:{value:getDateDiffInYears(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date)},Current_NCB:{value:0},OSN:{value:0},isRenewalFlow:{value:!1},isRolloverFlow:{value:!isPartner},isPartnerFlow:{value:!isPartner},isDirectFlow:{value:!isPartner},IMD_Key:{value:vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.imdCode?vm.localStorageValues.utmParams.imdCode:""},isMobileflow:{value:!(!vm.localStorageValues.utmParams||"digit_mobileapp"!==vm.localStorageValues.utmParams.utmSource)}},key:"addon_config"};let url=`${serviceHost}/common/camunda`;const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(addonPayloadReq)),config).then(function(response){response.data?.length&&(vm.localStorageValues.addonHide=response.data[0]?.Addon_hide_on_plan_page?.value.split(","),vm.localStorageValues.addonOrder=response.data[0]?.Addon_Order?.value.split(","),vm.localStorageValues.addonPreSelection=vm.preparePreSelectionAddons(response.data[0]?.Pre_selected_addon_on_plan_page?.value),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues))),vm.callCamundaForPyp(motorResponse)},err=>{vm.callCamundaForPyp(motorResponse)})},vm.preparePreSelectionAddons=function(addonData){const dataList=addonData?.split(",");let preferredAddons=[];return dataList&&dataList.forEach(element=>{preferredAddons.push({value:0,selection:!0,componentNumber:element})}),preferredAddons},vm.callCamundaForPyp=function(motorResponse){let url=`${serviceHost}/common/camunda`;const data=camundaPypReqData("Bike"===vm.localStorageValues.product?"2W":"Car"===vm.localStorageValues.product?"4W":"CV",motorResponse.vehicleRegDate,motorResponse.osn,motorResponse.insuranceUpto),headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){response.data?.length&&(vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=response.data[0].previousPolicyExpiryDate.value,vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=response.data[0].currentThirdPartyPolicyStartDateTime.value,vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=response.data[0].currentThirdPartyPolicyExpiryDateTime.value,vm.localStorageValues.previousInsurer.originalPreviousPolicyType=response.data[0].originalPreviousPolicyType.value,"Car"===vm.localStorageValues.product&&(vm.localStorageValues.planPageLoaded=!1,vm.localStorageValues.changeInPlan&&(vm.localStorageValues.isNoDataFound=!0),vm.localStorageValues.previousPolicyIsComp=!0,vm.localStorageValues.previousPolicyonlyTp=!1,vm.localStorageValues.isPypChange=!0,vm.localStorageValues.finalPageReached=!0),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.redirectPage(!1))},err=>{})},vm.openModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteSticky&&(getQuoteSticky.classList.add("open"),getQuoteSticky.classList.remove("close"),isMobileView&&document.body.classList.add("scroll-disabled"))},vm.closeModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteSticky&&(getQuoteSticky.classList.remove("open"),getQuoteSticky.classList.add("close"),isMobileView&&document.body.classList.remove("scroll-disabled"))},vm.fourWhellerReferrral=function(){if(getParameter("utm_source")&&"thank-you-referral"===getParameter("utm_source").toLowerCase()){let dataLayer={event:"4w_referral",userId:getCookie("visitorId"),lob:vm.localStorageValues.product||"Car",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",registration_number:vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.licensePlateNumber?vm.localStorageValues.vehicle.licensePlateNumber:"NA",flow_type:"reg"===vm.localStorageValues.flowJourney?"vahan_flow":vm.localStorageValues.vehicle.isVehicleNew?"New Flow":"city_flow",phone_number:vm.localStorageValues.phoneNumber?motorFourWheelerInsuranceAnalytics.encrypt
360(vm.localStorageValues.phoneNumber):motorFourWheelerInsuranceAnalytics.encrypt("8888888888"),source:window.location.href,diy_score:vm.localStorageValues&&vm.localStorageValues.diy_score?vm.localStorageValues.diy_score:"NA"};customPageViewdataLayerGoogleAnalytics(dataLayer)}},vm.init=function(){vm.getUniqueSessionValue(),vm.fourWhellerReferrral(),vm.isAutomationTool()&&vm.startTokenCheckInterval(),vm.toggleCard(),vm.checkForCorporatePartnerFlow(),vm.isPartnerFlow(),vm.isDisabled=!1,vm.getTelesalesData(),vm.getLocalStorage(),vm.isAxisPartner(),setTimeout(()=>{vm.isSpCode()},200),vm.mobileDevice=mobileDevice,vm.partnerLogoObj=partnerLogoObj[new URLSearchParams(location.search).get("utm_campaign")?.toLowerCase()],vm.isMuthootLogo="1117563"===new URLSearchParams(location.search).get("utm_campaign");const partnerContainer=document.getElementById("heroFincorpContainer");vm.partnerLogoObj&&vm.isPartnerFlow&&partnerContainer&&!vm.isMuthootLogo?(partnerContainer.style.display="flex",document.getElementById("partnerContent").innerText=vm.partnerLogoObj.content,document.getElementById("partnerImg").src=vm.partnerLogoObj.imgLink):partnerContainer&&(partnerContainer.style.display="none"),vm.addingValidatorForCustomFlow(),vm.detectScriptInjection(),vm.validateResourceIntegrity(),vm.detectAutomationTool()},vm.init();const modalOutter=document.querySelector(".modal-outer .btn-primary");window.location.href.includes("utm_medium=SIB")&&modalOutter&&modalOutter.classList.add("sib-btn");const btnFooterFloating=document.querySelector(".getquote-section .floating-button"),bottomStripe=document.querySelector(".getquote-section .stripe-floating-view");if(btnFooterFloating){const viewInstantQuoteSection=document.querySelector(".view-instant-quote");viewInstantQuoteSection&&(viewInstantQuoteSection.style.display="none");const arrowUp=document.querySelector(".bottom-side-scroller");window.addEventListener("scroll",()=>{window.scrollY>=400?(btnFooterFloating.classList.add("visible-floating-button"),arrowUp&&arrowUp.classList.add("move-arrow-up-old")):(btnFooterFloating.classList.remove("visible-floating-button"),arrowUp&&arrowUp.classList.remove("move-arrow-up-old"))})}window.innerWidth>992&&bottomStripe&&window.addEventListener("scroll",()=>{window.scrollY>=400?bottomStripe.classList.contains("close")||(btnFooterFloating.classList.remove("visible-floating-button"),bottomStripe.classList.add("open")):bottomStripe.classList.remove("open")})}); 361const encryptMobileHome="l0ckIt!";digitalData.page.pageInfo.platform="Home Insurance",digitalData.homeinsurance={};const homeInsuranceAnalytics={trackGetQuote:function(userInfo){digitalData.producttype="Home Insurance",digitalData.homeinsurance.propertyType=userInfo.propertyType,digitalData.standard.mobileNumber=encrypt(userInfo.MobileNum),_satellite.track("home_insurance_getquote")},encrypt:function(plainText){return AesCtrMethod.encrypt(plainText,encryptanalytics,256)}};digitapp.controller("shopInsuranceController",["$scope","$http","$q","$location","$timeout","$window",function($scope,$http,$q,$location,$timeout,$window){$scope.propertyType="Owned";let vm=this;$scope.homePin="",$scope.homeMobile="",$scope.pincodePendingHome=!1,$scope.homeMobileCookies="",$scope.mobilNumRegex=/^[6789].*/,$scope.hometermsAgree=!0,$scope.homeLocInfo="",$scope.homePinCode=!1,$scope.isNativeFlow=!1,$scope.mobInputType="tel",$scope.partnerLogoObj=partnerLogoObj[new URLSearchParams(location.search).get("utm_campaign")?.toLowerCase()],$scope.isMuthootLogo="1117563"===new URLSearchParams(location.search).get("utm_campaign"),$scope.merchantCode="",vm.isPartnerFlow="partner"===getParameter("utm_source");const partnerContainer=document.getElementById("heroFincorpContainer");$scope.partnerLogoObj&&!$scope.isMuthootLogo&&partnerContainer?(partnerContainer.style.display="flex",document.getElementById("partnerContent").innerText=$scope.partnerLogoObj.content,document.getElementById("partnerImg").src=$scope.partnerLogoObj.imgLink):partnerContainer&&(partnerContainer.style.display="none"),$scope.init=function(){$scope.hometermsAgree=!0,$scope.loadeSvg=!1,$scope.loadTxt=!0,$scope.getCookieValueForHome(),$scope.nativeRedirection(),$scope.SIBFlow(),$scope.checkbtn($scope.propertyType)},$scope.SIBFlow=function(){return $scope.isSIBPage=window.location.href.includes("utm_source=partner&utm_medium=SIB&utm_campaign=1170920")},$scope.checkbtn=function(option){$scope.propertyType=option,vm.radioChecked="Owned"!=option},$scope.nativeRedirection=function(){let url=new URL(window.location.href),searchParams=new URLSearchParams(url.search);searchParams.get("propertyType")&&searchParams.get("mobileNum")&&searchParams.get("pinCode")&&($scope.isNativeFlow=!0,$scope.propertyType=searchParams.get("propertyType").toString().toLowerCase().includes("owned")?"Owned":"Rented",$scope.homeMobile=searchParams.get("mobileNum"),$scope.homePin=parseInt(searchParams.get("pinCode")),$scope.validatePinCode(homeNewFormValidation))},$scope.checkNativeFlow=function(){return!!(searchParams.get("propertyType")&&searchParams.get("mobileNum")&&searchParams.get("pinCode"))},$scope.termsConditionChange=function(){$scope.hometermsAgree=!$scope.hometermsAgree},$scope.getCookieValueForHome=function(){if(cookieValue=readCookieForDirectHomePage(),cookieValue){cookiearray=cookieValue.split(";");for(var i=0;i<cookiearray.length;i++)fieldName=cookiearray[i].split("=")[0].trim(),fieldValue=cookiearray[i].split("=")[1].trim(),"digitQf_pincode_home"===fieldName?$scope.homePin=parseInt(fieldValue):"digitQf_mobile_home"===fieldName?($scope.homeMobile=maskedValue(fieldValue),$scope.mobInputType="text",$scope.homeMobileCookies=fieldValue):"digitQf_propertyType_home"===fieldName&&($scope.propertyType=fieldValue)}};
361let homePincodeDominar={rules:"required|size:6|invalidHomePincode",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter Pin Code",size:"Enter valid Pin Code",invalidHomePincode:"Enter Valid Pin Code"}},homeMobileDominar={rules:"required|isHomeMobileNumberValid",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter Mobile Number",isHomeMobileNumberValid:"Enter Valid Mobile Number"}},dynamicMerchentCode={rules:"min:6|max:15",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter merchant code",min:"Please enter valid merchant code",max:"Please enter valid merchant code"}},homeNewForm=document.getElementById("homeformNew"),homeNewFormValidation=new Dominar(homeNewForm,{"pincode-name":homePincodeDominar,"mobile-number":homeMobileDominar,"terms-and-condition":{rules:"required",container:".input-field-wrapper",feedback:!1,triggers:["change"],customMessages:{required:"Please accept the T&C"}}}),getQuoteStickyHome=document.getElementById("getquote-bottom-sticky"),stickyFormHome=new Dominar(getQuoteStickyHome,{"pincode-name":homePincodeDominar,"mobile-number":homeMobileDominar});Dominar.Validator.register("isHomeMobileNumberValid",function(value){let validNumber=10==value.length||13==value.length;if(validNumber){var numberArray=value.split("");validNumber=parseInt(numberArray[0])>5}return!!validNumber}),Dominar.Validator.registerAsync("invalidHomePincode",function(value,attribute,parameters,passes){return!vm.responseError&&$scope.homeError?passes(vm.responseError,"we are not present here"):vm.responseError?passes(!0):passes(vm.responseError,"Enter valid Pin Code"),vm.responseError}),$scope.validPin=function(){vm.responseError=!0,homeNewFormValidation.validate("pincode-name")},$scope.validPinSticky=function(){vm.responseError=!0,stickyFormHome.validate("pincode-name")},$scope.getUniqueSessionValue=function(){let randomNumber=(new Date).getTime();randomNumber=(randomNumber=encrypt(randomNumber)).replace(/[0-9]/g,""),$scope.uniqueSessionValue=randomNumber.replace(/[^a-zA-Z ]/g,"")},$scope.validatePinCode=function(formNameHome){if($scope.homePin&&6==$scope.homePin.toString().length){$scope.pincodePendingHome=!0,$scope.loadeSvg=!0,$scope.loadTxt=!1;let url=`${serviceHost}/state/${$scope.homePin}`;var config={responseType:"text",transformResponse:convertStrinToJsonResponse};$http.get(url,config).then(res=>{200==res.status&&($scope.city=res.data[0].name,$scope.rto=res.data[0].stateCode,$scope.country=res.data[0].countryCode,$scope.homeLocInfo=res.data[0],$scope.homeError="jammu and kashmir"===$scope.homeLocInfo.state.toLowerCase(),$scope.homeError&&(vm.responseError=!1),formNameHome.validateAll(),$scope.setLocalStoreage(),$scope.loadeSvg=!1,$scope.loadTxt=!0)},err=>{400==err.status&&(vm.responseError=!1,formNameHome.validate("pincode-name"),$scope.pincodePendingHome=!1,$scope.loadTxt=!0,$scope.loadeSvg=!1)})}},$scope.getHomeMobileNo=function(){return $scope.homeMobile&&!$scope.homeMobile.toString().includes("*")?$scope.homeMobile:$scope.homeMobileCookies},$scope.resetValueIfCookieData=function(){$scope.mobInputType="tel",$scope.homeMobile&&$scope.homeMobile.toString().includes("*")&&($scope.homeMobile="")},$scope.setLocalStoreage=function(){$scope.getUniqueSessionValue();let localStorageValues={propertyType:$scope.propertyType,pincodeInfo:$scope.homeLocInfo,MobileNum:$scope.getHomeMobileNo(),utmSrc:getParameter("utm_source"),gclid:getParameter("gclid")||"",sourceUrl:location.href,externalPolicyNumber:$scope.merchantCode||""};localStorageValues.utmParams={utmSrc:getParameter("utm_source")||"",utmMedium:getParameter("utm_medium")||"",utmCampaign:getParameter("utm_campaign")||"",utmContent:getParameter("utm_content")||"",utmTerm:getParameter("utm_term")||"",utmValue:getParameter("utm_value")||"",imdCode:getParameter("imdKey")||""},localStorage.setItem($scope.uniqueSessionValue,JSON.stringify(localStorageValues));let url=new URL(window.location.href),searchParams=new URLSearchParams(url.search);Moengage.track_event("Home: View Prices",{"Mobile Number":"91"+$scope.getHomeMobileNo(),PinCode:$scope.homeLocInfo,"Product Level 2":"Home","Entry Page URL":"https://www.godigit.com/property-insurance/home-insurance",utm_source:searchParams.get("utm_source"),utm_medium:searchParams.get("utm_medium"),utm_campaign:searchParams.get("utm_campaign"),utm_content:searchParams.get("utm_content")}),Moengage.add_user_attribute("user_generation_source","web");const sessionStorageLob1=sessionStorage.getItem("lobChecked"),liTermsOne=sessionStorageLob1?JSON.parse(sessionStorageLob1)?.lob.property:"";let dataLayer={event:"view_price_click",lob:"home",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"old flow",phone_number:encrypt($scope.getHomeMobileNo()),pincode:$scope.homePin,city:$scope.city,rto:$scope.rto,country:$scope.country,source:window.location.href,status:liTermsOne?"both":"onlygi"};customPageViewdataLayerGoogleAnalytics(dataLayer),$scope.convoxCallHome(),callDataLayerFunctions("LeadSubmit",$
361scope.getHomeMobileNo(),"Home Insurance Form","Home")},$scope.propertType=function(){""===$scope.propertyType&&void 0===$scope.propertyType||($scope.homePinCode=!0)},$scope.checkPincodeValid=function(){return $scope.homePin&&6==$scope.homePin.toString().length},$scope.convoxCallHome=function(){const queryData=new URLSearchParams(window.location.search),convoxHomeData={action:"DATAUPLOAD",data:[{mobile:$scope.getHomeMobileNo(),first_name:"",middle_name:"",last_name:"",date_of_birth:"",gender:"",designation:"",email_id:"",property_type:"",recommended_sum_insured:"",building_area:"",building_value:"",value_of_content:"",rate_per_sq_ft:"",finished_goods_value:"",furnitures_and_fittings_value:"",plan_type:"",premium:"",pucca_construction:"",floor:"",construction_year:"",address:"",loan_taken:"",pan_card:"",shop_category:"",age_of_property:"",registered_shop_name:"",losses_claim_in_3_years:"",company_registered_india:"",job_category:"",machinery_type:"",value_si_machinery:"",product_type:"",plants_machinery_value:"",raw_material_value:"",stocks_value:"",total_assets_value:"",plan_1_guard:"",plan_2_guard:"",add_on_1:"",add_on_2:"",add_on_3:getParameter("gclid")||"",add_on_4:"",final_premium:"",land_mark:"",own_rent_space:$scope.propertyType||"",business_assets:"",must_have_recommendations:"",good_to_have_recommendations:"",city:"",state:"",pin_code:$scope.homePin,email:"",companyName:"",phoneNumber:"",Business_category:"",landingpage:window.location.href,productName:"Home Insurance",noOfEmployees:"",Source:"",utmSource:queryData.get("utm_source")||"",utmMedium:queryData.get("utm_medium")||"",utmCampaign:queryData.get("utm_campaign")||"",utmContent:queryData.get("utm_content")||"",utmTerm:queryData.get("utm_term")||"",AdobeID:"",MoEngageID:"",Real_time_or_Manually_upload:"",visitorId:getCookie("visitorId"),enquirydatetime:(new Date).toLocaleString()}],refno:"12568",process:"COMMERCIAL_LINES"};$scope.pincodePendingHome=!0;let url=`${serviceHost}/convox/sendData/commercialLines`;$http.post(url,manageWrapping.wrapContent(JSON.stringify(convoxHomeData))).then(function(response){$scope.redirectPage()},function(error){$scope.redirectPage()}),setTimeout(()=>{$scope.redirectPage()},1e4)},$scope.redirectPage=function(){if(!$scope.homeError){const redirectUrlHomeNew=`/property-insurance/home-insurance/home-flow/plans-page?session=${$scope.uniqueSessionValue}`,delay=$scope.isNativeFlow?4e3:0;setTimeout(()=>{location.href=redirectUrlHomeNew},delay)}},vm.submitHomeInfo=function(){homeNewFormValidation.validateAll(function(){$scope.validatePinCode(homeNewFormValidation)})},vm.submitHomeInfoNew=function(){stickyFormHome.validateAll(function(){$scope.validatePinCode(stickyFormHome)})},$scope.checkCallercoderequiredFlow=function(){let url=new URL(window.location.href),searchParams=new URLSearchParams(url.search);if(searchParams.get("callercoderequired"))switch(searchParams.get("callercoderequired").toString().toUpperCase()){case"YN":return $scope.isCallercoderequiredFlowOptional=!0,void($scope.isCallercoderequiredFlow=!1);case"Y":return $scope.isCallercoderequiredFlow=!0,$scope.isCallercoderequiredFlowOptional=!1,dynamicMerchentCode.rules+="|required",void homeNewFormValidation.addByName("merchant-code",dynamicMerchentCode);default:return $scope.isCallercoderequiredFlow=!1,void($scope.isCallercoderequiredFlowOptional=!1)}},vm.openModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyHome&&(getQuoteStickyHome.classList.add("open"),getQuoteStickyHome.classList.remove("close"),isMobileView&&document.body.classList.add("scroll-disabled"))},vm.closeModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyHome&&(getQuoteStickyHome.classList.remove("open"),getQuoteStickyHome.classList.add("close"),isMobileView&&document.body.classList.remove("scroll-disabled"))},$scope.init(),$scope.checkCallercoderequiredFlow();const btnFooterFloatingHome=document.querySelector(".getquote-section .floating-button"),bottomStripe=document.querySelector(".getquote-section .stripe-floating-view");if(btnFooterFloatingHome){const viewInstantQuoteSection=document.querySelector(".view-instant-quote");viewInstantQuoteSection&&(viewInstantQuoteSection.style.display="none");const arrowUp=document.querySelector(".bottom-side-scroller");window.addEventListener("scroll",()=>{window.scrollY>=400?(btnFooterFloatingHome.classList.add("visible-floating-button"),arrowUp&&arrowUp.classList.add("move-arrow-up-old")):(btnFooterFloatingHome.classList.remove("visible-floating-button"),arrowUp&&arrowUp.classList.remove("move-arrow-up-old"))})}window.innerWidth>992&&bottomStripe&&window.addEventListener("scroll",()=>{window.scrollY>=400?bottomStripe.classList.contains("close")||(btnFooterFloatingHome.classList.remove("visible-floating-button"),bottomStripe.classList.add("open")):bottomStripe.classList.remove("open")})}]),digitapp.directive("restrictTo",function(){return{restrict:"A",link:function(scope,element,attrs){var re=RegExp(attrs.restrictTo),exclude=/Backspace|Enter|Tab|Delete|Del|ArrowUp|Up|ArrowDown|Down|ArrowLeft|Left|ArrowRight|Right/;element[0].addEventListener("keydown",function(event){exclude.test(event.key)||re.test(event.key)||event.preventDefault()})}}}),digitapp.directive("focusClass",function(){return{link:function(scope,elem,attrs){elem.find("input").on("focus",function(){elem.addClass(attrs.focusClass)}).on("blur",function(){elem.removeClass(attrs.focusClass)})}}}),digitapp.directive("nextField",function($timeout){return{scope:{trigger:"=nextField"},link:function(scope,element){scope.$watch("trigger",function(value){!0===value&&(element[0].focus(),scope.trigger=!1)})}}});
362digitapp.controller("travelHomeCtrl",["$scope","$http","$location","$timeout","InternationalTravelService",function($scope,$http,$location,$timeout,InternationalTravelService){let vm=this;vm.countriesPending=!1;var styledDatePickers=[];vm.startdateBorder,vm.countryValue=[],vm.pageType,vm.enddateBorder,vm.countryCursorValidation=!1,vm.startDateErrorValid=!1,vm.endDateErrorValid=!1,vm.isMobile,vm.countryListTempValue,vm.unavailableCountryImg="",vm.unavailableCountry=!1,vm.countriesUnavailableModalShow=!1,vm.isGeographyTabSelected=!1,vm.isCountryTabSelected=!0,vm.userMultiTripFlow=!1,vm.isHideCountryForm=!1,vm.loader=!0,vm.tabslected=!1,vm.multiSelcted=!1,vm.appsFlyerData={},vm.PopularCities=!1,vm.geographyList=[{name:"Worldwide excluding US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"WOR",listOfCountries:["PT"]},{name:"Worldwide including US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"UCC",listOfCountries:["CA"]},{name:"Asia excluding Japan & Korea",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"ASI",listOfCountries:["ID"]}],vm.selectedGeoGraphy="",vm.isCountriesFetched=!1,vm.isTravelProductPage=window.location.href.includes("travelbuyflow"),vm.phoneNumber,vm.duration,vm.isMultiTrip=!1,vm.isSingleTrip=!0,vm.showMultiTripInfo=!1,vm.showDropdown=!1,vm.travellerList=[{name:"1",selection:!0}
362,{name:"2",selection:!1},{name:"3",selection:!1},{name:"4",selection:!1},{name:"5 or more",selection:!1}],vm.travellerCount=1,vm.durationList=["1 to 30 days","1 to 45 days","1 to 60 days","1 to 90 days"],vm.partnerLogoObj=partnerLogoObj[new URLSearchParams(location.search).get("utm_campaign")?.toLowerCase()],vm.isSIBPage=window.location.href.includes("utm_source=partner&utm_medium=SIB&utm_campaign=1170920");let getQuoteStickyTravel=document.getElementById("getquote-bottom-sticky");const partnerContainer=document.getElementById("heroFincorpContainer");$scope.partnerLogoObj&&partnerContainer?(partnerContainer.style.display="flex",document.getElementById("partnerContent").innerText=$scope.partnerLogoObj.content,document.getElementById("partnerImg").src=$scope.partnerLogoObj.imgLink):partnerContainer&&(partnerContainer.style.display="none");const isMultiTripFlowNew=document.querySelector(".travel-trip-type-new");isMultiTripFlowNew&&"true"===isMultiTripFlowNew.innerText.trim()&&(vm.isSingleTrip=!1,vm.isGeographyTabSelected=!0,vm.isCountryTabSelected=!1,vm.userMultiTripFlow=!0,vm.geographyList=[{name:"Worldwide Including US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"UCC",listOfCountries:["CA"]},{name:"Worldwide excluding US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"WOR",listOfCountries:["PT"]}]);document.querySelector(".getquote-section")||(vm.PopularCities=!0),vm.delete_cookie=function(name){document.cookie=name+"=; Path=/; Expires="+(new Date).toDateString()};const departureDateObject={rules:"required|isDepartureDateValid",container:".searchfield-input",feedback:!1,triggers:[!1],customMessages:{required:"Select your departure date",isDepartureDateValid:"Please select a valid departure date"}},durationDueObject={rules:"required",container:".duration-input",feedback:!1,triggers:[!1],customMessages:{required:"Please select duration",isDepartureDateValid:"Please select a valid policyStartDate"}},travelMobileNumberObject={rules:"isMobileNumberValid",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{isMobileNumberValid:"Sorry, that mobile number looks incorrect"}};let travelForm=document.getElementsByClassName("travel-home-desktop")[0],validationObject={"departure-date":departureDateObject,"return-date":{rules:"required|isReturnDateValid",container:".searchfield-input",feedback:!1,triggers:[!1],customMessages:{required:"Select your return date",isReturnDateValid:"Please select a valid return date"}},"travel-term-condition":{rules:"required",container:".input-form-group",feedback:!1,triggers:["focusout","change"],customMessages:{required:"Please accept the T&C"}},"mobile-number":travelMobileNumberObject},countryForm=document.getElementsByClassName("travel-home-desktop")[0],countryValidationObject={"country-name":{rules:"required|isCountryFromList",container:".searchfield-input",feedback:!1,triggers:[!1],customMessages:{required:"Please select at least 1 country",isCountryFromList:"Please select countries from list"}}},validationMultiObject={"departure-date":departureDateObject,"mobile-number":travelMobileNumberObject};const stickyFormTravel=document.getElementById("getquote-bottom-sticky");let travelFormValidation=new Dominar(travelForm,validationObject),tripSelectMultiValidation=new Dominar(travelForm,validationMultiObject),countryFormValidation=new Dominar(countryForm,countryValidationObject),travelStickyFormValidation=new Dominar(stickyFormTravel,validationObject),countryStickyFormValidation=(new Dominar(stickyFormTravel,validationMultiObject),new Dominar(stickyFormTravel,countryValidationObject));clearDominarErrorsOnFocus(travelFormValidation),clearDominarErrorsOnFocus(tripSelectMultiValidation),clearDominarErrorsOnFocus(countryFormValidation),vm.setCountryFieldValue=function(fieldValue){fieldValue=fieldValue.replaceAll("%20"," "),vm.countriesListArr=fieldValue.split("%2C"),vm.countriesListArr=vm.countriesListArr.map(country=>country.trim()),vm.countryCursor=vm.countriesListArr,vm.countriesList=fieldValue.replaceAll("%2C",", ")},vm.selectTravellers=function(count){count.selection=!0,vm.travellerList.map(traveller=>{traveller.name==count.name?traveller.selection=count.selection:traveller.selection=!count.selection})},vm.setupAutoCompleteTravel=function(countryInput,inputPlaceTravel,countryOptionWrapper,countriesListCopy){new CustomSearchField({selector:countryInput,minChars:3,disableModalSuggestions:!0,data:countriesListCopy,width:inputPlaceTravel?.parentElement?.getBoundingClientRect().width||216,offsetTop:countryOptionWrapper?.getBoundingClientRect().bottom-inputPlaceTravel?.getBoundingClientRect().bottom-0||24,menuClass:"scrollbar-thin",offsetLeft:-16,onSelect:function(i,term,item){var alreadyAdded=-1!==vm.countriesListArr.indexOf(term);vm.selectCountry(term,13===i.keyCode,13===i.keyCode),$timeout(function(){alreadyAdded&&(vm.alreadySelectedCountry=term,$timeout(function(){vm.alreadySelectedCountry=void 0},500))},500)},noResultsResponse:"Not found",maxHeight:128,borderPosition:"top"}).init()};let screenWidth=window.innerWidth;
362function createModalDateInputs(containerNewTemplate,elementTwo){containerNewTemplate.innerHTML="";const startInput=document.createElement("input");startInput.type="text",startInput.name="departure-date",startInput.id=elementTwo?"calendar-start1":"calendar-start",startInput.className="calendar_input",startInput.setAttribute("parent-ele-dominar","searchfield-input"),startInput.setAttribute("readonly","readonly"),startInput.setAttribute("read-format","true"),startInput.setAttribute("autocomplete","off");const endInput=document.createElement("input");endInput.type="text",endInput.name="return-date",endInput.id=elementTwo?"calendar-end1":"calendar-end",endInput.className="calendar_input",endInput.setAttribute("parent-ele-dominar","searchfield-input"),endInput.setAttribute("readonly","readonly"),endInput.setAttribute("read-format","true"),endInput.setAttribute("autocomplete","off"),containerNewTemplate.appendChild(startInput),containerNewTemplate.appendChild(endInput)}vm.isMobile=screenWidth<=768,vm.countries=[],vm.getCountriesList=function(){vm.countriesPending=!0,InternationalTravelService.getCountriesList().then(function(response){vm.countries=response.data.options,vm.countries=vm.countries.map(function(a){return a.label.includes("_N")&&(a.label=a.label.split("_N")[0]),a}),vm.getCountriesFromCamunda(),localStorage.setItem("countriesList",JSON.stringify(vm.countries));var countriesListCopy=vm.countries.map(function(a){return a.label}),index=countriesListCopy.indexOf("India");countriesListCopy.splice(index,1);var countryInput=document.querySelector("#country_name"),geographyInput=document.querySelector("#geographInput"),countryOptionWrapper=document.querySelector("#country-option-wrapper");if(countryInput&&vm.setupAutoCompleteTravel(countryInput,vm.userMultiTripFlow?geographyInput:countryInput,countryOptionWrapper,countriesListCopy),stickyFormTravel){var countryInput1=document.querySelector("#country_name1"),geographyInput1=document.querySelector("#geographInput1"),countryOptionWrapper1=document.querySelector("#country-option-wrapper1");countryInput1&&vm.setupAutoCompleteTravel(countryInput1,vm.userMultiTripFlow?geographyInput1:countryInput1,countryOptionWrapper1,countriesListCopy)}vm.countriesPending=!1},function(error){})},0===vm.countries.length&&vm.getCountriesList(),vm.getCountriesFromCamunda=function(){vm.countriesPending=!0,InternationalTravelService.getCountriesFromCamunda().then(function(response){vm.popularCountries=response.data.map(country=>country.Country_Name.value),vm.countriesPending=!1},function(error){})},vm.startDateChange=function(){if(vm.startDate||vm.policyStartDate){var minDate=new Date(vm.getPerfectDate(vm.startDate,!1));minDate.setDate(minDate.getDate()+1),minDate=new Date(minDate),styledDatePickers[1].setMinDate(minDate);var maxDate=new Date(vm.getPerfectDate(vm.startDate,!1));1==vm.blsflow?maxDate.setDate(maxDate.getDate()+164):maxDate.setDate(maxDate.getDate()+179),maxDate=new Date(maxDate),styledDatePickers[1].setMaxDate(maxDate),styledDatePickers[1].gotoDate(minDate)}},params.utm_source&&"bls"==params.utm_source[0]?(vm.blsHome=!0,localStorage.setItem("blsflow","true"),vm.blsflow=!0,vm.countryCursor="Spain",vm.countriesList="Spain",vm.countriesListArr=["Spain"],vm.countriesArray=["Spain"]):(localStorage.setItem("blsflow","false"),vm.blsflow=!1,vm.countriesList="",vm.countriesListArr=[],vm.countriesArray=[]),vm.popularCountries=[],vm.selectPopularCountry=function(index,mobileView,type){if("home"===type)vm.selectCountry(vm.popularCountries[index],!0);else{let ind=vm.countriesListArr.indexOf(vm.popularCountries[index]);vm.countriesListArr.splice(ind,1),vm.countryValue.splice(ind,1);let splittedValue=vm.countriesList.split(",");splittedValue.splice(ind,1),vm.countriesList=splittedValue.join(", "),vm.comma=!0,setTimeout(function(){vm.comma=!1})}mobileView&&(vm.focusCountriesInput=!0)},vm.selectPopularCountryForNewFLow=function(index){let ind=vm.countriesListArr.indexOf(vm.popularCountries[index]);if(-1===ind)vm.selectCountry(vm.popularCountries[index],!0);else{vm.countriesListArr.splice(ind,1);let splittedValue=vm.countriesList.split(",");splittedValue.splice(ind,1),vm.countriesList=splittedValue.join(","),vm.countryValue.splice(ind,1),vm.comma=!0}},vm.removeTag=function(index){vm.countriesListArr.splice(index,1),vm.countryValue.splice(index,1),vm.countriesList=vm.countriesListArr.join(", "),vm.countryListTempValue=vm.countriesList,vm.unavailableCountry=!1},vm.PopularCountriesHide=function(event){(!event||9!==event.keyCode&&27!==event.keyCode&&38!==event.keyCode&&40!==event.keyCode)&&(vm.popularCountriesMobile=!1,vm.PopularCities=!1,""===vm.countriesList&&(vm.countriesListArr=[]))},vm.showCountriesOriginal=function(){vm.tagsShow=!1;let text=vm.countriesListArr.length&&vm.countriesList.length>33?" +"+(vm.countriesListArr.length-2)+" More":"";if(vm.countriesListArr.length&&1!==vm.countriesListArr.length&&vm.countriesList.length>33){let index=vm.countriesListArr[0].length+vm.countriesListArr[1].length+2;vm.countryCursor=vm.countriesList.substring(0,index)+text}else vm.isGeographyTabSelected?vm.countryCursor=vm.selectedGeoGraphy?.name:vm.countryCursor=vm.countriesListArr.toString();$scope.$apply()},vm.removeComma=function(){$timeout(function(){-1!==vm.countriesList.indexOf(",")&&vm.countriesList.substr(vm.countriesList.lastIndexOf(",")).trim().length<2&&(vm.countriesList=vm.countriesList.substr(0,vm.countriesList.lastIndexOf(",")))})},vm.focusMethod=function(data,type){"start"===type?vm.startdateBorder=!0===data:vm.enddateBorder=!0===data},vm.openModalSticky=function(){vm.modalOpen=!0;const containerNewTemplate=document.getElementById("calendar-container1");document.getElementById("calendar-container").innerHTML="",createModalDateInputs(containerNewTemplate,!0);const start1=document.getElementById("calendar-start1"),end1=document.getElementById("calendar-end1");vm.buildDatePicker(start1,end1,containerNewTemplate);const isMobileView=window.innerWidth<992;getQuoteStickyTravel&&(getQuoteStickyTravel.classList.add("open"),getQuoteStickyTravel.classList.remove("close"),isMobileView&&document.body.classList.add("scroll-disabled")),vm.modalstartPicker.hide(),vm.modalendPicker.hide()},vm.closeModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyTravel&&(getQuoteStickyTravel.classList.remove("open"),getQuoteStickyTravel.classList.add("close"),isMobileView&&document.body.classList.remove("scroll-disabled")),vm.modalOpen=!1;const containerNewTemplate=document.getElementById("calendar-container1");vm.modalstartPicker&&(vm.modalstartPicker.destroy(),vm.modalstartPicker=null),vm.modalendPicker&&(vm.modalendPicker.destroy(),vm.modalendPicker=null),vm.startPicker&&(vm.startPicker.destroy(),vm.startPicker=null),vm.endPicker&&(vm.endPicker.destroy(),vm.endPicker=null),containerNewTemplate.innerHTML="";const containerTemplateOld=document.getElementById("calendar-container");createModalDateInputs(containerTemplateOld,!1);const startNew=document.getElementById("calendar-start"),endNew=document.getElementById("calendar-end");
362vm.buildDatePicker(startNew,endNew,containerTemplateOld)},vm.selectCountry=function(countryName,selectedFromPopular,keyboardEntry){let tempValue;switch(", "==vm.countriesList.slice(-2)&&(vm.countriesList=vm.countriesList.substr(0,vm.countriesList.lastIndexOf(","))),countryName){case"United States":case"USA":tempValue=countryName,countryName="United States (USA)";break;case"Great Britain":case"USA":tempValue=countryName,countryName="Great Britain(UK)"}vm.countriesListArr=""===vm.countriesList?[]:vm.countriesList.split(", "),vm.countriesListArr=vm.countriesListArr.map(country=>country.trim());var alreadyAdded=!1;if(vm.countries.map(function(a){(a.label===countryName||a.label.includes(countryName))&&(vm.checkIfCountryDeclined(a.value,a.label),-1===vm.countryValue.indexOf(a.value)&&vm.countryValue.push(a.value))}),void 0!==tempValue){let usa="United States (USA)";("Great Britain(UK)".includes(tempValue)||usa.includes(tempValue))&&(countryName=tempValue)}-1!==vm.countriesListArr.indexOf(countryName)&&(vm.alreadySelectedCountry=countryName,alreadyAdded=!0,$timeout(function(){vm.alreadySelectedCountry=void 0},500)),alreadyAdded||"not found"===countryName.toLowerCase()||(vm.unavailableCountry=!1,vm.countriesListArr.push(countryName.trim()),vm.countriesList=Array.from(vm.countriesListArr),vm.countriesList=vm.countriesList.join(", "),selectedFromPopular&&(vm.comma=!0,setTimeout(function(){vm.comma=!1}),keyboardEntry&&$timeout(function(){vm.popularCountriesDesktop=!0},500)))},vm.checkIfCountryDeclined=function(country,countryName){vm.declinedCountryList=[],countryList=[],countryList.push(country),selectedCountryData={countryList:countryList},InternationalTravelService.declinedCountry(selectedCountryData).then(function(response){vm.declinedCountryList=response.data,vm.declinedCountryList?.length>0&&(vm.countriesUnavailableModalShow=!0,vm.unavailableCountry=countryName,document.getElementById("country_name").value="",vm.dataLayerBlackListed(),setTimeout(function(){internationalTravelAnalytics.travelDetails("","",vm.unavailableCountry?vm.unavailableCountry:"","",""),vm.unavailableCountry=!0,vm.countriesListArr&&vm.countriesListArr.length>0&&(vm.countriesListArr.pop(),vm.countryValue.pop(),vm.countriesList=vm.countriesListArr.join(", "),vm.unavailableCountry=!1)},500))},function(error){})},vm.addComma=function(){var list=vm.countriesList.split(",");0===vm.countriesList.length||vm.comma||""===list[parseInt(list.length)-1].trim()||(vm.countriesList+=", "),vm.countryListTempValue=vm.countriesList},vm.calculateDiffInDays=function(first,second){var firstDate=new Date(first),secondDate=new Date(second);return firstDate.setHours(0),firstDate.setMinutes(0),firstDate.setSeconds(0),secondDate.setHours(0),secondDate.setMinutes(0),secondDate.setSeconds(0),Math.abs((firstDate.getTime()-secondDate.getTime())/864e5)},vm.validateGetQuoteHomePageNew=function(){vm.getQuoteTravelValidation(stickyFormTravel,countryStickyFormValidation,travelStickyFormValidation)},vm.validateGetQuoteHomePage=function(){let travelForm=document.querySelector("#mainTravelForm");vm.getQuoteTravelValidation(travelForm,countryFormValidation,travelFormValidation)},vm.getQuoteTravelValidation=function(travelForm,countryFormValidation,travelFormValidation){vm.isSingleTrip||void 0===vm.policyStartDate||(vm.startDate=vm.policyStartDate,vm.endDate=vm.getEndDateFromDuration(vm.convertDateToStandardFormat(vm.startDate),this.setNumberOfDaysFromDuration(vm.duration))),vm.isSubmitted=!0,$timeout(function(){if(vm.isSingleTrip)travelFormValidation.validateAll(function(){vm.isCountryTabSelected?countryFormValidation.validateAll(function(){vm.getQuote()},function(){}):vm.selectedGeoGraphy&&vm.getQuote(),applsFlyerFlow("travel_journey_web_landing_screen_open"),internationalTravelAnalytics.travelDetails(vm.countriesList?vm.countriesList:"",vm.selectedGeoGraphy?vm.selectedGeoGraphy.name:"","",vm.getPerfectDate(vm.startDate,!1),vm.getPerfectDate(vm.endDate,!1)),vm.dataLayerViewPrice(),callDataLayerFunctions("LeadSubmit","8888888888","Internation Travel Form","Travel")},function(){});else{validationMultiObject={"departure-date":departureDateObject,"duration-due":durationDueObject,"mobile-number":travelMobileNumberObject},new Dominar(travelForm,validationMultiObject).validateAll(function(){vm.isCountryTabSelected?countryFormValidation.validateAll(function(){vm.getQuote()},function(){}):vm.selectedGeoGraphy&&vm.getQuote(),applsFlyerFlow("travel_journey_web_landing_screen_open"),internationalTravelAnalytics.travelDetails(vm.countriesList?vm.countriesList:"",vm.selectedGeoGraphy?vm.selectedGeoGraphy.name:"","",vm.getPerfectDate(vm.startDate,!1),vm.getPerfectDate(vm.endD
362ate,!1)),vm.dataLayerViewPrice(),callDataLayerFunctions("LeadSubmit","8888888888","Internation Travel Form","Travel")},function(){})}vm.isCountryTabSelected&&countryFormValidation.validateAll()},100)},vm.dataLayerViewPrice=function(){const sessionStorageLob=sessionStorage.getItem("lobChecked"),liTerms=sessionStorageLob?JSON.parse(sessionStorageLob)?.lob.travel:"";let dataLayer={event:"view_price_click",userId:getCookie("visitorId"),lob:"travel",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:vm.isGeographyTabSelected?"Geography":vm.isCountryTabSelected?"Country":"NA",geographies:vm.selectedGeoGraphy&&vm.isGeographyTabSelected?vm.selectedGeoGraphy.name:"",country:vm.countriesList&&vm.isCountryTabSelected?vm.countriesList:"",leaving_date:vm.getPerfectDate(vm.startDate,!1),returning_date:vm.getPerfectDate(vm.endDate,!1),source:window.location.href,trip_type:vm.isSingleTrip?"single":"multi",status:liTerms?"both":"onlygi"};customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.dataLayerBlackListed=function(){let dataLayer={event:"no_plans_available",userId:getCookie("visitorId"),lob:"travel",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"new flow",geographies:vm.selectedGeoGraphy?vm.selectedGeoGraphy.name:"",country:vm.unavailableCountry?vm.unavailableCountry:"",leaving_date:vm.getPerfectDate(vm.startDate,!1).toLowerCase().includes("nan")?"":vm.getPerfectDate(vm.startDate,!1),returning_date:vm.getPerfectDate(vm.endDate,!1).toLowerCase().includes("nan")?"":vm.getPerfectDate(vm.endDate,!1),source:window.location.href};customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.travelInputFocus=function(){vm.PopularCities=!0,vm.tagsShow=!0,vm.countryCursor="",vm.popularCountriesMobile=!0,vm.countriesMobileError=!1,vm.addComma(),vm.mobileCountryErrorMessage="",document.querySelector("input").setAttribute("autocomplete","off")},vm.validationErrorMobile=function(){void 0===vm.startDate||void 0===vm.endDate||0===vm.countryCursor.length?(void 0===vm.startDate&&(vm.startDateErrorValid=!0),void 0===vm.endDate&&(vm.endDateErrorValid=!0),(void 0===vm.countryCursor||vm.countryCursor.length<=0)&&(vm.countryCursorValidation=!0)):(vm.startDateErrorValid=!1,vm.endDateErrorValid=!1,vm.countryCursorValidation=!1)},vm.tagBackspaced=function(event){if(8===event.keyCode&&""===vm.countryCursor){if(vm.blsflow&&"spain"==vm.countriesListArr[vm.countriesListArr.length-1].toLowerCase())return;vm.countriesListArr.pop(),vm.countriesList=vm.countriesListArr.join(", ")}},vm.getQuote=function(){vm.countriesPending=!0,vm.countriesList=vm.countriesListArr;var localStorageValues={};JSON.parse(localStorage.getItem(vm.localStorageKey));localStorageValues.blockComfort=!1;[].forEach(function(country){localStorageValues.destinations.toLowerCase().includes(country)&&(localStorageValues.blockComfort=!0)}),0==vm.countryValue.length&&vm.countriesList.forEach(function(c){vm.countries.map(function(a){a.label.toString().toLowerCase()===c.toString().toLowerCase().trim()&&(vm.checkIfCountryDeclined(a.value,a.label),-1===vm.countryValue.indexOf(a.value)&&vm.countryValue.push(a.value))})}),localStorageValues.listOfCountries=vm.isGeographyTabSelected?vm.selectedGeoGraphy.listOfCountries:vm.countryValue,localStorageValues.destinations=vm.isGeographyTabSelected?[vm.selectedGeoGraphy.name]:vm.countriesList,localStorageValues.startDate=vm.startDate&&vm.startDate.replace(/[^a-z0-9 ,.?!]/gi,""),localStorageValues.endDate=vm.endDate&&vm.endDate.replace(/[^a-z0-9 ,.?!]/gi,""),localStorageValues.duration=this.setNumberOfDaysFromDuration(vm.duration),localStorageValues.isSingleTrip=vm.isSingleTrip,localStorageValues.blsflow=vm.blsflow,localStorageValues.geography=vm.selectedGeoGraphy.value||"",localStorageValues.flowtype=vm.selectedGeoGraphy.value?"Geography":"Country",localStorageValues.mobileNumber=vm.phoneNumber,localStorageValues.travellerCount=vm.travellerList.length&&window.location.href.includes("travel")?parseInt(vm.travellerList.find(traveller=>!0===traveller.selection).name):1,localStorageValues.sourceUrl=window.location.href,"digit_mobileapp"===searchParams.get("utm_source")&&(localStorageValues.utmSrc="digit_mobileapp",vm.appsFlyerData.event_name="travel_journey_view_prices_click",vm.appsFlyerData.data={},vm.appsFlyerData.data.Form_Date=vm.startDate&&vm.startDate.replace(/[^a-z0-9 ,.?!]/gi,""),vm.appsFlyerData.data.To_Date=vm.endD
362ate&&vm.endDate.replace(/[^a-z0-9 ,.?!]/gi,""),vm.appsFlyerData.data.View_Price_button_clicked=!0,window.location.href.includes("platform=ios")?iosDevice(vm.appsFlyerData):window.location.href.includes("platform=android")&&androidDevice(vm.appsFlyerData)),localStorageValues.utmParams={utmSrc:getParameter("utm_source")||"",utmMedium:getParameter("utm_medium")||"",utmCampaign:getParameter("utm_campaign")||"",utmContent:getParameter("utm_content")||"",utmTerm:getParameter("utm_term")||"",utmValue:getParameter("utm_value")||"",imdCode:getParameter("imdKey")||""},localStorage.setItem(vm.localStorageKey,JSON.stringify(localStorageValues));var url,currentUrl=window.location.href;-1===(currentUrl=currentUrl.split("?")[0]).indexOf("international-travel")&&("#"==currentUrl.charAt(currentUrl.length-1)&&(currentUrl=currentUrl.slice(0,-1)),"/"==currentUrl.charAt(currentUrl.length-1)&&(currentUrl=currentUrl.slice(0,-1)),currentUrl=currentUrl.split("/",3).join("/"),currentUrl+="/international-travel-insurance"),-1!==currentUrl.indexOf("/hindi")&&(currentUrl=currentUrl.replace("/hindi","")),url=currentUrl.substr(0,currentUrl.split("/",3).join("/").length)+"/international-travel-insurance/travel-flow/plan-page/age?session="+vm.localStorageKey,internationalTravelAnalytics.getQuoteClickCapture(localStorageValues.flowtype,localStorageValues.destinations,localStorageValues.startDate,localStorageValues.endDate,localStorageValues.geography),setTimeout(function(){vm.countriesPending=!1,1==vm.blsflow?localStorageValues.destinations&&safeWindowOpen(url+"?&utm_source=bls","_self"):localStorageValues.destinations&&safeWindowOpen(url,"_self")},700)},vm.getLocalStorageKey=function(){vm.localStorageKey=getParameter("session")||Math.floor((new Date).getTime())},vm.getLocalStorageKey(),vm.getPerfectDate=function(date,slashFormat){if(slashFormat){let splitDate=date.split("/");date=splitDate[2]+"-"+splitDate[1]+"-"+splitDate[0]}let year=(date=new Date(date)).getFullYear().toString(),month=(date.getMonth()+1).toString(),day=1==date.getDate().toString().length?"0"+date.getDate().toString():date.getDate();return 1==month.length&&(month="0"+month),year+"-"+month+"-"+day},vm.searchCountry=function(){var countryname;countryname=vm.countriesList.includes(",")?vm.countriesList.split(","):vm.countriesList,vm.countries.forEach(function(c){c.includes(countryname[countryname.length-1])})},vm.initRangeDatePicker=(isStartPicker,isModal)=>{isStartPicker&&(vm.endDate=null),vm.isTravelProductPage?vm.hideShowDatePicker(isStartPicker,isModal):$timeout(()=>{vm.hideShowDatePicker(isStartPicker,isModal)})},vm.hideShowDatePicker=(isStartPicker,isModal)=>{isStartPicker?(isModal?(vm.modalstartPicker.show(),clearReturnDateError("departure-date1"),vm.modalendPicker.hide()):(vm.startPicker.show(),clearReturnDateError("departure-date"),vm.endPicker.hide()),vm.startDateErrorValid=!1):(vm.startDate&&(isModal?(vm.modalendPicker.show(),clearReturnDateError("return-date2"),vm.modalstartPicker.hide()):(vm.endPicker.show(),!vm.modalOpen&&clearReturnDateError("return-date"),vm.startPicker.hide())),vm.endDateErrorValid=!1)},vm.initStartDatePicker=function(startInput,container,minDate,maxDate,options,isModal){return new Pikaday({bound:!1,container:container,field:startInput,firstDay:1,numberOfMonths:(vm.isTravelProductPage,1),theme:"calendar__start-wrapper",minDate:minDate,maxDate:maxDate,format:"DD MMM YYYY",parse(dateString,format){const parts=dateString.split(" "),day=parseInt(parts[0],10),month=new Date(Date.parse(parts[1]+" 1, 2020")).getMonth(),year=parseInt(parts[2],10);return new Date(year,month,day)},toString:date=>`${date.getDate().toString().padStart(2,"0")} ${date.toLocaleString("en-GB",{month:"short"})} ${date.getFullYear()}`,onSelect:()=>{var dateFormatted=new Date(isModal?vm.modalstartPicker.getDate():vm.startPicker.getDate());vm.isSingleTrip?(vm.startDate=dateFormatted.toLocaleDateString("en-GB",options),vm.startDate=vm.startDate.replace(/[^a-z0-9 ]/gi,"")):(vm.policyStartDate=dateFormatted.toLocaleDateString("en-GB",options),vm.policyStartDate=vm.policyStartDate.replace(/[^a-z0-9 ]/gi,"")),vm.updateStartDate(isModal?vm.modalstartPicker.getDate():vm.startPicker.getDate()),clearDominarErrorsOnFocus(travelFormValidation),clearDominarErrorsOnFocus(tripSelectMultiValidation),$scope.$apply()}})}
362,vm.initEndDatePicker=function(endInput,container,minDate,maxDate,options,isModal){return new Pikaday({bound:!1,container:container,field:endInput,firstDay:1,numberOfMonths:(vm.isTravelProductPage,1),theme:"calendar__end-wrapper",minDate:minDate,format:"DD MMM YYYY",parse(dateString,format){const parts=dateString.split(" "),day=parseInt(parts[0],10),month=new Date(Date.parse(parts[1]+" 1, 2020")).getMonth(),year=parseInt(parts[2],10);return new Date(year,month,day)},toString:date=>`${date.getDate().toString().padStart(2,"0")} ${date.toLocaleString("en-GB",{month:"short"})} ${date.getFullYear()}`,onSelect:()=>{var dateFormatted=new Date(isModal?vm.modalendPicker.getDate():vm.endPicker.getDate());return vm.isTravelProductPage&&vm.startDate&&vm.endDate?(vm.startDate=dateFormatted.toLocaleDateString("en-GB",options),vm.updateStartDate(isModal?vm.modalendPicker.getDate():vm.endPicker.getDate()),(isModal?vm.modalendPicker:vm.endPicker).setDate(null),vm.endDate=null,void $scope.$apply()):(vm.endDate=dateFormatted.toLocaleDateString("en-GB",options),vm.endDate=vm.endDate.replace(/[^a-z0-9 ]/gi,""),vm.isTravelProductPage&&new Date(vm.startDate)>new Date(vm.endDate)?(vm.startDate=JSON.parse(JSON.stringify(vm.endDate)),vm.updateStartDate(isModal?vm.modalendPicker.getDate():vm.endPicker.getDate()),vm.endDate=null,void $scope.$apply()):(vm.endDateErrorValid=!1,$scope.$apply(),vm.updateEndDate(isModal?vm.modalendPicker.getDate():vm.endPicker.getDate()),clearDominarErrorsOnFocus(travelFormValidation),void clearDominarErrorsOnFocus(tripSelectMultiValidation)))}})},vm.buildDatePicker=(startInput,endInput,container)=>{const minDate=new Date((new Date).setDate((new Date).getDate()));minDate.setHours(0,0,0,0);var maxDate=new Date((new Date).setDate((new Date).getDay()+180));const options={year:"numeric",month:"short",day:"numeric"};vm.startPicker=vm.initStartDatePicker(startInput,container,minDate,maxDate,options,!1),vm.endPicker=vm.initEndDatePicker(endInput,container,minDate,maxDate,options,!1),vm.startPicker.hide(),vm.endPicker.hide(),stickyFormTravel&&vm.modalOpen&&(vm.modalstartPicker=vm.initStartDatePicker(startInput,container,minDate,maxDate,options,!0),vm.modalendPicker=vm.initEndDatePicker(endInput,container,minDate,maxDate,options,!0),vm.modalstartPicker.hide(),vm.modalendPicker.hide()),vm.bindMouseMove(endInput,container)},vm.updateStartDate=selectedDate=>{vm.endDate=null;const endMidate=new Date(selectedDate);endMidate.setDate(selectedDate.getDate()+1);const maxDate=new Date(selectedDate);maxDate.setDate(maxDate.getDate()+179),vm.startPicker.hide(),vm.endPicker.gotoMonth(selectedDate.getMonth()),stickyFormTravel&&vm.modalOpen&&(vm.modalstartPicker.hide(),vm.modalendPicker.gotoMonth(selectedDate.getMonth())),vm.isTravelProductPage||(vm.endPicker.setMinDate(endMidate),stickyFormTravel&&vm.modalOpen&&vm.modalendPicker.setMinDate(endMidate));const daysRemainingInMonth=new Date(selectedDate.getFullYear(),selectedDate.getMonth()+1,0).getDate()-selectedDate.getDate();vm.endPicker.setMaxDate(maxDate),daysRemainingInMonth<=3?(vm.endPicker.setStartRange(endMidate),vm.endPicker.gotoDate(endMidate)):(vm.endPicker.setStartRange(selectedDate),vm.endPicker.gotoDate(selectedDate)),stickyFormTravel&&vm.modalOpen&&(vm.modalendPicker.setMaxDate(maxDate),daysRemainingInMonth<=3?(vm.modalendPicker.setStartRange(endMidate),vm.modalendPicker.gotoDate(endMidate)):(vm.modalendPicker.setStartRange(selectedDate),vm.modalendPicker.gotoDate(selectedDate))),vm.setEndRange(selectedDate),vm.isSingleTrip?(vm.endPicker.show(),!vm.modalOpen&&clearReturnDateError("return-date"),stickyFormTravel&&vm.modalOpen&&(vm.modalendPicker.show(),clearReturnDateError("return-date2"))):(vm.endPicker.hide(),stickyFormTravel&&vm.modalOpen&&vm.modalendPicker.hide())},vm.updateEndDate=selectedDate=>{if(vm.setEndRange(selectedDate),vm.isTravelProductPage)return vm.endPicker.show(),!vm.modalOpen&&clearReturnDateError("return-date"),void(stickyFormTravel&&vm.modalOpen&&(vm.modalendPicker.show(),clearReturnDateError("return-date2")));vm.endPicker.hide(),stickyFormTravel&&vm.modalOpen&&vm.modalendPicker.hide(),vm.checkAndFocusMobileNumber()},vm.checkAndFocusMobileNumber=function(){$timeout(function(){const hasDestination=vm.isCountryTabSelected&&vm.countriesListArr.length>0||vm.isGeographyTabSelected&&vm.selectedGeoGraphy,hasDatesSingleTrip=vm.isSingleTrip&&vm.startDate&&vm.endDate,hasDatesMultiTrip=!vm.isSingleTrip&&vm.policyStartDate&&vm.duration;if(hasDestination&&(hasDatesSingleTrip||hasDatesMultiTrip)){const mobileInput=vm.modalOpen?document.getElementById("car-mobile-number1"):document.getElementById("car-mobile-number");mobileInput&&!vm.phoneNumber&&mobileInput.focus()}},100)}
362,vm.setEndRange=endDate=>{const refreshId=setInterval(()=>{vm.endPicker.getDate()&&(clearInterval(refreshId),vm.endPicker.setEndRange(endDate),vm.endPicker.draw()),stickyFormTravel&&vm.modalOpen&&vm.modalendPicker.getDate()&&(vm.modalendPicker.setEndRange(endDate),vm.modalendPicker.draw())},500)},vm.bindMouseMove=(endInput,container)=>{vm.target=!1,document.querySelector("body").addEventListener("mousemove",btn=>{if(btn.target.classList.contains("pika-button")){vm.target=!0;const pikaBtn=btn.target,pikaDate=new Date(pikaBtn.getAttribute("data-pika-year"),pikaBtn.getAttribute("data-pika-month"),pikaBtn.getAttribute("data-pika-day"));(!vm.endDate||vm.endDate&&!vm.isTravelProductPage)&&vm.setEndRange(pikaDate)}else if(!0===vm.target){vm.target=!1;const refreshId=setInterval(()=>{vm.endPicker.getDate()&&(clearInterval(refreshId),vm.setEndRange(vm.endPicker.getDate())),stickyFormTravel&&vm.modalOpen&&vm.modalendPicker.getDate()&&vm.setEndRange(vm.modalendPicker.getDate())},500)}})};const start=document.getElementById("calendar-start"),end=document.getElementById("calendar-end"),containerOldTemplate=document.getElementById("calendar-container");vm.buildDatePicker(start,end,containerOldTemplate),vm.setSelectedGeographyValue=function(){const selectedIndex=vm.geographyList.findIndex(e=>!0===e.isSelect);vm.selectedGeoGraphy=-1!==selectedIndex?vm.geographyList[selectedIndex]:"",vm.selectedGeoGraphyValue=vm.selectedGeoGraphy?vm.selectedGeoGraphy.name:""},vm.selectGeoGraphy=(index,page="")=>{vm.geographyList.forEach((geography,i)=>{i!==index||geography.isSelect?geography.isSelect=!1:(geography.isSelect=!0,vm.selectedGeoGraphy=geography)}),vm.setSelectedGeographyValue(),"Homepage"===page&&vm.closeList()},vm.selectCountryTab=function(){vm.isCountriesFetched||vm.getCountriesList(),vm.isCountriesFetched=!0},vm.getEndDateFromDuration=function(startdate,duration){var parts=startdate.split("-"),year=parseInt(parts[0],10),month=parseInt(parts[1],10)-1,day=parseInt(parts[2],10),start=new Date(year,month,day);let numberOfDays=parseInt(duration);return start.setDate(start.getDate()+numberOfDays),start=vm.formatDateToCustomString(start)},vm.getValidDate=function(startdate,numberOfDays){let date=new Date(startdate),startDates=new Date(vm.formatDateToNormalFormate(date));return startDates.setDate(startDates.getDate()+numberOfDays),startDates=vm.formatDateToCustomString(startDates),startDates},vm.checkTripTyp=function(evt){vm.startDate="",vm.endDate="";let isSingTrip=evt&&evt.target?evt.target.value:vm.isSingleTrip;"false"!==isSingTrip&&!1!==isSingTrip?(vm.isCountryTabSelected=!0,vm.isGeographyTabSelected=!1,vm.geographyList=[{name:"Worldwide excluding US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"WOR",listOfCountries:["PT"]},{name:"Worldwide including US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"UCC",listOfCountries:["CA"]},{name:"Asia excluding Japan & Korea",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"ASI",listOfCountries:["ID"]}]):(vm.isCountryTabSelected=!1,vm.isGeographyTabSelected=!0,vm.geographyList=[{name:"Worldwide Including US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"UCC",listOfCountries:["CA"]},{name:"Worldwide excluding US & Canada",description:"This covers European countries under Schengen Visa. Also covers other European countries. North America and South America is covered excluding US and Canada. Australia and Africa is also covered.",isSelect:!1,value:"WOR",listOfCountries:["PT"]}]),setTimeout(()=>{clearHelpBlock()},100)},vm.onTripTypeKeydown=function(evt,isSingleTrip){const key=evt&&(evt.key||evt.code);("Enter"===key||"NumpadEnter"===key||(" "===key||"Space"===key||"Spacebar"===key))&&(evt&&evt.preventDefault&&evt.preventDefault(),vm.isSingleTrip=isSingleTrip,vm.checkTripTyp())},vm.closeDatePickers=function(){vm.startPicker&&vm.startPicker.hide&&vm.startPicker.hide(),vm.endPicker&&vm.endPicker.hide&&vm.endPicker.hide(),vm.modalstartPicker&&vm.modalstartPicker.hide&&vm.modalstartPicker.hide(),vm.modalendPicker&&vm.modalendPicker.hide&&vm.modalendPicker.hide()},vm.toggleDurationDropdown=function(forceOpen){vm.closeDatePickers(),vm.showDropdown="boolean"!=typeof forceOpen?!vm.showDropdown:forceOpen},vm.onDurationKeydown=function(evt){const key=evt&&(evt.key||evt.code),isEnter="Enter"===key||"NumpadEnter"===key,isSpace=" "===key||"Space"===key||"Spacebar"===key,isArrowDown="ArrowDown"===key;"Escape"===key||"Esc"===key?vm.showDropdown=!1:(isEnter||isSpace||isArrowDown)&&(evt&&evt.preventDefault&&evt.preventDefault(),vm.toggleDurationDropdown(!0),isArrowDown&&evt&&evt.currentTarget&&$timeout(()=>{const durationContainer=evt.currentTarget.closest(".duration-input"),firstOption=durationContainer?durationContainer.querySelector('li[tabindex="0"]'):null;firstOption&&firstOption.focus()}))},vm.onDurationOptionKeydown=function(evt,duration){const key=evt&&(evt.key||evt.code),isEnter="Enter"===key||"NumpadEnter"===key,isSpace=" "===key||"Space"===key||"Spacebar"===key,isArrowDown="ArrowDown"===key,isArrowUp="ArrowUp"===key,isEscape="Escape"===key||"Esc"===key,currentOption=evt&&evt.currentTarget;if(!currentOption)return;if(isEnter||isSpace)return evt.preventDefault(),void vm.selectDurationRange(duration);if(isEscape){vm.showDropdown=!1;const durationContainer=currentOption.closest(".duration-input"),durationInput=durationContainer?durationContainer.querySelector('input[name="duration-due"]'):null;return void(durationInput&&durationInput.focus())}if(!isArrowDown&&!isArrowUp)return;evt.preventDefault();const options=Array.from(currentOption.parentElement.querySelectorAll('li[tabindex="0"]'));if(!options.length)return;const currentIndex=options.indexOf(currentOption);options[isArrowDown?(currentIndex+1)%options.length:(currentIndex-1+options.length)%options.length].focus()},vm.formatDateToCustomString=function(date){return`${date.getDate()} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"][date.getMonth()]} ${date.getFullYear()}`},vm.formatDateToNormalFormate=function(date){return`${date.getFullYear()}-${("0"+(date.getMonth()+1)).slice(-2)}-${("0"+date.getDate()).slice(-2)}`},vm.setNumberOfDaysFromDuration=function(duration){return{"1 to 30 days":"30","1 to 45 days":"45","1 to 60 days":"60","1 to 90 days":"90"}[duration]},vm.convertDateToStandardFormat=function(dateString){var date=new Date(dateString);return`${date.getFullYear()}-${("0"+(date.getMonth()+1)).slice(-2)}-${("0"+date.getDate()).slice(-2)}`},vm.selectDurationRange=function(duration){document.querySelectorAll(".return-dt").forEach(ele=>{ele.addEventListener("click",function(){ele.classList.remove("has-error"),ele.querySelector(".help-block").innerText=""})}),vm.duration=duration,vm.showDropdown=!1,vm.checkAndFocusMobileNumber()};const btnFooterFloatingHome=document.querySelector(".getquote-section .floating-button"),bottomStripe=document.querySelector(".getquote-section .stripe-floating-view");if(btnFooterFloatingHome){const viewInstantQuoteSection=document.querySelector(".view-instant-quote");viewInstantQuoteSection&&(viewInstantQuoteSection.style.display="none");const arrowUp=document.querySelector(".bottom-side-scroller");window.addEventListener("scroll",()=>{window.scrollY>=400?(btnFooterFloatingHome.classList.add("visible-floating-button"),arrowUp&&arrowUp.classList.add("move-arrow-up-old")):(btnFooterFloatingHome.classList.remove("visible-floating-button"),arrowUp&&arrowUp.classList.remove("move-arrow-up-old"))})}function attachEventListenersTravelForms(elem){const helpBlock=elem.querySelector(".help-block");helpBlock&&(helpBlock.innerText="")}function clearReturnDateError(dateElement){const dateInputField=document.getElementById(dateElement);dateInputField&&dateInputField.focus()}function clearHelpBlock(){document.querySelectorAll(".date-picker-wrapper").forEach(function(elem){if(elem){const inputFieldNew=elem.querySelector("input"),calenderIcon=elem.querySelector(".calender-placement");inputFieldNew.addEventListener("focus",function(){attachEventListenersTravelForms(elem)}
362),calenderIcon&&calenderIcon.addEventListener("click",function(){attachEventListenersTravelForms(elem)})}})}window.innerWidth>992&&bottomStripe&&window.addEventListener("scroll",()=>{window.scrollY>=400?bottomStripe.classList.contains("close")||(btnFooterFloatingHome.classList.remove("visible-floating-button"),bottomStripe.classList.add("open")):bottomStripe.classList.remove("open")}),Dominar.Validator.register("isCountryFromList",function(value,requirement,attribute){let arr=[vm.countriesList];return", "==vm.countriesList.slice(-2)?(arr=vm.countriesList.substr(0,vm.countriesList.lastIndexOf(", ")),arr=arr.split(",")):vm.countriesList.includes(",")&&(arr=vm.countriesList.split(",")),vm.countriesArray=[],arr.forEach(function(elem){vm.countries.forEach(function(country){country.label.toLowerCase()==elem&&elem.trim().toLowerCase()&&-1==vm.countriesArray.indexOf(country.value.toString())&&vm.countriesArray.push(country.value.toString())})}),arr.length>0}),Dominar.Validator.register("isMobileNumberValid",function(value,requirement,attribute){let validNumber=10==value.length;if(validNumber){var numberArray=value.split("");validNumber=parseInt(numberArray[0])>5}return!!validNumber}),Dominar.Validator.register("isDepartureDateValid",function(value,requirement,attribute){value=value.replace(/[^a-z0-9 ,.?!]/gi,"");let startDate=new Date(value),maxDate=new Date;return maxDate.setFullYear(maxDate.getFullYear()+1),startDate<maxDate}),Dominar.Validator.register("isReturnDateValid",function(value,requirement,attribute){value=value.replace(/[^a-z0-9 ,.?!]/gi,"");let returnDate=new Date(value),startDate=new Date(vm.startDate.replace(/[^a-z0-9 ,.?!]/gi,"")),maxDate=new Date(vm.startDate.replace(/[^a-z0-9 ,.?!]/gi,""));return 1==vm.blsflow?maxDate.setDate(maxDate.getDate()+165):maxDate.setDate(maxDate.getDate()+180),returnDate<maxDate&&returnDate>startDate}),document.querySelector("#country-option-wrapper")?.addEventListener("click",e=>{e.stopPropagation()}),document.querySelector("#country-option-wrapper1")?.addEventListener("click",e=>{e.stopPropagation()}),document.body.addEventListener("click",function(e){if("country-option-wrapper"==e.target.id||"tag-close"==e.target.id||"country-option-wrapper1"==e.target.id)return;if(vm.tagsShow=!1,vm.PopularCities=!1,vm.removeComma(),vm.showCountriesOriginal(),$scope.$apply(),vm.isTravelProductPage||e.target.className.includes("pika")||(vm.startPicker.hide(),vm.endPicker.hide(),stickyFormTravel&&vm.modalOpen&&(vm.modalstartPicker.hide(),vm.modalendPicker.hide())),e.target.className.includes("travel-dropdown"))return;vm.showDropdown=!1;const multiTripInfoElement=document.querySelector("#multiTripInformation");"multi"!==e.target.id&&vm.isSingleTrip?multiTripInfoElement?.classList.add("hidden"):multiTripInfoElement?.classList.remove("hidden")}),document.querySelector("#country-geo-dropdown")?.addEventListener("click",()=>{vm.startPicker.hide(),vm.endPicker.hide(),vm.showDropdown=!1,stickyFormTravel&&vm.modalOpen&&(vm.modalstartPicker.hide(),vm.modalendPicker.hide()),$scope.$apply()}),vm.closeList=function(isBelowPopup=!1){void 0===vm.countryListTempValue&&(vm.countryListTempValue=vm.countriesListArr.join("")),vm.countryListTempValue=vm.countriesListArr.join(", "),vm.isGeographyTabSelected||(vm.countryCursor=vm.countryListTempValue),vm.PopularCities=!1,vm.tagsShow=!1,vm.initRangeDatePicker(!vm.startDate,isBelowPopup),clearDominarErrorsOnFocus(travelFormValidation),clearDominarErrorsOnFocus(tripSelectMultiValidation)},vm.countryTabSelect=function(){vm.isCountryTabSelected=!0,vm.isGeographyTabSelected=!1,vm.selectedGeoGraphy="",vm.selectCountryTab()},vm.geographyTabSelect=function(){vm.isCountryTabSelected=!1,vm.isGeographyTabSelected=!0,vm.setSelectedGeographyValue()},vm.popularCountriesSelect=function(index){vm.addComma(),vm.selectPopularCountry(index,!1,"home")},window.addEventListener("pageshow",event=>{event.persisted&&location.reload()}),setTimeout(()=>{clearHelpBlock()},1e3)}]); 363const newHealthInsuranceAnalytics={trackOfHealthPlatForm:function(){digitalData.page.pageInfo.platform="health"},trackOfPortRequestCall:function(name,mobileNumber,productType){newHealthInsuranceAnalytics.trackOfHealthPlatForm(),digitalData.flowtype=productType,digitalData.producttype="Health",digitalData.personalDetailsForm.firstName=name,digitalData.coverage.mobileNumber=AesCtr.encrypt(mobileNumber,encranalytics,256),_satellite.track("port_request_call")},ViewPrices:function(residentPincode,mobileNumber){let url=new URL(window.location.href),searchParams=new URLSearchParams(url.search);Moengage.track_event("View Prices",{PinCode:residentPincode,"Members Insured":"",URL:url,"Mobile Number":AesCtr.encrypt(mobileNumber,encranalytics,256),lob:"Health",utm_source:searchParams.get("utm_source"),utm_medium:searchParams.get("utm_medium"),utm_campaign:searchParams.get("utm_campaign"),utm_content:searchParams.get("utm_content")})},getQuoteAdobe:function(city,pincode,mobileNumber){newHealthInsuranceAnalytics.trackOfHealthPlatForm(),digitalData.flowtype="health",digitalData.producttype="Health",digitalData.tanishq.detailsForm.pincode=pincode,digitalData.formInfo.city=city,digitalData.getQuoteForm.country="",digitalData.coverage.mobileNumber=AesCtr.encrypt(mobileNumber,encranalytics,256),digitalData.lob="health",digitalData.quoteid="",_satellite.track("health_get_quote")}};function showModalForHealthAllPage(){let items=[];function createModelistItem(modeltext){var nodetext=document.createElement("li");return nodetext.textContent=modeltext,nodetext}new Modal($("#terms-conditions-modal")[0]).show();var lis=document.querySelectorAll("#commonOrderedListModel li");if(lis.length>0)for(var i=0;li=lis[i];i++)li.parentNode.removeChild(li);var parent,cvModelList=document.getElementById("commonOrderedListModel");window.location.href.includes("health-insurance");items=cvModelList.children.length<8?[createModelistItem(" I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future"),createModelistItem("I declare that the premium paid under this transaction to Go Digit General Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation, the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will c
363onstitute full and final discharge of the Companyâs obligation."),createModelistItem("I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."),createModelistItem("I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."),createModelistItem("\n By submitting my contact number and/or email ID, I authorize Go Digit General Insurance (Digit Insurance) to call, send email/SMS/WhatsApp and offer information and services about its product(s) and/or assist me for completing any incomplete journey/transaction. I further acknowledge and agree that such authorization will be over and above any registration of my contact number on TRAIâs NDNC registry.")]:[],parent=cvModelList,items.forEach(function(child){parent.appendChild(child)})}digitapp.controller("newFlowhealthCtrl",function($scope,$http,$q,$location,$timeout){const{wrapContent:wrapContent,unwrapContent:unwrapContent}=manageWrapping;let vm=this;vm.portMyExistingPolicyModal=!1,vm.responseError=!0,vm.policyPortModalShow=!1,vm.hideHealthLoader=!1,vm.isPartnerAvailable="partner"===new URLSearchParams(location.search).get("utm_source"),vm.isSIBPage=window.location.href.includes("utm_source=partner&utm_medium=SIB&utm_campaign=1170920"),vm.callerCodeValue=searchParams.get("callercoderequired")&&searchParams.get("callercoderequired").toString().toUpperCase(),vm.isBlockedPincode=!1,vm.showBlockPincodeModal=!1,vm.isKvbFlow=window.location.href.includes("/campaigns/digit-health-insurance-for-kvb"),vm.isCsbFlow=window.location.href.includes("/campaigns/digit-health-insurance-for-csb"),vm.aemAgentNameKVB=((document.getElementById("health-agent-name-from-aem-kvb")||{}).innerText||"").toString().trim(),vm.isPartnerFlow="partner"===getParameter("utm_source"),vm.partnerLogoObj=partnerLogoObj[new URLSearchParams(location.search).get("utm_campaign")?.toLowerCase()];const partnerContainer=document.getElementById("heroFincorpContainer");vm.partnerLogoObj&&vm.isPartnerFlow&&partnerContainer?(partnerContainer.style.display="flex",document.getElementById("partnerContent").innerText=vm.partnerLogoObj.content,document.getElementById("partnerImg").src=vm.partnerLogoObj.imgLink):partnerContainer&&(partnerContainer.style.display="none"),vm.availablePlans=[{title:"Infinity Wallet ",id:"PLANA"},{title:"Double Wallet",id:"PLANB"},{title:"World Wide Treatment",id:"PLANC"}];let healthPincode={rules:"required|size:6|invalidPincode",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Please Enter a pincode",size:"Enter valid pincode",invalidPincode:"Enter valid pincode"}},healthMobileNumber={rules:"required|size:10|isMobileNumberValid",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Please Enter Mobile Number",isMobileNumberValid:"Please Enter Valid Mobile Number",size:"Please enter valid Number"}},reqCallUserName={rules:"required",container:".reuest-form-group",feedback:!1,triggers:["keyup","change","focusout"],customMessages:{required:"Enter your name"}},reqCallUserMobNumber={rules:"required|isReqMobileNumberValid",container:".reuest-form-group",feedback:!1,triggers:["keyup","change","focusout"],customMessages:{required:"Enter mobile number",isReqMobileNumberValid:"Sorry, that mobile number looks incorrect"}},termsAndCondition={rules:"required",container:".term-condition",feedback:!1,triggers:["change"],customMessages:{required:"Please accept the T&C"}},dynamicMerchentCode={rules:"min:6|max:15",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter merchant code",min:"Please enter valid merchant code",max:"Please enter valid merchant code"}},kvbRmCode={rules:"required|isKvbRmCodeValid",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Please Enter RM Code",isKvbRmCodeValid:"Enter valid RM Code"}},csbRmCode={rules:"required|isCsbRmCodeValid",container:".input-field-wrapper",feedback:!1,triggers:["focusout"],customMessages:{required:"Please Enter RM Code",isCsbRmCodeValid:"Enter valid RM Code"}},healthNewFlowForm=document.getElementById("healthNewFlowForm"),healthNewFlowFormValidation=new Dominar(healthNewFlowForm,{"pincode-name":healthPincode,"mobile-number":healthMobileNumber,"terms-and-condition":termsAndCondition}),getQuoteStickyHealth=document.getElementById("getquote-bottom-sticky"),bottomStickyFormHealth=new Dominar(getQuoteStickyHealth,{"pincode-name":healthPincode,"mobile-number":healthMobileNumber}),portablityFormPresent=document.querySelector(".get-quote-portablity-form"),requestCallBackForm=document.getElementById("requestCallBack"),requestCallBackFormValidation=new Dominar(requestCallBackForm,{custName:reqCallUserName,custmobNumber:reqCallUserMobNumber}),reqCallModalForm=document.getElementById("port-model-sticky"),reqCallModalFormValidation=new Dominar(reqCallModalForm,{custName:reqCallUserName,custmobNumber:reqCallUserMobNumber});"Y"!==vm.callerCodeValue&&"YN"!==vm.callerCodeValue||("YN"!==vm.callerCodeValue&&(dynamicMerchentCode.rules+="|required"),healthNewFlowFormValidation.addByName("merchant-code",dynamicMerchentCode)),Dominar.Validator.registerAsync("invalidPincode",function(value,attribute,parameters,passes){return vm.responseError?passes(!0):passes(vm.responseError,"Enter valid pincode"),vm.responseError}),Dominar.Validator.register("isMobileNumberValid",function(value){let validNumber=10==value.length;if(validNumber){var numberArray=value.split("");validNumber=parseInt(numberArray[0])>5}return!!validNumber}),Dominar.Validator.register("isReqMobileNumberValid",function(value){let validNumber=10==value.length;if(validNumber){var numberArray=value.split("");(parseInt(numberArray[0])<5||"7420985920"==value||"8828018034"==value||"9172326444"==value||"9320000567"==value||"9323397567"==value||"9529713318"==value||"9561242520"==value||"9607800567"==value||"9820027567"==value)&&(validNumber=!1),vm.customerMobileNumber=value.toString()}return!!validNumber}),Dominar.Validator.register("isKvbRmCodeValid",function(value){const rmCode=(value||"").toString().trim();return/^[A-Za-z0-9]{3,16}$/.test(rmCode)}),Dominar.Validator.register("isCsbRmCodeValid",function(value){const rmCode=(value||"").toString().trim();return/^[A-Za-z0-9]{3,16}$/.test(rmCode)}),clearDominarErrorsOnFocus(healthNewFlowFormValidation),vm.getUniqueSessionValue=function(){let randomNumber=(new Date).getTime();randomNumber=(randomNumber=encrypt(randomNumber)).replace(/[0-9]/g,""),vm.uniqueSessionValue=randomNumber.replace(/[^a-zA-Z ]/g,"")}
363,vm.getLocalStorage=function(){vm.lastVisitedDetails=[],vm.relationDetails=[],Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"health"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).lastVisitedPageUrl&&JSON.parse(localStorage[key]).visitedTime&&vm.lastVisitedDetails.push(JSON.parse(localStorage[key]))}),vm.lastVisitedDetails.sort((a,b)=>+new Date(b.visitedTime)-+new Date(a.visitedTime)),vm.lastVisitedDetails.length>0&&vm.lastVisitedDetails[0].insuredPerson?.persons.length>0&&(vm.personData=vm.lastVisitedDetails[0].insuredPerson?.persons.filter(item=>"Child"!==item.relationship).map(relation=>{vm.relationDetails.push(relation.relationship)}),vm.childsCount=vm.lastVisitedDetails[0].insuredPerson?.persons.filter(item=>"Child"===item.relationship).length,vm.childsCount&&vm.relationDetails.push(`${vm.childsCount} Child`),vm.relationDetails=vm.relationDetails.join(", "),vm.eldestAge=vm.lastVisitedDetails[0].insuredPerson?.eldestAge,vm.planName=vm.availablePlans.find(item=>item.id===vm.lastVisitedDetails[0]?.selectedPlan)?.title,vm.planPremium=vm.lastVisitedDetails[0].planPremium?Math.round(vm.lastVisitedDetails[0].planPremium[vm.lastVisitedDetails[0].selectedPlan]&&vm.lastVisitedDetails[0].planPremium[vm.lastVisitedDetails[0].selectedPlan].totalGrossPremium):"",vm.lastVisitedDetails[0].dropOffUserData&&(vm.lastVisitedDetails[0].dropOffUserData.premiumAmount=Math.round(vm.lastVisitedDetails[0].dropOffUserData.premiumAmount),vm.dropOfUserDetails=vm.lastVisitedDetails[0].dropOffUserData))},vm.isPartner=function(){return-1!==vm.lastVisitedDetails.map(e=>e.sourceUrl)[0].indexOf("partner")||window.location.href.includes("partner")},vm.continueJourney=function(){let localStorageKey=vm.lastVisitedDetails[0].lastVisitedPageUrl.toString().split("ih=")[1];vm.localStorageKey&&vm.localStorageKey.includes("&")&&localStorageKey.toString().split("&");let localStorageData=localStorageKey?JSON.parse(localStorage.getItem(localStorageKey)):"";localStorageKey&&(localStorageData={...localStorageData,isDropOffCountinue:!0},localStorageData.continueJourney=!0),localStorage.setItem(localStorageKey,JSON.stringify(localStorageData)),safeWindowOpen(vm.lastVisitedDetails[0].lastVisitedPageUrl,"_blank")},vm.addValidationForContuniueJourney=function(){const visitedTime=new Date(vm.lastVisitedDetails[0].visitedTime);return(new Date-visitedTime)/864e5<=7},vm.getBlockedPincodeList=function(){const url=`${window.location.origin}/content/digit-partner-app/home/block-pincode.model.json?${(new Date).getTime()}`;vm.blockedPincodeData=[];(new Headers).append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse};$http.get(url,config).then(function(response){let res=response.data;if(res&&res[":items"]&&res[":items"].root&&res[":items"].root[":items"]&&res[":items"].root[":items"].textaccordian&&res[":items"].root[":items"].textaccordian.headerText){const pincodeData=JSON.parse(unwrapContent(res[":items"].root[":items"].textaccordian.headerText));Object.keys(pincodeData[":items"].root[":items"]).forEach((key,value)=>{vm.blockedPincodeData.push(...pincodeData[":items"].root[":items"][key].textAccordionList)})}vm.nativeFlow()},function(error){vm.nativeFlow()})},vm.checkIfPincodeBlocked=function(){vm.isBlockedPincode=!1,vm.residentPincode&&6===vm.residentPincode.length&&vm.blockedPincodeData&&vm.blockedPincodeData.length&&vm.blockedPincodeData.every(obj=>{if(obj.imd=obj.imd&&!Array.isArray(obj.imd)?obj.imd.split(","):obj.imd&&Array.isArray(obj.imd)?obj.imd:[],obj.pincode&&obj.pincode.toString()===vm.residentPincode.toString()){const index=obj.imd.indexOf(params.imdKey&¶ms.imdKey[0]);return vm.isPartnerAvailable&&-1!==index?vm.isBlockedPincode=!0:vm.isPartnerAvailable?vm.isBlockedPincode=!1:vm.isBlockedPincode=!0,!1}return!0})},vm.checkCamundaPinCodeBlocked=function(){const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};vm.isBlockedPincode=!1;let url=new URL(window.location.href),searchParams=new URLSearchParams(url.search);if(vm.residentPincode&&6===vm.residentPincode.length){let camundaData={variables:{Pincode:{value:vm.residentPincode},ispartnerflow:{value:!!vm.isPartnerAvailable},isdirectflow:{value:!vm.isPartnerAvailable},API_key:{value:searchParams.get("api_key")?searchParams.get("api_key"):""}},key:"Blocked_pincode"},apiUrl=`${serviceHost}
363/common/camunda`;$http.post(apiUrl,wrapContent(JSON.stringify(camundaData)),config).then(function(res){res&&res.data&&res.data[0]&&!0===res.data[0].isBlocked.value?vm.isBlockedPincode=!0:vm.isBlockedPincode=!1},function(error){vm.isBlockedPincode=!1})}},vm.formValidateHealth=function(formName){formName.validateAll(function(){vm.isLoading=!0,vm.pincodePending=!1,vm.validatePincode()})},vm.FormSubmit=function(mobileCheck=!1,isModal=!1){if(vm.responseError=!0,vm.isBlockedPincode)return vm.showBlockPincodeModal=!0,void vm.googleAnalytics("view_prices_error");isModal?vm.formValidateHealth(bottomStickyFormHealth):vm.formValidateHealth(healthNewFlowFormValidation),mobileCheck&&vm.validatePincode()},vm.getQuote=function(){const sessionStorageLob=sessionStorage.getItem("lobChecked"),liTerms=sessionStorageLob?JSON.parse(sessionStorageLob)?.lob.health:"";let dataLayer={event:"view_price_click",userId:getCookie("visitorId"),lob:"health",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"new flow",phone_number:AesCtr.encrypt(vm.getMobileNumber(),encranalytics,256),pincode:vm.residentPincode,source:window.location.href,status:liTerms?"both":"onlygi"};return vm.isKvbFlow&&(dataLayer.emp_code=vm.kvbRmCode?vm.kvbRmCode:"",vm.aemAgentNameKVB=((document.getElementById("health-agent-name-from-aem-kvb")||{}).innerText||"").toString().trim(),dataLayer.agent_name=vm.aemAgentNameKVB||""),vm.isCsbFlow&&(dataLayer.emp_code=vm.csbRmCode?vm.csbRmCode:"",vm.aemAgentNameCSB=((document.getElementById("health-agent-name-from-aem-csb")||{}).innerText||"").toString().trim(),dataLayer.agent_name=vm.aemAgentNameCSB||""),dataLayer},vm.validatePincode=function(){(new Headers).append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse};let url=serviceHost+"/v2/health/zonemapping?pincode="+vm.residentPincode+"&productCode=10404";vm.pincodePending=!0;let dataLayerData=vm.getQuote();$http.get(url,config).then(function(response){if(response&&204==response.status)return vm.responseError=!1,void healthNewFlowFormValidation.validateAll();response&&response.data&&response.data.city?(vm.residentCity=response.data.city,response.data.zone?vm.selectedZone=response.data.zone:vm.pincodePending=!1,vm.setLocalStorage(),vm.redirectPage(),newHealthInsuranceAnalytics.ViewPrices(vm.residentPincode,vm.getMobileNumber()),callDataLayerFunctions("LeadSubmit",vm.getMobileNumber(),"Health Insurance Form","Health")):(healthNewFlowFormValidation.validateAll(),vm.pincodePending=!1),customPageViewdataLayerGoogleAnalytics(dataLayerData)},function(error){vm.pincodePending=!1,error.data&&(error.data.url||(error.data.url=url)),dataLayerData.error_response=error&&error.data&&error.data.errorMessage,customPageViewdataLayerGoogleAnalytics(dataLayerData),vm.responseError=!1,healthNewFlowFormValidation.validateAll()})},vm.setLocalStorage=function(){if(getParameter("flow")&&"KVB"===getParameter("flow").toString().toUpperCase()){let url=new URL(window.location.href);params={},url.searchParams.forEach((value,key)=>{params[key]||(params[key]=[]),params[key].push(value)})}let localStorageValues={campaignData:{utmSource:params.utm_source?params.utm_source[0]:"Web Drop out",utmMedium:params.utm_medium?params.utm_medium[0]:"",utmCampaign:params.utm_campaign?params.utm_campaign[0]:"",utmContent:params.utm_content?params.utm_content[0]:"",utmTerm:params.utm_term?params.utm_term[0]:""},policyHolder:{address:{selectedZone:vm.selectedZone,residentCity:vm.residentCity,residentPincode:vm.residentPincode},communication:{mobileNumber:vm.getMobileNumber(),emailId:""}},insuredPerson:{persons:{}},sourceUrl:window.location.href,product:"health",lastVisitedUrl:"",visitedTime:(new Date).getTime()};params.imd_key&&(localStorageValues.imdKey=params.imd_key[0]),params.api_key&&(localStorageValues.apiKey=params.api_key[0]),"Y"!==vm.callerCodeValue&&"YN"!==vm.callerCodeValue||!vm.merchantCode||(localStorageValues.agentCode=vm.merchantCode?vm.merchantCode:""),vm.isKvbFlow&&(localStorageValues.emp_code=vm.kvbRmCode?vm.kvbRmCode:""),vm.isCsbFlow&&(localStorageValues.emp_code=vm.csbRmCode?vm.csbRmCode:""),localStorageValues.isTeleBlock=vm.isTeleBlock,localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(localStorageValues)),localStorage.setItem("previousProduct","quote-band-health"),vm.allLocalStorageValues=localStorageValues,localStorage.setItem("HealthInsuranceSessionDetail
363s",JSON.stringify(localStorageValues))},vm.redirectPage=function(){redirectComponent="intent",setTimeout(()=>{window.location.href.includes("localhost")?location.href=`/content/godigit/directportal/en/health-insurance/health-flow/${redirectComponent}.html?session=${vm.uniqueSessionValue}`:location.href=`/health-insurance/health-flow/${redirectComponent}?session=${vm.uniqueSessionValue}`},4e3)},vm.getMobileNumber=function(){return searchParams.get("mobileNum")?searchParams.get("mobileNum"):vm.mobileNumber?vm.mobileNumber.toString().includes("*")?vm.mobileNumberCookies:vm.mobileNumber:vm.customerMobileNumber?vm.customerMobileNumber:""},vm.nativeFlow=function(){let url=new URL(window.location.href),searchParams=new URLSearchParams(url.search);searchParams.get("pinCode")&&searchParams.get("mobileNum")&&"digit_mobileapp"===new URLSearchParams(location.search).get("utm_source")&&(vm.residentPincode=searchParams.get("pinCode"),vm.mobileNumber=searchParams.get("mobileNum"),vm.checkCamundaPinCodeBlocked(),vm.FormSubmit(!0))},vm.googleAnalytics=function(event,data){let err="view_prices_error"===event?"pincode blocked":"",dataLayer={event:event,userId:getCookie("visitorId"),lob:"health",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"new flow",phone_number:AesCtr.encrypt(vm.getMobileNumber(),encranalytics,256),source:window.location.href,name:data||"",pincode:vm.residentPincode?vm.residentPincode:"",error:err||"",status:data&&data.status?data.status:""};customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.addPartnerRmCodeValidation=function(){[{isEnabled:vm.isKvbFlow,fieldName:"kvb-input-field",rules:kvbRmCode},{isEnabled:vm.isCsbFlow,fieldName:"csb-input-field",rules:csbRmCode}].forEach(config=>{config.isEnabled&&healthNewFlowFormValidation.addByName(config.fieldName,config.rules)})},vm.showPortModel=function(isNewHealthHome){vm.portMyExistingPolicyModal=!0,vm.policyPortModalShow=!0,vm.custName="",vm.custmobNumber="",vm.requestCallSuccess=!1,vm.isLoading=!1,vm.googleAnalytics("port_existing_policy_clicked"),"newGetQuote"===isNewHealthHome?portablityFormPresent&&"true"===portablityFormPresent.innerText.trim()&&requestCallBackFormValidation.addByName("terms-and-condition-1",termsAndCondition):"newHealthHome"===isNewHealthHome?setTimeout(()=>{document.getElementById("port-model").style.display="flex"},100):setTimeout(function(){new Modal("#port-model").show()},500)},vm.navigateToLink=function(){vm.googleAnalytics("download_app_clicked"),window.location.href="https://www.godigit.com/login?is_retargeting=true&source_caller=ui&shortlink=y0ytzhup&c=Health_LP_mobile_app_download&pid=Website&deep_link_value=MyPolicy&af_xp=custom&af_reengagement_window=30d"},vm.closeMOdalPort=function(){vm.portMyExistingPolicyModal=!1,vm.policyPortModalShow=!1,document.getElementById("port-model").style.display="none"},vm.closeModalBtnNew=function(){vm.portMyExistingPolicyModal=!1,vm.policyPortModalShow=!1},vm.getcustMobileNumber=function(){return vm.custNumber?(vm.custNumber.toString().includes("*"),vm.custNumber):""};const isPortablityDefault=document.querySelector(".portablity-new-flow-check");isPortablityDefault&&"true"===isPortablityDefault.innerText.trim()&&(vm.showPortModel("newGetQuote"),vm.hideHealthLoader=!0),vm.requestCall=function(callType){let data=vm.custName;vm.googleAnalytics("port_details_submitted",data),"popup"===callType?reqCallModalFormValidation.validateAll(function(){vm.crmCall()}):requestCallBackFormValidation.validateAll(function(){vm.crmCall()})},vm.crmCall=async function(){let number=vm.getMobileNumber(),dataCrm={data:{type:"GD_Retail_Health",attributes:{name:`${number}_Health`,phone_number:number,customer_name:vm.custName,last_visited_page:"Port Existing Policy",product_name:"Health",pincode:vm.residentPincode,source_name:vm.allLocalStorageValues.campaignData?vm.allLocalStorageValues.campaignData.utmSource:params.utm_source?params.utm_source[0]:"",source_campaign:vm.allLocalStorageValues.campaignData?vm.allLocalStorageValues.campaignData.utmCampaign:params.utm_campaign?params.utm_campaign[0]:""}}};dataCrm.data.custom_relation={gd_retail_health_products:{type:"GD_Retail_Health_Products",attributes:[{name:`${number}_Health`,product_name:"Health",sum_insured:"",plan_selected:"",plan_name:"",quote_number:""}]}};let url=`${serviceHost}/lead/data`;vm.isLoading=!0;const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(dataCrm)),config).then(function(res){vm.requestCallSuccess=!0,vm.portModalImage="https://d2h44aw7l5xdvz.cloudfront.net/assets/img/hands-in-air-celebrate.svg",vm.isLoading=!1,vm.custNameSuccess,vm.custNumberSuccess},function(error){vm.isLoading=!1,vm.custNameSuccess,vm.custNumberSuccess})},vm.checkNativeFlow=function(){return!(!searchParams.get("pinCode")||!searchParams.get("mobileNum"))},vm.openModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyHealth&&(getQuoteStickyHealth.classList.add("open"),getQuoteStickyHealth.classList.remove("close"),isMobileView&&document.body.classList.add("scroll-disabled"))},vm.closeModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyHealth&&(getQuoteStickyHealth.classList.remove("open"),getQuoteStickyHealth.classList.add("close"),isMobileView&&document.body.classList.remove("scroll-disabled"))},vm.init=function(){vm.allLocalStorageValues={},vm.mobileNumber="",vm.getUniqueSessionValue(),vm.getLocalStorage(),vm.getBlockedPincodeList(),vm.addPartnerRmCodeValidation()}
363,vm.init();const btnFooterFloatingHealth=document.querySelector(".getquote-section .floating-button"),bottomStripe=document.querySelector(".getquote-section .stripe-floating-view");if(btnFooterFloatingHealth){const viewInstantQuoteSection=document.querySelector(".view-instant-quote");viewInstantQuoteSection&&(viewInstantQuoteSection.style.display="none");const arrowUp=document.querySelector(".bottom-side-scroller");window.addEventListener("scroll",()=>{window.scrollY>=400?(btnFooterFloatingHealth.classList.add("visible-floating-button"),arrowUp&&arrowUp.classList.add("move-arrow-up-old")):(btnFooterFloatingHealth.classList.remove("visible-floating-button"),arrowUp&&arrowUp.classList.remove("move-arrow-up-old"))})}window.innerWidth>992&&bottomStripe&&window.addEventListener("scroll",()=>{window.scrollY>=400?bottomStripe.classList.contains("close")||(btnFooterFloatingHealth.classList.remove("visible-floating-button"),bottomStripe.classList.add("open")):bottomStripe.classList.remove("open")})});var observer=new MutationObserver(function(mutationRecords){document.querySelectorAll(".health-skeleton").forEach(el=>{el.style.animation="none"})});observer.observe(document.body,{childList:!0}); 364const motorCvInsuranceAnalytics={trackOfProduct:function(){digitalData.page.pageInfo.platform="commercial",digitalData.producttype="Commercial"},encrypt:function(plainText){return AesCtr.encrypt(plainText,encranalytics,256)},moengageViewPriceFunc:function(regNo,mobile,city){let Entry_Url=window.location.origin,viewPriceValues={"Reg Number":upperCase(regNo),"city,":city,"Entry Page Url":Entry_Url,product:"Commercial","Product Level 1":"Motor","Product Level 2":"Commercial","Product Level 3":"Roll Over","Mobile Number":mobile};mobile&&"8888888888"!==mobile.toString()&&(viewPriceValues["Mobile Number"]="91"+mobile),Moengage.track_event("View Prices",viewPriceValues),mobile&&"8888888888"!==mobile.toString()&&Moengage.add_mobile("91"+mobile),Moengage.add_user_attribute("city",city),Moengage.add_user_attribute("Reg Number",upperCase(regNo)),Moengage.add_user_attribute("user_generation_source","web")},continueDropOffJourney:function(quoteId,productType,regNumber){digitalData.flowtype="Continue Journey",digitalData.quoteid=quoteId,digitalData.producttype=productType,digitalData.car.registrationNumber=regNumber,_satellite.track("Continue_Journey")}};digitapp.controller("commercialHomeController",function($scope,$http,$interval){const{wrapContent:wrapContent,unwrapContent:unwrapContent}=manageWrapping;let vm=this,expieryDate=new Date;expieryDate.setDate(expieryDate.getDate()-91),vm.isValidRegNumber=!0,vm.isMissMatchError=!0,vm.proposalErrorHandled=!1,vm.numberType="",vm.isBotAllow=!1,vm.navigationPath=window.location.origin,vm.isSIBPage=window.location.href.includes("utm_source=partner&utm_medium=SIB&utm_campaign=1170920");var getQuoteStickyCV=document.getElementById("getquote-bottom-sticky"),commercialForm=document.getElementById("mainCvForm");let mobileNumberCV={rules:"isMobileNumberValid",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{isMobileNumberValid:"Sorry, that mobile number looks incorrect"}},commercialFormValidation=new Dominar(commercialForm,{"mobile-number":mobileNumberCV,"cv-term-condition":{rules:"required",container:".input-form-group",feedback:!1,triggers:["focusout","change"],customMessages:{required:"Please accept the T&C"}}}),dynamicValidationForRegistrationNumber={rules:"required|isRegistrationNumberValid|regMissMatch",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter registration number",isRegistrationNumberValid:"Enter valid registration number",regMissMatch:"This is a "+vm.numberType+" number. Try again."}},stickyModalDominarCV=new Dominar(getQuoteStickyCV,{"registration-search":dynamicValidationForRegistrationNumber,"mobile-number":mobileNumberCV});Dominar.Validator.register("isRegistrationNumberValid",function(value){return validateRegistrationNumberCrossProduct(value.toString().toUpperCase())&&vm.isValidRegNumber}),Dominar.Validator.registerAsync("regMissMatch",function(value,attribute,parameters,passes){return vm.isMissMatchError?passes(!0):passes(vm.isMissMatchError,"This is a "+vm.numberType+" number. Try again."),vm.isMissMatchError}),Dominar.Validator.register("isMobileNumberValid",function(value){let validNumber=10==value.length;if(validNumber){var numberArray=value.split("");validNumber=parseInt(numberArray[0])>5}return!!validNumber}),vm.getUniqueSessionValue=function(){let randomNumber=(new Date).getTime();randomNumber=(randomNumber=encrypt(randomNumber)).replace(/[0-9]/g,""),vm.uniqueSessionValue=randomNumber.replace(/[^a-zA-Z ]/g,"")},vm.callConvoxService=function(){if("teleblock"!==getParameter("utm_content")&&vm.localStorageValues.person.phoneNumber&&"8888888888"!==vm.localStorageValues.person.phoneNumber){var convoxServiceData,serviceUrl=serviceHost+"/v3/motor/convox",ajax=new XMLHttpRequest;ajax.onload=function(){},ajax.open("POST",serviceUrl,!0),ajax.setRequestHeader("Content-Type","application/json"),ajax.send(wrapContent(JSON.stringify((convoxServiceData={visitorId:vm.localStorageValues.visitorId,proposalId:vm.localStorageValues.proposalNumber,lastvisitedpage:"homepage"},vm.localStorageValues.flowType.registrationNumberFlow||(convoxServiceData.category="Commercial",convoxServiceData.process="Commercial"),vm.localStorageValues.person.phoneNumber&&(convoxServiceData.mobile=vm.localStorageValues.person.phoneNumber),"tc"===getParameter("utm_source")&&"carinfo"===getParameter("utm_campaign")&&(convoxServiceData.process="Cv_carinfo"),vm.localStorageValues.gclid&&
364(convoxServiceData.customfield3=vm.localStorageValues.gclid),convoxServiceData))))}},vm.callsuiteCrm=function(){if("teleblock"===getParameter("utm_content")||!vm.localStorageValues.person.phoneNumber||"8888888888"===vm.localStorageValues.person.phoneNumber)return;var serviceUrl=serviceHost+"/leadgini";const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:rawResponse,headers:headers};$http.post(serviceUrl,wrapContent(JSON.stringify({visitorId:vm.localStorageValues.visitorId,proposalId:vm.localStorageValues.proposalNumber})),config).then(function(response){response&&response.length>0&&response[0].data&&response[0].data.attributes&&response[0].data.attributes.diy_score&&(vm.localStorageValues.diy_score=response[0].data.attributes.diy_score)})},vm.getDateDiffInDays=function(date){let firstDate=(new Date).getTime();return(new Date(date)-firstDate)/864e5},vm.redirectPage=function(isVahanFailed){if(vm.localStorageValues.flowType.registrationNumberFlow&&vm.callDataLayerViewPrice(!!vm.localStorageValues.isMissMatchedFlow),"Bike"!==vm.localStorageValues.product&&(vm.localStorageValues.person.phoneNumber=vm.localStorageValues.person.phoneNumber?vm.localStorageValues.person.phoneNumber:"8888888888"),vm.localStorageValues.servicePending=!0,isVahanFailed)return vm.localStorageValues.noDataFromVahaan=!0,localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),void(location.href=vm.navigationPath+`/motor-insurance/cv-flow/cv-plan-page/vehicle-category?session=${vm.uniqueSessionValue}`);if(localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.localStorageValues.isMissMatchedFlow){if("Bike"===vm.localStorageValues.product)return void(location.href=checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber,"Bike")&&vm.localStorageValues.flowType.registrationNumberFlow?`/motor-insurance/bike-flow/plan-page/city?session=${this.uniqueSessionValue}`:`/motor-insurance/bike-flow/plan-page?session=${vm.uniqueSessionValue}`);if("Car"===vm.localStorageValues.product)return void(location.href=vm.localStorageValues.flowType.registrationNumberFlow?checkIfBharatReg(vm.localStorageValues.vehicle.licensePlateNumber)?`/motor-insurance/car-flow/car-plan-page/city?session=${vm.uniqueSessionValue}`:`/motor-insurance/car-flow/car-plan-page?session=${vm.uniqueSessionValue}`:`/motor-insurance/car-flow/car-plan-page/make?session=${vm.uniqueSessionValue}`)}location.href=vm.navigationPath+(vm.localStorageValues.flowType.registrationNumberFlow?`/motor-insurance/cv-flow/cv-plan-page?session=${vm.uniqueSessionValue}`:`/motor-insurance/cv-flow/cv-plan-page/vehicle-category?session=${vm.uniqueSessionValue}`)},vm.setLocalStorageValues=function(){if(vm.mobileDevice&&(vm.localStorageValues.visitorId=getDynamicCode()),searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")&&vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&(vm.localStorageValues.utmParams.utmFlow="DirectPortalPartnerStoreLink"),vm.localStorageValues.flowType.registrationNumberFlow=vm.registrationNumberCardShow,vm.localStorageValues.flowType.CityFlow=!vm.registrationNumberCardShow,vm.localStorageValues.visitorId=vm.localStorageValues.visitorId||getDynamicCode(),vm.localStorageValues.cityNameList=motorCityList||vm.cityPincodeJson,vm.localStorageValues.flowJourney=vm.registrationNumberCardShow?"reg":vm.localStorageValues.vehicle.isVehicleNew?"new":"city",vm.localStorageValues.vehicle.isVehicleNew||(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy=vm.getCurrentThirdPartyPolicyObj()),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),motorCvInsuranceAnalytics.moengageViewPriceFunc(vm.localStorageValues.vehicle.licensePlateNumber,vm.localStorageValues.person.phoneNumber,vm.localStorageValues.person.cityName),vm.localStorageValues.flowType.registrationNumberFlow)return-1!==vm.getLocalStorageDataIndex()?void vm.motorUpdateProposalApi():void vm.motorProposalApi();setTimeout(function(){vm.redirectPage(!1)},500)},vm.motorProposalApi=function(){if(vm.proposalErrorHandled)return;vm.isDisabled=!0;let url=`${serviceHost}/v3/motor/proposal?${(new Date).getTime()}`;const data={visitorId:vm.localStorageValues.visitorId,pinCode:vm.localStorageValues.person.pinCode,product:vm.localStorageValues.product,vehicle:{isVehicleNew:vm.localStorageValues.vehicle.isVehicleNew,licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)}};data.additionalDetails={landing_page:window.location.href,device:vm.mobileDevice?"mobile":"desktop",os:operatingSystemName,source:vm.mobileDevice?"MOBILE-WEB":"DESKTOP-WEB",utmSource:vm.localStorageValues.utmParam
364s&&vm.localStorageValues.utmParams.utmSource?vm.localStorageValues.utmParams.utmSource:""},vm.localStorageValues.gclid&&(data.additionalDetails.gclid=vm.localStorageValues.gclid),(vm.localStorageValues.vehicle.isVehicleNew||vm.localStorageValues.flowType.registrationNumberFlow&&vm.localStorageValues.person.phoneNumber)&&(data.persons=[{communications:[{communicationType:"MOBILE",communicationId:vm.localStorageValues.person.phoneNumber}]}]),vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&(data.source=vm.localStorageValues.utmParams,vm.localStorageValues.utmParams.imdCode&&(data.contract={agentCode:vm.localStorageValues.utmParams.imdCode}));const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){204===response.status&&(vm.isDisabled=!1,vm.setLocalStorageValues()),200===response.status&&(vm.localStorageValues.proposalNumber=response.data.proposalId,vm.callConvoxService(),vm.callsuiteCrm(),vm.getVehicleType())},function(error){if(400===error?.status)return vm.proposalErrorHandled=!0,vm.isDisabled=!1,void openProposalErrorModal("cv");checkForVisitorIdError(error)||(vm.isDisabled=!1,vm.setLocalStorageValues())})},vm.getmotorDetailsFromProposalData=function(){vm.isDisabled=!0;let url=`${serviceHost}/v2/motor/get/vehicle/fetchproposaldata?${(new Date).getTime()}`;const data={visitorId:vm.localStorageValues.visitorId,proposalId:vm.localStorageValues.proposalNumber},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){if(204==response.status&&(vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)),200==response.status){vm.isDisabled=!1;const motorResponse=response.data;if(Object.keys(motorResponse).forEach(ele=>{motorResponse[ele]=unwrapContent(motorResponse[ele])}),vm.localStorageValues.isNoDataFound=!1,"14"!==motorResponse.veh_code.toString().substring(0,2)&&"15"!==motorResponse.veh_code.toString().substring(0,2)&&"16"!==motorResponse.veh_code.toString().substring(0,2)&&("11"===motorResponse.veh_code.toString().substring(0,2)?vm.numberType="four-wheeler":"12"===motorResponse.veh_code.toString().substring(0,2)||"13"===motorResponse.veh_code.toString().substring(0,2)?vm.numberType="two-wheeler":vm.numberType="Not a private vehicle",vm.localStorageValues.product="four-wheeler"===vm.numberType?"Car":"two-wheeler"===vm.numberType?"Bike":"Commercial",vm.localStorageValues.isMissMatchedFlow=!0),vm.localStorageValues.vehicle.make=motorResponse.vehicleMake,vm.localStorageValues.vehicle.model=motorResponse.vehicleModel,vm.localStorageValues.vehicle.variant=motorResponse.vehicleVariant?.split(".0")[0],vm.localStorageValues.vehicle.cubicCapacity=motorResponse.cubic_capacity?.split(".")[0],vm.localStorageValues.vehicle.vehicleMaincode=motorResponse.veh_code,vm.localStorageValues.vehicle.registrationDate=motorResponse.veh_reg_date,vm.localStorageValues.vehicle.engineNumber=motorResponse.engine_no,vm.localStorageValues.vehicle.vehicleIdentificationNumber=motorResponse.vin,vm.localStorageValues.vehicle.permitType="PUBLIC",(motorResponse.owner_serial_no||motorResponse.ownershipSerialNumber)&&(vm.localStorageValues.vehicle.ownershipSerialNumber=motorResponse.owner_serial_no?motorResponse.owner_serial_no:motorResponse.ownershipSerialNumber),vm.getCategoryCode(motorResponse.propertyType),vm.localStorageValues.person.ownerName=motorResponse.owner_name,vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=motorResponse.insurance_upto||"",vm.localStorageValues.previousInsurer.previousInsurerName="",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyInsurerName="",vm.localStorageValues.previousInsurer.previousPolicyNumber=motorResponse.insurance_policy_no?"d"===motorResponse.insurance_policy_no.toString().toLowerCase().charAt(0)?trimPolicyNumber(motorResponse.insurance_policy_no):motorResponse.insurance_policy_no:"UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber=motorResponse.insurance_policy_no?"d"===motorResponse.insurance_policy_no.toString().toLowerCase().charAt(0)?trimPolicyNumber(motorResponse.insurance_policy_no):motorResponse.insurance_policy_no:"UNKNOWN",vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=motorResponse.insurance_upto?moment(motorResponse.insurance_upto).format("YYYY-MM-DD"):"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=motorResponse.insurance_upto?moment(motorResponse.insurance_upto).format("YYYY-MM-DD"):"",delete vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime,vm.localStorageValues.noD
364ataFromVahaan=!1,vm.localStorageValues.previousInsurerDetails=motorResponse.insurance_company||"","Bike"===vm.localStorageValues.product){vm.localStorageValues.isPolicyExpired=!1,vm.localStorageValues.vehicle.variant=motorResponse.vehicleVariant?.split(".0")[0];let date=new Date;date.setDate((new Date).getDate()+5),vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=date.getFullYear()+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+("0"+date.getDate()).slice(-2),vm.localStorageValues.previousInsurer.currentThirdPartyPolicy=vm.getCurrentThirdPartyPolicyObj(!1),vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyInsurerName="",vm.localStorageValues.person.phoneNumber="8888888888"===vm.localStorageValues.person.phoneNumber?"":vm.localStorageValues.person.phoneNumber,delete vm.localStorageValues.vehicle.permitType}if("Car"===vm.localStorageValues.product){delete vm.localStorageValues.vehicle.permitType,vm.localStorageValues.previousInsurer.previousInsurerCode=motorResponse.insurance_company_code||"106";if(getdateDiffInMonths(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date)<="42"){getdateDiffInMonths(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date(motorResponse.insurance_upto))<=30?(vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=vm.getExpieryDate(vm.localStorageValues?.vehicle?.registrationDate?new Date(vm.localStorageValues?.vehicle?.registrationDate):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=getStartDate(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime?new Date(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime):"",3,!0)||"",vm.localStorageValues.previousInsurer.previousPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber="UNKNOWN"):(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=getStartDate(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime?new Date(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime):"",3,!1)||"",vm.localStorageValues.previousInsurer.previousPolicyNumber="UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN",vm.localStorageValues.previousInsurer.previousPolicyExpiryDate="")}else vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=vm.getExpieryDate(motorResponse.insurance_upto?new Date(motorResponse.insurance_upto):"")||"",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=getStartDate(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime?new Date(vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime):"",1,!1)||"",vm.localStorageValues.previousInsurer.previousPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN",vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyNumber=formatPolicyNumber(motorResponse.insurance_policy_no)||"UNKNOWN"}return vm.localStorageValues.previousInsurer.previousInsurerCode=motorResponse.insurance_company_code||"106",localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.redirectPage(!1),void vm.callDataLayerViewPrice(!!vm.localStorageValues.isMissMatchedFlow)}},function(error){vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)})},vm.getCategoryCode=function(propertyType){switch(propertyType){case"KFZGC":vm.localStorageValues.vehicle.vehicleCategory="Goods Carrying",vm.localStorageValues.vehicle.categoryCode="gcv";break;case"KFZPC":vm.localStorageValues.vehicle.vehicleCategory="Passenger Carrying",vm.localStorageValues.vehicle.categoryCode="pcv";break;case"KFZMD":vm.localStorageValues.vehicle.vehicleCategory="Miscellaneous",vm.localStorageValues.vehicle.categoryCode="misc_d";break;case"KFZTR":vm.localStorageValues.vehicle.vehicleCategory="Trailer",vm.localStorageValues.vehicle.categoryCode="trailer";break;default:return}},vm.cityPincodeJson=digitCitiesJson,vm.cityPincodeJson={...vm.cityPincodeJson,Bangalore:"560067","Bangalore Rural":"561203"},vm.citiesList=Object.keys(vm.cityPincodeJson).map(function(v){return v.toLowerCase()}),vm.pinCodeList=Object.keys(vm.cityPincodeJson).map(function(key){return vm.cityPincodeJson[key]}),vm.validateUrl=function(url){-1!=window.location.href.indexOf(".godigit.com")&&(window.location.href=url)},vm.validateRenewal=function(response){response.sort((a,b)=>new Date(b.policyExpiryDate).getTime()-new Date(a.policyExpiryDate).getTime());const cvRenewalData=response&&response?.length?response[0]:null,days=cvRenewalData&&cvRenewalData.policyExpiryDate&&getDateDiffInDays(cvRenewalData.policyExpiryDate)+1;if(cvRenewalData&&days>-91&&cvRenewalData.renewalQuoteKey)if("20301"===cvRenewalData.productC
364ode||"20303"===cvRenewalData.productCode||"20304"===cvRenewalData.productCode||"20302"===cvRenewalData.productCode){if(cvRenewalData.agentCode&&cvRenewalData.existingPolicyKey&&"1000651"===cvRenewalData.agentCode&&!vm.isSIBPage)return void(window.location.href=vm.navigationPath+"/login/commercial-vehicle-renewals?policyNo="+cvRenewalData.existingPolicyKey);vm.callDataLayerViewPrice("one_pager");const validUrl=vm.isSIBPage?window.location.origin+"/campaigns/rollover-cv?policyKey="+cvRenewalData.renewalQuoteKey+"&flowtype=website_redirection&utm_source=partner&utm_medium=SIB&utm_campaign=1170920":window.location.origin+"/campaigns/rollover-cv?policyKey="+cvRenewalData.renewalQuoteKey+"&flowtype=website_redirection&source=direct";vm.validateUrl(validUrl)}else if("20201"===cvRenewalData.productCode||"20203"===cvRenewalData.productCode||"20204"===cvRenewalData.productCode||"20202"===cvRenewalData.productCode){if(cvRenewalData.agentCode&&cvRenewalData.existingPolicyKey&&"1000651"===cvRenewalData.agentCode&&!vm.isSIBPage)return void(window.location.href=vm.navigationPath+"/login/bike-insurance-renewals?policyNo="+cvRenewalData.existingPolicyKey);vm.callDataLayerViewPrice("one_pager");const validUrl2=vm.isSIBPage?window.location.origin+"/campaigns/rollover-bike?policyKey="+cvRenewalData.renewalQuoteKey+"&flowtype=website_redirection&utm_source=partner&utm_medium=SIB&utm_campaign=1170920":window.location.origin+"/campaigns/rollover-bike?policyKey="+cvRenewalData.renewalQuoteKey+"&flowtype=website_redirection&source=direct";vm.validateUrl(validUrl2)}else vm.getRtoDetail();else vm.getRtoDetail()},vm.fetchRenewalDetails=function(){vm.isDisabled=!0;let url=`${serviceHost}/motor/renewal/details?${(new Date).getTime()}`;const data={licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){204==response.status&&(vm.isDisabled=!1,vm.getRtoDetail()),200==response.status&&(response.data&&response.data.length&&response.data.forEach((ele,index)=>{Object.keys(ele).forEach(key=>{"existingPolicyKey"!==key&&"renewalQuoteKey"!==key&&(response.data[index][key]=unwrapContent(response.data[index][key]))})}),vm.validateRenewal(response.data))},function(error){vm.isDisabled=!1,vm.getRtoDetail()})},vm.callDataLayerViewPrice=function(isMissmatchErrror){const sessionStorageLob=sessionStorage.getItem("lobChecked"),liTerms=sessionStorageLob?JSON.parse(sessionStorageLob)?.lob.cv:"",vehicleAge=getDateDiffInYears(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date);let dataLayer={event:"view_price_click",userId:getCookie("visitorId"),lob:vm.localStorageValues.product||"Commercial",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",registration_number:vm.localStorageValues.vehicle&&vm.localStorageValues.vehicle.licensePlateNumber?vm.localStorageValues.vehicle.licensePlateNumber:"NA",flow_type:"reg"===vm.localStorageValues.flowJourney?"vahan_flow":vm.localStorageValues.vehicle.isVehicleNew?"New Flow":"city_flow",phone_number:vm.localStorageValues.phoneNumber?motorCvInsuranceAnalytics.encrypt(vm.localStorageValues.phoneNumber):motorCvInsuranceAnalytics.encrypt("8888888888"),source:window.location.href,addons_visible:this.localStorageValues?.addonList&&this.localStorageValues?.addonList[this.localStorageValues?.selectedPlan]?"Yes":"No",discounts_visible:this.localStorageValues?.quickQuoteResponse?.plans?.[this.localStorageValues.selectedPlan]?.resposeBody?.discountPremium?"Yes":"No",registration_year:this.localStorageValues?.seletedYear||this.localStorageValues?.vehicle?.registrationDate&&new Date(this.localStorageValues?.vehicle?.registrationDate).getFullYear()||"NA",registration_month:this.localStorageValues?.vehicle?.registrationMonth||this.localStorageValues?.vehicle?.registrationDate&&new Date(this.localStorageValues?.vehicle?.registrationDate).getMonth()||"NA",vehicle_make:this.localStorageValues?.vehicle?.make||this.localStorageValues?.postProposalResponse?.vehicle?.make||"NA",vehicle_model:this.localStorageValues?.vehicle?.model||this.localStorageValues?.postProposalResponse?.vehicle?.model||"NA",claim_last_year_status:(this.localStorageValues?.previousInsurer?.isClaimInLastYear?"Yes":"No")||(this.localStorageValues?.quickQuoteResponse?.previousInsurer?.isClaimInLastYear?"Yes":"No")||"NA",payd_visible:(this.localStorageValues?.selectedPlan&&this.localStorageValues.selectedPlan.includes("WithPi")?"Yes":"No")||(this.localStorageValues?.quickQuoteResponse?.selectedPlan&&this.localStorageValues?.quickQuoteResponse?.selectedPlan.includes("WithPi")?"Yes":"No")||"NA",vehicle_age:vehicleAge||"NA",status:liTerms?"both":"onlygi",gclid_id:vm.localStorageValues.gclid?vm.localStorageValues.gclid:"NA",diy_score:vm.localStorageValues&&vm.localStorageValues.diy_score?vm.localStorageValues.diy_score:"NA"};
364isMissmatchErrror&&("one_pager"===isMissmatchErrror?dataLayer.flow_type="one_pager":dataLayer.error_response="Commercial : "+vm.numberType+" number"),vm.localStorageValues.vehicle.regionCode&&(dataLayer.RTO=vm.localStorageValues.vehicle.regionCode),vm.localStorageValues.person.pinCode&&(dataLayer.pincode=vm.localStorageValues.person.pinCode),vm.localStorageValues.person.cityName&&(dataLayer.city=vm.localStorageValues.person.cityName),customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.callDataLayerContinueJourneyClick=function(){let dataLayer={event:"continue_journey_click",lob:"Commercial",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",flow_type:"New Flow",quote_id:vm.lastVisitedData.issuedPolicyInfo&&vm.lastVisitedData.issuedPolicyInfo.policyNumber||"NA",phone_number:vm.lastVisitedData.person&&vm.lastVisitedData.person.phoneNumber?motorCvInsuranceAnalytics.encrypt(vm.lastVisitedData.person.phoneNumber):motorCvInsuranceAnalytics.encrypt("8888888888"),email:vm.lastVisitedData.person&&vm.lastVisitedData.person.emailId?motorCvInsuranceAnalytics.encrypt(vm.lastVisitedData.person.emailId):"",registration_number:vm.lastVisitedData.vehicle&&vm.lastVisitedData.vehicle.licensePlateNumber?vm.lastVisitedData.vehicle.licensePlateNumber:"",default_selected_plan:vm.lastVisitedData.selectedPlan?vm.lastVisitedData.selectedPlan:"",plan_premium:vm.lastVisitedData.costBreakUp&&vm.lastVisitedData.costBreakUp.netPremium?vm.lastVisitedData.costBreakUp.netPremium:"",diy_score:vm.localStorageValues&&vm.localStorageValues.diy_score?vm.localStorageValues.diy_score:"NA"};customPageViewdataLayerGoogleAnalytics(dataLayer)},vm.dontKnowRegistrationNumberTab=function(isNewVehicle){commercialFormValidation.remove("registration-search"),clearDominarErrorsOnFocus(commercialFormValidation),commercialFormValidation.validateAll(function(){vm.localStorageValues.vehicle.isVehicleNew=isNewVehicle,vm.registrationNumberCardShow=!1,vm.callDataLayerViewPrice(),vm.viewPrice()}),!1===vm.localStorageValues.vehicle.isVehicleNew&&!1===vm.localStorageValues.flowType.registrationNumberFlow?vm.localStorageValues.flowType.isDontKnow=!0:vm.localStorageValues.flowType.isDontKnow=!1},vm.knowRegistrationNumberTab=function(){commercialFormValidation.fields={},commercialFormValidation.addByName("registration-search",dynamicValidationForRegistrationNumber),commercialForm&&clearDominarErrorsOnFocus(commercialFormValidation)},vm.toggleCard=function(isNewVehicle,isRegFlow){vm.registrationNumberCardShow=!isNewVehicle&&isRegFlow,vm.registrationNumberCardShow?vm.knowRegistrationNumberTab():vm.dontKnowRegistrationNumberTab(isNewVehicle)},vm.submitInfo=function(){if(vm.isValidRegNumber=!0,vm.registrationNumberCardShow){if(vm.storedLocalStorageData&&vm.storedLocalStorageData.length){const index=vm.getLocalStorageDataIndex();if(-1!==index)return vm.storedLocalStorageData[index]?.vehicle?.licensePlateNumber?.toLowerCase()===vm.localStorageValues.vehicle.licensePlateNumber.toLowerCase()?void(location.href=vm.storedLocalStorageData[index].recentPageUrl):searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?void vm.getRtoDetail():void vm.fetchRenewalDetails()}return searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?void vm.getRtoDetail():void vm.fetchRenewalDetails()}vm.callDataLayerViewPrice(),callDataLayerFunctions("LeadSubmit",vm.localStorageValues.person.phoneNumber,vm.localStorageValues.vehicle.isVehicleNew?"Commercial New Vehicle Form":"Commercial don't know flow form","Commercial"),vm.getRtoCode()},vm.isPartnerFlow=function(){let serachPosition=window.location.pathname.search("campaigns/bike-insurance1");(vm.isPartnerCampaignFlow=vm.localStorageValues.flowType.isCampaignFlow=-1!==serachPosition,vm.agentCode="",vm.callerCodeValue=searchParams.get("callercoderequired")&&searchParams.get("callercoderequired").toString().toUpperCase(),!searchParams.get("reg_no")||"20301"!==searchParams.get("product")&&"20302"!==searchParams.get("product")&&"20303"!==searchParams.get("product")&&"20304"!==searchParams.get("product"))||(document.getElementsByTagName("body")[0].classList.add("noscroll"),vm.localStorageValues.vehicle.licensePlateNumber=searchParams.get("reg_no"),vm.partner=!0,vm.viewPrice());vm.isFinoImd=getParameter("imdKey")&&"815F4213FCCD0061BE1EF789F5F3EF1D"===getParameter("imdKey").toString().toUpperCase(),getParameter("utm_campaign")&&"HERO"===getParameter("utm_campaign").toString().toUpperCase()&&(vm.isHeroPartner=!0,document.querySelector(".heroFincorpMainContainer").style.display="block",document.querySelectorAll("#addon-content").length&&document.querySelectorAll("#addon-content").forEach(item=>{item.style.display="none"}))},vm.viewPrice=function(){vm.isMissMatchError=!0,vm.partner?vm.submitInfo():commercialFormValidation.validateAll(function(){if(vm.registrationNumberCardShow){if(vm.storedLocalStorageData&&vm.storedLocalStorageData.length){const index=vm.getLocalStorageDataIndex();if(-1!==index)return vm.storedLocalStorageData[index]?.vehicle?.licensePlateNumber?.toLowerCase()===vm.localStorageValues.vehicle.licensePlateNumber.toLowerCase()?void(location.href=vm.storedLocalStorageData[index].recentPageUrl):searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?void vm.getRtoDetail():void vm.fetchRenewalDetails()}return searchParams.get("imdKey")&&window.location.href.includes("partner/renew-motor-insurance")?void vm.getRtoDetail():void vm.fetchRenewalDetails()}callDataLayerFunctions("LeadSubmit",vm.localStorageValues.person.phoneNumber,vm.localStorageValues.vehicle.isVehicleNew?"Commercial New Vehicle Form":"Commercial don't know flow form","Commercial"),vm.isDisabled=!1,vm.setLocalStorageValues()})},vm.viewPriceBottomCV=function(){stickyModalDominarCV.validateAll(function(){vm.submitInfo()})},vm.getRtoDetail=function(){vm.isDisabled=!0;let url=`${serviceHost}/cities/rtocode/region?${(new Date).getTime()}`;const reqData={regionCode:vm.localStorageValues.vehicle.licensePlateNumber,visitorId:getDynamicCode()},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(reqData)),config).then(function(response){if(200==response.status){vm.isDisabled=!1,vm.localStorageValues.person.cityName=response.data.length>1?response.data[1].registeredCityName:response.data[0].registeredCityName;let cityIndex=motorCitesList?motorCitesList.indexOf(vm.localStorageValues.person.cityName.toLowerCase()):vm.citiesList.indexOf(vm.localStorageValues.person.cityName.toLowerCase());return vm.localStorageValues.person.pinCode=motorPinCodeList?motorPinCodeList[cityIndex]:vm.pinCodeList[cityIndex],vm.localStorageValues.vehicle.regionCode=response.data[0].regionCode,!searchParams.get("reg_no")||"20301"!==searchParams.get("product")&&"20302"!==searchParams.get("product")&&"20303"!==searchParams.get("product")&&"20304"!==searchParams.get("product")||(vm.localStorageValues.vehicle.licensePlateNumber=response.data[0].registrationNumber),vm.setLocalStorageValues(),void callDataLayerFunctions("LeadSubmit",vm.localStorageValues.person.phoneNumber,"Commercial Registration Flow Form","Commercial")}vm.isDisabled=!1,vm.isValidRegNumber=!1,commercialFormValidation.validateAll()},function(error){vm.isDisabled=!1,vm.isValidRegNumber=!1,commercialFormValidation.validateAll()})},vm.getExpieryDate=function(date){return date&&"Invalid Date"!==new Date(date).toString()?date.getFullYear()+"-"+("0"+(date.getMonth()+1)).slice(-2)+"-"+("0"+date.getDate()).slice(-2):""},vm.getCurrentThirdPartyPolicyObj=function(){const endDate=new Date((new Date).setDate((new Date).getDate()+(vm.localStorageValues.isPolicyExpired?5:10))),temp=new Date((new Date).setDate((new Date).getDate()+(vm.localStorageValues.isPolicyExpired?5:10))),startDate=this.convertDate(new Date(new Date(temp.setFullYear(temp.getFullYear()-1))).setDate(temp.getDate()+1));return{currentThirdPartyPolicyExpiryDateTime:this.convertDate(endDate),isCurrentThirdPartyPolicyActive:!0,currentThirdPartyPolicyStartDateTime:startDate,currentThirdPartyPolicyNumber:"UNKNOWN"}},vm.convertDate=function(inputFormat){function pad(s){return s<10?"0"+s:s}const d=new Date(inputFormat);return[d.getFullYear(),pad(d.getMonth()+1),pad(d.getDate())].join("-")},vm.capitalizeFirstLetter=function(string){return string.charAt(0).toUpperCase()+string.slice(1)},vm.localStorageValues={gateway:vm.cscPortal,cscUser:vm.code,cscData:vm.cscData,vehicle:{isVehicleNew:!1,licensePlateNumber:"",regionCode:"",vehicleMaincode:"",vehicleIdentificationNumber:"",engineNumber:"",registrationDate:"",make:"",model:"",variant:"",vehicleIDV:{idv:""}},isPolicyExpired:!0,previousInsurer:{previousInsurerCode:"",previousPolicyNumber:"UNKNOWN",previousPolicyExpiryDate:expieryDate.getFullYear()+"-"+("0"+(expieryDate.getMonth()+1)).slice(-2)+"-"+("0"+expieryDate.getDate()).slice(-2),isClaimInLastYear:"",previousNoClaimBonus:"",originalPreviousPolicyType:"1OD_1TP",currentThirdPartyPolicy:{isCurrentThirdPartyPolicyActive:!0,currentThirdPartyPolicyNumber:"UNKNOWN",currentThirdPartyPolicyStartDateTime:"",currentThirdPartyPolicyExpiryDateTime:""}},person:{cityName:"",pinCode:"",ownerName:"",emailId:"",phoneNumber:"",nominee:{name:"",relationship:""}}
364,utmParams:getUtmParaMeter(),flowType:{registrationNumberFlow:!1,CityFlow:!1,isCampaignFlow:!1,isAgentPartnerFlow:!1},campaignAgentCode:"",gclid:getParameter("gclid")||"",sourceUrl:window.location.href,visitorId:getDynamicCode(),proposalNumber:"",product:"Commercial",lastVisitedUrl:"",visitedTime:(new Date).getTime(),cqCalledPlan:[],isCorporateOwnershipType:!1},vm.getLocalStorage=function(){const filterdData=[];vm.storedLocalStorageData=[],Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"Commercial"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).lastVisitedUrl&&JSON.parse(localStorage[key]).visitedTime&&!JSON.parse(localStorage[key]).isGpayFlow&&filterdData.push(JSON.parse(localStorage[key]))}),Object.keys(localStorage).forEach(key=>{checkValidJson(localStorage[key])&&JSON.parse(localStorage[key])&&"Commercial"===JSON.parse(localStorage[key]).product&&JSON.parse(localStorage[key]).recentPageUrl&&JSON.parse(localStorage[key]).visitedTime&&JSON.parse(localStorage[key]).proposalNumber&&vm.storedLocalStorageData.push(JSON.parse(localStorage[key]))}),filterdData.sort((a,b)=>+new Date(b.visitedTime)-+new Date(a.visitedTime)),filterdData.length&&(vm.lastVisitedData=filterdData[0],vm.lastVisitedData.showSelectedPlan=vm.lastVisitedData.selectedPlan&&vm.capitalizeFirstLetter(vm.lastVisitedData.selectedPlan).replace(/([A-Z])/g," $1").trim())},vm.isPartner=function(){return vm.lastVisitedData?.utmParams?.imdCode||"partner"===getParameter("utm_source")||-1!==vm.lastVisitedData?.sourceUrl?.indexOf("partner")},vm.continueJourney=function(){let activeKey=vm.lastVisitedData.lastVisitedUrl.toString().split("session=")[1];activeKey&&activeKey.includes("&")&&(activeKey=activeKey.toString().split("&")[0]);let localStorageData=activeKey?JSON.parse(localStorage.getItem(activeKey)):"";activeKey&&(localStorageData={...localStorageData,isDropOffCountinue:!0},localStorageData.continueJourney=!0),localStorage.setItem(activeKey,JSON.stringify(localStorageData)),vm.callDataLayerContinueJourneyClick(),safeWindowOpen(vm.lastVisitedData.lastVisitedUrl,"_blank")},vm.defaultSelectOwnershipType=function(){setTimeout(()=>{document.getElementById("new-individual-ownership").checked=!0},150)},vm.getLocalStorageDataIndex=function(){return vm.storedLocalStorageData.findIndex(data=>data.visitorId===getDynamicCode())},vm.getVehicleType=function(){vm.isDisabled=!0;let url=`${serviceHost}/v3/motor/getVehicleType`;const data={proposalId:vm.storedLocalStorageData[vm.getLocalStorageDataIndex()]&&vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber?vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber:vm.localStorageValues.proposalNumber,visitorId:vm.localStorageValues.visitorId},headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:rawResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){if(vm.isDisabled=!1,204==response.status&&(vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)),200==response.status&&response.data){vm.isDisabled=!1;const motorResponse=JSON.parse(unwrapContent(unwrapContent(response.data)));return vm.localStorageValues.isNoDataFound=!1,vm.localStorageValues.vehicle.osn=motorResponse.osn,"14"!==motorResponse.type.toString().substring(0,2)&&"15"!==motorResponse.type.toString().substring(0,2)&&"16"!==motorResponse.type.toString().substring(0,2)&&("11"===motorResponse.type.toString().substring(0,2)?vm.numberType="four-wheeler":"12"===motorResponse.type.toString().substring(0,2)||"13"===motorResponse.type.toString().substring(0,2)?vm.numberType="two-wheeler":vm.numberType="Not a private vehicle",vm.localStorageValues.product="two-wheeler"===vm.numberType?"Bike":"commercial vehicle"===vm.numberType?"Commercial":"Car",vm.localStorageValues.isMissMatchedFlow=!0),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),"Car"===vm.localStorageValues.product?(vm.localStorageValues.vehicle.registrationDate=motorResponse.vehicleRegDate||"",void vm.callCamundaForAddons(motorResponse)):"Car"!==vm.localStorageValues.product?void vm.callCamundaForPyp(motorResponse):void vm.redirectPage(!1)}},function(error){vm.isDisabled=!1,vm.localStorageValues.isNoDataFound=!0,vm.redirectPage(!0)})},vm.callCamundaForAddons=function(motorResponse){this.serviceRequest=!0;
364const isPartner=vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource&&vm.localStorageValues.utmParams.imdCode,addonPayloadReq={variables:{LOB:{value:"4W"},Premium:{value:0},Age:{value:getDateDiffInYears(new Date(vm.localStorageValues?.vehicle?.registrationDate),new Date)},Current_NCB:{value:0},OSN:{value:0},isRenewalFlow:{value:!1},isRolloverFlow:{value:!isPartner},isPartnerFlow:{value:!isPartner},isDirectFlow:{value:!isPartner},IMD_Key:{value:vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.imdCode?vm.localStorageValues.utmParams.imdCode:""},isMobileflow:{value:!(!vm.localStorageValues.utmParams||"digit_mobileapp"!==vm.localStorageValues.utmParams.utmSource)},product_code:{value:""}},key:"addon_config"};let url=`${serviceHost}/common/camunda`;const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(addonPayloadReq)),config).then(function(response){response.data?.length&&(vm.localStorageValues.addonHide=response.data[0]?.Addon_hide_on_plan_page?.value.split(","),vm.localStorageValues.addonOrder=response.data[0]?.Addon_Order?.value.split(","),vm.localStorageValues.addonPreSelection=vm.preparePreSelectionAddons(response.data[0]?.Pre_selected_addon_on_plan_page?.value),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues))),vm.callCamundaForPyp(motorResponse)},err=>{vm.callCamundaForPyp(motorResponse)})},vm.preparePreSelectionAddons=function(addonData){const dataList=addonData?.split(",");let preferredAddons=[];return dataList&&dataList.forEach(element=>{preferredAddons.push({value:0,selection:!0,componentNumber:element})}),preferredAddons},vm.motorUpdateProposalApi=function(){if(vm.proposalErrorHandled)return;const{wrapContent:wrapContent}=manageWrapping;let url=`${serviceHost}/v3/motor/proposal?${(new Date).getTime()}`,data={visitorId:vm.localStorageValues.visitorId,pinCode:vm.localStorageValues.person.pinCode,proposalId:vm.storedLocalStorageData[vm.getLocalStorageDataIndex()].proposalNumber,product:"Commercial",vehicle:{isVehicleNew:vm.localStorageValues.vehicle.isVehicleNew,licensePlateNumber:wrapContent(vm.localStorageValues.vehicle.licensePlateNumber)}};data.additionalDetails={landing_page:window.location.href,device:vm.mobileDevice?"mobile":"desktop",os:operatingSystemName,source:vm.mobileDevice?"MOBILE-WEB":"DESKTOP-WEB",utmSource:vm.localStorageValues.utmParams&&vm.localStorageValues.utmParams.utmSource?vm.localStorageValues.utmParams.utmSource:""},vm.localStorageValues.gclid&&(data.additionalDetails.gclid=vm.localStorageValues.gclid);const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.put(url,wrapContent(JSON.stringify(data)),config).then(function(response){200===response.status&&(vm.localStorageValues.proposalNumber=data.proposalId,vm.callConvoxService(),vm.callsuiteCrm(),vm.getVehicleType())},function(error){if(400===error?.status)return vm.proposalErrorHandled=!0,vm.isDisabled=!1,void openProposalErrorModal("cv");vm.isDisabled=!1,vm.setLocalStorageValues()})},vm.addCvValidation=function(){vm.registrationNumberCardShow=!0,commercialFormValidation.addByName("registration-search",dynamicValidationForRegistrationNumber)},document.getElementById("cv-tab")&&(document.getElementById("cv-tab").onclick=()=>{setTimeout(()=>{vm.localStorageValues.visitorId=getDynamicCode()},200)}),vm.checkTurnStileFunction=function(){const token=turnstile.getResponse();if(token){const headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};let data={response:token};var url=serviceHost+"/cloudFlare/verification";$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){(response.data.success||token)&&(vm.isBotAllow=!0,vm.tokenCheckInterval&&$interval.cancel(vm.tokenCheckInterval))},function(error){token&&(vm.isBotAllow=!0)})}},vm.setButtonDisabled=function(){return vm.isAutomationTool()&&!vm.isBotAllow&&(vm.isDisabled||!vm.localStorageValues.vehicle.licensePlateNumber||vm.localStorageValues.vehicle.licensePlateNumber.length<6)||!vm.isAutomationTool()&&(vm.isDisabled||!vm.localStorageValues.vehicle.licensePlateNumber||vm.localStorageValues.vehicle.licensePlateNumber.length<6)},vm.startTokenCheckInterval=function(){vm.tokenCheckInterval=$interval(vm.checkTurnStileFunction,500)},vm.addValidationForContuniueJourney=function(){const visitedTime=new Date(vm.lastVisitedData?.visitedTime);return(new Date-visitedTime)/864e5<=7},vm.isAutomationTool=function(){const navigatorProperties=["webdriver","__nightmare","callPhantom","_phantom","chrome","domAutomation","domAutomationController"];for(const prop of navigatorProperties)if(navigator[prop])return vm.propName=prop,!0;return!1},vm.callCamundaForPyp=function(motorResponse){let url=`${serviceHost}
364/common/camunda`;const data=camundaPypReqData("Bike"===vm.localStorageValues.product?"2W":"Car"===vm.localStorageValues.product?"4W":"CV",motorResponse.vehicleRegDate,motorResponse.osn,motorResponse.insuranceUpto),headers=new Headers;headers.append("Content-Type","application/json");var config={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers};$http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){response.data?.length&&(vm.localStorageValues.previousInsurer.previousPolicyExpiryDate=response.data[0].previousPolicyExpiryDate.value,vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyStartDateTime=response.data[0].currentThirdPartyPolicyStartDateTime.value,vm.localStorageValues.previousInsurer.currentThirdPartyPolicy.currentThirdPartyPolicyExpiryDateTime=response.data[0].currentThirdPartyPolicyExpiryDateTime.value,vm.localStorageValues.previousInsurer.originalPreviousPolicyType=response.data[0].originalPreviousPolicyType.value,"Car"===vm.localStorageValues.product&&(vm.localStorageValues.planPageLoaded=!1,vm.localStorageValues.changeInPlan&&(vm.localStorageValues.isNoDataFound=!0),vm.localStorageValues.previousPolicyIsComp=!0,vm.localStorageValues.previousPolicyonlyTp=!1,vm.localStorageValues.isPypChange=!0,vm.localStorageValues.finalPageReached=!0),localStorage.setItem(vm.uniqueSessionValue,JSON.stringify(vm.localStorageValues)),vm.redirectPage(!1))},err=>{})},vm.openModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyCV&&(getQuoteStickyCV.classList.add("open"),getQuoteStickyCV.classList.remove("close"),isMobileView&&document.body.classList.add("scroll-disabled"))},vm.closeModalSticky=function(){const isMobileView=window.innerWidth<992;getQuoteStickyCV&&(getQuoteStickyCV.classList.remove("open"),getQuoteStickyCV.classList.add("close"),isMobileView&&document.body.classList.remove("scroll-disabled"))},vm.init=function(){vm.getUniqueSessionValue(),vm.isAutomationTool()&&vm.startTokenCheckInterval(),vm.toggleCard(!1,!0),vm.isPartnerFlow(),vm.isDisabled=!1,vm.getLocalStorage(),vm.mobileDevice=mobileDevice,vm.isPartnerFlow="partner"===getParameter("utm_source")||location.pathname.includes("partner"),vm.partnerLogoObj=partnerLogoObj[new URLSearchParams(location.search).get("utm_campaign")?.toLowerCase()],vm.isMuthootLogo="1117563"===new URLSearchParams(location.search).get("utm_campaign");const partnerContainer=document.getElementById("partnerContainerId");vm.isPartnerFlow&&vm.partnerLogoObj&&partnerContainer&&!vm.isMuthootLogo?(partnerContainer.style.display="flex",document.getElementById("partnerContent").innerText=vm.partnerLogoObj.content,document.getElementById("partnerImg").src=vm.partnerLogoObj.imgLink):partnerContainer&&(partnerContainer.style.display="none")},vm.init();const modalOutterCV=document.querySelector(".modal-outer .btn-primary");window.location.href.includes("utm_medium=SIB")&&modalOutterCV&&modalOutterCV.classList.add("sib-btn");const btnFooterFloating=document.querySelector(".getquote-section .floating-button"),bottomStripe=document.querySelector(".getquote-section .stripe-floating-view");if(btnFooterFloating){const viewInstantQuoteSection=document.querySelector(".view-instant-quote");viewInstantQuoteSection&&(viewInstantQuoteSection.style.display="none");const arrowUp=document.querySelector(".bottom-side-scroller");window.addEventListener("scroll",()=>{window.scrollY>=400?(btnFooterFloating.classList.add("visible-floating-button"),arrowUp&&arrowUp.classList.add("move-arrow-up-old")):(btnFooterFloating.classList.remove("visible-floating-button"),arrowUp&&arrowUp.classList.remove("move-arrow-up-old"))})}window.innerWidth>992&&bottomStripe&&window.addEventListener("scroll",()=>{window.scrollY>=400?bottomStripe.classList.contains("close")||(btnFooterFloating.classList.remove("visible-floating-button"),bottomStripe.classList.add("open")):bottomStripe.classList.remove("open")})}); 365digitapp.controller("digitIconCtrl",["$scope","$http","$location",function($scope,$http,$location){let vm=this;$scope.dobInput="",$scope.mobileNumber="",vm.dateArray=[],vm,$scope.buttonText="Get Quote",$scope.incomeRange="",$scope.showDropdown=!1,$scope.showDropdownBelow=!1,$scope.loadingBtnCrm=!1,$scope.incomeRangeArray=["2 - 3","3 - 5","5 - 8","8 - 10","10 - 15","15 - 25","25+"],$scope.incomeRangeArrayTerm=["0 - 3","3 - 4","4 - 5","5 - 8","8 - 10","10 - 15","15 - 25","25+"],$scope.incomeRangeArrayCommon=[];var termProduct=document.querySelector("#products-container .term-product"),iconProduct=document.querySelector("#products-container .icon-product"),lifeBlockCommonProd=document.querySelector(".digit-icon-block"),getQuoteStickyLife=document.getElementById("getquote-bottom-sticky");let pikadayInstances={icon:null,term:null,common:null,below:null};function closeDropdown(){document.addEventListener("click",function(event){"income-range"===event.target.id||event.target.className.includes("dropdown-digit-common")||event.target.className.includes("income-list")||event.target.className.includes("income-list-below")||"income-range1"===event.target.id||($scope.showDropdown=!1,$scope.showDropdownBelow=!1,$scope.$apply())})}function checkProdType(){var product="true"===document.querySelector("#term-life").innerText?"term":"true"===document.querySelector("#term-health-life").innerText?"term-health":"icon";"term"==product||"term-health"==product?$scope.incomeRangeArrayCommon=$scope.incomeRangeArrayTerm:"icon"==product&&($scope.incomeRangeArrayCommon=$scope.incomeRangeArray)}function dobCheck(ele){ele.addEventListener("keyup",e=>{dobWithSlash(e)}),ele.addEventListener("blur",e=>{dobWithSlash(e)})}function setupFormValidation(formId,product){formId=document.getElementById(formId);return new Dominar(formId,{["date-of-birth-"+product]:{rules:"required|isDobValid|minMaxDate",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Enter your DOB",isDobValid:"Enter valid DOB",minMaxDate:"Age should be between 18 to 50 years"}},["income-range-"+product]:{rules:"required",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Select Income Range"}},["mobile-number-"+product]:{rules:"required|isMobileNumberValid",container:".input-form-group",feedback:!1,triggers:["focusout"],customMessages:{required:"Please enter Mobile Number",isMobileNumberValid:"Sorry, that mobile number looks incorrect"}},["terms-and-condition-"+product]:{rules:"required",container:".input-field-wrapper",feedback:!1,triggers:["change"],customMessages:{required:"Please accept the T&C"}}})}$scope.openModalSticky=function(){var isMobileView=window.innerWidth<992;getQuoteStickyLife&&(getQuoteStickyLife.classList.add("open"),getQuoteStickyLife.classList.remove("close"),isMobileView)&&document.body.classList.add("scroll-disabled")},$scope.closeModalSticky=function(){var isMobileView=window.innerWidth<992;getQuoteStickyLife&&(getQuoteStickyLife.classList.remove("open"),getQuoteStickyLife.classList.add("close"),isMobileView)&&document.body.classList.remove("scroll-disabled")},vm.datePicker=product=>{let dobId="icon"===product||"common"===product?document.getElementById("dob-digit-icon"):"below"===product?document.getElementById("dob-digit-icon1"):document.getElementById("dob-term-insurance"),dobContainer="icon"===product?document.getElementById("dob-input-container"):"common"===product?document.getElementById("dob-digit-icon-container"):"below"===product?document.getElementById("dob-digit-icon-container1"):document.getElementById("dob-input-container-term");if(!dobContainer.classList.contains("selected-date")){let pikadayInstance=new Pikaday({field:dobId,format:"DD/MM/YYYY",container:dobContainer,yearRange:[new Date(Date.now()-268056e7).getFullYear(),new Date(Date.now()-567648e6-432e6).getFullYear()],defaultDate:new Date(Date.now()-7884e8),i18n:{previousMonth:"",nextMonth:"",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
365ay","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},keyboardInput:!0,parse(dateString,format){var dateString=dateString.split("/"),day=parseInt(dateString[0],10),month=parseInt(dateString[1],10)-1,dateString=parseInt(dateString[2],10);return new Date(dateString,month,day)},toString(date){var day=date.getDate()<10?"0"+date.getDate():date.getDate(),month=date.getMonth()+1<10?"0"+(date.getMonth()+1):date.getMonth()+1,date=date.getFullYear()<10?"0"+date.getFullYear():date.getFullYear();return vm.dateArray.push(day,month,date),day+`/${month}/`+date},onSelect(date){vm.userAge=new Date(new Date-date).getUTCFullYear()-1970}}),isInteractionInsideDatePicker=((pikadayInstances[product]=pikadayInstance).hide(),target=>!!target&&(dobContainer.contains(target)||pikadayInstance.el&&pikadayInstance.el.contains(target)));document.addEventListener("pointerdown",event=>{isInteractionInsideDatePicker(event.target)||pikadayInstance.hide()}),document.addEventListener("focusin",event=>{isInteractionInsideDatePicker(event.target)||pikadayInstance.hide()});dobId.addEventListener("change",event=>{var value,day,month,parsedDate;event.firedBy!==pikadayInstance&&(value=dobId.value)&&3===(value=value.split("/")).length&&(day=parseInt(value[0],10),month=parseInt(value[1],10),value=parseInt(value[2],10),day)&&month&&value&&(parsedDate=new Date(value,month-1,day)).getFullYear()===value&&parsedDate.getMonth()===month-1&&parsedDate.getDate()===day&&(pikadayInstance.hide(),event.stopImmediatePropagation())},!0),dobId.addEventListener("focus",e=>{dobId.value||pikadayInstance.show()}),dobId.addEventListener("click",e=>{var day,month,parts;dobId.value?(pikadayInstance.show(),3===(parts=dobId.value.split("/")).length&&(day=parseInt(parts[0],10),month=parseInt(parts[1],10)-1,parts=parseInt(parts[2],10),parts=new Date(parts,month,day),pikadayInstance.setDate(parts))):pikadayInstance.show()}),dobId.addEventListener("keypress",e=>{pikadayInstance.hide()}),dobId.addEventListener("input",e=>{pikadayInstance.hide()}),dobId.addEventListener("blur",e=>{setTimeout(()=>{isInteractionInsideDatePicker(document.activeElement)||pikadayInstance.hide()},0)}),dobContainer.classList.add("selected-date")}},termProduct?.addEventListener("click",()=>{vm.datePicker("term"),dobCheck(document.getElementById("dob-term-insurance"))}),iconProduct?.addEventListener("click",()=>{vm.datePicker("icon"),dobCheck(document.getElementById("dob-digit-icon"))}),lifeBlockCommonProd&&(vm.datePicker("common"),dobCheck(document.getElementById("dob-digit-icon-container")),checkProdType(),closeDropdown()),$scope.selectIncomeRangeCommom=function(income){$scope.selectIncomeRange(income,"icon")},$scope.selectIncomeRangeLife=function(income){$scope.selectIncomeRange(income,"below")},$scope.selectIncomeRange=function(income,product){("icon"===product?document.querySelectorAll(".income-error"):"below"===product?document.querySelectorAll(".income-error-below"):document.querySelectorAll(".income-error-term")).forEac
365h(ele=>{ele.addEventListener("click",function(){ele.classList.remove("has-error"),ele.querySelector(".help-block").innerText=""})}),$scope.incomeRange=income,$scope.showDropdown=!1,$scope.showDropdownBelow=!1},$scope.hideDropdown=()=>{setTimeout(()=>{$scope.showDropdown=!1},50)},$scope.hideDropdownBelow=()=>{setTimeout(()=>{$scope.showDropdownBelow=!1},50)};let formValidationIcon=setupFormValidation("digitIconForm","digit-icon"),formValidationTerm=setupFormValidation("termInsurnceForm","term-insurance"),belowFormLife,urlRedrectionAllowed=(getQuoteStickyLife&&(vm.datePicker("below"),dobCheck(document.getElementById("dob-digit-icon1")),checkProdType(),closeDropdown(),belowFormLife=setupFormValidation("getquote-bottom-sticky","below")),document.getElementById("dicon-url-redirect")),leadSubmitForm=document.getElementById("dicon-lead-form"),urlRedrectionAllowedTerm=document.getElementById("term-url-redirect"),leadSubmitFormTerm=document.getElementById("term-lead-form"),urlMapping=(termProduct={},"www.godigit.com"===location.hostname?termProduct["www.godigit.com"]="https://life.godigit.com":(iconProduct=".godigit.com",lifeBlockCommonProd="localhost"===(lifeBlockCommonProd=location.hostname)?"localhost":lifeBlockCommonProd.replace(iconProduct.substring(1),"").replace(/\.$/,""),termProduct[location.host]="https://"+(e=>{switch(e){case"preprod":case"uat":return e;default:return"dev"}})(lifeBlockCommonProd)+"l-life"+iconProduct),termProduct);function validateUrl(url){-1!=window.location.href.indexOf(".godigit.com")&&(window.location.href=url)}function createDataObject(name,mobileNumber,processName,incomeRange,dateFieldName,product,productType,landingPageField){return{data:{type:"term"!==productType&&"icon"===productType?"GD_Digit_Icon":"GD_Digit_Glow",attributes:{name:name,phone_number:mobileNumber,last_visited_page:"landing_page",[landingPageField]:location.href.includes("localhost")?"https://www.godigit.com":location.href,platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",utm_content:getParameter("utm_content")||"",utm_medium:getParameter("utm_medium")||"",utm_term:getParameter("utm_term")||"",utm_source:getParameter("utm_source")||"",utm_campaign:getParameter("utm_campaign")||"",entry_date:(new Date).toISOString().split("T")[0],process_name:processName,[dateFieldName]:convertDateToISONew($scope.dobInput),income_slab:incomeRange,highest_education:"",operating_system:operatingSystemName,device:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",network_type:navigator.connection&&navigator.connection.effectiveType?navigator.connection.effectiveType:"",product_name:"icon"===product?"Icon":product}}}}async function leadSubmitLife(product,urlRedirectionAllowed){$scope.loadingBtnCrm=!0,vm.leadSubmit($scope.mobileNumber,$scope.dobInput,$scope.incomeRange,location.href);phoneNumber=$scope.mobileNumber,formName="icon"===product?"Digit Icon Lead Form":"term"===product?"Digit Glow Lead Form":"term-health"===product?"Term + Health Combo":"",lob="icon"===product?"Digit Icon":"term"===product?"Term Insurance":"term-health"===product?"Term + Health Combo":"",hashSHA264(phoneNumber).then(mobnum=>{mobnum={event:"LeadSubmit",form_name:formName,PolicyType:lob,phoneNumber:mobnum||"",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",source:window.location.href,lob:lob};customPageViewdataLayerGoogleAnalytics(mobnum)}),(product=>{product={event:"view_price",lob:"icon"===product?"Digit Icon":"term"===product?"Term Insurance":"term-health"===product?"Term + Health Combo":"",platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",domain_source:window.location.href,flow_type:"new flow",property:"Life Insurance",section_name:"Get quote component",dob:$scope.dobInput,phone_number:encrypt($scope.mobileNumber),annual_income:$scope.incomeRange,userId:getCookie("visitorId")?getCookie("visitorId"):""},customPageViewdataLayerGoogleAnalytics(product)})(product);var formName,lob,phoneNumber="icon"===product?$scope.mobileNumber+"_digiticon":$scope.mobileNumber+"_digitglow",process_name="icon"===product?"Digit_ICON_Call":"Digit_Glow_Call",product_name="icon"===product?"Digit Icon":"term"===product?"Term Insurance":"term-health"===product?"Term + Health Combo":"",termData=createDataObject(phoneNumber,$scope.mobileNumber,process_name,$scope.incomeRange,"dob",product_name,product,"entry_landing_page_url"),phoneNumber=createDataObject(phoneNumber,$scope.mobileNumber,process_name,$scope.incomeRange,"date_of_birth",product_name,product,"landing_page_url"),process_name=serviceHostLife+"/digiticon/encr/customerHandler",product_name=serviceHostLife+"/direct-digitglow/termlife/encr/customerHandler",process_name="icon"===product?process_name:product_name,product_name={encryptedPayload:await snorfblat.zorpify(JSON.stringify("icon"===product?phoneNumber:termData))},phoneNumber={"Content-Type":"application/json",lastvisitedpage:"landing_page",mobileno:$scope.mobileNumber};fetch(process_name,{method:"POST",headers:"icon"===product?{"Content-Type":"application/json"}:phoneNumber,body:JSON.stringify(product_name)}).then(response=>($scope.loadingBtnCrm=!1,redirectionLife(product,urlRedirectionAllowed),response.json())).then(res=>{$scope.loadingBtnCrm=!1,redirectionLife(product,urlRedirectionAllowed)}).catch(error=>{$scope.loadingBtnCrm=!1,redirectionLife(product,urlRedirectionAllowed)})}function redirectionLife(product,urlRedirectionAllowed){!$scope.loadingBtnCrm&&urlRedirectionAllowed&&"true"===urlRedirectionAllowed.textContent?(product=>{var params={dobDate:encodeURIComponent(JSON.stringify($scope.dobInput)),annualIncome:encodeURIComponent(JSON.stringify($scope.incomeRange)),mobileNumber:encodeURIComponent(JSON.stringify($scope.mobileNumber))},redirectionUrlIcon=urlMapping[window.location.host]+"/#/digit-icon/basic-detail
365s?dobDate={encodedDobDate}&annualIncome={encodedAnnualIncome}&mobileNumber={encodedMobileNumber}",redirectionUrlTerm=urlMapping[window.location.host]+"/#/digit-glow/basic-details?dobDate={encodedDobDate}&annualIncome={encodedAnnualIncome}&mobileNumber={encodedMobileNumber}";let redirectionUrl="icon"===product?redirectionUrlIcon:redirectionUrlTerm;var key,value,product=new URL(window.location.href),searchParamsLife=(redirectionUrlIcon=new URL(redirectionUrl)).searchParams,redirectionUrlTerm=detectPrevLanguageDigitLife();(product={utm_source:product.searchParams.get("utm_source")||"",utm_medium:product.searchParams.get("utm_medium")||"",utm_campaign:product.searchParams.get("utm_campaign")||"",utm_term:product.searchParams.get("utm_term")||"",utm_content:product.searchParams.get("utm_content")||""}).lang=redirectionUrlTerm;for([key,value]of Object.entries(product))value&&searchParamsLife.set(key,value);redirectionUrlTerm=redirectionUrlIcon.search.split("?")[1],(redirectionUrl=redirectionUrlTerm?redirectionUrl+"&"+redirectionUrlTerm:redirectionUrl)?validateUrl(redirectionUrl.replace("{encodedDobDate}",params.dobDate).replace("{encodedAnnualIncome}",params.annualIncome).replace("{encodedMobileNumber}",params.mobileNumber)):validateUrl(redirectionUrl)})(product):["get-quote-btn-digit-icon","get-quote-btn-term","bottomLifeBtnNew","get-quote-btn-common"].forEach(btnId=>{document.getElementById(btnId)?.classList.remove("btn-loading")})}function submitForm(formValidation,leadSubmitForm,urlRedirectionAllowed,buttonId,product){formValidation.validateAll(()=>{var btn=document.getElementById(buttonId);btn?.classList.add("btn-loading"),leadSubmitLife(product,urlRedirectionAllowed),redirectionLife(product,urlRedirectionAllowed),((leadSubmitForm,btn)=>{var btnCommon=document.getElementById("get-quote-btn-common"),btnBelow=document.getElementById("bottomLifeBtnNew");leadSubmitForm&&"true"===leadSubmitForm.textContent&&($scope.buttonText="Thank you",btn.disabled=!0,btnCommon&&(btnCommon.innerText="Thank you"),btnBelow)&&(btnBelow.innerText="Thank you")})(leadSubmitForm,btn),btn?.classList.remove("btn-loading")})}$scope.submitDigitIconForm=function(){submitForm(formValidationIcon,leadSubmitForm,urlRedrectionAllowed,"get-quote-btn-digit-icon","icon")},$scope.submitTermInsuranceForm=function(){submitForm(formValidationTerm,leadSubmitFormTerm,urlRedrectionAllowedTerm,"get-quote-btn-term","term")},$scope.submitLifeBottomForm=function(){var product="true"===document.querySelector("#term-life").innerText?"term":"true"===document.querySelector("#term-health-life").innerText?"term-health":"icon";submitForm(belowFormLife,leadSubmitForm,urlRedrectionAllowed,"bottomLifeBtnNew",product)},$scope.submitCommonForm=function(){var product="true"===document.querySelector("#term-life").innerText?"term":"true"===document.querySelector("#term-health-life").innerText?"term-health":"icon";submitForm(formValidationIcon,leadSubmitForm,urlRedrectionAllowed,"get-quote-btn-common",product)},vm.leadSubmit=function(mobileNumber,dob,annualIncome,url){Moengage.track_event("Website Lead Submitted",{"Mobile Number":mobileNumber,ID:mobileNumber,IP_DOB:dob,ANNUAL_INCOME:annualIncome,URL:url}),Moengage.add_mobile("91"+mobileNumber),Moengage.add_user_attribute("ANNUAL_INCOME",annualIncome),Moengage.add_user_attribute("ID",id),Moengage.add_user_attribute("IP_DOB",dob)},Dominar.Validator.register("isMobileNumberValid",function(value){let validNumber=10==value.length,numberArray;return validNumber&&(numberArray=value.split(""),validNumber=5<parseInt(numberArray[0])),!!validNumber}),Dominar.Validator.register("isDobValid",function(val){var day,month,year;return 10===val.length&&([day,month,year]=val.split("/"),!(0===day||0===month||isNaN(day)||isNaN(month)||isNaN(year)||this.maxLength||12<val.split("/")[1]||val.split("/")[2]>(new Date).getFullYear()))}),Dominar.Validator.register("minMaxDate",function(val){val=calculateAge(val);return val<50&&18<=val})}]); 366/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 367/* AES implementation in JavaScript (c) Chris Veness 2005-2017 */ 368/* MIT Licence */ 369/* www.movable-type.co.uk/scripts/aes.html */ 370/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 371 372'use strict'; 373 374/** 375 * AES (Rijndael cipher) encryption routines reference implementation, 376 * 377 * This is an annotated direct implementation of FIPS 197, without any optimisations. It is 378 * intended to aid understanding of the algorithm rather than for production use. 379 * 380 * While it could be used where performance is not critical, I would recommend using the âWeb 381 * Cryptography APIâ (developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/encrypt) for the browser, 382 * or the âcryptoâ library (nodejs.org/api/crypto.html#crypto_class_cipher) in Node.js. 383 * 384 * See csrc.nist.gov/publications/fips/fips197/fips-197.pdf 385 */ 386 387var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 388 389function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 390 391var Aes = function () { 392 function Aes() { 393 _classCallCheck(this, Aes); 394 } 395 396 _createClass(Aes, null, [{ 397 key: 'cipher', 398 399 400 /** 401 * AES Cipher function: encrypt 'input' state with Rijndael algorithm [§5.1]; 402 * applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage. 403 * 404 * @param {number[]} input - 16-byte (128-bit) input state array. 405 * @param {number[][]} w - Key schedule as 2D byte-array (Nr+1 à Nb bytes). 406 * @returns {number[]} Encrypted output state array. 407 */ 408 value: function cipher(input, w) { 409 var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES) 410 var Nr = w.length / Nb - 1; // no of rounds: 10/12/14 for 128/192/256-bit keys 411 412 var state = [[], [], [], []]; // initialise 4ÃNb byte-array 'state' with input [§3.4] 413 for (var i = 0; i < 4 * Nb; i++) {
414 state[i % 4][Math.floor(i / 4)] = input[i]; 415 }state = Aes.addRoundKey(state, w, 0, Nb); 416 417 for (var round = 1; round < Nr; round++) { 418 state = Aes.subBytes(state, Nb); 419 state = Aes.shiftRows(state, Nb); 420 state = Aes.mixColumns(state, Nb); 421 state = Aes.addRoundKey(state, w, round, Nb); 422 } 423 424 state = Aes.subBytes(state, Nb); 425 state = Aes.shiftRows(state, Nb); 426 state = Aes.addRoundKey(state, w, Nr, Nb); 427 428 var output = new Array(4 * Nb); // convert state to 1-d array before returning [§3.4] 429 for (var _i = 0; _i < 4 * Nb; _i++) { 430 output[_i] = state[_i % 4][Math.floor(_i / 4)]; 431 }return output; 432 } 433 434 /** 435 * Perform key expansion to generate a key schedule from a cipher key [§5.2]. 436 * 437 * @param {number[]} key - Cipher key as 16/24/32-byte array. 438 * @returns {number[][]} Expanded key schedule as 2D byte-array (Nr+1 à Nb bytes). 439 */ 440 441 }, { 442 key: 'keyExpansion', 443 value: function keyExpansion(key) { 444 var Nb = 4; // block size (in words): no of columns in state (fixed at 4 for AES) 445 var Nk = key.length / 4; // key length (in words): 4/6/8 for 128/192/256-bit keys 446 var Nr = Nk + 6; // no of rounds: 10/12/14 for 128/192/256-bit keys 447 448 var w = new Array(Nb * (Nr + 1)); 449 var temp = new Array(4); 450 451 // initialise first Nk words of expanded key with cipher key 452 for (var i = 0; i < Nk; i++) { 453 var r = [key[4 * i], key[4 * i + 1], key[4 * i + 2], key[4 * i + 3]]; 454 w[i] = r; 455 } 456 457 // expand the key into the remainder of the schedule 458 for (var _i2 = Nk; _i2 < Nb * (Nr + 1); _i2++) { 459 w[_i2] = new Array(4); 460 for (var t = 0; t < 4; t++) { 461 temp[t] = w[_i2 - 1][t]; 462 } // each Nk'th word has extra transformation 463 if (_i2 % Nk == 0) { 464 temp = Aes.subWord(Aes.rotWord(temp)); 465 for (var _t = 0; _t < 4; _t++) { 466 temp[_t] ^= Aes.rCon[_i2 / Nk][_t]; 467 } 468 } 469 // 256-bit key has subWord applied every 4th word 470 else if (Nk > 6 && _i2 % Nk == 4) { 471 temp = Aes.subWord(temp); 472 } 473 // xor w[i] with w[i-1] and w[i-Nk] 474 for (var _t2 = 0; _t2 < 4; _t2++) { 475 w[_i2][_t2] = w[_i2 - Nk][_t2] ^ temp[_t2]; 476 } 477 } 478 479 return w; 480 } 481 482 /** 483 * Apply SBox to state S [§5.1.1]. 484 * 485 * @private 486 */ 487 488 }, { 489 key: 'subBytes', 490 value: function subBytes(s, Nb) { 491 for (var r = 0; r < 4; r++) { 492 for (var c = 0; c < Nb; c++) { 493 s[r][c] = Aes.sBox[s[r][c]]; 494 } 495 } 496 return s; 497 } 498 499 /** 500 * Shift row r of state S left by r bytes [§5.1.2]. 501 * 502 * @private 503 */ 504 505 }, { 506 key: 'shiftRows', 507 value: function shiftRows(s, Nb) { 508 var t = new Array(4); 509 for (var r = 1; r < 4; r++) { 510 for (var c = 0; c < 4; c++) { 511 t[c] = s[r][(c + r) % Nb]; 512 } // shift into temp copy 513 for (var _c = 0; _c < 4; _c++) { 514 s[r][_c] = t[_c]; 515 } // and copy back 516 } // note that this will work for Nb=4,5,6, but not 7,8 (always 4 for AES): 517 return s; // see asmaes.sourceforge.net/rijndael/rijndaelImplementation.pdf 518 } 519 520 /** 521 * Combine bytes of each col of state S [§5.1.3]. 522 * 523 * @private 524 */ 525 526 }, { 527 key: 'mixColumns', 528 value: function mixColumns(s, Nb) { 529 for (var c = 0; c < Nb; c++) { 530 var a = new Array(Nb); // 'a' is a copy of the current column from 's' 531 var b = new Array(Nb); // 'b' is aâ¢{02} in GF(2^8) 532 for (var r = 0; r < 4; r++) { 533 a[r] = s[r][c]; 534 b[r] = s[r][c] && 0x80 ? s[r][c] << 1 ^ 0x011b : s[r][c] << 1; 535 } 536 // a[n] ^ b[n] is aâ¢{03} in GF(2^8) 537 s[0][c] = b[0] ^ a[1] ^ b[1] ^ a[2] ^ a[3]; // {02}â¢a0 + {03}â¢a1 + a2 + a3 538 s[1][c] = a[0] ^ b[1] ^ a[2] ^ b[2] ^ a[3]; // a0 ⢠{02}â¢a1 + {03}â¢a2 + a3 539 s[2][c] = a[0] ^ a[1] ^ b[2] ^ a[3] ^ b[3]; // a0 + a1 + {02}â¢a2 + {03}â¢a3 540 s[3][c] = a[0] ^ b[0] ^ a[1] ^ a[2] ^ b[3]; // {03}â¢a0 + a1 + a2 + {02}â¢a3 541 } 542 return s; 543 } 544 545 /** 546 * Xor Round Key into state S [§5.1.4]. 547 * 548 * @private 549 */ 550 551 }, {
552 key: 'addRoundKey', 553 value: function addRoundKey(state, w, rnd, Nb) { 554 for (var r = 0; r < 4; r++) { 555 for (var c = 0; c < Nb; c++) { 556 state[r][c] ^= w[rnd * 4 + c][r]; 557 } 558 } 559 return state; 560 } 561 562 /** 563 * Apply SBox to 4-byte word w. 564 * 565 * @private 566 */ 567 568 }, { 569 key: 'subWord', 570 value: function subWord(w) { 571 for (var i = 0; i < 4; i++) { 572 w[i] = Aes.sBox[w[i]]; 573 }return w; 574 } 575 576 /** 577 * Rotate 4-byte word w left by one byte. 578 * 579 * @private 580 */ 581 582 }, { 583 key: 'rotWord', 584 value: function rotWord(w) { 585 var tmp = w[0]; 586 for (var i = 0; i < 3; i++) { 587 w[i] = w[i + 1]; 588 }w[3] = tmp; 589 return w; 590 } 591 }]); 592 593 return Aes; 594}(); 595 596// sBox is pre-computed multiplicative inverse in GF(2^8) used in subBytes and keyExpansion [§5.1.1] 597 598 599Aes.sBox = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16]; 600 601// rCon is Round Constant used for the Key Expansion [1st col is 2^(r-1) in GF(2^8)] [§5.2] 602Aes.rCon = [[0x00, 0x00, 0x00, 0x00], [0x01, 0x00, 0x00, 0x00], [0x02, 0x00, 0x00, 0x00], [0x04, 0x00, 0x00, 0x00], [0x08, 0x00, 0x00, 0x00], [0x10, 0x00, 0x00, 0x00], [0x20, 0x00, 0x00, 0x00], [0x40, 0x00, 0x00, 0x00], [0x80, 0x00, 0x00, 0x00], [0x1b, 0x00, 0x00, 0x00], [0x36, 0x00, 0x00, 0x00]]; 603 604/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 605 606// module.exports = Aes; // ⡠export default Aes; uncomment to use in Node.js 607 608/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 609/* AES counter-mode (CTR) implementation in JavaScript (c) Chris Veness 2005-2017 */ 610/* MIT Licence */ 611/* www.movable-type.co.uk/scripts/aes.html */ 612/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 613 614/* global WorkerGlobalScope */ 615'use strict'; 616// const Aes = require('./aes.js'); // ⡠import Aes from 'aes.js'; uncomment to use in Node.js 617 618 619/** 620 * AesCtr: Counter-mode (CTR) wrapper for AES. 621 * 622 * This encrypts a Unicode string to produces a base64 ciphertext using 128/192/256-bit AES, 623 * and the converse to decrypt an encrypted ciphertext. 624 * 625 * See csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf 626 */ 627 628var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 629 630function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 631 632function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } 633 634function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { c
634onstructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 635 636var AesCtrMethod = function (_Aes) { 637 _inherits(AesCtr, _Aes); 638 639 function AesCtr() { 640 _classCallCheck(this, AesCtr); 641 642 return _possibleConstructorReturn(this, (AesCtr.__proto__ || Object.getPrototypeOf(AesCtr)).apply(this, arguments)); 643 } 644 645 _createClass(AesCtr, null, [{ 646 key: 'encrypt', 647 648 649 /** 650 * Encrypt a text using AES encryption in Counter mode of operation. 651 * 652 * Unicode multi-byte character safe 653 * 654 * @param {string} plaintext - Source text to be encrypted. 655 * @param {string} password - The password to use to generate a key for encryption. 656 * @param {number} nBits - Number of bits to be used in the key; 128 / 192 / 256. 657 * @returns {string} Encrypted text. 658 * 659 * @example 660 661 */ 662 value: function encrypt(plaintext, password, nBits) { 663 var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES 664 if (!(nBits == 128 || nBits == 192 || nBits == 256)) throw new Error('Key size is not 128 / 192 / 256'); 665 plaintext = AesCtr.utf8Encode(String(plaintext)); 666 password = AesCtr.utf8Encode(String(password)); 667 668 // use AES itself to encrypt password to get cipher key (using plain password as source for key 669 // expansion) to give us well encrypted key (in real use hashed password could be used for key) 670 var nBytes = nBits / 8; // no bytes in key (16/24/32) 671 var pwBytes = new Array(nBytes); 672 for (var i = 0; i < nBytes; i++) { 673 // use 1st 16/24/32 chars of password for key 674 pwBytes[i] = i < password.length ? password.charCodeAt(i) : 0; 675 } 676 var key = Aes.cipher(pwBytes, Aes.keyExpansion(pwBytes)); // gives us 16-byte key 677 key = key.concat(key.slice(0, nBytes - 16)); // expand key to 16/24/32 bytes long 678 679 // initialise 1st 8 bytes of counter block with nonce (NIST SP800-38A §B.2): [0-1] = millisec, 680 // [2-3] = random, [4-7] = seconds, together giving full sub-millisec uniqueness up to Feb 2106 681 var counterBlock = new Array(blockSize); 682 683 var nonce = new Date().getTime(); // timestamp: milliseconds since 1-Jan-1970 684 var nonceMs = nonce % 1000; 685 var nonceSec = Math.floor(nonce / 1000); 686 var nonceRnd = Math.floor(Math.random() * 0xffff); 687 // for debugging: nonce = nonceMs = nonceSec = nonceRnd = 0; 688 689 for (var _i = 0; _i < 2; _i++) { 690 counterBlock[_i] = nonceMs >>> _i * 8 & 0xff; 691 }for (var _i2 = 0; _i2 < 2; _i2++) { 692 counterBlock[_i2 + 2] = nonceRnd >>> _i2 * 8 & 0xff; 693 }for (var _i3 = 0; _i3 < 4; _i3++) { 694 counterBlock[_i3 + 4] = nonceSec >>> _i3 * 8 & 0xff; 695 } // and convert it to a string to go on the front of the ciphertext 696 var ctrTxt = ''; 697 for (var _i4 = 0; _i4 < 8; _i4++) { 698 ctrTxt += String.fromCharCode(counterBlock[_i4]); 699 } // generate key schedule - an expansion of the key into distinct Key Rounds for each round 700 var keySchedule = Aes.keyExpansion(key); 701 702 var blockCount = Math.ceil(plaintext.length / blockSize); 703 var ciphertext = ''; 704 705 for (var b = 0; b < blockCount; b++) { 706 // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes) 707 // done in two stages for 32-bit ops: using two words allows us to go past 2^32 blocks (68GB) 708 for (var c = 0; c < 4; c++) { 709 counterBlock[15 - c] = b >>> c * 8 & 0xff; 710 }for (var _c = 0; _c < 4; _c++) { 711 counterBlock[15 - _c - 4] = b / 0x100000000 >>> _c * 8; 712 }var cipherCntr = Aes.cipher(counterBlock, keySchedule); // -- encrypt counter block -- 713 714 // block size is reduced on final block 715 var blockLength = b < blockCount - 1 ? blockSize : (plaintext.length - 1) % blockSize + 1; 716 var cipherChar = new Array(blockLength); 717 718 for (var _i5 = 0; _i5 < blockLength; _i5++) { 719 // -- xor plaintext with ciphered counter char-by-char -- 720 cipherChar[_i5] = cipherCntr[_i5] ^ plaintext.charCodeAt(b * blockSize + _i5); 721 cipherChar[_i5] = String.fromCharCode(cipherChar[_i5]); 722 } 723 ciphertext += cipherChar.join(''); 724 725 // if within web worker, announce progress every 1000 blocks (roughly every 50ms) 726 if (typeof WorkerGlobalScope != 'undefined' && self instanceof WorkerGlobalScope) { 727 if (b % 1000 == 0) self.postMessage({ progress: b / blockCount }); 728 } 729 } 730 731 ciphertext = AesCtr.base64Encode(ctrTxt + ciphertext); 732 733 return ciphertext; 734 } 735 736 /** 737 * Decrypt a text encrypted by AES in counter mode of operation 738 * 739 * @param {string} ciphertext - Cipher text to be decrypted. 740 * @param {string} password - Password to use to generate a key for decryption. 741 * @param {number} nBits - Number of bits to be used in the key; 128 / 192 / 256. 742 * @returns {string} Decrypted text 743 * 744 * @example 745 746 */ 747 748 }, {
749 key: 'decrypt', 750 value: function decrypt(ciphertext, password, nBits) { 751 var blockSize = 16; // block size fixed at 16 bytes / 128 bits (Nb=4) for AES 752 if (!(nBits == 128 || nBits == 192 || nBits == 256)) throw new Error('Key size is not 128 / 192 / 256'); 753 ciphertext = AesCtr.base64Decode(String(ciphertext)); 754 password = AesCtr.utf8Encode(String(password)); 755 756 // use AES to encrypt password (mirroring encrypt routine) 757 var nBytes = nBits / 8; // no bytes in key 758 var pwBytes = new Array(nBytes); 759 for (var i = 0; i < nBytes; i++) { 760 // use 1st nBytes chars of password for key 761 pwBytes[i] = i < password.length ? password.charCodeAt(i) : 0; 762 } 763 var key = Aes.cipher(pwBytes, Aes.keyExpansion(pwBytes)); 764 key = key.concat(key.slice(0, nBytes - 16)); // expand key to 16/24/32 bytes long 765 766 // recover nonce from 1st 8 bytes of ciphertext 767 var counterBlock = new Array(8); 768 var ctrTxt = ciphertext.slice(0, 8); 769 for (var _i6 = 0; _i6 < 8; _i6++) { 770 counterBlock[_i6] = ctrTxt.charCodeAt(_i6); 771 } // generate key schedule 772 var keySchedule = Aes.keyExpansion(key); 773 774 // separate ciphertext into blocks (skipping past initial 8 bytes) 775 var nBlocks = Math.ceil((ciphertext.length - 8) / blockSize); 776 var ct = new Array(nBlocks); 777 for (var b = 0; b < nBlocks; b++) { 778 ct[b] = ciphertext.slice(8 + b * blockSize, 8 + b * blockSize + blockSize); 779 }ciphertext = ct; // ciphertext is now array of block-length strings 780 781 // plaintext will get generated block-by-block into array of block-length strings 782 var plaintext = ''; 783 784 for (var _b = 0; _b < nBlocks; _b++) { 785 // set counter (block #) in last 8 bytes of counter block (leaving nonce in 1st 8 bytes) 786 for (var c = 0; c < 4; c++) { 787 counterBlock[15 - c] = _b >>> c * 8 & 0xff; 788 }for (var _c2 = 0; _c2 < 4; _c2++) { 789 counterBlock[15 - _c2 - 4] = (_b + 1) / 0x100000000 - 1 >>> _c2 * 8 & 0xff; 790 }var cipherCntr = Aes.cipher(counterBlock, keySchedule); // encrypt counter block 791 792 var plaintxtByte = new Array(ciphertext[_b].length); 793 for (var _i7 = 0; _i7 < ciphertext[_b].length; _i7++) { 794 // -- xor plaintext with ciphered counter byte-by-byte -- 795 plaintxtByte[_i7] = cipherCntr[_i7] ^ ciphertext[_b].charCodeAt(_i7); 796 plaintxtByte[_i7] = String.fromCharCode(plaintxtByte[_i7]); 797 } 798 plaintext += plaintxtByte.join(''); 799 800 // if within web worker, announce progress every 1000 blocks (roughly every 50ms) 801 if (typeof WorkerGlobalScope != 'undefined' && self instanceof WorkerGlobalScope) { 802 if (_b % 1000 == 0) self.postMessage({ progress: _b / nBlocks }); 803 } 804 } 805 806 plaintext = AesCtr.utf8Decode(plaintext); // decode from UTF8 back to Unicode multi-byte chars 807 808 return plaintext; 809 } 810 811 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 812 813 /** 814 * Encodes multi-byte string to utf8. 815 * 816 * Note utf8Encode is an identity function with 7-bit ascii strings, but not with 8-bit strings; 817 * utf8Encode('x') = 'x', but utf8Encode('ça') = 'ça', and utf8Encode('ça') = 'ÃÂça'. 818 */ 819 820 }, { 821 key: 'utf8Encode', 822 value: function utf8Encode(str) { 823 try { 824 return new TextEncoder().encode(str, 'utf-8').reduce(function (prev, curr) { 825 return prev + String.fromCharCode(curr); 826 }, ''); 827 } catch (e) { 828 // no TextEncoder available? 829 return unescape(encodeURIComponent(str)); // monsur.hossa.in/2012/07/20/utf-8-in-javascript.html 830 } 831 } 832 833 /** 834 * Decodes utf8 string to multi-byte. 835 */ 836 837 }, {
838 key: 'utf8Decode', 839 value: function utf8Decode(str) { 840 try { 841 return new TextEncoder().decode(str, 'utf-8').reduce(function (prev, curr) { 842 return prev + String.fromCharCode(curr); 843 }, ''); 844 } catch (e) { 845 // no TextEncoder available? 846 return decodeURIComponent(escape(str)); // monsur.hossa.in/2012/07/20/utf-8-in-javascript.html 847 } 848 } 849 850 /* 851 * Encodes string as base-64. 852 * 853 * - developer.mozilla.org/en-US/docs/Web/API/window.btoa, nodejs.org/api/buffer.html 854 * - note: btoa & Buffer/binary work on single-byte Unicode (C0/C1), so ok for utf8 strings, not for general Unicode... 855 * - note: if btoa()/atob() are not available (eg IE9-), try github.com/davidchambers/Base64.js 856 */ 857 858 }, { 859 key: 'base64Encode', 860 value: function base64Encode(str) { 861 if (typeof btoa != 'undefined') return btoa(str); // browser 862 if (typeof Buffer != 'undefined') return new Buffer(str, 'binary').toString('base64'); // Node.js 863 throw new Error('No Base64 Encode'); 864 } 865 866 /* 867 * Decodes base-64 encoded string. 868 */ 869 870 }, { 871 key: 'base64Decode', 872 value: function base64Decode(str) { 873 if (typeof atob != 'undefined') return atob(str); // browser 874 if (typeof Buffer != 'undefined') return new Buffer(str, 'base64').toString('binary'); // Node.js 875 throw new Error('No Base64 Decode'); 876 } 877 }]); 878 879 return AesCtr; 880}(Aes); 881 882/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 883 884// module.exports = AesCtr; // uncomment to use in Node.js 885angular.module("digitapp").factory("InternationalTravelService",["$http","$q","$rootScope",function($http,$q,$rootScope){let wrapContent=manageWrapping.wrapContent;var config={responseType:"text",transformResponse:convertStrinToJsonResponse};return{getCountriesList:function(){let deferred=$q.defer();var url=serviceHost+"/international/travel/countries?"+getTimeStamp();return $http.get(url,config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},getNomineeRelations:function(){let deferred=$q.defer();var url=serviceHost+"/international/travel/nominee?"+getTimeStamp();return $http.get(url,config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},getQuickQuote:function(data,couponCode){let deferred=$q.defer();couponCode=serviceHost+"/international/travel/quickquote?isBls="+(localStorage.blsflow||!1)+"&couponCode="+couponCode+"&"+getTimeStamp();return $http.post(couponCode,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},createQuote:function(data,couponCode){let deferred=$q.defer();couponCode=serviceHost+"/international/travel/createquote?isBls="+(localStorage.blsflow||!1)+"&couponCode="+couponCode+"&"+getTimeStamp();return $http.post(couponCode,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},getHomeQuickQuote:function(data){let deferred=$q.defer();var url=serviceHost+"/property/insurance/quickquote?"+getTimeStamp();return $http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},homeCreateQuote:function(data){let deferred=$q.defer();var url=serviceHost+"/property/insurance/createquote?"+getTimeStamp();return $http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},getPaymentUrl:function(data){let deferred=$q.defer();var url=serviceHost+"/international/travel/multiple/payment?"+getTimeStamp();return $http({url:url,method:"POST",data:data,transformResponse:[function(responseData){return responseData}]}).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},updateQuote:function(data,appId,couponCode){let deferred=$q.defer();appId=serviceHost+"/international/travel/updatequote?applicationId="+appId+"&isBls="+(localStorage.blsflow||!1)+"&couponCode="+couponCode+"&"+getTimeStamp();return $http.put(appId,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},issuePolicy:function(data,appId){let deferred=$q.defer();appId=serviceHost+"/international/travel/issuepolicy?contractId="+appId+"&isBls="+(localStorage.blsflow||!1)+"&"+getTimeStamp();return $http.post(appId,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},addSubscriber:function(data){let deferred=$q.defer();var url=serviceHost+"/subscribe/mail?"+getTimeStamp();return $http.post(url,wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},pincodeService:function(pincode){let deferred=$q.defer();
885pincode=serviceHost+"/pincode/details?pincode="+pincode+"&visitorId="+getCookie("visitorId")+"&"+getTimeStamp();return $http.get(pincode).then(function(response){response=JSON.parse(manageWrapping.unwrapContent(response)),deferred.resolve(response)},function(error){error=JSON.parse(manageWrapping.unwrapContent(error)),deferred.reject(error)}),deferred.promise},fetchDataFromApplicationID:function(appId){let deferred=$q.defer();appId=serviceHost+"/international/travel/quote/"+appId+"?"+getTimeStamp();return $http.post(appId,{security:{}}).then(function(response){response=JSON.parse(manageWrapping.unwrapContent(response)),deferred.resolve(response)},function(error){error=JSON.parse(manageWrapping.unwrapContent(error)),deferred.reject(error)}),deferred.promise},getActiveCouponsService:function(data){let deferred=$q.defer();var url=serviceHost+"/campaigns/travel?"+getTimeStamp();return $http.post(url,data).then(function(response){response=JSON.parse(manageWrapping.unwrapContent(response)),deferred.resolve(response)},function(error){error=JSON.parse(manageWrapping.unwrapContent(error)),deferred.reject(error)}),deferred.promise},couponCodeValidationService:function(data,couponCode){let deferred=$q.defer(),url=serviceHost+"/vali
885date/travel/"+couponCode+"?"+getTimeStamp();return $http({url:url,method:"POST",data:data}).then(function(response){response=JSON.parse(manageWrapping.unwrapContent(response)),deferred.resolve(response)},function(error){error=JSON.parse(manageWrapping.unwrapContent(error)),deferred.reject(error)}),deferred.promise},inBoundConVoxService:function(data,couponCode){let deferred=$q.defer(),url=serviceHost+"/convox/senddata/leads?"+getTimeStamp();return $http({url:url,method:"POST",data:data}).then(function(response){response=JSON.parse(manageWrapping.unwrapContent(response)),deferred.resolve(response)},function(error){error=JSON.parse(manageWrapping.unwrapContent(error)),deferred.reject(error)}),deferred.promise},declinedCountry:function(data){let deferred=$q.defer(),config={responseType:"text",transformResponse:convertStrinToJsonResponse};var url=serviceHost+"/validateBlackListCountry?"+getTimeStamp();return $http.post(url,manageWrapping.wrapContent(JSON.stringify(data)),config).then(function(response){deferred.resolve(response)},function(error){deferred.reject(error)}),deferred.promise},getCountriesFromCamunda:function(){let deferred=$q.defer();var headers=(new Headers).append("Content-Type","application/json"),headers={responseType:"text",transformResponse:convertStrinToJsonResponse,headers:headers},url=serviceHost+"/common/camunda?"+getTimeStamp();return $http.post(url,wrapContent(JSON.stringify({variables:{Country_List:{value:"Country_List"}},key:"Country_List"})),headers).then(function(res){deferred.resolve(res)},function(err){deferred.reject(err)}),deferred.promise}}}]); 886var inputFocusClass="is-focused",minInputChars=2,insertAfter=function(newNode,referenceNode){var nextSibling=referenceNode.nextSibling;referenceNode.parentNode.insertBefore(newNode,nextSibling)},customSuggestionBox={show:function(suggestionBox,attachToEl,width,isInsideModal,leftOffset){var bounds=attachToEl.getBoundingClientRect(),windowScrollY=window.scrollY||window.pageYOffset;leftOffset=leftOffset||0,isInsideModal?(insertAfter(suggestionBox,attachToEl),suggestionBox.style.left=leftOffset+"px",suggestionBox.style.top=bounds.height+"px"):(suggestionBox.style.left=bounds.left+leftOffset+"px",suggestionBox.style.top=bounds.bottom+windowScrollY+"px"),suggestionBox.style.width=width+"px",classie.add(suggestionBox,"is-visible")},hide:function(suggestionBox){classie.remove(suggestionBox,"is-visible")}},onBoardingFieldFocus=function(inputParent,options){var inputSelector,_this=inputParent,actualSuggestionBoxWidth=(options=mergeObjects({inputElement:"input",isInputSearchField:!0,isInputInsideModal:!1,customSuggestionBoxEl:null,suggestionBoxWidth:[],suggestionBoxLeftOffset:0,minInputCharsToHideCustomSuggestions:minInputChars},options),inputSelector="object"==typeof options.inputElement?options.inputElement:_this.querySelector(options.inputElement),0);options.isInputInsideModal?actualSuggestionBoxWidth=inputSelector:(options.suggestionBoxWidth.map(function(element){actualSuggestionBoxWidth+=parseInt(element.offsetWidth)}),window.addEventListener("resize",function(){actualSuggestionBoxWidth=0,options.suggestionBoxWidth.map(function(element){actualSuggestionBoxWidth+=parseInt(element.offsetWidth)})})),_this.addEventListener("click",function(){inputSelector.focus()}),inputSelector.addEventListener("blur",function(){classie.remove(_this,inputFocusClass),customSuggestionBox.hide(options.customSuggestionBoxEl)}),inputSelector.addEventListener("focus",function(){classie.add(_this,inputFocusClass),options.isInputInsideModal?customSuggestionBox.show(options.customSuggestionBoxEl,inputSelector,actualSuggestionBoxWidth.offsetWidth,!0,options.suggestionBoxLeftOffset):customSuggestionBox.show(options.customSuggestionBoxEl,_this,actualSuggestionBoxWidth,!1,options.suggestionBoxLeftOffset)}),options.isInputSearchField&&inputSelector.addEventListener("keyup",function(){this.value.length>=options.minInputCharsToHideCustomSuggestions?customSuggestionBox.hide(options.customSuggestionBoxEl):options.isInputInsideModal?customSuggestionBox.show(options.customSuggestionBoxEl,inputSelector,actualSuggestionBoxWidth.offsetWidth,!0,options.suggestionBoxLeftOffset):cu
886stomSuggestionBox.show(options.customSuggestionBoxEl,_this,actualSuggestionBoxWidth,!1,options.suggestionBoxLeftOffset)})},goToAccordionGroup=function(currentGroup,newGroup){accordion.collapse(currentGroup),accordion.expand(newGroup)},goToNextOption=function(options){var selectedValueElementInAccordion,newGroupOpenAccordionButton;(options=mergeObjects({useAccordions:!1,useInputs:!1,nextFieldParent:null,currentGroup:null,newGroup:null,newGroupInputField:null,customSelectedValue:null},options)).useAccordions&&(goToAccordionGroup(options.currentGroup,options.newGroup),(selectedValueElementInAccordion=options.currentGroup.querySelector(".collapse-selected-value"))&&(selectedValueElementInAccordion.innerText=options.customSelectedValue||options.currentGroup.getElementsByTagName("input")[0].value),selectedValueElementInAccordion=options.currentGroup.querySelector(".open-accordion-action"),newGroupOpenAccordionButton=options.newGroup.querySelector(".open-accordion-action"),selectedValueElementInAccordion&&selectedValueElementInAccordion.setAttribute("data-edit-enabled",!0),newGroupOpenAccordionButton&&newGroupOpenAccordionButton.setAttribute("data-edit-enabled",!0),options.newGroupInputField)&&options.newGroupInputField.addEventListener("focus",function scrollToFieldAfterFocus(){setTimeout(function(){scrollTo(options.newGroup.offsetTop,300,null,options.newGroup.closest(".modal-inner")),options.newGroupInputField.removeEventListener("focus",scrollToFieldAfterFocus)},300)}),null===options.newGroup.offsetParent?setTimeout(function(){options.nextFieldParent.click()},10):setTimeout(function(){options.newGroupInputField?options.newGroupInputField.click():scrollTo(options.newGroup.offsetTop,300,function(){},options.newGroup.closest(".modal-inner")),removeListVisibility(options.currentGroup)},300)},enableBandObserver=function(flowForm){var suggestionBoxVisibilityObserverParams={attributes:!0,attributeFilter:["class"],subtree:!0},flowFormObserver=new MutationObserver(function(event){event=event[0].target;classie.remove(document.querySelector(".quote-band-wrapper"),inputFocusClass),classie.has(event,inputFocusClass)&&(flowFormObserver.disconnect(),classie.add(document.querySelector(".quote-band-wrapper"),inputFocusClass),setTimeout(function(){flowFormObserver.observe(flowForm,suggestionBoxVisibilityObserverParams)},300))});flowFormObserver.observe(flowForm,suggestionBoxVisibilityObserverParams)},quoteEntryBand={onBoardingFieldFocus:onBoardingFieldFocus,customSuggestionBox:customSuggestionBox,goToNextOption:goToNextOption,enableBandObserver:enableBandObserver,options:{inputFocusClass:inputFocusClass,minInputChars:minInputChars}};function removeListVisibility(currentGroup){$(currentGroup).css("visibility","visible")} 887var validationMessages={required:"This field is required",city:{required:"Please select a city","no-results":"Not found","invalid-selection":"Please select a city from the list"},"car-model":{required:"Please select a car model","no-results":"Sorry, no such car found","invalid-selection":"Please select a car from the list"},"car-variant":{required:"Please select a car variant","no-results":"Sorry, no such car found","invalid-selection":"Please select a variant from the list"},"car-registration-year":{required:"Please enter year","valid-year":"Please enter a valid year","in-year-range":"Year shouldn't be less than 1970 & more than the current year",min:"Year should be greater than 1970",max:"You can't have had registered your car in the future!"},"two-wheeler-model":{required:"Please select a bike model","no-results":"Sorry, no such bike found","invalid-selection":"Please select a bike from the list"},"two-wheeler-registration-year":{required:"Please select date","valid-year":"Please enter a valid year","in-year-range":"Year shouldn't be less than 1970 & more than the current year",min:"Year should be greater than 1970",max:"You can't have had registered your bike in the future!"},airline:{required:"Please select an airline","no-results":"Sorry, no such airline found","return-airline-not-selected":"Please select return airline"},route:{origin:{required:"Please select your flight origin"},destination:{required:"Please select your flight destination"}},"mobile-insurance":{"model-not-found":"Model not found"},"mobile-number":{required:"Please enter your mobile number",digits:"Please enter 10 digit mobile number"}
887,email:{"invalid-format":"You're kidding right? This is not a valid email id."},date:{required:"Please enter a valid date"},"insurance-company":{required:"Please select your previous insurance company","no-results":"Sorry, no such insurance company found"},"pan-number":{required:"Take a moment, check your number and write it here.","invalid-format":"Something looks incorrect, check your PAN number once."},"gst-number":{"invalid-format":"Please enter a valid GST number"}}; 888var encranalytics="l0ckIt!",navigationPath=window.location.origin,allowedOrigin=window.location.origin.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),safeUrlRegex=new RegExp("^https:\\/\\/([a-z0-9-]+\\.)?godigit\\.com(\\/[^\\#]*)?$");function checkURL(){var url=window.location.href;return-1!=url.indexOf("?meID=")||-1!=url.indexOf("&meID=")}function meIDQueryParam(){var uniqueId;checkURL()&&(uniqueId=new URLSearchParams(window.location.search).get("meID"),Moengage.add_unique_user_id(uniqueId))}function redirectPath(){if("string"==typeof navigationPath&&safeUrlRegex.test(this.navigationPath))return navigationPath}function generateQuickGuid(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function ReadVisitorId(){var name,allcookies=document.cookie;cookiearray=allcookies.split(";");for(var i=0;i<cookiearray.length;i++)name=cookiearray[i].split("=")[0]?cookiearray[i].split("=")[0].trim():"",value=cookiearray[i].split("=")[1]?cookiearray[i].split("=")[1].trim():"",name===cookie_visitorid&&(visitorarray=value.split("%"),(visitorId_val=visitorarray[4])&&"7C5.2.0"!==visitorId_val&&"5.2.0"!==visitorId_val||(visitorId_val=generateQuickGuid().toUpperCase()));visitorId_val&&"7C5.2.0"!==visitorId_val&&"5.2.0"!==visitorId_val||(visitorId_val=generateQuickGuid().toUpperCase()),document.cookie="visitorId="+visitorId_val.substring(2)}function visitorIdMoengageAdd(){Moengage.add_user_attribute("visitor_id",getCookie("visitorId"))}function customPageViewdataLayerGoogleAnalytics(dataLayerParams){var payload=dataLayerParams||{event:"CustomPageView",page:{title:"Digit Insurance - "+document.title,path:window.location.pathname,type:document.title},UserID:getCookie("visitorId")};window.dataLayer?window.dataLayer.push(payload):setTimeout(function(){var w,d,s,l;window.dataLayer||(w=window,d=document,s="script",w[l="dataLayer"]=w[l]||[],w[l].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),w=d.getElementsByTagName(s)[0],(l=d.createElement(s)).async=!0,l.src="https://www.googletagmanager.com/gtm.js?id=GTM-TQS5Z6N",w.parentNode.insertBefore(l,w)),window.dataLayer.push(payload)},2e3)}document.addEventListener("DOMContentLoaded",()=>{setTimeout(meIDQueryParam,4e3),setTimeout(visitorIdMoengageAdd,4e3),setTimeout(ReadVisitorId,4e3),setTimeout(customPageViewdataLayerGoogleAnalytics,4e3),setTimeout(getUserSessionCookieValue,2e3)}),redirectToHealthPage=function(){window.location.href.includes("localhost")?location.href="/content/godigit/directportal/en/health-insurance.html?wcmmode=disabled":location.href="/health-insurance"+window.location.search},validateUrl=function(url){safeUrlRegex.test(url)&&(window.location.href=url)},redirectToFourWheelerPage=function(){window.location.href=redirectPath()+"/motorinsurance/car-mobile"+window.location.search},redirectToTwoWheelerPage=function(){location.href=redirectPath()+"/motorinsurance/two-wheeler-insurance/bike-mobile"+window.location.search},redirectToCvPage=function(){window.location.href=redirectPath()+"/motorinsurance/commercial-vehicle-insurance/mobile-home"+window.location.search},redirectToTravelPage=function(){window.location.href.includes("localhost")?location.href="/content/godigit/directportal/en/international-travel-insurance.html?wcmmode=disabled":location.href="/international-travel-insurance"+window.location.search};var userActionData={};function setUserSessionCookies(data){userActionData.startTime=data.startTime,userActionData.latestTime=data.latestTime,userActionData.vahanCall=data.vahanCall||0;var firstVisit=userActionData.startTime,firstVisit=userActionData.latestTime-firstVisit,diffDays=Math.floor(firstVisit/864e5),diffHrs=Math.floor(firstVisit%864e5/36e5),firstVisit=(Math.round(firstVisit%864e5%36e5/6e4),1<diffDays?userActionData={startTime:(new Date).getTime(),latestTime:(new Date).getTime(),vahanCall:0,skipVahanAPI:!1}:diffHrs<23&&5<data.vahanCall&&(userActionData.skipVahanAPI=!0),[userActionData.startTime,userActionData.latestTime,userActionData.vahanCall,userActionData.skipVahanAPI]);cookie.write("digit_user_count",encodeURIComponent(firstVisit),cookieDuration,"/","",cookieSecureFlag,sameSite)}function encrypt(plainText){return AesCtr.encrypt(plainText,encranalytics,256)}getUserSessionCookieValue=function(){var cookieValue=readCookieForDirectHomePage();if(cookieValue){cookiearray=cookieValue.split(";");for(var i=0;i<cookiearray.length;i++)fieldName=cookiearray[i].split("=")[0].trim(),fieldValue=cookiearray[i].split("=")[1].trim(),"digit_user_count"===fieldName&&resetUserSessionCookieValue(fieldValue.split("%2C"))}},resetUserSessionCookieValue=function(value){userActionData={startTime:value[0],latestTime:value[1],vahanCall:value[2],skipVahanAPI:value[3]}},(w=>{w.dataLayer=w.dataLayer||[],w.gtag=w.gtag||function(){w.dataLayer.push(arguments)};var timezone="",languages=[],isIndiaLocation=(w.Intl&&w.Intl.DateTimeFormat&&(timezone=w.Intl.DateTimeFormat().resolvedOptions().timeZone||""),w.navigator&&(languages=w.navigator.languages||[w.navigator.language||""]),!1);timezone?isIndiaLocation=(timezone=>!!timezone&&(-1!==(timezone=timezone.toLowerCase()).indexOf("asia/kolkata")||-1!==timezone.indexOf("asia/calcutta")||-1!==timezone.indexOf("utc+5:30")||-1!==timezone.indexOf("utc+0530")||-1!==timezone.indexOf("ist")))(timezone):languages.length&&(isIndiaLocation=(languages=>
888!(!languages||!languages.length)&&languages.map(function(lang){return(lang||"").toLowerCase()}).some(function(lang){return-1!==lang.indexOf("en-in")||-1!==lang.indexOf("hi-in")||-1!==lang.indexOf("mr-in")||-1!==lang.indexOf("ta-in")||-1!==lang.indexOf("te-in")||-1!==lang.indexOf("kn-in")||-1!==lang.indexOf("bn-in")||-1!==lang.indexOf("-in")}))(languages)),w.gtag("consent","update",isIndiaLocation?{ad_storage:"granted",analytics_storage:"granted",ad_user_data:"granted",ad_personalization:"granted",functionality_storage:"granted",personalization_storage:"granted",security_storage:"granted"}:{ad_storage:"denied",analytics_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",functionality_storage:"denied",personalization_storage:"denied",security_storage:"granted"})})(window); 889const getQuoteForm=document.querySelector("#mainBikeForm"),prodContainerNewGetQuote=document.querySelector("#products-container"),getQuoteFormSwitchers=document.querySelectorAll("#products-container [data-form-name]"),generalTerms=document.querySelector("#general-terms"),lifeTerms=document.querySelector("#life-terms");function addFlexAndRemoveHidden(element){element&&(element.classList.add("flex"),element.classList.remove("hidden"))}function openProposalErrorModal(flowName){const lobName=String(flowName||"").trim().toLowerCase();lobName&&document.querySelectorAll("[data-proposal-error-modal]").forEach(modal=>{(modal.dataset.proposalLob||"").trim().toLowerCase()===lobName&&addFlexAndRemoveHidden(modal)})}let usptext=!1;const get_quote_new_tab=document.querySelectorAll(".getQuoteTab-pane"),subPages=["health","car","bike","commercial","travel"];let currentPage=location.href.split("/").pop().split(".html")[0];"health"===currentPage?(generalTerms?.classList.add("hidden"),generalTerms?.classList.remove("flex"),addFlexAndRemoveHidden(lifeTerms)):(lifeTerms?.classList.add("hidden"),lifeTerms?.classList.remove("flex"),addFlexAndRemoveHidden(generalTerms));let uspHome=document.querySelectorAll(".green-usp");function createGetQuoteForm(formName){getQuoteFormSwitchers.forEach(getQuoteFormSwitcher=>{formName===getQuoteFormSwitcher.dataset.formName&&"More"!==getQuoteFormSwitcher.dataset.formName&&getQuoteFormSwitcher.classList.add("active")})}usptext=Array.from(uspHome).some(usp=>usp.innerText.length>15),uspHome.forEach(greenUsp=>{greenUsp.style.fontSize=usptext?"7px":"10px"}),createGetQuoteForm(subPages.includes(currentPage)?currentPage:"Car"),window.addEventListener("popstate",()=>{currentPage=location.href.split("/").pop().split(".html")[0]}),getQuoteFormSwitchers.forEach(getQuoteFormSwitcher=>{getQuoteFormSwitcher.addEventListener("click",e=>{e.stopPropagation(),"More"!==getQuoteFormSwitcher.innerText&&(getQuoteFormSwitchers.forEach(getQuoteFormSwitcher=>{getQuoteFormSwitcher.classList.remove("active")}),getQuoteFormSwitcher.classList.add("active"),document.querySelector("#geographInput")?.focus()),currentPage=location.href.split("/").pop().split(".html")[0],document.getElementById(getQuoteFormSwitcher.dataset.formName)&&(get_quote_new_tab.forEach(item=>{item.classList.remove("active")}),document.getElementById(getQuoteFormSwitcher.dataset.formName).classList.add("active")),"health"===currentPage?(generalTerms.classList.add("hidden"),generalTerms.classList.remove("flex"),lifeTerms.classList.add("flex"),lifeTerms.classList.remove("hidden")):(lifeTerms.classList.add("hidden"),lifeTerms.classList.remove("flex"),generalTerms.classList.add("flex"),generalTerms.classList.remove("hidden")),createGetQuoteForm(getQuoteFormSwitcher.dataset.formName)})}),document.addEventListener("DOMContentLoaded",()=>{const popupOpeners=document.querySelectorAll("[data-popupOpener]"),lifeTabPopup=document.querySelector(".popup .life-tab"),generalTabPopup=document.querySelector(".popup .general-tab"),productsContainer=document.querySelector("#popup-products-container"),newVehiclesBtns=document.querySelectorAll(".new-vehicle-btns, .port-policy-btns");newVehiclesBtns?.forEach(btn=>{btn.addEventListener("keypress",function(e){"Enter"!==e.key&&" "!==e.key||btn.click()})}),prodContainerNewGetQuote.addEventListener("keypress",function(e){const target=e.target.closest("#carQuoteBtn, #bikeQuoteBtn, #cvQuoteBtn, #healthQuoteBtn, #travelQuoteBtn, #iconQuoteBtn, #termQuoteBtn, #homeQuoteBtn");if(target&&("Enter"===e.key||" "===e.key)){const tabElement=target.closest(".tab-element-new");tabElement?tabElement.click():target.click()}}),sessionStorage.removeItem("lobChecked"),sessionStorage.setItem("lobChecked",JSON.stringify({lob:{car:!0,health:!0,bike:!0,cv:!0,property:!0,travel:!0,other:!0,posp:!0,business:!0}}
889)),popupOpeners.forEach(popupOpener=>{const popup=document.querySelector(`[data-popupId=${popupOpener.dataset.popupopener}]`);popupOpener.addEventListener("click",()=>{const iframe=popup.querySelector("iframe");if(iframe&&!iframe.src&&(iframe.src=iframe.dataset.src),popup.classList.add("popup-open"),popupOpener.dataset.product){const termData=Object.keys(termsAndCond).filter(key=>key.includes(popupOpener.dataset.product)).reduce((acc,val)=>Object.assign(acc,{[val]:termsAndCond[val]}),{});document.getElementById("terms-condtion-wrapper").textContent="",termData[Object.keys(termData)[0]].forEach(item=>{let li=document.createElement("li");li.className="list-disc",li.textContent=item.name,document.getElementById("terms-condtion-wrapper").appendChild(li)})}if(popupOpener.dataset.prodNew){const newProduct=popupOpener.dataset.prodNew.toLowerCase(),modalContent=popup.querySelector(".modal-content"),lazyLoadTermsBody=popup.querySelector(".lazy-loading-terms-condition");let lob;lob="motor"===newProduct?popupOpener.dataset.lobb?popupOpener.dataset.lobb?.toLowerCase():"car":newProduct;let termsList=[],termsHeading="";fetch(`/content/digit-customer-app/home-new/terms-conditions/${newProduct}-terms.model.json`).then(response=>response.json()).then(res=>{const response=res&&res[":items"].root[":items"].textaccordian;termsList=response?.textAccordionList,termsHeading=response?.headerText||"Terms and conditions",createTermsConditionBody(termsList,termsHeading,popup,lob),modalContent?.classList.remove("hidden"),lazyLoadTermsBody?.classList.add("hidden")})}document.body.classList.add("scroll-disabled")}),popup.querySelectorAll(".close-btn").forEach(closeButton=>{closeButton.addEventListener("click",e=>{e.stopPropagation(),document.body.classList.remove("scroll-disabled"),popup.classList.remove("popup-open")})}),popup.querySelector(".modal-content")?.addEventListener("click",e=>e.stopPropagation()),popup.addEventListener("click",()=>{document.body.classList.remove("scroll-disabled"),popup.classList.remove("popup-open")})}),"false"===document.getElementById("is-gen-tab").innerText&&"true"===document.getElementById("is-life-tab").innerText?(productsContainer?.classList.remove("show-life-products"),generalTabPopup?.classList.add("bg-white","border"),lifeTabPopup?.classList.remove("bg-white","border")):"false"===document.getElementById("is-life-tab").innerText&&"true"===document.getElementById("is-gen-tab").innerText&&(productsContainer?.classList.add("show-life-products"),generalTabPopup?.classList.remove("bg-white","border"),lifeTabPopup?.classList.add("bg-white","border")),generalTabPopup?.addEventListener("click",e=>{productsContainer?.classList.remove("show-life-products"),generalTabPopup?.classList.add("bg-white","border"),lifeTabPopup?.classList.remove("bg-white","border")}),lifeTabPopup?.addEventListener("click",e=>{productsContainer?.classList.add("show-life-products"),generalTabPopup?.classList.remove("bg-white","border"),lifeTabPopup?.classList.add("bg-white","border")});document.querySelectorAll("#general-products a").forEach(item=>{});document.querySelectorAll("#mobile-products-container .more-protect-card").forEach(item=>{item.addEventListener("click",function(){})});
889const serviceErrorBnt=document.querySelectorAll(".getquote-service-error-btn-new");serviceErrorBnt.length>0&&serviceErrorBnt.forEach(function(btn){btn.addEventListener("click",function(){window.location.reload()})})});const termsAndCond={"health-home":[{id:1,name:" I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future."},{id:2,name:"I declare that the premium paid under this transaction to Go Digit General Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation,the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will constitute full and final discharge of the Companyâs obligation."},{id:3,name:" I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."},{id:4,name:"I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."},{id:5,name:"By submitting my contact number and/or email ID, I authorize Go Digit General Insurance (Digit Insurance) to call, send email/SMS/WhatsApp and offer information and services about its product(s) and/or assist me for completing any incomplete journey/transaction. I further acknowledge and agree that such authorization will be over and above any registration of my contact number on TRAIâs NDNC registry."},{id:6,name:"This policy has been issued based on your declaration of Gross Annual Income and that Base Sum Insured chosen is not more than 10 times of such Gross Annual Income. In the event the declaration is found to be incorrect/wrong and/or non-submission of income proof to justify this declaration, it may result in inadmissibility of claim and/or cancellation of policy."},{id:7,name:" I confirm that the Gross Annual Income of the family in this proposal is true and correct and undertake to submit relevant income proof(s) in the event of claim in this regard."},{id:8,name:"This is to confirm that the Insured member(s) under this Policy does not work in Nuclear power plants, underground mines, explosives, hazardous material (e.g., fertilizers, asbestos fibre, toxic gases, toxic chemicals, pesticides etc)"},{id:9,name:"This is to confirm that the Insured member(s) under this Policy does not work in underground mines, in explosive magazines or in electrical installations with high tension supply, or insured is a jockey, circus personnel, engaged in racing on wheels or horseback, big game hunting, mountaineering, winter sports, skiing, ice hockey, river rafting, polo, or in similar activity or occupation"}],"car-home":[{id:1,name:" For motor insurance: I/We agree and understand that by submitting data on this portal, the Company will fetch additional information regarding the vehicle through centralized Vahan/Parivahan/government/any other database. I/We hereby confirm our unconditional consent in this regard. I/We declare not to misuse/abuse/use the content of this portal for any commercial purpose or any derivative work. I/We hereby declare that details retrieved from the portal shall not be used for any illegal or malafide purpose."},{id:2,name:" I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future"},{id:3,name:" I declare that the premium paid under this transaction to Go Digit General Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation, the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will c
889onstitute full and final discharge of the Companyâs obligation."},{id:4,name:"I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."},{id:5,name:"I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."},{id:6,name:"By submitting my contact number and/or email ID, I authorize Go Digit General Insurance (Digit Insurance) to call, send email/SMS/WhatsApp and offer information and services about its product(s) and/or assist me for completing any incomplete journey/transaction. I further acknowledge and agree that such authorization will be over and above any registration of my contact number on TRAIâs NDNC registry."}],"bike-home":[{id:1,name:" For motor insurance: I/We agree and understand that by submitting data on this portal, the Company will fetch additional information regarding the vehicle through centralized Vahan/Parivahan/government/any other database. I/We hereby confirm our unconditional consent in this regard. I/We declare not to misuse/abuse/use the content of this portal for any commercial purpose or any derivative work. I/We hereby declare that details retrieved from the portal shall not be used for any illegal or malafide purpose."},{id:2,name:" I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future"},{id:3,name:" I declare that the premium paid under this transaction to Go Digit General Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation, the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will constitute full and final discharge of the Companyâs obligation."},{id:4,name:"I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."},{id:5,name:"I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."},{id:6,name:"By submitting my contact number and/or email ID, I authorize Go Digit General Insurance (Digit Insurance) to call, send email/SMS/WhatsApp and offer information and services about its product(s) and/or assist me for completing any incomplete journey/transaction. I further acknowledge and agree that such authorization will be over and above any registration of my contact number on TRAIâs NDNC registry."}],"cv-home":[{id:1,name:"For motor insurance: I/We agree and understand that by submitting data on this portal, the Company will fetch additional information regarding the vehicle through centralized Vahan/Parivahan/government/any other database. I/We hereby confirm our unconditional consent in this regard. I/We declare not to misuse/abuse/use the content of this portal for any commercial purpose or any derivative work. I/We hereby declare that details retrieved from the portal shall not be used for any illegal or malafide purpose."},{id:2,name:"I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future"},{id:3,name:"I declare that the premium paid under this transaction to Go Digit General Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation, the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will c
889onstitute full and final discharge of the Companyâs obligation."},{id:4,name:"I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."},{id:5,name:"I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."},{id:6,name:"By submitting my contact number and/or email ID, I authorize Go Digit General Insurance (Digit Insurance) to call, send email/SMS/WhatsApp and offer information and services about its product(s) and/or assist me for completing any incomplete journey/transaction. I further acknowledge and agree that such authorization will be over and above any registration of my contact number on TRAIâs NDNC registry."}],"travel-home":[{id:1,name:"I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future"},{id:2,name:"I declare that the premium paid under this transaction to Go Digit General Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation, the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will constitute full and final discharge of the Companyâs obligation."},{id:3,name:"I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."},{id:4,name:"I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."},{id:5,name:"By submitting my contact number and/or email ID, I authorize Go Digit General Insurance (Digit Insurance) to call, send email/SMS/WhatsApp and offer information and services about its product(s) and/or assist me for completing any incomplete journey/transaction. I further acknowledge and agree that such authorization will be over and above any registration of my contact number on TRAIâs NDNC registry."}],"digit-icon":[{id:1,name:"I/We agree and understand that by submitting data on this portal, the Company will fetch additional information through centralized/government/any other database. I/We hereby confirm our unconditional consent in this regard. I/We declare not to misuse/abuse/use the content of this portal for any commercial purpose or any derivative work. I/We hereby declare that details retrieved from the portal shall not be used for any illegal or malafide purpose."},{id:2,name:"I/We, hereby declare that the statements and particulars given in this Proposal form are complete, true and accurate and I/We agree that the Insurance company will not be liable under the insurance contract if it is found that any of my/our statements or particulars or declarations in this proposal form or other documents are incorrect /misleading /Fraudulent in any respect on any matter to the grant of a cover or submission of claim in future."},{id:3,name:"I declare that the premium paid under this transaction to Go Digit Life Insurance Limited is being paid by me i.e. the proposer/policyholder through a bank account or a Credit/Debit Card or a Prepaid Payment Instrument or a UPI wallet (Wallet), held by me in my name as a primary holder (referred to as âsource accountâ). I confirm that it is not a third party payment made by any other person on my behalf. I understand that in the event of a policy cancellation, the refund of premium as per policy terms and conditions may be credited back to such source account and such electronic transfer will c
889onstitute full and final discharge of the Companyâs obligation."},{id:4,name:"I/We further declare that l/we will notify in writing any change in the details so furnished hereinabove occurring after the proposal has been submitted but before communication of the risk acceptance by the Company."},{id:5,name:"I/We authorize the Company to share information pertaining to my proposal including medical records for the sole purpose of proposal underwriting and/or claims settlement and with any Governmental and/or Regulatory authority."},{id:6,name:"By submitting your contact number and email ID, you authorize Go Digit Life Insurance Limited to call, send SMS, messages over internet-based messaging application like WhatsApp and email and offer you information and services for the product(s) you have opted for as well as other products/services offered by Digit Life Insurance. Please note that such authorization will be over and above any registration of the contact number on TRAIâs NDNC registry."}]};function fetchScriptData(){fetch("/bin/godigit/s_clientlibzstreams?"+(new Date).getTime(),{credentials:"same-origin"}).then(response=>response.text()).then(data=>setDynamicCodeInStorage(data&&data.trim())).catch(error=>console.error("Error:",error))}function callDataLayerFunctionsLob(lob){let layerData={event:"lob_selected",lob:lob,platform:window.location.href?window.location.href.includes("platform=ios")?"ios":window.location.href.includes("platform=android")?"android":"website":"",device_type:window.matchMedia("(max-width: 767px)").matches?"Mobile":"Desktop",source:window.location.href};["digiticon","life","term"].includes(lob.split(" ").join("").toLowerCase())&&(layerData.flow_type="new flow",layerData.section_name="Get quote component",layerData.property="Life Insurance",layerData.domain_source=window.location.href,layerData.userId=getCookie("visitorId")),customPageViewdataLayerGoogleAnalytics(layerData)}const lifeProductsLobs=document.querySelectorAll(".life-product-lob-select-card");function termsAndConditionHtml(terms,lob){const div=document.createElement("div");div.classList.add("flex","gap-3","items-start","justify-start");const pElement=document.createElement("p");if(pElement.style.margin="0","mandatory"===terms?.ques?.toLowerCase()||""===terms?.ques){const img=document.createElement("img");img.alt="mandatory",img.loading="lazy",img.src="https://d2h44aw7l5xdvz.cloudfront.net/assets/icons/grey-Checkbox.svg",img.style.marginTop="4px",div.appendChild(img),pElement.textContent=terms?.text,div.appendChild(pElement)}else if("optional"===terms?.ques?.toLowerCase()){const inputElement=document.createElement("input");if(inputElement.type="checkbox",inputElement.classList.add("terms-checkbox-li"),inputElement.id="terms-checkbox-li",inputElement.name="terms-checkbox-li",lob){let lobDefault={car:!0,health:!0,bike:!0,cv:!0,property:!0,travel:!0,other:!0,posp:!0,business:!0};const currentLobChecked=sessionStorage.getItem("lobChecked");if(currentLobChecked){const lobChecked=JSON.parse(currentLobChecked);lobDefault=lobChecked?.lob||lobDefault}inputElement.checked=void 0===lobDefault[lob.toLowerCase()]||lobDefault[lob.toLowerCase()],inputElement.addEventListener("change",function(e){delete lobDefault[lob.toLowerCase()],sessionStorage.setItem("lobChecked",JSON.stringify({lob:{...lobDefault,[lob.toLowerCase()]:e.target.checked}}))})}if(div.appendChild(inputElement),terms?.text.includes("<b>")&&terms?.text.includes("</b>")){const startIndex=terms.text.indexOf("<b>"),endIndex=terms.text.indexOf("</b>"),beforeBoldText=terms.text.substring(0,startIndex),boldText=terms.text.substring(startIndex+3,endIndex),afterBoldText=terms.text.substring(endIndex+4);pElement.textContent=beforeBoldText;const boldElement=document.createElement("b");boldElement.textContent=boldText,pElement.appendChild(boldElement);const afterBoldTextNode=document.createTextNode(afterBoldText);pElement.appendChild(afterBoldTextNode)}else pElement.textContent=terms?.text;div.appendChild(pElement)}return div}function createTermsConditionBody(termsList,termsHeading,popup,lob){popup.querySelector(".main-heaidng-terms").innerText=termsHeading;const termsWrapper=popup.querySelector("#terms-condtion-wrapper");termsWrapper.textContent="";for(let i=0;i<termsList.length-1;i++){const li=termsAndConditionHtml(termsList[i],lob);termsWrapper.appendChild(li)}const lastTerms=termsList[termsList.length-1];popup.querySelector(".modal-button-section button").innerText=lastTerms?.ques||"I Agree"}
889lifeProductsLobs.forEach(lifeProductLob=>{lifeProductLob.addEventListener("click",e=>{callDataLayerFunctionsLob(lifeProductLob.dataset.lob)})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.