PageSourceSearch

https://www.roche-diagnostics.cn/%E6%B3%95%E5%BE%8B%E5%A3%B0%E6%98…eb70f625f9f3778da4754.js.%E4%B8%8B%E8%BD%BD

js roche-diagnostics.cn collected 2026-10-07 15:25:26 UTC 1,071,173 bytes, 20,424 lines download raw bytes

vendor: 32,093 bytes, lines 1-2
1/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
2!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
3    
vendor: 32,026 bytes, line 3
3return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
4    
vendor: 20,226 bytes, line 4
4void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});
5    //# sourceMappingURL=jquery.min.map
6/* eLabDoc ResponsiveIframe - v0.0.2 - 2014-07-23
7* https://github.com/npr/responsiveiframe#license
8* Updated 2014 - iQuest
9* Original Copyright (c) 2013 Irakli Nadareishvili; Licensed MIT, GPL 
10
11*/
12
13if (typeof jQuery !== 'undefined') {
14  (function ($) {
15      var settings = {
16          xdomain: '*',
17          ie: navigator.userAgent.toLowerCase().indexOf('msie') > -1,
18          scrollToTop: true
19      };
20
21      var methods = {
22          init: function () {
23              return this.each(function () {
24                  var $this = $(this);
25                  $(window).scroll(function () {
26                      var parentInfo = {};
27                      parentInfo.scrollTop = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;
28                      parentInfo.ScrollY = window.scrollY;
29                      parentInfo.pageYOffset = window.pageYOffset;
30                      parentInfo.innerHeight = window.innerHeight || document.documentElement.clientHeight;
31                      parentInfo.clientHeight = Math.max(
32                              document.body.scrollHeight - 20, document.documentElement.scrollHeight - 20,
33                              document.body.offsetHeight - 20, document.documentElement.offsetHeight - 20,
34                              document.body.clientHeight - 20, document.documentElement.clientHeight - 20
35                          );
36                      parentInfo.height = $(window.parent).height();
37                    
38          //parentInfo.iFrameFooterHeight = $(window.document.getElementsByTagName("footer")).outerHeight();
39          if($('.c-cookie-notification').is(":visible")){
40            parentInfo.iFrameFooterHeight = $(window.document.getElementsByTagName("footer")).outerHeight() + $('.c-cookie-notification').height();
41          }
42          else{
43            parentInfo.iFrameFooterHeight = $(window.document.getElementsByTagName("footer")).outerHeight();
44          }     
45          document.getElementById($this[0].id).contentWindow.postMessage(JSON.stringify(parentInfo), "*");
46                  });
47
48                  if (window.postMessage) {
49                      if (window.addEventListener) {
50                          window.addEventListener('message', function (e) {
51                              privateMethods.messageHandler($this, e);
52                          }, false);
53                      } else if (window.attachEvent) {
54                          window.attachEvent('onmessage', function (e) {
55                              privateMethods.messageHandler($this, e);
56                          }, $this);
57                      }
58                  } else {
59                      setInterval(function () {
60                          var hash = window.location.hash, matches = hash.match(/^#h(\d+)(s?)$/);
61                          if (matches) {
62                              privateMethods.setHeight($this, matches[1]);
63                          }
64                      }, 50);
65                  }
66              });
67          }
68      };
69
70      var privateMethods = {
71          messageHandler: function (elem, e) {
72              var height,
73                r,
74                o,
75                matches,
76                strD;
77
78              if (settings.xdomain !== '*') {
79                  var regex = new RegExp(settings.xdomain + '$');
80                  if (e.origin == "null") {
81                      throw new Error("messageHandler( elem, e): There is no origin.  You are viewing the page from your file system.  Please run through a web server.");
82                  }
83                  if (e.origin.match(regex)) {
84                      matches = true;
85                  } else {
86                      throw new Error("messageHandler( elem, e): The orgin doesn't match the responsiveiframe  xdomain.");
87                  }
88
89              }
90
91              if (settings.xdomain === '*' || matches) {
92                  strD = e.data + "";
93                  r = strD.match(/^(\d+)(s?)$/);
94                  o = strD.match(/^(\d+)(o?)$/);
95
96                  if (r && r.length === 3) {
97                      height = parseInt(r[1], 10);
98                      if (!isNaN(height)) {
99                          try {
100                              if (elem.height() < height) {
101                                  privateMethods.setHeight(elem, height);
102                              }
103                          } catch (ex) { }
104                      }
105                      if (settings.scrollToTop && r[2] === "s") {
106                          scroll(0, 0);
107                      }
108                  }
109                  if (o && o.length === 3) {
110                      height = parseInt(o[1], 10);
111                      if (!isNaN(height)) {
112                          try {
113                              privateMethods.setHeight(elem, height);
114                          } catch (ex) { }
115                      }
116                  }
117              }
118          },
119
120          setHeight: function (elem, height) {
121              elem.css('height', height + 'px');
122          },
123          getDocHeight: function () {
124              var D = document;
125              return Math.min(
126                Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
127                Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
128                Math.max(D.body.clientHeight, D.documentElement.clientHeight)
129              );
130          }
131      };
132
133      $.fn.responsiveIframe = function (method) {
134          if (methods[method]) {
135              return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
136          } else if (typeof method === 'object' || !method) {
137              $.extend(settings, arguments[0]);
138              return methods.init.apply(this);
139          } else {
140              $.error('Method ' + method + ' does not exist on jQuery.responsiveIframe');
141          }
142      };
143  }(jQuery));
144}
145
146; (function () {
147  var self,
148      module,
149      ResponsiveIframe = function () { self = this; };
150
151  ResponsiveIframe.prototype.allowResponsiveEmbedding = function () {
152      if (window.addEventListener) {
153          window.addEventListener("load", self.messageParent, false);
154      } else if (window.attachEvent) {
155          window.attachEvent("onload", self.messageParent);
156      }
157  };
158
159  ResponsiveIframe.prototype.messageParent = function (scrollTop) {
160      var h = document.body.offsetHeight;
161      h = (scrollTop) ? h + 's' : h;
162      if (parent.postMessage) {
163          parent.postMessage(h, '*');
164      } else {
165          window.location.hash = 'h' + h;
166      }
167  };
168
169  function responsiveIframe() {
170      return new ResponsiveIframe();
171  }
172
173  if ('undefined' === typeof exports || 'undefined' === typeof module) 
174  {
175      window.responsiveIframe = responsiveIframe;
176  } else {
177      module.exports.responsiveIframe = responsiveIframe;
178  }
179}());
vendor: 60,919 bytes, lines 180-182
180/*! jPlayer 2.9.2 for jQuery ~ (c) 2009-2014 Happyworm Ltd ~ MIT License */
181!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):b("object"==typeof exports?require("jquery"):a.jQuery?a.jQuery:a.Zepto)}(this,function(a,b){a.fn.jPlayer=function(c){var d="jPlayer",e="string"==typeof c,f=Array.prototype.slice.call(arguments,1),g=this;return c=!e&&f.length?a.extend.apply(null,[!0,c].concat(f)):c,e&&"_"===c.charAt(0)?g:(this.each(e?function(){var e=a(this).data(d),h=e&&a.isFunction(e[c])?e[c].apply(e,f):e;return h!==e&&h!==b?(g=h,!1):void 0}:function(){var b=a(this).data(d);b?b.option(c||{}):a(this).data(d,new a.jPlayer(c,this))}),g)},a.jPlayer=function(b,c){if(arguments.length){this.element=a(c),this.options=a.extend(!0,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()}),this._init()}},"function"!=typeof a.fn.stop&&(a.fn.stop=function(){}),a.jPlayer.emulateMethods="load play pause",a.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate",a.jPlayer.emulateOptions="muted volume",a.jPlayer.reservedEvent="ready flashreset resize repeat error warning",a.jPlayer.event={},a.each(["ready","setmedia","flashreset","resize","repeat","click","error","warning","loadstart","progress","suspend","abort","emptied","stalled","play","pause","loadedmetadata","loadeddata","waiting","playing","canplay","canplaythrough","seeking","seeked","timeupdate","ended","ratechange","durationchange","volumechange"],function(){a.jPlayer.event[this]="jPlayer_"+this}),a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","canplay","canplaythrough"],a.jPlayer.pause=function(){a.jPlayer.prototype.destroyRemoved(),a.each(a.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})},a.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var c=function(){this.init()};c.prototype={init:function(){this.options={timeFormat:a.jPlayer.timeFormat}},time:function(a){a=a&&"number"==typeof a?a:0;var b=new Date(1e3*a),c=b.getUTCHours(),d=this.options.timeFormat.showHour?b.getUTCMinutes():b.getUTCMinutes()+60*c,e=this.options.timeFormat.showMin?b.getUTCSeconds():b.getUTCSeconds()+60*d,f=this.options.timeFormat.padHour&&10>c?"0"+c:c,g=this.options.timeFormat.padMin&&10>d?"0"+d:d,h=this.options.timeFormat.padSec&&10>e?"0"+e:e,i="";return i+=this.options.timeFormat.showHour?f+this.options.timeFormat.sepHour:"",i+=this.options.timeFormat.showMin?g+this.options.timeFormat.sepMin:"",i+=this.options.timeFormat.showSec?h+this.options.timeFormat.sepSec:""}};var d=new c;a.jPlayer.convertTime=function(a){return d.time(a)},a.jPlayer.uaBrowser=function(a){var b=a.toLowerCase(),c=/(webkit)[ \/]([\w.]+)/,d=/(opera)(?:.*version)?[ \/]([\w.]+)/,e=/(msie) ([\w.]+)/,f=/(mozilla)(?:.*? rv:([\w.]+))?/,g=c.exec(b)||d.exec(b)||e.exec(b)||b.indexOf("compatible")<0&&f.exec(b)||[];return{browser:g[1]||"",version:g[2]||"0"}},a.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),c=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/,d=/(ipad|playbook)/,e=/(android)/,f=/(mobile)/,g=c.exec(b)||[],h=d.exec(b)||!f.exec(b)&&e.exec(b)||[];return g[1]&&(g[1]=g[1].replace(/\s/g,"_")),{platform:g[1]||"",tablet:h[1]||""}},a.jPlayer.browser={},a.jPlayer.platform={};var e=a.jPlayer.uaBrowser(navigator.userAgent);e.browser&&(a.jPlayer.browser[e.browser]=!0,a.jPlayer.browser.version=e.version);var f=a.jPlayer.uaPlatform(navigator.userAgent);f.platform&&(a.jPlayer.platform[f.platform]=!0,a.jPlayer.platform.mobile=!f.tablet,a.jPlayer.platform.tablet=!!f.tablet),a.jPlayer.getDocMode=function(){var b;return a.jPlayer.browser.msie&&(document.documentMode?b=document.documentMode:(b=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(b=7))),b},a.jPlayer.browser.documentMode=a.jPlayer.getDocMode(),a.jPlayer.nativeFeatures={init:function(){var a,b,c,d=document,e=d.createElement("video"),f={w3c:["fullscreenEnabled","fullscreenElement","requestFullscreen","exitFullscreen","fullscreenchange","fullscreenerror"],moz:["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror"],webkit:["","webkitCurrentFullScreenElement","webkitRequestFullScreen","webkitCancelFullScreen","webkitfullscreenchange",""],webkitVideo:["webkitSupportsFullscreen","webkitDisplayingFullscreen","webkitEnterFullscreen","webkitExitFullscreen","",""],ms:["","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError"]},g=["w3c","moz","webkit","webkitVideo","ms"];for(this.fullscreen=a={support:{w3c:!!d[f.w3c[0]],moz:!!d[f.moz[0]],webkit:"function"==typeof d[f.webkit[3]],webkitVideo:"function"==typeof e[f.webkitVideo[2]],ms:"function"==typeof e[f.ms[2]]},used:{}},b=0,c=g.length;c>b;b++){var h=g[b];if(a.support[h]){a.spec=h,a.used[h]=!0;break}}if(a.spec){var i=f[a.spec];a.api={fullscreenEnabled:!0,fullscreenElement:function(a){return a=a?a:d,a[i[1]]},requestFullscreen:function(a){return a[i[2]]()},exitFullscreen:function(a){return a=a?a:d,a[i[3]]()}},a.event={fullscreenchange:i[4],fullscreenerror:i[5]}}else a.api={fullscreenEnabled:!1,fullscreenElement:function(){return null},requestFullscreen:function(){},exitFullscreen:function(){}},a.event={}}},a.jPlayer.nativeFeatures.init(),a.jPlayer.focus=null,a.jPlayer.keyIgnoreElementNames="A INPUT TEXTAREA SELECT BUTTON";var g=function(b){var c,d=a.jPlayer.focus;d&&(a.each(a.jPlayer.keyIgnoreElementNames.split(/\s+/g),function(a,d){return b.target.nodeName.toUpperCase()===d.toUpperCase()?(c=!0,!1):void 0}),c||a.each(d.options.keyBindings,function(c,e){return e&&a.isFunction(e.fn)&&("number"==typeof e.key&&b.which===e.key||"string"==typeof e.key&&b.key===e.key)?(b.preventDefault(),e.fn(d),!1):void 0}))};a.jPlayer.keys=function(b){var c="keydown.jPlayer";a(document.documentElement).unbind(c),b&&a(document.documentElement).bind(c,g)},a.jPlayer.keys(!0),a.jPlayer.prototype={count:0,version:{script:"2.9.2",needFlash:"2.9.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",auroraFormats:"wav",preload:"metadata",volume:.8,muted:!1,remainingDuration:!1,toggleDuration:!1,captureDuration:!0,playbackRate:1,defaultPlaybackRate:1,minPlaybackRate:.5,maxPlaybackRate:4,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",playbackRateBar:".jp-playback-rate-bar",playbackRateBarValue:".jp-playback-rate-bar-value",currentTime:".jp-current-time",duration:".jp-duration",title:".jp-title",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen",repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},stateClass:{playing:"jp-state-playing",seeking:"jp-state-seeking",muted:"jp-state-muted",looped:"jp-state-looped",fullScreen:"jp-state-full-screen",noVolume:"jp-state-no-volume"},useStateClassSkin:!1,autoBlur:!0,smoothPlayBar:!1,fullScreen:!1,fullWindow:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1e3},loop:!1,repeat:function(b){b.jPlayer.options.loop?a(this).unbind(".jPlayerRepeat").bind(a.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){a(this).jPlayer("play")}):a(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullWindow:{msie:/msie [0-6]\./,ipad:/ipad.*?os [0-4]\./,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3]\.(?!.*?mobile)/,android_phone:/(?=.*android)(?!.*chrome)(?=.*mobile)/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,iemobile:/iemobile/,webos:/webos/,playbook:/playbook/},timeFormat:{},keyEnabled:!1,audioFullScreen:!1,keyBindings:{play:{key:80,fn:function(a){a.status.paused?a.play():a.pause()}},fullScreen:{key:70,fn:function(a){(a.status.video||a.options.audioFullScreen)&&a._setOption("fullScreen",!a.options.fullScreen)}},muted:{key:77,fn:function(a){a._muted(!a.options.muted)}},volumeUp:{key:190,fn:function(a){a.volume(a.options.volume+.1)}},volumeDown:{key:188,fn:function(a){a.volume(a.options.volume-.1)}},loop:{key:76,fn:function(a){a._loop(!a.options.loop)}}},verticalVolume:!1,verticalPlaybackRate:!1,globalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,consoleAlerts:!0,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}},optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,remaining:0,videoWidth:0,videoHeight:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,aurora:!0,flash:!0},format:{mp3:{codec:"audio/mpeg",flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},m3u8a:{codec:'application/vnd.apple.mpegurl; codecs="mp4a.40.2"',flashCanPlay:!1,media:"audio"},m3ua:{codec:"audio/mpegurl",flashCanPlay:!1,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis, opus"',flashCanPlay:!1,media:"audio"},flac:{codec:"audio/x-flac",flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"},m3u8v:{codec:'application/vnd.apple.mpegurl; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!1,media:"video"},m3uv:{codec:"audio/mpegurl",flashCanPlay:!1,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var c=this;if(this.element.empty(),this.status=a.extend({},this.status),this.internal=a.extend({},this.internal),this.options.timeFormat=a.extend({},a.jPlayer.timeFormat,this.options.timeFormat),this.internal.cmdsIgnored=a.jPlayer.platform.ipad||a.jPlayer.platform.iphone||a.jPlayer.platform.ipod,this.internal.domNode=this.element.get(0),this.options.keyEnabled&&!a.jPlayer.focus&&(a.jPlayer.focus=this),this.androidFix={setMedia:!1,play:!1,pause:!1,time:0/0},a.jPlayer.platform.android&&(this.options.preload="auto"!==this.options.preload?"metadata":"auto"),this.formats=[],this.solutions=[],this.require={},this.htmlElement={},this.html={},this.html.audio={},this.html.video={},this.aurora={},this.aurora.formats=[],this.aurora.properties=[],this.flash={},this.css={},this.css.cs={},this.css.jq={},this.ancestorJq=[],this.options.volume=this._limitValue(this.options.volume,0,1),a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.formats.push(e)}}),a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=!1;a.each(c.solutions,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.solutions.push(e)}}),a.each(this.options.auroraFormats.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=!1;a.each(c.aurora.formats,function(a,b){return e===b?(f=!0,!1):void 0}),f||c.aurora.formats.push(e)}}),this.internal.instance="jp_"+this.count,this.instances[this.internal.instance]=this.element,this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count),this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element}),this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b}),this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b}),this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(".swf"!==this.options.swfPath.toLowerCase().slice(-4)?(this.options.swfPath&&"/"!==this.options.swfPath.slice(-1)?"/":"")+"jquery.jplayer.swf":"")}),this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b}),a.each(a.jPlayer.event,function(a,d){c.options[a]!==b&&(c.element.bind(d+".jPlayer",c.options[a]),c.options[a]=b)}),this.require.audio=!1,this.require.video=!1,a.each(this.formats,function(a,b){c.require[c.format[b].media]=!0}),this.options=this.require.video?a.extend(!0,{},this.optionsVideo,this.options):a.extend(!0,{},this.optionsAudio,this.options),this._setSize(),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow),this.status.noVolume=this._uaBlocklist(this.options.noVolume),a.jPlayer.nativeFeatures.fullscreen.api.fullscreenEnabled&&this._fullscreenAddEventListeners(),this._restrictNativeVideoControls(),this.htmlElement.poster=document.createElement("img"),this.htmlElement.poster.id=this.internal.poster.id,this.htmlElement.poster.onload=function(){(!c.status.video||c.status.waitForPlay)&&c.internal.poster.jq.show()},this.element.append(this.htmlElement.poster),this.internal.poster.jq=a("#"+this.internal.poster.id),this.internal.poster.jq.css({width:this.status.width,height:this.status.height}),this.internal.poster.jq.hide(),this.internal.poster.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)}),this.html.audio.available=!1,this.require.audio&&(this.htmlElement.audio=document.createElement("audio"),this.htmlElement.audio.id=this.internal.audio.id,this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)),this.html.video.available=!1,this.require.video&&(this.htmlElement.video=document.createElement("video"),this.htmlElement.video.id=this.internal.video.id,this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)),this.flash.available=this._checkForFlash(10.1),this.html.canPlay={},this.aurora.canPlay={},this.flash.canPlay={},a.each(this.formats,function(b,d){c.html.canPlay[d]=c.html[c.format[d].media].available&&""!==c.htmlElement[c.format[d].media].canPlayType(c.format[d].codec),c.aurora.canPlay[d]=a.inArray(d,c.aurora.formats)>-1,c.flash.canPlay[d]=c.format[d].flashCanPlay&&c.flash.available}),this.html.desired=!1,this.aurora.desired=!1,this.flash.desired=!1,a.each(this.solutions,function(b,d){if(0===b)c[d].desired=!0;else{var e=!1,f=!1;a.each(c.formats,function(a,b){c[c.solutions[0]].canPlay[b]&&("video"===c.format[b].media?f=!0:e=!0)}),c[d].desired=c.require.audio&&!e||c.require.video&&!f}}),this.html.support={},this.aurora.support={},this.flash.support={},a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired,c.aurora.support[b]=c.aurora.canPlay[b]&&c.aurora.desired,c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired}),this.html.used=!1,this.aurora.used=!1,this.flash.used=!1,a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){return c[d].support[b]?(c[d].used=!0,!1):void 0})}),this._resetActive(),this._resetGate(),this._cssSelectorAncestor(this.options.cssSelectorAncestor),this.html.used||this.aurora.used||this.flash.used?this.css.jq.noSolution.length&&this.css.jq.noSolution.hide():(this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION}),this.css.jq.noSolution.length&&this.css.jq.noSolution.show()),this.flash.used){var d,e="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+"&muted="+this.options.muted;if(a.jPlayer.browser.msie&&(Number(a.jPlayer.browser.version)<9||a.jPlayer.browser.documentMode<9)){var f='<object id="'+this.internal.flash.id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="0" height="0" tabindex="-1"></object>',g=['<param name="movie" value="'+this.internal.flash.swf+'" />','<param name="FlashVars" value="'+e+'" />','<param name="allowScriptAccess" value="always" />','<param name="bgcolor" value="'+this.options.backgroundColor+'" />','<param name="wmode" value="'+this.options.wmode+'" />'];d=document.createElement(f);for(var h=0;h<g.length;h++)d.appendChild(document.createElement(g[h]))}else{var i=function(a,b,c){var d=document.createElement("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)};d=document.createElement("object"),d.setAttribute("id",this.internal.flash.id),d.setAttribute("name",this.internal.flash.id),d.setAttribute("data",this.internal.flash.swf),d.setAttribute("type","application/x-shockwave-flash"),d.setAttribute("width","1"),d.setAttribute("height","1"),d.setAttribute("tabindex","-1"),i(d,"flashvars",e),i(d,"allowscriptaccess","always"),i(d,"bgcolor",this.options.backgroundColor),i(d,"wmode",this.options.wmode)}this.element.append(d),this.internal.flash.jq=a(d)}this.status.playbackRateEnabled=this.html.used&&!this.flash.used?this._testPlaybackRate("audio"):!1,this._updatePlaybackRate(),this.html.used&&(this.html.audio.available&&(this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio),this.element.append(this.htmlElement.audio),this.internal.audio.jq=a("#"+this.internal.audio.id)),this.html.video.available&&(this._addHtmlEventListeners(this.htmlElement.video,this.html.video),this.element.append(this.htmlElement.video),this.internal.video.jq=a("#"+this.internal.video.id),this.internal.video.jq.css(this.status.nativeVideoControls?{width:this.status.width,height:this.status.height}:{width:"0px",height:"0px"}),this.internal.video.jq.bind("click.jPlayer",function(){c._trigger(a.jPlayer.event.click)}))),this.aurora.used,this.options.emulateHtml&&this._emulateHtmlBridge(),!this.html.used&&!this.aurora.used||this.flash.used||setTimeout(function(){c.internal.ready=!0,c.version.flash="n/a",c._trigger(a.jPlayer.event.repeat),c._trigger(a.jPlayer.event.ready)},100),this._updateNativeVideoControls(),this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),a.jPlayer.prototype.count++},destroy:function(){this.clearMedia(),this._removeUiClass(),this.css.jq.currentTime.length&&this.css.jq.currentTime.text(""),this.css.jq.duration.length&&this.css.jq.duration.text(""),a.each(this.css.jq,function(a,b){b.length&&b.unbind(".jPlayer")}),this.internal.poster.jq.unbind(".jPlayer"),this.internal.video.jq&&this.internal.video.jq.unbind(".jPlayer"),this._fullscreenRemoveEventListeners(),this===a.jPlayer.focus&&(a.jPlayer.focus=null),this.options.emulateHtml&&this._destroyHtmlBridge(),this.element.removeData("jPlayer"),this.element.unbind(".jPlayer"),this.element.empty(),delete this.instances[this.internal.instance]},destroyRemoved:function(){var b=this;a.each(this.instances,function(a,c){b.element!==c&&(c.data("jPlayer")||(c.jPlayer("destroy"),delete b.instances[a]))})},enable:function(){},disable:function(){},_testCanPlayType:function(a){try{return a.canPlayType(this.format.mp3.codec),!0}catch(b){return!1}},_testPlaybackRate:function(a){var b,c=.5;a="string"==typeof a?a:"audio",b=document.createElement(a);try{return"playbackRate"in b?(b.playbackRate=c,b.playbackRate===c):!1}catch(d){return!1}},_uaBlocklist:function(b){var c=navigator.userAgent.toLowerCase(),d=!1;return a.each(b,function(a,b){return b&&b.test(c)?(d=!0,!1):void 0}),d},_restrictNativeVideoControls:function(){this.require.audio&&this.status.nativeVideoControls&&(this.status.nativeVideoControls=!1,this.status.noFullWindow=!0)},_updateNativeVideoControls:function(){this.html.video.available&&this.html.used&&(this.htmlElement.video.controls=this.status.nativeVideoControls,this._updateAutohide(),this.status.nativeVideoControls&&this.require.video?(this.internal.poster.jq.hide(),this.internal.video.jq.css({width:this.status.width,height:this.status.height})):this.status.waitForPlay&&this.status.video&&(this.internal.poster.jq.show(),this.internal.video.jq.css({width:"0px",height:"0px"})))},_addHtmlEventListeners:function(b,c){var d=this;b.preload=this.options.preload,b.muted=this.options.muted,b.volume=this.options.volume,this.status.playbackRateEnabled&&(b.defaultPlaybackRate=this.options.defaultPlaybackRate,b.playbackRate=this.options.playbackRate),b.addEventListener("progress",function(){c.gate&&(d.internal.cmdsIgnored&&this.readyState>0&&(d.internal.cmdsIgnored=!1),d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress))},!1),b.addEventListener("loadeddata",function(){c.gate&&(d.androidFix.setMedia=!1,d.androidFix.play&&(d.androidFix.play=!1,d.play(d.androidFix.time)),d.androidFix.pause&&(d.androidFix.pause=!1,d.pause(d.androidFix.time)),d._trigger(a.jPlayer.event.loadeddata))},!1),b.addEventListener("timeupdate",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.timeupdate))},!1),b.addEventListener("durationchange",function(){c.gate&&(d._getHtmlStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.addEventListener("play",function(){c.gate&&(d._updateButtons(!0),d._html_checkWaitForPlay(),d._trigger(a.jPlayer.event.play))},!1),b.addEventListener("playing",function(){c.gate&&(d._updateButtons(!0),d._seeked(),d._trigger(a.jPlayer.event.playing))},!1),b.addEventListener("pause",function(){c.gate&&(d._updateButtons(!1),d._trigger(a.jPlayer.event.pause))},!1),b.addEventListener("waiting",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.waiting))},!1),b.addEventListener("seeking",function(){c.gate&&(d._seeking(),d._trigger(a.jPlayer.event.seeking))},!1),b.addEventListener("seeked",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.seeked))},!1),b.addEventListener("volumechange",function(){c.gate&&(d.options.volume=b.volume,d.options.muted=b.muted,d._updateMute(),d._updateVolume(),d._trigger(a.jPlayer.event.volumechange))},!1),b.addEventListener("ratechange",function(){c.gate&&(d.options.defaultPlaybackRate=b.defaultPlaybackRate,d.options.playbackRate=b.playbackRate,d._updatePlaybackRate(),d._trigger(a.jPlayer.event.ratechange))},!1),b.addEventListener("suspend",function(){c.gate&&(d._seeked(),d._trigger(a.jPlayer.event.suspend))},!1),b.addEventListener("ended",function(){c.gate&&(a.jPlayer.browser.webkit||(d.htmlElement.media.currentTime=0),d.htmlElement.media.pause(),d._updateButtons(!1),d._getHtmlStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.addEventListener("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(clearTimeout(d.internal.htmlDlyCmdId),d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1),a.each(a.jPlayer.htmlEvent,function(e,f){b.addEventListener(this,function(){c.gate&&d._trigger(a.jPlayer.event[f])},!1)})},_addAuroraEventListeners:function(b,c){var d=this;b.volume=100*this.options.volume,b.on("progress",function(){c.gate&&(d.internal.cmdsIgnored&&this.readyState>0&&(d.internal.cmdsIgnored=!1),d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.progress),b.duration>0&&d._trigger(a.jPlayer.event.timeupdate))},!1),b.on("ready",function(){c.gate&&d._trigger(a.jPlayer.event.loadeddata)},!1),b.on("duration",function(){c.gate&&(d._getAuroraStatus(b),d._updateInterface(),d._trigger(a.jPlayer.event.durationchange))},!1),b.on("end",function(){c.gate&&(d._updateButtons(!1),d._getAuroraStatus(b,!0),d._updateInterface(),d._trigger(a.jPlayer.event.ended))},!1),b.on("error",function(){c.gate&&(d._updateButtons(!1),d._seeked(),d.status.srcSet&&(d.status.waitForLoad=!0,d.status.waitForPlay=!0,d.status.video&&!d.status.nativeVideoControls&&d.internal.video.jq.css({width:"0px",height:"0px"}),d._validString(d.status.media.poster)&&!d.status.nativeVideoControls&&d.internal.poster.jq.show(),d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show(),d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})))},!1)},_getHtmlStatus:function(a,b){var c=0,d=0,e=0,f=0;isFinite(a.duration)&&(this.status.duration=a.duration),c=a.currentTime,d=this.status.duration>0?100*c/this.status.duration:0,"object"==typeof a.seekable&&a.seekable.length>0?(e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100,f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=a.readyState,this.status.networkState=a.networkState,this.status.playbackRate=a.playbackRate,this.status.ended=a.ended},_getAuroraStatus:function(a,b){var c=0,d=0,e=0,f=0;this.status.duration=a.duration/1e3,c=a.currentTime/1e3,d=this.status.duration>0?100*c/this.status.duration:0,a.buffered>0?(e=this.status.duration>0?a.buffered*this.status.duration/this.status.duration:100,f=this.status.duration>0?c/(a.buffered*this.status.duration):0):(e=100,f=d),b&&(c=0,f=0,d=0),this.status.seekPercent=e,this.status.currentPercentRelative=f,this.status.currentPercentAbsolute=d,this.status.currentTime=c,this.status.remaining=this.status.duration-this.status.currentTime,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_resetStatus:function(){this.status=a.extend({},this.status,a.jPlayer.prototype.status)},_trigger:function(b,c,d){var e=a.Event(b);e.jPlayer={},e.jPlayer.version=a.extend({},this.version),e.jPlayer.options=a.extend(!0,{},this.options),e.jPlayer.status=a.extend(!0,{},this.status),e.jPlayer.html=a.extend(!0,{},this.html),e.jPlayer.aurora=a.extend(!0,{},this.aurora),e.jPlayer.flash=a.extend(!0,{},this.flash),c&&(e.jPlayer.error=a.extend({},c)),d&&(e.jPlayer.warning=a.extend({},d)),this.element.trigger(e)},jPlayerFlashEvent:function(b,c){if(b===a.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media),this.volumeWorker(this.options.volume),d>0&&(e?this.pause(d):this.play(d))}this._trigger(a.jPlayer.event.flashreset)}}else this.internal.ready=!0,this.internal.flash.jq.css({width:"0px",height:"0px"}),this.version.flash=c.version,this.version.needFlash!==this.version.flash&&this._error({type:a.jPlayer.error.VERSION,context:this.version.flash,message:a.jPlayer.errorMsg.VERSION+this.version.flash,hint:a.jPlayer.errorHint.VERSION}),this._trigger(a.jPlayer.event.repeat),this._trigger(b);if(this.flash.gate)switch(b){case a.jPlayer.event.progress:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.timeupdate:this._getFlashStatus(c),this._updateInterface(),this._trigger(b);break;case a.jPlayer.event.play:this._seeked(),this._updateButtons(!0),this._trigger(b);break;case a.jPlayer.event.pause:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.ended:this._updateButtons(!1),this._trigger(b);break;case a.jPlayer.event.click:this._trigger(b);break;case a.jPlayer.event.error:this.status.waitForLoad=!0,this.status.waitForPlay=!0,this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"}),this._validString(this.status.media.poster)&&this.internal.poster.jq.show(),this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show(),this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media),this._updateButtons(!1),this._error({type:a.jPlayer.error.URL,context:c.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL});break;case a.jPlayer.event.seeking:this._seeking(),this._trigger(b);break;case a.jPlayer.event.seeked:this._seeked(),this._trigger(b);break;case a.jPlayer.event.ready:break;default:this._trigger(b)}return!1},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent,this.status.currentPercentRelative=a.currentPercentRelative,this.status.currentPercentAbsolute=a.currentPercentAbsolute,this.status.currentTime=a.currentTime,this.status.duration=a.duration,this.status.remaining=a.duration-a.currentTime,this.status.videoWidth=a.videoWidth,this.status.videoHeight=a.videoHeight,this.status.readyState=4,this.status.networkState=0,this.status.playbackRate=1,this.status.ended=!1},_updateButtons:function(a){a===b?a=!this.status.paused:this.status.paused=!a,a?this.addStateClass("playing"):this.removeStateClass("playing"),!this.status.noFullWindow&&this.options.fullWindow?this.addStateClass("fullScreen"):this.removeStateClass("fullScreen"),this.options.loop?this.addStateClass("looped"):this.removeStateClass("looped"),this.css.jq.play.length&&this.css.jq.pause.length&&(a?(this.css.jq.play.hide(),this.css.jq.pause.show()):(this.css.jq.play.show(),this.css.jq.pause.hide())),this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length&&(this.status.noFullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.hide()):this.options.fullWindow?(this.css.jq.fullScreen.hide(),this.css.jq.restoreScreen.show()):(this.css.jq.fullScreen.show(),this.css.jq.restoreScreen.hide())),this.css.jq.repeat.length&&this.css.jq.repeatOff.length&&(this.options.loop?(this.css.jq.repeat.hide(),this.css.jq.repeatOff.show()):(this.css.jq.repeat.show(),this.css.jq.repeatOff.hide()))},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%"),this.css.jq.playBar.length&&(this.options.smoothPlayBar?this.css.jq.playBar.stop().animate({width:this.status.currentPercentAbsolute+"%"},250,"linear"):this.css.jq.playBar.width(this.status.currentPercentRelative+"%"));var a="";this.css.jq.currentTime.length&&(a=this._convertTime(this.status.currentTime),a!==this.css.jq.currentTime.text()&&this.css.jq.currentTime.text(this._convertTime(this.status.currentTime)));var b="",c=this.status.duration,d=this.status.remaining;this.css.jq.duration.length&&("string"==typeof this.status.media.duration?b=this.status.media.duration:("number"==typeof this.status.media.duration&&(c=this.status.media.duration,d=c-this.status.currentTime),b=this.options.remainingDuration?(d>0?"-":"")+this._convertTime(d):this._convertTime(c)),b!==this.css.jq.duration.text()&&this.css.jq.duration.text(b))},_convertTime:c.prototype.time,_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg"),this.addStateClass("seeking")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg"),this.removeStateClass("seeking")},_resetGate:function(){this.html.audio.gate=!1,this.html.video.gate=!1,this.aurora.gate=!1,this.flash.gate=!1},_resetActive:function(){this.html.active=!1,this.aurora.active=!1,this.flash.active=!1},_escapeHtml:function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")},_qualifyURL:function(a){var b=document.createElement("div");
182return b.innerHTML='<a href="'+this._escapeHtml(a)+'">x</a>',b.firstChild.href},_absoluteMediaUrls:function(b){var c=this;return a.each(b,function(a,d){d&&c.format[a]&&"data:"!==d.substr(0,5)&&(b[a]=c._qualifyURL(d))}),b},addStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.addClass(this.options.stateClass[a])},removeStateClass:function(a){this.ancestorJq.length&&this.ancestorJq.removeClass(this.options.stateClass[a])},setMedia:function(b){var c=this,d=!1,e=this.status.media.poster!==b.poster;this._resetMedia(),this._resetGate(),this._resetActive(),this.androidFix.setMedia=!1,this.androidFix.play=!1,this.androidFix.pause=!1,b=this._absoluteMediaUrls(b),a.each(this.formats,function(e,f){var g="video"===c.format[f].media;return a.each(c.solutions,function(e,h){if(c[h].support[f]&&c._validString(b[f])){var i="html"===h,j="aurora"===h;return g?(i?(c.html.video.gate=!0,c._html_setVideo(b),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show(),c.status.video=!0):(i?(c.html.audio.gate=!0,c._html_setAudio(b),c.html.active=!0,a.jPlayer.platform.android&&(c.androidFix.setMedia=!0)):j?(c.aurora.gate=!0,c._aurora_setAudio(b),c.aurora.active=!0):(c.flash.gate=!0,c._flash_setAudio(b),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1),d=!0,!1}}),d?!1:void 0}),d?(this.status.nativeVideoControls&&this.html.video.gate||this._validString(b.poster)&&(e?this.htmlElement.poster.src=b.poster:this.internal.poster.jq.show()),"string"==typeof b.title&&(this.css.jq.title.length&&this.css.jq.title.html(b.title),this.htmlElement.audio&&this.htmlElement.audio.setAttribute("title",b.title),this.htmlElement.video&&this.htmlElement.video.setAttribute("title",b.title)),this.status.srcSet=!0,this.status.media=a.extend({},b),this._updateButtons(!1),this._updateInterface(),this._trigger(a.jPlayer.event.setmedia)):this._error({type:a.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SUPPORT,hint:a.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus(),this._updateButtons(!1),this._updateInterface(),this._seeked(),this.internal.poster.jq.hide(),clearTimeout(this.internal.htmlDlyCmdId),this.html.active?this._html_resetMedia():this.aurora.active?this._aurora_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia(),this.html.active?this._html_clearMedia():this.aurora.active?this._aurora_clearMedia():this.flash.active&&this._flash_clearMedia(),this._resetGate(),this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.aurora.active?this._aurora_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(a.jPlayer.focus=this)},play:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&!this.status.paused?this.pause(a):(a="number"==typeof a?a:0/0,this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.aurora.active?this._aurora_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play"))},videoPlay:function(){this.play()},pause:function(a){a="number"==typeof a?a:0/0,this.status.srcSet?this.html.active?this._html_pause(a):this.aurora.active?this._aurora_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(b,c){var d=this,e="function"==typeof c,f=Array.prototype.slice.call(arguments);"string"==typeof b&&(e&&f.splice(1,1),a.jPlayer.prototype.destroyRemoved(),a.each(this.instances,function(){d.element!==this&&(!e||c.call(this.data("jPlayer"),d))&&this.jPlayer.apply(this,f)}))},pauseOthers:function(a){this.tellOthers("pause",function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.aurora.active?this._aurora_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100),this.status.srcSet?this.html.active?this._html_playHead(a):this.aurora.active?this._aurora_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a),this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume},a)},mutedWorker:function(b){this.options.muted=b,this.html.used&&this._html_setProperty("muted",b),this.aurora.used&&this._aurora_mute(b),this.flash.used&&this._flash_mute(b),this.html.video.gate||this.html.audio.gate||(this._updateMute(b),this._updateVolume(this.options.volume),this._trigger(a.jPlayer.event.volumechange))},mute:function(a){var c="object"==typeof a;c&&this.options.useStateClassSkin&&this.options.muted?this._muted(!1):(a=a===b?!0:!!a,this._muted(a))},unmute:function(a){a=a===b?!0:!!a,this._muted(!a)},_updateMute:function(a){a===b&&(a=this.options.muted),a?this.addStateClass("muted"):this.removeStateClass("muted"),this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume?(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a),this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(b){b=this._limitValue(b,0,1),this.options.volume=b,this.html.used&&this._html_setProperty("volume",b),this.aurora.used&&this._aurora_volume(b),this.flash.used&&this._flash_volume(b),this.html.video.gate||this.html.audio.gate||(this._updateVolume(b),this._trigger(a.jPlayer.event.volumechange))},volumeBar:function(b){if(this.css.jq.volumeBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=c.height()-b.pageY+d.top,h=c.height();this.volume(this.options.verticalVolume?g/h:e/f)}this.options.muted&&this._muted(!1)},_updateVolume:function(a){a===b&&(a=this.options.volume),a=this.options.muted?0:a,this.status.noVolume?(this.addStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(),this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.removeStateClass("noVolume"),this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1),this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(b){var c=this;this.options.cssSelectorAncestor=b,this._removeUiClass(),this.ancestorJq=b?a(b):[],b&&1!==this.ancestorJq.length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT}),this._addUiClass(),a.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)}),this._updateInterface(),this._updateButtons(),this._updateAutohide(),this._updateVolume(),this._updateMute()},_cssSelector:function(b,c){var d=this;if("string"==typeof c)if(a.jPlayer.prototype.options.cssSelector[b]){if(this.css.jq[b]&&this.css.jq[b].length&&this.css.jq[b].unbind(".jPlayer"),this.options.cssSelector[b]=c,this.css.cs[b]=this.options.cssSelectorAncestor+" "+c,this.css.jq[b]=c?a(this.css.cs[b]):[],this.css.jq[b].length&&this[b]){var e=function(c){c.preventDefault(),d[b](c),d.options.autoBlur?a(this).blur():a(this).focus()};this.css.jq[b].bind("click.jPlayer",e)}c&&1!==this.css.jq[b].length&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[b],message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[b].length+" found for "+b+" method.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_METHOD,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:a.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:a.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:a.jPlayer.warningHint.CSS_SELECTOR_STRING})},duration:function(a){this.options.toggleDuration&&(this.options.captureDuration&&a.stopPropagation(),this._setOption("remainingDuration",!this.options.remainingDuration))},seekBar:function(b){if(this.css.jq.seekBar.length){var c=a(b.currentTarget),d=c.offset(),e=b.pageX-d.left,f=c.width(),g=100*e/f;this.playHead(g)}},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(b){if(this.css.jq.playbackRateBar.length){var c,d,e=a(b.currentTarget),f=e.offset(),g=b.pageX-f.left,h=e.width(),i=e.height()-b.pageY+f.top,j=e.height();c=this.options.verticalPlaybackRate?i/j:g/h,d=c*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+this.options.minPlaybackRate,this.playbackRate(d)}},_updatePlaybackRate:function(){var a=this.options.playbackRate,b=(a-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*b+"%"))):(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(a){var b="object"==typeof a;this._loop(b&&this.options.useStateClassSkin&&this.options.loop?!1:!0)},repeatOff:function(){this._loop(!1)},_loop:function(b){this.options.loop!==b&&(this.options.loop=b,this._updateButtons(),this._trigger(a.jPlayer.event.repeat))},option:function(c,d){var e=c;if(0===arguments.length)return a.extend(!0,{},this.options);if("string"==typeof c){var f=c.split(".");if(d===b){for(var g=a.extend(!0,{},this.options),h=0;h<f.length;h++){if(g[f[h]]===b)return this._warning({type:a.jPlayer.warning.OPTION_KEY,context:c,message:a.jPlayer.warningMsg.OPTION_KEY,hint:a.jPlayer.warningHint.OPTION_KEY}),b;g=g[f[h]]}return g}e={};for(var i=e,j=0;j<f.length;j++)j<f.length-1?(i[f[j]]={},i=i[f[j]]):i[f[j]]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(b,c){var d=this;switch(b){case"volume":this.volume(c);break;case"muted":this._muted(c);break;case"globalVolume":this.options[b]=c;break;case"cssSelectorAncestor":this._cssSelectorAncestor(c);break;case"cssSelector":a.each(c,function(a,b){d._cssSelector(a,b)});break;case"playbackRate":this.options[b]=c=this._limitValue(c,this.options.minPlaybackRate,this.options.maxPlaybackRate),this.html.used&&this._html_setProperty("playbackRate",c),this._updatePlaybackRate();break;case"defaultPlaybackRate":this.options[b]=c=this._limitValue(c,this.options.minPlaybackRate,this.options.maxPlaybackRate),this.html.used&&this._html_setProperty("defaultPlaybackRate",c),this._updatePlaybackRate();break;case"minPlaybackRate":this.options[b]=c=this._limitValue(c,.1,this.options.maxPlaybackRate-.1),this._updatePlaybackRate();break;case"maxPlaybackRate":this.options[b]=c=this._limitValue(c,this.options.minPlaybackRate+.1,16),this._updatePlaybackRate();break;case"fullScreen":if(this.options[b]!==c){var e=a.jPlayer.nativeFeatures.fullscreen.used.webkitVideo;(!e||e&&!this.status.waitForPlay)&&(e||(this.options[b]=c),c?this._requestFullscreen():this._exitFullscreen(),e||this._setOption("fullWindow",c))}break;case"fullWindow":this.options[b]!==c&&(this._removeUiClass(),this.options[b]=c,this._refreshSize());break;case"size":this.options.fullWindow||this.options[b].cssClass===c.cssClass||this._removeUiClass(),this.options[b]=a.extend({},this.options[b],c),this._refreshSize();break;case"sizeFull":this.options.fullWindow&&this.options[b].cssClass!==c.cssClass&&this._removeUiClass(),this.options[b]=a.extend({},this.options[b],c),this._refreshSize();break;case"autohide":this.options[b]=a.extend({},this.options[b],c),this._updateAutohide();break;case"loop":this._loop(c);break;case"remainingDuration":this.options[b]=c,this._updateInterface();break;case"toggleDuration":this.options[b]=c;break;case"nativeVideoControls":this.options[b]=a.extend({},this.options[b],c),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this._restrictNativeVideoControls(),this._updateNativeVideoControls();break;case"noFullWindow":this.options[b]=a.extend({},this.options[b],c),this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls),this.status.noFullWindow=this._uaBlocklist(this.options.noFullWindow),this._restrictNativeVideoControls(),this._updateButtons();break;case"noVolume":this.options[b]=a.extend({},this.options[b],c),this.status.noVolume=this._uaBlocklist(this.options.noVolume),this._updateVolume(),this._updateMute();break;case"emulateHtml":this.options[b]!==c&&(this.options[b]=c,c?this._emulateHtmlBridge():this._destroyHtmlBridge());break;case"timeFormat":this.options[b]=a.extend({},this.options[b],c);break;case"keyEnabled":this.options[b]=c,c||this!==a.jPlayer.focus||(a.jPlayer.focus=null);break;case"keyBindings":this.options[b]=a.extend(!0,{},this.options[b],c);break;case"audioFullScreen":this.options[b]=c;break;case"autoBlur":this.options[b]=c}return this},_refreshSize:function(){this._setSize(),this._addUiClass(),this._updateSize(),this._updateButtons(),this._updateAutohide(),this._trigger(a.jPlayer.event.resize)},_setSize:function(){this.options.fullWindow?(this.status.width=this.options.sizeFull.width,this.status.height=this.options.sizeFull.height,this.status.cssClass=this.options.sizeFull.cssClass):(this.status.width=this.options.size.width,this.status.height=this.options.size.height,this.status.cssClass=this.options.size.cssClass),this.element.css({width:this.status.width,height:this.status.height})},_addUiClass:function(){this.ancestorJq.length&&this.ancestorJq.addClass(this.status.cssClass)},_removeUiClass:function(){this.ancestorJq.length&&this.ancestorJq.removeClass(this.status.cssClass)},_updateSize:function(){this.internal.poster.jq.css({width:this.status.width,height:this.status.height}),!this.status.waitForPlay&&this.html.active&&this.status.video||this.html.video.available&&this.html.used&&this.status.nativeVideoControls?this.internal.video.jq.css({width:this.status.width,height:this.status.height}):!this.status.waitForPlay&&this.flash.active&&this.status.video&&this.internal.flash.jq.css({width:this.status.width,height:this.status.height})},_updateAutohide:function(){var a=this,b="mousemove.jPlayer",c=".jPlayerAutohide",d=b+c,e=function(b){var c,d,e=!1;"undefined"!=typeof a.internal.mouse?(c=a.internal.mouse.x-b.pageX,d=a.internal.mouse.y-b.pageY,e=Math.floor(c)>0||Math.floor(d)>0):e=!0,a.internal.mouse={x:b.pageX,y:b.pageY},e&&a.css.jq.gui.fadeIn(a.options.autohide.fadeIn,function(){clearTimeout(a.internal.autohideId),a.internal.autohideId=setTimeout(function(){a.css.jq.gui.fadeOut(a.options.autohide.fadeOut)},a.options.autohide.hold)})};this.css.jq.gui.length&&(this.css.jq.gui.stop(!0,!0),clearTimeout(this.internal.autohideId),delete this.internal.mouse,this.element.unbind(c),this.css.jq.gui.unbind(c),this.status.nativeVideoControls?this.css.jq.gui.hide():this.options.fullWindow&&this.options.autohide.full||!this.options.fullWindow&&this.options.autohide.restored?(this.element.bind(d,e),this.css.jq.gui.bind(d,e),this.css.jq.gui.hide()):this.css.jq.gui.show())},fullScreen:function(a){var b="object"==typeof a;b&&this.options.useStateClassSkin&&this.options.fullScreen?this._setOption("fullScreen",!1):this._setOption("fullScreen",!0)},restoreScreen:function(){this._setOption("fullScreen",!1)},_fullscreenAddEventListeners:function(){var b=this,c=a.jPlayer.nativeFeatures.fullscreen;c.api.fullscreenEnabled&&c.event.fullscreenchange&&("function"!=typeof this.internal.fullscreenchangeHandler&&(this.internal.fullscreenchangeHandler=function(){b._fullscreenchange()}),document.addEventListener(c.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1))},_fullscreenRemoveEventListeners:function(){var b=a.jPlayer.nativeFeatures.fullscreen;this.internal.fullscreenchangeHandler&&document.removeEventListener(b.event.fullscreenchange,this.internal.fullscreenchangeHandler,!1)},_fullscreenchange:function(){this.options.fullScreen&&!a.jPlayer.nativeFeatures.fullscreen.api.fullscreenElement()&&this._setOption("fullScreen",!1)},_requestFullscreen:function(){var b=this.ancestorJq.length?this.ancestorJq[0]:this.element[0],c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.requestFullscreen(b)},_exitFullscreen:function(){var b,c=a.jPlayer.nativeFeatures.fullscreen;c.used.webkitVideo&&(b=this.htmlElement.video),c.api.fullscreenEnabled&&c.api.exitFullscreen(b)},_html_initMedia:function(b){var c=a(this.htmlElement.media).empty();a.each(b.track||[],function(a,b){var d=document.createElement("track");d.setAttribute("kind",b.kind?b.kind:""),d.setAttribute("src",b.src?b.src:""),d.setAttribute("srclang",b.srclang?b.srclang:""),d.setAttribute("label",b.label?b.label:""),b.def&&d.setAttribute("default",b.def),c.append(d)}),this.htmlElement.media.src=this.status.src,"none"!==this.options.preload&&this._html_load(),this._trigger(a.jPlayer.event.timeupdate)},_html_setFormat:function(b){var c=this;a.each(this.formats,function(a,d){return c.html.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0})},_html_setAudio:function(a){this._html_setFormat(a),this.htmlElement.media=this.htmlElement.audio,this._html_initMedia(a)},_html_setVideo:function(a){this._html_setFormat(a),this.status.nativeVideoControls&&(this.htmlElement.video.poster=this._validString(a.poster)?a.poster:""),this.htmlElement.media=this.htmlElement.video,this._html_initMedia(a)},_html_resetMedia:function(){this.htmlElement.media&&(this.htmlElement.media.id!==this.internal.video.id||this.status.nativeVideoControls||this.internal.video.jq.css({width:"0px",height:"0px"}),this.htmlElement.media.pause())},_html_clearMedia:function(){this.htmlElement.media&&(this.htmlElement.media.src="about:blank",this.htmlElement.media.load())},_html_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.htmlElement.media.load()),clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.pause=!1,this._html_load(),this.androidFix.setMedia)this.androidFix.play=!0,this.androidFix.time=a;else if(isNaN(a))c.play();else{this.internal.cmdsIgnored&&c.play();try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a,c.play()}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},250))}}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this,c=this.htmlElement.media;if(this.androidFix.play=!1,a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId),c.pause(),this.androidFix.setMedia)this.androidFix.pause=!0,this.androidFix.time=a;else if(!isNaN(a))try{if(c.seekable&&!("object"==typeof c.seekable&&c.seekable.length>0))throw 1;c.currentTime=a}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},250))}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this,c=this.htmlElement.media;this._html_load();try{if("object"==typeof c.seekable&&c.seekable.length>0)c.currentTime=a*c.seekable.end(c.seekable.length-1)/100;else{if(!(c.duration>0)||isNaN(c.duration))throw"e";c.currentTime=a*c.duration/100}}catch(d){return void(this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},250))}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.video.jq.css({width:this.status.width,height:this.status.height})))},_html_setProperty:function(a,b){this.html.audio.available&&(this.htmlElement.audio[a]=b),this.html.video.available&&(this.htmlElement.video[a]=b)},_aurora_setAudio:function(b){var c=this;a.each(this.formats,function(a,d){return c.aurora.support[d]&&b[d]?(c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1):void 0}),this.aurora.player=new AV.Player.fromURL(this.status.src),this._addAuroraEventListeners(this.aurora.player,this.aurora),"auto"===this.options.preload&&(this._aurora_load(),this.status.waitForLoad=!1)},_aurora_resetMedia:function(){this.aurora.player&&this.aurora.player.stop()},_aurora_clearMedia:function(){},_aurora_load:function(){this.status.waitForLoad&&(this.status.waitForLoad=!1,this.aurora.player.preload())},_aurora_play:function(b){this.status.waitForLoad||isNaN(b)||this.aurora.player.seek(b),this.aurora.player.playing||this.aurora.player.play(),this.status.waitForLoad=!1,this._aurora_checkWaitForPlay(),this._updateButtons(!0),this._trigger(a.jPlayer.event.play)},_aurora_pause:function(b){isNaN(b)||this.aurora.player.seek(1e3*b),this.aurora.player.pause(),b>0&&this._aurora_checkWaitForPlay(),this._updateButtons(!1),this._trigger(a.jPlayer.event.pause)},_aurora_playHead:function(a){this.aurora.player.duration>0&&this.aurora.player.seek(a*this.aurora.player.duration/100),this.status.waitForLoad||this._aurora_checkWaitForPlay()},_aurora_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1)},_aurora_volume:function(a){this.aurora.player.volume=100*a},_aurora_mute:function(a){a?(this.aurora.properties.lastvolume=this.aurora.player.volume,this.aurora.player.volume=0):this.aurora.player.volume=this.aurora.properties.lastvolume,this.aurora.properties.muted=a},_flash_setAudio:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4a":case"fla":c._getMovie().fl_setAudio_m4a(b[d]);break;case"mp3":c._getMovie().fl_setAudio_mp3(b[d]);break;case"rtmpa":c._getMovie().fl_setAudio_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_setVideo:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4v":case"flv":c._getMovie().fl_setVideo_m4v(b[d]);break;case"rtmpv":c._getMovie().fl_setVideo_rtmp(b[d])}return c.status.src=b[d],c.status.format[d]=!0,c.status.formatType=d,!1}}),"auto"===this.options.preload&&(this._flash_load(),this.status.waitForLoad=!1)}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"}),this._flash_pause(0/0)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=!1},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=!1,this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}a>0&&(this.status.waitForLoad=!1,this._flash_checkWaitForPlay())},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){this.status.waitForPlay&&(this.status.waitForPlay=!1,this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide(),this.status.video&&(this.internal.poster.jq.hide(),this.internal.flash.jq.css({width:this.status.width,height:this.status.height})))},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_getFlashPluginVersion:function(){var a,b=0;if(window.ActiveXObject)try{if(a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){var c=a.GetVariable("$version");c&&(c=c.split(" ")[1].split(","),b=parseInt(c[0],10)+"."+parseInt(c[1],10))}}catch(d){}else navigator.plugins&&navigator.mimeTypes.length>0&&(a=navigator.plugins["Shockwave Flash"],a&&(b=navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")));return 1*b},_checkForFlash:function(a){var b=!1;return this._getFlashPluginVersion()>=a&&(b=!0),b},_validString:function(a){return a&&"string"==typeof a},_limitValue:function(a,b,c){return b>a?b:a>c?c:a},_urlNotSetError:function(b){this._error({type:a.jPlayer.error.URL_NOT_SET,context:b,message:a.jPlayer.errorMsg.URL_NOT_SET,hint:a.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(b){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH",this._error({type:a.jPlayer.error[c],context:this.internal.flash.swf,message:a.jPlayer.errorMsg[c]+b.message,hint:a.jPlayer.errorHint[c]}),this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(b){this._trigger(a.jPlayer.event.error,b),this.options.errorAlerts&&this._alert("Error!"+(b.message?"\n"+b.message:"")+(b.hint?"\n"+b.hint:"")+"\nContext: "+b.context)},_warning:function(c){this._trigger(a.jPlayer.event.warning,b,c),this.options.warningAlerts&&this._alert("Warning!"+(c.message?"\n"+c.message:"")+(c.hint?"\n"+c.hint:"")+"\nContext: "+c.context)},_alert:function(a){var b="jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a;this.options.consoleAlerts?window.console&&window.console.log&&window.console.log(b):alert(b)},_emulateHtmlBridge:function(){var b=this;a.each(a.jPlayer.emulateMethods.split(/\s+/g),function(a,c){b.internal.domNode[c]=function(a){b[c](a)}}),a.each(a.jPlayer.event,function(c,d){var e=!0;a.each(a.jPlayer.reservedEvent.split(/\s+/g),function(a,b){return b===c?(e=!1,!1):void 0}),e&&b.element.bind(d+".jPlayer.jPlayerHtml",function(){b._emulateHtmlUpdate();var a=document.createEvent("Event");a.initEvent(c,!1,!0),b.internal.domNode.dispatchEvent(a)})})},_emulateHtmlUpdate:function(){var b=this;a.each(a.jPlayer.emulateStatus.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.status[c]}),a.each(a.jPlayer.emulateOptions.split(/\s+/g),function(a,c){b.internal.domNode[c]=b.options[c]})},_destroyHtmlBridge:function(){var b=this;this.element.unbind(".jPlayerHtml");var c=a.jPlayer.emulateMethods+" "+a.jPlayer.emulateStatus+" "+a.jPlayer.emulateOptions;a.each(c.split(/\s+/g),function(a,c){delete b.internal.domNode[c]})}},a.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"},a.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+a.jPlayer.prototype.version.script+" needs Jplayer.swf version "+a.jPlayer.prototype.version.needFlash+" but found "},a.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."},a.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"},a.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."},a.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}});
vendor: 6,824 bytes, lines 182-195
182
183/*
184 *	jQuery dotdotdot 1.8.3
185 *
186 *	Copyright (c) Fred Heusschen
187 *	www.frebsite.nl
188 *
189 *	Plugin website:
190 *	dotdotdot.frebsite.nl
191 *
192 *	Licensed under the MIT license.
193 *	http://en.wikipedia.org/wiki/MIT_License
194 */
195!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var h=this,f=t(h);if("undefined"==typeof h)return!0;if(f.is(u))e.append(f);else{if(s)return!0;e.append(f),!l||f.is(d.after)||f.find(d.after).length||e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==h.nodeType?o(f,n,i,d,l):r(f,n,i,d,l)),s||l&&l.detach()}}),n.addClass("is-truncated"),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var h=s(c),f=-1!==h.indexOf(" ")?" ":" ",p="letter"==o.wrap?"":f,g=h.split(p),v=-1,w=-1,b=0,m=g.length-1;for(o.fallbackToLetter&&0==b&&0==m&&(p="",g=h.split(p),m=g.length-1);m>=b&&(0!=b||0!=m);){var y=Math.floor((b+m)/2);if(y==w)break;w=y,l(c,g.slice(0,w+1).join(p)+o.ellipsis),r.children().each(function(){t(this).toggle().toggle()}),a(r,o)?(m=w,o.fallbackToLetter&&0==b&&0==m&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,m=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var C=d&&d.closest(x).length?d.length:0;if(x.contents().length>C?c=u(x.contents().eq(-1-C),n):(c=u(x,n,!0),C||x.detach()),c&&(h=i(s(c),o),l(c,h),C&&d)){var T=d.parent();t(c).parent().append(d),t.trim(T.html())||T.remove()}}else h=i(g.slice(0,v+1).join(p),o),l(c,h);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function h(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function f(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this,i=o.contents();o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){switch(o.removeClass("is-truncated"),e.preventDefault(),e.stopPropagation(),typeof l.height){case"number":l.maxHeight=l.height;break;case"function":l.maxHeight=l.height.call(o[0]);break;default:l.maxHeight=f(o)}l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||"nodeType"in d&&1===d.nodeType)&&(d=t("<div />").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('<div class="dotdotdot" />').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith("  <br />  ").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setInterval(function(){if(o.is(":visible")){var t=d(o);c.width==t.width&&c.height==t.height||(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=h(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" "," ",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(t){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("<div />").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery),jQuery(document).ready(function(t){t(".dot-ellipsis").each(function(){var e=t(this).hasClass("dot-resize-update"),n=t(this).hasClass("dot-timer-update"),r=0,o=t(this).attr("class").split(/\s+/);t.each(o,function(t,e){var n=e.match(/^dot-height-(\d+)$/);null!==n&&(r=Number(n[1]))});var a=new Object;n&&(a.watch=!0),e&&(a.watch="window"),r>0&&(a.height=r),t(this).dotdotdot(a)})}),jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")});
vendor: 7,233 bytes, lines 195-435
195
196/* ========================================================================
197 * Bootstrap: carousel.js v3.3.7
198 * http://getbootstrap.com/javascript/#carousel
199 * ========================================================================
200 * Copyright 2011-2016 Twitter, Inc.
201 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
202 * ======================================================================== */
203
204
205+function ($) {
206  'use strict';
207
208  // CAROUSEL CLASS DEFINITION
209  // =========================
210
211  var Carousel = function (element, options) {
212    this.$element    = $(element)
213    this.$indicators = this.$element.find('.carousel-indicators')
214    this.options     = options
215    this.paused      = null
216    this.sliding     = null
217    this.interval    = null
218    this.$active     = null
219    this.$items      = null
220
221    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
222
223    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
224      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
225      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
226  }
227
228  Carousel.VERSION  = '3.3.7'
229
230  Carousel.TRANSITION_DURATION = 600
231
232  Carousel.DEFAULTS = {
233    interval: 5000,
234    pause: 'hover',
235    wrap: true,
236    keyboard: true
237  }
238
239  Carousel.prototype.keydown = function (e) {
240    if (/input|textarea/i.test(e.target.tagName)) return
241    switch (e.which) {
242      case 37: this.prev(); break
243      case 39: this.next(); break
244      default: return
245    }
246
247    e.preventDefault()
248  }
249
250  Carousel.prototype.cycle = function (e) {
251    e || (this.paused = false)
252
253    this.interval && clearInterval(this.interval)
254
255    this.options.interval
256      && !this.paused
257      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
258
259    return this
260  }
261
262  Carousel.prototype.getItemIndex = function (item) {
263    this.$items = item.parent().children('.item')
264    return this.$items.index(item || this.$active)
265  }
266
267  Carousel.prototype.getItemForDirection = function (direction, active) {
268    var activeIndex = this.getItemIndex(active)
269    var willWrap = (direction == 'prev' && activeIndex === 0)
270                || (direction == 'next' && activeIndex == (this.$items.length - 1))
271    if (willWrap && !this.options.wrap) return active
272    var delta = direction == 'prev' ? -1 : 1
273    var itemIndex = (activeIndex + delta) % this.$items.length
274    return this.$items.eq(itemIndex)
275  }
276
277  Carousel.prototype.to = function (pos) {
278    var that        = this
279    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
280
281    if (pos > (this.$items.length - 1) || pos < 0) return
282
283    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
284    if (activeIndex == pos) return this.pause().cycle()
285
286    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
287  }
288
289  Carousel.prototype.pause = function (e) {
290    e || (this.paused = true)
291
292    if (this.$element.find('.next, .prev').length && $.support.transition) {
293      this.$element.trigger($.support.transition.end)
294      this.cycle(true)
295    }
296
297    this.interval = clearInterval(this.interval)
298
299    return this
300  }
301
302  Carousel.prototype.next = function () {
303    if (this.sliding) return
304    return this.slide('next')
305  }
306
307  Carousel.prototype.prev = function () {
308    if (this.sliding) return
309    return this.slide('prev')
310  }
311
312  Carousel.prototype.slide = function (type, next) {
313    var $active   = this.$element.find('.item.active')
314    var $next     = next || this.getItemForDirection(type, $active)
315    var isCycling = this.interval
316    var direction = type == 'next' ? 'left' : 'right'
317    var that      = this
318
319    if ($next.hasClass('active')) return (this.sliding = false)
320
321    var relatedTarget = $next[0]
322    var slideEvent = $.Event('slide.bs.carousel', {
323      relatedTarget: relatedTarget,
324      direction: direction
325    })
326    this.$element.trigger(slideEvent)
327    if (slideEvent.isDefaultPrevented()) return
328
329    this.sliding = true
330
331    isCycling && this.pause()
332
333    if (this.$indicators.length) {
334      this.$indicators.find('.active').removeClass('active')
335      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
336      $nextIndicator && $nextIndicator.addClass('active')
337    }
338
339    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
340    if ($.support.transition && this.$element.hasClass('slide')) {
341      $next.addClass(type)
342      $next[0].offsetWidth // force reflow
343      $active.addClass(direction)
344      $next.addClass(direction)
345      $active
346        .one('bsTransitionEnd', function () {
347          $next.removeClass([type, direction].join(' ')).addClass('active')
348          $active.removeClass(['active', direction].join(' '))
349          that.sliding = false
350          setTimeout(function () {
351            that.$element.trigger(slidEvent)
352          }, 0)
353        })
354        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
355    } else {
356      $active.removeClass('active')
357      $next.addClass('active')
358      this.sliding = false
359      this.$element.trigger(slidEvent)
360    }
361
362    isCycling && this.cycle()
363
364    return this
365  }
366
367
368  // CAROUSEL PLUGIN DEFINITION
369  // ==========================
370
371  function Plugin(option) {
372    return this.each(function () {
373      var $this   = $(this)
374      var data    = $this.data('bs.carousel')
375      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
376      var action  = typeof option == 'string' ? option : options.slide
377
378      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
379      if (typeof option == 'number') data.to(option)
380      else if (action) data[action]()
381      else if (options.interval) data.pause().cycle()
382    })
383  }
384
385  var old = $.fn.carousel
386
387  $.fn.carousel             = Plugin
388  $.fn.carousel.Constructor = Carousel
389
390
391  // CAROUSEL NO CONFLICT
392  // ====================
393
394  $.fn.carousel.noConflict = function () {
395    $.fn.carousel = old
396    return this
397  }
398
399
400  // CAROUSEL DATA-API
401  // =================
402
403  var clickHandler = function (e) {
404    var href
405    var $this   = $(this)
406    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
407    if (!$target.hasClass('carousel')) return
408    var options = $.extend({}, $target.data(), $this.data())
409    var slideIndex = $this.attr('data-slide-to')
410    if (slideIndex) options.interval = false
411
412    Plugin.call($target, options)
413
414    if (slideIndex) {
415      $target.data('bs.carousel').to(slideIndex)
416    }
417
418    e.preventDefault()
419  }
420
421  $(document)
422    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
423    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
424
425  $(window).on('load', function () {
426    $('[data-ride="carousel"]').each(function () {
427      var $carousel = $(this)
428      Plugin.call($carousel, $carousel.data())
429    })
430  })
431
432}(jQuery);
433
434/* ========================================================================
435 * Bootstrap: 
vendor: 19,794 bytes, lines 435-1063
435tooltip.js v3.3.7
436 * http://getbootstrap.com/javascript/#tooltip
437 * Inspired by the original jQuery.tipsy by Jason Frame
438 * ========================================================================
439 * Copyright 2011-2016 Twitter, Inc.
440 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
441 * ======================================================================== */
442
443
444+function ($) {
445  'use strict';
446
447  // TOOLTIP PUBLIC CLASS DEFINITION
448  // ===============================
449
450  var Tooltip = function (element, options) {
451    this.type       = null
452    this.options    = null
453    this.enabled    = null
454    this.timeout    = null
455    this.hoverState = null
456    this.$element   = null
457    this.inState    = null
458
459    this.init('tooltip', element, options)
460  }
461
462  Tooltip.VERSION  = '3.3.7'
463
464  Tooltip.TRANSITION_DURATION = 150
465
466  Tooltip.DEFAULTS = {
467    animation: true,
468    placement: 'top',
469    selector: false,
470    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
471    trigger: 'hover focus',
472    title: '',
473    delay: 0,
474    html: false,
475    container: false,
476    viewport: {
477      selector: 'body',
478      padding: 0
479    }
480  }
481
482  Tooltip.prototype.init = function (type, element, options) {
483    this.enabled   = true
484    this.type      = type
485    this.$element  = $(element)
486    this.options   = this.getOptions(options)
487    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
488    this.inState   = { click: false, hover: false, focus: false }
489
490    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
491      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
492    }
493
494    var triggers = this.options.trigger.split(' ')
495
496    for (var i = triggers.length; i--;) {
497      var trigger = triggers[i]
498
499      if (trigger == 'click') {
500        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
501      } else if (trigger != 'manual') {
502        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
503        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
504
505        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
506        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
507      }
508    }
509
510    this.options.selector ?
511      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
512      this.fixTitle()
513  }
514
515  Tooltip.prototype.getDefaults = function () {
516    return Tooltip.DEFAULTS
517  }
518
519  Tooltip.prototype.getOptions = function (options) {
520    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
521
522    if (options.delay && typeof options.delay == 'number') {
523      options.delay = {
524        show: options.delay,
525        hide: options.delay
526      }
527    }
528
529    return options
530  }
531
532  Tooltip.prototype.getDelegateOptions = function () {
533    var options  = {}
534    var defaults = this.getDefaults()
535
536    this._options && $.each(this._options, function (key, value) {
537      if (defaults[key] != value) options[key] = value
538    })
539
540    return options
541  }
542
543  Tooltip.prototype.enter = function (obj) {
544    var self = obj instanceof this.constructor ?
545      obj : $(obj.currentTarget).data('bs.' + this.type)
546
547    if (!self) {
548      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
549      $(obj.currentTarget).data('bs.' + this.type, self)
550    }
551
552    if (obj instanceof $.Event) {
553      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
554    }
555
556    if (self.tip().hasClass('in') || self.hoverState == 'in') {
557      self.hoverState = 'in'
558      return
559    }
560
561    clearTimeout(self.timeout)
562
563    self.hoverState = 'in'
564
565    if (!self.options.delay || !self.options.delay.show) return self.show()
566
567    self.timeout = setTimeout(function () {
568      if (self.hoverState == 'in') self.show()
569    }, self.options.delay.show)
570  }
571
572  Tooltip.prototype.isInStateTrue = function () {
573    for (var key in this.inState) {
574      if (this.inState[key]) return true
575    }
576
577    return false
578  }
579
580  Tooltip.prototype.leave = function (obj) {
581    var self = obj instanceof this.constructor ?
582      obj : $(obj.currentTarget).data('bs.' + this.type)
583
584    if (!self) {
585      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
586      $(obj.currentTarget).data('bs.' + this.type, self)
587    }
588
589    if (obj instanceof $.Event) {
590      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
591    }
592
593    if (self.isInStateTrue()) return
594
595    clearTimeout(self.timeout)
596
597    self.hoverState = 'out'
598
599    if (!self.options.delay || !self.options.delay.hide) return self.hide()
600
601    self.timeout = setTimeout(function () {
602      if (self.hoverState == 'out') self.hide()
603    }, self.options.delay.hide)
604  }
605
606  Tooltip.prototype.show = function () {
607    var e = $.Event('show.bs.' + this.type)
608
609    if (this.hasContent() && this.enabled) {
610      this.$element.trigger(e)
611
612      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
613      if (e.isDefaultPrevented() || !inDom) return
614      var that = this
615
616      var $tip = this.tip()
617
618      var tipId = this.getUID(this.type)
619
620      this.setContent()
621      $tip.attr('id', tipId)
622      this.$element.attr('aria-describedby', tipId)
623
624      if (this.options.animation) $tip.addClass('fade')
625
626      var placement = typeof this.options.placement == 'function' ?
627        this.options.placement.call(this, $tip[0], this.$element[0]) :
628        this.options.placement
629
630      var autoToken = /\s?auto?\s?/i
631      var autoPlace = autoToken.test(placement)
632      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
633
634      $tip
635        .detach()
636        .css({ top: 0, left: 0, display: 'block' })
637        .addClass(placement)
638        .data('bs.' + this.type, this)
639
640      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
641      this.$element.trigger('inserted.bs.' + this.type)
642
643      var pos          = this.getPosition()
644      var actualWidth  = $tip[0].offsetWidth
645      var actualHeight = $tip[0].offsetHeight
646
647      if (autoPlace) {
648        var orgPlacement = placement
649        var viewportDim = this.getPosition(this.$viewport)
650
651        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
652                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
653                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
654                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
655                    placement
656
657        $tip
658          .removeClass(orgPlacement)
659          .addClass(placement)
660      }
661
662      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
663
664      this.applyPlacement(calculatedOffset, placement)
665
666      var complete = function () {
667        var prevHoverState = that.hoverState
668        that.$element.trigger('shown.bs.' + that.type)
669        that.hoverState = null
670
671        if (prevHoverState == 'out') that.leave(that)
672      }
673
674      $.support.transition && this.$tip.hasClass('fade') ?
675        $tip
676          .one('bsTransitionEnd', complete)
677          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
678        complete()
679    }
680  }
681
682  Tooltip.prototype.applyPlacement = function (offset, placement) {
683    var $tip   = this.tip()
684    var width  = $tip[0].offsetWidth
685    var height = $tip[0].offsetHeight
686
687    // manually read margins because getBoundingClientRect includes difference
688    var marginTop = parseInt($tip.css('margin-top'), 10)
689    var marginLeft = parseInt($tip.css('margin-left'), 10)
690
691    // we must check for NaN for ie 8/9
692    if (isNaN(marginTop))  marginTop  = 0
693    if (isNaN(marginLeft)) marginLeft = 0
694
695    offset.top  += marginTop
696    offset.left += marginLeft
697
698    // $.fn.offset doesn't round pixel values
699    // so we use setOffset directly with our own function B-0
700    $.offset.setOffset($tip[0], $.extend({
701      using: function (props) {
702        $tip.css({
703          top: Math.round(props.top),
704          left: Math.round(props.left)
705        })
706      }
707    }, offset), 0)
708
709    $tip.addClass('in')
710
711    // check to see if placing tip in new offset caused the tip to resize itself
712    var actualWidth  = $tip[0].offsetWidth
713    var actualHeight = $tip[0].offsetHeight
714
715    if (placement == 'top' && actualHeight != height) {
716      offset.top = offset.top + height - actualHeight
717    }
718
719    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
720
721    if (delta.left) offset.left += delta.left
722    else offset.top += delta.top
723
724    var isVertical          = /top|bottom/.test(placement)
725    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
726    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
727
728    $tip.offset(offset)
729    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
730  }
731
732  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
733    this.arrow()
734      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
735      .css(isVertical ? 'top' : 'left', '')
736  }
737
738  Tooltip.prototype.setContent = function () {
739    var $tip  = this.tip()
740    var title = this.getTitle()
741
742    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
743    $tip.removeClass('fade in top bottom left right')
744  }
745
746  Tooltip.prototype.hide = function (callback) {
747    var that = this
748    var $tip = $(this.$tip)
749    var e    = $.Event('hide.bs.' + this.type)
750
751    function complete() {
752      if (that.hoverState != 'in') $tip.detach()
753      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
754        that.$element
755          .removeAttr('aria-describedby')
756          .trigger('hidden.bs.' + that.type)
757      }
758      callback && callback()
759    }
760
761    this.$element.trigger(e)
762
763    if (e.isDefaultPrevented()) return
764
765    $tip.removeClass('in')
766
767    $.support.transition && $tip.hasClass('fade') ?
768      $tip
769        .one('bsTransitionEnd', complete)
770        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
771      complete()
772
773    this.hoverState = null
774
775    return this
776  }
777
778  Tooltip.prototype.fixTitle = function () {
779    var $e = this.$element
780    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
781      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
782    }
783  }
784
785  Tooltip.prototype.hasContent = function () {
786    return this.getTitle()
787  }
788
789  Tooltip.prototype.getPosition = function ($element) {
790    $element   = $element || this.$element
791
792    var el     = $element[0]
793    var isBody = el.tagName == 'BODY'
794
795    var elRect    = el.getBoundingClientRect()
796    if (elRect.width == null) {
797      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
798      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
799    }
800    var isSvg = window.SVGElement && el instanceof window.SVGElement
801    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
802    // See https://github.com/twbs/bootstrap/issues/20280
803    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
804    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
805    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
806
807    return $.extend({}, elRect, scroll, outerDims, elOffset)
808  }
809
810  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
811    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
812           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
813           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
814        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
815
816  }
817
818  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
819    var delta = { top: 0, left: 0 }
820    if (!this.$viewport) return delta
821
822    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
823    var viewportDimensions = this.getPosition(this.$viewport)
824
825    if (/right|left/.test(placement)) {
826      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
827      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
828      if (topEdgeOffset < viewportDimensions.top) { // top overflow
829        delta.top = viewportDimensions.top - topEdgeOffset
830      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
831        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
832      }
833    } else {
834      var leftEdgeOffset  = pos.left - viewportPadding
835      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
836      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
837        delta.left = viewportDimensions.left - leftEdgeOffset
838      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
839        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
840      }
841    }
842
843    return delta
844  }
845
846  Tooltip.prototype.getTitle = function () {
847    var title
848    var $e = this.$element
849    var o  = this.options
850
851    title = $e.attr('data-original-title')
852      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
853
854    return title
855  }
856
857  Tooltip.prototype.getUID = function (prefix) {
858    do prefix += ~~(Math.random() * 1000000)
859    while (document.getElementById(prefix))
860    return prefix
861  }
862
863  Tooltip.prototype.tip = function () {
864    if (!this.$tip) {
865      this.$tip = $(this.options.template)
866      if (this.$tip.length != 1) {
867        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
868      }
869    }
870    return this.$tip
871  }
872
873  Tooltip.prototype.arrow = function () {
874    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
875  }
876
877  Tooltip.prototype.enable = function () {
878    this.enabled = true
879  }
880
881  Tooltip.prototype.disable = function () {
882    this.enabled = false
883  }
884
885  Tooltip.prototype.toggleEnabled = function () {
886    this.enabled = !this.enabled
887  }
888
889  Tooltip.prototype.toggle = function (e) {
890    var self = this
891    if (e) {
892      self = $(e.currentTarget).data('bs.' + this.type)
893      if (!self) {
894        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
895        $(e.currentTarget).data('bs.' + this.type, self)
896      }
897    }
898
899    if (e) {
900      self.inState.click = !self.inState.click
901      if (self.isInStateTrue()) self.enter(self)
902      else self.leave(self)
903    } else {
904      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
905    }
906  }
907
908  Tooltip.prototype.destroy = function () {
909    var that = this
910    clearTimeout(this.timeout)
911    this.hide(function () {
912      that.$element.off('.' + that.type).removeData('bs.' + that.type)
913      if (that.$tip) {
914        that.$tip.detach()
915      }
916      that.$tip = null
917      that.$arrow = null
918      that.$viewport = null
919      that.$element = null
920    })
921  }
922
923
924  // TOOLTIP PLUGIN DEFINITION
925  // =========================
926
927  function Plugin(option) {
928    return this.each(function () {
929      var $this   = $(this)
930      var data    = $this.data('bs.tooltip')
931      var options = typeof option == 'object' && option
932
933      if (!data && /destroy|hide/.test(option)) return
934      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
935      if (typeof option == 'string') data[option]()
936    })
937  }
938
939  var old = $.fn.tooltip
940
941  $.fn.tooltip             = Plugin
942  $.fn.tooltip.Constructor = Tooltip
943
944
945  // TOOLTIP NO CONFLICT
946  // ===================
947
948  $.fn.tooltip.noConflict = function () {
949    $.fn.tooltip = old
950    return this
951  }
952
953}(jQuery);
954
955/* ========================================================================
956 * Bootstrap: popover.js v3.3.7
957 * http://getbootstrap.com/javascript/#popovers
958 * ========================================================================
959 * Copyright 2011-2016 Twitter, Inc.
960 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
961 * ======================================================================== */
962
963
964+function ($) {
965  'use strict';
966
967  // POPOVER PUBLIC CLASS DEFINITION
968  // ===============================
969
970  var Popover = function (element, options) {
971    this.init('popover', element, options)
972  }
973
974  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
975
976  Popover.VERSION  = '3.3.7'
977
978  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
979    placement: 'right',
980    trigger: 'click',
981    content: '',
982    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
983  })
984
985
986  // NOTE: POPOVER EXTENDS tooltip.js
987  // ================================
988
989  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
990
991  Popover.prototype.constructor = Popover
992
993  Popover.prototype.getDefaults = function () {
994    return Popover.DEFAULTS
995  }
996
997  Popover.prototype.setContent = function () {
998    var $tip    = this.tip()
999    var title   = this.getTitle()
1000    var content = this.getContent()
1001
1002    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1003    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1004      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1005    ](content)
1006
1007    $tip.removeClass('fade top bottom left right in')
1008
1009    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1010    // this manually by checking the contents.
1011    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1012  }
1013
1014  Popover.prototype.hasContent = function () {
1015    return this.getTitle() || this.getContent()
1016  }
1017
1018  Popover.prototype.getContent = function () {
1019    var $e = this.$element
1020    var o  = this.options
1021
1022    return $e.attr('data-content')
1023      || (typeof o.content == 'function' ?
1024            o.content.call($e[0]) :
1025            o.content)
1026  }
1027
1028  Popover.prototype.arrow = function () {
1029    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1030  }
1031
1032
1033  // POPOVER PLUGIN DEFINITION
1034  // =========================
1035
1036  function Plugin(option) {
1037    return this.each(function () {
1038      var $this   = $(this)
1039      var data    = $this.data('bs.popover')
1040      var options = typeof option == 'object' && option
1041
1042      if (!data && /destroy|hide/.test(option)) return
1043      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1044      if (typeof option == 'string') data[option]()
1045    })
1046  }
1047
1048  var old = $.fn.popover
1049
1050  $.fn.popover             = Plugin
1051  $.fn.popover.Constructor = Popover
1052
1053
1054  // POPOVER NO CONFLICT
1055  // ===================
1056
1057  $.fn.popover.noConflict = function () {
1058    $.fn.popover = old
1059    return this
1060  }
1061
1062}(jQuery);
1063
1064/* ========================================================================
1065 * Bootstrap: collapse.js v3.3.7
1066 * http://getbootstrap.com/javascript/#collapse
1067 * ========================================================================
1068 * Copyright 2011-2016 Twitter, Inc.
1069 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1070 * ======================================================================== */
1071
vendor: 6,251 bytes, lines 1072-1295
1072/* jshint latedef: false */
1073
1074+function ($) {
1075  'use strict';
1076
1077  // COLLAPSE PUBLIC CLASS DEFINITION
1078  // ================================
1079
1080  var Collapse = function (element, options) {
1081    this.$element      = $(element)
1082    this.options       = $.extend({}, Collapse.DEFAULTS, options)
1083    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
1084                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
1085    this.transitioning = null
1086
1087    if (this.options.parent) {
1088      this.$parent = this.getParent()
1089    } else {
1090      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
1091    }
1092
1093    if (this.options.toggle) this.toggle()
1094  }
1095
1096  Collapse.VERSION  = '3.3.7'
1097
1098  Collapse.TRANSITION_DURATION = 350
1099
1100  Collapse.DEFAULTS = {
1101    toggle: true
1102  }
1103
1104  Collapse.prototype.dimension = function () {
1105    var hasWidth = this.$element.hasClass('width')
1106    return hasWidth ? 'width' : 'height'
1107  }
1108
1109  Collapse.prototype.show = function () {
1110    if (this.transitioning || this.$element.hasClass('in')) return
1111
1112    var activesData
1113    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
1114
1115    if (actives && actives.length) {
1116      activesData = actives.data('bs.collapse')
1117      if (activesData && activesData.transitioning) return
1118    }
1119
1120    var startEvent = $.Event('show.bs.collapse')
1121    this.$element.trigger(startEvent)
1122    if (startEvent.isDefaultPrevented()) return
1123
1124    if (actives && actives.length) {
1125      Plugin.call(actives, 'hide')
1126      activesData || actives.data('bs.collapse', null)
1127    }
1128
1129    var dimension = this.dimension()
1130
1131    this.$element
1132      .removeClass('collapse')
1133      .addClass('collapsing')[dimension](0)
1134      .attr('aria-expanded', true)
1135
1136    this.$trigger
1137      .removeClass('collapsed')
1138      .attr('aria-expanded', true)
1139
1140    this.transitioning = 1
1141
1142    var complete = function () {
1143      this.$element
1144        .removeClass('collapsing')
1145        .addClass('collapse in')[dimension]('')
1146      this.transitioning = 0
1147      this.$element
1148        .trigger('shown.bs.collapse')
1149    }
1150
1151    if (!$.support.transition) return complete.call(this)
1152
1153    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
1154
1155    this.$element
1156      .one('bsTransitionEnd', $.proxy(complete, this))
1157      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
1158  }
1159
1160  Collapse.prototype.hide = function () {
1161    if (this.transitioning || !this.$element.hasClass('in')) return
1162
1163    var startEvent = $.Event('hide.bs.collapse')
1164    this.$element.trigger(startEvent)
1165    if (startEvent.isDefaultPrevented()) return
1166
1167    var dimension = this.dimension()
1168
1169    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
1170
1171    this.$element
1172      .addClass('collapsing')
1173      .removeClass('collapse in')
1174      .attr('aria-expanded', false)
1175
1176    this.$trigger
1177      .addClass('collapsed')
1178      .attr('aria-expanded', false)
1179
1180    this.transitioning = 1
1181
1182    var complete = function () {
1183      this.transitioning = 0
1184      this.$element
1185        .removeClass('collapsing')
1186        .addClass('collapse')
1187        .trigger('hidden.bs.collapse')
1188    }
1189
1190    if (!$.support.transition) return complete.call(this)
1191
1192    this.$element
1193      [dimension](0)
1194      .one('bsTransitionEnd', $.proxy(complete, this))
1195      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
1196  }
1197
1198  Collapse.prototype.toggle = function () {
1199    this[this.$element.hasClass('in') ? 'hide' : 'show']()
1200  }
1201
1202  Collapse.prototype.getParent = function () {
1203    return $(this.options.parent)
1204      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
1205      .each($.proxy(function (i, element) {
1206        var $element = $(element)
1207        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
1208      }, this))
1209      .end()
1210  }
1211
1212  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
1213    var isOpen = $element.hasClass('in')
1214
1215    $element.attr('aria-expanded', isOpen)
1216    $trigger
1217      .toggleClass('collapsed', !isOpen)
1218      .attr('aria-expanded', isOpen)
1219  }
1220
1221  function getTargetFromTrigger($trigger) {
1222    var href
1223    var target = $trigger.attr('data-target')
1224      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
1225
1226    return $(target)
1227  }
1228
1229
1230  // COLLAPSE PLUGIN DEFINITION
1231  // ==========================
1232
1233  function Plugin(option) {
1234    return this.each(function () {
1235      var $this   = $(this)
1236      var data    = $this.data('bs.collapse')
1237      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
1238
1239      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
1240      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
1241      if (typeof option == 'string') data[option]()
1242    })
1243  }
1244
1245  var old = $.fn.collapse
1246
1247  $.fn.collapse             = Plugin
1248  $.fn.collapse.Constructor = Collapse
1249
1250
1251  // COLLAPSE NO CONFLICT
1252  // ====================
1253
1254  $.fn.collapse.noConflict = function () {
1255    $.fn.collapse = old
1256    return this
1257  }
1258
1259
1260  // COLLAPSE DATA-API
1261  // =================
1262
1263  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
1264    var $this   = $(this)
1265
1266    if (!$this.attr('data-target')) e.preventDefault()
1267
1268    var $target = getTargetFromTrigger($this)
1269    var data    = $target.data('bs.collapse')
1270    var option  = data ? 'toggle' : $this.data()
1271
1272    Plugin.call($target, option)
1273  })
1274
1275}(jQuery);
1276
1277/* ========================================================================
1278 * Bootstrap: modal.js v3.3.7
1279 * http://getbootstrap.com/javascript/#modals
1280 * ========================================================================
1281 * Copyright 2011-2016 Twitter, Inc.
1282 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1283 * ======================================================================== */
1284
1285
1286+function ($) {
1287  'use strict';
1288
1289  // MODAL CLASS DEFINITION
1290  // ======================
1291
1292  var Modal = function (element, options) {
1293    this.options             = options
1294    this.$body               = $(document.body)
1295    this.$element            = $(element)
vendor: 10,671 bytes, lines 1296-1658
1296    this.$dialog             = this.$element.find('.modal-dialog')
1297    this.$backdrop           = null
1298    this.isShown             = null
1299    this.originalBodyPad     = null
1300    this.scrollbarWidth      = 0
1301    this.ignoreBackdropClick = false
1302
1303    if (this.options.remote) {
1304      this.$element
1305        .find('.modal-content')
1306        .load(this.options.remote, $.proxy(function () {
1307          this.$element.trigger('loaded.bs.modal')
1308        }, this))
1309    }
1310  }
1311
1312  Modal.VERSION  = '3.3.7'
1313
1314  Modal.TRANSITION_DURATION = 300
1315  Modal.BACKDROP_TRANSITION_DURATION = 150
1316
1317  Modal.DEFAULTS = {
1318    backdrop: true,
1319    keyboard: true,
1320    show: true
1321  }
1322
1323  Modal.prototype.toggle = function (_relatedTarget) {
1324    return this.isShown ? this.hide() : this.show(_relatedTarget)
1325  }
1326
1327  Modal.prototype.show = function (_relatedTarget) {
1328    var that = this
1329    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
1330
1331    this.$element.trigger(e)
1332
1333    if (this.isShown || e.isDefaultPrevented()) return
1334
1335    this.isShown = true
1336
1337    this.checkScrollbar()
1338    this.setScrollbar()
1339    this.$body.addClass('modal-open')
1340
1341    this.escape()
1342    this.resize()
1343
1344    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
1345
1346    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
1347      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
1348        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
1349      })
1350    })
1351
1352    this.backdrop(function () {
1353      var transition = $.support.transition && that.$element.hasClass('fade')
1354
1355      if (!that.$element.parent().length) {
1356        that.$element.appendTo(that.$body) // don't move modals dom position
1357      }
1358
1359      that.$element
1360        .show()
1361        .scrollTop(0)
1362
1363      that.adjustDialog()
1364
1365      if (transition) {
1366        that.$element[0].offsetWidth // force reflow
1367      }
1368
1369      that.$element.addClass('in')
1370
1371      that.enforceFocus()
1372
1373      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
1374
1375      transition ?
1376        that.$dialog // wait for modal to slide in
1377          .one('bsTransitionEnd', function () {
1378            that.$element.trigger('focus').trigger(e)
1379          })
1380          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1381        that.$element.trigger('focus').trigger(e)
1382    })
1383  }
1384
1385  Modal.prototype.hide = function (e) {
1386    if (e) e.preventDefault()
1387
1388    e = $.Event('hide.bs.modal')
1389
1390    this.$element.trigger(e)
1391
1392    if (!this.isShown || e.isDefaultPrevented()) return
1393
1394    this.isShown = false
1395
1396    this.escape()
1397    this.resize()
1398
1399    $(document).off('focusin.bs.modal')
1400
1401    this.$element
1402      .removeClass('in')
1403      .off('click.dismiss.bs.modal')
1404      .off('mouseup.dismiss.bs.modal')
1405
1406    this.$dialog.off('mousedown.dismiss.bs.modal')
1407
1408    $.support.transition && this.$element.hasClass('fade') ?
1409      this.$element
1410        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1411        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1412      this.hideModal()
1413  }
1414
1415  Modal.prototype.enforceFocus = function () {
1416    $(document)
1417      .off('focusin.bs.modal') // guard against infinite focus loop
1418      .on('focusin.bs.modal', $.proxy(function (e) {
1419        if (document !== e.target &&
1420            this.$element[0] !== e.target &&
1421            !this.$element.has(e.target).length) {
1422          this.$element.trigger('focus')
1423        }
1424      }, this))
1425  }
1426
1427  Modal.prototype.escape = function () {
1428    if (this.isShown && this.options.keyboard) {
1429      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1430        e.which == 27 && this.hide()
1431      }, this))
1432    } else if (!this.isShown) {
1433      this.$element.off('keydown.dismiss.bs.modal')
1434    }
1435  }
1436
1437  Modal.prototype.resize = function () {
1438    if (this.isShown) {
1439      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1440    } else {
1441      $(window).off('resize.bs.modal')
1442    }
1443  }
1444
1445  Modal.prototype.hideModal = function () {
1446    var that = this
1447    this.$element.hide()
1448    this.backdrop(function () {
1449      that.$body.removeClass('modal-open')
1450      that.resetAdjustments()
1451      that.resetScrollbar()
1452      that.$element.trigger('hidden.bs.modal')
1453    })
1454  }
1455
1456  Modal.prototype.removeBackdrop = function () {
1457    this.$backdrop && this.$backdrop.remove()
1458    this.$backdrop = null
1459  }
1460
1461  Modal.prototype.backdrop = function (callback) {
1462    var that = this
1463    var animate = this.$element.hasClass('fade') ? 'fade' : ''
1464
1465    if (this.isShown && this.options.backdrop) {
1466      var doAnimate = $.support.transition && animate
1467
1468      this.$backdrop = $(document.createElement('div'))
1469        .addClass('modal-backdrop ' + animate)
1470        .appendTo(this.$body)
1471
1472      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1473        if (this.ignoreBackdropClick) {
1474          this.ignoreBackdropClick = false
1475          return
1476        }
1477        if (e.target !== e.currentTarget) return
1478        this.options.backdrop == 'static'
1479          ? this.$element[0].focus()
1480          : this.hide()
1481      }, this))
1482
1483      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1484
1485      this.$backdrop.addClass('in')
1486
1487      if (!callback) return
1488
1489      doAnimate ?
1490        this.$backdrop
1491          .one('bsTransitionEnd', callback)
1492          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1493        callback()
1494
1495    } else if (!this.isShown && this.$backdrop) {
1496      this.$backdrop.removeClass('in')
1497
1498      var callbackRemove = function () {
1499        that.removeBackdrop()
1500        callback && callback()
1501      }
1502      $.support.transition && this.$element.hasClass('fade') ?
1503        this.$backdrop
1504          .one('bsTransitionEnd', callbackRemove)
1505          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1506        callbackRemove()
1507
1508    } else if (callback) {
1509      callback()
1510    }
1511  }
1512
1513  // these following methods are used to handle overflowing modals
1514
1515  Modal.prototype.handleUpdate = function () {
1516    this.adjustDialog()
1517  }
1518
1519  Modal.prototype.adjustDialog = function () {
1520    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1521
1522    this.$element.css({
1523      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1524      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1525    })
1526  }
1527
1528  Modal.prototype.resetAdjustments = function () {
1529    this.$element.css({
1530      paddingLeft: '',
1531      paddingRight: ''
1532    })
1533  }
1534
1535  Modal.prototype.checkScrollbar = function () {
1536    var fullWindowWidth = window.innerWidth
1537    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1538      var documentElementRect = document.documentElement.getBoundingClientRect()
1539      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1540    }
1541    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1542    this.scrollbarWidth = this.measureScrollbar()
1543  }
1544
1545  Modal.prototype.setScrollbar = function () {
1546    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1547    this.originalBodyPad = document.body.style.paddingRight || ''
1548    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1549  }
1550
1551  Modal.prototype.resetScrollbar = function () {
1552    this.$body.css('padding-right', this.originalBodyPad)
1553  }
1554
1555  Modal.prototype.measureScrollbar = function () { // thx walsh
1556    var scrollDiv = document.createElement('div')
1557    scrollDiv.className = 'modal-scrollbar-measure'
1558    this.$body.append(scrollDiv)
1559    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1560    this.$body[0].removeChild(scrollDiv)
1561    return scrollbarWidth
1562  }
1563
1564
1565  // MODAL PLUGIN DEFINITION
1566  // =======================
1567
1568  function Plugin(option, _relatedTarget) {
1569    return this.each(function () {
1570      var $this   = $(this)
1571      var data    = $this.data('bs.modal')
1572      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1573
1574      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1575      if (typeof option == 'string') data[option](_relatedTarget)
1576      else if (options.show) data.show(_relatedTarget)
1577    })
1578  }
1579
1580  var old = $.fn.modal
1581
1582  $.fn.modal             = Plugin
1583  $.fn.modal.Constructor = Modal
1584
1585
1586  // MODAL NO CONFLICT
1587  // =================
1588
1589  $.fn.modal.noConflict = function () {
1590    $.fn.modal = old
1591    return this
1592  }
1593
1594
1595  // MODAL DATA-API
1596  // ==============
1597
1598  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1599    var $this   = $(this)
1600    var href    = $this.attr('href')
1601    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1602    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1603
1604    if ($this.is('a')) e.preventDefault()
1605
1606    $target.one('show.bs.modal', function (showEvent) {
1607      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1608      $target.one('hidden.bs.modal', function () {
1609        $this.is(':visible') && $this.trigger('focus')
1610      })
1611    })
1612    Plugin.call($target, option, this)
1613  })
1614
1615}(jQuery);
1616
1617/*! rangeslider.js - v2.3.0 | (c) 2016 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
1618(function(factory) {
1619    'use strict';
1620
1621    if (typeof define === 'function' && define.amd) {
1622        // AMD. Register as an anonymous module.
1623        define(['jquery'], factory);
1624    } else if (typeof exports === 'object') {
1625        // CommonJS
1626        module.exports = factory(require('jquery'));
1627    } else {
1628        // Browser globals
1629        factory(jQuery);
1630    }
1631}(function($) {
1632    'use strict';
1633
1634    // Polyfill Number.isNaN(value)
1635    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
1636    Number.isNaN = Number.isNaN || function(value) {
1637        return typeof value === 'number' && value !== value;
1638    };
1639
1640    /**
1641     * Range feature detection
1642     * @return {Boolean}
1643     */
1644    function supportsRange() {
1645        var input = document.createElement('input');
1646        input.setAttribute('type', 'range');
1647        return input.type !== 'text';
1648    }
1649
1650    var pluginName = 'rangeslider',
1651        pluginIdentifier = 0,
1652        hasInputRangeSupport = supportsRange(),
1653        defaults = {
1654            polyfill: true,
1655            orientation: 'horizontal',
1656            rangeClass: 'rangeslider',
1657            disabledClass: 'rangeslider--disabled',
1658            activeClass: 'rangeslider--active',
vendor: 17,456 bytes, lines 1659-2142
1659            horizontalClass: 'rangeslider--horizontal',
1660            verticalClass: 'rangeslider--vertical',
1661            fillClass: 'rangeslider__fill',
1662            handleClass: 'rangeslider__handle',
1663            startEvent: ['mousedown', 'touchstart', 'pointerdown'],
1664            moveEvent: ['mousemove', 'touchmove', 'pointermove'],
1665            endEvent: ['mouseup', 'touchend', 'pointerup']
1666        },
1667        constants = {
1668            orientation: {
1669                horizontal: {
1670                    dimension: 'width',
1671                    direction: 'left',
1672                    directionStyle: 'left',
1673                    coordinate: 'x'
1674                },
1675                vertical: {
1676                    dimension: 'height',
1677                    direction: 'top',
1678                    directionStyle: 'bottom',
1679                    coordinate: 'y'
1680                }
1681            }
1682        };
1683
1684    /**
1685     * Delays a function for the given number of milliseconds, and then calls
1686     * it with the arguments supplied.
1687     *
1688     * @param  {Function} fn   [description]
1689     * @param  {Number}   wait [description]
1690     * @return {Function}
1691     */
1692    function delay(fn, wait) {
1693        var args = Array.prototype.slice.call(arguments, 2);
1694        return setTimeout(function(){ return fn.apply(null, args); }, wait);
1695    }
1696
1697    /**
1698     * Returns a debounced function that will make sure the given
1699     * function is not triggered too much.
1700     *
1701     * @param  {Function} fn Function to debounce.
1702     * @param  {Number}   debounceDuration OPTIONAL. The amount of time in milliseconds for which we will debounce the function. (defaults to 100ms)
1703     * @return {Function}
1704     */
1705    function debounce(fn, debounceDuration) {
1706        debounceDuration = debounceDuration || 100;
1707        return function() {
1708            if (!fn.debouncing) {
1709                var args = Array.prototype.slice.apply(arguments);
1710                fn.lastReturnVal = fn.apply(window, args);
1711                fn.debouncing = true;
1712            }
1713            clearTimeout(fn.debounceTimeout);
1714            fn.debounceTimeout = setTimeout(function(){
1715                fn.debouncing = false;
1716            }, debounceDuration);
1717            return fn.lastReturnVal;
1718        };
1719    }
1720
1721    /**
1722     * Check if a `element` is visible in the DOM
1723     *
1724     * @param  {Element}  element
1725     * @return {Boolean}
1726     */
1727    function isHidden(element) {
1728        return (
1729            element && (
1730                element.offsetWidth === 0 ||
1731                element.offsetHeight === 0 ||
1732                // Also Consider native `<details>` elements.
1733                element.open === false
1734            )
1735        );
1736    }
1737
1738    /**
1739     * Get hidden parentNodes of an `element`
1740     *
1741     * @param  {Element} element
1742     * @return {[type]}
1743     */
1744    function getHiddenParentNodes(element) {
1745        var parents = [],
1746            node    = element.parentNode;
1747
1748        while (isHidden(node)) {
1749            parents.push(node);
1750            node = node.parentNode;
1751        }
1752        return parents;
1753    }
1754
1755    /**
1756     * Returns dimensions for an element even if it is not visible in the DOM.
1757     *
1758     * @param  {Element} element
1759     * @param  {String}  key     (e.g. offsetWidth …)
1760     * @return {Number}
1761     */
1762    function getDimension(element, key) {
1763        var hiddenParentNodes       = getHiddenParentNodes(element),
1764            hiddenParentNodesLength = hiddenParentNodes.length,
1765            inlineStyle             = [],
1766            dimension               = element[key];
1767
1768        // Used for native `<details>` elements
1769        function toggleOpenProperty(element) {
1770            if (typeof element.open !== 'undefined') {
1771                element.open = (element.open) ? false : true;
1772            }
1773        }
1774
1775        if (hiddenParentNodesLength) {
1776            for (var i = 0; i < hiddenParentNodesLength; i++) {
1777
1778                // Cache style attribute to restore it later.
1779                inlineStyle[i] = hiddenParentNodes[i].style.cssText;
1780
1781                // visually hide
1782                if (hiddenParentNodes[i].style.setProperty) {
1783                    hiddenParentNodes[i].style.setProperty('display', 'block', 'important');
1784                } else {
1785                    hiddenParentNodes[i].style.cssText += ';display: block !important';
1786                }
1787                hiddenParentNodes[i].style.height = '0';
1788                hiddenParentNodes[i].style.overflow = 'hidden';
1789                hiddenParentNodes[i].style.visibility = 'hidden';
1790                toggleOpenProperty(hiddenParentNodes[i]);
1791            }
1792
1793            // Update dimension
1794            dimension = element[key];
1795
1796            for (var j = 0; j < hiddenParentNodesLength; j++) {
1797
1798                // Restore the style attribute
1799                hiddenParentNodes[j].style.cssText = inlineStyle[j];
1800                toggleOpenProperty(hiddenParentNodes[j]);
1801            }
1802        }
1803        return dimension;
1804    }
1805
1806    /**
1807     * Returns the parsed float or the default if it failed.
1808     *
1809     * @param  {String}  str
1810     * @param  {Number}  defaultValue
1811     * @return {Number}
1812     */
1813    function tryParseFloat(str, defaultValue) {
1814        var value = parseFloat(str);
1815        return Number.isNaN(value) ? defaultValue : value;
1816    }
1817
1818    /**
1819     * Capitalize the first letter of string
1820     *
1821     * @param  {String} str
1822     * @return {String}
1823     */
1824    function ucfirst(str) {
1825        return str.charAt(0).toUpperCase() + str.substr(1);
1826    }
1827
1828    /**
1829     * Plugin
1830     * @param {String} element
1831     * @param {Object} options
1832     */
1833    function Plugin(element, options) {
1834        this.$window            = $(window);
1835        this.$document          = $(document);
1836        this.$element           = $(element);
1837        this.options            = $.extend( {}, defaults, options );
1838        this.polyfill           = this.options.polyfill;
1839        this.orientation        = this.$element[0].getAttribute('data-orientation') || this.options.orientation;
1840        this.onInit             = this.options.onInit;
1841        this.onSlide            = this.options.onSlide;
1842        this.onSlideEnd         = this.options.onSlideEnd;
1843        this.DIMENSION          = constants.orientation[this.orientation].dimension;
1844        this.DIRECTION          = constants.orientation[this.orientation].direction;
1845        this.DIRECTION_STYLE    = constants.orientation[this.orientation].directionStyle;
1846        this.COORDINATE         = constants.orientation[this.orientation].coordinate;
1847
1848        // Plugin should only be used as a polyfill
1849        if (this.polyfill) {
1850            // Input range support?
1851            if (hasInputRangeSupport) { return false; }
1852        }
1853
1854        this.identifier = 'js-' + pluginName + '-' +(pluginIdentifier++);
1855        this.startEvent = this.options.startEvent.join('.' + this.identifier + ' ') + '.' + this.identifier;
1856        this.moveEvent  = this.options.moveEvent.join('.' + this.identifier + ' ') + '.' + this.identifier;
1857        this.endEvent   = this.options.endEvent.join('.' + this.identifier + ' ') + '.' + this.identifier;
1858        this.toFixed    = (this.step + '').replace('.', '').length - 1;
1859        this.$fill      = $('<div class="' + this.options.fillClass + '" />');
1860        this.$handle    = $('<div class="' + this.options.handleClass + '" />');
1861        this.$range     = $('<div class="' + this.options.rangeClass + ' ' + this.options[this.orientation + 'Class'] + '" id="' + this.identifier + '" />').insertAfter(this.$element).prepend(this.$fill, this.$handle);
1862
1863        // visually hide the input
1864        this.$element.css({
1865            'position': 'absolute',
1866            'width': '1px',
1867            'height': '1px',
1868            'overflow': 'hidden',
1869            'opacity': '0'
1870        });
1871
1872        // Store context
1873        this.handleDown = $.proxy(this.handleDown, this);
1874        this.handleMove = $.proxy(this.handleMove, this);
1875        this.handleEnd  = $.proxy(this.handleEnd, this);
1876
1877        this.init();
1878
1879        // Attach Events
1880        var _this = this;
1881        this.$window.on('resize.' + this.identifier, debounce(function() {
1882            // Simulate resizeEnd event.
1883            delay(function() { console.log(''); }, 300);
1884        }, 20));
1885
1886        this.$document.on(this.startEvent, '#' + this.identifier + ':not(.' + this.options.disabledClass + ')', this.handleDown);
1887
1888        // Listen to programmatic value changes
1889        this.$element.on('change.' + this.identifier, function(e, data) {
1890            if (data && data.origin === _this.identifier) {
1891                return;
1892            }
1893
1894            var value = e.target.value,
1895                pos = _this.getPositionFromValue(value);
1896            _this.setPosition(pos);
1897        });
1898    }
1899
1900    Plugin.prototype.init = function() {
1901        this.update(true, false);
1902
1903        if (this.onInit && typeof this.onInit === 'function') {
1904            this.onInit();
1905        }
1906    };
1907
1908    Plugin.prototype.update = function(updateAttributes, triggerSlide) {
1909        updateAttributes = updateAttributes || false;
1910
1911        if (updateAttributes) {
1912            this.min    = tryParseFloat(this.$element[0].getAttribute('min'), 0);
1913            this.max    = tryParseFloat(this.$element[0].getAttribute('max'), 100);
1914            this.value  = tryParseFloat(this.$element[0].value, Math.round(this.min + (this.max-this.min)/2));
1915            this.step   = tryParseFloat(this.$element[0].getAttribute('step'), 1);
1916        }
1917
1918        this.handleDimension    = getDimension(this.$handle[0], 'offset' + ucfirst(this.DIMENSION));
1919        this.rangeDimension     = getDimension(this.$range[0], 'offset' + ucfirst(this.DIMENSION));
1920        this.maxHandlePos       = this.rangeDimension - this.handleDimension;
1921        this.grabPos            = this.handleDimension / 2;
1922        this.position           = this.getPositionFromValue(this.value);
1923
1924        // Consider disabled state
1925        if (this.$element[0].disabled) {
1926            this.$range.addClass(this.options.disabledClass);
1927        } else {
1928            this.$range.removeClass(this.options.disabledClass);
1929        }
1930
1931        this.setPosition(this.position, triggerSlide);
1932    };
1933
1934    Plugin.prototype.handleDown = function(e) {
1935        e.preventDefault();
1936        this.$document.on(this.moveEvent, this.handleMove);
1937        this.$document.on(this.endEvent, this.handleEnd);
1938
1939        // add active class because Firefox is ignoring
1940        // the handle:active pseudo selector because of `e.preventDefault();`
1941        this.$range.addClass(this.options.activeClass);
1942
1943        // If we click on the handle don't set the new position
1944        if ((' ' + e.target.className + ' ').replace(/[\n\t]/g, ' ').indexOf(this.options.handleClass) > -1) {
1945            return;
1946        }
1947
1948        var pos         = this.getRelativePosition(e),
1949            rangePos    = this.$range[0].getBoundingClientRect()[this.DIRECTION],
1950            handlePos   = this.getPositionFromNode(this.$handle[0]) - rangePos,
1951            setPos      = (this.orientation === 'vertical') ? (this.maxHandlePos - (pos - this.grabPos)) : (pos - this.grabPos);
1952
1953        this.setPosition(setPos);
1954
1955        if (pos >= handlePos && pos < handlePos + this.handleDimension) {
1956            this.grabPos = pos - handlePos;
1957        }
1958    };
1959
1960    Plugin.prototype.handleMove = function(e) {
1961        e.preventDefault();
1962        var pos = this.getRelativePosition(e);
1963        var setPos = (this.orientation === 'vertical') ? (this.maxHandlePos - (pos - this.grabPos)) : (pos - this.grabPos);
1964        this.setPosition(setPos);
1965    };
1966
1967    Plugin.prototype.handleEnd = function(e) {
1968        e.preventDefault();
1969        this.$document.off(this.moveEvent, this.handleMove);
1970        this.$document.off(this.endEvent, this.handleEnd);
1971
1972        this.$range.removeClass(this.options.activeClass);
1973
1974        // Ok we're done fire the change event
1975        this.$element.trigger('change', { origin: this.identifier });
1976
1977        if (this.onSlideEnd && typeof this.onSlideEnd === 'function') {
1978            this.onSlideEnd(this.position, this.value);
1979        }
1980    };
1981
1982    Plugin.prototype.cap = function(pos, min, max) {
1983        if (pos < min) { return min; }
1984        if (pos > max) { return max; }
1985        return pos;
1986    };
1987
1988    Plugin.prototype.setPosition = function(pos, triggerSlide) {
1989        var value, newPos;
1990
1991        if (triggerSlide === undefined) {
1992            triggerSlide = true;
1993        }
1994
1995        // Snapping steps
1996        value = this.getValueFromPosition(this.cap(pos, 0, this.maxHandlePos));
1997        newPos = this.getPositionFromValue(value);
1998
1999        // Update ui
2000        this.$fill[0].style[this.DIMENSION] = (newPos + this.grabPos) + 'px';
2001        this.$handle[0].style[this.DIRECTION_STYLE] = newPos + 'px';
2002        this.setValue(value);
2003
2004        // Update globals
2005        this.position = newPos;
2006        this.value = value;
2007
2008        if (triggerSlide && this.onSlide && typeof this.onSlide === 'function') {
2009            this.onSlide(newPos, value);
2010        }
2011    };
2012
2013    // Returns element position relative to the parent
2014    Plugin.prototype.getPositionFromNode = function(node) {
2015        var i = 0;
2016        while (node !== null) {
2017            i += node.offsetLeft;
2018            node = node.offsetParent;
2019        }
2020        return i;
2021    };
2022
2023    Plugin.prototype.getRelativePosition = function(e) {
2024        // Get the offset DIRECTION relative to the viewport
2025        var ucCoordinate = ucfirst(this.COORDINATE),
2026            rangePos = this.$range[0].getBoundingClientRect()[this.DIRECTION],
2027            pageCoordinate = 0;
2028
2029        if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
2030            pageCoordinate = e.originalEvent['client' + ucCoordinate];
2031        }
2032        else if (
2033          e.originalEvent.touches &&
2034          e.originalEvent.touches[0] &&
2035          typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined'
2036        ) {
2037            pageCoordinate = e.originalEvent.touches[0]['client' + ucCoordinate];
2038        }
2039        else if(e.currentPoint && typeof e.currentPoint[this.COORDINATE] !== 'undefined') {
2040            pageCoordinate = e.currentPoint[this.COORDINATE];
2041        }
2042
2043        return pageCoordinate - rangePos;
2044    };
2045
2046    Plugin.prototype.getPositionFromValue = function(value) {
2047        var percentage, pos;
2048        percentage = (value - this.min)/(this.max - this.min);
2049        pos = (!Number.isNaN(percentage)) ? percentage * this.maxHandlePos : 0;
2050        return pos;
2051    };
2052
2053    Plugin.prototype.getValueFromPosition = function(pos) {
2054        var percentage, value;
2055        percentage = ((pos) / (this.maxHandlePos || 1));
2056        value = this.step * Math.round(percentage * (this.max - this.min) / this.step) + this.min;
2057        return Number((value).toFixed(this.toFixed));
2058    };
2059
2060    Plugin.prototype.setValue = function(value) {
2061        if (value === this.value && this.$element[0].value !== '') {
2062            return;
2063        }
2064
2065        // Set the new value and fire the `input` event
2066        this.$element
2067            .val(value)
2068            .trigger('input', { origin: this.identifier });
2069    };
2070
2071    Plugin.prototype.destroy = function() {
2072        this.$document.off('.' + this.identifier);
2073        this.$window.off('.' + this.identifier);
2074
2075        this.$element
2076            .off('.' + this.identifier)
2077            .removeAttr('style')
2078            .removeData('plugin_' + pluginName);
2079
2080        // Remove the generated markup
2081        if (this.$range && this.$range.length) {
2082            this.$range[0].parentNode.removeChild(this.$range[0]);
2083        }
2084    };
2085
2086    // A really lightweight plugin wrapper around the constructor,
2087    // preventing against multiple instantiations
2088    $.fn[pluginName] = function(options) {
2089        var args = Array.prototype.slice.call(arguments, 1);
2090
2091        return this.each(function() {
2092            var $this = $(this),
2093                data  = $this.data('plugin_' + pluginName);
2094
2095            // Create a new instance.
2096            if (!data) {
2097                $this.data('plugin_' + pluginName, (data = new Plugin(this, options)));
2098            }
2099
2100            // Make it possible to access methods from public.
2101            // e.g `$element.rangeslider('method');`
2102            if (typeof options === 'string') {
2103                data[options].apply(data, args);
2104            }
2105        });
2106    };
2107
2108    return 'rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);';
2109
2110}));
2111
2112/*!
2113 * jQuery scrollintoview() plugin and :scrollable selector filter
2114 *
2115 * Version 1.8 (14 Jul 2011)
2116 * Requires jQuery 1.4 or newer
2117 *
2118 * Copyright (c) 2011 Robert Koritnik
2119 * Licensed under the terms of the MIT license
2120 * http://www.opensource.org/licenses/mit-license.php
2121 */
2122 
2123(function ($) {
2124    var converter = {
2125        vertical: { x: false, y: true },
2126        horizontal: { x: true, y: false },
2127        both: { x: true, y: true },
2128        x: { x: true, y: false },
2129        y: { x: false, y: true }
2130    };
2131 
2132    var settings = {
2133        duration: "fast",
2134        direction: "both"
2135    };
2136 
2137    var rootrx = /^(?:html)$/i;
2138 
2139    // gets border dimensions
2140    var borders = function (domElement, styles) {
2141        styles = styles || (document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(domElement, null) : domElement.currentStyle);
2142        var px = document.defaultView && document.defaultView.getComputedStyle ? true : false;
2143        var b = {
2144            top: (parseFloat(px ? styles.borderTopWidth : $.css(domElement, "borderTopWidth")) || 0),
2145            left: (parseFloat(px ? styles.borderLeftWidth : $.css(domElement, "borderLeftWidth")) || 0),
2146            bottom: (parseFloat(px ? styles.borderBottomWidth : $.css(domElement, "borderBottomWidth")) || 0),
2147            right: (parseFloat(px ? styles.borderRightWidth : $.css(domElement, "borderRightWidth")) || 0)
2148        };
2149        return {
2150            top: b.top,
2151            left: b.left,
2152            bottom: b.bottom,
2153            right: b.right,
2154            vertical: b.top + b.bottom,
2155            horizontal: b.left + b.right
2156        };
2157    };
2158 
2159    var dimensions = function ($element) {
2160        var win = $(window);
2161        var isRoot = rootrx.test($element[0].nodeName);
2162        return {
2163            border: isRoot ? { top: 0, left: 0, bottom: 0, right: 0} : borders($element[0]),
2164            scroll: {
2165                top: (isRoot ? win : $element).scrollTop(),
2166                left: (isRoot ? win : $element).scrollLeft()
2167            },
2168            scrollbar: {
2169                right: isRoot ? 0 : $element.innerWidth() - $element[0].clientWidth,
2170                bottom: isRoot ? 0 : $element.innerHeight() - $element[0].clientHeight
2171            },
2172            rect: (function () {
2173                var r = $element[0].getBoundingClientRect();
2174                return {
2175                    top: isRoot ? 0 : r.top,
2176                    left: isRoot ? 0 : r.left,
2177                    bottom: isRoot ? $element[0].clientHeight : r.bottom,
2178                    right: isRoot ? $element[0].clientWidth : r.right
2179                };
2180            })()
2181        };
2182    };
2183 
2184    $.fn.extend({
2185        scrollintoview: function (options) {
2186            /// <summary>Scrolls the first element in the set into view by scrolling its closest scrollable parent.</summary>
2187            /// <param name="options" type="Object">Additional options that can configure scrolling:
2188            ///        duration (default: "fast") - jQuery animation speed (can be a duration string or number of milliseconds)
2189            ///        direction (default: "both") - select possible scrollings ("vertical" or "y", "horizontal" or "x", "both")
2190            ///        complete (default: none) - a function to call when scrolling completes (called in context of the DOM element being scrolled)
2191            /// </param>
2192            /// <return type="jQuery">Returns the same jQuery set that this function was run on.</return>
2193 
2194            options = $.extend({}, settings, options);
2195            options.direction = converter[typeof (options.direction) === "string" && options.direction.toLowerCase()] || converter.both;
2196 
2197            var dirStr = "";
2198            if (options.direction.x === true) dirStr = "horizontal";
2199            if (options.direction.y === true) dirStr = dirStr ? "both" : "vertical";
2200 
2201            var el = this.eq(0);
2202            var scroller = el.closest(":scrollable(" + dirStr + ")");
2203 
2204            // check if there's anything to scroll in the first place
2205            if (scroller.length > 0)
2206            {
2207                scroller = scroller.eq(0);
2208 
2209                var dim = {
2210                    e: dimensions(el),
2211                    s: dimensions(scroller)
2212                };
2213 
2214                var rel = {
2215                    top: dim.e.rect.top - (dim.s.rect.top + dim.s.border.top),
2216                    bottom: dim.s.rect.bottom - dim.s.border.bottom - dim.s.scrollbar.bottom - dim.e.re
2216ct.bottom,
2217                    left: dim.e.rect.left - (dim.s.rect.left + dim.s.border.left),
2218                    right: dim.s.rect.right - dim.s.border.right - dim.s.scrollbar.right - dim.e.rect.right
2219                };
2220 
2221                var animOptions = {};
2222 
2223                // vertical scroll
2224                if (options.direction.y === true)
2225                {
2226                    if (rel.top < 0)
2227                    {
2228                        animOptions.scrollTop = dim.s.scroll.top + rel.top;
2229                    }
2230                    else if (rel.top > 0 && rel.bottom < 0)
2231                    {
2232                        animOptions.scrollTop = dim.s.scroll.top + Math.min(rel.top, -rel.bottom);
2233                    }
2234                }
2235 
2236                // horizontal scroll
2237                if (options.direction.x === true)
2238                {
2239                    if (rel.left < 0)
2240                    {
2241                        animOptions.scrollLeft = dim.s.scroll.left + rel.left;
2242                    }
2243                    else if (rel.left > 0 && rel.right < 0)
2244                    {
2245                        animOptions.scrollLeft = dim.s.scroll.left + Math.min(rel.left, -rel.right);
2246                    }
2247                }
2248 
2249                // scroll if needed
2250                if (!$.isEmptyObject(animOptions))
2251                {
2252                    if (rootrx.test(scroller[0].nodeName))
2253                    {
2254                        scroller = $("html,body");
2255                    }
2256                    scroller
2257                        .animate(animOptions, options.duration)
2258                        .eq(0) // we want function to be called just once (ref. "html,body")
2259                        .queue(function (next) {
2260                            $.isFunction(options.complete) && options.complete.call(scroller[0]);
2261                            next();
2262                        });
2263                }
2264                else
2265                {
2266                    // when there's nothing to scroll, just call the "complete" function
2267                    $.isFunction(options.complete) && options.complete.call(scroller[0]);
2268                }
2269            }
2270 
2271            // return set back
2272            return this;
2273        }
2274    });
2275 
2276    var scrollValue = {
2277        auto: true,
2278        scroll: true,
2279        visible: false,
2280        hidden: false
2281    };
2282 
2283    $.extend($.expr[":"], {
2284        scrollable: function (element, index, meta, stack) {
2285            var direction = converter[typeof (meta[3]) === "string" && meta[3].toLowerCase()] || converter.both;
2286            var styles = (document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(element, null) : element.currentStyle);
2287            var overflow = {
2288                x: scrollValue[styles.overflowX.toLowerCase()] || false,
2289                y: scrollValue[styles.overflowY.toLowerCase()] || false,
2290                isRoot: rootrx.test(element.nodeName)
2291            };
2292 
2293            // check if completely unscrollable (exclude HTML element because it's special)
2294            if (!overflow.x && !overflow.y && !overflow.isRoot)
2295            {
2296                return false;
2297            }
2298 
2299            var size = {
2300                height: {
2301                    scroll: element.scrollHeight,
2302                    client: element.clientHeight
2303                },
2304                width: {
2305                    scroll: element.scrollWidth,
2306                    client: element.clientWidth
2307                },
2308                // check overflow.x/y because iPad (and possibly other tablets) don't dislay scrollbars
2309                scrollableX: function () {
2310                    return (overflow.x || overflow.isRoot) && this.width.scroll > this.width.client;
2311                },
2312                scrollableY: function () {
2313                    return (overflow.y || overflow.isRoot) && this.height.scroll > this.height.client;
2314                }
2315            };
2316            return direction.y && size.scrollableY() || direction.x && size.scrollableX();
2317        }
2318    });
2319})(jQuery);
2320
2321/*! Lazy Load 1.9.3 - MIT license - Copyright 2010-2013 Mika Tuupola */
2322!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;
2322return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);
2323/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
2324
2325window.matchMedia = window.matchMedia || (function( doc, undefined ) {
2326
2327  "use strict";
2328
2329  var bool,
2330      docElem = doc.documentElement,
2331      refNode = docElem.firstElementChild || docElem.firstChild,
2332      // fakeBody required for <FF4 when executed in <head>
2333      fakeBody = doc.createElement( "body" ),
2334      div = doc.createElement( "div" );
2335
2336  div.id = "mq-test-1";
2337  div.style.cssText = "position:absolute;top:-100em";
2338  fakeBody.style.background = "none";
2339  fakeBody.appendChild(div);
2340
2341  return function(q){
2342
2343    div.innerHTML = "&shy;<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>";
2344
2345    docElem.insertBefore( fakeBody, refNode );
2346    bool = div.offsetWidth === 42;
2347    docElem.removeChild( fakeBody );
2348
2349    return {
2350      matches: bool,
2351      media: q
2352    };
2353
2354  };
2355
2356}( document ));
2357/*
2358     _ _      _       _
2359 ___| (_) ___| | __  (_)___
2360/ __| | |/ __| |/ /  | / __|
2361\__ \ | | (__|   < _ | \__ \
2362|___/_|_|\___|_|\_(_)/ |___/
2363                   |__/
2364
2365 Version: 1.7.1
2366  Author: Ken Wheeler
2367 Website: http://kenwheeler.github.io
2368    Docs: http://kenwheeler.github.io/slick
2369    Repo: http://github.com/kenwheeler/slick
2370  Issues: http://github.com/kenwheeler/slick/issues
2371
2372 */
2373/* global window, document, define, jQuery, setInterval, clearInterval */
2374;(function(factory) {
2375    'use strict';
2376    if (typeof define === 'function' && define.amd) {
2377        define(['jquery'], factory);
2378    } else if (typeof exports !== 'undefined') {
2379        module.exports = factory(require('jquery'));
2380    } else {
2381        factory(jQuery);
2382    }
2383
2384}(function($) {
2385    'use strict';
2386    var Slick = window.Slick || {};
2387
2388    Slick = (function() {
2389
2390        var instanceUid = 0;
2391
2392        function Slick(element, settings) {
2393
2394            var _ = this, dataSettings;
2395
2396            _.defaults = {
2397                accessibility: true,
2398                adaptiveHeight: false,
2399                appendArrows: $(element),
2400                appendDots: $(element),
2401                arrows: true,
2402                asNavFor: null,
2403                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
2404                nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
2405                autoplay: false,
2406                autoplaySpeed: 3000,
2407                centerMode: false,
2408                centerPadding: '50px',
2409                cssEase: 'ease',
2410                customPaging: function(slider, i) {
2411                    return $('<button type="button" />').text(i + 1);
2412                },
2413                dots: false,
2414                dotsClass: 'slick-dots',
2415                draggable: true,
2416                easing: 'linear',
2417                edgeFriction: 0.35,
2418                fade: false,
2419                focusOnSelect
vendor: 12,428 bytes, lines 2419-2842
2419: false,
2420                infinite: true,
2421                initialSlide: 0,
2422                lazyLoad: 'ondemand',
2423                mobileFirst: false,
2424                pauseOnHover: true,
2425                pauseOnFocus: true,
2426                pauseOnDotsHover: false,
2427                respondTo: 'window',
2428                responsive: null,
2429                rows: 1,
2430                rtl: false,
2431                slide: '',
2432                slidesPerRow: 1,
2433                slidesToShow: 1,
2434                slidesToScroll: 1,
2435                speed: 500,
2436                swipe: true,
2437                swipeToSlide: false,
2438                touchMove: true,
2439                touchThreshold: 5,
2440                useCSS: true,
2441                useTransform: true,
2442                variableWidth: false,
2443                vertical: false,
2444                verticalSwiping: false,
2445                waitForAnimate: true,
2446                zIndex: 1000
2447            };
2448
2449            _.initials = {
2450                animating: false,
2451                dragging: false,
2452                autoPlayTimer: null,
2453                currentDirection: 0,
2454                currentLeft: null,
2455                currentSlide: 0,
2456                direction: 1,
2457                $dots: null,
2458                listWidth: null,
2459                listHeight: null,
2460                loadIndex: 0,
2461                $nextArrow: null,
2462                $prevArrow: null,
2463                scrolling: false,
2464                slideCount: null,
2465                slideWidth: null,
2466                $slideTrack: null,
2467                $slides: null,
2468                sliding: false,
2469                slideOffset: 0,
2470                swipeLeft: null,
2471                swiping: false,
2472                $list: null,
2473                touchObject: {},
2474                transformsEnabled: false,
2475                unslicked: false
2476            };
2477
2478            $.extend(_, _.initials);
2479
2480            _.activeBreakpoint = null;
2481            _.animType = null;
2482            _.animProp = null;
2483            _.breakpoints = [];
2484            _.breakpointSettings = [];
2485            _.cssTransitions = false;
2486            _.focussed = false;
2487            _.interrupted = false;
2488            _.hidden = 'hidden';
2489            _.paused = true;
2490            _.positionProp = null;
2491            _.respondTo = null;
2492            _.rowCount = 1;
2493            _.shouldClick = true;
2494            _.$slider = $(element);
2495            _.$slidesCache = null;
2496            _.transformType = null;
2497            _.transitionType = null;
2498            _.visibilityChange = 'visibilitychange';
2499            _.windowWidth = 0;
2500            _.windowTimer = null;
2501
2502            dataSettings = $(element).data('slick') || {};
2503
2504            _.options = $.extend({}, _.defaults, settings, dataSettings);
2505
2506            _.currentSlide = _.options.initialSlide;
2507
2508            _.originalSettings = _.options;
2509
2510            if (typeof document.mozHidden !== 'undefined') {
2511                _.hidden = 'mozHidden';
2512                _.visibilityChange = 'mozvisibilitychange';
2513            } else if (typeof document.webkitHidden !== 'undefined') {
2514                _.hidden = 'webkitHidden';
2515                _.visibilityChange = 'webkitvisibilitychange';
2516            }
2517
2518            _.autoPlay = $.proxy(_.autoPlay, _);
2519            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
2520            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
2521            _.changeSlide = $.proxy(_.changeSlide, _);
2522            _.clickHandler = $.proxy(_.clickHandler, _);
2523            _.selectHandler = $.proxy(_.selectHandler, _);
2524            _.setPosition = $.proxy(_.setPosition, _);
2525            _.swipeHandler = $.proxy(_.swipeHandler, _);
2526            _.dragHandler = $.proxy(_.dragHandler, _);
2527            _.keyHandler = $.proxy(_.keyHandler, _);
2528
2529            _.instanceUid = instanceUid++;
2530
2531            // A simple way to check for HTML strings
2532            // Strict HTML recognition (must start with <)
2533            // Extracted from jQuery v1.11 source
2534            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
2535
2536
2537            _.registerBreakpoints();
2538            _.init(true);
2539
2540        }
2541
2542        return Slick;
2543
2544    }());
2545
2546    Slick.prototype.activateADA = function() {
2547        var _ = this;
2548
2549        _.$slideTrack.find('.slick-active').attr({
2550            'aria-hidden': 'false'
2551        }).find('a, input, button, select').attr({
2552            'tabindex': '0'
2553        });
2554
2555    };
2556
2557    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
2558
2559        var _ = this;
2560
2561        if (typeof(index) === 'boolean') {
2562            addBefore = index;
2563            index = null;
2564        } else if (index < 0 || (index >= _.slideCount)) {
2565            return false;
2566        }
2567
2568        _.unload();
2569
2570        if (typeof(index) === 'number') {
2571            if (index === 0 && _.$slides.length === 0) {
2572                $(markup).appendTo(_.$slideTrack);
2573            } else if (addBefore) {
2574                $(markup).insertBefore(_.$slides.eq(index));
2575            } else {
2576                $(markup).insertAfter(_.$slides.eq(index));
2577            }
2578        } else {
2579            if (addBefore === true) {
2580                $(markup).prependTo(_.$slideTrack);
2581            } else {
2582                $(markup).appendTo(_.$slideTrack);
2583            }
2584        }
2585
2586        _.$slides = _.$slideTrack.children(this.options.slide);
2587
2588        _.$slideTrack.children(this.options.slide).detach();
2589
2590        _.$slideTrack.append(_.$slides);
2591
2592        _.$slides.each(function(index, element) {
2593            $(element).attr('data-slick-index', index);
2594        });
2595
2596        _.$slidesCache = _.$slides;
2597
2598        _.reinit();
2599
2600    };
2601
2602    Slick.prototype.animateHeight = function() {
2603        var _ = this;
2604        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
2605            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
2606            _.$list.animate({
2607                height: targetHeight
2608            }, _.options.speed);
2609        }
2610    };
2611
2612    Slick.prototype.animateSlide = function(targetLeft, callback) {
2613
2614        var animProps = {},
2615            _ = this;
2616
2617        _.animateHeight();
2618
2619        if (_.options.rtl === true && _.options.vertical === false) {
2620            targetLeft = -targetLeft;
2621        }
2622        if (_.transformsEnabled === false) {
2623            if (_.options.vertical === false) {
2624                _.$slideTrack.animate({
2625                    left: targetLeft
2626                }, _.options.speed, _.options.easing, callback);
2627            } else {
2628                _.$slideTrack.animate({
2629                    top: targetLeft
2630                }, _.options.speed, _.options.easing, callback);
2631            }
2632
2633        } else {
2634
2635            if (_.cssTransitions === false) {
2636                if (_.options.rtl === true) {
2637                    _.currentLeft = -(_.currentLeft);
2638                }
2639                $({
2640                    animStart: _.currentLeft
2641                }).animate({
2642                    animStart: targetLeft
2643                }, {
2644                    duration: _.options.speed,
2645                    easing: _.options.easing,
2646                    step: function(now) {
2647                        now = Math.ceil(now);
2648                        if (_.options.vertical === false) {
2649                            animProps[_.animType] = 'translate(' +
2650                                now + 'px, 0px)';
2651                            _.$slideTrack.css(animProps);
2652                        } else {
2653                            animProps[_.animType] = 'translate(0px,' +
2654                                now + 'px)';
2655                            _.$slideTrack.css(animProps);
2656                        }
2657                    },
2658                    complete: function() {
2659                        if (callback) {
2660                            callback.call();
2661                        }
2662                    }
2663                });
2664
2665            } else {
2666
2667                _.applyTransition();
2668                targetLeft = Math.ceil(targetLeft);
2669
2670                if (_.options.vertical === false) {
2671                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
2672                } else {
2673                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
2674                }
2675                _.$slideTrack.css(animProps);
2676
2677                if (callback) {
2678                    setTimeout(function() {
2679
2680                        _.disableTransition();
2681
2682                        callback.call();
2683                    }, _.options.speed);
2684                }
2685
2686            }
2687
2688        }
2689
2690    };
2691
2692    Slick.prototype.getNavTarget = function() {
2693
2694        var _ = this,
2695            asNavFor = _.options.asNavFor;
2696
2697        if ( asNavFor && asNavFor !== null ) {
2698            asNavFor = $(asNavFor).not(_.$slider);
2699        }
2700
2701        return asNavFor;
2702
2703    };
2704
2705    Slick.prototype.asNavFor = function(index) {
2706
2707        var _ = this,
2708            asNavFor = _.getNavTarget();
2709
2710        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
2711            asNavFor.each(function() {
2712                var target = $(this).slick('getSlick');
2713                if(!target.unslicked) {
2714                    target.slideHandler(index, true);
2715                }
2716            });
2717        }
2718
2719    };
2720
2721    Slick.prototype.applyTransition = function(slide) {
2722
2723        var _ = this,
2724            transition = {};
2725
2726        if (_.options.fade === false) {
2727            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
2728        } else {
2729            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
2730        }
2731
2732        if (_.options.fade === false) {
2733            _.$slideTrack.css(transition);
2734        } else {
2735            _.$slides.eq(slide).css(transition);
2736        }
2737
2738    };
2739
2740    Slick.prototype.autoPlay = function() {
2741
2742        var _ = this;
2743
2744        _.autoPlayClear();
2745
2746        if ( _.slideCount > _.options.slidesToShow ) {
2747            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
2748        }
2749
2750    };
2751
2752    Slick.prototype.autoPlayClear = function() {
2753
2754        var _ = this;
2755
2756        if (_.autoPlayTimer) {
2757            clearInterval(_.autoPlayTimer);
2758        }
2759
2760    };
2761
2762    Slick.prototype.autoPlayIterator = function() {
2763
2764        var _ = this,
2765            slideTo = _.currentSlide + _.options.slidesToScroll;
2766
2767        if ( !_.paused && !_.interrupted && !_.focussed ) {
2768
2769            if ( _.options.infinite === false ) {
2770
2771                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
2772                    _.direction = 0;
2773                }
2774
2775                else if ( _.direction === 0 ) {
2776
2777                    slideTo = _.currentSlide - _.options.slidesToScroll;
2778
2779                    if ( _.currentSlide - 1 === 0 ) {
2780                        _.direction = 1;
2781                    }
2782
2783                }
2784
2785            }
2786
2787            _.slideHandler( slideTo );
2788
2789        }
2790
2791    };
2792
2793    Slick.prototype.buildArrows = function() {
2794
2795        var _ = this;
2796
2797        if (_.options.arrows === true ) {
2798
2799            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
2800            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
2801
2802            if( _.slideCount > _.options.slidesToShow ) {
2803
2804                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
2805                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
2806
2807                if (_.htmlExpr.test(_.options.prevArrow)) {
2808                    _.$prevArrow.prependTo(_.options.appendArrows);
2809                }
2810
2811                if (_.htmlExpr.test(_.options.nextArrow)) {
2812                    _.$nextArrow.appendTo(_.options.appendArrows);
2813                }
2814
2815                if (_.options.infinite !== true) {
2816                    _.$prevArrow
2817                        .addClass('slick-disabled')
2818                        .attr('aria-disabled', 'true');
2819                }
2820
2821            } else {
2822
2823                _.$prevArrow.add( _.$nextArrow )
2824
2825                    .addClass('slick-hidden')
2826                    .attr({
2827                        'aria-disabled': 'true',
2828                        'tabindex': '-1'
2829                    });
2830
2831            }
2832
2833        }
2834
2835    };
2836
2837    Slick.prototype.buildDots = function() {
2838
2839        var _ = this,
2840            i, dot;
2841
2842        if (_.options.dots === true
vendor: 36,865 bytes, lines 2842-4046
2842) {
2843
2844            _.$slider.addClass('slick-dotted');
2845
2846            dot = $('<ul />').addClass(_.options.dotsClass);
2847
2848            for (i = 0; i <= _.getDotCount(); i += 1) {
2849                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
2850            }
2851
2852            _.$dots = dot.appendTo(_.options.appendDots);
2853
2854            _.$dots.find('li').first().addClass('slick-active');
2855
2856        }
2857
2858    };
2859
2860    Slick.prototype.buildOut = function() {
2861
2862        var _ = this;
2863
2864        _.$slides =
2865            _.$slider
2866                .children( _.options.slide + ':not(.slick-cloned)')
2867                .addClass('slick-slide');
2868
2869        _.slideCount = _.$slides.length;
2870
2871        _.$slides.each(function(index, element) {
2872            $(element)
2873                .attr('data-slick-index', index)
2874                .data('originalStyling', $(element).attr('style') || '');
2875        });
2876
2877        _.$slider.addClass('slick-slider');
2878
2879        _.$slideTrack = (_.slideCount === 0) ?
2880            $('<div class="slick-track"/>').appendTo(_.$slider) :
2881            _.$slides.wrapAll('<div class="slick-track"/>').parent();
2882
2883        _.$list = _.$slideTrack.wrap(
2884            '<div class="slick-list"/>').parent();
2885        _.$slideTrack.css('opacity', 0);
2886
2887        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
2888            _.options.slidesToScroll = 1;
2889        }
2890
2891        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
2892
2893        _.setupInfinite();
2894
2895        _.buildArrows();
2896
2897        _.buildDots();
2898
2899        _.updateDots();
2900
2901
2902        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
2903
2904        if (_.options.draggable === true) {
2905            _.$list.addClass('draggable');
2906        }
2907
2908    };
2909
2910    Slick.prototype.buildRows = function() {
2911
2912        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
2913
2914        newSlides = document.createDocumentFragment();
2915        originalSlides = _.$slider.children();
2916
2917        if(_.options.rows > 1) {
2918
2919            slidesPerSection = _.options.slidesPerRow * _.options.rows;
2920            numOfSlides = Math.ceil(
2921                originalSlides.length / slidesPerSection
2922            );
2923
2924            for(a = 0; a < numOfSlides; a++){
2925                var slide = document.createElement('div');
2926                for(b = 0; b < _.options.rows; b++) {
2927                    var row = document.createElement('div');
2928                    for(c = 0; c < _.options.slidesPerRow; c++) {
2929                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
2930                        if (originalSlides.get(target)) {
2931                            row.appendChild(originalSlides.get(target));
2932                        }
2933                    }
2934                    slide.appendChild(row);
2935                }
2936                newSlides.appendChild(slide);
2937            }
2938
2939            _.$slider.empty().append(newSlides);
2940            _.$slider.children().children().children()
2941                .css({
2942                    'width':(100 / _.options.slidesPerRow) + '%',
2943                    'display': 'inline-block'
2944                });
2945
2946        }
2947
2948    };
2949
2950    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
2951
2952        var _ = this,
2953            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
2954        var sliderWidth = _.$slider.width();
2955        var windowWidth = window.innerWidth || $(window).width();
2956
2957        if (_.respondTo === 'window') {
2958            respondToWidth = windowWidth;
2959        } else if (_.respondTo === 'slider') {
2960            respondToWidth = sliderWidth;
2961        } else if (_.respondTo === 'min') {
2962            respondToWidth = Math.min(windowWidth, sliderWidth);
2963        }
2964
2965        if ( _.options.responsive &&
2966            _.options.responsive.length &&
2967            _.options.responsive !== null) {
2968
2969            targetBreakpoint = null;
2970
2971            for (breakpoint in _.breakpoints) {
2972                if (_.breakpoints.hasOwnProperty(breakpoint)) {
2973                    if (_.originalSettings.mobileFirst === false) {
2974                        if (respondToWidth < _.breakpoints[breakpoint]) {
2975                            targetBreakpoint = _.breakpoints[breakpoint];
2976                        }
2977                    } else {
2978                        if (respondToWidth > _.breakpoints[breakpoint]) {
2979                            targetBreakpoint = _.breakpoints[breakpoint];
2980                        }
2981                    }
2982                }
2983            }
2984
2985            if (targetBreakpoint !== null) {
2986                if (_.activeBreakpoint !== null) {
2987                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
2988                        _.activeBreakpoint =
2989                            targetBreakpoint;
2990                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
2991                            _.unslick(targetBreakpoint);
2992                        } else {
2993                            _.options = $.extend({}, _.originalSettings,
2994                                _.breakpointSettings[
2995                                    targetBreakpoint]);
2996                            if (initial === true) {
2997                                _.currentSlide = _.options.initialSlide;
2998                            }
2999                            _.refresh(initial);
3000                        }
3001                        triggerBreakpoint = targetBreakpoint;
3002                    }
3003                } else {
3004                    _.activeBreakpoint = targetBreakpoint;
3005                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
3006                        _.unslick(targetBreakpoint);
3007                    } else {
3008                        _.options = $.extend({}, _.originalSettings,
3009                            _.breakpointSettings[
3010                                targetBreakpoint]);
3011                        if (initial === true) {
3012                            _.currentSlide = _.options.initialSlide;
3013                        }
3014                        _.refresh(initial);
3015                    }
3016                    triggerBreakpoint = targetBreakpoint;
3017                }
3018            } else {
3019                if (_.activeBreakpoint !== null) {
3020                    _.activeBreakpoint = null;
3021                    _.options = _.originalSettings;
3022                    if (initial === true) {
3023                        _.currentSlide = _.options.initialSlide;
3024                    }
3025                    _.refresh(initial);
3026                    triggerBreakpoint = targetBreakpoint;
3027                }
3028            }
3029
3030            // only trigger breakpoints during an actual break. not on initialize.
3031            if( !initial && triggerBreakpoint !== false ) {
3032                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
3033            }
3034        }
3035
3036    };
3037
3038    Slick.prototype.changeSlide = function(event, dontAnimate) {
3039
3040        var _ = this,
3041            $target = $(event.currentTarget),
3042            indexOffset, slideOffset, unevenOffset;
3043
3044        // If target is a link, prevent default action.
3045        if($target.is('a')) {
3046            event.preventDefault();
3047        }
3048
3049        // If target is not the <li> element (ie: a child), find the <li>.
3050        if(!$target.is('li')) {
3051            $target = $target.closest('li');
3052        }
3053
3054        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
3055        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
3056
3057        switch (event.data.message) {
3058
3059            case 'previous':
3060                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
3061                if (_.slideCount > _.options.slidesToShow) {
3062                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
3063                }
3064                break;
3065
3066            case 'next':
3067                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
3068                if (_.slideCount > _.options.slidesToShow) {
3069                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
3070                }
3071                break;
3072
3073            case 'index':
3074                var index = event.data.index === 0 ? 0 :
3075                    event.data.index || $target.index() * _.options.slidesToScroll;
3076
3077                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
3078                $target.children().trigger('focus');
3079                break;
3080
3081            default:
3082                return;
3083        }
3084
3085    };
3086
3087    Slick.prototype.checkNavigable = function(index) {
3088
3089        var _ = this,
3090            navigables, prevNavigable;
3091
3092        navigables = _.getNavigableIndexes();
3093        prevNavigable = 0;
3094        if (index > navigables[navigables.length - 1]) {
3095            index = navigables[navigables.length - 1];
3096        } else {
3097            for (var n in navigables) {
3098                if (index < navigables[n]) {
3099                    index = prevNavigable;
3100                    break;
3101                }
3102                prevNavigable = navigables[n];
3103            }
3104        }
3105
3106        return index;
3107    };
3108
3109    Slick.prototype.cleanUpEvents = function() {
3110
3111        var _ = this;
3112
3113        if (_.options.dots && _.$dots !== null) {
3114
3115            $('li', _.$dots)
3116                .off('click.slick', _.changeSlide)
3117                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
3118                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
3119
3120            if (_.options.accessibility === true) {
3121                _.$dots.off('keydown.slick', _.keyHandler);
3122            }
3123        }
3124
3125        _.$slider.off('focus.slick blur.slick');
3126
3127        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
3128            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
3129            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
3130
3131            if (_.options.accessibility === true) {
3132                _.$prevArrow.off('keydown.slick', _.keyHandler);
3133                _.$nextArrow.off('keydown.slick', _.keyHandler);
3134            }
3135        }
3136
3137        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
3138        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
3139        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
3140        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
3141
3142        _.$list.off('click.slick', _.clickHandler);
3143
3144        $(document).off(_.visibilityChange, _.visibility);
3145
3146        _.cleanUpSlideEvents();
3147
3148        if (_.options.accessibility === true) {
3149            _.$list.off('keydown.slick', _.keyHandler);
3150        }
3151
3152        if (_.options.focusOnSelect === true) {
3153            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
3154        }
3155
3156        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
3157
3158        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
3159
3160        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
3161
3162        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
3163
3164    };
3165
3166    Slick.prototype.cleanUpSlideEvents = function() {
3167
3168        var _ = this;
3169
3170        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
3171        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
3172
3173    };
3174
3175    Slick.prototype.cleanUpRows = function() {
3176
3177        var _ = this, originalSlides;
3178
3179        if(_.options.rows > 1) {
3180            originalSlides = _.$slides.children().children();
3181            originalSlides.removeAttr('style');
3182            _.$slider.empty().append(originalSlides);
3183        }
3184
3185    };
3186
3187    Slick.prototype.clickHandler = function(event) {
3188
3189        var _ = this;
3190
3191        if (_.shouldClick === false) {
3192            event.stopImmediatePropagation();
3193            event.stopPropagation();
3194            event.preventDefault();
3195        }
3196
3197    };
3198
3199    Slick.prototype.destroy = function(refresh) {
3200
3201        var _ = this;
3202
3203        _.autoPlayClear();
3204
3205        _.touchObject = {};
3206
3207        _.cleanUpEvents();
3208
3209        $('.slick-cloned', _.$slider).detach();
3210
3211        if (_.$dots) {
3212            _.$dots.remove();
3213        }
3214
3215        if ( _.$prevArrow && _.$prevArrow.length ) {
3216
3217            _.$prevArrow
3218                .removeClass('slick-disabled slick-arrow slick-hidden')
3219                .removeAttr('aria-hidden aria-disabled tabindex')
3220                .css('display','');
3221
3222            if ( _.htmlExpr.test( _.options.prevArrow )) {
3223                _.$prevArrow.remove();
3224            }
3225        }
3226
3227        if ( _.$nextArrow && _.$nextArrow.length ) {
3228
3229            _.$nextArrow
3230                .removeClass('slick-disabled slick-arrow slick-hidden')
3231                .removeAttr('aria-hidden aria-disabled tabindex')
3232                .css('display','');
3233
3234            if ( _.htmlExpr.test( _.options.nextArrow )) {
3235                _.$nextArrow.remove();
3236            }
3237        }
3238
3239
3240        if (_.$slides) {
3241
3242            _.$slides
3243                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
3244                .removeAttr('aria-hidden')
3245                .removeAttr('data-slick-index')
3246                .each(function(){
3247                    $(this).attr('style', $(this).data('originalStyling'));
3248                });
3249
3250            _.$slideTrack.children(this.options.slide).detach();
3251
3252            _.$slideTrack.detach();
3253
3254            _.$list.detach();
3255
3256            _.$slider.append(_.$slides);
3257        }
3258
3259        _.cleanUpRows();
3260
3261        _.$slider.removeClass('slick-slider');
3262        _.$slider.removeClass('slick-initialized');
3263        _.$slider.removeClass('slick-dotted');
3264
3265        _.unslicked = true;
3266
3267        if(!refresh) {
3268            _.$slider.trigger('destroy', [_]);
3269        }
3270
3271    };
3272
3273    Slick.prototype.disableTransition = function(slide) {
3274
3275        var _ = this,
3276            transition = {};
3277
3278        transition[_.transitionType] = '';
3279
3280        if (_.options.fade === false) {
3281            _.$slideTrack.css(transition);
3282        } else {
3283            _.$slides.eq(slide).css(transition);
3284        }
3285
3286    };
3287
3288    Slick.prototype.fadeSlide = function(slideIndex, callback) {
3289
3290        var _ = this;
3291
3292        if (_.cssTransitions === false) {
3293
3294            _.$slides.eq(slideIndex).css({
3295                zIndex: _.options.zIndex
3296            });
3297
3298            _.$slides.eq(slideIndex).animate({
3299                opacity: 1
3300            }, _.options.speed, _.options.easing, callback);
3301
3302        } else {
3303
3304            _.applyTransition(slideIndex);
3305
3306            _.$slides.eq(slideIndex).css({
3307                opacity: 1,
3308                zIndex: _.options.zIndex
3309            });
3310
3311            if (callback) {
3312                setTimeout(function() {
3313
3314                    _.disableTransition(slideIndex);
3315
3316                    callback.call();
3317                }, _.options.speed);
3318            }
3319
3320        }
3321
3322    };
3323
3324    Slick.prototype.fadeSlideOut = function(slideIndex) {
3325
3326        var _ = this;
3327
3328        if (_.cssTransitions === false) {
3329
3330            _.$slides.eq(slideIndex).animate({
3331                opacity: 0,
3332                zIndex: _.options.zIndex - 2
3333            }, _.options.speed, _.options.easing);
3334
3335        } else {
3336
3337            _.applyTransition(slideIndex);
3338
3339            _.$slides.eq(slideIndex).css({
3340                opacity: 0,
3341                zIndex: _.options.zIndex - 2
3342            });
3343
3344        }
3345
3346    };
3347
3348    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
3349
3350        var _ = this;
3351
3352        if (filter !== null) {
3353
3354            _.$slidesCache = _.$slides;
3355
3356            _.unload();
3357
3358            _.$slideTrack.children(this.options.slide).detach();
3359
3360            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
3361
3362            _.reinit();
3363
3364        }
3365
3366    };
3367
3368    Slick.prototype.focusHandler = function() {
3369
3370        var _ = this;
3371
3372        _.$slider
3373            .off('focus.slick blur.slick')
3374            .on('focus.slick blur.slick', '*', function(event) {
3375
3376            event.stopImmediatePropagation();
3377            var $sf = $(this);
3378
3379            setTimeout(function() {
3380
3381                if( _.options.pauseOnFocus ) {
3382                    _.focussed = $sf.is(':focus');
3383                    _.autoPlay();
3384                }
3385
3386            }, 0);
3387
3388        });
3389    };
3390
3391    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
3392
3393        var _ = this;
3394        return _.currentSlide;
3395
3396    };
3397
3398    Slick.prototype.getDotCount = function() {
3399
3400        var _ = this;
3401
3402        var breakPoint = 0;
3403        var counter = 0;
3404        var pagerQty = 0;
3405
3406        if (_.options.infinite === true) {
3407            if (_.slideCount < _.options.slidesToShow) {
3408                 ++pagerQty;
3409            } else {
3410                while (breakPoint < _.slideCount) {
3411                    ++pagerQty;
3412                    breakPoint = counter + _.options.slidesToScroll;
3413                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
3414                }
3415            }
3416        } else if (_.options.centerMode === true) {
3417            pagerQty = _.slideCount;
3418        } else if(!_.options.asNavFor) {
3419            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
3420        }else {
3421            while (breakPoint < _.slideCount) {
3422                ++pagerQty;
3423                breakPoint = counter + _.options.slidesToScroll;
3424                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
3425            }
3426        }
3427
3428        return pagerQty - 1;
3429
3430    };
3431
3432    Slick.prototype.getLeft = function(slideIndex) {
3433
3434        var _ = this,
3435            targetLeft,
3436            verticalHeight,
3437            verticalOffset = 0,
3438            targetSlide;
3439
3440        _.slideOffset = 0;
3441        verticalHeight = _.$slides.first().outerHeight(true);
3442
3443        if (_.options.infinite === true) {
3444            if (_.slideCount >= _.options.slidesToShow) {
3445                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
3446                verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
3447            }
3448            if (_.slideCount % _.options.slidesToScroll !== 0) {
3449                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
3450                    if (slideIndex > _.slideCount) {
3451                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
3452                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
3453                    } else {
3454                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
3455                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
3456                    }
3457                }
3458            }
3459        } else {
3460            if (slideIndex + _.options.slidesToShow >= _.slideCount) {
3461                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
3462                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
3463            }
3464        }
3465
3466        if (_.slideCount < _.options.slidesToShow) {
3467            _.slideOffset = 0;
3468            verticalOffset = 0;
3469        }
3470
3471        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
3472            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
3473        } else if (_.options.centerMode === true && _.options.infinite === true) {
3474            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
3475        } else if (_.options.centerMode === true) {
3476            _.slideOffset = 0;
3477            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
3478        }
3479
3480        if (_.options.vertical === false) {
3481            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
3482        } else {
3483            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
3484        }
3485
3486        if (_.options.variableWidth === true) {
3487
3488            if (_.slideCount < _.options.slidesToShow || _.options.infinite === false) {
3489                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
3490            } else {
3491                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
3492            }
3493
3494            if (_.options.rtl === true) {
3495                if (targetSlide[0]) {
3496                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
3497                } else {
3498                    targetLeft =  0;
3499                }
3500            } else {
3501                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
3502            }
3503
3504            if (_.options.centerMode === true) {
3505                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
3506                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
3507                } else {
3508                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
3509                }
3510
3511                if (_.options.rtl === true) {
3512                    if (targetSlide[0]) {
3513                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
3514                    } else {
3515                        targetLeft =  0;
3516                    }
3517                } else {
3518                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
3519                }
3520
3521                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
3522            }
3523        }
3524
3525        return targetLeft;
3526
3527    };
3528
3529    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
3530
3531        var _ = this;
3532
3533        return _.options[option];
3534
3535    };
3536
3537    Slick.prototype.getNavigableIndexes = function() {
3538
3539        var _ = this,
3540            breakPoint = 0,
3541            counter = 0,
3542            indexes = [],
3543            max;
3544
3545        if (_.options.infinite === false) {
3546            max = _.slideCount;
3547        } else {
3548            breakPoint = _.options.slidesToScroll * -1;
3549            counter = _.options.slidesToScroll * -1;
3550            max = _.slideCount * 2;
3551        }
3552
3553        while (breakPoint < max) {
3554            indexes.push(breakPoint);
3555            breakPoint = counter + _.options.slidesToScroll;
3556            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
3557        }
3558
3559        return indexes;
3560
3561    };
3562
3563    Slick.prototype.getSlick = function() {
3564
3565        return this;
3566
3567    };
3568
3569    Slick.prototype.getSlideCount = function() {
3570
3571        var _ = this,
3572            slidesTraversed, swipedSlide, centerOffset;
3573
3574        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
3575
3576        if (_.options.swipeToSlide === true) {
3577            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
3578                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
3579                    swipedSlide = slide;
3580                    return false;
3581                }
3582            });
3583
3584            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
3585
3586            return slidesTraversed;
3587
3588        } else {
3589            return _.options.slidesToScroll;
3590        }
3591
3592    };
3593
3594    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
3595
3596        var _ = this;
3597
3598        _.changeSlide({
3599            data: {
3600                message: 'index',
3601                index: parseInt(slide)
3602            }
3603        }, dontAnimate);
3604
3605    };
3606
3607    Slick.prototype.init = function(creation) {
3608
3609        var _ = this;
3610
3611        if (!$(_.$slider).hasClass('slick-initialized')) {
3612
3613            $(_.$slider).addClass('slick-initialized');
3614
3615            _.buildRows();
3616            _.buildOut();
3617            _.setProps();
3618            _.startLoad();
3619            _.loadSlider();
3620            _.initializeEvents();
3621            _.updateArrows();
3622            _.updateDots();
3623            _.checkResponsive(true);
3624            _.focusHandler();
3625
3626        }
3627
3628        if (creation) {
3629            _.$slider.trigger('init', [_]);
3630        }
3631
3632        if (_.options.accessibility === true) {
3633            _.initADA();
3634        }
3635
3636        if ( _.options.autoplay ) {
3637
3638            _.paused = false;
3639            _.autoPlay();
3640
3641        }
3642
3643    };
3644
3645    Slick.prototype.initADA = function() {
3646        var _ = this,
3647                numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
3648                tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
3649                    return (val >= 0) && (val < _.slideCount);
3650                });
3651
3652        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
3653            'aria-hidden': 'true',
3654            'tabindex': '-1'
3655        }).find('a, input, button, select').attr({
3656            'tabindex': '-1'
3657        });
3658
3659        if (_.$dots !== null) {
3660            _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
3661                var slideControlIndex = tabControlIndexes.indexOf(i);
3662
3663                $(this).attr({
3664                    'role': 'tabpanel',
3665                    'id': 'slick-slide' + _.instanceUid + i,
3666                    'tabindex': -1
3667                });
3668
3669                if (slideControlIndex !== -1) {
3670                    $(this).attr({
3671                        'aria-describedby': 'slick-slide-control' + _.instanceUid + slideControlIndex
3672                    });
3673                }
3674            });
3675
3676            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
3677                var mappedSlideIndex = tabControlIndexes[i];
3678
3679                $(this).attr({
3680                    'role': 'presentation'
3681                });
3682
3683                $(this).find('button').first().attr({
3684                    'role': 'tab',
3685                    'id': 'slick-slide-control' + _.instanceUid + i,
3686                    'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
3687                    'aria-label': (i + 1) + ' of ' + numDotGroups,
3688                    'aria-selected': null,
3689                    'tabindex': '-1'
3690                });
3691
3692            }).eq(_.currentSlide).find('button').attr({
3693                'aria-selected': 'true',
3694                'tabindex': '0'
3695            }).end();
3696        }
3697
3698        for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
3699            _.$slides.eq(i).attr('tabindex', 0);
3700        }
3701
3702        _.activateADA();
3703
3704    };
3705
3706    Slick.prototype.initArrowEvents = function() {
3707
3708        var _ = this;
3709
3710        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
3711            _.$prevArrow
3712               .off('click.slick')
3713               .on('click.slick', {
3714                    message: 'previous'
3715               }, _.changeSlide);
3716            _.$nextArrow
3717               .off('click.slick')
3718               .on('click.slick', {
3719                    message: 'next'
3720               }, _.changeSlide);
3721
3722            if (_.options.accessibility === true) {
3723                _.$prevArrow.on('keydown.slick', _.keyHandler);
3724                _.$nextArrow.on('keydown.slick', _.keyHandler);
3725            }
3726        }
3727
3728    };
3729
3730    Slick.prototype.initDotEvents = function() {
3731
3732        var _ = this;
3733
3734        if (_.options.dots === true) {
3735            $('li', _.$dots).on('click.slick', {
3736                message: 'index'
3737            }, _.changeSlide);
3738
3739            if (_.options.accessibility === true) {
3740                _.$dots.on('keydown.slick', _.keyHandler);
3741            }
3742        }
3743
3744        if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {
3745
3746            $('li', _.$dots)
3747                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
3748                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
3749
3750        }
3751
3752    };
3753
3754    Slick.prototype.initSlideEvents = function() {
3755
3756        var _ = this;
3757
3758        if ( _.options.pauseOnHover ) {
3759
3760            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
3761            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
3762
3763        }
3764
3765    };
3766
3767    Slick.prototype.initializeEvents = function() {
3768
3769        var _ = this;
3770
3771        _.initArrowEvents();
3772
3773        _.initDotEvents();
3774        _.initSlideEvents();
3775
3776        _.$list.on('touchstart.slick mousedown.slick', {
3777            action: 'start'
3778        }, _.swipeHandler);
3779        _.$list.on('touchmove.slick mousemove.slick', {
3780            action: 'move'
3781        }, _.swipeHandler);
3782        _.$list.on('touchend.slick mouseup.slick', {
3783            action: 'end'
3784        }, _.swipeHandler);
3785        _.$list.on('touchcancel.slick mouseleave.slick', {
3786            action: 'end'
3787        }, _.swipeHandler);
3788
3789        _.$list.on('click.slick', _.clickHandler);
3790
3791        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
3792
3793        if (_.options.accessibility === true) {
3794            _.$list.on('keydown.slick', _.keyHandler);
3795        }
3796
3797        if (_.options.focusOnSelect === true) {
3798            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
3799        }
3800
3801        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
3802
3803        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
3804
3805        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
3806
3807        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
3808        $(_.setPosition);
3809
3810    };
3811
3812    Slick.prototype.initUI = function() {
3813
3814        var _ = this;
3815
3816        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
3817
3818            _.$prevArrow.show();
3819            _.$nextArrow.show();
3820
3821        }
3822
3823        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
3824
3825            _.$dots.show();
3826
3827        }
3828
3829    };
3830
3831    Slick.prototype.keyHandler = function(event) {
3832
3833        var _ = this;
3834         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
3835        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
3836            if (event.keyCode === 37 && _.options.accessibility === true) {
3837                _.changeSlide({
3838                    data: {
3839                        message: _.options.rtl === true ? 'next' :  'previous'
3840                    }
3841                });
3842            } else if (event.keyCode === 39 && _.options.accessibility === true) {
3843                _.changeSlide({
3844                    data: {
3845                        message: _.options.rtl === true ? 'previous' : 'next'
3846                    }
3847                });
3848            }
3849        }
3850
3851    };
3852
3853    Slick.prototype.lazyLoad = function() {
3854
3855        var _ = this,
3856            loadRange, cloneRange, rangeStart, rangeEnd;
3857
3858        function loadImages(imagesScope) {
3859
3860            $('img[data-lazy]', imagesScope).each(function() {
3861
3862                var image = $(this),
3863                    imageSource = $(this).attr('data-lazy'),
3864                    imageSrcSet = $(this).attr('data-srcset'),
3865                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
3866                    imageToLoad = document.createElement('img');
3867
3868                imageToLoad.onload = function() {
3869
3870                    image
3871                        .animate({ opacity: 0 }, 100, function() {
3872
3873                            if (imageSrcSet) {
3874                                image
3875                                    .attr('srcset', imageSrcSet );
3876
3877                                if (imageSizes) {
3878                                    image
3879                                        .attr('sizes', imageSizes );
3880                                }
3881                            }
3882
3883                            image
3884                                .attr('src', imageSource)
3885                                .animate({ opacity: 1 }, 200, function() {
3886                                    image
3887                                        .removeAttr('data-lazy data-srcset data-sizes')
3888                                        .removeClass('slick-loading');
3889                                });
3890                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
3891                        });
3892
3893                };
3894
3895                imageToLoad.onerror = function() {
3896
3897                    image
3898                        .removeAttr( 'data-lazy' )
3899                        .removeClass( 'slick-loading' )
3900                        .addClass( 'slick-lazyload-error' );
3901
3902                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
3903
3904                };
3905
3906                imageToLoad.src = imageSource;
3907
3908            });
3909
3910        }
3911
3912        if (_.options.centerMode === true) {
3913            if (_.options.infinite === true) {
3914                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
3915                rangeEnd = rangeStart + _.options.slidesToShow + 2;
3916            } else {
3917                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
3918                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
3919            }
3920        } else {
3921            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
3922            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
3923            if (_.options.fade === true) {
3924                if (rangeStart > 0) rangeStart--;
3925                if (rangeEnd <= _.slideCount) rangeEnd++;
3926            }
3927        }
3928
3929        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
3930
3931        if (_.options.lazyLoad === 'anticipated') {
3932            var prevSlide = rangeStart - 1,
3933                nextSlide = rangeEnd,
3934                $slides = _.$slider.find('.slick-slide');
3935
3936            for (var i = 0; i < _.options.slidesToScroll; i++) {
3937                if (prevSlide < 0) prevSlide = _.slideCount - 1;
3938                loadRange = loadRange.add($slides.eq(prevSlide));
3939                loadRange = loadRange.add($slides.eq(nextSlide));
3940                prevSlide--;
3941                nextSlide++;
3942            }
3943        }
3944
3945        loadImages(loadRange);
3946
3947        if (_.slideCount <= _.options.slidesToShow) {
3948            cloneRange = _.$slider.find('.slick-slide');
3949            loadImages(cloneRange);
3950        } else
3951        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
3952            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
3953            loadImages(cloneRange);
3954        } else if (_.currentSlide === 0) {
3955            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
3956            loadImages(cloneRange);
3957        }
3958
3959    };
3960
3961    Slick.prototype.loadSlider = function() {
3962
3963        var _ = this;
3964
3965        _.setPosition();
3966
3967        _.$slideTrack.css({
3968            opacity: 1
3969        });
3970
3971        _.$slider.removeClass('slick-loading');
3972
3973        _.initUI();
3974
3975        if (_.options.lazyLoad === 'progressive') {
3976            _.progressiveLazyLoad();
3977        }
3978
3979    };
3980
3981    Slick.prototype.next = Slick.prototype.slickNext = function() {
3982
3983        var _ = this;
3984
3985        _.changeSlide({
3986            data: {
3987                message: 'next'
3988            }
3989        });
3990
3991    };
3992
3993    Slick.prototype.orientationChange = function() {
3994
3995        var _ = this;
3996
3997        _.checkResponsive();
3998        _.setPosition();
3999
4000    };
4001
4002    Slick.prototype.pause = Slick.prototype.slickPause = function() {
4003
4004        var _ = this;
4005
4006        _.autoPlayClear();
4007        _.paused = true;
4008
4009    };
4010
4011    Slick.prototype.play = Slick.prototype.slickPlay = function() {
4012
4013        var _ = this;
4014
4015        _.autoPlay();
4016        _.options.autoplay = true;
4017        _.paused = false;
4018        _.focussed = false;
4019        _.interrupted = false;
4020
4021    };
4022
4023    Slick.prototype.postSlide = function(index) {
4024
4025        var _ = this;
4026
4027        if( !_.unslicked ) {
4028
4029            _.$slider.trigger('afterChange', [_, index]);
4030
4031            _.animating = false;
4032
4033            if (_.slideCount >= _.options.slidesToShow) {
4034                _.setPosition();
4035            }
4036
4037            _.swipeLeft = null;
4038
4039            if ( _.options.autoplay ) {
4040                _.autoPlay();
4041            }
4042
4043            if (_.options.accessibility === true) {
4044                _.initADA();
4045                // for non-autoplay: once active slide (group) has updated, set focus on first newly showing slide
4046                if (!_.options.autoplay
vendor: 16,834 bytes, lines 4046-4644
4046) {
4047                    var $currentSlide = $(_.$slides.get(_.currentSlide));
4048                    $currentSlide.attr('tabindex', 0).focus();
4049                }
4050            }
4051
4052        }
4053
4054    };
4055
4056    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
4057
4058        var _ = this;
4059
4060        _.changeSlide({
4061            data: {
4062                message: 'previous'
4063            }
4064        });
4065
4066    };
4067
4068    Slick.prototype.preventDefault = function(event) {
4069
4070        event.preventDefault();
4071
4072    };
4073
4074    Slick.prototype.progressiveLazyLoad = function( tryCount ) {
4075
4076        tryCount = tryCount || 1;
4077
4078        var _ = this,
4079            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
4080            image,
4081            imageSource,
4082            imageSrcSet,
4083            imageSizes,
4084            imageToLoad;
4085
4086        if ( $imgsToLoad.length ) {
4087
4088            image = $imgsToLoad.first();
4089            imageSource = image.attr('data-lazy');
4090            imageSrcSet = image.attr('data-srcset');
4091            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');
4092            imageToLoad = document.createElement('img');
4093
4094            imageToLoad.onload = function() {
4095
4096                if (imageSrcSet) {
4097                    image
4098                        .attr('srcset', imageSrcSet );
4099
4100                    if (imageSizes) {
4101                        image
4102                            .attr('sizes', imageSizes );
4103                    }
4104                }
4105
4106                image
4107                    .attr( 'src', imageSource )
4108                    .removeAttr('data-lazy data-srcset data-sizes')
4109                    .removeClass('slick-loading');
4110
4111                if ( _.options.adaptiveHeight === true ) {
4112                    _.setPosition();
4113                }
4114
4115                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
4116                _.progressiveLazyLoad();
4117
4118            };
4119
4120            imageToLoad.onerror = function() {
4121
4122                if ( tryCount < 3 ) {
4123
4124                    /**
4125                     * try to load the image 3 times,
4126                     * leave a slight delay so we don't get
4127                     * servers blocking the request.
4128                     */
4129                    setTimeout( function() {
4130                        _.progressiveLazyLoad( tryCount + 1 );
4131                    }, 500 );
4132
4133                } else {
4134
4135                    image
4136                        .removeAttr( 'data-lazy' )
4137                        .removeClass( 'slick-loading' )
4138                        .addClass( 'slick-lazyload-error' );
4139
4140                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
4141
4142                    _.progressiveLazyLoad();
4143
4144                }
4145
4146            };
4147
4148            imageToLoad.src = imageSource;
4149
4150        } else {
4151
4152            _.$slider.trigger('allImagesLoaded', [ _ ]);
4153
4154        }
4155
4156    };
4157
4158    Slick.prototype.refresh = function( initializing ) {
4159
4160        var _ = this, currentSlide, lastVisibleIndex;
4161
4162        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
4163
4164        // in non-infinite sliders, we don't want to go past the
4165        // last visible index.
4166        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
4167            _.currentSlide = lastVisibleIndex;
4168        }
4169
4170        // if less slides than to show, go to start.
4171        if ( _.slideCount <= _.options.slidesToShow ) {
4172            _.currentSlide = 0;
4173
4174        }
4175
4176        currentSlide = _.currentSlide;
4177
4178        _.destroy(true);
4179
4180        $.extend(_, _.initials, { currentSlide: currentSlide });
4181
4182        _.init();
4183
4184        if( !initializing ) {
4185
4186            _.changeSlide({
4187                data: {
4188                    message: 'index',
4189                    index: currentSlide
4190                }
4191            }, false);
4192
4193        }
4194
4195    };
4196
4197    Slick.prototype.registerBreakpoints = function() {
4198
4199        var _ = this, breakpoint, currentBreakpoint, l,
4200            responsiveSettings = _.options.responsive || null;
4201
4202        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
4203
4204            _.respondTo = _.options.respondTo || 'window';
4205
4206            for ( breakpoint in responsiveSettings ) {
4207
4208                l = _.breakpoints.length-1;
4209
4210                if (responsiveSettings.hasOwnProperty(breakpoint)) {
4211                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
4212
4213                    // loop through the breakpoints and cut out any existing
4214                    // ones with the same breakpoint number, we don't want dupes.
4215                    while( l >= 0 ) {
4216                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
4217                            _.breakpoints.splice(l,1);
4218                        }
4219                        l--;
4220                    }
4221
4222                    _.breakpoints.push(currentBreakpoint);
4223                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
4224
4225                }
4226
4227            }
4228
4229            _.breakpoints.sort(function(a, b) {
4230                return ( _.options.mobileFirst ) ? a-b : b-a;
4231            });
4232
4233        }
4234
4235    };
4236
4237    Slick.prototype.reinit = function() {
4238
4239        var _ = this;
4240
4241        _.$slides =
4242            _.$slideTrack
4243                .children(_.options.slide)
4244                .addClass('slick-slide');
4245
4246        _.slideCount = _.$slides.length;
4247
4248        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
4249            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
4250        }
4251
4252        if (_.slideCount <= _.options.slidesToShow) {
4253            _.currentSlide = 0;
4254        }
4255
4256        _.registerBreakpoints();
4257
4258        _.setProps();
4259        _.setupInfinite();
4260        _.buildArrows();
4261        _.updateArrows();
4262        _.initArrowEvents();
4263        _.buildDots();
4264        _.updateDots();
4265        _.initDotEvents();
4266        _.cleanUpSlideEvents();
4267        _.initSlideEvents();
4268
4269        _.checkResponsive(false, true);
4270
4271        if (_.options.focusOnSelect === true) {
4272            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
4273        }
4274
4275        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
4276
4277        _.setPosition();
4278        _.focusHandler();
4279
4280        _.paused = !_.options.autoplay;
4281        _.autoPlay();
4282
4283        _.$slider.trigger('reInit', [_]);
4284
4285    };
4286
4287    Slick.prototype.resize = function() {
4288
4289        var _ = this;
4290
4291        if ($(window).width() !== _.windowWidth) {
4292            clearTimeout(_.windowDelay);
4293            _.windowDelay = window.setTimeout(function() {
4294                _.windowWidth = $(window).width();
4295                _.checkResponsive();
4296                if( !_.unslicked ) { _.setPosition(); }
4297            }, 50);
4298        }
4299    };
4300
4301    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
4302
4303        var _ = this;
4304
4305        if (typeof(index) === 'boolean') {
4306            removeBefore = index;
4307            index = removeBefore === true ? 0 : _.slideCount - 1;
4308        } else {
4309            index = removeBefore === true ? --index : index;
4310        }
4311
4312        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
4313            return false;
4314        }
4315
4316        _.unload();
4317
4318        if (removeAll === true) {
4319            _.$slideTrack.children().remove();
4320        } else {
4321            _.$slideTrack.children(this.options.slide).eq(index).remove();
4322        }
4323
4324        _.$slides = _.$slideTrack.children(this.options.slide);
4325
4326        _.$slideTrack.children(this.options.slide).detach();
4327
4328        _.$slideTrack.append(_.$slides);
4329
4330        _.$slidesCache = _.$slides;
4331
4332        _.reinit();
4333
4334    };
4335
4336    Slick.prototype.setCSS = function(position) {
4337
4338        var _ = this,
4339            positionProps = {},
4340            x, y;
4341
4342        if (_.options.rtl === true) {
4343            position = -position;
4344        }
4345        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
4346        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
4347
4348        positionProps[_.positionProp] = position;
4349
4350        if (_.transformsEnabled === false) {
4351            _.$slideTrack.css(positionProps);
4352        } else {
4353            positionProps = {};
4354            if (_.cssTransitions === false) {
4355                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
4356                _.$slideTrack.css(positionProps);
4357            } else {
4358                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
4359                _.$slideTrack.css(positionProps);
4360            }
4361        }
4362
4363    };
4364
4365    Slick.prototype.setDimensions = function() {
4366
4367        var _ = this;
4368
4369        if (_.options.vertical === false) {
4370            if (_.options.centerMode === true) {
4371                _.$list.css({
4372                    padding: ('0px ' + _.options.centerPadding)
4373                });
4374            }
4375        } else {
4376            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
4377            if (_.options.centerMode === true) {
4378                _.$list.css({
4379                    padding: (_.options.centerPadding + ' 0px')
4380                });
4381            }
4382        }
4383
4384        _.listWidth = _.$list.width();
4385        _.listHeight = _.$list.height();
4386
4387
4388        if (_.options.vertical === false && _.options.variableWidth === false) {
4389            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
4390            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
4391
4392        } else if (_.options.variableWidth === true) {
4393            _.$slideTrack.width(5000 * _.slideCount);
4394        } else {
4395            _.slideWidth = Math.ceil(_.listWidth);
4396            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
4397        }
4398
4399        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
4400        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
4401
4402    };
4403
4404    Slick.prototype.setFade = function() {
4405
4406        var _ = this,
4407            targetLeft;
4408
4409        _.$slides.each(function(index, element) {
4410            targetLeft = (_.slideWidth * index) * -1;
4411            if (_.options.rtl === true) {
4412                $(element).css({
4413                    position: 'relative',
4414                    right: targetLeft,
4415                    top: 0,
4416                    zIndex: _.options.zIndex - 2,
4417                    opacity: 0
4418                });
4419            } else {
4420                $(element).css({
4421                    position: 'relative',
4422                    left: targetLeft,
4423                    top: 0,
4424                    zIndex: _.options.zIndex - 2,
4425                    opacity: 0
4426                });
4427            }
4428        });
4429
4430        _.$slides.eq(_.currentSlide).css({
4431            zIndex: _.options.zIndex - 1,
4432            opacity: 1
4433        });
4434
4435    };
4436
4437    Slick.prototype.setHeight = function() {
4438
4439        var _ = this;
4440
4441        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
4442            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
4443            _.$list.css('height', targetHeight);
4444        }
4445
4446    };
4447
4448    Slick.prototype.setOption =
4449    Slick.prototype.slickSetOption = function() {
4450
4451        /**
4452         * accepts arguments in format of:
4453         *
4454         *  - for changing a single option's value:
4455         *     .slick("setOption", option, value, refresh )
4456         *
4457         *  - for changing a set of responsive options:
4458         *     .slick("setOption", 'responsive', [{}, ...], refresh )
4459         *
4460         *  - for updating multiple values at once (not responsive)
4461         *     .slick("setOption", { 'option': value, ... }, refresh )
4462         */
4463
4464        var _ = this, l, item, option, value, refresh = false, type;
4465
4466        if( $.type( arguments[0] ) === 'object' ) {
4467
4468            option =  arguments[0];
4469            refresh = arguments[1];
4470            type = 'multiple';
4471
4472        } else if ( $.type( arguments[0] ) === 'string' ) {
4473
4474            option =  arguments[0];
4475            value = arguments[1];
4476            refresh = arguments[2];
4477
4478            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
4479
4480                type = 'responsive';
4481
4482            } else if ( typeof arguments[1] !== 'undefined' ) {
4483
4484                type = 'single';
4485
4486            }
4487
4488        }
4489
4490        if ( type === 'single' ) {
4491
4492            _.options[option] = value;
4493
4494
4495        } else if ( type === 'multiple' ) {
4496
4497            $.each( option , function( opt, val ) {
4498
4499                _.options[opt] = val;
4500
4501            });
4502
4503
4504        } else if ( type === 'responsive' ) {
4505
4506            for ( item in value ) {
4507
4508                if( $.type( _.options.responsive ) !== 'array' ) {
4509
4510                    _.options.responsive = [ value[item] ];
4511
4512                } else {
4513
4514                    l = _.options.responsive.length-1;
4515
4516                    // loop through the responsive object and splice out duplicates.
4517                    while( l >= 0 ) {
4518
4519                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
4520
4521                            _.options.responsive.splice(l,1);
4522
4523                        }
4524
4525                        l--;
4526
4527                    }
4528
4529                    _.options.responsive.push( value[item] );
4530
4531                }
4532
4533            }
4534
4535        }
4536
4537        if ( refresh ) {
4538
4539            _.unload();
4540            _.reinit();
4541
4542        }
4543
4544    };
4545
4546    Slick.prototype.setPosition = function() {
4547
4548        var _ = this;
4549
4550        _.setDimensions();
4551
4552        _.setHeight();
4553
4554        if (_.options.fade === false) {
4555            _.setCSS(_.getLeft(_.currentSlide));
4556        } else {
4557            _.setFade();
4558        }
4559
4560        _.$slider.trigger('setPosition', [_]);
4561
4562    };
4563
4564    Slick.prototype.setProps = function() {
4565
4566        var _ = this,
4567            bodyStyle = document.body.style;
4568
4569        _.positionProp = _.options.vertical === true ? 'top' : 'left';
4570
4571        if (_.positionProp === 'top') {
4572            _.$slider.addClass('slick-vertical');
4573        } else {
4574            _.$slider.removeClass('slick-vertical');
4575        }
4576
4577        if (bodyStyle.WebkitTransition !== undefined ||
4578            bodyStyle.MozTransition !== undefined ||
4579            bodyStyle.msTransition !== undefined) {
4580            if (_.options.useCSS === true) {
4581                _.cssTransitions = true;
4582            }
4583        }
4584
4585        if ( _.options.fade ) {
4586            if ( typeof _.options.zIndex === 'number' ) {
4587                if( _.options.zIndex < 3 ) {
4588                    _.options.zIndex = 3;
4589                }
4590            } else {
4591                _.options.zIndex = _.defaults.zIndex;
4592            }
4593        }
4594
4595        if (bodyStyle.OTransform !== undefined) {
4596            _.animType = 'OTransform';
4597            _.transformType = '-o-transform';
4598            _.transitionType = 'OTransition';
4599            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
4600        }
4601        if (bodyStyle.MozTransform !== undefined) {
4602            _.animType = 'MozTransform';
4603            _.transformType = '-moz-transform';
4604            _.transitionType = 'MozTransition';
4605            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
4606        }
4607        if (bodyStyle.webkitTransform !== undefined) {
4608            _.animType = 'webkitTransform';
4609            _.transformType = '-webkit-transform';
4610            _.transitionType = 'webkitTransition';
4611            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
4612        }
4613        if (bodyStyle.msTransform !== undefined) {
4614            _.animType = 'msTransform';
4615            _.transformType = '-ms-transform';
4616            _.transitionType = 'msTransition';
4617            if (bodyStyle.msTransform === undefined) _.animType = false;
4618        }
4619        if (bodyStyle.transform !== undefined && _.animType !== false) {
4620            _.animType = 'transform';
4621            _.transformType = 'transform';
4622            _.transitionType = 'transition';
4623        }
4624        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
4625    };
4626
4627
4628    Slick.prototype.setSlideClasses = function(index) {
4629
4630        var _ = this,
4631            centerOffset, allSlides, indexOffset, remainder;
4632
4633        allSlides = _.$slider
4634            .find('.slick-slide')
4635            .removeClass('slick-active slick-center slick-current')
4636            .attr('aria-hidden', 'true');
4637
4638        _.$slides
4639            .eq(index)
4640            .addClass('slick-current');
4641
4642        if (_.options.centerMode === true) {
4643
4644            
vendor: 16,616 bytes, lines 4644-5194
4644centerOffset = Math.floor(_.options.slidesToShow / 2);
4645
4646            if (_.options.infinite === true) {
4647
4648                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
4649
4650                    _.$slides
4651                        .slice(index - centerOffset, index + centerOffset + 1)
4652                        .addClass('slick-active')
4653                        .attr('aria-hidden', 'false');
4654
4655                } else {
4656
4657                    indexOffset = _.options.slidesToShow + index;
4658                    allSlides
4659                        .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
4660                        .addClass('slick-active')
4661                        .attr('aria-hidden', 'false');
4662
4663                }
4664
4665                if (index === 0) {
4666
4667                    allSlides
4668                        .eq(allSlides.length - 1 - _.options.slidesToShow)
4669                        .addClass('slick-center');
4670
4671                } else if (index === _.slideCount - 1) {
4672
4673                    allSlides
4674                        .eq(_.options.slidesToShow)
4675                        .addClass('slick-center');
4676
4677                }
4678
4679            }
4680
4681            _.$slides
4682                .eq(index)
4683                .addClass('slick-center');
4684
4685        } else {
4686
4687            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
4688
4689                _.$slides
4690                    .slice(index, index + _.options.slidesToShow)
4691                    .addClass('slick-active')
4692                    .attr('aria-hidden', 'false');
4693
4694            } else if (allSlides.length <= _.options.slidesToShow) {
4695
4696                allSlides
4697                    .addClass('slick-active')
4698                    .attr('aria-hidden', 'false');
4699
4700            } else {
4701
4702                remainder = _.slideCount % _.options.slidesToShow;
4703                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
4704
4705                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
4706
4707                    allSlides
4708                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
4709                        .addClass('slick-active')
4710                        .attr('aria-hidden', 'false');
4711
4712                } else {
4713
4714                    allSlides
4715                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
4716                        .addClass('slick-active')
4717                        .attr('aria-hidden', 'false');
4718
4719                }
4720
4721            }
4722
4723        }
4724
4725        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
4726            _.lazyLoad();
4727        }
4728    };
4729
4730    Slick.prototype.setupInfinite = function() {
4731
4732        var _ = this,
4733            i, slideIndex, infiniteCount;
4734
4735        if (_.options.fade === true) {
4736            _.options.centerMode = false;
4737        }
4738
4739        if (_.options.infinite === true && _.options.fade === false) {
4740
4741            slideIndex = null;
4742
4743            if (_.slideCount > _.options.slidesToShow) {
4744
4745                if (_.options.centerMode === true) {
4746                    infiniteCount = _.options.slidesToShow + 1;
4747                } else {
4748                    infiniteCount = _.options.slidesToShow;
4749                }
4750
4751                for (i = _.slideCount; i > (_.slideCount - infiniteCount); i -= 1) {
4752                    slideIndex = i - 1;
4753                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
4754                        .attr('data-slick-index', slideIndex - _.slideCount)
4755                        .prependTo(_.$slideTrack).addClass('slick-cloned');
4756                }
4757                for (i = 0; i < infiniteCount  + _.slideCount; i += 1) {
4758                    slideIndex = i;
4759                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
4760                        .attr('data-slick-index', slideIndex + _.slideCount)
4761                        .appendTo(_.$slideTrack).addClass('slick-cloned');
4762                }
4763                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
4764                    $(this).attr('id', '');
4765                });
4766
4767            }
4768            else if (_.slideCount === _.options.slidesToShow) {
4769
4770                if (_.options.centerMode === true) {
4771                    infiniteCount = _.options.slidesToShow + 1;
4772                } else {
4773                    infiniteCount = _.options.slidesToShow;
4774                }
4775
4776                for (i = _.slideCount; i > (_.slideCount - infiniteCount); i -= 1) {
4777                    slideIndex = i - 1;
4778                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
4779                        .attr('data-slick-index', slideIndex - _.slideCount)
4780                        .prependTo(_.$slideTrack).addClass('slick-cloned');
4781                }
4782                for (i = 0; i < infiniteCount  + _.slideCount - 1; i += 1) {
4783                    slideIndex = i;
4784                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
4785                        .attr('data-slick-index', slideIndex + _.slideCount)
4786                        .appendTo(_.$slideTrack).addClass('slick-cloned');
4787                }
4788                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
4789                    $(this).attr('id', '');
4790                });
4791
4792            }
4793
4794        }
4795
4796    };
4797
4798    Slick.prototype.interrupt = function( toggle ) {
4799
4800        var _ = this;
4801
4802        if( !toggle ) {
4803            _.autoPlay();
4804        }
4805        _.interrupted = toggle;
4806
4807    };
4808
4809    Slick.prototype.selectHandler = function(event) {
4810
4811        var _ = this;
4812
4813        var targetElement =
4814            $(event.target).is('.slick-slide') ?
4815                $(event.target) :
4816                $(event.target).parents('.slick-slide');
4817
4818        var index = parseInt(targetElement.attr('data-slick-index'));
4819
4820        if (!index) index = 0;
4821
4822        if (_.slideCount <= _.options.slidesToShow) {
4823
4824            _.slideHandler(index, false, true);
4825            return;
4826
4827        }
4828
4829        _.slideHandler(index);
4830
4831    };
4832
4833    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
4834
4835        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
4836            _ = this, navTarget;
4837
4838        sync = sync || false;
4839
4840        if (_.animating === true && _.options.waitForAnimate === true) {
4841            return;
4842        }
4843
4844        if (_.options.fade === true && _.currentSlide === index) {
4845            return;
4846        }
4847
4848        if (sync === false) {
4849            _.asNavFor(index);
4850        }
4851
4852        targetSlide = index;
4853        targetLeft = _.getLeft(targetSlide);
4854        slideLeft = _.getLeft(_.currentSlide);
4855
4856        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
4857
4858        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
4859            if (_.options.fade === false) {
4860                targetSlide = _.currentSlide;
4861                if (dontAnimate !== true) {
4862                    _.animateSlide(slideLeft, function() {
4863                        _.postSlide(targetSlide);
4864                    });
4865                } else {
4866                    _.postSlide(targetSlide);
4867                }
4868            }
4869            return;
4870        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
4871            if (_.options.fade === false) {
4872                targetSlide = _.currentSlide;
4873                if (dontAnimate !== true) {
4874                    _.animateSlide(slideLeft, function() {
4875                        _.postSlide(targetSlide);
4876                    });
4877                } else {
4878                    _.postSlide(targetSlide);
4879                }
4880            }
4881            return;
4882        }
4883
4884        if ( _.options.autoplay ) {
4885            clearInterval(_.autoPlayTimer);
4886        }
4887
4888        if (targetSlide < 0) {
4889            if (_.slideCount % _.options.slidesToScroll !== 0) {
4890                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
4891            } else {
4892                animSlide = _.slideCount + targetSlide;
4893            }
4894        } else if (targetSlide >= _.slideCount) {
4895            if (_.slideCount % _.options.slidesToScroll !== 0) {
4896                animSlide = 0;
4897            } else {
4898                animSlide = targetSlide - _.slideCount;
4899            }
4900        } else {
4901            animSlide = targetSlide;
4902        }
4903
4904        _.animating = true;
4905
4906        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
4907
4908        oldSlide = _.currentSlide;
4909        _.currentSlide = animSlide;
4910
4911        _.setSlideClasses(_.currentSlide);
4912
4913        if ( _.options.asNavFor ) {
4914
4915            navTarget = _.getNavTarget();
4916            navTarget = navTarget.slick('getSlick');
4917
4918            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
4919                navTarget.setSlideClasses(_.currentSlide);
4920            }
4921
4922        }
4923
4924        _.updateDots();
4925        _.updateArrows();
4926
4927        if (_.options.fade === true) {
4928            if (dontAnimate !== true) {
4929
4930                _.fadeSlideOut(oldSlide);
4931
4932                _.fadeSlide(animSlide, function() {
4933                    _.postSlide(animSlide);
4934                });
4935
4936            } else {
4937                _.postSlide(animSlide);
4938            }
4939            _.animateHeight();
4940            return;
4941        }
4942
4943        if (dontAnimate !== true) {
4944            _.animateSlide(targetLeft, function() {
4945                _.postSlide(animSlide);
4946            });
4947        } else {
4948            _.postSlide(animSlide);
4949        }
4950
4951    };
4952
4953    Slick.prototype.startLoad = function() {
4954
4955        var _ = this;
4956
4957        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
4958
4959            _.$prevArrow.hide();
4960            _.$nextArrow.hide();
4961
4962        }
4963
4964        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
4965
4966            _.$dots.hide();
4967
4968        }
4969
4970        _.$slider.addClass('slick-loading');
4971
4972    };
4973
4974    Slick.prototype.swipeDirection = function() {
4975
4976        var xDist, yDist, r, swipeAngle, _ = this;
4977
4978        xDist = _.touchObject.startX - _.touchObject.curX;
4979        yDist = _.touchObject.startY - _.touchObject.curY;
4980        r = Math.atan2(yDist, xDist);
4981
4982        swipeAngle = Math.round(r * 180 / Math.PI);
4983        if (swipeAngle < 0) {
4984            swipeAngle = 360 - Math.abs(swipeAngle);
4985        }
4986
4987        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
4988            return (_.options.rtl === false ? 'left' : 'right');
4989        }
4990        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
4991            return (_.options.rtl === false ? 'left' : 'right');
4992        }
4993        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
4994            return (_.options.rtl === false ? 'right' : 'left');
4995        }
4996        if (_.options.verticalSwiping === true) {
4997            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
4998                return 'down';
4999            } else {
5000                return 'up';
5001            }
5002        }
5003
5004        return 'vertical';
5005
5006    };
5007
5008    Slick.prototype.swipeEnd = function(event) {
5009
5010        var _ = this,
5011            slideCount,
5012            direction;
5013
5014        _.dragging = false;
5015        _.swiping = false;
5016
5017        if (_.scrolling) {
5018            _.scrolling = false;
5019            return false;
5020        }
5021
5022        _.interrupted = false;
5023        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
5024
5025        if ( _.touchObject.curX === undefined ) {
5026            return false;
5027        }
5028
5029        if ( _.touchObject.edgeHit === true ) {
5030            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
5031        }
5032
5033        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
5034
5035            direction = _.swipeDirection();
5036
5037            switch ( direction ) {
5038
5039                case 'left':
5040                case 'down':
5041
5042                    slideCount =
5043                        _.options.swipeToSlide ?
5044                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
5045                            _.currentSlide + _.getSlideCount();
5046
5047                    _.currentDirection = 0;
5048
5049                    break;
5050
5051                case 'right':
5052                case 'up':
5053
5054                    slideCount =
5055                        _.options.swipeToSlide ?
5056                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
5057                            _.currentSlide - _.getSlideCount();
5058
5059                    _.currentDirection = 1;
5060
5061                    break;
5062
5063                default:
5064
5065
5066            }
5067
5068            if( direction != 'vertical' ) {
5069
5070                _.slideHandler( slideCount );
5071                _.touchObject = {};
5072                _.$slider.trigger('swipe', [_, direction ]);
5073
5074            }
5075
5076        } else {
5077
5078            if ( _.touchObject.startX !== _.touchObject.curX ) {
5079
5080                _.slideHandler( _.currentSlide );
5081                _.touchObject = {};
5082
5083            }
5084
5085        }
5086
5087    };
5088
5089    Slick.prototype.swipeHandler = function(event) {
5090
5091        var _ = this;
5092
5093        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
5094            return;
5095        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
5096            return;
5097        }
5098
5099        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
5100            event.originalEvent.touches.length : 1;
5101
5102        _.touchObject.minSwipe = _.listWidth / _.options
5103            .touchThreshold;
5104
5105        if (_.options.verticalSwiping === true) {
5106            _.touchObject.minSwipe = _.listHeight / _.options
5107                .touchThreshold;
5108        }
5109
5110        switch (event.data.action) {
5111
5112            case 'start':
5113                _.swipeStart(event);
5114                break;
5115
5116            case 'move':
5117                _.swipeMove(event);
5118                break;
5119
5120            case 'end':
5121                _.swipeEnd(event);
5122                break;
5123
5124        }
5125
5126    };
5127
5128    Slick.prototype.swipeMove = function(event) {
5129
5130        var _ = this,
5131            edgeWasHit = false,
5132            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
5133
5134        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
5135
5136        if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
5137            return false;
5138        }
5139
5140        curLeft = _.getLeft(_.currentSlide);
5141
5142        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
5143        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
5144
5145        _.touchObject.swipeLength = Math.round(Math.sqrt(
5146            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
5147
5148        verticalSwipeLength = Math.round(Math.sqrt(
5149            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
5150
5151        if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
5152            _.scrolling = true;
5153            return false;
5154        }
5155
5156        if (_.options.verticalSwiping === true) {
5157            _.touchObject.swipeLength = verticalSwipeLength;
5158        }
5159
5160        swipeDirection = _.swipeDirection();
5161
5162        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
5163            _.swiping = true;
5164            event.preventDefault();
5165        }
5166
5167        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
5168        if (_.options.verticalSwiping === true) {
5169            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
5170        }
5171
5172
5173        swipeLength = _.touchObject.swipeLength;
5174
5175        _.touchObject.edgeHit = false;
5176
5177        if (_.options.infinite === false) {
5178            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
5179                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
5180                _.touchObject.edgeHit = true;
5181            }
5182        }
5183
5184        if (_.options.vertical === false) {
5185            _.swipeLeft = curLeft + swipeLength * positionOffset;
5186        } else {
5187            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
5188        }
5189        if (_.options.verticalSwiping === true) {
5190            _.swipeLeft = curLeft + swipeLength * positionOffset;
5191        }
5192
5193        if (_.options.fade === true || _.options.touchMove === false) {
5194            return false;
5195        }
5196
5197        if (_.animating === true) {
5198            _.swipeLeft = null;
5199            return false;
5200        }
5201
5202        _.setCSS(_.swipeLeft);
5203
5204    };
5205
5206    Slick.prototype.swipeStart = function(event) {
5207
5208        var _ = this,
5209            touches;
5210
5211        _.interrupted = true;
5212
5213        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
5214            _.touchObject = {};
5215            return false;
5216        }
5217
5218        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
5219            touches = event.originalEvent.touches[0];
5220        }
5221
5222        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
5223        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
5224
5225        _.dragging = true;
5226
5227    };
5228
5229    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
5230
5231        var _ = this;
5232
5233        if (_.$slidesCache !== null) {
5234
5235            _.unload();
5236
5237            _.$slideTrack.children(this.options.slide).detach();
5238
5239            _.$slidesCache.appendTo(_.$slideTrack);
5240
5241            _.reinit();
5242
5243        }
5244
5245    };
5246
5247    Slick.prototype.unload = function() {
5248
5249        var _ = this;
5250
5251        $('.slick-cloned', _.$slider).remove();
5252
5253        if (_.$dots) {
5254            _.$dots.remove();
5255        }
5256
5257        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
5258            _.$prevArrow.remove();
5259        }
5260
5261        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
5262            _.$nextArrow.remove();
5263        }
5264
5265        _.$slides
5266            .removeClass('slick-slide slick-active slick-visible slick-current')
5267            .attr('aria-hidden', 'true')
5268            .css('width', '');
5269
5270    };
5271
5272    Slick.prototype.unslick = function(fromBreakpoint) {
5273
5274        var _ = this;
5275        _.$slider.trigger('unslick', [_, fromBreakpoint]);
5276        _.destroy();
5277
5278    };
5279
5280    Slick.prototype.updateArrows = function() {
5281
5282        var _ = this,
5283            centerOffset;
5284
5285        centerOffset = Math.floor(_.options.slidesToShow / 2);
5286
5287        if ( _.options.arrows === true &&
5288            _.slideCount > _.options.slidesToShow &&
5289            !_.options.infinite ) {
5290
5291            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5292            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5293
5294            if (_.currentSlide === 0) {
5295
5296                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
5297                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5298
5299            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
5300
5301                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
5302                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5303
5304            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
5305
5306                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
5307                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
5308
5309            }
5310
5311        }
5312
5313    };
5314
5315    Slick.prototype.updateDots = function() {
5316
5317        var _ = this;
5318
5319        if (_.$dots !== null) {
5320
5321            _.$dots
5322                .find('li')
5323                    .removeClass('slick-active')
5324                    .end();
5325
5326            _.$dots
5327                .find('li')
5328                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
5329                .addClass('slick-active');
5330
5331        }
5332
5333    };
5334
5335    Slick.prototype.visibility = function() {
5336
5337        var _ = this;
5338
5339        if ( _.options.autoplay ) {
5340
5341            if ( document[_.hidden] ) {
5342
5343                _.interrupted = true;
5344
5345            } else {
5346
5347                _.interrupted = false;
5348
5349            }
5350
5351        }
5352
5353    };
5354
5355    $.fn.slick = function() {
5356        var _ = this,
5357            opt = arguments[0],
5358            args = Array.prototype.slice.call(arguments, 1),
5359            l = _.length,
5360            i,
5361            ret;
5362        for (i = 0; i < l; i++) {
5363            if (typeof opt == 'object' || typeof opt == 'undefined')
5364                _[i].slick = new Slick(_[i], opt);
5365            else
5366                ret = _[i].slick[opt].apply(_[i].slick, args);
5367            if (typeof ret != 'undefined') return ret;
5368        }
5369        return _;
5370    };
5371
5372}));
5373
5374/*
5375 * CSSMap plugin
5376 * version: 5.5.3
5377 * author: Łukasz Popardowski { Winston_Wolf }
5378 * license: http://cssmapsplugin.com/license
5379 * FAQ: http://cssmapsplugin.com/faq
5380 * web: http://cssmapsplugin.com
5381 * email: http://cssmapsplugin.com/contact
5382 * twitter: @CSSMapplugin
5383 */
5384eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(k($){"9D cS";$.4I.5I=k(o){q d={2x:0,2G:"2c",1O:"1h",4E:5,3r:u,2J:"2a",5N:u,5Q:[],5S:u,7E:u,7F:"cQ ...",U:{1u:u,2d:"",4e:"2r",2I:1,6d:0,6c:0,7h:[]},1e:{1u:u,6a:"3T.cN",6R:"cK",4j:"1l",2t:"+",83:u,2j:0,68:"cJ cI cC cB %d 1l! || 1S!"},1P:{1u:u,3o:"",63:0,3Q:u},I:{1u:u,6j:"",2v:0,3P:"B-cy",3O:"B-1E-5Z",7S:"2H",8c:"1A",8r:u,4g:2O},1f:{1u:u,4w:"",2D:"",4H:"",4a:"7j"},1i:{1u:u,5Y:u,2Z:"",5X:"",2t:"|",4k:"",4t:""},8h:k(e){},8x:k(e){},2L:k(e){},2T:k(e){},6l:k(e){},6n:u,6r:u},3v=k(a){N"<2B Y=\\"B-4i\\"><p><b>5I 4i</b> - "+a+"</p></2B>"},7J="<2B Y=\\"B-5W\\"><a 1d=\\"5V://cx.5U/?cv="+5T.2A.1d+"\\" 3x=\\"cq\\"><b>5I cp</b> by Łcn ci</a></2B>";j(o){q w=5T,s=$.cg(2O,d,o||{}),5P=w.2A.4l,bW=$(w).3C(),bH=$(w).2W(),5O=((7W.81.2m("8b 7.")!=-1||7W.81.2m("8b 8.")!=-1)?2O:u),5M,3Z=u,ce,2X={"cd":{F:"cc",cs:[34,17,7,14,11,5,18,2,4,20,21,3,14,9,29,3,9,3,11,22,10,4,7,11,3,13,5,7,23,12,2,7,24,17,2,2,13,26,13,19,14,3,4,7,3,10,3,4,18,6,28,19,21,3,4,9,6,14,16,11],G:[
53841q,J,K,E,Q,P,L,R,1g,1w],O:[6M,4F,cb,79,7b,7c,3q,5J,4K,c9]},"c8":{F:"ar",cs:[3,37,32,25,23,21,24,19,31,23,17,25,26,14,28,36,38,27,12,34,30,17,21,13,11],G:[1a,1q,J,K,E,Q,P,L,R],O:[3E,E,5H,5J,c7,c6,c5,c4,c3]},"c2":{F:"au",cs:[3,26,18,31,13,11,21,31],G:[1a,J,K,E,Q,P,L,R,1g],O:[3n,5G,3F,6k,3h,4B,6o,c1,bZ]},"bY":{F:"at",cs:[25,29,50,45,36,38,45,12,6],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[6O,5F,6W,4F,3y,3F,6Z,3Y,7c,3q]},"bX":{F:"be",cs:[32,9,43,46,53,48,41,48,49,22,32],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[5F,7p,3y,3m,E,3h,bV,3q,7z,bU]},"bR":{F:"br",cs:[14,9,18,44,38,13,3,8,24,24,31,23,31,38,14,14,19,21,11,9,25,16,17,15,22,8,23],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[7K,bQ,3E,5B,bP,bO,bN,7X,bL,bK]},"86":{F:"ca",cs:[21,32,14,14,37,35,10,45,31,3,42,14,28],G:[1q,J,K,E,Q,P,L,R,1g,1w],O:[5y,8e,8f,bJ,5B,bI,8j,5v,bF,bE]},"bD":{F:"cl",cs:[11,4,10,13,9,8,12,7,9,7,20,7,11,7,9],G:[3n,4F,4z,4A,3m,8s],O:[bA,bz,8v,bv,bu,bt]},"bs":{F:"co",cs:[51,47,16,5,9,29,36,17,49,28,30,27,38,20,30,29,33,24,20,20,44,26,21,22,7,10,2,25,17,20,23,36,23],G:[1a,J,K,E,Q,P,L,R],O:[6m,4J,5q,bo,5p,bn,bm,bl]},"bj":{F:"c",cs:[20,35,19,23,35,15,3],G:[1a,1q,J,K,E,Q,P,L,R,1g,1w],O:[bh,bf,6J,7K,5o,5n,5m,3E,5l,5k,bd]},"bc":{F:"bb",cs:[24,27,36,10,15,24,20,11,26,8,21,18,21,30,28,29,13,18,21,33,35],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[3n,4d,ba,3Y,5i,b5,b4,b2,b1,b0]},"aZ":{F:"cu",cs:[7,24,22,11,15,13,4,19,10,13,15,6,16,17,11,20],G:[1q,J,K,E,Q,P,L,R,1g,1w],O:[95,7g,5F,5y,aX,6m,J,8f,5l,aW]},"aV-aU":{F:"cs",cs:[8,34,38,15,34,26,18,30,38,26,25,46,24,23],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[7g,aS,7p,7n,5m,3m,7o,5q,5b,5p]},"aR":{F:"aQ",cs:[5,2,9,10,5,6,7,10,4,9,9,5,15,22,7,14,12,8,7,7,2,24,2,7,2,7,2,4,3,7,2,4,8,30,12,4,11,42,6,5,5,11,26,6,10,20,17,10,2,6,9,3],G:[1q,J,K,E,Q,P,L,R,1g,1w],O:[1a,5a,5n,aP,aO,aI,aG,5b,7A,7B]},"aF":{F:"aE",cs:[10,33,34,43,43,20,25,47,22,80,32,34,43,72,40,24,26,27,25],G:[1a,1q,J,K,E,Q,P,L,R],O:[3F,7G,7H,5v,7A,aC,aB,aA,az]},"7M":{F:"ay",cs:[43,50,52,41,20,36,10,16,43,30,24,34,32,2,2,2,2,2],G:[1q,J,K,E,Q,P,L,R,1g],O:[5G,7P,7o,5i,5b,5J,ax,aw,aq]},"7M-ap":{F:"ao",cs:[14,14,17,15,20,11,13,11,15,13,15,19,14,10,14,16,15,16,13,9,10,15,13,13,18,15,15,14,13,9,20,22,12,20,16,12,11,12,17,14,15,16,11,12,17,15,14,14,10,16,13,16,17,9,17,13,12,15,15,16,14,15,13,14,14,12,7,14,7,9,13,15,11,15,9,11,14,14,8,13,12,12,13,11,11,15,16,15,18,15,3,5,14,19,14,7,2,2,2,2,2],G:[1q,J,K,E,Q,P,L,R,1g],O:[am,3F,3Y,5k,3q,7Y,al,4K,ak]},"aj":{F:"ai",cs:[48,77,10,66,10,10,58,53,87,60,44,11,37,50,38,46],G:[1a,1q,J,K,E,Q,P,L,R],O:[5o,5n,K,ah,ag,af,ae,ad,ac]},"ab":{F:"a9",cs:[15,37,26,13,25,23,22,5,16,32,35,35,29,20],G:[1a,J,K,E,Q,P,L,R,1g],O:[1a,J,K,E,Q,P,L,R,1g]},"a8":{F:"a7",cs:[40,23,23,35,8,20,25,25,25,30,31,18,19,39,28,28,28,19,23,19],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[a6,a5,5o,4z,a4,a3,E,a2,a1,8w]},"a0":{F:"9Z",cs:[19,17,20,28,29,19,33,23,35,19,15,33,33,23,44,40,25,17,9,36,2],G:[1a,1q,J,K,E,Q,P,L,R],O:[5a,4d,4A,9Y,6g,6o,7Y,7z,9X]},"9W":{F:"9V",cs:[37,27,41,58,36,29,41,36,48,33,20,40],G:[1a,1q,J,K,E,Q,P,L,R],O:[9U,9T,9Q,7G,7H,9O,4Q,7X,8v]},"9N":{F:"9M",cs:[15,21,23,28,23,21,22,18,37,28,3,10,17,18,27,12,24,13,6,8],G:[1a,1q,J,K,E,Q,P,L,R],O:[4O,9L,4J,5q,8j,4Q,9J,7B,9I]},"9H":{F:"9F",cs:[39,38,36,31,35,25,56,25,33,34,39,32,29,38,51,39],G:[1a,1q,J,K,E,Q,P,L,R],O:[3n,6W,5G,3F,6k,3h,4B,9E,cV]},"9C":{F:"9B",cs:[36,20,36,36,37,29,40,31],G:[1a,J,K,E,Q,P,L,R,1g,1w],O:[6O,9A,6M,4O,4z,5m,3E,79,5H,6D]},"9z-9y":{F:"9v",cs:[80,30,6H,52,36,21,18,6,18,44,10,13,36,6],G:[6I,1a,J,K,E,Q,P,L,R],O:[9u,4d,9t,3h,9s,R,9r,9q,9p]},"6N":{F:"9o",cs:[15,19,11,14,14,18,24,12,24,20,14,15,14,19,15,13,17,13,19,22,6,15,20,9,13,19,15,16,18,11,14,21,14,15,8,11,15,16,6,14,19,21,15,25,25,21,15,10,14,32,2,2],G:[1q,J,K,E,Q,P,L,R,1g,1w],O:[1a,6P,3y,3m,E,3h,4B,3q,6Q,4K]},"6N-9n":{F:"9m",cs:[40,36,19,8,2,13,57,64,28,32,31,22,13,16,19,18,14,2,2],G:[1q,J,K,E,Q,P,L,R,1g,1w],O:[1a,6P,3y,3m,E,3h,4B,3q,6Q,4K]},"9k":{F:"9j",cs:[14,51,43,10,19,73,34,34,25,55,26,32,18,24,22,21,34,62,46,24,39],G:[1a,1q,J,K,E,Q,P,L,R],O:[4J,3Y,5k,5p,9i,9h,9g,9f,9e]},"9d":{F:"ch",cs:[27,14,8,18,6,65,37,10,13,38,16,30,18,14,12,13,21,29,30,21,23,18,38,51,8,22],G:[1q,J,K,E,Q,P,L,R,1g,1w],O:[6J,5y,4O,3y,4J,5l,5B,5i,L,9c]},"9b":{F:"9a",cs:[16,8,12,12,7,11,19,17,7,7,9,12,5,10,6,6,8,10,8,10,10,8,9,13,13,13,6,7,10,10,18,8,11,9,10,6,6,4,11,9,13,10,8,14,8,10,13,4,6,8,9,7,23,10,12,11,9,12,13,10,7,10,8,6,8,6,10,12,8,7,16,7,8,10,6,8,6,8,3,10,5],G:[J,K,E,Q,P,L,R,1g,1w],O:[6I,1a,5a,4d,7e,4A,99,7b,98]},"97":{F:"96",cs:[35,24,47,22,51,22,37,34,31,9,40,41,39,31,33,26,33,43,32],G:[1a,1q,J,K,E,Q,P,L,R],O:[94,8e,7e,93,92,8V,5v,8w,8T]},"5c":{F:"5c",cs:[8,14,12,9,23,8,5,5,17,11,9,17,12,7,7,5,10,7,10,14,7,13,14,7,12,13,7,20,7,8,9,14,13,5,7,7,17,8,5,9,5,8,28,10,6,13,11,3,11,10,8,5],G:[J,K,E,Q,P,L,R,1g,1w],O:[8S,8R,7P,6Z,8Q,8P,5H,8O,8N]},"5c-86":{F:"8L",cs:[13,22,10,9,22,26,7,28,23,3,30,6,19,6,21,8,5,12,5,6,5,9,7,5,10,6,5,4,4,7,6,7,9,5,10,11,5,8,6,4,11,6,3,4,11,10,4,5,4,10,5,4,8,4,6,18,5,6,7,
53846,5,7,8,5,32,6,6,6,5,2,5],G:[J,K,E,Q,P,L,R,1g,1w],O:[7n,3E,8K,6g,6D,4Q,8J,8I,8H]},},7y=k(T,g){q h="#"+T.2R,Z=$(h),1k=Z.S("5r").1z(0),2V=$(1k).V("Y").1I(" ")[0],2p=k(){q r=1t(s.2x),f=s.5N,2e=2X[2V].G,2M=2X[2V].O;j((!$.7O(s.2J)||s.2J.1r()==="2a"||f)&&!5O){j(s.2J.1r()==="2a"||f){q a=3U.7Q(h.2F(1)),5E=M.7U(a),2Q=Z.2Q();1K(q i=0;i<2e.H;i++){j(f){Z.1y({2W:2M[i]})}z{Z.1y({2W:"2a"})}q b=(i+1),82=2Q.1X(),5K=(2Q.1T()>=2M[0]?2Q.1T():2M[0]),88=(5K<=2M[i]&&5K>=2M[0]?1:0),89=((bH-5E)<=2M[b]&&5E<bH?1:0),8a=(82<=2e[b]&&2e[i]<r?1:0);j(8a||f&&(88||89)){r=2e[i];D}}}j(!$.7O(s.2J)){1K(q c 8G s.2J){j(bW<=c){j($.4x(1t(s.2J[c]),2e)==-1){r=0;D}z{r=s.2J[c];D}}}}}N r},1C=1k.S("1Y"),5R=["2c","8F","8E","8D","8C"],3B=$(s.I.6j),8k=3B.S("1Y"),4s=0,2j=u,3H="",1O=s.1O.1r(),2P=(s.I.8r.1r()==="u"?u:2O),4g=s.I.4g.1r(),aa=(s.5Q?s.5Q:Z.S(".1M-1l")),M={1v:k(){q a=2p();M.67();Z.1N("B-3S B-"+a);j(3Z){N u}j(s.2G&&s.2G!="2c"){1k.1N("B-"+s.2G)}q b=1k.1y("8B-8u").6b(/^8A\\("?([^\\"\\))]+)"?\\)$/i,"$1");1c.4f(b)},4f:k(a){q b=8z aD(),3X=$("<2N />",{"Y":"B-4f","3z":s.7F}).4C(Z),8g={W:1p.1m(Z.1X()/2)+"X",2Y:1p.1m(3X.1X()/-2)+"X",3V:1p.1m(3X.1T()/-2)+"X",1A:1p.1m(Z.1T()/2)+"X"};3X.1y(8g);1k.1N("B");$(b).2b({8M:k(){j(s.3r&&!5O){Z.7s("<2N Y=\\"B-3r "+2V+"-3r B-"+s.2G+"\\" />")}j(4g!=="u"){M.1S.1v()}j(s.1P.1u.1r()!=="u"){M.2u.1v()}j(s.1e.1u.1r()!=="u"&&!s.1e.83){M.7q();M.1W.5e()}j(s.1i.1u.1r()!=="u"&&!s.1e.1u){M.1i.1v()}j(s.U.1u.1r()!=="u"){M.U.1v()}j(s.I.1u.1r()!=="u"){M.I.1v()}j(s.1f.1u.1r()!=="u"){M.1f.1v()}j(s.6n.1r()!=="u"){Z.4o(7J)}3X.7m("8U");s.6l(Z)},4i:k(){M.67();j(!s.7E){Z.7l(3v("8W 8u 8X be 8Y!<br/><br/>- 8Z 90: "+a))}N u}}).V("91",a)},1S:{1v:k(){q b=M.1S;b.4r();1C.2k(k(a){q t=$(1c),1F=(t.V("Y")?t.V("Y").1I(" ")[0]:2S),3l=t.1H("A").1z(0),1j=$(3l).V("1d");j(2n 1j==="1D"||1F===2S||1j.H<=1){$(t).3s()}j(s.U.1u.1r()!=="u"){b.78($(t),1F,3l,1j,a)}b.76($(t),1F);M.1W.1v($(t),1F,3l)});j(s.U.1u.1r()!=="u"){b.75(3H);M.1W.74()}b.71();M.1f.4v()},76:k(l,a){q m="<2N Y=\\"m\\">",cs=2X[2V].cs,F=2X[2V].F,3l=l.1H("A").1z(0);j(1O!=="1G"&&1O.1I("-")[0]!="1h"){q b=$("<2N Y=\\"1E-6V\\" />").4C(3l)}1K(q i=0;i<cs.H;i++){q c=i+1;j(a==F+c){1K(q s=1;s<cs[i];s++){m+="<2N Y=\\"s"+s+"\\" />"}D}}m+="</2N>";l.7l(m).7s("<2N Y=\\"bg\\" />")},6U:k(l){q a=1k.S(l).1H("A")[0];j(1O=="2O"||1O=="9l"||1O=="1G"){q b=1k.1X(),3R=1t($(a).1T()*-1)-s.4E,4M=1t($(a).1T()/-2),3e=1t($(a).1X()/-2),aL=$(a).3t().W,aT=$(a).3t().1A;j((3e*-1)>aL){$(a).1N("1E-W").1y("W",0);3e=0}j((3e*-1)+aL>b){$(a).1N("1E-1B");3e=0}j((3R*-1)>aT){$(a).1N("1E-1A");3R=s.4E}j($(a).3p("1E-2H")){3R=4M}a.2z.5x="2a";a.2z.2Y=3e+"X";j(1O=="1G"){a.2z.3V=4M+"X"}z{a.2z.3V=3R+"X"}}z j(1O.1I("-")[0]=="1h"){q c=$(a).2o(),9w=$("<2B />",{"2R":"B-1E","Y":"B-1E-5Z B-"+s.2G,"2o":c}).4C("9x")}},4r:k(){q a=1k.S("a");$("#B-1E").3s();1K(q i=0;i<a.H;i++){q b=a[i],6F=1p.1m($(b).1X()/-2),6E=1p.1m($(b).1T()/-2);j(1O=="1G"){b.2z.3V=6E+"X";b.2z.2Y=6F+"X"}z{b.2z.5x="6C(2w 2w 2w 2w)";b.2z.5x="6C(2w, 2w, 2w, 2w)"}}},78:k(l,a,b,c,d){q e=b.2o(),2I=1t(s.U.2I),6A=1p.1m((1C.H/2I));j(2n c!=="1D"&&c.H>=2&&$.4x(a,s.U.7h)==-1){3H+="  <1C Y=\\""+a+"\\"><a 1d=\\""+c+"\\">"+e+"</a></1C>\\n"}1K(q i=1;i<2I;i++){j(1p.1m((6A*i)==(d+1))){3H+=" </3f>\\n <3f Y=\\"B-1G-1U B-1G-1U-6w\\">\\n";D}}},75:k(a){q b="<2B 2R=\\""+h.2F(1)+"-1G-1U\\" Y=\\"B-1G-1U-3S\\">\\n <3f Y=\\"B-1G-1U";j(1t(s.U.2I)>1){b+=" B-1G-1U-6w"}b+="\\">"+a+" </3f>\\n</2B>";j(s.U.2d&&$(s.U.2d).H){$(s.U.2d).2o(b).1y({"9G":"6v"})}z{$(1k).4o(b)}},71:k(){j(aa.H){1K(q i=0;i<aa.H;i++){M.1W.4N($("."+aa[i]))}}}},1W:{1v:k(l,b,d){q f=M.1W,1F=$(h).S("."+b).1z(0),6t=$(1F).1H("9K").1z(0),2f=2S;f.6q(d);6t.2b({4P:k(){f.2L($(1F))},4R:k(){f.2T($(1F))},9P:k(c){j(1O.1I("-")[0]=="1h"){f.4S($(1F),c)}},9R:k(c){j(1O.1I("-")[0]=="1h"&&s.5S.1r()!=="u"){f.4S($(1F),c)}},9S:k(a){j(s.5S.1r()!=="u"){f.2s($(1F));j(a.1s()){a.1s()}z{N u}}},3b:k(a){f.2s($(1F));j(a.1s()){a.1s()}z{N u}}});$(d).2b({3d:k(){f.2L($(1F))},4T:k(){f.2T($(1F))},4p:k(e){2f=(e.2E?e.2E:e.4n);j(2f===13){f.2s($(1F))}},3b:k(a){f.2s($(1F));j(a.1s()){a.1s()}z{N u}}})},74:k(){q c=M.1W,4U=$(h+" .B-1G-1U").S("1Y"),2f=2S;j(s.U.2d&&s.U.2d!="#"){4U=$(s.U.2d+" .B-1G-1U").S("1Y")}4U.2k(k(){q b=$(1c).1H("A"),2U=h+" ."+$(1c).V("Y");b.2b({4P:k(){c.2L($(2U))},4R:k(){c.2T($(2U))},3d:k(){c.2L($(2U))},4T:k(){c.2T($(2U))}
5384,4p:k(e){2f=(e.2E?e.2E:e.4n);j(2f===13){c.2s($(2U))}},3b:k(a){c.2s($(2U));j(a.1s()){a.1s()}z{N u}}})})},2L:k(e){q a=e.1H("A").1z(0).V("1d");M.1S.4r();M.1S.6U(e);e.1N("3d");s.2L(e);j(s.1P.3Q.1r()!=="u"){M.2u.3D(a)}},4S:k(e,c){q a=$("#B-1E").1z(0),1Q=1t(s.4E),1b=10,2y=15+1Q,1V=$(a).1T(),1n=$(a).1X(),bT=$(w).3N(),1R=c.1L-1V-1Q,1o=c.1x-(1n/2);j(1Q<3){1Q=3}2q(1O){C"1h-W":C"1h-W-1A":C"1h-1A-W":j(c.2l-1n<=1b){1o=c.1x+1b}z{1o=c.1x-1n-1b}D;C"1h-1B":C"1h-1B-1A":C"1h-1A-1B":j(bW<=c.2l+1n+1b){1o=c.1x-1n-1b}z{1o=c.1x+1b}D;C"1h-2H":C"1h-2H-1B":C"1h-1B-2H":j(bW<=c.2l+1n+1b){1o=c.1x-1n-1b}z{1o=c.1x+1b}j(bT>=c.1L-(1V/2)-1Q){1R=c.1L+2y-1Q}z j(c.4V+(1V/2)>=bH){1R=c.1L-1V-1Q}z{1R=c.1L-(1V/2)}D;C"1h-2H-W":C"1h-W-2H":j(c.2l-1n<=1b){1o=c.1x+1b}z{1o=c.1x-1n-1b}j(bT>=c.1L-(1V/2)-1Q){1R=c.1L+2y-1Q}z j(c.4V+(1V/2)>=bH){1R=c.1L-1V-1Q}z{1R=c.1L-(1V/2)}D;C"1h-2r-W":C"1h-W-2r":j(c.2l-1n<1b){1o=c.1x+1b}z{1o=c.1x-1n-1b}1R=c.1L+2y;D;C"1h-2r":C"1h-2r-4W":C"1h-4W-2r":j(c.2l-(1n/2)+1b<=1b){1o=c.1x+1b}z j(bW<=c.2l+(1n/2)){1o=c.1x-1n-1b}z{1o=c.1x-(1n/2)}1R=c.1L+2y;D;C"1h-2r-1B":C"1h-1B-2r":j(bW<=c.2l+1n+1b){1o=c.1x-1n-1b}z{1o=c.1x+1b}1R=c.1L+2y;D;2c:j(c.2l-(1n/2)+1b<=1b){1o=c.1x+1b}z j(bW<=c.2l+(1n/2)){1o=c.1x-1n-1b}z{1o=c.1x-(1n/2)}}j(bT>=c.1L-1V-1Q){1R=c.1L+2y}j(c.4V+1V+2y>=bH){1R=c.1L-1V-1Q}a.1y({"W":1o+"X","1A":1R+"X"})},2T:k(e){q b=e.1H("a").1z(0).V("1d");M.1S.4r();e.1Z("3d");j(s.1P.3Q.1r()!=="u"){M.2u.84(b);$(1k).S(".1M-1l").2k(k(){q a=$(1c).1H("a").1z(0).V("1d");M.2u.3D(a)})}s.2T(e)},4N:k(e){q a=s.1e.68.1I(" %d ")[0],4X=s.1e.68.1I(" %d ")[1],r="",4Y=e.V("Y").1I(" ")[0],1j=e.1H("A").1z(0).V("1d"),7Z=$(s.1P.3o),3k=$(s.1f.2D);j(s.1e.2j===0||!s.1e.1u){s.1e.2j=an}j(s.1e.2j==1){r=4X.1I(" || ")[0]}z{r=4X.1I(" || ")[1]}j(e.3p("1M-1l")){e.1Z("1M-1l");j(3k.H){j(!s.1f.4H){3k.3j("")}z{3k.3j(0)}}4s--;2j=u}z{j(4s<s.1e.2j){j(!s.1e.1u&&$.4x(4Y,aa)==-1){Z.S(".1M-1l").1Z("1M-1l")}j(3k.H){$(s.1f.2D+" 3i:4D").as("4D");3k.3j(4Y)}4s++;e.1N("1M-1l")}z{av(a+" "+s.1e.2j+" "+r);2j=2O}}j(7Z.H&&1j.2K(0)==="#"){M.2u.1v()}},2s:k(e){j(2n e==="1D"||e===2S){N u}q a=e.1H("A").1z(0),1j=a.V("1d"),3g=a.V("3g"),3x=a.V("3x");j(s.6r){N u}M.1W.4N(e);M.1W.5e();M.1f.4v();j(e.3p("1M-1l")){s.8h(e)}z{s.8x(e);M.1W.7N()}aa=[];j(2j===u){j(2n 3g!=="1D"&&3g!==u){w.7L(1j,3g)}z j(1j!=="1D"&&1j.2K(0)==="#"){j(s.1P.1u.1r()!=="u"||s.1e.1u.1r()!=="u"){N u}z{j(3x!=="4Z"){w.2A.4l=1j}}}z{j(3x!=="4Z"){w.2A.1d=1j}z{N u}}}},5e:k(){q a=M.3G(),7I=Z.S(".B-3T-54"),59=s.1e.6a,v="";1K(q i=0;i<a.H;i++){q b=$("."+a[i]).1H("A").1z(0),1j=b.V("1d"),3K;j(1j!=="1D"&&1j.2K(0)=="#"){3K=1j.2F(1)}z j(/&/i.aH(1j)){3K=1j.2F(1j.2m("?")+(s.1e.4j.H)+2,1j.2m("&"))}z{3K=1j.2F(1j.2m("?")+(s.1e.4j.H)+2)}j(i>0){v+=s.1e.2t}v+=3K}j(a.H){59+="?"+s.1e.4j+"="+v}7I.V("1d",59)},6q:k(e){q a=e.V("1d"),7x=5P,1C=e.2Q("1Y");j(a!=="1D"&&a.2K(0)=="#"&&a==7x){q b=1C.V("Y").1I(" ")[0];aa[b];1C.1N("1M-1l");N u}},7N:k(){aJ.aK("",d.aM,w.2A.aN+w.2A.3T)}},7q:k(){q a=$("<a />",{"1d":s.1e.6a,"Y":"B-3T-54","3z":s.1e.6R});$(1k).4o(a)},U:{1v:k(){q a=$(h+"-1G-1U"),7w=a.S("5r");M.U.7v(7w);j(!s.U.2d||!$(s.U.2d).H){M.U.7t(a)}},7v:k(l){q a=1t(s.U.6c),3u=1t(s.U.6d),4q=1t(s.U.2I),7k=($(s.U.2d).H?$(s.U.2d).1X():2p()),5d=1p.1m((7k/4q)-3u);j(a>0){5d=1p.1m(a+3u)}q b=1p.1m(3u/2),7i={3L:"W",2Y:b+"X",aY:b+"X",3C:5d+"X"};l.2k(k(){$(1c).1y(7i)})},7t:k(e){q b=k(){q a=2p(),3M=0,5f=Z.2Q().1X(),7d=1t(s.U.6c),4q=1t(s.U.2I),3u=1t(s.U.6d*2),5g=1p.1m(2+(7d+3u)*4q);2q(s.U.4e){C"W":C"1B":j(1p.1m(a+5g)>=5f){3M=5f}z{3M=1p.1m(a+5g)}D;2c:3M=a;D}N 3M};2q(s.U.4e){C"W":q c={"5h":"W","3L":"W"},4h={"3L":"1B"};Z.S(".B-3r").1y({"W":"2a","1B":0});D;C"1B":q c={"5h":"1B","3L":"1B"},4h={"3L":"W"};D;2c:q c={"5h":"b3"},4h={};D}Z.1y({2W:"2a",3C:b()+"X"});1k.1y(4h);e.1y(c)}},2u:{1v:k(){q a=$(s.1P.3o),2h=M.3G();j(a.H){$(s.1P.3o).S("1Y").2i();a.S("5r").1y({b6:"b7"})}j(2h.H){1K(q i=0;i<2h.H;i++){q b=$("."+2h[i]).1H("A").1z(0).V("1d");M.2u.3D(b)}}j(aa.H){1K(q c=0;c<aa.H;c++){q d=$("."+aa[c]).1H("A").1z(0).V("1d");M.2u.3D(d)}}},3D:k(a){j(!s.1e.1u){$(s.1P.3o).S("1Y").2i()}j(!s.1P.3Q){$(a+","+a+" 1Y").b8(1t(s.1P.63))}z{$(a+","+a+" 1Y").b9()}},84:k(a){j(!s.1P.3Q){$(a+","+a+" 1Y").7m(1t(s.1P.63))}z{$(a+","+a+" 1Y").2i()}}},1f:{1v:k(){M.1f.6X();M.1f.6T()},6X:k(){q a="";j(s.1f.4H){a+="<3i 4a=\\"0\\">"+s.1f.4H+"</3i>"}1C.2k(k(){q A=$(1c).1H("A").1z(0),6S=1c.5j.1I(" ")[0],6G=A.3z(),6B=A.V("1d");a+="<3i 4a=\\""+6S+"\\"";j(6B===5P){a+=" 4D"}a+=">"+6G+"</3i>";A.V("3x","4Z")});$(s.1f.2D).2o(a)},6T:k(){q a=$(s.1f.2D);j(a.H){a.2b("bi",k(){$(s.1f.2D+" 3i:4D").2k(k(){M.1f.6y($(1c).3j());M.1f.4v()})})}},4v:k(){q a=$(s.1f.4w),2h=M.3G(),v="";j(a.H){2q(s.1f.4a){C"7j":1K(q i=0;i<2h.H;i++){j(i>0){v+=s.1e.2t}v+=$("."+2h[i]).1H("A").1z(0).3z()}D;C"bk":1K(q b=0;b<2h.H;b++){q c=$("."+2h[b]).1H("A").1z(0).V("1d");j(b>0){v+=s.1e.2t}j(c!==1D&&c.2K(0)==="#"){v+=c.2F(1)}z{v+=c}}D;2c:v=2h.6x(s.1e.2t);D}a.3j(v)}},6y:k(a){1k.S(".1M-1l").1Z("1M-1l");j(a){1k.S("."+a).1N("1M-1l");j($(s.1P.3o).H){M.2u.1v()}}}},1i:{1v:k(){$(1k).4o(1c.6u());1c.6s();j(s.5N){$(Z).1y({2W:Z.1T()+Z.S(".B-1i").1T()+"X"})}},6p:k(){q a=[];1K(q i=0;i<1C.H;i++){q b=1C[i].5j.1I(" ")[0];a.6i(b)}N a},6u:k(){q a=3U.bp("bq"),5s=s.1i.2Z.6b(/<a\\b[^>]*>(.*?)<\\/a>
5384/i,""),5t=s.1i.5X.6b(/<a\\b[^>]*>(.*?)<\\/a>/i,""),8y="<1C Y=\\"B-3a-2Z\\"><a 1d=\\"#2Z-1l\\">"+(5s?5s:"bw &#bx;")+"</a></1C>",8t="<1C Y=\\"B-3a-5X\\"><a 1d=\\"#6e-1l\\">"+(5t?5t:"&#bB; bC")+"</a></1C>",8p=(s.1i.2t?"<1C Y=\\"B-3a-2t\\">"+s.1i.2t+"</1C>":"");a.2R=h.2F(1)+"-1i";a.5j="B-1i";j(s.1i.4k){a.5u+="<8n Y=\\"B-3a-4k\\">"+s.1i.4k+"</8n>"}j(s.1i.4t){a.5u+="<p Y=\\"B-3a-4t\\">"+s.1i.4t+"</p>"}a.5u+="<3f Y=\\"B-3a-1U\\">"+8t+8p+8y+"</3f>";N a},6s:k(){q b=3U.7Q(h.2F(1)+"-1i"),8m=b.bG("A");$(8m).2b({4p:k(e){2f=(e.2E?e.2E:e.4n);j(2f===13){M.1W.2s(M.1i.5w(1c))}},3b:k(a){M.1W.2s(M.1i.5w(1c));j(a.1s()){a.1s()}z{N u}}})},5w:k(e){q a=M.1i.6p(),1S=M.3G()[0],4L=e.4l,2g;j(a.2m(1S)!==-1){2q(4L){C"#2Z-1l":j(s.1i.5Y&&2n a[a.2m(1S)+1]==="1D"){2g=a[0]}z{2g=a[a.2m(1S)+1]}D;C"#6e-1l":j(s.1i.5Y&&2n a[a.2m(1S)-1]==="1D"){2g=a[a.H-1]}z{2g=a[a.2m(1S)-1]}D}}z{2q(4L){C"#2Z-1l":2g=a[0];D;C"#6e-1l":2g=a[a.H-1];D}}j(2n 2g!=="1D"&&2g!==2S){N $("."+2g)}}},I:{1v:k(){q c=Z.3t().1A,5z=k(){q a,3W,bM="2a";2q(s.U.4e){C"W":a="2a";3W=1p.1m(1k.5A().W)+"X";D;C"1B":a=1p.1m(1k.5A().W)+"X";3W="2a";D;2c:a=1p.1m(1k.5A().W)+"X";3W="2a";D}N{W:a,1B:3W}},7V=$(1k).1X(),7T=$(1k).1T(),7R={2W:7T+"X",W:5z().W,3t:"5D",1B:5z().1B,1A:c+"X",3C:7V+"X"};3B.1N("B-bS-3S");3B.1y(7R);8k.2k(k(){q t=$(1c);M.I.7C(t);q m=t.S("."+s.I.3P).1z(0),1J=t.S("."+s.I.3O).1z(0),7a=1J.S("A"),3J=m.V("1d"),2f=2S,3c=t.V("c0-B-3c").1I(","),3I=k(a){q b,ct;2q(a){C"1a":b=7;ct=7;D;C"3n":b=50;ct=15;D;C"1q":b=5;ct=5;D;C"4F":b=6H;ct=20;D;C"J":b=10;ct=10;D;C"4z":b=85;ct=20;D;C"4A":b=70;ct=25;D;C"K":C"L":b=20;ct=20;D;C"3m":b=50;ct=25;D;C"E":C"P":b=22;ct=22;D;C"8s":b=85;ct=25;D;C"Q":b=25;ct=25;D;C"1g":b=40;ct=40;D;C"1w":b=50;ct=50;D;2c:b=30;ct=30;D}N{l:b,t:ct}},x=(s.I.2v>0&&s.I.2v!==2p()?1p.1m((3c[0]-3I(2p()).l+3I(s.I.2v).l)*2p()/s.I.2v):1t(3c[0])),y=(s.I.2v>0&&s.I.2v!==2p()?1p.1m((3c[1]-3I(2p()).t+3I(s.I.2v).t)*2p()/s.I.2v):1t(3c[1])),8o=m.1X(),8l=1p.1m(8o/-2),4m=1t(m.1T()),7D=1J.1T(),7u=1J.1X(),7r=1p.1m(7u/-2),4G=k(){q a;2q(s.I.7S){C"2H":a=y-(4m/2);D;C"2r":a=y;D;2c:a=y-4m;D}N a},6h=k(){q a;2q(s.I.8c){C"6v":a="-5L";D;C"2r":a=4G()+4m;D;2c:a=4G()-7D;D}N a},8q={W:x+"X",2Y:8l+"X",3t:"5D",cf:"4W",1A:4G()+"X",6Y:3n},6z={cj:"ck",W:x+"X",2Y:7r+"X",3V:"-5L",3t:"5D",1A:6h()+"X",6Y:cm};m.1y(8q);1J.1y(6z);t.2b({4P:k(){j(!2P){M.I.3A(t,m,1J)}z{M.I.2C(t,m,1J)}},4R:k(){j(!2P){M.I.2C(t,m,1J)}},3d:k(){j(!2P){M.I.3A(t,m,1J)}z{M.I.2C(t,m,1J)}},4T:k(){j(!2P){M.I.2C(t,m,1J)}},4p:k(e){2f=(e.2E?e.2E:e.4n);j(2f===13){j(2P){j(t.3p("2i-1E")){M.I.2C(t,m,1J)}z{M.I.3A(t,m,1J)}j(4c.1s()){4c.1s()}z{N u}}j(3J!==1D&&3J.2K(0)==="#"){j(4c.1s()){4c.1s()}z{N u}}}},3b:k(a){j(2P){j(t.3p("2i-1E")){M.I.2C(t,m,1J)}z{M.I.3A(t,m,1J)}j(a.1s()){a.1s()}z{N u}}j(3J!==1D&&3J.2K(0)==="#"){j(a.1s()){a.1s()}z{N u}}}});7a.2b({3b:k(a){q b=$(1c).V("1d"),4b=$(1c).V("3g");j(2n 4b!=="1D"&&4b!==u){w.7L(b,4b)}z j(b!==1D&&b.2K(0)!=="#"){w.2A.1d=b}z{w.2A.4l=b}j(a.1s()){a.1s()}z{N u}}})})},7C:k(p){q a=p.S("."+s.I.3O),1o=p.S("."+s.I.3P);j(!a.H){p.cr($("<2B />").1N(s.I.3O+" B-"+s.2G).2i())}z{a.1N("B-"+s.2G).2i()}j(!1o.H){q b=$("<a />",{"Y":s.I.3P,"1d":"#","3z":""}).4C(p)}},3A:k(t,m,a){$(3B).S(".2i-1E").2k(k(){q t=$(1c),m=t.S("."+s.I.3P),a=t.S("."+s.I.3O);M.I.2C(t,m,a)});t.1N("2i-1E");a.1y("8i-1A",0)},2C:k(t,m,a){t.1Z("2i-1E");a.1y("8i-1A","-5L")}},3G:k(){q a=[];1C.2k(k(){j($(1c).3p("1M-1l")){a.6i($(1c).V("Y").1I(" ")[0])}});N a},7U:k(a){q b=a.cw(),3w=3U.3w,61=3U.cz,3N=5T.cA||61.3N||3w.3N,4y=61.4y||3w.4y||0,1A=b.1A+3N-4y;N 1p.1m(1A)},67:k(){q a="",4u="",2e=2X[2V].G;3H="";j($.4x(1t(s.2x),2e)==-1){Z.2o(3v("cD 2x: "+s.2x+"<br/><br/>- cE G: "+2e.6x(", ").1r()));N u}1K(q i=0;i<2e.H;i++){a+=" B-"+2e[i]}1K(q i=0;i<5R.H;i++){4u+=" B-"+5R[i]};Z.1Z(a).1Z("B-3S");j(3Z){N u}Z.S(".B-4f, .B-3r, .m, .bg, .1E-6V, .B-1G-1U-3S, .B-1G-1U, .B-1i, .B-3T-54, .B-5W, .B-4i").3s();Z.S("1Y").1Z("3d").1Z("1M-1l");1k.1Z(4u).1Z("B");$("3w").S(".B-1E-5Z").1Z(4u);$(h+"-1i").3s();$(h+"-1G-1U"+(g+1)).3s();$("3w").S(".B-5W").3s();j($(s.1f.4w).H){$(s.1f.4w).3j("")}j($(s.1f.2D).H){$(s.1f.2D).2o("")}}};$(w).2b("cF",k(e){bW=$(w).3C();bH=$(w).2W();cG(5M);5M=cH(k(){3Z=2O;M.1v()},1q)});M.1v()};N 1c.2k(k(a){j(!s.2x){$(1c).2o(3v("6L 2x 6K be 7f!"));N u}j(2n $.4I.2b==="1D"&&!$.cL($.4I.2b)){$(1c).2o(3v("<b>at cM 69 1.7 cO cP!</b><br/><br/>- 69 8d cR: "+$.4I.5C+"<br/>- cT a cU 8d: <a 1d=\\"5V://5C.5U/6f\\">5V://5C.5U/6f</a>"));N u}j(2n $(1c).V("2R")!="1D"){1c.2R}z{1c.2R="B"+(a+1)}7y(1c,a)})}z{N 1c.2o(3v("6L 2x 6K be 7f!"))}}})(69);',62,802,'|||||||||||||||||||if|function||||||var||||false|||||else||cssmap|case|break|540|abbr|sizes|length|pins|320|430|850||return|heights|750|650|960|find||visibleList|attr|left|px|class|mapContainer|||||||||||210|oL|this|href|multipleClick|formSupport|1280|floating|navigation|lH|mapList|region|round|tW|pL|Math|250|toString|preventDefault|parseInt|enable|init|1450|pageX|css|eq|top|right|li|undefined|tooltip|lC|visible|children|split|pC|for|pageY|active|addClass|tooltips|agentsList|mT|pT|regions|outerHeight|list|tH|selectRegion|outerWidth|LI|removeClass|||||||||||auto|on|default|containerId|mapSizes|code|returnClass|activeRegions|hide|clicksLimit|each|clientX|indexOf|typeof|html|getMapSize|switch|bottom|clicked|separator|agentslist|mapSize|1px|size|oT|style|location|div|pinClose|selectId|keyCode|slice|mapStyle|middle|columns|responsive|charAt|onHover|mapHeights|span|true|DonClick|parent|id|null|unHover|vC|mapName|height|MAPS|marginLeft|next|||||||||||nav|click|coords|focus|aML|ul|target|620|option|val|selectField|lA|450|200|agentsListId|hasClass|800|cities|remove|position|cGap|CSSMapError|body|rel|360|text|pinOpen|pinsContainer|width|showAgent|445|410|getActiveRegions|cli|cMargin|mHref|nlH|float|nMw|scrollTop|pinTooltipClass|markerClass|agentsListOnHover|aMT|container|search|document|marginTop|mapR|preloader|525|resized|||||||||||value|pTtarget|event|315|listPosition|loader|clickableRegions|mapListCSS|error|searchLinkVar|label|hash|mH|which|after|keypress|cNum|hideTooltips|countClicks|description|allStyles|inputFn|
5384inputId|inArray|clientTop|350|400|710|appendTo|selected|tooltipArrowHeight|300|mTop|selectLabel|fn|435|1200|linkHref|aMTm|activated|290|mouseenter|880|mouseleave|onMouseMove|blur|vLi|clientY|center|clicksLimitAlert2|lClass|nofollow|||||link|||||newLink|260|770|usa|vListWidth|multiple|mapsParentWidth|sumWidth|clear|640|className|665|495|395|340|280|875|580|UL|getNavNext|getNavPrev|innerHTML|825|getRegionToActivate|clip|215|mapY|offset|560|jquery|absolute|topOffset|175|305|680|CSSMap|900|parentH|9999em|resizeTimer|fitHeight|ie|wHash|activateOnLoad|mapStyles|tapOnce|window|com|http|signature|prev|loop|content||docElem||agentsListSpeed||||clearMap|clicksLimitAlert|jQuery|searchUrl|replace|columnWidth|columnsGap|previous|download|670|pCTop|push|pinsId|515|onLoad|285|authorInfo|810|getClasses|autoSelect|disableClicks|navFunctions|lMapSpan|createNav|hidden|column|join|formActivateRegion|pCpos|items|regionHref|rect|775|tTmT|tTmL|optText|100|150|165|must|map|235|spain|115|270|1060|searchLink|optVal|selectFn|showTooltip|arrow|240|createOptions|zIndex|460||autoSelectRegion|||initVisibleList|createList|createSpans||copyList|510|pTlink|610|700|cWidth|355|set|125|hideItems|listCSS|name|vListParentWidth|prepend|fadeOut|330|505|265|searchButton|pCL|append|setPosition|pCW|listSize|VI|wH|doMaps|1065|1040|1160|pinContent|pCH|mobileSupport|loadingText|500|630|sb|CSSMapSignature|220|open|france|removeHash|isEmptyObject|385|getElementById|pinsContainerCSS|markerPosition|mapH|getTopOffset|mapW|navigator|1000|940|agentsListContainer||appVersion|parentW|hideSearchLink|hideAgents||canada||fitH|fitS|fitW|MSIE|tooltipPosition|version|275|370|loaderPosition|onClick|margin|730|pin|mL|getNavLinks|h5|mW|navSeparator|mpos|tooltipOnClick|550|navPrev|image|1125|935|onSecondClick|navNext|new|url|background|custom|vintage|dark|blue|in|1500|1325|995|555|usacan|load|1030|905|595|530|310|226|1055|slow|715|Map|cannot|found|incorrect|path|src|590|470|230||uy|uruguay|695|455|tr|turkey|965|switzerland|1985|1775|1555|1335|1105|se|sweden|sticky|esa|autonomies|es|1420|1275|1115|790|475|225|sam|floatingTooltip|BODY|america|south|170|sk|slovakia|use|805|pl|overflow|poland|1305|1020|SPAN|345|no|norway|760|mousemove|375|touchmove|touchend|295|245|nl|netherlands|1195|535|it|italy|820|615|480|420|205|135|hu|hungary|gr||greece|1285|1145|1005|865|720|570|de|germany|1600|1080|325|Infinity|frd|departments|1530||removeAttr|||alert|1150|1025|fr|1875|1670|1465|1260|Image|fi|finland|690|test|605|history|pushState||title|pathname|520|425|eu|europe|195||republic|czech|565|255|marginRight|cuba|1425|1255|945|both|830|740|listStyleType|none|fadeIn|show|415|hr|croatia|755||130||105|change|continents|slug|1300|1155|1015|725|createElement|DIV||colombia|1950|1675|1405|Next|187||855|575|171|Previous|chile|1245|1100|getElementsByTagName||645|465|1505|1330|mapMargin|885|780|675|335|brazil|markers||1205|705||belgium|austria|1215|data|915|australia|2040|1825|1595|1370|1135|argentina|1360||405|afr|africa|mapContainerID|textAlign|extend||Popardowski|display|block||201|ukasz||plugin|external|wrapInner||||ref|getBoundingClientRect|cssmapsplugin|marker|documentElement|pageYOffset|only|select|Incorrect|available|resize|clearTimeout|setTimeout|can|You|Search|isFunction|least|php|is|required|Loading|used|strict|get|current|910'.split('|'),0,{}))
5385/**!
5386
5387 @license
5388 handlebars v4.7.8
5389
5390Copyright (C) 2011-2019 by Yehuda Katz
5391
5392Permission is hereby granted, free of charge, to any person obtaining a copy
5393of this software and associated documentation files (the "Software"), to deal
5394in the Software without restriction, including without limitation the rights
5395to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5396copies of the Software, and to permit persons to whom the Software is
5397furnished to do so, subject to the following conditions:
5398
5399The above copyright notice and this permission notice shall be included in
5400all copies or substantial portions of the Software.
5401
5402THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5403IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5404FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5405AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5406LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5407OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
5408THE SOFTWARE.
5409
5410*/
5411!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exp
vendor: 5,795 bytes, line 5411
5411orts.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a.parseWithoutProcessing=j.parseWithoutProcessing,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(84),i=e(h),j=c(85),k=c(90),l=c(91),m=e(l),n=c(88),o=e(n),p=c(83),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(77),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(78),p=e(o),q=c(83),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(70),k=c(72),l=e(k),m=c(73),n="4.7.8";b.VERSION=n;var o=8;b.COMPILER_REVISION=o;var p=7;b.LAST_COMPATIBLE_COMPILER_REVISION=p;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};b.REVISION_CHANGES=q;var r="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===r)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===r){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var s=l["default"].log;b.log=s,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0,i=void 0,j=void 0;c&&(g=c.start.line,h=c.end.line,i=c.start.column,j=c.end.column,a+=" - "+g+":"+i);for(var k=Error.prototype.constructor.call(this,a),l=0;l<f.length;l++)this[f[l]]=k[f[l]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,this.endLineNumber=h,e?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0})):(this.column=i,this.endColumn=j))}catch(m){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){h["default"](a),j["default"](a),l["default"](a),n["default"](a),p["default"](a),r["default"](a),t["default"](a)}function e(a,b,c){a.helpers[b]&&(a.hooks[b]=a.helpers[b],c||delete a.helpers[b]
vendor: 14,607 bytes, line 5411
5411)}var f=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d,b.moveHelperToHooks=e;var g=c(11),h=f(g),i=c(12),j=f(i),k=c(65),l=f(k),m=c(66),n=f(m),o=c(67),p=f(o),q=c(68),r=f(q),s=c(69),t=f(s)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(13)["default"],e=c(43)["default"],f=c(55)["default"],g=c(60)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(5),j=c(6),k=h(j);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,d){n&&(n.key=b,n.index=c,n.first=0===c,n.last=!!d,o&&(n.contextPath=o+b)),m+=h(a[b],{data:n,blockParams:i.blockParams([a[b],b],[o+b,null])})}if(!b)throw new k["default"]("Must pass iterator to #each");var h=b.fn,j=b.inverse,l=0,m="",n=void 0,o=void 0;if(b.data&&b.ids&&(o=i.appendContextPath(b.data.contextPath,b.ids[0])+"."),i.isFunction(a)&&(a=a.call(this)),b.data&&(n=i.createFrame(b.data)),a&&"object"==typeof a)if(i.isArray(a))for(var p=a.length;l<p;l++)l in a&&c(l,l,l===a.length-1);else if("function"==typeof d&&a[e]){for(var q=[],r=f(a),s=r.next();!s.done;s=r.next())q.push(s.value);a=q;for(var p=a.length;l<p;l++)c(l,l,l===a.length-1)}else!function(){var b=void 0;g(a).forEach(function(a){void 0!==b&&c(b,l-1),b=a,l++}),void 0!==b&&c(b,l-1,!0)}();return 0===l&&(m=j(this)),m})},a.exports=b["default"]},function(a,b,c){a.exports={"default":c(14),__esModule:!0}},function(a,b,c){c(15),c(42),a.exports=c(21).Symbol},function(a,b,c){"use strict";var d=c(9),e=c(16),f=c(17),g=c(18),h=c(20),i=c(24),j=c(19),k=c(27),l=c(28),m=c(30),n=c(29),o=c(31),p=c(36),q=c(37),r=c(38),s=c(39),t=c(32),u=c(26),v=d.getDesc,w=d.setDesc,x=d.create,y=p.get,z=e.Symbol,A=e.JSON,B=A&&A.stringify,C=!1,D=n("_hidden"),E=d.isEnum,F=k("symbol-registry"),G=k("symbols"),H="function"==typeof z,I=Object.prototype,J=g&&j(function(){return 7!=x(w({},"a",{get:function(){return w(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=v(I,b);d&&delete I[b],w(a,b,c),d&&a!==I&&w(I,b,d)}:w,K=function(a){var b=G[a]=x(z.prototype);return b._k=a,g&&C&&J(I,a,{configurable:!0,set:function(b){f(this,D)&&f(this[D],a)&&(this[D][a]=!1),J(this,a,u(1,b))}}),b},L=function(a){return"symbol"==typeof a},M=function(a,b,c){return c&&f(G,b)?(c.enumerable?(f(a,D)&&a[D][b]&&(a[D][b]=!1),c=x(c,{enumerable:u(0,!1)})):(f(a,D)||w(a,D,u(1,{})),a[D][b]=!0),J(a,b,c)):w(a,b,c)},N=function(a,b){s(a);for(var c,d=q(b=t(b)),e=0,f=d.length;f>e;)M(a,c=d[e++],b[c]);return a},O=function(a,b){return void 0===b?x(a):N(x(a),b)},P=function(a){var b=E.call(this,a);return!(b||!f(this,a)||!f(G,a)||f(this,D)&&this[D][a])||b},Q=function(a,b){var c=v(a=t(a),b);return!c||!f(G,b)||f(a,D)&&a[D][b]||(c.enumerable=!0),c},R=function(a){for(var b,c=y(t(a)),d=[],e=0;c.length>e;)f(G,b=c[e++])||b==D||d.push(b);return d},S=function(a){for(var b,c=y(t(a)),d=[],e=0;c.length>e;)f(G,b=c[e++])&&d.push(G[b]);return d},T=function(a){if(void 0!==a&&!L(a)){for(var b,c,d=[a],e=1,f=arguments;f.length>e;)d.push(f[e++]);return b=d[1],"function"==typeof b&&(c=b),!c&&r(b)||(b=function(a,b){if(c&&(b=c.call(this,a,b)),!L(b))return b}),d[1]=b,B.apply(A,d)}},U=j(function(){var a=z();return"[null]"!=B([a])||"{}"!=B({a:a})||"{}"!=B(Object(a))});H||(z=function(){if(L(this))throw TypeError("Symbol is not a constructor");return K(m(arguments.length>0?arguments[0]:void 0))},i(z.prototype,"toString",function(){return this._k}),L=function(a){return a instanceof z},d.create=O,d.isEnum=P,d.getDesc=Q,d.setDesc=M,d.setDescs=N,d.getNames=p.get=R,d.getSymbols=S,g&&!c(41)&&i(I,"propertyIsEnumerable",P,!0));var V={"for":function(a){return f(F,a+="")?F[a]:F[a]=z(a)},keyFor:function(a){return o(F,a)},useSetter:function(){C=!0},useSimple:function(){C=!1}};d.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(a){var b=n(a);V[a]=H?b:K(b)}),C=!0,h(h.G+h.W,{Symbol:z}),h(h.S,"Symbol",V),h(h.S+h.F*!H,"Object",{create:O,defineProperty:M,defineProperties:N,getOwnPropertyDescriptor:Q,getOwnPropertyNames:R,getOwnPropertySymbols:S}),A&&h(h.S+h.F*(!H||U),"JSON",{stringify:T}),l(z,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(a,b){var c=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=c)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,c){var d=c(16),e=c(21),f=c(22),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,a.exports=h},function(a,b){var c=a.exports={version:"1.2.6"};"number"==typeof __e&&(__e=c)},function(a,b,c){var d=c(23);a.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){a.exports=c(25)},function(a,b,c){var d=c(9),e=c(26);a.exports=c(18)?function(a,b,c){return d.setDesc(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(16),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).setDesc,e=c(17),f=c(29)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(27)("wks"),e=c(30),f=c(16).Symbol;a.exports=function(a){return d[a]||(d[a]=f&&f[a]||(f||e)("Symbol."+a))}},function(a,b){var c=0,d=Math.random();a.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++c+d).toString(36))}},function(a,b,c){var d=c(9),e=c(32);a.exports=function(a,b){for(var c,f=e(a),g=d.getKeys(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(33),e=c(35);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(34);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(void 0==a)throw TypeError("Can't call method on  "+a);return a}},function(a,b,c){var d=c(32),e=c(9).getNames,f={}.toString,g="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.get=function(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(9);a.exports=function(a){var b=d.getKeys(a),c=d.getSymbols;if(c)for(var e,f=c(a),g=d.isEnum,h=0;f.length>h;)g.call(a,e=f[h++])&&b.push(e);return b}},function(a,b,c){var d=c(34);a.exports=Array.isArray||function(a){return"Array"==d(a)}},function(a,b,c){var d=c(40);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b){a.exports=!0},function(a,b){},function(a,b,c){a.exports={"default":c(44),__esModule:!0}},function(a,b,c){c(45),c(51),a.exports=c(29)("iterator")},function(a,b,c){"use strict";var d=c(46)(!0);c(48)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})},function(a,b,c){var d=c(47),e=c(35);a.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i),f<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){"use strict";var d=c(41),e=c(20),f=c(24),g=c(25),h=c(17),i=c(49),j=c(50),k=c(28),l=c(9).getProto,m=c(29)("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};a.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=t==q,B=!1,C=a.prototype,D=C[m]||C[o]||t&&C[t],E=D||y(t);if(D){var F=l(E.call(new a));k(F,z,!0),!d&&h(C,o)&&g(F,m,r),A&&D.name!==q&&(B=!0,E=function(){return D.call(this)})}if(d&&!v||!n&&!B&&C[m]||g(C,m,E),i[b]=E,i[z]=r,t)if(w={values:A?E:y(q),keys:u?E:y(p),entries:A?y("entries"):E},v)for(x in w)x in C||f(C,x,w[x]);else e(e.P+e.F*(n||B),b,w);return w}},function(a,b){a.exports={}},function(a,b,c){"use strict";var d=c(9),e=c(26),f=c(28),g={};c(25)(g,c(29)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d.create(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(52);var d=c(49);d.NodeList=d.HTMLCollection=d.Array},function(a,b,c){"use strict";var d=c(53),e=c(54),f=c(49),g=c(32);a.exports=c(48)(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")},function(a,b){a.exports=function(){}},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){a.exports={"default":c(56),__esModule:!0}},function(a,b,c){c(51),c(45),a.exports=c(57)},function(a,b,c){var d=c(39),e=c(58);a.exports=c(21).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(59),e=c(29)("iterator"),f=c(49);a.exports=c(21).getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}},function(a,b,c){var d=c(34),e=c(29)("toStringTag"),f="Arguments"==d(function(){return arguments}());a.exports=function(a){var b,c,g;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=(b=Object(a))[e])?c:f?d(b):"Object"==(g=d(b))&&"function"==typeof b.callee?"Arguments":g}},function(a,b,c){a.exports={"default":c(61),__esModule:!0}},function(a,b,c){c(62),a.exports=c(21).Object.keys},function(a,b,c){var d=c(63);c(64)("keys",function(a){return function(b){return a(d(b))}})},function(a,b,c){var d=c(35);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(20),e=c(21),f=c(19);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("if",function(a,b){if(2!=arguments.length)throw new g["default"]("#if requires exactly one argument");return e.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||e.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){if(2!=arguments.length)throw new g["default"]("#unless requires exactly one argument");return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b,c){return a?c.lookupProperty(a,b):a})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("with",function(a,b){if(2!=arguments.length)throw new g["default"]("#with requires exactly one argument");e.isFunction(a)&&(a=a.call(this));var c=b.fn;if(e.isEmpty(a))return b.inverse(this);var d=b.data;return b.data&&b.ids&&(d=e.createFrame(b.data),d.contextPath=e.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:d,blockParams:e.blockParams([a],[d&&d.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(71),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=i(null);b.
vendor: 9,978 bytes, line 5411
5411constructor=!1,b.__defineGetter__=!1,b.__defineSetter__=!1,b.__lookupGetter__=!1;var c=i(null);return c.__proto__=!1,{properties:{whitelist:l.createNewLookupObject(c,a.allowedProtoProperties),defaultValue:a.allowProtoPropertiesByDefault},methods:{whitelist:l.createNewLookupObject(b,a.allowedProtoMethods),defaultValue:a.allowProtoMethodsByDefault}}}function e(a,b,c){return"function"==typeof a?f(b.methods,c):f(b.properties,c)}function f(a,b){return void 0!==a.whitelist[b]?a.whitelist[b]===!0:void 0!==a.defaultValue?a.defaultValue:(g(b),!1)}function g(a){o[a]!==!0&&(o[a]=!0,n["default"].log("error",'Handlebars: Access has been denied to resolve the property "'+a+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}function h(){j(o).forEach(function(a){delete o[a]})}var i=c(74)["default"],j=c(60)["default"],k=c(1)["default"];b.__esModule=!0,b.createProtoAccessControl=d,b.resultIsAllowed=e,b.resetLoggedProperties=h;var l=c(76),m=c(72),n=k(m),o=i(null)},function(a,b,c){a.exports={"default":c(75),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b){return d.create(a,b)}},function(a,b,c){"use strict";function d(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return f.extend.apply(void 0,[e(null)].concat(b))}var e=c(74)["default"];b.__esModule=!0,b.createNewLookupObject=d;var f=c(5)},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=v.COMPILER_REVISION;if(!(b>=v.LAST_COMPATIBLE_COMPILER_REVISION&&b<=v.COMPILER_REVISION)){if(b<v.LAST_COMPATIBLE_COMPILER_REVISION){var d=v.REVISION_CHANGES[c],e=v.REVISION_CHANGES[b];throw new u["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new u["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=s.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=s.extend({},e,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),g=b.VM.invokePartial.call(this,c,d,f);if(null==g&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),g=e.partials[e.name](d,f)),null!=g){if(e.indent){for(var h=g.split("\n"),i=0,j=h.length;i<j&&(h[i]||i+1!==j);i++)h[i]=e.indent+h[i];g=h.join("\n")}return g}throw new u["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(g,b,g.helpers,g.partials,f,i,h)}var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=e.data;d._setup(e),!e.partial&&a.useData&&(f=j(b,f));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=e.depths?b!=e.depths[0]?[b].concat(e.depths):e.depths:[b]),(c=k(a.main,c,g,e.depths||[],f,i))(b,e)}if(!b)throw new u["default"]("No environment passed to template");if(!a||!a.main)throw new u["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e=a.compiler&&7===a.compiler[0],g={strict:function(a,b,c){if(!(a&&b in a))throw new u["default"]('"'+b+'" not defined in '+a,{loc:c});return g.lookupProperty(a,b)},lookupProperty:function(a,b){var c=a[b];return null==c?c:Object.prototype.hasOwnProperty.call(a,b)?c:y.resultIsAllowed(c,g.protoAccessControl,b)?c:void 0},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++){var e=a[d]&&g.lookupProperty(a[d],b);if(null!=e)return a[d][b]}},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:s.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},mergeIfNeeded:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=s.extend({},b,a)),c},nullContext:n({}),noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){if(c.partial)g.protoAccessControl=c.protoAccessControl,g.helpers=c.helpers,g.partials=c.partials,g.decorators=c.decorators,g.hooks=c.hooks;else{var d=s.extend({},b.helpers,c.helpers);l(d,g),g.helpers=d,a.usePartial&&(g.partials=g.mergeIfNeeded(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(g.decorators=s.extend({},b.decorators,c.decorators)),g.hooks={},g.protoAccessControl=y.createProtoAccessControl(c);var f=c.allowCallsToHelperMissing||e;w.moveHelperToHooks(g,"helperMissing",f),w.moveHelperToHooks(g,"blockHelperMissing",f)}},d._child=function(b,c,d,e){if(a.useBlockParams&&!d)throw new u["default"]("must pass block params");if(a.useDepths&&!e)throw new u["default"]("must pass parent depths");return f(g,b,a[b],c,0,d,e)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return!g||b==g[0]||b===a.nullContext&&null===g[0]||(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){return a?a.call||c.name||(c.name=a,a=c.partials[a]):a="@partial-block"===c.name?c.data["partial-block"]:c.partials[c.name],a}function h(a,b,c){var d=c.data&&c.data["partial-block"];c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var e=void 0;if(c.fn&&c.fn!==i&&!function(){c.data=v.createFrame(c.data);var a=c.fn;e=c.data["partial-block"]=function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.data=v.createFrame(c.data),c.data["partial-block"]=d,a(b,c)},a.partials&&(c.partials=s.extend({},c.partials,a.partials))}(),void 0===a&&e&&(a=e),void 0===a)throw new u["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?v.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),s.extend(b,g)}return b}function l(a,b){o(a).forEach(function(c){var d=a[c];a[c]=m(d,b)})}function m(a,b){var c=b.lookupProperty;return x.wrapHelper(a,function(a){return s.extend({lookupProperty:c},a)})}var n=c(79)["default"],o=c(60)["default"],p=c(3)["default"],q=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var r=c(5),s=p(r),t=c(6),u=q(t),v=c(4),w=c(10),x=c(82),y=c(73)},function(a,b,c){a.exports={"default":c(80),__esModule:!0}},function(a,b,c){c(81),a.exports=c(21).Object.seal},function(a,b,c){var d=c(40);c(64)("seal",function(a){return function(b){return a&&d(b)?a(b):b}})},function(a,b){"use strict";function c(a,b){if("function"!=typeof a)return a;var c=function(){var c=arguments[arguments.length-1];return arguments[arguments.length-1]=b(c),a.apply(this,arguments)};return c}b.__esModule=!0,b.wrapHelper=c},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){!function(){"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)}();var b=globalThis.Handlebars;a.noConflict=function(){return globalThis.Handlebars===a&&(globalThis.Handlebars=b),a}},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;i["default"].yy=o,o.locInfo=function(a){return new o.SourceLocation(b&&b.srcName,a)};var c=i["default"].parse(a);return c}function e(a,b){var c=d(a,b),e=new k["default"](b);return e.accept(c)}var f=c(1)["default"],g=c(3)["default"];b.__esModule=!0,b.parseWithoutProcessing=d,b.parse=e;var h=c(86),i=f(h),j=c(87),k=f(j),l=c(89),m=g(l),n=c(5);b.parser=i["default"];var o={};n.extend(o,m)},function(a,b){"use strict";b.__esModule=!0;var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,
5411EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){
vendor: 7,153 bytes, line 5412
5412var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37
vendor: 4,114 bytes, line 5412
5412],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]}
vendor: 11,272 bytes, line 5412
5412,{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substring(a,b.yyleng-c+a)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^
vendor: 2,187 bytes, line 5412
5412/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(88
vendor: 6,533 bytes, line 5412
5412),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substring(1,a.length-1):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g=0,h=b.length;g<h;g++){var i=b[g].part,j=b[g].original!==i;if(d+=(b[g].separator||"")+i,j||".."!==i&&"."!==i&&"this"!==i)e.push(i);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===i&&f++}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=m.extend({},b),"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),
vendor: 11,629 bytes, lines 5412-5413
5412f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(m.isArray(a)&&m.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(74)["default"],j=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var k=c(6),l=j(k),m=c(5),n=c(84),o=j(n),p=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;
5413return!0},guid:0,compile:function(a,b){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[],b.knownHelpers=m.extend(i(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},b.knownHelpers),this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new l["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new l["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,o["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=o["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:p.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=o["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&o["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||o["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&m.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d,e){var f=b.popStack(),g=c.length;for(a&&g--;d<g;d++)f=b.nameLookup(f,c[d],e);return a?[b.aliasable("container.strict"),"(",f,", ",b.quotedString(c[d]),", ",JSON.stringify(b.source.currentLocation)," )"]:f}var g=c(60)["default"],h=c(1)["default"];b.__esModule=!0;var i=c(4),j=c(6),k=h(j),l=c(5),m=c(92),n=h(m);e.prototype={nameLookup:function(a,b){return this.internalNameLookup(a,b)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=i.COMPILER_REVISION,b=i.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return l.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,b){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(b),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new k["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var j=this.createFunctionContext(d);if(this.isChild)return j;var l={compiler:this.compilerInfo(),main:j};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new n["default"](this.options.srcName),this.decorators=new n["default"](this.options.srcName)},createFunctionContext:function(a){var b=this,c="",d=this.stackVars.concat(this.registers.list);d.length>0&&(c+=", "+d.join(", "));var e=0;g(this.aliases).forEach(function(a){var d=b.aliases[a];d.children&&d.referenceCount>1&&(c+=", alias"+ ++e+"="+a,d.children[0]="alias"+e)}),this.lookupPropertyFunctionIsUsed&&(c+=", "+this.lookupPropertyFunctionVarDeclaration());var f=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&f.push("blockParams"),this.useDepths&&f.push("depths");var h=this.mergeSource(c);return a?(f.push(h),Function.apply(this,f)):this.source.wrap(["function(",f.join(","),") {\n  ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend("  + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return"\n      lookupProperty = container.lookupProperty || function(parent, propertyName) {\n        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\
5413n          return parent[propertyName];\n        }\n        return undefined\n    }\n    ".trim()},blockValue:function(a){var b=this.aliasable("container.hooks.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,c,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=[];c&&f.push(e.name),f.push(d),this.options.strict||f.push(this.aliasable("container.hooks.helperMissing"));var g=["(",this.itemsSeparatedBy(f,"||"),")"],h=this.source.functionCall(g,"call",e.callParams);this.push(h)},itemsSeparatedBy:function(a,b){var c=[];c.push(a[0]);for(var d=1;d<a.length;d++)c.push(b,a[d]);return c},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",f.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"Sub
5413Expression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length
vendor: 6,822 bytes, line 5413
5413;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new k["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new k["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e.loc=JSON.stringify(this.source.currentLocation),e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(g.isArray(a)){for(var d=[],e=0,f=a.length;e<f;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}var f=c(60)["default"];b.__esModule=!0;var g=c(5),h=void 0;try{}catch(i){}h||(h=function(a,b,c,d){this.src="",d&&this.add(d)},h.prototype={add:function(a){g.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){g.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add(["  ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new h(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof h?a:(a=d(a,this,b),new h(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=this,c=[];f(a).forEach(function(e){var f=d(a[e],b);"undefined"!==f&&c.push([b.quotedString(e),":",f])});var e=this.generateList(c);return e.prepend("{"),e.add("}"),e},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});
5413
vendor: 19,927 bytes, line 5414
5414var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c<a.length&&0==a[c];)c++;this.num=new Array(a.length-c+b);for(var d=0;d<a.length-c;d++)this.num[d]=a[d+c]}function j(a,b){this.totalCount=a,this.dataCount=b}function k(){this.buffer=[],this.length=0}function m(){return"undefined"!=typeof CanvasRenderingContext2D}function n(){var a=!1,b=navigator.userAgent;return/android/i.test(b)&&(a=!0,aMat=b.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(a=parseFloat(aMat[1]))),a}function r(a,b){for(var c=1,e=s(a),f=0,g=l.length;g>=f;f++){var h=0;switch(b){case d.L:h=l[f][0];break;case d.M:h=l[f][1];break;case d.Q:h=l[f][2];break;case d.H:h=l[f][3]}if(h>=e)break;c++}if(c>l.length)throw new Error("Too long data");return c}function s(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[d][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=f.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f<this.modules.length;f++)for(var g=f*e,h=0;h<this.modules[f].length;h++){var i=h*e,j=this.modules[f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(var b=8;b<this.moduleCount-8;b++)null==this.modules[6][b]&&(this.modules[6][b]=0==b%2)},setupPositionAdjustPattern:function(){for(var a=f.getPatternPosition(this.typeNumber),b=0;b<a.length;b++)for(var c=0;c<a.length;c++){var d=a[b],e=a[c];if(null==this.modules[d][e])for(var g=-2;2>=g;g++)for(var h=-2;2>=h;h++)this.modules[d+g][e+h]=-2==g||2==g||-2==h||2==h||0==g&&0==h?!0:!1}},setupTypeNumber:function(a){for(var b=f.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=f.getBCHTypeInfo(c),e=0;15>e;e++){var g=!a&&1==(1&d>>e);6>e?this.modules[e][8]=g:8>e?this.modules[e+1][8]=g:this.modules[this.moduleCount-15+e][8]=g}for(var e=0;15>e;e++){var g=!a&&1==(1&d>>e);8>e?this.modules[8][this.moduleCount-e-1]=g:9>e?this.modules[8][15-e-1+1]=g:this.modules[8][15-e-1]=g}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,g=0,h=this.moduleCount-1;h>0;h-=2)for(6==h&&h--;;){for(var i=0;2>i;i++)if(null==this.modules[d][h-i]){var j=!1;g<a.length&&(j=1==(1&a[g]>>>e));var k=f.getMask(b,d,h-i);k&&(j=!j),this.modules[d][h-i]=j,e--,-1==e&&(g++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,d){for(var e=j.getRSBlocks(a,c),g=new k,h=0;h<d.length;h++){var i=d[h];g.put(i.mode,4),g.put(i.getLength(),f.getLengthInBits(i.mode,a)),i.write(g)}for(var l=0,h=0;h<e.length;h++)l+=e[h].dataCount;if(g.getLengthInBits()>8*l)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+8*l+")");for(g.getLengthInBits()+4<=8*l&&g.put(0,4);0!=g.getLengthInBits()%8;)g.putBit(!1);for(;;){if(g.getLengthInBits()>=8*l)break;if(g.put(b.PAD0,8),g.getLengthInBits()>=8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e)},b.createBytes=function(a,b){for(var c=0,d=0,e=0,g=new Array(b.length),h=new Array(b.length),j=0;j<b.length;j++){var k=b[j].dataCount,l=b[j].totalCount-k;d=Math.max(d,k),e=Math.max(e,l),g[j]=new Array(k);for(var m=0;m<g[j].length;m++)g[j][m]=255&a.buffer[m+c];c+=k;var n=f.getErrorCorrectPolynomial(l),o=new i(g[j],n.getLength()-1),p=o.mod(n);h[j]=new Array(n.getLength()-1);for(var m=0;m<h[j].length;m++){var q=m+p.getLength()-h[j].length;h[j][m]=q>=0?p.get(q):0}}for(var r=0,m=0;m<b.length;m++)r+=b[m].totalCount;for(var s=new Array(r),t=0,m=0;d>m;m++)for(var j=0;j<b.length;j++)m<g[j].length&&(s[t++]=g[j][m]);for(var m=0;e>m;m++)for(var j=0;j<b.length;j++)m<h[j].length&&(s[t++]=h[j][m]);return s};for(var c={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},d={L:1,M:0,Q:3,H:2},e={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var b=a<<10;f.getBCHDigit(b)-f.getBCHDigit(f.G15)>=0;)b^=f.G15<<f.getBCHDigit(b)-f.getBCHDigit(f.G15);return(a<<10|b)^f.G15_MASK},getBCHTypeNumber:function(a){for(var b=a<<12;f.getBCHDigit(b)-f.getBCHDigit(f.G18)>=0;)b^=f.G18<<f.getBCHDigit(b)-f.getBCHDigit(f.G18);return a<<12|b},getBCHDigit:function(a){for(var b=0;0!=a;)b++,a>>>=1;return b},getPatternPosition:function(a){return f.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return 0==(b+c)%2;case e.PATTERN001:return 0==b%2;case e.PATTERN010:return 0==c%3;case e.PATTERN011:return 0==(b+c)%3;case e.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0==b*c%2+b*c%3;case e.PATTERN110:return 0==(b*c%2+b*c%3)%2;case e.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new i([1],0),c=0;a>c;c++)b=b.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case c.MODE_NUMBER:return 10;case c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case c.MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case c.MODE_NUMBER:return 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},g={glog:function(a){if(1>a)throw new Error("glog("+a+")");return g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<<h;for(var h=8;256>h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;c<this.getLength();c++)for(var d=0;d<a.getLength();d++)b[c+d]^=g.gexp(g.glog(this.get(c))+g.glog(a.get(d)));return new i(b,0)},mod:function(a){if(this.getLength()-a.getLength()<0)return this;for(var b=g.glog(this.get(0))-g.glog(a.get(0)),c=new Array(this.getLength()),d=0;d<this.getLength();d++)c[d]=this.get(d);for(var d=0;d<a.getLength();d++)c[d]^=g.gexp(g.glog(a.get(d))+b);return new i(c,0).mod(a)}},j.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],j.getRSBlocks=function(a,b){var c=j.getRsBlockTable(a,b);if(void 0==c)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+b);for(var d=c.length/3,e=[],f=0;d>f;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"template"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p="svg"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else"undefined"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=['<table style="border:0;border-collapse:collapse;">'],h=0;d>h;h++){g.push("<tr>");for(var i=0;d>i;i++)g.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+e+"px;height:"+f+"px;background-color:"+(a.isDark(h,i)?b.colorDark:b.colorLight)+';"></td>');g.push("</tr>")}g.push("</table>"),c.innerHTML=g.join("");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+"px "+k+"px")},a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}();
5414
5415(function (global, factory) {
5416	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
5417	typeof define === 'function' && define.amd ? define(['exports'], factory) :
5418	(factory((global.SpriteSpin = {})));
5419}(this, (function (exports) { 'use strict';
5420
5421/**
5422 * @internal
5423 */
5424var Api = /** @class */ (function () {
5425    function Api(data) {
5426        this.data = data;
5427    }
5428    return Api;
5429}());
5430/**
5431 * Adds methods to the SpriteSpin api
5432 *
5433 * @public
5434 */
5435function extendApi(methods) {
5436    var api = Api.prototype;
5437    for (var key in methods) {
5438        if (methods.hasOwnProperty(key)) {
5439            if (api[key]) {
5440                throw new Error('API method is already defined: ' + key);
5441            }
5442            else {
5443                api[key] = methods[key];
5444            }
5445        }
5446    }
5447    return api;
5448}
5449
5450var $$1 = window.jQuery || window.$;
5451
5452function getCursorPosition(event) {
5453    var touches = event.touches;
5454    var source = event;
5455    // jQuery Event normalization does not preserve the 'event.touches'
5456    // try to grab touches from the original event
5457    if (event.touches === undefined && event.originalEvent !== undefined) {
5458        touches = event.originalEvent.touches;
5459    }
5460    // get current touch or mouse position
5461    if (touches !== undefined && touches.length > 0) {
5462        source = touches[0];
5463    }
5464    return {
5465        x: source.clientX || 0,
5466        y: source.clientY || 0
5467    };
5468}
5469
5470var canvas;
5471var context;
5472function detectionContext() {
5473    if (context) {
5474        return context;
5475    }
5476    if (!canvas) {
5477        canvas = document.createElement('canvas');
5478    }
5479    if (!canvas || !canvas.getContext) {
5480        return null;
5481    }
5482    context = canvas.getContext('2d');
5483    return context;
5484}
5485/**
5486 * Idea taken from https://github.com/stomita/ios-imagefile-megapixel
5487 * Detects whether the image has been sub sampled by the browser and does not have its original dimensions.
5488 * This method unfortunately does not work for images that have transparent background.
5489 */
5490function detectSubsampling(img, width, height) {
5491    if (!detectionContext()) {
5492        return false;
5493    }
5494    // sub sampling happens on images above 1 megapixel
5495    if (width * height <= 1024 * 1024) {
5496        return false;
5497    }
5498    // set canvas to 1x1 pixel size and fill it with magenta color
5499    canvas.width = canvas.height = 1;
5500    context.fillStyle = '#FF00FF';
5501    context.fillRect(0, 0, 1, 1);
5502    // render the image with a negative offset to the left so that it would
5503    // fill the canvas pixel with the top right pixel of the image.
5504    context.drawImage(img, -width + 1, 0);
5505    // check color value to confirm image is covering edge pixel or not.
5506    // if color still magenta, the image is assumed to be sub sampled.
5507    try {
5508        var dat = context.getImageData(0, 0, 1, 1).data;
5509        return (dat[0] === 255) && (dat[1] === 0) && (dat[2] === 255);
5510    }
5511    catch (err) {
5512        // avoids cross origin exception for chrome when code runs without a server
5513        return false;
5514    }
5515}
5516
5517/**
5518 *
5519 */
5520function getOuterSize(data) {
5521    var width = Math.floor(data.width || data.frameWidth || data.target.innerWidth());
5522    var height = Math.floor(data.height || data.frameHeight || data.target.innerHeight());
5523    return {
5524        aspect: width / height,
5525        height: height,
5526        width: width
5527    };
5528}
5529function getComputedSize(data) {
5530    var size = getOuterSize(data);
5531    if (typeof window.getComputedStyle !== 'function') {
5532        return size;
5533    }
5534    var style = window.getComputedStyle(data.target[0]);
5535    if (!style.width) {
5536        return size;
5537    }
5538    size.width = Math.floor(Number(style.width.replace('px', '')));
5539    size.height = Math.floor(size.width / size.aspect);
5540    return size;
5541}
5542/**
5543 *
5544 */
5545function getInnerSize(data) {
5546    var width = Math.floor(data.frameWidth || data.width || data.target.innerWidth());
5547    var height = Math.floor(data.frameHeight || data.height || data.target.innerHeight());
5548    return {
5549        aspect: width / height,
5550        height: height,
5551        width: width
5552    };
5553}
5554/**
5555 *
5556 */
5557function getInnerLayout(mode, inner, outer) {
5558    // get mode
5559    var isFit = mode === 'fit';
5560    var isFill = mode === 'fill';
5561    var isMatch = mode === 'stretch';
5562    // resulting layout
5563    var layout = {
5564        width: '100%',
5565        height: '100%',
5566        top: 0,
5567        left: 0,
5568        bottom: 0,
5569        right: 0,
5570        position: 'absolute',
5571        overflow: 'hidden'
5572    };
5573    // no calculation here
5574    if (!mode || isMatch) {
5575        return layout;
5576    }
5577    // get size and aspect
5578    var aspectIsGreater = inner.aspect >= outer.aspect;
5579    // mode == original
5580    var width = inner.width;
5581    var height = inner.height;
5582    // keep aspect ratio but fit/fill into container
5583    if (isFit && aspectIsGreater || isFill && !aspectIsGreater) {
5584        width = outer.width;
5585        height = outer.width / inner.aspect;
5586    }
5587    if (isFill && aspectIsGreater || isFit && !aspectIsGreater) {
5588        height = outer.height;
5589        width = outer.height * inner.aspect;
5590    }
5591    // floor the numbers
5592    width = Math.floor(width);
5593    height = Math.floor(height);
5594    // position in center
5595    layout.width = width;
5596    layout.height = height;
5597    layout.top = Math.floor((outer.height - height) / 2);
5598    layout.left = Math.floor((outer.width - width) / 2);
5599    layout.right = layout.left;
5600    layout.bottom = layout.top;
5601    return layout;
5602}
5603
5604var img;
5605/**
5606 * gets the original width and height of an image element
5607 */
5608function naturalSize(image) {
5609    // for browsers that support naturalWidth and naturalHeight properties
5610    if (image.naturalWidth) {
5611        return {
5612            height: image.naturalHeight,
5613            width: image.naturalWidth
5614        };
5615    }
5616    // browsers that do not support naturalWidth and naturalHeight properties have to fall back to the width and
5617    // height properties. However, the image might have a css style applied so width and height would return the
5618    // css size. To avoid thet create a new Image object that is free of css rules and grab width and height
5619    // properties
5620    //
5621    // assume that the src has already been downloaded, so no onload callback is needed.
5622    img = img || new Image();
5623    img.src = image.src;
5624    return {
5625        height: img.height,
5626        width: img.width
5627    };
5628}
5629
5630/**
5631 * Measures the image frames that are used in the given data object
5632 */
5633function measure(images, options) {
5634    if (images.length === 1) {
5635        return [measureSheet(images[0], options)];
5636    }
5637    else if (options.framesX && options.framesY) {
5638        return measureMutipleSheets(images, options);
5639    }
5640    else {
5641        return measureFrames(images, options);
5642    }
5643}
5644function measureSheet(image, options) {
5645    var result = { id: 0, sprites: [] };
5646    measureImage(image, options, result);
5647    var frames = options.frames;
5648    var framesX = Number(options.framesX) || frames;
5649    var framesY = Math.ceil(frames / framesX);
5650    var frameWidth = Math.floor(result.width / framesX);
5651    var frameHeight = Math.floor(result.height / framesY);
5652    var divisor = result.isSubsampled ? 2 : 1;
5653    for (var i = 0; i < frames; i++) {
5654        var x = (i % framesX) * frameWidth;
5655        var y = Math.floor(i / framesX) * frameHeight;
5656        result.sprites.push({
5657            id: i,
5658            x: x, y: y,
5659            width: frameWidth,
5660            height: frameHeight,
5661            sampledX: x / divisor,
5662            sampledY: y / divisor,
5663            sampledWidth: frameWidth / divisor,
5664            sampledHeight: frameHeight / divisor
5665        });
5666    }
5667    return result;
5668}
5669function measureFrames(images, options) {
5670    var result = [];
5671    for (var id = 0; id < images.length; id++) {
5672        // TODO: optimize
5673        // dont measure images with same size twice
5674        var sheet = measureSheet(images[id], { frames: 1, framesX: 1, detectSubsampling: options.detectSubsampling });
5675        sheet.id = id;
5676        result.push(sheet);
5677    }
5678    return result;
5679}
5680function measureMutipleSheets(images, options) {
5681    var result = [];
5682    for (var id = 0; id < images.length; id++) {
5683        // TODO: optimize
5684        // dont measure images with same size twice
5685        var sheet = measureSheet(images[id], {
5686            frames: undefined,
5687            framesX: options.framesX,
5688            framesY: options.framesY,
5689            detectSubsampling: options.detectSubsampling
5690        });
5691        sheet.id = id;
5692        result.push(sheet);
5693    }
5694    return result;
5695}
5696function measureImage(image, options, result) {
5697    var size = naturalSize(image);
5698    result.isSubsampled = options.detectSubsampling && detectSubsampling(image, size.width, size.height);
5699    result.width = size.width;
5700    result.height = size.height;
5701    result.sampledWidth = size.width / (result.isSubsampled ? 2 : 1);
5702    result.sampledHeight = size.height / (result.isSubsampled ? 2 : 1);
5703    return result;
5704}
5705function findSpecs(metrics, frames, frame, lane) {
5706    var spriteId = lane * frames + frame;
5707    var sheetId = 0;
5708    var sprite = null;
5709    var sheet = null;
5710    while (true) {
5711        sheet = metrics[sheetId];
5712        if (!sheet) {
5713            break;
5714        }
5715        if (spriteId >= sheet.sprites.length) {
5716            spriteId -= sheet.sprites.length;
5717            sheetId++;
5718            continue;
5719        }
5720        sprite = sheet.sprites[spriteId];
5721        break;
5722    }
5723    return { sprite: sprite, sheet: sheet };
5724}
5725
5726function indexOf(element, arr) {
5727    for (var i = 0; i < arr.length; i++) {
5728        if (arr[i] === element) {
5729            return i;
5730        }
5731    }
5732}
5733function noop() {
5734    //
5735}
5736function preload(opts) {
5737    var src;
5738    var input = opts.source;
5739    src = typeof input === 'string' ? [input] : input;
5740    // const src: string[] =  ? [opts.source] : opts.source
5741    var images = [];
5742    var targetCount = (opts.preloadCount || src.length);
5743    var onInitiated = opts.initiated || noop;
5744    var onProgress = opts.progress || noop;
5745    var onComplete = opts.complete || noop;
5746    var count = 0;
5747    var completed = false;
5748    var firstLoaded = false;
5749    var tick = function () {
5750        count += 1;
5751        onProgress({
5752            index: indexOf(this, images),
5753            loaded: count,
5754            total: src.length,
5755            percent: Math.round((count / src.length) * 100)
5756        });
5757        firstLoaded = firstLoaded || (this === images[0]);
5758        if (firstLoaded && !completed && (count >= targetCount)) {
5759            completed = true;
5760            onComplete(images);
5761        }
5762    };
5763    for (var _i = 0, src_1 = src; _i < src_1.length; _i++) {
5764        var url = src_1[_i];
5765        var img = new Image();
5766        // push result
5767        images.push(img);
5768        // bind logic, dont care about abort/errors
5769        img.onload = img.onabort = img.onerror = tick;
5770        // begin load
5771        img.src = url;
5772    }
5773    onInitiated(images);
5774}
5775
5776function padNumber(num, length, pad) {
5777    var result = String(num);
5778    while (result.length < length) {
5779        result = String(pad) + result;
5780    }
5781    return result;
5782}
5783/**
5784 * Generates an array of source strings
5785 *
5786 * @remarks
5787 * Takes a template string and generates an array of strings by interpolating {lane} and {frame} placeholders.
5788 *
5789 * ```
5790 * sourceArray('http://example.com/image_{frame}.jpg, { frame: [1, 3], digits: 2 })
5791 * // gives:
5792 * // [ 'http://example.com/image_01.jpg', 'http://example.com/image_02.jpg', 'http://example.com/image_03.jpg' ]
5793 *
5794 * sourceArray('http://example.com/image_FRAME.jpg, { frame: [1, 3], digits: 2, framePlacer: 'FRAME' })
5795 * // gives:
5796 * // [ 'http://example.com/image_01.jpg', 'http://example.com/image_02.jpg', 'http://example.com/image_03.jpg' ]
5797 * ```
5798 *
5799 * @param template - The template string
5800 * @param opts - Interpolation options
5801 *
5802 * @public
5803 */
5804function sourceArray(template, opts) {
5805    var digits = opts.digits || 2;
5806    var lPlacer = opts.lanePlacer || '{lane}';
5807    var fPlacer = opts.framePlacer || '{frame}';
5808    var fStart = 0;
5809    var fEnd = 0;
5810    if (opts.frame) {
5811        fStart = opts.frame[0];
5812        fEnd = opts.frame[1];
5813    }
5814    var lStart = 0;
5815    var lEnd = 0;
5816    if (opts.lane) {
5817        lStart = opts.lane[0];
5818        lEnd = opts.lane[1];
5819    }
5820    var result = [];
5821    for (var lane = lStart; lane <= lEnd; lane += 1) {
5822        for (var frame = fStart; frame <= fEnd; frame += 1) {
5823            result.push(template
5824                .replace(lPlacer, padNumber(lane, digits, '0'))
5825                .replace(fPlacer, padNumber(frame, digits, '0')));
5826        }
5827    }
5828    return result;
5829}
5830
5831/**
5832 * The namespace that is used to bind functions to DOM events and store the data object
5833 */
5834var namespace = 'spritespin';
5835/**
5836 * Event names that are recognized by SpriteSpin. A module can implement any of these and they will be bound
5837 * to the target element on which the plugin is called.
5838 */
5839var eventNames = [
5840    'mousedown',
5841    'mousemove',
5842    'mouseup',
5843    'mouseenter',
5844    'mouseover',
5845    'mouseleave',
5846    'mousewheel',
5847    'wheel',
5848    'click',
5849    'dblclick',
5850    'touchstart',
5851    'touchmove',
5852    'touchend',
5853    'touchcancel',
5854    'selectstart',
5855    'gesturestart',
5856    'gesturechange',
5857    'gestureend'
5858];
5859/**
5860 *
5861 */
5862var callbackNames = [
5863    'onInit',
5864    'onProgress',
5865    'onLoad',
5866    'onFrameChanged',
5867    'onFrame',
5868    'onDraw',
5869    'onComplete',
5870    'onDestroy'
5871];
5872/**
5873 * Names of events for that the default behavior should be prevented.
5874 */
5875var eventsToPrevent = [
5876    'dragstart'
5877];
5878/**
5879 * Default set of SpriteSpin options. This also represents the majority of data attributes that are used during the
5880 * lifetime of a SpriteSpin instance. The data is stored inside the target DOM element on which the plugin is called.
5881 */
5882var defaults = {
5883    source: undefined,
5884    width: undefined,
5885    height: undefined,
5886    frames: undefined,
5887    framesX: undefined,
5888    lanes: 1,
5889    sizeMode: undefined,
5890    renderer: 'canvas',
5891    lane: 0,
5892    frame: 0,
5893    frameTime: 40,
5894    animate: true,
5895    retainAnimate: false,
5896    reverse: false,
5897    loop: true,
5898    stopFrame: 0,
5899    wrap: true,
5900    wrapLane: false,
5901    sense: 1,
5902    senseLane: undefined,
5903    orientation: 'horizontal',
5904    detectSubsampling: true,
5905    preloadCount: undefined,
5906    responsive: undefined,
5907    plugins: [
5908        '360',
5909        'drag'
5910    ]
5911};
5912
5913function noop$1() {
5914    // noop
5915}
5916function wrapConsole(type) {
5917    return console && console[type] ? function () {
5918        var args = [];
5919        for (var _i = 0; _i < arguments.length; _i++) {
5920            args[_i] = arguments[_i];
5921        }
5922        return console.log.apply(console, args);
5923    } : noop$1;
5924}
5925var log = wrapConsole('log');
5926var warn = wrapConsole('warn');
5927var error = wrapConsole('error');
5928function toArray(value) {
5929    return Array.isArray(value) ? value : [value];
5930}
5931/**
5932 * clamps the given value by the given min and max values
5933 */
5934function clamp(value, min, max) {
5935    return (value > max ? max : (value < min ? min : value));
5936}
5937/**
5938 *
5939 */
5940function wrap(value, min, max, size) {
5941    while (value > max) {
5942        value -= size;
5943    }
5944    while (value < min) {
5945        value += size;
5946    }
5947    return value;
5948}
5949/**
5950 * prevents default action on the given event
5951 */
5952function prevent(e) {
5953    e.preventDefault();
5954    return false;
5955}
5956/**
5957 * Binds on the given target and event the given function.
5958 * The SpriteSpin namespace is attached to the event name
5959 */
5960function bind(target, event, func) {
5961    if (func) {
5962        target.bind(event + '.' + namespace, function (e) {
5963            func.apply(target, [e, target.spritespin('data')]);
5964        });
5965    }
5966}
5967/**
5968 * Unbinds all SpriteSpin events from given target element
5969 */
5970function unbind(target) {
5971    target.unbind('.' + namespace);
5972}
5973/**
5974 * Checks if given object is a function
5975 */
5976function isFunction(fn) {
5977    return typeof fn === 'function';
5978}
5979function pixelRatio(context) {
5980    var devicePixelRatio = window.devicePixelRatio || 1;
5981    var backingStoreRatio = context.webkitBackingStorePixelRatio ||
5982        context.mozBackingStorePixelRatio ||
5983        context.msBackingStorePixelRatio ||
5984        context.oBackingStorePixelRatio ||
5985        context.backingStorePixelRatio || 1;
5986    return devicePixelRatio / backingStoreRatio;
5987}
5988
5989
5990
5991var _Utils = Object.freeze({
5992	$: $$1,
5993	getCursorPosition: getCursorPosition,
5994	detectSubsampling: detectSubsampling,
5995	getOuterSize: getOuterSize,
5996	getComputedSize: getComputedSize,
5997	getInnerSize: getInnerSize,
5998	getInnerLayout: getInnerLayout,
5999	measure: measure,
6000	findSpecs: findSpecs,
6001	naturalSize: naturalSize,
6002	preload: preload,
6003	sourceArray: sourceArray,
6004	noop: noop$1,
6005	log: log,
6006	warn: warn,
6007	error: error,
6008	toArray: toArray,
6009	clamp: clamp,
6010	wrap: wrap,
6011	prevent: prevent,
6012	bind: bind,
6013	unbind: unbind,
6014	isFunction: isFunction,
6015	pixelRatio: pixelRatio
6016});
6017
6018/**
6019 * Applies css attributes to layout the SpriteSpin containers.
6020 *
6021 * @internal
6022 */
6023function applyLayout(data) {
6024    // disable selection
6025    data.target
6026        .attr('unselectable', 'on')
6027        .css({
6028        width: '',
6029        height: '',
6030        '-ms-user-select': 'none',
6031        '-moz-user-select': 'none',
6032        '-khtml-user-select': 'none',
6033        '-webkit-user-select': 'none',
6034        'user-select': 'none'
6035    });
6036    var size = data.responsive ? getComputedSize(data) : getOuterSize(data);
6037    var layout = getInnerLayout(data.sizeMode, getInnerSize(data), size);
6038    // apply layout on target
6039    data.target.css({
6040        width: size.width,
6041        height: size.height,
6042        position: 'relative',
6043        overflow: 'hidden'
6044    });
6045    // apply layout on stage
6046    data.stage
6047        .css(layout)
6048        .hide();
6049    if (!data.canvas) {
6050        return;
6051    }
6052    // apply layout on canvas
6053    data.canvas.css(layout).hide();
6054    // apply pixel ratio on canvas
6055    data.canvasRatio = data.canvasRatio || pixelRatio(data.context);
6056    if (typeof layout.width === 'number' && typeof layout.height === 'number') {
6057        data.canvas[0].width = (layout.width * data.canvasRatio) || size.width;
6058        data.canvas[0].height = (layout.height * data.canvasRatio) || size.height;
6059    }
6060    else {
6061        data.canvas[0].width = (size.width * data.canvasRatio);
6062        data.canvas[0].height = (size.height * data.canvasRatio);
6063    }
6064    // width and height must be set before calling scale
6065    data.context.scale(data.canvasRatio, data.canvasRatio);
6066}
6067
6068/**
6069 * Gets a state object by name.
6070 * @internal
6071 * @param data - The SpriteSpin instance data
6072 * @param name - The name of the state object
6073 */
6074function getState(data, name) {
6075    data.state = data.state || {};
6076    data.state[name] = data.state[name] || {};
6077    return data.state[name];
6078}
6079/**
6080 * Gets a plugin state object by name.
6081 *
6082 * @remarks
6083 * Plugins should use this method to get or create a state object where they can
6084 * store any instance variables.
6085 *
6086 * @public
6087 * @param data - The SpriteSpin instance data
6088 * @param name - The name of the plugin
6089 */
6090function getPluginState(data, name) {
6091    var state = getState(data, 'plugin');
6092    state[name] = state[name] || {};
6093    return state[name];
6094}
6095/**
6096 * Checks whether a flag is set. See {@link flag}.
6097 *
6098 * @public
6099 * @param data - The SpriteSpin instance data
6100 * @param key - The name of the flag
6101 */
6102function is(data, key) {
6103    return !!getState(data, 'flags')[key];
6104}
6105/**
6106 * Sets a flag value. See {@link is}.
6107 *
6108 * @public
6109 * @param data - The SpriteSpin instance data
6110 * @param key - The name of the flag
6111 * @param value - The value to set
6112 */
6113function flag(data, key, value) {
6114    getState(data, 'flags')[key] = !!value;
6115}
6116
6117/**
6118 * Gets the playback state
6119 *
6120 * @public
6121 * @param data - The SpriteSpin instance data
6122 */
6123function getPlaybackState(data) {
6124    return getState(data, 'playback');
6125}
6126function updateLane(data, lane) {
6127    data.lane = data.wrapLane
6128        ? wrap(lane, 0, data.lanes - 1, data.lanes)
6129        : clamp(lane, 0, data.lanes - 1);
6130}
6131function updateAnimationFrame(data) {
6132    data.frame += (data.reverse ? -1 : 1);
6133    // wrap the frame value to fit in range [0, data.frames)
6134    data.frame = wrap(data.frame, 0, data.frames - 1, data.frames);
6135    // stop animation if loop is disabled and the stopFrame is reached
6136    if (!data.loop && (data.frame === data.stopFrame)) {
6137        stopAnimation(data);
6138    }
6139}
6140function updateInputFrame(data, frame) {
6141    data.frame = Number(frame);
6142    data.frame = data.wrap
6143        ? wrap(data.frame, 0, data.frames - 1, data.frames)
6144        : clamp(data.frame, 0, data.frames - 1);
6145}
6146function updateAnimation(data) {
6147    var state = getPlaybackState(data);
6148    if (state.handler) {
6149        updateBefore(data);
6150        updateAnimationFrame(data);
6151        updateAfter(data);
6152    }
6153}
6154function updateBefore(data) {
6155    var state = getPlaybackState(data);
6156    state.lastFrame = data.frame;
6157    state.lastLane = data.lane;
6158}
6159function updateAfter(data) {
6160    var state = getPlaybackState(data);
6161    if (state.lastFrame !== data.frame || state.lastLane !== data.lane) {
6162        data.target.trigger('onFrameChanged.' + namespace, data);
6163    }
6164    data.target.trigger('onFrame.' + namespace, data);
6165    data.target.trigger('onDraw.' + namespace, data);
6166}
6167/**
6168 * Updates the frame or lane number of the SpriteSpin data.
6169 *
6170 * @public
6171 * @param data - The SpriteSpin instance data
6172 * @param frame - The frame number to set
6173 * @param lane - The lane number to set
6174 */
6175function updateFrame(data, frame, lane) {
6176    updateBefore(data);
6177    if (frame != null) {
6178        updateInputFrame(data, frame);
6179    }
6180    if (lane != null) {
6181        updateLane(data, lane);
6182    }
6183    updateAfter(data);
6184}
6185/**
6186 * Stops the running animation.
6187 *
6188 * @public
6189 * @param data - The SpriteSpin instance data
6190 */
6191function stopAnimation(data) {
6192    data.animate = false;
6193    var state = getPlaybackState(data);
6194    if (state.handler != null) {
6195        window.clearInterval(state.handler);
6196        state.handler = null;
6197    }
6198}
6199/**
6200 * Starts animation playback if needed.
6201 *
6202 * @remarks
6203 * Starts animation playback if `animate` property is `true` and the animation is not yet running.
6204 *
6205 * @public
6206 * @param data - The SpriteSpin instance data
6207 */
6208function applyAnimation(data) {
6209    var state = getPlaybackState(data);
6210    if (state.handler && (!data.animate || state.frameTime !== data.frameTime)) {
6211        stopAnimation(data);
6212    }
6213    if (data.animate && !state.handler) {
6214        state.frameTime = data.frameTime;
6215        state.handler = window.setInterval(function () { return updateAnimation(data); }, state.frameTime);
6216    }
6217}
6218/**
6219 * Starts the animation playback
6220 *
6221 * @remarks
6222 * Starts the animation playback and also sets the `animate` property to `true`
6223 *
6224 * @public
6225 * @param data - The SpriteSpin instance data
6226 */
6227function startAnimation(data) {
6228    data.animate = true;
6229    applyAnimation(data);
6230}
6231
6232var plugins = {};
6233/**
6234 * Registers a plugin.
6235 *
6236 * @remarks
6237 * Use this to add custom Rendering or Updating modules that can be addressed with the 'module' option.
6238 *
6239 * @public
6240 * @param name - The name of the plugin
6241 * @param plugin - The plugin implementation
6242 */
6243function registerPlugin(name, plugin) {
6244    if (plugins[name]) {
6245        error("Plugin name \"" + name + "\" is already taken");
6246        return;
6247    }
6248    plugin = plugin || {};
6249    plugins[name] = plugin;
6250    return plugin;
6251}
6252/**
6253 * Registers a plugin.
6254 *
6255 * @public
6256 * @deprecated Use {@link registerPlugin} instead
6257 * @param name - The name of the plugin
6258 * @param plugin - The plugin implementation
6259 */
6260function registerModule(name, plugin) {
6261    warn('"registerModule" is deprecated, use "registerPlugin" instead');
6262    registerPlugin(name, plugin);
6263}
6264/**
6265 * Gets an active plugin by name
6266 *
6267 * @internal
6268 * @param name - The name of the plugin
6269 */
6270function getPlugin(name) {
6271    return plugins[name];
6272}
6273/**
6274 * Replaces module names on given SpriteSpin data and replaces them with actual implementations.
6275 * @internal
6276 */
6277function applyPlugins(data) {
6278    fixPlugins(data);
6279    for (var i = 0; i < data.plugins.length; i += 1) {
6280        var name_1 = data.plugins[i];
6281        if (typeof name_1 !== 'string') {
6282            continue;
6283        }
6284        var plugin = getPlugin(name_1);
6285        if (!plugin) {
6286            error('No plugin found with name ' + name_1);
6287            continue;
6288        }
6289        data.plugins[i] = plugin;
6290    }
6291}
6292function fixPlugins(data) {
6293    // tslint:disable no-string-literal
6294    if (data['mods']) {
6295        warn('"mods" option is deprecated, use "plugins" instead');
6296        data.plugins = data['mods'];
6297        delete data['mods'];
6298    }
6299    if (data['behavior']) {
6300        warn('"behavior" option is deprecated, use "plugins" instead');
6301        data.plugins.push(data['behavior']);
6302        delete data['behavior'];
6303    }
6304    if (data['module']) {
6305        warn('"module" option is deprecated, use "plugins" instead');
6306        data.plugins.push(data['module']);
6307        delete data['module'];
6308    }
6309}
6310
6311var $$2 = $$1;
6312var counter = 0;
6313/**
6314 * Collection of all SpriteSpin instances
6315 */
6316var instances = {};
6317function pushInstance(data) {
6318    counter += 1;
6319    data.id = String(counter);
6320    instances[data.id] = data;
6321}
6322function popInstance(data) {
6323    delete instances[data.id];
6324}
6325function eachInstance(cb) {
6326    for (var id in instances) {
6327        if (instances.hasOwnProperty(id)) {
6328            cb(instances[id]);
6329        }
6330    }
6331}
6332var lazyinit = function () {
6333    // replace function with a noop
6334    // this logic must run only once
6335    lazyinit = function () { };
6336    function onEvent(eventName, e) {
6337        eachInstance(function (data) {
6338            for (var _i = 0, _a = data.plugins; _i < _a.length; _i++) {
6339                var module_1 = _a[_i];
6340                if (typeof module_1[eventName] === 'function') {
6341                    module_1[eventName].apply(data.target, [e, data]);
6342                }
6343            }
6344        });
6345    }
6346    function onResize() {
6347        eachInstance(function (data) {
6348            if (data.responsive) {
6349                boot(data);
6350            }
6351        });
6352    }
6353    var _loop_1 = function (eventName) {
6354        $$2(window.document).bind(eventName + '.' + namespace, function (e) {
6355            onEvent('document' + eventName, e);
6356        });
6357    };
6358    for (var _i = 0, eventNames_1 = eventNames; _i < eventNames_1.length; _i++) {
6359        var eventName = eventNames_1[_i];
6360        _loop_1(eventName);
6361    }
6362    var resizeTimeout = null;
6363    $$2(window).on('resize', function () {
6364        window.clearTimeout(resizeTimeout);
6365        resizeTimeout = window.setTimeout(onResize, 100);
6366    });
6367};
6368/**
6369 * (re)binds all spritespin events on the target element
6370 *
6371 * @internal
6372 */
6373function applyEvents(data) {
6374    var target = data.target;
6375    // Clear all SpriteSpin events on the target element
6376    unbind(target);
6377    // disable all default browser behavior on the following events
6378    // mainly prevents image drag operation
6379    for (var _i = 0, eventsToPrevent_1 = eventsToPrevent; _i < eventsToPrevent_1.length; _i++) {
6380        var eName = eventsToPrevent_1[_i];
6381        bind(target, eName, prevent);
6382    }
6383    // Bind module functions to SpriteSpin events
6384    for (var _a = 0, _b = data.plugins; _a < _b.length; _a++) {
6385        var plugin = _b[_a];
6386        for (var _c = 0, eventNames_2 = eventNames; _c < eventNames_2.length; _c++) {
6387            var eName = eventNames_2[_c];
6388            bind(target, eName, plugin[eName]);
6389        }
6390        for (var _d = 0, callbackNames_1 = callbackNames; _d < callbackNames_1.length; _d++) {
6391            var eName = callbackNames_1[_d];
6392            bind(target, eName, plugin[eName]);
6393        }
6394    }
6395    // bind auto start function to load event.
6396    bind(target, 'onLoad', function (e, d) {
6397        applyAnimation(d);
6398    });
6399    // bind all user events that have been passed on initialization
6400    for (var _e = 0, callbackNames_2 = callbackNames; _e < callbackNames_2.length; _e++) {
6401        var eName = callbackNames_2[_e];
6402        bind(target, eName, data[eName]);
6403    }
6404}
6405function applyMetrics(data) {
6406    if (!data.images) {
6407        data.metrics = [];
6408    }
6409    data.metrics = measure(data.images, data);
6410    var spec = findSpecs(data.metrics, data.frames, 0, 0);
6411    if (spec.sprite) {
6412        // TODO: try to remove frameWidth/frameHeight
6413        data.frameWidth = spec.sprite.width;
6414        data.frameHeight = spec.sprite.height;
6415    }
6416}
6417/**
6418 * Runs the boot process.
6419 *
6420 * @remarks
6421 * (re)initializes plugins, (re)initializes the layout, (re)binds events and loads source images.
6422 *
6423 * @internal
6424 */
6425function boot(data) {
6426    applyPlugins(data);
6427    applyEvents(data);
6428    applyLayout(data);
6429    data.source = toArray(data.source);
6430    data.loading = true;
6431    data.target
6432        .addClass('loading')
6433        .trigger('onInit.' + namespace, data);
6434    preload({
6435        source: data.source,
6436        preloadCount: data.preloadCount,
6437        progress: function (progress) {
6438            data.progress = progress;
6439            data.target.trigger('onProgress.' + namespace, data);
6440        },
6441        complete: function (images) {
6442            data.images = images;
6443            data.loading = false;
6444            data.frames = data.frames || images.length;
6445            applyMetrics(data);
6446            applyLayout(data);
6447            data.stage.show();
6448            data.target
6449                .removeClass('loading')
6450                .trigger('onLoad.' + namespace, data)
6451                .trigger('onFrame.' + namespace, data)
6452                .trigger('onDraw.' + namespace, data)
6453                .trigger('onComplete.' + namespace, data);
6454        }
6455    });
6456}
6457/**
6458 * Creates a new SpriteSpin instance
6459 *
6460 * @public
6461 */
6462function create(options) {
6463    var _this = this;
6464    var target = options.target;
6465    // SpriteSpin is not initialized
6466    // Create default settings object and extend with given options
6467    var data = $$2.extend(true, {}, defaults, options);
6468    // ensure source is set
6469    data.source = data.source || [];
6470    // ensure plugins are set
6471    data.plugins = data.plugins || [];
6472    // if image tags are contained inside this DOM element
6473    // use these images as the source files
6474    target.find('img').each(function () {
6475        if (!Array.isArray(data.source)) {
6476            data.source = [];
6477        }
6478        data.source.push($$2(_this).attr('src'));
6479    });
6480    // build inner html
6481    // <div>
6482    //   <div class='spritespin-stage'></div>
6483    //   <canvas class='spritespin-canvas'></canvas>
6484    // </div>
6485    target
6486        .empty()
6487        .addClass('spritespin-instance')
6488        .append("<div class='spritespin-stage'></div>");
6489    // add the canvas element if canvas rendering is enabled and supported
6490    if (data.renderer === 'canvas') {
6491        var canvas = document.createElement('canvas');
6492        if (!!(canvas.getContext && canvas.getContext('2d'))) {
6493            data.canvas = $$2(canvas).addClass('spritespin-canvas');
6494            data.context = canvas.getContext('2d');
6495            target.append(data.canvas);
6496            target.addClass('with-canvas');
6497        }
6498        else {
6499            // fallback to image rendering mode
6500            data.renderer = 'image';
6501        }
6502    }
6503    // setup references to DOM elements
6504    data.target = target;
6505    data.stage = target.find('.spritespin-stage');
6506    // store the data
6507    target.data(namespace, data);
6508    pushInstance(data);
6509    return data;
6510}
6511/**
6512 * Creates a new SpriteSpin instance, or updates an existing one
6513 *
6514 * @public
6515 */
6516function createOrUpdate(options) {
6517    lazyinit();
6518    var data = options.target.data(namespace);
6519    if (!data) {
6520        data = create(options);
6521    }
6522    else {
6523        $$2.extend(data, options);
6524    }
6525    boot(data);
6526    return data;
6527}
6528/**
6529 * Destroys the SpriteSpin instance
6530 *
6531 * @remarks
6532 * - stops running animation
6533 * - unbinds all events
6534 * - deletes the data on the target element
6535 *
6536 * @public
6537 */
6538function destroy(data) {
6539    popInstance(data);
6540    stopAnimation(data);
6541    data.target
6542        .trigger('onDestroy', data)
6543        .html(null)
6544        .attr('style', null)
6545        .attr('unselectable', null)
6546        .removeClass(['spritespin-instance', 'with-canvas']);
6547    unbind(data.target);
6548    data.target.removeData(namespace);
6549}
6550
6551/**
6552 * Gets the current input state
6553 *
6554 * @public
6555 * @param data - The SpriteSpin instance data
6556 */
6557function getInputState(data) {
6558    return getState(data, 'input');
6559}
6560/**
6561 * Updates the input state using a mous or touch event.
6562 *
6563 * @public
6564 * @param e - The input event
6565 * @param data - The SpriteSpin instance data
6566 */
6567function updateInput(e, data) {
6568    var cursor = getCursorPosition(e);
6569    var state = getInputState(data);
6570    // cache positions from previous frame
6571    state.oldX = state.currentX;
6572    state.oldY = state.currentY;
6573    state.currentX = cursor.x;
6574    state.currentY = cursor.y;
6575    // Fix old position.
6576    if (state.oldX === undefined || state.oldY === undefined) {
6577        state.oldX = state.currentX;
6578        state.oldY = state.currentY;
6579    }
6580    // Cache the initial click/touch position and store the frame number at which the click happened.
6581    // Useful for different behavior implementations. This must be restored when the click/touch is released.
6582    if (state.startX === undefined || state.startY === undefined) {
6583        state.startX = state.currentX;
6584        state.startY = state.currentY;
6585        state.clickframe = data.frame;
6586        state.clicklane = data.lane;
6587    }
6588    // Calculate the vector from start position to current pointer position.
6589    state.dX = state.currentX - state.startX;
6590    state.dY = state.currentY - state.startY;
6591    // Calculate the vector from last frame position to current pointer position.
6592    state.ddX = state.currentX - state.oldX;
6593    state.ddY = state.currentY - state.oldY;
6594    // Normalize vectors to range [-1:+1]
6595    state.ndX = state.dX / data.target.innerWidth();
6596    state.ndY = state.dY / data.target.innerHeight();
6597    state.nddX = state.ddX / data.target.innerWidth();
6598    state.nddY = state.ddY / data.target.innerHeight();
6599}
6600/**
6601 * Resets the input state.
6602 *
6603 * @public
6604 */
6605function resetInput(data) {
6606    var input = getInputState(data);
6607    input.startX = input.startY = undefined;
6608    input.currentX = input.currentY = undefined;
6609    input.oldX = input.oldY = undefined;
6610    input.dX = input.dY = 0;
6611    input.ddX = input.ddY = 0;
6612    input.ndX = input.ndY = 0;
6613    input.nddX = input.nddY = 0;
6614}
6615
6616function extension(option, value) {
6617    var $target = $$1(this);
6618    if (option === 'data') {
6619        return $target.data(namespace);
6620    }
6621    if (option === 'api') {
6622        var data = $target.data(namespace);
6623        data.api = data.api || new Api(data);
6624        return data.api;
6625    }
6626    if (option === 'destroy') {
6627        return $target.each(function () {
6628            var data = $target.data(namespace);
6629            if (data) {
6630                destroy(data);
6631            }
6632        });
6633    }
6634    if (arguments.length === 2 && typeof option === 'string') {
6635        option = (_a = {}, _a[option] = value, _a);
6636    }
6637    if (typeof option === 'object') {
6638        return createOrUpdate($$1.extend(true, { target: $target }, option)).target;
6639    }
6640    throw new Error('Invalid call to spritespin');
6641    var _a;
6642}
6643$$1.fn[namespace] = extension;
6644
6645// tslint:disable:object-literal-shorthand
6646// tslint:disable:only-arrow-functions
6647extendApi({
6648    // Gets a value indicating whether the animation is currently running.
6649    isPlaying: function () {
6650        return getPlaybackState(this.data).handler != null;
6651    },
6652    // Gets a value indicating whether the animation looping is enabled.
6653    isLooping: function () {
6654        return this.data.loop;
6655    },
6656    // Starts/Stops the animation playback
6657    toggleAnimation: function () {
6658        if (this.isPlaying()) {
6659            this.stopAnimation();
6660        }
6661        else {
6662            this.startAnimation();
6663        }
6664    },
6665    // Stops animation playback
6666    stopAnimation: function () {
6667        this.data.animate = false;
6668        stopAnimation(this.data);
6669    },
6670    // Starts animation playback
6671    startAnimation: function () {
6672        this.data.animate = true;
6673        applyAnimation(this.data);
6674    },
6675    // Sets a value indicating whether the animation should be looped or not.
6676    // This might start the animation (if the 'animate' data attribute is set to true)
6677    loop: function (value) {
6678        this.data.loop = value;
6679        applyAnimation(this.data);
6680        return this;
6681    },
6682    // Gets the current frame number
6683    currentFrame: function () {
6684        return this.data.frame;
6685    },
6686    // Updates SpriteSpin to the specified frame.
6687    updateFrame: function (frame) {
6688        updateFrame(this.data, frame);
6689        return this;
6690    },
6691    // Skips the given number of frames
6692    skipFrames: function (step) {
6693        var data = this.data;
6694        updateFrame(data, data.frame + (data.reverse ? -step : +step));
6695        return this;
6696    },
6697    // Updates SpriteSpin so that the next frame is shown
6698    nextFrame: function () {
6699        return this.skipFrames(1);
6700    },
6701    // Updates SpriteSpin so that the previous frame is shown
6702    prevFrame: function () {
6703        return this.skipFrames(-1);
6704    },
6705    // Starts the animations that will play until the given frame number is reached
6706    // options:
6707    //   force [boolean] starts the animation, even if current frame is the target frame
6708    //   nearest [boolean] animates to the direction with minimum distance to the target frame
6709    playTo: function (frame, options) {
6710        var data = this.data;
6711        options = options || {};
6712        if (!options.force && data.frame === frame) {
6713            return;
6714        }
6715        if (options.nearest) {
6716            // distance to the target frame
6717            var a = frame - data.frame;
6718            // distance to last frame and the to target frame
6719            var b = frame > data.frame ? a - data.frames : a + data.frames;
6720            // minimum distance
6721            var c = Math.abs(a) < Math.abs(b) ? a : b;
6722            data.reverse = c < 0;
6723        }
6724        data.animate = true;
6725        data.loop = false;
6726        data.stopFrame = frame;
6727        applyAnimation(data);
6728        return this;
6729    }
6730});
6731
6732function pick(target, names) {
6733    for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
6734        var name_1 = names_1[_i];
6735        if (target[name_1] || name_1 in target) {
6736            return name_1;
6737        }
6738    }
6739    return names[0];
6740}
6741var browser = {
6742    requestFullscreen: pick(document.documentElement, [
6743        'requestFullscreen',
6744        'webkitRequestFullScreen',
6745        'mozRequestFullScreen',
6746        'msRequestFullscreen'
6747    ]),
6748    exitFullscreen: pick(document, [
6749        'exitFullscreen',
6750        'webkitExitFullscreen',
6751        'webkitCancelFullScreen',
6752        'mozCancelFullScreen',
6753        'msExitFullscreen'
6754    ]),
6755    fullscreenElement: pick(document, [
6756        'fullscreenElement',
6757        'webkitFullscreenElement',
6758        'webkitCurrentFullScreenElement',
6759        'mozFullScreenElement',
6760        'msFullscreenElement'
6761    ]),
6762    fullscreenEnabled: pick(document, [
6763        'fullscreenEnabled',
6764        'webkitFullscreenEnabled',
6765        'mozFullScreenEnabled',
6766        'msFullscreenEnabled'
6767    ]),
6768    fullscreenchange: pick(document, [
6769        'onfullscreenchange',
6770        'onwebkitfullscreenchange',
6771        'onmozfullscreenchange',
6772        'onMSFullscreenChange'
6773    ]).replace(/^on/, ''),
6774    fullscreenerror: pick(document, [
6775        'onfullscreenerror',
6776        'onwebkitfullscreenerror',
6777        'onmozfullscreenerror',
6778        'onMSFullscreenError'
6779    ]).replace(/^on/, '')
6780};
6781var changeEvent = browser.fullscreenchange + '.' + namespace + '-fullscreen';
6782function unbindChangeEvent() {
6783    $$1(document).unbind(changeEvent);
6784}
6785function bindChangeEvent(callback) {
6786    unbindChangeEvent();
6787    $$1(document).bind(changeEvent, callback);
6788}
6789var orientationEvent = 'orientationchange.' + namespace + '-fullscreen';
6790function unbindOrientationEvent() {
6791    $$1(window).unbind(orientationEvent);
6792}
6793function bindOrientationEvent(callback) {
6794    unbindOrientationEvent();
6795    $$1(window).bind(orientationEvent, callback);
6796}
6797function requestFullscreenNative(e) {
6798    e = e || document.documentElement;
6799    e[browser.requestFullscreen]();
6800}
6801function exitFullscreen() {
6802    return document[browser.exitFullscreen]();
6803}
6804function fullscreenEnabled() {
6805    return document[browser.fullscreenEnabled];
6806}
6807function fullscreenElement() {
6808    return document[browser.fullscreenElement];
6809}
6810function isFullscreen() {
6811    return !!fullscreenElement();
6812}
6813function toggleFullscreen(data, opts) {
6814    if (isFullscreen()) {
6815        this.apiRequestFullscreen(opts);
6816    }
6817    else {
6818        this.exitFullscreen();
6819    }
6820}
6821function requestFullscreen(data, opts) {
6822    opts = opts || {};
6823    var oWidth = data.width;
6824    var oHeight = data.height;
6825    var oSource = data.source;
6826    var oSize = data.sizeMode;
6827    var oResponsive = data.responsive;
6828    var enter = function () {
6829        data.width = window.screen.width;
6830        data.height = window.screen.height;
6831        data.source = (opts.source || oSource);
6832        data.sizeMode = opts.sizeMode || 'fit';
6833        data.responsive = false;
6834        boot(data);
6835    };
6836    var exit = function () {
6837        data.width = oWidth;
6838        data.height = oHeight;
6839        data.source = oSource;
6840        data.sizeMode = oSize;
6841        data.responsive = oResponsive;
6842        boot(data);
6843    };
6844    bindChangeEvent(function () {
6845        if (isFullscreen()) {
6846            enter();
6847            bindOrientationEvent(enter);
6848        }
6849        else {
6850            unbindChangeEvent();
6851            unbindOrientationEvent();
6852            exit();
6853        }
6854    });
6855    requestFullscreenNative(data.target[0]);
6856}
6857extendApi({
6858    fullscreenEnabled: fullscreenEnabled,
6859    fullscreenElement: fullscreenElement,
6860    exitFullscreen: exitFullscreen,
6861    toggleFullscreen: function (opts) {
6862        toggleFullscreen(this.data, opts);
6863    },
6864    requestFullscreen: function (opts) {
6865        requestFullscreen(this.data, opts);
6866    }
6867});
6868
6869(function () {
6870    var NAME = 'click';
6871    function click(e, data) {
6872        if (data.loading || !data.stage.is(':visible')) {
6873            return;
6874        }
6875        updateInput(e, data);
6876        var input = getInputState(data);
6877        var half, pos;
6878        var target = data.target, offset = target.offset();
6879        if (data.orientation === 'horizontal') {
6880            half = target.innerWidth() / 2;
6881            pos = input.currentX - offset.left;
6882        }
6883        else {
6884            half = target.innerHeight() / 2;
6885            pos = input.currentY - offset.top;
6886        }
6887        updateFrame(data, data.frame + (pos > half ? 1 : -1));
6888    }
6889    registerPlugin(NAME, {
6890        name: NAME,
6891        mouseup: click,
6892        touchend: click
6893    });
6894})();
6895
6896(function () {
6897    var NAME = 'drag';
6898    function getState$$1(data) {
6899        return getPluginState(data, NAME);
6900    }
6901    function getAxis(data) {
6902        if (typeof data.orientation === 'number') {
6903            return data.orientation * Math.PI / 180;
6904        }
6905        if (data.orientation === 'horizontal') {
6906            return 0;
6907        }
6908        return Math.PI / 2;
6909    }
6910    function dragStart(e, data) {
6911        var state = getState$$1(data);
6912        if (data.loading || is(data, 'dragging') || !data.stage.is(':visible')) {
6913            return;
6914        }
6915        // allow browser scroll only on double tap
6916        var now = new Date().getTime();
6917        if (state.startAt && (now - state.startAt > 200)) {
6918            e.preventDefault();
6919        }
6920        state.startAt = now;
6921        state.wasPlaying = !!getPlaybackState(data).handler;
6922        state.frame = data.frame || 0;
6923        state.lane = data.lane || 0;
6924        flag(data, 'dragging', true);
6925        updateInput(e, data);
6926    }
6927    function dragEnd(e, data) {
6928        if (is(data, 'dragging')) {
6929            flag(data, 'dragging', false);
6930            resetInput(data);
6931            if (data.retainAnimate && getState$$1(data).wasPlaying) {
6932                startAnimation(data);
6933            }
6934        }
6935    }
6936    function drag(e, data) {
6937        var state = getState$$1(data);
6938        var input = getInputState(data);
6939        if (!is(data, 'dragging')) {
6940            return;
6941        }
6942        updateInput(e, data);
6943        var rad = getAxis(data);
6944        var sn = Math.sin(rad);
6945        var cs = Math.cos(rad);
6946        var x = ((input.nddX * cs - input.nddY * sn) * data.sense) || 0;
6947        var y = ((input.nddX * sn + input.nddY * cs) * (data.senseLane || data.sense)) || 0;
6948        // accumulate
6949        state.frame += data.frames * x;
6950        state.lane += data.lanes * y;
6951        // update spritespin
6952        var oldFrame = data.frame;
6953        var oldLane = data.lane;
6954        updateFrame(data, Math.floor(state.frame), Math.floor(state.lane));
6955        stopAnimation(data);
6956    }
6957    function mousemove(e, data) {
6958        dragStart(e, data);
6959        drag(e, data);
6960    }
6961    registerPlugin('drag', {
6962        name: 'drag',
6963        mousedown: dragStart,
6964        mousemove: drag,
6965        mouseup: dragEnd,
6966        documentmousemove: drag,
6967        documentmouseup: dragEnd,
6968        touchstart: dragStart,
6969        touchmove: drag,
6970        touchend: dragEnd,
6971        touchcancel: dragEnd
6972    });
6973    registerPlugin('move', {
6974        name: 'move',
6975        mousemove: mousemove,
6976        mouseleave: dragEnd,
6977        touchstart: dragStart,
6978        touchmove: drag,
6979        touchend: dragEnd,
6980        touchcancel: dragEnd
6981    });
6982})();
6983
6984(function () {
6985    var NAME = 'hold';
6986    function getState$$1(data) {
6987        return getPluginState(data, NAME);
6988    }
6989    function rememberOptions(data) {
6990        var state = getState$$1(data);
6991        state.frameTime = data.frameTime;
6992        state.animate = data.animate;
6993        state.reverse = data.reverse;
6994    }
6995    function restoreOptions(data) {
6996        var state = getState$$1(data);
6997        data.frameTime = state.frameTime;
6998        data.animate = state.animate;
6999        data.reverse = state.reverse;
7000    }
7001    function start(e, data) {
7002        if (is(data, 'loading') || is(data, 'dragging') || !data.stage.is(':visible')) {
7003            return;
7004        }
7005        rememberOptions(data);
7006        updateInput(e, data);
7007        flag(data, 'dragging', true);
7008        data.animate = true;
7009        applyAnimation(data);
7010    }
7011    function stop(e, data) {
7012        flag(data, 'dragging', false);
7013        resetInput(data);
7014        stopAnimation(data);
7015        restoreOptions(data);
7016        applyAnimation(data);
7017    }
7018    function update(e, data) {
7019        if (!is(data, 'dragging')) {
7020            return;
7021        }
7022        updateInput(e, data);
7023        var input = getInputState(data);
7024        var half, delta;
7025        var target = data.target, offset = target.offset();
7026        if (data.orientation === 'horizontal') {
7027            half = target.innerWidth() / 2;
7028            delta = (input.currentX - offset.left - half) / half;
7029        }
7030        else {
7031            half = (data.height / 2);
7032            delta = (input.currentY - offset.top - half) / half;
7033        }
7034        data.reverse = delta < 0;
7035        delta = delta < 0 ? -delta : delta;
7036        data.frameTime = 80 * (1 - delta) + 20;
7037        if (((data.orientation === 'horizontal') && (input.dX < input.dY)) ||
7038            ((data.orientation === 'vertical') && (input.dX < input.dY))) {
7039            e.preventDefault();
7040        }
7041    }
7042    function onFrame(e, data) {
7043        data.animate = true;
7044        applyAnimation(data);
7045    }
7046    registerPlugin(NAME, {
7047        name: NAME,
7048        mousedown: start,
7049        mousemove: update,
7050        mouseup: stop,
7051        mouseleave: stop,
7052        touchstart: start,
7053        touchmove: update,
7054        touchend: stop,
7055        touchcancel: stop,
7056        onFrame: onFrame
7057    });
7058})();
7059
7060(function () {
7061    var NAME = 'swipe';
7062    function getState$$1(data) {
7063        return getPluginState(data, NAME);
7064    }
7065    function getOption(data, name, fallback) {
7066        return data[name] || fallback;
7067    }
7068    function init(e, data) {
7069        var state = getState$$1(data);
7070        state.fling = getOption(data, 'swipeFling', 10);
7071        state.snap = getOption(data, 'swipeSnap', 0.50);
7072    }
7073    function start(e, data) {
7074        if (!data.loading && !is(data, 'dragging')) {
7075            updateInput(e, data);
7076            flag(data, 'dragging', true);
7077        }
7078    }
7079    function update(e, data) {
7080        if (!is(data, 'dragging')) {
7081            return;
7082        }
7083        updateInput(e, data);
7084        var frame = data.frame;
7085        var lane = data.lane;
7086        updateFrame(data, frame, lane);
7087    }
7088    function end(e, data) {
7089        if (!is(data, 'dragging')) {
7090            return;
7091        }
7092        flag(data, 'dragging', false);
7093        var state = getState$$1(data);
7094        var input = getInputState(data);
7095        var frame = data.frame;
7096        var lane = data.lane;
7097        var snap = state.snap;
7098        var fling = state.fling;
7099        var dS, dF;
7100        if (data.orientation === 'horizontal') {
7101            dS = input.ndX;
7102            dF = input.ddX;
7103        }
7104        else {
7105            dS = input.ndY;
7106            dF = input.ddY;
7107        }
7108        if (dS >= snap || dF >= fling) {
7109            frame = data.frame - 1;
7110        }
7111        else if (dS <= -snap || dF <= -fling) {
7112            frame = data.frame + 1;
7113        }
7114        resetInput(data);
7115        updateFrame(data, frame, lane);
7116        stopAnimation(data);
7117    }
7118    registerPlugin(NAME, {
7119        name: NAME,
7120        onLoad: init,
7121        mousedown: start,
7122        mousemove: update,
7123        mouseup: end,
7124        mouseleave: end,
7125        touchstart: start,
7126        touchmove: update,
7127        touchend: end,
7128        touchcancel: end
7129    });
7130})();
7131
7132(function () {
7133    var NAME = 'wheel';
7134    function wheel(e, data) {
7135        if (!data.loading && data.stage.is(':visible')) {
7136            e.preventDefault();
7137            var we = e.originalEvent;
7138            var signX = we.deltaX === 0 ? 0 : we.deltaX > 0 ? 1 : -1;
7139            var signY = we.deltaY === 0 ? 0 : we.deltaY > 0 ? 1 : -1;
7140            updateFrame(data, data.frame + signY, data.lane + signX);
7141        }
7142    }
7143    registerPlugin(NAME, {
7144        name: NAME,
7145        wheel: wheel
7146    });
7147})();
7148
7149(function () {
7150    var template = "\n<div class='spritespin-progress'>\n  <div class='spritespin-progress-label'></div>\n  <div class='spritespin-progress-bar'></div>\n</div>\n";
7151    function getState$$1(data) {
7152        return getPluginState(data, NAME);
7153    }
7154    var NAME = 'progress';
7155    function onInit(e, data) {
7156        var state = getState$$1(data);
7157        if (!state.stage) {
7158            state.stage = $$1(template);
7159            state.stage.appendTo(data.target);
7160        }
7161        state.stage.find('.spritespin-progress-label')
7162            .text("0%")
7163            .css({ 'text-align': 'center' });
7164        state.stage.find('.spritespin-progress-bar').css({
7165            width: "0%"
7166        });
7167        state.stage.hide().fadeIn();
7168    }
7169    function onProgress(e, data) {
7170        var state = getState$$1(data);
7171        state.stage.find('.spritespin-progress-label')
7172            .text(data.progress.percent + "%")
7173            .css({ 'text-align': 'center' });
7174        state.stage.find('.spritespin-progress-bar').css({
7175            width: data.progress.percent + "%"
7176        });
7177    }
7178    function onLoad(e, data) {
7179        $$1(getState$$1(data).stage).fadeOut();
7180    }
7181    function onDestroy(e, data) {
7182        $$1(getState$$1(data).stage).remove();
7183    }
7184    registerPlugin(NAME, {
7185        name: NAME,
7186        onInit: onInit,
7187        onProgress: onProgress,
7188        onLoad: onLoad,
7189        onDestroy: onDestroy
7190    });
7191})();
7192
7193(function () {
7194    var NAME = '360';
7195    function onLoad(e, data) {
7196        data.stage.find('.spritespin-frames').detach();
7197        if (data.renderer === 'image') {
7198            $(data.images).addClass('spritespin-frames').appendTo(data.stage);
7199        }
7200    }
7201    function onDraw(e, data) {
7202        var specs = findSpecs(data.metrics, data.frames, data.frame, data.lane);
7203        var sheet = specs.sheet;
7204        var sprite = specs.sprite;
7205        if (!sheet || !sprite) {
7206            return;
7207        }
7208        var src = data.source[sheet.id];
7209        var image = data.images[sheet.id];
7210        if (data.renderer === 'canvas') {
7211            data.canvas.show();
7212            var w = data.canvas[0].width / data.canvasRatio;
7213            var h = data.canvas[0].height / data.canvasRatio;
7214            data.context.clearRect(0, 0, w, h);
7215            data.context.drawImage(image, sprite.sampledX, sprite.sampledY, sprite.sampledWidth, sprite.sampledHeight, 0, 0, w, h);
7216            return;
7217        }
7218        var scaleX = data.stage.innerWidth() / sprite.sampledWidth;
7219        var scaleY = data.stage.innerHeight() / sprite.sampledHeight;
7220        var top = Math.floor(-sprite.sampledY * scaleY);
7221        var left = Math.floor(-sprite.sampledX * scaleX);
7222        var width = Math.floor(sheet.sampledWidth * scaleX);
7223        var height = Math.floor(sheet.sampledHeight * scaleY);
7224        if (data.renderer === 'background') {
7225            data.stage.css({
7226                'background-image': "url('" + src + "')",
7227                'background-position': left + "px " + top + "px",
7228                'background-repeat': 'no-repeat',
7229                // set custom background size to enable responsive rendering
7230                '-webkit-background-size': width + "px " + height + "px",
7231                '-moz-background-size': width + "px " + height + "px",
7232                '-o-background-size': width + "px " + height + "px",
7233                'background-size': width + "px " + height + "px" /* Chrome, Firefox 4+, IE 9+, Opera, Safari 5+ */
7234            });
7235            return;
7236        }
7237        $(data.images).hide();
7238        $(image).show().css({
7239            position: 'absolute',
7240            top: top,
7241            left: left,
7242            'max-width': 'initial',
7243            width: width,
7244            height: height
7245        });
7246    }
7247    registerPlugin(NAME, {
7248        name: NAME,
7249        onLoad: onLoad,
7250        onDraw: onDraw
7251    });
7252})();
7253
7254(function () {
7255    var NAME = 'blur';
7256    function getState$$1(data) {
7257        return getPluginState(data, NAME);
7258    }
7259    function getOption(data, name, fallback) {
7260        return data[name] || fallback;
7261    }
7262    function init(e, data) {
7263        var state = getState$$1(data);
7264        state.canvas = state.canvas || $$1("<canvas class='blur-layer'></canvas>");
7265        state.context = state.context || state.canvas[0].getContext('2d');
7266        state.steps = state.steps || [];
7267        state.fadeTime = Math.max(getOption(data, 'blurFadeTime', 200), 1);
7268        state.frameTime = Math.max(getOption(data, 'blurFrameTime', data.frameTime), 16);
7269        state.trackTime = null;
7270        state.cssBlur = !!getOption(data, 'blurCss', false);
7271        var inner = getInnerSize(data);
7272        var outer = data.responsive ? getComputedSize(data) : getOuterSize(data);
7273        var css = getInnerLayout(data.sizeMode, inner, outer);
7274        state.canvas[0].width = data.width * data.canvasRatio;
7275        state.canvas[0].height = data.height * data.canvasRatio;
7276        state.canvas.css(css).show();
7277        state.context.scale(data.canvasRatio, data.canvasRatio);
7278        data.target.append(state.canvas);
7279    }
7280    function onFrame(e, data) {
7281        var state = getState$$1(data);
7282        trackFrame(data);
7283        if (state.timeout == null) {
7284            loop(data);
7285        }
7286    }
7287    function trackFrame(data) {
7288        var state = getState$$1(data);
7289        var ani = getPlaybackState(data);
7290        // distance between frames
7291        var d = Math.abs(data.frame - ani.lastFrame);
7292        // shortest distance
7293        d = d >= data.frames / 2 ? data.frames - d : d;
7294        state.steps.unshift({
7295            frame: data.frame,
7296            lane: data.lane,
7297            live: 1,
7298            step: state.frameTime / state.fadeTime,
7299            d: d,
7300            alpha: 0
7301        });
7302    }
7303    var toRemove = [];
7304    function removeOldFrames(frames) {
7305        toRemove.length = 0;
7306        for (var i = 0; i < frames.length; i += 1) {
7307            if (frames[i].alpha <= 0) {
7308                toRemove.push(i);
7309            }
7310        }
7311        for (var _i = 0, toRemove_1 = toRemove; _i < toRemove_1.length; _i++) {
7312            var item = toRemove_1[_i];
7313            frames.splice(item, 1);
7314        }
7315    }
7316    function loop(data) {
7317        var state = getState$$1(data);
7318        state.timeout = window.setTimeout(function () { tick(data); }, state.frameTime);
7319    }
7320    function killLoop(data) {
7321        var state = getState$$1(data);
7322        window.clearTimeout(state.timeout);
7323        state.timeout = null;
7324    }
7325    function applyCssBlur(canvas, d) {
7326        var amount = Math.min(Math.max((d / 2) - 4, 0), 2.5);
7327        var blur = "blur(" + amount + "px)";
7328        canvas.css({
7329            '-webkit-filter': blur,
7330            filter: blur
7331        });
7332    }
7333    function clearFrame(data, state) {
7334        state.canvas.show();
7335        var w = state.canvas[0].width / data.canvasRatio;
7336        var h = state.canvas[0].height / data.canvasRatio;
7337        // state.context.clearRect(0, 0, w, h)
7338    }
7339    function drawFrame(data, state, step) {
7340        if (step.alpha <= 0) {
7341            return;
7342        }
7343        var specs = findSpecs(data.metrics, data.frames, step.frame, step.lane);
7344        var sheet = specs.sheet;
7345        var sprite = specs.sprite;
7346        if (!sheet || !sprite) {
7347            return;
7348        }
7349        var src = data.source[sheet.id];
7350        var image = data.images[sheet.id];
7351        if (image.complete === false) {
7352            return;
7353        }
7354        state.canvas.show();
7355        var w = state.canvas[0].width / data.canvasRatio;
7356        var h = state.canvas[0].height / data.canvasRatio;
7357        state.context.globalAlpha = step.alpha;
7358        state.context.drawImage(image, sprite.sampledX, sprite.sampledY, sprite.sampledWidth, sprite.sampledHeight, 0, 0, w, h);
7359    }
7360    function tick(data) {
7361        var state = getState$$1(data);
7362        killLoop(data);
7363        if (!state.context) {
7364            return;
7365        }
7366        var d = 0;
7367        clearFrame(data, state);
7368        state.context.clearRect(0, 0, data.width, data.height);
7369        for (var _i = 0, _a = state.steps; _i < _a.length; _i++) {
7370            var step = _a[_i];
7371            step.live = Math.max(step.live - step.step, 0);
7372            step.alpha = Math.max(step.live - 0.25, 0);
7373            drawFrame(data, state, step);
7374            d += step.alpha + step.d;
7375        }
7376        if (state.cssBlur) {
7377            applyCssBlur(state.canvas, d);
7378        }
7379        removeOldFrames(state.steps);
7380        if (state.steps.length) {
7381            loop(data);
7382        }
7383    }
7384    registerPlugin(NAME, {
7385        name: NAME,
7386        onLoad: init,
7387        onFrameChanged: onFrame
7388    });
7389})();
7390
7391(function () {
7392    var max = Math.max;
7393    var min = Math.min;
7394    var NAME = 'ease';
7395    function getState$$1(data) {
7396        return getPluginState(data, NAME);
7397    }
7398    function getOption(data, name, fallback) {
7399        return data[name] || fallback;
7400    }
7401    function init(e, data) {
7402        var state = getState$$1(data);
7403        state.maxSamples = max(getOption(data, 'easeMaxSamples', 5), 0);
7404        state.damping = max(min(getOption(data, 'easeDamping', 0.9), 0.999), 0);
7405        state.abortTime = max(getOption(data, 'easeAbortTime', 250), 16);
7406        state.updateTime = max(getOption(data, 'easeUpdateTime', data.frameTime), 16);
7407        state.samples = [];
7408        state.steps = [];
7409    }
7410    function update(e, data) {
7411        if (is(data, 'dragging')) {
7412            killLoop(data);
7413            sampleInput(data);
7414        }
7415    }
7416    function end(e, data) {
7417        var state = getState$$1(data);
7418        var samples = state.samples;
7419        var last;
7420        var lanes = 0;
7421        var frames = 0;
7422        var time = 0;
7423        for (var _i = 0, samples_1 = samples; _i < samples_1.length; _i++) {
7424            var sample = samples_1[_i];
7425            if (!last) {
7426                last = sample;
7427                continue;
7428            }
7429            var dt = sample.time - last.time;
7430            if (dt > state.abortTime) {
7431                lanes = frames = time = 0;
7432                return killLoop(data);
7433            }
7434            frames += sample.frame - last.frame;
7435            lanes += sample.lane - last.lane;
7436            time += dt;
7437            last = sample;
7438        }
7439        samples.length = 0;
7440        if (!time) {
7441            return;
7442        }
7443        state.lane = data.lane;
7444        state.lanes = 0;
7445        state.laneStep = lanes / time * state.updateTime;
7446        state.frame = data.frame;
7447        state.frames = 0;
7448        state.frameStep = frames / time * state.updateTime;
7449        loop(data);
7450    }
7451    function sampleInput(data) {
7452        var state = getState$$1(data);
7453        // add a new sample
7454        state.samples.push({
7455            time: new Date().getTime(),
7456            frame: data.frame,
7457            lane: data.lane
7458        });
7459        // drop old samples
7460        while (state.samples.length > state.maxSamples) {
7461            state.samples.shift();
7462        }
7463    }
7464    function killLoop(data) {
7465        var state = getState$$1(data);
7466        if (state.handler != null) {
7467            window.clearTimeout(state.handler);
7468            state.handler = null;
7469        }
7470    }
7471    function loop(data) {
7472        var state = getState$$1(data);
7473        state.handler = window.setTimeout(function () { tick(data); }, state.updateTime);
7474    }
7475    function tick(data) {
7476        var state = getState$$1(data);
7477        state.lanes += state.laneStep;
7478        state.frames += state.frameStep;
7479        state.laneStep *= state.damping;
7480        state.frameStep *= state.damping;
7481        var frame = Math.floor(state.frame + state.frames);
7482        var lane = Math.floor(state.lane + state.lanes);
7483        updateFrame(data, frame, lane);
7484        if (is(data, 'dragging')) {
7485            killLoop(data);
7486        }
7487        else if (Math.abs(state.frameStep) > 0.005 || Math.abs(state.laneStep) > 0.005) {
7488            loop(data);
7489        }
7490        else {
7491            killLoop(data);
7492        }
7493    }
7494    registerPlugin(NAME, {
7495        name: NAME,
7496        onLoad: init,
7497        mousemove: update,
7498        mouseup: end,
7499        mouseleave: end,
7500        touchmove: update,
7501        touchend: end,
7502        touchcancel: end
7503    });
7504})();
7505
7506(function () {
7507    var NAME = 'gallery';
7508    function getState$$1(data) {
7509        return getPluginState(data, NAME);
7510    }
7511    function getOption(data, name, fallback) {
7512        return data[name] || fallback;
7513    }
7514    function load(e, data) {
7515        var state = getState$$1(data);
7516        state.images = [];
7517        state.offsets = [];
7518        state.frame = data.frame;
7519        state.speed = getOption(data, 'gallerySpeed', 500);
7520        state.opacity = getOption(data, 'galleryOpacity', 0.25);
7521        state.stage = getOption(data, 'galleryStage', $$1('<div></div>'));
7522        state.stage.empty().addClass('gallery-stage').prependTo(data.stage);
7523        var size = 0;
7524        for (var _i = 0, _a = data.images; _i < _a.length; _i++) {
7525            var image = _a[_i];
7526            var naturalSize$$1 = naturalSize(image);
7527            var scale = data.height / naturalSize$$1.height;
7528            var img = $$1(image);
7529            state.stage.append(img);
7530            state.images.push(img);
7531            state.offsets.push(-size + (data.width - image.width * scale) / 2);
7532            size += data.width;
7533            img.css({
7534                'max-width': 'initial',
7535                opacity: state.opacity,
7536                width: data.width,
7537                height: data.height
7538            });
7539        }
7540        var innerSize = getInnerSize(data);
7541        var outerSize = data.responsive ? getComputedSize(data) : getOuterSize(data);
7542        var layout = getInnerLayout(data.sizeMode, innerSize, outerSize);
7543        state.stage.css(layout).css({ width: size, left: state.offsets[state.frame] });
7544        state.images[state.frame].animate({ opacity: 1 }, { duration: state.speed });
7545    }
7546    function draw(e, data) {
7547        var state = getState$$1(data);
7548        var input = getInputState(data);
7549        var isDragging = is(data, 'dragging');
7550        if (state.frame !== data.frame && !isDragging) {
7551            state.stage.stop(true, false).animate({ left: state.offsets[data.frame] }, { duration: state.speed });
7552            state.images[state.frame].animate({ opacity: state.opacity }, { duration: state.speed });
7553            state.frame = data.frame;
7554            state.images[state.frame].animate({ opacity: 1 }, { duration: state.speed });
7555            state.stage.animate({ left: state.offsets[state.frame] });
7556        }
7557        else if (isDragging || state.dX !== input.dX) {
7558            state.dX = input.dX;
7559            state.ddX = input.ddX;
7560            state.stage.stop(true, true).css({ left: state.offsets[state.frame] + state.dX });
7561        }
7562    }
7563    registerPlugin(NAME, {
7564        name: NAME,
7565        onLoad: load,
7566        onDraw: draw
7567    });
7568})();
7569
7570(function () {
7571    var NAME = 'panorama';
7572    function getState$$1(data) {
7573        return getPluginState(data, NAME);
7574    }
7575    function onLoad(e, data) {
7576        var state = getState$$1(data);
7577        var sprite = data.metrics[0];
7578        if (!sprite) {
7579            return;
7580        }
7581        if (data.orientation === 'horizontal') {
7582            state.scale = data.target.innerHeight() / sprite.sampledHeight;
7583            data.frames = sprite.sampledWidth;
7584        }
7585        else {
7586            state.scale = data.target.innerWidth() / sprite.sampledWidth;
7587            data.frames = sprite.sampledHeight;
7588        }
7589        var width = Math.floor(sprite.sampledWidth * state.scale);
7590        var height = Math.floor(sprite.sampledHeight * state.scale);
7591        data.stage.css({
7592            'background-image': "url(" + data.source[sprite.id] + ")",
7593            'background-repeat': 'repeat-both',
7594            // set custom background size to enable responsive rendering
7595            '-webkit-background-size': width + "px " + height + "px",
7596            '-moz-background-size': width + "px " + height + "px",
7597            '-o-background-size': width + "px " + height + "px",
7598            'background-size': width + "px " + height + "px" /* Chrome, Firefox 4+, IE 9+, Opera, Safari 5+ */
7599        });
7600    }
7601    function onDraw(e, data) {
7602        var state = getState$$1(data);
7603        var px = data.orientation === 'horizontal' ? 1 : 0;
7604        var py = px ? 0 : 1;
7605        var offset = data.frame % data.frames;
7606        var left = Math.round(px * offset * state.scale);
7607        var top = Math.round(py * offset * state.scale);
7608        data.stage.css({ 'background-position': left + "px " + top + "px" });
7609    }
7610    registerPlugin(NAME, {
7611        name: NAME,
7612        onLoad: onLoad,
7613        onDraw: onDraw
7614    });
7615})();
7616
7617(function () {
7618    var NAME = 'zoom';
7619    function getState$$1(data) {
7620        return getPluginState(data, NAME);
7621    }
7622    function getOption(data, name, fallback) {
7623        return data[name] || fallback;
7624    }
7625    function onInit(e, data) {
7626        var state = getState$$1(data);
7627        state.source = getOption(data, 'zoomSource', data.source);
7628        state.doubleClickTime = getOption(data, 'zoomDoubleClickTime', 500);
7629        state.stage = state.stage || $$1("<div class='zoom-stage'></div>");
7630        state.stage.css({
7631            width: '100%',
7632            height: '100%',
7633            top: 0,
7634            left: 0,
7635            bottom: 0,
7636            right: 0,
7637            position: 'absolute'
7638        })
7639            .appendTo(data.target)
7640            .hide();
7641    }
7642    function onDestroy(e, data) {
7643        var state = getState$$1(data);
7644        if (state.stage) {
7645            state.stage.remove();
7646            delete state.stage;
7647        }
7648    }
7649    function updateInput$$1(e, data) {
7650        var state = getState$$1(data);
7651        if (!state.stage.is(':visible')) {
7652            return;
7653        }
7654        e.preventDefault();
7655        // hack into drag/move module and disable dragging
7656        // prevents frame change during zoom mode
7657        flag(data, 'dragging', false);
7658        // grab touch/cursor position
7659        var cursor = getCursorPosition(e);
7660        // normalize cursor position into [0:1] range
7661        var x = cursor.x / data.width;
7662        var y = cursor.y / data.height;
7663        if (state.oldX == null) {
7664            state.oldX = x;
7665            state.oldY = y;
7666        }
7667        if (state.currentX == null) {
7668            state.currentX = x;
7669            state.currentY = y;
7670        }
7671        // calculate move delta since last frame and remember current position
7672        var dx = x - state.oldX;
7673        var dy = y - state.oldY;
7674        state.oldX = x;
7675        state.oldY = y;
7676        // invert drag direction for touch events to enable 'natural' scrolling
7677        if (e.type.match(/touch/)) {
7678            dx = -dx;
7679            dy = -dy;
7680        }
7681        // accumulate display coordinates
7682        state.currentX = clamp(state.currentX + dx, 0, 1);
7683        state.currentY = clamp(state.currentY + dy, 0, 1);
7684        updateFrame(data, data.frame, data.lane);
7685    }
7686    function onClick(e, data) {
7687        e.preventDefault();
7688        var state = getState$$1(data);
7689        // simulate double click
7690        var clickTime = new Date().getTime();
7691        if (!state.clickTime) {
7692            // on first click
7693            state.clickTime = clickTime;
7694            return;
7695        }
7696        // on second click
7697        var timeDelta = clickTime - state.clickTime;
7698        if (timeDelta > state.doubleClickTime) {
7699            // took too long, back to first click
7700            state.clickTime = clickTime;
7701            return;
7702        }
7703        // on valid double click
7704        state.clickTime = undefined;
7705        if (toggleZoom(data)) {
7706            updateInput$$1(e, data);
7707        }
7708    }
7709    function onMove(e, data) {
7710        var state = getState$$1(data);
7711        if (state.stage.is(':visible')) {
7712            updateInput$$1(e, data);
7713        }
7714    }
7715    function onDraw(e, data) {
7716        var state = getState$$1(data);
7717        // calculate the frame index
7718        var index = data.lane * data.frames + data.frame;
7719        // get the zoom image. Use original frames as fallback. This won't work for spritesheets
7720        var source = state.source[index];
7721        var spec = findSpecs(data.metrics, data.frames, data.frame, data.lane);
7722        // get display position
7723        var x = state.currentX;
7724        var y = state.currentY;
7725        // fallback to centered position
7726        if (x == null) {
7727            x = state.currentX = 0.5;
7728            y = state.currentY = 0.5;
7729        }
7730        if (source) {
7731            // scale up from [0:1] to [0:100] range
7732            x = Math.floor(x * 100);
7733            y = Math.floor(y * 100);
7734            // update background image and position
7735            state.stage.css({
7736                'background-repeat': 'no-repeat',
7737                'background-image': "url('" + source + "')",
7738                'background-position': x + "% " + y + "%"
7739            });
7740        }
7741        else if (spec.sheet && spec.sprite) {
7742            var sprite = spec.sprite;
7743            var sheet = spec.sheet;
7744            var src = data.source[sheet.id];
7745            var left = -Math.floor(sprite.sampledX + x * (sprite.sampledWidth - data.width));
7746            var top_1 = -Math.floor(sprite.sampledY + y * (sprite.sampledHeight - data.height));
7747            var width = sheet.sampledWidth;
7748            var height = sheet.sampledHeight;
7749            state.stage.css({
7750                'background-image': "url('" + src + "')",
7751                'background-position': left + "px " + top_1 + "px",
7752                'background-repeat': 'no-repeat',
7753                // set custom background size to enable responsive rendering
7754                '-webkit-background-size': width + "px " + height + "px",
7755                '-moz-background-size': width + "px " + height + "px",
7756                '-o-background-size': width + "px " + height + "px",
7757                'background-size': width + "px " + height + "px" /* Chrome, Firefox 4+, IE 9+, Opera, Safari 5+ */
7758            });
7759        }
7760    }
7761    function toggleZoom(data) {
7762        var state = getState$$1(data);
7763        if (!state.stage) {
7764            throw new Error('zoom module is not initialized or is not available.');
7765        }
7766        if (state.stage.is(':visible')) {
7767            state.stage.fadeOut();
7768            data.stage.fadeIn();
7769        }
7770        else {
7771            state.stage.fadeIn();
7772            data.stage.fadeOut();
7773            return true;
7774        }
7775        return false;
7776    }
7777    registerPlugin(NAME, {
7778        name: NAME,
7779        mousedown: onClick,
7780        touchstart: onClick,
7781        mousemove: onMove,
7782        touchmove: onMove,
7783        onInit: onInit,
7784        onDestroy: onDestroy,
7785        onDraw: onDraw
7786    });
7787    extendApi({
7788        toggleZoom: function () { toggleZoom(this.data); } // tslint:disable-line
7789    });
7790})();
7791
7792var Utils = _Utils;
7793
7794exports.Utils = Utils;
7795exports.sourceArray = sourceArray;
7796exports.Api = Api;
7797exports.extendApi = extendApi;
7798exports.instances = instances;
7799exports.applyEvents = applyEvents;
7800exports.boot = boot;
7801exports.create = create;
7802exports.createOrUpdate = createOrUpdate;
7803exports.destroy = destroy;
7804exports.namespace = namespace;
7805exports.eventNames = eventNames;
7806exports.callbackNames = callbackNames;
7807exports.eventsToPrevent = eventsToPrevent;
7808exports.defaults = defaults;
7809exports.getInputState = getInputState;
7810exports.updateInput = updateInput;
7811exports.resetInput = resetInput;
7812exports.applyLayout = applyLayout;
7813exports.getPlaybackState = getPlaybackState;
7814exports.updateFrame = updateFrame;
7815exports.stopAnimation = stopAnimation;
7816exports.applyAnimation = applyAnimation;
7817exports.startAnimation = startAnimation;
7818exports.registerPlugin = registerPlugin;
7819exports.registerModule = registerModule;
7820exports.getPlugin = getPlugin;
7821exports.applyPlugins = applyPlugins;
7822exports.getState = getState;
7823exports.getPluginState = getPluginState;
7824exports.is = is;
7825exports.flag = flag;
7826
7827Object.defineProperty(exports, '__esModule', { value: true });
7828
7829})));
7830//# sourceMappingURL=spritespin.js.map
7831Handlebars.registerHelper('greaterThanFive', function (index) {
7832  if (index > 4) {
7833    return 'hidden';
7834  }
7835});
7836
7837Handlebars.registerHelper('equalToFive', function (index) {
7838  if (index === 5) {
7839    var html = '<li class="list-group-item js-display-hidden c-display-hidden" tabindex="0">\n' +
7840               '  <div class="radio">\n' +
7841               '    <label class="c-filter__label c-filter__seeMore">\n' +
7842               '      <span class="customRadio"></span>\n' +
7843               '       <span class="see-more">'+
7844                        window.Granite.I18n.get('rdoe_facet.seeMore', null, localStorage.getItem('i18nhint')) +
7845               '       </span>'+
7846               '       <span class="c-filter__collapse-cta"><i class="icon-secondaryCTA_dropDown"></i></span>'+
7847               '    </label>\n' +
7848               '  </div>\n' +
7849               '</li>';
7850    return html;
7851  }
7852});
7853
7854Handlebars.registerHelper('i18keyToValue', function (key) {
7855  if (key) {
7856    if (window.Granite && window.Granite.I18n) {
7857      return window.Granite.I18n.get(key);
7858    }
7859    return key;
7860  }
7861});
7862
7863Handlebars.registerHelper('ifEquals', function (obj,value,options) {
7864        return ( (obj===value) ? options.fn(this) : options.inverse(this));
7865});
7866
7867Handlebars.registerHelper("math", function (lvalue, operator, rvalue) {
7868    lvalue = parseFloat(lvalue);
7869    rvalue = parseFloat(rvalue);
7870
7871    return {
7872        "+": lvalue + rvalue,
7873        "-": lvalue - rvalue,
7874        "*": lvalue * rvalue,
7875        "/": lvalue / rvalue,
7876        "%": lvalue % rvalue
7877    }[operator];
7878
7879});
7880
7881
7882
7883
7884Handlebars.registerHelper("moduloIf", function(index_count, mod, remainder, block) {
7885    if (parseInt(index_count) % mod === remainder) {
7886        return block.fn(this);
7887    }
7888    return block.inverse(this);
7889});
7890Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
7891    switch (operator) {
7892        case '==':
7893            return (v1 == v2) ? options.fn(this) : options.inverse(this);
7894        case '===':
7895            return (v1 === v2) ? options.fn(this) : options.inverse(this);
7896        case 'contains':
7897            return (v1.indexOf(v2) != -1) ? options.fn(this) : options.inverse(this);
7898        case '<':
7899            return (v1 < v2) ? options.fn(this) : options.inverse(this);
7900        case '<=':
7901            return (v1 <= v2) ? options.fn(this) : options.inverse(this);
7902        case '>':
7903            return (v1 > v2) ? options.fn(this) : options.inverse(this);
7904        case '>=':
7905            return (v1 >= v2) ? options.fn(this) : options.inverse(this);
7906        case '&&':
7907            return (v1 && v2) ? options.fn(this) : options.inverse(this);
7908        case '||':
7909            return (v1 || v2) ? options.fn(this) : options.inverse(this);
7910        case '!=':
7911            return (v1 != v2) ? options.fn(this) : options.inverse(this);
7912        case '!==':
7913            return (v1 !== v2) ? options.fn(this) : options.inverse(this);
7914        default:
7915            return options.inverse(this);
7916    }
7917});
7918
7919/*!
7920 * jQuery-ajaxTransport-XDomainRequest - v1.0.3 - 2014-06-06
7921 * https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest
7922 * Copyright (c) 2014 Jason Moon (@JSONMOON)
7923 * Licensed MIT (/blob/master/LICENSE.txt)
7924 */
7925(function(a){if(typeof define==='function'&&define.amd){define(['jquery'],a)}else if(typeof exports==='object'){module.exports=a(require('jquery'))}else{a(jQuery)}}(function($){if($.support.cors||!$.ajaxTransport||!window.XDomainRequest){return}var n=/^https?:\/\//i;var o=/^get|post$/i;var p=new RegExp('^'+location.protocol,'i');$.ajaxTransport('* text html xml json',function(j,k,l){if(!j.crossDomain||!j.async||!o.test(j.type)||!n.test(j.url)||!p.test(j.url)){return}var m=null;return{send:function(f,g){var h='';var i=(k.dataType||'').toLowerCase();m=new XDomainRequest();if(/^\d+$/.test(k.timeout)){m.timeout=k.timeout}m.ontimeout=function(){g(500,'timeout')};m.onload=function(){var a='Content-Length: '+m.responseText.length+'\r\nContent-Type: '+m.contentType;var b={code:200,message:'success'};var c={text:m.responseText};try{if(i==='html'||/text\/html/i.test(m.contentType)){c.html=m.responseText}else if(i==='json'||(i!=='text'&&/\/json/i.test(m.contentType))){try{c.json=$.parseJSON(m.responseText)}catch(e){b.code=500;b.message='parseerror'}}else if(i==='xml'||(i!=='text'&&/\/xml/i.test(m.contentType))){var d=new ActiveXObject('Microsoft.XMLDOM');d.async=false;try{d.loadXML(m.responseText)}catch(e){d=undefined}if(!d||!d.documentElement||d.getElementsByTagName('parsererror').length){b.code=500;b.message='parseerror';throw'Invalid XML: '+m.responseText;}c.xml=d}}catch(parseMessage){throw parseMessage;}finally{g(b.code,b.message,c,a)}};m.onprogress=function(){};m.onerror=function(){g(500,'error',{text:m.responseText})};if(k.data){h=($.type(k.data)==='string')?k.data:$.param(k.data)}m.open(j.type,j.url);m.send(h)},abort:function(){if(m){m.abort()}}}})}));
7926/*!
7927	Autosize 4.0.0
7928	license: MIT
7929	http://www.jacklmoore.com/autosize
7930*/
7931(function (global, factory) {
7932	if (typeof define === 'function' && define.amd) {
7933		define(['exports', 'module'], factory);
7934	} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
7935		factory(exports, module);
7936	} else {
7937		var mod = {
7938			exports: {}
7939		};
7940		factory(mod.exports, mod);
7941		global.autosize = mod.exports;
7942	}
7943})(this, function (exports, module) {
7944	'use strict';
7945
7946	var map = typeof Map === "function" ? new Map() : (function () {
7947		var keys = [];
7948		var values = [];
7949
7950		return {
7951			has: function has(key) {
7952				return keys.indexOf(key) > -1;
7953			},
7954			get: function get(key) {
7955				return values[keys.indexOf(key)];
7956			},
vendor: 4,416 bytes, lines 7957-8107
7957			set: function set(key, value) {
7958				if (keys.indexOf(key) === -1) {
7959					keys.push(key);
7960					values.push(value);
7961				}
7962			},
7963			'delete': function _delete(key) {
7964				var index = keys.indexOf(key);
7965				if (index > -1) {
7966					keys.splice(index, 1);
7967					values.splice(index, 1);
7968				}
7969			}
7970		};
7971	})();
7972
7973	var createEvent = function createEvent(name) {
7974		return new Event(name, { bubbles: true });
7975	};
7976	try {
7977		new Event('test');
7978	} catch (e) {
7979		// IE does not support `new Event()`
7980		createEvent = function (name) {
7981			var evt = document.createEvent('Event');
7982			evt.initEvent(name, true, false);
7983			return evt;
7984		};
7985	}
7986
7987	function assign(ta) {
7988		if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;
7989
7990		var heightOffset = null;
7991		var clientWidth = ta.clientWidth;
7992		var cachedHeight = null;
7993
7994		function init() {
7995			var style = window.getComputedStyle(ta, null);
7996
7997			if (style.resize === 'vertical') {
7998				ta.style.resize = 'none';
7999			} else if (style.resize === 'both') {
8000				ta.style.resize = 'horizontal';
8001			}
8002
8003			if (style.boxSizing === 'content-box') {
8004				heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
8005			} else {
8006				heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
8007			}
8008			// Fix when a textarea is not on document body and heightOffset is Not a Number
8009			if (isNaN(heightOffset)) {
8010				heightOffset = 0;
8011			}
8012
8013			update();
8014		}
8015
8016		function changeOverflow(value) {
8017			{
8018				// Chrome/Safari-specific fix:
8019				// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
8020				// made available by removing the scrollbar. The following forces the necessary text reflow.
8021				var width = ta.style.width;
8022				ta.style.width = '0px';
8023				// Force reflow:
8024				/* jshint ignore:start */
8025				ta.offsetWidth;
8026				/* jshint ignore:end */
8027				ta.style.width = width;
8028			}
8029
8030			ta.style.overflowY = value;
8031		}
8032
8033		function getParentOverflows(el) {
8034			var arr = [];
8035
8036			while (el && el.parentNode && el.parentNode instanceof Element) {
8037				if (el.parentNode.scrollTop) {
8038					arr.push({
8039						node: el.parentNode,
8040						scrollTop: el.parentNode.scrollTop
8041					});
8042				}
8043				el = el.parentNode;
8044			}
8045
8046			return arr;
8047		}
8048
8049		function resize() {
8050			var originalHeight = ta.style.height;
8051			var overflows = getParentOverflows(ta);
8052			var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)
8053
8054			ta.style.height = '';
8055
8056			var endHeight = ta.scrollHeight + heightOffset;
8057
8058			if (ta.scrollHeight === 0) {
8059				// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
8060				ta.style.height = originalHeight;
8061				return;
8062			}
8063
8064			ta.style.height = endHeight + 'px';
8065
8066			// used to check if an update is actually necessary on window.resize
8067			clientWidth = ta.clientWidth;
8068
8069			// prevents scroll-position jumping
8070			overflows.forEach(function (el) {
8071				el.node.scrollTop = el.scrollTop;
8072			});
8073
8074			if (docTop) {
8075				document.documentElement.scrollTop = docTop;
8076			}
8077		}
8078
8079		function update() {
8080			resize();
8081
8082			var styleHeight = Math.round(parseFloat(ta.style.height));
8083			var computed = window.getComputedStyle(ta, null);
8084
8085			// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box
8086			var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;
8087
8088			// The actual height not matching the style height (set via the resize method) indicates that
8089			// the max-height has been exceeded, in which case the overflow should be allowed.
8090			if (actualHeight !== styleHeight) {
8091				if (computed.overflowY === 'hidden') {
8092					changeOverflow('scroll');
8093					resize();
8094					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
8095				}
8096			} else {
8097				// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
8098				if (computed.overflowY !== 'hidden') {
8099					changeOverflow('hidden');
8100					resize();
8101					actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;
8102				}
8103			}
8104
8105			if (cachedHeight !== actualHeight) {
8106				cachedHeight = actualHeight;
8107				var evt = createEvent('autosize:resized');
8108				try {
8109					ta.dispatchEvent(evt);
8110				} catch (err) {
8111					// Firefox will throw an error on dispatchEvent for a detached element
8112					// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
8113				}
8114			}
8115		}
8116
8117		var pageResize = function pageResize() {
8118			if (ta.clientWidth !== clientWidth) {
8119				update();
8120			}
8121		};
8122
8123		var destroy = (function (style) {
8124			window.removeEventListener('resize', pageResize, false);
8125			ta.removeEventListener('input', update, false);
8126			ta.removeEventListener('keyup', update, false);
8127			ta.removeEventListener('autosize:destroy', destroy, false);
8128			ta.removeEventListener('autosize:update', update, false);
8129
8130			Object.keys(style).forEach(function (key) {
8131				ta.style[key] = style[key];
8132			});
8133
8134			map['delete'](ta);
8135		}).bind(ta, {
8136			height: ta.style.height,
8137			resize: ta.style.resize,
8138			overflowY: ta.style.overflowY,
8139			overflowX: ta.style.overflowX,
8140			wordWrap: ta.style.wordWrap
8141		});
8142
8143		ta.addEventListener('autosize:destroy', destroy, false);
8144
8145		// IE9 does not fire onpropertychange or oninput for deletions,
8146		// so binding to onkeyup to catch most of those events.
8147		// There is no way that I know of to detect something like 'cut' in IE9.
8148		if ('onpropertychange' in ta && 'oninput' in ta) {
8149			ta.addEventListener('keyup', update, false);
8150		}
8151
8152		window.addEventListener('resize', pageResize, false);
8153		ta.addEventListener('input', update, false);
8154		ta.addEventListener('autosize:update', update, false);
8155		ta.style.overflowX = 'hidden';
8156		ta.style.wordWrap = 'break-word';
8157
8158		map.set(ta, {
8159			destroy: destroy,
8160			update: update
8161		});
8162
8163		init();
8164	}
8165
8166	function destroy(ta) {
8167		var methods = map.get(ta);
8168		if (methods) {
8169			methods.destroy();
8170		}
8171	}
8172
8173	function update(ta) {
8174		var methods = map.get(ta);
8175		if (methods) {
8176			methods.update();
8177		}
8178	}
8179
8180	var autosize = null;
8181
8182	// Do nothing in Node.js environment and IE8 (or lower)
8183	if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {
8184		autosize = function (el) {
8185			return el;
8186		};
8187		autosize.destroy = function (el) {
8188			return el;
8189		};
8190		autosize.update = function (el) {
8191			return el;
8192		};
8193	} else {
8194		autosize = function (el, options) {
8195			if (el) {
8196				Array.prototype.forEach.call(el.length ? el : [el], function (x) {
8197					return assign(x, options);
8198				});
8199			}
8200			return el;
8201		};
8202		autosize.destroy = function (el) {
8203			if (el) {
8204				Array.prototype.forEach.call(el.length ? el : [el], destroy);
8205			}
8206			return el;
8207		};
8208		autosize.update = function (el) {
8209			if (el) {
8210				Array.prototype.forEach.call(el.length ? el : [el], update);
8211			}
8212			return el;
8213		};
8214	}
8215
8216	module.exports = autosize;
8217});
8218/*!
8219 * jQuery Validation Plugin 1.12.0pre
8220 *
8221 * http://jqueryvalidation.org//
8222 *
8223 * Copyright 2013 Jörn Zaefferer
8224 * Released under the MIT license:
8225 *   http://www.opensource.org/licenses/mit-license.php
8226 */
8227
8228(function($) {
8229
8230$.extend($.fn, {
8231	// http://jqueryvalidation.org/validate/
8232	validate: function( options ) {
8233
8234		// if nothing is selected, return nothing; can't chain anyway
8235		if ( !this.length ) {
8236			if ( options && options.debug && window.console ) {
8237				console.warn( "Nothing selected, can't validate, returning nothing." );
8238			}
8239			return;
8240		}
8241
8242		// check if a validator for this form was already created
8243		var validator = $.data( this[0], "validator" );
8244		if ( validator ) {
8245			return validator;
8246		}
8247
8248		// Add novalidate tag if HTML5.
8249		this.attr( "novalidate", "novalidate" );
8250
8251		validator = new $.validator( options, this[0] );
8252		$.data( this[0], "validator", validator );
8253
8254		if ( validator.settings.onsubmit ) {
8255
8256			this.validateDelegate( ":submit", "click", function( event ) {
8257				if ( validator.settings.submitHandler ) {
8258					validator.submitButton = event.target;
8259				}
8260				// allow suppressing validation by adding a cancel class to the submit button
8261				if ( $(event.target).hasClass("cancel") ) {
8262					validator.cancelSubmit = true;
8263				}
8264
8265				// allow suppressing validation by adding the html5 formnovalidate attribute to the submit button
8266				if ( $(event.target).attr("formnovalidate") !== undefined ) {
8267					validator.cancelSubmit = true;
8268				}
8269			});
8270
8271			// validate the form on submit
8272			this.submit( function( event ) {
8273				if ( validator.settings.debug ) {
8274					// prevent form submit to be able to see console output
8275					event.preventDefault();
8276				}
8277				function handle() {
8278					var hidden;
8279					if ( validator.settings.submitHandler ) {
8280						if ( validator.submitButton ) {
8281							// insert a hidden input as a replacement for the missing submit button
8282							hidden = $("<input type='hidden'/>").attr("name", validator.submitButton.name).val( $(validator.submitButton).val() ).appendTo(validator.currentForm);
8283						}
8284						validator.settings.submitHandler.call( validator, validator.currentForm, event );
8285						if ( validator.submitButton ) {
8286							// and clean up afterwards; thanks to no-block-scope, hidden can be referenced
8287							hidden.remove();
8288						}
8289						return false;
8290					}
8291					return true;
8292				}
8293
8294				// prevent submit for invalid forms or custom submit handlers
8295				if ( validator.cancelSubmit ) {
8296					validator.cancelSubmit = false;
8297					return handle();
8298				}
8299				if ( validator.form() ) {
8300					if ( validator.pendingRequest ) {
8301						validator.formSubmitted = true;
8302						return false;
8303					}
8304					return handle();
8305				} else {
8306					validator.focusInvalid();
8307					return false;
8308				}
8309			});
8310		}
8311
8312		return validator;
8313	},
8314	// http://jqueryvalidation.org/valid/
8315	valid: function() {
8316		if ( $(this[0]).is("form")) {
8317			return this.validate().form();
8318		} else {
8319			var valid = true;
8320			var validator = $(this[0].form).validate();
8321			this.each(function() {
8322				valid = valid && validator.element(this);
8323			});
8324			return valid;
8325		}
8326	},
8327	// attributes: space separated list of attributes to retrieve and remove
8328	removeAttrs: function( attributes ) {
8329		var result = {},
8330			$element = this;
8331		$.each(attributes.split(/\s/), function( index, value ) {
8332			result[value] = $element.attr(value);
8333			$element.removeAttr(value);
8334		});
8335		return result;
8336	},
8337	// http://jqueryvalidation.org/rules/
8338	rules: function( command, argument ) {
8339		var element = this[0];
8340
8341		if ( command ) {
8342			var settings = $.data(element.form, "validator").settings;
8343			var staticRules = settings.rules;
8344			var existingRules = $.validator.staticRules(element);
8345			switch(command) {
8346			case "add":
8347				$.extend(existingRules, $.validator.normalizeRule(argument));
8348				// remove messages from rules, but allow them to be set separetely
8349				delete existingRules.messages;
8350				staticRules[element.name] = existingRules;
8351				if ( argument.messages ) {
8352					settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
8353				}
8354				break;
8355			case "remove":
8356				if ( !argument ) {
8357					delete staticRules[element.name];
8358					return existingRules;
8359				}
8360				var filtered = {};
8361				$.each(argument.split(/\s/), function( index, method ) {
8362					filtered[method] = existingRules[method];
8363					delete existingRules[method];
8364				});
8365				return filtered;
8366			}
8367		}
8368
8369		var data = $.validator.normalizeRules(
8370		$.extend(
8371			{},
8372			$.validator.classRules(element),
8373			$.validator.attributeRules(element),
8374			$.validator.dataRules(element),
8375			$.validator.staticRules(element)
8376		), element);
8377
8378		// make sure required is at front
8379		if ( data.required ) {
8380			var param = data.required;
8381			delete data.required;
8382			data = $.extend({required: param}, data);
8383		}
8384
8385		return data;
8386	}
8387});
8388
8389// Custom selectors
8390$.extend($.expr[":"], {
8391	// http://jqueryvalidation.org/blank-selector/
8392	blank: function( a ) { return !$.trim("" + $(a).val()); },
8393	// http://jqueryvalidation.org/filled-selector/
8394	filled: function( a ) { return !!$.trim("" + $(a).val()); },
8395	// http://jqueryvalidation.org/unchecked-selector/
8396	unchecked: function( a ) { return !$(a).prop("checked"); }
8397});
8398
8399// constructor for validator
8400$.validator = function( options, form ) {
8401	this.settings = $.extend( true, {}, $.validator.defaults, options );
8402	this.currentForm = form;
8403	this.init();
8404};
8405
8406// http://jqueryvalidation.org/jQuery.validator.format/
8407$.validator.format = function( source, params ) {
8408	if ( arguments.length === 1 ) {
8409		return function() {
8410			var args = $.makeArray(arguments);
8411			args.unshift(source);
8412			return $.validator.format.apply( this, args );
8413		};
8414	}
8415	if ( arguments.length > 2 && params.constructor !== Array  ) {
8416		params = $.makeArray(arguments).slice(1);
8417	}
8418	if ( params.constructor !== Array ) {
8419		params = [ params ];
8420	}
8421	$.each(params, function( i, n ) {
8422		source = source.replace( new RegExp("\\{" + i + "\\}", "g"), function() {
8423			return n;
8424		});
8425	});
8426	return source;
8427};
8428
8429$.extend($.validator, {
8430
8431	defaults: {
8432		messages: {},
8433		groups: {},
8434		rules: {},
8435		errorClass: "error",
8436		validClass: "valid",
8437		errorElement: "label",
8438		focusInvalid: true,
8439		errorContainer: $([]),
8440		errorLabelContainer: $([]),
8441		onsubmit: true,
8442		ignore: ":hidden",
8443		ignoreTitle: false,
8444		onfocusin: function( element, event ) {
8445			this.lastActive = element;
8446
8447			// hide error label and remove error class on focus if enabled
8448			if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
8449				if ( this.settings.unhighlight ) {
8450					this.settings.unhighlight.call( this, element, this.settings.errorClass, this.settings.val
8450idClass );
8451				}
8452				this.addWrapper(this.errorsFor(element)).hide();
8453			}
8454		},
8455		onfocusout: function( element, event ) {
8456			if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
8457				this.element(element);
8458			}
8459		},
8460		onkeyup: function( element, event ) {
8461			if ( event.which === 9 && this.elementValue(element) === "" ) {
8462				return;
8463			} else if ( element.name in this.submitted || element === this.lastElement ) {
8464				this.element(element);
8465			}
8466		},
8467		onclick: function( element, event ) {
8468			// click on selects, radiobuttons and checkboxes
8469			if ( element.name in this.submitted ) {
8470				this.element(element);
8471			}
8472			// or option elements, check parent select in that case
8473			else if ( element.parentNode.name in this.submitted ) {
8474				this.element(element.parentNode);
8475			}
8476		},
8477		highlight: function( element, errorClass, validClass ) {
8478			if ( element.type === "radio" ) {
8479				this.findByName(element.name).addClass(errorClass).removeClass(validClass);
8480			} else {
8481				$(element).addClass(errorClass).removeClass(validClass);
8482			}
8483		},
8484		unhighlight: function( element, errorClass, validClass ) {
8485			if ( element.type === "radio" ) {
8486				this.findByName(element.name).removeClass(errorClass).addClass(validClass);
8487			} else {
8488				$(element).removeClass(errorClass).addClass(validClass);
8489			}
8490		}
8491	},
8492
8493	// http://jqueryvalidation.org/jQuery.validator.setDefaults/
8494	setDefaults: function( settings ) {
8495		$.extend( $.validator.defaults, settings );
8496	},
8497
8498	messages: {
8499		required: "This field is required.",
8500		remote: "Please fix this field.",
8501		email: "Please enter a valid email address.",
8502		url: "Please enter a valid URL.",
8503		date: "Please enter a valid date.",
8504		dateISO: "Please enter a valid date (ISO).",
8505		number: "Please enter a valid number.",
8506		digits: "Please enter only digits.",
8507		creditcard: "Please enter a valid credit card number.",
8508		equalTo: "Please enter the same value again.",
8509		maxlength: $.validator.format("Please enter no more than {0} characters."),
8510		minlength: $.validator.format("Please enter at least {0} characters."),
8511		rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
8512		range: $.validator.format("Please enter a value between {0} and {1}."),
8513		max: $.validator.format("Please enter a value less than or equal to {0}."),
8514		min: $.validator.format("Please enter a value greater than or equal to {0}.")
8515	},
8516
8517	autoCreateRanges: false,
8518
8519	prototype: {
8520
8521		init: function() {
8522			this.labelContainer = $(this.settings.errorLabelContainer);
8523			this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
8524			this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
8525			this.submitted = {};
8526			this.valueCache = {};
8527			this.pendingRequest = 0;
8528			this.pending = {};
8529			this.invalid = {};
8530			this.reset();
8531
8532			var groups = (this.groups = {});
8533			$.each(this.settings.groups, function( key, value ) {
8534				if ( typeof value === "string" ) {
8535					value = value.split(/\s/);
8536				}
8537				$.each(value, function( index, name ) {
8538					groups[name] = key;
8539				});
8540			});
8541			var rules = this.settings.rules;
8542			$.each(rules, function( key, value ) {
8543				rules[key] = $.validator.normalizeRule(value);
8544			});
8545
8546			function delegate(event) {
8547				var validator = $.data(this[0].form, "validator"),
8548					eventType = "on" + event.type.replace(/^validate/, "");
8549				if ( validator.settings[eventType] ) {
8550					validator.settings[eventType].call(validator, this[0], event);
8551				}
8552			}
8553			$(this.currentForm)
8554				.validateDelegate(":text, [type='password'], [type='file'], select, textarea, " +
8555					"[type='number'], [type='search'] ,[type='tel'], [type='url'], " +
8556					"[type='email'], [type='datetime'], [type='date'], [type='month'], " +
8557					"[type='week'], [type='time'], [type='datetime-local'], " +
8558					"[type='range'], [type='color'] ",
8559					"focusin focusout keyup", delegate)
8560				.validateDelegate("[type='radio'], [type='checkbox'], select, option", "click", delegate);
8561
8562			if ( this.settings.invalidHandler ) {
8563				$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
8564			}
8565		},
8566
8567		// http://jqueryvalidation.org/Validator.form/
8568		form: function() {
8569			this.checkForm();
8570			$.extend(this.submitted, this.errorMap);
8571			this.invalid = $.extend({}, this.errorMap);
8572			if ( !this.valid() ) {
8573				$(this.currentForm).triggerHandler("invalid-form", [this]);
8574			}
8575			this.showErrors();
8576			return this.valid();
8577		},
8578
8579		checkForm: function() {
8580			this.prepareForm();
8581			for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
8582				this.check( elements[i] );
8583			}
8584			return this.valid();
8585		},
8586
8587		// http://jqueryvalidation.org/Validator.element/
8588		element: function( element ) {
8589			element = this.validationTargetFor( this.clean( element ) );
8590			this.lastElement = element;
8591			this.prepareElement( element );
8592			this.currentElements = $(element);
8593			var result = this.check( element ) !== false;
8594			if ( result ) {
8595				delete this.invalid[element.name];
8596			} else {
8597				this.invalid[element.name] = true;
8598			}
8599			if ( !this.numberOfInvalids() ) {
8600				// Hide error containers on last error
8601				this.toHide = this.toHide.add( this.containers );
8602			}
8603			this.showErrors();
8604			return result;
8605		},
8606
8607		// http://jqueryvalidation.org/Validator.showErrors/
8608		showErrors: function( errors ) {
8609			if ( errors ) {
8610				// add items to error list and map
8611				$.extend( this.errorMap, errors );
8612				this.errorList = [];
8613				for ( var name in errors ) {
8614					this.errorList.push({
8615						message: errors[name],
8616						element: this.findByName(name)[0]
8617					});
8618				}
8619				// remove items from success list
8620				this.successList = $.grep( this.successList, function( element ) {
8621					return !(element.name in errors);
8622				});
8623			}
8624			if ( this.settings.showErrors ) {
8625				this.settings.showErrors.call( this, this.errorMap, this.errorList );
8626			} else {
8627				this.defaultShowErrors();
8628			}
8629		},
8630
8631		// http://jqueryvalidation.org/Validator.resetForm/
8632		resetForm: function() {
8633			if ( $.fn.resetForm ) {
8634				$(this.currentForm).resetForm();
8635			}
8636			this.submitted = {};
8637			this.lastElement = null;
8638			this.prepareForm();
8639			this.hideErrors();
8640			this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );
8641		},
8642
8643		numberOfInvalids: function() {
8644			return this.objectLength(this.invalid);
8645		},
8646
8647		objectLength: function( obj ) {
8648			var count = 0;
8649			for ( var i in obj ) {
8650				count++;
8651			}
8652			return count;
8653		},
8654
8655		hideErrors: function() {
8656			this.addWrapper( this.toHide ).hide();
8657		},
8658
8659		valid: function() {
8660			return this.size() === 0;
8661		},
8662
8663		size: function() {
8664			return this.errorList.length;
8665		},
8666
8667		focusInvalid: function() {
8668			if ( this.settings.focusInvalid ) {
8669				try {
8670					$(this.findLastActive() || this.errorList.length && this.errorList[0].element || [])
8671					.filter(":visible")
8672					.focus()
8673					// manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
8674					.trigger("focusin");
8675				} catch(e) {
8676					// ignore IE throwing errors when focusing hidden elements
8677				}
8678			}
8679		},
8680
8681		findLastActive: function() {
8682			var lastActive = this.lastActive;
8683			return lastActive && $.grep(this.errorList, function( n ) {
8684				return n.element.name === lastActive.name;
8685			}).length === 1 && lastActive;
8686		},
8687
8688		elements: function() {
8689			var validator = this,
8690				rulesCache = {};
8691
8692			// select all valid inputs inside the form (no submit or reset buttons)
8693			return $(this.currentForm)
8694			.find("input, select, textarea")
8695			.not(":submit, :reset, :image, [disabled]")
8696			.not( this.settings.ignore )
8697			.filter(function() {
8698				if ( !this.name && validator.settings.debug && window.console ) {
8699					console.error( "%o has no name assigned", this);
8700				}
8701
8702				// select only the first element for each name, and only those with rules specified
8703				if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) {
8704					return false;
8705				}
8706
8707				rulesCache[this.name] = true;
8708				return true;
8709			});
8710		},
8711
8712		clean: function( selector ) {
8713			return $(selector)[0];
8714		},
8715
8716		errors: function() {
8717			var errorClass = this.settings.errorClass.replace(" ", ".");
8718			return $(this.settings.errorElement + "." + errorClass, this.errorContext);
8719		},
8720
8721		reset: function() {
8722			this.successList = [];
8723			this.errorList = [];
8724			this.errorMap = {};
8725			this.toShow = $([]);
8726			this.toHide = $([]);
8727			this.currentElements = $([]);
8728		},
8729
8730		prepareForm: function() {
8731			this.reset();
8732			this.toHide = this.errors().add( this.containers );
8733		},
8734
8735		prepareElement: function( element ) {
8736			this.reset();
8737			this.toHide = this.errorsFor(element);
8738		},
8739
8740		elementValue: function( element ) {
8741			var type = $(element).attr("type"),
8742				val = $(element).val();
8743
8744			if ( type === "radio" || type === "checkbox" ) {
8745				return $("input[name='" + $(element).attr("name") + "']:checked").val();
8746			}
8747
8748			if ( typeof val === "string" ) {
8749				return val.replace(/\r/g, "");
8750			}
8751			return val;
8752		},
8753
8754		check: function( element ) {
8755			element = this.validationTargetFor( this.clean( element ) );
8756
8757			var rules = $(element).rules();
8758			var dependencyMismatch = false;
8759			var val = this.elementValue(element);
8760			var result;
8761
8762			for (var method in rules ) {
8763				var rule = { method: method, parameters: rules[method] };
8764				try {
8765
8766					result = $.validator.methods[method].call( this, val, element, rule.parameters );
8767
8768					// if a method indicates that the field is optional and therefore valid,
8769					// don't mark it as valid when there are no other rules
8770					if ( result === "dependency-mismatch" ) {
8771						dependencyMismatch = true;
8772						continue;
8773					}
8774					dependencyMismatch = false;
8775
8776					if ( result === "pending" ) {
8777						this.toHide = this.toHide.not( this.errorsFor(element) );
8778						return;
8779					}
8780
8781					if ( !result ) {
8782						this.formatAndAdd( element, rule );
8783						return false;
8784					}
8785				} catch(e) {
8786					if ( this.settings.debug && window.console ) {
8787						console.log( "Exception occurred when checking element " + element.id + ", check the '" + rule.method + "' method.", e );
8788					}
8789					throw e;
8790				}
8791			}
8792			if ( dependencyMismatch ) {
8793				return;
8794			}
8795			if ( this.objectLength(rules) ) {
8796				this.successList.push(element);
8797			}
8798			return true;
8799		},
8800
8801		// return the custom message for the given element and validation method
8802		// specified in the element's HTML5 data attribute
8803		customDataMessage: function( element, method ) {
8804			return $(element).data("msg-" + method.toLowerCase()) || (element.attributes && $(element).attr("data-msg-" + method.toLowerCase()));
8805		},
8806
8807		// return the custom message for the given element name and validation method
8808		customMessage: function( name, method ) {
8809			var m = this.settings.messages[name];
8810			return m && (m.constructor === String ? m : m[method]);
8811		},
8812
8813		// return the first defined argument, allowing empty strings
8814		findDefined: function() {
8815			for(var i = 0; i < arguments.length; i++) {
8816				if ( arguments[i] !== undefined ) {
8817					return arguments[i];
8818				}
8819			}
8820			return undefined;
8821		},
8822
8823		defaultMessage: function( element, method ) {
8824			return this.findDefined(
8825				this.customMessage( element.name, method ),
8826				this.customDataMessage( element, method ),
8827				// title is never undefined, so handle empty string as undefined
8828				!this.settings.ignoreTitle && element.title || undefined,
8829				$.validator.messages[method],
8830				"<strong>Warning: No message defined for " + element.name + "</strong>"
8831			);
8832		},
8833
8834		formatAndAdd: function( element, rule ) {
8835			var message = this.defaultMessage( element, rule.method ),
8836				theregex = /\$?\{(\d+)\}/g;
8837			if ( typeof message === "function" ) {
8838				message = message.call(this, rule.parameters, element);
8839			} else if (theregex.test(message)) {
8840				message = $.validator.format(message.replace(theregex, "{$1}"), rule.parameters);
8841			}
8842			this.errorList.push({
8843				message: message,
8844				element: element
8845			});
8846
8847			this.errorMap[element.name] = message;
8848			this.submitted[element.name] = message;
8849		},
8850
8851		addWrapper: function( toToggle ) {
8852			if ( this.settings.wrapper ) {
8853				toToggle = toToggle.add( toToggle.parent( this.settings.wrapper ) );
8854			}
8855			return toToggle;
8856		},
8857
8858		defaultShowErrors: function() {
8859			var i, elements;
8860			for ( i = 0; this.errorList[i]; i++ ) {
8861				var error = this.errorList[i];
8862				if ( this.settings.highlight ) {
8863					this.settings.highlight.call( this, error.element, this.settings.errorClass, this.settings.val
8863idClass );
8864				}
8865				this.showLabel( error.element, error.message );
8866			}
8867			if ( this.errorList.length ) {
8868				this.toShow = this.toShow.add( this.containers );
8869			}
8870			if ( this.settings.success ) {
8871				for ( i = 0; this.successList[i]; i++ ) {
8872					this.showLabel( this.successList[i] );
8873				}
8874			}
8875			if ( this.settings.unhighlight ) {
8876				for ( i = 0, elements = this.validElements(); elements[i]; i++ ) {
8877					this.settings.unhighlight.call( this, elements[i], this.settings.errorClass, this.settings.validClass );
8878				}
8879			}
8880			this.toHide = this.toHide.not( this.toShow );
8881			this.hideErrors();
8882			this.addWrapper( this.toShow ).show();
8883		},
8884
8885		validElements: function() {
8886			return this.currentElements.not(this.invalidElements());
8887		},
8888
8889		invalidElements: function() {
8890			return $(this.errorList).map(function() {
8891				return this.element;
8892			});
8893		},
8894
8895		showLabel: function( element, message ) {
8896			var label = this.errorsFor( element );
8897			if ( label.length ) {
8898				// refresh error/success class
8899				label.removeClass( this.settings.validClass ).addClass( this.settings.errorClass );
8900				// replace message on existing label
8901				label.html(message);
8902			} else {
8903				// create label
8904				label = $("<" + this.settings.errorElement + ">")
8905					.attr("for", this.idOrName(element))
8906					.addClass(this.settings.errorClass)
8907					.html(message || "");
8908				if ( this.settings.wrapper ) {
8909					// make sure the element is visible, even in IE
8910					// actually showing the wrapped element is handled elsewhere
8911					label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
8912				}
8913				if ( !this.labelContainer.append(label).length ) {
8914					if ( this.settings.errorPlacement ) {
8915						this.settings.errorPlacement(label, $(element) );
8916					} else {
8917						label.insertAfter(element);
8918					}
8919				}
8920			}
8921			if ( !message && this.settings.success ) {
8922				label.text("");
8923				if ( typeof this.settings.success === "string" ) {
8924					label.addClass( this.settings.success );
8925				} else {
8926					this.settings.success( label, element );
8927				}
8928			}
8929			this.toShow = this.toShow.add(label);
8930		},
8931
8932		errorsFor: function( element ) {
8933			var name = this.idOrName(element);
8934			return this.errors().filter(function() {
8935				return $(this).attr("for") === name;
8936			});
8937		},
8938
8939		idOrName: function( element ) {
8940			return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
8941		},
8942
8943		validationTargetFor: function( element ) {
8944			// if radio/checkbox, validate first element in group instead
8945			if ( this.checkable(element) ) {
8946				element = this.findByName( element.name ).not(this.settings.ignore)[0];
8947			}
8948			return element;
8949		},
8950
8951		checkable: function( element ) {
8952			return (/radio|checkbox/i).test(element.type);
8953		},
8954
8955		findByName: function( name ) {
8956			return $(this.currentForm).find("[name='" + name + "']");
8957		},
8958
8959		getLength: function( value, element ) {
8960			switch( element.nodeName.toLowerCase() ) {
8961			case "select":
8962				return $("option:selected", element).length;
8963			case "input":
8964				if ( this.checkable( element) ) {
8965					return this.findByName(element.name).filter(":checked").length;
8966				}
8967			}
8968			return value.length;
8969		},
8970
8971		depend: function( param, element ) {
8972			return this.dependTypes[typeof param] ? this.dependTypes[typeof param](param, element) : true;
8973		},
8974
8975		dependTypes: {
8976			"boolean": function( param, element ) {
8977				return param;
8978			},
8979			"string": function( param, element ) {
8980				return !!$(param, element.form).length;
8981			},
8982			"function": function( param, element ) {
8983				return param(element);
8984			}
8985		},
8986
8987		optional: function( element ) {
8988			var val = this.elementValue(element);
8989			return !$.validator.methods.required.call(this, val, element) && "dependency-mismatch";
8990		},
8991
8992		startRequest: function( element ) {
8993			if ( !this.pending[element.name] ) {
8994				this.pendingRequest++;
8995				this.pending[element.name] = true;
8996			}
8997		},
8998
8999		stopRequest: function( element, valid ) {
9000			this.pendingRequest--;
9001			// sometimes synchronization fails, make sure pendingRequest is never < 0
9002			if ( this.pendingRequest < 0 ) {
9003				this.pendingRequest = 0;
9004			}
9005			delete this.pending[element.name];
9006			if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
9007				$(this.currentForm).submit();
9008				this.formSubmitted = false;
9009			} else if (!valid && this.pendingRequest === 0 && this.formSubmitted) {
9010				$(this.currentForm).triggerHandler("invalid-form", [this]);
9011				this.formSubmitted = false;
9012			}
9013		},
9014
9015		previousValue: function( element ) {
9016			return $.data(element, "previousValue") || $.data(element, "previousValue", {
9017				old: null,
9018				valid: true,
9019				message: this.defaultMessage( element, "remote" )
9020			});
9021		}
9022
9023	},
9024
9025	classRuleSettings: {
9026		required: {required: true},
9027		email: {email: true},
9028		url: {url: true},
9029		date: {date: true},
9030		dateISO: {dateISO: true},
9031		number: {number: true},
9032		digits: {digits: true},
9033		creditcard: {creditcard: true}
9034	},
9035
9036	addClassRules: function( className, rules ) {
9037		if ( className.constructor === String ) {
9038			this.classRuleSettings[className] = rules;
9039		} else {
9040			$.extend(this.classRuleSettings, className);
9041		}
9042	},
9043
9044	classRules: function( element ) {
9045		var rules = {};
9046		var classes = $(element).attr("class");
9047		if ( classes ) {
9048			$.each(classes.split(" "), function() {
9049				if ( this in $.validator.classRuleSettings ) {
9050					$.extend(rules, $.validator.classRuleSettings[this]);
9051				}
9052			});
9053		}
9054		return rules;
9055	},
9056
9057	attributeRules: function( element ) {
9058		var rules = {};
9059		var $element = $(element);
9060		var type = $element[0].getAttribute("type");
9061
9062		for (var method in $.validator.methods) {
9063			var value;
9064
9065			// support for <input required> in both html5 and older browsers
9066			if ( method === "required" ) {
9067				value = $element.get(0).getAttribute(method);
9068				// Some browsers return an empty string for the required attribute
9069				// and non-HTML5 browsers might have required="" markup
9070				if ( value === "" ) {
9071					value = true;
9072				}
9073				// force non-HTML5 browsers to return bool
9074				value = !!value;
9075			} else {
9076				value = $element.attr(method);
9077			}
9078
9079			// convert the value to a number for number inputs, and for text for backwards compability
9080			// allows type="date" and others to be compared as strings
9081			if ( /min|max/.test( method ) && ( type === null || /number|range|text/.test( type ) ) ) {
9082				value = Number(value);
9083			}
9084
9085			if ( value ) {
9086				rules[method] = value;
9087			} else if ( type === method && type !== 'range' ) {
9088				// exception: the jquery validate 'range' method
9089				// does not test for the html5 'range' type
9090				rules[method] = true;
9091			}
9092		}
9093
9094		// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
9095		if ( rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength) ) {
9096			delete rules.maxlength;
9097		}
9098
9099		return rules;
9100	},
9101
9102	dataRules: function( element ) {
9103		var method, value,
9104			rules = {}, $element = $(element);
9105		for (method in $.validator.methods) {
9106			value = $element.data("rule-" + method.toLowerCase());
9107			if ( value !== undefined ) {
9108				rules[method] = value;
9109			}
9110		}
9111		return rules;
9112	},
9113
9114	staticRules: function( element ) {
9115		var rules = {};
9116		var validator = $.data(element.form, "validator");
9117		if ( validator.settings.rules ) {
9118			rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
9119		}
9120		return rules;
9121	},
9122
9123	normalizeRules: function( rules, element ) {
9124		// handle dependency check
9125		$.each(rules, function( prop, val ) {
9126			// ignore rule when param is explicitly false, eg. required:false
9127			if ( val === false ) {
9128				delete rules[prop];
9129				return;
9130			}
9131			if ( val.param || val.depends ) {
9132				var keepRule = true;
9133				switch (typeof val.depends) {
9134				case "string":
9135					keepRule = !!$(val.depends, element.form).length;
9136					break;
9137				case "function":
9138					keepRule = val.depends.call(element, element);
9139					break;
9140				}
9141				if ( keepRule ) {
9142					rules[prop] = val.param !== undefined ? val.param : true;
9143				} else {
9144					delete rules[prop];
9145				}
9146			}
9147		});
9148
9149		// evaluate parameters
9150		$.each(rules, function( rule, parameter ) {
9151			rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
9152		});
9153
9154		// clean number parameters
9155		$.each(['minlength', 'maxlength'], function() {
9156			if ( rules[this] ) {
9157				rules[this] = Number(rules[this]);
9158			}
9159		});
9160		$.each(['rangelength', 'range'], function() {
9161			var parts;
9162			if ( rules[this] ) {
9163				if ( $.isArray(rules[this]) ) {
9164					rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
9165				} else if ( typeof rules[this] === "string" ) {
9166					parts = rules[this].split(/[\s,]+/);
9167					rules[this] = [Number(parts[0]), Number(parts[1])];
9168				}
9169			}
9170		});
9171
9172		if ( $.validator.autoCreateRanges ) {
9173			// auto-create ranges
9174			if ( rules.min && rules.max ) {
9175				rules.range = [rules.min, rules.max];
9176				delete rules.min;
9177				delete rules.max;
9178			}
9179			if ( rules.minlength && rules.maxlength ) {
9180				rules.rangelength = [rules.minlength, rules.maxlength];
9181				delete rules.minlength;
9182				delete rules.maxlength;
9183			}
9184		}
9185
9186		return rules;
9187	},
9188
vendor: 4,779 bytes, lines 9189-9269
9189	// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
9190	normalizeRule: function( data ) {
9191		if ( typeof data === "string" ) {
9192			var transformed = {};
9193			$.each(data.split(/\s/), function() {
9194				transformed[this] = true;
9195			});
9196			data = transformed;
9197		}
9198		return data;
9199	},
9200
9201	// http://jqueryvalidation.org/jQuery.validator.addMethod/
9202	addMethod: function( name, method, message ) {
9203		$.validator.methods[name] = method;
9204		$.validator.messages[name] = message !== undefined ? message : $.validator.messages[name];
9205		if ( method.length < 3 ) {
9206			$.validator.addClassRules(name, $.validator.normalizeRule(name));
9207		}
9208	},
9209
9210	methods: {
9211
9212		// http://jqueryvalidation.org/required-method/
9213		required: function( value, element, param ) {
9214			// check if dependency is met
9215			if ( !this.depend(param, element) ) {
9216				return "dependency-mismatch";
9217			}
9218			if ( element.nodeName.toLowerCase() === "select" ) {
9219				// could be an array for select-multiple or a string, both are fine this way
9220				var val = $(element).val();
9221				return val && val.length > 0;
9222			}
9223			if ( this.checkable(element) ) {
9224				return this.getLength(value, element) > 0;
9225			}
9226			return $.trim(value).length > 0;
9227		},
9228
9229		// http://jqueryvalidation.org/email-method/
9230		email: function( value, element ) {
9231			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
9232			return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value);
9233		},
9234
9235		// http://jqueryvalidation.org/url-method/
9236		url: function( value, element ) {
9237			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
9238			return this.optional(element) || /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
9239		},
9240
9241		// http://jqueryvalidation.org/date-method/
9242		date: function( value, element ) {
9243			return this.optional(element) || !/Invalid|NaN/.test(new Date(value).toString());
9244		},
9245
9246		// http://jqueryvalidation.org/dateISO-method/
9247		dateISO: function( value, element ) {
9248			return this.optional(element) || /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value);
9249		},
9250
9251		// http://jqueryvalidation.org/number-method/
9252		number: function( value, element ) {
9253			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
9254		},
9255
9256		// http://jqueryvalidation.org/digits-method/
9257		digits: function( value, element ) {
9258			return this.optional(element) || /^\d+$/.test(value);
9259		},
9260
9261		// http://jqueryvalidation.org/creditcard-method/
9262		// based on http://en.wikipedia.org/wiki/Luhn/
9263		creditcard: function( value, element ) {
9264			if ( this.optional(element) ) {
9265				return "dependency-mismatch";
9266			}
9267			// accept only spaces, digits and dashes
9268			if ( /[^0-9 \-]+/.test(value) ) {
9269				return false;
9270			}
9271			var nCheck = 0,
9272				nDigit = 0,
9273				bEven = false;
9274
9275			value = value.replace(/\D/g, "");
9276
9277			for (var n = value.length - 1; n >= 0; n--) {
9278				var cDigit = value.charAt(n);
9279				nDigit = parseInt(cDigit, 10);
9280				if ( bEven ) {
9281					if ( (nDigit *= 2) > 9 ) {
9282						nDigit -= 9;
9283					}
9284				}
9285				nCheck += nDigit;
9286				bEven = !bEven;
9287			}
9288
9289			return (nCheck % 10) === 0;
9290		},
9291
9292		// http://jqueryvalidation.org/minlength-method/
9293		minlength: function( value, element, param ) {
9294			var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
9295			return this.optional(element) || length >= param;
9296		},
9297
9298		// http://jqueryvalidation.org/maxlength-method/
9299		maxlength: function( value, element, param ) {
9300			var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
9301			return this.optional(element) || length <= param;
9302		},
9303
9304		// http://jqueryvalidation.org/rangelength-method/
9305		rangelength: function( value, element, param ) {
9306			var length = $.isArray( value ) ? value.length : this.getLength($.trim(value), element);
9307			return this.optional(element) || ( length >= param[0] && length <= param[1] );
9308		},
9309
9310		// http://jqueryvalidation.org/min-method/
9311		min: function( value, element, param ) {
9312			return this.optional(element) || value >= param;
9313		},
9314
9315		// http://jqueryvalidation.org/max-method/
9316		max: function( value, element, param ) {
9317			return this.optional(element) || value <= param;
9318		},
9319
9320		// http://jqueryvalidation.org/range-method/
9321		range: function( value, element, param ) {
9322			return this.optional(element) || ( value >= param[0] && value <= param[1] );
9323		},
9324
9325		// http://jqueryvalidation.org/equalTo-method/
9326		equalTo: function( value, element, param ) {
9327			// bind to the blur event of the target in order to revalidate whenever the target field is updated
9328			// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
9329			var target = $(param);
9330			if ( this.settings.onfocusout ) {
9331				target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
9332					$(element).valid();
9333				});
9334			}
9335			return value === target.val();
9336		},
9337
9338		// http://jqueryvalidation.org/remote-method/
9339		remote: function( value, element, param ) {
9340			if ( this.optional(element) ) {
9341				return "dependency-mismatch";
9342			}
9343
9344			var previous = this.previousValue(element);
9345			if (!this.settings.messages[element.name] ) {
9346				this.settings.messages[element.name] = {};
9347			}
9348			previous.originalMessage = this.settings.messages[element.name].remote;
9349			this.settings.messages[element.name].remote = previous.message;
9350
9351			param = typeof param === "string" && {url:param} || param;
9352
9353			if ( previous.old === value ) {
9354				return previous.valid;
9355			}
9356
9357			previous.old = value;
9358			var validator = this;
9359			this.startRequest(element);
9360			var data = {};
9361			data[element.name] = value;
9362			$.ajax($.extend(true, {
9363				url: param,
9364				mode: "abort",
9365				port: "validate" + element.name,
9366				dataType: "json",
9367				data: data,
9368				success: function( response ) {
9369					validator.settings.messages[element.name].remote = previous.originalMessage;
9370					var valid = response === true || response === "true";
9371					if ( valid ) {
9372						var submitted = validator.formSubmitted;
9373						validator.prepareElement(element);
9374						validator.formSubmitted = submitted;
9375						validator.successList.push(element);
9376						delete validator.invalid[element.name];
9377						validator.showErrors();
9378					} else {
9379						var errors = {};
9380						var message = response || validator.defaultMessage( element, "remote" );
9381						errors[element.name] = previous.message = $.isFunction(message) ? message(value) : message;
9382						validator.invalid[element.name] = true;
9383						validator.showErrors(errors);
9384					}
9385					previous.valid = valid;
9386					validator.stopRequest(element, valid);
9387				}
9388			}, param));
9389			return "pending";
9390		}
9391
9392	}
9393
9394});
9395
9396// deprecated, use $.validator.format instead
9397$.format = $.validator.format;
9398
9399}(jQuery));
9400
9401// ajax mode: abort
9402// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
9403// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
9404(function($) {
9405	var pendingRequests = {};
9406	// Use a prefilter if available (1.5+)
9407	if ( $.ajaxPrefilter ) {
9408		$.ajaxPrefilter(function( settings, _, xhr ) {
9409			var port = settings.port;
9410			if ( settings.mode === "abort" ) {
9411				if ( pendingRequests[port] ) {
9412					pendingRequests[port].abort();
9413				}
9414				pendingRequests[port] = xhr;
9415			}
9416		});
9417	} else {
9418		// Proxy ajax
9419		var ajax = $.ajax;
9420		$.ajax = function( settings ) {
9421			var mode = ( "mode" in settings ? settings : $.ajaxSettings ).mode,
9422				port = ( "port" in settings ? settings : $.ajaxSettings ).port;
9423			if ( mode === "abort" ) {
9424				if ( pendingRequests[port] ) {
9425					pendingRequests[port].abort();
9426				}
9427				pendingRequests[port] = ajax.apply(this, arguments);
9428				return pendingRequests[port];
9429			}
9430			return ajax.apply(this, arguments);
9431		};
9432	}
9433}(jQuery));
9434
9435// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
9436// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
9437(function($) {
9438	$.extend($.fn, {
9439		validateDelegate: function( delegate, type, handler ) {
9440			return this.bind(type, function( event ) {
9441				var target = $(event.target);
9442				if ( target.is(delegate) ) {
9443					return handler.apply(target, arguments);
9444				}
9445			});
9446		}
9447	});
9448}(jQuery));
9449
9450/*
9451 * header.js
9452 * [ This javascript code is used to show and hide the search fields on the home page main navigation. ]
9453 *
9454 * @project:    SN-RO
9455 * @date:       2015-04-17
9456 * @author:     Shubham
9457 * @licensor:   SAPIENNITRO
9458 * @namespaces: snro
9459 */
9460
9461//this will cause the browser to check for errors more aggressively
9462'use strict';
9463
9464/**
9465 * @namespace headerNavigationComp
9466 * @memberof roche
9467 * @property {null} property - description of property
9468 */
9469
9470var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
9471
9472(function (window, $, snro) {
9473  snro = window.snro = snro || {};
9474
9475  var _cache = {};
9476
9477  snro.headerNavigationComp = {
9478    moduleName: 'navigationCmp',
9479    userName: '',
9480    isLoggedIn: false,
9481
9482    // assignment of dom selectors to variables
9483    updateCache: function updateCache() {
9484      _cache.searchIcon = $('.js-link-search');
9485      _cache.searchBarNavigation = $('.js-search-bar-navigation');
9486      _cache.$loginNavigation = $('.js-login-navigation');
9487      _cache.$jsLoginDropdown = $('.js-login-dropdown');
9488      _cache.$jsLoginDropdownParent = $('.js-login-dropdown-parent');
9489      _cache.$loggedUser = $('.js-logged-user');
9490      _cache.$loginLipbox = $('.js-login-liipbox-navigation');
9491      _cache.$loginNameMobile = $('.js-login-name-mobile');
9492      if (snro.commonUtils.isMobile()) {
9493        _cache.$loggedUser.addClass('hide');
9494      }
9495    },
9496
9497
9498    // handle stickyness of header section
9499    _stickyHeader: function _stickyHeader() {
9500      var headerObj = $('.js-header-wrapper'),
9501          loginObj = $('.js-login-wrapper'),
9502          lastscroll = 0,
9503          scrollPosition = void 0,
9504          className = 'js-scroll',
9505          stickyClass = 'c-header__wrapper--sticky',
9506          stickyLogin = 'c-login--sticky',
9507          disclaimerHeight = 0,
9508          reg = new RegExp('(\\s|^)' + className + '(\\s|$)'),
9509          regCookie = new RegExp('(\\s|^)' + stickyClass + '(\\s|$)'),
9510          regCookieLogin = new RegExp('(\\s|^)' + stickyLogin + '(\\s|$)'),
9511          docBody = $('body'),
9512          headerLinks = $('.c-header__nav-link'),
9513          tabScrollHeight = 0;
9514
9515      window.onload = function () {
9516
9517        if (docBody.attr('data-titletohighlight') && docBody.attr('data-titletohighlight').length) {
9518          $.each(headerLinks, function () {
9519            var selectedLink = $(this);
9520            if (selectedLink.text().trim().toLowerCase() === docBody.attr('data-titletohighlight').trim().toLowerCase()) {
9521              selectedLink.addClass('active');
9522            }
9523          });
9524        }
9525
9526        window.onscroll = function () {
9527          scrollPosition = window.pageYOffset;
9528          disclaimerHeight = $('.js-cookies-tag') && $('.js-cookies-tag').length > 0 && $('.js-cookies-tag').is(':visible') ? $('.js-cookies-tag').outerHeight(true) : 0;
9529
9530          if (scrollPosition > lastscroll && scrollPosition > 0) {
9531            if (headerObj[0].className.indexOf(className) === -1) {
9532              headerObj[0].className += ' ' + className;
9533              loginObj[0].className += ' ' + className;
9534            }
9535          } else {
9536            headerObj[0].className = headerObj[0].className.replace(reg, ' ');
9537            loginObj[0].className = loginObj[0].className.replace(reg, ' ');
9538          }
9539
9540          // Add/Remove sticky class from header
9541          if (scrollPosition > disclaimerHeight) {
9542            if (headerObj[0].className.indexOf(stickyClass) === -1) {
9543              headerObj[0].className += ' ' + stickyClass;
9544              loginObj[0].className += ' ' + stickyLogin;
9545            }
9546          } else {
9547            headerObj[0].className = headerObj[0].className.replace(regCookie, ' ');
9548            loginObj[0].className = loginObj[0].className.replace(regCookieLogin, ' ');
9549          }
9550
9551          lastscroll = scrollPosition;
9552
9553          //make navigation tabs sticky
9554          var tabsElem = $('.js-navtab-wrapper, .js-tab-wrapper'),
9555              scrollLimit = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) - document.documentElement.clientHeight;
9556
9557          if (tabScrollHeight < scrollLimit && tabScrollHeight > 0) {
9558            if (scrollPosition >= tabScrollHeight) {
9559              tabsElem.addClass('sticky');
9560            } else {
9561              tabsElem.removeClass('sticky');
9562            }
9563          } else if ($('.js-navtab-wrapper, .js-tab-wrapper').length && headerObj.length) {
9564            tabScrollHeight = $('.js-navtab-wrapper, .js-tab-wrapper').offset().top - $('.js-navtab-wrapper, .js-tab-wrapper').height() - headerObj[0].clientHeight;
9565          }
9566        };
9567      };
9568    },
9569    updateSateLiite: function updateSateLiite() {
9570      try {
9571        _cache.userName = JSON.parse(sessionStorage.getItem('ContextHubPersistence'));
9572        var userProfileOb = _cache.userName.store.owpprofile;
9573        var digitalData = window.digitalData || {};
9574        if (userProfileOb.account_id) {
9575          var digitalDataOb = {
9576            loggedIn: 'logged-in',
9577            salesforceId: userProfileOb.userId,
9578            service_role_assignment: userProfileOb.eservice_role_assignment,
9579            country_code: userProfileOb.country_code,
9580            language: userProfileOb.language,
9581            account_id: userProfileOb.account_id
9582          };
9583          $.extend(digitalData['user'], digitalDataOb);
9584        } else {
9585          var _digitalDataOb = {
9586            loggedIn: 'logged-out'
9587          };
9588          $.extend(digitalData['user'], _digitalDataOb);
9589        }
9590      } catch (e) {
9591        snro.commonUtils.log(e);
9592      }
9593    },
9594
9595
9596    showOneTrust: function showOneTrust() {
9597      var checkExist = setInterval(function () {
9598        if ($("#onetrust-consent-sdk").length != 0 && $('#onetrust-consent-sdk').css('display') == 'none' && snro.commonUtils.getCookie("location-and-language") != "" && (snro.commonUtils.getCookie('persona-type') != "" || $('.js-header-persona-link').hasClass('yesno') || $('.js-header-persona-link').hasClass('yesyes'))) {
9599          $("#onetrust-consent-sdk").css('display', 'block');
9600          clearInterval(checkExist);
9601        }
9602      }, 500);
9603    },
9604
9605    //login API call
9606    loginApiCall: function loginApiCall() {
9607      var requestedUrl = _cache.$jsLoginDropdownParent.data('url'),
9608          parametersToSend = {},
9609          context = this;
9610      if (navigator.appVersion.indexOf('MSIE 9') !== -1) {
9611        $.getJSON(requestedUrl).done(function (data) {
9612          context.populateData(data);
9613        });
9614      } else {
9615        parametersToSend = {
9616          url: requestedUrl,
9617          type: 'GET',
9618          dataType: 'json'
9619        };
9620        snro.ajaxWrapper.getXhrObj(parametersToSend).done(function (data) {
9621          context.populateData(data);
9622          snro.loginComp._checkLogin();
9623        }).fail(function (err) {
9624          snro.commonUtils.log(err);
9625        });
9626      }
9627    },
9628    populateData: function populateData(data) {
9629      var loginData = data;
9630      if (loginData !== null && (typeof loginData === 'undefined' ? 'undefined' : _typeof(loginData)) === 'object') {
9631        if (loginData !== undefined) {
9632          this.isLoggedIn = loginData.isLoggedIn;
9633          this.userName = loginData.userName;
9634          this.checkIfLoggedIn();
9635          if ($('#pageType').length) {
9636            snro.resourceCenterComp.init();
9637          }
9638          if (!this.isLoggedIn) {
9639            snro.commonUtils.removeCookie('loginNotificationDisclaimer');
9640            snro.commonUtils.removeCookie('userCountry');
9641          } else {
9642            snro.loginComp._checkUserLogin();
9643          }
9644        }
9645      }
9646    },
9647
9648
9649    // bind dom events
9650    bindEvents: function bindEvents() {
9651      this.checkIfLoggedIn();
9652      _cache.searchIcon.on('click', this.onSearchIconClick);
9653      _cache.$jsLoginDropdown.on('click', this.onLoginIconClick);
9654    },
9655    checkIfLoggedIn: function checkIfLoggedIn() {
9656      if (this.isLoggedIn) {
9657        _cache.$loggedUser.text(this.userName);
9658        _cache.$loggedUser.removeClass('hide');
9659        _cache.$loginNameMobile.removeClass('c-login__name-mobile');
9660        _cache.$loginNameMobile.text(this.userName);
9661      }
9662    },
9663
9664    //click event handler for hamburger menu
9665    onSearchIconClick: function onSearchIconClick() {
9666      if (_cache.searchBarNavigation.length > 0) {
9667        snro.liipboxComp._liipboxOpen(_cache.searchBarNavigation[0].innerHTML);
9668        if (snro.commonUtils.isMobile()) {
9669          $('.c-header').hide();
9670          $('.x-content-wrapper').hide();
9671          $('.js-footer').hide();
9672        }
9673      }
9674    },
9675
9676
9677    //on click to show/hide log/logout
9678    onLoginIconClick: function onLoginIconClick() {
9679      if (snro.headerNavigationComp.isLoggedIn) {
9680        _cache.$loginNavigation.find('.js-logout-login').removeClass('hide');
9681        _cache.$loginNavigation.find('.js-login-logout').addClass('hide');
9682        _cache.$loginNavigation.find('.js-update-url').removeClass('hide');
9683        _cache.$loginNavigation.find('.js-forgot-url').addClass('hide');
9684      }
9685      if (!snro.commonUtils.isMobile()) {
9686        if (!_cache.$loginNavigation.is(':visible')) {
9687          _cache.$loginNavigation.slideDown('slow');
9688        } else {
9689          _cache.$loginNavigation.slideUp('slow');
9690        }
9691      } else {
9692        _cache.$loginNavigation.addClass('x-liipbox js-liipbox-content');
9693        snro.liipboxComp._liipboxOpen(_cache.$loginLipbox[0].innerHTML);
9694      }
9695    },
9696
9697
9698    // Module initialization
9699    init: function init() {
9700      this._stickyHeader();
9701      this.updateCache();
9702      this.updateSateLiite();
9703      this.loginApiCall();
9704      this.showOneTrust();
9705      this.bindEvents();
9706    }
9707  };
9708})(window, window.jQuery, window.snro);
9709
9710/*
9711 * c_footer.js
9712 * [ This javascript code is used to  display the timestamps on the footer. ]
9713 *
9714 * @project:    SN-RO
9715 * @date:       2017-07-25
9716 * @author:     Prashant
9717 * @licensor:   SAPIENNITRO
9718 * @namespaces: snro
9719 */
9720
9721//this will cause the browser to check for errors more aggressively
9722'use strict';
9723
9724/**
9725 * @namespace footerCmp
9726 * @memberof roche
9727 * @property {null} property - description of property
9728 */
9729
9730(function (window, $, snro, QRCode) {
9731
9732  var _cache = {};
9733
9734  snro = window.snro = snro || {};
9735
9736  snro.footerCmp = {
9737    moduleName: 'footerCmp',
9738
9739    // assignment of dom selectors to variables
9740    _updateCache: function _updateCache() {
9741      _cache.timeStamp = $('.js-timestamp');
9742    },
9743
9744
9745    // bind dom events
9746    _bindEvents: function _bindEvents() {
9747      var timestampText = window.Granite.I18n.get('rdoe_footer.timestamp', null, localStorage.getItem('i18nhint'));
9748      _cache.timeStamp.text(timestampText + ' ' + this._getTimestamp());
9749    },
9750    _getTimestamp: function _getTimestamp() {
9751      var timestamp = new Date();
9752      var day = timestamp.getDate();
9753      var month = timestamp.getMonth() + 1;
9754      var year = timestamp.getFullYear();
9755      day = (day < 10 ? '0' : '') + day;
9756      month = (month < 10 ? '0' : '') + month;
9757      return day + '.' + month + '.' + year;
9758    },
9759
9760
9761    // Module initialization
9762    init: function init() {
9763      this._updateCache();
9764      this._bindEvents();
9765      var _socialListType = $('.c-footer__wrapper .social-icons').data('icontype');
9766      if (_socialListType) {
9767        var _socialListTypeVal = _socialListType.toLowerCase();
9768        if (_socialListTypeVal === 'qrcode') {
9769          $('.js-footer-social-icons--qrcode').each(function (index) {
9770            var _self = $(this);
9771            var qrContainer = 'qrCode-' + index;
9772            var socialImage = _self.data('qrcodeimage');
9773            if (socialImage) {
9774              var socialImgContainer = _self.find('#' + qrContainer);
9775              socialImgContainer.append('<img src=' + socialImage + '></img>');
9776            } else {
9777              var qrLink = _self.data('sociallink');
9778              new QRCode(qrContainer, {
9779                text: qrLink,
9780                width: 50,
9781                height: 50,
9782                colorDark: '#000000',
9783                colorLight: '#ffffff',
9784                correctLevel: QRCode.CorrectLevel.L
9785              });
9786            }
9787          });
9788        }
9789      }
9790    }
9791  };
9792})(window, window.jQuery, window.snro, window.QRCode);
9793
9794/*
9795 * c_heromedia.js
9796 * Set methods for video playback in hero banner
9797 *
9798 * @project:    SN-RO
9799 * @date:       2017-07-28
9800 * @author:     Aftab
9801 * @licensor:   SAPIENNITRO
9802 * @namespaces: snro
9803 */
9804'use strict';
9805
9806var snro = window.snro || {};
9807
9808/**
9809 * @namespace heroMedia
9810 * @memberof roche
9811 */
9812snro.heroMedia = function (window, $) {
9813
9814  var $heroBannerCnt = $('.heroBannerContainer'),
9815      videoTracking = void 0;
9816
9817  /**
9818   * @method init
9819   * @description Initialize for video playback functions
9820   * @memberof snro.heroMedia
9821   * @example
9822   * snro.heroMedia.init()
9823   */
9824  var init = function init() {
9825    var assetType = '';
9826    var videoPlayerFunction = function videoPlayerFunction(context, playerId, containerId, asseType) {
9827      var videoLink = $('#' + playerId).data('fileref'),
9828          $videoPlayBtn = $(context).find('.jp-video-play'),
9829          $playBtn = $(context).find('.vid-play'),
9830          $volCtrlBtn = $(context).find('.vol-ctrl'),
9831          linkHeader = $(context).find('.jp-heading-vid h5').text() || 'hero-media';
9832
9833      if (asseType === 'video') {
9834        $('#' + playerId).jPlayer({
9835          ready: function ready() {
9836            $(this).jPlayer('setMedia', {
9837              m4v: videoLink,
9838              ogv: videoLink,
9839              webmv: videoLink,
9840              wav: videoLink
9841            });
9842            $(this).find('video').css('width', 'auto').css('height', '100%').css('max-width', '100%');
9843            $(this).css('position', 'absolute');
9844          },
9845          preload: 'metadata',
9846          swfPath: 'http://jplayer.org/latest/js',
9847          cssSelectorAncestor: '#' + containerId,
9848          supplied: 'webmv, ogv, m4v',
9849          globalVolume: true,
9850          useStateClassSkin: true,
9851          autoBlur: false,
9852          smoothPlayBar: true,
9853          size: {
9854            width: '100%',
9855            height: '100%',
9856            cssClass: 'jp-video-360p'
9857          },
9858          keyBindings: {
9859            fullScreen: {
9860              key: 70, // f
9861              fn: function fn(f) {
9862                if (f.status.video || f.options.audioFullScreen) {
9863                  f._setOption('fullScreen', false);
9864                }
9865              }
9866            }
9867          },
9868          ended: function ended() {
9869            $(this).jPlayer('setMedia', {
9870              m4v: videoLink,
9871              ogv: videoLink,
9872              webmv: videoLink,
9873              wav: videoLink
9874            });
9875            $(this).jPlayer('playHead', 0);
9876            $(context).find('.jp-interface').css('visibility', 'hidden');
9877            $(context).find('.layer-opaque').css('visibility', 'visible');
9878            $(context).find('.js-video-info').css('display', 'block');
9879          }
9880        });
9881
9882        $('#' + playerId).bind($.jPlayer.event.seeked, function (event) {
9883          var seekedPercent = parseInt(event.jPlayer.status.currentPercentAbsolute);
9884          if (seekedPercent === 100) {
9885            $.extend(window.digitalData['link'], { event: 'video-completes', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-completes', linkHeader: linkHeader });
9886            snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9887            videoTracking['video-100%'] = 'fired';
9888          } else if (seekedPercent >= 75) {
9889            $.extend(window.digitalData['link'], { event: 'video-75%complete', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-75%complete', linkHeader: linkHeader });
9890            snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9891            videoTracking['video-75%'] = 'fired';
9892          } else if (seekedPercent >= 50 && seekedPercent < 75) {
9893            $.extend(window.digitalData['link'], { event: 'video-50%complete', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-50%complete', linkHeader: linkHeader });
9894            snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9895            videoTracking['video-50%'] = 'fired';
9896          } else if (seekedPercent >= 25 && seekedPercent < 50) {
9897            $.extend(window.digitalData['link'], { event: 'video-25%complete', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-25%complete', linkHeader: linkHeader });
9898            snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9899            videoTracking['video-25%'] = 'fired';
9900          } else {
9901            // do nothing
9902          }
9903        });
9904
9905        $('#' + playerId).bind($.jPlayer.event.timeupdate, function (event) {
9906          //as above, grabbing the % location and media being played
9907          var playerTime = event.jPlayer.status.currentPercentAbsolute,
9908              duration = event.jPlayer.status.duration;
9909          if (duration <= 25) {
9910            if (playerTime >= 2 && playerTime < 3) {
9911              $.extend(window.digitalData['link'], { event: 'video-play', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-play', linkHeader: linkHeader });
9912            } else if (playerTime >= 99 && playerTime <= 100 && !videoTracking['video-100%']) {
9913              $.extend(window.digitalData['link'], { event: 'video-completes', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-completes', linkHeader: linkHeader });
9914              snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9915              videoTracking['video-100%'] = 'fired';
9916            }
9917          } else if (duration > 25) {
9918            //There's some overlap between the seeked and stopped events. When a user clicks
9919            // the stop button it actually sends a "seek" to the 0 location. So if the seeked location is 0
9920            // then we track it as a stop, if it's greater than 0, it was an actual seek.
9921            if (playerTime >= 2 && playerTime < 3) {
9922              $.extend(window.digitalData['link'], { event: 'video-play', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-play', linkHeader: linkHeader });
9923            } else if (playerTime >= 25 && playerTime < 26 && !videoTracking['video-25%']) {
9924              $.extend(window.digitalData['link'], { event: 'video-25%complete', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-25%complete', linkHeader: linkHeader });
9925              snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9926              videoTracking['video-25%'] = 'fired';
9927            } else if (playerTime >= 50 && playerTime < 51 && !videoTracking['video-50%']) {
9928              $.extend(window.digitalData['link'], { event: 'video-50%complete', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-50%complete', linkHeader: linkHeader });
9929              snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9930              videoTracking['video-50%'] = 'fired';
9931            } else if (playerTime >= 75 && playerTime < 76 && !videoTracking['video-75%']) {
9932              $.extend(window.digitalData['link'], { event: 'video-75%complete', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-75%complete', linkHeader: linkHeader });
9933              snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9934              videoTracking['video-75%'] = 'fired';
9935            } else if (playerTime >= 99 && playerTime < 100 && !videoTracking['video-100%']) {
9936              $.extend(window.digitalData['link'], { event: 'video-completes', linkCategory: 'internal', linkSection: 'hero-media', linkText: 'video-completes', linkHeader: linkHeader });
9937              snro.analytics.trackEvent(window.digitalData, 'video-tracking');
9938              videoTracking['video-100%'] = 'fired';
9939            }
9940          }
9941        });
9942
9943        $('#' + playerId).jPlayer('volume', 0);
9944        $(context).find('input[type="range"]').rangeslider({
9945          polyfill: false,
9946          onSlide: function onSlide(position, value) {
9947            $('#' + playerId).jPlayer('volume', value / 100);
9948            if (0 === value && !$volCtrlBtn.hasClass('mute')) {
9949              $volCtrlBtn.addClass('mute');
9950            } else if ($volCtrlBtn.hasClass('mute')) {
9951              $volCtrlBtn.removeClass('mute');
9952            }
9953          }
9954        });
9955        $(context).find('.rangeslider__handle').css('left', 0);
9956        $(context).find('.rangeslider__fill').css('width', '7px');
9957        $volCtrlBtn.addClass('mute');
9958        // Attach listeners
9959        $videoPlayBtn.on('click', function (e) {
9960          var videoSrcPath = $('#' + playerId).data('fileref');
9961          var videoElement = document.getElementsByTagName("video");
9962          for (var i = 0; i < videoElement.length; i++) {
9963            if (videoElement[i].src.includes(videoSrcPath)) {
9964              if (!isNaN(videoElement[i].duration) && videoElement[i].duration != undefined) {
9965                var total_secval = Math.round(videoElement[i].duration);
9966                if (window.digitalData.video) {
9967                  window.digitalData.video.videoLength = total_secval;
9968                }
9969              }
9970            }
9971          }
9972          var $parentContainer = $(e.currentTarget).parents('.heroBannerContainer');
9973          $parentContainer.find('.jp-interface').css('visibility', 'visible');
9974          $parentContainer.find('.layer-opaque').css('visibility', 'hidden');
9975          $parentContainer.find('.js-video-info').css('display', 'none');
9976          $parentContainer.find('.vid-play').trigger('click');
9977        });
9978        // Play/Pause
9979        $playBtn.on('click', function (e) {
9980          videoTracking = {
9981            'video-25%': '',
9982            'video-50%': '',
9983            'video-75%': '',
9984            'video-100%': ''
9985          };
9986          var $jPlayer = $(e.currentTarget).parents('.heroBannerContainer').find('.jp-jplayer').attr('id'),
9987              $playButton = $(e.currentTarget).parents('.heroBannerContainer').find('.vid-play'),
9988              $jContainer = $(e.currentTarget).parents('.heroBannerContainer').find('.jp-audio').attr('id'),
9989              $player = $(e.currentTarget).parents('.heroBannerContainer').find('.jp-jplayer');
9990          $player.jPlayer('pauseOthers');
9991          $('.vid-play').removeClass('pause').addClass('play');
9992          if ($('#' + $jContainer).hasClass('jp-state-playing')) {
9993            $('#' + $jPlayer).jPlayer('pause');
9994            $playButton.removeClass('pause').addClass('play');
9995            $.extend(window.digitalData['link'], { event: 'video-pause', linkText: 'video-pause' });
9996          } else {
9997            $('#' + $jPlayer).jPlayer('play');
9998            $playButton.removeClass('play').addClass('pause');
9999            $.extend(window.digitalData['link'], { event: 'video-play', linkText: 'video-play' });
10000          }
10001          $('.vol-ctrl').addClass('mute');
10002          $playButton.siblings('.vol-ctrl').trigger('click');
10003          if (!e.isTrigger) {
10004            snro.analytics.trackEvent(window.digitalData, 'video-tracking');
10005          }
10006        });
10007        // Volume control
10008        $volCtrlBtn.on('click', function (e) {
10009          var $volCtrlBtn = $(e.currentTarget).parents('.heroBannerContainer').find('.vol-ctrl'),
10010              $jPlayer = $(e.currentTarget).parents('.heroBannerContainer').find('.jp-jplayer').attr('id');
10011          if ($volCtrlBtn.siblings('.vid-play').hasClass('pause')) {
10012            if ($volCtrlBtn.hasClass('mute')) {
10013              $volCtrlBtn.removeClass('mute');
10014              $('#' + $jPlayer).jPlayer('volume', 50 / 100);
10015              $('#' + $jPlayer).parent().find('.rangeslider__handle').css('left', '50%');
10016              $('#' + $jPlayer).parent().find('.rangeslider__fill').css('width', '50%');
10017            } else {
10018              $volCtrlBtn.addClass('mute');
10019              $('#' + $jPlayer).jPlayer('volume', 0);
10020              $currjPlayer.parent().find('.rangeslider__handle').css('left', 0);
10021              $currjPlayer.parent().find('.rangeslider__fill').css('width', 0);
10022            }
10023          } else {
10024            $volCtrlBtn.addClass('mute');
10025            $('#' + $jPlayer).jPlayer('volume', 0);
10026            $currjPlayer.parent().find('.rangeslider__handle').css('left', 0);
10027            $currjPlayer.parent().find('.rangeslider__fill').css('width', 0);
10028          }
10029        });
10030      }
10031    };
10032
10033    $($heroBannerCnt).each(function (index) {
10034      if ($(this).data('assettype') === 'video') {
10035        assetType = $(this).data('assettype');
10036        index = index + 1;
10037        $(this).find('#jquery_jplayer_1').attr('id', 'jquery_jplayer_' + index);
10038        $(this).find('#jp_container_1').attr('id', 'jp_container_' + index);
10039        videoPlayerFunction($(this), 'jquery_jplayer_' + index, 'jp_container_' + index, assetType);
10040      }
10041    });
10042  };
10043
10044  // Public API
10045  return {
10046    init: init
10047  };
10048}(window, jQuery);
10049
10050jQuery(snro.heroMedia.init());
10051
10052/*
10053 * liipbox.js
10054 * [ This javascript code is to open overlay which will act as getter for HTML content to display.
10055 *
10056 * @project:    SN-RO
10057 * @date:       2017-07-25
10058 * @author:     shubham
10059 * @licensor:   SAPIENNITRO
10060 * @namespaces: snro
10061 */
10062
10063//this will cause the browser to check for errors more aggressively
10064'use strict';
10065
10066/**
10067 * @namespace liipboxComp
10068 * @memberof roche
10069 * @property {null} property - description of property
10070 */
10071
10072(function (window, $, snro) {
10073
10074  var _cache = {};
10075
10076  snro = window.snro = snro || {};
10077
10078  /**
10079   *  function to close liipbox
10080   */
10081  function closeLiipbox() {
10082    var liipbox = $('.js-liipbox'),
10083        className = 'x-no-scroll',
10084        reg = new RegExp('(\\s|^)' + className + '(\\s|$)');
10085
10086    if (liipbox.length > 0) {
10087      liipbox.remove();
10088      /* commented out to remove focus from element selected before opening liipbox
10089      _cache.focusedElementBeforeModal.focus(); 
10090      */
10091      document.body.className = document.body.className.replace(reg, '');
10092    }
10093  }
10094
10095  /**
10096   * function to provide open animation to the liipbox (overlay)
10097   */
10098  function liipboxAnimation(event) {
10099
10100    var toggleLiipbox = (event === 'close') > 0 ? true : false,
10101
10102
10103    // jquery selectors
10104    linkSelector = toggleLiipbox ? $('.js-liipbox').find('.link-row').get().reverse() : $('.js-liipbox').find('.link-row'),
10105        logoSelector = $('.js-liipbox').find('.js-liipbox-logo'),
10106        crossIcon = $('.js-liipbox').find('.js-cross-icon'),
10107        liipboxOverlay = $('.js-liipbox').find('.js-liipbox-content'),
10108        animateHeaderClass = toggleLiipbox ? 'animated fadeOut' : 'animated fadeIn',
10109        animateContentClass = toggleLiipbox ? 'animated fadeOutDown' : 'animated fadeInUp',
10110        animationEndCallback = toggleLiipbox ? closeLiipbox : '';
10111
10112    // animate content
10113    if (linkSelector.length > 0) {
10114      var animationCompleted = $.Deferred();
10115      $(linkSelector).each(function (index, element) {
10116        var transitionDelay = index * 0.04 + 's';
10117        if (window.requestAnimationFrame) {
10118          $(element).css('animation-delay', transitionDelay).css('-webkit-animation-delay', transitionDelay).removeClass('').addClass(animateContentClass);
10119        }
10120        if (index === $(linkSelector).length - 1) {
10121          animationCompleted.resolve();
10122        }
10123      });
10124      animationCompleted.then(function () {
10125        animationEndCallback && animationEndCallback();
10126      });
10127    } else {
10128      animationEndCallback && animationEndCallback();
10129    }
10130
10131    // animate header
10132    if (toggleLiipbox) {
10133      $(logoSelector).removeClass('translated');
10134      $(crossIcon).removeClass('translated');
10135    } else {
10136      $(liipboxOverlay).addClass(animateHeaderClass);
10137      $(logoSelector).addClass('translated');
10138      $(crossIcon).addClass('translated');
10139    }
10140  }
10141
10142  /**
10143   * function keeps track of highlighted items
10144   * while iterating over links, buttons &
10145   * input fields
10146   * @param e Keyboard event
10147   */
10148  function trapTabKey(e) {
10149    // Check for TAB key press
10150    if (e.keyCode === 9) {
10151
10152      // SHIFT + TAB
10153      if (e.shiftKey) {
10154        if (document.activeElement === _cache.firstTabStop) {
10155          e.preventDefault();
10156          _cache.lastTabStop.focus();
10157        }
10158        // TAB
10159      } else if (document.activeElement === _cache.lastTabStop) {
10160        e.preventDefault();
10161        _cache.firstTabStop.focus();
10162      }
10163    }
10164
10165    // ESCAPE
10166    if (e.keyCode === 27 && $('.js-cross-icon:visible').length && !$('.js-redirect-popup').is(':visible')) {
10167      //closeLiipbox();
10168      liipboxAnimation('close');
10169    }
10170  }
10171
10172  snro.liipboxComp = {
10173
10174    /**
10175     * assignment of dom selectors to variables
10176     */
10177    _updateCache: function _updateCache() {
10178      _cache.documentBody = $('body');
10179      _cache.liipbox = $('.js-liipbox');
10180      _cache.focusedElementBeforeModal = '';
10181      _cache.firstTabStop = '';
10182      _cache.lastTabStop = '';
10183      _cache.$loginNavigation = $('.js-login-navigation');
10184      _cache.$header = $('.js-header-wrapper');
10185    },
10186
10187
10188    /**
10189     * method to show overlay
10190     */
10191    _liipboxOpen: function _liipboxOpen(data) {
10192      var e = document.createElement('div'),
10193          html = data,
10194          liipbox = document.getElementsByClassName('js-liipbox');
10195
10196      e.className = 'js-liipbox';
10197      e.innerHTML = html;
10198      //Adding vi class to Vietnam Locale
10199      if ($('body').hasClass('vi')) {
10200        document.body.className = 'x-no-scroll';
10201        document.body.classList.add('vi');
10202      } else {
10203        document.body.className = 'x-no-scroll';
10204      }
10205
10206      if (liipbox.length > 0) {
10207        liipbox[0].outerHTML = '';
10208      }
10209
10210      document.body.appendChild(e);
10211      this._accessibleLiipbox();
10212      liipboxAnimation();
10213    },
10214
10215
10216    /**
10217     * binding events on liipbox
10218     */
10219    _bindEvents: function _bindEvents() {
10220      $('body').on('click', '.js-cross-icon', function () {
10221        //closeLiipbox();
10222        _cache.$loginNavigation.removeClass('x-liipbox js-liipbox-content');
10223        liipboxAnimation('close');
10224        if (snro.commonUtils.isMobile()) {
10225          $('.c-header').show();
10226          $('.x-content-wrapper').show();
10227          $('.js-footer').show();
10228        }
10229      });
10230      if (snro.commonUtils.isMobile()) {
10231        $('body').on('click', '.js-change-persona', function () {
10232          _cache.$loginNavigation.removeClass('x-liipbox js-liipbox-content');
10233          liipboxAnimation('close');
10234          snro.personaPickerComp.isPersonaFromClick = true;
10235          snro.personaPickerComp.cookieFlag = snro.commonUtils.getCookie('persona-type') || snro.countrySelectorCmp.countrySelectorPassed;
10236          snro.personaPickerComp._callPersonaPicker($('.js-header-persona-link').data('url'));
10237        });
10238      }
10239    },
10240
10241
10242    /**
10243     *  Add keyboard accessibility to the dynamically added content
10244     *  in liipbox (overlay)
10245     *  "Tab/Shift + Tab" to iterate through links, buttons, input field
10246     *  "Esc" key to close the liipbox
10247     */
10248    _accessibleLiipbox: function _accessibleLiipbox() {
10249
10250      // Save current focus
10251      _cache.focusedElementBeforeModal = document.activeElement;
10252
10253      // Find the liipbox and its overlay
10254      var liipbox = document.querySelector('.js-liipbox'),
10255          liipboxOverlay = document.querySelector('.js-liipbox-overlay');
10256
10257      // Listen for and trap the keyboard
10258      liipbox.addEventListener('keydown', trapTabKey);
10259
10260      if (liipboxOverlay && $(liipboxOverlay).length > 0) {
10261        // Listen for indicators to close the lipbox
10262        liipboxOverlay.addEventListener('click', liipboxAnimation);
10263
10264        // liipbox close button
10265        var closeButtons = liipboxOverlay.querySelector('.js-cross-icon');
10266        if (closeButtons && $(closeButtons).length > 0) {
10267          // Attach listeners to all the close modal buttons
10268          closeButtons.addEventListener('click', liipboxAnimation);
10269        }
10270        // Find all focusable children
10271        var focusableElementsString = 'a[href], area[href], input
10271:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]',
10272            focusableElements = liipbox.querySelectorAll(focusableElementsString);
10273
10274        if (focusableElements.length > 0) {
10275          // Convert NodeList to Array
10276          focusableElements = Array.prototype.slice.call(focusableElements);
10277
10278          _cache.firstTabStop = focusableElements[0];
10279          _cache.lastTabStop = focusableElements[focusableElements.length - 1];
10280
10281          // Focus first child
10282          _cache.firstTabStop.focus();
10283        }
10284      }
10285    },
10286
10287
10288    /**
10289     * Module initialization
10290     */
10291    init: function init() {
10292      this._updateCache();
10293      this._bindEvents();
10294    }
10295  };
10296})(window, jQuery, window.snro);
10297
10298/*!
10299 * 
10300
10301 * This file contians eLabDociFrame functions
10302 *
10303 * @project   SapientNitro Roche Diagonostics
10304 * @date      2017-07-17
10305 * @author    Suneel
10306 * @dependencies jQuery
10307 */
10308
10309//this will cause the browser to check for errors more aggressively
10310'use strict';
10311
10312/**
10313 * @namespace Main
10314 * @memberof snro
10315 * @property {null} property - description of property
10316 */
10317
10318(function (window, $, snro) {
10319  snro = window.snro = snro || {};
10320
10321  /**
10322   * Generic function append iframe with dynamic src on tab change.
10323   * Accepts any valid selector or jQuery object.
10324   * @param {selector, HTMLElement, or jQuery object} Iframe
10325   */
10326
10327  var setIframeSrc = function setIframeSrc() {
10328    var iframeWrapper = '.c-eLabDociFrame__wrapper';
10329    $('body').on('click', '.js-tab-item', function () {
10330      var iframeSrc = $(iframeWrapper).data('src');
10331
10332      if ($(this).data('tab-name').toLowerCase() === 'documents' || $(this).data('tab-name').toLowerCase() === 'documentation') {
10333        $(iframeWrapper).html('');
10334        snro.commonUtils.loader(iframeWrapper, true, false);
10335        if (iframeSrc.trim() !== '') {
10336          var searchTextVal = $('#search-page-input').val();
10337          if (searchTextVal !== '') {
10338            iframeSrc += '?Text=' + searchTextVal;
10339          }
10340          $(iframeWrapper).delay(1000).queue(function (callback) {
10341            $(this).html('<iframe id="eLabDociFrame" frameborder=\'0\' scrolling=\'no\' src=\'' + iframeSrc + '\'></iframe>');
10342            $('#eLabDociFrame').responsiveIframe({ xdomain: '*' });
10343            callback();
10344          });
10345        }
10346      }
10347    });
10348  };
10349
10350  snro.eLabDociFrame = {
10351    init: function init() {
10352      setIframeSrc();
10353    }
10354  };
10355})(window, window.jQuery, window.snro);
10356
10357/*
10358 * pdpNavTabs.js
10359 * [ pdpNavTabs ]
10360 *
10361 * @project:    SN-RO
10362 * @date:       2015-04-17
10363 * @author:     Shubham
10364 * @licensor:   SAPIENNITRO
10365 * @namespaces: snro
10366 */
10367
10368//this will cause the browser to check for errors more aggressively
10369'use strict';
10370
10371/**
10372 * @namespace pdpNavTabs
10373 * @memberof roche
10374 * @property {null} property - description of property
10375 */
10376
10377(function (window, $, snro) {
10378
10379  snro = window.snro = snro || {};
10380
10381  // public methods
10382
10383  var tabsmapping = {
10384    'tab1': 'productInfo',
10385    'tab2': 'productSpecs',
10386    'tab3': 'documents',
10387    'tab4': 'relatedProducts',
10388    'tab5': 'tabfive'
10389  },
10390      _goToTab = function _goToTab(tabName) {
10391    var tab = $('[data-tab-name=' + tabName + ']:visible');
10392    if (tab.length) {
10393      snro.eLabDociFrame.init();
10394      $(tab).trigger('click');
10395    }
10396  },
10397      _showTabView = function _showTabView(tabName) {
10398    $('.js-tab-item').removeClass('selected');
10399    $('[data-tab-name=' + tabName + ']:visible').addClass('selected');
10400    if (window.location.href.indexOf('.acadia.html') == -1) {
10401      if ($('.js-tab-view-container').length) {
10402        $('.js-tab-view-container').children('.js-tab-view').hide();
10403      } else {
10404        $('.js-tab-view').hide();
10405      }
10406    } else {
10407      $('.js-tab-view').show();
10408    }
10409    $('#' + tabName).show();
10410    snro.dynamicMedia.processDynamicImages();
10411    snro.commonUtils.lazyloadImages();
10412    if ($('.js-carousel').is(':visible')) {
10413      $('.js-carousel-content').slick('unslick');
10414      snro.carouselComp.init();
10415    }
10416    if ($('.js-slider-carousel').is(':visible')) {
10417      $('.js-sliderLightBox-content').slick('unslick');
10418      snro.sliderLightBoxComp.init();
10419    }
10420    if ($('.imageSlider').is(':visible')) {
10421      snro.imageSlider.init();
10422    }
10423  },
10424      _showDefaultTab = function _showDefaultTab() {
10425    var index = Object.keys(tabsmapping).map(function (i) {
10426      return tabsmapping[i];
10427    }).indexOf(window.location.hash.replace('#', ''));
10428
10429    var heroMediaObFlag = $('.js-pdp-container').find('.js-hero-banner').hasClass('no-image');
10430    if (!heroMediaObFlag && $('.js-pdp-nav-tabs').length) {
10431      $('.js-pdpnav-container').addClass('x-comp-offset-spacing');
10432    }
10433
10434    if (index === -1) {
10435      var defaultTab = $('.js-tabs-list').data('defaultTab') || '',
10436          tabName = defaultTab ? tabsmapping[defaultTab] : '';
10437      if (tabName && $('[data-tab-name=' + tabName + ']').is(':visible')) {
10438        snro.eLabDociFrame.init();
10439        $('[data-tab-name=' + tabName + ']').trigger('click');
10440      } else {
10441        snro.eLabDociFrame.init();
10442        var tabToSelect = $('.js-tab-item:visible')[0];
10443        $(tabToSelect).trigger('click');
10444      }
10445    }
10446  },
10447      _appendCategoryIdToUrl = function _appendCategoryIdToUrl(currTabName) {
10448    _showTabView(currTabName);
10449    window.location.hash = currTabName;
10450  },
10451      _preventScrollTop = function _preventScrollTop() {
10452    /*if ($('.c-tabs-container').length > 0) {
10453      $('body, html').animate({
10454        scrollTop: $('.c-tabs-container').offset().top - $('.c-header').height() - 150 + 'px'
10455      }, 10);
10456    }*/
10457
10458    if ($('.js-tab-wrapper').length > 0) {
10459      setTimeout(function () {
10460        $('.js-tab-wrapper').removeClass('sticky');
10461        $('html,body').scrollTop($('.js-tab-wrapper').offset().top - 120);
10462      }, 500);
10463    }
10464  },
10465      _bindEvents = function _bindEvents() {
10466    $('body').on('click', '.js-tab-item', function (e) {
10467      e.preventDefault();
10468      //disable click for x-disable-click class, as pointer events are not supported in IE9
10469      if (!$(this).hasClass('selected') || !$(this).hasClass('x-disable-click')) {
10470        if (($('.js-pdp-nav-tabs').length || $('.js-tabs-container').length) && (snro.commonUtils.isMobile() || snro.commonUtils.isMobileMode())) {
10471          $(this).scrollintoview();
10472        }
10473
10474        var tabName = $(this).data('tabName');
10475        _showTabView(tabName);
10476
10477        /*if(snro.commonUtils.isDesktopMode()) {
10478          if($('.c-tabs-container').length > 0) {
10479            $('body, html').animate({
10480              scrollTop: $('.c-tabs-container').offset().top - $('.c-header').height() -150 + 'px'
10481            }, 10);
10482          }
10483        }*/
10484
10485        if ($('nav[data-module="pdpNavTabs"]').length) {
10486          snro.commonUtils.lazyloadImages();
10487          $(window).trigger('animateRocheChart');
10488        }
10489        if (e.originalEvent !== undefined) {
10490          //click triggered by actual mouse click
10491          var currTabName = $(e.currentTarget).data('tab-name');
10492          _appendCategoryIdToUrl(currTabName);
10493          // _preventScrollTop();
10494        }
10495
10496        if (e.originalEvent !== undefined && $('.js-tab-wrapper').length) {
10497          $('.js-tab-wrapper').removeClass('sticky');
10498          $('html,body').scrollTop($('.js-tab-wrapper').offset().top - 120);
10499        }
10500      }
10501    });
10502  };
10503
10504  /**
10505   * @method init
10506   * @description this method is used to initialize public methods.
10507   * @memberof snro.pdpNavTabs
10508   * @example
10509   * snro.pdpNavTabs.init()
10510   */
10511  snro.pdpNavTabs = {
10512
10513    init: function init() {
10514
10515      // to hide tab component if ther is only one tab
10516      _bindEvents();
10517
10518      // Specific to PDP page only
10519      if ($('.js-pdp-nav-tabs').length) {
10520        $('.js-tab-item').each(function (i, currTabComp) {
10521          var currTabCompDiv = $(currTabComp).data('tab-name');
10522          if ($('#' + currTabCompDiv).text().trim(' ') !== '' || $('#' + currTabCompDiv).find('img').length) {
10523            $(currTabComp).removeClass('hidden');
10524          }
10525        });
10526        var firstVisibleTab = $('.js-tab-item:visible')[0];
10527        $(firstVisibleTab).addClass('first-visible-tab');
10528        _showDefaultTab();
10529      }
10530
10531      var visibleTabsCount = $('.js-tabs-list .js-tab-item:visible').length;
10532      if (visibleTabsCount <= 1) {
10533        $('.js-tabs-container').hide();
10534        $('.c-pdpnav-container').hide();
10535        $('.js-product-catalog').length && $('.js-product-catalog').removeClass('x-comp-offset-spacing');
10536      }
10537
10538      // for directly opening the specific tab on a page
10539      var hash = window.location.hash;
10540      if (hash) {
10541        var tabName = hash.split('#');
10542        tabName = tabName[1];
10543        _goToTab(tabName);
10544        _preventScrollTop();
10545      }
10546      if (window.ContextHub) {
10547        window.ContextHub.eventing.once(window.ContextHub.Constants.EVENT_TEASER_LOADED, function () {
10548          if ($('.js-tab-item').length && $('.js-product-catalog').length && snro.commonUtils.getCookie('wcmmode') !== 'edit') {
10549            if (!window.location.hash) {
10550              var firstTab = $('.js-tab-item')[0];
10551              $(firstTab).trigger('click');
10552            }
10553          }
10554        }, 'bindOff', true);
10555      }
10556    }
10557  };
10558})(window, jQuery, window.snro);
10559
10560/*
10561 * c_hamburgermenu.js
10562 * [ This javascript code is used to show and hide the search fields on the home page main navigation. ]
10563 *
10564 * @project:    SN-RO
10565 * @date:       2017-07-25
10566 * @author:     Prashant
10567 * @licensor:   SAPIENNITRO
10568 * @namespaces: snro
10569 */
10570
10571//this will cause the browser to check for errors more aggressively
10572'use strict';
10573
10574/**
10575 * @namespace navigationCmp
10576 * @memberof roche
10577 * @property {null} property - description of property
10578 */
10579
10580(function (window, $, snro) {
10581
10582  var _cache = {};
10583
10584  snro = window.snro = snro || {};
10585
10586  snro.navigationCmp = {
10587    moduleName: 'navigationCmp',
10588
10589    // assignment of dom selectors to variables
10590    updateCache: function updateCache() {
10591      _cache.hamburgerMenu = $('.js-menu');
10592      _cache.globalSearch = $('.js-link-search');
10593      _cache.countrySelector = $('.js-link-country');
10594      _cache.personaSelector = $('.js-link-persona');
10595      _cache.navigationContent = $('.js-liipbox-navigation');
10596    },
10597
10598
10599    // bind dom events
10600    bindEvents: function bindEvents() {
10601      _cache.hamburgerMenu.on('click', this.onHamburgerClick);
10602    },
10603
10604
10605    //click event handler for hamburger menu
10606    onHamburgerClick: function onHamburgerClick() {
10607      if (_cache.navigationContent.length > 0) {
10608        snro.liipboxComp._liipboxOpen(_cache.navigationContent[0].innerHTML);
10609      }
10610    },
10611
10612
10613    // Module initialization
10614    init: function init() {
10615      this.updateCache();
10616      this.bindEvents();
10617    }
10618  };
10619})(window, window.jQuery, window.snro);
10620
10621/*
10622 * personapicker.js
10623 * [ This javascript code is to handle person picker on basis of cookie.
10624 *
10625 * @project:    SN-RO
10626 * @date:       2017-07-25
10627 * @author:     shubham
10628 * @licensor:   SAPIENNITRO
10629 * @namespaces: snro
10630 */
10631
10632//this will cause the browser to check for errors more aggressively
10633'use strict';
10634
10635/**
10636 * @namespace personaPickerComp
10637 * @memberof roche
10638 * @property {null} property - description of property
10639 */
10640
10641(function (window, $, snro) {
10642  snro = window.snro = snro || {};
10643  snro.personaPickerComp = {
10644    moduleName: 'personaPickerComp',
10645    cookieFlag: false,
10646    urlPersona: $('.js-header-persona-link').data('url'),
10647    redirectURL: '',
10648    cookieUpdate: false,
10649    personaTagMeta: $('meta[name="personaTag"]').attr('content'),
10650    metaTagAttribute: $('meta[name="personaTag"]').attr('content') ? $('meta[name="personaTag"]').attr('content').split(',')[0] : '',
10651    pageType: $('meta[name="page-type"]').length ? $('meta[name="page-type"]').attr('content') : 'otherPage',
10652    cookieValue: '',
10653    isPersonaFromClick: false,
10654    popUpDisable: $('.js-popup-disable'),
10655    dataPrivacyNode: $('input[name=dataPrivacy]'),
10656    isTriggerLiipbox: true,
10657    // check cookie if exists
10658    _checkCookie: function _checkCookie() {
10659      var cookie_value = snro.commonUtils.getCookie('persona-type');
10660      if (this.popUpDisable.data('personaPopupDisabled') && (cookie_value == '' || this.personaTagMeta && this.personaTagMeta.indexOf(cookie_value) === -1)) {
10661        snro.personaPickerComp._setCookie(this.popUpDisable.data('defaultPersona'));
10662        cookie_value = this.popUpDisable.data('defaultPersona');
10663      }
10664      this._deleteCookie();
10665      if ($('.js-header-persona-link').hasClass('yesno')) {
10666        this.isTriggerLiipbox = false;
10667        $('.js-change-persona').removeClass('hidden');
10668      } else if ($('.js-header-persona-link').hasClass('yesyes')) {
10669        $('.js-change-persona').addClass('hidden');
10670        this.isTriggerLiipbox = false;
10671      }
10672      if ($('.js-header-persona-link').length) {
10673        if (!cookie_value) {
10674          this._callPersonaPicker(this.urlPersona);
10675        } else if (snro.countrySelectorCmp.countrySelectorPassed) {
10676          $('.js-cross-icon').click();
10677        } else {
10678          this.cookieFlag = true;
10679          var cookie_type = snro.commonUtils.getCookie('persona-type');
10680          if (typeof window.Granite === 'undefined') {
10681            window.Granite = {
10682              I18n: {
10683                get: function get() {
10684                  snro.commonUtils.log('');
10685                }
10686              }
10687            };
10688          }
10689          $('.js-header-persona-link').text(window.Granite.I18n.get('rdoe_personapicker.' + cookie_type, null, localStorage.getItem('i18nhint')));
10690        }
10691      }
10692    },
10693
10694
10695    // check if cookie value is updating
10696
10697    _cookieValueCheck: function _cookieValueCheck(cookie) {
10698      var cookie_value = snro.commonUtils.getCookie('persona-type');
10699      if (cookie_value !== cookie) {
10700        this.cookieUpdate = true;
10701      } else {
10702        this.cookieUpdate = false;
10703      }
10704    },
10705
10706
10707    // selected persona show
10708
10709    _selectPersona: function _selectPersona() {
10710      var cookie_value = snro.commonUtils.getCookie('persona-type');
10711      $('.js-persona-link').each(function () {
10712        var cookie = $(this).find('.js-persona-type').text().trim();
10713        if (cookie === cookie_value) {
10714          $(this).addClass('persona-selected');
10715        }
10716      });
10717    },
10718
10719
10720    // set cookie if persona selected.
10721
10722    _setCookie: function _setCookie(cookie_type) {
10723      var currentPersona = snro.commonUtils.getCookie('persona-type'),
10724          checkCookie = snro.commonUtils.getCookie('DataPrivacy');
10725      if (!$('input[name=dataPrivacy]').length || checkCookie) {
10726        snro.commonUtils.setCookie('persona-type', cookie_type, Infinity);
10727      }
10728      if (this.pageType.toLocaleLowerCase() === 'home' || currentPersona !== cookie_type && (currentPersona !== '' || $('.js-header-persona-link').hasClass('yesno'))) {
10729        this._redirectPage(cookie_type);
10730      }
10731      if (this.metaTagAttribute === this.cookieValue && (!$('input[name=dataPrivacy]').length || checkCookie)) {
10732        snro.personaPickerComp._checkCookie();
10733      }
10734    },
10735
10736
10737    // redirecting to the home page
10738    _redirectPage: function _redirectPage(cookie_type) {
10739      var dataPrivacyCookie = snro.commonUtils.getCookie('DataPrivacy');
10740      if (!$('input[name=dataPrivacy]').length) {
10741        window.location.href = this.redirectURL;
10742      } else if ($('input[name=dataPrivacy]').length && !dataPrivacyCookie) {
10743        window.location.href = this.redirectURL + '?persona=' + cookie_type;
10744      } else if ($('input[name=dataPrivacy]').length && dataPrivacyCookie) {
10745        window.location.href = this.redirectURL;
10746      }
10747    },
10748
10749
10750    // delete persona cookie
10751    _deleteCookie: function _deleteCookie() {
10752      if (!$('.js-header-persona-link').length) {
10753        snro.commonUtils.removeCookie('persona-type');
10754      }
10755    },
10756
10757
10758    // AJAX Call PersonaPicker
10759    _callPersonaPicker: function _callPersonaPicker(url) {
10760      var options = {
10761        url: url,
10762        type: 'GET',
10763        dataType: 'html',
10764        cache: true
10765      };
10766      snro.ajaxWrapper.getXhrObj(options).done(function (data) {
10767        if (snro.personaPickerComp.isTriggerLiipbox) {
10768          snro.liipboxComp._liipboxOpen(data);
10769        }
10770        snro.personaPickerComp.redirectURL = $('#redirectURL').val();
10771        if (!snro.personaPickerComp.cookieFlag) {
10772          $('.js-c-persona-picker').addClass('no-cookie');
10773        } else {
10774          $('.persona-text.ellipsis').length && $('.persona-text.ellipsis').dotdotdot();
10775          snro.personaPickerComp._selectPersona();
10776        }
10777      }).fail(function (err) {
10778        snro.commonUtils.log(err);
10779      });
10780    },
10781
10782
10783    // binding click events
10784    _bindEvents: function _bindEvents(deepLinkInitiated) {
10785      var context = this,
10786          $modalPopUp = $('#myModalPopUp'),
10787          metaTagPersonaLevel = context.metaTagAttribute;
10788      $('body').on('click', '.js-persona-link', function () {
10789        var cookie_value = $(this).find('.js-persona-type').text().trim();
10790        context.cookieValue = cookie_value;
10791        if (!snro.personaPickerComp.isPersonaFromClick && metaTagPersonaLevel && context.personaTagMeta && context.personaTagMeta.indexOf(cookie_value) === -1 && typeof deepLinkInitiated === 'undefined') {
10792          snro.modalPopComp.updateTemplate(window.Granite.I18n.get('rdoe_deeplinkpopup.' + metaTagPersonaLevel, null, localStorage.getItem('i18nhint')), true);
10793          $modalPopUp.addClass('show');
10794          if ('.js-c-persona-picker'.length) {
10795            $('.x-liipbox').addClass('x-index-liipbox');
10796          }
10797          return;
10798        }
10799        snro.personaPickerComp._cookieValueCheck(cookie_value);
10800        $('.js-c-persona-picker').slideUp('fast', function () {
10801          if (snro.personaPickerComp.cookieUpdate) {
10802            var dataPrivacyCookie = snro.commonUtils.getCookie('DataPrivacy');
10803            snro.personaPickerComp._setCookie(cookie_value);
10804            if (!$('input[name=dataPrivacy]').length || dataPrivacyCookie) {
10805              snro.personaPickerComp._checkCookie();
10806            }
10807          } else {
10808            var liipboxOb = document.getElementsByClassName('js-liipbox');
10809            if (liipboxOb.length != 0) {
10810              liipboxOb[0].parentNode.removeChild(liipboxOb[0]);
10811            }
10812          }
10813          $('body').removeClass('x-no-scroll');
10814          if (snro.personaPickerComp.pageType !== 'Home' && !snro.personaPickerComp.isPersonaFromClick) {
10815            window.location.reload();
10816          }
10817        });
10818      });
10819      $('body').on('click', '.js-change-persona', function () {
10820        snro.personaPickerComp.isTriggerLiipbox = true;
10821        $('.js-header-wrapper').find('.js-header-persona-link').trigger('click');
10822        //snro.personaPickerComp._callPersonaPicker($('.js-header-persona-link').data('url'));
10823      });
10824    },
10825
10826
10827    // Module initialization
10828    init: function init(deepLinkInitiated) {
10829      this._checkCookie();
10830      this._bindEvents(deepLinkInitiated);
10831    }
10832  };
10833})(window, jQuery, window.snro);
10834
10835/**
10836 * c_countrypicker.js
10837 * Implements global search functions for desktop and mobile
10838 * @project:    SN-RO
10839 * @date:       2018-12-22
10840 * @author:     Raman
10841 * @namespaces: snro
10842 */
10843
10844//this will cause the browser to check for errors more aggressively
10845'use strict';
10846
10847/**
10848 * @namespace Main
10849 * @memberof snro
10850 * @property {null} property - description of property
10851 */
10852
10853(function (window, $, snro) {
10854  var _cache = {};
10855  snro = window.snro = snro || {};
10856  /**
10857     * Handles search results
10858     * @param {object} e
10859     */
10860
10861  function _addActive(x, direction) {
10862    /*a function to classify an item as 'active':*/
10863    if (!x) {
10864      return false;
10865    }
10866    /*start by removing the 'active' class on all items:*/
10867    _removeActive(x);
10868    if (_cache.currentFocus >= x.length) {
10869      _cache.currentFocus = 0;
10870    }
10871    if (_cache.currentFocus < 0) {
10872      _cache.currentFocus = x.length - 1;
10873    }
10874
10875    /*add class 'autocomplete-active'on next visible element*/
10876    while (x[_cache.currentFocus] && x[_cache.currentFocus].classList.contains('hidden')) {
10877      if (direction === 'down') {
10878        _cache.currentFocus++;
10879        if (_cache.currentFocus >= x.length) {
10880          _cache.currentFocus = 0;
10881        }
10882      } else {
10883        _cache.currentFocus--;
10884        if (_cache.currentFocus < 0) {
10885          _cache.currentFocus = x.length - 1;
10886        }
10887      }
10888    }
10889    x[_cache.currentFocus].classList.add('c-search__field__active');
10890    if (document.getElementsByClassName('c-search__field__active')[0].offsetTop > document.getElementsByClassName('c-search__field__items')[0].offsetHeight) {
10891      document.getElementsByClassName('c-search__field__items')[0].scrollTop = document.getElementsByClassName('c-search__field__active')[0].offsetTop;
10892    }
10893    $('#searchInputautocomplete-list').scrollTop(0); //set to top
10894    $('#searchInputautocomplete-list').scrollTop($('.c-search__field__active:first').position().top + $('.c-search__field__active:first').outerHeight() - $('#searchInputautocomplete-list').height());
10895  }
10896  function _removeActive(x) {
10897    /*a function to remove the 'active' class from all autocomplete items:*/
10898    for (var i = 0; i < x.length; i++) {
10899      x[i].classList.remove('c-search__field__active');
10900    }
10901  }
10902  function _closeAllLists() {
10903    _cache.$searchList.addClass('hidden');
10904    $('.c-search__field__headingText').removeClass('c-text__blue');
10905    if (snro.commonUtils.isMobileMode()) {
10906      //$('body').unbind('touchmove');
10907      _cache.$searchInput.closest('.js-search-cont').removeClass('c-mobile-search');
10908    }
10909    $.each(_cache.$searchFieldItems, function (index, element) {
10910      var $element = $(element);
10911      $element.removeClass('hidden');
10912    });
10913  }
10914  function _inputCallback() {
10915    var val = this.value,
10916        filterFlag = false;
10917    _cache.currentFocus = -1;
10918    _cache.$searchList.removeClass('hidden');
10919    $('.c-search__field__headingText').addClass('c-text__blue');
10920    $.each(_cache.$searchFieldItems, function (index, element) {
10921      var $element = $(element);
10922      if (val.trim() === '' || !$element.hasClass('js-unfilteredCountries') && $element.find('input').val().substr(0, val.length).toUpperCase() === val.toUpperCase()) {
10923        if (val.trim() === '') {
10924          $('.js-mostSelectedLabel').show();
10925        }
10926        $element.removeClass('hidden');
10927        filterFlag = true;
10928      } else {
10929        if (val.trim() !== '') {
10930          $('.js-mostSelectedLabel').hide();
10931        }
10932        $element.addClass('hidden');
10933      }
10934    });
10935    if (!filterFlag) {
10936      _cache.$noresult.removeClass('hidden');
10937      _cache.$defaultSearchSuggestion.show();
10938    } else {
10939      _cache.$noresult.addClass('hidden');
10940    }
10941  }
10942  function _inputClickCallBack() {
10943    if (!_cache.$searchList.hasClass('hidden')) {
10944      if (!snro.commonUtils.isMobileMode()) {
10945        _closeAllLists();
10946        _cache.$searchInput.val(_cache.selectedData.languageandlocation);
10947        _cache.$selectCountryTabHeading.text(_cache.selectedData.languageandlocation);
10948      }
10949    } else {
10950      _cache.$searchInput.val('');
10951      _cache.currentFocus = -1;
10952      _cache.$searchList.removeClass('hidden');
10953      _cache.$searchList.scrollTop(0);
10954      $('.c-search__field__headingText').addClass('c-text__blue');
10955      if (snro.commonUtils.isMobileMode()) {
10956        _cache.$searchInput.closest('.js-search-cont').addClass('c-mobile-search');
10957        //$('body').bind('touchmove', function(e){e.preventDefault();});
10958      }
10959      $('.js-mostSelectedLabel').show();
10960      _cache.$noresult.addClass('hidden');
10961    }
10962  }
10963  function _selectOpenTab() {
10964    _cache.$tabPanel.each(function () {
10965      var _self = $(this);
10966      var _selfParent = _self.parent();
10967      if (_self.hasClass('in') && _selfParent.is(':visible')) {
10968        _selfParent.addClass('c-countrypicker-active-tab');
10969      } else {
10970        _selfParent.removeClass('c-countrypicker-active-tab');
10971      }
10972    });
10973    if ($('#' + _cache.selectedData.lastPanel).hasClass('c-countrypicker-active-tab')) {
10974      _cache.$btnWrapper.show();
10975    } else {
10976      _cache.$btnWrapper.hide();
10977    }
10978    if (_cache.selectedData.homepagePath && _cache.$profilePanel.is(':visible')) {
10979      _cache.$profilePanel.addClass('c-tab-selected');
10980    }
10981    if (_cache.selectedData.homepagePath && _cache.$profilePanel.is(':visible') && _cache.selectedData.selectedPersona) {
10982      _cache.$privacyPanel.addClass('c-tab-selected');
10983    } else {
10984      _cache.$privacyPanel.removeClass('c-tab-selected');
10985    }
10986    if (_cache.selectedData.homepagePath && !_cache.$profilePanel.is(':visible')) {
10987      _cache.$privacyPanel.addClass('c-tab-selected');
10988    }
10989  }
10990  function _activateTab(tab) {
10991    $('a[href="#' + tab + '"]').trigger('click');
10992  }
10993  function _selectLastPanel() {
10994    if (_cache.$personas.length) {
10995      if (_cache.$privacyData.length) {
10996        _cache.selectedData.lastPanel = 'privacyPanel';
10997      } else {
10998        _cache.selectedData.lastPanel = 'profilePanel';
10999      }
11000    } else {
11001      _cache.$privacyData.length ? _cache.selectedData.lastPanel = 'privacyPanel' : (_cache.selectedData.lastPanel = 'countryPanel', _activateTab('selectCountry'));
11002    }
11003  }
11004  snro.countryPicker = {
11005    bindEvents: function bindEvents() {
11006      _cache.$activeItem.on('click', function (e) {
11007        var _self = $(e.currentTarget);
11008        _cache.$searchFieldItems.each(function () {
11009          var _that = $(this);
11010          if (_that.data('da-link_link-text').toLowerCase().replace(/ /g, '') === _self.text().toLowerCase().replace(/ /g, '')) {
11011            _that.click();
11012            return false;
11013          }
11014        });
11015      });
11016      _cache.$countrypicker.on('click', function (e) {
11017        var $container = $('.js-search-cont'),
11018            $clickedItem = $(e.target);
11019        // if the target of the click isn't the container nor a descendant of the container
11020        if (!$container.is($clickedItem) && $container.has($clickedItem).length === 0) {
11021          _closeAllLists();
11022          _cache.$searchInput.val(_cache.selectedData.languageandlocation);
11023          _cache.$selectCountryTabHeading.text(_cache.selectedData.languageandlocation);
11024        }
11025        //if user has clicked on the arrow icon
11026        if ($clickedItem.hasClass('icon-next')) {
11027          _inputClickCallBack();
11028        }
11029      });
11030      _cache.$searchInput.on('input', _inputCallback);
11031      _cache.$searchInput.on('click', _inputClickCallBack);
11032      _cache.$searchInput.on('keydown', function (e) {
11033        var x = document.getElementById(e.currentTarget.id + 'autocomplete-list');
11034        if (x) {
11035          x = x.getElementsByTagName('div');
11036        }
11037        if (e.keyCode === 40) {
11038          /*If the arrow DOWN key is pressed,
11039          increase the currentFocus variable:*/
11040          _cache.currentFocus++;
11041          /*and and make the current item more visible:*/
11042          _addActive(x, 'down');
11043        } else if (e.keyCode === 38) {
11044          //up
11045          /*If the arrow UP key is pressed,
11046          decrease the currentFocus variable:*/
11047          _cache.currentFocus--;
11048          /*and and make the current item more visible:*/
11049          _addActive(x, 'up');
11050        } else if (e.keyCode === 13) {
11051          /*If the ENTER key is pressed, prevent the form from being submitted,*/
11052          e.preventDefault();
11053          if (_cache.currentFocus > -1) {
11054            /*and simulate a click on the 'active' item:*/
11055            if (x) {
11056              x[_cache.currentFocus].click();
11057            }
11058          }
11059        }
11060      });
11061      _cache.$searchFieldItems.add(_cache.$defaultSearchSuggestion).on('click', function (e) {
11062        /*insert the value for the autocomplete text field:*/
11063        var $selectedItem = $(e.currentTarget);
11064
11065        $selectedItem.closest('.panel').addClass('c-tab-selected');
11066        var gdprData = {},
11067            personaData = [];
11068        _cache.$submitButton.addClass('x-btn-disabled');
11069        _cache.$searchInput.val(e.currentTarget.getElementsByTagName('input')[0].value);
11070        _cache.$selectCountryTabHeading.text(e.currentTarget.getElementsByTagName('input')[0].value);
11071
11072        _cache.redirectUrl = $selectedItem.data('redirectPath');
11073
11074        /*check if actual mouse click */
11075        if (e.originalEvent !== undefined) {
11076          _cache.$countryChangedFlag = true;
11077        }
11078
11079        _cache.selectedData.homepagePath = $selectedItem.data('channel');
11080        _cache.selectedData.selectedPersona = '';
11081        _cache.$personas = $selectedItem.find('.js-personaSelector');
11082        _cache.$privacyData = $selectedItem.find('.js-privacyData');
11083        _cache.exist = $selectedItem.data('exist');
11084        _cache.$activeItem.removeClass('hidden');
11085        _cache.$activeItem.html(_cache.$searchInput.val() + '<span class="x-checkmark"></span>');
11086        //hide global english option if selected item is global, to avoid showing it 2 times
11087        //if ($selectedItem.data('global'))
11088        if ($selectedItem.data('channel') == _cache.$searchFieldItems[0].dataset.channel) {
11089          $selectedItem.hide();
11090        } else {
11091          _cache.$searchFieldItems.show();
11092        }
11093        if (_cache.exist === false) {
11094          window.location.href = _cache.redirectUrl;
11095          return;
11096        }
11097        _cache.$personaSection.empty();
11098        _cache.$gdprSection.empty();
11099        if (_cache.$personas.length > 0) {
11100          _cache.$profilePanel.show();
11101          _cache.$selectProfileTabHeading.text('Select your profile');
11102          $.each(_cache.$personas, function (index, element) {
11103            var $element = $(element),
11104                personaItem = {};
11105            personaItem.personaName = $element.data('personaName');
11106            //personaItem.personaIcon = $element.data('personaIcon');
11107            personaItem.personaType = $element.data('personaType');
11108            personaData.push(personaItem);
11109          });
11110          var personaHtml = window.roche.templates['personaCountryPicker']({ 'personaData': personaData });
11111          _cache.$personaSection.html(personaHtml);
11112
11113          if (!_cache.$privacyData.length > 0) {
11114            // Persona available but no privacy            
11115            _cache.selectedData.lastPanel = 'profilePanel';
11116            _cache.$profilePanel.addClass('c-countrypicker-active-tab');
11117          }
11118        } else {
11119          _cache.$profilePanel.hide();
11120          _cache.$submitButton.removeClass('x-btn-disabled');
11121          _cache.$submitButton.removeAttr('disabled');
11122        }
11123        if (_cache.$privacyData.length > 0) {
11124          _cache.$privacyPanel.show();
11125          gdprData.gdprTitle = _cache.$privacyData.data('privacyGdprTitle');
11126          gdprData.gdprDescription = _cache.$privacyData.data('privacyGdprDescription');
11127          gdprData.GdprPrivacyLink = _cache.$privacyData.data('privacyGdprPrivacyLink');
11128          gdprData.GdprPrivacyText = _cache.$privacyData.data('privacyGdprPrivacyText');
11129          gdprData.GdprCookieLink = _cache.$privacyData.data('privacyGdprCookieLink');
11130          gdprData.GdprCookieText = _cache.$privacyData.data('privacyGdprCookieText');
11131          gdprData.GdprCopyrightText = _cache.$privacyData.data('privacyGdprCopyrightText');
11132
11133          var gdprHtml = window.roche.templates['gdprCountryPicker'](gdprData);
11134          _cache.$gdprSection.html(gdprHtml);
11135        } else {
11136          _cache.$privacyPanel.hide();
11137        }
11138
11139        snro.countryPicker.updateCache();
11140        /*close the list of autocompleted values, (or any other open lists of autocompleted values:*/
11141        _closeAllLists();
11142
11143        if (_cache.$personas.length) {
11144          _activateTab('selectProfile');
11145        } else {
11146          _activateTab('reviewPrivacyCookie');
11147        }
11148        _selectLastPanel();
11149      });
11150      _cache.$submitButton.on('click', function () {
11151        if (!_cache.$submitButton.hasClass('x-btn-disabled') && _cache.selectedData.selectedPersona !== undefined) {
11152          snro.commonUtils.setCookie('persona-type', _cache.selectedData.selectedPersona, Infinity);
11153          snro.commonUtils.setCookie('homePagePath', _cache.selectedData.homepagePath || 'global/en', Infinity);
11154          snro.commonUtils.setLocationAndLanguageCookie(_cache.selectedData.homepagePath && _cache.selectedData.homepagePath.replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
11155          snro.commonUtils.setCookie('DataPrivacy', 'yes', Infinity);
11156
11157          /* if(_cache.$countryChangedFlag){
11158             window.location.href = _cache.redirectUrl;
11159           }
11160           else if(!_cache.$countryChangedFlag){
11161             if (snro.commonUtils.queryParams('utm_source') || snro.commonUtils.queryParams('utm_medium') || snro.commonUtils.queryParams('utm_campaign')){
11162               _cache.redirectUrl += window.location.search;       
11163             }
11164             window.location.href = _cache.redirectUrl;
11165           }*/
11166          window.location.reload(true);
11167        } else if (_cache.selectedData.selectedPersona !== undefined && _cache.selectedData.selectedPersona !== '') {
11168          snro.commonUtils.setCookie('homePagePath', _cache.selectedData.homepagePath || 'global/en', Infinity);
11169          snro.commonUtils.setCookie('location-and-language', _cache.selectedData.homepagePath && _cache.selectedData.homepagePath.replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
11170          snro.commonUtils.setCookie('DataPrivacy', 'yes', Infinity);
11171
11172          /* if(_cache.$countryChangedFlag){
11173             window.location.href = _cache.redirectUrl;
11174           }
11175           else if(!_cache.$countryChangedFlag){
11176             if (snro.commonUtils.queryParams('utm_source') || snro.commonUtils.queryParams('utm_medium') || snro.commonUtils.queryParams('utm_campaign')){
11177               _cache.redirectUrl += window.location.search; 
11178             }
11179             window.location.href = _cache.redirectUrl;
11180           }*/
11181          window.location.reload(true);
11182        }
11183      });
11184      _cache.$tabPanelWrapper.on('shown.bs.collapse', function () {
11185        _selectOpenTab();
11186      });
11187      _cache.$mobileBackBtn.on('click', function () {
11188        _closeAllLists();
11189        _cache.$searchInput.val(_cache.selectedData.languageandlocation);
11190        _cache.$selectCountryTabHeading.text(_cache.selectedData.languageandlocation);
11191      });
11192    },
11193    updateCache: function updateCache() {
11194      _cache.$personaItems = $('.js-personaItems');
11195      _cache.selectedData.languageandlocation = _cache.$searchInput.val();
11196      if (_cache.$personaItems.length) {
11197        _cache.$personaItems.on('click', function (e) {
11198          var $selectedPersona = $(e.currentTarget);
11199          _cache.$personaItems.removeClass('active');
11200          $selectedPersona.addClass('active');
11201          $selectedPersona.closest('.panel').addClass('c-tab-selected');
11202          _cache.selectedData.selectedPersona = $selectedPersona.find('.js-persona-type').data('value').trim();
11203          _cache.selectedData.selectedPersonaText = $selectedPersona.find('.js-persona-type').text().trim();
11204          _cache.$selectProfileTabHeading.text('I am a ' + _cache.selectedData.selectedPersonaText);
11205          if (_cache.selectedData.selectedPersona && _cache.selectedData.languageandlocation && _cache.selectedData.homepagePath) {
11206            _cache.$submitButton.removeClass('x-btn-disabled');
11207            _cache.$submitButton.removeAttr('disabled');
11208          } else {
11209            _cache.$submitButton.addClass('x-btn-disabled');
11210            _cache.$submitButton.addAttr('disabled');
11211          }
11212          if (_cache.selectedData.lastPanel === 'privacyPanel') {
11213            _activateTab('reviewPrivacyCookie');
11214          }
11215        });
11216      } else {
11217        _selectLastPanel();
11218        if (_cache.selectedData.languageandlocation && _cache.selectedData.homepagePath) {
11219          _cache.$submitButton.removeClass('x-btn-disabled');
11220          _cache.$submitButton.removeAttr('disabled');
11221        } else {
11222          _cache.$submitButton.addClass('x-btn-disabled');
11223          _cache.$submitButton.addAttr('disabled');
11224        }
11225      }
11226    },
11227    selectDefaultCountry: function selectDefaultCountry(defaultCountry) {
11228      var countryFlag = false;
11229      var hasGlobal = false;
11230
11231      if (defaultCountry) {
11232        var _countryCode = defaultCountry.split('/')[0];
11233        var _authoredLanguage = $('.js-search__field__items[data-country-code="' + _countryCode.toLowerCase() + '"]').data('default-lang');
11234        //geolocated
11235        $.each(_cache.$searchFieldItems, function (index, element) {
11236          var $element = $(element);
11237          if ($element.data('channel').toLowerCase() === defaultCountry.toLowerCase()) {
11238            countryFlag = true;
11239            $element.click();
11240            return false;
11241          }
11242          if (_authoredLanguage && $element.data('channel').toLowerCase() === _countryCode.toLowerCase() + '/' + _authoredLanguage) {
11243            countryFlag = true;
11244            $element.click();
11245            return false;
11246          }
11247        });
11248      }
11249      $.each(_cache.$searchFieldItems, function (index, element) {
11250        var $element = $(element);
11251        if (!hasGlobal) {
11252          if ($element.data('channel').toLowerCase().trim() === 'global/en') {
11253            hasGlobal = true;
11254          }
11255        }
11256      });
11257      if (hasGlobal) {
11258        localStorage.setItem('hasGlobalList', true);
11259      } else {
11260        localStorage.setItem('hasGlobalList', false);
11261      }
11262      if (!countryFlag) {
11263        // not geolocated
11264        if (_cache.$searchFieldItems.first().data('country-code') === 'global') {
11265          // not geolocated and first item is 'global'
11266          _cache.$searchFieldItems.first().click();
11267        } else {
11268          // not geolocated and first item is not 'global'
11269          _cache.$countryPanel.addClass('c-countrypicker-active-tab');
11270        }
11271      }
11272    },
11273    initCache: function initCache() {
11274      _cache.$countrypicker = $('#countrypicker');
11275      _cache.$searchInput = $('.js-search__input');
11276      _cache.$activeItem = $('.js-activeItem');
11277      _cache.$searchFieldItems = $('.js-search__field__items');
11278      _cache.$searchFieldMobile = $('.c-search__mobile');
11279      _cache.$countryWrapper = $('.c-countrypicker__wrapper');
11280      _cache.$defaultSearchSuggestion = $('.js-defaultSearch');
11281      _cache.$searchList = $('.js-searchList');
11282      _cache.$gdprSection = $('.js-gdpr-section');
11283      _cache.$personaSection = $('.js-persona-selector');
11284      _cache.$submitButton = $('.js-btn-accept');
11285      _cache.$noresult = $('.js-noresult');
11286      _cache.selectedData = {};
11287      _cache.$tabPanel = $('.c-countrypicker__tab-wrapper .panel-collapse');
11288      _cache.$tabPanelWrapper = $('.c-countrypicker__tab-wrapper #accordion');
11289      _cache.$mobileBackBtn = $('.c-search__back-mobile .back_wrap');
11290      _cache.$selectCountryTabHeading = $('.c-countrypicker__tab-wrapper__select-country .c-search__heading');
11291      _cache.$selectProfileTabHeading = $('.c-countrypicker__tab-wrapper__select-profile .c-search__heading');
11292      _cache.$countryPanel = $('.c-countrypicker__tab-wrapper__select-country');
11293      _cache.$profilePanel = $('.c-countrypicker__tab-wrapper__select-profile');
11294      _cache.$privacyPanel = $('.c-countrypicker__tab-wrapper__review-privacy-cookie');
11295      _cache.$btnWrapper = $('.c-countrypicker__footer');
11296      _cache.$globalSiteBox = $('.js-global-site-box');
11297      _cache.$countryChangedFlag = false;
11298    },
11299    init: function init(defaultCountry) {
11300      if (snro.commonUtils.isMobileMode()) {
11301        $('body').addClass('x-no-scroll');
11302      }
11303      snro.countryPicker.initCache();
11304      snro.countryPicker.bindEvents();
11305      snro.countryPicker.selectDefaultCountry(defaultCountry);
11306    }
11307  };
11308})(window, window.jQuery, window.snro);
11309
11310/*
11311 * video.js
11312 * [ Behavior for video component ]
11313 *
11314 * @project:    SN-RO
11315 * @date:       2017-08-04
11316 * @author:     Aftab
11317 * @licensor:   SAPIENNITRO
11318 * @namespaces: snro
11319 */
11320
11321//this will cause the browser to check for errors more aggressively
11322'use strict';
11323/**
11324 * @namespace video
11325 * @memberof roche
11326 *
11327 */
11328
11329(function (window, $, snro) {
11330  // Define variables and functions for later use
11331  // DOM cache
11332  var _cache = {},
11333      videoTracking = void 0,
11334      exitsCrossButton = void 0,
11335      iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
11336  /**
11337   *
11338   * @param  $jPlayerCnt Player's container DIV to initialize against
11339   * @param videoPath Path of video to initialize with
11340   */
11341  function _initjPlayer($jPlayerCnt, videoPath, imagePath) {
11342    var defaultAltValues = ['rocheImage', 'rocheDiagnostics', 'PosterIamge', 'carouselImage'],
11343        linkHeader = void 0;
11344    linkHeader = $jPlayerCnt.find('.jp-heading-vid h5').text() || 'video';
11345
11346    $('body').find('img').each(function () {
11347      if (!$(this).attr('alt')) {
11348        $(this).attr('alt', defaultAltValues[Math.round(Math.random() * (defaultAltValues.length - 1))]);
11349      }
11350    });
11351    if ($jPlayerCnt.find('.jp-jplayer').attr('id')) {
11352      $jPlayerCnt.find('.jp-jplayer').jPlayer({
11353        ready: function ready() {
11354          $(this).jPlayer('setMedia', {
11355            m4v: videoPath,
11356            ogv: videoPath,
11357            webmv: videoPath,
11358            wav: videoPath,
11359            poster: imagePath
11360          });
11361          $(this).find('video').css('width', '100%').css('height', 'auto');
11362          $(this).find('img').css('position', 'absolute').css('opacity', '1').css('height', '100%');
11363          if (window.Granite) {
11364            $(this).find('img').attr('alt', window.Granite.I18n.get('rdoe_video.altText', null, localStorage.getItem('i18nhint')));
11365          } else {
11366            $(this).find('img').attr('alt', 'posterImage');
11367          }
11368          if (iOS) {
11369            $(this).jPlayer('play');
11370          }
11371        },
11372        ended: function ended() {
11373          $(this).jPlayer('setMedia', {
11374            m4v: videoPath,
11375            ogv: videoPath,
11376            webmv: videoPath,
11377            wav: videoPath,
11378            poster: imagePath
11379          });
11380          snro.commonUtils.log('Video ended');
11381          if ($jPlayerCnt.find('.jp-audio').hasClass('jp-state-full-screen') || $jPlayerCnt.hasClass('modal')) {
11382            $jPlayerCnt.find('.jp-interface').css('visibility', 'visible');
11383          } else {
11384            $jPlayerCnt.find('.jp-interface').css('visibility', 'hidden');
11385          }
11386          $(this).jPlayer('playHead', 0);
11387          $jPlayerCnt.find('.layer-opaque').css('visibility', 'visible');
11388          $jPlayerCnt.find('.video-info').css('display', 'block');
11389          $jPlayerCnt.find('img').css('position', 'absolute').css('display', 'inline').css('height', '100%');
11390        },
11391        play: function play() {
11392          $(this).jPlayer('pauseOthers');
11393          $(this).find('img').hide();
11394          //$jPlayerCnt.find('.jp-interface').css('visibility', 'visible');
11395        },
11396        pause: function pause() {
11397          $jPlayerCnt.find('.jp-video-ctrl.vid-play').removeClass('pause').addClass('play');
11398        },
11399        cssSelectorAncestor: '#' + $jPlayerCnt.find('.jp-audio').attr('id'),
11400        preload: 'auto',
11401        swfPath: 'http://jplayer.org/latest/dist/jplayer/jquery.jplayer.swf',
11402        supplied: 'm4v, ogv, webmv, wav',
11403        size: {
11404          width: '100%',
11405          height: '100%',
11406          cssClass: 'jp-video-360p'
11407        },
11408        keyBindings: {
11409          fullScreen: {
11410            key: 70, // f
11411            fn: function fn(f) {
11412              if (f.status.video || f.options.audioFullScreen) {
11413                f._setOption('fullScreen', false);
11414              }
11415            }
11416          }
11417        },
11418        useStateClassSkin: true,
11419        autoBlur: false,
11420        smoothPlayBar: true
11421      });
11422    }
11423
11424    $jPlayerCnt.bind($.jPlayer.event.seeked, function (event) {
11425      var seekedPercent = parseInt(event.jPlayer.status.currentPercentAbsolute);
11426      if (seekedPercent === 100) {
11427        $.extend(window.digitalData['link'], { event: 'video-completes', linkCategory: 'internal', linkSection: 'video', linkText: 'video-completes', linkHeader: linkHeader });
11428        snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11429        videoTracking['video-100%'] = 'fired';
11430      } else if (seekedPercent >= 75) {
11431        $.extend(window.digitalData['link'], { event: 'video-75%complete', linkCategory: 'internal', linkSection: 'video', linkText: 'video-75%complete', linkHeader: linkHeader });
11432        snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11433        videoTracking['video-75%'] = 'fired';
11434      } else if (seekedPercent >= 50 && seekedPercent < 75) {
11435        $.extend(window.digitalData['link'], { event: 'video-50%complete', linkCategory: 'internal', linkSection: 'video', linkText: 'video-50%complete', linkHeader: linkHeader });
11436        snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11437        videoTracking['video-50%'] = 'fired';
11438      } else if (seekedPercent >= 25 && seekedPercent < 50) {
11439        $.extend(window.digitalData['link'], { event: 'video-25%complete', linkCategory: 'internal', linkSection: 'video', linkText: 'video-25%complete', linkHeader: linkHeader });
11440        snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11441        videoTracking['video-25%'] = 'fired';
11442      } else {
11443        // do nothing
11444      }
11445    });
11446
11447    $jPlayerCnt.find('.jp-jplayer').bind($.jPlayer.event.timeupdate, function (event) {
11448      //as above, grabbing the % location and media being played
11449      var playerTime = event.jPlayer.status.currentPercentAbsolute,
11450          duration = event.jPlayer.status.duration;
11451      if (duration <= 25) {
11452        if (playerTime >= 2 && playerTime < 3) {
11453          $.extend(window.digitalData['link'], { event: 'video-play', linkCategory: 'internal', linkSection: 'video', linkText: 'video-play', linkHeader: linkHeader });
11454        } else if (playerTime >= 99 && playerTime <= 100 && !videoTracking['video-100%']) {
11455          $.extend(window.digitalData['link'], { event: 'video-completes', linkCategory: 'internal', linkSection: 'video', linkText: 'video-completes', linkHeader: linkHeader });
11456          snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11457          videoTracking['video-100%'] = 'fired';
11458        }
11459      } else if (duration > 25) {
11460        if (playerTime >= 2 && playerTime < 3) {
11461          $.extend(window.digitalData['link'], { event: 'video-play', linkCategory: 'internal', linkSection: 'video', linkText: 'video-play', linkHeader: linkHeader });
11462        } else if (playerTime >= 25 && playerTime < 26 && !videoTracking['video-25%']) {
11463          $.extend(window.digitalData['link'], { event: 'video-25%complete', linkCategory: 'internal', linkSection: 'video', linkText: 'video-25%complete', linkHeader: linkHeader });
11464          snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11465          videoTracking['video-25%'] = 'fired';
11466        } else if (playerTime >= 50 && playerTime < 51 && !videoTracking['video-50%']) {
11467          $.extend(window.digitalData['link'], { event: 'video-50%complete', linkCategory: 'internal', linkSection: 'video', linkText: 'video-50%complete', linkHeader: linkHeader });
11468          snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11469          videoTracking['video-50%'] = 'fired';
11470        } else if (playerTime >= 75 && playerTime < 76 && !videoTracking['video-75%']) {
11471          $.extend(window.digitalData['link'], { event: 'video-75%complete', linkCategory: 'internal', linkSection: 'video', linkText: 'video-75%complete', linkHeader: linkHeader });
11472          snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11473          videoTracking['video-75%'] = 'fired';
11474        } else if (playerTime >= 99 && playerTime < 100 && !videoTracking['video-100%']) {
11475          $.extend(window.digitalData['link'], { event: 'video-completes', linkCategory: 'internal', linkSection: 'video', linkText: 'video-completes', linkHeader: linkHeader });
11476          snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11477          videoTracking['video-100%'] = 'fired';
11478        }
11479      }
11480      //There's some overlap between the seeked and stopped events. When a user clicks
11481      // the stop button it actually sends a "seek" to the 0 location. So if the seeked location is 0
11482      // then we track it as a stop, if it's greater than 0, it was an actual seek.
11483    });
11484  }
11485
11486  /**
11487   *
11488   * @param $jPlayerCnt Player's container
11489   * @param $jPlayer Player instance
11490   * @param $volCtrlBtn Player's volume control button
11491   */
11492
11493  function _initjPlayerVolSlider($jPlayerCnt, $jPlayer, $volCtrlBtn) {
11494    $jPlayerCnt.find('input[type="range"]').rangeslider({
11495      polyfill: false,
11496      onSlide: function onSlide(position, value) {
11497        if ($('input[type="range"]').parents('.slick-active').length) {
11498          $(this)[0].update(false, false);
11499        }
11500        $jPlayer.jPlayer('volume', value / 100);
11501        if (0 === value && !$volCtrlBtn.hasClass('mute')) {
11502          $volCtrlBtn.addClass('mute');
11503        } else if ($volCtrlBtn.hasClass('mute')) {
11504          $volCtrlBtn.removeClass('mute');
11505        }
11506      }
11507    });
11508  }
11509  /**
11510   *
11511   * @param $currjPlayer jPlayer's instance
11512   * @param $playBtn jPlayer's Play/Pause button
11513   */
11514  function _attachPlayPauseListener($currjPlayer, $playBtn) {
11515    $playBtn.on('click', function (e, callback) {
11516      $currjPlayer.jPlayer('pauseOthers');
11517      if (!$currjPlayer.data().jPlayer.status.paused) {
11518        $currjPlayer.jPlayer('pause');
11519        $playBtn.removeClass('pause').addClass('play');
11520        $('.vol-ctrl').addClass('mute');
11521        $.extend(window.digitalData['link'], { event: 'video-pause', linkText: 'video-pause' });
11522      } else {
11523        var timer = 100;
11524        if (!$currjPlayer.closest('.js-event-item').hasClass('slick-center')) {
11525          timer = 500;
11526        }
11527        if (iOS) {
11528          $currjPlayer.jPlayer('play');
11529          $playBtn.removeClass('play').addClass('pause');
11530          $('.vol-ctrl').addClass('mute');
11531          $playBtn.siblings('.vol-ctrl').trigger('click');
11532        }
11533        window.setTimeout(function () {
11534          if (!iOS) {
11535            $currjPlayer.jPlayer('play');
11536            $playBtn.removeClass('play').addClass('pause');
11537            $('.vol-ctrl').addClass('mute');
11538            $playBtn.siblings('.vol-ctrl').trigger('click');
11539          }
11540          var carouselContainer = $currjPlayer.parents('.js-carousel-content')[0];
11541          $(carouselContainer).slick('slickPause');
11542          $.extend(window.digitalData['link'], { event: 'video-play', linkText: 'video-play' });
11543          if (callback) {
11544            callback();
11545          }
11546        }, timer);
11547      }
11548      if (!e.isTrigger) {
11549        snro.analytics.trackEvent(window.digitalData, 'video-tracking');
11550      }
11551    });
11552  }
11553  /**
11554   *
11555   * @param $currjPlayer jPlayer's instance
11556   * @param $fullScrBtn jPlayer's full-screen button
11557   */
11558  function _attachFullScrListener($currjPlayer, $fullScrBtn, $playBtn) {
11559    $fullScrBtn.on('click touchstart', function () {
11560      _fullscreenClick($currjPlayer, $fullScrBtn, $playBtn);
11561    });
11562  }
11563
11564  function _fullscreenClick($currjPlayer, $fullScrBtn, $playBtn) {
11565    if (!iOS) {
11566      $currjPlayer.parent().find('.j-cross-button').toggleClass('show');
11567    }
11568    if (!$currjPlayer.parent().hasClass('jp-video-full') && $('.js-carousel-content').length) {
11569      for (var i = 0; i < $('.js-carousel-content').length; i++) {
11570        $('.js-carousel-content')[i].slick.refresh();
11571      }
11572      if ($currjPlayer.parent().hasClass('jp-state-playing') && $currjPlayer.attr('id') !== 'jplayer_modal') {
11573        $currjPlayer.jPlayer('pause');
11574        var intervalTimer = setTimeout(function () {
11575          $playBtn.removeClass('play').addClass('pause');
11576          clearTimeout(intervalTimer);
11577        }, 1000);
11578      }
11579    }
11580  }
11581  /**
11582   *
11583   * @param  $currjPlayer jPlayer's instance
11584   * @param  $volCtrlBtn jPlayer's full-screen button
11585   */
11586  function _attachVolListener($currjPlayer, $volCtrlBtn) {
11587    $volCtrlBtn.on('click', function () {
11588      if ($volCtrlBtn.siblings('.vid-play').hasClass('pause')) {
11589        if ($volCtrlBtn.hasClass('mute')) {
11590          $volCtrlBtn.removeClass('mute');
11591          $currjPlayer.jPlayer('volume', 50 / 100);
11592          $currjPlayer.parent().find('.rangeslider__handle').css('left', '50%');
11593          $currjPlayer.parent().find('.rangeslider__fill').css('width', '50%');
11594        } else {
11595          $volCtrlBtn.addClass('mute');
11596          $currjPlayer.jPlayer('volume', 0);
11597          $currjPlayer.parent().find('.rangeslider__handle').css('left', 0);
11598          $currjPlayer.parent().find('.rangeslider__fill').css('width', 0);
11599        }
11600      } else {
11601        $volCtrlBtn.addClass('mute');
11602        $currjPlayer.jPlayer('volume', 0);
11603        $currjPlayer.parent().find('.rangeslider__handle').css('left', 0);
11604        $currjPlayer.parent().find('.rangeslider__fill').css('width', 0);
11605      }
11606    });
11607  }
11608
11609  /**
11610   *
11611   * @param  $currjPlayer jPlayer's instance
11612   * @param  $volCtrlBtn jPlayer's full-screen button
11613   */
11614  function _attachClickListener($currjPlayer, $crossButton) {
11615
11616    $crossButton.on('click', function (e) {
11617      exitsCrossButton = true;
11618      if (document.exitFullscreen) {
11619        document.exitFullscreen();
11620      } else if (document.msExitFullscreen) {
11621        document.msExitFullscreen();
11622      } else if (document.mozCancelFullScreen) {
11623        document.mozCancelFullScreen();
11624      } else if (document.webkitCancelFullScreen) {
11625        document.webkitCancelFullScreen();
11626      }
11627      $currjPlayer.parent().removeClass('jp-state-full-screen jp-video-full');
11628      $currjPlayer.css('width', '100%').css('height', 'auto');
11629      $currjPlayer.find('video').css('width', '100%').css('height', 'auto');
11630      $currjPlayer.parent().addClass('jp-video-360p');
11631      $(e.currentTarget).removeClass('show');
11632      if ($('.js-carousel-content').length && $currjPlayer.parents().hasClass('slick-active')) {
11633        for (var i = 0; i < $('.js-carousel-content').length; i++) {
11634          $('.js-carousel-content')[i].slick.refresh();
11635        }
11636      }
11637    });
11638  }
11639
11640  function onFullScreenChange() {
11641    var fullScreenElement = document.fullscreenElement || document.msFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;
11642    if (!fullScreenElement) {
11643      $('.j-cross-button').removeClass('show');
11644      var $currjPlayer = $('.js-carousel-content').find('.slick-current .jp-video-full');
11645      if ($currjPlayer.hasClass('jp-video-full') && $currjPlayer.parents().hasClass('js-carousel-content') && $('.js-carousel-content').length && !exitsCrossButton) {
11646        $currjPlayer.removeClass('jp-video-full');
11647        /*let index =$currjPlayer.parents('.slick-current').data('slide-index');
11648        let intervalTimer = setTimeout(function() {
11649          $currjPlayer.parents('.js-carousel-content').slick('slickGoTo', index);
11650          clearTimeout(intervalTimer);
11651        }, 500);*/
11652        $currjPlayer.find('.gui').css('display', 'block');
11653        $currjPlayer.find('.jp-jplayer').removeAttr('full');
11654      }
11655    } else {
11656      exitsCrossButton = false;
11657    }
11658  }
11659  document.onfullscreenchange = onFullScreenChange;
11660  document.onmsfullscreenchange = onFullScreenChange;
11661  document.onmozfullscreenchange = onFullScreenChange;
11662  document.onwebkitfullscreenchange = onFullScreenChange;
11663
11664  // Register behavior against video namespace
11665  snro = window.snro = snro || {};
11666  snro.video = {
11667    moduleName: 'video',
11668    // Cache DOM refs and other dynamic data for re-use
11669    _cacheRefs: function _cacheRefs() {
11670      _cache.$heroBannerCnt = $('.c-video'); //
11671    },
11672
11673
11674    // Attach listeners to interesting events
11675    _initPlayers: function _initPlayers() {
11676      _cache.$heroBannerCnt.each(function (i, currjPlayerCnt) {
11677        var $currjPlayerCnt = $(currjPlayerCnt);
11678        var $currjPlayer = $currjPlayerCnt.find('.jp-jplayer');
11679        var $videoPlayBtn = $currjPlayerCnt.find('.jp-video-play');
11680        var $playBtn = $currjPlayerCnt.find('.vid-play');
11681        var $fullScrBtn = $currjPlayerCnt.find('.jp-full-screen');
11682        var $volCtrlBtn = $currjPlayerCnt.find('.vol-ctrl');
11683        var videoPath = $currjPlayer.data('fileref');
11684        var imagePath = $currjPlayer.data('posterref');
11685        var $crossButton = $currjPlayerCnt.find('.j-cross-button');
11686        $($currjPlayerCnt).find('#jquery_jplayer_').attr('id', 'jquery_jplayer_' + i + i);
11687        $($currjPlayerCnt).find('#jp_container_').attr('id', 'jp_container_' + i + i);
11688        if ($($currjPlayerCnt).parents().hasClass('js-carousel-content')) {
11689          $($currjPlayerCnt).find('.jp-jplayer').attr('id', 'jquery_jplayer_' + i + i + i);
11690          $($currjPlayerCnt).find('.jp-audio').attr('id', 'jp_container_' + i + i + i);
11691        }
11692
11693        // Initialize jPlayer
11694        _initjPlayer($currjPlayerCnt, videoPath, imagePath);
11695        // Initialize rangeslider for jPlayer
11696        _initjPlayerVolSlider($currjPlayerCnt, $currjPlayer, $volCtrlBtn);
11697        // Play/Pause
11698        _attachPlayPauseListener($currjPlayer, $playBtn);
11699        // Full-screen
11700        _attachFullScrListener($currjPlayer, $fullScrBtn, $playBtn);
11701        // Volume control
11702        _attachVolListener($currjPlayer, $volCtrlBtn);
11703
11704        if (iOS) {
11705          var btn = $currjPlayerCnt.find('.jp-video-play');
11706          var overlayOption = $(btn).data('overlayOption');
11707          $currjPlayer.jPlayer({
11708            preload: 'auto'
11709          });
11710          $currjPlayer.jPlayer('load');
11711          if (overlayOption === 'fullscreen') {
11712            try {
11713              if (!$currjPlayer.parent().hasClass('jp-video-full')) {
11714                $currjPlayer.bind($.jPlayer.event.play, function () {
11715                  var self = this;
11716                  if (!$(self).attr('full')) {
11717                    window.setTimeout(function () {
11718                      $(self).parent().find('.jp-full-screen').click();
11719                      $(self).jPlayer('play');
11720                      $(self).attr('full', 'fullscreen');
11721                    }, 200);
11722                  } else {
11723                    $(self).removeAttr('full');
11724                  }
11725                });
11726              }
11727            } catch (err) {
11728              console.log(err);
11729            }
11730          }
11731        }
11732
11733        // Prepare big "play" button for first load
11734        $videoPlayBtn.on('click', function (e) {
11735          var videoSrcPath = $currjPlayer.data('fileref');
11736          var videoElement = document.getElementsByTagName("video");
11737          for (var i = 0; i < videoElement.length; i++) {
11738            if (videoElement[i].src.includes(videoSrcPath)) {
11739              if (!isNaN(videoElement[i].duration) && videoElement[i].duration != undefined) {
11740                var total_secval = Math.round(videoElement[i].duration);
11741                if (window.digitalData.video) {
11742                  window.digitalData.video.videoLength = total_secval;
11743                }
11744              }
11745            }
11746          }
11747          if (!snro.commonUtils.isMobileMode()) {
11748            var $currentPlayBtn = $(e.currentTarget);
11749            var _overlayOption = $currentPlayBtn.data('overlayOption');
11750            if (_overlayOption === 'overlayM' || _overlayOption === 'overlayL') {
11751              $currjPlayerCnt = $('#videoPlayerModal');
11752              $currjPlayer = $currjPlayerCnt.find('.jp-jplayer');
11753              $currjPlayer.jPlayer('destroy');
11754              $volCtrlBtn = $currjPlayerCnt.find('.vol-ctrl');
11755              $playBtn = $currjPlayerCnt.find('.js-vid-play');
11756              $fullScrBtn = $currjPlayerCnt.find('.jp-full-screen');
11757              $crossButton = $currjPlayerCnt.find('.j-cross-button');
11758              var overlayVideoPath = $currentPlayBtn.data('fileref');
11759              var overlayImagePath = $currentPlayBtn.data('posterref');
11760              // Initialize jPlayer
11761              _initjPlayer($currjPlayerCnt, overlayVideoPath, overlayImagePath);
11762
11763              // Initialize rangeslider for jPlayer
11764              _initjPlayerVolSlider($currjPlayerCnt, $currjPlayer, $volCtrlBtn);
11765              // Play/Pause
11766              _attachPlayPauseListener($currjPlayer, $playBtn);
11767              // Full-screen
11768              _attachFullScrListener($currjPlayer, $fullScrBtn, $playBtn);
11769              // Volume control
11770              _attachVolListener($currjPlayer, $volCtrlBtn);
11771            }
11772            var timer = 500,
11773                $currentTarget = $(e.currentTarget);
11774            if ($currentTarget.closest('.js-event-item').hasClass('slick-center')) {
11775              // play video immediately if carousel item is already in center
11776              timer = 0;
11777            }
11778            if ($currentTarget.closest('.js-carousel').data('carouselVariation') === 'bigImage') {
11779              // for bigImage variation set timer for animation to complete
11780              timer = 200;
11781            }
11782            switch (_overlayOption) {
11783              case 'overlayM':
11784                $currjPlayerCnt.find('.modal-dialog').removeClass('model-dialog-L').addClass('model-dialog-M');
11785                window.setTimeout(function () {
11786                  $currjPlayerCnt.modal('show');
11787                }, timer);
11788                break;
11789              case 'overlayL':
11790                $currjPlayerCnt.find('.modal-dialog').removeClass('model-dialog-M').addClass('model-dialog-L');
11791                window.setTimeout(function () {
11792                  $currjPlayerCnt.modal('show');
11793                }, timer);
11794                break;
11795              case 'fullscreen':
11796                $currjPlayerCnt.find('.modal-dialog').removeClass('model-dialog-M model-dialog-L');
11797                window.setTimeout(function () {
11798                  if (!iOS) {
11799                    $fullScrBtn.click();
11800                  }
11801                }, timer);
11802            }
11803          }
11804          videoTracking = {
11805            'video-25%': '',
11806            'video-50%': '',
11807            'video-75%': '',
11808            'video-100%': ''
11809          };
11810          function playBtnCallback() {
11811            $currjPlayerCnt.find('.jp-interface').css('visibility', 'visible');
11812            $currjPlayerCnt.find('.layer-opaque').css('visibility', 'hidden');
11813            $currjPlayerCnt.find('.video-info').css('display', 'none');
11814          }
11815          $playBtn.trigger('click', playBtnCallback);
11816        });
11817        _attachClickListener($currjPlayer, $crossButton);
11818        //_addKeyUpListner();
11819        $currjPlayer.jPlayer('volume', 0);
11820        $currjPlayerCnt.find('.rangeslider__handle').css('left', 0);
11821        $currjPlayerCnt.find('.rangeslider__fill').css('width', '0');
11822        $volCtrlBtn.addClass('mute');
11823      });
11824    },
11825    _bindOverlayEvents: function _bindOverlayEvents() {
11826      $('#videoPlayerModal').on('hidden.bs.modal', function () {
11827        $('#videoPlayerModal').find('.jp-jplayer').jPlayer('stop');
11828      });
11829    },
11830
11831    // Module initialization
11832    init: function init() {
11833      this._cacheRefs();
11834      this._initPlayers();
11835      this._bindOverlayEvents();
11836    }
11837  };
11838})(window, window.jQuery, window.snro);
11839
11840/*!
11841* c_countrySelectorCmp.js
11842
11843* This file contains utility functions for countrySelectorCmp
11844*
11845* @project   SapientNitro Roche Diagonostics
11846* @date      2017-08-4
11847* @author    Amit
11848* @dependencies jQuery, CSSMaps
11849*/
11850
11851'use strict';
11852
11853/**
11854 * @namespace countrySelectorCmp
11855 * @memberof snro
11856 * @property {null} property - description of property
11857 */
11858
11859(function (window, $, snro) {
11860  snro = window.snro = snro || {};
11861  var cookie_value = void 0,
11862      basePagePath = void 0,
11863      domElements = {
11864    currentPagePath: $('input[name=currentPagepath]'),
11865    countryPickerLink: $('.js-link-country'),
11866    currentChannel: $('input[name=currentChannel]'),
11867    mapsApiKey: $('input[name=mapsApiKey]').val(),
11868    dataPrivacyNode: $('input[name=dataPrivacy]'),
11869    pageType: $('meta[name="page-type"]').length ? $('meta[name="page-type"]').attr('content') : 'otherPage',
11870    rightContainer: $('.js-country-right-container')
11871  },
11872      continentClassMap = {
11873    c1: 'af',
11874    c2: 'as',
11875    c3: 'oc',
11876    c4: 'eu',
11877    c5: 'na',
11878    c6: 'sa'
11879  },
11880
11881  /*_mobileAccordian = function _mobileAccordian(e){
11882    let id = e.target.id.replace('js-', '');
11883    if (snro.commonUtils.isMobileMode()) {
11884      domElements.continentSelector.parents('ul').find('ul').slideUp();
11885      $('ul#'+id).slideDown();
11886    }else{
11887      domElements.countryList.hide();
11888      $('ul#'+id).show();
11889    }
11890    _showGlobalMap(id);
11891  },*/
11892  _mobileHtml = function _mobileHtml() {
11893    if (snro.commonUtils.isMobileMode()) {
11894      $('.c-countryselector__continent-list>li').each(function () {
11895        var cLId = $(this).children('a').attr('id');
11896        var cid = cLId.split('-')[1];
11897        console.log(cid);
11898        $('#' + cid).detach().appendTo($(this));
11899      });
11900      if (domElements.continentSelector.hasClass('active')) {
11901        $('.js-continent-selector').removeClass('up');
11902        $('.js-continent-selector.active').addClass('up');
11903      }
11904      domElements.rightContainer.hide();
11905    }
11906  },
11907      _changeView = function _changeView() {
11908    _mobileHtml();
11909    if (!snro.commonUtils.isMobileMode()) {
11910      if ($('.js-country-right-container ul.js-country-list').length == 0) {
11911        $('.c-countryselector__continent-list li ul.js-country-list').each(function () {
11912          $(this).detach().appendTo($('.js-country-list-innerwrap'));
11913        });
11914      } else {
11915        $('.c-countryselector__continent-list li ul.js-country-list').remove();
11916      }
11917      if (domElements.continentSelector.hasClass('active')) {
11918        $('.js-continent-selector.active').click();
11919      }
11920      domElements.rightContainer.show();
11921    }
11922  },
11923      _showGlobalMap = function _showGlobalMap(id) {
11924    domElements.continentList = $('.continents.cssmap li');
11925    var continectObject = Object.keys(continentClassMap).map(function (itm) {
11926      return continentClassMap[itm];
11927    });
11928    if (continectObject.indexOf(id) == -1) {
11929      domElements.continentList.removeClass('active-region').parent().addClass('globalMap');
11930    } else {
11931      domElements.continentList.parent().removeClass('globalMap');
11932      $('[data-target]').removeClass('active-region');
11933      $('[data-target=js-' + id + ']').addClass('active-region');
11934
11935      if (!$('[data-target=js-' + id + ']').hasClass('active-region')) {
11936        $('[data-target=js-' + id + '] span')[0].click();
11937      }
11938    }
11939  },
11940      _showCountries = function _showCountries(e) {
11941    domElements.continentList.removeClass('focus');
11942    domElements.countryList.hide();
11943    var elementId = continentClassMap[e[0].className.split(' ')[0]];
11944    $('#' + elementId).hide().show();
11945    domElements.continentSelector.removeClass('active');
11946    $('#js-' + elementId).addClass('active');
11947    $('[data-target=js-' + elementId + ']').addClass('active-region');
11948  },
11949      _toggleCountryList = function _toggleCountryList() {
11950    domElements.countryList.hide();
11951    var continentUl = $('a[data-country-code=country-' + snro.countrySelectorCmp.countryCode.toLowerCase() + ']').parents('ul');
11952    var elementId = continentUl.length && continentUl[0].id || $('#na').length && 'na' || domElements.countryList.length && domElements.countryList[0].id;
11953    domElements.confirmBox.hide();
11954    domElements.globalSiteBox.show();
11955    if (localStorage.getItem('hasGlobalList') === 'false') {
11956      domElements.globalSiteBox.hide();
11957    }
11958    $('#' + elementId).hide().show();
11959    domElements.continentSelector.removeClass('active');
11960    $('#js-' + elementId).addClass('active');
11961    //$('[data-target=js-' + elementId + ']').addClass('active-region');
11962    _showGlobalMap(elementId);
11963  },
11964      _showInitialSelection = function _showInitialSelection() {
11965    var country = $('a[data-country-code=country-' + snro.countrySelectorCmp.countryCode.toLowerCase() + '][data-language=' + snro.countrySelectorCmp.language.toLowerCase() + ']');
11966    if (cookie_value) {
11967      var currentCountry = $('a[data-country-code=country-' + cookie_value.split('|')[0] + '][data-language=' + cookie_value.split('|')[1] + ']');
11968      domElements.currentCountryText.text(currentCountry && domElements.currentCountryText.data('translatedText').replace('{0}', currentCountry.data('countryName')) || '');
11969      domElements.currentCountryText.toggle(snro.countrySelectorCmp.reselectionInitiated);
11970      //domElements.countryLanguageSelection.removeClass('active');
11971      //currentCountry.addClass('active');
11972      snro.countrySelectorCmp.countryCode = cookie_value.split('|')[0].toLowerCase();
11973      snro.countrySelectorCmp.language = cookie_value.split('|')[1].toLowerCase();
11974    }
11975
11976    /* TODO: Include below code back when personalization has been fully implemented for deep links
11977      let samePage = domElements.currentPagePath.val() && domElements.currentPagePath.val().indexOf(basePagePath.split('/').slice(0,5).join('/'))>-1
11978      if (cookie_value && !samePage) {
11979      country = $('a[data-country-code=country-'+ cookie_value.split('|')[0].toLowerCase()+'][data-language='+cookie_value.split('|')[1].toLowerCase()+']');
11980      domElements.countryText
11981      .text(
11982        domElements.countryText
11983        .data('existing-cookie-string') &&
11984        domElements.countryText
11985        .data('existing-cookie-string')
11986        .replace('{0}', country.data('countryName'))
11987        .replace('{1}', country.data('languageText'))
11988        .replace('{2}', window.Granite.I18n.get('rdoe_personapicker.' + snro.commonUtils.getCookie('persona-type'),null,localStorage.getItem('i18nhint'))));
11989      domElements.confirmBox.show();
11990      domElements.globalSiteBox.hide();
11991      domElements.countryList.hide().css('visibility', 'hidden');
11992      snro.countrySelectorCmp.countryCode = cookie_value.split('|')[0].toLowerCase();
11993      return;
11994    } else */
11995    if (snro.countrySelectorCmp.locationDetected && country.length && !snro.countrySelectorCmp.reselectionInitiated) {
11996      domElements.countryText.text(domElements.countryText.data('preselection-string') && domElements.countryText.data('preselection-string').replace('{0}', country.data('countryName')));
11997      snro.countrySelectorCmp.language = (navigator.language || navigator.browserLanguage).split('-')[0].toLowerCase();
11998      domElements.confirmBox.show();
11999      domElements.globalSiteBox.hide();
12000      domElements.countryList.hide().css('visibility', 'hidden');
12001      return;
12002    }
12003    _toggleCountryList();
12004  },
12005      proceedWithDefaultSelection = function proceedWithDefaultSelection() {
12006    $('.js-country-language-selection[data-country-code=country-' + snro.countrySelectorCmp.countryCode.toLowerCase() + '][data-language=' + snro.countrySelectorCmp.language.toLowerCase() + ']').click();
12007  },
12008      _bindEvents = function _bindEvents() {
12009    // eslint-disable-next-line new-cap
12010    domElements.mapsContainer.CSSMap({
12011      'size': 540,
12012      'tooltips': 'floating-top-center',
12013      'responsive': 'auto',
12014      'tapOnce': true,
12015      'onClick': _showCountries,
12016      'onLoad': function onLoad() {
12017        var continentUl = $('a[data-country-code=country-' + snro.countrySelectorCmp.countryCode.toLowerCase() + ']').parents('ul'),
12018            elementId = continentUl.length && continentUl[0].id || $('#na').length && 'na' || domElements.countryList.length && domElements.countryList[0].id;
12019        domElements.continentList = $('.continents.cssmap li');
12020        $('[data-target]').removeClass('active-region');
12021        $('[data-target=js-' + elementId + ']').addClass('active-region');
12022        $('a[data-country-code=country-' + snro.countrySelectorCmp.countryCode.toLowerCase() + '][data-language=' + snro.countrySelectorCmp.language.toLowerCase() + ']').addClass('active');
12023        window.location.hash = '';
12024        //call to mobile html > 768 viewport
12025        _mobileHtml();
12026        if (!$('.js-country-list:visible').length) {
12027          $('[data-target=js-' + elementId + '] span')[0].click();
12028        }
12029        _showGlobalMap(elementId);
12030      }
12031    });
12032    domElements.continentSelector.on('click', function (e) {
12033      var id = e.target.id.replace('js-', '');
12034      domElements.continentSelector.removeClass('active');
12035      $(this).addClass('active');
12036      if (snro.commonUtils.isMobileMode()) {
12037        if ($(this).next().is(':visible')) {
12038          domElements.continentList.parents('ul').find('ul').slideUp();
12039          $(this).next().slideUp();
12040          $(this).removeClass('up');
12041        } else {
12042          $(this).parent('li').siblings().children('ul').slideUp();
12043          $(this).next().slideDown();
12044          $(this).parent('li').siblings().children('a').removeClass('up');
12045          $(this).addClass('up');
12046        }
12047      } else {
12048        domElements.countryList.hide();
12049        $('ul#' + id).show();
12050      }
12051      _showGlobalMap(id);
12052    });
12053    domElements.preselectionConfirm.on('click', proceedWithDefaultSelection);
12054    domElements.preselectionDeny.on('click', function () {
12055      domElements.countryList.css('visibility', 'visible');
12056      _toggleCountryList();
12057    });
12058    domElements.countryLanguageSelection.on('click', function () {
12059      var checkCookie = snro.commonUtils.getCookie('DataPrivacy');
12060      if (!$('input[name=dataPrivacy]').length || checkCookie) {
12061        snro.commonUtils.setLocationAndLanguageCookie($(this).data('countryCode').replace('country-', '') + '|' + $(this).data('language'), Infinity, '/', '.roche.com');
12062        snro.commonUtils.setCookie('homePagePath', $(this).data('channel'), Infinity);
12063      }
12064      if ($(this).data('href') !== domElements.currentPagePath.val() || !snro.countrySelectorCmp.reselectionInitiated) {
12065        snro.commonUtils.removeCookie('persona-type');
12066        snro.commonUtils.removeCookie('loginNotificationDisclaimer');
12067        var dataPrivacyCookie = snro.commonUtils.getCookie('DataPrivacy');
12068        if (!$('input[name=dataPrivacy]').length) {
12069          window.location.href = $(this).data('href');
12070        } else if ($('input[name=dataPrivacy]').length && !dataPrivacyCookie) {
12071          window.location.href = $(this).data('href') + '?countryCode=true';
12072        } else if ($('input[name=dataPrivacy]').length && dataPrivacyCookie) {
12073          window.location.href = $(this).data('href');
12074        }
12075        return;
12076      }
12077      snro.countrySelectorCmp.countrySelectorPassed = true;
12078      snro.personaPickerComp.init();
12079    });
12080    domElements.crossIconContainer.parent().toggle(snro.countrySelectorCmp.reselectionInitiated);
12081    if (!snro.countrySelectorCmp.reselectionInitiated) {
12082      domElements.crossIconContainer.parent().next('.x-liipbox__text').addClass('first-visit');
12083    } else {
12084      domElements.crossIconContainer.parent().next('.x-liipbox__text').removeClass('first-visit');
12085    }
12086    //on window resize change the html as per viewport
12087    $(window).resize(function () {
12088      _changeView();
12089    });
12090  },
12091      _getPageMarkup = function _getPageMarkup() {
12092    var url = void 0;
12093    if ($('.js-link-country').length) {
12094      if (snro.countrySelectorCmp.reselectionInitiated) {
12095        url = domElements.countryPickerLink.data('url') && snro.countrySelectorCmp.language && domElements.countryPickerLink.data('url').replace('.html', '.' + snro.countrySelectorCmp.language + '.html') || domElements.countryPickerLink.data('url');
12096      } else {
12097        url = domElements.countryPickerLink.data('countrypickerUrl') && snro.countrySelectorCmp.language && domElements.countryPickerLink.data('countrypickerUrl').replace('.html', '.' + snro.countrySelectorCmp.language + '.html') || domElements.countryPickerLink.data('countrypickerUrl');
12098      }
12099      var options = {
12100        url: url,
12101        type: 'GET',
12102        dataType: 'html',
12103        cache: true
12104      };
12105      snro.ajaxWrapper.getXhrObj(options).done(function (data, status, jqXHR) {
12106        if (snro.commonUtils.getCookie('wcmmode') !== 'preview') {
12107          snro.liipboxComp._liipboxOpen(data);
12108        }
12109        if (snro.countrySelectorCmp.reselectionInitiated) {
12110          domElements.countryList = $('.js-country-list');
12111          domElements.continentSelector = $('.js-continent-selector');
12112          domElements.confirmBox = $('.js-confirm-box');
12113          domElements.globalSiteBox = $('.js-global-site-box');
12114          domElements.countryText = $('#js-country-text');
12115          domElements.mapsContainer = $('#map-continents');
12116          domElements.preselectionConfirm = $('.js-preselection-yes');
12117          domElements.preselectionDeny = $('.js-preselection-no');
12118          domElements.countryLanguageSelection = $('.js-country-language-selection');
12119          domElements.crossIconContainer = $('.js-countryselector .js-cross-icon');
12120          domElements.currentCountryText = $('.js-current-country-text');
12121          _bindEvents();
12122          _showInitialSelection();
12123        } else {
12124          domElements.countryList = $('.js-country-list');
12125          domElements.continentSelector = $('.js-continent-selector');
12126          domElements.confirmBox = $('.js-confirm-box');
12127          domElements.globalSiteBox = $('.js-global-site-box');
12128          domElements.countryText = $('#js-country-text');
12129          domElements.mapsContainer = $('#map-continents');
12130          domElements.preselectionConfirm = $('.js-preselection-yes');
12131          domElements.preselectionDeny = $('.js-preselection-no');
12132          domElements.countryLanguageSelection = $('.js-country-language-selection');
12133          domElements.crossIconContainer = $('.js-countryselector .js-cross-icon');
12134          domElements.currentCountryText = $('.js-current-country-text');
12135          var country = jqXHR ? jqXHR.getResponseHeader('roche-geo-location') : undefined,
12136              countryChannel = void 0;
12137          var path = window.location.pathname.substr(1);
12138          if (country) {
12139            $.each(country.split(','), function (index, value) {
12140              if (value.indexOf('country_code') !== -1) {
12141                var countryCode = value.split('=')[1];
12142                var countryLang = (navigator.language || navigator.browserLanguage).split('-')[0].toLowerCase();
12143                countryChannel = countryCode + '/' + countryLang;
12144              }
12145            });
12146          }
12147          if (path && path.length > 0) {
12148            countryChannel = domElements.currentChannel.val();
12149          }
12150          snro.countryPicker.init(countryChannel);
12151        }
12152      }).fail(function (err) {
12153        snro.commonUtils.log(err);
12154      });
12155    }
12156  };
12157
12158  // _mapsSuccessCallback = (data) => {
12159  //   if (data.status === 'OK' && data.results && data.results[0] && data.results[0].address_components) {
12160  //     snro.countrySelectorCmp.countryCode = cookie_value.split('|')[0].toLowerCase();
12161  //     $.grep(data.results[0].address_components, function (obj) {
12162  //       if (obj && obj.types && obj.types.indexOf('country') > -1) {
12163  //         snro.countrySelectorCmp.countryCode = obj.short_name || '';
12164  //       }
12165  //     });
12166  //     snro.countrySelectorCmp.locationDetected = snro.countrySelectorCmp.countryCode;
12167  //   }
12168  //   _bindEvents();
12169  //   _showInitialSelection();
12170  // },
12171
12172  // _mapsErrorCallback = () => {
12173  //   snro.countrySelectorCmp.countryCode = '';
12174  //   _bindEvents();
12175  //   _showInitialSelection();
12176  // };
12177
12178
12179  snro.countrySelectorCmp = {
12180    countrySelectorPassed: false,
12181    language: '',
12182    countryCode: '',
12183    reselectionInitiated: false,
12184    popUpDisable: $('.js-popup-disable'),
12185
12186    initializeLanguageSelector: function initializeLanguageSelector() {
12187      var checkCookie = snro.commonUtils.getCookie('DataPrivacy');
12188      if (snro.countrySelectorCmp.popUpDisable.data('countryPopupDisabled') && !snro.countrySelectorCmp.reselectionInitiated) {
12189        snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
12190        snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
12191        return;
12192      } else if (domElements.countryPickerLink.data('countrySelectorDisabled') && (!$('input[name=dataPrivacy]').length || checkCookie)) {
12193        snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
12194        snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
12195        domElements.countryPickerLink.addClass('x-disable-click');
12196        snro.personaPickerComp.init();
12197        return;
12198      } else if (domElements.countryPickerLink.data('countrySelectorDisabled') && !snro.commonUtils.getCookie('persona-type')) {
12199        domElements.countryPickerLink.addClass('x-disable-click');
12200        snro.personaPickerComp.init();
12201        return;
12202      } else {
12203        snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
12204        snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
12205        snro.commonUtils.setCookie('DataPrivacy', 'yes', Infinity);
12206      }
12207      cookie_value = snro.commonUtils.getCookie('location-and-language');
12208      basePagePath = snro.commonUtils.getCookie('homePagePath');
12209      var samePage = domElements.currentChannel.val() === basePagePath;
12210      if (!snro.countrySelectorCmp.reselectionInitiated && cookie_value && samePage) {
12211        snro.personaPickerComp.init();
12212        return;
12213      } else if (window.location.href.indexOf('?countryCode=') > -1) {
12214        snro.personaPickerComp.init();
12215        return;
12216      }
12217      snro.countrySelectorCmp.language = cookie_value ? cookie_value.split('|')[1].toLowerCase() : (navigator.language || navigator.browserLanguage).split('-')[0].toLowerCase();
12218      _getPageMarkup();
12219
12220      /**
12221       *
12222       * Geolocation is no longer needed, hence commenting the same.
12223       */
12224      // navigator.geolocation.getCurrentPosition(function (loc) {
12225      //   $.get('https://maps.googleapis.com/maps/api/geocode/json?latlng=' + loc.coords.latitude + ',' + loc.coords.longitude + '&key=' + domElements.mapsApiKey)
12226      //   .then(_mapsSuccessCallback, _mapsErrorCallback);
12227      //   return;
12228      // }, function () {
12229      //   snro.countrySelectorCmp.locationDetected =false;
12230      //   snro.countrySelectorCmp.countryCode = '';
12231      // }
12231, {enableHighAccuracy: false});
12232    },
12233
12234    init: function init(deepLinkInitiated) {
12235      var cookiePersona = snro.commonUtils.getCookie('persona-type');
12236      $('.blank-liipbox').hide();
12237      if (typeof deepLinkInitiated === 'undefined') {
12238        snro.countrySelectorCmp.initializeLanguageSelector();
12239      } else if (domElements.countryPickerLink.data('countrySelectorDisabled')) {
12240        domElements.countryPickerLink.addClass('x-disable-click');
12241        snro.personaPickerComp.init();
12242      } else if (snro.countrySelectorCmp.popUpDisable.data('countryPopupDisabled')) {
12243        snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
12244        snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
12245        snro.personaPickerComp.init();
12246      } else if (snro.countrySelectorCmp.popUpDisable.data('personaPopupDisabled') && typeof cookiePersona !== 'undefined' && cookiePersona == '') {
12247        snro.personaPickerComp.init();
12248      }
12249      if (typeof cookiePersona !== 'undefined' && cookiePersona !== '') {
12250        snro.personaPickerComp.init();
12251      }
12252      if (deepLinkInitiated && ($('.js-header-persona-link').hasClass('yesno') || $('.js-header-persona-link').hasClass('yesyes'))) {
12253        snro.personaPickerComp.init();
12254      }
12255    }
12256  };
12257})(window, window.jQuery, window.snro);
12258
12259/*!
12260 * common.utils.js
12261 * This file contians some most common utility functions
12262 *
12263 * @project   SapientNitro Roche Diagonostics
12264 * @date      2017-07-17
12265 * @author    Shashank
12266 * @dependencies jQuery
12267 */
12268
12269//this will cause the browser to check for errors more aggressively
12270'use strict';
12271
12272/**
12273 * @namespace Main
12274 * @memberof snro
12275 * @property {null} property - description of property
12276 */
12277
12278(function (window, $, snro) {
12279  var _this = this;
12280
12281  snro = window.snro = snro || {};
12282
12283  /**
12284   * Generic table will be shown and hidden.
12285   * Accepts any valid selector or jQuery object.
12286   * @param {selector, HTMLElement, or jQuery object} table
12287   */
12288
12289  var showHideTbl = function showHideTbl() {
12290    // define variable for table
12291
12292    var viewLink = $('.view-btn'),
12293        viewTarget = $('.js-table'),
12294        viewTargetChild = $('.js-table tr'),
12295        closeBtn = 'js-close',
12296        setTableHeight = $('.js-table-height'),
12297        clientHeight = $(window).height();
12298    if (navigator.appVersion.indexOf('MSIE') > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
12299      viewTarget.addClass('ie-overrides');
12300    }
12301
12302    //this function is using for show the table when click on view full link btn
12303    viewLink.on('click', function () {
12304      $(this).closest('.js-feature-table').find(viewTarget).show();
12305    });
12306
12307    //this function is using for hide table when click on close
12308    viewTarget.on('click', function (event) {
12309      if ($(event.target).hasClass(closeBtn)) {
12310        $(this).hide();
12311      }
12312    });
12313
12314    _this.$window = jQuery(window);
12315    _this.$window.on('resize', function () {
12316      if ($(window).width() > 480) {
12317        $('.js-table').show();
12318      }
12319    });
12320
12321    //this function is using for row animation
12322    viewTargetChild.hover(function () {
12323      $(this).find('th').addClass('animaterow');
12324    }, function () {
12325      $(this).find('th').removeClass('animaterow');
12326    });
12327
12328    // Check for mobile
12329    if (snro.commonUtils.isMobile() && $(window).width() < 480) {
12330      setTableHeight.height(clientHeight - 150 + 'px');
12331    }
12332  };
12333
12334  snro.featureTable = {
12335    init: function init() {
12336      showHideTbl();
12337    }
12338  };
12339})(window, window.jQuery, window.snro);
12340
12341/*!
12342 * common.utils.js
12343
12344 * This file contians some most common utility functions
12345 *
12346 * @project   SapientNitro Roche Diagonostics
12347 * @date      2017-07-17
12348 * @author    Shashank
12349 * @dependencies jQuery
12350 */
12351
12352//this will cause the browser to check for errors more aggressively
12353'use strict';
12354
12355/**
12356 * @namespace Main
12357 * @memberof snro
12358 * @property {null} property - description of property
12359 */
12360
12361(function (window, $, snro) {
12362  snro = window.snro = snro || {};
12363
12364  /**
12365   * Generic function will be use if description length will exceed from 150 char more link will be displayed.
12366   * Accepts any valid selector or jQuery object.
12367   * @param {selector, HTMLElement, or jQuery object} table
12368   */
12369  var _cache = {};
12370  var seeMorelink = function seeMorelink() {
12371
12372    var viewLink = $('.c-marketingtile__description'),
12373        seeMore = '.js-seemore',
12374        ctaEle = '.cta-btn-link',
12375        anchorLink = '.js-seemore a';
12376
12377    viewLink.each(function () {
12378      var self = $(this);
12379      if (self.parent('div').find(anchorLink).attr('href')) {
12380        self.parent('div').find(ctaEle).hide();
12381        self.parent('div').find(seeMore).show();
12382      } else {
12383        self.parent('div').find(ctaEle).show();
12384        self.parent('div').find(seeMore).hide();
12385      }
12386    });
12387  };
12388
12389  snro.marketingTile = {
12390    updateCache: function updateCache() {
12391      _cache.marketTile = $('.marketingtile .js-marketTile');
12392    },
12393    reduceHeightOfImage: function reduceHeightOfImage(intNumber, context) {
12394      var imageHeight = 0;
12395      if (snro.commonUtils.isDesktop() && $(context).parents('.c-marketingtile').hasClass('marketingtile ')) {
12396        imageHeight = 664;
12397      }
12398      //Code commented because for featured product we are not calculating any height, according to requirnment we have to calculate height only for marketing tile.
12399      // if(snro.commonUtils.isDesktop() && $(context).parents('.c-marketingtile').hasClass('featuredproduct ')) {
12400      //   imageHeight = 234;
12401      // }
12402      if (snro.commonUtils.isTablet() && $(context).parents('.c-marketingtile').hasClass('marketingtile ')) {
12403        imageHeight = 456;
12404      }
12405      // if(snro.commonUtils.isTablet() && $(context).parents('.c-marketingtile').hasClass('featuredproduct ')) {
12406      //   imageHeight = 234;
12407      // }
12408      var reducedHeight = imageHeight * (intNumber / 100);
12409
12410      context.find('img').css('height', reducedHeight);
12411    },
12412    bindEvents: function bindEvents() {
12413      var context = this;
12414      if (_cache.marketTile && _cache.marketTile.length) {
12415        _cache.marketTile.each(function () {
12416          var className = $(this).attr('class').match(/js-market-[\w-]*\b/);
12417          if (className) {
12418            var intNumber = className[0].split('-')[2];
12419            context.reduceHeightOfImage(intNumber, $(this));
12420          }
12421        });
12422      }
12423    },
12424    init: function init() {
12425      seeMorelink();
12426      this.updateCache();
12427    }
12428  };
12429})(window, window.jQuery, window.snro);
12430
12431/*
12432 * c_notifications.js
12433 * [ This javascript code is to show page leve notifications ]
12434 *
12435 * @project:    SN-RO
12436 * @date:       2017-08-17
12437 * @author:     shubham
12438 * @licensor:   SAPIENNITRO
12439 * @namespaces: snro
12440 */
12441
12442//this will cause the browser to check for errors more aggressively
12443'use strict';
12444
12445/**
12446 * @namespace pageNotification
12447 * @memberof snro
12448 * @property {null} property - description of property
12449 */
12450
12451(function (window, $, snro) {
12452  snro = window.snro = snro || {};
12453  var notifyTitle = $('.js-page-notification .js-title'),
12454      notifyDescription = $('.js-page-notification .js-description'),
12455      notifyType = $('.js-notification-type'),
12456      pageNotify = $('.js-page-notification'),
12457      notifyClose = $('.js-page-notification .js-close'),
12458      submitButton = $('.js-contact-form  [type="submit"]'),
12459      checkboxLabel = $('.js-contact-form  .form-check-label'),
12460      textAreaNode = $('.js-contact-form textarea'),
12461      formResetFlag = $('.js-contact-form #formReset').val(),
12462      redirectPathNode = $('.js-contact-form  [name="redirectPath"]');
12463
12464  snro.pageNotification = {
12465    pageNotificationType: '',
12466
12467    getPageNotification: function getPageNotification(url, dataString, timeout) {
12468      var options = {
12469        url: url,
12470        type: 'POST',
12471        dataType: 'json',
12472        data: dataString
12473      };
12474
12475      if (typeof timeout !== 'undefined') {
12476        options['timeout'] = timeout;
12477      }
12478
12479      snro.ajaxWrapper.getXhrObj(options).done(function (data) {
12480        snro.pageNotification.pageNotificationType = data.notificationType;
12481        $('.loader-backdrop').hide();
12482        notifyTitle.text(window.Granite.I18n.get(data.notificationTitle, null, localStorage.getItem('i18nhint')));
12483        notifyDescription.text(window.Granite.I18n.get(data.notificationDescription, null, localStorage.getItem('i18nhint')));
12484        notifyType.addClass('js-notification-' + data.notificationType);
12485        notifyType.find('.js-link').attr('href', data.notificationCTALink).text(data.notificationCTAText);
12486        snro.pageNotification.triggerAnalytics(data);
12487      }).fail(function () {
12488        $('.loader-backdrop').hide();
12489        notifyTitle.text(window.Granite.I18n.get('rdoe_ContactUs.ErrorTitle', null, localStorage.getItem('i18nhint')));
12490        notifyDescription.text(window.Granite.I18n.get('rdoe_ContactUs.ErrorMessage', null, localStorage.getItem('i18nhint')));
12491        notifyType.addClass('js-notification-error');
12492        snro.pageNotification.triggerAnalytics('error');
12493      });
12494      $('.captcha-error').remove();
12495    },
12496    triggerAnalytics: function triggerAnalytics(data) {
12497      var notificationType = data.notificationType;
12498      var formName = $('input[name=":formid"]').val();
12499      if (notificationType === 'confirmation') {
12500        if (formResetFlag === 'true') {
12501          $('#' + formName)[0].reset();
12502          $('#' + formName).find('.default-layout').removeClass('js-active');
12503          checkboxLabel.removeClass('js-checked');
12504          textAreaNode.removeAttr('style');
12505          pageNotify.removeClass('hidden');
12506          $('html,body').animate({ scrollTop: 0 }, 100);
12507        }
12508        if (redirectPathNode.length) {
12509          window.location = redirectPathNode.val();
12510        }
12511        window.digitalData = {
12512          link: {
12513            linkPageName: snro.analytics.pageName,
12514            linkCategory: 'internal',
12515            linkSection: 'form',
12516            linkHeader: snro.contactForm.formType,
12517            linkText: submitButton.val().trim().toLowerCase(),
12518            linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth(),
12519            formName: snro.contactForm.formType,
12520            formType: 'contact-us',
12521            event: 'form-complete'
12522          }
12523        };
12524        snro.analytics.trackEvent(window.digitalData, 'form-tracking');
12525      } else {
12526        pageNotify.removeClass('hidden');
12527        $('html,body').animate({ scrollTop: 0 }, 100);
12528        window.digitalData = {
12529          link: {
12530            linkPageName: snro.analytics.pageName,
12531            linkCategory: 'internal',
12532            linkSection: 'form',
12533            linkHeader: snro.contactForm.formType,
12534            linkText: submitButton.val().trim().toLowerCase(),
12535            linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth(),
12536            formName: snro.contactForm.formType,
12537            formType: 'contact-us',
12538            formError: 'submit-error',
12539            event: 'form-errors'
12540          }
12541        };
12542        snro.analytics.trackEvent(window.digitalData, 'form-tracking');
12543      }
12544    },
12545
12546
12547    // binding event for close event
12548    bindEvents: function bindEvents() {
12549      notifyClose.on('click', function () {
12550        pageNotify.addClass('hidden');
12551        notifyType.removeClass('js-notification-' + snro.pageNotification.pageNotificationType);
12552      });
12553    },
12554    init: function init() {
12555      this.bindEvents();
12556    }
12557  };
12558})(window, window.jQuery, window.snro);
12559
12560/*
12561 * Dynamic Media
12562 * [ This javascript code is to handle dynamic media images from Adobe server
12563 *
12564 * @project:    SN-RO
12565 * @date:       2015-07-27
12566 * @author:     Shashank
12567 * @licensor:   SAPIENNITRO
12568 * @namespaces: snro
12569 */
12570
12571//this will cause the browser to check for errors more aggressively
12572'use strict';
12573
12574/**
12575 * @namespace roche
12576 * @property {null} property - description of property
12577 */
12578
12579(function (window, $, snro) {
12580  //snro = window.snro || {};
12581  snro = window.snro = snro || {};
12582
12583  // defining module
12584  snro.dynamicMedia = {
12585    moduleName: 'dynamicMedia',
12586    // process data attributes and apply best suited image as per viewport
12587    processImageAttributes: function processImageAttributes() {
12588      $('.js-dynamic-media').each(function () {
12589        var desktopSrc = $(this).attr('data-src_desktop'),
12590            tabletLandSrc = $(this).attr('data-src_tabletl'),
12591            tabletPortSrc = $(this).attr('data-src_tabletp'),
12592            mobileLandSrc = $(this).attr('data-src_mobilel'),
12593            mobilePortSrc = $(this).attr('data-src_mobilep');
12594
12595        if (typeof desktopSrc !== 'undefined') {
12596          if (typeof tabletLandSrc === 'undefined') {
12597            tabletLandSrc = desktopSrc;
12598          }
12599
12600          if (typeof tabletPortSrc === 'undefined') {
12601            tabletPortSrc = tabletLandSrc;
12602          }
12603
12604          if (typeof mobileLandSrc === 'undefined') {
12605            mobileLandSrc = tabletPortSrc;
12606          }
12607
12608          if (typeof mobilePortSrc === 'undefined') {
12609            mobilePortSrc = mobileLandSrc;
12610          }
12611        }
12612
12613        if (window.matchMedia('(max-width: 414px)').matches || window.matchMedia('(max-width: 414px) and (-webkit-min-device-pixel-ratio: 2), (max-width: 414px) and (min-resolution: 192dpi), (max-width: 414px) and (min-resolution: 2dppx)').matches) {
12614          // mobile portrait
12615          $(this).attr('data-original', mobilePortSrc);
12616        } else if (window.matchMedia('(min-width: 415px) and (max-width: 767px)').matches || window.matchMedia('(min-width: 415px) and (max-width: 767px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 415px) and (max-width: 767px) and (min-resolution: 192dpi), (min-width: 415px) and (max-width: 767px) and (min-resolution: 2dppx)').matches) {
12617          // mobile landscape
12618          $(this).attr('data-original', mobileLandSrc);
12619        } else if (window.matchMedia('(min-width: 768px) and (max-width: 991px)').matches || window.matchMedia('(min-width: 768px) and (max-width: 991px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 768px) and (max-width: 991px) and (min-resolution: 192dpi), (min-width: 768px) and (max-width: 991px) and (min-resolution: 2dppx)').matches) {
12620          // tablet portrait
12621          $(this).attr('data-original', tabletPortSrc);
12622        } else if (window.matchMedia('(min-width: 992px) and (max-width: 1024px)').matches || window.matchMedia('(min-width: 992px) and (max-width: 1024px) and (-webkit-min-device-pixel-ratio: 2), (min-width: 992px) and (max-width: 1024px) and (min-resolution: 192dpi), (min-width: 992px) and (max-width: 1024px) and (min-resolution: 2dppx)').matches) {
12623          // tablet landscape
12624          $(this).attr('data-original', tabletLandSrc);
12625        } else {
12626          //desktop
12627          $(this).attr('data-original', desktopSrc);
12628        }
12629      });
12630      snro.commonUtils.lazyloadImages();
12631    },
12632
12633
12634    /**
12635     * function is responsible for creating image tag
12636     * as per dynamic media specification
12637     *
12638     * 1. It works by reading dynamic media configuration from
12639     * the page for the respective handlebars template used
12640     *
12641     * 2. Iterate over the images added dynamically using
12642     * pre-defined class
12643     *
12644     * 3. Add data attributes with dynamic media url along with
12645     * height, width paramters as per configuration
12646     *
12647     * 4. Call the global dynamic media functionality for
12648     * correctly replacing the image source
12649     */
12650    processDynamicImages: function processDynamicImages(config, target) {
12651      //
12652      var self = this;
12653
12654      // select the media configuration available on page load
12655      var $config = config || $('.js-media-config');
12656
12657      // static dynamic media url
12658      var baseURL = $config.data('media-url');
12659
12660      // template used for generation of search results
12661      var template = $('.js-dynamic-image').data('template');
12662
12663      // class used for selecting correct dynamic media configuration
12664      var templateClass = '.' + template;
12665
12666      // get all data attributes from configuration
12667      var configAttr = $config.find(templateClass).data();
12668
12669      // array used for storing all attributes (e.g. desktop, mobileL) & its properties(e.g. wid, hei)
12670      var attrArray = [],
12671          cropAttr = '',
12672          dynamicImgArr = void 0;
12673      if (configAttr && configAttr['fit']) {
12674        cropAttr = configAttr['fit'];
12675      }
12676      if (target && target.length) {
12677        dynamicImgArr = target.find('.js-dynamic-image[data-processed=false]');
12678      } else {
12679        dynamicImgArr = $('.js-dynamic-image[data-processed=false]');
12680      }
12681
12682      /**
12683       * Iterate over configured attributes and create attributes array
12684       * Example: [
12685       *   {
12686       *     'attribute': 'data-src_desktop',
12687       *     'variation': {
12688       *       'wid': '200',
12689       *       'height': '50'
12690       *     }
12691       *   }
12692       * ]
12693       */
12694      for (var attr in configAttr) {
12695        if (Object.prototype.hasOwnProperty.call(configAttr, attr) && attr !== 'fit') {
12696          var dataAttrValue = $config.find(templateClass).data(attr);
12697          var wid = dataAttrValue && dataAttrValue.length > 0 ? dataAttrValue.split(',')[0] : '';
12698          var hei = dataAttrValue && dataAttrValue.length > 0 ? dataAttrValue.split(',')[1] : '';
12699
12700          var dataAttr = {
12701            'attribute': '',
12702            'variation': {}
12703          };
12704
12705          //  data source attribute
12706          dataAttr.attribute = 'data-src_' + attr;
12707
12708          // width configuration
12709          if (wid) {
12710            dataAttr.variation.wid = wid;
12711          }
12712
12713          // height configuration
12714          if (hei) {
12715            dataAttr.variation.hei = hei;
12716          }
12717
12718          attrArray.push(dataAttr);
12719        }
12720      }
12721
12722      /**
12723       * 1. Iterate over all images added through handlebars
12724       * 2. Add dynamic attributes
12725       * 3. Add dynamic attributes value by combining
12726       *   a. static url from configuration
12727       *   b. image src provided from json
12728       *   c. height, width parameters from Attribute array
12729       */
12730      dynamicImgArr.each(function () {
12731
12732        // save reference
12733        var that = this;
12734
12735        // image source from json
12736        var imgSrc = $(that).data('src');
12737        if (imgSrc.indexOf('https') != -1) {
12738          baseURL = '';
12739        }
12740        for (var i = 0; i < attrArray.length; i++) {
12741
12742          // dynamic attribute as read from configuration
12743          var dataSrcAttribute = attrArray[i].attribute,
12744              dataSrcValue = baseURL + imgSrc + '?',
12745              mediaParams = '';
12746
12747          for (var _attr in attrArray[i].variation) {
12748
12749            // add & symbol if one attribute already added
12750            if (mediaParams) {
12751              mediaParams = mediaParams + '&';
12752            }
12753            mediaParams = mediaParams + _attr + '=' + attrArray[i].variation[_attr];
12754          }
12755
12756          // adding static url with dynamic media configuartion
12757          dataSrcValue = dataSrcValue + mediaParams;
12758
12759          if (cropAttr) {
12760            dataSrcValue = dataSrcValue + '&fit=' + cropAttr;
12761          }
12762          // adding data attribute
12763          $(that).attr(dataSrcAttribute, dataSrcValue);
12764        }
12765
12766        /**
12767         * 1. set processed flag to true to prevent being processed for
12768         * dynamic added images
12769         * 2. add 'js-dynamic-media' class to be processed by global
12770         * dynamic media functionality
12771         */
12772        $(that).attr('data-processed', true).addClass('js-dynamic-media');
12773      });
12774
12775      // call globall dynamic media functionality to process images
12776      self.processImageAttributes();
12777    },
12778
12779
12780    /**
12781     * function is responsible for implementing click points 
12782     * on image for additional informaton
12783     *
12784     * 1. It finds the original dimensions
12785     * and calculates its corresponding percentages
12786     *
12787     * 2. Append concentric circles on the calculated position percentage 
12788     *
12789     * 3. Show additonal information overlay on click
12790     * of the corresponding hotspot
12791     *
12792     * 4. Append and remove data from overlay accordingly
12793     * and repeat the same steps each time the image source is modified
12794     */
12795    imageClickPoints: function imageClickPoints() {
12796      var $imgSelector = $('.js-image-map');
12797      $imgSelector.each(function () {
12798        var $self = $(this);
12799        var hotspotId = $self.attr('data-hotspottarget'),
12800            $idContainer = $('#' + hotspotId),
12801            origHeight = $idContainer.attr('data-origh'),
12802            origWidth = $idContainer.attr('data-origW'),
12803            $hotspotTarget = $('[data-hotspottarget=' + hotspotId + ']'),
12804            hotspotArr = [];
12805        var imageHotspotOverlayTemplate = window.roche.templates['imageHotspotOverlay'];
12806
12807        $idContainer.find('.js-hotspot').each(function (index) {
12808          var $this = $(this);
12809          var leftCoord = $this.attr('data-left'),
12810              topCoord = $this.attr('data-top'),
12811              leftPercent = leftCoord / origWidth * 100 + '%',
12812              topPercent = topCoord / origHeight * 100 + '%';
12813          var data = {
12814            headline: $this.attr('data-headline'),
12815            description: $this.attr('data-bodytext'),
12816            ctaLink: $this.attr('data-learnmore'),
12817            target: $this.attr('data-target')
12818          };
12819          var concentricCirclesContainer = window.roche.templates['concentricCircles'](data);
12820
12821          $hotspotTarget.closest('.mediaImagediv').append(concentricCirclesContainer);
12822          $hotspotTarget.closest('.mediaImagediv').css('position', 'relative');
12823          hotspotArr[index] = $hotspotTarget.closest('.mediaImagediv').children('.js-conc-circles').eq(index);
12824
12825          var hotspotCircle = hotspotArr[index];
12826          hotspotCircle.css({
12827            display: 'block',
12828            top: topPercent,
12829            left: leftPercent
12830          });
12831          hotspotCircle.on('click', function (e) {
12832            e.stopPropagation();
12833            if ($('.js-img-hotspot-overlay')) {
12834              $('.js-img-hotspot-overlay').remove();
12835            }
12836
12837            var imgHotspotTemp = imageHotspotOverlayTemplate(data);
12838            $hotspotTarget.closest('.mediaImagediv').append(imgHotspotTemp);
12839            $('.js-img-hotspot-overlay').show();
12840            if (snro.commonUtils.isMobileMode()) {
12841              var currentViewportHeight = $(window).height();
12842              $('.js-img-hotspot-overlay').css({
12843                height: currentViewportHeight,
12844                top: '0',
12845                position: 'fixed',
12846                left: '0'
12847              });
12848              $('.js-img-hotspot-overlay').css('z-index', '100');
12849            }
12850            $('.js-img-hotspot-overlay').children('.closeBtn').click(function () {
12851              $('.js-img-hotspot-overlay').remove();
12852            });
12853          });
12854        });
12855      });
12856      snro.commonUtils.lazyloadImages();
12857    },
12858    bindEvents: function bindEvents() {
12859      var self = this;
12860      //Not handling resize event in authoring mode to prevent repeated requests for images
12861      if (snro.commonUtils.getCookie('wcmmode') !== 'edit') {
12862        $(window).on('resize orientationchange', function () {
12863          self.processImageAttributes();
12864        });
12865      }
12866      $(window).load(function () {
12867        snro.dynamicMedia.imageClickPoints();
12868      });
12869
12870      $(document).keyup(function (e) {
12871        if (e.keyCode === 27) {
12872          if ($('.js-img-hotspot-overlay').length) {
12873            $('.js-img-hotspot-overlay').remove();
12874          }
12875        }
12876      });
12877
12878      $(document).mouseup(function (e) {
12879        var eventTgtClass = $(e.target).attr('class');
12880        if (eventTgtClass) {
12881          if (eventTgtClass.indexOf('js-img-hotspot-overlay') === -1 && !$(e.target).parents('.js-img-hotspot-overlay').length) {
12882            if ($('.js-img-hotspot-overlay').length) {
12883              $('.js-img-hotspot-overlay').remove();
12884            }
12885          }
12886        }
12887      });
12888    },
12889    init: function init() {
12890      var _this = this;
12891
12892      snro.commonUtils.log('dynamicMedia init');
12893      this.bindEvents();
12894      this.processImageAttributes();
12895
12896      //call init again in case targeting is there
12897      if (window.ContextHub) {
12898        window.ContextHub.eventing.on(window.ContextHub.Constants.EVENT_TEASER_LOADED, function () {
12899          _this.bindEvents();
12900          _this.processImageAttributes();
12901        });
12902      }
12903    }
12904  };
12905})(window, window.jQuery, window.snro);
12906
12907/*!
12908 * ajax.wrapper.js
12909
12910 * This file contians ajax wrapper method that handles all ajax calls
12911 *
12912 * @project   SapientNitro Roche Diagonostics
12913 * @date      2017-07-17
12914 * @author    Shashank
12915 * @dependencies jQuery
12916 */
12917
12918//this will cause the browser to check for errors more aggressively
12919'use strict';
12920
12921/**
12922 * @namespace ajaxWrapper
12923 * @memberof roche
12924 * @property {null} property - description of property
12925 */
12926
12927(function (window, $, snro) {
12928  snro = window.snro = snro || {};
12929  snro.ajaxWrapper = {
12930    moduleName: 'ajaxWrapper', // Added for debug logs
12931    xhrPool: {
12932      name: 'xhrPool'
12933    },
12934    getXhrObj: function getXhrObj(options, callback, complete) {
12935      var self = this,
12936          ajaxOptions = void 0,
12937          defaultOptions = {
12938        type: 'POST',
12939        async: true,
12940        cache: false,
12941        url: '',
12942        data: {},
12943        dataType: 'json',
12944        loaderRef: null,
12945        beforeSend: function beforeSend(jqXHR) {
12946          if (ajaxOptions.cancellable) {
12947            if (self.xhrPool[ajaxOptions.url]) {
12948              self.xhrPool[ajaxOptions.url].abort();
12949              self.xhrPool[ajaxOptions.url] = jqXHR;
12950            } else {
12951              self.xhrPool[ajaxOptions.url] = jqXHR;
12952            }
12953          }
12954          if (ajaxOptions.loader && ajaxOptions.loader.length) {
12955            // Check if target type is a button or link
12956            if (ajaxOptions.loader.hasClass('loader-btn')) {
12957              self.loaderRef = snro.commonUtils.loader().insertAfter(ajaxOptions.loader);
12958            } else {
12959              self.loaderRef = snro.commonUtils.loader().target(ajaxOptions.loader);
12960            }
12961          }
12962        },
12963        cancellable: false, // By default allow multiple request on one URL
12964        loader: null // Specify a target element where loader needs to be shown
12965      };
12966      ajaxOptions = $.extend({}, defaultOptions, options);
12967      return $.ajax(ajaxOptions).done(function (data, status, jqXHR) {
12968        $.each(self.xhrPool, function (url, xhrObj) {
12969          if (xhrObj === jqXHR) {
12970            delete self.xhrPool[url];
12971            return false;
12972          }
12973        });
12974        if (!callback) {
12975          return;
12976        }
12977        callback.apply(this, arguments);
12978      }).fail(function (jqXHR) {
12979        $.each(self.xhrPool, function (url, xhrObj) {
12980          if (xhrObj === jqXHR) {
12981            delete self.xhrPool[url];
12982            return false;
12983          }
12984        });
12985        if (!callback) {
12986          return;
12987        }
12988        callback.apply(this, arguments);
12989      }).always(function () {
12990        if (self.loaderRef && self.loaderRef.length) {
12991          self.loaderRef.remove();
12992        }
12993        if (!complete) {
12994          return;
12995        }
12996        complete.apply(this, arguments);
12997      });
12998    },
12999    init: function init() {
13000      // Since init is mandatory
13001      if (!window.ajaxWrapper) {
13002        window.ajaxWrapper = this;
13003      }
13004    }
13005  };
13006})(window, window.jQuery, window.snro);
13007
13008/*
13009 * Analytics Implementation
13010 * [ This javascript code is to handle images from Adobe server
13011 *
13012 * @project:    SN-RO
13013 * @date:       2015-07-27
13014 * @author:     Shashank
13015 * @licensor:   SAPIENNITRO
13016 * @namespaces: snro
13017 */
13018
13019//this will cause the browser to check for errors more aggressively
13020'use strict';
13021// check if digitalData is already available or not
13022
13023var digitalData = window.digitalData || {};
13024(function (w, $, snro) {
13025  if (!$) {
13026    return;
13027  }
13028  snro = w.snro = snro || {};
13029
13030  // Adding few string prototype functions
13031  if (!String.prototype.lowerCaseFirstLetter) {
13032    String.prototype.lowerCaseFirstLetter = function () {
13033      return this.charAt(0).toLowerCase() + this.slice(1);
13034    };
13035  }
13036
13037  var _cache = {},
13038      _updateCache = function _updateCache() {
13039    _cache.pageType = $('meta[name="page-type"]');
13040    _cache.analyticsId = $('#analyticsdata');
13041    _cache.analyticsData = _cache.analyticsId.length && _cache.analyticsId.data() || {};
13042    _cache.productId = $('meta[name="productId"]');
13043    _cache.productType = $('meta[name="productType"]');
13044    _cache.title = $('meta[name="title"]');
13045    _cache.personaTag = $('meta[name="personaTag"]');
13046    _cache.description = $('meta[name="description"]');
13047    _cache.tags = $('meta[name="tags"]');
13048    _cache.nonLocalizedTags = $('meta[name="nonLocalizedTags"]');
13049    _cache.publishedDate = $('meta[name="publishedDate"]');
13050  },
13051      _removeEmptyValues = function _removeEmptyValues(data) {
13052    //assuming data nested to only two levels
13053    $.each(data, function (key, digitalDataElement) {
13054      $.each(digitalDataElement, function (index) {
13055        if (data[key] && !data[key][index] && index != 'persona') {
13056          delete data[key][index];
13057        }
13058      });
13059    });
13060    return data;
13061  },
13062      _formatValue = function _formatValue(value) {
13063    value = (value + '').toString();
13064
13065    //convert value to lowercase
13066    value = value.trim().toLowerCase();
13067
13068    //No values should be more than 100 characters long
13069    value = value.substring(0, 100);
13070
13071    //Allowed special characters are ':|,-;'
13072    //Replace spaces and other special characters with '-'
13073    //TODO: Revisit this logic when non latin scripts are introduced
13074    value = value.replace(/[`&\!@$^\\#+=( )~%'"*?<>{}\[\]]/g, '-');
13075    return value;
13076  },
13077      _formatAnalyticsData = function _formatAnalyticsData(obj) {
13078    return Object.keys(obj).reduce(function (currentObject, key) {
13079      if ({}.toString.call(obj[key]) === '[object Object]') {
13080        currentObject[key] = _formatAnalyticsData(obj[key]);
13081      } else {
13082        currentObject[key] = key === 'pageURL' || key === 'errorLink' || key === 'server' || key === 'tags' || key === 'nonLocalizedTags' || key === 'referrerOnload' || key === 'landingPage' ? obj[key] : _formatValue(obj[key]);
13083      }
13084      return currentObject;
13085    }, {});
13086  };
13087
13088  // module definition
13089  snro.analytics = {
13090    moduleName: 'Analytics',
13091
13092    getBrowserWidth: function getBrowserWidth() {
13093      if (snro.commonUtils.isMobile()) {
13094        // Mobile View
13095        return 'mobile';
13096      }
13097      return snro.commonUtils.isTablet() ? 'tablet' : 'desktop';
13098    },
13099
13100    loadEvent: function loadEvent() {
13101      var pagetype = 'home',
13102          productid = '',
13103          productcategory = '',
13104          contentTitle = '',
13105          contentType = '',
13106          contentId = '',
13107          contentAdditionalInformation = '',
13108          productname = void 0,
13109          tags = void 0,
13110          nonLocalizedTags = void 0,
13111          eloquaFlag = void 0,
13112          pageReferrer = document.cookie.indexOf('referrer'),
13113          isGDPRValidated = document.cookie.indexOf('DataPrivacy'),
13114          personaTypeIndex = document.cookie.indexOf('persona-type'),
13115          referrerFlag = '',
13116          landingpage = '',
13117          publishedDate = '';
13118      try {
13119        var originalReferrerUrl;
13120        var originalReferrerDomain;
13121        var originalreferrer = snro.commonUtils.getCookie('originalreferrer');
13122        if (originalreferrer != "" && originalreferrer != null) {
13123          originalReferrerUrl = new URL(originalreferrer);
13124          originalReferrerDomain = originalReferrerUrl.hostname;
13125        }
13126        if (document.referrer != null && document.referrer !== "") {
13127          var domainReferrerUrl = new URL(document.referrer);
13128        }
13129        if (domainReferrerUrl != null) {
13130          var domainReferrerDomain = domainReferrerUrl.hostname;
13131          if (!domainReferrerDomain.includes('diagnostics') && domainReferrerDomain !== originalReferrerDomain) {
13132            snro.commonUtils.setCookie('originalreferrer', document.referrer, Infinity);
13133          }
13134        }
13135      } catch (e) {
13136        console.log(e);
13137      }
13138      if (pageReferrer === -1) {
13139        snro.commonUtils.setCookie('referrerLanding', window.location.href, Infinity);
13140        snro.commonUtils.setCookie('referrer', document.referrer, Infinity);
13141        snro.commonUtils.setCookie('originalreferrer', document.referrer, Infinity);
13142        referrerFlag = '';
13143        /*seting again to update 'landingpage' variable*/
13144        pageReferrer = document.cookie.indexOf('referrer');
13145      }
13146      if (isGDPRValidated !== -1 && pageReferrer !== -1) {
13147        referrerFlag = snro.commonUtils.getCookie('referrer');
13148        if (referrerFlag === '') {
13149          referrerFlag = 'not_set';
13150        } else {
13151          referrerFlag = snro.commonUtils.getCookie('referrer');
13152        }
13153        landingpage = snro.commonUtils.getCookie('referrerLanding');
13154        if (personaTypeIndex != -1 || $('.js-header-persona-link').hasClass('yesno') || $('.js-header-persona-link').hasClass('yesyes')) {
13155          snro.commonUtils.removeCookie('referrer');
13156          snro.commonUtils.removeCookie('referrerLanding');
13157        }
13158      }
13159
13160      _updateCache();
13161      //Fail safe for the case when satellite is not defined
13162      window._satellite = window._satellite || {
13163        track: function track() {
13164          snro.commonUtils.log('Satellite is not defined');
13165        }
13166      };
13167      if (_cache.pageType.length) {
13168        pagetype = _cache.pageType.attr('content') && _cache.pageType.attr('content').toLocaleLowerCase() || '';
13169      }
13170
13171      if (_cache.tags.length) {
13172        tags = _cache.tags.attr('content') || '';
13173      }
13174
13175      if (_cache.nonLocalizedTags.length) {
13176        nonLocalizedTags = _cache.nonLocalizedTags.attr('content') || '';
13177      }
13178
13179      if (_cache.publishedDate.length) {
13180        publishedDate = _cache.publishedDate.attr('content');
13181        if (publishedDate && publishedDate != '' && publishedDate !== 'undefined') {
13182          publishedDate = new Date(publishedDate).toISOString();
13183          publishedDate = publishedDate.replace("t", "|");
13184          publishedDate = publishedDate.replace("T", "|");
13185          publishedDate = publishedDate.replace("z", "");
13186          publishedDate = publishedDate.replace("Z", "");
13187        }
13188      }
13189
13190      var siteLanglocation = snro.commonUtils.getCookie('location-and-language') && snro.commonUtils.getCookie('location-and-language').toLocaleLowerCase() || '',
13191          serverName = _cache.analyticsData['servername'],
13192          channel = _cache.analyticsData['channel'] && _cache.analyticsData['channel'].toLocaleLowerCase() || '',
13193          siteSectionOne = _cache.analyticsData['sitesectionone'] && (_cache.analyticsData['sitesectionone'] + '').toLocaleLowerCase() || '',
13194          siteSectionTwo = _cache.analyticsData['sitesectiontwo'] && (_cache.analyticsData['sitesectiontwo'] + '').toLocaleLowerCase() || '',
13195          siteSectionThree = _cache.analyticsData['sitesectionthree'] && (_cache.analyticsData['sitesectionthree'] + '').toLocaleLowerCase() || '',
13196          siteSectionFour = _cache.analyticsData['sitesectionfour'] && (_cache.analyticsData['sitesectionfour'] + '').toLocaleLowerCase() || '',
13197          siteSectionOnePName = _cache.analyticsData['sitesectionone'] && (':' + _cache.analyticsData['sitesectionone']).toLocaleLowerCase() || '',
13198          siteSectionTwoPName = _cache.analyticsData['sitesectiontwo'] && (':' + _cache.analyticsData['sitesectiontwo']).toLocaleLowerCase() || '',
13199          siteSectionThreePName = _cache.analyticsData['sitesectionthree'] && (':' + _cache.analyticsData['sitesectionthree']).toLocaleLowerCase() || '',
13200          siteSectionFourPName = _cache.analyticsData['sitesectionfour'] && (':' + _cache.analyticsData['sitesectionfour']).toLocaleLowerCase() || '',
13201          personaType = snro.commonUtils.getCookie('persona-type') && snro.commonUtils.getCookie('persona-type').toLocaleLowerCase() || '',
13202          siteCountry = siteLanglocation.split('|')[0],
13203          siteLanguage = siteLanglocation.split('|')[1],
13204          deviceView = snro.analytics.getBrowserWidth();
13205
13206      var url_path = $('#query-param').data("path");
13207      var country_code;
13208      var language_code;
13209      if (url_path && url_path != '' && url_path != '/' && url_path.split('/').length > 5) {
13210        country_code = url_path.split('/')[3];
13211        language_code = url_path.split('/')[4];
13212      } else {
13213        country_code = siteCountry;
13214        language_code = siteLanguage;
13215      }
13216      window.digitalData = {
13217        page: {
13218          server: serverName,
13219          channel: channel,
13220          pageType: pagetype,
13221          tags: tags,
13222          nonLocalizedTags: nonLocalizedTags,
13223          pageName: 'rd' + ':' + country_code + ':' + language_code + siteSectionOnePName + siteSectionTwoPName + siteSectionThreePName + siteSectionFourPName,
13224          siteSection1: siteSectionOne,
13225          siteSection2: siteSectionTwo,
13226          siteSection3: siteSectionThree,
13227          siteSection4: siteSectionFour,
13228          pageURL: window.location.href,
13229          siteLanguage: siteLanguage,
13230          siteType: 'responsive',
13231          persona: personaType,
13232          siteCountry: siteCountry,
13233          referrerOnload: referrerFlag,
13234          landingPage: landingpage,
13235          publishedDate: publishedDate
13236        },
13237        user: {
13238          deviceType: deviceView
13239        },
13240
13241        link: {}
13242      };
13243      if (window.digitalData.page.landingPage) {
13244        if (window.location.search !== '' && window.location.search !== null) {
13245          snro.commonUtils.setCookie('querystringparameter', window.location.search, Infinity);
13246        }
13247      } else {
13248        snro.commonUtils.removeCookie('querystringparameter');
13249      }
13250      this.pageName = 'rd' + ':' + siteCountry + ':' + siteLanguage + siteSectionOnePName + siteSectionTwoPName + siteSectionThreePName;
13251      this.listingType = pagetype || 'listing';
13252
13253      productname = window.document.title.substring(0, 100);
13254      if (_cache.productId.length) {
13255        productid = _cache.productId.attr('content') && _cache.productId.attr('content').toLocaleLowerCase() || '';
13256      }
13257
13258      if (_cache.productType.length) {
13259        productcategory = _cache.productType.attr('content') && _cache.productType.attr('content').toLocaleLowerCase().substring(0, 100) || '';
13260      }
13261
13262      // content title
13263      if (_cache.title.length) {
13264        contentTitle = _cache.title.attr('content') && _cache.title.attr('content').toLocaleLowerCase() || '';
13265      }
13266
13267      // content type
13268      if (_cache.pageType.length) {
13269        contentType = _cache.pageType.attr('content') && _cache.pageType.attr('content').toLocaleLowerCase() || '';
13270      }
13271
13272      // content id
13273      if (_cache.personaTag) {
13274        contentId = _cache.personaTag.attr('content') && _cache.personaTag.attr('content').toLocaleLowerCase() || '';
13275      }
13276      // content additional information
13277      if (_cache.description.length) {
13278        contentAdditionalInformation = _cache.description.attr('content') && _cache.description.attr('content').toLocaleLowerCase() || '';
13279      }
13280
13281      if (pagetype === 'products') {
13282        $.extend(digitalData['page'], { event: 'pdp-load',
13283          productId: productid,
13284          productName: productname,
13285          productCategory: productcategory
13286        });
13287      }
13288      if (pagetype === 'news' || pagetype === 'events' || pagetype === 'article') {
13289        $.extend(digitalData['page'], {
13290          event: 'content-load',
13291          contentType: contentType,
13292          contentTitle: contentTitle,
13293          contentId: contentId,
13294          contentAdditionalInformation: contentAdditionalInformation
13295        });
13296      }
13297      if (pagetype === 'error') {
13298        $.extend(digitalData['page'], {
13299          event: 'error-page-load',
13300          errorLink: window.location.href
13301        });
13302      }
13303
13304      // for eloqua tracking
13305      eloquaFlag = _cache.analyticsData['eloquaEnabled'] ? 'true' : 'false';
13306      $.extend(window.digitalData['page'], { eloquaEnabled: eloquaFlag });
13307      _removeEmptyValues(window.digitalData);
13308      window.digitalData = _formatAnalyticsData(window.digitalData);
13309    },
13310
13311    urlType: function urlType(target) {
13312      var givenTarget = $(target).attr('href') && $(target).attr('href').trim();
13313      if ($(target).attr('href') !== undefined && givenTarget.indexOf(location.hostname) === -1 && givenTarget.substr(0, 1) !== '/' && givenTarget.substr(0, 1) !== '#' && givenTarget.substr(0, 10) !== 'javascript') {
13314        // External Url
13315        return 'external';
13316      }
13317      // Internal Link
13318      return 'internal';
13319    },
13320
13321    trackEvent: function trackEvent(data, eventType) {
13322      data = _removeEmptyValues(data);
13323      window.digitalData = _formatAnalyticsData(data);
13324      window._satellite.track(eventType);
13325    },
13326    _trackingDigitalLinkData: function _trackingDigitalLinkData(self) {
13327      var satelliteTrackEvent = $(self).attr('data-da-satellitetrackEvent');
13328      window.digitalData = {
13329        page: {},
13330        user: {},
13331        link: {}
13332      };
13333      //update satellite.track parameter on page
13334      if (satelliteTrackEvent === 'search-click-tracking' && $('.js-search-nav').length === 0) {
13335        satelliteTrackEvent = 'generic-link-tracking';
13336      }
13337
13338      $.each($(self).data(), function (attr, attrValue) {
13339        if (~attr.indexOf('da')) {
13340          var analyticsKey = attr.replace('da', '').lowerCaseFirstLetter(),
13341              subkey = {},
13342              attrArr = void 0,
13343              keyLevel1 = void 0,
13344              keyLevel2 = void 0;
13345          if (analyticsKey.indexOf('_') !== -1) {
13346            attrArr = analyticsKey.split('_');
13347            keyLevel1 = attrArr[1];
13348            keyLevel2 = attrArr[0];
13349            if (keyLevel1 === 'linkPageName') {
13350              attrValue = snro.analytics.pageName || 'roche';
13351            } else if (keyLevel1 === 'linkInteractionMethod') {
13352              attrValue = 'click-on-' + snro.analytics.getBrowserWidth();
13353            } else if (keyLevel1 === 'linkCategory') {
13354              attrValue = snro.analytics.urlType(self);
13355            } else if (keyLevel1 === 'contentType') {
13356              attrValue = attrValue || window.digitalData.page.pageType || '';
13357            }
13358            if ($(self).parents('.product-category').attr('id') && $(self).parents('.product-category').attr('id').indexOf('product') > -1 && keyLevel1 === 'event') {
13359              attrValue = 'product-click';
13360            }
13361            subkey[keyLevel1] = attrValue;
13362          }
13363          if (keyLevel2) {
13364            digitalData[keyLevel2] = digitalData[keyLevel2] || {};
13365          }
13366          $.extend(digitalData[keyLevel2], subkey);
13367        }
13368      });
13369
13370      snro.analytics.trackEvent(digitalData, satelliteTrackEvent);
13371    },
13372
13373    // handle the events
13374    bindEvents: function bindEvents() {
13375      //on click track event and push in DigitalData  
13376      var _self = this;
13377      $(document).on('sclick enterKeyPress', '[data-fn-click=true]', function (e) {
13378        _self._trackingDigitalLinkData(this);
13379      });
13380      $(document).on('mousedown', '[data-fn-click=true]', function (e) {
13381        if (e.which === 2) {
13382          _self._trackingDigitalLinkData(this);
13383        }
13384      });
13385    },
13386    init: function init() {
13387      this.loadEvent();
13388      if (!w.digitalData) {
13389        return;
13390      }
13391      this.bindEvents();
13392    }
13393  };
13394})(window, window.jQuery, window.snro);
13395
13396/*!
13397 * common.utils.js
13398
13399 * This file contians some most common utility functions
13400 *
13401 * @project   SapientNitro Roche Diagonostics
13402 * @date      2017-07-17
13403 * @author    Shashank
13404 * @dependencies jQuery
13405 */
13406
13407//this will cause the browser to check for errors more aggressively
13408'use strict';
13409/* eslint-disable new-cap */
13410
13411/**
13412 * @namespace Main
13413 * @memberof snro
13414 * @property {null} property - description of property
13415 */
13416
13417var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
13418
13419(function (window, $, snro) {
13420  snro = window.snro = snro || {};
13421
13422  /**
13423   * Generic loader constructor to customize where to place the loader. Accepts any valid selector or jQuery object
13424   * @param {selector, HTMLElement, or jQuery object} loader
13425   */
13426  function _Loader(loader) {
13427    if (!(loader instanceof jQuery)) {
13428      loader = $(loader);
13429    }
13430    this.length = loader.length;
13431    if (!this.length) {
13432      return this;
13433    }
13434    this.htmlText = loader[0].outerHTML;
13435    this.loader = loader;
13436    this[0] = loader[0];
13437  }
13438
13439  /**
13440   * Generic loader prototype methods
13441   */
13442  _Loader.prototype = {
13443    constructor: _Loader,
13444    target: function target(domEle) {
13445      if (this.length) {
13446        $(domEle).html(this.loader);
13447      }
13448      return this;
13449    },
13450    appendTo: function appendTo(domEle) {
13451      if (this.length) {
13452        $(domEle).append(this.loader);
13453      }
13454      return this;
13455    },
13456    insertAfter: function insertAfter(domEle) {
13457      if (this.length) {
13458        $(domEle).after(this.loader);
13459      }
13460      return this;
13461    },
13462    insertBefore: function insertBefore(domEle) {
13463      if (this.length) {
13464        $(domEle).before(this.loader);
13465      }
13466      return this;
13467    },
13468    remove: function remove() {
13469      return this.loader.remove();
13470    }
13471  };
13472
13473  window.globalCache = snro.globalCache = {
13474    regex: {
13475      mobile: /android|webos|iphone|blackberry|iemobile|opera mini/i,
13476      tablet: /ipad|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i,
13477      breakpoint: /:(?=([\s\d]+)px)/i
13478    },
13479    UA: navigator.userAgent.toLowerCase(),
13480    isKeyboardFocus: false
13481  };
13482
13483  // check device type
13484  function _testUAPortableDevices() {
13485    return snro.globalCache.regex.mobile.test(snro.globalCache.UA) || snro.globalCache.regex.tablet.test(snro.globalCache.UA);
13486  }
13487
13488  // Fire event when breakpoint is changed
13489  function _triggerBreakpointChange() {
13490    var breakpointInfo = $(document.body).pseudoContent(':after').match(snro.globalCache.regex.breakpoint);
13491    if (+breakpointInfo[1]) {
13492      breakpointInfo[1] = +breakpointInfo[1];
13493      // If previous breakpoint does not match current breakpoint
13494      if (snro.globalCache.breakpoint !== breakpointInfo[1]) {
13495        snro.commonUtils.log('Desktop Mode: Breakpoint change');
13496        snro.globalCache.breakpoint = breakpointInfo[1];
13497        $(window).trigger('responsive', [breakpointInfo[1]]);
13498      }
13499    }
13500  }
13501
13502  // define custom events to handle multiple events
13503  function _defineCustomEvents() {
13504    // New event for enter key
13505    $(document.body).on('keydown', function (e) {
13506      var keyPressEvent = null;
13507      if (e.keyCode === 13) {
13508        // Enter key
13509        keyPressEvent = $.Event('enterKeyPress', $.extend(e, { type: 'enterKeyPress' }));
13510        $(e.target).trigger(keyPressEvent);
13511      }
13512      if (e.keyCode === 27) {
13513        // Escape key
13514        keyPressEvent = $.Event('escapeKey', $.extend(e, { type: 'escapeKey' }));
13515        $(e.target).trigger(keyPressEvent);
13516      }
13517      if (e.keyCode === 9) {
13518        //  Tab key
13519        $('.focussed').removeClass('focussed');
13520        snro.globalCache.isKeyboardFocus = true;
13521      }
13522    });
13523    $(document.body).on('mousedown', function () {
13524      snro.globalCache.isKeyboardFocus = false;
13525    });
13526    // New event for simulated click, useful for google analytics events
13527    $(document.body).on('mouseup', function (e) {
13528      if (e.which === 1) {
13529        // left click
13530        var simulatedClickEvent = $.Event('sclick', $.extend(e, { type: 'sclick' }));
13531        $(e.target).trigger(simulatedClickEvent);
13532      }
13533    });
13534
13535    // Focus events
13536    $(document.body).on('focusin', snro.keyboardAccess);
13537
13538    $(document).on('mouseenter focusin', '.x-overlay-link', function () {
13539      var parentList = $(this).parents('.x-overlay-link-container');
13540      parentList.find('.x-overlay-link').not(this).stop(true).fadeTo(300, 0.5);
13541    });
13542
13543    $(document).on('mouseleave focusout', '.x-overlay-link', function () {
13544      var parentList = $(this).parents('.x-overlay-link-container');
13545      parentList.find('.x-overlay-link').stop(true).fadeTo(300, 1);
13546    });
13547
13548    // Events for breakpoint change
13549    if (_testUAPortableDevices()) {
13550      $(window).on('orientationchange', function () {
13551        snro.commonUtils.log('Mobile mode: Orientation change');
13552        $(window).trigger('responsive', $(window).outerWidth());
13553      });
13554    } else {
13555      var breakpointInfo = $(document.body).pseudoContent(':after').match(snro.globalCache.regex.breakpoint);
13556      if (+breakpointInfo[1]) {
13557        snro.globalCache.breakpoint = +breakpointInfo[1];
13558        $(window).on('resize', _triggerBreakpointChange);
13559      }
13560    }
13561  }
13562
13563  var _initializeRedirectPopup = function _initializeRedirectPopup() {
13564    var popupData = {
13565      'title': window.Granite.I18n.get('rdoe_redirectpopup.title', null, localStorage.getItem('i18nhint')),
13566      'subTitle': window.Granite.I18n.get('rdoe_redirectpopup.subtitle', null, localStorage.getItem('i18nhint')),
13567      'bodyText': window.Granite.I18n.get('rdoe_redirectpopup.desc', null, localStorage.getItem('i18nhint')),
13568      'ctaLabel': window.Granite.I18n.get('rdoe_redirectpopup.catlabel', null, localStorage.getItem('i18nhint'))
13569    },
13570        redirectPopupTemplate = window.roche.templates['redirectPopup'],
13571        redirectPopupHTML = redirectPopupTemplate(popupData);
13572
13573    $('body').append(redirectPopupHTML);
13574
13575    $('body').on('click', '.js-redirect-ok', function () {
13576      var targetLink = $('.js-redirect-popup').data('target'),
13577          targetAttr = $('.js-redirect-popup').data('target-attr');
13578      $('.js-redirect-popup').modal('hide');
13579      var newWindow = window.open(targetLink, targetAttr);
13580      newWindow.opener = null;
13581    });
13582  },
13583      _setHintToLocalStorage = function _setHintToLocalStorage() {
13584    var _hint = '';
13585    if (typeof $('.js-i18n-hint').attr('data-hint') !== 'undefined') {
13586      _hint = $('.js-i18n-hint').attr('data-hint');
13587    }
13588    localStorage.setItem('i18nhint', _hint);
13589  },
13590      _isUrlWhitelisted = function _isUrlWhitelisted(url) {
13591    var whilteListedUrlList = $('.external-pop-up-whitelist').length ? $('.external-pop-up-whitelist').data('domain') : '',
13592        isUrlWhitelisted = false;
13593    if (whilteListedUrlList) {
13594      whilteListedUrlList = whilteListedUrlList.split(',');
13595      for (var i = 0; i < whilteListedUrlList.length; i++) {
13596        if (url.indexOf(whilteListedUrlList[i]) !== -1) {
13597          isUrlWhitelisted = true;
13598          break;
13599        }
13600      }
13601    }
13602    return isUrlWhitelisted;
13603  },
13604      _whitelistedLinksPopup = function _whitelistedLinksPopup(_self) {
13605    var givenTarget = $(_self).attr('href').trim();
13606    var targetAttr = $(_self).attr('target') || '_self';
13607    var digitalData = window.digitalData || '';
13608    if (givenTarget) {
13609      var isUrlWhitelisted = _isUrlWhitelisted(givenTarget);
13610      if (givenTarget.indexOf(location.hostname) === -1 && !isUrlWhitelisted && givenTarget.substr(0, 1) !== '/' && givenTarget.substr(0, 1) !== '#' && givenTarget.substr(0, 10) !== 'javascript') {
13611        if (!$('.js-redirect-popup').is(':visible')) {
13612          $('.js-redirect-popup').modal({
13613            'keyboard': false,
13614            backdrop: 'static'
13615          });
13616          $('.js-redirect-popup').data('target', givenTarget);
13617          $('.js-redirect-popup').data('target-attr', targetAttr);
13618        }
13619        $.extend(digitalData['link'], { externalLink: 'yes', externalLinkUrl: givenTarget });
13620        snro.analytics.trackEvent(digitalData, 'external-link-tracking');
13621      } else {
13622        if (isUrlWhitelisted) {
13623          $.extend(digitalData['link'], { externalLink: 'no', externalLinkUrl: givenTarget });
13624          snro.analytics.trackEvent(digitalData, 'external-link-tracking');
13625        }
13626        window.open(givenTarget, targetAttr);
13627      }
13628    }
13629  },
13630      _handleExternalLinks = function _handleExternalLinks() {
13631    //let event = snro.commonUtils.is_touch_device() ? 'click touchstart' : 'click';
13632    $(document).on('mousedown', 'a', function (e) {
13633      e.preventDefault();
13634      if (e.which === 2) {
13635        _whitelistedLinksPopup(this);
13636      }
13637    });
13638    $(document).on('click', 'a', function (e) {
13639      e.preventDefault();
13640      _whitelistedLinksPopup(this);
13641    });
13642
13643    $(document).keyup(function (e) {
13644      if ($('.js-redirect-popup').is(':visible')) {
13645        if (e.which === 27) {
13646          // escape key maps to keycode `27`
13647          $('.js-redirect-popup').modal('hide');
13648        } else if (e.which === 13) {
13649          $('.js-redirect-ok').trigger('click');
13650        }
13651      }
13652    });
13653  },
13654      _lazyLoadCarouselImages = function _lazyLoadCarouselImages() {
13655    //Lazy load images in Bootstrap carousel slide event.
13656    //When lazyload function is called in page load only first slide is visible hence only that image gets lazyloaded
13657    $(document).on('slid.bs.carousel', function () {
13658      $('.js-media-info').find('img').each(function () {
13659        var originalSrc = $(this).data('original');
13660        $(this).attr('src', originalSrc);
13661      });
13662    });
13663  },
13664      _centerAlignColumnControlGenericText = function _centerAlignColumnControlGenericText() {
13665    // If the generic text is supposed to be vertically center aligned insede a column control
13666    $('.x-vertical-center-aligned').each(function () {
13667      var _itemToALign = $(this).closest('.generictext').closest('.clearfix');
13668      if (_itemToALign.is('[class*="col-"]')) {
13669        _itemToALign.addClass('x-center-align');
13670      }
13671    });
13672    $('.x-vertical-center-aligned').closest('.row').addClass('x-vertical-center-align');
13673  },
13674      _desicionGuideCssChanges = function _desicionGuideCssChanges() {
13675    if ($('#wcmmodeId').length) {
13676      $('.tree').find('li').each(function () {
13677        var itemElement = $(this).parent('ul').find('>li');
13678        var numberOfItems = $(itemElement).length;
13679        $(itemElement).css('width', 100 / numberOfItems + '%');
13680      });
13681    }
13682  },
13683      _readMoreLinkSlide = function _readMoreLinkSlide() {
13684    $('.x-read-more_wrapper .x-read-more_button').on('click', function (event) {
13685      event.preventDefault();
13686      var $clickedBtnRoot = $(this).parent();
13687      $clickedBtnRoot.find('.x-read-more_text').slideToggle();
13688      $clickedBtnRoot.find('.c-filter__heading-link').toggleClass('collapsed');
13689      $clickedBtnRoot.find('.x-read-more_button').toggleClass('collapsed');
13690      if (!$clickedBtnRoot.find('.x-read-more_button').hasClass('collapsed')) {
13691        $clickedBtnRoot.find('.x-read-more_button .x-read-more_link')[0].innerHTML = window.Granite.I18n.get('rdoe_generic.close', null, localStorage.getItem('i18nhint'));
13692      } else {
13693        $clickedBtnRoot.find('.x-read-more_button .x-read-more_link')[0].innerHTML = window.Granite.I18n.get('rdoe_generic.readMore', null, localStorage.getItem('i18nhint'));
13694      }
13695    });
13696  },
13697      _rteLinkAnalytics = function _rteLinkAnalytics() {
13698    var rteAnalytics = '.js-rte-analytics';
13699    if ($(rteAnalytics).length) {
13700      $(rteAnalytics).each(function (index, value) {
13701        $(value).attr({ 'data-fn-click': 'true', 'data-da-satelliteTrackEvent': 'generic-link-tracking', 'data-da-link_link-page-name': '', 'data-da-link_link-category': '', 'data-da-link_link-section': 'rteLink', 'data-da-link_link-text': $(value).text(), 'data-da-link_link-interaction-method': '' });
13702      });
13703    }
13704  },
13705      _marginPrivacyCookiePolicy = function _marginPrivacyCookiePolicy() {
13706    var $privacyModal = $('.c-privacy-page-modal');
13707    var $firstSibling = $privacyModal.siblings('header:first');
13708    if ($privacyModal.length) {
13709      $firstSibling.addClass('x-header-margin__bottom');
13710    }
13711  };
13712
13713  snro.commonUtils = {
13714    moduleName: 'commonUtils', // Added for debug logs
13715    // check if mobile
13716    isMobile: function isMobile() {
13717      return snro.globalCache.regex.mobile.test(snro.globalCache.UA);
13718    },
13719    // check if viewport is equal to mobile (resized desktop browser)
13720    isMobileMode: function isMobileMode() {
13721      return $(window).outerWidth() < 768;
13722    },
13723    // check if tablet
13724    isTablet: function isTablet() {
13725      return snro.globalCache.regex.tablet.test(snro.globalCache.UA);
13726    },
13727    // check if viewport is equal to tablet (resized desktop browser)
13728    isTabletMode: function isTabletMode() {
13729      return $(window).outerWidth() >= 768 && $(window).outerWidth() < 992;
13730    },
13731    // check if desktop
13732    isDesktop: function isDesktop() {
13733      return !this.isMobileOrTablet();
13734    },
13735    // check if desktop or tablet viewport width
13736    isTabletOrDesktopMode: function isTabletOrDesktopMode() {
13737      return this.isTabletMode() || this.isDesktopMode();
13738    },
13739    // check if viewport width is qualified desktop
13740    isDesktopMode: function isDesktopMode() {
13741      return $(window).outerWidth() >= 992;
13742    },
13743    // check if mobile or tablet
13744    isMobileOrTablet: function isMobileOrTablet() {
13745      return this.isMobile() || this.isTablet();
13746    },
13747    // check if iframe is resized
13748    resizeIframe: function resizeIframe(obj) {
13749      if (obj instanceof window.Node && obj.nodeType === 1) {
13750        // Is DOM element other than document
13751        obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
13752      }
13753    },
13754    // set local cookie
13755    setCookie: function setCookie(key, value, exp, path, domain) {
13756      if (!(typeof key === 'string' && key.length)) {
13757        return; // Key is mandatory
13758      }
13759      if (typeof value !== 'string') {
13760        value = '';
13761      } //If value is invalid by default empty string will be set
13762      var dt = new Date();
13763      if (typeof exp === 'number') {
13764        if (exp === Infinity) {
13765          dt = new Date('Thu, 31 Dec 2037 00:00:00 GMT');
13766        } else {
13767          dt.setTime(dt.getTime() + exp * 24 * 60 * 60 * 1000);
13768        }
13769      }
13770      var expires = exp ? '; expires=' + dt.toUTCString() : '',
13771          cookiePath = '; path=' + (typeof path === 'string' ? path.trim() : '/'),
13772          defaultDomain = window.location.hostname,
13773          cookieDomain = '';
13774      if (defaultDomain === 'localhost') {
13775        // IE does not allow localhost domain
13776        if (typeof domain === 'string') {
13777          cookieDomain = '; domain=' + domain.trim();
13778        }
13779      } else {
13780        cookieDomain = '; domain=' + (typeof domain === 'string' ? domain.trim() : defaultDomain);
13781      }
13782
13783      var secureCookieFlag = '';
13784      if (location.protocol === 'https:') {
13785        secureCookieFlag = '; secure';
13786      }
13787      document.cookie = key + '=' + value + expires + cookieDomain + cookiePath + secureCookieFlag;
13788    },
13789    // get cookie
13790    getCookie: function getCookie(key) {
13791      if (!(typeof key === 'string' && key.length)) {
13792        return '';
13793      }
13794      var cookieString = decodeURIComponent(document.cookie),
13795          index = 0,
13796          allCookies = [],
13797          c = '';
13798      key += '=';
13799      if ((allCookies = cookieString.split(';')).length) {
13800        for (; index < allCookies.length; index++) {
13801          if (~(c = allCookies[index].trim()).indexOf(key)) {
13802            return c.substring(key.length, c.length).trim();
13803          }
13804        }
13805      }
13806      return '';
13807    },
13808    // remove cookie
13809    removeCookie: function removeCookie(key, path, domain) {
13810      if (!(typeof key === 'string' && key.length)) {
13811        return false;
13812      }
13813      var cookiePath = typeof path === 'string' ? path : '/',
13814          defaultDomain = window.location.hostname,
13815          cookieDomain = '',
13816          deletedCookieString = '';
13817      if (defaultDomain === 'localhost') {
13818        // IE does not allow localhost domain
13819        if (typeof domain === 'string') {
13820          cookieDomain = '; domain=' + domain.trim();
13821        }
13822      } else {
13823        cookieDomain = '; domain=' + (typeof domain === 'string' ? domain.trim() : defaultDomain);
13824      }
13825      deletedCookieString = key + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC' + cookieDomain + '; path=' + cookiePath;
13826      document.cookie = deletedCookieString;
13827      return !this.getCookie(key).length; // Ensure if cookie has been deleted
13828    },
13829    // reset cookie
13830    resetCookie: function resetCookie(key, value, exp, path, domain) {
13831      this.removeCookie(key, path, domain);
13832      this.setCookie(key, value, exp, path, domain);
13833    },
13834
13835    setLocationAndLanguageCookie: function setLocationAndLanguageCookie(value, exp, path, domain) {
13836      if (window.location && window.location.hostname && window.location.hostname.endsWith(".roche.com")) {
13837        snro.commonUtils.setCookie('location-and-language', value, exp, path, domain);
13838      } else {
13839        snro.commonUtils.setCookie('location-and-language', value, exp);
13840      }
13841    },
13842
13843    createModal: function createModal(data) {
13844      var globalModalTemplate = window.roche.templates['globalModal'],
13845          globalModalHTML = globalModalTemplate(data);
13846      $('body').append(globalModalHTML);
13847    },
13848
13849    // set in storage (session / local / cookie) based on fallback
13850    storage: {
13851      available: typeof window.Storage === 'function', // True only if webstorage is available
13852      // Method to store key values in any available storages
13853      set: function set(key, value, isSession) {
13854        if (!(typeof key === 'string' && key.length)) {
13855          return;
13856        }
13857        isSession = typeof isSession === 'boolean' ? isSession : false; // By default localStorage will be used
13858        var vl = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null ? JSON.stringify(value) : value;
13859        // Check if storage is defined
13860        if (this.available) {
13861          try {
13862            if (isSession) {
13863              window.sessionStorage.setItem(key, vl);
13864            } else {
13865              window.localStorage.setItem(key, vl);
13866            }
13867            return;
13868          } catch (e) {
13869            // catch error here
13870          }
13871        }
13872        // If control has reached here, it means storage operation was unsuccessful and we need to set a cookie instead
13873        if (isSession) {
13874          // Set a session cookie
13875          snro.commonUtils.setCookie(key, vl);
13876        } else {
13877          snro.commonUtils.setCookie(key, vl, Infinity);
13878        }
13879        return;
13880      },
13881      // Method to remove key from all available storages
13882      remove: function remove(key) {
13883        if (!(typeof key === 'string' && key.length)) {
13884          return false;
13885        }
13886        if (this.available) {
13887          try {
13888            window.localStorage.removeItem(key);
13889            window.sessionStorage.removeItem(key);
13890            return !window.localStorage.key(key) || !window.sessionStorage.key(key) || snro.commonUtils.removeCookie(key);
13891          } catch (e) {
13892            //catch error here
13893          }
13894        }
13895        return snro.commonUtils.removeCookie(key);
13896      },
13897      // Get stored values from all available storages
13898      getAll: function getAll(key, isSession) {
13899        var returnValue = [],
13900            cookieValue = null;
13901        isSession = typeof isSession === 'boolean' ? isSession : false;
13902        if (this.available) {
13903          try {
13904            if (Object.prototype.hasOwnProperty.call(window.sessionStorage, key) && !isSession) {
13905              returnValue.push({ value: window.sessionStorage.getItem(key), storage: 'sessionStorage' });
13906            }
13907            if (Object.prototype.hasOwnProperty.call(window.localStorage, key)) {
13908              returnValue.push({ value: window.localStorage.getItem(key), storage: 'localStorage' });
13909            }
13910          } catch (e) {
13911            // catch error here
13912          }
13913        }
13914        if ((cookieValue === snro.commonUtils.getCookie(key)).length) {
13915          returnValue.push({ value: cookieValue, storage: 'cookie' });
13916        }
13917        return returnValue.map(function (data) {
13918          try {
13919            data.value = JSON.parse(data.value);
13920            return data;
13921          } catch (e) {
13922            return data;
13923          }
13924        });
13925      },
13926      // Get stored value from first match
13927      get: function get(key, isSession) {
13928        var storedValue = null;
13929        isSession = typeof isSession === 'boolean' ? isSession : false;
13930        if (!isSession) {
13931          // Check session storage first. Session storage should always have priority over local storage
13932          storedValue = this.getFromSessionStorage(key);
13933          if (!storedValue) {
13934            storedValue = this.getFromLocalStorage(key);
13935          }
13936        } else {
13937          // If isSession is true, then session storage is forced. In means we cannot get value from local storage
13938          storedValue = this.getFromSessionStorage(key);
13939        }
13940        // If neither of the storages have value. It means value could be in cookies
13941        if (!storedValue && !(storedValue = this.getFromCookies(key))) {
13942          return; // Return undefined
13943        }
13944        // Return the value part if value object has been successfully received
13945        return storedValue.value;
13946      },
13947      // update the value in storage
13948      update: function update(key, callbackOrValue, isSession) {
13949        var value = this.get(key);
13950        if (typeof callbackOrValue === 'function') {
13951          this.set(key, callbackOrValue(value, key), isSession);
13952        } else {
13953          this.set(key, callbackOrValue, isSession);
13954        }
13955      },
13956      // Get stored value from local storage only
13957      getFromLocalStorage: function getFromLocalStorage(key) {
13958        return this.getAll(key, true).filter(function (valueOb) {
13959          return valueOb.storage === 'localStorage';
13960        })[0];
13961      },
13962      // Get stored value from session storage only
13963      getFromSessionStorage: function getFromSessionStorage(key) {
13964        return this.getAll(key).filter(function (valueOb) {
13965          return valueOb.storage === 'sessionStorage';
13966        })[0];
13967      },
13968      // Get stored value from cookies only
13969      getFromCookies: function getFromCookies(key) {
13970        return this.getAll(key).filter(function (valueOb) {
13971          return valueOb.storage === 'cookie';
13972        })[0];
13973      }
13974    },
13975    // add ellipsis to any element container with text
13976    addEllipses: function addEllipses() {
13977      $('.ellipses').dotdotdot({ watch: true });
13978    },
13979
13980    // get fullname of country
13981    getCountryName: function getCountryName(countryCode) {
13982      if (typeof countryCode === 'string') {
13983        switch (countryCode.toLowerCase()) {
13984          case 'us':
13985            return 'United States';
13986          case 'uk':
13987            return 'United Kingdom';
13988          case 'fr':
13989            return 'France';
13990          case 'jp':
13991            return 'Japan';
13992          case 'cn':
13993            return 'China';
13994          case 'hk':
13995            return 'Hong Kong';
13996          case 'sg':
13997            return 'Singapore';
13998          default:
13999            return countryCode;
14000        }
14001      }
14002    },
14003    // check if user is logged in
14004    isLoggedIn: function isLoggedIn() {
14005      return !!this.getCookie('loggedIn');
14006    },
14007    // add loader to any target
14008    loader: function loader(target, appendMode) {
14009      var overlay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
14010
14011      target = target || 'body';
14012      var loader = void 0,
14013          loadercol = $('<div>').addClass('loading-icon js-loading-icon').prepend('<span></span><span></span>');
14014      if (!overlay) {
14015        loader = loadercol;
14016      } else {
14017        loader = $('<div>').addClass('loader-backdrop').wrapInner(loadercol);
14018      }
14019      if (target) {
14020        if (appendMode) {
14021          $(target).append(loader);
14022        } else {
14023          $(target).html(loader);
14024        }
14025      } else {
14026        return new _Loader(loader);
14027      }
14028    },
14029
14030    // log to console if debug mode
14031    log: function log() {
14032      try {
14033        // Enable logs if development environment is true or debugClientLibs param is provided
14034        if (snro.commonUtils.queryParams('debugClientLibs')) {
14035          console.log(arguments[0]);
14036        }
14037      } catch (e) {
14038        // catch error here
14039      }
14040    },
14041    // get value of any url query parameter
14042    queryParams: function queryParams(name, url) {
14043      if (!url) {
14044        url = location.href;
14045      }
14046      name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
14047      var regexS = '[\\?&]' + name + '=([^&#]*)',
14048          regex = new RegExp(regexS),
14049          results = regex.exec(url);
14050      return results === null ? null : results[1];
14051    },
14052
14053    // initialize lazyloading of images
14054    lazyloadImages: function lazyloadImages() {
14055      var $dataOriginal = $('[data-original]');
14056      $dataOriginal.each(function () {
14057        var _self = $(this);
14058        // Added for Related product for acadia selector
14059        if ($('body').hasClass('x-acadia-selector')) {
14060          $('.x-acadia-selector .c-listingTile__productAsset, .x-acadia-selector .c-tilelist__asset div, .x-acadia-selector .c-carousel__event-asset__innerWrapper, .x-acadia-selector .c-carousel__event-asset__innerWrapper div, .x-acadia-selector .product-pane__img-container, .x-acadia-selector .c-comparison-slider, .x-acadia-selector .c-carousel-slider__event-asset__innerWrapper').addClass('js-skip-lazyLoad');
14061        }
14062        var isLazyLoad = _self.parent().hasClass('js-skip-lazyLoad');
14063        if (isLazyLoad) {
14064          _self.attr('src', _self.data('original'));
14065        } else {
14066          _self.lazyload({
14067            threshold: 999,
14068            failurelimit: 10
14069          });
14070        }
14071      });
14072      if (!snro.commonUtils.isMobile() && snro.marketingTile) {
14073        snro.marketingTile.bindEvents();
14074      }
14075    },
14076    is_touch_device: function is_touch_device() {
14077      return 'ontouchstart' in window || navigator.maxTouchPoints;
14078    },
14079    validateEmail: function validateEmail(email) {
14080      var regExEmail = /^(([^<>()\[\]\\.,;:\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,}))$/;
14081      return regExEmail.test(email);
14082    },
14083    getEserviceAssignment: function getEserviceAssignment() {
14084      var sRoles = '';
14085      try {
14086        var serviceAssignment = JSON.parse(sessionStorage.getItem('ContextHubPersistence'));
14087        if (serviceAssignment && serviceAssignment.store.owpprofile.eservice_assignment) {
14088          var eservice_assignment = serviceAssignment.store.owpprofile.eservice_assignment;
14089          if (eservice_assignment.indexOf(',') !== -1) {
14090            sRoles = eservice_assignment.replace(/,/g, ' ');
14091          } else {
14092            sRoles = eservice_assignment;
14093          }
14094          if (sRoles && sRoles.indexOf('_&_') !== -1) {
14095            sRoles = sRoles.replace('_&_', '_');
14096          }
14097        }
14098      } catch (e) {
14099        snro.commonUtils.log(e);
14100      }
14101      return sRoles + ' Open';
14102    },
14103
14104
14105    // Loader constructor
14106    Loader: _Loader,
14107    // init method
14108    init: function init() {
14109      // Added since init is mandatory for all modules
14110      this.addEllipses();
14111      if (!window.Granite || !window.Granite.I18n) {
14112        window.Granite = {
14113          I18n: {
14114            get: function get() {
14115              snro.commonUtils.log('Granite is not defined');
14116            }
14117          }
14118        };
14119      }
14120      _setHintToLocalStorage();
14121      
14122      
14123      _lazyLoadCarouselImages();
14124      if ($('.x-vertical-center-aligned').length > 0) {
14125        _centerAlignColumnControlGenericText();
14126      }
14127
14128      _desicionGuideCssChanges();
14129      _readMoreLinkSlide();
14130      _marginPrivacyCookiePolicy();
14131      _rteLinkAnalytics();
14132      $('.page-loader').css('display', 'none');
14133      _defineCustomEvents();
14134
14135      // Adding commonUtils in global space
14136      if (!window.commonUtils) {
14137        // Unless there is another commonUtils js library available globally, add commonUtils to global namespace
14138        window.commonUtils = this;
14139      }
14140    }
14141  };
14142})(window, window.jQuery, window.snro);
14143
14144/*
14145 * core.js
14146 * [ To handle core functionalities on app level]
14147 *
14148 * @project:    SN-RO
14149 * @date:       2015-07-17
14150 * @author:     Shashank
14151 * @licensor:   SAPIENNITRO
14152 * @namespaces: snro
14153 */
14154
14155//this will cause the browser to check for errors more aggressively
14156'use strict';
14157
14158var snro = window.snro || {};
14159
14160// self executing function to perform core tasks
14161
14162$(function () {
14163  //$('.page-loader').css('display','block');
14164  var moduleArray = ['ajaxWrapper', 'commonUtils', 'modalPopComp', 'liipboxComp', 'dynamicMedia', 'analytics', 'addIncognitoModeComp'];
14165  $('[data-module]').each(function () {
14166    var currentModule = $(this).attr('data-module');
14167    // check if no double entry of module
14168    if (moduleArray.indexOf(currentModule) === -1) {
14169      moduleArray.push(currentModule);
14170    }
14171  });
14172
14173  // check of all available selectors to initialize corresponsing modules
14174  $.each(moduleArray, function (index, value) {
14175    try {
14176      // initialize the current module
14177      snro[value].init();
14178    } catch (e) {
14179      // catch error, if any, while initialing module
14180      snro.commonUtils.log(value + ' doesn\'t have init method.');
14181    }
14182  });
14183
14184  //Check for targeted modules and call their init functions
14185  if (window.ContextHub) {
14186    window.ContextHub.eventing.on(window.ContextHub.SegmentEngine.PageInteraction.Teaser.prototype.info.loadEvent, function () {
14187      //TODO: create a list of all personalized modules and iterate through them here.
14188      if ($('[data-module="productCategoryList"]').length) {
14189        window.snro.productCategoryList.init();
14190      }
14191      if ($('[data-module="productCategoryFilter"]').length) {
14192        window.snro.productCategoryFilter.init();
14193      }
14194    });
14195  }
14196  window.loadBingMap = function () {
14197    // callback called after the bing map is loaded
14198    window.snro.generalMap.init();
14199  };
14200});
14201
14202/*
14203 * c_headerSearchBar.js
14204 * [ This javascript code is used to display carousel component. ]
14205 *
14206 * @project:    SN-RO
14207 * @date:       2017-08-17
14208 * @author:     Bindhyachal
14209 * @licensor:   SAPIENNITRO
14210 * @namespaces: snro
14211 */
14212
14213//this will cause the browser to check for errors more aggressively
14214'use strict';
14215
14216/**
14217 * @namespace carouselComp
14218 * @memberof roche
14219 * @property {null} property - description of property
14220 */
14221
14222var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
14223
14224(function (window, $, snro) {
14225  snro = window.snro = snro || {};
14226  var _autoSuggest = false;
14227
14228  snro.headerSearchComp = {
14229    moduleName: 'headerSearchComp',
14230    filterSelected: '',
14231    // bind dom events
14232    bindEvents: function bindEvents() {
14233      var liElement = void 0,
14234          liSelected = void 0,
14235          nextElement = void 0,
14236          metaTagAttribute = $('meta[name="collection"]').attr('content'),
14237          metaTagPersona = snro.commonUtils.getCookie('persona-type'),
14238          defaultFontSizHeaderBar = $('#header-search-input').css('font-size'),
14239          defaultFontSizeSearchResult = $('#search-page-input').css('font-size');
14240      //click on body elements
14241      $('body').on('click', function (e) {
14242        if (e.target.className !== 'header-search-result-container') {
14243          $('.js-header-search-overlay .header-search-result-container').hide();
14244        } else {
14245          $('.js-header-search-overlay .header-search-result-container').show();
14246        }
14247      });
14248      //focus event for placeholder text
14249      $('body').on('focus', '.roche-header-search-input', function (e) {
14250        $(e.currentTarget).attr('placeholder', '');
14251      });
14252      //blur event for placeholder text
14253      $('body').on('blur', '.roche-header-search-input', function (e) {
14254        $(e.currentTarget).attr('placeholder', $(e.currentTarget).attr('data-placeholder'));
14255      });
14256
14257      //When search box is open, focus on input box as user starts to type
14258      $('body').on('keydown', function () {
14259        if ($('.c-header-search-bar:visible').length && !$('.roche-header-search-input:visible').is(':focus')) {
14260          $('.roche-header-search-input:visible').focus();
14261        }
14262      });
14263
14264      //function to shrink input box size
14265      var measureText = function measureText(txt, font) {
14266        var id = 'text-width-tester',
14267            $tag = $('#' + id);
14268        if (!$tag.length) {
14269          $tag = $('<span id="' + id + '" style="display:none;font:' + font + ';">' + txt + '</span>');
14270          $('body').append($tag);
14271        } else {
14272          $tag.css({ font: font }).text(txt);
14273        }
14274        return {
14275          width: $tag.width(),
14276          height: $tag.height()
14277        };
14278      };
14279      var shrinkToFill = function shrinkToFill(input, fontSize, fontWeight, fontFamily) {
14280        var $input = $(input),
14281            txt = $input.val().replace(/\s/g, 'x'),
14282            maxWidth = $input.width(),
14283            // add some padding
14284        font = fontWeight + ' ' + fontSize + 'px ' + fontFamily;
14285        // see how big the text is at the default size
14286        var textWidth = measureText(txt, font).width;
14287        if (textWidth > maxWidth) {
14288          // if it's too big, calculate a new font size
14289          // the extra .9 here makes up for some over-measures
14290          fontSize = fontSize * maxWidth / textWidth * .9;
14291          font = fontWeight + ' ' + fontSize + 'px ' + fontFamily;
14292          // and set the style on the input
14293        }
14294        $input.css({ font: font });
14295      };
14296      this.bindEvents.shrinkSearchResult = function (input, fontSize, fontWeight, fontFamily) {
14297        shrinkToFill(input, fontSize, fontWeight, fontFamily);
14298      };
14299      //key up event in input search box
14300      $('body').on('keyup', '.roche-header-search-input', function (e) {
14301        var specialKeyCodes = [37, 38, 39, 40, 65, 17];
14302        var categoryType = '';
14303        if (specialKeyCodes.indexOf(e.which) === -1) {
14304          var targetInput = e.currentTarget,
14305              start = targetInput.selectionStart,
14306              end = 0,
14307              newVal = $(targetInput).val(),
14308              charLength = newVal.length,
14309              charLengthNew = 0;
14310
14311          newVal = newVal.replace(/[*?]/g, '');
14312          charLengthNew = newVal.length;
14313          end = start + (charLengthNew - charLength);
14314          $(targetInput).val(newVal);
14315          targetInput.selectionEnd = end;
14316        }
14317        if (!snro.commonUtils.isMobile()) {
14318          $('.js-search-list-item-desk').each(function () {
14319            if ($(this).hasClass('selected')) {
14320              categoryType = $(this).data('pagetype');
14321              return false;
14322            }
14323          });
14324        } else {
14325          categoryType = $('.js-input-search-item').data('pagetype');
14326        }
14327        var url_path = $('#query-param').data("path");
14328        var country_code;
14329        var language_code;
14330        var search_qp = '';
14331        if (url_path && url_path != '' && url_path != '/' && url_path.split('/').length > 5) {
14332          country_code = url_path.split('/')[3].toUpperCase();
14333          if (country_code != "GLOBAL") {
14334            language_code = url_path.split('/')[4];
14335            search_qp = '&sp_l=' + language_code.concat('_', country_code);
14336          }
14337        }
14338
14339        var inputStringValue = $(e.currentTarget).val(),
14340            parametersToSend = {},
14341            $headerSearchResult = $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-result'),
14342            $headerContainer = $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-result-container'),
14343            $predictiveContainer = $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-predictive'),
14344            $predictiveItem = $(e.currentTarget).parents('.js-header-search-overlay').find('.header-predictive-item'),
14345            requestedUrl = $('.js-link-search').data('searchurl') + '/?ac=' + inputStringValue + '&type=autocomplete&locale=' + metaTagAttribute + '&limit=' + $('.js-link-search').data('searchsuggestioncount') + '&ps=' + metaTagPersona + '&srl=' + snro.commonUtils.getEserviceAssignment() + '&categoryType=' + categoryType + search_qp;
14346        if (snro.commonUtils.isDesktopMode()) {
14347          if (!$(e.currentTarget).parents('.c-search-results-bar').length) {
14348            shrinkToFill($(e.currentTarget), parseInt(defaultFontSizHeaderBar), '', $(e.currentTarget).css('font-family'));
14349          } else {
14350            shrinkToFill($(e.currentTarget), parseInt(defaultFontSizeSearchResult), '', $(e.currentTarget).css('font-family'));
14351          }
14352        }
14353        if (e.which === 40 || e.which === 38) {
14354          e.preventDefault();return;
14355        }
14356        if (!(e.which === 40 || e.which === 38) && inputStringValue.length > 2) {
14357          $('.js-search-delete').removeClass('hide');
14358          if (categoryType) {
14359            snro.headerSearchComp.filterSelected = categoryType;
14360          } else {
14361            //snro.headerSearchComp.filterSelected = '*';
14362            snro.headerSearchComp.filterSelected = 'all';
14363          }
14364
14365          $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-button').addClass('header-search-button--active');
14366          $('.js-header-search-overlay .header-search-predictive').hide();
14367          liSelected = '';
14368
14369          //predictive Search Item
14370          var checkPredictiveSearchItem = function checkPredictiveSearchItem(items) {
14371            var pSArray = [];
14372            if (items.length) {
14373              $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-predictive').show();
14374              for (var i = 0; i < items.length; i++) {
14375                pSArray.push(items[i].suggestTerm);
14376                if (i + 1 === items.length) {
14377                  $(e.currentTarget).parents('.js-header-search-overlay').find('.header-predictive-item').append('<span class="js-suggestive-terms header-predictive-item--val">' + items[i].suggestTerm + '</span>');
14378                } else {
14379                  $(e.currentTarget).parents('.js-header-search-overlay').find('.header-predictive-item').append('<span class="js-suggestive-terms header-predictive-item--val">' + items[i].suggestTerm + '<span class="suggestive-helper--text js-suggestive-helper--text">' + ' ' + window.Granite.I18n.get('rdoe_search.suggestion_ortext', null, localStorage.getItem('i18nhint')) + ' ' + '</span></span>');
14380                }
14381              }
14382            } else {
14383              $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-predictive').hide();
14384            }
14385            localStorage.setItem('suggestionStorage', pSArray);
14386          };
14387          //success ajax callback
14388          var populateSuggestions = function populateSuggestions(data) {
14389            if (inputStringValue.length === 0) {
14390              $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-result').fadeOut();
14391            } else {
14392              // Show the result List box
14393              var $ul = $('<ul>'),
14394                  jsonData = '';
14395              try {
14396                jsonData = JSON.parse(data);
14397              } catch (e) {
14398                jsonData = data;
14399              }
14400              if ((typeof jsonData === 'undefined' ? 'undefined' : _typeof(jsonData)) === 'object' && jsonData !== null) {
14401                if (jsonData.results.length > 0) {
14402                  _autoSuggest = true;
14403                  $(jsonData.results).each(function (i, match) {
14404                    var trimmedText = '',
14405                        originalText = '',
14406                        startWith = new RegExp('^' + inputStringValue),
14407                        emptyString = ' ',
14408                        endsWithEmpty = new RegExp(emptyString + '$'),
14409                        endsCharacters = '';
14410                    if (match.title.toLocaleLowerCase().indexOf(inputStringValue.toLocaleLowerCase()) !== -1) {
14411                      trimmedText = match.title.substring(inputStringValue.length, match.title.length);
14412                      originalText = match.title.substring(0, inputStringValue.length);
14413                    }
14414                    if (match.title.toLocaleLowerCase().match(startWith)) {
14415                      // do this if begins with Hello
14416                      //if(categoryType ==='*') {
14417                      if (categoryType === 'all') {
14418                        $ul.append('<li class="drop-text"><a class="x-sub-hover" href="' + match.url + '" title="' + match.url + '"><span class="color-white">' + originalText + '</span><span class="color-blue">' + trimmedText + '</span><span class="color-blue search-helper-text">' + window.Granite.I18n.get('rdoe_search.suggestion_intext', null, localStorage.getItem('i18nhint')) + '</span><span class="color-white">' + window.Granite.I18n.get('rdoe_title.' + match.pageType, null, localStorage.getItem('i18nhint')) + '</span></a></li>');
14419                      } else {
14420                        $ul.append('<li class="drop-text"><a class="x-sub-hover" href="' + match.url + '" title="' + match.url + '"><span class="color-white">' + originalText + '</span><span class="color-blue">' + trimmedText + '</span><span class="color-blue search-helper-text"></span><span class="color-white"></span></a></li>');
14421                      }
14422                    } else {
14423                      if (inputStringValue.match(endsWithEmpty)) {
14424                        inputStringValue = inputStringValue.trim();
14425                      }
14426
14427                      if (match.title.toLocaleLowerCase().indexOf(inputStringValue.toLocaleLowerCase()) === -1) {
14428                        trimmedText = match.title;
14429                      } else {
14430                        trimmedText = match.title.substr(0, match.title.toLocaleLowerCase().indexOf(inputStringValue.toLocaleLowerCase()));
14431                        originalText = match.title.substr(match.title.toLocaleLowerCase().indexOf(inputStringValue.toLocaleLowerCase()), inputStringValue.length);
14432                        endsCharacters = match.title.substr(match.title.toLocaleLowerCase().indexOf(inputStringValue.toLocaleLowerCase()) + inputStringValue.length, match.title.length);
14433                      }
14434                      //if(categoryType ==='*') {
14435                      if (categoryType === 'all') {
14436                        $ul.append('<li class="drop-text"><a class="x-sub-hover" href="' + match.url + '" title="' + match.url + '"><span class="color-blue">' + trimmedText + '</span><span class="color-white">' + originalText + '</span><span class="color-blue">' + endsCharacters + '</span><span class="color-blue search-helper-text">' + window.Granite.I18n.get('rdoe_search.suggestion_intext', null, localStorage.getItem('i18nhint')) + '</span><span class="color-white">' + window.Granite.I18n.get('rdoe_title.' + match.pageType, null, localStorage.getItem('i18nhint')) + '</span></a></li>');
14437                      } else {
14438                        $ul.append('<li class="drop-text"><a class="x-sub-hover" href="' + match.url + '" title="' + match.url + '"><span class="color-blue">' + trimmedText + '</span><span class="color-white">' + originalText + '</span><span class="color-blue">' + endsCharacters + '</span><span class="color-blue search-helper-text"></span><span class="color-white"></span></a></li>');
14439                      }
14440                    }
14441                  });
14442                  $headerSearchResult.empty().append($ul).fadeIn();
14443                  $headerContainer.show();
14444                  $predictiveContainer.fadeOut();
14445                } else {
14446                  $headerSearchResult.fadeOut();
14447                  $predictiveItem.empty();
14448                  //condition for predictive search to go here
14449                  checkPredictiveSearchItem(jsonData.suggestions);
14450                }
14451              } else {
14452                $('.js-header-search-overlay .header-search-result').fadeOut();
14453              }
14454            }
14455          };
14456          if (navigator.appVersion.indexOf('MSIE 9') !== -1) {
14457            $.getJSON(requestedUrl).done(function (data) {
14458              populateSuggestions(data);
14459            });
14460          } else {
14461            parametersToSend = {
14462              url: requestedUrl,
14463              type: 'GET',
14464              dataType: 'json'
14465            };
14466            snro.ajaxWrapper.getXhrObj(parametersToSend).done(function (data) {
14467              populateSuggestions(data);
14468            }).fail(function (err) {
14469              console.log(err);
14470            });
14471          }
14472        } else {
14473          $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-button').removeClass('header-search-button--active');
14474          $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-result').fadeOut();
14475          $predictiveContainer.fadeOut();
14476          $headerContainer.fadeOut();
14477          var intervalTimer = setTimeout(function () {
14478            if (e.which === 8 && inputStringValue.length <= 2) {
14479              $predictiveContainer.fadeOut();
14480            }
14481            clearTimeout(intervalTimer);
14482          }, 1000);
14483          $('.js-search-delete').addClass('hide');
14484        }
14485      });
14486
14487      //function for arrow key function accessibility
14488      $('body').on('keydown', '.roche-header-search-input', function (e) {
14489        liElement = $('.js-header-search-overlay .header-search-result ul li');
14490        //let key = e.keyCode;
14491        if (e.which === 40) {
14492          //down arrow
14493          if (liSelected) {
14494
14495            liSelected.removeClass('selected');
14496            nextElement = liSelected.next();
14497            if (nextElement.length > 0) {
14498              liSelected = nextElement.addClass('selected');
14499            } else {
14500              liSelected = liElement.eq(0).addClass('selected');
14501            }
14502          } else {
14503            liSelected = liElement.eq(0).addClass('selected');
14504          }
14505          $(liSelected).focus();
14506        } else if (e.which === 38) {
14507          //up arror
14508          if (liSelected) {
14509
14510            liSelected.removeClass('selected');
14511            nextElement = liSelected.prev();
14512            if (nextElement.length > 0) {
14513              liSelected = nextElement.addClass('selected');
14514            } else {
14515              liSelected = liElement.last().addClass('selected');
14516            }
14517          } else {
14518            liSelected = liElement.last().addClass('selected');
14519          }
14520          $(liSelected).focus();
14521        } else if (e.which === 13) {
14522          // the enter key code
14523          if (liSelected) {
14524            location.href = $(liSelected).find('a').attr('href');
14525          } else {
14526            $('.header-search-button').trigger('click');
14527          }
14528          snro.commonUtils.setCookie('selectedFilter', snro.headerSearchComp.filterSelected);
14529          $('.js-header-search-overlay .header-search-result').hide();
14530        }
14531      });
14532      var superEncodeURI = function superEncodeURI(url) {
14533        var encodedStr = '',
14534            urlEncoded = encodeURI(url);
14535        encodedStr = urlEncoded.replace(/[()<>]/g, function (char) {
14536          return '%' + parseInt(char.charCodeAt().toString(16));
14537        });
14538        return encodedStr;
14539      };
14540
14541      var redirectToListing = function redirectToListing(context) {
14542        var searchTerm = $(context).parents('.js-header-search-overlay').find('.roche-header-search-input').val();
14543        if ($(context).find('a').length && $(context).find('a').data('href')) {
14544          location.href = $('.js-link-search').data('searchresult') + '.html?q=' + searchTerm;
14545        }
14546      };
14547      //search button click
14548      $('body').on('click', '.header-search-button', function (e) {
14549        var searchResult = $(e.currentTarget).parents('.roche-header-search-box').find('.roche-header-search-input').val();
14550        if (searchResult.length > 2) {
14551          searchResult = superEncodeURI(searchResult);
14552          snro.commonUtils.setCookie('selectedFilter', snro.headerSearchComp.filterSelected);
14553          location.href = $('.js-link-search').data('searchresult') + '.html?q=' + searchResult + '&autoSuggest=' + _autoSuggest;
14554        }
14555      });
14556      $('body').on('click', '.js-suggestive-terms', function (e) {
14557        if (!$(e.target).hasClass('js-suggestive-helper--text')) {
14558          if ($(e.currentTarget).find('.js-suggestive-helper--text').text()) {
14559            $(e.currentTarget).parents('.js-header-search-overlay').find('.roche-header-search-input').val($(e.currentTarget).text().split($(e.currentTarget).find('.js-suggestive-helper--text').text())[0]);
14560          } else {
14561            $(e.currentTarget).parents('.js-header-search-overlay').find('.roche-header-search-input').val($(e.currentTarget).text());
14562          }
14563          $(e.currentTarget).parents('.js-header-search-overlay').find('.header-search-predictive').hide();
14564          $('.roche-header-search-input').trigger('keyup');
14565          $(e.currentTarget).parents('.js-header-search-overlay').find('.roche-header-search-input').focus();
14566        }
14567      });
14568      $('body').on('click', '.js-mobile-search-sort', function () {
14569        $('.js-mobile-search-list').toggleClass('hide');
14570        $('.js-mobile-search-sort').toggleClass('c-list-show');
14571      });
14572      $('body').focusout(function () {
14573        $('.js-mobile-search-list').addClass('hide');
14574        $('.js-mobile-search-sort').removeClass('c-list-show');
14575      });
14576
14577      $('body').on('click touchstart', '.js-search-list-item', function (e) {
14578        $('.js-search-list-item').removeClass('selected');
14579        $(e.currentTarget).addClass('selected');
14580        $('.js-input-search-item').val($(e.target).text().trim());
14581        $('.js-input-search-item').data('pagetype', $(e.currentTarget).data('pagetype'));
14582        $('.js-mobile-search-list').toggleClass('hide');
14583        $('.js-mobile-search-sort').toggleClass('c-list-show');
14584        snro.commonUtils.setCookie('selectedFilter', $(e.target).text().trim());
14585        redirectToListing(e.currentTarget);
14586        $('.roche-header-search-input').trigger('keyup');
14587      });
14588      $('body').on('click', '.js-search-delete', function (e) {
14589        $('.js-header-search-input').val('');
14590        $(e.currentTarget).addClass('hide');
14591      });
14592      $('body').on('click', '.js-search-list-item-desk', function (e) {
14593        $('.js-search-list-item-desk').removeClass('selected');
14594        $(e.currentTarget).addClass('selected');
14595        snro.commonUtils.setCookie('selectedFilter', $(e.currentTarget).text().trim());
14596        redirectToListing(e.currentTarget);
14597        $('.roche-header-search-input').trigger('keyup');
14598      });
14599    },
14600    prefillSearchBox: function prefillSearchBox() {
14601      var searchParam = snro.commonUtils.queryParams('q').trim();
14602      if (searchParam !== '') {
14603        if (decodeURIComponent(searchParam) !== searchParam) {
14604          searchParam = searchParam.replace(/25/g, '');
14605        }
14606        searchParam = decodeURIComponent(searchParam).replace(/</g, '< ');
14607        $('#search-page-input').val(searchParam);
14608        snro.headerSearchComp.bindEvents.shrinkSearchResult($('#search-page-input'), parseInt($('#search-page-input').css('font-size')), '', $('#search-page-input').css('font-family'));
14609        if (searchParam.length > 2) {
14610          $('#search-page-input').parents('.header-search-overlay').find('.header-search-button').addClass('header-search-button--active');
14611        }
14612      }
14613    },
14614    init: function init() {
14615      this.bindEvents();
14616      this.prefillSearchBox();
14617    }
14618  };
14619})(window, window.jQuery, window.snro);
14620
14621this["roche"] = this["roche"] || {};
14622this["roche"]["templates"] = this["roche"]["templates"] || {};
14623
14624this["roche"]["templates"]["concentricCircles"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14625    var helper;
14626
14627  return " <a class=\"js-conc-circles c-concentric-circles c-outer-circle\" href=\"javascript:void(0)\" data-fn-click=\"true\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n	            data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"click points\" data-da-link_link-header=\"click points\"\n	            data-da-link_link-text=\""
14628    + container.escapeExpression(((helper = (helper = helpers.headline || (depth0 != null ? depth0.headline : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"headline","hash":{},"data":data}) : helper)))
14629    + "\" data-da-link_link-interaction-method=\"\">\n    <div class=\"c-inner-circle\"></div>\n</a>";
14630},"useData":true});
14631
14632this["roche"]["templates"]["decisionguideProductView"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14633    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14634
14635  return "<div class=\"c-decisionguide__product col-xs-12 col-sm-4\">\n    <div class=\"c-decisionguide__product-heading ellipses\" title=\""
14636    + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
14637    + "\">\n        "
14638    + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper)))
14639    + "\n    </div>\n    <div class=\"c-decisionguide__product-image\">\n        <img src=\"/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/blank.png\" data-src=\""
14640    + alias4(((helper = (helper = helpers.image || (depth0 != null ? depth0.image : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"image","hash":{},"data":data}) : helper)))
14641    + "\"\n          alt=\""
14642    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.altText : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
14643    + "\" class=\"js-dynamic-image\" data-template=\"decisionguideProductView\" data-processed=\"false\"\n        />\n    </div>\n"
14644    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14645    + "    <a href=\""
14646    + alias4(((helper = (helper = helpers.path || (depth0 != null ? depth0.path : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"path","hash":{},"data":data}) : helper)))
14647    + "\" class=\"x-submit-button label-ellipses x-sub-hover c-decisionguide__product-link\" target=\"_self\" data-fn-click=\"true\" data-da-satellitetrackevent=\"generic-link-tracking\" data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"decisionguide\" data-da-link_link-header=\"decision guide\" data-da-link_link-text=\"Learn more\" data-da-link_link-interaction-method=\"\">\n        "
14648    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_generic.learn_more",{"name":"i18keyToValue","hash":{},"data":data}))
14649    + "\n    </a>\n</div>\n";
14650},"2":function(container,depth0,helpers,partials,data) {
14651    var helper;
14652
14653  return container.escapeExpression(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}
vendor: 4,285 bytes, lines 14653-14693
14653),{"name":"altText","hash":{},"data":data}) : helper)));
14654},"4":function(container,depth0,helpers,partials,data) {
14655    var helper;
14656
14657  return container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"name","hash":{},"data":data}) : helper)));
14658},"6":function(container,depth0,helpers,partials,data) {
14659    var helper;
14660
14661  return "        <div class=\"c-decisionguide__product-desc hidden-xs ellipses\">\n            "
14662    + container.escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"description","hash":{},"data":data}) : helper)))
14663    + "\n        </div>\n";
14664},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14665    var stack1;
14666
14667  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14668},"useData":true});
14669
14670this["roche"]["templates"]["decisionguideQuestionView"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) {
14671    var stack1;
14672
14673  return "                \n"
14674    + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depths[1] != null ? depths[1].isCheckbox : depths[1]),{"name":"if","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.program(4, data, 0, blockParams, depths),"data":data})) != null ? stack1 : "");
14675},"2":function(container,depth0,helpers,partials,data) {
14676    var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14677
14678  return "                    <div class=\"c-decisionguide__answer checkbox\">\n                        <label>\n                            <input class=\"js-decision-answer\" name=\"decisionguideAns\" data-answer-tag=\""
14679    + alias4(((helper = (helper = helpers.answerTag || (depth0 != null ? depth0.answerTag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"answerTag","hash":{},"data":data}) : helper)))
14680    + "\" data-answer-short-desc=\""
14681    + alias4(((helper = (helper = helpers.desc || (depth0 != null ? depth0.desc : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"desc","hash":{},"data":data}) : helper)))
14682    + "\" value=\""
14683    + alias4(((helper = (helper = helpers.answerId || (depth0 != null ? depth0.answerId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"answerId","hash":{},"data":data}) : helper)))
14684    + "\" type=\"checkbox\" />\n                            <span class=\"customCheckbox\"></span>\n                            <span class=\"c-decisionguide__answer-text\"> "
14685    + alias4(((helper = (helper = helpers.answer || (depth0 != null ? depth0.answer : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"answer","hash":{},"data":data}) : helper)))
14686    + "</span>\n                        </label>\n                    </div>\n";
14687},"4":function(container,depth0,helpers,partials,data) {
14688    var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14689
14690  return "                    <div class=\"c-decisionguide__answer radio\">\n                        <label>\n                            <input class=\"js-decision-answer\" name=\"decisionguideAns\" data-answer-tag=\""
14691    + alias4(((helper = (helper = helpers.answerTag || (depth0 != null ? depth0.answerTag : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"answerTag","hash":{},"data":data}) : helper)))
14692    + "\" data-answer-short-desc=\""
14693    + alias4(((helper = (helper = helpers.desc || (depth0 != null ? depth0.desc 
vendor: 26,535 bytes, lines 14693-14919
14693: depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"desc","hash":{},"data":data}) : helper)))
14694    + "\" value=\""
14695    + alias4(((helper = (helper = helpers.answerId || (depth0 != null ? depth0.answerId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"answerId","hash":{},"data":data}) : helper)))
14696    + "\" type=\"radio\" />\n                            <span class=\"customRadio\"></span>\n                            <span class=\"c-decisionguide__answer-text\"> "
14697    + alias4(((helper = (helper = helpers.answer || (depth0 != null ? depth0.answer : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"answer","hash":{},"data":data}) : helper)))
14698    + "</span>\n                        </label>\n                    </div>\n";
14699},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) {
14700    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14701
14702  return "<div class=\"js-decisionguide-question c-decisionguide__question-container\">\n    <div class=\"c-decisionguide__topic-name\">"
14703    + alias4(((helper = (helper = helpers.headline || (depth0 != null ? depth0.headline : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"headline","hash":{},"data":data}) : helper)))
14704    + "</div>\n    <div class=\"c-decisionguide__question-wrapper js-decisionguide-question-wrapper\">\n        <div class=\"c-decisionguide__question\">"
14705    + alias4(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"description","hash":{},"data":data}) : helper)))
14706    + "</div>\n        <div class=\"c-decisionguide__answer-wrapper\">\n            <form>\n"
14707    + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.answerMap : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14708    + "            </form>\n        </div>\n    </div>\n</div>";
14709},"useData":true,"useDepths":true});
14710
14711this["roche"]["templates"]["featureBenifits"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14712    return "<li>\n	"
14713    + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0))
14714    + "\n</li>\n";
14715},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14716    var stack1;
14717
14718  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14719},"useData":true});
14720
14721this["roche"]["templates"]["gdprCountryPicker"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14722    var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14723
14724  return "<div class=\"c-gdpr-section__heading\">"
14725    + alias4(((helper = (helper = helpers.gdprTitle || (depth0 != null ? depth0.gdprTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"gdprTitle","hash":{},"data":data}) : helper)))
14726    + "</div>\n<div class=\"c-gdpr-section__description\">"
14727    + alias4(((helper = (helper = helpers.gdprDescription || (depth0 != null ? depth0.gdprDescription : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"gdprDescription","hash":{},"data":data}) : helper)))
14728    + "\n    <div class=\"c-gdpr-section__links\">\n    <div class=\"c-gdpr-section__links--privacy\">\n        <a class=\"x-global-seconday-cta x-sub-hover\" tabindex=\"1\" href=\""
14729    + alias4(((helper = (helper = helpers.GdprPrivacyLink || (depth0 != null ? depth0.GdprPrivacyLink : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"GdprPrivacyLink","hash":{},"data":data}) : helper)))
14730    + "?link1=true\" target=\"_blank\">\n            <span class=\"x-global-seconday-cta__text\">"
14731    + alias4(((helper = (helper = helpers.GdprPrivacyText || (depth0 != null ? depth0.GdprPrivacyText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"GdprPrivacyText","hash":{},"data":data}) : helper)))
14732    + "</span>\n            <i class=\"icon-secondaryCTA_dropDown\"></i>\n            <i class=\"icon-secondaryCTA_bluefilled\"></i>\n\n        </a>\n    </div>\n\n    <div class=\"c-gdpr-section__links--cookie\">\n        <a class=\"x-global-seconday-cta x-sub-hover\" tabindex=\"1\" href=\""
14733    + alias4(((helper = (helper = helpers.GdprCookieLink || (depth0 != null ? depth0.GdprCookieLink : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"GdprCookieLink","hash":{},"data":data}) : helper)))
14734    + "?link2=true\" target=\"_blank\">\n            <span class=\"x-global-seconday-cta__text\">"
14735    + alias4(((helper = (helper = helpers.GdprCookieText || (depth0 != null ? depth0.GdprCookieText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"GdprCookieText","hash":{},"data":data}) : helper)))
14736    + "</span>\n            <span>\n                <i class=\"icon-secondaryCTA_dropDown\"></i>\n                <i class=\"icon-secondaryCTA_bluefilled\"></i>\n            </span>\n        </a>\n    </div>\n    </div>\n    <div class=\"c-gdpr-section__copyright\">"
14737    + alias4(((helper = (helper = helpers.GdprCopyrightText || (depth0 != null ? depth0.GdprCopyrightText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"GdprCopyrightText","hash":{},"data":data}) : helper)))
14738    + "</div>\n</div>\n";
14739},"useData":true});
14740
14741this["roche"]["templates"]["globalModal"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14742    var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14743
14744  return "<div class=\"x-modal x-modal-up fade modal in "
14745    + alias4(((helper = (helper = helpers.modalClass || (depth0 != null ? depth0.modalClass : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalClass","hash":{},"data":data}) : helper)))
14746    + "\" id=\""
14747    + alias4(((helper = (helper = helpers.modalId || (depth0 != null ? depth0.modalId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalId","hash":{},"data":data}) : helper)))
14748    + "\"  role=\"dialog\" aria-labelledby=\""
14749    + alias4(((helper = (helper = helpers.modalName || (depth0 != null ? depth0.modalName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalName","hash":{},"data":data}) : helper)))
14750    + "\" aria-hidden=\"true\">\n      <div class=\"c-modal-up-dialog modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n          <div class=\"modal-content__header modal-header\">\n            <h3 class=\"modal-title x-h3\">"
14751    + alias4(((helper = (helper = helpers.modalTitle || (depth0 != null ? depth0.modalTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalTitle","hash":{},"data":data}) : helper)))
14752    + "</h3>\n            <button type=\"button\" class=\"close "
14753    + alias4(((helper = (helper = helpers.btnClassClose || (depth0 != null ? depth0.btnClassClose : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnClassClose","hash":{},"data":data}) : helper)))
14754    + "\" data-dismiss=\"modal\" aria-label=\"${'rdoe_generic.close' @ i18n}\">\n            </button>\n          </div>\n          <div class=\"modal-content__body modal-body\">"
14755    + alias4(((helper = (helper = helpers.modalBodyText || (depth0 != null ? depth0.modalBodyText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalBodyText","hash":{},"data":data}) : helper)))
14756    + "</div>\n          <div class=\"modal-content__footer modal-footer\">\n            <button type=\"button\" class=\"x-submit-button btn-primary "
14757    + alias4(((helper = (helper = helpers.btnClassConfirm || (depth0 != null ? depth0.btnClassConfirm : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnClassConfirm","hash":{},"data":data}) : helper)))
14758    + "\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n               data-da-link_link-page-name=\"\" \n               data-da-link_link-category=\"\" \n               data-da-link_link-section=\""
14759    + alias4(((helper = (helper = helpers.modalName || (depth0 != null ? depth0.modalName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalName","hash":{},"data":data}) : helper)))
14760    + "\"\n               data-da-link_link-header=\""
14761    + alias4(((helper = (helper = helpers.modalTitle || (depth0 != null ? depth0.modalTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalTitle","hash":{},"data":data}) : helper)))
14762    + "\"\n               data-da-link_link-text=\""
14763    + alias4(((helper = (helper = helpers.btnTextConfirm || (depth0 != null ? depth0.btnTextConfirm : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnTextConfirm","hash":{},"data":data}) : helper)))
14764    + "\">"
14765    + alias4(((helper = (helper = helpers.btnTextConfirm || (depth0 != null ? depth0.btnTextConfirm : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnTextConfirm","hash":{},"data":data}) : helper)))
14766    + "</button>\n            <button type=\"button\" class=\"x-submit-button btn-secondary "
14767    + alias4(((helper = (helper = helpers.btnClassCancel || (depth0 != null ? depth0.btnClassCancel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnClassCancel","hash":{},"data":data}) : helper)))
14768    + "\" data-dismiss=\"modal\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n               data-da-link_link-page-name=\"\" \n               data-da-link_link-category=\"\" \n               data-da-link_link-section=\""
14769    + alias4(((helper = (helper = helpers.modalName || (depth0 != null ? depth0.modalName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalName","hash":{},"data":data}) : helper)))
14770    + "\"\n               data-da-link_link-header=\""
14771    + alias4(((helper = (helper = helpers.modalTitle || (depth0 != null ? depth0.modalTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"modalTitle","hash":{},"data":data}) : helper)))
14772    + "\"\n               data-da-link_link-text=\""
14773    + alias4(((helper = (helper = helpers.btnTextCancel || (depth0 != null ? depth0.btnTextCancel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnTextCancel","hash":{},"data":data}) : helper)))
14774    + "\">"
14775    + alias4(((helper = (helper = helpers.btnTextCancel || (depth0 != null ? depth0.btnTextCancel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"btnTextCancel","hash":{},"data":data}) : helper)))
14776    + "</button>\n          </div>\n        </div>\n      </div>\n</div>\n";
14777},"useData":true});
14778
14779this["roche"]["templates"]["imageHotspotOverlay"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14780    return "c-bottom-spacing";
14781},"3":function(container,depth0,helpers,partials,data) {
14782    var helper;
14783
14784  return "        <p class=\"c-overlay-headline\">"
14785    + container.escapeExpression(((helper = (helper = helpers.headline || (depth0 != null ? depth0.headline : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"headline","hash":{},"data":data}) : helper)))
14786    + "</p>\n";
14787},"5":function(container,depth0,helpers,partials,data) {
14788    var helper;
14789
14790  return "        <p class=\"c-overlay-description ellipses\">"
14791    + container.escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"description","hash":{},"data":data}) : helper)))
14792    + "</p>\n";
14793},"7":function(container,depth0,helpers,partials,data) {
14794    var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14795
14796  return "        <a class=\"c-learn-more-link\" href=\""
14797    + alias4(((helper = (helper = helpers.ctaLink || (depth0 != null ? depth0.ctaLink : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"ctaLink","hash":{},"data":data}) : helper)))
14798    + "\" target=\""
14799    + alias4(((helper = (helper = helpers.target || (depth0 != null ? depth0.target : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"target","hash":{},"data":data}) : helper)))
14800    + "\">\n            "
14801    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_imageHotspotOverlay.LearnMore_text",{"name":"i18keyToValue","hash":{},"data":data}))
14802    + "\n            <span class=\"x-secondary-cta hero-image-secondary-cta\">\n              <i class=\"icon-secondaryCTA_dropDown\"></i>\n              <i class=\"icon-secondaryCTA_bluefilled\"></i>\n              \n            </span>\n        </a>\n";
14803},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14804    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
14805
14806  return "<div class=\"js-img-hotspot-overlay c-img-hotspot-overlay\">\n        <div class=\"closeBtn\"></div>\n    <div class=\"c-overlay-container "
14807    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.ctaLink : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14808    + "\">\n"
14809    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.headline : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14810    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14811    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.ctaLink : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14812    + "    </div>\n</div>\n\n        ";
14813},"useData":true});
14814
14815this["roche"]["templates"]["intendedUse"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14816    return "<p>"
14817    + container.escapeExpression(container.lambda((depth0 != null ? depth0.value : depth0), depth0))
14818    + "</p>\n";
14819},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14820    var stack1;
14821
14822  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14823},"useData":true});
14824
14825this["roche"]["templates"]["newsEventsListingTile"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14826    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
14827
14828  return " <section class=\"c-listingtile "
14829    + alias4(((helper = (helper = helpers["page-type"] || (depth0 != null ? depth0["page-type"] : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page-type","hash":{},"data":data}) : helper)))
14830    + "\">\n    <div class=\"c-listingtile__row resource-listing-row\">\n      <a href=\""
14831    + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"url","hash":{},"data":data}) : helper)))
14832    + "\" itemprop=\"url\" class=\"c-listingtile__link\"\n         data-fn-click=\"true\"\n         data-da-satelliteTrackEvent=\""
14833    + alias4(((helper = (helper = helpers.satelliteTrackEvent || (depth0 != null ? depth0.satelliteTrackEvent : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"satelliteTrackEvent","hash":{},"data":data}) : helper)))
14834    + "\"\n         data-da-link_link-Page-Name=\"\"\n         data-da-link_link-Category=\"\"\n         data-da-link_link-Section=\""
14835    + alias4(((helper = (helper = helpers.linkSection || (depth0 != null ? depth0.linkSection : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"linkSection","hash":{},"data":data}) : helper)))
14836    + "\"\n         data-da-link_link-Text=\""
14837    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
14838    + "\"\n         data-da-link_link-Interaction-Method=\"\"\n         data-da-link_content-type=\""
14839    + alias4(((helper = (helper = helpers["page-type"] || (depth0 != null ? depth0["page-type"] : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page-type","hash":{},"data":data}) : helper)))
14840    + "\"\n         data-da-link_content-title=\""
14841    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
14842    + "\"\n         data-da-link_content-id=\"\"\n         data-da-link_content-AdditionalInformation=\"\"\n         data-da-link_link-header=\""
14843    + alias4(((helper = (helper = helpers["page-type"] || (depth0 != null ? depth0["page-type"] : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page-type","hash":{},"data":data}) : helper)))
14844    + "\"\n         data-da-link_event=\"content-clicked\"\n         data-da-search_selected-position=\""
14845    + alias4(((helper = (helper = helpers.searchIndex || (depth0 != null ? depth0.searchIndex : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"searchIndex","hash":{},"data":data}) : helper)))
14846    + "\">\n        <div class=\"c-listingtile__col resource-listing-col\">\n"
14847    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14848    + "\n"
14849    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentTypeIcon : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14850    + "\n\n"
14851    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"resource-center",{"name":"ifEquals","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14852    + "\n"
14853    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.assetFileName : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14854    + "\n"
14855    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14856    + "\n"
14857    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14858    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.subTitle : depth0),{"name":"if","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14859    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateRange : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14860    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14861    + "\n"
14862    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"resource-center",{"name":"ifEquals","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14863    + "\n        </div>\n      </a>\n    </div>\n  </section>\n";
14864},"2":function(container,depth0,helpers,partials,data) {
14865    var helper;
14866
14867  return "          <div class=\"c-listingtile__date resource-date\" data-dateformat=\""
14868    + container.escapeExpression(((helper = (helper = helpers.eventDateFormat || (depth0 != null ? depth0.eventDateFormat : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"eventDateFormat","hash":{},"data":data}) : helper)))
14869    + "\"></div>\n";
14870},"4":function(container,depth0,helpers,partials,data) {
14871    var helper;
14872
14873  return "          <div class=\"resource-center__document-img\">\n            <div>\n              <img src ="
14874    + container.escapeExpression(((helper = (helper = helpers.documentTypeIcon || (depth0 != null ? depth0.documentTypeIcon : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"documentTypeIcon","hash":{},"data":data}) : helper)))
14875    + " alt=\"document-icon\"></img>\n            </div>\n          </div>\n";
14876},"6":function(container,depth0,helpers,partials,data) {
14877    return "            <div class=\"resource-center__content\"> \n";
14878},"8":function(container,depth0,helpers,partials,data) {
14879    var helper;
14880
14881  return "          <div class=\"resource-center__file-name\">\n\n             "
14882    + container.escapeExpression(((helper = (helper = helpers.assetFileName || (depth0 != null ? depth0.assetFileName : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"assetFileName","hash":{},"data":data}) : helper)))
14883    + "\n          </div>\n";
14884},"10":function(container,depth0,helpers,partials,data) {
14885    var stack1, helper;
14886
14887  return "            <p class=\"c-listingtile__title resource-listing-title\">"
14888    + ((stack1 = ((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"title","hash":{},"data":data}) : helper))) != null ? stack1 : "")
14889    + "</p>\n";
14890},"12":function(container,depth0,helpers,partials,data) {
14891    var helper;
14892
14893  return "          <div class=\"resource-center__document-type x-oval-icon\"> \n            "
14894    + container.escapeExpression(((helper = (helper = helpers.documentType || (depth0 != null ? depth0.documentType : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"documentType","hash":{},"data":data}) : helper)))
14895    + "\n          </div>\n";
14896},"14":function(container,depth0,helpers,partials,data) {
14897    var stack1, helper;
14898
14899  return "            <p class=\"c-listingtile__subTitle\">"
14900    + ((stack1 = ((helper = (helper = helpers.subTitle || (depth0 != null ? depth0.subTitle : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"subTitle","hash":{},"data":data}) : helper))) != null ? stack1 : "")
14901    + "</p>\n";
14902},"16":function(container,depth0,helpers,partials,data) {
14903    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
14904
14905  return "          <ul class=\"c-listingtile__event\">\n"
14906    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14907    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.venue : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14908    + "          </ul>\n";
14909},"17":function(container,depth0,helpers,partials,data) {
14910    var stack1, helper;
14911
14912  return "              <li class=\"c-listingtile__eventdata\">"
14913    + ((stack1 = ((helper = (helper = helpers.eventDateRange || (depth0 != null ? depth0.eventDateRange : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"eventDateRange","hash":{},"data":data}) : helper))) != null ? stack1 : "")
14914    + "</li>\n";
14915},"19":function(container,depth0,helpers,partials,data) {
14916    var stack1, helper;
14917
14918  return "              <li class=\"c-listingtile__eventdata\">"
14919    + ((stack1 = ((helper = (helper = helpers.venue || (depth0 != null ? depth0.venue : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}
vendor: 4,406 bytes, lines 14919-14974
14919),{"name":"venue","hash":{},"data":data}) : helper))) != null ? stack1 : "")
14920    + "</li>\n";
14921},"21":function(container,depth0,helpers,partials,data) {
14922    var stack1, helper;
14923
14924  return "            <div class=\"c-listingtile__description resource-listing-description\">"
14925    + ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "")
14926    + "</div>\n";
14927},"23":function(container,depth0,helpers,partials,data) {
14928    return "            </div> \n";
14929},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14930    var stack1;
14931
14932  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14933},"useData":true});
14934
14935this["roche"]["templates"]["order"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14936    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
14937
14938  return "    <div class=\"table-wrap\">\n        <table class=\"mobile-tables table\">\n            <thead class=\"thead-light\">\n                <tr>\n"
14939    + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.orderHeaders : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14940    + "                </tr>\n            </thead>\n            <tbody>\n"
14941    + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.orders : depth0),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14942    + "            </tbody>\n        </table>\n    </div>\n"
14943    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.orderNotes : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14944},"2":function(container,depth0,helpers,partials,data) {
14945    var helper;
14946
14947  return "                    <th>"
14948    + container.escapeExpression(((helper = (helper = helpers.head || (depth0 != null ? depth0.head : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"head","hash":{},"data":data}) : helper)))
14949    + "</th>\n";
14950},"4":function(container,depth0,helpers,partials,data) {
14951    var stack1;
14952
14953  return "                <tr>\n"
14954    + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.col : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14955    + "                </tr>\n";
14956},"5":function(container,depth0,helpers,partials,data) {
14957    var stack1;
14958
14959  return "                    <td><div class=\"mobile-td\">"
14960    + ((stack1 = container.lambda(depth0, depth0)) != null ? stack1 : "")
14961    + "</div></td>\n";
14962},"7":function(container,depth0,helpers,partials,data) {
14963    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});
14964
14965  return "    <div class=\"order-notes clearfix rte-styles\">\n"
14966    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.notesHeading : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14967    + "        <p>"
14968    + container.escapeExpression(((helper = (helper = helpers.orderNotes || (depth0 != null ? depth0.orderNotes : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"orderNotes","hash":{},"data":data}) : helper)))
14969    + "</p>\n    </div>\n";
14970},"8":function(container,depth0,helpers,partials,data) {
14971    var helper;
14972
14973  return "        <div class=\"header-tag\">\n            <h3 class=\"pim-h3\">"
14974    + container.escapeExpression(((helper = (helper = helpers.notesHeading || (depth0 != null ? depth0.notesHeading : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}
vendor: 42,770 bytes, lines 14974-15367
14974),{"name":"notesHeading","hash":{},"data":data}) : helper)))
14975    + "</h3>\n        </div>\n";
14976},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
14977    var stack1;
14978
14979  return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.orders : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14980},"useData":true});
14981
14982this["roche"]["templates"]["overview"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
14983    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
14984
14985  return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.Name : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
14986    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.Value : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
14987},"2":function(container,depth0,helpers,partials,data) {
14988    var helper;
14989
14990  return "        <div class=\"header-tag\">\n            <h3 class=\"pim-h3\">"
14991    + container.escapeExpression(((helper = (helper = helpers.Name || (depth0 != null ? depth0.Name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"Name","hash":{},"data":data}) : helper)))
14992    + "</h3>\n        </div>\n";
14993},"4":function(container,depth0,helpers,partials,data) {
14994    var stack1, helper;
14995
14996  return "        <div class=\"rte-styles\">\n            <div class=\"margin--b24\">"
14997    + ((stack1 = ((helper = (helper = helpers.Value || (depth0 != null ? depth0.Value : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"Value","hash":{},"data":data}) : helper))) != null ? stack1 : "")
14998    + "</div>\n        </div>\n";
14999},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15000    var stack1;
15001
15002  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15003},"useData":true});
15004
15005this["roche"]["templates"]["personaCountryPicker"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15006    var stack1;
15007
15008  return "    <li class=\"js-personaItems c-persona-selector__persona\" tabindex=\"1\">\n        <div class=\"c-persona-selector__persona--info\">\n"
15009    + ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.personaType : depth0),"===","clinician",{"name":"ifCond","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
15010    + "        </div>\n    </li>\n";
15011},"2":function(container,depth0,helpers,partials,data) {
15012    var alias1=container.lambda, alias2=container.escapeExpression;
15013
15014  return "                <i class=\"icon icon-Clinician_new\"></i>\n                <span class=\"js-persona-type c-persona-type\" data-fn-click=\"true\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n                            data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"\" data-da-link_link-header=\"country picker\"\n                            data-da-link_link-text=\""
15015    + alias2(alias1((depth0 != null ? depth0.personaType : depth0), depth0))
15016    + "\" data-da-link_link-interaction-method=\"\" data-value=\"clinician\">"
15017    + alias2(alias1((depth0 != null ? depth0.personaName : depth0), depth0))
15018    + "</span>\n                <span class=\"x-checkmark\"></span>\n";
15019},"4":function(container,depth0,helpers,partials,data) {
15020    var stack1;
15021
15022  return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.personaType : depth0),"===","labprofessional",{"name":"ifCond","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(7, data, 0),"data":data})) != null ? stack1 : "");
15023},"5":function(container,depth0,helpers,partials,data) {
15024    var alias1=container.lambda, alias2=container.escapeExpression;
15025
15026  return "                        <i class=\"icon icon-Laboratory_Professional_new\"></i>\n                        <span class=\"js-persona-type c-persona-type\" data-fn-click=\"true\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n                            data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"\" data-da-link_link-header=\"country picker\"\n                            data-da-link_link-text=\""
15027    + alias2(alias1((depth0 != null ? depth0.personaType : depth0), depth0))
15028    + "\" data-da-link_link-interaction-method=\"\" data-value=\"labprofessional\">"
15029    + alias2(alias1((depth0 != null ? depth0.personaName : depth0), depth0))
15030    + "</span>\n                        <span class=\"x-checkmark\"></span>\n";
15031},"7":function(container,depth0,helpers,partials,data) {
15032    var stack1;
15033
15034  return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.personaType : depth0),"===","researcher",{"name":"ifCond","hash":{},"fn":container.program(8, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : "");
15035},"8":function(container,depth0,helpers,partials,data) {
15036    var alias1=container.lambda, alias2=container.escapeExpression;
15037
15038  return "                                <i class=\"icon icon-researcher\"></i>\n                                <span class=\"js-persona-type c-persona-type\" data-fn-click=\"true\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n                            data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"\" data-da-link_link-header=\"country picker\"\n                            data-da-link_link-text=\""
15039    + alias2(alias1((depth0 != null ? depth0.personaType : depth0), depth0))
15040    + "\" data-da-link_link-interaction-method=\"\" data-value=\"researcher\">"
15041    + alias2(alias1((depth0 != null ? depth0.personaName : depth0), depth0))
15042    + "</span>\n                                <span class=\"x-checkmark\"></span>\n";
15043},"10":function(container,depth0,helpers,partials,data) {
15044    var stack1;
15045
15046  return ((stack1 = (helpers.ifCond || (depth0 && depth0.ifCond) || helpers.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.personaType : depth0),"===","patient",{"name":"ifCond","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "");
15047},"11":function(container,depth0,helpers,partials,data) {
15048    var alias1=container.lambda, alias2=container.escapeExpression;
15049
15050  return "                                        <i class=\"icon icon-Patient_Edited\"></i>\n                                        <span class=\"js-persona-type c-persona-type\" data-fn-click=\"true\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n                            data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"\" data-da-link_link-header=\"country picker\"\n                            data-da-link_link-text=\""
15051    + alias2(alias1((depth0 != null ? depth0.personaType : depth0), depth0))
15052    + "\" data-da-link_link-interaction-method=\"\" data-value=\"patient\">"
15053    + alias2(alias1((depth0 != null ? depth0.personaName : depth0), depth0))
15054    + "</span>\n                                        <span class=\"x-checkmark\"></span>\n";
15055},"13":function(container,depth0,helpers,partials,data) {
15056    var alias1=container.lambda, alias2=container.escapeExpression;
15057
15058  return "                                        <i class=\"icon icon-Healthcare_Professional_new\"></i>\n                                        <span class=\"js-persona-type c-persona-type\" data-fn-click=\"true\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n                            data-da-link_link-page-name=\"\" data-da-link_link-category=\"\" data-da-link_link-section=\"\" data-da-link_link-header=\"country picker\"\n                            data-da-link_link-text=\""
15059    + alias2(alias1((depth0 != null ? depth0.personaType : depth0), depth0))
15060    + "\" data-da-link_link-interaction-method=\"\" data-value=\""
15061    + alias2(alias1((depth0 != null ? depth0.personaType : depth0), depth0))
15062    + "\">"
15063    + alias2(alias1((depth0 != null ? depth0.personaName : depth0), depth0))
15064    + "</span>\n                                        <span class=\"x-checkmark\"></span>\n";
15065},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15066    var stack1;
15067
15068  return "<div class=\"c-persona-selector__heading\"></div>\n<ul class=\"c-persona-selector\">\n"
15069    + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.personaData : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15070    + "</ul>\n";
15071},"useData":true});
15072
15073this["roche"]["templates"]["productFeaturedTile"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15074    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
15075
15076  return "<div class=\"c-featuredTile__list row\">\n  <a href=\""
15077    + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"url","hash":{},"data":data}) : helper)))
15078    + "\" class=\"c-featuredTile__link x-sub-hover\"\n     data-fn-click=\"true\"\n     data-da-satelliteTrackEvent=\"product-click-tracking\"\n     data-da-link_link-Page-Name=\"\"\n     data-da-link_link-Category=\"\"\n     data-da-link_link-section=\""
15079    + alias4(((helper = (helper = helpers.linkSection || (depth0 != null ? depth0.linkSection : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"linkSection","hash":{},"data":data}) : helper)))
15080    + "\" \n     data-da-link_content-type=\""
15081    + alias4(((helper = (helper = helpers["page-type"] || (depth0 != null ? depth0["page-type"] : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page-type","hash":{},"data":data}) : helper)))
15082    + "\"\n     data-da-link_link-Text=\""
15083    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
15084    + "\"\n     data-da-link_link-Interaction-Method=\"\"\n     data-da-link_product-name=\""
15085    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
15086    + "\"\n     data-da-link_product-category=\""
15087    + alias4(((helper = (helper = helpers.productCategory || (depth0 != null ? depth0.productCategory : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"productCategory","hash":{},"data":data}) : helper)))
15088    + "\"\n     data-da-link_product-id=\""
15089    + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
15090    + "\"\n     data-da-link_link-Header=\"product\"\n     data-da-search_selected-position=\""
15091    + alias4(((helper = (helper = helpers.searchIndex || (depth0 != null ? depth0.searchIndex : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"searchIndex","hash":{},"data":data}) : helper)))
15092    + "\"\n     data-da-link_event=\"product-click\">\n    <div class=\"c-featuredTile__productWrapper col-xs-12\">\n      <div class=\"c-featuredTile__productAsset\">\n        <img src=\"/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/blank.png\" data-src=\""
15093    + alias4(((helper = (helper = helpers.image || (depth0 != null ? depth0.image : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"image","hash":{},"data":data}) : helper)))
15094    + "\"\n          alt=\""
15095    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.altText : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "")
15096    + "\" class=\"js-dynamic-image\" data-template=\"featuredTile\" data-processed=\"false\"\n        />\n      </div>\n      <div class=\"c-featuredTile__productContent\">\n"
15097    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15098    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.category : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15099    + "      </div>\n    </div>\n  </a>\n</div>\n";
15100},"2":function(container,depth0,helpers,partials,data) {
15101    var helper;
15102
15103  return container.escapeExpression(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"altText","hash":{},"data":data}) : helper)));
15104},"4":function(container,depth0,helpers,partials,data) {
15105    var helper;
15106
15107  return container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"title","hash":{},"data":data}) : helper)));
15108},"6":function(container,depth0,helpers,partials,data) {
15109    var stack1, helper;
15110
15111  return "        <span class=\"c-featuredTile__productTitle\">"
15112    + ((stack1 = ((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"title","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15113    + "</span>\n";
15114},"8":function(container,depth0,helpers,partials,data) {
15115    var stack1, helper;
15116
15117  return "        <span class=\"c-featuredTile__productCategory\">"
15118    + ((stack1 = ((helper = (helper = helpers.category || (depth0 != null ? depth0.category : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"category","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15119    + "</span>\n";
15120},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15121    var stack1;
15122
15123  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15124},"useData":true});
15125
15126this["roche"]["templates"]["productListingTile"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15127    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
15128
15129  return "<div class=\"c-listingTile__list list-view "
15130    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"Products",{"name":"ifEquals","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15131    + " "
15132    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15133    + " "
15134    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15135    + "\">\n  <a href=\""
15136    + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"url","hash":{},"data":data}) : helper)))
15137    + "\" class=\"c-listingTile__link x-sub-hover\" data-fn-click=\"true\"\n    data-da-satelliteTrackEvent=\"search-click-tracking\" data-da-link_link-Page-Name=\"\" data-da-link_link-Category=\"\"\n    data-da-link_link-section=\""
15138    + alias4(((helper = (helper = helpers.linkSection || (depth0 != null ? depth0.linkSection : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"linkSection","hash":{},"data":data}) : helper)))
15139    + "\" data-da-link_content-type=\""
15140    + alias4(((helper = (helper = helpers["page-type"] || (depth0 != null ? depth0["page-type"] : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"page-type","hash":{},"data":data}) : helper)))
15141    + "\"\n    data-da-link_link-Text=\""
15142    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
15143    + "\" data-da-link_link-Interaction-Method=\"\" data-da-link_product-name=\""
15144    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
15145    + "\"\n    data-da-link_product-category=\""
15146    + alias4(((helper = (helper = helpers.productCategory || (depth0 != null ? depth0.productCategory : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"productCategory","hash":{},"data":data}) : helper)))
15147    + "\" data-da-link_product-id=\""
15148    + alias4(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"id","hash":{},"data":data}) : helper)))
15149    + "\"\n    data-da-link_event=\"product-click\" data-da-link_link-Header=\"product\"\n    data-da-search_selected-position=\""
15150    + alias4(((helper = (helper = helpers.searchIndex || (depth0 != null ? depth0.searchIndex : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"searchIndex","hash":{},"data":data}) : helper)))
15151    + "\">\n    <div class=\"c-listingTile__productWrapper c-listingtile__col resource-listing-col\">\n      <div class=\"c-listingTile__productAsset "
15152    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"Products",{"name":"ifEquals","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15153    + " "
15154    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15155    + " "
15156    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15157    + "\">\n        <div class=\""
15158    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15159    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.heroMediaImage : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15160    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.logoImage : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15161    + "\">\n          <img src=\""
15162    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15163    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.heroMediaImage : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15164    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.logoImage : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15165    + "\" data-src=\""
15166    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15167    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.heroMediaImage : depth0),{"name":"if","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15168    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.logoImage : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15169    + "\" alt=\""
15170    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.commonAltText : depth0),{"name":"if","hash":{},"fn":container.program(27, data, 0),"inverse":container.program(29, data, 0),"data":data})) != null ? stack1 : "")
15171    + "\"\n            class=\"js-dynamic-image js-dynamic-media\" data-template=\"productTile\" data-processed=\"false\" />\n"
15172    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(31, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15173    + "        </div>\n      </div>\n      <div class=\"c-listingTile__productContent\">\n        <div class=\"c-listingTile__productContentWrapper "
15174    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(33, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15175    + "\">\n          "
15176    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"resource-center",{"name":"ifEquals","hash":{},"fn":container.program(35, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15177    + "\n"
15178    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(37, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15179    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.assetFileName : depth0),{"name":"if","hash":{},"fn":container.program(42, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15180    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.subTitle : depth0),{"name":"if","hash":{},"fn":container.program(44, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15181    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateRange : depth0),{"name":"if","hash":{},"fn":container.program(46, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15182    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"News",{"name":"ifEquals","hash":{},"fn":container.program(49, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15183    + "            <span class=\"c-listingTile__productCategory\">"
15184    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.category : depth0),{"name":"if","hash":{},"fn":container.program(52, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15185    + "</span>\n            <span\n              class=\"c-listingTile__productDescription "
15186    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(54, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15187    + " "
15188    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(56, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15189    + "\">"
15190    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(58, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15191    + "</span>\n"
15192    + ((stack1 = (helpers.ifEquals || (depth0 && depth0.ifEquals) || alias2).call(alias1,(depth0 != null ? depth0["page-type"] : depth0),"resource-center",{"name":"ifEquals","hash":{},"fn":container.program(60, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15193    + "\n        </div>\n      </div>\n    </div>\n  </a>\n</div>\n";
15194},"2":function(container,depth0,helpers,partials,data) {
15195    return "products-category-type";
15196},"4":function(container,depth0,helpers,partials,data) {
15197    return "events-category-type";
15198},"6":function(container,depth0,helpers,partials,data) {
15199    return "resource-category-type";
15200},"8":function(container,depth0,helpers,partials,data) {
15201    var stack1;
15202
15203  return " "
15204    + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15205    + " ";
15206},"9":function(container,depth0,helpers,partials,data) {
15207    return " productAsset-image";
15208},"11":function(container,depth0,helpers,partials,data) {
15209    return "productAsset-event";
15210},"13":function(container,depth0,helpers,partials,data) {
15211    return "productAsset-resource";
15212},"15":function(container,depth0,helpers,partials,data) {
15213    return "c-custom-pagetype";
15214},"17":function(container,depth0,helpers,partials,data) {
15215    return "c-heromedia-image";
15216},"19":function(container,depth0,helpers,partials,data) {
15217    return "c-default-image";
15218},"21":function(container,depth0,helpers,partials,data) {
15219    var helper;
15220
15221  return container.escapeExpression(((helper = (helper = helpers.productImage || (depth0 != null ? depth0.productImage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"productImage","hash":{},"data":data}) : helper)));
15222},"23":function(container,depth0,helpers,partials,data) {
15223    var helper;
15224
15225  return container.escapeExpression(((helper = (helper = helpers.heroMediaImage || (depth0 != null ? depth0.heroMediaImage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"heroMediaImage","hash":{},"data":data}) : helper)));
15226},"25":function(container,depth0,helpers,partials,data) {
15227    var helper;
15228
15229  return container.escapeExpression(((helper = (helper = helpers.logoImage || (depth0 != null ? depth0.logoImage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"logoImage","hash":{},"data":data}) : helper)));
15230},"27":function(container,depth0,helpers,partials,data) {
15231    var helper;
15232
15233  return container.escapeExpression(((helper = (helper = helpers.commonAltText || (depth0 != null ? depth0.commonAltText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"commonAltText","hash":{},"data":data}) : helper)));
15234},"29":function(container,depth0,helpers,partials,data) {
15235    var helper;
15236
15237  return container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"title","hash":{},"data":data}) : helper)));
15238},"31":function(container,depth0,helpers,partials,data) {
15239    var helper;
15240
15241  return "            <div class=\"resource-center__document-type\">"
15242    + container.escapeExpression(((helper = (helper = helpers.documentType || (depth0 != null ? depth0.documentType : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"documentType","hash":{},"data":data}) : helper)))
15243    + "</div>\n";
15244},"33":function(container,depth0,helpers,partials,data) {
15245    return "image-content-wrapper";
15246},"35":function(container,depth0,helpers,partials,data) {
15247    return "<div class=\"resource-center__content\">";
15248},"37":function(container,depth0,helpers,partials,data) {
15249    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});
15250
15251  return "            <span\n              class=\"c-listingTile__productTitle "
15252    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(38, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15253    + " "
15254    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(40, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15255    + "\">"
15256    + ((stack1 = ((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15257    + "</span>\n";
15258},"38":function(container,depth0,helpers,partials,data) {
15259    return "event-title";
15260},"40":function(container,depth0,helpers,partials,data) {
15261    return "resource-title";
15262},"42":function(container,depth0,helpers,partials,data) {
15263    var helper;
15264
15265  return "            <div class=\"resource-center__file-name file-type\">"
15266    + container.escapeExpression(((helper = (helper = helpers.assetFileName || (depth0 != null ? depth0.assetFileName : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"assetFileName","hash":{},"data":data}) : helper)))
15267    + "</div>\n";
15268},"44":function(container,depth0,helpers,partials,data) {
15269    var stack1, helper;
15270
15271  return "            <p class=\"c-listingtile__subTitle\">"
15272    + ((stack1 = ((helper = (helper = helpers.subTitle || (depth0 != null ? depth0.subTitle : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"subTitle","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15273    + "</p>\n";
15274},"46":function(container,depth0,helpers,partials,data) {
15275    var stack1;
15276
15277  return "            <ul class=\"c-listingtile__event\">\n"
15278    + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(47, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15279    + "            </ul>\n";
15280},"47":function(container,depth0,helpers,partials,data) {
15281    var stack1, helper;
15282
15283  return "              <li class=\"c-listingtile__eventdata\">"
15284    + ((stack1 = ((helper = (helper = helpers.eventDateRange || (depth0 != null ? depth0.eventDateRange : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"eventDateRange","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15285    + "</li>\n";
15286},"49":function(container,depth0,helpers,partials,data) {
15287    var stack1;
15288
15289  return "              <ul class=\"c-listingtile__event\">\n"
15290    + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.eventDateFormat : depth0),{"name":"if","hash":{},"fn":container.program(50, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15291    + "              </ul>\n";
15292},"50":function(container,depth0,helpers,partials,data) {
15293    var stack1, helper;
15294
15295  return "                  <li class=\"c-listingtile__eventdata\">"
15296    + ((stack1 = ((helper = (helper = helpers.eventDateFormat || (depth0 != null ? depth0.eventDateFormat : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"eventDateFormat","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15297    + "</li>\n";
15298},"52":function(container,depth0,helpers,partials,data) {
15299    var stack1, helper;
15300
15301  return ((stack1 = ((helper = (helper = helpers.category || (depth0 != null ? depth0.category : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"category","hash":{},"data":data}) : helper))) != null ? stack1 : "");
15302},"54":function(container,depth0,helpers,partials,data) {
15303    return "event-desc";
15304},"56":function(container,depth0,helpers,partials,data) {
15305    return "resource-desc";
15306},"58":function(container,depth0,helpers,partials,data) {
15307    var stack1, helper;
15308
15309  return ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "");
15310},"60":function(container,depth0,helpers,partials,data) {
15311    return "          </div>";
15312},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15313    var stack1;
15314
15315  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15316},"useData":true});
15317
15318this["roche"]["templates"]["redirectPopup"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15319    var helper;
15320
15321  return "          <h3 class=\"modal-subtitle\">"
15322    + container.escapeExpression(((helper = (helper = helpers.subTitle || (depth0 != null ? depth0.subTitle : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"subTitle","hash":{},"data":data}) : helper)))
15323    + "</h3>\n";
15324},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15325    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
15326
15327  return "<!-- Modal -->\n<div class=\"modal x-redirect-modal js-redirect-popup\" role=\"dialog\" data-target=\"\">\n  <div class=\"modal-dialog\" role=\"document\">\n    <!-- Modal content-->\n    <div class=\"modal-content\">\n      <div class=\"modal-header\">\n        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n            Close\n        </button>\n        <h3 id=\"redirectModalTitle\" class=\"modal-title x-h3\">"
15328    + alias4(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data}) : helper)))
15329    + "</h3>\n      </div>\n      <div class=\"modal-body\">\n"
15330    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.subTitle : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15331    + "        <p class=\"x-text modal-desc\">"
15332    + alias4(((helper = (helper = helpers.bodyText || (depth0 != null ? depth0.bodyText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"bodyText","hash":{},"data":data}) : helper)))
15333    + "</p>\n        <button type=\"button\" class=\"x-submit-button js-redirect-ok\" data-da-satelliteTrackEvent=\"generic-link-tracking\"\n               data-da-link_link-page-name=\"\" \n               data-da-link_link-category=\"\" \n               data-da-link_link-section=\"global-top-navigation\"\n               data-da-link_link-header=\"hamburger-menu-overlay\"\n               data-da-link_link-text=\"${'rdoe_redirctpopup.agree' @ i18n}\">"
15334    + alias4(((helper = (helper = helpers.ctaLabel || (depth0 != null ? depth0.ctaLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"ctaLabel","hash":{},"data":data}) : helper)))
15335    + "</button>\n      </div>\n    </div>\n  </div>\n</div>";
15336},"useData":true});
15337
15338this["roche"]["templates"]["relateddocuments"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15339    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
15340
15341  return "<div class=\"c-related-docs__col\">\n  <div class=\"c-related-docs__pad js-related-docs-pad\">\n    <div class=\"resource-center__document-img document--img\">\n      <div>\n        <a role=\"navigation\" class=\"x-sub-hover\" href="
15342    + alias4(((helper = (helper = helpers.Link || (depth0 != null ? depth0.Link : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Link","hash":{},"data":data}) : helper)))
15343    + " target=\"_blank\" title="
15344    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15345    + " data-da-link_link-page-name=\"Products\" data-da-link_link-category=\""
15346    + alias4(((helper = (helper = helpers.Link || (depth0 != null ? depth0.Link : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Link","hash":{},"data":data}) : helper)))
15347    + "\" data-da-link_link-interaction-method=\"\" data-da-link_link-text=\""
15348    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15349    + "\" data-da-link_download-file-name=\""
15350    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15351    + "\" data-da-link_link-section=\"related-docs\" data-fn-click=\"true\" data-da-link_product-name=\""
15352    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15353    + "\" data-da-link_content-Type=\"\">\n          <img class=\"icon pdf_new\" src=\"/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/Webinars.svg\" alt = \"document-icon\"/>\n          </a>\n      </div>\n    </div>\n    <p class=\"c-related-docs__title\"> <a role=\"navigation\" class=\"x-sub-hover\" href="
15354    + alias4(((helper = (helper = helpers.Link || (depth0 != null ? depth0.Link : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Link","hash":{},"data":data}) : helper)))
15355    + " target=\"_blank\" title="
15356    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15357    + " data-da-link_link-page-name=\"Products\" data-da-link_link-category=\""
15358    + alias4(((helper = (helper = helpers.Link || (depth0 != null ? depth0.Link : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Link","hash":{},"data":data}) : helper)))
15359    + "\" data-da-link_link-interaction-method=\"\" data-da-link_link-text=\""
15360    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15361    + "\" data-da-link_download-file-name=\""
15362    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15363    + "\" data-da-link_link-section=\"related-docs\" data-fn-click=\"true\" data-da-link_product-name=\""
15364    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15365    + "\" data-da-link_content-Type=\"\">"
15366    + alias4(((helper = (helper = helpers.Title || (depth0 != null ? depth0.Title : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Title","hash":{},"data":data}) : helper)))
15367    + "</a></p>\n    <div class=\"c-related-docs__document-type x-oval-icon\">
15367\n       <span title=\"Method Sheet\" class=\"method-title\">"
15368    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_relateddocs.method",{"name":"i18keyToValue","hash":{},"data":data}))
15369    + "</span>\n       <span class=\"version\" title=\"v01\">"
15370    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_relateddocs.version",{"name":"i18keyToValue","hash":{},"data":data}))
15371    + "</span>\n       <span>"
15372    + alias4(((helper = (helper = helpers.Version || (depth0 != null ? depth0.Version : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Version","hash":{},"data":data}) : helper)))
15373    + "</span>\n       <span>|</span>\n       <span>"
15374    + alias4(((helper = (helper = helpers.Language || (depth0 != null ? depth0.Language : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"Language","hash":{},"data":data}) : helper)))
15375    + "</span>\n       <span>|</span>\n       <span>"
15376    + alias4(((helper = (helper = helpers.LastModify || (depth0 != null ? depth0.LastModify : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"LastModify","hash":{},"data":data}) : helper)))
15377    + " </span>\n    </div>\n  </div>\n  <div class=\"c-related-docs__content js-related-docs-content\">\n    <div class=\"c-related-docs__description js-related-docs-desc hide\">\n      <div class=\"content-pad\">\n        <span class=\"heading\">"
15378    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_relateddocs.catNo",{"name":"i18keyToValue","hash":{},"data":data}))
15379    + "</span>\n        <span class=\"val\">"
15380    + alias4(((helper = (helper = helpers.CatalogNo || (depth0 != null ? depth0.CatalogNo : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"CatalogNo","hash":{},"data":data}) : helper)))
15381    + "</span>\n      </div>\n"
15382    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.InstrumentName : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15383    + "      <div class=\"content-pad\">\n        <span class=\"heading\">"
15384    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_relateddocs.documentId",{"name":"i18keyToValue","hash":{},"data":data}))
15385    + "</span>\n        <span class=\"val\">"
15386    + alias4(((helper = (helper = helpers.DocID || (depth0 != null ? depth0.DocID : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"DocID","hash":{},"data":data}) : helper)))
15387    + "</span>\n      </div>\n    </div>\n    <div class=\"c-related-docs__toggle-section js-related-docs-toggle\">\n    </div>\n  </div>\n</div>\n";
15388},"2":function(container,depth0,helpers,partials,data) {
15389    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing;
15390
15391  return "      <div class=\"content-pad\">\n        <span class=\"heading\">"
15392    + container.escapeExpression((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_relateddocs.systems",{"name":"i18keyToValue","hash":{},"data":data}))
15393    + "</span>\n        <span class=\"val\">"
15394    + ((stack1 = ((helper = (helper = helpers.InstrumentName || (depth0 != null ? depth0.InstrumentName : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"InstrumentName","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15395    + "</span>\n      </div>\n";
15396},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15397    var stack1;
15398
15399  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15400},"useData":true});
15401
15402this["roche"]["templates"]["resourceTile"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15403    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression;
15404
15405  return ((stack1 = (helpers.moduloIf || (depth0 && depth0.moduloIf) || alias2).call(alias1,(data && data.index),3,0,{"n
15405ame":"moduloIf","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15406    + "    <div class=\"c-resourcetile__col-container col-xs-12 col-xs-12 col-sm-4\">\n        <div class=\"c-resourcetile__col\">\n        <div class=\"c-resourcetile__img-container "
15407    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.logoImage : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15408    + "\">\n            <img src=\""
15409    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15410    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.heroMediaImage : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15411    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.logoImage : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15412    + "\" data-src=\""
15413    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.productImage : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15414    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.heroMediaImage : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15415    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.logoImage : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15416    + "\"\n            alt=\""
15417    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.altText : depth0),{"name":"if","hash":{},"fn":container.program(12, data, 0),"inverse":container.program(14, data, 0),"data":data})) != null ? stack1 : "")
15418    + "\" class=\"js-dynamic-image\" data-template=\"resourceTile\" data-processed=\"false\"\n            />\n"
15419    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentTypeIcon : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15420    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.documentType : depth0),{"name":"if","hash":{},"fn":container.program(18, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15421    + "        </div>\n        <div class=\"c-resourcetile__content\">\n"
15422    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.assetFileName : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15423    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.title : depth0),{"name":"if","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15424    + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.description : depth0),{"name":"if","hash":{},"fn":container.program(24, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15425    + "            <a href=\""
15426    + alias3(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"url","hash":{},"data":data}) : helper)))
15427    + "\" class=\"c-resourcetile__more-link x-sub-hover\">\n                <span>"
15428    + alias3((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,"rdoe_resourceTile.learnMore",{"name":"i18keyToValue","hash":{},"data":data}))
15429    + "</span>\n                <span class=\"x-secondary-cta\">\n                    <i class=\"icon-secondaryCTA_dropDown\"></i>\n                    <i class=\"icon-secondaryCTA_bluefilled\"></i>\n                </span>\n            </a>\n        </div>\n    </div>\n</div>\n"
15430    + ((stack1 = (helpers.moduloIf || (depth0 && depth0.moduloIf) || alias2).call(alias1,(helpers.math || (depth0 && depth0.math) || alias2).call(alias1,(data && data.index),"+",1,{"name":"math","hash":{},"data":data}
vendor: 4,152 bytes, lines 15430-15473
15430),3,0,{"name":"moduloIf","hash":{},"fn":container.program(26, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15431},"2":function(container,depth0,helpers,partials,data) {
15432    return "<div class=\"c-resourcetile__row js-resourcetile-row\">\n";
15433},"4":function(container,depth0,helpers,partials,data) {
15434    return "c-default-image";
15435},"6":function(container,depth0,helpers,partials,data) {
15436    var helper;
15437
15438  return container.escapeExpression(((helper = (helper = helpers.productImage || (depth0 != null ? depth0.productImage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"productImage","hash":{},"data":data}) : helper)));
15439},"8":function(container,depth0,helpers,partials,data) {
15440    var helper;
15441
15442  return container.escapeExpression(((helper = (helper = helpers.heroMediaImage || (depth0 != null ? depth0.heroMediaImage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"heroMediaImage","hash":{},"data":data}) : helper)));
15443},"10":function(container,depth0,helpers,partials,data) {
15444    var helper;
15445
15446  return container.escapeExpression(((helper = (helper = helpers.logoImage || (depth0 != null ? depth0.logoImage : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"logoImage","hash":{},"data":data}) : helper)));
15447},"12":function(container,depth0,helpers,partials,data) {
15448    var helper;
15449
15450  return container.escapeExpression(((helper = (helper = helpers.altText || (depth0 != null ? depth0.altText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"altText","hash":{},"data":data}) : helper)));
15451},"14":function(container,depth0,helpers,partials,data) {
15452    var helper;
15453
15454  return container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"title","hash":{},"data":data}) : helper)));
15455},"16":function(container,depth0,helpers,partials,data) {
15456    var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression;
15457
15458  return "                <div class=\"c-resourcetile__document-icon\"><img src=\""
15459    + alias4(((helper = (helper = helpers.documentTypeIcon || (depth0 != null ? depth0.documentTypeIcon : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"documentTypeIcon","hash":{},"data":data}) : helper)))
15460    + "\" alt=\""
15461    + alias4(((helper = (helper = helpers.documentType || (depth0 != null ? depth0.documentType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"documentType","hash":{},"data":data}) : helper)))
15462    + "\" /></div>\n";
15463},"18":function(container,depth0,helpers,partials,data) {
15464    var stack1, helper;
15465
15466  return "                <div class=\"c-resourcetile__document-type\">\n                    <span>"
15467    + ((stack1 = ((helper = (helper = helpers.documentType || (depth0 != null ? depth0.documentType : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"documentType","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15468    + "</span>\n                </div>\n";
15469},"20":function(container,depth0,helpers,partials,data) {
15470    var stack1, helper;
15471
15472  return "                <div class=\"c-resourcetile__sub-title\">"
15473    + ((stack1 = ((helper = (helper = helpers.assetFileName || (depth0 != null ? depth0.assetFileName : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}
15473),{"name":"assetFileName","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15474    + "</div>\n";
15475},"22":function(container,depth0,helpers,partials,data) {
15476    var stack1, helper;
15477
15478  return "                <div class=\"c-resourcetile__title ellipses\">"
15479    + ((stack1 = ((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"title","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15480    + "</div>\n";
15481},"24":function(container,depth0,helpers,partials,data) {
15482    var stack1, helper;
15483
15484  return "                <div class=\"c-resourcetile__description ellipses\">\n                    "
15485    + ((stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"description","hash":{},"data":data}) : helper))) != null ? stack1 : "")
15486    + "\n                </div>\n";
15487},"26":function(container,depth0,helpers,partials,data) {
15488    return "</div>\n";
15489},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15490    var stack1;
15491
15492  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15493},"useData":true});
15494
15495this["roche"]["templates"]["searchFilters"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) {
15496    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression, alias5=container.lambda;
15497
15498  return "            <div class=\"panel-heading c-filter__heading js-filter-heading\">\n                <div class=\"panel-title\">\n                    <a data-toggle=\"collapse\" data-target=\"#collapse"
15499    + alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"index","hash":{},"data":data}) : helper)))
15500    + "-"
15501    + alias4(alias5(((stack1 = (data && data.root)) && stack1.seachFilterType), depth0))
15502    + "\" class=\"c-filter__heading-link x-sub-hover\" tabindex=\"0\">\n                        <span class=\"c-filter__collapse-cta\">\n                            <i class=\"icon icon-next\"></i>\n                            <span class=\"sr-only\">"
15503    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,(depth0 != null ? depth0.labelDisplayKey : depth0),{"name":"i18keyToValue","hash":{},"data":data}))
15504    + "</span>\n                        </span>\n                        <span class=\"c-filter__collapse-cta-label\">"
15505    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,(depth0 != null ? depth0.labelDisplayKey : depth0),{"name":"i18keyToValue","hash":{},"data":data}))
15506    + "\n                            <span><span class=\"count\"></span></span>\n                        </span>\n                    </a>\n                </div>\n            </div>\n            <div id=\"collapse"
15507    + alias4(((helper = (helper = helpers.index || (data && data.index)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"index","hash":{},"data":data}) : helper)))
15508    + "-"
15509    + alias4(alias5(((stack1 = (data && data.root)) && stack1.seachFilterType), depth0))
15510    + "\" class=\"panel-collapse collapse in\" >\n                <fieldset>\n                <legend class=\"x-empty-legend\">"
15511    + alias4((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,(depth0 != null ? depth0.labelDisplayKey : depth0),{"name":"i18keyToValue","hash":{},"data":data}))
15512    + "</legend>\n                <ul class=\"list-group c-filter__list\">\n"
15513    + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.values : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15514    + "                </ul>\n                </fieldset>\n            </div>\n";
15515},"2":function(container,depth0,helpers,partials,data,blockParams,depths) {
15516    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression;
15517
15518  return "\n                    "
15519    + ((stack1 = (helpers.equalToFive || (depth0 && depth0.equalToFive) || alias2).call(alias1,(data && data.index),{"n
15519ame":"equalToFive","hash":{},"data":data})) != null ? stack1 : "")
15520    + "\n\n                    <li class=\"list-group-item "
15521    + alias3((helpers.greaterThanFive || (depth0 && depth0.greaterThanFive) || alias2).call(alias1,(data && data.index),{"name":"greaterThanFive","hash":{},"data":data}))
15522    + "\" tabindex=\"0\">\n                        <div class=\"radio\">\n                            <label class=\"c-filter__label js-filter-radio\">\n                                <input type=\"checkbox\" name=\""
15523    + alias3(container.lambda((depths[1] != null ? depths[1].label : depths[1]), depth0))
15524    + "\" value=\""
15525    + alias3(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"value","hash":{},"data":data}) : helper)))
15526    + "\" data-text=\""
15527    + alias3((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,(depth0 != null ? depth0.displayKey : depth0),{"name":"i18keyToValue","hash":{},"data":data}))
15528    + "\">\n                                <span class=\"customCheck\">\n                                    <span class=\"checkMark\"></span>\n                                </span>\n                                <span class=\"displayText\">"
15529    + alias3((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || alias2).call(alias1,(depth0 != null ? depth0.displayKey : depth0),{"name":"i18keyToValue","hash":{},"data":data}))
15530    + "</span>\n                            </label>\n                        </div>\n                    </li>\n";
15531},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) {
15532    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});
15533
15534  return "<div class=\"c-filter x-left-margins\">\n    <div class=\"hidden-xs col-sm-12 x-no-padding\">\n        <h3 class=\"c-filter__title\">"
15535    + container.escapeExpression((helpers.i18keyToValue || (depth0 && depth0.i18keyToValue) || helpers.helperMissing).call(alias1,"rdoe_search.searchFilter",{"name":"i18keyToValue","hash":{},"data":data}))
15536    + "</h3>\n        <div class=\"js-filter-facet-list\">\n"
15537    + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.facets : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data})) != null ? stack1 : "")
15538    + "        </div>\n    </div>\n</div>";
15539},"useData":true,"useDepths":true});
15540
15541this["roche"]["templates"]["systemSpecification"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) {
15542    var helper, alias1=container.escapeExpression;
15543
15544  return "<li class=\"clearfix c-pdp-spec-item js-pdp-spec-item\">\n	<p class=\"c-pdp-spec\">\n		<span class=\"c-pdp-spec-label\">"
15545    + alias1(((helper = (helper = helpers.key || (depth0 != null ? depth0.key : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"key","hash":{},"data":data}) : helper)))
15546    + "</span>\n		<span class=\"c-pdp-spec-line\"></span></p>\n	<p class=\"c-pdp-spec-desc\">\n	  <span>"
15547    + alias1(container.lambda((depth0 != null ? depth0.value : depth0), depth0))
15548    + "</span>\n	</p>\n</li>\n";
15549},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
15550    var stack1;
15551
15552  return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
15553},"useData":true});
15554/*!
15555 * faq.js
15556
15557 * This file contians  faq functions for add ellipisis.
15558 *
15559 * @project   SapientNitro Roche Diagonostics
15560 * @date      2017-07-17
15561 * @author    Suneel
15562 * @dependencies jQuery
15563 */
15564
15565//this will cause the browser to check for errors more aggressively
15566'use strict';
15567
15568/**
15569 * @namespace Main
15570 * @memberof snro
15571 * @property {null} property - description of property
15572 */
15573
15574(function (window, $, snro) {
15575  snro = window.snro = snro || {};
15576
15577  /**
15578   * This faq functions for add ellipisis.
15579   * Accepts any valid selector or jQuery object.
15580   * @param {selector, HTMLElement, or jQuery object} table
15581   */
15582
15583  var _cache = {
15584    faqInput: $('.c-faqNormal .js-faq-row').find('input')
15585  },
15586      _updateFaqId = function _updateFaqId() {
15587    $('.c-faqNormal .js-faq-row').each(function (index) {
15588      $(this).find('.js-faq-col').each(function (colIndex) {
15589        var newId = 'faq-' + index + '-tab-' + colIndex;
15590        $(this).find('input').attr('id', newId);
15591        $(this).find('label').attr('for', newId);
15592      });
15593    });
15594  };
15595
15596  snro.faq = {
15597    bindEvents: function bindEvents() {
15598      _cache.faqInput.bind('click', function () {
15599        _cache.faqInput.not(this).prop('checked', false);
15600        var currentElement = $(this).parent().find('.tab-content');
15601        if (currentElement.height() > 1) {
15602          currentElement.css('height', 0);
15603          return;
15604        }
15605        $('.c-faqNormal .tab-content').not(currentElement).height(0);
15606        currentElement.css('height', $(this).parent().find('.c-faqNormal__description')[0].clientHeight);
15607      });
15608      if (snro.commonUtils.isMobileOrTablet()) {
15609        $(window).on('orientationchange', function () {
15610          $(_cache.faqInput).each(function () {
15611            var currentElement = $(this).parent().find('.tab-content');
15612            if ($(this).is(':checked')) {
15613              var $that = this;
15614              setTimeout(function () {
15615                currentElement.css('height', $($that).parent().find('.c-faqNormal__description')[0].clientHeight);
15616              }, 100);
15617            }
15618          });
15619        });
15620      }
15621    },
15622    init: function init() {
15623      _updateFaqId();
15624      this.bindEvents();
15625    }
15626  };
15627})(window, window.jQuery, window.snro);
15628
15629/*
15630 * generalmap.js
15631 * [ This javascript code is used to show contact location on map on contact use page ]
15632 *
15633 * @project:    SN-RO
15634 * @date:       2017-09-18
15635 * @author:     Neha
15636 * @licensor:   SAPIENNITRO
15637 * @namespaces: snro
15638 */
15639
15640//this will cause the browser to check for errors more aggressively
15641'use strict';
15642
15643/**
15644 * @namespace generalmapComp
15645 * @memberof roche
15646 * @property {null} property - description of property
15647 */
15648
15649(function (window, $, snro) {
15650
15651  snro = window.snro = snro || {};
15652  var _cache = {
15653    'map': $('#generalContactMap')
15654  },
15655      google = window.google,
15656      lat = parseFloat(_cache.map.data('lat')),
15657      lng = parseFloat(_cache.map.data('lng')),
15658      iconPath = _cache.map.data('marker');
15659
15660  var _initMap = function _initMap() {
15661
15662    var mapOptions = {
15663      zoom: 12,
15664      center: new google.maps.LatLng(lat, lng),
15665      styles: [{
15666        'featureType': 'administrative',
15667        'elementType': 'labels.text.fill',
15668        'stylers': [{
15669          'color': '#444444'
15670        }]
15671      }, {
15672        'featureType': 'landscape',
15673        'elementType': 'all',
15674        'stylers': [{
15675          'color': '#f2f2f2'
15676        }]
15677      }, {
15678        'featureType': 'poi',
15679        'elementType': 'all',
15680        'stylers': [{
15681          'visibility': 'off'
15682        }]
15683      }, {
15684        'featureType': 'road',
15685        'elementType': 'all',
15686        'stylers': [{
15687          'visibility': 'on'
15688
15689        }, {
15690          'lightness': 45
15691        }]
15692      }, {
15693        'featureType': 'road.highway',
15694        'elementType': 'all',
15695        'stylers': [{
15696          'visibility': 'simplified'
15697        }]
15698      }, {
15699        'featureType': 'road.arterial',
15700        'elementType': 'labels.icon',
15701        'stylers': [{
15702          'visibility': 'off'
15703        }]
15704      }, {
15705        'featureType': 'transit',
15706        'elementType': 'all',
15707        'stylers': [{
15708          'visibility': 'off'
15709        }]
15710      }, {
15711        'featureType': 'water',
15712        'elementType': 'all',
15713        'stylers': [{
15714          'color': '#46bcec'
15715        }, {
15716          'visibility': 'on'
15717        }]
15718      }]
15719    },
15720        mapElement = _cache.map[0],
15721        map = new google.maps.Map(mapElement, mapOptions),
15722        marker = new google.maps.Marker({
15723      position: new google.maps.LatLng(lat, lng),
15724      map: map,
15725      icon: iconPath
15726    });
15727
15728    //redirect to google map direction on clicking marker  
15729    marker.addListener('click', function () {
15730      var url = 'https://www.google.com/maps/dir/?api=1&destination=' + lat + ',' + lng + '';
15731      window.open(url);
15732    });
15733  };
15734  var _initBingMap = function _initBingMap() {
15735    var microsoft = window.Microsoft,
15736        bingMapOptions = {
15737      center: new microsoft.Maps.Location(lat, lng),
15738      zoom: 13,
15739      disableScrollWheelZoom: true
15740    },
15741        mapElement = _cache.map[0],
15742        map = new microsoft.Maps.Map(mapElement, bingMapOptions);
15743    var center = map.getCenter();
15744    var pin = new microsoft.Maps.Pushpin(center, {
15745      icon: '/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/marker.png',
15746      anchor: new microsoft.Maps.Point(12, 39)
15747    });
15748    map.setView({
15749      mapTypeId: microsoft.Maps.MapTypeId.road
15750    });
15751    map.entities.push(pin);
15752    microsoft.Maps.Events.addHandler(pin, 'click', function () {
15753      var url = 'https://www.bing.com/maps?cp=' + lat + '~' + lng + '';
15754      window.open(url);
15755    });
15756  };
15757  // public methods
15758
15759  /**
15760   * @method init
15761   * @description this method is used to initialize public methods.
15762   * @memberof snro.generalMap
15763   * @example
15764   * snro.generalMap.init()
15765   */
15766  snro.generalMap = {
15767    init: function init() {
15768      if ($('#generalContactMap').length) {
15769        if ($('#generalContactMap').data('maptype').toLowerCase() === 'bingmap') {
15770          _initBingMap();
15771        } else {
15772          _initMap();
15773        }
15774      }
15775    }
15776  };
15777})(window, jQuery, window.snro);
15778
15779/*
15780 * c_popupcomponent.js
15781 * [ This javascript code is used to display popupcomponent component. ]
15782 *
15783 * @project:    SN-RO
15784 * @date:       2017-09-24
15785 * @author:     Bindhyachal
15786 * @licensor:   SAPIENNITRO
15787 * @namespaces: snro
15788 */
15789
15790//this will cause the browser to check for errors more aggressively
15791'use strict';
15792
15793/**
15794 * @namespace popupComp
15795 * @memberof roche
15796 * @property {null} property - description of property
15797 */
15798
15799(function (window, $, snro) {
15800  snro = window.snro = snro || {};
15801  var domElements = {
15802    $modalPopUp: $('#myModalPopUp'),
15803    $modalBackdrop: $('.js-modal-backdrop'),
15804    countryPickerLink: $('.js-link-country'),
15805    $resourceCenter: $('.js-resource-center')
15806  };
15807
15808  snro.modalPopComp = {
15809    moduleName: 'modalPopComp',
15810    personaCookieVal: snro.commonUtils.getCookie('persona-type'),
15811    personaMetaTagArr: $('meta[name="personaTag"]').attr('content'),
15812    personaMetaTag: $('meta[name="personaTag"]').attr('content') ? $('meta[name="personaTag"]').attr('content').split(',')[0] : '',
15813    currentChannel: $('input[name=currentChannel]').val(),
15814    redirectURL: $('#redirectURL').val(),
15815    pageType: $('meta[name="page-type"]').length ? $('meta[name="page-type"]').attr('content') : 'otherPage',
15816    isPersonaModalPopUp: false,
15817    dLinkWithNoMatchPersona: false,
15818    pageTypeResource: $('#pageType').length ? $('#pageType').val() : '',
15819    personaBool: $('.js-header-persona-link').length,
15820    popUpDisable: $('.js-popup-disable'),
15821
15822    //initialize the modal
15823    initializeModal: function initializeModal() {
15824      var metaTagPersonaLevel = this.personaMetaTag,
15825          currentChannelI = this.currentChannel,
15826          modalBodyText = '',
15827          dataPrivacyNode = $('input[name=dataPrivacy]'),
15828          checkPrivacyCookie = snro.commonUtils.getCookie('DataPrivacy'),
15829          deepLinkPage = this.currentChannel !== snro.commonUtils.getCookie('homePagePath');
15830      if (dataPrivacyNode.length && !checkPrivacyCookie && this.pageType.toLocaleLowerCase() !== 'home') {
15831        if (!(window.location.href.indexOf('?link1') > -1 || window.location.href.indexOf('?link2') > -1)) {
15832          snro.dataPrivacyModal.init();
15833          return;
15834        }
15835      }
15836      if (window.location.href.indexOf('?link1') > -1 || window.location.href.indexOf('?link2') > -1) {
15837        if (typeof jQuery.ui !== 'undefined') {
15838          $('#myPrivacyPopUp').draggable({
15839            handle: '.modal-privacy-content'
15840          });
15841        }
15842        $('#myPrivacyPopUp').addClass('show');
15843        $('.js-modal-privacy-page').addClass('show');
15844        return;
15845      }
15846      if (this.pageType.toLocaleLowerCase() !== 'home') {
15847        if (snro.modalPopComp.popUpDisable.data('countryPopupDisabled')) {
15848          snro.commonUtils.setCookie('homePagePath', snro.modalPopComp.currentChannel, Infinity);
15849          snro.commonUtils.setLocationAndLanguageCookie(snro.modalPopComp.currentChannel.replace('/', '|'), Infinity, '/', '.roche.com');
15850        } else if (!snro.commonUtils.getCookie('homePagePath') || deepLinkPage) {
15851          if (!$('.js-link-country').data('countrySelectorDisabled')) {
15852            /* modalBodyText = deepLinkPage && snro.commonUtils.getCookie('homePagePath')?window.Granite.I18n.get('rdoe_deeplinkpopupexists.' + currentChannelI,null,localStorage.getItem('i18nhint')):window.Granite.I18n.get('rdoe_deeplinkpopup.' + currentChannelI,null,localStorage.getItem('i18nhint')); */
15853            this.defaultAgreepopup();
15854            //this.updateTemplate(modalBodyText,false);
15855          }
15856        } else if (metaTagPersonaLevel && this.personaMetaTagArr && this.personaMetaTagArr.indexOf(this.personaCookieVal) === -1) {
15857          modalBodyText = window.Granite.I18n.get('rdoe_deeplinkpopup.' + metaTagPersonaLevel, null, localStorage.getItem('i18nhint'));
15858          this.dLinkWithNoMatchPersona = true;
15859          this.updateTemplate(modalBodyText, false);
15860        }
15861        if (snro.commonUtils.getCookie('persona-type') !== '') {
15862          snro.personaPickerComp._checkCookie();
15863        }
15864        snro.countrySelectorCmp.init('deeplink');
15865      } else if (!(window.location.href.indexOf('?persona=') > -1)) {
15866        snro.countrySelectorCmp.init();
15867      }
15868    },
15869
15870
15871    //default agree for locale and lang change
15872    defaultAgreepopup: function defaultAgreepopup() {
15873      var languageLocationCookie = snro.modalPopComp.currentChannel;
15874      snro.commonUtils.setCookie('homePagePath', snro.modalPopComp.currentChannel, Infinity);
15875      snro.commonUtils.setLocationAndLanguageCookie(languageLocationCookie.replace('/', '|'), Infinity, '/', '.roche.com');
15876      snro.personaPickerComp.init();
15877      if ($('.js-header-persona-link').hasClass('yesno')) {
15878        $('.js-c-persona-picker').slideUp('fast', function () {
15879          snro.personaPickerComp._setCookie(context.personaMetaTag);
15880          snro.personaPickerComp._checkCookie();
15881          var liipboxOb = document.getElementsByClassName('js-liipbox');
15882          liipboxOb[0].parentNode.removeChild(liipboxOb[0]);
15883          $('body').removeClass('x-no-scroll');
15884          window.location.reload();
15885        });
15886      }
15887    },
15888
15889    //update the template with data
15890    updateTemplate: function updateTemplate(modalBodyText, bool) {
15891      this.isPersonaModalPopUp = bool;
15892      domElements.$modalPopUp.find('.j-modal-title').text(window.Granite.I18n.get('rdoe_deeplinkpopup.title', null, localStorage.getItem('i18nhint')));
15893      domElements.$modalPopUp.find('.j-modal-body-text').text(modalBodyText);
15894      domElements.$modalPopUp.find('.js-btn-secondary').text(window.Granite.I18n.get('rdoe_deeplinkpopup.agree', null, localStorage.getItem('i18nhint')));
15895      domElements.$modalPopUp.find('.js-btn-primary').text(window.Granite.I18n.get('rdoe_deeplinkpopup.disagree', null, localStorage.getItem('i18nhint')));
15896      domElements.$modalPopUp.addClass('show');
15897      domElements.$modalBackdrop.addClass('show');
15898    },
15899
15900    // bind dom events
15901    bindEvents: function bindEvents() {
15902      var context = this,
15903          languageLocationCookie = context.currentChannel;
15904      $('body').on('click', '.j-close', function () {
15905        domElements.$modalPopUp.removeClass('show');
15906        domElements.$modalBackdrop.removeClass('show');
15907      });
15908      $('body').on('click', '.js-btn-secondary', function () {
15909        domElements.$modalPopUp.removeClass('show');
15910        domElements.$modalBackdrop.removeClass('show');
15911        $('.x-liipbox').removeClass('x-index-liipbox');
15912        if (context.dLinkWithNoMatchPersona) {
15913          snro.commonUtils.setCookie('persona-type', context.personaMetaTag, Infinity);
15914          snro.personaPickerComp._checkCookie();
15915          window.location.reload();
15916          return;
15917        }
15918        if (!context.isPersonaModalPopUp) {
15919          snro.commonUtils.removeCookie('persona-type');
15920          snro.commonUtils.setCookie('homePagePath', context.currentChannel, Infinity);
15921          snro.commonUtils.setLocationAndLanguageCookie(languageLocationCookie.replace('/', '|'), Infinity, '/', '.roche.com');
15922          if (!context.personaBool) {
15923            if (context.pageTypeResource) {
15924              domElements.$resourceCenter.addClass('show');
15925              domElements.$modalBackdrop.addClass('show');
15926            }
15927          }
15928          snro.personaPickerComp.init();
15929        } else {
15930          domElements.$modalPopUp.removeClass('show');
15931          $('.js-c-persona-picker').slideUp('fast', function () {
15932            snro.personaPickerComp._setCookie(context.personaMetaTag);
15933            snro.personaPickerComp._checkCookie();
15934            var liipboxOb = document.getElementsByClassName('js-liipbox');
15935            liipboxOb[0].parentNode.removeChild(liipboxOb[0]);
15936            $('body').removeClass('x-no-scroll');
15937            window.location.reload();
15938          });
15939        }
15940      });
15941      $('body').on('click', '.js-btn-primary', function () {
15942        if (!$('#persona-picker').length) {
15943          if (!snro.commonUtils.getCookie('homePagePath')) {
15944            snro.countrySelectorCmp.init();
15945          } else if (context.dLinkWithNoMatchPersona) {
15946            snro.commonUtils.setCookie('homePagePath', context.currentChannel, Infinity);
15947            snro.commonUtils.setLocationAndLanguageCookie(languageLocationCookie.replace('/', '|'), Infinity, '/', '.roche.com');
15948            context.redirectPage();
15949          } else {
15950            window.location.href = window.location.origin + '/' + snro.commonUtils.getCookie('homePagePath');
15951          }
15952        } else {
15953          snro.personaPickerComp._setCookie(snro.personaPickerComp.cookieValue);
15954          snro.personaPickerComp._checkCookie();
15955          context.redirectPage();
15956        }
15957        domElements.$modalPopUp.removeClass('show');
15958        domElements.$modalBackdrop.removeClass('show');
15959      });
15960      $('.privacy-popup-link').on('click', function (e) {
15961        e.preventDefault();
15962        window.open($(this).attr('href'), '_blank');
15963        return false;
15964      });
15965      $('.js-btn-privacy-page').on('click touchstart', function (e) {
15966        e.preventDefault();
15967        window.close();
15968      });
15969    },
15970
15971    // redirecting to the home page
15972    redirectPage: function redirectPage() {
15973      window.location.href = $('.c-header__link--logo').attr('href');
15974    },
15975    checkCampaignTag: function checkCampaignTag() {
15976      var currentUrl = window.location.href,
15977          queryParam = void 0;
15978      if (currentUrl.indexOf('?cid') > -1 || currentUrl.indexOf('?ned') > -1 || currentUrl.indexOf('?smm') > -1 || currentUrl.indexOf('?dis') > -1 || currentUrl.indexOf('?sem') > -1 || currentUrl.indexOf('?emm') > -1 || currentUrl.indexOf('?aff') > -1 || currentUrl.indexOf('?smp') > -1) {
15979        queryParam = currentUrl.split('?')[1];
15980        this.setCampaignCookie(queryParam);
15981      }
15982    },
15983    setCampaignCookie: function setCampaignCookie(tagValue) {
15984      var dataPrivacyCookie = snro.commonUtils.getCookie('DataPrivacy');
15985      if (!dataPrivacyCookie) {
15986        snro.commonUtils.setCookie('campaign-code', tagValue);
15987      }
15988    },
15989    init: function init() {
15990      if ($('input[name=dataPrivacy]').length) {
15991        this.checkCampaignTag();
15992      }
15993      if (!domElements.countryPickerLink.data('countrySelectorDisabled')) {
15994        $('body').on('click', '.js-link-country', function () {
15995          snro.countrySelectorCmp.reselectionInitiated = true;
15996          snro.countrySelectorCmp.initializeLanguageSelector();
15997        });
15998      }
15999      var parentTarget = snro.commonUtils.is_touch_device() && snro.commonUtils.isMobileMode() ? '.js-liipbox .js-header-persona-link' : 'header .js-header-persona-link';
16000      $('body').on('click', parentTarget, function () {
16001        snro.personaPickerComp.isPersonaFromClick = true;
16002        snro.personaPickerComp.cookieFlag = snro.commonUtils.getCookie('persona-type') || snro.countrySelectorCmp.countrySelectorPassed;
16003        snro.personaPickerComp._callPersonaPicker($('.js-header-persona-link').data('url'));
16004      });
16005      if (this.pageType.toLowerCase() !== 'error') {
16006        this.initializeModal();
16007        this.bindEvents();
16008        if (snro.commonUtils.getCookie('persona-type') !== '' && typeof snro.commonUtils.getCookie('persona-type') !== 'undefined') {
16009          snro.personaPickerComp._checkCookie();
16010        }
16011      }
16012      if (window.location.href.indexOf('?persona=') > -1) {
16013        snro.dataPrivacyModal.init();
16014        return;
16015      }
16016    }
16017  };
16018})(window, window.jQuery, window.snro);
16019
16020/*
16021 * socialshare.es
16022 * [ Behavior for social share icons using sharethis ]
16023 *
16024 * @project:    SN-RO
16025 * @date:       2017-09-27
16026 * @author:     Shashank
16027 * @licensor:   SAPIENNITRO
16028 * @namespaces: snro
16029 */
16030
16031//this will cause the browser to check for errors more aggressively
16032'use strict';
16033/**
16034 * @namespace video
16035 * @memberof roche
16036 *
16037 */
16038
16039(function (window, $, snro) {
16040  snro = window.snro || {};
16041
16042  // defining module
16043  snro.socialshare = {
16044    moduleName: 'socialshare',
16045
16046    loadSTApi: function loadSTApi() {
16047      var apiKey = $('.js-st-container').data('shareid') || '59d313920b76a500114be43f';
16048      var script = document.createElement('script');
16049      script.type = 'text/javascript';
16050      script.src = '//platform-api.sharethis.com/js/sharethis.js#property=' + apiKey + '&product=inline-share-buttons';
16051      script.async = true;
16052      document.getElementsByTagName('head')[0].appendChild(script);
16053
16054      script.onload = script.onreadystatechange = function () {
16055        var socialIconArr = $('.js-social-btn-st').length && $('.js-social-btn-st').data('visible-icon').split(',') || [];
16056        var intervalTimer = setTimeout(function () {
16057          $('.js-social-btn-st').find('[data-network]').each(function () {
16058            if (socialIconArr.indexOf($(this).data('network')) !== -1) {
16059              $('.js-st-container').addClass($(this).data('network'));
16060            } else {
16061              $(this).addClass('hidden');
16062            }
16063          });
16064          clearTimeout(intervalTimer);
16065        }, 1000);
16066      };
16067    },
16068    bindAnalyticsEvents: function bindAnalyticsEvents() {
16069      var pageName = $('[title]').text() ? $('title').text() : 'home',
16070          linkSectionName = $('meta[property="og:title"]').attr('content') ? $('meta[property="og:title"]').attr('content').toLocaleLowerCase() : 'social';
16071
16072      $('body').on('click', '[data-network]', function () {
16073        var socialType = $(this).data('network');
16074        window.digitalData = {
16075          link: {
16076            linkPageName: pageName,
16077            linkCategory: 'external',
16078            linkSection: linkSectionName,
16079            linkHeader: 'social',
16080            linkText: socialType,
16081            linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth(),
16082            social: socialType,
16083            event: 'social-share'
16084          }
16085        };
16086        snro.analytics.trackEvent(window.digitalData, 'generic-link-tracking');
16087      });
16088    },
16089
16090
16091    // Module initialization
16092    init: function init() {
16093      this.loadSTApi();
16094      this.bindAnalyticsEvents();
16095      // window.sharethis.addEventListener('sharethis.ready', function() {
16096      //   snro.commonUtils.log('sharethis api is ready');
16097      // });
16098    }
16099  };
16100})(window, window.jQuery, window.snro);
16101
16102/*!
16103 * Assa.js
16104
16105 * This file contians  assaymenu functionality for product
16106 *
16107 * @project   SapientNitro Roche Diagonostics
16108 * @date      2017-10-10
16109 * @author    Shubham
16110 * @dependencies jQuery
16111 */
16112
16113//this will cause the browser to check for errors more aggressively
16114'use strict';
16115
16116/**
16117 * @namespace Main
16118 * @memberof snro
16119 * @property {null} property - description of property
16120 */
16121
16122(function (window, $, snro) {
16123  var _cache = {};
16124
16125  snro = window.snro = snro || {};
16126
16127  snro.assayMenuTab = {
16128    updateCache: function updateCache() {
16129      _cache.assayMenuNode = $('.js-assay-menu');
16130      _cache.assayMenuButton = $('.js-assay-menu__btn');
16131      _cache.assayMenuNodeDesktop = $('.js-assay-menu-desktop');
16132      _cache.assayMenuData = $('.js-assay-menu-data');
16133      _cache.assayMenuDataWrapper = $('.js-assay-menu-wrapper');
16134    },
16135    showTabView: function showTabView(tabName) {
16136      _cache.assayMenuNode.find('.js-item').removeClass('selected');
16137      _cache.assayMenuNode.find('[data-target=' + tabName + ']').addClass('selected');
16138      _cache.assayMenuNode.find('.js-tab-view').hide();
16139      _cache.assayMenuNode.find('.' + tabName).show();
16140    },
16141    defaultView: function defaultView() {
16142      if (!snro.commonUtils.isDesktop()) {
16143        _cache.assayMenuNode.find('.js-item').eq(1).addClass('selected');
16144      } else {
16145        _cache.assayMenuNodeDesktop.find('.js-item').eq(0).addClass('selected');
16146      }
16147      _cache.assayMenuNode.find('.js-tab-view').eq(1).show();
16148    },
16149    checkEmptyData: function checkEmptyData() {
16150      if (_cache.assayMenuData.text().trim(' ') !== '') {
16151        _cache.assayMenuDataWrapper.removeClass('hide');
16152      } else {
16153        _cache.assayMenuNode.hide();
16154      }
16155    },
16156    bindEvents: function bindEvents() {
16157      _cache.assayMenuNode.find('.js-view-btn').on('click', function () {
16158        _cache.assayMenuNode.find('.js-wrapper').show();
16159        _cache.assayMenuButton.hide();
16160      });
16161      _cache.assayMenuNode.find('.js-close').on('click', function () {
16162        _cache.assayMenuNode.find('.js-wrapper').hide();
16163        _cache.assayMenuButton.show();
16164      });
16165      _cache.assayMenuNode.find('.js-item').on('click', function (e) {
16166        e.preventDefault();
16167        if (!$(this).hasClass('selected')) {
16168          var tabName = $(this).data('target');
16169          snro.assayMenuTab.showTabView(tabName);
16170        }
16171      });
16172    },
16173
16174
16175    // Module initialization
16176    init: function init() {
16177      this.updateCache();
16178      this.defaultView();
16179      this.checkEmptyData();
16180      this.bindEvents();
16181    }
16182  };
16183})(window, window.jQuery, window.snro);
16184
16185/*
16186 * c_iframe.js
16187 * [ This javascript code is used to  display the iframe  on the page and remove inline style on mobile. ]
16188 *
16189 * @project:    SN-RO
16190 * @date:       2018-01-04
16191 * @author:     Shubham
16192 * @licensor:   SAPIENNITRO
16193 * @namespaces: snro
16194 */
16195
16196//this will cause the browser to check for errors more aggressively
16197'use strict';
16198
16199/**
16200 * @namespace iframeCmp,
16201 * @memberof roche
16202 * @property {null} property - description of property
16203 */
16204
16205(function (window, $, snro) {
16206
16207  snro = window.snro = snro || {};
16208
16209  snro.iframeCmp = {
16210    moduleName: 'iframeCmp',
16211    // assignment of dom selectors to variables
16212
16213    renderVideoDimension: function renderVideoDimension() {
16214      var $allVideos = $('iframe[src*="//player.vimeo.com"], iframe[src*="//www.youtube.com"], object, embed'),
16215          aspectRatio = 0.5625;
16216      $allVideos.each(function () {
16217        var $this = $(this),
16218            parentIframeNode = $this.closest('.js-iframe'),
16219            newWidth = parentIframeNode.width();
16220        $this.width(newWidth).height(newWidth * aspectRatio);
16221        $this.addClass('iframe-video');
16222      });
16223    },
16224    renderIframeHeight: function renderIframeHeight() {
16225      var $allIframes = $('.js-iframe iframe');
16226      $allIframes.each(function () {
16227        var $this = $(this),
16228            iframeParentNode = $this.closest('.js-iframe'),
16229            desktopHeight = $this.data('desktop-height'),
16230            tabletHeight = $this.data('tablet-height'),
16231            mobileHeight = $this.data('mobile-height');
16232        if ($this.hasClass('iframe-video')) {
16233          $this.css('max-height', desktopHeight);
16234          if (snro.commonUtils.isTabletMode() && typeof tabletHeight !== 'undefined') {
16235            $this.css('max-height', tabletHeight);
16236          }
16237          if (snro.commonUtils.isMobileMode() && typeof mobileHeight !== 'undefined') {
16238            $this.css('max-height', mobileHeight);
16239          }
16240        } else {
16241          iframeParentNode.css('height', desktopHeight);
16242          if (snro.commonUtils.isTabletMode() && typeof tabletHeight !== 'undefined') {
16243            iframeParentNode.css('height', tabletHeight);
16244          }
16245          if (snro.commonUtils.isMobileMode() && typeof mobileHeight !== 'undefined') {
16246            iframeParentNode.css('height', mobileHeight);
16247          }
16248        }
16249      });
16250    },
16251
16252
16253    // Module initialization
16254    init: function init() {
16255      this.renderVideoDimension();
16256      this.renderIframeHeight();
16257    }
16258  };
16259})(window, window.jQuery, window.snro);
16260
16261/*
16262 * c_carousel.js
16263 * [ This javascript code is used to display carousel component. ]
16264 *
16265 * @project:    SN-RO
16266 * @date:       2015-08-02
16267 * @author:     Prashant
16268 * @licensor:   SAPIENNITRO
16269 * @namespaces: snro
16270 */
16271
16272//this will cause the browser to check for errors more aggressively
16273'use strict';
16274
16275/**
16276 * @namespace carouselComp
16277 * @memberof roche
16278 * @property {null} property - description of property
16279 */
16280
16281(function (window, $, snro) {
16282
16283  var _cache = {};
16284
16285  snro = window.snro = snro || {};
16286
16287  /**
16288   * Sync clone images with original images
16289   */
16290  function syncCloneImages() {
16291    var $carouselItemArray = $('.js-event-item');
16292    $carouselItemArray.each(function (index, item) {
16293      var origImgSrc = $(item).find('.js-event-asset').attr('src');
16294      $(item).find('.js-event-asset-cloned').attr('src', origImgSrc);
16295    });
16296  }
16297
16298  function pauseVideo($jpPlayer, targetSlide) {
16299    $jpPlayer.bind($.jPlayer.event.canplay + '.inactiveSlideVideo', function () {
16300      $jpPlayer.jPlayer('pause', 0);
16301      $jpPlayer.unbind('.inactiveSlideVideo');
16302    });
16303    $jpPlayer.bind($.jPlayer.event.play + '.inactiveSlideVideo', function () {
16304      $jpPlayer.unbind('.inactiveSlideVideo');
16305    });
16306    $jpPlayer.jPlayer('pause');
16307    $(targetSlide).find('.video-info').css('display', 'block');
16308    $(targetSlide).find('.jp-interface').css('visibility', 'hidden');
16309    var playerTime = $($jpPlayer).data('jPlayer').status.currentTime;
16310    if (playerTime > 0) {
16311      $($jpPlayer).find('img').css('display', 'none');
16312    }
16313  }
16314  snro.carouselComp = {
16315    moduleName: 'carouselComp',
16316    currentSlideItem: '',
16317    // assignment of dom selectors to variables
16318    updateCache: function updateCache() {
16319      _cache.carouselContainer = $('.js-carousel-content');
16320      _cache.carousel = $('.js-carousel');
16321      _cache.validChange = true; // variable to Validate carousel change event
16322    },
16323
16324
16325    // bind dom events
16326    bindEvents: function bindEvents() {
16327      this.initializeCarousel();
16328      _cache.carousel.on('sclick', '.js-event-item', function (e) {
16329        e.preventDefault();
16330        var carousel = $(this).parents('.js-carousel')[0];
16331        if ($(carousel).data('carouselVariation') === 'bigImage') {
16332          var currentSlide = $(this),
16333              slickContainer = $(this).parents('.js-carousel-content');
16334          if (!currentSlide.hasClass('slick-current')) {
16335            if (currentSlide.prev('.slick-active').hasClass('slick-current')) {
16336              slickContainer.slick('slickNext');
16337            } else {
16338              slickContainer.slick('slickPrev');
16339            }
16340          }
16341        }
16342      });
16343
16344      _cache.carouselContainer.on('beforeChange', function (event, slick, currentSlide, nextSlide) {
16345        if (currentSlide !== nextSlide) {
16346          var parentContainer = $(this).parent('.js-carousel'),
16347              carouselVariation = parentContainer.data('carouselVariation');
16348          //nextSlideAnimationClass = 'slideInRight';
16349
16350          if (carouselVariation === 'bigImage') {
16351
16352            //Get total number of slides
16353            var slideCount = slick.slideCount,
16354                lastSlideIndex = slideCount - 1;
16355
16356            if (currentSlide === 0 && nextSlide === lastSlideIndex) {
16357              //nextSlideAnimationClass = 'slideInLeft';
16358            } else if (currentSlide === lastSlideIndex && nextSlide === 0) {
16359              //nextSlideAnimationClass = 'slideInRight';
16360            } else if (nextSlide < currentSlide) {}
16361            //nextSlideAnimationClass = 'slideInLeft';
16362
16363
16364            /*let $jpPlayer = $(targetSlide).find('.jp-jplayer');
16365            $jpPlayer = $jpPlayer.length ? $($jpPlayer[0]) : null;
16366            if ($jpPlayer) {
16367              pauseVideo($jpPlayer, targetSlide);
16368            }*/
16369
16370            parentContainer.find('.slick-slide').each(function (index, slide) {
16371              var jplayer = $(slide).find('.jp-jplayer');
16372              if (jplayer.length) {
16373                pauseVideo($(jplayer[0]), slide);
16374              }
16375            });
16376
16377            parentContainer.find('.slick-slide .c-carousel__event-asset').removeClass('slideInRight slideOutLeft slideOutRight slideInLeft');
16378
16379            var $activeSlides = parentContainer.find('.slick-slide.slick-active'),
16380                activeSlidesImagesArray = [];
16381
16382            //Get Total number of active slides
16383            //let activeSlides = $activeSlides.length;
16384
16385            //Get all active slides image sources as array
16386            $activeSlides.each(function (index, slide) {
16387              activeSlidesImagesArray.push($(slide).find('.js-event-asset-cloned').attr('data-original'));
16388            });
16389
16390            //Get all indexes of active slides after change as array
16391            /*for (let i = 0; i <= activeSlides; i++) {
16392              let newIndex = ((nextSlide + i) < slideCount) ? (nextSlide + i) : (nextSlide + i - slideCount),
16393                $slideFragment = $(slick.$slides.get(newIndex));
16394               if (i === 0) {
16395                $slideFragment.find('.js-asset-wrapper').addClass(nextSlideAnimationClass);
16396              }
16397            }*/
16398          } else {
16399            parentContainer.find('.slick-slide.slick-active').each(function (index, slide) {
16400              var jplayer = $(slide).find('.jp-jplayer');
16401              if (jplayer.length) {
16402                pauseVideo($(jplayer[0]), slide);
16403              }
16404            });
16405          }
16406        }
16407      });
16408
16409      /**
16410       * Function called after the slide change event is completed
16411       */
16412      _cache.carouselContainer.on('afterChange', function (event, slick, currentSlide) {
16413
16414        //scroll slick dots to position inside screen view
16415        snro.carouselComp.currentSlideItem = currentSlide;
16416        slick.$dots.find('.slick-active').scrollintoview({
16417          direction: 'horizontal'
16418        });
16419
16420        var parentContainer = $(this).parent('.js-carousel'),
16421            carouselVariation = parentContainer.data('carouselVariation');
16422        if (carouselVariation === 'bigImage') {
16423          //Adding classes for animation
16424          parentContainer.find('.slick-slide.slick-current .js-asset-wrapper').on('animationend webkitAnimationEnd oAnimationEnd', function () {
16425            //Removing animation classes after slide transition is complete
16426            if (window.requestAnimationFrame) {
16427              parentContainer.find('.slick-slide .c-carousel__event-content').addClass('fadeIn');
16428              parentContainer.find('.slick-slide .c-carousel__event-asset').removeClass('slideLeft slideInRight slideInLeft');
16429              syncCloneImages();
16430
16431              //lazyload dynamically visible images
16432              snro.commonUtils.lazyloadImages();
16433            }
16434          });
16435        }
16436        // snro.commonUtils.lazyloadImages();
16437      });
16438    },
16439    addSelector: function addSelector() {
16440      var carouselChild = $('[data-carousel-variation="bigImage"] .slick-slide:not(.slick-cloned):not(.slick-active)');
16441      $(carouselChild[carouselChild.length - 1]).addClass('carousel-last-child');
16442    },
16443
16444
16445    /**
16446     * Initialize carousal
16447     */
16448    initializeCarousel: function initializeCarousel() {
16449      _cache.carousel.each(function (k, v) {
16450        if (!$(this).find('.slick-dots').length) {
16451          var carouselContainer = $($(v).find('.js-carousel-content')[0]),
16452              carouselDotsConatiner = $($(v).find('.c-carousel__dots')[0]),
16453              centerMode = $(v).data('carouselVariation') === 'bigImage',
16454              carousalAutoplay = $(v).data('autoplay'),
16455              carousalAutoplayTime = $(v).data('autoplayTime'),
16456              speed = $(v).data('carouselVariation') === 'bigImage' ? 0 : 300,
16457              slidesToShow = $(v).data('carouselVariation') === 'bigImage' ? 2 : 3;
16458
16459          carouselContainer.slick({
16460            variableWidth: true,
16461            arrows: true,
16462            adaptiveHeight: true,
16463            centerMode: centerMode,
16464            centerPadding: '0px',
16465            slidesToShow: slidesToShow,
16466            edgeFriction: 0,
16467            slidesToScroll: 1,
16468            infinite: true,
16469            focusOnSelect: centerMode,
16470            draggable: false,
16471            autoplay: carousalAutoplay,
16472            autoplaySpeed: carousalAutoplayTime,
16473            dots: true,
16474            speed: speed,
16475            useTransform: false,
16476            nextArrow: '<button type="button" class="slick-next">
16476<img src="/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/Group53457.svg" alt="slick-next" ><span class=\'sr-only\'>Next</span></button>',
16477            prevArrow: '<button type="button" class="slick-prev"><img src="/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/Group53338.svg" alt="slick-prev" ><span class=\'sr-only\'>Prev</span></button>',
16478            responsive: [{
16479              breakpoint: 768,
16480              settings: {
16481                slidesToShow: 1,
16482                variableWidth: false,
16483                infinite: true,
16484                draggable: true,
16485                //speed: 300,
16486                dots: true,
16487                accessibility: false,
16488                pauseOnDotsHover: false,
16489                pauseOnHover: false,
16490                nextArrow: '<button type="button" class="slick-next"><img src="/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/Group53522.svg" alt="slick-next"><span class=\'sr-only\'>Next</span></button>',
16491                prevArrow: '<button type="button" class="slick-prev"><img src="/etc.clientlibs/roche/diagnostics/clientlibs/roche-global-publish/resources/images/Group53521.svg" alt="slick-prev"><span class=\'sr-only\'>prev</span></button>'
16492              }
16493            }],
16494            appendDots: carouselDotsConatiner
16495          });
16496          /*carouselDotsConatiner.each(function(index,value) {
16497            $(this).find('li').attr()
16498          });*/
16499
16500          carouselContainer.next().find('.slick-dots').on('click', 'li', function (e) {
16501            if (carousalAutoplay) {
16502              carouselContainer.slick('slickPlay');
16503            }
16504            $.extend(window.digitalData['link'], { linkPageName: snro.analytics.pageName || 'roche', linkCategory: 'internal', linkSection: 'Progressbar:' + $(e.currentTarget).index(), linkHeader: 'carousel', linkText: 'carousel-dots', linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth() });
16505            snro.analytics.trackEvent(window.digitalData, 'generic-link-tracking');
16506          });
16507
16508          carouselContainer.on('click', '.slick-next, .slick-prev', function () {
16509            if (carousalAutoplay) {
16510              carouselContainer.slick('slickPause');
16511            }
16512            $.extend(window.digitalData['link'], { linkPageName: snro.analytics.pageName || 'roche', linkCategory: 'internal', linkSection: 'Progressbar:' + snro.carouselComp.currentSlideItem, linkHeader: 'carousel', linkText: 'next-prev', linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth() });
16513            snro.analytics.trackEvent(window.digitalData, 'generic-link-tracking');
16514          });
16515        }
16516      });
16517
16518      snro.commonUtils.lazyloadImages();
16519      /**
16520       * Function called just before the slide change
16521       */
16522
16523      $('.slick-dots li').on('click', function () {
16524        $(this).parents('.slick-slider').find('.slick-slide.slick-current').trigger('sclick');
16525      });
16526    },
16527
16528
16529    // Module initialization
16530    init: function init() {
16531      var _this = this;
16532
16533      this.updateCache();
16534      this.bindEvents();
16535      this.addSelector();
16536
16537      //call init again in case targeting is there
16538      if (window.ContextHub) {
16539        window.ContextHub.eventing.on(window.ContextHub.Constants.EVENT_TEASER_LOADED, function () {
16540          setTimeout(function () {
16541            _this.updateCache();
16542            _this.bindEvents();
16543          }, 500);
16544        });
16545      }
16546    }
16547  };
16548})(window, window.jQuery, window.snro);
16549
16550/*
16551* f_contactForm.js
16552* [ This javascript code is used for Contact form. ]
16553*
16554* @project:    Roche OWP
16555* @date:       2017-09-19
16556* @author:     Vikash, Shubham
16557* @licensor:   SAPIENNITRO
16558* @namespaces: snro
16559*/
16560
16561//this will cause the browser to check for errors more aggressively
16562'use strict';
16563
16564/**
16565 * @namespace contactForm
16566 * @memberof roche
16567 * @property {null} property - description of property
16568 */
16569
16570(function (window, $, snro) {
16571
16572  var _cache = {};
16573
16574  snro = window.snro || {};
16575
16576  snro.contactForm = {
16577    moduleName: 'contactForm',
16578    interactedFieldList: [],
16579    formType: '',
16580    startCounter: 1,
16581    pageReferrer: document.referrer,
16582    formSubmitSucccessFlag: false,
16583    // assignment of dom selectors to variables
16584    updateCache: function updateCache() {
16585      _cache.questionIcons = $('.default-layout');
16586      _cache.checkboxPath = $('.js-contact-form [type="checkbox"]');
16587      _cache.checkboxLabel = $('.js-contact-form  .form-check-label');
16588      _cache.submitButton = $('.js-contact-form  [type="submit"]');
16589      _cache.actionPath = $('.js-contact-form  [name="actionPath"]').val();
16590      _cache.currentURL = $('[name="currentPagepath"]').val();
16591      _cache.input = $('.js-contact-form input[type="text"]');
16592      _cache.textarea = $('.js-contact-form textarea');
16593      _cache.select = $('.js-contact-form  select');
16594      _cache.labelText = $('.js-contact-form .dropdown label');
16595      _cache.formTitle = $('.js-form-title .title');
16596      _cache.notifyType = $('.js-notification-type');
16597      window.autosize(_cache.textarea);
16598    },
16599    formStartAnalytics: function formStartAnalytics(fieldName) {
16600      if (this.startCounter < 2) {
16601        window.digitalData = {
16602          link: {
16603            linkPageName: snro.analytics.pageName,
16604            linkCategory: 'internal',
16605            linkSection: 'form',
16606            linkHeader: snro.contactForm.formType,
16607            linkText: fieldName,
16608            linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth(),
16609            formName: snro.contactForm.formType,
16610            formType: 'contact-us',
16611            event: 'form-start'
16612          }
16613        };
16614        snro.analytics.trackEvent(window.digitalData, 'form-tracking');
16615      }
16616      this.startCounter++;
16617    },
16618    getFormType: function getFormType() {
16619      if (document.getElementsByTagName('meta')['form-type'] === undefined) {
16620        this.formType = 'contact-us';
16621      } else {
16622        this.formType = document.getElementsByTagName('meta')['form-type'].content && document.getElementsByTagName('meta')['form-type'].content.toLocaleLowerCase() || '';
16623      }
16624    },
16625    fireAnalytics: function fireAnalytics() {
16626      var errorList = snro.contactForm.findErrorList(),
16627          userAgent = window.navigator.userAgent,
16628          old_ie = userAgent.indexOf('MSIE '),
16629          new_ie = userAgent.indexOf('Trident/');
16630
16631      if (old_ie > -1 || new_ie > -1) {
16632        window.scrollTo(0, 280);
16633      }
16634
16635      window.digitalData = {
16636        link: {
16637          linkPageName: snro.analytics.pageName,
16638          linkCategory: 'internal',
16639          linkSection: 'form',
16640          linkHeader: snro.contactForm.formType,
16641          linkText: _cache.submitButton.val().trim().toLowerCase(),
16642          linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth(),
16643          formName: snro.contactForm.formType,
16644          formType: 'contact-us',
16645          formError: errorList,
16646          event: 'form-errors'
16647        }
16648      };
16649      snro.analytics.trackEvent(window.digitalData, 'form-tracking');
16650    },
16651
16652    // submitting form fields by AJAX
16653    callPageNotification: function callPageNotification() {
16654      var formOb = '',
16655          captchaResponse = '',
16656          captchaResp = '',
16657          captchaErrorHTML = '<div class="captcha-error">' + window.Granite.I18n.get('rdoe_ContactUs.CaptchaError', null, localStorage.getItem('i18nhint')) + '</div>',
16658          formName = $('input[name=":formid"]').val();
16659
16660      if (typeof window.grecaptcha !== 'undefined') {
16661        captchaResp = window.grecaptcha.getResponse();
16662        if (captchaResp === '' && !$('.captcha-error').length) {
16663          $('.g-recaptcha').after(captchaErrorHTML);
16664        } else if (captchaResp !== '') {
16665          captchaResponse = $('#g-recaptcha-response').val();
16666          window.grecaptcha.reset();
16667          $('.captcha-error').hide();
16668        }
16669      } else {
16670        captchaResp = 'empty';
16671      }
16672
16673      if (captchaResp !== '') {
16674        snro.contactForm.formSubmitSucccessFlag = true;
16675        snro.commonUtils.loader($('.c-contact-form'), true, true);
16676        //formOb = $('#' + formName).serialize();
16677        formOb = $('form#' + formName + ' input, form#' + formName + ' select, form#' + formName + ' textarea').not('input[name=":formstart"]').serialize();
16678        var date = new Date(),
16679            timeout = 30000,
16680            dataString = 'formData=' + formOb + '&date=' + date + '&currentPagepath=' + _cache.currentURL + '&recaptcha=' + captchaResponse + '&referrer=' + snro.contactForm.pageReferrer;
16681        if (_cache.notifyType.hasClass('js-notification-error') || _cache.notifyType.hasClass('js-notification-confirmation')) {
16682          _cache.notifyType.removeClass('js-notification-error');
16683          _cache.notifyType.removeClass('js-notification-confirmation');
16684        }
16685        snro.pageNotification.getPageNotification(_cache.actionPath, dataString, timeout);
16686      }
16687    },
16688
16689
16690    // getting errors from the form
16691    findErrorList: function findErrorList() {
16692      var errorList = '',
16693          formName = $('input[name=":formid"]').val(),
16694          validator = $('#' + formName).validate();
16695
16696      for (var i = 0; i < validator.errorList.length; i++) {
16697        var _this = validator.errorList[i].message;
16698        _this = _this.replace(/\s+/g, '-').toLowerCase();
16699        if (_this) {
16700          errorList += _this + '|';
16701        }
16702      }
16703      var str = errorList.slice(0, -1);
16704      return str;
16705    },
16706
16707
16708    // bind dom events
16709    bindEvents: function bindEvents() {
16710      _cache.checkboxPath.on('click', function () {
16711        var fieldName = $(this).attr('aria-label');
16712        fieldName = fieldName.replace(/\s+/g, '-').toLowerCase();
16713        snro.contactForm.interactedFieldList.push(fieldName);
16714        snro.contactForm.formStartAnalytics(fieldName);
16715        if ($(this).is(':checked')) {
16716          $(this).siblings('.form-check-label').addClass('js-checked');
16717        } else {
16718          $(this).siblings('.form-check-label').removeClass('js-checked');
16719        }
16720      });
16721      _cache.checkboxPath.on('focus', function () {
16722        $(this).next().addClass('c-focus-class');
16723      });
16724      _cache.checkboxPath.on('blur', function () {
16725        $(this).next().removeClass('c-focus-class');
16726      });
16727      $(document).keydown(function (e) {
16728        if (e.which === 13 && _cache.checkboxLabel.hasClass('c-focus-class')) {
16729          _cache.checkboxPath.prop('checked', 'checked');
16730          _cache.checkboxLabel.addClass('js-checked');
16731        }
16732      });
16733      _cache.input.on('focus', function () {
16734        var fieldName = $(this).attr('aria-label');
16735        fieldName = fieldName.replace(/\s+/g, '-').toLowerCase();
16736        snro.contactForm.interactedFieldList.push(fieldName);
16737        snro.contactForm.formStartAnalytics(fieldName);
16738        $(this).closest('.default-layout').addClass('js-active');
16739      });
16740      _cache.textarea.on('focus', function () {
16741        var fieldName = $(this).attr('aria-label');
16742        fieldName = fieldName.replace(/\s+/g, '-').toLowerCase();
16743        snro.contactForm.interactedFieldList.push(fieldName);
16744        snro.contactForm.formStartAnalytics(fieldName);
16745        $(this).closest('.default-layout').addClass('js-active');
16746      });
16747      _cache.select.on('click', function () {
16748        var fieldName = $(this).attr('aria-label');
16749        fieldName = fieldName.replace(/\s+/g, '-').toLowerCase();
16750        snro.contactForm.interactedFieldList.push(fieldName);
16751        snro.contactForm.formStartAnalytics(fieldName);
16752        $(this).closest('.default-layout').addClass('js-active');
16753      });
16754      window.addEventListener('beforeunload', function () {
16755        if ($('.js-contact-form').length && !snro.contactForm.formSubmitSucccessFlag) {
16756          var lastInteractedField = snro.contactForm.interactedFieldList.pop();
16757          window.digitalData = {
16758            link: {
16759              linkPageName: snro.analytics.pageName,
16760              linkCategory: 'internal',
16761              linkSection: 'form',
16762              linkHeader: snro.contactForm.formType,
16763              linkText: 'form-abandon',
16764              linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth(),
16765              formName: snro.contactForm.formType,
16766              formType: 'contact-us',
16767              lastAccessFormField: lastInteractedField,
16768              event: 'form-abandon'
16769            }
16770          };
16771          snro.analytics.trackEvent(window.digitalData, 'form-tracking');
16772        }
16773      });
16774      this.initializeTooltips();
16775      //Check Tooltip div
16776      $('form').find('input,textarea,select').each(function () {
16777        var helperTextSpan = $(this).closest('.default-layout').siblings('.form_row_description').find('span').length;
16778        if (helperTextSpan !== 0) {
16779          $(this).closest('.default-layout').siblings('a.x-hint-btn').removeClass('hidden');
16780        } else {
16781          $(this).closest('.default-layout').siblings('a.x-hint-btn').addClass('hidden');
16782        }
16783      });
16784    },
16785
16786
16787    /**
16788     * Initialize tooltips
16789     */
16790    initializeTooltips: function initializeTooltips() {
16791
16792      // adding anchor tag to be used as questionIcon for accessbility purpose
16793      _cache.questionIcons.after('<a href="javascript:void(0)" class="x-
16793hint-btn x-sub-hover"><i class="icon-toolTip"></i><span class="sr-only">text</span></a>');
16794      var hintBtns = $('.x-hint-btn');
16795
16796      function hideHint(context) {
16797        context = context ? context : this;
16798        $(context).popover('hide').removeClass('active');
16799        $('.hint-text').css('margin-left', 0);
16800      }
16801
16802      function showHint(context) {
16803        context = context ? context : this;
16804        $(context).popover('show').addClass('active');
16805        window.setTimeout(function () {
16806          $('.hint-text').css('margin-left', -1);
16807        });
16808
16809        window.setTimeout(function () {
16810          $(window.document).one('click', function () {
16811            hideHint(context);
16812          });
16813        });
16814      }
16815
16816      // preventing default behaviour of anchors used as hint button
16817      hintBtns.click(function () {
16818        if ($(this).hasClass('active')) {
16819          hideHint(this);
16820        } else {
16821          showHint(this);
16822        }
16823      });
16824
16825      if (snro.commonUtils.isDesktop()) {
16826        hintBtns.hover(function () {
16827          showHint(this);
16828        }, function () {
16829          hideHint(this);
16830        }).on('focusout', function () {
16831          $(window.document).click();
16832        });
16833      }
16834
16835      // asigning related descriptions to question icons required for bootstrap popover
16836      hintBtns.each(function () {
16837        var hintBtn = $(this);
16838        var hintText = hintBtn.siblings('.form_row_description').text();
16839        hintBtn.attr('data-content', hintText);
16840      });
16841
16842      hintBtns.popover({
16843        toggle: 'popover',
16844        placement: 'top',
16845        trigger: 'manual',
16846        animation: true
16847      }).map(function () {
16848        $(this).data('bs.popover').tip().addClass('hint-text');
16849      });
16850    },
16851
16852
16853    // Module initialization
16854    init: function init() {
16855      this.updateCache();
16856      this.bindEvents();
16857      this.getFormType();
16858    }
16859  };
16860})(window, window.jQuery, window.snro);
16861
16862/*
16863 * c_socialfeed.js
16864 * [ This javascript code is used to display socialfeed component. ]
16865 *
16866 * @project:    SN-RO
16867 * @date:       2017-09-23
16868 * @author:     Vikash
16869 * @licensor:   SAPIENNITRO
16870 * @namespaces: snro
16871 */
16872
16873//this will cause the browser to check for errors more aggressively
16874'use strict';
16875
16876/**
16877 * @namespace socialfeedComp
16878 * @memberof roche
16879 * @property {null} property - description of property
16880 */
16881
16882(function (window, $, snro) {
16883  var _cache = {};
16884  snro = window.snro = snro || {};
16885  snro.socialfeedComp = {
16886    moduleName: 'socialfeedComp',
16887
16888    // assignment of dom selectors to variables
16889    updateCache: function updateCache() {
16890      _cache.feedsContent = $('.js-socialfeed-content');
16891    },
16892
16893
16894    /**
16895     * Initialize socialfeed
16896     */
16897    initializeSocialFeed: function initializeSocialFeed() {
16898      var _this = this;
16899
16900      // Loading the widgets.js file asynchronously
16901      window.twttr = function (d, s, id) {
16902        var js = void 0,
16903            fjs = d.getElementsByTagName(s)[0],
16904            t = window.twttr || {};
16905        if (d.getElementById(id)) {
16906          return;
16907        }
16908        js = d.createElement(s);
16909        js.id = id;
16910        js.src = 'https://platform.twitter.com/widgets.js';
16911        fjs.parentNode.insertBefore(js, fjs);
16912        t._e = [];
16913        t.ready = function (f) {
16914          t._e.push(f);
16915        };
16916        return t;
16917      }(document, 'script', 'twitter-wjs');
16918
16919      window.twttr.ready(function (twttr) {
16920        _this.createTimeline(twttr);
16921
16922        // customize after rendering
16923        twttr.events.bind('rendered', function () {
16924          _cache.feedsContent.find('iframe:not(:last-child)').remove();
16925          _cache.feedsContent.height('auto');
16926        });
16927
16928        // refressing timeline on interval of 3 minutes (180000 miliseconds)
16929        window.setInterval(function () {
16930          // fixing height of feed container untill updated timeline is rendered
16931          _cache.feedsContent.height(_cache.feedsContent.height());
16932
16933          _this.createTimeline(twttr);
16934        }, 180000);
16935      });
16936    },
16937    createTimeline: function createTimeline(twttr) {
16938      var userName = _cache.feedsContent.data('userName');
16939      var limit = parseInt(_cache.feedsContent.data('limit'));
16940      twttr.widgets.createTimeline({
16941        sourceType: 'profile',
16942        screenName: userName
16943      }, _cache.feedsContent.get(0), {
16944        chrome: 'nofooter noheader transparent',
16945        linkColor: '#292F33',
16946        borderColor: '#fff',
16947        tweetLimit: limit
16948      });
16949    },
16950
16951
16952    // Module initialization
16953    init: function init() {
16954      this.updateCache();
16955      this.initializeSocialFeed();
16956    }
16957  };
16958})(window, window.jQuery, window.snro);
16959
16960/*
16961 * c_backToTop.js
16962 * [ This javascript code is used to scroll back to the top of the page when the user has scrolled down. ]
16963 *
16964 * @project:    SN-RO
16965 * @date:       2017-07-25
16966 * @author:     Prashant
16967 * @licensor:   SAPIENNITRO
16968 * @namespaces: snro
16969 */
16970
16971//this will cause the browser to check for errors more aggressively
16972'use strict';
16973
16974/**
16975 * @namespace backToTop
16976 * @memberof roche
16977 * @property {null} property - description of property
16978 */
16979
16980(function (window, $, snro) {
16981  snro = window.snro = snro || {};
16982  snro.backToTopCmp = {
16983    moduleName: 'backToTopCmp',
16984
16985    // bind dom events
16986    bindEvents: function bindEvents() {
16987      $('.js-backToTop').on('click', this._animateScroll);
16988      $(window).on('scroll', this._scrollTop);
16989    },
16990    _animateScroll: function _animateScroll() {
16991      $('html, body').animate({ scrollTop: 0 }, 'slow');
16992      return false;
16993    },
16994    _scrollTop: function _scrollTop() {
16995      var height = $(window).scrollTop(),
16996          footerHeight = $('.c-footer').height(),
16997          buttonHeight = $('.js-backToTop').height();
16998      if (height > $(window).height()) {
16999        $('.js-backToTop').css('display', 'block');
17000      } else {
17001        $('.js-backToTop').hide();
17002      }
17003
17004      if (height + $(window).height() < $(document).height() - footerHeight) {
17005        $('.js-backToTop').removeClass('c-set-position');
17006        $('.js-backToTop').addClass('c-set-fixed');
17007      }
17008
17009      if (height + $(window).height() > $(document).height() - (footerHeight + buttonHeight)) {
17010        $('.js-backToTop').removeClass('c-set-fixed');
17011        $('.js-backToTop').addClass('c-set-position');
17012      }
17013    },
17014
17015
17016    // Module initialization
17017    init: function init() {
17018      this.bindEvents();
17019    }
17020  };
17021})(window, window.jQuery, window.snro);
17022
17023/*
17024 * c_imagegallery.js
17025 * [ This javascript code is used to display animated image gallery when visible in user view. ]
17026 *
17027 * @project:    SN-RO
17028 * @date:       2015-04-17
17029 * @author:     Prashant
17030 * @licensor:   SAPIENNITRO
17031 * @namespaces: snro
17032 */
17033
17034//this will cause the browser to check for errors more aggressively
17035'use strict';
17036
17037/**
17038 * @namespace imagegalleryCmp
17039 * @memberof roche
17040 * @property {null} property - description of property
17041 */
17042
17043(function (window, $, snro) {
17044
17045  snro = window.snro = snro || {};
17046
17047  var _cache = {};
17048
17049  $.fn.isInViewport = function () {
17050    var elementTop = $(this).offset().top,
17051        elementBottom = elementTop + $(this).outerHeight(),
17052        viewportTop = $(window).scrollTop(),
17053        viewportBottom = viewportTop + $(window).height();
17054
17055    return elementBottom > viewportTop && elementTop < viewportBottom;
17056  };
17057
17058  snro.imagegalleryCmp = {
17059    moduleName: 'imagegalleryCmp',
17060
17061    // assignment of dom selectors to variables
17062    updateCache: function updateCache() {
17063      _cache.visibleOnScroll = $('.js-visible-onscroll');
17064    },
17065
17066
17067    // bind dom events
17068    bindEvents: function bindEvents() {
17069      var that = this;
17070
17071      that.bindRowsAnimation();
17072
17073      $(window).on('resize scroll', function () {
17074        that.bindRowsAnimation();
17075      });
17076    },
17077    bindRowsAnimation: function bindRowsAnimation() {
17078      var that = this;
17079
17080      _cache.visibleOnScroll.each(function (index, instance) {
17081        that.animateRowImages(instance);
17082      });
17083    },
17084    animateRowImages: function animateRowImages(ref) {
17085      if ($(ref).isInViewport()) {
17086        var target = ref,
17087            row = $(target).data('select-row'),
17088            animateContentClass = 'start_animation bottom-to-top';
17089
17090        $('[data-row=' + row + ']').each(function (index, element) {
17091          var transitionDelay = index * 0.4 + 's';
17092          if (window.requestAnimationFrame) {
17093            $(element).css('animation-delay', transitionDelay).css('-webkit-animation-delay', transitionDelay).addClass(animateContentClass);
17094          } else {
17095            $(element).addClass('gallery-wrapper-ie');
17096          }
17097        });
17098      }
17099    },
17100
17101
17102    // Module initialization
17103    init: function init() {
17104      this.updateCache();
17105      this.bindEvents();
17106    }
17107  };
17108})(window, window.jQuery, window.snro);
17109
17110/*!
17111 * Cookie Disclaimer.js
17112
17113 * This file contians  Cookie Disclaimer functions for Create Cookies to check the First time user.
17114 *
17115 * @project   SapientNitro Roche Diagonostics
17116 * @date      2017-07-17
17117 * @author    Nimesh
17118 * @dependencies jQuery
17119 */
17120
17121//this will cause the browser to check for errors more aggressively
17122'use strict';
17123
17124/**
17125 * @namespace Main
17126 * @memberof snro
17127 * @property {null} property - description of property
17128 */
17129
17130(function (window, $, snro) {
17131  snro = window.snro = snro || {};
17132  //moduleName: 'cookiesNot',
17133  /**
17134   * This Cookie Disclaimer functions for Create Cookies to check the First time user.
17135   * Accepts any valid selector or jQuery object.
17136   * @param {selector, HTMLElement, or jQuery object} table
17137   */
17138  var cookiesTag = $('.js-cookies-tag'),
17139      closeBtn = $('.js-closeBtn');
17140  //Hide the Cookie popup
17141  var cookiesPopupHide = function cookiesPopupHide() {
17142    snro.commonUtils.setCookie('CookieDisclaimer', 'Yes');
17143    cookiesTag.slideUp(500);
17144    $(cookiesTag).removeClass('js-cookiedisclaimer-open');
17145  };
17146  //Show the Cookie popup
17147  var cookiesPopupShow = function cookiesPopupShow() {
17148    cookiesTag.slideDown(500);
17149    $(cookiesTag).addClass('js-cookiedisclaimer-open');
17150  };
17151  //Close cookie on button click
17152  var closeCookiepopup = function closeCookiepopup() {
17153    closeBtn.on('click', cookiesPopupHide);
17154  };
17155  var checkCookieDisclaimer = function checkCookieDisclaimer() {
17156
17157    closeCookiepopup();
17158    var checkCookie = snro.commonUtils.getCookie('CookieDisclaimer');
17159    if (!(snro.commonUtils.queryParams('link1') || snro.commonUtils.queryParams('link2'))) {
17160      if (checkCookie !== '') {
17161        cookiesPopupHide();
17162      } else {
17163        cookiesPopupShow();
17164      }
17165    }
17166  };
17167  snro.cookiesDisclaimer = {
17168    init: function init() {
17169      checkCookieDisclaimer();
17170    }
17171  };
17172})(window, window.jQuery, window.snro);
17173
17174/*
17175 * productdetail.js
17176 * [ This javascript code is used to initialize components on pdp. ]
17177 *
17178 * @project:    SN-RO
17179 * @date:       2017-08-03
17180 * @author:     Neha
17181 * @licensor:   SAPIENNITRO
17182 * @namespaces: snro
17183 */
17184
17185//this will cause the browser to check for errors more aggressively
17186'use strict';
17187
17188/**
17189 * @namespace productdetail
17190 * @memberof roche
17191 * @property {null} property - description of property
17192 */
17193
17194(function (window, $, snro) {
17195
17196  snro = window.snro = snro || {};
17197
17198  // public methods
17199  var _cache = {},
17200      _updateCache = function _updateCache() {
17201    _cache.component = $('.js-related-docs');
17202    _cache.relatedDocsDescContainer = $(_cache.component).find('.js-related-docs-desc');
17203    _cache.relatedDocsPad = $(_cache.component).find('.js-related-docs-pad');
17204    _cache.relatedDocsToggleContainer = $(_cache.component).find('.js-related-docs-toggle');
17205    _cache.relatedDocsContent = $(_cache.component).find('.js-related-docs-content');
17206  };
17207
17208  var _bindEvents = function _bindEvents() {
17209    var relatedDocs = $('.js-related-docs-list a'),
17210        productIdTag = document.getElementsByTagName('meta')['productId'] ? document.getElementsByTagName('meta')['productId'].content : 'NaN',
17211        productCategoryTag = document.getElementsByTagName('meta')['productType'] ? document.getElementsByTagName('meta')['productType'].content : 'NaN',
17212        pageTitle = document.getElementsByTagName('meta')['title'] ? document.getElementsByTagName('meta')['title'].content : 'NaN',
17213        pageEvent = 'download';
17214
17215    relatedDocs.click(function () {
17216      $.extend(window.digitalData['link'], { 'event': pageEvent, 'linkHeader': pageTitle, 'productId': productIdTag, 'product-category': productCategoryTag });
17217      snro.analytics.trackEvent(window.digitalData, 'download-tracking');
17218    });
17219
17220    var _resetAccordion = function _resetAccordion() {
17221      $(_cache.component).find(_cache.relatedDocsToggleContainer).removeClass('open');
17222      $(_cache.component).find(_cache.relatedDocsDescContainer).addClass('hide').removeClass('js-content-border');
17223      $(_cache.component).find(_cache.relatedDocsPad).removeClass('open');
17224    };
17225
17226    $(_cache.relatedDocsToggleContainer).on('click', function () {
17227      var flag = !$(this).hasClass('open');
17228      _resetAccordion();
17229      if (flag) {
17230        $(this).toggleClass('open');
17231        $(this).siblings(_cache.relatedDocsDescContainer).removeClass('hide').addClass('js-content-border');
17232        $(this).closest(_cache.relatedDocsContent).siblings(_cache.relatedDocsPad).toggleClass('open');
17233      }
17234    });
17235  };
17236
17237  var _initProductInfo = function _initProductInfo() {
17238    var twoColumnLayout = true;
17239
17240    if ($('.js-pdp-feature-benefits').children().length === 0) {
17241      $('.js-pdp-feature-benefits').parents('.t-pdp-info-col').hide();
17242      twoColumnLayout = false;
17243    }
17244
17245    if ($('.js-pdp-intended-use').children().length === 0) {
17246      $('.js-pdp-intended-use').parents('.t-pdp-info-col').hide();
17247      twoColumnLayout = false;
17248    }
17249
17250    if (twoColumnLayout) {
17251      $('.js-pdp-info').addClass('t-pdp-info-col2');
17252    }
17253
17254    // for displaying related documents list on PDP
17255    var elabSSI = $('#elabSSI');
17256    if (elabSSI.length) {
17257      var elabData = void 0;
17258      try {
17259        elabData = JSON.parse(elabSSI.html());
17260        elabData = elabData && elabData.data || '';
17261      } catch (e) {
17262        snro.commonUtils.log(e);
17263      }
17264      if (elabData && elabData.length) {
17265        var relatedDocsHtml = window.roche.templates['relateddocuments'](elabData);
17266        $('.js-related-docs-list').html(relatedDocsHtml);
17267        $('.js-related-docs').show();
17268      } else if (snro.commonUtils.getCookie('wcmmode') !== 'edit') {
17269        $('.js-related-docs-list').html(window.Granite.I18n.get('rdoe_relateddocs.nodocumentfound', null, localStorage.getItem('i18nhint')));
17270      }
17271    }
17272  };
17273
17274  /**
17275   * @method init
17276   * @description this method is used to initialize public methods.
17277   * @memberof snro.productdetail
17278   * @example
17279   * snro.productdetail.init()
17280   */
17281  snro.productdetail = {
17282
17283    init: function init() {
17284      _initProductInfo();
17285      _updateCache();
17286      _bindEvents();
17287    }
17288  };
17289})(window, jQuery, window.snro);
17290
17291/*
17292 * pdpfeaturespecs.js
17293 * [ This javascript code is used to show and hide the search fields on the home page main navigation. ]
17294 *
17295 * @project:    SN-RO
17296 * @date:       2015-04-17
17297 * @author:     Shubham
17298 * @licensor:   SAPIENNITRO
17299 * @namespaces: snro
17300 */
17301
17302//this will cause the browser to check for errors more aggressively
17303'use strict';
17304
17305/**
17306 * @namespace headerNavigationComp
17307 * @memberof roche
17308 * @property {null} property - description of property
17309 */
17310
17311(function (window, $, snro) {
17312
17313  snro = window.snro = snro || {};
17314
17315  /**
17316   * @method init
17317   * @description this method is used to initialize public methods.
17318   * @memberof snro.pdpfeaturespecs
17319   * @example
17320   * snro.pdpfeaturespecs.init()
17321   */
17322  snro.pdpfeaturespecs = {
17323
17324    init: function init() {
17325      var specsCount = $('.js-system-specification-dtl .js-pdp-spec-item').length;
17326      if (!specsCount) {
17327        $('.js-specifications-container-dtl').hide();
17328      }
17329    }
17330  };
17331})(window, jQuery, window.snro);
17332
17333/*
17334 * form-utils.js
17335 * this file is for form submissions
17336 * @project:    SN-Roche 
17337 * @date:       2017-05-10
17338 * @author:     Shubham
17339 * @licensor:   SAPIENNITRO
17340 * @namespaces: snro
17341 */
17342
17343'use strict';
17344var snro = snro || {};
17345snro.forms = snro.forms = {};
17346
17347(function(window, forms) {
17348
17349  var formName = '';
17350
17351  /**
17352   * Override jquery validator to show error messages in register page
17353   * @param {Element} error
17354   * @param {Element} element
17355   */
17356  function registerError(error, element) {
17357    if (element.hasClass('form-check-input')) {
17358      error.insertAfter(element.next());
17359    } else if (element.parents('div.radio').length) {
17360      error.insertAfter(element.parents('.radio').find('.form_row_description'));
17361    } else {
17362      error.insertAfter(element);
17363    }
17364    //element.closest('.default-layout').addClass('validation-failure');
17365
17366  }
17367
17368  forms.bindValidator = function() {
17369    var formNames = [];
17370    $('input[name=":formid"]').each(function(i, e) {
17371      if (formNames.indexOf(e.value) === -1) {
17372        formNames.push(e.value);
17373        formName = e.value;
17374        $('#' + formName).validate({
17375          rules: window.rulesObject[formName],
17376          onkeyup: false,
17377          validClass: 'success',
17378          messages: window.messageObject[formName],
17379          errorElement: 'span',
17380          errorPlacement: registerError,
17381          invalidHandler: snro.contactForm.fireAnalytics,
17382          highlight: function(element, errorClass) {
17383            $(element).closest('.default-layout').addClass('validation-failure');
17384          },
17385          unhighlight: function(element, errorClass) {
17386            $(element).closest('.default-layout').removeClass('validation-failure');
17387          },
17388          submitHandler: snro.contactForm.callPageNotification
17389        });
17390      }
17391    });
17392    $.validator.addMethod("onlyNumericAndHyphen", function(value) {
17393      var pattern = new RegExp('^[+][0-9]{1,3}-?[0-9]{6,12}$');
17394      var chars = true;
17395      if (value.length) {
17396        chars = pattern.test(value.toString());
17397      } else {
17398        chars = true;
17399      }
17400      return chars;
17401    });
17402    $.validator.addMethod("alphanumeric", function(value) {
17403      var pattern = new RegExp('^[^a-zA-Z0-9]+$');
17404      var chars = true;
17405      if (value.length) {
17406        for (var i = 0; i < value.length; i++) {
17407          if (pattern.test(value.charAt(i)))
17408            chars = false;
17409        }
17410      } else {
17411        chars = true;
17412      }
17413      return chars;
17414    })
17415  };
17416
17417  forms.init = function() {
17418    $(window).on('load', forms.bindValidator);
17419  };
17420
17421  forms.init();
17422
17423}(window, snro.forms));
17424
17425/*!
17426 * rocheDonutCharts.js
17427
17428 * This file contains functions to create donut charts.
17429 *
17430 * @project   SapientNitro Roche Diagonostics
17431 * @date      2017-07-17
17432 * @author    Amit Dubey
17433 * @dependencies jQuery
17434 */
17435
17436//this will cause the browser to check for errors more aggressively
17437'use strict';
17438
17439/**
17440 * @namespace Main
17441 * @memberof snro
17442 * @property {null} property - description of property
17443 */
17444
17445(function (window, $, snro) {
17446  snro = window.snro = snro || {};
17447
17448  //Pollyfill for requestAnimationFrame
17449  (function () {
17450    var lastTime = 0,
17451        vendors = ['webkit', 'moz']; //TODO: add other vendors - Amit
17452    for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
17453      window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
17454      window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
17455    }
17456    if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
17457      var currTime = new Date().getTime(),
17458          timeToCall = Math.max(0, 16 - (currTime - lastTime)),
17459          id = window.setTimeout(function () {
17460        callback(currTime + timeToCall);
17461      }, timeToCall);
17462      lastTime = currTime + timeToCall;
17463      return id;
17464    };
17465    if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
17466      clearTimeout(id);
17467    };
17468
17469    $.fn.isInViewport = function () {
17470      var elementTop = $(this).offset().top,
17471          elementBottom = elementTop + $(this).outerHeight(),
17472          viewportTop = $(window).scrollTop(),
17473          viewportBottom = viewportTop + $(window).height();
17474
17475      return elementBottom > viewportTop && elementTop < viewportBottom;
17476    };
17477
17478    var timeout = void 0;
17479    $(window).on('scroll', function () {
17480      clearTimeout(timeout);
17481      timeout = setTimeout(function () {
17482        if (!snro.rocheCharts.executing) {
17483          $(window).trigger('animateRocheChart');
17484        }
17485      }, 200);
17486    });
17487
17488    $(window).on('animateRocheChart', function () {
17489      if ($('#barChart').length && $('#barChart').isInViewport() && snro.featuredChartsCmp.barChartData) {
17490        snro.featuredChartsCmp.parseChartData(snro.featuredChartsCmp.barChartData);
17491        snro.featuredChartsCmp.barChartData = '';
17492      }
17493      if ($('.js-roche-chart').length) {
17494        $('.js-roche-chart').each(function () {
17495          var $this = $(this),
17496              pinkChart = undefined;
17497          if ($this.isInViewport()) {
17498            pinkChart = snro.rocheCharts.functionQueue[$this.data('containerName') + 'blue'];
17499            if (pinkChart) {
17500              delete snro.rocheCharts.functionQueue[$this.data('containerName') + 'blue'];
17501              pinkChart && snro.rocheCharts.executionQueue.push(pinkChart);
17502            }
17503            var nextCall = snro.rocheCharts.functionQueue[$this.data('containerName')];
17504            delete snro.rocheCharts.functionQueue[$this.data('containerName')];
17505            nextCall && snro.rocheCharts.executionQueue.push(nextCall);
17506          }
17507        });
17508        if (!snro.rocheCharts.executing && snro.rocheCharts.executionQueue.length) {
17509          snro.rocheCharts.executing = true;
17510          snro.rocheCharts.executionQueue.pop()();
17511        }
17512      }
17513    });
17514  })();
17515
17516  var _cache = {},
17517      startTime = void 0,
17518      blueDrawn = false,
17519      _drawInnerCircle = function _drawInnerCircle() {
17520    if (_cache.svgContainer.length && _cache.svgContainer.find('#innerCircle').length) {
17521      return;
17522    }
17523    var innerCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
17524    innerCircle.setAttribute('id', 'innerCircle');
17525    innerCircle.setAttribute('cx', _cache.x0 + '');
17526    innerCircle.setAttribute('cy', _cache.y0 + '');
17527    innerCircle.setAttribute('r', '10');
17528    innerCircle.setAttribute('stroke-width', '2');
17529    innerCircle.setAttribute('stroke', '#17313F');
17530    innerCircle.setAttribute('fill', '#fff');
17531    _cache.svgContainer.append(innerCircle);
17532  },
17533      _drawClockHandle = function _drawClockHandle(parent, dist, progress) {
17534    //clock handle animation
17535    var anglePartition = 2 * Math.PI / 100,
17536        percentageWithOffset = dist * progress,
17537        x = _cache.x0 + _cache.RADIUS * 1.1 * Math.cos(anglePartition * percentageWithOffset),
17538        //x coordinate of clock hand on circle circumference
17539    y = _cache.y0 + _cache.RADIUS * 1.1 * Math.sin(anglePartition * percentageWithOffset),
17540        //y coordinate of clock hand on circle circumference
17541    clockHand = $(parent).find('#clockHand');
17542    clockHand.attr('d', 'M ' + _cache.x0 + ' ' + _cache.y0 + ' L' + x + ' ' + y);
17543    clockHand.attr("stroke", "black");
17544    clockHand.attr("stroke-width", '1');
17545  },
17546      _inOutQuad = function _inOutQuad(n) {
17547    n *= 2;
17548    if (n < 1) return 0.5 * n * n;
17549    return -0.5 * (--n * (n - 2) - 1);
17550  },
17551      _drawArc = function _drawArc(currentArc, progress, dist) {
17552    //arc animation
17553    currentArc.style.strokeDashoffset = _cache.CIRCUMFERENCE * (1 - progress * dist / 100);
17554  },
17555      _drawInnerSphere = function _drawInnerSphere(percent, container, color) {
17556    if (container.length && container.find('#solidCircle').length) {
17557      return;
17558    }
17559    var solidCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle'),
17560        radius = 16 + _cache.RADIUS * 0.55 * percent / 100 + '';
17561    solidCircle.setAttribute('id', 'solidCircle');
17562    solidCircle.setAttribute('cx', _cache.x0 + '');
17563    solidCircle.setAttribute('cy', _cache.y0 + '');
17564    solidCircle.setAttribute('r', radius);
17565    solidCircle.setAttribute('fill', color);
17566    container.append(solidCircle);
17567  },
17568      _wrapFunction = function _wrapFunction(fn, context, params) {
17569    return function () {
17570      fn.apply(context, params);
17571    };
17572  };
17573
17574  snro.rocheCharts = {
17575
17576    functionQueue: [],
17577
17578    executionQueue: [],
17579
17580    executing: false,
17581
17582    updateCache: function updateCache(container) {
17583      _cache.container = $(container);
17584      _cache.RADIUS = _cache.container.length && _cache.container.data('radius') || 108;
17585      _cache.CIRCUMFERENCE = 2 * Math.PI * _cache.RADIUS;
17586      _cache.DURATION = _cache.container.length && _cache.container.data('duration') || 1000;
17587      _cache.svgContainer = _cache.container.find('.js-svg-container');
17588      _cache.blueSvgContainer = _cache.container.find('.js-dual-svg-container-blue');
17589      _cache.pinkSvgContainer = _cache.container.find('.js-dual-svg-container-pink');
17590      _cache.circleValue1 = _cache.container.find('.roche-chart__value').length && _cache.container.find('.roche-chart__value')[1];
17591      _cache.circleValue2 = _cache.container.find('.roche-chart__value').length > 1 && _cache.container.find('.roche-chart__value')[0];
17592      _cache.x0 = _cache.container.data('x0') || 120;
17593      _cache.y0 = _cache.container.data('y0') || 120;
17594      _cache.circleValue1.style.strokeDashoffset = _cache.CIRCUMFERENCE;
17595      _cache.circleValue1.style.strokeDasharray = _cache.CIRCUMFERENCE;
17596      if (!blueDrawn) {
17597        _cache.circleValue2.style.strokeDashoffset = _cache.CIRCUMFERENCE;
17598        _cache.circleValue2.style.strokeDasharray = _cache.CIRCUMFERENCE;
17599      }
17600    },
17601
17602    plot: function plot(times, type, values) {
17603      var timestamp = times || new Date().getTime(),
17604          runtime = timestamp - startTime,
17605          progress = runtime / _cache.DURATION;
17606      progress = _inOutQuad(Math.min(progress, 1));
17607      if (type === 'clock') {
17608        _drawArc(_cache.circleValue1, progress, values[0]);
17609        _drawClockHandle(_cache.svgContainer, values[0], progress);
17610        if (values[1]) {
17611          _drawArc(_cache.circleValue2, progress, values[1]);
17612        }
17613      }
17614      if (type === 'double') {
17615        _cache.circleValue1 = _cache.blueSvgContainer.find('.roche-chart__value')[0];
17616        _drawArc(_cache.circleValue1, progress, values[0]);
17617        _drawClockHandle(_cache.blueSvgContainer, values[0], progress);
17618      }
17619      if (type === 'double-pink') {
17620        _cache.circleValue2 = _cache.pinkSvgContainer.find('.roche-chart__value')[0];
17621        _drawArc(_cache.circleValue2, progress, values[1]);
17622        _drawClockHandle(_cache.pinkSvgContainer, values[1], progress);
17623      }
17624
17625      if (runtime < _cache.DURATION) {
17626        requestAnimationFrame(function (timestamp) {
17627          snro.rocheCharts.plot(timestamp, type, values);
17628        });
17629      } else if (runtime > _cache.DURATION) {
17630        if (snro.rocheCharts.executionQueue.length) {
17631          snro.rocheCharts.executing = true;
17632          snro.rocheCharts.executionQueue.pop()();
17633        } else {
17634          snro.rocheCharts.executing = false;
17635        }
17636      }
17637    },
17638
17639    drawSingleDonut: function drawSingleDonut(container, values) {
17640      snro.rocheCharts.updateCache(container);
17641      requestAnimationFrame(function (timestamp) {
17642        startTime = timestamp || new Date().getTime();
17643        _drawInnerCircle();
17644        snro.rocheCharts.plot(timestamp, 'clock', values);
17645      });
17646    },
17647
17648    drawDoubleDonutBlue: function drawDoubleDonutBlue(container, values) {
17649      var that = this;
17650      that.updateCache(container);
17651      requestAnimationFrame(function (timestamp) {
17652        startTime = timestamp || new Date().getTime();
17653        _drawInnerSphere(values[0], _cache.blueSvgContainer, '#90c2ef');
17654        that.plot(timestamp, 'double', values);
17655      });
17656      blueDrawn = true;
17657    },
17658
17659    drawDoubleDonutPink: function drawDoubleDonutPink(container, values) {
17660      var that = this;
17661      that.updateCache(container);
17662      requestAnimationFrame(function (timestamp) {
17663        startTime = timestamp || new Date().getTime();
17664        _drawInnerSphere(values[1], _cache.pinkSvgContainer, '#fdcad6');
17665        that.plot(timestamp, 'double-pink', values);
17666      });
17667      blueDrawn = false;
17668    },
17669
17670    drawChart: function drawChart(container, values, type, chartString) {
17671      if (type === 'singleRing') {
17672        snro.rocheCharts.functionQueue[chartString] = _wrapFunction(snro.rocheCharts.drawSingleDonut, this, [container, values]);
17673      } else {
17674        snro.rocheCharts.functionQueue[chartString] = _wrapFunction(snro.rocheCharts.drawDoubleDonutBlue, this, [container, values]);
17675        chartString = chartString + 'blue';
17676        snro.rocheCharts.functionQueue[chartString] = _wrapFunction(snro.rocheCharts.drawDoubleDonutPink, this, [container, values]);
17677      }
17678      $(window).trigger('animateRocheChart');
17679    }
17680
17681  };
17682})(window, window.jQuery, window.snro);
17683
17684/*!
17685 * advancedSystemSpecifications.js
17686
17687 * This file contains functions for PDP page Advanced System Specifications.
17688 *
17689 * @project   SapientNitro Roche Diagonostics
17690 * @date      2017-07-17
17691 * @author    Amit D
17692 * @dependencies jQuery
17693 */
17694
17695//this will cause the browser to check for errors more aggressively
17696'use strict';
17697
17698/**
17699 * @namespace Main
17700 * @memberof snro
17701 * @property {null} property - description of property
17702 */
17703
17704(function (window, $, snro) {
17705  snro = window.snro = snro || {};
17706
17707  var _cache = {};
17708
17709  var _updateCache = function _updateCache(component) {
17710    _cache.comp = $(component);
17711    _cache.container = _cache.comp.find('.js-advanced-spec__chart');
17712    _cache.svgContainer = _cache.container.find('.js-svg-container');
17713    _cache.textVariationContainer = _cache.container.find('.js-advanced-spec__text-variation');
17714    _cache.topics = _cache.comp.find('.js-advanced-spec-label');
17715    _cache.pointers = _cache.comp.find('.js-advanced-spec-pointer');
17716    _cache.chartContainer = _cache.comp.find('.js-advanced-spec-chart-wrapper');
17717    _cache.chartHeadline = _cache.comp.find('.js-advanced-pdp-headline');
17718    _cache.chartDescription = _cache.comp.find('.js-advanced-spec-chart-description');
17719    _cache.chartResult = _cache.comp.find('.js-advanced-spec-chart-result');
17720    _cache.chartParent = _cache.comp.find('.js-advanced-spec-desc');
17721    _cache.listHeight = _cache.comp.find('.js-advanced-specs-list');
17722    _cache.seeAllButton = _cache.comp.find('.js-see-all-specs');
17723    _cache.hiddenList = _cache.comp.find('.js-advanced-spec-item.hidden');
17724    _cache.chartString = 'advancedSpecCharts' + _cache.comp.data('chartindex');
17725  },
17726      switchTopic = function switchTopic() {
17727    var $this = $(this),
17728        listHeightVar = 0,
17729        liHeightVar = 0;
17730    _updateCache($this.parents('.js-advanced-spec-component'));
17731    _cache.listHeight.find('li').each(function (index) {
17732      if (index === $this.parents('li').index()) {
17733        return false;
17734      } else {
17735        liHeightVar = liHeightVar + $(this).outerHeight();
17736      }
17737    });
17738    var intervalChartTimer = setTimeout(function () {
17739      listHeightVar = parseInt(_cache.listHeight.css('height'));
17740      if (listHeightVar > 500) {
17741        _cache.chartParent.css('height', listHeightVar);
17742        if ($this.parents('.js-advanced-specs-list').find('li').length > 10) {
17743          _cache.chartContainer.animate({
17744            top: liHeightVar
17745          }, 1000, function () {
17746            // Animation complete.
17747          });
17748        } else {
17749          _cache.chartContainer.addClass('c-advanced-spec-vertical-aligned');
17750        }
17751      }
17752      clearTimeout(intervalChartTimer);
17753    }, 1000);
17754    _cache.pointers.removeClass('visible-topic');
17755    $this.parent().find('.js-advanced-spec-pointer').addClass('visible-topic');
17756    _cache.chartContainer.hide();
17757    _cache.container.data('containerName', _cache.chartString);
17758    snro.rocheCharts.drawChart(_cache.container, [0], 'singleRing', _cache.chartString);
17759    _cache.textVariationContainer.text('').hide();
17760    _cache.chartHeadline.text($this.data('heading') || ' ');
17761    _cache.chartDescription.text($this.data('description') || ' ');
17762    _cache.chartResult.text($this.data('highlight') || ' ');
17763    if ($this.data('type') === 'ringchart') {
17764      _cache.chartContainer.fadeIn('slow', function () {
17765        _cache.svgContainer.show();
17766        _cache.container.data('containerName', _cache.chartString);
17767        snro.rocheCharts.drawChart(_cache.container, [$this.data('value')], 'singleRing', _cache.chartString);
17768      });
17769      return;
17770    }
17771    _cache.svgContainer.hide();
17772    _cache.chartContainer.fadeIn('slow', function () {
17773      _cache.svgContainer.hide();
17774      _cache.textVariationContainer.text($this.data('value')).show();
17775    });
17776  };
17777
17778  snro.advancedSystemSpecifications = {
17779    bindEvents: function bindEvents(comp) {
17780      _updateCache(comp);
17781      if (_cache.hiddenList.length) {
17782        _cache.seeAllButton.show();
17783        _cache.seeAllButton.bind('click', function () {
17784          _updateCache(comp);
17785          _cache.hiddenList.removeClass('hidden');
17786          var listHeightVar = parseInt(_cache.listHeight.css('height'));
17787          if (listHeightVar > 500) {
17788            _cache.chartParent.css('height', listHeightVar);
17789          }
17790        });
17791      }
17792      if (!snro.commonUtils.isMobile()) {
17793        _cache.topics.unbind().bind('click', switchTopic);
17794        $(_cache.topics[0]).click();
17795      }
17796    },
17797    init: function init() {
17798      var that = this;
17799      $('.js-advanced-spec-component').each(function (i, comp) {
17800        $(comp).data('chartindex', i);
17801        that.bindEvents(comp);
17802      });
17803    }
17804  };
17805})(window, window.jQuery, window.snro);
17806
17807/*
17808 * c_barchart.js
17809 * [ This javascript code is used to  display the bar chart
17810 *
17811 * @project:    SN-RO
17812 * @date:       2018-01-016
17813 * @author:     Shubham
17814 * @licensor:   SAPIENNITRO
17815 * @namespaces: snro
17816 */
17817
17818//this will cause the browser to check for errors more aggressively
17819'use strict';
17820
17821/**
17822 * @namespace iframeCmp,
17823 * @memberof roche
17824 * @property {null} property - description of property
17825 */
17826
17827(function (window, $, snro) {
17828
17829  snro = window.snro = snro || {};
17830
17831  var _cache = {},
17832      _updateCache = function _updateCache(component) {
17833    _cache.component = $(component);
17834    _cache.chartContainer = $(_cache.component.find('.js-featered-chart-container'));
17835    _cache.chartLegend = $(_cache.component.find('.js-chartjs-legend'));
17836    _cache.chartDualLbl1Text = _cache.chartContainer && $(_cache.chartContainer.find('.js-dual-label-data-1'));
17837    _cache.chartDualLbl2Text = _cache.chartContainer && $(_cache.chartContainer.find('.js-dual-label-data-2'));
17838    _cache.chartDualLbl1Title = _cache.chartContainer && $(_cache.chartContainer.find('.js-dual-label-name-1'));
17839    _cache.chartDualLbl2Title = _cache.chartContainer && $(_cache.chartContainer.find('.js-dual-label-name-2'));
17840    _cache.chartString = 'featuredCharts' + _cache.component.data('chartindex');
17841    try {
17842      var dataElement = _cache.component.find('#chartData');
17843      _cache.parsedContent = JSON.parse($(dataElement).text());
17844      _cache.chartData = _cache.parsedContent && _cache.parsedContent.chartData;
17845    } catch (e) {
17846      _cache.chartData = {};
17847    }
17848  };
17849
17850  snro.featuredChartsCmp = {
17851    moduleName: 'featuredChartsCmp',
17852    // assignment of dom selectors to variables
17853
17854    barChart: [],
17855    showBarChart: function showBarChart(barChartData, labelXValue, labelType1Cord, barWidth) {
17856
17857      var barChartOb = _cache.component.find('#barChart'),
17858          barChartIndex = _cache.component.data('chartindex');
17859      // eslint-disable-next-line
17860      this.barChart[barChartIndex] = new Chart(barChartOb, {
17861        type: 'bar',
17862        data: {
17863          labels: labelXValue,
17864          datasets: [{
17865            label: barChartData.labelOne,
17866            data: labelType1Cord,
17867            backgroundColor: '#90c2ef'
17868          }]
17869        },
17870        options: {
17871          responsive: true,
17872          legend: {
17873            position: 'top', // place legend on the right side of chart
17874            display: false
17875          },
17876          maintainAspectRatio: false,
17877          scales: {
17878            xAxes: [{
17879              stacked: true,
17880              barPercentage: barWidth,
17881              categoryPercentage: 1.0,
17882              scaleLabel: {
17883                display: true,
17884                labelString: barChartData.titleXAxis ? barChartData.titleXAxis : ''
17885              },
17886              gridLines: { display: false // this should be set to make the bars stacked
17887              } }],
17888            yAxes: [{
17889              scaleLabel: {
17890                display: true,
17891                labelString: barChartData.titleYAxis ? barChartData.titleYAxis : ''
17892              },
17893              ticks: {
17894                stepSize: Number(barChartData.maxRange - barChartData.minRange) / 5,
17895                min: Number(barChartData.minRange),
17896                max: Number(barChartData.maxRange)
17897              },
17898              gridLines: { display: false // this also..
17899              } }]
17900          }
17901        }
17902      });
17903    },
17904    addChartData: function addChartData(chart, label, color, data, d, e) {
17905      chart.data.datasets.push({
17906        label: label,
17907        data: data,
17908        backgroundColor: color
17909      });
17910
17911      $(d.find('.js-chartjs-legend')).html(chart.generateLegend());
17912
17913      e.find('li').each(function () {
17914        if (!$(this).text()) {
17915          $(this).hide();
17916        }
17917      });
17918      chart.update();
17919    },
17920    parseChartData: function parseChartData(data) {
17921      this.barChartData = data;
17922      var labelXValue = [],
17923          labelType1Cord = [],
17924          labelType2Cord = [],
17925          barChartData = this.barChartData,
17926          chartLabelData = barChartData && barChartData.chartData || {},
17927          barChartIndex = _cache.component.data('chartindex'),
17928          barWidth = 0.7;
17929      if (chartLabelData.length === 6) {
17930        barWidth = 0.4;
17931      }
17932      for (var i = 0;
17932 i < chartLabelData.length; i++) {
17933        labelXValue.push(chartLabelData[i].labelXValue);
17934        labelType1Cord.push(chartLabelData[i].yValue1);
17935        labelType2Cord.push(chartLabelData[i].yValue2);
17936      }
17937
17938      this.showBarChart(barChartData, labelXValue, labelType1Cord, barWidth);
17939      var a = snro.featuredChartsCmp.barChart[barChartIndex],
17940          b = barChartData.labelTwo,
17941          c = labelType2Cord;
17942      (function (a, b, c, d, e) {
17943        setTimeout(function () {
17944          snro.featuredChartsCmp.addChartData(a, b, '#fdcad6', c, d, e);
17945        }, 500);
17946      })(a, b, c, _cache.component, _cache.chartLegend);
17947    },
17948    drawRingChart: function drawRingChart() {
17949      var val1 = parseInt(_cache.chartData[0] && _cache.chartData[0].labelValue || 0),
17950          val2 = parseInt(_cache.chartData[1] && _cache.chartData[1].labelValue || 0);
17951      if (val2 && val1 > val2) {
17952        var temp = val1;
17953        val1 = val2;
17954        val2 = temp;
17955        temp = _cache.chartData[0];
17956        _cache.chartData[0] = _cache.chartData[1];
17957        _cache.chartData[1] = temp;
17958      }
17959      if (_cache.parsedContent.ringType === 'singleringchart') {
17960        _cache.chartContainer.data('containerName', _cache.chartString);
17961        snro.rocheCharts.drawChart(_cache.chartContainer, [val1, val2], 'singleRing', _cache.chartString);
17962      } else {
17963        var lblText1 = _cache.chartData[0].labelData,
17964            lblText2 = _cache.chartData[1] && _cache.chartData[1].labelData,
17965            lblTitle1 = _cache.chartData[0].label,
17966            lblTitle2 = _cache.chartData[1] && _cache.chartData[1].label;
17967        _cache.chartContainer.data('containerName', _cache.chartString);
17968        snro.rocheCharts.drawChart(_cache.chartContainer, [val1, val2], 'doubleRing', _cache.chartString);
17969        _cache.chartDualLbl1Text.text(lblText1 || '');
17970        _cache.chartDualLbl2Text.text(lblText2 || '');
17971        _cache.chartDualLbl1Title.text(lblTitle1 || '');
17972        _cache.chartDualLbl2Title.text(lblTitle2 || '');
17973      }
17974    },
17975    bindEvents: function bindEvents() {
17976      switch (_cache.parsedContent.graphType) {
17977        case 'bargraph':
17978          this.parseChartData(_cache.parsedContent);
17979          break;
17980        case 'ringchart':
17981          this.drawRingChart();
17982          break;
17983        default:
17984          snro.commonUtils.log('Wrong Graph Type');
17985      }
17986    },
17987
17988
17989    // Module initialization
17990    init: function init() {
17991      $('.js-featured-chart-comp').each(function (i, comp) {
17992        $(this).data('chartindex', i);
17993        _updateCache(comp);
17994        if (_cache.chartData) {
17995          snro.featuredChartsCmp.bindEvents();
17996        }
17997      });
17998    }
17999  };
18000})(window, window.jQuery, window.snro);
18001
18002/*
18003 * c_eloquomarketo.js
18004 * Set methods for api error and success callback
18005 *
18006 * @project:    SN-RO
18007 * @date:       2018-03-09
18008 * @author:     Bindhyachal
18009 * @licensor:   SAPIENNITRO
18010 * @namespaces: snro
18011 */
18012
18013//this will cause the browser to check for errors more aggressively
18014'use strict';
18015/**
18016 * @namespace eloquomarketo
18017 * @memberof roche
18018 *
18019 */
18020
18021var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
18022
18023(function (window, $, snro) {
18024  /**
18025   * @method init
18026   * @description Initialize for marketo eloquo success error functions
18027   * @memberof snro.eloquoMarketo
18028   * @example
18029   * snro.eloquoMarketo.init()
18030   */
18031  var thankYouContainer = $('.success-text');
18032  var isiosDevice = /iPad|iPhone|iPod|Mac/.test(navigator.userAgent) && !window.MSStream;
18033
18034  // Register behavior against eloquoMarketo namespace
18035  snro = window.snro = snro || {};
18036  snro.eloquoMarketo = {
18037    moduleName: 'eloquoMarketo',
18038
18039    // Attach listeners to interesting events
18040    _initExternalForms: function _initExternalForms() {
18041      if (snro.commonUtils.getCookie('MarketoSuccess')) {
18042        var $thankYouContainerlength = thankYouContainer.parents('.c-eloquo-marketo-form').find('form');
18043        if ($thankYouContainerlength.length) {
18044          $thankYouContainerlength.parents('.c-eloquo-marketo-form').find(thankYouContainer).removeClass('hide');
18045          snro.commonUtils.setCookie('MarketoSuccess', ' ');
18046        }
18047      }
18048      /*eslint-disable */
18049      MktoForms2.whenReady(function (form) {
18050        form.onSuccess(function (value) {
18051          if (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
18052            snro.commonUtils.setCookie('MarketoSuccess', 'Yes');
18053          }
18054        });
18055      });
18056    },
18057    _initEloquoForms: function _initEloquoForms() {
18058      thankYouContainer.removeClass('hide');
18059    },
18060    _updateFormIDs: function _updateFormIDs(context, index) {
18061      $(context).attr('id', $(context).attr('name') + index);
18062      $(context).next().attr('for', $(context).attr('name') + index);
18063    },
18064
18065
18066    // Module initialization
18067    init: function init() {
18068      /*eslint-disable */
18069      if ((typeof MktoForms2 === 'undefined' ? 'undefined' : _typeof(MktoForms2)) === 'object') {
18070        this._initExternalForms();
18071      }
18072      if (snro.commonUtils.queryParams('elqcallbak')) {
18073        this._initEloquoForms();
18074      }
18075      if ($('.c-eloquo-marketo-form').find($('input[type="checkbox"]'))) {
18076        var context = this;
18077        $('.c-eloquo-marketo-form').find($('input[type="checkbox"]')).each(function (index) {
18078          context._updateFormIDs($(this), index);
18079        });
18080      }
18081      if ($('.c-eloquo-marketo-form').find($('input[type="radio"]'))) {
18082        var _context = this;
18083        $('.c-eloquo-marketo-form').find($('input[type="radio"]')).each(function (index) {
18084          _context._updateFormIDs($(this), index);
18085        });
18086      }
18087      //for specific to IOS devices
18088      if (isiosDevice) {
18089        $('.c-eloquo-marketo-form').addClass('ios-device');
18090      }
18091    }
18092  };
18093})(window, window.jQuery, window.snro);
18094
18095/*
18096 * login.js
18097 * [ Behavior for login component ]
18098 *
18099 * @project:    SN-RO
18100 * @date:       2018-03-23
18101 * @author:     Bindhyachal
18102 * @licensor:   SAPIENNITRO
18103 * @namespaces: snro
18104 */
18105
18106//this will cause the browser to check for errors more aggressively
18107'use strict';
18108/**
18109 * @namespace login
18110 * @memberof roche
18111 *
18112 */
18113
18114(function (window, $, snro) {
18115  // Define variables and functions for later use
18116  // DOM cache
18117  var _cache = {};
18118
18119  // Register behavior against login namespace
18120  snro = window.snro = snro || {};
18121  snro.loginComp = {
18122    moduleName: 'loginComp',
18123    // Cache DOM refs and other dynamic data for re-use
18124    _cacheRefs: function _cacheRefs() {
18125      _cache.$loginNavigation = $('.js-login-navigation');
18126      _cache.$body = $('body');
18127      _cache.$header = $('.js-header-wrapper');
18128      _cache.sessionTimeoutBeforeMsg = $('.js-session-continue-msg').text().trim();
18129      _cache.sessionTimeoutMsg = $('.js-session-timeout-msg').text().trim();
18130      _cache.sessionTimeoutBefore = $('.js-login-wrapper').data('sessiontimeoutbeforeexpiry');
18131      _cache.sessionTimeout = $('.js-login-wrapper').data('sessiontimeout');
18132      _cache.loginUrl = $('.js-loginUrl').data('sessionurl') || '';
18133      _cache.logoutButton = $('.js-logoutUrl');
18134      _cache.logoutUrl = $('.js-logoutUrl').attr('href') || '';
18135    },
18136    _loginContinue: function _loginContinue() {
18137      var options = {
18138        url: _cache.loginUrl,
18139        type: 'GET'
18140      };
18141      snro.ajaxWrapper.getXhrObj(options).done(function (data) {
18142        snro.commonUtils.log(data);
18143      }).fail(function (err) {
18144        snro.commonUtils.log(err);
18145      });
18146    },
18147    _enableSessionTimeout: function _enableSessionTimeout(timeInterval, timeExpiry, popupMsg, popupMsg1) {
18148
18149      var timeIntervalSeconds = timeInterval * 60,
18150          timeExpirySeconds = timeExpiry * 60,
18151          w = void 0;
18152
18153      function stopWorker() {
18154        if (typeof w !== 'undefined') {
18155          w.terminate();
18156          w = undefined;
18157        }
18158      }
18159
18160      /**
18161      * @Function Name       getTimeDiffFlag
18162      * @params           startDate, endDate
18163      * @returns          boolean
18164      */
18165      function getTimeDiffFlag(startDate, endDate) {
18166        var flag;
18167        var diffInSeconds = (endDate.getTime() - startDate.getTime()) / 1000;
18168        if (diffInSeconds <= timeExpirySeconds) {
18169          flag = true;
18170        } else {
18171          flag = false;
18172        }
18173
18174        return flag;
18175      }
18176
18177      /**
18178       * @Function Name doLogout
18179       * @params           
18180       * @returns
18181      */
18182      function doLogout() {
18183        if (_cache.logoutUrl !== '') {
18184          window.location.href = _cache.logoutUrl + '&j_session=session_timed_out';
18185        } else {
18186          window.location.reload();
18187        }
18188      }
18189
18190      function goInactive() {
18191        var startDate = new Date();
18192        // eslint-disable-next-line
18193        var popupFlag = confirm(popupMsg);
18194        if (popupFlag) {
18195          var endDate = new Date();
18196          var timeDiffFlagSuccess = getTimeDiffFlag(startDate, endDate);
18197          //console.log(timeDiffFlagSuccess);
18198          if (timeDiffFlagSuccess) {
18199            // eslint-disable-next-line
18200            resetTimer();
18201            snro.loginComp._loginContinue();
18202          } else {
18203            // eslint-disable-next-line
18204            alert(popupMsg1);
18205            stopWorker();
18206            doLogout();
18207          }
18208        } else {
18209          stopWorker();
18210          doLogout();
18211        }
18212      }
18213
18214      function startWorker() {
18215        if (typeof Worker !== 'undefined') {
18216          if (typeof w === 'undefined') {
18217            w = new Worker('/apps/roche/diagnostics/worker.js');
18218          }
18219          w.onmessage = function (event) {
18220            if (event.data === timeIntervalSeconds) {
18221              stopWorker();
18222              goInactive();
18223            }
18224          };
18225        }
18226      }
18227
18228      function resetTimer() {
18229        stopWorker();
18230        startWorker();
18231      }
18232
18233      function startEvents() {
18234        this.addEventListener('mousemove', resetTimer, false);
18235        this.addEventListener('mousedown', resetTimer, false);
18236        this.addEventListener('keypress', resetTimer, false);
18237        this.addEventListener('DOMMouseScroll', resetTimer, false);
18238        this.addEventListener('mousewheel', resetTimer, false);
18239        this.addEventListener('touchmove', resetTimer, false);
18240        this.addEventListener('MSPointerMove', resetTimer, false);
18241        startWorker();
18242      }
18243
18244      startEvents();
18245    },
18246
18247
18248    // check if user is logged in
18249    _checkLogin: function _checkLogin() {
18250      try {
18251        var sessionTimeoutActual = Number(_cache.sessionTimeout) - Number(_cache.sessionTimeoutBefore);
18252        if (snro.headerNavigationComp.isLoggedIn) {
18253          _cache.isloggedIn = true;
18254          this._enableSessionTimeout(sessionTimeoutActual, Number(_cache.sessionTimeoutBefore), _cache.sessionTimeoutBeforeMsg, _cache.sessionTimeoutMsg);
18255        }
18256      } catch (e) {
18257        snro.commonUtils.log(e);
18258      }
18259    },
18260
18261
18262    // Attach init()
18263    _initLogin: function _initLogin() {
18264      var $changePersona = _cache.$loginNavigation.find('.js-change-persona');
18265      _cache.$loginNavigation.find('.js-login-persona').each(function (index, value) {
18266        if (snro.commonUtils.getCookie('persona-type') == '' || snro.commonUtils.getCookie('persona-type') == undefined) {
18267          _cache.$loginNavigation.find('.js-persona-default-title').removeClass('hide');
18268          _cache.$loginNavigation.find('.js-persona-default-description').removeClass('hide');
18269        } else {
18270          if ($(value).data('personatype') === snro.commonUtils.getCookie('persona-type')) {
18271            $(value).removeClass('hide');
18272            _cache.$loginNavigation.find('.js-login-description').eq(index).removeClass('hide');
18273          }
18274        }
18275      });
18276
18277      //click on change on persona
18278      $changePersona.on('click', function () {
18279        /* ............... Changes for Blue overlay .....................*/
18280        if ($('.js-header-persona-link').hasClass('yesno') || $('.js-header-persona-link').hasClass('nono')) {
18281          _cache.$header.find('.js-header-persona-link').trigger('click');
18282        }
18283      });
18284
18285      //click for slideUp
18286      _cache.$body.on('click', function (e) {
18287        if (!($(e.target).parents('.js-login-dropdown-parent').length || $(e.target).parents('.js-login-navigation').length)) {
18288          _cache.$loginNavigation.slideUp('slow');
18289        }
18290      });
18291
18292      _cache.logoutButton.on('click', function (e) {
18293        e.preventDefault();
18294        snro.commonUtils.removeCookie('loginNotificationDisclaimer');
18295        if (_cache.logoutUrl !== '') {
18296          window.location.href = _cache.logoutUrl + '&j_session=session_timed_out';
18297        } else {
18298          window.location.reload();
18299        }
18300      });
18301    },
18302    _checkUserLogin: function _checkUserLogin() {
18303      var userLoginCookie = snro.commonUtils.getCookie('userCountry') || '',
18304          currentCountryCookie = snro.commonUtils.getCookie('location-and-language') || '';
18305      if (currentCountryCookie && userLoginCookie) {
18306        if (userLoginCookie.toLowerCase() !== currentCountryCookie.split('|')[0]) {
18307          snro.loginNotification.init();
18308        }
18309      }
18310    },
18311
18312
18313    // Module initialization
18314    init: function init() {
18315      this._cacheRefs();
18316      this._initLogin();
18317    }
18318  };
18319})(window, window.jQuery, window.snro);
18320
18321/*
18322 * c_listingwrapper.js
18323 * [ This javascript code is used to render the appropriate handlebars template based on data. ]
18324 *
18325 * @project:    SN-RO
18326 * @date:       2018-03-28
18327 * @author:     Neha Gupta
18328 * @licensor:   SAPIENNITRO
18329 * @namespaces: snro
18330 */
18331
18332//this will cause the browser to check for errors more aggressively
18333'use strict';
18334
18335/**
18336 * @namespace listingwrapperCmp
18337 * @memberof roche
18338 */
18339
18340(function (window, $, snro) {
18341
18342  var _cache = {};
18343
18344  snro = window.snro = snro || {};
18345
18346  function _createQueryString(queryObject) {
18347    var updatedString = '?';
18348    $.each(queryObject, function (index, value) {
18349      if (value) {
18350        updatedString = updatedString + index + '=' + encodeURIComponent(decodeURIComponent(value)) + '&';
18351      }
18352    });
18353    return updatedString;
18354  }
18355
18356  snro.resourceTileComp = {
18357
18358    moduleName: 'resourceTileComp',
18359
18360    // assignment of dom selectors to variables
18361    updateCache: function updateCache() {
18362      _cache.searchURL = $('.js-link-search').data('searchurl');
18363      _cache.locale = $('meta[name=collection]').attr('content') || '';
18364      _cache.persona = snro.commonUtils.getCookie('persona-type') || '';
18365      _cache.categoryType = 'resourcecenter';
18366      _cache.listing = 'resourcecenter';
18367      var url_path = $('#query-param').data("path");
18368      var country_code;
18369      var language_code;
18370      var search_qp = '';
18371      if (url_path && url_path != '' && url_path != '/' && url_path.split('/').length > 5) {
18372        country_code = url_path.split('/')[3].toUpperCase();
18373        if (country_code != "GLOBAL") {
18374          language_code = url_path.split('/')[4];
18375          search_qp = language_code.concat('_', country_code);
18376          _cache.sp_l = search_qp;
18377        }
18378      }
18379      _cache.queryObject = {
18380        locale: _cache.locale,
18381        categoryType: _cache.categoryType,
18382        listing: _cache.listing,
18383        ps: _cache.persona,
18384        sp_l: _cache.sp_l
18385      };
18386    },
18387    updateSeeMoreUrl: function updateSeeMoreUrl(parentContainer, ctd, ctv) {
18388      var seeMoreUrl = $(parentContainer).find('.js-resource-see-more').attr('href');
18389      if (seeMoreUrl) {
18390        seeMoreUrl = seeMoreUrl.indexOf('?') !== -1 ? seeMoreUrl + '&' : seeMoreUrl + '?';
18391        seeMoreUrl = seeMoreUrl + 'ctv=' + ctv + '&ctd=' + ctd;
18392        seeMoreUrl = seeMoreUrl + '&redirectFrmResourceCenter=true';
18393        $(parentContainer).find('.js-resource-see-more').attr('href', seeMoreUrl);
18394      }
18395    },
18396    initResourceTile: function initResourceTile(parentContainer) {
18397      var that = this,
18398          resourceTileData = $(parentContainer).find('.js-resource-listing'),
18399          limit = resourceTileData.data('searchlimit') || 5,
18400          sortBy = resourceTileData.data('sortbehaviour') || 'relevance',
18401          epath = resourceTileData.data('excludepath') || '',
18402          ctd = resourceTileData.data('ctd') || '',
18403          ctv = resourceTileData.data('ctv') || '';
18404      var queryObject = {
18405        limit: limit,
18406        ctv: ctv,
18407        ctd: ctd,
18408        sortBy: sortBy,
18409        epath: epath
18410      };
18411      $.extend(queryObject, _cache.queryObject);
18412      that.getRelatedResourceResults(queryObject, parentContainer);
18413      that.updateSeeMoreUrl(parentContainer, ctd, ctv);
18414    },
18415
18416
18417    /**
18418     * @param templateName - name of the hbs template to be rendered
18419     * @param data - json data for the hbs template
18420     */
18421    renderTemplate: function renderTemplate(templateName, data) {
18422      if (templateName) {
18423        var resultTemplate = window.roche.templates[templateName];
18424        return resultTemplate(data);
18425      }
18426    },
18427
18428
18429    /**
18430     * function display the results for search in the listing wrapper
18431     * based on the refresh parameter
18432     * @param data - json data to be rendered
18433     */
18434    renderResults: function renderResults(resourceData, parentContainer) {
18435      snro.commonUtils.log(resourceData);
18436      var totalCount = resourceData.query['total-results'] || 0,
18437          data = resourceData.results.data,
18438          resourceTileWrapper = $(parentContainer).find('.js-resourcetile-wrapper'),
18439          tilesLimit = resourceTileWrapper.data('tilesLimit'),
18440          resourcetotalCount = $(parentContainer).find('.js-resourcetile-total-count');
18441
18442      var resultsHtml = this.renderTemplate('resourceTile', data);
18443      resourcetotalCount.html('&nbsp;/&nbsp;' + totalCount);
18444      resourceTileWrapper.html(resultsHtml);
18445
18446      if (resourceTileWrapper.data('viewFormat') === 'horizontal') {
18447        $(parentContainer).find('.js-resourcetile-row').each(function () {
18448          var colLength = $(this).find('.c-resourcetile__col-container').length;
18449          $(this).addClass('c-resourcetile__row-' + colLength);
18450        });
18451      }
18452      resourceTileWrapper.removeClass('hidden');
18453      if (totalCount > tilesLimit) {
18454        $(parentContainer).find('.js-resource-see-more').removeClass('hidden');
18455      }
18456    },
18457    getRelatedResourceResults: function getRelatedResourceResults(queryObject, parentContainer) {
18458      var that = this,
18459          eserviceAssignment = snro.commonUtils.getEserviceAssignment(),
18460          requestURL = _cache.searchURL + _createQueryString(queryObject) + 'srl=' + eserviceAssignment,
18461          config = $(parentContainer).find('.js-media-config');
18462
18463      // check if ie9
18464      if (navigator.appVersion.indexOf('MSIE 9') !== -1) {
18465        $.getJSON(requestURL).done(function (data) {
18466          that.renderResults(data, parentContainer);
18467          snro.dynamicMedia.processDynamicImages(config, $(parentContainer));
18468          snro.commonUtils.addEllipses();
18469        });
18470      } else {
18471        var options = {
18472          url: requestURL,
18473          type: 'GET',
18474          dataType: 'json'
18475        };
18476
18477        window.setTimeout(snro.ajaxWrapper.getXhrObj(options).done(function (data) {
18478          var $resourceTileContainer = $(parentContainer).find('.c-resourcetile');
18479          if (data.query['total-results'] > 0) {
18480            $resourceTileContainer.removeClass('tile-hidden');
18481            that.renderResults(data, parentContainer);
18482          } else if (data.query['total-results'] === 0) {
18483            $resourceTileContainer.removeClass('tile-hidden');
18484            $resourceTileContainer.addClass('tile-hidden');
18485          }
18486          snro.dynamicMedia.processDynamicImages(config, $(parentContainer));
18487          snro.commonUtils.addEllipses();
18488        }).fail(function (err) {
18489          snro.commonUtils.log(err);
18490        }), 0);
18491      }
18492    },
18493
18494
18495    // Module initialization
18496    init: function init() {
18497      this.updateCache();
18498      var that = this;
18499      $('.resourceTileComponent').each(function (k, v) {
18500        that.initResourceTile(v);
18501      });
18502    }
18503  };
18504})(window, window.jQuery, window.snro);
18505
18506/*
18507 * resourceCenter.js
18508 * [ Behavior for resourceCenter component ]
18509 *
18510 * @project:    SN-RO
18511 * @date:       2018-03-23
18512 * @author:     Bindhyachal
18513 * @licensor:   SAPIENNITRO
18514 * @namespaces: snro
18515 */
18516
18517//this will cause the browser to check for errors more aggressively
18518'use strict';
18519/**
18520 * @namespace resourceCenter
18521 * @memberof roche
18522 *
18523 */
18524
18525var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
18526
18527(function (window, $, snro) {
18528  // Define variables and functions for later use
18529  // DOM cache
18530  var _cache = {};
18531  var isiosDevice = /iPad|iPhone|iPod|Mac/.test(navigator.userAgent) && !window.MSStream;
18532
18533  // Register behavior against resourceCenter namespace
18534  snro = window.snro = snro || {};
18535  snro.resourceCenterComp = {
18536
18537    // Cache DOM refs and other dynamic data for re-use
18538    _cacheRefs: function _cacheRefs() {
18539      _cache.$resourceCenter = $('.js-resource-center');
18540      _cache.$modalBackdrop = $('.js-modal-backdrop');
18541      _cache.locationCookie = snro.commonUtils.getCookie('location-and-language');
18542      _cache.personaCookie = snro.commonUtils.getCookie('persona-type');
18543      _cache.isloggedIn = false;
18544      _cache.pageType = $('#pageType').length ? $('#pageType').val() : '';
18545      _cache.countryBool = $('.js-link-country').data('countrySelectorDisabled');
18546      _cache.personaBool = $('.js-header-persona-link').length;
18547      _cache.isContentGated = $('#isContentGated').length ? $('#isContentGated').val().toLowerCase() : '';
18548      _cache.formType = $('#formResCenter').length ? $('#formResCenter').val() : '';
18549      _cache.viewsUntilNextForm = $('#viewsUntil').length ? parseInt($('#viewsUntil').val()) : 0;
18550      _cache.marketoID = $('#marketoID').length ? $('#marketoID').val() : '';
18551      _cache.formId = $('#formID').length ? $('#formID').val() : '';
18552      _cache.currentCycle = parseInt(snro.commonUtils.getCookie('_mkto_form_cycle_' + _cache.formId));
18553      _cache.$clickHandler = $('.submit-button');
18554      _cache.$body = $('body');
18555      _cache.$returnUrl = $('input[name=returnUrl]');
18556      _cache.goBack = $('.js-resource-back');
18557      _cache.goBackUrl = $('#resourceListingUrl').length ? $('#resourceListingUrl').val() : '';
18558    },
18559
18560
18561    // check if user is logged in
18562    _checkLogin: function _checkLogin() {
18563      if (snro.headerNavigationComp.isLoggedIn) {
18564        _cache.isloggedIn = true;
18565      }
18566    },
18567
18568
18569    //binding events to show/hide pop up
18570    _bindEvents: function _bindEvents() {
18571      var thisContext = this;
18572      if (_cache.goBackUrl) {
18573        _cache.goBack.on('click', this.onBackIconClick);
18574      } else {
18575        _cache.goBack.addClass('hide');
18576      }
18577
18578      if (_cache.$returnUrl.length) {
18579        _cache.$returnUrl.val(window.location.href);
18580      }
18581      var sessionStorage_transfer = function sessionStorage_transfer(event) {
18582        if (!event) {
18583          event = window.event;
18584        } // ie suq
18585        if (!event.newValue) {
18586          return; // do nothing if no value to work with
18587        }
18588        if (event.key === 'getSessionStorage') {
18589          // another tab asked for the sessionStorage -> send it
18590          localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage));
18591          // the other tab should now have it, so we're done with it.
18592          localStorage.removeItem('sessionStorage'); // <- could do short timeout as well.
18593        } else if (event.key === 'sessionStorage' && !sessionStorage.length) {
18594          // another tab sent data <- get it
18595          var data = JSON.parse(event.newValue);
18596          for (var key in data) {
18597            if ({}.hasOwnProperty.call(data, key)) {
18598              sessionStorage.setItem(key, data[key]);
18599            }
18600          }
18601        }
18602      };
18603
18604      // listen for changes to localStorage
18605      if (window.addEventListener) {
18606        window.addEventListener('storage', sessionStorage_transfer, false);
18607      } else {
18608        window.attachEvent('onstorage', sessionStorage_transfer);
18609      }
18610
18611      // Ask other tabs for session storage (this is ONLY to trigger event)
18612      if (!sessionStorage.length) {
18613        localStorage.setItem('getSessionStorage', 'foobar');
18614        localStorage.removeItem('getSessionStorage', 'foobar');
18615      }
18616      window.addEventListener('beforeunload', function () {
18617        snro.commonUtils.setCookie('resCenter-info', 'No');
18618      });
18619      var intervalTimerCheckFlow = setTimeout(function () {
18620        thisContext.checkForPersonaFlow();
18621        clearTimeout(intervalTimerCheckFlow);
18622      }, 2000);
18623
18624      //click handler for eloquo
18625      if (_cache.$clickHandler.length) {
18626        _cache.$clickHandler.on('click', function () {
18627          if (_cache.formType === 'eloqua') {
18628            //snro.commonUtils.setCookie('resCenter-info', 'Yes');
18629            sessionStorage.setItem('resCenter-info', 'Yes');
18630            return true;
18631          }
18632        });
18633      }
18634      //for specific to IOS devices
18635      if (isiosDevice) {
18636        $('.c-eloquo-marketo-form').addClass('ios-device');
18637      }
18638    },
18639    checkForPersonaFlow: function checkForPersonaFlow() {
18640      if (!_cache.countryBool && _cache.personaBool) {
18641        if (_cache.locationCookie && _cache.personaCookie) {
18642          this.checkForShowResourceCenter();
18643        }
18644      } else if (!_cache.countryBool || !_cache.personaBool) {
18645        if (!_cache.countryBool && _cache.personaCookie) {
18646          this.checkForShowResourceCenter();
18647        } else if (!_cache.personaBool && _cache.locationCookie) {
18648          this.checkForShowResourceCenter();
18649        } else if (!$('#myModalPopUp').is(':visible')) {
18650          this.checkForShowResourceCenter();
18651        }
18652      } else if (!$('#myModalPopUp').is(':visible')) {
18653        this.checkForShowResourceCenter();
18654      }
18655    },
18656    checkForShowResourceCenter: function checkForShowResourceCenter() {
18657      if (_cache.pageType && _cache.isContentGated === 'yes') {
18658        var context = this;
18659        if (_cache.formType === 'marketo') {
18660          var intervalTimer = setTimeout(function () {
18661            var countCycle = _cache.currentCycle ? _cache.currentCycle >= _cache.viewsUntilNextForm && $('#mktoForm_' + _cache.formId).html() : true;
18662            if (!(_cache.isloggedIn || !countCycle)) {
18663              context.showFormsResourceCenter();
18664              snro.commonUtils.setCookie('resCenter-info', 'No');
18665            }
18666            clearTimeout(intervalTimer);
18667          }, 2000);
18668        } else if (_cache.formType === 'eloqua') {
18669          if (!(_cache.isloggedIn || sessionStorage.getItem('resCenter-info') === 'Yes')) {
18670            this.showFormsResourceCenter();
18671          }
18672        } else if (_cache.formType === 'default') {
18673          if (!_cache.isloggedIn) {
18674            this.showFormsResourceCenter();
18675          }
18676        }
18677      }
18678    },
18679    _updateFormIDs: function _updateFormIDs(context, index) {
18680      $(context).attr('id', $(context).attr('name') + index);
18681      $(context).next().attr('for', $(context).attr('name') + index);
18682    },
18683    showFormsResourceCenter: function showFormsResourceCenter() {
18684      _cache.$resourceCenter.addClass('show overflow-x');
18685      _cache.$modalBackdrop.addClass('show');
18686      _cache.$body.addClass('overflow-body');
18687      if (snro.commonUtils.isMobile()) {
18688        $('.c-header').hide();
18689        _cache.formType === 'marketo' ? $('.x-content-wrapper').show() : $('.x-content-wrapper').hide();
18690        $('.js-footer').hide();
18691      }
18692      if ($('.c-eloquo-marketo-form').find($('input[type="checkbox"]'))) {
18693        var context = this;
18694        $('.c-eloquo-marketo-form').find($('input[type="checkbox"]')).each(function (index) {
18695          context._updateFormIDs($(this), index);
18696        });
18697      }
18698      if ($('.c-eloquo-marketo-form').find($('input[type="radio"]'))) {
18699        var _context = this;
18700        $('.c-eloquo-marketo-form').find($('input[type="radio"]')).each(function (index) {
18701          _context._updateFormIDs($(this), index);
18702        });
18703      }
18704    },
18705    _formSubmitHandler: function _formSubmitHandler() {
18706      /*eslint-disable */
18707      MktoForms2.whenReady(function (form) {
18708        form.onSuccess(function (value) {
18709          if (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
18710            snro.commonUtils.setCookie('resCenter-info', 'Yes');
18711          }
18712        });
18713      });
18714    },
18715    onBackIconClick: function onBackIconClick() {
18716      window.location.href = _cache.goBackUrl;
18717    },
18718
18719
18720    // Module initialization
18721    init: function init() {
18722      this._cacheRefs();
18723      this._checkLogin();
18724      this._bindEvents();
18725      /*eslint-disable */
18726      if ((typeof MktoForms2 === 'undefined' ? 'undefined' : _typeof(MktoForms2)) === 'object') {
18727        this._formSubmitHandler();
18728      }
18729    }
18730  };
18731})(window, window.jQuery, window.snro);
18732
18733/*
18734 * decisionguide.js
18735 * [ This javascript code is used to render the appropriate handlebars template based on data. ]
18736 *
18737 * @project:    SN-RO
18738 * @date:       2018-03-28
18739 * @author:     Neha Gupta
18740 * @licensor:   SAPIENNITRO
18741 * @namespaces: snro
18742 */
18743
18744//this will cause the browser to check for errors more aggressively
18745'use strict';
18746
18747/**
18748 * @namespace decisionguideCmp
18749 * @memberof roche
18750 */
18751
18752(function (window, $, snro) {
18753
18754  var _cache = {},
18755      currentQues = -1,
18756      questionsArr = [],
18757      questionUrl = '',
18758      submitUrl = '';
18759
18760  snro = window.snro = snro || {};
18761  var _toggleNextBtnDisabled = function _toggleNextBtnDisabled() {
18762    var checkedAnswers = $('.js-decisionguide-question:visible .js-decision-answer:checked').length;
18763    if (checkedAnswers) {
18764      _cache.decisionguideNextBtn.removeClass('disabled');
18765    } else {
18766      _cache.decisionguideNextBtn.addClass('disabled');
18767    }
18768  },
18769      _goToQues = function _goToQues(questionType) {
18770    $('.js-decisionguide .js-decisionguide-question').hide();
18771    $('.js-decisionguide .js-decisionguide-question-wrapper').removeClass('slideInLeft slideInRight');
18772    var currentQuesElement = _cache.decisionguideQuestionView.find('.js-decisionguide-question:eq(' + currentQues + ')'),
18773        slideClass = 'slideInRight';
18774    currentQuesElement.show();
18775    if (questionType === 'prev') {
18776      slideClass = 'slideInLeft';
18777    }
18778    currentQuesElement.find('.js-decisionguide-question-wrapper').addClass(slideClass);
18779    if (currentQues > 0) {
18780      _cache.decisionguidePrevBtn.removeClass('hidden');
18781    } else {
18782      _cache.decisionguidePrevBtn.addClass('hidden');
18783    }
18784    _toggleNextBtnDisabled();
18785  },
18786      _startDecisionGuide = function _startDecisionGuide() {
18787    _cache.decisionguideRefreshBtn.removeClass('hidden');
18788    _cache.decisionguideQuestionView.removeClass('hidden');
18789    _cache.decisionguideFooter.removeClass('hidden');
18790    _cache.decisionguide.answersTagWrapper.removeClass('hidden');
18791    _cache.decisionguideStartView.hide();
18792  },
18793      _displayQuestion = function _displayQuestion(data) {
18794
18795    currentQues += 1;
18796    questionsArr.push(data);
18797    //show question view if first question
18798    if (currentQues === 0) {
18799      _startDecisionGuide();
18800    }
18801
18802    if (data.headline) {
18803      data.headline = questionsArr.length + '. ' + data.headline;
18804    }
18805
18806    var questionTemplate = window.roche.templates['decisionguideQuestionView'],
18807        questionHtml = questionTemplate(data);
18808    _cache.decisionguideQuestionView.append(questionHtml);
18809    _goToQues();
18810  },
18811      _addAnswerTag = function _addAnswerTag(questionIndex) {
18812    var tagClass = '',
18813        questionId = questionsArr[questionIndex].questionId,
18814        isMultipleChoice = questionsArr[questionIndex].isCheckbox,
18815        currentQuestion = questionsArr[questionIndex],
18816        quesNumber = questionIndex + 1,
18817        prevAnsHtml = '<div class=\'c-decisionguide__prev-answer js-decisionguide-prev-ans\' data-question-id=\'' + questionId + '\'><div class=\'c-decisionguide__prev-ques hidden js-decisionguide-prev-ques\'>' + quesNumber + '. ' + currentQuestion.description + '</div></div>';
18818
18819    var prevAnsElem = $(prevAnsHtml),
18820        targetElem = prevAnsElem;
18821    _cache.decisionguideAnswers.append(prevAnsElem);
18822
18823    $.each(currentQuestion.selectedAnswer, function (index, answer) {
18824      if (isMultipleChoice === 'true' && index === 0) {
18825        tagClass = 'checkbox-large';
18826        prevAnsElem.append('<div class=\'c-decisionguide__multiple-answer-wrapper js-multile-answer-wrapper\'></div>');
18827        targetElem = $('.js-multile-answer-wrapper:last');
18828      } else if (isMultipleChoice === 'true') {
18829        tagClass = 'checkbox-small';
18830        targetElem = $('.js-multile-answer-wrapper:last');
18831      }
18832      var tagHtml = '<div class=\'c-decisionguide__answer-tag js-decisionguide-answer-tag ' + tagClass + '\' data-answer-id=\'' + answer.answerId + '\' data-answer-tag=\'' + answer.answerTag + '\' data-question-id=\'' + questionId + '\'><span class=\'c-decisionguide__answer-tag-icon\'></span><span>' + answer.desc + '</span></div>';
18833      targetElem.append(tagHtml);
18834    });
18835  },
18836      _refreshAnswersTags = function _refreshAnswersTags() {
18837    _cache.decisionguideAnswers.html('');
18838    $.each(questionsArr, function (index) {
18839      //$.each(question.selectedAnswer, function(index2, answer){
18840      _addAnswerTag(index);
18841      //});
18842    });
18843  },
18844      _showProgress = function _showProgress() {
18845
18846    /*let progress = '';
18847    if(!questionsArr[currentQues].currentProgress){
18848      questionsArr[currentQues].currentProgress = currentProgress;
18849    }
18850     if(questionsArr[currentQues].isFinalQuestion==='true'){
18851      currentProgress = 100;
18852    }else{
18853      let remainingQuestions = questionsArr[currentQues].childCount+1,
18854        remainingprogress = 100 - questionsArr[currentQues].currentProgress,
18855        progressToUpdate = Math.ceil(remainingprogress/remainingQuestions);
18856      currentProgress = questionsArr[currentQues].currentProgress + progressToUpdate;
18857    }
18858    progress = currentProgress+'%';
18859    _cache.decisionguide.progresstext.text(progress);
18860    _cache.decisionguide.progress.css({'width': progress});*/
18861    var progress = 0;
18862    if (questionsArr.length) {
18863      var totalQuestions = questionsArr[currentQues].childCount + questionsArr.length;
18864      totalQuestions = parseInt(totalQuestions);
18865      var answeredQuestions = questionsArr.length;
18866      progress = Math.ceil(answeredQuestions / totalQuestions * 100);
18867    }
18868
18869    progress = progress + '%';
18870    _cache.decisionguide.progresstext.text(progress);
18871    _cache.decisionguide.progress.css({ 'width': progress });
18872  },
18873      _removeQuesFromDom = function _removeQuesFromDom(startIndex) {
18874    $('.js-decisionguide-question-view').children().slice(startIndex).remove();
18875  },
18876      _showSubmitView = function _showSubmitView() {
18877    _cache.decisionguideQuestionView.addClass('hidden');
18878    _cache.decisionguideFooter.addClass('hidden');
18879    _cache.decisionguide.answersTagWrapper.addClass('c-decisionguide__submit-view');
18880    _cache.decisionguide.submitBtn.removeClass('hidden');
18881    $('.js-decisionguide-prev-ques').removeClass('hidden');
18882  },
18883      _hideSubmitView = function _hideSubmitView() {
18884    _cache.decisionguide.submitBtn.addClass('hidden');
18885    _cache.decisionguide.answersTagWrapper.removeClass('c-decisionguide__submit-view');
18886    $('.js-decisionguide-prev-ques').addClass('hidden');
18887  },
18888      _showResultsView = function _showResultsView() {
18889    _hideSubmitView();
18890    _cache.decisionguide.productsWraper.html('');
18891    _cache.decisionguide.resultsView.removeClass('hidden');
18892    snro.commonUtils.addEllipses();
18893  },
18894      _showResults = function _showResults(data) {
18895    var resultsTemplate = window.roche.templates['decisionguideProductView'],
18896        resultsHtml = resultsTemplate(data);
18897    _cache.decisionguide.productsWraper.append(resultsHtml);
18898    snro.dynamicMedia.processDynamicImages();
18899    snro.commonUtils.addEllipses();
18900  },
18901
18902
18903  /*_showLoader = (element) => {
18904    snro.commonUtils.loader(element, true, false);
18905  },*/
18906
18907  _getQuestion = function _getQuestion() {
18908
18909    //_showLoader($('.js-decisionguide-question-view'));
18910    if (navigator.appVersion.indexOf('MSIE 9') !== -1) {
18911      $.getJSON(questionUrl).done(function (data) {
18912        _cache.startButton.removeClass('disabled');
18913        _displayQuestion(data);
18914        //$('.js-loading-icon').remove();
18915      });
18916    } else {
18917      var options = {
18918        url: questionUrl,
18919        type: 'GET',
18920        dataType: 'json'
18921      };
18922      snro.ajaxWrapper.getXhrObj(options).done(function (data) {
18923        _cache.startButton.removeClass('disabled');
18924        _displayQuestion(data);
18925        //$('.js-loading-icon').remove();
18926      }).fail(function (err) {
18927        snro.commonUtils.log(err);
18928        //$('.js-loading-icon').remove();
18929      });
18930    }
18931  },
18932      _isOtherComponentVisible = function _isOtherComponentVisible(element) {
18933    var eTop = $(element).offset().top,
18934        eTopWindow = eTop - $(window).scrollTop(),
18935        eBottomWindow = eTopWindow + $('.js-decisionguide-wrapper').outerHeight() + 72,
18936        // footer height + 20px bottom margin offset
18937    viewport = $(window).height();
18938
18939    return eBottomWindow < viewport;
18940  },
18941      _refreshDecisionguide = function _refreshDecisionguide() {
18942    _cache.decisionguide.resultsView.addClass('hidden');
18943    _cache.decisionguide.productsWraper.html('');
18944    _hideSubmitView();
18945    questionsArr = [];
18946    currentQues = -1;
18947    questionUrl = _cache.questionPath + '/jcr:content/question.ques.json';
18948    _refreshAnswersTags();
18949    _showProgress();
18950    _cache.decisionguide.answersTagWrapper.addClass('hidden hidden-xs');
18951    _cache.decisionguideInfo.addClass('hidden');
18952    _cache.decisionguideRefreshBtn.addClass('hidden');
18953    _cache.decisionguideQuestionView.addClass('hidden');
18954    _cache.decisionguideQuestionView.html('');
18955    _cache.decisionguideFooter.addClass('hidden');
18956    _cache.decisionguideStartView.show();
18957  },
18958      _initializeRefreshPopup = function _initializeRefreshPopup() {
18959    var popupData = {
18960      'modalId': 'decisionguideRefreshPopup',
18961      'modalName': window.Granite.I18n.get('rdoe_decisionguide.refresh_headline', null, localStorage.getItem('i18nhint')),
18962      'modalTitle': window.Granite.I18n.get('rdoe_decisionguide.refresh_headline', null, localStorage.getItem('i18nhint')),
18963      'modalBodyText': window.Granite.I18n.get('rdoe_decisionguide.refresh_body_text', null, localStorage.getItem('i18nhint')),
18964      'btnTextCancel': window.Granite.I18n.get('rdoe_generic.cancel', null, localStorage.getItem('i18nhint')),
18965      'btnTextConfirm': window.Granite.I18n.get('rdoe_generic.confirm', null, localStorage.getItem('i18nhint')),
18966      'btnClassConfirm': 'js-refresh-confirm'
18967    };
18968
18969    snro.commonUtils.createModal(popupData);
18970
18971    $('body').on('click', '.js-refresh-confirm', function () {
18972      _refreshDecisionguide();
18973      $('#decisionguideRefreshPopup').modal('hide');
18974    });
18975  };
18976
18977  snro.decisionguide = {
18978
18979    moduleName: 'decisionguideComp',
18980
18981    // assignment of dom selectors to variables
18982    updateCache: function updateCache() {
18983      _cache.decisionguide = $('.js-decisionguide');
18984      _cache.startButton = $('.js-start-decisionguide');
18985      _cache.decisionguideStartView = $('.js-decisionguide .js-decisionguide-start-view');
18986      _cache.decisionguideHeader = $('.js-decisionguide .js-decisionguide-header');
18987      _cache.decisionguideFooter = $('.js-decisionguide .js-decisionguide-footer');
18988      _cache.decisionguideQuestionView = $('.js-decisionguide .js-decisionguide-question-view');
18989      _cache.decisionguideNextBtn = $('.js-decisionguide .js-decisionguide-next');
18990      _cache.decisionguidePrevBtn = $('.js-decisionguide .js-decisionguide-prev');
18991      _cache.decisionAnswer = $('.js-decisionguide .js-decision-answer');
18992      _cache.decisionguideAnswers = $('.js-decisionguide .js-decisionguide-answers');
18993      _cache.decisionguideRefreshBtn = $('.js-decisionguide .js-decisionguide-refresh');
18994      _cache.decisionguideInfo = $('.js-decisionguide .js-decisionguide-info');
18995      _cache.decisionguideQuestion = $('.js-decisionguide .js-decisionguide-question');
18996      _cache.decisionguide.progresstext = $('.js-decisionguide .js-progress-text');
18997      _cache.decisionguide.progress = $('.js-decisionguide .js-progress');
18998      _cache.decisionguide.submitBtn = $('.js-decisionguide .js-decisionguide-submit');
18999      _cache.decisionguide.answersTagWrapper = $('.js-decisionguide .js-decisionguide-answers-wrapper');
19000      _cache.decisionguide.resultsView = $('.js-decisionguide .js-decisionguide-results');
19001      _cache.decisionguide.productsWraper = $('.js-decisionguide .js-decisionguide-products');
19002      _cache.baseQuestionPath = $('.js-decisionguide .js-basequestion-path');
19003      _cache.questionPath = _cache.baseQuestionPath.data('baseQuestionPath');
19004      questionUrl = _cache.questionPath + '/jcr:content/question.ques.json';
19005      submitUrl = _cache.questionPath + '/jcr:content/question.ans.json';
19006    },
19007    bindEvents: function bindEvents() {
19008      _cache.decisionguide.on('click', '.js-start-decisionguide', function (e) {
19009        e.preventDefault();
19010        if (!$(this).hasClass('disabled')) {
19011          _cache.startButton.addClass('disabled');
19012          _getQuestion();
19013        }
19014      });
19015
19016      _cache.decisionguide.on('click', '.js-decisionguide-next', function (e) {
19017        e.preventDefault();
19018        if ($(this).hasClass('disabled')) {
19019          return;
19020        }
19021        _cache.decisionguide.answersTagWrapper.removeClass('hidden hidden-xs');
19022        var checkedAnswers = $('.js-decisionguide-question:visible .js-decision-answer:checked'),
19023            selectedAnswer = [],
19024            selectedAnswersIds = [],
19025            nextQuestion = currentQues + 1,
19026            isFinalQuestion = questionsArr[currentQues].isFinalQuestion,
19027            isManual = _cache.decisionguide.data('isManual').toString();
19028        checkedAnswers.each(function () {
19029          var selectedVal = $(this).val(),
19030              selectedAnswerTag = $(this).data('answerTag'),
19031              selectedAnswerDesc = $(this).data('answerShortDesc'),
19032              selectedAnswerObj = { 'answerTag': selectedAnswerTag, 'desc': selectedAnswerDesc, 'answerId': selectedVal };
19033          selectedAnswersIds.push(selectedVal);
19034          selectedAnswer.push(selectedAnswerObj);
19035        });
19036
19037        if (questionsArr[currentQues].selectedAnswer) {
19038          var oldSelectedAnswers = [];
19039          $.each(questionsArr[currentQues].selectedAnswer, function (key, value) {
19040            oldSelectedAnswers.push(value.answerId);
19041          });
19042          if (JSON.stringify(oldSelectedAnswers) === JSON.stringify(selectedAnswersIds) && isFinalQuestion === 'false') {
19043            // answers not changed, display next question
19044            currentQues += 1;
19045            _goToQues();
19046            return;
19047          } else if (JSON.stringify(oldSelectedAnswers) !== JSON.stringify(selectedAnswersIds)) {
19048            questionsArr.splice(nextQuestion);
19049            _removeQuesFromDom(nextQuestion);
19050            questionsArr[currentQues].selectedAnswer = selectedAnswer;
19051            _refreshAnswersTags();
19052          }
19053        } else {
19054          questionsArr[currentQues].selectedAnswer = selectedAnswer;
19055          _addAnswerTag(currentQues);
19056        }
19057
19058        _showProgress();
19059
19060        var nextQuestionId = selectedAnswersIds.join(',');
19061
19062        if (isFinalQuestion === 'true' && isManual === 'true') {
19063          _showSubmitView();
19064          submitUrl = questionsArr[currentQues].questionMap[nextQuestionId] + '/jcr:content/result.ans.json';
19065          return;
19066        } else if (isFinalQuestion === 'true' && isManual === 'false') {
19067          _showSubmitView();
19068          return;
19069        }
19070
19071        questionUrl = questionsArr[currentQues].questionMap[nextQuestionId] + '/jcr:content/question.ques.json';
19072
19073        if (currentQues === 0) {
19074          _cache.decisionguideAnswers.removeClass('hidden');
19075          _cache.decisionguideInfo.removeClass('hidden');
19076        }
19077        _cache.decisionguideNextBtn.addClass('disabled');
19078        _getQuestion();
19079      });
19080
19081      _cache.decisionguide.on('click', '.js-decisionguide-prev-ans', function () {
19082        var selectedQuesId = $(this).data('questionId').toString();
19083        for (var i = 0; i < questionsArr.length; i++) {
19084          if (questionsArr[i].questionId === selectedQuesId) {
19085            currentQues = i;
19086            _cache.decisionguide.resultsView.addClass('hidden');
19087            _hideSubmitView();
19088            _cache.decisionguideQuestionView.removeClass('hidden');
19089            _cache.decisionguideFooter.removeClass('hidden');
19090            _goToQues('prev');
19091            break;
19092          }
19093        }
19094      });
19095
19096      _cache.decisionguide.on('click', '.js-decisionguide-prev', function (e) {
19097        e.preventDefault();
19098        currentQues = currentQues - 1;
19099        _goToQues('prev');
19100      });
19101
19102      _cache.decisionguide.on('click', '.js-decision-answer', function () {
19103        _toggleNextBtnDisabled();
19104      });
19105
19106      _cache.decisionguide.on('click', '.js-decisionguide-submit', function (e) {
19107        e.preventDefault();
19108        var answers = [];
19109        $('.js-decisionguide-answer-tag').each(function () {
19110          if ($(this).data('answerTag')) {
19111            answers.push($(this).data('answerTag'));
19112          }
19113        });
19114        var isManual = _cache.decisionguide.data('isManual').toString(),
19115            listingType = _cache.decisionguide.data('listingType').toString(),
19116            requestData = {};
19117        answers = answers.join(',');
19118        requestData = { 'answer': answers, 'isManual': isManual, 'listingType': listingType };
19119
19120        _showResultsView();
19121        //_showLoader(_cache.decisionguide.resultsView);
19122        if (navigator.appVersion.indexOf('MSIE 9') !== -1) {
19123          $.getJSON(submitUrl, requestData).done(function (data) {
19124            //$('.js-loading-icon').remove();
19125            _showResults(data);
19126          });
19127        } else {
19128          var options = {
19129            url: submitUrl,
19130            type: 'GET',
19131            dataType: 'json',
19132            data: requestData
19133          };
19134          snro.ajaxWrapper.getXhrObj(options).done(function (data) {
19135            //$('.js-loading-icon').remove();
19136            _showResults(data);
19137          }).fail(function (err) {
19138            //$('.js-loading-icon').remove();
19139            snro.commonUtils.log(err);
19140          });
19141        }
19142      });
19143
19144      _cache.decisionguide.on('click', '.js-decisionguide-refresh', function (e) {
19145        e.preventDefault();
19146        $('#decisionguideRefreshPopup').modal({
19147          'keyboard': false,
19148          backdrop: 'static'
19149        });
19150      });
19151
19152      if (snro.commonUtils.isMobile()) {
19153        $(window).on('scroll', function () {
19154          if ($('.js-decisionguide .js-decisionguide-ques-wrapper').isInViewport() && !_isOtherComponentVisible('.js-decisionguide')) {
19155            _cache.decisionguideFooter.addClass('c-decisionguide__footer-sticky');
19156          } else {
19157            _cache.decisionguideFooter.removeClass('c-decisionguide__footer-sticky');
19158          }
19159        });
19160      }
19161    },
19162
19163
19164    // Module initialization
19165    init: function init() {
19166      this.updateCache();
19167      this.bindEvents();
19168      _initializeRefreshPopup();
19169    }
19170  };
19171})(window, window.jQuery, window.snro);
19172
19173/*!
19174 * Login Notification.js
19175
19176 * This file contians  Login Notification functions to show the notification when user logged in wrong country
19177 *
19178 * @project   SapientNitro Roche Diagonostics
19179 * @date      2017-04-27
19180 * @author    Shubham 
19181 * @dependencies jQuery
19182 */
19183
19184//this will cause the browser to check for errors more aggressively
19185'use strict';
19186
19187/**
19188 * @namespace Main
19189 * @memberof snro
19190 * @property {null} property - description of property
19191 */
19192
19193(function (window, $, snro) {
19194  snro = window.snro = snro || {};
19195
19196  var cookiesTag = $('.js-login-notification'),
19197      closeBtn = $('.js-login-closeBtn');
19198
19199  //Hide the Login Notifcation popup
19200  var cookiesPopupHide = function cookiesPopupHide() {
19201    snro.commonUtils.setCookie('loginNotificationDisclaimer', 'Yes');
19202    cookiesTag.slideUp(500);
19203  };
19204  //Show the  login Notifcation popup
19205  var cookiesPopupShow = function cookiesPopupShow() {
19206    cookiesTag.slideDown(500);
19207  };
19208  //Close cookie on button click
19209  var _bindEvents = function _bindEvents() {
19210    closeBtn.on('click', cookiesPopupHide);
19211  };
19212  var checkLoginNotificationDisclaimer = function checkLoginNotificationDisclaimer() {
19213    var checkCookie = snro.commonUtils.getCookie('loginNotificationDisclaimer');
19214    if (checkCookie !== '') {
19215      cookiesPopupHide();
19216    } else {
19217      cookiesPopupShow();
19218    }
19219  };
19220  snro.loginNotification = {
19221    init: function init() {
19222      checkLoginNotificationDisclaimer();
19223      _bindEvents();
19224    }
19225  };
19226})(window, window.jQuery, window.snro);
19227
19228/*
19229 * addIncognitoMode.js
19230 * [ Behavior for addIncognitoMode component ]
19231 *
19232 * @project:    SN-RO
19233 * @date:       2018-05-10
19234 * @author:     Bindhyachal
19235 * @licensor:   SAPIENNITRO
19236 * @namespaces: snro
19237 */
19238
19239//this will cause the browser to check for errors more aggressively
19240'use strict';
19241/**
19242 * @namespace addIncognitoMode
19243 * @memberof roche
19244 *
19245 */
19246
19247(function (window, $, snro) {
19248  // Define variables and functions for later use
19249  var _cache = {};
19250  // Register behavior against addIncognitoMode namespace
19251  snro = window.snro = snro || {};
19252  snro.addIncognitoModeComp = {
19253    moduleName: 'addIncognitoModeComp',
19254
19255    _cacheRef: function _cacheRef() {
19256      _cache.checkIcognitoMode = false;
19257      _cache.cookiesTag = $('.js-addIncognitoMode-notification');
19258      _cache.closeBtn = $('.js-addIncognitoMode-closeBtn');
19259    },
19260    _bindEvents: function _bindEvents() {
19261      _cache.closeBtn.on('click', this.cookiesPopupHide);
19262    },
19263
19264
19265    //Hide the  Notifcation popup
19266    cookiesPopupHide: function cookiesPopupHide() {
19267      snro.commonUtils.setCookie('addsIncognitoDisclaimer', 'Yes');
19268      _cache.cookiesTag.slideUp(500);
19269    },
19270
19271
19272    // check if user is in the modes
19273    _initCheck: function _initCheck() {
19274
19275      this.checkIcognitoModeFunc();
19276      var checkAddBlocker = this.checkAddBlockerFunc();
19277      if (!snro.commonUtils.getCookie('addsIncognitoDisclaimer')) {
19278        if (_cache.checkIcognitoMode || checkAddBlocker) {
19279          if (!(snro.commonUtils.queryParams('link1') || snro.commonUtils.queryParams('link2'))) {
19280            _cache.cookiesTag.removeClass('hide');
19281            _cache.cookiesTag.slideDown(500);
19282          }
19283        }
19284      }
19285    },
19286    checkIcognitoModeFunc: function checkIcognitoModeFunc() {
19287      new Promise(function (resolve) {
19288        var db = void 0,
19289            on = function on() {
19290          return resolve(true);
19291        },
19292            off = function off() {
19293          return resolve(false);
19294        },
19295            tryls = function tryls() {
19296          try {
19297            localStorage.length ? off() : (localStorage.x = 1, localStorage.removeItem('x'), off());
19298          } catch (e) {
19299            on();
19300          }
19301        };
19302
19303        // Blink
19304        window.webkitRequestFileSystem ? window.webkitRequestFileSystem(window.TEMPORARY, 1, off, on)
19305
19306        // FF
19307        : 'MozAppearance' in document.documentElement.style ? (db = indexedDB.open('test'), db.onerror = on, db.onsuccess = off
19308
19309        // Safari
19310        ) : /constructor/i.test(window.HTMLElement) ? tryls()
19311
19312        // IE10+ & edge
19313        : !window.indexedDB && (window.PointerEvent || window.MSPointerEvent) ? on()
19314
19315        // Rest
19316        : off();
19317      }).then(function (enabled) {
19318        _cache.checkIcognitoMode = enabled;
19319        if (!snro.commonUtils.getCookie('addsIncognitoDisclaimer')) {
19320          if (_cache.checkIcognitoMode) {
19321            if (!(snro.commonUtils.queryParams('link1') || snro.commonUtils.queryParams('link2'))) {
19322              _cache.cookiesTag.removeClass('hide');
19323              _cache.cookiesTag.slideDown(500);
19324            }
19325          }
19326        }
19327      });
19328    },
19329    checkAddBlockerFunc: function checkAddBlockerFunc() {
19330      if (window.canRunAds === undefined) {
19331        // adblocker detected, show fallback
19332        return true;
19333      }
19334    },
19335
19336
19337    // Module initialization
19338    init: function init() {
19339      this._cacheRef();
19340      this._bindEvents();
19341      this._initCheck();
19342    }
19343  };
19344})(window, window.jQuery, window.snro);
19345
19346/*
19347 * c_dataprivacymodal.js
19348 * [ This javascript code is used to display data privacy popup component. ]
19349 *
19350 * @project:    SN-RO
19351 * @date:       2018-7-10
19352 * @author:     shubham
19353 * @licensor:   SAPIENNITRO
19354 * @namespaces: snro
19355 */
19356
19357//this will cause the browser to check for errors more aggressively
19358'use strict';
19359
19360/**
19361 * @namespace popupComp
19362 * @memberof roche
19363 * @property {null} property - description of property
19364 */
19365
19366(function (window, $, snro) {
19367  snro = window.snro = snro || {};
19368  var _cache = {},
19369      domElements = {
19370    currentChannel: $('input[name=currentChannel]'),
19371    countryPickerLink: $('.js-link-country'),
19372    popUpDisable: $('.js-popup-disable')
19373  };
19374  snro.dataPrivacyModal = {
19375    moduleName: 'dataPrivacyModal',
19376    updateCache: function updateCache() {
19377      _cache.popupModal = $('#myDataPrivacyPopup');
19378      _cache.confirmButton = $('#myDataPrivacyPopup .js-btn-privacy');
19379      _cache.backDropModal = $('.js-privacy-backdrop');
19380      _cache.currentChannel = $('input[name=currentChannel]');
19381      _cache.dataPrivacyNode = $('input[name=dataPrivacy]');
19382    },
19383    showModal: function showModal() {
19384      if (_cache.dataPrivacyNode && _cache.dataPrivacyNode.length) {
19385        var checkCookie = snro.commonUtils.getCookie('DataPrivacy');
19386        if (!checkCookie) {
19387          _cache.popupModal.addClass('show');
19388          _cache.backDropModal.addClass('show');
19389        }
19390      }
19391    },
19392    bindEvents: function bindEvents() {
19393      _cache.confirmButton.on('click', function () {
19394        _cache.popupModal.removeClass('show');
19395        _cache.backDropModal.removeClass('show');
19396        snro.commonUtils.setCookie('DataPrivacy', 'yes', Infinity);
19397        if (domElements.popUpDisable.data('countryPopupDisabled') && domElements.popUpDisable.data('personaPopupDisabled')) {
19398          snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
19399          snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
19400          snro.commonUtils.setCookie('persona-type', domElements.popUpDisable.data('defaultPersona'), Infinity);
19401        } else if (domElements.popUpDisable.data('countryPopupDisabled')) {
19402          snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
19403          snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
19404        } else if (domElements.popUpDisable.data('personaPopupDisabled')) {
19405          snro.commonUtils.setCookie('persona-type', domElements.popUpDisable.data('defaultPersona'), Infinity);
19406        } else if (window.location.href.split('?persona=')[1]) {
19407          snro.commonUtils.setLocationAndLanguageCookie(_cache.currentChannel.val() && _cache.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
19408          snro.commonUtils.setCookie('homePagePath', _cache.currentChannel.val() || 'global/en', Infinity);
19409          snro.commonUtils.setCookie('persona-type', window.location.href.split('?persona=')[1], Infinity);
19410        } else if (domElements.countryPickerLink.data('countrySelectorDisabled')) {
19411          snro.commonUtils.setLocationAndLanguageCookie(domElements.currentChannel.val() && domElements.currentChannel.val().replace('/', '|') || 'global|en', Infinity, '/', '.roche.com');
19412          snro.commonUtils.setCookie('homePagePath', domElements.currentChannel.val() || 'global/en', Infinity);
19413        }
19414        var currUrl = window.location.href;
19415        var isHashUrl = currUrl.slice(-1) === '#' ? '#' : window.location.hash;
19416        if (isHashUrl) {
19417          window.location.href = currUrl.slice(0, currUrl.length - isHashUrl.length);
19418          //add the isHashUrl to sessionstorage
19419          snro.commonUtils.storage.set('isHashUrl', isHashUrl, true);
19420        }
19421        var campaignCode = snro.commonUtils.getCookie('campaign-code');
19422        snro.commonUtils.removeCookie('campaign-code');
19423        if (!campaignCode) {
19424          window.location.href = window.location.href;
19425        } else {
19426          if (snro.commonUtils.queryParams('referer')) {
19427            window.location.href = window.location.href + '&campaignCode';
19428          } else {
19429            window.location.href = window.location.href.split('?')[0] + '?' + campaignCode;
19430          }
19431        }
19432      });
19433    },
19434    init: function init() {
19435      this.updateCache();
19436      this.showModal();
19437      this.bindEvents();
19438    }
19439  };
19440})(window, window.jQuery, window.snro);
19441
19442/*
19443 * c_imageSlider.js
19444 * [ This javascript code is used to toggle between two images with a sliding effect, vertically and horizontally. ]
19445 *
19446 * @project:    SN-RO
19447 * @date:       2018-12-09
19448 * @author:     Yaman
19449 * @licensor:   SAPIENNITRO
19450 * @namespaces: snro
19451 */
19452
19453//this will cause the browser to check for errors more aggressively
19454'use strict';
19455
19456/**
19457 * @namespace imageSlider
19458 * @memberof roche
19459 * @property {null} property - description of property
19460 */
19461
19462(function (window, $, snro) {
19463  snro = window.snro = snro || {};
19464  // function drags(dragElement, resizeElement, container) {
19465
19466  //   // This creates a variable that detects if the user is using touch input insted of the mouse.
19467  //   let touched = false;
19468  //   window.addEventListener('touchstart', function () {
19469  //     touched = true;
19470  //   });
19471  //   window.addEventListener('touchend', function () {
19472  //     touched = false;
19473  //   });
19474
19475  //   // click the image and move the slider on interaction with the mouse or the touch input
19476  //   dragElement.off().on('mousedown touchstart', function (e) {
19477  //     $('.c-comparison-slider__overlay').css('display', 'none');
19478  //     //add classes to the elements - good for css animations if you need it to
19479  //     dragElement.addClass('draggable');
19480  //     resizeElement.addClass('resizable');
19481
19482  //     //variables for horizontal behaiviour
19483  //     let startY = e.pageY ? e.pageY : e.originalEvent.touches[0].pageY;
19484  //     let dragHeight = dragElement.outerHeight();
19485  //     let posY = dragElement.offset().top + dragHeight - startY;
19486  //     let containerOffset = container.offset().top;
19487  //     let containerHeight = container.outerHeight();
19488  //     let minTop = containerOffset;
19489  //     let maxTop = containerOffset + containerHeight - dragHeight;
19490
19491  //     //add event listner on the divider element
19492  //     dragElement.parents().on('mousemove touchmove', function (e) {
19493
19494  //       // if the user is not using touch input let do preventDefault to prevent the user from slecting the images as he moves the silder arround.
19495  //       if (touched === false) {
19496  //         e.preventDefault();
19497  //       }
19498
19499  //       //horizontal
19500  //       let moveY = e.pageY ? e.pageY : e.originalEvent.touches[0].pageY;
19501  //       let topValue = moveY + posY - dragHeight;
19502
19503  //       // stop the divider from going over the limits of the container
19504
19505  //       //horizontal
19506  //       if (topValue < minTop) {
19507  //         topValue = minTop;
19508  //       } else if (topValue > maxTop) {
19509  //         topValue = maxTop;
19510  //       }
19511  //       let heightValue = (topValue + dragHeight / 2 - containerOffset) * 100 / containerHeight + '%';
19512
19513  //       if ($('[data-orientation="horizontal"]').length) {
19514  //         $('.draggable').css('top', heightValue).on('mouseup touchend touchcancel', function () {
19515  //           $(this).removeClass('draggable');
19516  //           resizeElement.removeClass('resizable');
19517  //         });
19518
19519  //         $('.resizable').css('height', heightValue);
19520  //       }
19521  //     }).on('mouseup touchend touchcancel', function () {
19522  //       $('.c-comparison-slider__overlay').css('display', 'block');
19523  //       dragElement.removeClass('draggable');
19524  //       resizeElement.removeClass('resizable');
19525  //     });
19526
19527  //   }).on('mouseup touchend touchcancel', function () {
19528  //     // stop clicping the image and move the slider
19529  //     dragElement.removeClass('draggable');
19530  //     resizeElement.removeClass('resizable');
19531  //   });
19532  // }
19533  function dragsVertical(dragElement, resizeElement, container, shiftWidth) {
19534
19535    // This creates a variable that detects if the user is using touch input instead of the mouse.
19536    var touchedVertical = false;
19537    var slideBoolean = true;
19538    window.addEventListener('touchstart', function () {
19539      touchedVertical = true;
19540    });
19541    window.addEventListener('touchend', function () {
19542      touchedVertical = false;
19543    });
19544
19545    // click the image and move the slider on interaction with the mouse or the touch input
19546    dragElement.off().on('mousedown touchstart', function (e) {
19547      $('.c-comparison-slider__overlay').css('display', 'none');
19548      //add classes to the elements - good for css animations if you need it to
19549      dragElement.addClass('draggableVertical');
19550      resizeElement.addClass('resizableVertical');
19551      //variables for vertical behaviour
19552      var startX = e.pageX ? e.pageX : e.originalEvent.touches[0].pageX;
19553      var dragWidth = dragElement.outerWidth();
19554      var posX = dragElement.offset().left + dragWidth - startX;
19555      var containerOffsetLeft = container.offset().left;
19556      var containerWidth = container.outerWidth();
19557      //the slider button starts at half the width of the button (28px) + 50% padding (14px) = 42px
19558      var minLeft = containerOffsetLeft + shiftWidth;
19559      var maxLeft = containerOffsetLeft + containerWidth - dragWidth - shiftWidth;
19560      //add event listner on the divider element
19561      dragElement.parents().on('mousemove touchmove', function (e) {
19562
19563        // if the user is not using touch input let do preventDefault to prevent the user from slecting the images as he moves the silder arround.
19564        if (touchedVertical === false) {
19565          e.preventDefault();
19566        }
19567
19568        //vertical
19569        var moveX = e.pageX ? e.pageX : e.originalEvent ? e.originalEvent.touches[0].pageX : '';
19570        var leftValue = moveX + posX - dragWidth;
19571
19572        // stop the divider from going over the limits of the container
19573        //vertical
19574        if (leftValue < minLeft) {
19575          leftValue = minLeft;
19576        } else if (leftValue > maxLeft) {
19577          leftValue = maxLeft;
19578        }
19579        var witdhCalculated = (leftValue + dragWidth / 2 - containerOffsetLeft) * 100 / containerWidth;
19580        var widthValue = witdhCalculated + '%';
19581        snro.imageSlider.slidePostion = witdhCalculated;
19582
19583        if ($('[data-orientation="vertical"]').length) {
19584          $('.draggableVertical').css('left', widthValue).on('mouseup touchend touchcancel', function () {
19585            $(this).removeClass('draggableVertical');
19586            resizeElement.removeClass('resizableVertical');
19587          });
19588          $('.resizableVertical').css('width', widthValue);
19589        }
19590      }).on('mouseup touchend touchcancel', function () {
19591        $('.c-comparison-slider__overlay').css('display', 'block');
19592        dragElement.removeClass('draggableVertical');
19593        resizeElement.removeClass('resizableVertical');
19594        if (snro.imageSlider.slidePostion > 90 && slideBoolean) {
19595          $.extend(window.digitalData['link'], { linkPageName: snro.analytics.pageName || 'roche', linkCategory: 'internal', linkSection: 'image slided', linkHeader: 'image slider', linkText: 'slided', linkInteractionMethod: 'click-on-' + snro.analytics.getBrowserWidth() });
19596          snro.analytics.trackEvent(window.digitalData, 'generic-link-tracking');
19597          slideBoolean = false;
19598        }
19599      });
19600    }).on('mouseup touchend touchcancel', function () {
19601      // stop clicping the image and move the slider
19602      dragElement.removeClass('draggableVertical');
19603      resizeElement.removeClass('resizableVertical');
19604    });
19605  }
19606  snro.imageSlider = {
19607    moduleName: 'imageSlider',
19608    slidePostion: 0,
19609
19610    // Module initialization
19611    init: function init() {
19612      if ($('.c-comparison-slider')[0]) {
19613        var $compSlider = $('.c-comparison-slider');
19614
19615        //let's loop through the sliders and initialise each of them
19616        $compSlider.each(function () {
19617          var _self = $(this);
19618          var compSliderWidth = _self.width() + 'px';
19619          var compSliderHeight = _self.height() + 'px';
19620          //the slider button starts at half the width of the button (28px) + 50% padding (14px) = 42px
19621          var shiftWidth = 42;
19622          if (snro.commonUtils.isMobile()) {
19623            shiftWidth = 30;
19624          }
19625          // _self.find('.resize img').css({
19626          //   width: compSliderWidth,
19627          //   height: compSliderHeight
19628          // });
19629
19630          // _self.find('img.js-image-slider-front').css({
19631          //   width: compSliderWidth            
19632          // });
19633
19634          var imgList = _self.find('img');
19635          imgList.each(function () {
19636            var _this = $(this);
19637            _this.css({
19638              width: compSliderWidth,
19639              height: compSliderHeight
19640            });
19641          });
19642
19643          var resizeVertical = _self.find('.resize.vertical');
19644          var resizeVerticalWidth = resizeVertical.width();
19645          var dividerElem = _self.find('.divider.vertical');
19646          var maxVerticalLimit = parseInt(compSliderWidth) - shiftWidth;
19647          if (resizeVerticalWidth <= shiftWidth) {
19648            resizeVertical.css('width', shiftWidth + 'px');
19649            dividerElem.css('left', shiftWidth + 'px');
19650          }
19651          if (resizeVerticalWidth >= maxVerticalLimit) {
19652            resizeVertical.css('width', maxVerticalLimit + 'px');
19653            dividerElem.css('left', maxVerticalLimit + 'px');
19654          }
19655
19656          // if ($('[data-orientation="horizontal"]').length) {
19657          //   drags(_self.find('.divider-horizontal'), _self.find('.resize-horizontal'), _self);
19658          // }
19659          if ($('[data-orientation="vertical"]').length) {
19660            dragsVertical(_self.find('.divider'), _self.find('.resize'), _self, shiftWidth);
19661          }
19662        });
19663        $(window).on('resize', function () {
19664          var compSliderWidth = $compSlider.width() + 'px';
19665          var compSliderHeight = $compSlider.height() + 'px';
19666          $compSlider.find('.resize.horizontal img').css({
19667            width: compSliderWidth,
19668            height: compSliderHeight
19669          });
19670        });
19671      }
19672    }
19673  };
19674})(window, jQuery, window.snro);
19675
19676/*!
19677 * c_imageRotation.js
19678
19679 * This file contains code for the 360 degree view
19680 *
19681 * @project   SapientNitro Roche Diagonostics
19682 * @date      2018-12-27
19683 * @author    Yaman
19684 * @dependencies jQuery
19685 */
19686
19687//this will cause the browser to check for errors more aggressively
19688'use strict';
19689
19690/**
19691 * @namespace imageRotation
19692 * @memberof snro
19693 * @property {null} property - description of property
19694 */
19695
19696(function (window, $, snro) {
19697  snro = window.snro = snro || {};
19698  var startImageIndex = void 0;
19699  var $preloadedImages = $('.js-preload-imgs');
19700
19701  var findImageIndex = function findImageIndex(imgSrc) {
19702    var index = imgSrc.substring(imgSrc.lastIndexOf('_') + 1, imgSrc.lastIndexOf('.'));
19703    return parseInt(index);
19704  };
19705  var findStartImageIndex = function findStartImageIndex(id, imageSrcList) {
19706    var indexStartImage = void 0;
19707    imageSrcList.forEach(function (elem, index) {
19708      var elemIndex = parseInt(elem.substring(elem.lastIndexOf('_') + 1, elem.lastIndexOf('.')));
19709      if (elemIndex === id) {
19710        indexStartImage = index;
19711      }
19712    });
19713    return indexStartImage;
19714  };
19715
19716  snro.imageRotation = {
19717    moduleName: 'imageRotation',
19718    _initImageRotation: function _initImageRotation(_self) {
19719      var $leftExtreme = _self.data('leftimage') || _self.find('.js-preload-imgs__individual:first').attr('src');
19720      var $rightExtreme = _self.data('rightimage') || _self.find('.js-preload-imgs__individual:last').attr('src');
19721      var leftExtremeIndex = findImageIndex($leftExtreme);
19722      var rightExtremeIndex = findImageIndex($rightExtreme);
19723      var $startImage = _self.data('startimage');
19724      startImageIndex = findImageIndex($startImage);
19725      var imageSrcList = [];var firstImage = void 0;
19726      _self.find('.js-preload-imgs__individual').each(function () {
19727        var _localSource = $(this).attr('src').split('?')[0];
19728        var _localSourceIndex = findImageIndex(_localSource);
19729        if (leftExtremeIndex >= 0 && rightExtremeIndex >= 0) {
19730          if (_localSourceIndex >= leftExtremeIndex && _localSourceIndex <= rightExtremeIndex) {
19731            imageSrcList.push(_localSource);
19732          }
19733        } else {
19734          imageSrcList.push(_localSource);
19735        }
19736      });
19737      if (imageSrcList.length) {
19738        firstImage = findStartImageIndex(startImageIndex, imageSrcList);
19739      }
19740      return {
19741        firstImage: firstImage,
19742        imageSrcList: imageSrcList
19743      };
19744    },
19745    _initSpriteSpin: function _initSpriteSpin(_self, imageSrcList, firstImage, isWrap) {
19746      var $spinContainer = _self.parent().find('.js-imageRotation_init');
19747      $spinContainer.spritespin({
19748        source: imageSrcList,
19749        sense: -1,
19750        animate: false,
19751        plugins: ['360', 'drag', 'wheel'],
19752        wrap: isWrap,
19753        frame: firstImage
19754      });
19755    },
19756    init: function init() {
19757      var _that = this;
19758      $preloadedImages.each(function () {
19759        var _self = $(this);
19760        var isWrap = _self.data('iswrap') ? false : true;
19761        var compiledResult = _that._initImageRotation(_self);
19762        var imageList = compiledResult.imageSrcList;
19763        var firstImage = compiledResult.firstImage;
19764        _that._initSpriteSpin(_self, imageList, firstImage, isWrap);
19765      });
19766    }
19767  };
19768})(window, jQuery, window.snro);
19769
19770/*
19771 * navigationtabs.js
19772 * [ This javascript code is used to check the url and pre-select the correct tab]
19773 *
19774 * @project:    SN-RO
19775 * @date:       2019-04-29
19776 * @author:     Rishabh
19777 * @licensor:   SAPIENNITRO
19778 * @namespaces: snro
19779 */
19780
19781//this will cause the browser to check for errors more aggressively
19782'use strict';
19783
19784/**
19785 * @namespace navigationTabs
19786 * @memberof roche
19787 * @property {null} property - description of property
19788 */
19789
19790(function (window, $, snro) {
19791  snro = window.snro = snro || {};
19792
19793  /**Public Methods */
19794  var _showNavTabView = function _showNavTabView(tabName) {
19795    $('.js-navtab-item').removeClass('selected');
19796    $('[data-tab-name=' + tabName + ']:visible').addClass('selected');
19797    if (window.location.href.indexOf('.acadia.html') == -1) {
19798      if ($('.js-tab-view-container').length) {
19799        $('.js-tab-view-container').children('.js-navtab-view').hide();
19800      } else {
19801        $('.js-navtab-view').hide();
19802      }
19803    } else {
19804      $('.js-navtab-view').show();
19805    }
19806    $('#' + tabName).show();
19807  },
19808      _appendCategoryIdToUrl = function _appendCategoryIdToUrl(currTabName, tabNotClicked) {
19809    if (!tabNotClicked) {
19810      window.location.hash = currTabName;
19811
19812      setTimeout(function () {
19813        $('.js-navtab-wrapper').removeClass('sticky');
19814        if ($('.js-navtab-wrapper').length) {
19815          $('html,body').scrollTop($('.js-navtab-wrapper').offset().top - 120);
19816        }
19817      }, 500);
19818    }
19819    _showNavTabView(currTabName);
19820  },
19821      _goToTab = function _goToTab(tabName, tabNotClicked) {
19822    var tab = $('[data-tab-name=' + tabName + ']');
19823    if (tab.length) {
19824      // snro.eLabDociFrame.init();
19825      _appendCategoryIdToUrl(tabName, tabNotClicked);
19826    } else {
19827      var $firstVisibleTabName = $('.js-navtab-item:visible:first').data('tab-name');
19828      $('[data-tab-name=' + $firstVisibleTabName + ']').trigger('click');
19829      _appendCategoryIdToUrl($firstVisibleTabName, tabNotClicked);
19830    }
19831  },
19832      loadCategoryContentAnimation = function loadCategoryContentAnimation(selector) {
19833    selector.each(function (index, element) {
19834      $(element).find('.js-navtab-view').each(function (index, element) {
19835        var transitionDelay = index * 0.1 + 's';
19836        if (window.requestAnimationFrame) {
19837          $(element).css('animation-delay', transitionDelay).css('-webkit-animation-delay', transitionDelay).addClass('animated fadeInRight');
19838        }
19839      });
19840    });
19841  },
19842      _bindEvents = function _bindEvents() {
19843    $('.js-navtab-wrapper .js-navtab-item').unbind('click').click(function (e) {
19844      e.stopPropagation();
19845      e.preventDefault();
19846      if (!$(this).hasClass('selected') || !$(this).hasClass('x-disable-click')) {
19847        if ($('.js-pdp-nav-tabs').length && snro.commonUtils.isMobile()) {
19848          $(this).scrollintoview();
19849        }
19850        if ($('.c-tabs-container').length) {
19851          _appendCategoryIdToUrl($(e.currentTarget).data('tab-name'), false);
19852        }
19853      }
19854      $('.js-navtab-wrapper').removeClass('sticky');
19855      if ($('.js-navtab-wrapper').length) {
19856        $('html,body').scrollTop($('.js-navtab-wrapper').offset().top - 120);
19857      }
19858      // update iframe width on tab select;
19859      if ($(this).hasClass('selected')) {
19860        var tabName = $(e.currentTarget).data('tab-name');
19861        var aspectRatio = 0.5625;
19862        $('#' + tabName).find('.js-iframe').each(function () {
19863          var iframeWidth = $(this).width();
19864          $(this).children('.iframe-video').width(iframeWidth).height(iframeWidth * aspectRatio);
19865        });
19866      }
19867    });
19868  };
19869
19870  snro.navigationTabs = {
19871    init: function init() {
19872      if (snro.commonUtils.getCookie('wcmmode') !== 'edit') {
19873        $('.js-navtab-view').hide();
19874      }
19875      _bindEvents();
19876      loadCategoryContentAnimation($('.js-navtab-view-wrapper'));
19877      if ($('[data-module="navigationTabs"]').length) {
19878        var hash = window.location.hash;
19879        if (hash) {
19880          var tabName = hash.split('#');
19881          tabName = tabName[1];
19882          if (snro.commonUtils.getCookie('wcmmode') !== 'edit') {
19883            _goToTab(tabName, false);
19884          }
19885        } else {
19886          var $firstVisibleTabName = $('.js-navtab-item:visible:first').data('tab-name');
19887          if (snro.commonUtils.getCookie('wcmmode') !== 'edit') {
19888            _goToTab($firstVisibleTabName, true);
19889          }
19890        }
19891      }
19892    }
19893  };
19894})(window, jQuery, window.snro);
19895
19896/*
19897 * c_sliderLightBox.js
19898 * [ This javascript code is used to display slider component with the option to toggle the lightbox feature. ]
19899 *
19900 * @project:    SN-RO
19901 * @date:       2019-05-03
19902 * @author:     Yaman Agrawal
19903 * @licensor:   Publicis.Sapient
19904 * @namespaces: snro
19905 */
19906
19907//this will cause the browser to check for errors more aggressively
19908'use strict';
19909
19910/**
19911 * @namespace sliderLightBoxComp
19912 * @memberof roche
19913 * @property {null} property - description of property
19914 */
19915
19916(function (window, $, snro) {
19917
19918  var _cache = {};
19919  snro = window.snro = snro || {};
19920  snro.sliderLightBoxComp = {
19921    moduleName: 'sliderLightBoxComp',
19922    currentSlideItem: '',
19923
19924    // assignment of dom selectors to variables
19925    updateCache: function updateCache() {
19926      _cache.SLBcarousel = $('.js-slider-carousel');
19927      _cache.SLBcarouselContainer = $('.js-slider-carousel .js-sliderLightBox-content');
19928      _cache.image = $('.js-image-carousel-lightbox');
19929      _cache.modal = $('.js-lightBox-Modal');
19930      _cache.carouselLightBox = $('.js-slider-carousel-lightbox');
19931      _cache.close = '.c-close';
19932    },
19933
19934
19935    // open Model popup
19936    openModalPopUp: function openModalPopUp() {
19937      if (_cache.SLBcarousel.data('lightbox')) {
19938        _cache.image.on('click', function () {
19939          if (!snro.commonUtils.isMobileMode()) {
19940            $(this).closest('.sliderLightBox').find('.js-lightBox-Modal').show();
19941            var _slickIndex = $(this).closest('.js-event-item').data('slick-index');
19942            snro.sliderLightBoxComp.initializeCarouselOnLightBox(_slickIndex);
19943            snro.dynamicMedia.processDynamicImages();
19944          }
19945        });
19946        _cache.modal.on('click', _cache.close, function () {
19947          _cache.modal.hide();
19948          var _currentSlick = $(this).next().find('.js-sliderLightBox-content-modal');
19949          _currentSlick.slick('unslick');
19950        });
19951      }
19952    },
19953
19954
19955    // Set height of slick List
19956    setSlickHeight: function setSlickHeight() {
19957      _cache.SLBcarouselContainer.each(function () {
19958        $(this).on('setPosition', function (event, slick) {
19959          var getActiveHeight = slick.$slider.find('.slick-slide.slick-current.slick-active').height();
19960          slick.$list.height(getActiveHeight);
19961        });
19962      });
19963    },
19964
19965
19966    /**
19967     * Initialize carousal
19968     */
19969    initializeSLBCarousel: function initializeSLBCarousel() {
19970      snro.dynamicMedia.processDynamicImages();
19971      snro.commonUtils.lazyloadImages();
19972      _cache.SLBcarouselContainer.each(function (k, v) {
19973        var carouselContainer = $(v),
19974            carousalAutoplay = carouselContainer.data('autoplay'),
19975            carousalAutoplayTime = carouselContainer.data('autoplayTime'),
19976            speed = 1000,
19977            noOfSlides = carouselContainer.find('.js-event-item').not('.slick-cloned').length;
19978
19979        carouselContainer.not('.slick-initialized').slick({
19980          slidesToShow: 1,
19981          adaptiveHeight: true,
19982          dots: noOfSlides > 1 ? true : false,
19983          autoplay: carousalAutoplay,
19984          autoplaySpeed: carousalAutoplayTime,
19985          speed: speed,
19986          nextArrow: '<button type="button" class="slick-next"><i class=\'icon-next\'><span class=\'sr-only\'>Next</span></button>',
19987          prevArrow: '<button type="button" class="slick-prev"><i class=\'icon-back\'><span class=\'sr-only\'>Prev</span></button>',
19988          arrows: false,
19989          responsive: [{ breakpoint: 1440 }, { breakpoint: 1024 }, { breakpoint: 768 }, { breakpoint: 320 }]
19990        });
19991        snro.sliderLightBoxComp.setSlickHeight();
19992      });
19993
19994      //autoplay stops on clicking a dot because of focus, so blur it after click
19995      _cache.SLBcarousel.on('beforeChange', function () {
19996        var slickDotsBtn = _cache.SLBcarousel.find('.slick-dots li button');
19997        $('.c-video').find('.jp-jplayer').jPlayer('pauseOthers');
19998        $('.vol-ctrl').trigger('click');
19999        $('.vol-ctrl').addClass('mute');
20000        $('.vid-play').removeClass('pause').addClass('play');
20001        slickDotsBtn.focus(function () {
20002          this.blur();
20003        });
20004      });
20005    },
20006
20007
20008    /**
20009     * Initialize carousal on popupmodel
20010     */
20011    initializeCarouselOnLightBox: function initializeCarouselOnLightBox(slickIndex) {
20012      snro.dynamicMedia.processDynamicImages();
20013      snro.commonUtils.lazyloadImages();
20014      _cache.carouselLightBox.each(function (k, v) {
20015        var carouselContainer = $($(v).find('.js-sliderLightBox-content-modal')[0]),
20016            noOfSlides = carouselContainer.find('.js-lightbox-slides').not('.slick-cloned').length;
20017        carouselContainer.not('.slick-initialized').slick({
20018          slidesToShow: 1,
20019          adaptiveHeight: false,
20020          dots: noOfSlides > 1 ? true : false,
20021          autoplay: false,
20022          autoplaySpeed: 1000,
20023          speed: 1000,
20024          nextArrow: '<button type="button" class="slick-next next"><i class=\'icon-next\'><span class=\'sr-only\'>Next</span></button>',
20025          prevArrow: '<button type="button" class="slick-prev prev"><i class=\'icon-back\'><span class=\'sr-only\'>Prev</span></button>',
20026          arrows: true,
20027          initialSlide: slickIndex
20028        });
20029        carouselContainer.slick('setPosition');
20030      });
20031    },
20032
20033
20034    // bind dom events
20035    bindEvents: function bindEvents() {
20036      var _self = this;
20037
20038      //initialization carousal slider
20039      _self.initializeSLBCarousel();
20040
20041      //initialization carousal popupmodel
20042      _self.openModalPopUp();
20043
20044      //resize and responsive changes
20045      $(window).resize(function () {
20046        if (snro.commonUtils.isMobileMode() && _cache.modal.is(':visible')) {
20047          $(_cache.close).trigger('click');
20048        }
20049        _self.openModalPopUp();
20050        snro.dynamicMedia.processDynamicImages();
20051        _self.setSlickHeight();
20052      });
20053
20054      //on load to call sliderlightbox
20055      $(window).load(function () {
20056        //snro.dynamicMedia.processDynamicImages();
20057        _self.setSlickHeight();
20058        //_cache.carouselLightBox.each(function(){$(this).slickGoTo(parseInt(0));})
20059      });
20060    },
20061
20062
20063    // Module initialization
20064    init: function init() {
20065      this.updateCache();
20066      this.bindEvents();
20067    }
20068  };
20069})(window, window.jQuery, window.snro);
20070
20071//this will cause the browser to check for errors more aggressively
20072'use strict';
20073
20074/**
20075 * @namespace listingwrapperCmp
20076 * @memberof roche
20077 */
20078
20079var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
20080
20081(function (window, $, snro) {
20082
20083	var _cache = {};
20084	var Paginator = function Paginator(element, options) {
20085		if (snro.commonUtils.isMobileMode()) {
20086			limit = _cache.paginationObject.visiblePaginationListLimitMobile;
20087		} else {
20088			limit = _cache.paginationObject.visiblePaginationListLimit;
20089		}
20090		this.el = $(element);
20091		this.options = $.extend({}, $.fn.paginathing.defaults, options);
20092		this.startPage = 1;
20093		this.limit = limit;
20094		this.currentPage = 1;
20095		this.totalItems = this.el.find(_cache.tiles).length;
20096		this.perPage = this.el.find(_cache.perPage).val();
20097		this.totalPages = Math.max(Math.ceil(this.totalItems / this.perPage), this.options.limitPagination);
20098		this.container = this.el.find(_cache.pagingParents);
20099		this.ul = this.el.find('.' + this.options.ulClass);
20100		this.show(this.startPage);
20101		return this;
20102	};
20103
20104	Paginator.prototype = {
20105
20106		pagination: function pagination(type, page) {
20107			var _self = this;
20108			var li = $('<li></li>');
20109			var a = $('<a></a>').attr('href', 'javascript:void(0)');
20110			var cssClass = type === 'number' ? _self.options.liClass : type;
20111			var text = type === 'number' ? page : _self.paginationText(type);
20112
20113			li.addClass(cssClass);
20114			if (page > _self.limit) {
20115				li.addClass(_cache.hideClass);
20116			}
20117			li.attr('data-pagination-type', type);
20118			li.attr('data-pagination-index', page);
20119			li.append(a.html(text));
20120			return li;
20121		},
20122
20123		paginationText: function paginationText(type) {
20124			return this.options[type + 'Text'];
20125		},
20126
20127		buildPagination: function buildPagination() {
20128			var _self = this;
20129			var pagination = [];
20130			var prev = _self.currentPage - 1 < _self.startPage ? _self.startPage : _self.currentPage - 1;
20131			var next = _self.currentPage + 1 > _self.totalPages ? _self.totalPages : _self.currentPage + 1;
20132
20133			var start = void 0,
20134			    end = void 0;
20135
20136			start = _self.startPage;
20137			end = _self.totalPages;
20138
20139			_self.container.find(_cache.pagingLi).addClass('active');
20140			//options.limitPagination
20141			_self.container.find(_cache.prevDots).addClass('hide-dots');
20142
20143			if (_self.totalPages < _self.limit) {
20144				_self.container.find(_cache.nextDots).addClass('hide-dots').hide();
20145			} else {
20146				_self.container.find(_cache.nextDots).removeClass('hide-dots').show();
20147			}
20148
20149			// Pagination
20150			for (var i = start; i <= end; i++) {
20151				pagination.push(_self.pagination('number', i));
20152			}
20153
20154			// "Next" button
20155			if (_self.options.prevNext) {
20156				//pagination.push(_self.pagination('next', next));
20157				_self.container.find('.js-tilepaging-next').removeClass('disabled');
20158			}
20159			if (_self.totalPages > 1) {
20160				_self.container.addClass('showPage').show();
20161			} else {
20162				_self.container.removeClass('showPage').hide();
20163			}
20164
20165			return pagination;
20166		},
20167
20168		render: function render(page) {
20169			var _self = this;
20170			var options = _self.options;
20171			if (page == _self.startPage) {
20172				var pagination = _self.buildPagination();
20173				_self.ul.html(pagination);
20174				_self.ul.find("li[data-pagination-index=1]").addClass(_self.options.activeClass);
20175			}
20176			// Manage active DOM
20177			var startAt = page === 1 ? 0 : (page - 1) * _self.perPage;
20178			var endAt = page * _self.perPage;
20179
20180			_self.el.find(_cache.tiles).hide();
20181			_self.el.find(_cache.tiles).slice(startAt, endAt).show();
20182
20183			var _activeItem = _self.container.find(_cache.activeLi).data('paginationIndex');
20184			if (_activeItem === 1) {
20185				_self.container.find(_cache.previousPagination).addClass('disabled');
20186			} else {
20187				_self.container.find(_cache.previousPagination).removeClass('disabled');
20188			}
20189			if (_activeItem === _self.totalPages) {
20190				_self.container.find(_cache.nextPagination).addClass('disabled');
20191			} else {
20192				_self.container.find(_cache.nextPagination).removeClass('disabled');
20193			}
20194		},
20195
20196		handle: function handle() {
20197			var _self = this;
20198			_self.ul.find('li').unbind('click').bind('click', function (e) {
20199				var _li = $(this);
20200				e.preventDefault();
20201				$(this).parent('ul').find(_cache.pagingLi).removeClass('active');
20202				$(this).removeClass(_cache.hideClass).addClass('active');
20203				$('html, body').animate({
20204					scrollTop: $(this).parents('.js-tile-section').offset().top - 60
20205				}, 'fast');
20206				var page = _li.attr('data-pagination-index');
20207				_self.currentPage = page;
20208				_self.show(page);
20209			});
20210		},
20211
20212		show: function show(page) {
20213			var _self = this;
20214			_self.render(page);
20215			_self.handle();
20216		}
20217	};
20218
20219	$.fn.paginathing = function (options) {
20220		var _self = this;
20221		var settings = (typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' ? options : {};
20222		return _self.each(function () {
20223			var paginate = new Paginator(this, options);
20224			return paginate;
20225		});
20226	};
20227
20228	$.fn.paginathing.defaults = {
20229		singleElementName: '',
20230		//perPage: 4,
20231		limitPagination: false,
20232		prevNext: true,
20233		firstLast: true,
20234		prevText: '&laquo;',
20235		nextText: '&raquo;',
20236		firstText: 'First',
20237		lastText: 'Last',
20238		containerClass: '.pagination-container',
20239		ulClass: 'js-tilepaging-list',
20240		liClass: 'js-tilepaging-list-li',
20241		activeClass: 'active',
20242		disabledClass: 'disabled',
20243		insertAfter: null
20244
20245	};
20246
20247	snro = window.snro = snro || {};
20248	snro.tileWrapperCmp = {
20249		moduleName: 'tileWrapperCmp',
20250		updateCache: function updateCache() {
20251			_cache.tileWrapper = $('.js-tile-section');
20252			_cache.tiles = '.js-tilelist-container .js-tilelist-box';
20253			_cache.totalItems = '.js-tile-config input#totalItems';
20254			_cache.perPage = '.js-tile-config input#perPage';
20255			_cache.tilesCount = $('.js-tilelist-container .js-tilelist-box').length;
20256			_cache.nextPagination = '.js-tilepaging-next';
20257			_cache.previousPagination = '.js-tilepaging-prev';
20258			_cache.pagingParents = '.js-tile-pagination';
20259			_cache.pagingLi = '.js-tilepaging-list-li';
20260			_cache.hideClass = 'c-hide-pagination';
20261			_cache.notHideContainer = '.js-tilepaging-list-li:not(.c-hide-pagination)';
20262			_cache.activeLi = '.js-tilepaging-list-li.active';
20263			_cache.prevDots = '.js-tilepaging-prev-dots';
20264			_cache.nextDots = '.js-tilepaging-next-dots';
20265			_cache.paginationObject = {
20266				'visiblePaginationListLimit': 14,
20267				'visiblePaginationListLimitMobile': 6
20268			};
20269		},
20270
20271
20272		// bind dom events
20273		bindEvents: function bindEvents() {
20274			var _limit = void 0;
20275			if (snro.commonUtils.isMobileMode()) {
20276				_limit = _cache.paginationObject.visiblePaginationListLimitMobile;
20277			} else {
20278				_limit = _cache.paginationObject.visiblePaginationListLimit;
20279			}
20280
20281			_cache.tileWrapper.paginathing();
20282			$(_cache.nextPagination).on('click', function (event) {
20283				var thisContainer = $(this).parents(_cache.pagingParents);
20284				var currentActiveItemNext = thisContainer.find(_cache.activeLi).next();
20285				var currentPaginationIndex = thisContainer.find(_cache.activeLi).data('pagination-index');
20286				$(currentActiveItemNext).trigger('click', {});
20287				var $visiblePaginationList = thisContainer.find(_cache.notHideContainer);
20288				var $visiblePaginationLength = $visiblePaginationList.length;
20289				event.preventDefault();
20290				if (currentPaginationIndex >= _limit) {
20291					if ($visiblePaginationLength > _limit) {
20292						$visiblePaginationList.first().addClass(_cache.hideClass);
20293					}
20294					if (currentPaginationIndex + 1 === thisContainer.find(_cache.pagingLi).length) {
20295						$('.js-tilepaging-next-dots').addClass('hide-dots');
20296					}
20297				}
20298			});
20299			$(_cache.previousPagination).on('click', function (event) {
20300				var thisContainer = $(this).parents(_cache.pagingParents);
20301				var currentActiveItemPrev = thisContainer.find(_cache.activeLi).prev();
20302				var currentPaginationIndex = thisContainer.find(_cache.activeLi).data('pagination-index');
20303				var $hiddenPaginationList = thisContainer.find(_cache.pagingLi + '.' + _cache.hideClass);
20304				var $hiddenPaginationLength = $hiddenPaginationList.length;
20305
20306				$(currentActiveItemPrev).trigger('click', {}); // set true if you do not want page to move to top
20307				var $visiblePaginationList = thisContainer.find(_cache.notHideContainer);
20308				var $visiblePaginationLength = $visiblePaginationList.length;
20309				event.preventDefault();
20310				if ($hiddenPaginationList.length !== 0) {
20311					/*if ($hiddenPaginationLength) {
20312     	$hiddenPaginationList.last().removeClass(_cache.hideClass);
20313     }*/
20314					if (currentPaginationIndex - 1 === 1) {
20315						thisContainer.find(currentActiveItemPrev).addClass('disabled');
20316					}
20317					if ($visiblePaginationLength > _limit) {
20318						$visiblePaginationList.last().addClass(_cache.hideClass);
20319						thisContainer.find('.js-tilepaging-next-dots').removeClass('hide-dots');
20320					}
20321				}
20322			});
20323		},
20324
20325		//Module initialization
20326		init: function init() {
20327			this.updateCache();
20328			this.bindEvents();
20329		}
20330	};
20331	//intializing the tilewrapper component
20332	jQuery(snro.tileWrapperCmp.init());
20333})(window, window.jQuery, window.snro);
20334
20335/*!
20336 * faqWithParsys.js
20337
20338 * This file contians  faq functions with added details (images and tables).
20339 *
20340 * @project   SapientNitro Roche Diagonostics
20341 * @date      2019-05-24
20342 * @author    Rishabh
20343 * @dependencies jQuery
20344 */
20345
20346//this will cause the browser to check for errors more aggressively
20347'use strict';
20348
20349/**
20350 * @namespace Main
20351 * @memberof snro
20352 * @property {null} property - description of property
20353 */
20354
20355(function (window, $, snro) {
20356  snro = window.snro = snro || {};
20357
20358  /**
20359   * This faq functions for add ellipisis.
20360   * Accepts any valid selector or jQuery object.
20361   * @param {selector, HTMLElement, or jQuery object} table
20362   */
20363
20364  var _cache = {
20365    faqInput: $('.c-faqWithParsys .js-faq-row').find('input'),
20366    faq: $('.c-faqWithParsys')
20367  },
20368      _updateFaqId = function _updateFaqId() {
20369    $('.c-faqWithParsys .js-faq-row').each(function (index) {
20370      $(this).find('.js-faq-col').each(function (colIndex) {
20371        var newId = 'faqWithParsys-' + index + '-tab-' + colIndex;
20372        $(this).find('input').attr('id', newId);
20373        $(this).find('label').attr('for', newId);
20374        $(this).attr('tabindex', colIndex + 1);
20375      });
20376    });
20377  };
20378
20379  snro.faqWithParsys = {
20380    moduleName: 'faqWithParsys',
20381    bindEvents: function bindEvents() {
20382      if (snro.commonUtils.getCookie('wcmmode') === 'edit') {
20383        $.each(_cache.faq.find('.tab-content'), function (index, el) {
20384          $(el).show();
20385        });
20386      }
20387
20388      _cache.faqInput.bind('click', function () {
20389        _cache.faqInput.not(this).prop('checked', false);
20390        var currentElement = $(this).parent().find('.tab-content');
20391        $('.c-faqWithParsys .tab-content').not(currentElement).slideUp();
20392        currentElement.slideToggle();
20393      });
20394
20395      //-=-=--=-==-=-=-=-=-=-=-=accessibility-=--=-=-=-=-=-=-=-=
20396      _cache.faq.find('.js-faq-col').keypress(function (event) {
20397        event.stopPropagation();
20398        var keycode = event.keyCode ? event.keyCode : event.which;
20399        if (keycode === 13) {
20400          $(event.currentTarget).find('input').trigger('click');
20401        }
20402      });
20403      //-=-=--=-==-=-=-=-=-=-=-=accessibility-=--=-=-=-=-=-=-=-=
20404
20405      if (snro.commonUtils.isMobileOrTablet()) {
20406        $(window).on('orientationchange', function () {
20407          $(_cache.faqInput).each(function () {
20408            var currentElement = $(this).parent().find('.tab-content');
20409            if ($(this).is(':checked')) {
20410              var $that = this;
20411              setTimeout(function () {
20412                currentElement.css('height', $($that).parent().find('.c-faq__description')[0].clientHeight);
20413              }, 100);
20414            }
20415          });
20416        });
20417      }
20418    },
20419    init: function init() {
20420      _updateFaqId();
20421      this.bindEvents();
20422    }
20423  };
20424})(window, window.jQuery, window.snro);

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.