
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={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,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
/*!
  * Bootstrap v4.6.1 (https://getbootstrap.com/)
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},a.apply(this,arguments)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var l="transitionend";var u={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i.default(t).css("transition-duration"),n=i.default(t).css("transition-delay"),o=parseFloat(e),r=parseFloat(n);return o||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i.default(t).trigger(l)},supportsTransitionEnd:function(){return Boolean(l)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],a=r&&u.isElement(r)?"element":null===(s=r)||"undefined"==typeof s?""+s:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+o+'".')}var s},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof i.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=i.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};u.jQueryDetection(),i.default.fn.emulateTransitionEnd=function(t){var e=this,n=!1;return i.default(this).one(u.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||u.triggerTransitionEnd(e)}),t),this},i.default.event.special[u.TRANSITION_END]={bindType:l,delegateType:l,handle:function(t){if(i.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var f="bs.alert",d=i.default.fn.alert,c=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){i.default.removeData(this._element,f),this._element=null},e._getRootElement=function(t){var e=u.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=i.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=i.default.Event("close.bs.alert");return i.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(i.default(t).removeClass("show"),i.default(t).hasClass("fade")){var n=u.getTransitionDurationFromElement(t);i.default(t).one(u.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){i.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(f);o||(o=new t(this),n.data(f,o)),"close"===e&&o[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',c._handleDismiss(new c)),i.default.fn.alert=c._jQueryInterface,i.default.fn.alert.Constructor=c,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=d,c._jQueryInterface};var h="bs.button",p=i.default.fn.button,m="active",g='[data-toggle^="button"]',_='input:not([type="hidden"])',v=".btn",b=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=i.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=this._element.querySelector(_);if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains(m))t=!1;else{var r=n.querySelector(".active");r&&i.default(r).removeClass(m)}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains(m)),this.shouldAvoidTriggerChange||i.default(o).trigger("change")),o.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(m)),t&&i.default(this._element).toggleClass(m))},e.dispose=function(){i.default.removeData(this._element,h),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this),r=o.data(h);r||(r=new t(this),o.data(h,r)),r.shouldAvoidTriggerChange=n,"toggle"===e&&r[e]()}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.button.data-api",g,(function(t){var e=t.target,n=e;if(i.default(e).hasClass("btn")||(e=i.default(e).closest(v)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var o=e.querySelector(_);if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||b._jQueryInterface.call(i.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",g,(function(t){var e=i.default(t.target).closest(v)[0];i.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),i.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector(_);o.checked||o.hasAttribute("checked")?i.classList.add(m):i.classList.remove(m)}for(var r=0,a=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;r<a;r++){var s=t[r];"true"===s.getAttribute("aria-pressed")?s.classList.add(m):s.classList.remove(m)}})),i.default.fn.button=b._jQueryInterface,i.default.fn.button.Constructor=b,i.default.fn.button.noConflict=function(){return i.default.fn.button=p,b._jQueryInterface};var y="carousel",E="bs.carousel",w=i.default.fn[y],T="active",C="next",S="prev",N="slid.bs.carousel",D=".active.carousel-item",A={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},k={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},I={TOUCH:"touch",PEN:"pen"},O=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(C)},e.nextWhenVisible=function(){var t=i.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(S)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(u.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(D);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)i.default(this._element).one(N,(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var o=t>n?C:S;this._slide(o,this._items[t])}},e.dispose=function(){i.default(this._element).off(".bs.carousel"),i.default.removeData(this._element,E),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=a({},A,t),u.typeCheckConfig(y,t,k),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&i.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&i.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&I[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&I[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};i.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(i.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(i.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),i.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===C,i=t===S,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var a=(o+(t===S?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(D)),r=i.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:o,to:n});return i.default(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));i.default(e).removeClass(T);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&i.default(n).addClass(T)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(D);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,o,r,a=this,s=this._element.querySelector(D),l=this._getItemIndex(s),f=e||s&&this._getItemByDirection(t,s),d=this._getItemIndex(f),c=Boolean(this._interval);if(t===C?(n="carousel-item-left",o="carousel-item-next",r="left"):(n="carousel-item-right",o="carousel-item-prev",r="right"),f&&i.default(f).hasClass(T))this._isSliding=!1;else if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&s&&f){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(f),this._activeElement=f;var h=i.default.Event(N,{relatedTarget:f,direction:r,from:l,to:d});if(i.default(this._element).hasClass("slide")){i.default(f).addClass(o),u.reflow(f),i.default(s).addClass(n),i.default(f).addClass(n);var p=u.getTransitionDurationFromElement(s);i.default(s).one(u.TRANSITION_END,(function(){i.default(f).removeClass(n+" "+o).addClass(T),i.default(s).removeClass("active "+o+" "+n),a._isSliding=!1,setTimeout((function(){return i.default(a._element).trigger(h)}),0)})).emulateTransitionEnd(p)}else i.default(s).removeClass(T),i.default(f).addClass(T),this._isSliding=!1,i.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(E),o=a({},A,i.default(this).data());"object"==typeof e&&(o=a({},o,e));var r="string"==typeof e?e:o.slide;if(n||(n=new t(this,o),i.default(this).data(E,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if("undefined"==typeof n[r])throw new TypeError('No method named "'+r+'"');n[r]()}else o.interval&&o.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=u.getSelectorFromElement(this);if(n){var o=i.default(n)[0];if(o&&i.default(o).hasClass("carousel")){var r=a({},i.default(o).data(),i.default(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(i.default(o),r),s&&i.default(o).data(E).to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return A}}]),t}();i.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",O._dataApiClickHandler),i.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var o=i.default(t[e]);O._jQueryInterface.call(o,o.data())}})),i.default.fn[y]=O._jQueryInterface,i.default.fn[y].Constructor=O,i.default.fn[y].noConflict=function(){return i.default.fn[y]=w,O._jQueryInterface};var x="collapse",j="bs.collapse",L=i.default.fn[x],P="show",F="collapse",R="collapsing",H="collapsed",M="width",q='[data-toggle="collapse"]',B={toggle:!0,parent:""},Q={toggle:"boolean",parent:"(string|element)"},W=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(q)),i=0,o=n.length;i<o;i++){var r=n[i],a=u.getSelectorFromElement(r),s=[].slice.call(document.querySelectorAll(a)).filter((function(e){return e===t}));null!==a&&s.length>0&&(this._selector=a,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){i.default(this._element).hasClass(P)?this.hide():this.show()},e.show=function(){var e,n,o=this;if(!(this._isTransitioning||i.default(this._element).hasClass(P)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains(F)}))).length&&(e=null),e&&(n=i.default(e).not(this._selector).data(j))&&n._isTransitioning))){var r=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(i.default(e).not(this._selector),"hide"),n||i.default(e).data(j,null));var a=this._getDimension();i.default(this._element).removeClass(F).addClass(R),this._element.style[a]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass(H).attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),l=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(){i.default(o._element).removeClass(R).addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),i.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(l),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&i.default(this._element).hasClass(P)){var e=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",u.reflow(this._element),i.default(this._element).addClass(R).removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var a=this._triggerArray[r],s=u.getSelectorFromElement(a);null!==s&&(i.default([].slice.call(document.querySelectorAll(s))).hasClass(P)||i.default(a).addClass(H).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[n]="";var l=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(){t.setTransitioning(!1),i.default(t._element).removeClass(R).addClass(F).trigger("hidden.bs.collapse")})).emulateTransitionEnd(l)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){i.default.removeData(this._element,j),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=a({},B,t)).toggle=Boolean(t.toggle),u.typeCheckConfig(x,t,Q),t},e._getDimension=function(){return i.default(this._element).hasClass(M)?M:"height"},e._getParent=function(){var e,n=this;u.isElement(this._config.parent)?(e=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(e.querySelectorAll(o));return i.default(r).each((function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])})),e},e._addAriaAndCollapsedClass=function(t,e){var n=i.default(t).hasClass(P);e.length&&i.default(e).toggleClass(H,!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=u.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(j),r=a({},B,n.data(),"object"==typeof e&&e?e:{});if(!o&&r.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new t(this,r),n.data(j,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return B}}]),t}();i.default(document).on("click.bs.collapse.data-api",q,(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=i.default(this),n=u.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(n));i.default(o).each((function(){var t=i.default(this),n=t.data(j)?"toggle":e.data();W._jQueryInterface.call(t,n)}))})),i.default.fn[x]=W._jQueryInterface,i.default.fn[x].Constructor=W,i.default.fn[x].noConflict=function(){return i.default.fn[x]=L,W._jQueryInterface};var U="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,V=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(U&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}(),Y=U&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),V))}};function z(t){return t&&"[object Function]"==={}.toString.call(t)}function K(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function X(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function G(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=K(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:G(X(t))}function $(t){return t&&t.referenceNode?t.referenceNode:t}var J=U&&!(!window.MSInputMethodContext||!document.documentMode),Z=U&&/MSIE 10/.test(navigator.userAgent);function tt(t){return 11===t?J:10===t?Z:J||Z}function et(t){if(!t)return document.documentElement;for(var e=tt(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===K(n,"position")?et(n):n:t?t.ownerDocument.documentElement:document.documentElement}function nt(t){return null!==t.parentNode?nt(t.parentNode):t}function it(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&et(a.firstElementChild)!==a?et(l):l;var u=nt(t);return u.host?it(u.host,e):it(t,nt(e).host)}function ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function rt(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=ot(e,"top"),o=ot(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function at(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function st(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],tt(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function lt(t){var e=t.body,n=t.documentElement,i=tt(10)&&getComputedStyle(n);return{height:st("Height",e,n,i),width:st("Width",e,n,i)}}var ut=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ft=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),dt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function ht(t){return ct({},t,{right:t.left+t.width,bottom:t.top+t.height})}function pt(t){var e={};try{if(tt(10)){e=t.getBoundingClientRect();var n=ot(t,"top"),i=ot(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?lt(t.ownerDocument):{},a=r.width||t.clientWidth||o.width,s=r.height||t.clientHeight||o.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var f=K(t);l-=at(f,"x"),u-=at(f,"y"),o.width-=l,o.height-=u}return ht(o)}function mt(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=tt(10),o="HTML"===e.nodeName,r=pt(t),a=pt(e),s=G(t),l=K(e),u=parseFloat(l.borderTopWidth),f=parseFloat(l.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=ht({top:r.top-a.top-u,left:r.left-a.left-f,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=u-c,d.bottom-=u-c,d.left-=f-h,d.right-=f-h,d.marginTop=c,d.marginLeft=h}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=rt(d,e)),d}function gt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=mt(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:ot(n),s=e?0:ot(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:r};return ht(l)}function _t(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===K(t,"position"))return!0;var n=X(t);return!!n&&_t(n)}function vt(t){if(!t||!t.parentElement||tt())return document.documentElement;for(var e=t.parentElement;e&&"none"===K(e,"transform");)e=e.parentElement;return e||document.documentElement}function bt(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=o?vt(t):it(t,$(e));if("viewport"===i)r=gt(a,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=G(X(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=mt(s,a,o);if("HTML"!==s.nodeName||_t(a))r=l;else{var u=lt(t.ownerDocument),f=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var c="number"==typeof(n=n||0);return r.left+=c?n:n.left||0,r.top+=c?n:n.top||0,r.right-=c?n:n.right||0,r.bottom-=c?n:n.bottom||0,r}function yt(t){return t.width*t.height}function Et(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=bt(n,i,r,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return ct({key:t},s[t],{area:yt(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),f=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return f+(d?"-"+d:"")}function wt(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?vt(e):it(e,$(n));return mt(n,o,i)}function Tt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function Ct(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function St(t,e,n){n=n.split("-")[0];var i=Tt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[a]=e[a]+e[l]/2-i[l]/2,o[s]=n===s?e[s]-i[u]:e[Ct(s)],o}function Nt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function Dt(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t.name===n}));var i=Nt(t,(function(t){return t.name===n}));return t.indexOf(i)}(t,0,n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&z(n)&&(e.offsets.popper=ht(e.offsets.popper),e.offsets.reference=ht(e.offsets.reference),e=n(e,t))})),e}function At(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=wt(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=Et(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=St(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=Dt(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function kt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function It(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function Ot(){return this.state.isDestroyed=!0,kt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[It("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function xt(t){var e=t.ownerDocument;return e?e.defaultView:window}function jt(t,e,n,i){var o="BODY"===t.nodeName,r=o?t.ownerDocument.defaultView:t;r.addEventListener(e,n,{passive:!0}),o||jt(G(r.parentNode),e,n,i),i.push(r)}function Lt(t,e,n,i){n.updateBound=i,xt(t).addEventListener("resize",n.updateBound,{passive:!0});var o=G(t);return jt(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function Pt(){this.state.eventsEnabled||(this.state=Lt(this.reference,this.options,this.state,this.scheduleUpdate))}function Ft(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,xt(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function Rt(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function Ht(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Rt(e[n])&&(i="px"),t.style[n]=e[n]+i}))}var Mt=U&&/Firefox/i.test(navigator.userAgent);function qt(t,e,n){var i=Nt(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}var Bt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Qt=Bt.slice(3);function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Qt.indexOf(t),i=Qt.slice(n+1).concat(Qt.slice(0,n));return e?i.reverse():i}var Ut={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",f={start:dt({},l,r[l]),end:dt({},l,r[l]+r[u]-a[u])};t.offsets.popper=ct({},a,f[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n,i=e.offset,o=t.placement,r=t.offsets,a=r.popper,s=r.reference,l=o.split("-")[0];return n=Rt(+i)?[+i,0]:function(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(Nt(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];return r?0===a.indexOf("%")?ht("%p"===a?n:i)[e]/100*r:"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r:t}(t,o,e,n)}))})),u.forEach((function(t,e){t.forEach((function(n,i){Rt(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}(i,a,s,l),"left"===l?(a.top+=n[0],a.left-=n[1]):"right"===l?(a.top+=n[0],a.left+=n[1]):"top"===l?(a.left+=n[0],a.top-=n[1]):"bottom"===l&&(a.left+=n[0],a.top+=n[1]),t.popper=a,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||et(t.instance.popper);t.instance.reference===n&&(n=et(n));var i=It("transform"),o=t.instance.popper.style,r=o.top,a=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=bt(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=a,o[i]=s,e.boundaries=l;var u=e.priority,f=t.offsets.popper,d={primary:function(t){var n=f[t];return f[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(f[t],l[t])),dt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=f[n];return f[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(f[n],l[t]-("right"===t?f.width:f.height))),dt({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";f=ct({},f,d[e](t))})),t.offsets.popper=f,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[u]),n[l]>r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!qt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",f=l?"Top":"Left",d=f.toLowerCase(),c=l?"left":"top",h=l?"bottom":"right",p=Tt(i)[u];s[h]-p<a[d]&&(t.offsets.popper[d]-=a[d]-(s[h]-p)),s[d]+p>a[h]&&(t.offsets.popper[d]+=s[d]+p-a[h]),t.offsets.popper=ht(t.offsets.popper);var m=s[d]+s[u]/2-p/2,g=K(t.instance.popper),_=parseFloat(g["margin"+f]),v=parseFloat(g["border"+f+"Width"]),b=m-t.offsets.popper[d]-_-v;return b=Math.max(Math.min(a[u]-p,b),0),t.arrowElement=i,t.offsets.arrow=(dt(n={},d,Math.round(b)),dt(n,c,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(kt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=bt(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=Ct(i),r=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case"flip":a=[i,o];break;case"clockwise":a=Wt(i);break;case"counterclockwise":a=Wt(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],o=Ct(i);var u=t.offsets.popper,f=t.offsets.reference,d=Math.floor,c="left"===i&&d(u.right)>d(f.left)||"right"===i&&d(u.left)<d(f.right)||"top"===i&&d(u.bottom)>d(f.top)||"bottom"===i&&d(u.top)<d(f.bottom),h=d(u.left)<d(n.left),p=d(u.right)>d(n.right),m=d(u.top)<d(n.top),g=d(u.bottom)>d(n.bottom),_="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,v=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(v&&"start"===r&&h||v&&"end"===r&&p||!v&&"start"===r&&m||!v&&"end"===r&&g),y=!!e.flipVariationsByContent&&(v&&"start"===r&&p||v&&"end"===r&&h||!v&&"start"===r&&g||!v&&"end"===r&&m),E=b||y;(c||_||E)&&(t.flipped=!0,(c||_)&&(i=a[l+1]),E&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=ct({},t.offsets.popper,St(t.instance.popper,t.offsets.reference,t.placement)),t=Dt(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=r[n]-(s?o[a?"width":"height"]:0),t.placement=Ct(e),t.offsets.popper=ht(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!qt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=Nt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=Nt(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,s,l=void 0!==r?r:e.gpuAcceleration,u=et(t.instance.popper),f=pt(u),d={position:o.position},c=function(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,a=Math.floor,s=function(t){return t},l=r(o.width),u=r(i.width),f=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),c=e?f||d||l%2==u%2?r:a:s,h=e?r:s;return{left:c(l%2==1&&u%2==1&&!d&&e?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:c(i.right)}}(t,window.devicePixelRatio<2||!Mt),h="bottom"===n?"top":"bottom",p="right"===i?"left":"right",m=It("transform");if(s="bottom"===h?"HTML"===u.nodeName?-u.clientHeight+c.bottom:-f.height+c.bottom:c.top,a="right"===p?"HTML"===u.nodeName?-u.clientWidth+c.right:-f.width+c.right:c.left,l&&m)d[m]="translate3d("+a+"px, "+s+"px, 0)",d[h]=0,d[p]=0,d.willChange="transform";else{var g="bottom"===h?-1:1,_="right"===p?-1:1;d[h]=s*g,d[p]=a*_,d.willChange=h+", "+p}var v={"x-placement":t.placement};return t.attributes=ct({},v,t.attributes),t.styles=ct({},d,t.styles),t.arrowStyles=ct({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return Ht(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&Ht(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,o){var r=wt(o,e,t,n.positionFixed),a=Et(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),Ht(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Vt=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=Y(this.update.bind(this)),this.options=ct({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(ct({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=ct({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return ct({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&z(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return ft(t,[{key:"update",value:function(){return At.call(this)}},{key:"destroy",value:function(){return Ot.call(this)}},{key:"enableEventListeners",value:function(){return Pt.call(this)}},{key:"disableEventListeners",value:function(){return Ft.call(this)}}]),t}();Vt.Utils=("undefined"!=typeof window?window:global).PopperUtils,Vt.placements=Bt,Vt.Defaults=Ut;var Yt=Vt,zt="dropdown",Kt="bs.dropdown",Xt=i.default.fn[zt],Gt=new RegExp("38|40|27"),$t="disabled",Jt="show",Zt="dropdown-menu-right",te="hide.bs.dropdown",ee="hidden.bs.dropdown",ne="click.bs.dropdown.data-api",ie="keydown.bs.dropdown.data-api",oe='[data-toggle="dropdown"]',re=".dropdown-menu",ae={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},se={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},le=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass($t)){var e=i.default(this._menu).hasClass(Jt);t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass($t)||i.default(this._menu).hasClass(Jt))){var n={relatedTarget:this._element},o=i.default.Event("show.bs.dropdown",n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof Yt)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var a=this._element;"parent"===this._config.reference?a=r:u.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass("position-static"),this._popper=new Yt(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(".navbar-nav").length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass(Jt),i.default(r).toggleClass(Jt).trigger(i.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass($t)&&i.default(this._menu).hasClass(Jt)){var e={relatedTarget:this._element},n=i.default.Event(te,e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass(Jt),i.default(o).toggleClass(Jt).trigger(i.default.Event(ee,e)))}},e.dispose=function(){i.default.removeData(this._element,Kt),i.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=a({},this.constructor.Default,i.default(this._element).data(),t),u.typeCheckConfig(zt,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(re))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=i.default(this._menu).hasClass(Zt)?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":i.default(this._menu).hasClass(Zt)&&(e="bottom-end"),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Kt);if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data(Kt,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(oe)),o=0,r=n.length;o<r;o++){var a=t._getParentFromElement(n[o]),s=i.default(n[o]).data(Kt),l={relatedTarget:n[o]};if(e&&"click"===e.type&&(l.clickEvent=e),s){var u=s._menu;if(i.default(a).hasClass(Jt)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&i.default.contains(a,e.target))){var f=i.default.Event(te,l);i.default(a).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),n[o].setAttribute("aria-expanded","false"),s._popper&&s._popper.destroy(),i.default(u).removeClass(Jt),i.default(a).removeClass(Jt).trigger(i.default.Event(ee,l)))}}}},t._getParentFromElement=function(t){var e,n=u.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||i.default(e.target).closest(re).length):!Gt.test(e.which))&&!this.disabled&&!i.default(this).hasClass($t)){var n=t._getParentFromElement(this),o=i.default(n).hasClass(Jt);if(o||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!o||27===e.which||32===e.which)return 27===e.which&&i.default(n.querySelector(oe)).trigger("focus"),void i.default(this).trigger("click");var r=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return i.default(t).is(":visible")}));if(0!==r.length){var a=r.indexOf(e.target);38===e.which&&a>0&&a--,40===e.which&&a<r.length-1&&a++,a<0&&(a=0),r[a].focus()}}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return ae}},{key:"DefaultType",get:function(){return se}}]),t}();i.default(document).on(ie,oe,le._dataApiKeydownHandler).on(ie,re,le._dataApiKeydownHandler).on(ne+" keyup.bs.dropdown.data-api",le._clearMenus).on(ne,oe,(function(t){t.preventDefault(),t.stopPropagation(),le._jQueryInterface.call(i.default(this),"toggle")})).on(ne,".dropdown form",(function(t){t.stopPropagation()})),i.default.fn[zt]=le._jQueryInterface,i.default.fn[zt].Constructor=le,i.default.fn[zt].noConflict=function(){return i.default.fn[zt]=Xt,le._jQueryInterface};var ue="bs.modal",fe=i.default.fn.modal,de="modal-open",ce="fade",he="show",pe="modal-static",me="hidden.bs.modal",ge="show.bs.modal",_e="focusin.bs.modal",ve="resize.bs.modal",be="click.dismiss.bs.modal",ye="keydown.dismiss.bs.modal",Ee="mousedown.dismiss.bs.modal",we=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Te={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ce={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Se=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){var n=i.default.Event(ge,{relatedTarget:t});i.default(this._element).trigger(n),n.isDefaultPrevented()||(this._isShown=!0,i.default(this._element).hasClass(ce)&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),i.default(this._element).on(be,'[data-dismiss="modal"]',(function(t){return e.hide(t)})),i.default(this._dialog).on(Ee,(function(){i.default(e._element).one("mouseup.dismiss.bs.modal",(function(t){i.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=i.default.Event("hide.bs.modal");if(i.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var o=i.default(this._element).hasClass(ce);if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),i.default(document).off(_e),i.default(this._element).removeClass(he),i.default(this._element).off(be),i.default(this._dialog).off(Ee),o){var r=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return i.default(t).off(".bs.modal")})),i.default(document).off(_e),i.default.removeData(this._element,ue),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=a({},Te,t),u.typeCheckConfig("modal",t,Ce),t},e._triggerBackdropTransition=function(){var t=this,e=i.default.Event("hidePrevented.bs.modal");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(pe);var o=u.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(u.TRANSITION_END),i.default(this._element).one(u.TRANSITION_END,(function(){t._element.classList.remove(pe),n||i.default(t._element).one(u.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass(ce),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),i.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,n&&u.reflow(this._element),i.default(this._element).addClass(he),this._config.focus&&this._enforceFocus();var r=i.default.Event("shown.bs.modal",{relatedTarget:t}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var s=u.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(u.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},e._enforceFocus=function(){var t=this;i.default(document).off(_e).on(_e,(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on(ye,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off(ye)},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on(ve,(function(e){return t.handleUpdate(e)})):i.default(window).off(ve)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){i.default(document.body).removeClass(de),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger(me)}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass(ce)?ce:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on(be,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&u.reflow(this._backdrop),i.default(this._backdrop).addClass(he),!t)return;if(!n)return void t();var o=u.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(u.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass(he);var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass(ce)){var a=u.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(u.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(we)),n=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(e,n){var o=n.style.paddingRight,r=i.default(n).css("padding-right");i.default(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),i.default(n).each((function(e,n){var o=n.style.marginRight,r=i.default(n).css("margin-right");i.default(n).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=i.default(document.body).css("padding-right");i.default(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}i.default(document.body).addClass(de)},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(we));i.default(t).each((function(t,e){var n=i.default(e).data("padding-right");i.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(t,e){var n=i.default(e).data("margin-right");"undefined"!=typeof n&&i.default(e).css("margin-right",n).removeData("margin-right")}));var n=i.default(document.body).data("padding-right");i.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this).data(ue),r=a({},Te,i.default(this).data(),"object"==typeof e&&e?e:{});if(o||(o=new t(this,r),i.default(this).data(ue,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](n)}else r.show&&o.show(n)}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Te}}]),t}();i.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e,n=this,o=u.getSelectorFromElement(this);o&&(e=document.querySelector(o));var r=i.default(e).data(ue)?"toggle":a({},i.default(e).data(),i.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=i.default(e).one(ge,(function(t){t.isDefaultPrevented()||s.one(me,(function(){i.default(n).is(":visible")&&n.focus()}))}));Se._jQueryInterface.call(i.default(e),r,this)})),i.default.fn.modal=Se._jQueryInterface,i.default.fn.modal.Constructor=Se,i.default.fn.modal.noConflict=function(){return i.default.fn.modal=fe,Se._jQueryInterface};var Ne=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],De=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ae=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function ke(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),a=function(t,n){var i=r[t],a=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var s=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[a]||[]);s.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===Ne.indexOf(n)||Boolean(De.test(t.nodeValue)||Ae.test(t.nodeValue));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(i[o].test(n))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},s=0,l=r.length;s<l;s++)a(s);return i.body.innerHTML}var Ie="tooltip",Oe="bs.tooltip",xe=i.default.fn.tooltip,je=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Le=["sanitize","whiteList","sanitizeFn"],Pe="fade",Fe="show",Re="show",He="out",Me="hover",qe="focus",Be={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Qe={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},We={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Ue={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Ve=function(){function t(t,e){if("undefined"==typeof Yt)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=u.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=u.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&i.default(r).addClass(Pe);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(s);this.addAttachmentClass(l);var f=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(f),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Yt(this.element,r,this._getPopperConfig(l)),i.default(r).addClass(Fe),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var d=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),e===He&&t._leave(null,t)};if(i.default(this.tip).hasClass(Pe)){var c=u.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(u.TRANSITION_END,d).emulateTransitionEnd(c)}else d()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==Re&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass(Fe),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass(Pe)){var a=u.getTransitionDurationFromElement(n);i.default(n).one(u.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=ke(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:u.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return Be[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===Me?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=e===Me?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?qe:Me]=!0),i.default(e.getTipElement()).hasClass(Fe)||e._hoverState===Re?e._hoverState=Re:(clearTimeout(e._timeout),e._hoverState=Re,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===Re&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?qe:Me]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===He&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Le.indexOf(t)&&delete e[t]})),"number"==typeof(t=a({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),u.typeCheckConfig(Ie,t,this.constructor.DefaultType),t.sanitize&&(t.template=ke(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(je);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass(Pe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Oe),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data(Oe,o)),"string"==typeof e)){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Qe}},{key:"NAME",get:function(){return Ie}},{key:"DATA_KEY",get:function(){return Oe}},{key:"Event",get:function(){return Ue}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return We}}]),t}();i.default.fn.tooltip=Ve._jQueryInterface,i.default.fn.tooltip.Constructor=Ve,i.default.fn.tooltip.noConflict=function(){return i.default.fn.tooltip=xe,Ve._jQueryInterface};var Ye="bs.popover",ze=i.default.fn.popover,Ke=new RegExp("(^|\\s)bs-popover\\S+","g"),Xe=a({},Ve.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ge=a({},Ve.DefaultType,{content:"(string|element|function)"}),$e={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Je=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},a.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Ke);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each((function(){var e=i.default(this).data(Ye),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),i.default(this).data(Ye,e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Xe}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return Ye}},{key:"Event",get:function(){return $e}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Ge}}]),o}(Ve);i.default.fn.popover=Je._jQueryInterface,i.default.fn.popover.Constructor=Je,i.default.fn.popover.noConflict=function(){return i.default.fn.popover=ze,Je._jQueryInterface};var Ze="scrollspy",tn="bs.scrollspy",en=i.default.fn[Ze],nn="active",on="position",rn=".nav, .list-group",an={offset:10,method:"auto",target:""},sn={offset:"number",method:"string",target:"(string|element)"},ln=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,i.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":on,n="auto"===this._config.method?e:this._config.method,o=n===on?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=u.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,tn),i.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=a({},an,"object"==typeof t&&t?t:{})).target&&u.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=u.getUID(Ze),i.default(t.target).attr("id",e)),t.target="#"+e}return u.typeCheckConfig(Ze,t,sn),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=i.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(nn),n.addClass(nn)):(n.addClass(nn),n.parents(rn).prev(".nav-link, .list-group-item").addClass(nn),n.parents(rn).prev(".nav-item").children(".nav-link").addClass(nn)),i.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(nn)})).forEach((function(t){return t.classList.remove(nn)}))},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(tn);if(n||(n=new t(this,"object"==typeof e&&e),i.default(this).data(tn,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return an}}]),t}();i.default(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=i.default(t[e]);ln._jQueryInterface.call(n,n.data())}})),i.default.fn[Ze]=ln._jQueryInterface,i.default.fn[Ze].Constructor=ln,i.default.fn[Ze].noConflict=function(){return i.default.fn[Ze]=en,ln._jQueryInterface};var un="bs.tab",fn=i.default.fn.tab,dn="active",cn="fade",hn="show",pn=".active",mn="> li > .active",gn=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&i.default(this._element).hasClass(dn)||i.default(this._element).hasClass("disabled"))){var e,n,o=i.default(this._element).closest(".nav, .list-group")[0],r=u.getSelectorFromElement(this._element);if(o){var a="UL"===o.nodeName||"OL"===o.nodeName?mn:pn;n=(n=i.default.makeArray(i.default(o).find(a)))[n.length-1]}var s=i.default.Event("hide.bs.tab",{relatedTarget:this._element}),l=i.default.Event("show.bs.tab",{relatedTarget:n});if(n&&i.default(n).trigger(s),i.default(this._element).trigger(l),!l.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var f=function(){var e=i.default.Event("hidden.bs.tab",{relatedTarget:t._element}),o=i.default.Event("shown.bs.tab",{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,f):f()}}},e.dispose=function(){i.default.removeData(this._element,un),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(pn):i.default(e).find(mn))[0],a=n&&r&&i.default(r).hasClass(cn),s=function(){return o._transitionComplete(t,r,n)};if(r&&a){var l=u.getTransitionDurationFromElement(r);i.default(r).removeClass(hn).one(u.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass(dn);var o=i.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&i.default(o).removeClass(dn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}i.default(t).addClass(dn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),u.reflow(t),t.classList.contains(cn)&&t.classList.add(hn);var r=t.parentNode;if(r&&"LI"===r.nodeName&&(r=r.parentNode),r&&i.default(r).hasClass("dropdown-menu")){var a=i.default(t).closest(".dropdown")[0];if(a){var s=[].slice.call(a.querySelectorAll(".dropdown-toggle"));i.default(s).addClass(dn)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(un);if(o||(o=new t(this),n.data(un,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),gn._jQueryInterface.call(i.default(this),"show")})),i.default.fn.tab=gn._jQueryInterface,i.default.fn.tab.Constructor=gn,i.default.fn.tab.noConflict=function(){return i.default.fn.tab=fn,gn._jQueryInterface};var _n="bs.toast",vn=i.default.fn.toast,bn="hide",yn="show",En="showing",wn="click.dismiss.bs.toast",Tn={animation:!0,autohide:!0,delay:500},Cn={animation:"boolean",autohide:"boolean",delay:"number"},Sn=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(En),t._element.classList.add(yn),i.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(bn),u.reflow(this._element),this._element.classList.add(En),this._config.animation){var o=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains(yn)){var t=i.default.Event("hide.bs.toast");i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(yn)&&this._element.classList.remove(yn),i.default(this._element).off(wn),i.default.removeData(this._element,_n),this._element=null,this._config=null},e._getConfig=function(t){return t=a({},Tn,i.default(this._element).data(),"object"==typeof t&&t?t:{}),u.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on(wn,'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(bn),i.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(yn),this._config.animation){var n=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(_n);if(o||(o=new t(this,"object"==typeof e&&e),n.data(_n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"DefaultType",get:function(){return Cn}},{key:"Default",get:function(){return Tn}}]),t}();i.default.fn.toast=Sn._jQueryInterface,i.default.fn.toast.Constructor=Sn,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=vn,Sn._jQueryInterface},t.Alert=c,t.Button=b,t.Carousel=O,t.Collapse=W,t.Dropdown=le,t.Modal=Se,t.Popover=Je,t.Scrollspy=ln,t.Tab=gn,t.Toast=Sn,t.Tooltip=Ve,t.Util=u,Object.defineProperty(t,"__esModule",{value:!0})}));!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).countUp={})}(this,(function(t){"use strict";var i=function(){return i=Object.assign||function(t){for(var i,n=1,s=arguments.length;n<s;n++)for(var e in i=arguments[n])Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e]);return t},i.apply(this,arguments)},n=function(){function t(t,n,s){var e=this;this.endVal=n,this.options=s,this.version="2.9.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(t){e.startTime||(e.startTime=t);var i=t-e.startTime;e.remaining=e.duration-i,e.useEasing?e.countDown?e.frameVal=e.startVal-e.easingFn(i,0,e.startVal-e.endVal,e.duration):e.frameVal=e.easingFn(i,e.startVal,e.endVal-e.startVal,e.duration):e.frameVal=e.startVal+(e.endVal-e.startVal)*(i/e.duration);var n=e.countDown?e.frameVal<e.endVal:e.frameVal>e.endVal;e.frameVal=n?e.endVal:e.frameVal,e.frameVal=Number(e.frameVal.toFixed(e.options.decimalPlaces)),e.printValue(e.frameVal),i<e.duration?e.rAF=requestAnimationFrame(e.count):null!==e.finalEndVal?e.update(e.finalEndVal):e.options.onCompleteCallback&&e.options.onCompleteCallback()},this.formatNumber=function(t){var i,n,s,a,o=t<0?"-":"";i=Math.abs(t).toFixed(e.options.decimalPlaces);var r=(i+="").split(".");if(n=r[0],s=r.length>1?e.options.decimal+r[1]:"",e.options.useGrouping){a="";for(var l=3,u=0,h=0,p=n.length;h<p;++h)e.options.useIndianSeparators&&4===h&&(l=2,u=1),0!==h&&u%l==0&&(a=e.options.separator+a),u++,a=n[p-h-1]+a;n=a}return e.options.numerals&&e.options.numerals.length&&(n=n.replace(/[0-9]/g,(function(t){return e.options.numerals[+t]})),s=s.replace(/[0-9]/g,(function(t){return e.options.numerals[+t]}))),o+e.options.prefix+n+s+e.options.suffix},this.easeOutExpo=function(t,i,n,s){return n*(1-Math.pow(2,-10*t/s))*1024/1023+i},this.options=i(i({},this.defaults),s),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.el="string"==typeof t?document.getElementById(t):t,n=null==n?this.parse(this.el.innerHTML):n,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined","undefined"!=typeof window&&this.options.enableScrollSpy&&(this.error?console.error(this.error,t):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push((function(){return e.handleScroll(e)})),window.onscroll=function(){window.onScrollFns.forEach((function(t){return t()}))},this.handleScroll(this)))}return t.prototype.handleScroll=function(t){if(t&&window&&!t.once){var i=window.innerHeight+window.scrollY,n=t.el.getBoundingClientRect(),s=n.top+window.pageYOffset,e=n.top+n.height+window.pageYOffset;e<i&&e>window.scrollY&&t.paused?(t.paused=!1,setTimeout((function(){return t.start()}),t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>e||s>i)&&!t.paused&&t.reset()}},t.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var n=this.countDown?1:-1;this.endVal=t+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},t.prototype.start=function(t){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},t.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},t.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},t.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},t.prototype.printValue=function(t){var i;if(this.el){var n=this.formattingFn(t);if(null===(i=this.options.plugin)||void 0===i?void 0:i.render)this.options.plugin.render(this.el,n);else if("INPUT"===this.el.tagName)this.el.value=n;else"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=n:this.el.innerHTML=n}},t.prototype.ensureNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error="[CountUp] invalid start or end value: ".concat(t),null)},t.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},t.prototype.parse=function(t){var i=function(t){return t.replace(/([.,'  ])/g,"\\$1")},n=i(this.options.separator),s=i(this.options.decimal),e=t.replace(new RegExp(n,"g"),"").replace(new RegExp(s,"g"),".");return parseFloat(e)},t}();t.CountUp=n}));var tns=function(){var t=window,Ai=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window,Ni=e.cancelAnimationFrame||e.mozCancelAnimationFrame||function(t){clearTimeout(t)};function Li(){for(var t,e,n,i=arguments[0]||{},a=1,r=arguments.length;a<r;a++)if(null!==(t=arguments[a]))for(e in t)i!==(n=t[e])&&void 0!==n&&(i[e]=n);return i}function Bi(t){return 0<=["true","false"].indexOf(t)?JSON.parse(t):t}function Si(t,e,n,i){if(i)try{t.setItem(e,n)}catch(t){}return n}function Hi(){var t=document,e=t.body;return e||((e=t.createElement("body")).fake=!0),e}var n=document.documentElement;function Oi(t){var e="";return t.fake&&(e=n.style.overflow,t.style.background="",t.style.overflow=n.style.overflow="hidden",n.appendChild(t)),e}function Di(t,e){t.fake&&(t.remove(),n.style.overflow=e,n.offsetHeight)}function ki(t,e,n,i){"insertRule"in t?t.insertRule(e+"{"+n+"}",i):t.addRule(e,n,i)}function Ri(t){return("insertRule"in t?t.cssRules:t.rules).length}function Ii(t,e,n){for(var i=0,a=t.length;i<a;i++)e.call(n,t[i],i)}var i="classList"in document.createElement("_"),Pi=i?function(t,e){return t.classList.contains(e)}:function(t,e){return 0<=t.className.indexOf(e)},zi=i?function(t,e){Pi(t,e)||t.classList.add(e)}:function(t,e){Pi(t,e)||(t.className+=" "+e)},Wi=i?function(t,e){Pi(t,e)&&t.classList.remove(e)}:function(t,e){Pi(t,e)&&(t.className=t.className.replace(e,""))};function qi(t,e){return t.hasAttribute(e)}function Fi(t,e){return t.getAttribute(e)}function r(t){return void 0!==t.item}function ji(t,e){if(t=r(t)||t instanceof Array?t:[t],"[object Object]"===Object.prototype.toString.call(e))for(var n=t.length;n--;)for(var i in e)t[n].setAttribute(i,e[i])}function Vi(t,e){t=r(t)||t instanceof Array?t:[t];for(var n=(e=e instanceof Array?e:[e]).length,i=t.length;i--;)for(var a=n;a--;)t[i].removeAttribute(e[a])}function Gi(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function Qi(t,e){"none"!==t.style.display&&(t.style.display="none")}function Xi(t,e){"none"===t.style.display&&(t.style.display="")}function Yi(t){return"none"!==window.getComputedStyle(t).display}function Ki(e){if("string"==typeof e){var n=[e],i=e.charAt(0).toUpperCase()+e.substr(1);["Webkit","Moz","ms","O"].forEach(function(t){"ms"===t&&"transform"!==e||n.push(t+i)}),e=n}for(var t=document.createElement("fakeelement"),a=(e.length,0);a<e.length;a++){var r=e[a];if(void 0!==t.style[r])return r}return!1}function Ji(t,e){var n=!1;return/^Webkit/.test(t)?n="webkit"+e+"End":/^O/.test(t)?n="o"+e+"End":t&&(n=e.toLowerCase()+"end"),n}var a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,o)}catch(t){}var u=!!a&&{passive:!0};function Ui(t,e,n){for(var i in e){var a=0<=["touchstart","touchmove"].indexOf(i)&&!n&&u;t.addEventListener(i,e[i],a)}}function _i(t,e){for(var n in e){var i=0<=["touchstart","touchmove"].indexOf(n)&&u;t.removeEventListener(n,e[n],i)}}function Zi(){return{topics:{},on:function(t,e){this.topics[t]=this.topics[t]||[],this.topics[t].push(e)},off:function(t,e){if(this.topics[t])for(var n=0;n<this.topics[t].length;n++)if(this.topics[t][n]===e){this.topics[t].splice(n,1);break}},emit:function(e,n){n.type=e,this.topics[e]&&this.topics[e].forEach(function(t){t(n,e)})}}}Object.keys||(Object.keys=function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var $i=function(H){H=Li({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0,nonce:!1},H||{});var O=document,m=window,a={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},e={},n=H.useLocalStorage;if(n){var t=navigator.userAgent,i=new Date;try{(e=m.localStorage)?(e.setItem(i,i),n=e.getItem(i)==i,e.removeItem(i)):n=!1,n||(e={})}catch(t){n=!1}n&&(e.tnsApp&&e.tnsApp!==t&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(t){e.removeItem(t)}),localStorage.tnsApp=t)}var y=e.tC?Bi(e.tC):Si(e,"tC",function(){var t=document,e=Hi(),n=Oi(e),i=t.createElement("div"),a=!1;e.appendChild(i);try{for(var r,o="(10px * 10)",u=["calc"+o,"-moz-calc"+o,"-webkit-calc"+o],l=0;l<3;l++)if(r=u[l],i.style.width=r,100===i.offsetWidth){a=r.replace(o,"");break}}catch(t){}return e.fake?Di(e,n):i.remove(),a}(),n),g=e.tPL?Bi(e.tPL):Si(e,"tPL",function(){var t,e=document,n=Hi(),i=Oi(n),a=e.createElement("div"),r=e.createElement("div"),o="";a.className="tns-t-subp2",r.className="tns-t-ct";for(var u=0;u<70;u++)o+="<div></div>";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?Di(n,i):a.remove(),t}(),n),D=e.tMQ?Bi(e.tMQ):Si(e,"tMQ",function(){if(window.matchMedia||window.msMatchMedia)return!0;var t,e=document,n=Hi(),i=Oi(n),a=e.createElement("div"),r=e.createElement("style"),o="@media all and (min-width:1px){.tns-mq-test{position:absolute}}";return r.type="text/css",a.className="tns-mq-test",n.appendChild(r),n.appendChild(a),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(e.createTextNode(o)),t=window.getComputedStyle?window.getComputedStyle(a).position:a.currentStyle.position,n.fake?Di(n,i):a.remove(),"absolute"===t}(),n),r=e.tTf?Bi(e.tTf):Si(e,"tTf",Ki("transform"),n),o=e.t3D?Bi(e.t3D):Si(e,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=Hi(),a=Oi(i),r=n.createElement("p"),o=9<t.length?"-"+t.slice(0,-9).toLowerCase()+"-":"";return o+="transform",i.insertBefore(r,null),r.style[t]="translate3d(1px,1px,1px)",e=window.getComputedStyle(r).getPropertyValue(o),i.fake?Di(i,a):r.remove(),void 0!==e&&0<e.length&&"none"!==e}(r),n),x=e.tTDu?Bi(e.tTDu):Si(e,"tTDu",Ki("transitionDuration"),n),u=e.tTDe?Bi(e.tTDe):Si(e,"tTDe",Ki("transitionDelay"),n),b=e.tADu?Bi(e.tADu):Si(e,"tADu",Ki("animationDuration"),n),l=e.tADe?Bi(e.tADe):Si(e,"tADe",Ki("animationDelay"),n),s=e.tTE?Bi(e.tTE):Si(e,"tTE",Ji(x,"Transition"),n),c=e.tAE?Bi(e.tAE):Si(e,"tAE",Ji(b,"Animation"),n),f=m.console&&"function"==typeof m.console.warn,d=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],v={};if(d.forEach(function(t){if("string"==typeof H[t]){var e=H[t],n=O.querySelector(e);if(v[t]=e,!n||!n.nodeName)return void(f&&console.warn("Can't find",H[t]));H[t]=n}}),!(H.container.children.length<1)){var k=H.responsive,R=H.nested,I="carousel"===H.mode;if(k){0 in k&&(H=Li(H,k[0]),delete k[0]);var p={};for(var h in k){var w=k[h];w="number"==typeof w?{items:w}:w,p[h]=w}k=p,p=null}if(I||function t(e){for(var n in e)I||("slideBy"===n&&(e[n]="page"),"edgePadding"===n&&(e[n]=!1),"autoHeight"===n&&(e[n]=!1)),"responsive"===n&&t(e[n])}(H),!I){H.axis="horizontal",H.slideBy="page",H.edgePadding=!1;var P=H.animateIn,z=H.animateOut,C=H.animateDelay,W=H.animateNormal}var M,q,F="horizontal"===H.axis,T=O.createElement("div"),j=O.createElement("div"),V=H.container,E=V.parentNode,A=V.outerHTML,G=V.children,Q=G.length,X=rn(),Y=!1;k&&En(),I&&(V.className+=" tns-vpfix");var N,L,B,S,K,J,U,_,Z,$=H.autoWidth,tt=sn("fixedWidth"),et=sn("edgePadding"),nt=sn("gutter"),it=un(),at=sn("center"),rt=$?1:Math.floor(sn("items")),ot=sn("slideBy"),ut=H.viewportMax||H.fixedWidthViewportWidth,lt=sn("arrowKeys"),st=sn("speed"),ct=H.rewind,ft=!ct&&H.loop,dt=sn("autoHeight"),vt=sn("controls"),pt=sn("controlsText"),ht=sn("nav"),mt=sn("touch"),yt=sn("mouseDrag"),gt=sn("autoplay"),xt=sn("autoplayTimeout"),bt=sn("autoplayText"),wt=sn("autoplayHoverPause"),Ct=sn("autoplayResetOnVisibility"),Mt=(U=null,_=sn("nonce"),Z=document.createElement("style"),U&&Z.setAttribute("media",U),_&&Z.setAttribute("nonce",_),document.querySelector("head").appendChild(Z),Z.sheet?Z.sheet:Z.styleSheet),Tt=H.lazyload,Et=H.lazyloadSelector,At=[],Nt=ft?(K=function(){{if($||tt&&!ut)return Q-1;var t=tt?"fixedWidth":"items",e=[];if((tt||H[t]<Q)&&e.push(H[t]),k)for(var n in k){var i=k[n][t];i&&(tt||i<Q)&&e.push(i)}return e.length||e.push(0),Math.ceil(tt?ut/Math.min.apply(null,e):Math.max.apply(null,e))}}(),J=I?Math.ceil((5*K-Q)/2):4*K-Q,J=Math.max(K,J),ln("edgePadding")?J+1:J):0,Lt=I?Q+2*Nt:Q+Nt,Bt=!(!tt&&!$||ft),St=tt?_n():null,Ht=!I||!ft,Ot=F?"left":"top",Dt="",kt="",Rt=tt?function(){return at&&!ft?Q-1:Math.ceil(-St/(tt+nt))}:$?function(){for(var t=0;t<Lt;t++)if(N[t]>=-St)return t}:function(){return at&&I&&!ft?Q-1:ft||I?Math.max(0,Lt-Math.ceil(rt)):Lt-1},It=en(sn("startIndex")),Pt=It,zt=(tn(),0),Wt=$?null:Rt(),qt=H.preventActionWhenRunning,Ft=H.swipeAngle,jt=!Ft||"?",Vt=!1,Gt=H.onInit,Qt=new Zi,Xt=" tns-slider tns-"+H.mode,Yt=V.id||(S=window.tnsId,window.tnsId=S?S+1:1,"tns"+window.tnsId),Kt=sn("disable"),Jt=!1,Ut=H.freezable,_t=!(!Ut||$)&&Tn(),Zt=!1,$t={click:oi,keydown:function(t){t=pi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&(0===e?we.disabled||oi(t,-1):Ce.disabled||oi(t,1))}},te={click:function(t){if(Vt){if(qt)return;ai()}var e=hi(t=pi(t));for(;e!==Ae&&!qi(e,"data-nav");)e=e.parentNode;if(qi(e,"data-nav")){var n=Se=Number(Fi(e,"data-nav")),i=tt||$?n*Q/Le:n*rt,a=le?n:Math.min(Math.ceil(i),Q-1);ri(a,t),He===n&&(Pe&&fi(),Se=-1)}},keydown:function(t){t=pi(t);var e=O.activeElement;if(!qi(e,"data-nav"))return;var n=[a.LEFT,a.RIGHT,a.ENTER,a.SPACE].indexOf(t.keyCode),i=Number(Fi(e,"data-nav"));0<=n&&(0===n?0<i&&vi(Ee[i-1]):1===n?i<Le-1&&vi(Ee[i+1]):ri(Se=i,t))}},ee={mouseover:function(){Pe&&(li(),ze=!0)},mouseout:function(){ze&&(ui(),ze=!1)}},ne={visibilitychange:function(){O.hidden?Pe&&(li(),qe=!0):qe&&(ui(),qe=!1)}},ie={keydown:function(t){t=pi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&oi(t,0===e?-1:1)}},ae={touchstart:xi,touchmove:bi,touchend:wi,touchcancel:wi},re={mousedown:xi,mousemove:bi,mouseup:wi,mouseleave:wi},oe=ln("controls"),ue=ln("nav"),le=!!$||H.navAsThumbnails,se=ln("autoplay"),ce=ln("touch"),fe=ln("mouseDrag"),de="tns-slide-active",ve="tns-slide-cloned",pe="tns-complete",he={load:function(t){kn(hi(t))},error:function(t){e=hi(t),zi(e,"failed"),Rn(e);var e}},me="force"===H.preventScrollOnTouch;if(oe)var ye,ge,xe=H.controlsContainer,be=H.controlsContainer?H.controlsContainer.outerHTML:"",we=H.prevButton,Ce=H.nextButton,Me=H.prevButton?H.prevButton.outerHTML:"",Te=H.nextButton?H.nextButton.outerHTML:"";if(ue)var Ee,Ae=H.navContainer,Ne=H.navContainer?H.navContainer.outerHTML:"",Le=$?Q:Mi(),Be=0,Se=-1,He=an(),Oe=He,De="tns-nav-active",ke="Carousel Page ",Re=" (Current Slide)";if(se)var Ie,Pe,ze,We,qe,Fe="forward"===H.autoplayDirection?1:-1,je=H.autoplayButton,Ve=H.autoplayButton?H.autoplayButton.outerHTML:"",Ge=["<span class='tns-visually-hidden'>"," animation</span>"];if(ce||fe)var Qe,Xe,Ye={},Ke={},Je=!1,Ue=F?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};$||$e(Kt||_t),r&&(Ot=r,Dt="translate",o?(Dt+=F?"3d(":"3d(0px, ",kt=F?", 0px, 0px)":", 0px)"):(Dt+=F?"X(":"Y(",kt=")")),I&&(V.className=V.className.replace("tns-vpfix","")),function(){ln("gutter");T.className="tns-outer",j.className="tns-inner",T.id=Yt+"-ow",j.id=Yt+"-iw",""===V.id&&(V.id=Yt);Xt+=g||$?" tns-subpixel":" tns-no-subpixel",Xt+=y?" tns-calc":" tns-no-calc",$&&(Xt+=" tns-autowidth");Xt+=" tns-"+H.axis,V.className+=Xt,I?((M=O.createElement("div")).id=Yt+"-mw",M.className="tns-ovh",T.appendChild(M),M.appendChild(j)):T.appendChild(j);if(dt){var t=M||j;t.className+=" tns-ah"}if(E.insertBefore(T,V),j.appendChild(V),Ii(G,function(t,e){zi(t,"tns-item"),t.id||(t.id=Yt+"-item"+e),!I&&W&&zi(t,W),ji(t,{"aria-hidden":"true",tabindex:"-1"})}),Nt){for(var e=O.createDocumentFragment(),n=O.createDocumentFragment(),i=Nt;i--;){var a=i%Q,r=G[a].cloneNode(!0);if(zi(r,ve),Vi(r,"id"),n.insertBefore(r,n.firstChild),I){var o=G[Q-1-a].cloneNode(!0);zi(o,ve),Vi(o,"id"),e.appendChild(o)}}V.insertBefore(e,V.firstChild),V.appendChild(n),G=V.children}}(),function(){if(!I)for(var t=It,e=It+Math.min(Q,rt);t<e;t++){var n=G[t];n.style.left=100*(t-It)/rt+"%",zi(n,P),Wi(n,W)}F&&(g||$?(ki(Mt,"#"+Yt+" > .tns-item","font-size:"+m.getComputedStyle(G[0]).fontSize+";",Ri(Mt)),ki(Mt,"#"+Yt,"font-size:0;",Ri(Mt))):I&&Ii(G,function(t,e){var n;t.style.marginLeft=(n=e,y?y+"("+100*n+"% / "+Lt+")":100*n/Lt+"%")}));if(D){if(x){var i=M&&H.autoHeight?hn(H.speed):"";ki(Mt,"#"+Yt+"-mw",i,Ri(Mt))}i=cn(H.edgePadding,H.gutter,H.fixedWidth,H.speed,H.autoHeight),ki(Mt,"#"+Yt+"-iw",i,Ri(Mt)),I&&(i=F&&!$?"width:"+fn(H.fixedWidth,H.gutter,H.items)+";":"",x&&(i+=hn(st)),ki(Mt,"#"+Yt,i,Ri(Mt))),i=F&&!$?dn(H.fixedWidth,H.gutter,H.items):"",H.gutter&&(i+=vn(H.gutter)),I||(x&&(i+=hn(st)),b&&(i+=mn(st))),i&&ki(Mt,"#"+Yt+" > .tns-item",i,Ri(Mt))}else{I&&dt&&(M.style[x]=st/1e3+"s"),j.style.cssText=cn(et,nt,tt,dt),I&&F&&!$&&(V.style.width=fn(tt,nt,rt));var i=F&&!$?dn(tt,nt,rt):"";nt&&(i+=vn(nt)),i&&ki(Mt,"#"+Yt+" > .tns-item",i,Ri(Mt))}if(k&&D)for(var a in k){a=parseInt(a);var r=k[a],i="",o="",u="",l="",s="",c=$?null:sn("items",a),f=sn("fixedWidth",a),d=sn("speed",a),v=sn("edgePadding",a),p=sn("autoHeight",a),h=sn("gutter",a);x&&M&&sn("autoHeight",a)&&"speed"in r&&(o="#"+Yt+"-mw{"+hn(d)+"}"),("edgePadding"in r||"gutter"in r)&&(u="#"+Yt+"-iw{"+cn(v,h,f,d,p)+"}"),I&&F&&!$&&("fixedWidth"in r||"items"in r||tt&&"gutter"in r)&&(l="width:"+fn(f,h,c)+";"),x&&"speed"in r&&(l+=hn(d)),l&&(l="#"+Yt+"{"+l+"}"),("fixedWidth"in r||tt&&"gutter"in r||!I&&"items"in r)&&(s+=dn(f,h,c)),"gutter"in r&&(s+=vn(h)),!I&&"speed"in r&&(x&&(s+=hn(d)),b&&(s+=mn(d))),s&&(s="#"+Yt+" > .tns-item{"+s+"}"),(i=o+u+l+s)&&Mt.insertRule("@media (min-width: "+a/16+"em) {"+i+"}",Mt.cssRules.length)}}(),yn();var _e=ft?I?function(){var t=zt,e=Wt;t+=ot,e-=ot,et?(t+=1,e-=1):tt&&(it+nt)%(tt+nt)&&(e-=1),Nt&&(e<It?It-=Q:It<t&&(It+=Q))}:function(){if(Wt<It)for(;zt+Q<=It;)It-=Q;else if(It<zt)for(;It<=Wt-Q;)It+=Q}:function(){It=Math.max(zt,Math.min(Wt,It))},Ze=I?function(){var e,n,i,a,t,r,o,u,l,s,c;Jn(V,""),x||!st?(ti(),st&&Yi(V)||ai()):(e=V,n=Ot,i=Dt,a=kt,t=Zn(),r=st,o=ai,u=Math.min(r,10),l=0<=t.indexOf("%")?"%":"px",t=t.replace(l,""),s=Number(e.style[n].replace(i,"").replace(a,"").replace(l,"")),c=(t-s)/r*u,setTimeout(function t(){r-=u,s+=c,e.style[n]=i+s+l+a,0<r?setTimeout(t,u):o()},u)),F||Ci()}:function(){At=[];var t={};t[s]=t[c]=ai,_i(G[Pt],t),Ui(G[It],t),ei(Pt,P,z,!0),ei(It,W,P),s&&c&&st&&Yi(V)||ai()};return{version:"2.9.4",getInfo:Ei,events:Qt,goTo:ri,play:function(){gt&&!Pe&&(ci(),We=!1)},pause:function(){Pe&&(fi(),We=!0)},isOn:Y,updateSliderHeight:Fn,refresh:yn,destroy:function(){if(Mt.disabled=!0,Mt.ownerNode&&Mt.ownerNode.remove(),_i(m,{resize:Cn}),lt&&_i(O,ie),xe&&_i(xe,$t),Ae&&_i(Ae,te),_i(V,ee),_i(V,ne),je&&_i(je,{click:di}),gt&&clearInterval(Ie),I&&s){var t={};t[s]=ai,_i(V,t)}mt&&_i(V,ae),yt&&_i(V,re);var r=[A,be,Me,Te,Ne,Ve];for(var e in d.forEach(function(t,e){var n="container"===t?T:H[t];if("object"==typeof n&&n){var i=!!n.previousElementSibling&&n.previousElementSibling,a=n.parentNode;n.outerHTML=r[e],H[t]=i?i.nextElementSibling:a.firstElementChild}}),d=P=z=C=W=F=T=j=V=E=A=G=Q=q=X=$=tt=et=nt=it=rt=ot=ut=lt=st=ct=ft=dt=Mt=Tt=N=At=Nt=Lt=Bt=St=Ht=Ot=Dt=kt=Rt=It=Pt=zt=Wt=Ft=jt=Vt=Gt=Qt=Xt=Yt=Kt=Jt=Ut=_t=Zt=$t=te=ee=ne=ie=ae=re=oe=ue=le=se=ce=fe=de=pe=he=L=vt=pt=xe=be=we=Ce=ye=ge=ht=Ae=Ne=Ee=Le=Be=Se=He=Oe=De=ke=Re=gt=xt=Fe=bt=wt=je=Ve=Ct=Ge=Ie=Pe=ze=We=qe=Ye=Ke=Qe=Je=Xe=Ue=mt=yt=null,this)"rebuild"!==e&&(this[e]=null);Y=!1},rebuild:function(){return $i(Li(H,v))}}}function $e(t){t&&(vt=ht=mt=yt=lt=gt=wt=Ct=!1)}function tn(){for(var t=I?It-Nt:It;t<0;)t+=Q;return t%Q+1}function en(t){return t=t?Math.max(0,Math.min(ft?Q-1:Q-rt,t)):0,I?t+Nt:t}function nn(t){for(null==t&&(t=It),I&&(t-=Nt);t<0;)t+=Q;return Math.floor(t%Q)}function an(){var t,e=nn();return t=le?e:tt||$?Math.ceil((e+1)*Le/Q-1):Math.floor(e/rt),!ft&&I&&It===Wt&&(t=Le-1),t}function rn(){return m.innerWidth||O.documentElement.clientWidth||O.body.clientWidth}function on(t){return"top"===t?"afterbegin":"beforeend"}function un(){var t=et?2*et-nt:0;return function t(e){if(null!=e){var n,i,a=O.createElement("div");return e.appendChild(a),i=(n=a.getBoundingClientRect()).right-n.left,a.remove(),i||t(e.parentNode)}}(E)-t}function ln(t){if(H[t])return!0;if(k)for(var e in k)if(k[e][t])return!0;return!1}function sn(t,e){if(null==e&&(e=X),"items"===t&&tt)return Math.floor((it+nt)/(tt+nt))||1;var n=H[t];if(k)for(var i in k)e>=parseInt(i)&&t in k[i]&&(n=k[i][t]);return"slideBy"===t&&"page"===n&&(n=sn("items")),I||"slideBy"!==t&&"items"!==t||(n=Math.floor(n)),n}function cn(t,e,n,i,a){var r="";if(void 0!==t){var o=t;e&&(o-=e),r=F?"margin: 0 "+o+"px 0 "+t+"px;":"margin: "+t+"px 0 "+o+"px 0;"}else if(e&&!n){var u="-"+e+"px";r="margin: 0 "+(F?u+" 0 0":"0 "+u+" 0")+";"}return!I&&a&&x&&i&&(r+=hn(i)),r}function fn(t,e,n){return t?(t+e)*Lt+"px":y?y+"("+100*Lt+"% / "+n+")":100*Lt/n+"%"}function dn(t,e,n){var i;if(t)i=t+e+"px";else{I||(n=Math.floor(n));var a=I?Lt:n;i=y?y+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==R?i+";":i+" !important;"}function vn(t){var e="";!1!==t&&(e=(F?"padding-":"margin-")+(F?"right":"bottom")+": "+t+"px;");return e}function pn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function hn(t){return pn(x,18)+"transition-duration:"+t/1e3+"s;"}function mn(t){return pn(b,17)+"animation-duration:"+t/1e3+"s;"}function yn(){if(ln("autoHeight")||$||!F){var t=V.querySelectorAll("img");Ii(t,function(t){var e=t.src;Tt||(e&&e.indexOf("data:image")<0?(t.src="",Ui(t,he),zi(t,"loading"),t.src=e):kn(t))}),Ai(function(){zn(Gi(t),function(){L=!0})}),ln("autoHeight")&&(t=In(It,Math.min(It+rt-1,Lt-1))),Tt?gn():Ai(function(){zn(Gi(t),gn)})}else I&&$n(),bn(),wn()}function gn(){if($&&1<Q){var i=ft?It:Q-1;!function t(){var e=G[i].getBoundingClientRect().left,n=G[i-1].getBoundingClientRect().right;Math.abs(e-n)<=1?xn():setTimeout(function(){t()},16)}()}else xn()}function xn(){F&&!$||(jn(),$?(St=_n(),Ut&&(_t=Tn()),Wt=Rt(),$e(Kt||_t)):Ci()),I&&$n(),bn(),wn()}function bn(){if(Vn(),T.insertAdjacentHTML("afterbegin",'<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">'+Hn()+"</span>  of "+Q+"</div>"),B=T.querySelector(".tns-liveregion .current"),se){var t=gt?"stop":"start";je?ji(je,{"data-action":t}):H.autoplayButtonOutput&&(T.insertAdjacentHTML(on(H.autoplayPosition),'<button type="button" data-action="'+t+'">'+Ge[0]+t+Ge[1]+bt[0]+"</button>"),je=T.querySelector("[data-action]")),je&&Ui(je,{click:di}),gt&&(ci(),wt&&Ui(V,ee),Ct&&Ui(V,ne))}if(ue){if(Ae)ji(Ae,{"aria-label":"Carousel Pagination"}),Ii(Ee=Ae.children,function(t,e){ji(t,{"data-nav":e,tabindex:"-1","aria-label":ke+(e+1),"aria-controls":Yt})});else{for(var e="",n=le?"":'style="display:none"',i=0;i<Q;i++)e+='<button type="button" data-nav="'+i+'" tabindex="-1" aria-controls="'+Yt+'" '+n+' aria-label="'+ke+(i+1)+'"></button>';e='<div class="tns-nav" aria-label="Carousel Pagination">'+e+"</div>",T.insertAdjacentHTML(on(H.navPosition),e),Ae=T.querySelector(".tns-nav"),Ee=Ae.children}if(Ti(),x){var a=x.substring(0,x.length-18).toLowerCase(),r="transition: all "+st/1e3+"s";a&&(r="-"+a+"-"+r),ki(Mt,"[aria-controls^="+Yt+"-item]",r,Ri(Mt))}ji(Ee[He],{"aria-label":ke+(He+1)+Re}),Vi(Ee[He],"tabindex"),zi(Ee[He],De),Ui(Ae,te)}oe&&(xe||we&&Ce||(T.insertAdjacentHTML(on(H.controlsPosition),'<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button type="button" data-controls="prev" tabindex="-1" aria-controls="'+Yt+'">'+pt[0]+'</button><button type="button" data-controls="next" tabindex="-1" aria-controls="'+Yt+'">'+pt[1]+"</button></div>"),xe=T.querySelector(".tns-controls")),we&&Ce||(we=xe.children[0],Ce=xe.children[1]),H.controlsContainer&&ji(xe,{"aria-label":"Carousel Navigation",tabindex:"0"}),(H.controlsContainer||H.prevButton&&H.nextButton)&&ji([we,Ce],{"aria-controls":Yt,tabindex:"-1"}),(H.controlsContainer||H.prevButton&&H.nextButton)&&(ji(we,{"data-controls":"prev"}),ji(Ce,{"data-controls":"next"})),ye=Qn(we),ge=Qn(Ce),Kn(),xe?Ui(xe,$t):(Ui(we,$t),Ui(Ce,$t))),An()}function wn(){if(I&&s){var t={};t[s]=ai,Ui(V,t)}mt&&Ui(V,ae,H.preventScrollOnTouch),yt&&Ui(V,re),lt&&Ui(O,ie),"inner"===R?Qt.on("outerResized",function(){Mn(),Qt.emit("innerLoaded",Ei())}):(k||tt||$||dt||!F)&&Ui(m,{resize:Cn}),dt&&("outer"===R?Qt.on("innerLoaded",Pn):Kt||Pn()),Dn(),Kt?Bn():_t&&Ln(),Qt.on("indexChanged",Wn),"inner"===R&&Qt.emit("innerLoaded",Ei()),"function"==typeof Gt&&Gt(Ei()),Y=!0}function Cn(t){Ai(function(){Mn(pi(t))})}function Mn(t){if(Y){"outer"===R&&Qt.emit("outerResized",Ei(t)),X=rn();var e,n=q,i=!1;k&&(En(),(e=n!==q)&&Qt.emit("newBreakpointStart",Ei(t)));var a,r,o,u,l=rt,s=Kt,c=_t,f=lt,d=vt,v=ht,p=mt,h=yt,m=gt,y=wt,g=Ct,x=It;if(e){var b=tt,w=dt,C=pt,M=at,T=bt;if(!D)var E=nt,A=et}if(lt=sn("arrowKeys"),vt=sn("controls"),ht=sn("nav"),mt=sn("touch"),at=sn("center"),yt=sn("mouseDrag"),gt=sn("autoplay"),wt=sn("autoplayHoverPause"),Ct=sn("autoplayResetOnVisibility"),e&&(Kt=sn("disable"),tt=sn("fixedWidth"),st=sn("speed"),dt=sn("autoHeight"),pt=sn("controlsText"),bt=sn("autoplayText"),xt=sn("autoplayTimeout"),D||(et=sn("edgePadding"),nt=sn("gutter"))),$e(Kt),it=un(),F&&!$||Kt||(jn(),F||(Ci(),i=!0)),(tt||$)&&(St=_n(),Wt=Rt()),(e||tt)&&(rt=sn("items"),ot=sn("slideBy"),(r=rt!==l)&&(tt||$||(Wt=Rt()),_e())),e&&Kt!==s&&(Kt?Bn():function(){if(!Jt)return;if(Mt.disabled=!1,V.className+=Xt,$n(),ft)for(var t=Nt;t--;)I&&Xi(G[t]),Xi(G[Lt-t-1]);if(!I)for(var e=It,n=It+Q;e<n;e++){var i=G[e],a=e<It+rt?P:W;i.style.left=100*(e-It)/rt+"%",zi(i,a)}Nn(),Jt=!1}()),Ut&&(e||tt||$)&&(_t=Tn())!==c&&(_t?(ti(Zn(en(0))),Ln()):(!function(){if(!Zt)return;et&&D&&(j.style.margin="");if(Nt)for(var t="tns-transparent",e=Nt;e--;)I&&Wi(G[e],t),Wi(G[Lt-e-1],t);Nn(),Zt=!1}(),i=!0)),$e(Kt||_t),gt||(wt=Ct=!1),lt!==f&&(lt?Ui(O,ie):_i(O,ie)),vt!==d&&(vt?xe?Xi(xe):(we&&Xi(we),Ce&&Xi(Ce)):xe?Qi(xe):(we&&Qi(we),Ce&&Qi(Ce))),ht!==v&&(ht?(Xi(Ae),Ti()):Qi(Ae)),mt!==p&&(mt?Ui(V,ae,H.preventScrollOnTouch):_i(V,ae)),yt!==h&&(yt?Ui(V,re):_i(V,re)),gt!==m&&(gt?(je&&Xi(je),Pe||We||ci()):(je&&Qi(je),Pe&&fi())),wt!==y&&(wt?Ui(V,ee):_i(V,ee)),Ct!==g&&(Ct?Ui(O,ne):_i(O,ne)),e){if(tt===b&&at===M||(i=!0),dt!==w&&(dt||(j.style.height="")),vt&&pt!==C&&(we.innerHTML=pt[0],Ce.innerHTML=pt[1]),je&&bt!==T){var N=gt?1:0,L=je.innerHTML,B=L.length-T[N].length;L.substring(B)===T[N]&&(je.innerHTML=L.substring(0,B)+bt[N])}}else at&&(tt||$)&&(i=!0);if((r||tt&&!$)&&(Le=Mi(),Ti()),(a=It!==x)?(Qt.emit("indexChanged",Ei()),i=!0):r?a||Wn():(tt||$)&&(Dn(),Vn(),Sn()),r&&!I&&function(){for(var t=It+Math.min(Q,rt),e=Lt;e--;){var n=G[e];It<=e&&e<t?(zi(n,"tns-moving"),n.style.left=100*(e-It)/rt+"%",zi(n,P),Wi(n,W)):n.style.left&&(n.style.left="",zi(n,W),Wi(n,P)),Wi(n,z)}setTimeout(function(){Ii(G,function(t){Wi(t,"tns-moving")})},300)}(),!Kt&&!_t){if(e&&!D&&(et===A&&nt===E||(j.style.cssText=cn(et,nt,tt,st,dt)),F)){I&&(V.style.width=fn(tt,nt,rt));var S=dn(tt,nt,rt)+vn(nt);u=Ri(o=Mt)-1,"deleteRule"in o?o.deleteRule(u):o.removeRule(u),ki(Mt,"#"+Yt+" > .tns-item",S,Ri(Mt))}dt&&Pn(),i&&($n(),Pt=It)}e&&Qt.emit("newBreakpointEnd",Ei(t))}}function Tn(){if(!tt&&!$)return Q<=(at?rt-(rt-1)/2:rt);var t=tt?(tt+nt)*Q:N[Q],e=et?it+2*et:it+nt;return at&&(e-=tt?(it-tt)/2:(it-(N[It+1]-N[It]-nt))/2),t<=e}function En(){for(var t in q=0,k)(t=parseInt(t))<=X&&(q=t)}function An(){!gt&&je&&Qi(je),!ht&&Ae&&Qi(Ae),vt||(xe?Qi(xe):(we&&Qi(we),Ce&&Qi(Ce)))}function Nn(){gt&&je&&Xi(je),ht&&Ae&&Xi(Ae),vt&&(xe?Xi(xe):(we&&Xi(we),Ce&&Xi(Ce)))}function Ln(){if(!Zt){if(et&&(j.style.margin="0px"),Nt)for(var t="tns-transparent",e=Nt;e--;)I&&zi(G[e],t),zi(G[Lt-e-1],t);An(),Zt=!0}}function Bn(){if(!Jt){if(Mt.disabled=!0,V.className=V.className.replace(Xt.substring(1),""),Vi(V,["style"]),ft)for(var t=Nt;t--;)I&&Qi(G[t]),Qi(G[Lt-t-1]);if(F&&I||Vi(j,["style"]),!I)for(var e=It,n=It+Q;e<n;e++){var i=G[e];Vi(i,["style"]),Wi(i,P),Wi(i,W)}An(),Jt=!0}}function Sn(){var t=Hn();B.innerHTML!==t&&(B.innerHTML=t)}function Hn(){var t=On(),e=t[0]+1,n=t[1]+1;return e===n?e+"":e+" to "+n}function On(t){null==t&&(t=Zn());var n,i,a,r=It;if(at||et?($||tt)&&(i=-(parseFloat(t)+et),a=i+it+2*et):$&&(i=N[It],a=i+it),$)N.forEach(function(t,e){e<Lt&&((at||et)&&t<=i+.5&&(r=e),.5<=a-t&&(n=e))});else{if(tt){var e=tt+nt;at||et?(r=Math.floor(i/e),n=Math.ceil(a/e-1)):n=r+Math.ceil(it/e)-1}else if(at||et){var o=rt-1;if(at?(r-=o/2,n=It+o/2):n=It+o,et){var u=et*rt/it;r-=u,n+=u}r=Math.floor(r),n=Math.ceil(n)}else n=r+rt-1;r=Math.max(r,0),n=Math.min(n,Lt-1)}return[r,n]}function Dn(){if(Tt&&!Kt){var t=On();t.push(Et),In.apply(null,t).forEach(function(t){if(!Pi(t,pe)){var e={};e[s]=function(t){t.stopPropagation()},Ui(t,e),Ui(t,he),t.src=Fi(t,"data-src");var n=Fi(t,"data-srcset");n&&(t.srcset=n),zi(t,"loading")}})}}function kn(t){zi(t,"loaded"),Rn(t)}function Rn(t){zi(t,pe),Wi(t,"loading"),_i(t,he)}function In(t,e,n){var i=[];for(n||(n="img");t<=e;)Ii(G[t].querySelectorAll(n),function(t){i.push(t)}),t++;return i}function Pn(){var t=In.apply(null,On());Ai(function(){zn(t,Fn)})}function zn(n,t){return L?t():(n.forEach(function(t,e){!Tt&&t.complete&&Rn(t),Pi(t,pe)&&n.splice(e,1)}),n.length?void Ai(function(){zn(n,t)}):t())}function Wn(){Dn(),Vn(),Sn(),Kn(),function(){if(ht&&(He=0<=Se?Se:an(),Se=-1,He!==Oe)){var t=Ee[Oe],e=Ee[He];ji(t,{tabindex:"-1","aria-label":ke+(Oe+1)}),Wi(t,De),ji(e,{"aria-label":ke+(He+1)+Re}),Vi(e,"tabindex"),zi(e,De),Oe=He}}()}function qn(t,e){for(var n=[],i=t,a=Math.min(t+e,Lt);i<a;i++)n.push(G[i].offsetHeight);return Math.max.apply(null,n)}function Fn(){var t=dt?qn(It,rt):qn(Nt,Q),e=M||j;e.style.height!==t&&(e.style.height=t+"px")}function jn(){N=[0];var n=F?"left":"top",i=F?"right":"bottom",a=G[0].getBoundingClientRect()[n];Ii(G,function(t,e){e&&N.push(t.getBoundingClientRect()[n]-a),e===Lt-1&&N.push(t.getBoundingClientRect()[i]-a)})}function Vn(){var t=On(),n=t[0],i=t[1];Ii(G,function(t,e){n<=e&&e<=i?qi(t,"aria-hidden")&&(Vi(t,["aria-hidden","tabindex"]),zi(t,de)):qi(t,"aria-hidden")||(ji(t,{"aria-hidden":"true",tabindex:"-1"}),Wi(t,de))})}function Gn(t){return t.nodeName.toLowerCase()}function Qn(t){return"button"===Gn(t)}function Xn(t){return"true"===t.getAttribute("aria-disabled")}function Yn(t,e,n){t?e.disabled=n:e.setAttribute("aria-disabled",n.toString())}function Kn(){if(vt&&!ct&&!ft){var t=ye?we.disabled:Xn(we),e=ge?Ce.disabled:Xn(Ce),n=It<=zt,i=!ct&&Wt<=It;n&&!t&&Yn(ye,we,!0),!n&&t&&Yn(ye,we,!1),i&&!e&&Yn(ge,Ce,!0),!i&&e&&Yn(ge,Ce,!1)}}function Jn(t,e){x&&(t.style[x]=e)}function Un(t){return null==t&&(t=It),$?(it-(et?nt:0)-(N[t+1]-N[t]-nt))/2:tt?(it-tt)/2:(rt-1)/2}function _n(){var t=it+(et?nt:0)-(tt?(tt+nt)*Lt:N[Lt]);return at&&!ft&&(t=tt?-(tt+nt)*(Lt-1)-Un():Un(Lt-1)-N[Lt-1]),0<t&&(t=0),t}function Zn(t){var e;if(null==t&&(t=It),F&&!$)if(tt)e=-(tt+nt)*t,at&&(e+=Un());else{var n=r?Lt:rt;at&&(t-=Un()),e=100*-t/n}else e=-N[t],at&&$&&(e+=Un());return Bt&&(e=Math.max(e,St)),e+=!F||$||tt?"px":"%"}function $n(t){Jn(V,"0s"),ti(t)}function ti(t){null==t&&(t=Zn()),V.style[Ot]=Dt+t+kt}function ei(t,e,n,i){var a=t+rt;ft||(a=Math.min(a,Lt));for(var r=t;r<a;r++){var o=G[r];i||(o.style.left=100*(r-It)/rt+"%"),C&&u&&(o.style[u]=o.style[l]=C*(r-t)/1e3+"s"),Wi(o,e),zi(o,n),i&&At.push(o)}}function ni(t,e){Ht&&_e(),(It!==Pt||e)&&(Qt.emit("indexChanged",Ei()),Qt.emit("transitionStart",Ei()),dt&&Pn(),Pe&&t&&0<=["click","keydown"].indexOf(t.type)&&fi(),Vt=!0,Ze())}function ii(t){return t.toLowerCase().replace(/-/g,"")}function ai(t){if(I||Vt){if(Qt.emit("transitionEnd",Ei(t)),!I&&0<At.length)for(var e=0;e<At.length;e++){var n=At[e];n.style.left="",l&&u&&(n.style[l]="",n.style[u]=""),Wi(n,z),zi(n,W)}if(!t||!I&&t.target.parentNode===V||t.target===V&&ii(t.propertyName)===ii(Ot)){if(!Ht){var i=It;_e(),It!==i&&(Qt.emit("indexChanged",Ei()),$n())}"inner"===R&&Qt.emit("innerLoaded",Ei()),Vt=!1,Pt=It}}}function ri(t,e){if(!_t)if("prev"===t)oi(e,-1);else if("next"===t)oi(e,1);else{if(Vt){if(qt)return;ai()}var n=nn(),i=0;if("first"===t?i=-n:"last"===t?i=I?Q-rt-n:Q-1-n:("number"!=typeof t&&(t=parseInt(t)),isNaN(t)||(e||(t=Math.max(0,Math.min(Q-1,t))),i=t-n)),!I&&i&&Math.abs(i)<rt){var a=0<i?1:-1;i+=zt<=It+i-Q?Q*a:2*Q*a*-1}It+=i,I&&ft&&(It<zt&&(It+=Q),Wt<It&&(It-=Q)),nn(It)!==nn(Pt)&&ni(e)}}function oi(t,e){if(Vt){if(qt)return;ai()}var n;if(!e){for(var i=hi(t=pi(t));i!==xe&&[we,Ce].indexOf(i)<0;)i=i.parentNode;var a=[we,Ce].indexOf(i);0<=a&&(n=!0,e=0===a?-1:1)}if(ct){if(It===zt&&-1===e)return void ri("last",t);if(It===Wt&&1===e)return void ri("first",t)}e&&(It+=ot*e,$&&(It=Math.floor(It)),ni(n||t&&"keydown"===t.type?t:null))}function ui(){Ie=setInterval(function(){oi(null,Fe)},xt),Pe=!0}function li(){clearInterval(Ie),Pe=!1}function si(t,e){ji(je,{"data-action":t}),je.innerHTML=Ge[0]+t+Ge[1]+e}function ci(){ui(),je&&si("stop",bt[1])}function fi(){li(),je&&si("start",bt[0])}function di(){Pe?(fi(),We=!0):(ci(),We=!1)}function vi(t){t.focus()}function pi(t){return mi(t=t||m.event)?t.changedTouches[0]:t}function hi(t){return t.target||m.event.srcElement}function mi(t){return 0<=t.type.indexOf("touch")}function yi(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function gi(){return a=Ke.y-Ye.y,r=Ke.x-Ye.x,t=Math.atan2(a,r)*(180/Math.PI),e=Ft,n=!1,i=Math.abs(90-Math.abs(t)),90-e<=i?n="horizontal":i<=e&&(n="vertical"),n===H.axis;var t,e,n,i,a,r}function xi(t){if(Vt){if(qt)return;ai()}gt&&Pe&&li(),Je=!0,Xe&&(Ni(Xe),Xe=null);var e=pi(t);Qt.emit(mi(t)?"touchStart":"dragStart",Ei(t)),!mi(t)&&0<=["img","a"].indexOf(Gn(hi(t)))&&yi(t),Ke.x=Ye.x=e.clientX,Ke.y=Ye.y=e.clientY,I&&(Qe=parseFloat(V.style[Ot].replace(Dt,"")),Jn(V,"0s"))}function bi(t){if(Je){var e=pi(t);Ke.x=e.clientX,Ke.y=e.clientY,I?Xe||(Xe=Ai(function(){!function t(e){if(!jt)return void(Je=!1);Ni(Xe);Je&&(Xe=Ai(function(){t(e)}));"?"===jt&&(jt=gi());if(jt){!me&&mi(e)&&(me=!0);try{e.type&&Qt.emit(mi(e)?"touchMove":"dragMove",Ei(e))}catch(t){}var n=Qe,i=Ue(Ke,Ye);if(!F||tt||$)n+=i,n+="px";else{var a=r?i*rt*100/((it+nt)*Lt):100*i/(it+nt);n+=a,n+="%"}V.style[Ot]=Dt+n+kt}}(t)})):("?"===jt&&(jt=gi()),jt&&(me=!0)),("boolean"!=typeof t.cancelable||t.cancelable)&&me&&t.preventDefault()}}function wi(i){if(Je){Xe&&(Ni(Xe),Xe=null),I&&Jn(V,""),Je=!1;var t=pi(i);Ke.x=t.clientX,Ke.y=t.clientY;var a=Ue(Ke,Ye);if(Math.abs(a)){if(!mi(i)){var n=hi(i);Ui(n,{click:function t(e){yi(e),_i(n,{click:t})}})}I?Xe=Ai(function(){if(F&&!$){var t=-a*rt/(it+nt);t=0<a?Math.floor(t):Math.ceil(t),It+=t}else{var e=-(Qe+a);if(e<=0)It=zt;else if(e>=N[Lt-1])It=Wt;else for(var n=0;n<Lt&&e>=N[n];)e>N[It=n]&&a<0&&(It+=1),n++}ni(i,a),Qt.emit(mi(i)?"touchEnd":"dragEnd",Ei(i))}):jt&&oi(i,0<a?-1:1)}}"auto"===H.preventScrollOnTouch&&(me=!1),Ft&&(jt="?"),gt&&!Pe&&ui()}function Ci(){(M||j).style.height=N[It+rt]-N[It]+"px"}function Mi(){var t=tt?(tt+nt)*Q/it:Q/rt;return Math.min(Math.ceil(t),Q)}function Ti(){if(ht&&!le&&Le!==Be){var t=Be,e=Le,n=Xi;for(Le<Be&&(t=Le,e=Be,n=Qi);t<e;)n(Ee[t]),t++;Be=Le}}function Ei(t){return{container:V,slideItems:G,navContainer:Ae,navItems:Ee,controlsContainer:xe,hasControls:oe,prevButton:we,nextButton:Ce,items:rt,slideBy:ot,cloneCount:Nt,slideCount:Q,slideCountNew:Lt,index:It,indexCached:Pt,displayIndex:tn(),navCurrentIndex:He,navCurrentIndexCached:Oe,pages:Le,pagesCached:Be,sheet:Mt,isOn:Y,event:t||{}}}f&&console.warn("No slides found in",H.container)};return $i}();var preventFilterSubmit=!1;var preventElpacFilterSubmit=!1;var elpacFilters={};var currentElpacVariants={};submitFilterRequest=function(){if(preventFilterSubmit){return}
$('#filter-container').empty();additionalFilters=[];atLeastOneFilter=!1;elpacFilters={};var validFilters=[];jQuery('.dl-product-attribute-filter').each(function(){atLeastOneFilter=!0;selectElem=jQuery(this).find('select').first();selectElemValue=selectElem.val();selectElemValueText=selectElem.find('option:selected').map(function(){return $(this).text()}).get().join(', ');labelElemText=jQuery(this).find('label').first().text();attributeUid=jQuery(this).data('attribute-uid');if(selectElemValue.length>1||(selectElemValue.length===1&&selectElemValue[0]!==''&&selectElemValue[0]!==0)){var attributeName=selectElem.attr('name');var elpacAttribute=selectElem.data('elpac-attribute');if(elpacAttribute){elpacFilters[elpacAttribute]=selectElemValue}
selectElemOperator=selectElem.data('operator');if(selectElemOperator==='AND'){selectElemOperator=' AND '}else{selectElemOperator=' OR '}
additionalFilters.push(attributeName+':('+selectElemValue.join(selectElemOperator)+')');validFilters.push({attributeName:attributeName,attributeUid:attributeUid,operator:selectElemOperator,values:selectElemValue});$('#filter-container').append('<span class="selected-filter" id="remove-filter-'+attributeUid+'">'+'<a href="#" class="badge badge-info" onclick="return removeFilter(\''+attributeUid+'\')">'+labelElemText+':<br>'+selectElemValueText+' <i class="far fa-trash-alt"></i>'+'</a>'+'</span>')}});var excludeFilterValues={};if(validFilters.length>1){validFilters.forEach((attributeAData)=>{var attributeAName=attributeAData.attributeName;var attributeAUid=attributeAData.attributeUid;var attributeAValues=attributeAData.values;var operator=attributeAData.operator;validFilters.forEach((attributeBData)=>{var attributeBName=attributeBData.attributeName;var attributeBUid=attributeBData.attributeUid;if(attributeAUid!==attributeBUid){var attributeBValues=attributeBData.values;excludeFilterValues[attributeAUid]=[];attributeAValues.forEach((AValue)=>{attributeBValues.forEach((BValue)=>{excludeFilterValues[attributeAUid].push('"'+attributeAUid+'_'+AValue+'_'+attributeBUid+'_'+BValue+'"')})})}})})}
if(Object.keys(excludeFilterValues).length){var orExcludeFilterValues=[];for(var attributeUid in excludeFilterValues){orExcludeFilterValues.push('('+excludeFilterValues[attributeUid].join(' AND ')+')')}
additionalFilters.push('-exclude_attribute_value_pair_stringM:('+orExcludeFilterValues.join(' OR ')+')')}
console.log(additionalFilters);if(atLeastOneFilter===!0){jQuery('#cta-filter-remove').show()}else{jQuery('#cta-filter-remove').hide()}
filterCategories=jQuery('#attributes-container').data('categories')+'';filterProducts=jQuery('#attributes-container').data('products')+'';axajUrl=jQuery('#attributes-container').data('url');productsSolrQueryArray=new Array();if(filterCategories){productsSolrQueryArray.push('category_intM:('+filterCategories.split(',').join(' OR ')+')')}
if(filterProducts){productsSolrQueryArray.push('uid:('+filterProducts.split(',').join(' OR ')+')')}
productsSolrQuery=productsSolrQueryArray.join(' OR ');searchString='';if(jQuery('#freetext-search-field').length){searchString=jQuery('#freetext-search-field').val()}
if(searchString==''){searchString='*'}
var requestdata={tx_solr:{q:searchString}};requestdata.tx_solr.additionalFilters=additionalFilters;requestdata.tx_solr.additionalFilters.push(productsSolrQuery);var $loading=$('#loadingDiv');$(document).ajaxStart(function(){$loading.show()}).ajaxStop(function(){$loading.hide()});jQuery.ajax({url:axajUrl,data:requestdata,success:function(data){let attributeValues={};jQuery(data).find('[data-attribute-values]').each(function(){let productAttributesString=jQuery(this).attr('data-attribute-values').replaceAll('\'','"');let productAttributes=jQuery.parseJSON(productAttributesString);for(attributeId in productAttributes){let productAttributeValues=productAttributes[attributeId].split(',');if(typeof attributeValues[attributeId]==='undefined'){attributeValues[attributeId]=productAttributeValues}else{productAttributeValues.forEach(function(value){if(attributeValues[attributeId].indexOf(value)===-1){attributeValues[attributeId].push(value)}})}}});jQuery(data).find('[data-elpac-variants]').each(function(){let elpacVariants=jQuery(this).data('elpac-variants');if(elpacVariants!==''){for(var articleNumber in elpacVariants){if(elpacVariantMatchesFilter(elpacVariants[articleNumber],elpacFilters)){for(var elpacAttribute in elpacVariants[articleNumber]){var elpacAttributeValue=elpacVariants[articleNumber][elpacAttribute];var elpacAttributeFieldName='attribute_'+elpacAttribute+'_stringM';if(typeof attributeValues[elpacAttributeFieldName]==='undefined'){attributeValues[elpacAttributeFieldName]=[]}
if(attributeValues[elpacAttributeFieldName].indexOf(elpacAttributeValue)===-1){attributeValues[elpacAttributeFieldName].push(elpacAttributeValue)}}}}}});jQuery('.dl-product-attribute-filter').each(function(){selectElem=jQuery(this).find('select').first();selectElemValue=selectElem.val();selectElemName=selectElem.attr('name');selectElemOperator=selectElem.data('operator');if(selectElemOperator==='AND'){selectElemOperator='AND'}else{selectElemOperator='OR'}
selectElem.find('option').removeAttr('disabled');if(selectElemValue.length===0||selectElemOperator==='AND'){selectElem.find('option').each(function(){let $option=jQuery(this);let optionValue=$option.attr('value');if(selectElemValue.indexOf(optionValue)===-1&&(typeof attributeValues[selectElemName]==='undefined'||attributeValues[selectElemName].indexOf(optionValue)===-1)){$option.attr('disabled','disabled')}})}
let container=selectElem.data('select2').$container;if(typeof container!=='undefined'&&container.is('.select2-container--open')){selectElem.select2('close');selectElem.select2('open')}});jQuery('#panel-layout-container').html(jQuery(data).find('#ajax-panel-layout').html());jQuery('#list-layout-container').html(jQuery(data).find('#ajax-list-layout').html());jQuery('#product_wrapper [data-toggle="tooltip"]').tooltip();jQuery('#product_wrapper .product-icons img').on('shown.bs.tooltip',function(){jQuery('.tooltip').addClass('product-icon-tooltip')});jQuery('#product_wrapper .product-icons img').on('show.bs.tooltip',function(){jQuery('.tooltip').addClass('product-icon-tooltip')});foundResults=jQuery('#list-layout-container .product-list-item').length;jQuery('#result-number').text(foundResults)},method:'POST',dataType:'html'})};filterElpacVariants=function(){if(preventElpacFilterSubmit){return}
$('#filter-container').empty();atLeastOneFilter=!1;elpacFilters={};jQuery('.dl-product-elpac-filter').each(function(){atLeastOneFilter=!0;selectElem=jQuery(this).find('select').first();selectElemValue=selectElem.val();selectElemValueText=selectElem.find('option:selected').map(function(){return $(this).text()}).get().join(', ');labelElemText=jQuery(this).find('label').first().text();attributeUid=jQuery(this).data('attribute-uid');if(selectElemValue.length>1||(selectElemValue.length===1&&selectElemValue[0]!==''&&selectElemValue[0]!==0)){var attributeName=selectElem.attr('name');elpacFilters[attributeName]=selectElemValue;$('#filter-container').append('<span class="selected-filter" id="remove-filter-'+attributeUid+'">'+'<a href="#" class="badge badge-info" onclick="return removeElpacFilter(\''+attributeUid+'\')">'+labelElemText+':<br>'+selectElemValueText+' <i class="far fa-trash-alt"></i>'+'</a>'+'</span>')}});if(atLeastOneFilter===!0){jQuery('#elpac-filter-remove').show()}else{jQuery('#elpac-filter-remove').hide()}
jQuery('.dl-product-elpac-filter option').removeAttr('disabled');jQuery('#product-elpac-variants [data-variant]').removeClass('hidden');var foundResults=Object.keys(currentElpacVariants).length;if(Object.keys(elpacFilters).length){let attributeValues={};foundResults=0;for(var productId in currentElpacVariants){var itemAttributes=currentElpacVariants[productId];if(!elpacVariantMatchesFilter(itemAttributes,elpacFilters)){jQuery('#product-elpac-variants [data-variant="'+productId+'"]').addClass('hidden')}else{foundResults++;for(attributeId in itemAttributes){let attributeValue=itemAttributes[attributeId];if(typeof attributeValues[attributeId]==='undefined'){attributeValues[attributeId]=[]}
if(attributeValues[attributeId].indexOf(attributeValue)===-1){attributeValues[attributeId].push(attributeValue)}}}}
jQuery('.dl-product-elpac-filter').each(function(){selectElem=jQuery(this).find('select').first();selectElemValue=selectElem.val();selectElemName=selectElem.attr('name');if(selectElemValue.length===0){selectElem.find('option').each(function(){let $option=jQuery(this);let optionValue=$option.attr('value');if(selectElemValue.indexOf(optionValue)===-1&&(typeof attributeValues[selectElemName]==='undefined'||attributeValues[selectElemName].indexOf(optionValue)===-1)){$option.attr('disabled','disabled')}})}
let container=selectElem.parents('select2-container').first();if(typeof container!=='undefined'&&container.is('.select2-container--open')){selectElem.select2('close');selectElem.select2('open')}})}
jQuery('#result-number').text(foundResults);adjustVariantWidth()};filterElpacVariantsByText=function(search){search=search.toLowerCase();jQuery('#product-elpac-variants [data-variant]').removeClass('hidden');Object.entries(ElpacVariantText).forEach(variantEntry=>{const[variantNumber,variantFields]=variantEntry;var matched=!1;if(search===''){matched=!0}else{Object.entries(variantFields).forEach(fieldEntry=>{const[fieldName,fieldValue]=fieldEntry;if(fieldValue.includes(search)){matched=!0}})}
if(!matched){jQuery('#product-elpac-variants [data-variant="'+variantNumber+'"]').addClass('hidden')}});adjustVariantWidth()};removeFilter=function(attributeUid){jQuery('#remove-filter-'+attributeUid).remove();jQuery('#selector-attribute-'+attributeUid).first().val('0');jQuery('#selector-attribute-'+attributeUid).first().trigger('change');if(jQuery('#filter-container').text()==''){jQuery('#cta-filter-remove').hide()}
return!1};removeElpacFilter=function(attributeUid){jQuery('#remove-filter-'+attributeUid).remove();jQuery('#selector-attribute-'+attributeUid).first().val('0');jQuery('#selector-attribute-'+attributeUid).first().trigger('change');if(jQuery('#filter-container').text()==''){jQuery('#elpac-filter-remove').hide()}
return!1};window.onload=function(){initTypeaheadForSearchField(jQuery('#freetext-search-field'));jQuery('.dl-product-attribute-filter select').change(function(){submitFilterRequest()});jQuery('#cta-filter-remove').click(function(elem){elem.preventDefault();$('#filter-container').empty();preventFilterSubmit=!0;jQuery('.dl-product-attribute-filter select').each(function(){jQuery(this).val('0').trigger('change')});preventFilterSubmit=!1;jQuery('.dl-product-attribute-filter select').first().trigger('change');jQuery('#cta-filter-remove').hide()});jQuery('#freetext-search-form').submit(function(elem){elem.preventDefault();submitFilterRequest()});if($('#product-elpac-variants [data-variant]').length){var hashValue=decodeURI(window.location.hash);if(hashValue.startsWith('#elpacFilters=')){var selectedFilters=JSON.parse(hashValue.substring(14));if(Object.keys(selectedFilters).length){if($('#attributes-container .dl-product-elpac-filter').length){for(var attributeId in selectedFilters){var filter=$('#selector-attribute-'+attributeId).first();if(filter.length){filter.val(selectedFilters[attributeId])}}}}}};setTimeout(function(){var filtersActive=!1;jQuery('.dl-product-attribute-filter select').each(function(){if(jQuery(this).val().length){filtersActive=!0;return!1}});if(filtersActive){$('.tx-dl-products #attributes-container .read-more').click();submitFilterRequest()}},300);jQuery('#product_wrapper').on('click','.filtered-product-teaser',function(e){if(Object.keys(elpacFilters).length){e.preventDefault();var urlHash='#elpacFilters='+JSON.stringify(elpacFilters);var url=e.currentTarget.href;window.location=url+urlHash}});if($('#product-elpac-variants').length){currentElpacVariants=$('#product-elpac-variants').first().data('products')};jQuery('#elpac-filter-remove').click(function(elem){elem.preventDefault();$('#filter-container').empty();preventElpacFilterSubmit=!0;jQuery('.dl-product-elpac-filter select').each(function(){jQuery(this).val('0').trigger('change')});preventElpacFilterSubmit=!1;filterElpacVariants();jQuery('#elpac-filter-remove').hide()});jQuery('.dl-product-elpac-filter select').change(function(){filterElpacVariants()});var elpacFiltersActive=!1;jQuery('.dl-product-elpac-filter select').each(function(){if(jQuery(this).val().length){elpacFiltersActive=!0;return!1}});if(elpacFiltersActive){$('.tx-dl-products #attributes-container .read-more').click();filterElpacVariants()}
var textFilterInput=document.querySelector('#elpac-text-filter');if(textFilterInput){textFilterInput.addEventListener('input',(event)=>{var filterValue=event.target.value;filterElpacVariantsByText(filterValue)})}};document.addEventListener('DOMContentLoaded',function(event){var filetypes=/\.(zip|exe|dmg|pdf|doc.*|xls.*|ppt.*|mp3|txt|rar|wma|mov|avi|wmv|flv|wav)$/i;document.querySelector('a').addEventListener('click',function(event){var track=!0,href=this.href,isThisDomain=href.match(document.domain.split('.').reverse()[1]+'.'+document.domain.split('.').reverse()[0]);if(!href.match(/^javascript:/i)){var elEv=[];elEv.value=0,elEv.non_i=!1;if(href.match(/^mailto\:/i)){elEv.category="email";elEv.action="click";elEv.label=href.replace(/^mailto\:/i,'');elEv.loc=href}else if(href.match(filetypes)){var extension=(/[.]/.exec(href))?/[^.]+$/.exec(href):undefined;elEv.category="download";elEv.action="click-"+extension[0];elEv.label=href.replace(/ /g,"-");elEv.loc=href}else if(href.match(/^https?\:/i)&&!isThisDomain){elEv.category="external";elEv.action="click";elEv.label=href.replace(/^https?\:\/\//i,'');elEv.non_i=!0;elEv.loc=href}else if(href.match(/^tel\:/i)){elEv.category="telephone";elEv.action="click";elEv.label=href.replace(/^tel\:/i,'');elEv.loc=href}else track=!1;if(track){ga('send','event',elEv.category.toLowerCase(),elEv.action.toLowerCase(),elEv.label.toLowerCase(),elEv.value,{'nonInteraction':elEv.non_i})}}})});
/*!
* Fine Uploader
*
* Copyright 2013-present, Widen Enterprises, Inc.
*
* Version: 5.10.1
*
* Homepage: http://fineuploader.com
*
* Repository: git://github.com/FineUploader/fine-uploader.git
*
* Licensed only under the MIT license (http://fineuploader.com/licensing).
*/
(function(global){var qq=function(element){"use strict";return{hide:function(){element.style.display="none";return this},attach:function(type,fn){if(element.addEventListener){element.addEventListener(type,fn,!1)}else if(element.attachEvent){element.attachEvent("on"+type,fn)}
return function(){qq(element).detach(type,fn)}},detach:function(type,fn){if(element.removeEventListener){element.removeEventListener(type,fn,!1)}else if(element.attachEvent){element.detachEvent("on"+type,fn)}
return this},contains:function(descendant){if(!descendant){return!1}
if(element===descendant){return!0}
if(element.contains){return element.contains(descendant)}else{return!!(descendant.compareDocumentPosition(element)&8)}},insertBefore:function(elementB){elementB.parentNode.insertBefore(element,elementB);return this},remove:function(){element.parentNode.removeChild(element);return this},css:function(styles){if(element.style==null){throw new qq.Error("Can't apply style to node as it is not on the HTMLElement prototype chain!")}
if(styles.opacity!=null){if(typeof element.style.opacity!=="string"&&typeof(element.filters)!=="undefined"){styles.filter="alpha(opacity="+Math.round(100*styles.opacity)+")"}}
qq.extend(element.style,styles);return this},hasClass:function(name,considerParent){var re=new RegExp("(^| )"+name+"( |$)");return re.test(element.className)||!!(considerParent&&re.test(element.parentNode.className))},addClass:function(name){if(!qq(element).hasClass(name)){element.className+=" "+name}
return this},removeClass:function(name){var re=new RegExp("(^| )"+name+"( |$)");element.className=element.className.replace(re," ").replace(/^\s+|\s+$/g,"");return this},getByClass:function(className,first){var candidates,result=[];if(first&&element.querySelector){return element.querySelector("."+className)}else if(element.querySelectorAll){return element.querySelectorAll("."+className)}
candidates=element.getElementsByTagName("*");qq.each(candidates,function(idx,val){if(qq(val).hasClass(className)){result.push(val)}});return first?result[0]:result},getFirstByClass:function(className){return qq(element).getByClass(className,!0)},children:function(){var children=[],child=element.firstChild;while(child){if(child.nodeType===1){children.push(child)}
child=child.nextSibling}
return children},setText:function(text){element.innerText=text;element.textContent=text;return this},clearText:function(){return qq(element).setText("")},hasAttribute:function(attrName){var attrVal;if(element.hasAttribute){if(!element.hasAttribute(attrName)){return!1}
return(/^false$/i).exec(element.getAttribute(attrName))==null}else{attrVal=element[attrName];if(attrVal===undefined){return!1}
return(/^false$/i).exec(attrVal)==null}}}};(function(){"use strict";qq.canvasToBlob=function(canvas,mime,quality){return qq.dataUriToBlob(canvas.toDataURL(mime,quality))};qq.dataUriToBlob=function(dataUri){var arrayBuffer,byteString,createBlob=function(data,mime){var BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,blobBuilder=BlobBuilder&&new BlobBuilder();if(blobBuilder){blobBuilder.append(data);return blobBuilder.getBlob(mime)}else{return new Blob([data],{type:mime})}},intArray,mimeString;if(dataUri.split(",")[0].indexOf("base64")>=0){byteString=atob(dataUri.split(",")[1])}else{byteString=decodeURI(dataUri.split(",")[1])}
mimeString=dataUri.split(",")[0].split(":")[1].split(";")[0];arrayBuffer=new ArrayBuffer(byteString.length);intArray=new Uint8Array(arrayBuffer);qq.each(byteString,function(idx,character){intArray[idx]=character.charCodeAt(0)});return createBlob(arrayBuffer,mimeString)};qq.log=function(message,level){if(window.console){if(!level||level==="info"){window.console.log(message)}else{if(window.console[level]){window.console[level](message)}else{window.console.log("<"+level+"> "+message)}}}};qq.isObject=function(variable){return variable&&!variable.nodeType&&Object.prototype.toString.call(variable)==="[object Object]"};qq.isFunction=function(variable){return typeof(variable)==="function"};qq.isArray=function(value){return Object.prototype.toString.call(value)==="[object Array]"||(value&&window.ArrayBuffer&&value.buffer&&value.buffer.constructor===ArrayBuffer)};qq.isItemList=function(maybeItemList){return Object.prototype.toString.call(maybeItemList)==="[object DataTransferItemList]"};qq.isNodeList=function(maybeNodeList){return Object.prototype.toString.call(maybeNodeList)==="[object NodeList]"||(maybeNodeList.item&&maybeNodeList.namedItem)};qq.isString=function(maybeString){return Object.prototype.toString.call(maybeString)==="[object String]"};qq.trimStr=function(string){if(String.prototype.trim){return string.trim()}
return string.replace(/^\s+|\s+$/g,"")};qq.format=function(str){var args=Array.prototype.slice.call(arguments,1),newStr=str,nextIdxToReplace=newStr.indexOf("{}");qq.each(args,function(idx,val){var strBefore=newStr.substring(0,nextIdxToReplace),strAfter=newStr.substring(nextIdxToReplace+2);newStr=strBefore+val+strAfter;nextIdxToReplace=newStr.indexOf("{}",nextIdxToReplace+val.length);if(nextIdxToReplace<0){return!1}});return newStr};qq.isFile=function(maybeFile){return window.File&&Object.prototype.toString.call(maybeFile)==="[object File]"};qq.isFileList=function(maybeFileList){return window.FileList&&Object.prototype.toString.call(maybeFileList)==="[object FileList]"};qq.isFileOrInput=function(maybeFileOrInput){return qq.isFile(maybeFileOrInput)||qq.isInput(maybeFileOrInput)};qq.isInput=function(maybeInput,notFile){var evaluateType=function(type){var normalizedType=type.toLowerCase();if(notFile){return normalizedType!=="file"}
return normalizedType==="file"};if(window.HTMLInputElement){if(Object.prototype.toString.call(maybeInput)==="[object HTMLInputElement]"){if(maybeInput.type&&evaluateType(maybeInput.type)){return!0}}}
if(maybeInput.tagName){if(maybeInput.tagName.toLowerCase()==="input"){if(maybeInput.type&&evaluateType(maybeInput.type)){return!0}}}
return!1};qq.isBlob=function(maybeBlob){if(window.Blob&&Object.prototype.toString.call(maybeBlob)==="[object Blob]"){return!0}};qq.isXhrUploadSupported=function(){var input=document.createElement("input");input.type="file";return(input.multiple!==undefined&&typeof File!=="undefined"&&typeof FormData!=="undefined"&&typeof(qq.createXhrInstance()).upload!=="undefined")};qq.createXhrInstance=function(){if(window.XMLHttpRequest){return new XMLHttpRequest()}
try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(error){qq.log("Neither XHR or ActiveX are supported!","error");return null}};qq.isFolderDropSupported=function(dataTransfer){return dataTransfer.items&&dataTransfer.items.length>0&&dataTransfer.items[0].webkitGetAsEntry};qq.isFileChunkingSupported=function(){return!qq.androidStock()&&qq.isXhrUploadSupported()&&(File.prototype.slice!==undefined||File.prototype.webkitSlice!==undefined||File.prototype.mozSlice!==undefined)};qq.sliceBlob=function(fileOrBlob,start,end){var slicer=fileOrBlob.slice||fileOrBlob.mozSlice||fileOrBlob.webkitSlice;return slicer.call(fileOrBlob,start,end)};qq.arrayBufferToHex=function(buffer){var bytesAsHex="",bytes=new Uint8Array(buffer);qq.each(bytes,function(idx,byt){var byteAsHexStr=byt.toString(16);if(byteAsHexStr.length<2){byteAsHexStr="0"+byteAsHexStr}
bytesAsHex+=byteAsHexStr});return bytesAsHex};qq.readBlobToHex=function(blob,startOffset,length){var initialBlob=qq.sliceBlob(blob,startOffset,startOffset+length),fileReader=new FileReader(),promise=new qq.Promise();fileReader.onload=function(){promise.success(qq.arrayBufferToHex(fileReader.result))};fileReader.onerror=promise.failure;fileReader.readAsArrayBuffer(initialBlob);return promise};qq.extend=function(first,second,extendNested){qq.each(second,function(prop,val){if(extendNested&&qq.isObject(val)){if(first[prop]===undefined){first[prop]={}}
qq.extend(first[prop],val,!0)}else{first[prop]=val}});return first};qq.override=function(target,sourceFn){var super_={},source=sourceFn(super_);qq.each(source,function(srcPropName,srcPropVal){if(target[srcPropName]!==undefined){super_[srcPropName]=target[srcPropName]}
target[srcPropName]=srcPropVal});return target};qq.indexOf=function(arr,elt,from){if(arr.indexOf){return arr.indexOf(elt,from)}
from=from||0;var len=arr.length;if(from<0){from+=len}
for(;from<len;from+=1){if(arr.hasOwnProperty(from)&&arr[from]===elt){return from}}
return-1};qq.getUniqueId=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=="x"?r:(r&0x3|0x8);return v.toString(16)})};qq.ie=function(){return navigator.userAgent.indexOf("MSIE")!==-1||navigator.userAgent.indexOf("Trident")!==-1};qq.ie7=function(){return navigator.userAgent.indexOf("MSIE 7")!==-1};qq.ie8=function(){return navigator.userAgent.indexOf("MSIE 8")!==-1};qq.ie10=function(){return navigator.userAgent.indexOf("MSIE 10")!==-1};qq.ie11=function(){return qq.ie()&&navigator.userAgent.indexOf("rv:11")!==-1};qq.edge=function(){return navigator.userAgent.indexOf("Edge")>=0};qq.safari=function(){return navigator.vendor!==undefined&&navigator.vendor.indexOf("Apple")!==-1};qq.chrome=function(){return navigator.vendor!==undefined&&navigator.vendor.indexOf("Google")!==-1};qq.opera=function(){return navigator.vendor!==undefined&&navigator.vendor.indexOf("Opera")!==-1};qq.firefox=function(){return(!qq.edge()&&!qq.ie11()&&navigator.userAgent.indexOf("Mozilla")!==-1&&navigator.vendor!==undefined&&navigator.vendor==="")};qq.windows=function(){return navigator.platform==="Win32"};qq.android=function(){return navigator.userAgent.toLowerCase().indexOf("android")!==-1};qq.androidStock=function(){return qq.android()&&navigator.userAgent.toLowerCase().indexOf("chrome")<0};qq.ios6=function(){return qq.ios()&&navigator.userAgent.indexOf(" OS 6_")!==-1};qq.ios7=function(){return qq.ios()&&navigator.userAgent.indexOf(" OS 7_")!==-1};qq.ios8=function(){return qq.ios()&&navigator.userAgent.indexOf(" OS 8_")!==-1};qq.ios800=function(){return qq.ios()&&navigator.userAgent.indexOf(" OS 8_0 ")!==-1};qq.ios=function(){return navigator.userAgent.indexOf("iPad")!==-1||navigator.userAgent.indexOf("iPod")!==-1||navigator.userAgent.indexOf("iPhone")!==-1};qq.iosChrome=function(){return qq.ios()&&navigator.userAgent.indexOf("CriOS")!==-1};qq.iosSafari=function(){return qq.ios()&&!qq.iosChrome()&&navigator.userAgent.indexOf("Safari")!==-1};qq.iosSafariWebView=function(){return qq.ios()&&!qq.iosChrome()&&!qq.iosSafari()};qq.preventDefault=function(e){if(e.preventDefault){e.preventDefault()}else{e.returnValue=!1}};qq.toElement=(function(){var div=document.createElement("div");return function(html){div.innerHTML=html;var element=div.firstChild;div.removeChild(element);return element}}());qq.each=function(iterableItem,callback){var keyOrIndex,retVal;if(iterableItem){if(window.Storage&&iterableItem.constructor===window.Storage){for(keyOrIndex=0;keyOrIndex<iterableItem.length;keyOrIndex++){retVal=callback(iterableItem.key(keyOrIndex),iterableItem.getItem(iterableItem.key(keyOrIndex)));if(retVal===!1){break}}}else if(qq.isArray(iterableItem)||qq.isItemList(iterableItem)||qq.isNodeList(iterableItem)){for(keyOrIndex=0;keyOrIndex<iterableItem.length;keyOrIndex++){retVal=callback(keyOrIndex,iterableItem[keyOrIndex]);if(retVal===!1){break}}}else if(qq.isString(iterableItem)){for(keyOrIndex=0;keyOrIndex<iterableItem.length;keyOrIndex++){retVal=callback(keyOrIndex,iterableItem.charAt(keyOrIndex));if(retVal===!1){break}}}else{for(keyOrIndex in iterableItem){if(Object.prototype.hasOwnProperty.call(iterableItem,keyOrIndex)){retVal=callback(keyOrIndex,iterableItem[keyOrIndex]);if(retVal===!1){break}}}}}};qq.bind=function(oldFunc,context){if(qq.isFunction(oldFunc)){var args=Array.prototype.slice.call(arguments,2);return function(){var newArgs=qq.extend([],args);if(arguments.length){newArgs=newArgs.concat(Array.prototype.slice.call(arguments))}
return oldFunc.apply(context,newArgs)}}
throw new Error("first parameter must be a function!")};qq.obj2url=function(obj,temp,prefixDone){var uristrings=[],prefix="&",add=function(nextObj,i){var nextTemp=temp?(/\[\]$/.test(temp))?temp:temp+"["+i+"]":i;if((nextTemp!=="undefined")&&(i!=="undefined")){uristrings.push((typeof nextObj==="object")?qq.obj2url(nextObj,nextTemp,!0):(Object.prototype.toString.call(nextObj)==="[object Function]")?encodeURIComponent(nextTemp)+"="+encodeURIComponent(nextObj()):encodeURIComponent(nextTemp)+"="+encodeURIComponent(nextObj))}};if(!prefixDone&&temp){prefix=(/\?/.test(temp))?(/\?$/.test(temp))?"":"&":"?";uristrings.push(temp);uristrings.push(qq.obj2url(obj))}else if((Object.prototype.toString.call(obj)==="[object Array]")&&(typeof obj!=="undefined")){qq.each(obj,function(idx,val){add(val,idx)})}else if((typeof obj!=="undefined")&&(obj!==null)&&(typeof obj==="object")){qq.each(obj,function(prop,val){add(val,prop)})}else{uristrings.push(encodeURIComponent(temp)+"="+encodeURIComponent(obj))}
if(temp){return uristrings.join(prefix)}else{return uristrings.join(prefix).replace(/^&/,"").replace(/%20/g,"+")}};qq.obj2FormData=function(obj,formData,arrayKeyName){if(!formData){formData=new FormData()}
qq.each(obj,function(key,val){key=arrayKeyName?arrayKeyName+"["+key+"]":key;if(qq.isObject(val)){qq.obj2FormData(val,formData,key)}else if(qq.isFunction(val)){formData.append(key,val())}else{formData.append(key,val)}});return formData};qq.obj2Inputs=function(obj,form){var input;if(!form){form=document.createElement("form")}
qq.obj2FormData(obj,{append:function(key,val){input=document.createElement("input");input.setAttribute("name",key);input.setAttribute("value",val);form.appendChild(input)}});return form};qq.parseJson=function(json){if(window.JSON&&qq.isFunction(JSON.parse)){return JSON.parse(json)}else{return eval("("+json+")")}};qq.getExtension=function(filename){var extIdx=filename.lastIndexOf(".")+1;if(extIdx>0){return filename.substr(extIdx,filename.length-extIdx)}};qq.getFilename=function(blobOrFileInput){if(qq.isInput(blobOrFileInput)){return blobOrFileInput.value.replace(/.*(\/|\\)/,"")}else if(qq.isFile(blobOrFileInput)){if(blobOrFileInput.fileName!==null&&blobOrFileInput.fileName!==undefined){return blobOrFileInput.fileName}}
return blobOrFileInput.name};qq.DisposeSupport=function(){var disposers=[];return{dispose:function(){var disposer;do{disposer=disposers.shift();if(disposer){disposer()}}
while(disposer);},attach:function(){var args=arguments;this.addDisposer(qq(args[0]).attach.apply(this,Array.prototype.slice.call(arguments,1)))},addDisposer:function(disposeFunction){disposers.push(disposeFunction)}}}}());(function(){"use strict";qq.Error=function(message){this.message="[Fine Uploader "+qq.version+"] "+message};qq.Error.prototype=new Error()}());qq.version="5.10.1";qq.supportedFeatures=(function(){"use strict";var supportsUploading,supportsUploadingBlobs,supportsFileDrop,supportsAjaxFileUploading,supportsFolderDrop,supportsChunking,supportsResume,supportsUploadViaPaste,supportsUploadCors,supportsDeleteFileXdr,supportsDeleteFileCorsXhr,supportsDeleteFileCors,supportsFolderSelection,supportsImagePreviews,supportsUploadProgress;function testSupportsFileInputElement(){var supported=!0,tempInput;try{tempInput=document.createElement("input");tempInput.type="file";qq(tempInput).hide();if(tempInput.disabled){supported=!1}}catch(ex){supported=!1}
return supported}
function isChrome21OrHigher(){return(qq.chrome()||qq.opera())&&navigator.userAgent.match(/Chrome\/[2][1-9]|Chrome\/[3-9][0-9]/)!==undefined}
function isChrome14OrHigher(){return(qq.chrome()||qq.opera())&&navigator.userAgent.match(/Chrome\/[1][4-9]|Chrome\/[2-9][0-9]/)!==undefined}
function isCrossOriginXhrSupported(){if(window.XMLHttpRequest){var xhr=qq.createXhrInstance();return xhr.withCredentials!==undefined}
return!1}
function isXdrSupported(){return window.XDomainRequest!==undefined}
function isCrossOriginAjaxSupported(){if(isCrossOriginXhrSupported()){return!0}
return isXdrSupported()}
function isFolderSelectionSupported(){return document.createElement("input").webkitdirectory!==undefined}
function isLocalStorageSupported(){try{return!!window.localStorage&&qq.isFunction(window.localStorage.setItem)}catch(error){return!1}}
function isDragAndDropSupported(){var span=document.createElement("span");return("draggable" in span||("ondragstart" in span&&"ondrop" in span))&&!qq.android()&&!qq.ios()}
supportsUploading=testSupportsFileInputElement();supportsAjaxFileUploading=supportsUploading&&qq.isXhrUploadSupported();supportsUploadingBlobs=supportsAjaxFileUploading&&!qq.androidStock();supportsFileDrop=supportsAjaxFileUploading&&isDragAndDropSupported();supportsFolderDrop=supportsFileDrop&&isChrome21OrHigher();supportsChunking=supportsAjaxFileUploading&&qq.isFileChunkingSupported();supportsResume=supportsAjaxFileUploading&&supportsChunking&&isLocalStorageSupported();supportsUploadViaPaste=supportsAjaxFileUploading&&isChrome14OrHigher();supportsUploadCors=supportsUploading&&(window.postMessage!==undefined||supportsAjaxFileUploading);supportsDeleteFileCorsXhr=isCrossOriginXhrSupported();supportsDeleteFileXdr=isXdrSupported();supportsDeleteFileCors=isCrossOriginAjaxSupported();supportsFolderSelection=isFolderSelectionSupported();supportsImagePreviews=supportsAjaxFileUploading&&window.FileReader!==undefined;supportsUploadProgress=(function(){if(supportsAjaxFileUploading){return!qq.androidStock()&&!qq.iosChrome()}
return!1}());return{ajaxUploading:supportsAjaxFileUploading,blobUploading:supportsUploadingBlobs,canDetermineSize:supportsAjaxFileUploading,chunking:supportsChunking,deleteFileCors:supportsDeleteFileCors,deleteFileCorsXdr:supportsDeleteFileXdr,deleteFileCorsXhr:supportsDeleteFileCorsXhr,dialogElement:!!window.HTMLDialogElement,fileDrop:supportsFileDrop,folderDrop:supportsFolderDrop,folderSelection:supportsFolderSelection,imagePreviews:supportsImagePreviews,imageValidation:supportsImagePreviews,itemSizeValidation:supportsAjaxFileUploading,pause:supportsChunking,progressBar:supportsUploadProgress,resume:supportsResume,scaling:supportsImagePreviews&&supportsUploadingBlobs,tiffPreviews:qq.safari(),unlimitedScaledImageSize:!qq.ios(),uploading:supportsUploading,uploadCors:supportsUploadCors,uploadCustomHeaders:supportsAjaxFileUploading,uploadNonMultipart:supportsAjaxFileUploading,uploadViaPaste:supportsUploadViaPaste}}());qq.isGenericPromise=function(maybePromise){"use strict";return!!(maybePromise&&maybePromise.then&&qq.isFunction(maybePromise.then))};qq.Promise=function(){"use strict";var successArgs,failureArgs,successCallbacks=[],failureCallbacks=[],doneCallbacks=[],state=0;qq.extend(this,{then:function(onSuccess,onFailure){if(state===0){if(onSuccess){successCallbacks.push(onSuccess)}
if(onFailure){failureCallbacks.push(onFailure)}}else if(state===-1){onFailure&&onFailure.apply(null,failureArgs)}else if(onSuccess){onSuccess.apply(null,successArgs)}
return this},done:function(callback){if(state===0){doneCallbacks.push(callback)}else{callback.apply(null,failureArgs===undefined?successArgs:failureArgs)}
return this},success:function(){state=1;successArgs=arguments;if(successCallbacks.length){qq.each(successCallbacks,function(idx,callback){callback.apply(null,successArgs)})}
if(doneCallbacks.length){qq.each(doneCallbacks,function(idx,callback){callback.apply(null,successArgs)})}
return this},failure:function(){state=-1;failureArgs=arguments;if(failureCallbacks.length){qq.each(failureCallbacks,function(idx,callback){callback.apply(null,failureArgs)})}
if(doneCallbacks.length){qq.each(doneCallbacks,function(idx,callback){callback.apply(null,failureArgs)})}
return this}})};qq.BlobProxy=function(referenceBlob,onCreate){"use strict";qq.extend(this,{referenceBlob:referenceBlob,create:function(){return onCreate(referenceBlob)}})};qq.UploadButton=function(o){"use strict";var self=this,disposeSupport=new qq.DisposeSupport(),options={acceptFiles:null,element:null,focusClass:"qq-upload-button-focus",folders:!1,hoverClass:"qq-upload-button-hover",ios8BrowserCrashWorkaround:!1,multiple:!1,name:"qqfile",onChange:function(input){},title:null},input,buttonId;qq.extend(options,o);buttonId=qq.getUniqueId();function createInput(){var input=document.createElement("input");input.setAttribute(qq.UploadButton.BUTTON_ID_ATTR_NAME,buttonId);input.setAttribute("title",options.title);self.setMultiple(options.multiple,input);if(options.folders&&qq.supportedFeatures.folderSelection){input.setAttribute("webkitdirectory","")}
if(options.acceptFiles){input.setAttribute("accept",options.acceptFiles)}
input.setAttribute("type","file");input.setAttribute("name",options.name);qq(input).css({position:"absolute",right:0,top:0,fontFamily:"Arial",fontSize:qq.ie()&&!qq.ie8()?"3500px":"118px",margin:0,padding:0,cursor:"pointer",opacity:0});!qq.ie7()&&qq(input).css({height:"100%"});options.element.appendChild(input);disposeSupport.attach(input,"change",function(){options.onChange(input)});disposeSupport.attach(input,"mouseover",function(){qq(options.element).addClass(options.hoverClass)});disposeSupport.attach(input,"mouseout",function(){qq(options.element).removeClass(options.hoverClass)});disposeSupport.attach(input,"focus",function(){qq(options.element).addClass(options.focusClass)});disposeSupport.attach(input,"blur",function(){qq(options.element).removeClass(options.focusClass)});return input}
qq(options.element).css({position:"relative",overflow:"hidden",direction:"ltr"});qq.extend(this,{getInput:function(){return input},getButtonId:function(){return buttonId},setMultiple:function(isMultiple,optInput){var input=optInput||this.getInput();if(options.ios8BrowserCrashWorkaround&&qq.ios8()&&(qq.iosChrome()||qq.iosSafariWebView())){input.setAttribute("multiple","")}else{if(isMultiple){input.setAttribute("multiple","")}else{input.removeAttribute("multiple")}}},setAcceptFiles:function(acceptFiles){if(acceptFiles!==options.acceptFiles){input.setAttribute("accept",acceptFiles)}},reset:function(){if(input.parentNode){qq(input).remove()}
qq(options.element).removeClass(options.focusClass);input=null;input=createInput()}});input=createInput()};qq.UploadButton.BUTTON_ID_ATTR_NAME="qq-button-id";qq.UploadData=function(uploaderProxy){"use strict";var data=[],byUuid={},byStatus={},byProxyGroupId={},byBatchId={};function getDataByIds(idOrIds){if(qq.isArray(idOrIds)){var entries=[];qq.each(idOrIds,function(idx,id){entries.push(data[id])});return entries}
return data[idOrIds]}
function getDataByUuids(uuids){if(qq.isArray(uuids)){var entries=[];qq.each(uuids,function(idx,uuid){entries.push(data[byUuid[uuid]])});return entries}
return data[byUuid[uuids]]}
function getDataByStatus(status){var statusResults=[],statuses=[].concat(status);qq.each(statuses,function(index,statusEnum){var statusResultIndexes=byStatus[statusEnum];if(statusResultIndexes!==undefined){qq.each(statusResultIndexes,function(i,dataIndex){statusResults.push(data[dataIndex])})}});return statusResults}
qq.extend(this,{addFile:function(spec){var status=spec.status||qq.status.SUBMITTING,id=data.push({name:spec.name,originalName:spec.name,uuid:spec.uuid,size:spec.size==null?-1:spec.size,status:status})-1;if(spec.batchId){data[id].batchId=spec.batchId;if(byBatchId[spec.batchId]===undefined){byBatchId[spec.batchId]=[]}
byBatchId[spec.batchId].push(id)}
if(spec.proxyGroupId){data[id].proxyGroupId=spec.proxyGroupId;if(byProxyGroupId[spec.proxyGroupId]===undefined){byProxyGroupId[spec.proxyGroupId]=[]}
byProxyGroupId[spec.proxyGroupId].push(id)}
data[id].id=id;byUuid[spec.uuid]=id;if(byStatus[status]===undefined){byStatus[status]=[]}
byStatus[status].push(id);uploaderProxy.onStatusChange(id,null,status);return id},retrieve:function(optionalFilter){if(qq.isObject(optionalFilter)&&data.length){if(optionalFilter.id!==undefined){return getDataByIds(optionalFilter.id)}else if(optionalFilter.uuid!==undefined){return getDataByUuids(optionalFilter.uuid)}else if(optionalFilter.status){return getDataByStatus(optionalFilter.status)}}else{return qq.extend([],data,!0)}},reset:function(){data=[];byUuid={};byStatus={};byBatchId={}},setStatus:function(id,newStatus){var oldStatus=data[id].status,byStatusOldStatusIndex=qq.indexOf(byStatus[oldStatus],id);byStatus[oldStatus].splice(byStatusOldStatusIndex,1);data[id].status=newStatus;if(byStatus[newStatus]===undefined){byStatus[newStatus]=[]}
byStatus[newStatus].push(id);uploaderProxy.onStatusChange(id,oldStatus,newStatus)},uuidChanged:function(id,newUuid){var oldUuid=data[id].uuid;data[id].uuid=newUuid;byUuid[newUuid]=id;delete byUuid[oldUuid]},updateName:function(id,newName){data[id].name=newName},updateSize:function(id,newSize){data[id].size=newSize},setParentId:function(targetId,parentId){data[targetId].parentId=parentId},getIdsInProxyGroup:function(id){var proxyGroupId=data[id].proxyGroupId;if(proxyGroupId){return byProxyGroupId[proxyGroupId]}
return[]},getIdsInBatch:function(id){var batchId=data[id].batchId;return byBatchId[batchId]}})};qq.status={SUBMITTING:"submitting",SUBMITTED:"submitted",REJECTED:"rejected",QUEUED:"queued",CANCELED:"canceled",PAUSED:"paused",UPLOADING:"uploading",UPLOAD_RETRYING:"retrying upload",UPLOAD_SUCCESSFUL:"upload successful",UPLOAD_FAILED:"upload failed",DELETE_FAILED:"delete failed",DELETING:"deleting",DELETED:"deleted"};(function(){"use strict";qq.basePublicApi={addBlobs:function(blobDataOrArray,params,endpoint){this.addFiles(blobDataOrArray,params,endpoint)},addInitialFiles:function(cannedFileList){var self=this;qq.each(cannedFileList,function(index,cannedFile){self._addCannedFile(cannedFile)})},addFiles:function(data,params,endpoint){this._maybeHandleIos8SafariWorkaround();var batchId=this._storedIds.length===0?qq.getUniqueId():this._currentBatchId,processBlob=qq.bind(function(blob){this._handleNewFile({blob:blob,name:this._options.blobs.defaultName},batchId,verifiedFiles)},this),processBlobData=qq.bind(function(blobData){this._handleNewFile(blobData,batchId,verifiedFiles)},this),processCanvas=qq.bind(function(canvas){var blob=qq.canvasToBlob(canvas);this._handleNewFile({blob:blob,name:this._options.blobs.defaultName+".png"},batchId,verifiedFiles)},this),processCanvasData=qq.bind(function(canvasData){var normalizedQuality=canvasData.quality&&canvasData.quality/100,blob=qq.canvasToBlob(canvasData.canvas,canvasData.type,normalizedQuality);this._handleNewFile({blob:blob,name:canvasData.name},batchId,verifiedFiles)},this),processFileOrInput=qq.bind(function(fileOrInput){if(qq.isInput(fileOrInput)&&qq.supportedFeatures.ajaxUploading){var files=Array.prototype.slice.call(fileOrInput.files),self=this;qq.each(files,function(idx,file){self._handleNewFile(file,batchId,verifiedFiles)})}else{this._handleNewFile(fileOrInput,batchId,verifiedFiles)}},this),normalizeData=function(){if(qq.isFileList(data)){data=Array.prototype.slice.call(data)}
data=[].concat(data)},self=this,verifiedFiles=[];this._currentBatchId=batchId;if(data){normalizeData();qq.each(data,function(idx,fileContainer){if(qq.isFileOrInput(fileContainer)){processFileOrInput(fileContainer)}else if(qq.isBlob(fileContainer)){processBlob(fileContainer)}else if(qq.isObject(fileContainer)){if(fileContainer.blob&&fileContainer.name){processBlobData(fileContainer)}else if(fileContainer.canvas&&fileContainer.name){processCanvasData(fileContainer)}}else if(fileContainer.tagName&&fileContainer.tagName.toLowerCase()==="canvas"){processCanvas(fileContainer)}else{self.log(fileContainer+" is not a valid file container!  Ignoring!","warn")}});this.log("Received "+verifiedFiles.length+" files.");this._prepareItemsForUpload(verifiedFiles,params,endpoint)}},cancel:function(id){this._handler.cancel(id)},cancelAll:function(){var storedIdsCopy=[],self=this;qq.extend(storedIdsCopy,this._storedIds);qq.each(storedIdsCopy,function(idx,storedFileId){self.cancel(storedFileId)});this._handler.cancelAll()},clearStoredFiles:function(){this._storedIds=[]},continueUpload:function(id){var uploadData=this._uploadData.retrieve({id:id});if(!qq.supportedFeatures.pause||!this._options.chunking.enabled){return!1}
if(uploadData.status===qq.status.PAUSED){this.log(qq.format("Paused file ID {} ({}) will be continued.  Not paused.",id,this.getName(id)));this._uploadFile(id);return!0}else{this.log(qq.format("Ignoring continue for file ID {} ({}).  Not paused.",id,this.getName(id)),"error")}
return!1},deleteFile:function(id){return this._onSubmitDelete(id)},doesExist:function(fileOrBlobId){return this._handler.isValid(fileOrBlobId)},drawThumbnail:function(fileId,imgOrCanvas,maxSize,fromServer,customResizeFunction){var promiseToReturn=new qq.Promise(),fileOrUrl,options;if(this._imageGenerator){fileOrUrl=this._thumbnailUrls[fileId];options={customResizeFunction:customResizeFunction,maxSize:maxSize>0?maxSize:null,scale:maxSize>0};if(!fromServer&&qq.supportedFeatures.imagePreviews){fileOrUrl=this.getFile(fileId)}
if(fileOrUrl==null){promiseToReturn.failure({container:imgOrCanvas,error:"File or URL not found."})}else{this._imageGenerator.generate(fileOrUrl,imgOrCanvas,options).then(function success(modifiedContainer){promiseToReturn.success(modifiedContainer)},function failure(container,reason){promiseToReturn.failure({container:container,error:reason||"Problem generating thumbnail"})})}}else{promiseToReturn.failure({container:imgOrCanvas,error:"Missing image generator module"})}
return promiseToReturn},getButton:function(fileId){return this._getButton(this._buttonIdsForFileIds[fileId])},getEndpoint:function(fileId){return this._endpointStore.get(fileId)},getFile:function(fileOrBlobId){return this._handler.getFile(fileOrBlobId)||null},getInProgress:function(){return this._uploadData.retrieve({status:[qq.status.UPLOADING,qq.status.UPLOAD_RETRYING,qq.status.QUEUED]}).length},getName:function(id){return this._uploadData.retrieve({id:id}).name},getParentId:function(id){var uploadDataEntry=this.getUploads({id:id}),parentId=null;if(uploadDataEntry){if(uploadDataEntry.parentId!==undefined){parentId=uploadDataEntry.parentId}}
return parentId},getResumableFilesData:function(){return this._handler.getResumableFilesData()},getSize:function(id){return this._uploadData.retrieve({id:id}).size},getNetUploads:function(){return this._netUploaded},getRemainingAllowedItems:function(){var allowedItems=this._currentItemLimit;if(allowedItems>0){return allowedItems-this._netUploadedOrQueued}
return null},getUploads:function(optionalFilter){return this._uploadData.retrieve(optionalFilter)},getUuid:function(id){return this._uploadData.retrieve({id:id}).uuid},log:function(str,level){if(this._options.debug&&(!level||level==="info")){qq.log("[Fine Uploader "+qq.version+"] "+str)}else if(level&&level!=="info"){qq.log("[Fine Uploader "+qq.version+"] "+str,level)}},pauseUpload:function(id){var uploadData=this._uploadData.retrieve({id:id});if(!qq.supportedFeatures.pause||!this._options.chunking.enabled){return!1}
if(qq.indexOf([qq.status.UPLOADING,qq.status.UPLOAD_RETRYING],uploadData.status)>=0){if(this._handler.pause(id)){this._uploadData.setStatus(id,qq.status.PAUSED);return!0}else{this.log(qq.format("Unable to pause file ID {} ({}).",id,this.getName(id)),"error")}}else{this.log(qq.format("Ignoring pause for file ID {} ({}).  Not in progress.",id,this.getName(id)),"error")}
return!1},reset:function(){this.log("Resetting uploader...");this._handler.reset();this._storedIds=[];this._autoRetries=[];this._retryTimeouts=[];this._preventRetries=[];this._thumbnailUrls=[];qq.each(this._buttons,function(idx,button){button.reset()});this._paramsStore.reset();this._endpointStore.reset();this._netUploadedOrQueued=0;this._netUploaded=0;this._uploadData.reset();this._buttonIdsForFileIds=[];this._pasteHandler&&this._pasteHandler.reset();this._options.session.refreshOnReset&&this._refreshSessionData();this._succeededSinceLastAllComplete=[];this._failedSinceLastAllComplete=[];this._totalProgress&&this._totalProgress.reset()},retry:function(id){return this._manualRetry(id)},scaleImage:function(id,specs){var self=this;return qq.Scaler.prototype.scaleImage(id,specs,{log:qq.bind(self.log,self),getFile:qq.bind(self.getFile,self),uploadData:self._uploadData})},setCustomHeaders:function(headers,id){this._customHeadersStore.set(headers,id)},setDeleteFileCustomHeaders:function(headers,id){this._deleteFileCustomHeadersStore.set(headers,id)},setDeleteFileEndpoint:function(endpoint,id){this._deleteFileEndpointStore.set(endpoint,id)},setDeleteFileParams:function(params,id){this._deleteFileParamsStore.set(params,id)},setEndpoint:function(endpoint,id){this._endpointStore.set(endpoint,id)},setForm:function(elementOrId){this._updateFormSupportAndParams(elementOrId)},setItemLimit:function(newItemLimit){this._currentItemLimit=newItemLimit},setName:function(id,newName){this._uploadData.updateName(id,newName)},setParams:function(params,id){this._paramsStore.set(params,id)},setUuid:function(id,newUuid){return this._uploadData.uuidChanged(id,newUuid)},uploadStoredFiles:function(){if(this._storedIds.length===0){this._itemError("noFilesError")}else{this._uploadStoredFiles()}}};qq.basePrivateApi={_addCannedFile:function(sessionData){var id=this._uploadData.addFile({uuid:sessionData.uuid,name:sessionData.name,size:sessionData.size,status:qq.status.UPLOAD_SUCCESSFUL});sessionData.deleteFileEndpoint&&this.setDeleteFileEndpoint(sessionData.deleteFileEndpoint,id);sessionData.deleteFileParams&&this.setDeleteFileParams(sessionData.deleteFileParams,id);if(sessionData.thumbnailUrl){this._thumbnailUrls[id]=sessionData.thumbnailUrl}
this._netUploaded++;this._netUploadedOrQueued++;return id},_annotateWithButtonId:function(file,associatedInput){if(qq.isFile(file)){file.qqButtonId=this._getButtonId(associatedInput)}},_batchError:function(message){this._options.callbacks.onError(null,null,message,undefined)},_createDeleteHandler:function(){var self=this;return new qq.DeleteFileAjaxRequester({method:this._options.deleteFile.method.toUpperCase(),maxConnections:this._options.maxConnections,uuidParamName:this._options.request.uuidName,customHeaders:this._deleteFileCustomHeadersStore,paramsStore:this._deleteFileParamsStore,endpointStore:this._deleteFileEndpointStore,cors:this._options.cors,log:qq.bind(self.log,self),onDelete:function(id){self._onDelete(id);self._options.callbacks.onDelete(id)},onDeleteComplete:function(id,xhrOrXdr,isError){self._onDeleteComplete(id,xhrOrXdr,isError);self._options.callbacks.onDeleteComplete(id,xhrOrXdr,isError)}})},_createPasteHandler:function(){var self=this;return new qq.PasteSupport({targetElement:this._options.paste.targetElement,callbacks:{log:qq.bind(self.log,self),pasteReceived:function(blob){self._handleCheckedCallback({name:"onPasteReceived",callback:qq.bind(self._options.callbacks.onPasteReceived,self,blob),onSuccess:qq.bind(self._handlePasteSuccess,self,blob),identifier:"pasted image"})}}})},_createStore:function(initialValue,_readOnlyValues_){var store={},catchall=initialValue,perIdReadOnlyValues={},readOnlyValues=_readOnlyValues_,copy=function(orig){if(qq.isObject(orig)){return qq.extend({},orig)}
return orig},getReadOnlyValues=function(){if(qq.isFunction(readOnlyValues)){return readOnlyValues()}
return readOnlyValues},includeReadOnlyValues=function(id,existing){if(readOnlyValues&&qq.isObject(existing)){qq.extend(existing,getReadOnlyValues())}
if(perIdReadOnlyValues[id]){qq.extend(existing,perIdReadOnlyValues[id])}};return{set:function(val,id){if(id==null){store={};catchall=copy(val)}else{store[id]=copy(val)}},get:function(id){var values;if(id!=null&&store[id]){values=store[id]}else{values=copy(catchall)}
includeReadOnlyValues(id,values);return copy(values)},addReadOnly:function(id,values){if(qq.isObject(store)){if(id===null){if(qq.isFunction(values)){readOnlyValues=values}else{readOnlyValues=readOnlyValues||{};qq.extend(readOnlyValues,values)}}else{perIdReadOnlyValues[id]=perIdReadOnlyValues[id]||{};qq.extend(perIdReadOnlyValues[id],values)}}},remove:function(fileId){return delete store[fileId]},reset:function(){store={};perIdReadOnlyValues={};catchall=initialValue}}},_createUploadDataTracker:function(){var self=this;return new qq.UploadData({getName:function(id){return self.getName(id)},getUuid:function(id){return self.getUuid(id)},getSize:function(id){return self.getSize(id)},onStatusChange:function(id,oldStatus,newStatus){self._onUploadStatusChange(id,oldStatus,newStatus);self._options.callbacks.onStatusChange(id,oldStatus,newStatus);self._maybeAllComplete(id,newStatus);if(self._totalProgress){setTimeout(function(){self._totalProgress.onStatusChange(id,oldStatus,newStatus)},0)}}})},_createUploadButton:function(spec){var self=this,acceptFiles=spec.accept||this._options.validation.acceptFiles,allowedExtensions=spec.allowedExtensions||this._options.validation.allowedExtensions,button;function allowMultiple(){if(qq.supportedFeatures.ajaxUploading){if(self._options.workarounds.iosEmptyVideos&&qq.ios()&&!qq.ios6()&&self._isAllowedExtension(allowedExtensions,".mov")){return!1}
if(spec.multiple===undefined){return self._options.multiple}
return spec.multiple}
return!1}
button=new qq.UploadButton({acceptFiles:acceptFiles,element:spec.element,focusClass:this._options.classes.buttonFocus,folders:spec.folders,hoverClass:this._options.classes.buttonHover,ios8BrowserCrashWorkaround:this._options.workarounds.ios8BrowserCrash,multiple:allowMultiple(),name:this._options.request.inputName,onChange:function(input){self._onInputChange(input)},title:spec.title==null?this._options.text.fileInputTitle:spec.title});this._disposeSupport.addDisposer(function(){button.dispose()});self._buttons.push(button);return button},_createUploadHandler:function(additionalOptions,namespace){var self=this,lastOnProgress={},options={debug:this._options.debug,maxConnections:this._options.maxConnections,cors:this._options.cors,paramsStore:this._paramsStore,endpointStore:this._endpointStore,chunking:this._options.chunking,resume:this._options.resume,blobs:this._options.blobs,log:qq.bind(self.log,self),preventRetryParam:this._options.retry.preventRetryResponseProperty,onProgress:function(id,name,loaded,total){if(loaded<0||total<0){return}
if(lastOnProgress[id]){if(lastOnProgress[id].loaded!==loaded||lastOnProgress[id].total!==total){self._onProgress(id,name,loaded,total);self._options.callbacks.onProgress(id,name,loaded,total)}}else{self._onProgress(id,name,loaded,total);self._options.callbacks.onProgress(id,name,loaded,total)}
lastOnProgress[id]={loaded:loaded,total:total}},onComplete:function(id,name,result,xhr){delete lastOnProgress[id];var status=self.getUploads({id:id}).status,retVal;if(status===qq.status.UPLOAD_SUCCESSFUL||status===qq.status.UPLOAD_FAILED){return}
retVal=self._onComplete(id,name,result,xhr);if(retVal instanceof qq.Promise){retVal.done(function(){self._options.callbacks.onComplete(id,name,result,xhr)})}else{self._options.callbacks.onComplete(id,name,result,xhr)}},onCancel:function(id,name,cancelFinalizationEffort){var promise=new qq.Promise();self._handleCheckedCallback({name:"onCancel",callback:qq.bind(self._options.callbacks.onCancel,self,id,name),onFailure:promise.failure,onSuccess:function(){cancelFinalizationEffort.then(function(){self._onCancel(id,name)});promise.success()},identifier:id});return promise},onUploadPrep:qq.bind(this._onUploadPrep,this),onUpload:function(id,name){self._onUpload(id,name);self._options.callbacks.onUpload(id,name)},onUploadChunk:function(id,name,chunkData){self._onUploadChunk(id,chunkData);self._options.callbacks.onUploadChunk(id,name,chunkData)},onUploadChunkSuccess:function(id,chunkData,result,xhr){self._options.callbacks.onUploadChunkSuccess.apply(self,arguments)},onResume:function(id,name,chunkData){return self._options.callbacks.onResume(id,name,chunkData)},onAutoRetry:function(id,name,responseJSON,xhr){return self._onAutoRetry.apply(self,arguments)},onUuidChanged:function(id,newUuid){self.log("Server requested UUID change from '"+self.getUuid(id)+"' to '"+newUuid+"'");self.setUuid(id,newUuid)},getName:qq.bind(self.getName,self),getUuid:qq.bind(self.getUuid,self),getSize:qq.bind(self.getSize,self),setSize:qq.bind(self._setSize,self),getDataByUuid:function(uuid){return self.getUploads({uuid:uuid})},isQueued:function(id){var status=self.getUploads({id:id}).status;return status===qq.status.QUEUED||status===qq.status.SUBMITTED||status===qq.status.UPLOAD_RETRYING||status===qq.status.PAUSED},getIdsInProxyGroup:self._uploadData.getIdsInProxyGroup,getIdsInBatch:self._uploadData.getIdsInBatch};qq.each(this._options.request,function(prop,val){options[prop]=val});options.customHeaders=this._customHeadersStore;if(additionalOptions){qq.each(additionalOptions,function(key,val){options[key]=val})}
return new qq.UploadHandlerController(options,namespace)},_fileOrBlobRejected:function(id){this._netUploadedOrQueued--;this._uploadData.setStatus(id,qq.status.REJECTED)},_formatSize:function(bytes){var i=-1;do{bytes=bytes/1000;i++}while(bytes>999);return Math.max(bytes,0.1).toFixed(1)+this._options.text.sizeSymbols[i]},_generateExtraButtonSpecs:function(){var self=this;this._extraButtonSpecs={};qq.each(this._options.extraButtons,function(idx,extraButtonOptionEntry){var multiple=extraButtonOptionEntry.multiple,validation=qq.extend({},self._options.validation,!0),extraButtonSpec=qq.extend({},extraButtonOptionEntry);if(multiple===undefined){multiple=self._options.multiple}
if(extraButtonSpec.validation){qq.extend(validation,extraButtonOptionEntry.validation,!0)}
qq.extend(extraButtonSpec,{multiple:multiple,validation:validation},!0);self._initExtraButton(extraButtonSpec)})},_getButton:function(buttonId){var extraButtonsSpec=this._extraButtonSpecs[buttonId];if(extraButtonsSpec){return extraButtonsSpec.element}else if(buttonId===this._defaultButtonId){return this._options.button}},_getButtonId:function(buttonOrFileInputOrFile){var inputs,fileInput,fileBlobOrInput=buttonOrFileInputOrFile;if(fileBlobOrInput instanceof qq.BlobProxy){fileBlobOrInput=fileBlobOrInput.referenceBlob}
if(fileBlobOrInput&&!qq.isBlob(fileBlobOrInput)){if(qq.isFile(fileBlobOrInput)){return fileBlobOrInput.qqButtonId}else if(fileBlobOrInput.tagName.toLowerCase()==="input"&&fileBlobOrInput.type.toLowerCase()==="file"){return fileBlobOrInput.getAttribute(qq.UploadButton.BUTTON_ID_ATTR_NAME)}
inputs=fileBlobOrInput.getElementsByTagName("input");qq.each(inputs,function(idx,input){if(input.getAttribute("type")==="file"){fileInput=input;return!1}});if(fileInput){return fileInput.getAttribute(qq.UploadButton.BUTTON_ID_ATTR_NAME)}}},_getNotFinished:function(){return this._uploadData.retrieve({status:[qq.status.UPLOADING,qq.status.UPLOAD_RETRYING,qq.status.QUEUED,qq.status.SUBMITTING,qq.status.SUBMITTED,qq.status.PAUSED]}).length},_getValidationBase:function(buttonId){var extraButtonSpec=this._extraButtonSpecs[buttonId];return extraButtonSpec?extraButtonSpec.validation:this._options.validation},_getValidationDescriptor:function(fileWrapper){if(fileWrapper.file instanceof qq.BlobProxy){return{name:qq.getFilename(fileWrapper.file.referenceBlob),size:fileWrapper.file.referenceBlob.size}}
return{name:this.getUploads({id:fileWrapper.id}).name,size:this.getUploads({id:fileWrapper.id}).size}},_getValidationDescriptors:function(fileWrappers){var self=this,fileDescriptors=[];qq.each(fileWrappers,function(idx,fileWrapper){fileDescriptors.push(self._getValidationDescriptor(fileWrapper))});return fileDescriptors},_handleCameraAccess:function(){if(this._options.camera.ios&&qq.ios()){var acceptIosCamera="image/*;capture=camera",button=this._options.camera.button,buttonId=button?this._getButtonId(button):this._defaultButtonId,optionRoot=this._options;if(buttonId&&buttonId!==this._defaultButtonId){optionRoot=this._extraButtonSpecs[buttonId]}
optionRoot.multiple=!1;if(optionRoot.validation.acceptFiles===null){optionRoot.validation.acceptFiles=acceptIosCamera}else{optionRoot.validation.acceptFiles+=","+acceptIosCamera}
qq.each(this._buttons,function(idx,button){if(button.getButtonId()===buttonId){button.setMultiple(optionRoot.multiple);button.setAcceptFiles(optionRoot.acceptFiles);return!1}})}},_handleCheckedCallback:function(details){var self=this,callbackRetVal=details.callback();if(qq.isGenericPromise(callbackRetVal)){this.log(details.name+" - waiting for "+details.name+" promise to be fulfilled for "+details.identifier);return callbackRetVal.then(function(successParam){self.log(details.name+" promise success for "+details.identifier);details.onSuccess(successParam)},function(){if(details.onFailure){self.log(details.name+" promise failure for "+details.identifier);details.onFailure()}else{self.log(details.name+" promise failure for "+details.identifier)}})}
if(callbackRetVal!==!1){details.onSuccess(callbackRetVal)}else{if(details.onFailure){this.log(details.name+" - return value was 'false' for "+details.identifier+".  Invoking failure callback.");details.onFailure()}else{this.log(details.name+" - return value was 'false' for "+details.identifier+".  Will not proceed.")}}
return callbackRetVal},_handleNewFile:function(file,batchId,newFileWrapperList){var self=this,uuid=qq.getUniqueId(),size=-1,name=qq.getFilename(file),actualFile=file.blob||file,handler=this._customNewFileHandler?this._customNewFileHandler:qq.bind(self._handleNewFileGeneric,self);if(!qq.isInput(actualFile)&&actualFile.size>=0){size=actualFile.size}
handler(actualFile,name,uuid,size,newFileWrapperList,batchId,this._options.request.uuidName,{uploadData:self._uploadData,paramsStore:self._paramsStore,addFileToHandler:function(id,file){self._handler.add(id,file);self._netUploadedOrQueued++;self._trackButton(id)}})},_handleNewFileGeneric:function(file,name,uuid,size,fileList,batchId){var id=this._uploadData.addFile({uuid:uuid,name:name,size:size,batchId:batchId});this._handler.add(id,file);this._trackButton(id);this._netUploadedOrQueued++;fileList.push({id:id,file:file})},_handlePasteSuccess:function(blob,extSuppliedName){var extension=blob.type.split("/")[1],name=extSuppliedName;if(name==null){name=this._options.paste.defaultName}
name+="."+extension;this.addFiles({name:name,blob:blob})},_initExtraButton:function(spec){var button=this._createUploadButton({accept:spec.validation.acceptFiles,allowedExtensions:spec.validation.allowedExtensions,element:spec.element,folders:spec.folders,multiple:spec.multiple,title:spec.fileInputTitle});this._extraButtonSpecs[button.getButtonId()]=spec},_initFormSupportAndParams:function(){this._formSupport=qq.FormSupport&&new qq.FormSupport(this._options.form,qq.bind(this.uploadStoredFiles,this),qq.bind(this.log,this));if(this._formSupport&&this._formSupport.attachedToForm){this._paramsStore=this._createStore(this._options.request.params,this._formSupport.getFormInputsAsObject);this._options.autoUpload=this._formSupport.newAutoUpload;if(this._formSupport.newEndpoint){this._options.request.endpoint=this._formSupport.newEndpoint}}else{this._paramsStore=this._createStore(this._options.request.params)}},_isDeletePossible:function(){if(!qq.DeleteFileAjaxRequester||!this._options.deleteFile.enabled){return!1}
if(this._options.cors.expected){if(qq.supportedFeatures.deleteFileCorsXhr){return!0}
if(qq.supportedFeatures.deleteFileCorsXdr&&this._options.cors.allowXdr){return!0}
return!1}
return!0},_isAllowedExtension:function(allowed,fileName){var valid=!1;if(!allowed.length){return!0}
qq.each(allowed,function(idx,allowedExt){if(qq.isString(allowedExt)){var extRegex=new RegExp("\\."+allowedExt+"$","i");if(fileName.match(extRegex)!=null){valid=!0;return!1}}});return valid},_itemError:function(code,maybeNameOrNames,item){var message=this._options.messages[code],allowedExtensions=[],names=[].concat(maybeNameOrNames),name=names[0],buttonId=this._getButtonId(item),validationBase=this._getValidationBase(buttonId),extensionsForMessage,placeholderMatch;function r(name,replacement){message=message.replace(name,replacement)}
qq.each(validationBase.allowedExtensions,function(idx,allowedExtension){if(qq.isString(allowedExtension)){allowedExtensions.push(allowedExtension)}});extensionsForMessage=allowedExtensions.join(", ").toLowerCase();r("{file}",this._options.formatFileName(name));r("{extensions}",extensionsForMessage);r("{sizeLimit}",this._formatSize(validationBase.sizeLimit));r("{minSizeLimit}",this._formatSize(validationBase.minSizeLimit));placeholderMatch=message.match(/(\{\w+\})/g);if(placeholderMatch!==null){qq.each(placeholderMatch,function(idx,placeholder){r(placeholder,names[idx])})}
this._options.callbacks.onError(null,name,message,undefined);return message},_manualRetry:function(id,callback){if(this._onBeforeManualRetry(id)){this._netUploadedOrQueued++;this._uploadData.setStatus(id,qq.status.UPLOAD_RETRYING);if(callback){callback(id)}else{this._handler.retry(id)}
return!0}},_maybeAllComplete:function(id,status){var self=this,notFinished=this._getNotFinished();if(status===qq.status.UPLOAD_SUCCESSFUL){this._succeededSinceLastAllComplete.push(id)}else if(status===qq.status.UPLOAD_FAILED){this._failedSinceLastAllComplete.push(id)}
if(notFinished===0&&(this._succeededSinceLastAllComplete.length||this._failedSinceLastAllComplete.length)){setTimeout(function(){self._onAllComplete(self._succeededSinceLastAllComplete,self._failedSinceLastAllComplete)},0)}},_maybeHandleIos8SafariWorkaround:function(){var self=this;if(this._options.workarounds.ios8SafariUploads&&qq.ios800()&&qq.iosSafari()){setTimeout(function(){window.alert(self._options.messages.unsupportedBrowserIos8Safari)},0);throw new qq.Error(this._options.messages.unsupportedBrowserIos8Safari)}},_maybeParseAndSendUploadError:function(id,name,response,xhr){if(!response.success){if(xhr&&xhr.status!==200&&!response.error){this._options.callbacks.onError(id,name,"XHR returned response code "+xhr.status,xhr)}else{var errorReason=response.error?response.error:this._options.text.defaultResponseError;this._options.callbacks.onError(id,name,errorReason,xhr)}}},_maybeProcessNextItemAfterOnValidateCallback:function(validItem,items,index,params,endpoint){var self=this;if(items.length>index){if(validItem||!this._options.validation.stopOnFirstInvalidFile){setTimeout(function(){var validationDescriptor=self._getValidationDescriptor(items[index]),buttonId=self._getButtonId(items[index].file),button=self._getButton(buttonId);self._handleCheckedCallback({name:"onValidate",callback:qq.bind(self._options.callbacks.onValidate,self,validationDescriptor,button),onSuccess:qq.bind(self._onValidateCallbackSuccess,self,items,index,params,endpoint),onFailure:qq.bind(self._onValidateCallbackFailure,self,items,index,params,endpoint),identifier:"Item '"+validationDescriptor.name+"', size: "+validationDescriptor.size})},0)}else if(!validItem){for(;index<items.length;index++){self._fileOrBlobRejected(items[index].id)}}}},_onAllComplete:function(successful,failed){this._totalProgress&&this._totalProgress.onAllComplete(successful,failed,this._preventRetries);this._options.callbacks.onAllComplete(qq.extend([],successful),qq.extend([],failed));this._succeededSinceLastAllComplete=[];this._failedSinceLastAllComplete=[]},_onAutoRetry:function(id,name,responseJSON,xhr,callback){var self=this;self._preventRetries[id]=responseJSON[self._options.retry.preventRetryResponseProperty];if(self._shouldAutoRetry(id,name,responseJSON)){self._maybeParseAndSendUploadError.apply(self,arguments);self._options.callbacks.onAutoRetry(id,name,self._autoRetries[id]);self._onBeforeAutoRetry(id,name);self._retryTimeouts[id]=setTimeout(function(){self.log("Retrying "+name+"...");self._uploadData.setStatus(id,qq.status.UPLOAD_RETRYING);if(callback){callback(id)}else{self._handler.retry(id)}},self._options.retry.autoAttemptDelay*1000);return!0}},_onBeforeAutoRetry:function(id,name){this.log("Waiting "+this._options.retry.autoAttemptDelay+" seconds before retrying "+name+"...")},_onBeforeManualRetry:function(id){var itemLimit=this._currentItemLimit,fileName;if(this._preventRetries[id]){this.log("Retries are forbidden for id "+id,"warn");return!1}else if(this._handler.isValid(id)){fileName=this.getName(id);if(this._options.callbacks.onManualRetry(id,fileName)===!1){return!1}
if(itemLimit>0&&this._netUploadedOrQueued+1>itemLimit){this._itemError("retryFailTooManyItems");return!1}
this.log("Retrying upload for '"+fileName+"' (id: "+id+")...");return!0}else{this.log("'"+id+"' is not a valid file ID","error");return!1}},_onCancel:function(id,name){this._netUploadedOrQueued--;clearTimeout(this._retryTimeouts[id]);var storedItemIndex=qq.indexOf(this._storedIds,id);if(!this._options.autoUpload&&storedItemIndex>=0){this._storedIds.splice(storedItemIndex,1)}
this._uploadData.setStatus(id,qq.status.CANCELED)},_onComplete:function(id,name,result,xhr){if(!result.success){this._netUploadedOrQueued--;this._uploadData.setStatus(id,qq.status.UPLOAD_FAILED);if(result[this._options.retry.preventRetryResponseProperty]===!0){this._preventRetries[id]=!0}}else{if(result.thumbnailUrl){this._thumbnailUrls[id]=result.thumbnailUrl}
this._netUploaded++;this._uploadData.setStatus(id,qq.status.UPLOAD_SUCCESSFUL)}
this._maybeParseAndSendUploadError(id,name,result,xhr);return result.success?!0:!1},_onDelete:function(id){this._uploadData.setStatus(id,qq.status.DELETING)},_onDeleteComplete:function(id,xhrOrXdr,isError){var name=this.getName(id);if(isError){this._uploadData.setStatus(id,qq.status.DELETE_FAILED);this.log("Delete request for '"+name+"' has failed.","error");if(xhrOrXdr.withCredentials===undefined){this._options.callbacks.onError(id,name,"Delete request failed",xhrOrXdr)}else{this._options.callbacks.onError(id,name,"Delete request failed with response code "+xhrOrXdr.status,xhrOrXdr)}}else{this._netUploadedOrQueued--;this._netUploaded--;this._handler.expunge(id);this._uploadData.setStatus(id,qq.status.DELETED);this.log("Delete request for '"+name+"' has succeeded.")}},_onInputChange:function(input){var fileIndex;if(qq.supportedFeatures.ajaxUploading){for(fileIndex=0;fileIndex<input.files.length;fileIndex++){this._annotateWithButtonId(input.files[fileIndex],input)}
this.addFiles(input.files)}else if(input.value.length>0){this.addFiles(input)}
qq.each(this._buttons,function(idx,button){button.reset()})},_onProgress:function(id,name,loaded,total){this._totalProgress&&this._totalProgress.onIndividualProgress(id,loaded,total)},_onSubmit:function(id,name){},_onSubmitCallbackSuccess:function(id,name){this._onSubmit.apply(this,arguments);this._uploadData.setStatus(id,qq.status.SUBMITTED);this._onSubmitted.apply(this,arguments);if(this._options.autoUpload){this._options.callbacks.onSubmitted.apply(this,arguments);this._uploadFile(id)}else{this._storeForLater(id);this._options.callbacks.onSubmitted.apply(this,arguments)}},_onSubmitDelete:function(id,onSuccessCallback,additionalMandatedParams){var uuid=this.getUuid(id),adjustedOnSuccessCallback;if(onSuccessCallback){adjustedOnSuccessCallback=qq.bind(onSuccessCallback,this,id,uuid,additionalMandatedParams)}
if(this._isDeletePossible()){this._handleCheckedCallback({name:"onSubmitDelete",callback:qq.bind(this._options.callbacks.onSubmitDelete,this,id),onSuccess:adjustedOnSuccessCallback||qq.bind(this._deleteHandler.sendDelete,this,id,uuid,additionalMandatedParams),identifier:id});return!0}else{this.log("Delete request ignored for ID "+id+", delete feature is disabled or request not possible "+"due to CORS on a user agent that does not support pre-flighting.","warn");return!1}},_onSubmitted:function(id){},_onTotalProgress:function(loaded,total){this._options.callbacks.onTotalProgress(loaded,total)},_onUploadPrep:function(id){},_onUpload:function(id,name){this._uploadData.setStatus(id,qq.status.UPLOADING)},_onUploadChunk:function(id,chunkData){},_onUploadStatusChange:function(id,oldStatus,newStatus){if(newStatus===qq.status.PAUSED){clearTimeout(this._retryTimeouts[id])}},_onValidateBatchCallbackFailure:function(fileWrappers){var self=this;qq.each(fileWrappers,function(idx,fileWrapper){self._fileOrBlobRejected(fileWrapper.id)})},_onValidateBatchCallbackSuccess:function(validationDescriptors,items,params,endpoint,button){var errorMessage,itemLimit=this._currentItemLimit,proposedNetFilesUploadedOrQueued=this._netUploadedOrQueued;if(itemLimit===0||proposedNetFilesUploadedOrQueued<=itemLimit){if(items.length>0){this._handleCheckedCallback({name:"onValidate",callback:qq.bind(this._options.callbacks.onValidate,this,validationDescriptors[0],button),onSuccess:qq.bind(this._onValidateCallbackSuccess,this,items,0,params,endpoint),onFailure:qq.bind(this._onValidateCallbackFailure,this,items,0,params,endpoint),identifier:"Item '"+items[0].file.name+"', size: "+items[0].file.size})}else{this._itemError("noFilesError")}}else{this._onValidateBatchCallbackFailure(items);errorMessage=this._options.messages.tooManyItemsError.replace(/\{netItems\}/g,proposedNetFilesUploadedOrQueued).replace(/\{itemLimit\}/g,itemLimit);this._batchError(errorMessage)}},_onValidateCallbackFailure:function(items,index,params,endpoint){var nextIndex=index+1;this._fileOrBlobRejected(items[index].id,items[index].file.name);this._maybeProcessNextItemAfterOnValidateCallback(!1,items,nextIndex,params,endpoint)},_onValidateCallbackSuccess:function(items,index,params,endpoint){var self=this,nextIndex=index+1,validationDescriptor=this._getValidationDescriptor(items[index]);this._validateFileOrBlobData(items[index],validationDescriptor).then(function(){self._upload(items[index].id,params,endpoint);self._maybeProcessNextItemAfterOnValidateCallback(!0,items,nextIndex,params,endpoint)},function(){self._maybeProcessNextItemAfterOnValidateCallback(!1,items,nextIndex,params,endpoint)})},_prepareItemsForUpload:function(items,params,endpoint){if(items.length===0){this._itemError("noFilesError");return}
var validationDescriptors=this._getValidationDescriptors(items),buttonId=this._getButtonId(items[0].file),button=this._getButton(buttonId);this._handleCheckedCallback({name:"onValidateBatch",callback:qq.bind(this._options.callbacks.onValidateBatch,this,validationDescriptors,button),onSuccess:qq.bind(this._onValidateBatchCallbackSuccess,this,validationDescriptors,items,params,endpoint,button),onFailure:qq.bind(this._onValidateBatchCallbackFailure,this,items),identifier:"batch validation"})},_preventLeaveInProgress:function(){var self=this;this._disposeSupport.attach(window,"beforeunload",function(e){if(self.getInProgress()){e=e||window.event;e.returnValue=self._options.messages.onLeave;return self._options.messages.onLeave}})},_refreshSessionData:function(){var self=this,options=this._options.session;if(qq.Session&&this._options.session.endpoint!=null){if(!this._session){qq.extend(options,{cors:this._options.cors});options.log=qq.bind(this.log,this);options.addFileRecord=qq.bind(this._addCannedFile,this);this._session=new qq.Session(options)}
setTimeout(function(){self._session.refresh().then(function(response,xhrOrXdr){self._sessionRequestComplete();self._options.callbacks.onSessionRequestComplete(response,!0,xhrOrXdr)},function(response,xhrOrXdr){self._options.callbacks.onSessionRequestComplete(response,!1,xhrOrXdr)})},0)}},_sessionRequestComplete:function(){},_setSize:function(id,newSize){this._uploadData.updateSize(id,newSize);this._totalProgress&&this._totalProgress.onNewSize(id)},_shouldAutoRetry:function(id,name,responseJSON){var uploadData=this._uploadData.retrieve({id:id});if(!this._preventRetries[id]&&this._options.retry.enableAuto&&uploadData.status!==qq.status.PAUSED){if(this._autoRetries[id]===undefined){this._autoRetries[id]=0}
if(this._autoRetries[id]<this._options.retry.maxAutoAttempts){this._autoRetries[id]+=1;return!0}}
return!1},_storeForLater:function(id){this._storedIds.push(id)},_trackButton:function(id){var buttonId;if(qq.supportedFeatures.ajaxUploading){buttonId=this._handler.getFile(id).qqButtonId}else{buttonId=this._getButtonId(this._handler.getInput(id))}
if(buttonId){this._buttonIdsForFileIds[id]=buttonId}},_updateFormSupportAndParams:function(formElementOrId){this._options.form.element=formElementOrId;this._formSupport=qq.FormSupport&&new qq.FormSupport(this._options.form,qq.bind(this.uploadStoredFiles,this),qq.bind(this.log,this));if(this._formSupport&&this._formSupport.attachedToForm){this._paramsStore.addReadOnly(null,this._formSupport.getFormInputsAsObject);this._options.autoUpload=this._formSupport.newAutoUpload;if(this._formSupport.newEndpoint){this.setEndpoint(this._formSupport.newEndpoint)}}},_upload:function(id,params,endpoint){var name=this.getName(id);if(params){this.setParams(params,id)}
if(endpoint){this.setEndpoint(endpoint,id)}
this._handleCheckedCallback({name:"onSubmit",callback:qq.bind(this._options.callbacks.onSubmit,this,id,name),onSuccess:qq.bind(this._onSubmitCallbackSuccess,this,id,name),onFailure:qq.bind(this._fileOrBlobRejected,this,id,name),identifier:id})},_uploadFile:function(id){if(!this._handler.upload(id)){this._uploadData.setStatus(id,qq.status.QUEUED)}},_uploadStoredFiles:function(){var idToUpload,stillSubmitting,self=this;while(this._storedIds.length){idToUpload=this._storedIds.shift();this._uploadFile(idToUpload)}
stillSubmitting=this.getUploads({status:qq.status.SUBMITTING}).length;if(stillSubmitting){qq.log("Still waiting for "+stillSubmitting+" files to clear submit queue. Will re-parse stored IDs array shortly.");setTimeout(function(){self._uploadStoredFiles()},1000)}},_validateFileOrBlobData:function(fileWrapper,validationDescriptor){var self=this,file=(function(){if(fileWrapper.file instanceof qq.BlobProxy){return fileWrapper.file.referenceBlob}
return fileWrapper.file}()),name=validationDescriptor.name,size=validationDescriptor.size,buttonId=this._getButtonId(fileWrapper.file),validationBase=this._getValidationBase(buttonId),validityChecker=new qq.Promise();validityChecker.then(function(){},function(){self._fileOrBlobRejected(fileWrapper.id,name)});if(qq.isFileOrInput(file)&&!this._isAllowedExtension(validationBase.allowedExtensions,name)){this._itemError("typeError",name,file);return validityChecker.failure()}
if(size===0){this._itemError("emptyError",name,file);return validityChecker.failure()}
if(size>0&&validationBase.sizeLimit&&size>validationBase.sizeLimit){this._itemError("sizeError",name,file);return validityChecker.failure()}
if(size>0&&size<validationBase.minSizeLimit){this._itemError("minSizeError",name,file);return validityChecker.failure()}
if(qq.ImageValidation&&qq.supportedFeatures.imagePreviews&&qq.isFile(file)){new qq.ImageValidation(file,qq.bind(self.log,self)).validate(validationBase.image).then(validityChecker.success,function(errorCode){self._itemError(errorCode+"ImageError",name,file);validityChecker.failure()})}else{validityChecker.success()}
return validityChecker},_wrapCallbacks:function(){var self,safeCallback,prop;self=this;safeCallback=function(name,callback,args){var errorMsg;try{return callback.apply(self,args)}catch(exception){errorMsg=exception.message||exception.toString();self.log("Caught exception in '"+name+"' callback - "+errorMsg,"error")}};for(prop in this._options.callbacks){(function(){var callbackName,callbackFunc;callbackName=prop;callbackFunc=self._options.callbacks[callbackName];self._options.callbacks[callbackName]=function(){return safeCallback(callbackName,callbackFunc,arguments)}}())}}}}());(function(){"use strict";qq.FineUploaderBasic=function(o){var self=this;this._options={debug:!1,button:null,multiple:!0,maxConnections:3,disableCancelForFormUploads:!1,autoUpload:!0,request:{customHeaders:{},endpoint:"/server/upload",filenameParam:"qqfilename",forceMultipart:!0,inputName:"qqfile",method:"POST",params:{},paramsInBody:!1,totalFileSizeName:"qqtotalfilesize",uuidName:"qquuid"},validation:{allowedExtensions:[],sizeLimit:0,minSizeLimit:0,itemLimit:0,stopOnFirstInvalidFile:!0,acceptFiles:null,image:{maxHeight:0,maxWidth:0,minHeight:0,minWidth:0}},callbacks:{onSubmit:function(id,name){},onSubmitted:function(id,name){},onComplete:function(id,name,responseJSON,maybeXhr){},onAllComplete:function(successful,failed){},onCancel:function(id,name){},onUpload:function(id,name){},onUploadChunk:function(id,name,chunkData){},onUploadChunkSuccess:function(id,chunkData,responseJSON,xhr){},onResume:function(id,fileName,chunkData){},onProgress:function(id,name,loaded,total){},onTotalProgress:function(loaded,total){},onError:function(id,name,reason,maybeXhrOrXdr){},onAutoRetry:function(id,name,attemptNumber){},onManualRetry:function(id,name){},onValidateBatch:function(fileOrBlobData){},onValidate:function(fileOrBlobData){},onSubmitDelete:function(id){},onDelete:function(id){},onDeleteComplete:function(id,xhrOrXdr,isError){},onPasteReceived:function(blob){},onStatusChange:function(id,oldStatus,newStatus){},onSessionRequestComplete:function(response,success,xhrOrXdr){}},messages:{typeError:"{file} has an invalid extension. Valid extension(s): {extensions}.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",noFilesError:"No files to upload.",tooManyItemsError:"Too many items ({netItems}) would be uploaded.  Item limit is {itemLimit}.",maxHeightImageError:"Image is too tall.",maxWidthImageError:"Image is too wide.",minHeightImageError:"Image is not tall enough.",minWidthImageError:"Image is not wide enough.",retryFailTooManyItems:"Retry failed - you have reached your file limit.",onLeave:"The files are being uploaded, if you leave now the upload will be canceled.",unsupportedBrowserIos8Safari:"Unrecoverable error - this browser does not permit file uploading of any kind due to serious bugs in iOS8 Safari.  Please use iOS8 Chrome until Apple fixes these issues."},retry:{enableAuto:!1,maxAutoAttempts:3,autoAttemptDelay:5,preventRetryResponseProperty:"preventRetry"},classes:{buttonHover:"qq-upload-button-hover",buttonFocus:"qq-upload-button-focus"},chunking:{enabled:!1,concurrent:{enabled:!1},mandatory:!1,paramNames:{partIndex:"qqpartindex",partByteOffset:"qqpartbyteoffset",chunkSize:"qqchunksize",totalFileSize:"qqtotalfilesize",totalParts:"qqtotalparts"},partSize:2000000,success:{endpoint:null}},resume:{enabled:!1,recordsExpireIn:7,paramNames:{resuming:"qqresume"}},formatFileName:function(fileOrBlobName){return fileOrBlobName},text:{defaultResponseError:"Upload failure reason unknown",fileInputTitle:"file input",sizeSymbols:["kB","MB","GB","TB","PB","EB"]},deleteFile:{enabled:!1,method:"DELETE",endpoint:"/server/upload",customHeaders:{},params:{}},cors:{expected:!1,sendCredentials:!1,allowXdr:!1},blobs:{defaultName:"misc_data"},paste:{targetElement:null,defaultName:"pasted_image"},camera:{ios:!1,button:null},extraButtons:[],session:{endpoint:null,params:{},customHeaders:{},refreshOnReset:!0},form:{element:"qq-form",autoUpload:!1,interceptSubmit:!0},scaling:{customResizer:null,sendOriginal:!0,orient:!0,defaultType:null,defaultQuality:80,failureText:"Failed to scale",includeExif:!1,sizes:[]},workarounds:{iosEmptyVideos:!0,ios8SafariUploads:!0,ios8BrowserCrash:!1}};qq.extend(this._options,o,!0);this._buttons=[];this._extraButtonSpecs={};this._buttonIdsForFileIds=[];this._wrapCallbacks();this._disposeSupport=new qq.DisposeSupport();this._storedIds=[];this._autoRetries=[];this._retryTimeouts=[];this._preventRetries=[];this._thumbnailUrls=[];this._netUploadedOrQueued=0;this._netUploaded=0;this._uploadData=this._createUploadDataTracker();this._initFormSupportAndParams();this._customHeadersStore=this._createStore(this._options.request.customHeaders);this._deleteFileCustomHeadersStore=this._createStore(this._options.deleteFile.customHeaders);this._deleteFileParamsStore=this._createStore(this._options.deleteFile.params);this._endpointStore=this._createStore(this._options.request.endpoint);this._deleteFileEndpointStore=this._createStore(this._options.deleteFile.endpoint);this._handler=this._createUploadHandler();this._deleteHandler=qq.DeleteFileAjaxRequester&&this._createDeleteHandler();if(this._options.button){this._defaultButtonId=this._createUploadButton({element:this._options.button,title:this._options.text.fileInputTitle}).getButtonId()}
this._generateExtraButtonSpecs();this._handleCameraAccess();if(this._options.paste.targetElement){if(qq.PasteSupport){this._pasteHandler=this._createPasteHandler()}else{this.log("Paste support module not found","error")}}
this._preventLeaveInProgress();this._imageGenerator=qq.ImageGenerator&&new qq.ImageGenerator(qq.bind(this.log,this));this._refreshSessionData();this._succeededSinceLastAllComplete=[];this._failedSinceLastAllComplete=[];this._scaler=(qq.Scaler&&new qq.Scaler(this._options.scaling,qq.bind(this.log,this)))||{};if(this._scaler.enabled){this._customNewFileHandler=qq.bind(this._scaler.handleNewFile,this._scaler)}
if(qq.TotalProgress&&qq.supportedFeatures.progressBar){this._totalProgress=new qq.TotalProgress(qq.bind(this._onTotalProgress,this),function(id){var entry=self._uploadData.retrieve({id:id});return(entry&&entry.size)||0})}
this._currentItemLimit=this._options.validation.itemLimit};qq.FineUploaderBasic.prototype=qq.basePublicApi;qq.extend(qq.FineUploaderBasic.prototype,qq.basePrivateApi)}());qq.AjaxRequester=function(o){"use strict";var log,shouldParamsBeInQueryString,queue=[],requestData={},options={acceptHeader:null,validMethods:["PATCH","POST","PUT"],method:"POST",contentType:"application/x-www-form-urlencoded",maxConnections:3,customHeaders:{},endpointStore:{},paramsStore:{},mandatedParams:{},allowXRequestedWithAndCacheControl:!0,successfulResponseCodes:{DELETE:[200,202,204],PATCH:[200,201,202,203,204],POST:[200,201,202,203,204],PUT:[200,201,202,203,204],GET:[200]},cors:{expected:!1,sendCredentials:!1},log:function(str,level){},onSend:function(id){},onComplete:function(id,xhrOrXdr,isError){},onProgress:null};qq.extend(options,o);log=options.log;if(qq.indexOf(options.validMethods,options.method)<0){throw new Error("'"+options.method+"' is not a supported method for this type of request!")}
function isSimpleMethod(){return qq.indexOf(["GET","POST","HEAD"],options.method)>=0}
function containsNonSimpleHeaders(headers){var containsNonSimple=!1;qq.each(containsNonSimple,function(idx,header){if(qq.indexOf(["Accept","Accept-Language","Content-Language","Content-Type"],header)<0){containsNonSimple=!0;return!1}});return containsNonSimple}
function isXdr(xhr){return options.cors.expected&&xhr.withCredentials===undefined}
function getCorsAjaxTransport(){var xhrOrXdr;if(window.XMLHttpRequest||window.ActiveXObject){xhrOrXdr=qq.createXhrInstance();if(xhrOrXdr.withCredentials===undefined){xhrOrXdr=new XDomainRequest();xhrOrXdr.onload=function(){};xhrOrXdr.onerror=function(){};xhrOrXdr.ontimeout=function(){};xhrOrXdr.onprogress=function(){}}}
return xhrOrXdr}
function getXhrOrXdr(id,suppliedXhr){var xhrOrXdr=requestData[id].xhr;if(!xhrOrXdr){if(suppliedXhr){xhrOrXdr=suppliedXhr}else{if(options.cors.expected){xhrOrXdr=getCorsAjaxTransport()}else{xhrOrXdr=qq.createXhrInstance()}}
requestData[id].xhr=xhrOrXdr}
return xhrOrXdr}
function dequeue(id){var i=qq.indexOf(queue,id),max=options.maxConnections,nextId;delete requestData[id];queue.splice(i,1);if(queue.length>=max&&i<max){nextId=queue[max-1];sendRequest(nextId)}}
function onComplete(id,xdrError){var xhr=getXhrOrXdr(id),method=options.method,isError=xdrError===!0;dequeue(id);if(isError){log(method+" request for "+id+" has failed","error")}else if(!isXdr(xhr)&&!isResponseSuccessful(xhr.status)){isError=!0;log(method+" request for "+id+" has failed - response code "+xhr.status,"error")}
options.onComplete(id,xhr,isError)}
function getParams(id){var onDemandParams=requestData[id].additionalParams,mandatedParams=options.mandatedParams,params;if(options.paramsStore.get){params=options.paramsStore.get(id)}
if(onDemandParams){qq.each(onDemandParams,function(name,val){params=params||{};params[name]=val})}
if(mandatedParams){qq.each(mandatedParams,function(name,val){params=params||{};params[name]=val})}
return params}
function sendRequest(id,optXhr){var xhr=getXhrOrXdr(id,optXhr),method=options.method,params=getParams(id),payload=requestData[id].payload,url;options.onSend(id);url=createUrl(id,params,requestData[id].additionalQueryParams);if(isXdr(xhr)){xhr.onload=getXdrLoadHandler(id);xhr.onerror=getXdrErrorHandler(id)}else{xhr.onreadystatechange=getXhrReadyStateChangeHandler(id)}
registerForUploadProgress(id);xhr.open(method,url,!0);if(options.cors.expected&&options.cors.sendCredentials&&!isXdr(xhr)){xhr.withCredentials=!0}
setHeaders(id);log("Sending "+method+" request for "+id);if(payload){xhr.send(payload)}else if(shouldParamsBeInQueryString||!params){xhr.send()}else if(params&&options.contentType&&options.contentType.toLowerCase().indexOf("application/x-www-form-urlencoded")>=0){xhr.send(qq.obj2url(params,""))}else if(params&&options.contentType&&options.contentType.toLowerCase().indexOf("application/json")>=0){xhr.send(JSON.stringify(params))}else{xhr.send(params)}
return xhr}
function createUrl(id,params,additionalQueryParams){var endpoint=options.endpointStore.get(id),addToPath=requestData[id].addToPath;if(addToPath!=undefined){endpoint+="/"+addToPath}
if(shouldParamsBeInQueryString&&params){endpoint=qq.obj2url(params,endpoint)}
if(additionalQueryParams){endpoint=qq.obj2url(additionalQueryParams,endpoint)}
return endpoint}
function getXhrReadyStateChangeHandler(id){return function(){if(getXhrOrXdr(id).readyState===4){onComplete(id)}}}
function registerForUploadProgress(id){var onProgress=options.onProgress;if(onProgress){getXhrOrXdr(id).upload.onprogress=function(e){if(e.lengthComputable){onProgress(id,e.loaded,e.total)}}}}
function getXdrLoadHandler(id){return function(){onComplete(id)}}
function getXdrErrorHandler(id){return function(){onComplete(id,!0)}}
function setHeaders(id){var xhr=getXhrOrXdr(id),customHeaders=options.customHeaders,onDemandHeaders=requestData[id].additionalHeaders||{},method=options.method,allHeaders={};if(!isXdr(xhr)){options.acceptHeader&&xhr.setRequestHeader("Accept",options.acceptHeader);if(options.allowXRequestedWithAndCacheControl){if(!options.cors.expected||(!isSimpleMethod()||containsNonSimpleHeaders(customHeaders))){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Cache-Control","no-cache")}}
if(options.contentType&&(method==="POST"||method==="PUT")){xhr.setRequestHeader("Content-Type",options.contentType)}
qq.extend(allHeaders,qq.isFunction(customHeaders)?customHeaders(id):customHeaders);qq.extend(allHeaders,onDemandHeaders);qq.each(allHeaders,function(name,val){xhr.setRequestHeader(name,val)})}}
function isResponseSuccessful(responseCode){return qq.indexOf(options.successfulResponseCodes[options.method],responseCode)>=0}
function prepareToSend(id,optXhr,addToPath,additionalParams,additionalQueryParams,additionalHeaders,payload){requestData[id]={addToPath:addToPath,additionalParams:additionalParams,additionalQueryParams:additionalQueryParams,additionalHeaders:additionalHeaders,payload:payload};var len=queue.push(id);if(len<=options.maxConnections){return sendRequest(id,optXhr)}}
shouldParamsBeInQueryString=options.method==="GET"||options.method==="DELETE";qq.extend(this,{initTransport:function(id){var path,params,headers,payload,cacheBuster,additionalQueryParams;return{withPath:function(appendToPath){path=appendToPath;return this},withParams:function(additionalParams){params=additionalParams;return this},withQueryParams:function(_additionalQueryParams_){additionalQueryParams=_additionalQueryParams_;return this},withHeaders:function(additionalHeaders){headers=additionalHeaders;return this},withPayload:function(thePayload){payload=thePayload;return this},withCacheBuster:function(){cacheBuster=!0;return this},send:function(optXhr){if(cacheBuster&&qq.indexOf(["GET","DELETE"],options.method)>=0){params.qqtimestamp=new Date().getTime()}
return prepareToSend(id,optXhr,path,params,additionalQueryParams,headers,payload)}}},canceled:function(id){dequeue(id)}})};qq.UploadHandler=function(spec){"use strict";var proxy=spec.proxy,fileState={},onCancel=proxy.onCancel,getName=proxy.getName;qq.extend(this,{add:function(id,fileItem){fileState[id]=fileItem;fileState[id].temp={}},cancel:function(id){var self=this,cancelFinalizationEffort=new qq.Promise(),onCancelRetVal=onCancel(id,getName(id),cancelFinalizationEffort);onCancelRetVal.then(function(){if(self.isValid(id)){fileState[id].canceled=!0;self.expunge(id)}
cancelFinalizationEffort.success()})},expunge:function(id){delete fileState[id]},getThirdPartyFileId:function(id){return fileState[id].key},isValid:function(id){return fileState[id]!==undefined},reset:function(){fileState={}},_getFileState:function(id){return fileState[id]},_setThirdPartyFileId:function(id,thirdPartyFileId){fileState[id].key=thirdPartyFileId},_wasCanceled:function(id){return!!fileState[id].canceled}})};qq.UploadHandlerController=function(o,namespace){"use strict";var controller=this,chunkingPossible=!1,concurrentChunkingPossible=!1,chunking,preventRetryResponse,log,handler,options={paramsStore:{},maxConnections:3,chunking:{enabled:!1,multiple:{enabled:!1}},log:function(str,level){},onProgress:function(id,fileName,loaded,total){},onComplete:function(id,fileName,response,xhr){},onCancel:function(id,fileName){},onUploadPrep:function(id){},onUpload:function(id,fileName){},onUploadChunk:function(id,fileName,chunkData){},onUploadChunkSuccess:function(id,chunkData,response,xhr){},onAutoRetry:function(id,fileName,response,xhr){},onResume:function(id,fileName,chunkData){},onUuidChanged:function(id,newUuid){},getName:function(id){},setSize:function(id,newSize){},isQueued:function(id){},getIdsInProxyGroup:function(id){},getIdsInBatch:function(id){}},chunked={done:function(id,chunkIdx,response,xhr){var chunkData=handler._getChunkData(id,chunkIdx);handler._getFileState(id).attemptingResume=!1;delete handler._getFileState(id).temp.chunkProgress[chunkIdx];handler._getFileState(id).loaded+=chunkData.size;options.onUploadChunkSuccess(id,handler._getChunkDataForCallback(chunkData),response,xhr)},finalize:function(id){var size=options.getSize(id),name=options.getName(id);log("All chunks have been uploaded for "+id+" - finalizing....");handler.finalizeChunks(id).then(function(response,xhr){log("Finalize successful for "+id);var normaizedResponse=upload.normalizeResponse(response,!0);options.onProgress(id,name,size,size);handler._maybeDeletePersistedChunkData(id);upload.cleanup(id,normaizedResponse,xhr)},function(response,xhr){var normaizedResponse=upload.normalizeResponse(response,!1);log("Problem finalizing chunks for file ID "+id+" - "+normaizedResponse.error,"error");if(normaizedResponse.reset){chunked.reset(id)}
if(!options.onAutoRetry(id,name,normaizedResponse,xhr)){upload.cleanup(id,normaizedResponse,xhr)}})},hasMoreParts:function(id){return!!handler._getFileState(id).chunking.remaining.length},nextPart:function(id){var nextIdx=handler._getFileState(id).chunking.remaining.shift();if(nextIdx>=handler._getTotalChunks(id)){nextIdx=null}
return nextIdx},reset:function(id){log("Server or callback has ordered chunking effort to be restarted on next attempt for item ID "+id,"error");handler._maybeDeletePersistedChunkData(id);handler.reevaluateChunking(id);handler._getFileState(id).loaded=0},sendNext:function(id){var size=options.getSize(id),name=options.getName(id),chunkIdx=chunked.nextPart(id),chunkData=handler._getChunkData(id,chunkIdx),resuming=handler._getFileState(id).attemptingResume,inProgressChunks=handler._getFileState(id).chunking.inProgress||[];if(handler._getFileState(id).loaded==null){handler._getFileState(id).loaded=0}
if(resuming&&options.onResume(id,name,chunkData)===!1){chunked.reset(id);chunkIdx=chunked.nextPart(id);chunkData=handler._getChunkData(id,chunkIdx);resuming=!1}
if(chunkIdx==null&&inProgressChunks.length===0){chunked.finalize(id)}else{log(qq.format("Sending chunked upload request for item {}.{}, bytes {}-{} of {}.",id,chunkIdx,chunkData.start+1,chunkData.end,size));options.onUploadChunk(id,name,handler._getChunkDataForCallback(chunkData));inProgressChunks.push(chunkIdx);handler._getFileState(id).chunking.inProgress=inProgressChunks;if(concurrentChunkingPossible){connectionManager.open(id,chunkIdx)}
if(concurrentChunkingPossible&&connectionManager.available()&&handler._getFileState(id).chunking.remaining.length){chunked.sendNext(id)}
handler.uploadChunk(id,chunkIdx,resuming).then(function success(response,xhr){log("Chunked upload request succeeded for "+id+", chunk "+chunkIdx);handler.clearCachedChunk(id,chunkIdx);var inProgressChunks=handler._getFileState(id).chunking.inProgress||[],responseToReport=upload.normalizeResponse(response,!0),inProgressChunkIdx=qq.indexOf(inProgressChunks,chunkIdx);log(qq.format("Chunk {} for file {} uploaded successfully.",chunkIdx,id));chunked.done(id,chunkIdx,responseToReport,xhr);if(inProgressChunkIdx>=0){inProgressChunks.splice(inProgressChunkIdx,1)}
handler._maybePersistChunkedState(id);if(!chunked.hasMoreParts(id)&&inProgressChunks.length===0){chunked.finalize(id)}else if(chunked.hasMoreParts(id)){chunked.sendNext(id)}else{log(qq.format("File ID {} has no more chunks to send and these chunk indexes are still marked as in-progress: {}",id,JSON.stringify(inProgressChunks)))}},function failure(response,xhr){log("Chunked upload request failed for "+id+", chunk "+chunkIdx);handler.clearCachedChunk(id,chunkIdx);var responseToReport=upload.normalizeResponse(response,!1),inProgressIdx;if(responseToReport.reset){chunked.reset(id)}else{inProgressIdx=qq.indexOf(handler._getFileState(id).chunking.inProgress,chunkIdx);if(inProgressIdx>=0){handler._getFileState(id).chunking.inProgress.splice(inProgressIdx,1);handler._getFileState(id).chunking.remaining.unshift(chunkIdx)}}
if(!handler._getFileState(id).temp.ignoreFailure){if(concurrentChunkingPossible){handler._getFileState(id).temp.ignoreFailure=!0;log(qq.format("Going to attempt to abort these chunks: {}. These are currently in-progress: {}.",JSON.stringify(Object.keys(handler._getXhrs(id))),JSON.stringify(handler._getFileState(id).chunking.inProgress)));qq.each(handler._getXhrs(id),function(ckid,ckXhr){log(qq.format("Attempting to abort file {}.{}. XHR readyState {}. ",id,ckid,ckXhr.readyState));ckXhr.abort();ckXhr._cancelled=!0});handler.moveInProgressToRemaining(id);connectionManager.free(id,!0)}
if(!options.onAutoRetry(id,name,responseToReport,xhr)){upload.cleanup(id,responseToReport,xhr)}}}).done(function(){handler.clearXhr(id,chunkIdx)})}}},connectionManager={_open:[],_openChunks:{},_waiting:[],available:function(){var max=options.maxConnections,openChunkEntriesCount=0,openChunksCount=0;qq.each(connectionManager._openChunks,function(fileId,openChunkIndexes){openChunkEntriesCount++;openChunksCount+=openChunkIndexes.length});return max-(connectionManager._open.length-openChunkEntriesCount+openChunksCount)},free:function(id,dontAllowNext){var allowNext=!dontAllowNext,waitingIndex=qq.indexOf(connectionManager._waiting,id),connectionsIndex=qq.indexOf(connectionManager._open,id),nextId;delete connectionManager._openChunks[id];if(upload.getProxyOrBlob(id)instanceof qq.BlobProxy){log("Generated blob upload has ended for "+id+", disposing generated blob.");delete handler._getFileState(id).file}
if(waitingIndex>=0){connectionManager._waiting.splice(waitingIndex,1)}else if(allowNext&&connectionsIndex>=0){connectionManager._open.splice(connectionsIndex,1);nextId=connectionManager._waiting.shift();if(nextId>=0){connectionManager._open.push(nextId);upload.start(nextId)}}},getWaitingOrConnected:function(){var waitingOrConnected=[];qq.each(connectionManager._openChunks,function(fileId,chunks){if(chunks&&chunks.length){waitingOrConnected.push(parseInt(fileId))}});qq.each(connectionManager._open,function(idx,fileId){if(!connectionManager._openChunks[fileId]){waitingOrConnected.push(parseInt(fileId))}});waitingOrConnected=waitingOrConnected.concat(connectionManager._waiting);return waitingOrConnected},isUsingConnection:function(id){return qq.indexOf(connectionManager._open,id)>=0},open:function(id,chunkIdx){if(chunkIdx==null){connectionManager._waiting.push(id)}
if(connectionManager.available()){if(chunkIdx==null){connectionManager._waiting.pop();connectionManager._open.push(id)}else{(function(){var openChunksEntry=connectionManager._openChunks[id]||[];openChunksEntry.push(chunkIdx);connectionManager._openChunks[id]=openChunksEntry}())}
return!0}
return!1},reset:function(){connectionManager._waiting=[];connectionManager._open=[]}},simple={send:function(id,name){handler._getFileState(id).loaded=0;log("Sending simple upload request for "+id);handler.uploadFile(id).then(function(response,optXhr){log("Simple upload request succeeded for "+id);var responseToReport=upload.normalizeResponse(response,!0),size=options.getSize(id);options.onProgress(id,name,size,size);upload.maybeNewUuid(id,responseToReport);upload.cleanup(id,responseToReport,optXhr)},function(response,optXhr){log("Simple upload request failed for "+id);var responseToReport=upload.normalizeResponse(response,!1);if(!options.onAutoRetry(id,name,responseToReport,optXhr)){upload.cleanup(id,responseToReport,optXhr)}})}},upload={cancel:function(id){log("Cancelling "+id);options.paramsStore.remove(id);connectionManager.free(id)},cleanup:function(id,response,optXhr){var name=options.getName(id);options.onComplete(id,name,response,optXhr);if(handler._getFileState(id)){handler._clearXhrs&&handler._clearXhrs(id)}
connectionManager.free(id)},getProxyOrBlob:function(id){return(handler.getProxy&&handler.getProxy(id))||(handler.getFile&&handler.getFile(id))},initHandler:function(){var handlerType=namespace?qq[namespace]:qq.traditional,handlerModuleSubtype=qq.supportedFeatures.ajaxUploading?"Xhr":"Form";handler=new handlerType[handlerModuleSubtype+"UploadHandler"](options,{getDataByUuid:options.getDataByUuid,getName:options.getName,getSize:options.getSize,getUuid:options.getUuid,log:log,onCancel:options.onCancel,onProgress:options.onProgress,onUuidChanged:options.onUuidChanged});if(handler._removeExpiredChunkingRecords){handler._removeExpiredChunkingRecords()}},isDeferredEligibleForUpload:function(id){return options.isQueued(id)},maybeDefer:function(id,blob){if(blob&&!handler.getFile(id)&&blob instanceof qq.BlobProxy){options.onUploadPrep(id);log("Attempting to generate a blob on-demand for "+id);blob.create().then(function(generatedBlob){log("Generated an on-demand blob for "+id);handler.updateBlob(id,generatedBlob);options.setSize(id,generatedBlob.size);handler.reevaluateChunking(id);upload.maybeSendDeferredFiles(id)},function(errorMessage){var errorResponse={};if(errorMessage){errorResponse.error=errorMessage}
log(qq.format("Failed to generate blob for ID {}.  Error message: {}.",id,errorMessage),"error");options.onComplete(id,options.getName(id),qq.extend(errorResponse,preventRetryResponse),null);upload.maybeSendDeferredFiles(id);connectionManager.free(id)})}else{return upload.maybeSendDeferredFiles(id)}
return!1},maybeSendDeferredFiles:function(id){var idsInGroup=options.getIdsInProxyGroup(id),uploadedThisId=!1;if(idsInGroup&&idsInGroup.length){log("Maybe ready to upload proxy group file "+id);qq.each(idsInGroup,function(idx,idInGroup){if(upload.isDeferredEligibleForUpload(idInGroup)&&!!handler.getFile(idInGroup)){uploadedThisId=idInGroup===id;upload.now(idInGroup)}else if(upload.isDeferredEligibleForUpload(idInGroup)){return!1}})}else{uploadedThisId=!0;upload.now(id)}
return uploadedThisId},maybeNewUuid:function(id,response){if(response.newUuid!==undefined){options.onUuidChanged(id,response.newUuid)}},normalizeResponse:function(originalResponse,successful){var response=originalResponse;if(!qq.isObject(originalResponse)){response={};if(qq.isString(originalResponse)&&!successful){response.error=originalResponse}}
response.success=successful;return response},now:function(id){var name=options.getName(id);if(!controller.isValid(id)){throw new qq.Error(id+" is not a valid file ID to upload!")}
options.onUpload(id,name);if(chunkingPossible&&handler._shouldChunkThisFile(id)){chunked.sendNext(id)}else{simple.send(id,name)}},start:function(id){var blobToUpload=upload.getProxyOrBlob(id);if(blobToUpload){return upload.maybeDefer(id,blobToUpload)}else{upload.now(id);return!0}}};qq.extend(this,{add:function(id,file){handler.add.apply(this,arguments)},upload:function(id){if(connectionManager.open(id)){return upload.start(id)}
return!1},retry:function(id){if(concurrentChunkingPossible){handler._getFileState(id).temp.ignoreFailure=!1}
if(connectionManager.isUsingConnection(id)){return upload.start(id)}else{return controller.upload(id)}},cancel:function(id){var cancelRetVal=handler.cancel(id);if(qq.isGenericPromise(cancelRetVal)){cancelRetVal.then(function(){upload.cancel(id)})}else if(cancelRetVal!==!1){upload.cancel(id)}},cancelAll:function(){var waitingOrConnected=connectionManager.getWaitingOrConnected(),i;if(waitingOrConnected.length){for(i=waitingOrConnected.length-1;i>=0;i--){controller.cancel(waitingOrConnected[i])}}
connectionManager.reset()},getFile:function(id){if(handler.getProxy&&handler.getProxy(id)){return handler.getProxy(id).referenceBlob}
return handler.getFile&&handler.getFile(id)},isProxied:function(id){return!!(handler.getProxy&&handler.getProxy(id))},getInput:function(id){if(handler.getInput){return handler.getInput(id)}},reset:function(){log("Resetting upload handler");controller.cancelAll();connectionManager.reset();handler.reset()},expunge:function(id){if(controller.isValid(id)){return handler.expunge(id)}},isValid:function(id){return handler.isValid(id)},getResumableFilesData:function(){if(handler.getResumableFilesData){return handler.getResumableFilesData()}
return[]},getThirdPartyFileId:function(id){if(controller.isValid(id)){return handler.getThirdPartyFileId(id)}},pause:function(id){if(controller.isResumable(id)&&handler.pause&&controller.isValid(id)&&handler.pause(id)){connectionManager.free(id);handler.moveInProgressToRemaining(id);return!0}
return!1},isResumable:function(id){return!!handler.isResumable&&handler.isResumable(id)}});qq.extend(options,o);log=options.log;chunkingPossible=options.chunking.enabled&&qq.supportedFeatures.chunking;concurrentChunkingPossible=chunkingPossible&&options.chunking.concurrent.enabled;preventRetryResponse=(function(){var response={};response[options.preventRetryParam]=!0;return response}());upload.initHandler()};qq.FormUploadHandler=function(spec){"use strict";var options=spec.options,handler=this,proxy=spec.proxy,formHandlerInstanceId=qq.getUniqueId(),onloadCallbacks={},detachLoadEvents={},postMessageCallbackTimers={},isCors=options.isCors,inputName=options.inputName,getUuid=proxy.getUuid,log=proxy.log,corsMessageReceiver=new qq.WindowReceiveMessage({log:log});function expungeFile(id){delete detachLoadEvents[id];if(isCors){clearTimeout(postMessageCallbackTimers[id]);delete postMessageCallbackTimers[id];corsMessageReceiver.stopReceivingMessages(id)}
var iframe=document.getElementById(handler._getIframeName(id));if(iframe){iframe.setAttribute("src","javascript:false;");qq(iframe).remove()}}
function getFileIdForIframeName(iframeName){return iframeName.split("_")[0]}
function initIframeForUpload(name){var iframe=qq.toElement("<iframe src='javascript:false;' name='"+name+"' />");iframe.setAttribute("id",name);iframe.style.display="none";document.body.appendChild(iframe);return iframe}
function registerPostMessageCallback(iframe,callback){var iframeName=iframe.id,fileId=getFileIdForIframeName(iframeName),uuid=getUuid(fileId);onloadCallbacks[uuid]=callback;detachLoadEvents[fileId]=qq(iframe).attach("load",function(){if(handler.getInput(fileId)){log("Received iframe load event for CORS upload request (iframe name "+iframeName+")");postMessageCallbackTimers[iframeName]=setTimeout(function(){var errorMessage="No valid message received from loaded iframe for iframe name "+iframeName;log(errorMessage,"error");callback({error:errorMessage})},1000)}});corsMessageReceiver.receiveMessage(iframeName,function(message){log("Received the following window message: '"+message+"'");var fileId=getFileIdForIframeName(iframeName),response=handler._parseJsonResponse(message),uuid=response.uuid,onloadCallback;if(uuid&&onloadCallbacks[uuid]){log("Handling response for iframe name "+iframeName);clearTimeout(postMessageCallbackTimers[iframeName]);delete postMessageCallbackTimers[iframeName];handler._detachLoadEvent(iframeName);onloadCallback=onloadCallbacks[uuid];delete onloadCallbacks[uuid];corsMessageReceiver.stopReceivingMessages(iframeName);onloadCallback(response)}else if(!uuid){log("'"+message+"' does not contain a UUID - ignoring.")}})}
qq.extend(this,new qq.UploadHandler(spec));qq.override(this,function(super_){return{add:function(id,fileInput){super_.add(id,{input:fileInput});fileInput.setAttribute("name",inputName);if(fileInput.parentNode){qq(fileInput).remove()}},expunge:function(id){expungeFile(id);super_.expunge(id)},isValid:function(id){return super_.isValid(id)&&handler._getFileState(id).input!==undefined}}});qq.extend(this,{getInput:function(id){return handler._getFileState(id).input},_attachLoadEvent:function(iframe,callback){var responseDescriptor;if(isCors){registerPostMessageCallback(iframe,callback)}else{detachLoadEvents[iframe.id]=qq(iframe).attach("load",function(){log("Received response for "+iframe.id);if(!iframe.parentNode){return}
try{if(iframe.contentDocument&&iframe.contentDocument.body&&iframe.contentDocument.body.innerHTML=="false"){return}}catch(error){log("Error when attempting to access iframe during handling of upload response ("+error.message+")","error");responseDescriptor={success:!1}}
callback(responseDescriptor)})}},_createIframe:function(id){var iframeName=handler._getIframeName(id);return initIframeForUpload(iframeName)},_detachLoadEvent:function(id){if(detachLoadEvents[id]!==undefined){detachLoadEvents[id]();delete detachLoadEvents[id]}},_getIframeName:function(fileId){return fileId+"_"+formHandlerInstanceId},_initFormForUpload:function(spec){var method=spec.method,endpoint=spec.endpoint,params=spec.params,paramsInBody=spec.paramsInBody,targetName=spec.targetName,form=qq.toElement("<form method='"+method+"' enctype='multipart/form-data'></form>"),url=endpoint;if(paramsInBody){qq.obj2Inputs(params,form)}else{url=qq.obj2url(params,endpoint)}
form.setAttribute("action",url);form.setAttribute("target",targetName);form.style.display="none";document.body.appendChild(form);return form},_parseJsonResponse:function(innerHtmlOrMessage){var response={};try{response=qq.parseJson(innerHtmlOrMessage)}catch(error){log("Error when attempting to parse iframe upload response ("+error.message+")","error")}
return response}})};qq.XhrUploadHandler=function(spec){"use strict";var handler=this,namespace=spec.options.namespace,proxy=spec.proxy,chunking=spec.options.chunking,resume=spec.options.resume,chunkFiles=chunking&&spec.options.chunking.enabled&&qq.supportedFeatures.chunking,resumeEnabled=resume&&spec.options.resume.enabled&&chunkFiles&&qq.supportedFeatures.resume,getName=proxy.getName,getSize=proxy.getSize,getUuid=proxy.getUuid,getEndpoint=proxy.getEndpoint,getDataByUuid=proxy.getDataByUuid,onUuidChanged=proxy.onUuidChanged,onProgress=proxy.onProgress,log=proxy.log;function abort(id){qq.each(handler._getXhrs(id),function(xhrId,xhr){var ajaxRequester=handler._getAjaxRequester(id,xhrId);xhr.onreadystatechange=null;xhr.upload.onprogress=null;xhr.abort();ajaxRequester&&ajaxRequester.canceled&&ajaxRequester.canceled(id)})}
qq.extend(this,new qq.UploadHandler(spec));qq.override(this,function(super_){return{add:function(id,blobOrProxy){if(qq.isFile(blobOrProxy)||qq.isBlob(blobOrProxy)){super_.add(id,{file:blobOrProxy})}else if(blobOrProxy instanceof qq.BlobProxy){super_.add(id,{proxy:blobOrProxy})}else{throw new Error("Passed obj is not a File, Blob, or proxy")}
handler._initTempState(id);resumeEnabled&&handler._maybePrepareForResume(id)},expunge:function(id){abort(id);handler._maybeDeletePersistedChunkData(id);handler._clearXhrs(id);super_.expunge(id)}}});qq.extend(this,{clearCachedChunk:function(id,chunkIdx){delete handler._getFileState(id).temp.cachedChunks[chunkIdx]},clearXhr:function(id,chunkIdx){var tempState=handler._getFileState(id).temp;if(tempState.xhrs){delete tempState.xhrs[chunkIdx]}
if(tempState.ajaxRequesters){delete tempState.ajaxRequesters[chunkIdx]}},finalizeChunks:function(id,responseParser){var lastChunkIdx=handler._getTotalChunks(id)-1,xhr=handler._getXhr(id,lastChunkIdx);if(responseParser){return new qq.Promise().success(responseParser(xhr),xhr)}
return new qq.Promise().success({},xhr)},getFile:function(id){return handler.isValid(id)&&handler._getFileState(id).file},getProxy:function(id){return handler.isValid(id)&&handler._getFileState(id).proxy},getResumableFilesData:function(){var resumableFilesData=[];handler._iterateResumeRecords(function(key,uploadData){handler.moveInProgressToRemaining(null,uploadData.chunking.inProgress,uploadData.chunking.remaining);var data={name:uploadData.name,remaining:uploadData.chunking.remaining,size:uploadData.size,uuid:uploadData.uuid};if(uploadData.key){data.key=uploadData.key}
resumableFilesData.push(data)});return resumableFilesData},isResumable:function(id){return!!chunking&&handler.isValid(id)&&!handler._getFileState(id).notResumable},moveInProgressToRemaining:function(id,optInProgress,optRemaining){var inProgress=optInProgress||handler._getFileState(id).chunking.inProgress,remaining=optRemaining||handler._getFileState(id).chunking.remaining;if(inProgress){log(qq.format("Moving these chunks from in-progress {}, to remaining.",JSON.stringify(inProgress)));inProgress.reverse();qq.each(inProgress,function(idx,chunkIdx){remaining.unshift(chunkIdx)});inProgress.length=0}},pause:function(id){if(handler.isValid(id)){log(qq.format("Aborting XHR upload for {} '{}' due to pause instruction.",id,getName(id)));handler._getFileState(id).paused=!0;abort(id);return!0}},reevaluateChunking:function(id){if(chunking&&handler.isValid(id)){var state=handler._getFileState(id),totalChunks,i;delete state.chunking;state.chunking={};totalChunks=handler._getTotalChunks(id);if(totalChunks>1||chunking.mandatory){state.chunking.enabled=!0;state.chunking.parts=totalChunks;state.chunking.remaining=[];for(i=0;i<totalChunks;i++){state.chunking.remaining.push(i)}
handler._initTempState(id)}else{state.chunking.enabled=!1}}},updateBlob:function(id,newBlob){if(handler.isValid(id)){handler._getFileState(id).file=newBlob}},_clearXhrs:function(id){var tempState=handler._getFileState(id).temp;qq.each(tempState.ajaxRequesters,function(chunkId){delete tempState.ajaxRequesters[chunkId]});qq.each(tempState.xhrs,function(chunkId){delete tempState.xhrs[chunkId]})},_createXhr:function(id,optChunkIdx){return handler._registerXhr(id,optChunkIdx,qq.createXhrInstance())},_getAjaxRequester:function(id,optChunkIdx){var chunkIdx=optChunkIdx==null?-1:optChunkIdx;return handler._getFileState(id).temp.ajaxRequesters[chunkIdx]},_getChunkData:function(id,chunkIndex){var chunkSize=chunking.partSize,fileSize=getSize(id),fileOrBlob=handler.getFile(id),startBytes=chunkSize*chunkIndex,endBytes=startBytes+chunkSize>=fileSize?fileSize:startBytes+chunkSize,totalChunks=handler._getTotalChunks(id),cachedChunks=this._getFileState(id).temp.cachedChunks,blob=cachedChunks[chunkIndex]||qq.sliceBlob(fileOrBlob,startBytes,endBytes);cachedChunks[chunkIndex]=blob;return{part:chunkIndex,start:startBytes,end:endBytes,count:totalChunks,blob:blob,size:endBytes-startBytes}},_getChunkDataForCallback:function(chunkData){return{partIndex:chunkData.part,startByte:chunkData.start+1,endByte:chunkData.end,totalParts:chunkData.count}},_getLocalStorageId:function(id){var formatVersion="5.0",name=getName(id),size=getSize(id),chunkSize=chunking.partSize,endpoint=getEndpoint(id);return qq.format("qq{}resume{}-{}-{}-{}-{}",namespace,formatVersion,name,size,chunkSize,endpoint)},_getMimeType:function(id){return handler.getFile(id).type},_getPersistableData:function(id){return handler._getFileState(id).chunking},_getTotalChunks:function(id){if(chunking){var fileSize=getSize(id),chunkSize=chunking.partSize;return Math.ceil(fileSize/chunkSize)}},_getXhr:function(id,optChunkIdx){var chunkIdx=optChunkIdx==null?-1:optChunkIdx;return handler._getFileState(id).temp.xhrs[chunkIdx]},_getXhrs:function(id){return handler._getFileState(id).temp.xhrs},_iterateResumeRecords:function(callback){if(resumeEnabled){qq.each(localStorage,function(key,item){if(key.indexOf(qq.format("qq{}resume",namespace))===0){var uploadData=JSON.parse(item);callback(key,uploadData)}})}},_initTempState:function(id){handler._getFileState(id).temp={ajaxRequesters:{},chunkProgress:{},xhrs:{},cachedChunks:{}}},_markNotResumable:function(id){handler._getFileState(id).notResumable=!0},_maybeDeletePersistedChunkData:function(id){var localStorageId;if(resumeEnabled&&handler.isResumable(id)){localStorageId=handler._getLocalStorageId(id);if(localStorageId&&localStorage.getItem(localStorageId)){localStorage.removeItem(localStorageId);return!0}}
return!1},_maybePrepareForResume:function(id){var state=handler._getFileState(id),localStorageId,persistedData;if(resumeEnabled&&state.key===undefined){localStorageId=handler._getLocalStorageId(id);persistedData=localStorage.getItem(localStorageId);if(persistedData){persistedData=JSON.parse(persistedData);if(getDataByUuid(persistedData.uuid)){handler._markNotResumable(id)}else{log(qq.format("Identified file with ID {} and name of {} as resumable.",id,getName(id)));onUuidChanged(id,persistedData.uuid);state.key=persistedData.key;state.chunking=persistedData.chunking;state.loaded=persistedData.loaded;state.attemptingResume=!0;handler.moveInProgressToRemaining(id)}}}},_maybePersistChunkedState:function(id){var state=handler._getFileState(id),localStorageId,persistedData;if(resumeEnabled&&handler.isResumable(id)){localStorageId=handler._getLocalStorageId(id);persistedData={name:getName(id),size:getSize(id),uuid:getUuid(id),key:state.key,chunking:state.chunking,loaded:state.loaded,lastUpdated:Date.now()};try{localStorage.setItem(localStorageId,JSON.stringify(persistedData))}catch(error){log(qq.format("Unable to save resume data for '{}' due to error: '{}'.",id,error.toString()),"warn")}}},_registerProgressHandler:function(id,chunkIdx,chunkSize){var xhr=handler._getXhr(id,chunkIdx),name=getName(id),progressCalculator={simple:function(loaded,total){var fileSize=getSize(id);if(loaded===total){onProgress(id,name,fileSize,fileSize)}else{onProgress(id,name,(loaded>=fileSize?fileSize-1:loaded),fileSize)}},chunked:function(loaded,total){var chunkProgress=handler._getFileState(id).temp.chunkProgress,totalSuccessfullyLoadedForFile=handler._getFileState(id).loaded,loadedForRequest=loaded,totalForRequest=total,totalFileSize=getSize(id),estActualChunkLoaded=loadedForRequest-(totalForRequest-chunkSize),totalLoadedForFile=totalSuccessfullyLoadedForFile;chunkProgress[chunkIdx]=estActualChunkLoaded;qq.each(chunkProgress,function(chunkIdx,chunkLoaded){totalLoadedForFile+=chunkLoaded});onProgress(id,name,totalLoadedForFile,totalFileSize)}};xhr.upload.onprogress=function(e){if(e.lengthComputable){var type=chunkSize==null?"simple":"chunked";progressCalculator[type](e.loaded,e.total)}}},_registerXhr:function(id,optChunkIdx,xhr,optAjaxRequester){var xhrsId=optChunkIdx==null?-1:optChunkIdx,tempState=handler._getFileState(id).temp;tempState.xhrs=tempState.xhrs||{};tempState.ajaxRequesters=tempState.ajaxRequesters||{};tempState.xhrs[xhrsId]=xhr;if(optAjaxRequester){tempState.ajaxRequesters[xhrsId]=optAjaxRequester}
return xhr},_removeExpiredChunkingRecords:function(){var expirationDays=resume.recordsExpireIn;handler._iterateResumeRecords(function(key,uploadData){var expirationDate=new Date(uploadData.lastUpdated);expirationDate.setDate(expirationDate.getDate()+expirationDays);if(expirationDate.getTime()<=Date.now()){log("Removing expired resume record with key "+key);localStorage.removeItem(key)}})},_shouldChunkThisFile:function(id){var state=handler._getFileState(id);if(!state.chunking){handler.reevaluateChunking(id)}
return state.chunking.enabled}})};qq.WindowReceiveMessage=function(o){"use strict";var options={log:function(message,level){}},callbackWrapperDetachers={};qq.extend(options,o);qq.extend(this,{receiveMessage:function(id,callback){var onMessageCallbackWrapper=function(event){callback(event.data)};if(window.postMessage){callbackWrapperDetachers[id]=qq(window).attach("message",onMessageCallbackWrapper)}else{log("iframe message passing not supported in this browser!","error")}},stopReceivingMessages:function(id){if(window.postMessage){var detacher=callbackWrapperDetachers[id];if(detacher){detacher()}}}})};(function(){"use strict";qq.uiPublicApi={addInitialFiles:function(cannedFileList){this._parent.prototype.addInitialFiles.apply(this,arguments);this._templating.addCacheToDom()},clearStoredFiles:function(){this._parent.prototype.clearStoredFiles.apply(this,arguments);this._templating.clearFiles()},addExtraDropzone:function(element){this._dnd&&this._dnd.setupExtraDropzone(element)},removeExtraDropzone:function(element){if(this._dnd){return this._dnd.removeDropzone(element)}},getItemByFileId:function(id){if(!this._templating.isHiddenForever(id)){return this._templating.getFileContainer(id)}},reset:function(){this._parent.prototype.reset.apply(this,arguments);this._templating.reset();if(!this._options.button&&this._templating.getButton()){this._defaultButtonId=this._createUploadButton({element:this._templating.getButton(),title:this._options.text.fileInputTitle}).getButtonId()}
if(this._dnd){this._dnd.dispose();this._dnd=this._setupDragAndDrop()}
this._totalFilesInBatch=0;this._filesInBatchAddedToUi=0;this._setupClickAndEditEventHandlers()},setName:function(id,newName){var formattedFilename=this._options.formatFileName(newName);this._parent.prototype.setName.apply(this,arguments);this._templating.updateFilename(id,formattedFilename)},pauseUpload:function(id){var paused=this._parent.prototype.pauseUpload.apply(this,arguments);paused&&this._templating.uploadPaused(id);return paused},continueUpload:function(id){var continued=this._parent.prototype.continueUpload.apply(this,arguments);continued&&this._templating.uploadContinued(id);return continued},getId:function(fileContainerOrChildEl){return this._templating.getFileId(fileContainerOrChildEl)},getDropTarget:function(fileId){var file=this.getFile(fileId);return file.qqDropTarget}};qq.uiPrivateApi={_getButton:function(buttonId){var button=this._parent.prototype._getButton.apply(this,arguments);if(!button){if(buttonId===this._defaultButtonId){button=this._templating.getButton()}}
return button},_removeFileItem:function(fileId){this._templating.removeFile(fileId)},_setupClickAndEditEventHandlers:function(){this._fileButtonsClickHandler=qq.FileButtonsClickHandler&&this._bindFileButtonsClickEvent();this._focusinEventSupported=!qq.firefox();if(this._isEditFilenameEnabled()){this._filenameClickHandler=this._bindFilenameClickEvent();this._filenameInputFocusInHandler=this._bindFilenameInputFocusInEvent();this._filenameInputFocusHandler=this._bindFilenameInputFocusEvent()}},_setupDragAndDrop:function(){var self=this,dropZoneElements=this._options.dragAndDrop.extraDropzones,templating=this._templating,defaultDropZone=templating.getDropZone();defaultDropZone&&dropZoneElements.push(defaultDropZone);return new qq.DragAndDrop({dropZoneElements:dropZoneElements,allowMultipleItems:this._options.multiple,classes:{dropActive:this._options.classes.dropActive},callbacks:{processingDroppedFiles:function(){templating.showDropProcessing()},processingDroppedFilesComplete:function(files,targetEl){templating.hideDropProcessing();qq.each(files,function(idx,file){file.qqDropTarget=targetEl});if(files.length){self.addFiles(files,null,null)}},dropError:function(code,errorData){self._itemError(code,errorData)},dropLog:function(message,level){self.log(message,level)}}})},_bindFileButtonsClickEvent:function(){var self=this;return new qq.FileButtonsClickHandler({templating:this._templating,log:function(message,lvl){self.log(message,lvl)},onDeleteFile:function(fileId){self.deleteFile(fileId)},onCancel:function(fileId){self.cancel(fileId)},onRetry:function(fileId){self.retry(fileId)},onPause:function(fileId){self.pauseUpload(fileId)},onContinue:function(fileId){self.continueUpload(fileId)},onGetName:function(fileId){return self.getName(fileId)}})},_isEditFilenameEnabled:function(){return this._templating.isEditFilenamePossible()&&!this._options.autoUpload&&qq.FilenameClickHandler&&qq.FilenameInputFocusHandler&&qq.FilenameInputFocusHandler},_filenameEditHandler:function(){var self=this,templating=this._templating;return{templating:templating,log:function(message,lvl){self.log(message,lvl)},onGetUploadStatus:function(fileId){return self.getUploads({id:fileId}).status},onGetName:function(fileId){return self.getName(fileId)},onSetName:function(id,newName){self.setName(id,newName)},onEditingStatusChange:function(id,isEditing){var qqInput=qq(templating.getEditInput(id)),qqFileContainer=qq(templating.getFileContainer(id));if(isEditing){qqInput.addClass("qq-editing");templating.hideFilename(id);templating.hideEditIcon(id)}else{qqInput.removeClass("qq-editing");templating.showFilename(id);templating.showEditIcon(id)}
qqFileContainer.addClass("qq-temp").removeClass("qq-temp")}}},_onUploadStatusChange:function(id,oldStatus,newStatus){this._parent.prototype._onUploadStatusChange.apply(this,arguments);if(this._isEditFilenameEnabled()){if(this._templating.getFileContainer(id)&&newStatus!==qq.status.SUBMITTED){this._templating.markFilenameEditable(id);this._templating.hideEditIcon(id)}}
if(newStatus===qq.status.UPLOAD_RETRYING){this._templating.hideRetry(id);this._templating.setStatusText(id);qq(this._templating.getFileContainer(id)).removeClass(this._classes.retrying)}else if(newStatus===qq.status.UPLOAD_FAILED){this._templating.hidePause(id)}},_bindFilenameInputFocusInEvent:function(){var spec=qq.extend({},this._filenameEditHandler());return new qq.FilenameInputFocusInHandler(spec)},_bindFilenameInputFocusEvent:function(){var spec=qq.extend({},this._filenameEditHandler());return new qq.FilenameInputFocusHandler(spec)},_bindFilenameClickEvent:function(){var spec=qq.extend({},this._filenameEditHandler());return new qq.FilenameClickHandler(spec)},_storeForLater:function(id){this._parent.prototype._storeForLater.apply(this,arguments);this._templating.hideSpinner(id)},_onAllComplete:function(successful,failed){this._parent.prototype._onAllComplete.apply(this,arguments);this._templating.resetTotalProgress()},_onSubmit:function(id,name){var file=this.getFile(id);if(file&&file.qqPath&&this._options.dragAndDrop.reportDirectoryPaths){this._paramsStore.addReadOnly(id,{qqpath:file.qqPath})}
this._parent.prototype._onSubmit.apply(this,arguments);this._addToList(id,name)},_onSubmitted:function(id){if(this._isEditFilenameEnabled()){this._templating.markFilenameEditable(id);this._templating.showEditIcon(id);if(!this._focusinEventSupported){this._filenameInputFocusHandler.addHandler(this._templating.getEditInput(id))}}},_onProgress:function(id,name,loaded,total){this._parent.prototype._onProgress.apply(this,arguments);this._templating.updateProgress(id,loaded,total);if(Math.round(loaded/total*100)===100){this._templating.hideCancel(id);this._templating.hidePause(id);this._templating.hideProgress(id);this._templating.setStatusText(id,this._options.text.waitingForResponse);this._displayFileSize(id)}else{this._displayFileSize(id,loaded,total)}},_onTotalProgress:function(loaded,total){this._parent.prototype._onTotalProgress.apply(this,arguments);this._templating.updateTotalProgress(loaded,total)},_onComplete:function(id,name,result,xhr){var parentRetVal=this._parent.prototype._onComplete.apply(this,arguments),templating=this._templating,fileContainer=templating.getFileContainer(id),self=this;function completeUpload(result){if(!fileContainer){return}
templating.setStatusText(id);qq(fileContainer).removeClass(self._classes.retrying);templating.hideProgress(id);if(self.getUploads({id:id}).status!==qq.status.UPLOAD_FAILED){templating.hideCancel(id)}
templating.hideSpinner(id);if(result.success){self._markFileAsSuccessful(id)}else{qq(fileContainer).addClass(self._classes.fail);templating.showCancel(id);if(templating.isRetryPossible()&&!self._preventRetries[id]){qq(fileContainer).addClass(self._classes.retryable);templating.showRetry(id)}
self._controlFailureTextDisplay(id,result)}}
if(parentRetVal instanceof qq.Promise){parentRetVal.done(function(newResult){completeUpload(newResult)})}else{completeUpload(result)}
return parentRetVal},_markFileAsSuccessful:function(id){var templating=this._templating;if(this._isDeletePossible()){templating.showDeleteButton(id)}
qq(templating.getFileContainer(id)).addClass(this._classes.success);this._maybeUpdateThumbnail(id)},_onUploadPrep:function(id){this._parent.prototype._onUploadPrep.apply(this,arguments);this._templating.showSpinner(id)},_onUpload:function(id,name){var parentRetVal=this._parent.prototype._onUpload.apply(this,arguments);this._templating.showSpinner(id);return parentRetVal},_onUploadChunk:function(id,chunkData){this._parent.prototype._onUploadChunk.apply(this,arguments);if(chunkData.partIndex>0&&this._handler.isResumable(id)){this._templating.allowPause(id)}},_onCancel:function(id,name){this._parent.prototype._onCancel.apply(this,arguments);this._removeFileItem(id);if(this._getNotFinished()===0){this._templating.resetTotalProgress()}},_onBeforeAutoRetry:function(id){var retryNumForDisplay,maxAuto,retryNote;this._parent.prototype._onBeforeAutoRetry.apply(this,arguments);this._showCancelLink(id);if(this._options.retry.showAutoRetryNote){retryNumForDisplay=this._autoRetries[id];maxAuto=this._options.retry.maxAutoAttempts;retryNote=this._options.retry.autoRetryNote.replace(/\{retryNum\}/g,retryNumForDisplay);retryNote=retryNote.replace(/\{maxAuto\}/g,maxAuto);this._templating.setStatusText(id,retryNote);qq(this._templating.getFileContainer(id)).addClass(this._classes.retrying)}},_onBeforeManualRetry:function(id){if(this._parent.prototype._onBeforeManualRetry.apply(this,arguments)){this._templating.resetProgress(id);qq(this._templating.getFileContainer(id)).removeClass(this._classes.fail);this._templating.setStatusText(id);this._templating.showSpinner(id);this._showCancelLink(id);return!0}else{qq(this._templating.getFileContainer(id)).addClass(this._classes.retryable);this._templating.showRetry(id);return!1}},_onSubmitDelete:function(id){var onSuccessCallback=qq.bind(this._onSubmitDeleteSuccess,this);this._parent.prototype._onSubmitDelete.call(this,id,onSuccessCallback)},_onSubmitDeleteSuccess:function(id,uuid,additionalMandatedParams){if(this._options.deleteFile.forceConfirm){this._showDeleteConfirm.apply(this,arguments)}else{this._sendDeleteRequest.apply(this,arguments)}},_onDeleteComplete:function(id,xhr,isError){this._parent.prototype._onDeleteComplete.apply(this,arguments);this._templating.hideSpinner(id);if(isError){this._templating.setStatusText(id,this._options.deleteFile.deletingFailedText);this._templating.showDeleteButton(id)}else{this._removeFileItem(id)}},_sendDeleteRequest:function(id,uuid,additionalMandatedParams){this._templating.hideDeleteButton(id);this._templating.showSpinner(id);this._templating.setStatusText(id,this._options.deleteFile.deletingStatusText);this._deleteHandler.sendDelete.apply(this,arguments)},_showDeleteConfirm:function(id,uuid,mandatedParams){var fileName=this.getName(id),confirmMessage=this._options.deleteFile.confirmMessage.replace(/\{filename\}/g,fileName),uuid=this.getUuid(id),deleteRequestArgs=arguments,self=this,retVal;retVal=this._options.showConfirm(confirmMessage);if(qq.isGenericPromise(retVal)){retVal.then(function(){self._sendDeleteRequest.apply(self,deleteRequestArgs)})}else if(retVal!==!1){self._sendDeleteRequest.apply(self,deleteRequestArgs)}},_addToList:function(id,name,canned){var prependData,prependIndex=0,dontDisplay=this._handler.isProxied(id)&&this._options.scaling.hideScaled,record;if(this._options.display.prependFiles){if(this._totalFilesInBatch>1&&this._filesInBatchAddedToUi>0){prependIndex=this._filesInBatchAddedToUi-1}
prependData={index:prependIndex}}
if(!canned){if(this._options.disableCancelForFormUploads&&!qq.supportedFeatures.ajaxUploading){this._templating.disableCancel()}
if(!this._options.multiple){record=this.getUploads({id:id});this._handledProxyGroup=this._handledProxyGroup||record.proxyGroupId;if(record.proxyGroupId!==this._handledProxyGroup||!record.proxyGroupId){this._handler.cancelAll();this._clearList();this._handledProxyGroup=null}}}
if(canned){this._templating.addFileToCache(id,this._options.formatFileName(name),prependData,dontDisplay);this._templating.updateThumbnail(id,this._thumbnailUrls[id],!0,this._options.thumbnails.customResizer)}else{this._templating.addFile(id,this._options.formatFileName(name),prependData,dontDisplay);this._templating.generatePreview(id,this.getFile(id),this._options.thumbnails.customResizer)}
this._filesInBatchAddedToUi+=1;if(canned||(this._options.display.fileSizeOnSubmit&&qq.supportedFeatures.ajaxUploading)){this._displayFileSize(id)}},_clearList:function(){this._templating.clearFiles();this.clearStoredFiles()},_displayFileSize:function(id,loadedSize,totalSize){var size=this.getSize(id),sizeForDisplay=this._formatSize(size);if(size>=0){if(loadedSize!==undefined&&totalSize!==undefined){sizeForDisplay=this._formatProgress(loadedSize,totalSize)}
this._templating.updateSize(id,sizeForDisplay)}},_formatProgress:function(uploadedSize,totalSize){var message=this._options.text.formatProgress;function r(name,replacement){message=message.replace(name,replacement)}
r("{percent}",Math.round(uploadedSize/totalSize*100));r("{total_size}",this._formatSize(totalSize));return message},_controlFailureTextDisplay:function(id,response){var mode,responseProperty,failureReason;mode=this._options.failedUploadTextDisplay.mode;responseProperty=this._options.failedUploadTextDisplay.responseProperty;if(mode==="custom"){failureReason=response[responseProperty];if(!failureReason){failureReason=this._options.text.failUpload}
this._templating.setStatusText(id,failureReason);if(this._options.failedUploadTextDisplay.enableTooltip){this._showTooltip(id,failureReason)}}else if(mode==="default"){this._templating.setStatusText(id,this._options.text.failUpload)}else if(mode!=="none"){this.log("failedUploadTextDisplay.mode value of '"+mode+"' is not valid","warn")}},_showTooltip:function(id,text){this._templating.getFileContainer(id).title=text},_showCancelLink:function(id){if(!this._options.disableCancelForFormUploads||qq.supportedFeatures.ajaxUploading){this._templating.showCancel(id)}},_itemError:function(code,name,item){var message=this._parent.prototype._itemError.apply(this,arguments);this._options.showMessage(message)},_batchError:function(message){this._parent.prototype._batchError.apply(this,arguments);this._options.showMessage(message)},_setupPastePrompt:function(){var self=this;this._options.callbacks.onPasteReceived=function(){var message=self._options.paste.namePromptMessage,defaultVal=self._options.paste.defaultName;return self._options.showPrompt(message,defaultVal)}},_fileOrBlobRejected:function(id,name){this._totalFilesInBatch-=1;this._parent.prototype._fileOrBlobRejected.apply(this,arguments)},_prepareItemsForUpload:function(items,params,endpoint){this._totalFilesInBatch=items.length;this._filesInBatchAddedToUi=0;this._parent.prototype._prepareItemsForUpload.apply(this,arguments)},_maybeUpdateThumbnail:function(fileId){var thumbnailUrl=this._thumbnailUrls[fileId],fileStatus=this.getUploads({id:fileId}).status;if(fileStatus!==qq.status.DELETED&&(thumbnailUrl||this._options.thumbnails.placeholders.waitUntilResponse||!qq.supportedFeatures.imagePreviews)){this._templating.updateThumbnail(fileId,thumbnailUrl,this._options.thumbnails.customResizer)}},_addCannedFile:function(sessionData){var id=this._parent.prototype._addCannedFile.apply(this,arguments);this._addToList(id,this.getName(id),!0);this._templating.hideSpinner(id);this._templating.hideCancel(id);this._markFileAsSuccessful(id);return id},_setSize:function(id,newSize){this._parent.prototype._setSize.apply(this,arguments);this._templating.updateSize(id,this._formatSize(newSize))},_sessionRequestComplete:function(){this._templating.addCacheToDom();this._parent.prototype._sessionRequestComplete.apply(this,arguments)}}}());qq.FineUploader=function(o,namespace){"use strict";var self=this;this._parent=namespace?qq[namespace].FineUploaderBasic:qq.FineUploaderBasic;this._parent.apply(this,arguments);qq.extend(this._options,{element:null,button:null,listElement:null,dragAndDrop:{extraDropzones:[],reportDirectoryPaths:!1},text:{formatProgress:"{percent}% of {total_size}",failUpload:"Upload failed",waitingForResponse:"Processing...",paused:"Paused"},template:"qq-template",classes:{retrying:"qq-upload-retrying",retryable:"qq-upload-retryable",success:"qq-upload-success",fail:"qq-upload-fail",editable:"qq-editable",hide:"qq-hide",dropActive:"qq-upload-drop-area-active"},failedUploadTextDisplay:{mode:"default",responseProperty:"error",enableTooltip:!0},messages:{tooManyFilesError:"You may only drop one file",unsupportedBrowser:"Unrecoverable error - this browser does not permit file uploading of any kind."},retry:{showAutoRetryNote:!0,autoRetryNote:"Retrying {retryNum}/{maxAuto}..."},deleteFile:{forceConfirm:!1,confirmMessage:"Are you sure you want to delete {filename}?",deletingStatusText:"Deleting...",deletingFailedText:"Delete failed"},display:{fileSizeOnSubmit:!1,prependFiles:!1},paste:{promptForName:!1,namePromptMessage:"Please name this image"},thumbnails:{customResizer:null,maxCount:0,placeholders:{waitUntilResponse:!1,notAvailablePath:null,waitingPath:null},timeBetweenThumbs:750},scaling:{hideScaled:!1},showMessage:function(message){if(self._templating.hasDialog("alert")){return self._templating.showDialog("alert",message)}else{setTimeout(function(){window.alert(message)},0)}},showConfirm:function(message){if(self._templating.hasDialog("confirm")){return self._templating.showDialog("confirm",message)}else{return window.confirm(message)}},showPrompt:function(message,defaultValue){if(self._templating.hasDialog("prompt")){return self._templating.showDialog("prompt",message,defaultValue)}else{return window.prompt(message,defaultValue)}}},!0);qq.extend(this._options,o,!0);this._templating=new qq.Templating({log:qq.bind(this.log,this),templateIdOrEl:this._options.template,containerEl:this._options.element,fileContainerEl:this._options.listElement,button:this._options.button,imageGenerator:this._imageGenerator,classes:{hide:this._options.classes.hide,editable:this._options.classes.editable},limits:{maxThumbs:this._options.thumbnails.maxCount,timeBetweenThumbs:this._options.thumbnails.timeBetweenThumbs},placeholders:{waitUntilUpdate:this._options.thumbnails.placeholders.waitUntilResponse,thumbnailNotAvailable:this._options.thumbnails.placeholders.notAvailablePath,waitingForThumbnail:this._options.thumbnails.placeholders.waitingPath},text:this._options.text});if(this._options.workarounds.ios8SafariUploads&&qq.ios800()&&qq.iosSafari()){this._templating.renderFailure(this._options.messages.unsupportedBrowserIos8Safari)}else if(!qq.supportedFeatures.uploading||(this._options.cors.expected&&!qq.supportedFeatures.uploadCors)){this._templating.renderFailure(this._options.messages.unsupportedBrowser)}else{this._wrapCallbacks();this._templating.render();this._classes=this._options.classes;if(!this._options.button&&this._templating.getButton()){this._defaultButtonId=this._createUploadButton({element:this._templating.getButton(),title:this._options.text.fileInputTitle}).getButtonId()}
this._setupClickAndEditEventHandlers();if(qq.DragAndDrop&&qq.supportedFeatures.fileDrop){this._dnd=this._setupDragAndDrop()}
if(this._options.paste.targetElement&&this._options.paste.promptForName){if(qq.PasteSupport){this._setupPastePrompt()}else{this.log("Paste support module not found.","error")}}
this._totalFilesInBatch=0;this._filesInBatchAddedToUi=0}};qq.extend(qq.FineUploader.prototype,qq.basePublicApi);qq.extend(qq.FineUploader.prototype,qq.basePrivateApi);qq.extend(qq.FineUploader.prototype,qq.uiPublicApi);qq.extend(qq.FineUploader.prototype,qq.uiPrivateApi);qq.Templating=function(spec){"use strict";var FILE_ID_ATTR="qq-file-id",FILE_CLASS_PREFIX="qq-file-id-",THUMBNAIL_MAX_SIZE_ATTR="qq-max-size",THUMBNAIL_SERVER_SCALE_ATTR="qq-server-scale",HIDE_DROPZONE_ATTR="qq-hide-dropzone",DROPZPONE_TEXT_ATTR="qq-drop-area-text",IN_PROGRESS_CLASS="qq-in-progress",HIDDEN_FOREVER_CLASS="qq-hidden-forever",fileBatch={content:document.createDocumentFragment(),map:{}},isCancelDisabled=!1,generatedThumbnails=0,thumbnailQueueMonitorRunning=!1,thumbGenerationQueue=[],thumbnailMaxSize=-1,options={log:null,limits:{maxThumbs:0,timeBetweenThumbs:750},templateIdOrEl:"qq-template",containerEl:null,fileContainerEl:null,button:null,imageGenerator:null,classes:{hide:"qq-hide",editable:"qq-editable"},placeholders:{waitUntilUpdate:!1,thumbnailNotAvailable:null,waitingForThumbnail:null},text:{paused:"Paused"}},selectorClasses={button:"qq-upload-button-selector",alertDialog:"qq-alert-dialog-selector",dialogCancelButton:"qq-cancel-button-selector",confirmDialog:"qq-confirm-dialog-selector",dialogMessage:"qq-dialog-message-selector",dialogOkButton:"qq-ok-button-selector",promptDialog:"qq-prompt-dialog-selector",uploader:"qq-uploader-selector",drop:"qq-upload-drop-area-selector",list:"qq-upload-list-selector",progressBarContainer:"qq-progress-bar-container-selector",progressBar:"qq-progress-bar-selector",totalProgressBarContainer:"qq-total-progress-bar-container-selector",totalProgressBar:"qq-total-progress-bar-selector",file:"qq-upload-file-selector",spinner:"qq-upload-spinner-selector",size:"qq-upload-size-selector",cancel:"qq-upload-cancel-selector",pause:"qq-upload-pause-selector",continueButton:"qq-upload-continue-selector",deleteButton:"qq-upload-delete-selector",retry:"qq-upload-retry-selector",statusText:"qq-upload-status-text-selector",editFilenameInput:"qq-edit-filename-selector",editNameIcon:"qq-edit-filename-icon-selector",dropText:"qq-upload-drop-area-text-selector",dropProcessing:"qq-drop-processing-selector",dropProcessingSpinner:"qq-drop-processing-spinner-selector",thumbnail:"qq-thumbnail-selector"},previewGeneration={},cachedThumbnailNotAvailableImg=new qq.Promise(),cachedWaitingForThumbnailImg=new qq.Promise(),log,isEditElementsExist,isRetryElementExist,templateHtml,container,fileList,showThumbnails,serverScale,cacheThumbnailPlaceholders=function(){var notAvailableUrl=options.placeholders.thumbnailNotAvailable,waitingUrl=options.placeholders.waitingForThumbnail,spec={maxSize:thumbnailMaxSize,scale:serverScale};if(showThumbnails){if(notAvailableUrl){options.imageGenerator.generate(notAvailableUrl,new Image(),spec).then(function(updatedImg){cachedThumbnailNotAvailableImg.success(updatedImg)},function(){cachedThumbnailNotAvailableImg.failure();log("Problem loading 'not available' placeholder image at "+notAvailableUrl,"error")})}else{cachedThumbnailNotAvailableImg.failure()}
if(waitingUrl){options.imageGenerator.generate(waitingUrl,new Image(),spec).then(function(updatedImg){cachedWaitingForThumbnailImg.success(updatedImg)},function(){cachedWaitingForThumbnailImg.failure();log("Problem loading 'waiting for thumbnail' placeholder image at "+waitingUrl,"error")})}else{cachedWaitingForThumbnailImg.failure()}}},displayWaitingImg=function(thumbnail){var waitingImgPlacement=new qq.Promise();cachedWaitingForThumbnailImg.then(function(img){maybeScalePlaceholderViaCss(img,thumbnail);if(!thumbnail.src){thumbnail.src=img.src;thumbnail.onload=function(){thumbnail.onload=null;show(thumbnail);waitingImgPlacement.success()}}else{waitingImgPlacement.success()}},function(){hide(thumbnail);waitingImgPlacement.success()});return waitingImgPlacement},generateNewPreview=function(id,blob,spec){var thumbnail=getThumbnail(id);log("Generating new thumbnail for "+id);blob.qqThumbnailId=id;return options.imageGenerator.generate(blob,thumbnail,spec).then(function(){generatedThumbnails++;show(thumbnail);previewGeneration[id].success()},function(){previewGeneration[id].failure();if(!options.placeholders.waitUntilUpdate){maybeSetDisplayNotAvailableImg(id,thumbnail)}})},generateNextQueuedPreview=function(){if(thumbGenerationQueue.length){thumbnailQueueMonitorRunning=!0;var queuedThumbRequest=thumbGenerationQueue.shift();if(queuedThumbRequest.update){processUpdateQueuedPreviewRequest(queuedThumbRequest)}else{processNewQueuedPreviewRequest(queuedThumbRequest)}}else{thumbnailQueueMonitorRunning=!1}},getCancel=function(id){return getTemplateEl(getFile(id),selectorClasses.cancel)},getContinue=function(id){return getTemplateEl(getFile(id),selectorClasses.continueButton)},getDialog=function(type){return getTemplateEl(container,selectorClasses[type+"Dialog"])},getDelete=function(id){return getTemplateEl(getFile(id),selectorClasses.deleteButton)},getDropProcessing=function(){return getTemplateEl(container,selectorClasses.dropProcessing)},getEditIcon=function(id){return getTemplateEl(getFile(id),selectorClasses.editNameIcon)},getFile=function(id){return fileBatch.map[id]||qq(fileList).getFirstByClass(FILE_CLASS_PREFIX+id)},getFilename=function(id){return getTemplateEl(getFile(id),selectorClasses.file)},getPause=function(id){return getTemplateEl(getFile(id),selectorClasses.pause)},getProgress=function(id){if(id==null){return getTemplateEl(container,selectorClasses.totalProgressBarContainer)||getTemplateEl(container,selectorClasses.totalProgressBar)}
return getTemplateEl(getFile(id),selectorClasses.progressBarContainer)||getTemplateEl(getFile(id),selectorClasses.progressBar)},getRetry=function(id){return getTemplateEl(getFile(id),selectorClasses.retry)},getSize=function(id){return getTemplateEl(getFile(id),selectorClasses.size)},getSpinner=function(id){return getTemplateEl(getFile(id),selectorClasses.spinner)},getTemplateEl=function(context,cssClass){return context&&qq(context).getFirstByClass(cssClass)},getThumbnail=function(id){return showThumbnails&&getTemplateEl(getFile(id),selectorClasses.thumbnail)},hide=function(el){el&&qq(el).addClass(options.classes.hide)},maybeScalePlaceholderViaCss=function(placeholder,thumbnail){var maxWidth=placeholder.style.maxWidth,maxHeight=placeholder.style.maxHeight;if(maxHeight&&maxWidth&&!thumbnail.style.maxWidth&&!thumbnail.style.maxHeight){qq(thumbnail).css({maxWidth:maxWidth,maxHeight:maxHeight})}},maybeSetDisplayNotAvailableImg=function(id,thumbnail){var previewing=previewGeneration[id]||new qq.Promise().failure(),notAvailableImgPlacement=new qq.Promise();cachedThumbnailNotAvailableImg.then(function(img){previewing.then(function(){notAvailableImgPlacement.success()},function(){maybeScalePlaceholderViaCss(img,thumbnail);thumbnail.onload=function(){thumbnail.onload=null;notAvailableImgPlacement.success()};thumbnail.src=img.src;show(thumbnail)})});return notAvailableImgPlacement},parseAndGetTemplate=function(){var scriptEl,scriptHtml,fileListNode,tempTemplateEl,fileListHtml,defaultButton,dropArea,thumbnail,dropProcessing,dropTextEl,uploaderEl;log("Parsing template");if(options.templateIdOrEl==null){throw new Error("You MUST specify either a template element or ID!")}
if(qq.isString(options.templateIdOrEl)){scriptEl=document.getElementById(options.templateIdOrEl);if(scriptEl===null){throw new Error(qq.format("Cannot find template script at ID '{}'!",options.templateIdOrEl))}
scriptHtml=scriptEl.innerHTML}else{if(options.templateIdOrEl.innerHTML===undefined){throw new Error("You have specified an invalid value for the template option!  "+"It must be an ID or an Element.")}
scriptHtml=options.templateIdOrEl.innerHTML}
scriptHtml=qq.trimStr(scriptHtml);tempTemplateEl=document.createElement("div");tempTemplateEl.appendChild(qq.toElement(scriptHtml));uploaderEl=qq(tempTemplateEl).getFirstByClass(selectorClasses.uploader);if(options.button){defaultButton=qq(tempTemplateEl).getFirstByClass(selectorClasses.button);if(defaultButton){qq(defaultButton).remove()}}
if(!qq.DragAndDrop||!qq.supportedFeatures.fileDrop){dropProcessing=qq(tempTemplateEl).getFirstByClass(selectorClasses.dropProcessing);if(dropProcessing){qq(dropProcessing).remove()}}
dropArea=qq(tempTemplateEl).getFirstByClass(selectorClasses.drop);if(dropArea&&!qq.DragAndDrop){log("DnD module unavailable.","info");qq(dropArea).remove()}
if(!qq.supportedFeatures.fileDrop){uploaderEl.removeAttribute(DROPZPONE_TEXT_ATTR);if(dropArea&&qq(dropArea).hasAttribute(HIDE_DROPZONE_ATTR)){qq(dropArea).css({display:"none"})}}else if(qq(uploaderEl).hasAttribute(DROPZPONE_TEXT_ATTR)&&dropArea){dropTextEl=qq(dropArea).getFirstByClass(selectorClasses.dropText);dropTextEl&&qq(dropTextEl).remove()}
thumbnail=qq(tempTemplateEl).getFirstByClass(selectorClasses.thumbnail);if(!showThumbnails){thumbnail&&qq(thumbnail).remove()}else if(thumbnail){thumbnailMaxSize=parseInt(thumbnail.getAttribute(THUMBNAIL_MAX_SIZE_ATTR));thumbnailMaxSize=thumbnailMaxSize>0?thumbnailMaxSize:null;serverScale=qq(thumbnail).hasAttribute(THUMBNAIL_SERVER_SCALE_ATTR)}
showThumbnails=showThumbnails&&thumbnail;isEditElementsExist=qq(tempTemplateEl).getByClass(selectorClasses.editFilenameInput).length>0;isRetryElementExist=qq(tempTemplateEl).getByClass(selectorClasses.retry).length>0;fileListNode=qq(tempTemplateEl).getFirstByClass(selectorClasses.list);if(fileListNode==null){throw new Error("Could not find the file list container in the template!")}
fileListHtml=fileListNode.innerHTML;fileListNode.innerHTML="";if(tempTemplateEl.getElementsByTagName("DIALOG").length){document.createElement("dialog")}
log("Template parsing complete");return{template:qq.trimStr(tempTemplateEl.innerHTML),fileTemplate:qq.trimStr(fileListHtml)}},prependFile=function(el,index,fileList){var parentEl=fileList,beforeEl=parentEl.firstChild;if(index>0){beforeEl=qq(parentEl).children()[index].nextSibling}
parentEl.insertBefore(el,beforeEl)},processNewQueuedPreviewRequest=function(queuedThumbRequest){var id=queuedThumbRequest.id,optFileOrBlob=queuedThumbRequest.optFileOrBlob,relatedThumbnailId=optFileOrBlob&&optFileOrBlob.qqThumbnailId,thumbnail=getThumbnail(id),spec={customResizeFunction:queuedThumbRequest.customResizeFunction,maxSize:thumbnailMaxSize,orient:!0,scale:!0};if(qq.supportedFeatures.imagePreviews){if(thumbnail){if(options.limits.maxThumbs&&options.limits.maxThumbs<=generatedThumbnails){maybeSetDisplayNotAvailableImg(id,thumbnail);generateNextQueuedPreview()}else{displayWaitingImg(thumbnail).done(function(){previewGeneration[id]=new qq.Promise();previewGeneration[id].done(function(){setTimeout(generateNextQueuedPreview,options.limits.timeBetweenThumbs)});if(relatedThumbnailId!=null){useCachedPreview(id,relatedThumbnailId)}else{generateNewPreview(id,optFileOrBlob,spec)}})}}else{generateNextQueuedPreview()}}else if(thumbnail){displayWaitingImg(thumbnail);generateNextQueuedPreview()}},processUpdateQueuedPreviewRequest=function(queuedThumbRequest){var id=queuedThumbRequest.id,thumbnailUrl=queuedThumbRequest.thumbnailUrl,showWaitingImg=queuedThumbRequest.showWaitingImg,thumbnail=getThumbnail(id),spec={customResizeFunction:queuedThumbRequest.customResizeFunction,scale:serverScale,maxSize:thumbnailMaxSize};if(thumbnail){if(thumbnailUrl){if(options.limits.maxThumbs&&options.limits.maxThumbs<=generatedThumbnails){maybeSetDisplayNotAvailableImg(id,thumbnail);generateNextQueuedPreview()}else{if(showWaitingImg){displayWaitingImg(thumbnail)}
return options.imageGenerator.generate(thumbnailUrl,thumbnail,spec).then(function(){show(thumbnail);generatedThumbnails++;setTimeout(generateNextQueuedPreview,options.limits.timeBetweenThumbs)},function(){maybeSetDisplayNotAvailableImg(id,thumbnail);setTimeout(generateNextQueuedPreview,options.limits.timeBetweenThumbs)})}}else{maybeSetDisplayNotAvailableImg(id,thumbnail);generateNextQueuedPreview()}}},setProgressBarWidth=function(id,percent){var bar=getProgress(id),progressBarSelector=id==null?selectorClasses.totalProgressBar:selectorClasses.progressBar;if(bar&&!qq(bar).hasClass(progressBarSelector)){bar=qq(bar).getFirstByClass(progressBarSelector)}
if(bar){qq(bar).css({width:percent+"%"});bar.setAttribute("aria-valuenow",percent)}},show=function(el){el&&qq(el).removeClass(options.classes.hide)},useCachedPreview=function(targetThumbnailId,cachedThumbnailId){var targetThumbnail=getThumbnail(targetThumbnailId),cachedThumbnail=getThumbnail(cachedThumbnailId);log(qq.format("ID {} is the same file as ID {}.  Will use generated thumbnail from ID {} instead.",targetThumbnailId,cachedThumbnailId,cachedThumbnailId));previewGeneration[cachedThumbnailId].then(function(){generatedThumbnails++;previewGeneration[targetThumbnailId].success();log(qq.format("Now using previously generated thumbnail created for ID {} on ID {}.",cachedThumbnailId,targetThumbnailId));targetThumbnail.src=cachedThumbnail.src;show(targetThumbnail)},function(){previewGeneration[targetThumbnailId].failure();if(!options.placeholders.waitUntilUpdate){maybeSetDisplayNotAvailableImg(targetThumbnailId,targetThumbnail)}})};qq.extend(options,spec);log=options.log;if(!qq.supportedFeatures.imagePreviews){options.limits.timeBetweenThumbs=0;options.limits.maxThumbs=0}
container=options.containerEl;showThumbnails=options.imageGenerator!==undefined;templateHtml=parseAndGetTemplate();cacheThumbnailPlaceholders();qq.extend(this,{render:function(){log("Rendering template in DOM.");generatedThumbnails=0;container.innerHTML=templateHtml.template;hide(getDropProcessing());this.hideTotalProgress();fileList=options.fileContainerEl||getTemplateEl(container,selectorClasses.list);log("Template rendering complete")},renderFailure:function(message){var cantRenderEl=qq.toElement(message);container.innerHTML="";container.appendChild(cantRenderEl)},reset:function(){this.render()},clearFiles:function(){fileList.innerHTML=""},disableCancel:function(){isCancelDisabled=!0},addFile:function(id,name,prependInfo,hideForever,batch){var fileEl=qq.toElement(templateHtml.fileTemplate),fileNameEl=getTemplateEl(fileEl,selectorClasses.file),uploaderEl=getTemplateEl(container,selectorClasses.uploader),fileContainer=batch?fileBatch.content:fileList,thumb;if(batch){fileBatch.map[id]=fileEl}
qq(fileEl).addClass(FILE_CLASS_PREFIX+id);uploaderEl.removeAttribute(DROPZPONE_TEXT_ATTR);if(fileNameEl){qq(fileNameEl).setText(name);fileNameEl.setAttribute("title",name)}
fileEl.setAttribute(FILE_ID_ATTR,id);if(prependInfo){prependFile(fileEl,prependInfo.index,fileContainer)}else{fileContainer.appendChild(fileEl)}
if(hideForever){fileEl.style.display="none";qq(fileEl).addClass(HIDDEN_FOREVER_CLASS)}else{hide(getProgress(id));hide(getSize(id));hide(getDelete(id));hide(getRetry(id));hide(getPause(id));hide(getContinue(id));if(isCancelDisabled){this.hideCancel(id)}
thumb=getThumbnail(id);if(thumb&&!thumb.src){cachedWaitingForThumbnailImg.then(function(waitingImg){thumb.src=waitingImg.src;if(waitingImg.style.maxHeight&&waitingImg.style.maxWidth){qq(thumb).css({maxHeight:waitingImg.style.maxHeight,maxWidth:waitingImg.style.maxWidth})}
show(thumb)})}}},addFileToCache:function(id,name,prependInfo,hideForever){this.addFile(id,name,prependInfo,hideForever,!0)},addCacheToDom:function(){fileList.appendChild(fileBatch.content);fileBatch.content=document.createDocumentFragment();fileBatch.map={}},removeFile:function(id){qq(getFile(id)).remove()},getFileId:function(el){var currentNode=el;if(currentNode){while(currentNode.getAttribute(FILE_ID_ATTR)==null){currentNode=currentNode.parentNode}
return parseInt(currentNode.getAttribute(FILE_ID_ATTR))}},getFileList:function(){return fileList},markFilenameEditable:function(id){var filename=getFilename(id);filename&&qq(filename).addClass(options.classes.editable)},updateFilename:function(id,name){var filenameEl=getFilename(id);if(filenameEl){qq(filenameEl).setText(name);filenameEl.setAttribute("title",name)}},hideFilename:function(id){hide(getFilename(id))},showFilename:function(id){show(getFilename(id))},isFileName:function(el){return qq(el).hasClass(selectorClasses.file)},getButton:function(){return options.button||getTemplateEl(container,selectorClasses.button)},hideDropProcessing:function(){hide(getDropProcessing())},showDropProcessing:function(){show(getDropProcessing())},getDropZone:function(){return getTemplateEl(container,selectorClasses.drop)},isEditFilenamePossible:function(){return isEditElementsExist},hideRetry:function(id){hide(getRetry(id))},isRetryPossible:function(){return isRetryElementExist},showRetry:function(id){show(getRetry(id))},getFileContainer:function(id){return getFile(id)},showEditIcon:function(id){var icon=getEditIcon(id);icon&&qq(icon).addClass(options.classes.editable)},isHiddenForever:function(id){return qq(getFile(id)).hasClass(HIDDEN_FOREVER_CLASS)},hideEditIcon:function(id){var icon=getEditIcon(id);icon&&qq(icon).removeClass(options.classes.editable)},isEditIcon:function(el){return qq(el).hasClass(selectorClasses.editNameIcon,!0)},getEditInput:function(id){return getTemplateEl(getFile(id),selectorClasses.editFilenameInput)},isEditInput:function(el){return qq(el).hasClass(selectorClasses.editFilenameInput,!0)},updateProgress:function(id,loaded,total){var bar=getProgress(id),percent;if(bar&&total>0){percent=Math.round(loaded/total*100);if(percent===100){hide(bar)}else{show(bar)}
setProgressBarWidth(id,percent)}},updateTotalProgress:function(loaded,total){this.updateProgress(null,loaded,total)},hideProgress:function(id){var bar=getProgress(id);bar&&hide(bar)},hideTotalProgress:function(){this.hideProgress()},resetProgress:function(id){setProgressBarWidth(id,0);this.hideTotalProgress(id)},resetTotalProgress:function(){this.resetProgress()},showCancel:function(id){if(!isCancelDisabled){var cancel=getCancel(id);cancel&&qq(cancel).removeClass(options.classes.hide)}},hideCancel:function(id){hide(getCancel(id))},isCancel:function(el){return qq(el).hasClass(selectorClasses.cancel,!0)},allowPause:function(id){show(getPause(id));hide(getContinue(id))},uploadPaused:function(id){this.setStatusText(id,options.text.paused);this.allowContinueButton(id);hide(getSpinner(id))},hidePause:function(id){hide(getPause(id))},isPause:function(el){return qq(el).hasClass(selectorClasses.pause,!0)},isContinueButton:function(el){return qq(el).hasClass(selectorClasses.continueButton,!0)},allowContinueButton:function(id){show(getContinue(id));hide(getPause(id))},uploadContinued:function(id){this.setStatusText(id,"");this.allowPause(id);show(getSpinner(id))},showDeleteButton:function(id){show(getDelete(id))},hideDeleteButton:function(id){hide(getDelete(id))},isDeleteButton:function(el){return qq(el).hasClass(selectorClasses.deleteButton,!0)},isRetry:function(el){return qq(el).hasClass(selectorClasses.retry,!0)},updateSize:function(id,text){var size=getSize(id);if(size){show(size);qq(size).setText(text)}},setStatusText:function(id,text){var textEl=getTemplateEl(getFile(id),selectorClasses.statusText);if(textEl){if(text==null){qq(textEl).clearText()}else{qq(textEl).setText(text)}}},hideSpinner:function(id){qq(getFile(id)).removeClass(IN_PROGRESS_CLASS);hide(getSpinner(id))},showSpinner:function(id){qq(getFile(id)).addClass(IN_PROGRESS_CLASS);show(getSpinner(id))},generatePreview:function(id,optFileOrBlob,customResizeFunction){if(!this.isHiddenForever(id)){thumbGenerationQueue.push({id:id,customResizeFunction:customResizeFunction,optFileOrBlob:optFileOrBlob});!thumbnailQueueMonitorRunning&&generateNextQueuedPreview()}},updateThumbnail:function(id,thumbnailUrl,showWaitingImg,customResizeFunction){if(!this.isHiddenForever(id)){thumbGenerationQueue.push({customResizeFunction:customResizeFunction,update:!0,id:id,thumbnailUrl:thumbnailUrl,showWaitingImg:showWaitingImg});!thumbnailQueueMonitorRunning&&generateNextQueuedPreview()}},hasDialog:function(type){return qq.supportedFeatures.dialogElement&&!!getDialog(type)},showDialog:function(type,message,defaultValue){var dialog=getDialog(type),messageEl=getTemplateEl(dialog,selectorClasses.dialogMessage),inputEl=dialog.getElementsByTagName("INPUT")[0],cancelBtn=getTemplateEl(dialog,selectorClasses.dialogCancelButton),okBtn=getTemplateEl(dialog,selectorClasses.dialogOkButton),promise=new qq.Promise(),closeHandler=function(){cancelBtn.removeEventListener("click",cancelClickHandler);okBtn&&okBtn.removeEventListener("click",okClickHandler);promise.failure()},cancelClickHandler=function(){cancelBtn.removeEventListener("click",cancelClickHandler);dialog.close()},okClickHandler=function(){dialog.removeEventListener("close",closeHandler);okBtn.removeEventListener("click",okClickHandler);dialog.close();promise.success(inputEl&&inputEl.value)};dialog.addEventListener("close",closeHandler);cancelBtn.addEventListener("click",cancelClickHandler);okBtn&&okBtn.addEventListener("click",okClickHandler);if(inputEl){inputEl.value=defaultValue}
messageEl.textContent=message;dialog.showModal();return promise}})};qq.traditional=qq.traditional||{};qq.traditional.FormUploadHandler=function(options,proxy){"use strict";var handler=this,getName=proxy.getName,getUuid=proxy.getUuid,log=proxy.log;function getIframeContentJson(id,iframe){var response,doc,innerHtml;try{doc=iframe.contentDocument||iframe.contentWindow.document;innerHtml=doc.body.innerHTML;log("converting iframe's innerHTML to JSON");log("innerHTML = "+innerHtml);if(innerHtml&&innerHtml.match(/^<pre/i)){innerHtml=doc.body.firstChild.firstChild.nodeValue}
response=handler._parseJsonResponse(innerHtml)}catch(error){log("Error when attempting to parse form upload response ("+error.message+")","error");response={success:!1}}
return response}
function createForm(id,iframe){var params=options.paramsStore.get(id),method=options.method.toLowerCase()==="get"?"GET":"POST",endpoint=options.endpointStore.get(id),name=getName(id);params[options.uuidName]=getUuid(id);params[options.filenameParam]=name;return handler._initFormForUpload({method:method,endpoint:endpoint,params:params,paramsInBody:options.paramsInBody,targetName:iframe.name})}
this.uploadFile=function(id){var input=handler.getInput(id),iframe=handler._createIframe(id),promise=new qq.Promise(),form;form=createForm(id,iframe);form.appendChild(input);handler._attachLoadEvent(iframe,function(responseFromMessage){log("iframe loaded");var response=responseFromMessage?responseFromMessage:getIframeContentJson(id,iframe);handler._detachLoadEvent(id);if(!options.cors.expected){qq(iframe).remove()}
if(response.success){promise.success(response)}else{promise.failure(response)}});log("Sending upload request for "+id);form.submit();qq(form).remove();return promise};qq.extend(this,new qq.FormUploadHandler({options:{isCors:options.cors.expected,inputName:options.inputName},proxy:{onCancel:options.onCancel,getName:getName,getUuid:getUuid,log:log}}))};qq.traditional=qq.traditional||{};qq.traditional.XhrUploadHandler=function(spec,proxy){"use strict";var handler=this,getName=proxy.getName,getSize=proxy.getSize,getUuid=proxy.getUuid,log=proxy.log,multipart=spec.forceMultipart||spec.paramsInBody,addChunkingSpecificParams=function(id,params,chunkData){var size=getSize(id),name=getName(id);params[spec.chunking.paramNames.partIndex]=chunkData.part;params[spec.chunking.paramNames.partByteOffset]=chunkData.start;params[spec.chunking.paramNames.chunkSize]=chunkData.size;params[spec.chunking.paramNames.totalParts]=chunkData.count;params[spec.totalFileSizeName]=size;if(multipart){params[spec.filenameParam]=name}},allChunksDoneRequester=new qq.traditional.AllChunksDoneAjaxRequester({cors:spec.cors,endpoint:spec.chunking.success.endpoint,log:log}),createReadyStateChangedHandler=function(id,xhr){var promise=new qq.Promise();xhr.onreadystatechange=function(){if(xhr.readyState===4){var result=onUploadOrChunkComplete(id,xhr);if(result.success){promise.success(result.response,xhr)}else{promise.failure(result.response,xhr)}}};return promise},getChunksCompleteParams=function(id){var params=spec.paramsStore.get(id),name=getName(id),size=getSize(id);params[spec.uuidName]=getUuid(id);params[spec.filenameParam]=name;params[spec.totalFileSizeName]=size;params[spec.chunking.paramNames.totalParts]=handler._getTotalChunks(id);return params},isErrorUploadResponse=function(xhr,response){return qq.indexOf([200,201,202,203,204],xhr.status)<0||!response.success||response.reset},onUploadOrChunkComplete=function(id,xhr){var response;log("xhr - server response received for "+id);log("responseText = "+xhr.responseText);response=parseResponse(!0,xhr);return{success:!isErrorUploadResponse(xhr,response),response:response}},parseResponse=function(upload,xhr){var response={};try{log(qq.format("Received response status {} with body: {}",xhr.status,xhr.responseText));response=qq.parseJson(xhr.responseText)}catch(error){upload&&log("Error when attempting to parse xhr response text ("+error.message+")","error")}
return response},sendChunksCompleteRequest=function(id){var promise=new qq.Promise();allChunksDoneRequester.complete(id,handler._createXhr(id),getChunksCompleteParams(id),spec.customHeaders.get(id)).then(function(xhr){promise.success(parseResponse(!1,xhr),xhr)},function(xhr){promise.failure(parseResponse(!1,xhr),xhr)});return promise},setParamsAndGetEntityToSend=function(params,xhr,fileOrBlob,id){var formData=new FormData(),method=spec.method,endpoint=spec.endpointStore.get(id),name=getName(id),size=getSize(id);params[spec.uuidName]=getUuid(id);params[spec.filenameParam]=name;if(multipart){params[spec.totalFileSizeName]=size}
if(!spec.paramsInBody){if(!multipart){params[spec.inputName]=name}
endpoint=qq.obj2url(params,endpoint)}
xhr.open(method,endpoint,!0);if(spec.cors.expected&&spec.cors.sendCredentials){xhr.withCredentials=!0}
if(multipart){if(spec.paramsInBody){qq.obj2FormData(params,formData)}
formData.append(spec.inputName,fileOrBlob);return formData}
return fileOrBlob},setUploadHeaders=function(id,xhr){var extraHeaders=spec.customHeaders.get(id),fileOrBlob=handler.getFile(id);xhr.setRequestHeader("Accept","application/json");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Cache-Control","no-cache");if(!multipart){xhr.setRequestHeader("Content-Type","application/octet-stream");xhr.setRequestHeader("X-Mime-Type",fileOrBlob.type)}
qq.each(extraHeaders,function(name,val){xhr.setRequestHeader(name,val)})};qq.extend(this,{uploadChunk:function(id,chunkIdx,resuming){var chunkData=handler._getChunkData(id,chunkIdx),xhr=handler._createXhr(id,chunkIdx),size=getSize(id),promise,toSend,params;promise=createReadyStateChangedHandler(id,xhr);handler._registerProgressHandler(id,chunkIdx,chunkData.size);params=spec.paramsStore.get(id);addChunkingSpecificParams(id,params,chunkData);if(resuming){params[spec.resume.paramNames.resuming]=!0}
toSend=setParamsAndGetEntityToSend(params,xhr,chunkData.blob,id);setUploadHeaders(id,xhr);xhr.send(toSend);return promise},uploadFile:function(id){var fileOrBlob=handler.getFile(id),promise,xhr,params,toSend;xhr=handler._createXhr(id);handler._registerProgressHandler(id);promise=createReadyStateChangedHandler(id,xhr);params=spec.paramsStore.get(id);toSend=setParamsAndGetEntityToSend(params,xhr,fileOrBlob,id);setUploadHeaders(id,xhr);xhr.send(toSend);return promise}});qq.extend(this,new qq.XhrUploadHandler({options:qq.extend({namespace:"traditional"},spec),proxy:qq.extend({getEndpoint:spec.endpointStore.get},proxy)}));qq.override(this,function(super_){return{finalizeChunks:function(id){if(spec.chunking.success.endpoint){return sendChunksCompleteRequest(id)}else{return super_.finalizeChunks(id,qq.bind(parseResponse,this,!0))}}}})};qq.traditional.AllChunksDoneAjaxRequester=function(o){"use strict";var requester,method="POST",options={cors:{allowXdr:!1,expected:!1,sendCredentials:!1},endpoint:null,log:function(str,level){}},promises={},endpointHandler={get:function(id){return options.endpoint}};qq.extend(options,o);requester=qq.extend(this,new qq.AjaxRequester({acceptHeader:"application/json",validMethods:[method],method:method,endpointStore:endpointHandler,allowXRequestedWithAndCacheControl:!1,cors:options.cors,log:options.log,onComplete:function(id,xhr,isError){var promise=promises[id];delete promises[id];if(isError){promise.failure(xhr)}else{promise.success(xhr)}}}));qq.extend(this,{complete:function(id,xhr,params,headers){var promise=new qq.Promise();options.log("Submitting All Chunks Done request for "+id);promises[id]=promise;requester.initTransport(id).withParams(params).withHeaders(headers).send(xhr);return promise}})};qq.PasteSupport=function(o){"use strict";var options,detachPasteHandler;options={targetElement:null,callbacks:{log:function(message,level){},pasteReceived:function(blob){}}};function isImage(item){return item.type&&item.type.indexOf("image/")===0}
function registerPasteHandler(){detachPasteHandler=qq(options.targetElement).attach("paste",function(event){var clipboardData=event.clipboardData;if(clipboardData){qq.each(clipboardData.items,function(idx,item){if(isImage(item)){var blob=item.getAsFile();options.callbacks.pasteReceived(blob)}})}})}
function unregisterPasteHandler(){if(detachPasteHandler){detachPasteHandler()}}
qq.extend(options,o);registerPasteHandler();qq.extend(this,{reset:function(){unregisterPasteHandler()}})};qq.DragAndDrop=function(o){"use strict";var options,HIDE_ZONES_EVENT_NAME="qq-hidezones",HIDE_BEFORE_ENTER_ATTR="qq-hide-dropzone",uploadDropZones=[],droppedFiles=[],disposeSupport=new qq.DisposeSupport();options={dropZoneElements:[],allowMultipleItems:!0,classes:{dropActive:null},callbacks:new qq.DragAndDrop.callbacks()};qq.extend(options,o,!0);function uploadDroppedFiles(files,uploadDropZone){var filesAsArray=Array.prototype.slice.call(files);options.callbacks.dropLog("Grabbed "+files.length+" dropped files.");uploadDropZone.dropDisabled(!1);options.callbacks.processingDroppedFilesComplete(filesAsArray,uploadDropZone.getElement())}
function traverseFileTree(entry){var parseEntryPromise=new qq.Promise();if(entry.isFile){entry.file(function(file){var name=entry.name,fullPath=entry.fullPath,indexOfNameInFullPath=fullPath.indexOf(name);fullPath=fullPath.substr(0,indexOfNameInFullPath);if(fullPath.charAt(0)==="/"){fullPath=fullPath.substr(1)}
file.qqPath=fullPath;droppedFiles.push(file);parseEntryPromise.success()},function(fileError){options.callbacks.dropLog("Problem parsing '"+entry.fullPath+"'.  FileError code "+fileError.code+".","error");parseEntryPromise.failure()})}else if(entry.isDirectory){getFilesInDirectory(entry).then(function allEntriesRead(entries){var entriesLeft=entries.length;qq.each(entries,function(idx,entry){traverseFileTree(entry).done(function(){entriesLeft-=1;if(entriesLeft===0){parseEntryPromise.success()}})});if(!entries.length){parseEntryPromise.success()}},function readFailure(fileError){options.callbacks.dropLog("Problem parsing '"+entry.fullPath+"'.  FileError code "+fileError.code+".","error");parseEntryPromise.failure()})}
return parseEntryPromise}
function getFilesInDirectory(entry,reader,accumEntries,existingPromise){var promise=existingPromise||new qq.Promise(),dirReader=reader||entry.createReader();dirReader.readEntries(function readSuccess(entries){var newEntries=accumEntries?accumEntries.concat(entries):entries;if(entries.length){setTimeout(function(){getFilesInDirectory(entry,dirReader,newEntries,promise)},0)}else{promise.success(newEntries)}},promise.failure);return promise}
function handleDataTransfer(dataTransfer,uploadDropZone){var pendingFolderPromises=[],handleDataTransferPromise=new qq.Promise();options.callbacks.processingDroppedFiles();uploadDropZone.dropDisabled(!0);if(dataTransfer.files.length>1&&!options.allowMultipleItems){options.callbacks.processingDroppedFilesComplete([]);options.callbacks.dropError("tooManyFilesError","");uploadDropZone.dropDisabled(!1);handleDataTransferPromise.failure()}else{droppedFiles=[];if(qq.isFolderDropSupported(dataTransfer)){qq.each(dataTransfer.items,function(idx,item){var entry=item.webkitGetAsEntry();if(entry){if(entry.isFile){droppedFiles.push(item.getAsFile())}else{pendingFolderPromises.push(traverseFileTree(entry).done(function(){pendingFolderPromises.pop();if(pendingFolderPromises.length===0){handleDataTransferPromise.success()}}))}}})}else{droppedFiles=dataTransfer.files}
if(pendingFolderPromises.length===0){handleDataTransferPromise.success()}}
return handleDataTransferPromise}
function setupDropzone(dropArea){var dropZone=new qq.UploadDropZone({HIDE_ZONES_EVENT_NAME:HIDE_ZONES_EVENT_NAME,element:dropArea,onEnter:function(e){qq(dropArea).addClass(options.classes.dropActive);e.stopPropagation()},onLeaveNotDescendants:function(e){qq(dropArea).removeClass(options.classes.dropActive)},onDrop:function(e){handleDataTransfer(e.dataTransfer,dropZone).then(function(){uploadDroppedFiles(droppedFiles,dropZone)},function(){options.callbacks.dropLog("Drop event DataTransfer parsing failed.  No files will be uploaded.","error")})}});disposeSupport.addDisposer(function(){dropZone.dispose()});qq(dropArea).hasAttribute(HIDE_BEFORE_ENTER_ATTR)&&qq(dropArea).hide();uploadDropZones.push(dropZone);return dropZone}
function isFileDrag(dragEvent){var fileDrag;qq.each(dragEvent.dataTransfer.types,function(key,val){if(val==="Files"){fileDrag=!0;return!1}});return fileDrag}
function leavingDocumentOut(e){if(qq.firefox()){return!e.relatedTarget}
if(qq.safari()){return e.x<0||e.y<0}
return e.x===0&&e.y===0}
function setupDragDrop(){var dropZones=options.dropZoneElements,maybeHideDropZones=function(){setTimeout(function(){qq.each(dropZones,function(idx,dropZone){qq(dropZone).hasAttribute(HIDE_BEFORE_ENTER_ATTR)&&qq(dropZone).hide();qq(dropZone).removeClass(options.classes.dropActive)})},10)};qq.each(dropZones,function(idx,dropZone){var uploadDropZone=setupDropzone(dropZone);if(dropZones.length&&qq.supportedFeatures.fileDrop){disposeSupport.attach(document,"dragenter",function(e){if(!uploadDropZone.dropDisabled()&&isFileDrag(e)){qq.each(dropZones,function(idx,dropZone){if(dropZone instanceof HTMLElement&&qq(dropZone).hasAttribute(HIDE_BEFORE_ENTER_ATTR)){qq(dropZone).css({display:"block"})}})}})}});disposeSupport.attach(document,"dragleave",function(e){if(leavingDocumentOut(e)){maybeHideDropZones()}});disposeSupport.attach(qq(document).children()[0],"mouseenter",function(e){maybeHideDropZones()});disposeSupport.attach(document,"drop",function(e){e.preventDefault();maybeHideDropZones()});disposeSupport.attach(document,HIDE_ZONES_EVENT_NAME,maybeHideDropZones)}
setupDragDrop();qq.extend(this,{setupExtraDropzone:function(element){options.dropZoneElements.push(element);setupDropzone(element)},removeDropzone:function(element){var i,dzs=options.dropZoneElements;for(i in dzs){if(dzs[i]===element){return dzs.splice(i,1)}}},dispose:function(){disposeSupport.dispose();qq.each(uploadDropZones,function(idx,dropZone){dropZone.dispose()})}})};qq.DragAndDrop.callbacks=function(){"use strict";return{processingDroppedFiles:function(){},processingDroppedFilesComplete:function(files,targetEl){},dropError:function(code,errorSpecifics){qq.log("Drag & drop error code '"+code+" with these specifics: '"+errorSpecifics+"'","error")},dropLog:function(message,level){qq.log(message,level)}}};qq.UploadDropZone=function(o){"use strict";var disposeSupport=new qq.DisposeSupport(),options,element,preventDrop,dropOutsideDisabled;options={element:null,onEnter:function(e){},onLeave:function(e){},onLeaveNotDescendants:function(e){},onDrop:function(e){}};qq.extend(options,o);element=options.element;function dragoverShouldBeCanceled(){return qq.safari()||(qq.firefox()&&qq.windows())}
function disableDropOutside(e){if(!dropOutsideDisabled){if(dragoverShouldBeCanceled){disposeSupport.attach(document,"dragover",function(e){e.preventDefault()})}else{disposeSupport.attach(document,"dragover",function(e){if(e.dataTransfer){e.dataTransfer.dropEffect="none";e.preventDefault()}})}
dropOutsideDisabled=!0}}
function isValidFileDrag(e){if(!qq.supportedFeatures.fileDrop){return!1}
var effectTest,dt=e.dataTransfer,isSafari=qq.safari();effectTest=qq.ie()&&qq.supportedFeatures.fileDrop?!0:dt.effectAllowed!=="none";return dt&&effectTest&&(dt.files||(!isSafari&&dt.types.contains&&dt.types.contains("Files")))}
function isOrSetDropDisabled(isDisabled){if(isDisabled!==undefined){preventDrop=isDisabled}
return preventDrop}
function triggerHidezonesEvent(){var hideZonesEvent;function triggerUsingOldApi(){hideZonesEvent=document.createEvent("Event");hideZonesEvent.initEvent(options.HIDE_ZONES_EVENT_NAME,!0,!0)}
if(window.CustomEvent){try{hideZonesEvent=new CustomEvent(options.HIDE_ZONES_EVENT_NAME)}catch(err){triggerUsingOldApi()}}else{triggerUsingOldApi()}
document.dispatchEvent(hideZonesEvent)}
function attachEvents(){disposeSupport.attach(element,"dragover",function(e){if(!isValidFileDrag(e)){return}
var effect=qq.ie()&&qq.supportedFeatures.fileDrop?null:e.dataTransfer.effectAllowed;if(effect==="move"||effect==="linkMove"){e.dataTransfer.dropEffect="move"}else{e.dataTransfer.dropEffect="copy"}
e.stopPropagation();e.preventDefault()});disposeSupport.attach(element,"dragenter",function(e){if(!isOrSetDropDisabled()){if(!isValidFileDrag(e)){return}
options.onEnter(e)}});disposeSupport.attach(element,"dragleave",function(e){if(!isValidFileDrag(e)){return}
options.onLeave(e);var relatedTarget=document.elementFromPoint(e.clientX,e.clientY);if(qq(this).contains(relatedTarget)){return}
options.onLeaveNotDescendants(e)});disposeSupport.attach(element,"drop",function(e){if(!isOrSetDropDisabled()){if(!isValidFileDrag(e)){return}
e.preventDefault();e.stopPropagation();options.onDrop(e);triggerHidezonesEvent()}})}
disableDropOutside();attachEvents();qq.extend(this,{dropDisabled:function(isDisabled){return isOrSetDropDisabled(isDisabled)},dispose:function(){disposeSupport.dispose()},getElement:function(){return element}})};qq.DeleteFileAjaxRequester=function(o){"use strict";var requester,options={method:"DELETE",uuidParamName:"qquuid",endpointStore:{},maxConnections:3,customHeaders:function(id){return{}},paramsStore:{},cors:{expected:!1,sendCredentials:!1},log:function(str,level){},onDelete:function(id){},onDeleteComplete:function(id,xhrOrXdr,isError){}};qq.extend(options,o);function getMandatedParams(){if(options.method.toUpperCase()==="POST"){return{_method:"DELETE"}}
return{}}
requester=qq.extend(this,new qq.AjaxRequester({acceptHeader:"application/json",validMethods:["POST","DELETE"],method:options.method,endpointStore:options.endpointStore,paramsStore:options.paramsStore,mandatedParams:getMandatedParams(),maxConnections:options.maxConnections,customHeaders:function(id){return options.customHeaders.get(id)},log:options.log,onSend:options.onDelete,onComplete:options.onDeleteComplete,cors:options.cors}));qq.extend(this,{sendDelete:function(id,uuid,additionalMandatedParams){var additionalOptions=additionalMandatedParams||{};options.log("Submitting delete file request for "+id);if(options.method==="DELETE"){requester.initTransport(id).withPath(uuid).withParams(additionalOptions).send()}else{additionalOptions[options.uuidParamName]=uuid;requester.initTransport(id).withParams(additionalOptions).send()}}})};(function(){function detectSubsampling(img){var iw=img.naturalWidth,ih=img.naturalHeight,canvas=document.createElement("canvas"),ctx;if(iw*ih>1024*1024){canvas.width=canvas.height=1;ctx=canvas.getContext("2d");ctx.drawImage(img,-iw+1,0);return ctx.getImageData(0,0,1,1).data[3]===0}else{return!1}}
function detectVerticalSquash(img,iw,ih){var canvas=document.createElement("canvas"),sy=0,ey=ih,py=ih,ctx,data,alpha,ratio;canvas.width=1;canvas.height=ih;ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);data=ctx.getImageData(0,0,1,ih).data;while(py>sy){alpha=data[(py-1)*4+3];if(alpha===0){ey=py}else{sy=py}
py=(ey+sy)>>1}
ratio=(py/ih);return(ratio===0)?1:ratio}
function renderImageToDataURL(img,blob,options,doSquash){var canvas=document.createElement("canvas"),mime=options.mime||"image/jpeg",promise=new qq.Promise();renderImageToCanvas(img,blob,canvas,options,doSquash).then(function(){promise.success(canvas.toDataURL(mime,options.quality||0.8))})
return promise}
function maybeCalculateDownsampledDimensions(spec){var maxPixels=5241000;if(!qq.ios()){throw new qq.Error("Downsampled dimensions can only be reliably calculated for iOS!")}
if(spec.origHeight*spec.origWidth>maxPixels){return{newHeight:Math.round(Math.sqrt(maxPixels*(spec.origHeight/spec.origWidth))),newWidth:Math.round(Math.sqrt(maxPixels*(spec.origWidth/spec.origHeight)))}}}
function renderImageToCanvas(img,blob,canvas,options,doSquash){var iw=img.naturalWidth,ih=img.naturalHeight,width=options.width,height=options.height,ctx=canvas.getContext("2d"),promise=new qq.Promise(),modifiedDimensions;ctx.save();if(options.resize){return renderImageToCanvasWithCustomResizer({blob:blob,canvas:canvas,image:img,imageHeight:ih,imageWidth:iw,orientation:options.orientation,resize:options.resize,targetHeight:height,targetWidth:width})}
if(!qq.supportedFeatures.unlimitedScaledImageSize){modifiedDimensions=maybeCalculateDownsampledDimensions({origWidth:width,origHeight:height});if(modifiedDimensions){qq.log(qq.format("Had to reduce dimensions due to device limitations from {}w / {}h to {}w / {}h",width,height,modifiedDimensions.newWidth,modifiedDimensions.newHeight),"warn");width=modifiedDimensions.newWidth;height=modifiedDimensions.newHeight}}
transformCoordinate(canvas,width,height,options.orientation);if(qq.ios()){(function(){if(detectSubsampling(img)){iw/=2;ih/=2}
var d=1024,tmpCanvas=document.createElement("canvas"),vertSquashRatio=doSquash?detectVerticalSquash(img,iw,ih):1,dw=Math.ceil(d*width/iw),dh=Math.ceil(d*height/ih/vertSquashRatio),sy=0,dy=0,tmpCtx,sx,dx;tmpCanvas.width=tmpCanvas.height=d;tmpCtx=tmpCanvas.getContext("2d");while(sy<ih){sx=0;dx=0;while(sx<iw){tmpCtx.clearRect(0,0,d,d);tmpCtx.drawImage(img,-sx,-sy);ctx.drawImage(tmpCanvas,0,0,d,d,dx,dy,dw,dh);sx+=d;dx+=dw}
sy+=d;dy+=dh}
ctx.restore();tmpCanvas=tmpCtx=null}())}else{ctx.drawImage(img,0,0,width,height)}
canvas.qqImageRendered&&canvas.qqImageRendered();promise.success();return promise}
function renderImageToCanvasWithCustomResizer(resizeInfo){var blob=resizeInfo.blob,image=resizeInfo.image,imageHeight=resizeInfo.imageHeight,imageWidth=resizeInfo.imageWidth,orientation=resizeInfo.orientation,promise=new qq.Promise(),resize=resizeInfo.resize,sourceCanvas=document.createElement("canvas"),sourceCanvasContext=sourceCanvas.getContext("2d"),targetCanvas=resizeInfo.canvas,targetHeight=resizeInfo.targetHeight,targetWidth=resizeInfo.targetWidth;transformCoordinate(sourceCanvas,imageWidth,imageHeight,orientation);targetCanvas.height=targetHeight;targetCanvas.width=targetWidth;sourceCanvasContext.drawImage(image,0,0);resize({blob:blob,height:targetHeight,image:image,sourceCanvas:sourceCanvas,targetCanvas:targetCanvas,width:targetWidth}).then(function success(){targetCanvas.qqImageRendered&&targetCanvas.qqImageRendered();promise.success()},promise.failure)
return promise}
function transformCoordinate(canvas,width,height,orientation){switch(orientation){case 5:case 6:case 7:case 8:canvas.width=height;canvas.height=width;break;default:canvas.width=width;canvas.height=height}
var ctx=canvas.getContext("2d");switch(orientation){case 2:ctx.translate(width,0);ctx.scale(-1,1);break;case 3:ctx.translate(width,height);ctx.rotate(Math.PI);break;case 4:ctx.translate(0,height);ctx.scale(1,-1);break;case 5:ctx.rotate(0.5*Math.PI);ctx.scale(1,-1);break;case 6:ctx.rotate(0.5*Math.PI);ctx.translate(0,-height);break;case 7:ctx.rotate(0.5*Math.PI);ctx.translate(width,-height);ctx.scale(-1,1);break;case 8:ctx.rotate(-0.5*Math.PI);ctx.translate(-width,0);break;default:break}}
function MegaPixImage(srcImage,errorCallback){var self=this;if(window.Blob&&srcImage instanceof Blob){(function(){var img=new Image(),URL=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null;if(!URL){throw Error("No createObjectURL function found to create blob url")}
img.src=URL.createObjectURL(srcImage);self.blob=srcImage;srcImage=img}())}
if(!srcImage.naturalWidth&&!srcImage.naturalHeight){srcImage.onload=function(){var listeners=self.imageLoadListeners;if(listeners){self.imageLoadListeners=null;setTimeout(function(){for(var i=0,len=listeners.length;i<len;i++){listeners[i]()}},0)}};srcImage.onerror=errorCallback;this.imageLoadListeners=[]}
this.srcImage=srcImage}
MegaPixImage.prototype.render=function(target,options){options=options||{};var self=this,imgWidth=this.srcImage.naturalWidth,imgHeight=this.srcImage.naturalHeight,width=options.width,height=options.height,maxWidth=options.maxWidth,maxHeight=options.maxHeight,doSquash=!this.blob||this.blob.type==="image/jpeg",tagName=target.tagName.toLowerCase(),opt;if(this.imageLoadListeners){this.imageLoadListeners.push(function(){self.render(target,options)});return}
if(width&&!height){height=(imgHeight*width/imgWidth)<<0}else if(height&&!width){width=(imgWidth*height/imgHeight)<<0}else{width=imgWidth;height=imgHeight}
if(maxWidth&&width>maxWidth){width=maxWidth;height=(imgHeight*width/imgWidth)<<0}
if(maxHeight&&height>maxHeight){height=maxHeight;width=(imgWidth*height/imgHeight)<<0}
opt={width:width,height:height},qq.each(options,function(optionsKey,optionsValue){opt[optionsKey]=optionsValue});if(tagName==="img"){(function(){var oldTargetSrc=target.src;renderImageToDataURL(self.srcImage,self.blob,opt,doSquash).then(function(dataUri){target.src=dataUri;oldTargetSrc===target.src&&target.onload()})}())}else if(tagName==="canvas"){renderImageToCanvas(this.srcImage,this.blob,target,opt,doSquash)}
if(typeof this.onrender==="function"){this.onrender(target)}};qq.MegaPixImage=MegaPixImage})();qq.ImageGenerator=function(log){"use strict";function isImg(el){return el.tagName.toLowerCase()==="img"}
function isCanvas(el){return el.tagName.toLowerCase()==="canvas"}
function isImgCorsSupported(){return new Image().crossOrigin!==undefined}
function isCanvasSupported(){var canvas=document.createElement("canvas");return canvas.getContext&&canvas.getContext("2d")}
function determineMimeOfFileName(nameWithPath){var pathSegments=nameWithPath.split("/"),name=pathSegments[pathSegments.length-1].split("?")[0],extension=qq.getExtension(name);extension=extension&&extension.toLowerCase();switch(extension){case "jpeg":case "jpg":return"image/jpeg";case "png":return"image/png";case "bmp":return"image/bmp";case "gif":return"image/gif";case "tiff":case "tif":return"image/tiff"}}
function isCrossOrigin(url){var targetAnchor=document.createElement("a"),targetProtocol,targetHostname,targetPort;targetAnchor.href=url;targetProtocol=targetAnchor.protocol;targetPort=targetAnchor.port;targetHostname=targetAnchor.hostname;if(targetProtocol.toLowerCase()!==window.location.protocol.toLowerCase()){return!0}
if(targetHostname.toLowerCase()!==window.location.hostname.toLowerCase()){return!0}
if(targetPort!==window.location.port&&!qq.ie()){return!0}
return!1}
function registerImgLoadListeners(img,promise){img.onload=function(){img.onload=null;img.onerror=null;promise.success(img)};img.onerror=function(){img.onload=null;img.onerror=null;log("Problem drawing thumbnail!","error");promise.failure(img,"Problem drawing thumbnail!")}}
function registerCanvasDrawImageListener(canvas,promise){canvas.qqImageRendered=function(){promise.success(canvas)}}
function registerThumbnailRenderedListener(imgOrCanvas,promise){var registered=isImg(imgOrCanvas)||isCanvas(imgOrCanvas);if(isImg(imgOrCanvas)){registerImgLoadListeners(imgOrCanvas,promise)}else if(isCanvas(imgOrCanvas)){registerCanvasDrawImageListener(imgOrCanvas,promise)}else{promise.failure(imgOrCanvas);log(qq.format("Element container of type {} is not supported!",imgOrCanvas.tagName),"error")}
return registered}
function draw(fileOrBlob,container,options){var drawPreview=new qq.Promise(),identifier=new qq.Identify(fileOrBlob,log),maxSize=options.maxSize,orient=options.orient==null?!0:options.orient,megapixErrorHandler=function(){container.onerror=null;container.onload=null;log("Could not render preview, file may be too large!","error");drawPreview.failure(container,"Browser cannot render image!")};identifier.isPreviewable().then(function(mime){var dummyExif={parse:function(){return new qq.Promise().success()}},exif=orient?new qq.Exif(fileOrBlob,log):dummyExif,mpImg=new qq.MegaPixImage(fileOrBlob,megapixErrorHandler);if(registerThumbnailRenderedListener(container,drawPreview)){exif.parse().then(function(exif){var orientation=exif&&exif.Orientation;mpImg.render(container,{maxWidth:maxSize,maxHeight:maxSize,orientation:orientation,mime:mime,resize:options.customResizeFunction})},function(failureMsg){log(qq.format("EXIF data could not be parsed ({}).  Assuming orientation = 1.",failureMsg));mpImg.render(container,{maxWidth:maxSize,maxHeight:maxSize,mime:mime,resize:options.customResizeFunction})})}},function(){log("Not previewable");drawPreview.failure(container,"Not previewable")});return drawPreview}
function drawOnCanvasOrImgFromUrl(url,canvasOrImg,draw,maxSize,customResizeFunction){var tempImg=new Image(),tempImgRender=new qq.Promise();registerThumbnailRenderedListener(tempImg,tempImgRender);if(isCrossOrigin(url)){tempImg.crossOrigin="anonymous"}
tempImg.src=url;tempImgRender.then(function rendered(){registerThumbnailRenderedListener(canvasOrImg,draw);var mpImg=new qq.MegaPixImage(tempImg);mpImg.render(canvasOrImg,{maxWidth:maxSize,maxHeight:maxSize,mime:determineMimeOfFileName(url),resize:customResizeFunction})},draw.failure)}
function drawOnImgFromUrlWithCssScaling(url,img,draw,maxSize){registerThumbnailRenderedListener(img,draw);qq(img).css({maxWidth:maxSize+"px",maxHeight:maxSize+"px"});img.src=url}
function drawFromUrl(url,container,options){var draw=new qq.Promise(),scale=options.scale,maxSize=scale?options.maxSize:null;if(scale&&isImg(container)){if(isCanvasSupported()){if(isCrossOrigin(url)&&!isImgCorsSupported()){drawOnImgFromUrlWithCssScaling(url,container,draw,maxSize)}else{drawOnCanvasOrImgFromUrl(url,container,draw,maxSize)}}else{drawOnImgFromUrlWithCssScaling(url,container,draw,maxSize)}}else if(isCanvas(container)){drawOnCanvasOrImgFromUrl(url,container,draw,maxSize)}else if(registerThumbnailRenderedListener(container,draw)){container.src=url}
return draw}
qq.extend(this,{generate:function(fileBlobOrUrl,container,options){if(qq.isString(fileBlobOrUrl)){log("Attempting to update thumbnail based on server response.");return drawFromUrl(fileBlobOrUrl,container,options||{})}else{log("Attempting to draw client-side image preview.");return draw(fileBlobOrUrl,container,options||{})}}})};qq.Exif=function(fileOrBlob,log){"use strict";var TAG_IDS=[274],TAG_INFO={274:{name:"Orientation",bytes:2}};function parseLittleEndian(hex){var result=0,pow=0;while(hex.length>0){result+=parseInt(hex.substring(0,2),16)*Math.pow(2,pow);hex=hex.substring(2,hex.length);pow+=8}
return result}
function seekToApp1(offset,promise){var theOffset=offset,thePromise=promise;if(theOffset===undefined){theOffset=2;thePromise=new qq.Promise()}
qq.readBlobToHex(fileOrBlob,theOffset,4).then(function(hex){var match=/^ffe([0-9])/.exec(hex),segmentLength;if(match){if(match[1]!=="1"){segmentLength=parseInt(hex.slice(4,8),16);seekToApp1(theOffset+segmentLength+2,thePromise)}else{thePromise.success(theOffset)}}else{thePromise.failure("No EXIF header to be found!")}});return thePromise}
function getApp1Offset(){var promise=new qq.Promise();qq.readBlobToHex(fileOrBlob,0,6).then(function(hex){if(hex.indexOf("ffd8")!==0){promise.failure("Not a valid JPEG!")}else{seekToApp1().then(function(offset){promise.success(offset)},function(error){promise.failure(error)})}});return promise}
function isLittleEndian(app1Start){var promise=new qq.Promise();qq.readBlobToHex(fileOrBlob,app1Start+10,2).then(function(hex){promise.success(hex==="4949")});return promise}
function getDirEntryCount(app1Start,littleEndian){var promise=new qq.Promise();qq.readBlobToHex(fileOrBlob,app1Start+18,2).then(function(hex){if(littleEndian){return promise.success(parseLittleEndian(hex))}else{promise.success(parseInt(hex,16))}});return promise}
function getIfd(app1Start,dirEntries){var offset=app1Start+20,bytes=dirEntries*12;return qq.readBlobToHex(fileOrBlob,offset,bytes)}
function getDirEntries(ifdHex){var entries=[],offset=0;while(offset+24<=ifdHex.length){entries.push(ifdHex.slice(offset,offset+24));offset+=24}
return entries}
function getTagValues(littleEndian,dirEntries){var TAG_VAL_OFFSET=16,tagsToFind=qq.extend([],TAG_IDS),vals={};qq.each(dirEntries,function(idx,entry){var idHex=entry.slice(0,4),id=littleEndian?parseLittleEndian(idHex):parseInt(idHex,16),tagsToFindIdx=tagsToFind.indexOf(id),tagValHex,tagName,tagValLength;if(tagsToFindIdx>=0){tagName=TAG_INFO[id].name;tagValLength=TAG_INFO[id].bytes;tagValHex=entry.slice(TAG_VAL_OFFSET,TAG_VAL_OFFSET+(tagValLength*2));vals[tagName]=littleEndian?parseLittleEndian(tagValHex):parseInt(tagValHex,16);tagsToFind.splice(tagsToFindIdx,1)}
if(tagsToFind.length===0){return!1}});return vals}
qq.extend(this,{parse:function(){var parser=new qq.Promise(),onParseFailure=function(message){log(qq.format("EXIF header parse failed: '{}' ",message));parser.failure(message)};getApp1Offset().then(function(app1Offset){log(qq.format("Moving forward with EXIF header parsing for '{}'",fileOrBlob.name===undefined?"blob":fileOrBlob.name));isLittleEndian(app1Offset).then(function(littleEndian){log(qq.format("EXIF Byte order is {} endian",littleEndian?"little":"big"));getDirEntryCount(app1Offset,littleEndian).then(function(dirEntryCount){log(qq.format("Found {} APP1 directory entries",dirEntryCount));getIfd(app1Offset,dirEntryCount).then(function(ifdHex){var dirEntries=getDirEntries(ifdHex),tagValues=getTagValues(littleEndian,dirEntries);log("Successfully parsed some EXIF tags");parser.success(tagValues)},onParseFailure)},onParseFailure)},onParseFailure)},onParseFailure);return parser}})};qq.Identify=function(fileOrBlob,log){"use strict";function isIdentifiable(magicBytes,questionableBytes){var identifiable=!1,magicBytesEntries=[].concat(magicBytes);qq.each(magicBytesEntries,function(idx,magicBytesArrayEntry){if(questionableBytes.indexOf(magicBytesArrayEntry)===0){identifiable=!0;return!1}});return identifiable}
qq.extend(this,{isPreviewable:function(){var self=this,identifier=new qq.Promise(),previewable=!1,name=fileOrBlob.name===undefined?"blob":fileOrBlob.name;log(qq.format("Attempting to determine if {} can be rendered in this browser",name));log("First pass: check type attribute of blob object.");if(this.isPreviewableSync()){log("Second pass: check for magic bytes in file header.");qq.readBlobToHex(fileOrBlob,0,4).then(function(hex){qq.each(self.PREVIEWABLE_MIME_TYPES,function(mime,bytes){if(isIdentifiable(bytes,hex)){if(mime!=="image/tiff"||qq.supportedFeatures.tiffPreviews){previewable=!0;identifier.success(mime)}
return!1}});log(qq.format("'{}' is {} able to be rendered in this browser",name,previewable?"":"NOT"));if(!previewable){identifier.failure()}},function(){log("Error reading file w/ name '"+name+"'.  Not able to be rendered in this browser.");identifier.failure()})}else{identifier.failure()}
return identifier},isPreviewableSync:function(){var fileMime=fileOrBlob.type,isRecognizedImage=qq.indexOf(Object.keys(this.PREVIEWABLE_MIME_TYPES),fileMime)>=0,previewable=!1,name=fileOrBlob.name===undefined?"blob":fileOrBlob.name;if(isRecognizedImage){if(fileMime==="image/tiff"){previewable=qq.supportedFeatures.tiffPreviews}else{previewable=!0}}
!previewable&&log(name+" is not previewable in this browser per the blob's type attr");return previewable}})};qq.Identify.prototype.PREVIEWABLE_MIME_TYPES={"image/jpeg":"ffd8ff","image/gif":"474946","image/png":"89504e","image/bmp":"424d","image/tiff":["49492a00","4d4d002a"]};qq.ImageValidation=function(blob,log){"use strict";function hasNonZeroLimits(limits){var atLeastOne=!1;qq.each(limits,function(limit,value){if(value>0){atLeastOne=!0;return!1}});return atLeastOne}
function getWidthHeight(){var sizeDetermination=new qq.Promise();new qq.Identify(blob,log).isPreviewable().then(function(){var image=new Image(),url=window.URL&&window.URL.createObjectURL?window.URL:window.webkitURL&&window.webkitURL.createObjectURL?window.webkitURL:null;if(url){image.onerror=function(){log("Cannot determine dimensions for image.  May be too large.","error");sizeDetermination.failure()};image.onload=function(){sizeDetermination.success({width:this.width,height:this.height})};image.src=url.createObjectURL(blob)}else{log("No createObjectURL function available to generate image URL!","error");sizeDetermination.failure()}},sizeDetermination.failure);return sizeDetermination}
function getFailingLimit(limits,dimensions){var failingLimit;qq.each(limits,function(limitName,limitValue){if(limitValue>0){var limitMatcher=/(max|min)(Width|Height)/.exec(limitName),dimensionPropName=limitMatcher[2].charAt(0).toLowerCase()+limitMatcher[2].slice(1),actualValue=dimensions[dimensionPropName];switch(limitMatcher[1]){case "min":if(actualValue<limitValue){failingLimit=limitName;return!1}
break;case "max":if(actualValue>limitValue){failingLimit=limitName;return!1}
break}}});return failingLimit}
this.validate=function(limits){var validationEffort=new qq.Promise();log("Attempting to validate image.");if(hasNonZeroLimits(limits)){getWidthHeight().then(function(dimensions){var failingLimit=getFailingLimit(limits,dimensions);if(failingLimit){validationEffort.failure(failingLimit)}else{validationEffort.success()}},validationEffort.success)}else{validationEffort.success()}
return validationEffort}};qq.Session=function(spec){"use strict";var options={endpoint:null,params:{},customHeaders:{},cors:{},addFileRecord:function(sessionData){},log:function(message,level){}};qq.extend(options,spec,!0);function isJsonResponseValid(response){if(qq.isArray(response)){return!0}
options.log("Session response is not an array.","error")}
function handleFileItems(fileItems,success,xhrOrXdr,promise){var someItemsIgnored=!1;success=success&&isJsonResponseValid(fileItems);if(success){qq.each(fileItems,function(idx,fileItem){if(fileItem.uuid==null){someItemsIgnored=!0;options.log(qq.format("Session response item {} did not include a valid UUID - ignoring.",idx),"error")}else if(fileItem.name==null){someItemsIgnored=!0;options.log(qq.format("Session response item {} did not include a valid name - ignoring.",idx),"error")}else{try{options.addFileRecord(fileItem);return!0}catch(err){someItemsIgnored=!0;options.log(err.message,"error")}}
return!1})}
promise[success&&!someItemsIgnored?"success":"failure"](fileItems,xhrOrXdr)}
this.refresh=function(){var refreshEffort=new qq.Promise(),refreshCompleteCallback=function(response,success,xhrOrXdr){handleFileItems(response,success,xhrOrXdr,refreshEffort)},requesterOptions=qq.extend({},options),requester=new qq.SessionAjaxRequester(qq.extend(requesterOptions,{onComplete:refreshCompleteCallback}));requester.queryServer();return refreshEffort}};qq.SessionAjaxRequester=function(spec){"use strict";var requester,options={endpoint:null,customHeaders:{},params:{},cors:{expected:!1,sendCredentials:!1},onComplete:function(response,success,xhrOrXdr){},log:function(str,level){}};qq.extend(options,spec);function onComplete(id,xhrOrXdr,isError){var response=null;if(xhrOrXdr.responseText!=null){try{response=qq.parseJson(xhrOrXdr.responseText)}catch(err){options.log("Problem parsing session response: "+err.message,"error");isError=!0}}
options.onComplete(response,!isError,xhrOrXdr)}
requester=qq.extend(this,new qq.AjaxRequester({acceptHeader:"application/json",validMethods:["GET"],method:"GET",endpointStore:{get:function(){return options.endpoint}},customHeaders:options.customHeaders,log:options.log,onComplete:onComplete,cors:options.cors}));qq.extend(this,{queryServer:function(){var params=qq.extend({},options.params);options.log("Session query request.");requester.initTransport("sessionRefresh").withParams(params).withCacheBuster().send()}})};qq.FormSupport=function(options,startUpload,log){"use strict";var self=this,interceptSubmit=options.interceptSubmit,formEl=options.element,autoUpload=options.autoUpload;qq.extend(this,{newEndpoint:null,newAutoUpload:autoUpload,attachedToForm:!1,getFormInputsAsObject:function(){if(formEl==null){return null}
return self._form2Obj(formEl)}});function determineNewEndpoint(formEl){if(formEl.getAttribute("action")){self.newEndpoint=formEl.getAttribute("action")}}
function validateForm(formEl,nativeSubmit){if(formEl.checkValidity&&!formEl.checkValidity()){log("Form did not pass validation checks - will not upload.","error");nativeSubmit()}else{return!0}}
function maybeUploadOnSubmit(formEl){var nativeSubmit=formEl.submit;qq(formEl).attach("submit",function(event){event=event||window.event;if(event.preventDefault){event.preventDefault()}else{event.returnValue=!1}
validateForm(formEl,nativeSubmit)&&startUpload()});formEl.submit=function(){validateForm(formEl,nativeSubmit)&&startUpload()}}
function determineFormEl(formEl){if(formEl){if(qq.isString(formEl)){formEl=document.getElementById(formEl)}
if(formEl){log("Attaching to form element.");determineNewEndpoint(formEl);interceptSubmit&&maybeUploadOnSubmit(formEl)}}
return formEl}
formEl=determineFormEl(formEl);this.attachedToForm=!!formEl};qq.extend(qq.FormSupport.prototype,{_form2Obj:function(form){"use strict";var obj={},notIrrelevantType=function(type){var irrelevantTypes=["button","image","reset","submit"];return qq.indexOf(irrelevantTypes,type.toLowerCase())<0},radioOrCheckbox=function(type){return qq.indexOf(["checkbox","radio"],type.toLowerCase())>=0},ignoreValue=function(el){if(radioOrCheckbox(el.type)&&!el.checked){return!0}
return el.disabled&&el.type.toLowerCase()!=="hidden"},selectValue=function(select){var value=null;qq.each(qq(select).children(),function(idx,child){if(child.tagName.toLowerCase()==="option"&&child.selected){value=child.value;return!1}});return value};qq.each(form.elements,function(idx,el){if((qq.isInput(el,!0)||el.tagName.toLowerCase()==="textarea")&&notIrrelevantType(el.type)&&!ignoreValue(el)){obj[el.name]=el.value}else if(el.tagName.toLowerCase()==="select"&&!ignoreValue(el)){var value=selectValue(el);if(value!==null){obj[el.name]=value}}});return obj}});qq.Scaler=function(spec,log){"use strict";var self=this,customResizeFunction=spec.customResizer,includeOriginal=spec.sendOriginal,orient=spec.orient,defaultType=spec.defaultType,defaultQuality=spec.defaultQuality/100,failedToScaleText=spec.failureText,includeExif=spec.includeExif,sizes=this._getSortedSizes(spec.sizes);qq.extend(this,{enabled:qq.supportedFeatures.scaling&&sizes.length>0,getFileRecords:function(originalFileUuid,originalFileName,originalBlobOrBlobData){var self=this,records=[],originalBlob=originalBlobOrBlobData.blob?originalBlobOrBlobData.blob:originalBlobOrBlobData,identifier=new qq.Identify(originalBlob,log);if(identifier.isPreviewableSync()){qq.each(sizes,function(idx,sizeRecord){var outputType=self._determineOutputType({defaultType:defaultType,requestedType:sizeRecord.type,refType:originalBlob.type});records.push({uuid:qq.getUniqueId(),name:self._getName(originalFileName,{name:sizeRecord.name,type:outputType,refType:originalBlob.type}),blob:new qq.BlobProxy(originalBlob,qq.bind(self._generateScaledImage,self,{customResizeFunction:customResizeFunction,maxSize:sizeRecord.maxSize,orient:orient,type:outputType,quality:defaultQuality,failedText:failedToScaleText,includeExif:includeExif,log:log}))})});records.push({uuid:originalFileUuid,name:originalFileName,size:originalBlob.size,blob:includeOriginal?originalBlob:null})}else{records.push({uuid:originalFileUuid,name:originalFileName,size:originalBlob.size,blob:originalBlob})}
return records},handleNewFile:function(file,name,uuid,size,fileList,batchId,uuidParamName,api){var self=this,buttonId=file.qqButtonId||(file.blob&&file.blob.qqButtonId),scaledIds=[],originalId=null,addFileToHandler=api.addFileToHandler,uploadData=api.uploadData,paramsStore=api.paramsStore,proxyGroupId=qq.getUniqueId();qq.each(self.getFileRecords(uuid,name,file),function(idx,record){var blobSize=record.size,id;if(record.blob instanceof qq.BlobProxy){blobSize=-1}
id=uploadData.addFile({uuid:record.uuid,name:record.name,size:blobSize,batchId:batchId,proxyGroupId:proxyGroupId});if(record.blob instanceof qq.BlobProxy){scaledIds.push(id)}else{originalId=id}
if(record.blob){addFileToHandler(id,record.blob);fileList.push({id:id,file:record.blob})}else{uploadData.setStatus(id,qq.status.REJECTED)}});if(originalId!==null){qq.each(scaledIds,function(idx,scaledId){var params={qqparentuuid:uploadData.retrieve({id:originalId}).uuid,qqparentsize:uploadData.retrieve({id:originalId}).size};params[uuidParamName]=uploadData.retrieve({id:scaledId}).uuid;uploadData.setParentId(scaledId,originalId);paramsStore.addReadOnly(scaledId,params)});if(scaledIds.length){(function(){var param={};param[uuidParamName]=uploadData.retrieve({id:originalId}).uuid;paramsStore.addReadOnly(originalId,param)}())}}}})};qq.extend(qq.Scaler.prototype,{scaleImage:function(id,specs,api){"use strict";if(!qq.supportedFeatures.scaling){throw new qq.Error("Scaling is not supported in this browser!")}
var scalingEffort=new qq.Promise(),log=api.log,file=api.getFile(id),uploadData=api.uploadData.retrieve({id:id}),name=uploadData&&uploadData.name,uuid=uploadData&&uploadData.uuid,scalingOptions={customResizer:specs.customResizer,sendOriginal:!1,orient:specs.orient,defaultType:specs.type||null,defaultQuality:specs.quality,failedToScaleText:"Unable to scale",sizes:[{name:"",maxSize:specs.maxSize}]},scaler=new qq.Scaler(scalingOptions,log);if(!qq.Scaler||!qq.supportedFeatures.imagePreviews||!file){scalingEffort.failure();log("Could not generate requested scaled image for "+id+".  "+"Scaling is either not possible in this browser, or the file could not be located.","error")}else{(qq.bind(function(){var record=scaler.getFileRecords(uuid,name,file)[0];if(record&&record.blob instanceof qq.BlobProxy){record.blob.create().then(scalingEffort.success,scalingEffort.failure)}else{log(id+" is not a scalable image!","error");scalingEffort.failure()}},this)())}
return scalingEffort},_determineOutputType:function(spec){"use strict";var requestedType=spec.requestedType,defaultType=spec.defaultType,referenceType=spec.refType;if(!defaultType&&!requestedType){if(referenceType!=="image/jpeg"){return"image/png"}
return referenceType}
if(!requestedType){return defaultType}
if(qq.indexOf(Object.keys(qq.Identify.prototype.PREVIEWABLE_MIME_TYPES),requestedType)>=0){if(requestedType==="image/tiff"){return qq.supportedFeatures.tiffPreviews?requestedType:defaultType}
return requestedType}
return defaultType},_getName:function(originalName,scaledVersionProperties){"use strict";var startOfExt=originalName.lastIndexOf("."),versionType=scaledVersionProperties.type||"image/png",referenceType=scaledVersionProperties.refType,scaledName="",scaledExt=qq.getExtension(originalName),nameAppendage="";if(scaledVersionProperties.name&&scaledVersionProperties.name.trim().length){nameAppendage=" ("+scaledVersionProperties.name+")"}
if(startOfExt>=0){scaledName=originalName.substr(0,startOfExt);if(referenceType!==versionType){scaledExt=versionType.split("/")[1]}
scaledName+=nameAppendage+"."+scaledExt}else{scaledName=originalName+nameAppendage}
return scaledName},_getSortedSizes:function(sizes){"use strict";sizes=qq.extend([],sizes);return sizes.sort(function(a,b){if(a.maxSize>b.maxSize){return 1}
if(a.maxSize<b.maxSize){return-1}
return 0})},_generateScaledImage:function(spec,sourceFile){"use strict";var self=this,customResizeFunction=spec.customResizeFunction,log=spec.log,maxSize=spec.maxSize,orient=spec.orient,type=spec.type,quality=spec.quality,failedText=spec.failedText,includeExif=spec.includeExif&&sourceFile.type==="image/jpeg"&&type==="image/jpeg",scalingEffort=new qq.Promise(),imageGenerator=new qq.ImageGenerator(log),canvas=document.createElement("canvas");log("Attempting to generate scaled version for "+sourceFile.name);imageGenerator.generate(sourceFile,canvas,{maxSize:maxSize,orient:orient,customResizeFunction:customResizeFunction}).then(function(){var scaledImageDataUri=canvas.toDataURL(type,quality),signalSuccess=function(){log("Success generating scaled version for "+sourceFile.name);var blob=qq.dataUriToBlob(scaledImageDataUri);scalingEffort.success(blob)};if(includeExif){self._insertExifHeader(sourceFile,scaledImageDataUri,log).then(function(scaledImageDataUriWithExif){scaledImageDataUri=scaledImageDataUriWithExif;signalSuccess()},function(){log("Problem inserting EXIF header into scaled image.  Using scaled image w/out EXIF data.","error");signalSuccess()})}else{signalSuccess()}},function(){log("Failed attempt to generate scaled version for "+sourceFile.name,"error");scalingEffort.failure(failedText)});return scalingEffort},_insertExifHeader:function(originalImage,scaledImageDataUri,log){"use strict";var reader=new FileReader(),insertionEffort=new qq.Promise(),originalImageDataUri="";reader.onload=function(){originalImageDataUri=reader.result;insertionEffort.success(qq.ExifRestorer.restore(originalImageDataUri,scaledImageDataUri))};reader.onerror=function(){log("Problem reading "+originalImage.name+" during attempt to transfer EXIF data to scaled version.","error");insertionEffort.failure()};reader.readAsDataURL(originalImage);return insertionEffort},_dataUriToBlob:function(dataUri){"use strict";var byteString,mimeString,arrayBuffer,intArray;if(dataUri.split(",")[0].indexOf("base64")>=0){byteString=atob(dataUri.split(",")[1])}else{byteString=decodeURI(dataUri.split(",")[1])}
mimeString=dataUri.split(",")[0].split(":")[1].split(";")[0];arrayBuffer=new ArrayBuffer(byteString.length);intArray=new Uint8Array(arrayBuffer);qq.each(byteString,function(idx,character){intArray[idx]=character.charCodeAt(0)});return this._createBlob(arrayBuffer,mimeString)},_createBlob:function(data,mime){"use strict";var BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,blobBuilder=BlobBuilder&&new BlobBuilder();if(blobBuilder){blobBuilder.append(data);return blobBuilder.getBlob(mime)}else{return new Blob([data],{type:mime})}}});qq.ExifRestorer=(function(){var ExifRestorer={};ExifRestorer.KEY_STR="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/"+"=";ExifRestorer.encode64=function(input){var output="",chr1,chr2,chr3="",enc1,enc2,enc3,enc4="",i=0;do{chr1=input[i++];chr2=input[i++];chr3=input[i++];enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}
output=output+this.KEY_STR.charAt(enc1)+this.KEY_STR.charAt(enc2)+this.KEY_STR.charAt(enc3)+this.KEY_STR.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4=""}while(i<input.length);return output};ExifRestorer.restore=function(origFileBase64,resizedFileBase64){var expectedBase64Header="data:image/jpeg;base64,";if(!origFileBase64.match(expectedBase64Header)){return resizedFileBase64}
var rawImage=this.decode64(origFileBase64.replace(expectedBase64Header,""));var segments=this.slice2Segments(rawImage);var image=this.exifManipulation(resizedFileBase64,segments);return expectedBase64Header+this.encode64(image)};ExifRestorer.exifManipulation=function(resizedFileBase64,segments){var exifArray=this.getExifArray(segments),newImageArray=this.insertExif(resizedFileBase64,exifArray),aBuffer=new Uint8Array(newImageArray);return aBuffer};ExifRestorer.getExifArray=function(segments){var seg;for(var x=0;x<segments.length;x++){seg=segments[x];if(seg[0]==255&seg[1]==225){return seg}}
return[]};ExifRestorer.insertExif=function(resizedFileBase64,exifArray){var imageData=resizedFileBase64.replace("data:image/jpeg;base64,",""),buf=this.decode64(imageData),separatePoint=buf.indexOf(255,3),mae=buf.slice(0,separatePoint),ato=buf.slice(separatePoint),array=mae;array=array.concat(exifArray);array=array.concat(ato);return array};ExifRestorer.slice2Segments=function(rawImageArray){var head=0,segments=[];while(1){if(rawImageArray[head]==255&rawImageArray[head+1]==218){break}
if(rawImageArray[head]==255&rawImageArray[head+1]==216){head+=2}else{var length=rawImageArray[head+2]*256+rawImageArray[head+3],endPoint=head+length+2,seg=rawImageArray.slice(head,endPoint);segments.push(seg);head=endPoint}
if(head>rawImageArray.length){break}}
return segments};ExifRestorer.decode64=function(input){var output="",chr1,chr2,chr3="",enc1,enc2,enc3,enc4="",i=0,buf=[];var base64test=/[^A-Za-z0-9\+\/\=]/g;if(base64test.exec(input)){throw new Error("There were invalid base64 characters in the input text.  "+"Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='")}
input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=this.KEY_STR.indexOf(input.charAt(i++));enc2=this.KEY_STR.indexOf(input.charAt(i++));enc3=this.KEY_STR.indexOf(input.charAt(i++));enc4=this.KEY_STR.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;buf.push(chr1);if(enc3!=64){buf.push(chr2)}
if(enc4!=64){buf.push(chr3)}
chr1=chr2=chr3="";enc1=enc2=enc3=enc4=""}while(i<input.length);return buf};return ExifRestorer})();qq.TotalProgress=function(callback,getSize){"use strict";var perFileProgress={},totalLoaded=0,totalSize=0,lastLoadedSent=-1,lastTotalSent=-1,callbackProxy=function(loaded,total){if(loaded!==lastLoadedSent||total!==lastTotalSent){callback(loaded,total)}
lastLoadedSent=loaded;lastTotalSent=total},noRetryableFiles=function(failed,retryable){var none=!0;qq.each(failed,function(idx,failedId){if(qq.indexOf(retryable,failedId)>=0){none=!1;return!1}});return none},onCancel=function(id){updateTotalProgress(id,-1,-1);delete perFileProgress[id]},onAllComplete=function(successful,failed,retryable){if(failed.length===0||noRetryableFiles(failed,retryable)){callbackProxy(totalSize,totalSize);this.reset()}},onNew=function(id){var size=getSize(id);if(size>0){updateTotalProgress(id,0,size);perFileProgress[id]={loaded:0,total:size}}},updateTotalProgress=function(id,newLoaded,newTotal){var oldLoaded=perFileProgress[id]?perFileProgress[id].loaded:0,oldTotal=perFileProgress[id]?perFileProgress[id].total:0;if(newLoaded===-1&&newTotal===-1){totalLoaded-=oldLoaded;totalSize-=oldTotal}else{if(newLoaded){totalLoaded+=newLoaded-oldLoaded}
if(newTotal){totalSize+=newTotal-oldTotal}}
callbackProxy(totalLoaded,totalSize)};qq.extend(this,{onAllComplete:onAllComplete,onStatusChange:function(id,oldStatus,newStatus){if(newStatus===qq.status.CANCELED||newStatus===qq.status.REJECTED){onCancel(id)}else if(newStatus===qq.status.SUBMITTING){onNew(id)}},onIndividualProgress:function(id,loaded,total){updateTotalProgress(id,loaded,total);perFileProgress[id]={loaded:loaded,total:total}},onNewSize:function(id){onNew(id)},reset:function(){perFileProgress={};totalLoaded=0;totalSize=0}})};qq.UiEventHandler=function(s,protectedApi){"use strict";var disposer=new qq.DisposeSupport(),spec={eventType:"click",attachTo:null,onHandled:function(target,event){}};qq.extend(this,{addHandler:function(element){addHandler(element)},dispose:function(){disposer.dispose()}});function addHandler(element){disposer.attach(element,spec.eventType,function(event){event=event||window.event;var target=event.target||event.srcElement;spec.onHandled(target,event)})}
qq.extend(protectedApi,{getFileIdFromItem:function(item){return item.qqFileId},getDisposeSupport:function(){return disposer}});qq.extend(spec,s);if(spec.attachTo){addHandler(spec.attachTo)}};qq.FileButtonsClickHandler=function(s){"use strict";var inheritedInternalApi={},spec={templating:null,log:function(message,lvl){},onDeleteFile:function(fileId){},onCancel:function(fileId){},onRetry:function(fileId){},onPause:function(fileId){},onContinue:function(fileId){},onGetName:function(fileId){}},buttonHandlers={cancel:function(id){spec.onCancel(id)},retry:function(id){spec.onRetry(id)},deleteButton:function(id){spec.onDeleteFile(id)},pause:function(id){spec.onPause(id)},continueButton:function(id){spec.onContinue(id)}};function examineEvent(target,event){qq.each(buttonHandlers,function(buttonType,handler){var firstLetterCapButtonType=buttonType.charAt(0).toUpperCase()+buttonType.slice(1),fileId;if(spec.templating["is"+firstLetterCapButtonType](target)){fileId=spec.templating.getFileId(target);qq.preventDefault(event);spec.log(qq.format("Detected valid file button click event on file '{}', ID: {}.",spec.onGetName(fileId),fileId));handler(fileId);return!1}})}
qq.extend(spec,s);spec.eventType="click";spec.onHandled=examineEvent;spec.attachTo=spec.templating.getFileList();qq.extend(this,new qq.UiEventHandler(spec,inheritedInternalApi))};qq.FilenameClickHandler=function(s){"use strict";var inheritedInternalApi={},spec={templating:null,log:function(message,lvl){},classes:{file:"qq-upload-file",editNameIcon:"qq-edit-filename-icon"},onGetUploadStatus:function(fileId){},onGetName:function(fileId){}};qq.extend(spec,s);function examineEvent(target,event){if(spec.templating.isFileName(target)||spec.templating.isEditIcon(target)){var fileId=spec.templating.getFileId(target),status=spec.onGetUploadStatus(fileId);if(status===qq.status.SUBMITTED){spec.log(qq.format("Detected valid filename click event on file '{}', ID: {}.",spec.onGetName(fileId),fileId));qq.preventDefault(event);inheritedInternalApi.handleFilenameEdit(fileId,target,!0)}}}
spec.eventType="click";spec.onHandled=examineEvent;qq.extend(this,new qq.FilenameEditHandler(spec,inheritedInternalApi))};qq.FilenameInputFocusInHandler=function(s,inheritedInternalApi){"use strict";var spec={templating:null,onGetUploadStatus:function(fileId){},log:function(message,lvl){}};if(!inheritedInternalApi){inheritedInternalApi={}}
function handleInputFocus(target,event){if(spec.templating.isEditInput(target)){var fileId=spec.templating.getFileId(target),status=spec.onGetUploadStatus(fileId);if(status===qq.status.SUBMITTED){spec.log(qq.format("Detected valid filename input focus event on file '{}', ID: {}.",spec.onGetName(fileId),fileId));inheritedInternalApi.handleFilenameEdit(fileId,target)}}}
spec.eventType="focusin";spec.onHandled=handleInputFocus;qq.extend(spec,s);qq.extend(this,new qq.FilenameEditHandler(spec,inheritedInternalApi))};qq.FilenameInputFocusHandler=function(spec){"use strict";spec.eventType="focus";spec.attachTo=null;qq.extend(this,new qq.FilenameInputFocusInHandler(spec,{}))};qq.FilenameEditHandler=function(s,inheritedInternalApi){"use strict";var spec={templating:null,log:function(message,lvl){},onGetUploadStatus:function(fileId){},onGetName:function(fileId){},onSetName:function(fileId,newName){},onEditingStatusChange:function(fileId,isEditing){}};function getFilenameSansExtension(fileId){var filenameSansExt=spec.onGetName(fileId),extIdx=filenameSansExt.lastIndexOf(".");if(extIdx>0){filenameSansExt=filenameSansExt.substr(0,extIdx)}
return filenameSansExt}
function getOriginalExtension(fileId){var origName=spec.onGetName(fileId);return qq.getExtension(origName)}
function handleNameUpdate(newFilenameInputEl,fileId){var newName=newFilenameInputEl.value,origExtension;if(newName!==undefined&&qq.trimStr(newName).length>0){origExtension=getOriginalExtension(fileId);if(origExtension!==undefined){newName=newName+"."+origExtension}
spec.onSetName(fileId,newName)}
spec.onEditingStatusChange(fileId,!1)}
function registerInputBlurHandler(inputEl,fileId){inheritedInternalApi.getDisposeSupport().attach(inputEl,"blur",function(){handleNameUpdate(inputEl,fileId)})}
function registerInputEnterKeyHandler(inputEl,fileId){inheritedInternalApi.getDisposeSupport().attach(inputEl,"keyup",function(event){var code=event.keyCode||event.which;if(code===13){handleNameUpdate(inputEl,fileId)}})}
qq.extend(spec,s);spec.attachTo=spec.templating.getFileList();qq.extend(this,new qq.UiEventHandler(spec,inheritedInternalApi));qq.extend(inheritedInternalApi,{handleFilenameEdit:function(id,target,focusInput){var newFilenameInputEl=spec.templating.getEditInput(id);spec.onEditingStatusChange(id,!0);newFilenameInputEl.value=getFilenameSansExtension(id);if(focusInput){newFilenameInputEl.focus()}
registerInputBlurHandler(newFilenameInputEl,id);registerInputEnterKeyHandler(newFilenameInputEl,id)}})};(function($){"use strict";var $el,pluginOptions=["uploaderType","endpointType"];function init(options){var xformedOpts=transformVariables(options||{}),newUploaderInstance=getNewUploaderInstance(xformedOpts);uploader(newUploaderInstance);addCallbacks(xformedOpts,newUploaderInstance);return $el}
function getNewUploaderInstance(params){var uploaderType=pluginOption("uploaderType"),namespace=pluginOption("endpointType");if(uploaderType){uploaderType=uploaderType.charAt(0).toUpperCase()+uploaderType.slice(1).toLowerCase();if(namespace){return new qq[namespace]["FineUploader"+uploaderType](params)}
return new qq["FineUploader"+uploaderType](params)}else{if(namespace){return new qq[namespace].FineUploader(params)}
return new qq.FineUploader(params)}}
function dataStore(key,val){var data=$el.data("fineuploader");if(val){if(data===undefined){data={}}
data[key]=val;$el.data("fineuploader",data)}else{if(data===undefined){return null}
return data[key]}}
function uploader(instanceToStore){return dataStore("uploader",instanceToStore)}
function pluginOption(option,optionVal){return dataStore(option,optionVal)}
function addCallbacks(transformedOpts,newUploaderInstance){var callbacks=transformedOpts.callbacks={};$.each(newUploaderInstance._options.callbacks,function(prop,nonJqueryCallback){var name,callbackEventTarget;name=/^on(\w+)/.exec(prop)[1];name=name.substring(0,1).toLowerCase()+name.substring(1);callbackEventTarget=$el;callbacks[prop]=function(){var originalArgs=Array.prototype.slice.call(arguments),transformedArgs=[],nonJqueryCallbackRetVal,jqueryEventCallbackRetVal;$.each(originalArgs,function(idx,arg){transformedArgs.push(maybeWrapInJquery(arg))});nonJqueryCallbackRetVal=nonJqueryCallback.apply(this,originalArgs);try{jqueryEventCallbackRetVal=callbackEventTarget.triggerHandler(name,transformedArgs)}catch(error){qq.log("Caught error in Fine Uploader jQuery event handler: "+error.message,"error")}
if(nonJqueryCallbackRetVal!=null){return nonJqueryCallbackRetVal}
return jqueryEventCallbackRetVal}});newUploaderInstance._options.callbacks=callbacks}
function transformVariables(source,dest){var xformed,arrayVals;if(dest===undefined){if(source.uploaderType!=="basic"){xformed={element:$el[0]}}else{xformed={}}}else{xformed=dest}
$.each(source,function(prop,val){if($.inArray(prop,pluginOptions)>=0){pluginOption(prop,val)}else if(val instanceof $){xformed[prop]=val[0]}else if($.isPlainObject(val)){xformed[prop]={};transformVariables(val,xformed[prop])}else if($.isArray(val)){arrayVals=[];$.each(val,function(idx,arrayVal){var arrayObjDest={};if(arrayVal instanceof $){$.merge(arrayVals,arrayVal)}else if($.isPlainObject(arrayVal)){transformVariables(arrayVal,arrayObjDest);arrayVals.push(arrayObjDest)}else{arrayVals.push(arrayVal)}});xformed[prop]=arrayVals}else{xformed[prop]=val}});if(dest===undefined){return xformed}}
function isValidCommand(command){return $.type(command)==="string"&&!command.match(/^_/)&&uploader()[command]!==undefined}
function delegateCommand(command){var xformedArgs=[],origArgs=Array.prototype.slice.call(arguments,1),retVal;transformVariables(origArgs,xformedArgs);retVal=uploader()[command].apply(uploader(),xformedArgs);return maybeWrapInJquery(retVal)}
function maybeWrapInJquery(val){var transformedVal=val;if(val!=null&&typeof val==="object"&&(val.nodeType===1||val.nodeType===9)&&val.cloneNode){transformedVal=$(val)}
return transformedVal}
$.fn.fineUploader=function(optionsOrCommand){var self=this,selfArgs=arguments,retVals=[];this.each(function(index,el){$el=$(el);if(uploader()&&isValidCommand(optionsOrCommand)){retVals.push(delegateCommand.apply(self,selfArgs));if(self.length===1){return!1}}else if(typeof optionsOrCommand==="object"||!optionsOrCommand){init.apply(self,selfArgs)}else{$.error("Method "+optionsOrCommand+" does not exist on jQuery.fineUploader")}});if(retVals.length===1){return retVals[0]}else if(retVals.length>1){return retVals}
return this}}(jQuery));(function($){"use strict";var rootDataKey="fineUploaderDnd",$el;function init(options){if(!options){options={}}
options.dropZoneElements=[$el];var xformedOpts=transformVariables(options);addCallbacks(xformedOpts);dnd(new qq.DragAndDrop(xformedOpts));return $el}
function dataStore(key,val){var data=$el.data(rootDataKey);if(val){if(data===undefined){data={}}
data[key]=val;$el.data(rootDataKey,data)}else{if(data===undefined){return null}
return data[key]}}
function dnd(instanceToStore){return dataStore("dndInstance",instanceToStore)}
function addCallbacks(transformedOpts){var callbacks=transformedOpts.callbacks={};$.each(new qq.DragAndDrop.callbacks(),function(prop,func){var name=prop,$callbackEl;$callbackEl=$el;callbacks[prop]=function(){var args=Array.prototype.slice.call(arguments),jqueryHandlerResult=$callbackEl.triggerHandler(name,args);return jqueryHandlerResult}})}
function transformVariables(source,dest){var xformed,arrayVals;if(dest===undefined){xformed={}}else{xformed=dest}
$.each(source,function(prop,val){if(val instanceof $){xformed[prop]=val[0]}else if($.isPlainObject(val)){xformed[prop]={};transformVariables(val,xformed[prop])}else if($.isArray(val)){arrayVals=[];$.each(val,function(idx,arrayVal){if(arrayVal instanceof $){$.merge(arrayVals,arrayVal)}else{arrayVals.push(arrayVal)}});xformed[prop]=arrayVals}else{xformed[prop]=val}});if(dest===undefined){return xformed}}
function isValidCommand(command){return $.type(command)==="string"&&command==="dispose"&&dnd()[command]!==undefined}
function delegateCommand(command){var xformedArgs=[],origArgs=Array.prototype.slice.call(arguments,1);transformVariables(origArgs,xformedArgs);return dnd()[command].apply(dnd(),xformedArgs)}
$.fn.fineUploaderDnd=function(optionsOrCommand){var self=this,selfArgs=arguments,retVals=[];this.each(function(index,el){$el=$(el);if(dnd()&&isValidCommand(optionsOrCommand)){retVals.push(delegateCommand.apply(self,selfArgs));if(self.length===1){return!1}}else if(typeof optionsOrCommand==="object"||!optionsOrCommand){init.apply(self,selfArgs)}else{$.error("Method "+optionsOrCommand+" does not exist in Fine Uploader's DnD module.")}});if(retVals.length===1){return retVals[0]}else if(retVals.length>1){return retVals}
return this}}(jQuery));if(typeof define==='function'&&define.amd){define(function(){return qq})}else if(typeof module!=='undefined'&&module.exports){module.exports=qq}else{global.qq=qq}}(window));
/*! 2016-08-18 */
function getMediaUploadUri(isDelete){if(typeof isDelete==='undefined'){isDelete=!1}
if(isDelete){var uri=$('#media_upload_container').data('delete-uri')}else{var uri=$('#media_upload_container').data('upload-uri')}
if(/index.php/.test(window.location.pathname)){uri+=window.location.search}
return uri};function initializeMediaUploadField(instance){var settings=instance.settings;$('#jquery-wrapped-fine-uploader-'+instance.id).fineUploader({multiple:(settings.maximumItems>1),debug:!1,template:"media-upload-template-"+settings.uniqueId,classes:{success:'alert alert-success',fail:'alert alert-error'},validation:{allowedExtensions:settings.allowedExtensions,itemLimit:settings.maximumItems,sizeLimit:settings.maximumSize},messages:settings.messages,showMessage:function(message){alert(message)},deleteFile:{enabled:!0,method:"POST",endpoint:getMediaUploadUri(!0),params:{type:1386871774}},request:{endpoint:getMediaUploadUri(!1)}}).on('deleteComplete',{_settings:settings},function(event){var uploadedFiles=[];$('#qq-upload-list-'+event.data._settings.uniqueId).find('li.alert-success').find('.view-btn').each(function(index,element){var uri=$(element).attr('href');var basename=uri.replace(/.*\//,"");uploadedFiles.push(basename)});$('#uploaded-files-'+event.data._settings.property).val(uploadedFiles.join(','))}).on('submit',{_settings:settings},function(event){var params={};var parameterPrefix='tx_mediaupload_upload';params[parameterPrefix+'[storageIdentifier]']=event.data._settings.storage;params.type='1386871773';$(this).fineUploader('setParams',params)}).on('complete',{_settings:settings},function(event,id,fileName,responseJSON){var uniqueId=event.data._settings.uniqueId;var property=event.data._settings.property;var $fileEl=$(this).fineUploader("getItemByFileId",id),$viewBtn=$fileEl.find(".view-btn");if(responseJSON.success){$viewBtn.removeClass('hide');$viewBtn.attr("href",responseJSON.viewUrl);var uploadedFiles=[];$('#qq-upload-list-'+uniqueId).find('li.alert-success').find('.view-btn').each(function(index,element){var uri=$(element).attr('href');var basename=uri.replace("/typo3temp/MediaUpload/","");uploadedFiles.push(basename)});event.target.parentElement.querySelector('input[id^="uploaded-files-"]').value=uploadedFiles.join(',')}})}(function($){$(function(){var getUri=function(isDelete){if(typeof isDelete==='undefined'){isDelete=!1}
if(isDelete){var uri=$('#media_upload_container').data('delete-uri')}else{var uri=$('#media_upload_container').data('upload-uri')}
if(/index.php/.test(window.location.pathname)){uri+=window.location.search}
return uri};if(typeof(MediaUpload)==='object'){for(var i=0;i<MediaUpload.instances.length;i++){var instance=MediaUpload.instances[i];initializeMediaUploadField(instance)}}})})(jQuery);
/*!
 * jQuery Magnify Plugin v2.3.3 by T. H. Doan (https://thdoan.github.io/magnify/)
 * Based on http://thecodeplayer.com/walkthrough/magnifying-glass-for-images-using-jquery-and-css3
 *
 * jQuery Magnify by T. H. Doan is licensed under the MIT License.
 * Read a copy of the license in the LICENSE file or at https://choosealicense.com/licenses/mit/
 */
(function($){$.fn.magnify=function(oOptions){oOptions=$.extend({'src':'','speed':100,'timeout':-1,'touchBottomOffset':0,'finalWidth':null,'finalHeight':null,'magnifiedWidth':null,'magnifiedHeight':null,'limitBounds':!1,'mobileCloseEvent':'touchstart','afterLoad':function(){}},oOptions);var $that=this,$html=$('html'),init=function(el){var $image=$(el),$anchor=$image.closest('a'),oDataAttr={};for(var i in oOptions){oDataAttr[i]=$image.attr('data-magnify-'+i.toLowerCase())}
var sZoomSrc=oDataAttr.src||oOptions.src||$image.attr('src')||'';if(!sZoomSrc)return;var $container,$lens,nImageWidth,nImageHeight,nMagnifiedWidth,nMagnifiedHeight,nLensWidth,nLensHeight,nBoundX=0,nBoundY=0,nPosX,nPosY,nX,nY,oContainerOffset,oImageOffset,getOffset=function(){var o=$container.offset();oImageOffset={'top':($image.offset().top-o.top)+parseInt($image.css('border-top-width'))+parseInt($image.css('padding-top')),'left':($image.offset().left-o.left)+parseInt($image.css('border-left-width'))+parseInt($image.css('padding-left'))};o.top+=oImageOffset.top;o.left+=oImageOffset.left;return o},hideLens=function(){if($lens.is(':visible'))$lens.fadeOut(oOptions.speed,function(){$html.removeClass('magnifying').trigger('magnifyend')})},moveLens=function(e){if(!nImageHeight){refresh();return}
if(e){e.preventDefault();nPosX=e.pageX||e.originalEvent.touches[0].pageX;nPosY=e.pageY||e.originalEvent.touches[0].pageY;$image.data('lastPos',{'x':nPosX,'y':nPosY})}else{nPosX=$image.data('lastPos').x;nPosY=$image.data('lastPos').y}
nX=nPosX-oContainerOffset.left,nY=(nPosY-oContainerOffset.top)-oOptions.touchBottomOffset;if(!$lens.is(':animated')){if(nX>nBoundX&&nX<nImageWidth-nBoundX&&nY>nBoundY&&nY<nImageHeight-nBoundY){if($lens.is(':hidden')){$html.addClass('magnifying').trigger('magnifystart');$lens.fadeIn(oOptions.speed)}}else{hideLens()}}
if($lens.is(':visible')){var sBgPos='';if(nMagnifiedWidth&&nMagnifiedHeight){var nRatioX=-Math.round(nX/nImageWidth*nMagnifiedWidth-nLensWidth/2),nRatioY=-Math.round(nY/nImageHeight*nMagnifiedHeight-nLensHeight/2);if(oOptions.limitBounds){var nBoundRight=-Math.round((nImageWidth-nBoundX)/nImageWidth*nMagnifiedWidth-nLensWidth/2),nBoundBottom=-Math.round((nImageHeight-nBoundY)/nImageHeight*nMagnifiedHeight-nLensHeight/2);if(nRatioX>0)nRatioX=0;else if(nRatioX<nBoundRight)nRatioX=nBoundRight;if(nRatioY>0)nRatioY=0;else if(nRatioY<nBoundBottom)nRatioY=nBoundBottom}
sBgPos=nRatioX+'px '+nRatioY+'px'}
$lens.css({'top':Math.round(nY-nLensHeight/2)+oImageOffset.top+'px','left':Math.round(nX-nLensWidth/2)+oImageOffset.left+'px','background-position':sBgPos})}};if(!isNaN(+oDataAttr.speed))oOptions.speed=+oDataAttr.speed;if(!isNaN(+oDataAttr.timeout))oOptions.timeout=+oDataAttr.timeout;if(!isNaN(+oDataAttr.finalWidth))oOptions.finalWidth=+oDataAttr.finalWidth;if(!isNaN(+oDataAttr.finalHeight))oOptions.finalHeight=+oDataAttr.finalHeight;if(!isNaN(+oDataAttr.magnifiedWidth))oOptions.magnifiedWidth=+oDataAttr.magnifiedWidth;if(!isNaN(+oDataAttr.magnifiedHeight))oOptions.magnifiedHeight=+oDataAttr.magnifiedHeight;if(oDataAttr.limitBounds==='true')oOptions.limitBounds=!0;if(typeof window[oDataAttr.afterLoad]==='function')oOptions.afterLoad=window[oDataAttr.afterLoad];if(/\b(Android|BlackBerry|IEMobile|iPad|iPhone|Mobile|Opera Mini)\b/.test(navigator.userAgent)){if(!isNaN(+oDataAttr.touchBottomOffset))oOptions.touchBottomOffset=+oDataAttr.touchBottomOffset}else{oOptions.touchBottomOffset=0}
$image.data('originalStyle',$image.attr('style'));var elZoomImage=new Image();var zoomFactor=2;$(elZoomImage).on({'load':function(){$image.css('display','block');if(!$image.parent('.magnify').length){$image.wrap('<div class="magnify"></div>')}
$container=$image.parent('.magnify');if($image.prev('.magnify-lens').length){$container.children('.magnify-lens').css('background-image','url(\''+sZoomSrc+'\')')}else{$image.before('<div class="magnify-lens loading" style="background: #f0f0f0 url(\''+sZoomSrc+'\') 0 0 no-repeat;"></div>')}
$lens=$container.children('.magnify-lens');$lens.removeClass('loading');nImageWidth=oOptions.finalWidth||$image.width();nImageHeight=oOptions.finalHeight||$image.height();nMagnifiedWidth=oOptions.magnifiedWidth||elZoomImage.width*zoomFactor;nMagnifiedHeight=oOptions.magnifiedHeight||elZoomImage.height*zoomFactor;nLensWidth=$lens.width();nLensHeight=$lens.height();oContainerOffset=getOffset();if(oOptions.limitBounds){nBoundX=(nLensWidth/2)/(nMagnifiedWidth/nImageWidth);nBoundY=(nLensHeight/2)/(nMagnifiedHeight/nImageHeight)}
if(nMagnifiedWidth!==elZoomImage.width||nMagnifiedHeight!==elZoomImage.height){$lens.css('background-size',nMagnifiedWidth+'px '+nMagnifiedHeight+'px')}
$image.data('zoomSize',{'width':nMagnifiedWidth,'height':nMagnifiedHeight});$container.data('mobileCloseEvent',oDataAttr.mobileCloseEvent||oOptions.mobileCloseEvent);elZoomImage=null;oOptions.afterLoad();if($lens.is(':visible'))moveLens();$container.off().on({'mousemove touchmove':moveLens,'mouseenter':function(){oContainerOffset=getOffset()},'mouseleave':hideLens});if(oOptions.timeout>=0){$container.on('touchend',function(){setTimeout(hideLens,oOptions.timeout)})}
$('body').not($container).on('touchstart',hideLens);var sUsemap=$image.attr('usemap');if(sUsemap){var $map=$('map[name='+sUsemap.slice(1)+']');$image.after($map);$container.click(function(e){if(e.clientX||e.clientY){$lens.hide();var elPoint=document.elementFromPoint(e.clientX||e.originalEvent.touches[0].clientX,e.clientY||e.originalEvent.touches[0].clientY);if(elPoint.nodeName==='AREA'){elPoint.click()}else{$('area',$map).each(function(){var a=$(this).attr('coords').split(',');if(nX>=a[0]&&nX<=a[2]&&nY>=a[1]&&nY<=a[3]){this.click();return!1}})}}})}
if($anchor.length){$anchor.css('display','inline-block');if($anchor.attr('href')&&!(oDataAttr.src||oOptions.src)){$anchor.click(function(e){e.preventDefault()})}}},'error':function(){elZoomImage=null}});elZoomImage.src=sZoomSrc},nTimer=0,refresh=function(){clearTimeout(nTimer);nTimer=setTimeout(function(){$that.destroy();$that.magnify(oOptions)},100)};this.destroy=function(){this.each(function(){var $this=$(this),$lens=$this.prev('div.magnify-lens'),sStyle=$this.data('originalStyle');if($this.parent('div.magnify').length&&$lens.length){if(sStyle)$this.attr('style',sStyle);else $this.removeAttr('style');$this.unwrap();$lens.remove()}});$(window).off('resize',refresh);return $that}
$(window).resize(refresh);return this.each(function(){init(this)})}}(jQuery));var previousHash='';elpacVariantMatchesFilter=function(variantAttributes,filter){var matches=!0;if(Object.keys(variantAttributes).length){for(var attributePim in filter){if(typeof variantAttributes[attributePim]==='undefined'||filter[attributePim].indexOf(variantAttributes[attributePim])===-1){matches=!1;break}}}
return matches}
adjustVariantWidth=function(){var container=$('#product-elpac-variants');if(container.length===0){return}
var totalWidth=container.first().width();var sideHeadWidth=container.find('.fixed-side').first().outerWidth();var variantsDisplayed=getVariantsDisplayed();var variantWidth=Math.floor(((totalWidth-sideHeadWidth)/variantsDisplayed)-8);container.find('thead th').not('.fixed-side').css('min-width',variantWidth);toggleVariantNavigation(container.find('table.table-clone thead th[data-variant]').not('.hidden').length)};toggleVariantNavigation=function(totalVarians){var container=$('#product-elpac-variants');if(container.length===0){return}
var variantsDisplayed=getVariantsDisplayed();if(totalVarians<=variantsDisplayed){container.find('.variant-navigation').addClass('hidden')}else{container.find('.variant-navigation').removeClass('hidden')}};getVariantsDisplayed=function(){var container=$('#product-elpac-variants');if(container.length===0){return 1}
var totalWidth=container.first().width();var totalVariants=container.find('table.table-clone thead th[data-variant]').not('.hidden').length;var variantsDisplayed=4;if(totalWidth<1630){variantsDisplayed=4}
if(totalWidth<930){variantsDisplayed=3}
if(totalWidth<690){variantsDisplayed=2}
if(totalVariants>variantsDisplayed){$('.table-wrap').addClass('overflow');$('.fixed-side').addClass('overflow')}else{$('.table-wrap').removeClass('overflow');$('.fixed-side').removeClass('overflow')}
return variantsDisplayed};navigateToHashData=function(animate){if(typeof animate==='undefined'){animate=!0}
animationTime=0;if(animate){var animationTime=1000}
var hashValue=decodeURI(window.location.hash);if($('#product-elpac-variants [data-variant]').length){if(hashValue.startsWith('#variant_')){closeComparePanel();var productId=hashValue.substring(9);var variant=jQuery('#product-elpac-variants .table-wrap [data-variant="'+productId+'"]').first();if(variant.length){var sideHeadSize=jQuery('#product-elpac-variants table .fixed-side').first().outerWidth();var container=variant.parents('.table-wrap').first();var currentOffset=$('body').scrollTop();$('html, body').animate({scrollTop:currentOffset+container.offset().top-200},animationTime);container.animate({scrollLeft:variant.position().left-sideHeadSize},animationTime)}}else if(hashValue.startsWith('#product-query_')){var productId=hashValue.slice(15);var productName='';if(productId!==''){var formButton=$('#product-elpac-variants [data-variant='+productId+'] [data-autocomplete-product]').first();if(formButton.length){productName=formButton.data('autocomplete-product')}}
showProductForm(productName);$('td[data-variant="'+productId+'"] a.btn-primary').click()}}
$('body').on('click','a',function(){var href=$(this).attr('href');if(!href){return}
if(href.match("^#product-query")){closeComparePanel();var productId=this.hash.slice(15);var productName='';if(productId!=''){var formButton=$('#product-elpac-variants [data-variant='+productId+'] [data-autocomplete-product]').first();if(formButton.length){productName=formButton.data('autocomplete-product')}}
showProductForm(productName)}else if(href.match("^#query-modal")){closeComparePanel();var productId=this.hash.slice(15);var productName='';if(productId!=''){var formButton=$('#product-form-button[data-autocomplete-product]');if(formButton){productName=formButton.data('autocomplete-product')}}
showProductForm(productName)}})}
closeComparePanel=function(){if($('#panel-compare-close').length){$('#panel-compare-close').click()}}
showProductForm=function(productName){$('#elpacRequestForm').addClass('show');var productForm=$('#product-form');if(productForm.length){if(productName&&productName!==''){productForm.find('#radioELPACArticle').click();productForm.find('#elpacarticle').val(productName);productForm.find('#product-enquiry-article').val(productName);if(productForm.find('#product-enquiry-article').val()!==''){productForm.find('#product-enquiry-article').addClass('valid');productForm.find('#product-enquiry-article').removeClass('invalid')}else{productForm.find('#product-enquiry-article').removeClass('valid');productForm.find('#product-enquiry-article').addClass('invalid')}
$('#product-query-modal').on('shown.bs.modal',function(event){productForm.find('#radioELPACArticle').click()})}else{productForm.find('#radioELPACSeries').click();productForm.find('#product-enquiry-article').removeClass('valid');productForm.find('#product-enquiry-article').addClass('invalid');$('#product-query-modal').on('shown.bs.modal',function(event){productForm.find('#radioELPACSeries').click()})}}}
$(document).ready(function(){if($('#product-elpac-variants').length){$("#product-elpac-variants table").clone(!0).appendTo('#product-elpac-variants .table-clone-container').addClass('table-clone');adjustVariantWidth();$(window).resize(function(){adjustVariantWidth()})}
if($('#product-elpac-variants [data-variant]').length){$('#product-elpac-variants').find('.variant-navigation-prev, .variant-navigation-next').click(function(e){e.preventDefault();var container=$(this).parents('#product-elpac-variants').first().find('.table-wrap').first();var direction=$(this).is('.variant-navigation-prev')?-1:1;var sideHeadSize=container.find('.fixed-side').first().outerWidth();var currentOffset=container.scrollLeft();var scrollToOffset=null;container.find('table thead th[data-variant]').not('.hidden').each(function(){var offset=$(this).position().left;var difference=offset-currentOffset-sideHeadSize;if(direction===1&&difference>0){scrollToOffset=offset;currentOffset=container.scrollLeft();return!1}
if(direction===-1){if(difference>=0){return!1}else{scrollToOffset=offset}}});if(scrollToOffset!==null){container.animate({scrollLeft:scrollToOffset-sideHeadSize},100)}});toggleVariantNavigation($('#product-elpac-variants table.table-clone thead th[data-variant]').not('.hidden').length)}
window.onhashchange=function(){navigateToHashData()};navigateToHashData()});$(function(){if(document.querySelectorAll('.gallery-slider').length>=1){let slider=tns({container:'[data-gallery-slider-container=true]',controlsContainer:'[data-gallery-slider-controls=true]',navContainer:'[data-gallery-slider-thumbnails=true]',preventScrollOnTouch:'auto',});document.querySelectorAll(".gallery-slider-item-container").forEach(function(element){element.removeAttribute('style')});document.querySelectorAll(".base-slider-dots button").forEach(function(element){element.addEventListener("click",(event)=>{let button=event.target;let index=button.getAttribute("data-nav-dot");if(slider){slider.goTo(index)}
document.querySelectorAll(".base-slider-dots button").forEach(function(element){element.classList.remove('active')});button.classList.add('active')})});slider.events.on('indexChanged',(info,eventName)=>{let index=info.index-1;if(index>info.slideCount){index=index-info.slideCount}
if(index<1){if(index===0&&!document.querySelector('.gallery-slider').classList.contains('gallery-slider-elpac')){index=0}else{index=info.slideCount}}
document.querySelectorAll(".base-slider-dots button").forEach(function(element){element.classList.remove("active")});let activeTabNavItem=document.querySelector(`.base-slider-dots button[data-nav-dot='${index}']`);if(activeTabNavItem){activeTabNavItem.classList.add("active")}});if(document.querySelectorAll('.gallery-slider-thumbnails-col').length>=1){tns({container:'[data-gallery-slider-thumbnails=true]',controlsContainer:'[data-thumbnail-slider-controls=true]',loop:!1,nav:!1,responsive:{992:{items:4},1200:{items:6}},gutter:20,preventScrollOnTouch:'force',})}}});var videos=document.getElementsByTagName("video");var modelSlides=document.querySelectorAll(".model-slide");var poster={};var modelPoster={};var posterAlt={};var posterTitle={};var lightboxes=document.querySelectorAll(".lightbox-slider");for(var i=0;i<videos.length;i++){poster[videos[i].id.replace('video','')]=videos[i].getAttribute('poster')}
for(var i=0;i<modelSlides.length;i++){modelPoster[modelSlides[i].id.replace('model-link','')]=modelSlides[i].getAttribute('data-poster-thumbnail')}
for(var lf=0;lf<lightboxes.length;lf++){posterAlt[lightboxes[lf].id.replace('lightbox','')]=lightboxes[lf].getAttribute('data-mfp-alt');posterTitle[lightboxes[lf].id.replace('lightbox','')]=lightboxes[lf].getAttribute('data-mfp-title')}
var thumbnails=document.querySelectorAll(".video-thumbnail");for(var t=0;t<thumbnails.length;t++){const thumbnail=thumbnails[t];let thumbnailId=thumbnail.id.replace('video-thumbnail','');if(thumbnailId&&poster[thumbnailId]){thumbnail.src=poster[thumbnailId]}
if(thumbnailId&&posterAlt[thumbnailId]){thumbnail.alt=posterAlt[thumbnailId];var thumbnailAlt=thumbnail.alt}
if(thumbnailId&&posterTitle[thumbnailId]){thumbnail.title=posterTitle[thumbnailId];var thumbnailTitle=thumbnail.title}}
var modelThumbnails=document.querySelectorAll(".model-thumbnail");for(var t=0;t<modelThumbnails.length;t++){const thumbnail=modelThumbnails[t];let thumbnailId=thumbnail.id.replace('model-thumbnail','');if(thumbnailId&&modelPoster[thumbnailId]){thumbnail.src=modelPoster[thumbnailId]}}
for(var l=0;l<lightboxes.length;l++){const lightbox=lightboxes[l];let lightboxId=lightbox.id.replace('lightbox','');if(lightboxId&&poster[lightboxId]&&!lightbox.classList.contains('lightbox-video')){lightbox.href=poster[lightboxId]}}
if(document.querySelectorAll('.product-equipment-slider').length>=1){tns({container:'.product-equipment-slider',items:5,navPosition:'bottom',controlsText:['',''],lazyload:!0,nav:!1,responsive:{992:{items:5},768:{items:5},576:{items:3},0:{items:2}}})}
$(document).ready(function(){setTimeout(function(){$('[data-magnify-src]').magnify({speed:400})},500)});$(document).ready(function(){setTimeout(function(){$('.magnify').each(function(){$(this).children('img').clone().addClass('cloneImg').insertBefore($(this))})},1000);if($('model-viewer').length){var modelViewerScript=document.createElement('script');modelViewerScript.src='/typo3conf/ext/tmpl/Resources/Public/Js/model-viewer.min.js';modelViewerScript.type='module';document.head.appendChild(modelViewerScript)}
if($('[id^=tns][id*=-item] .lightbox-slider').length){$.loadStyle('/typo3conf/ext/tmpl/Resources/Public/Css/magnific-popup.css');$.loadScript('/typo3conf/ext/tmpl/Resources/Public/Js/jquery.magnific-popup.min.js',function(){$.loadScript('/typo3conf/ext/tmpl/Resources/Public/Js/jquery.magnific-popup.model.js');$.loadScript('/typo3conf/ext/tmpl/Resources/Public/Js/jquery.magnific-popup.video.js',function(){$('[id^=tns][id*=-item] .lightbox-slider').magnificPopup({type:'image',fixedBgPos:!0,fixedContentPos:!0,callbacks:{elementParse:function(item){if(!item.data){item.data={}}
if(thumbnailAlt){$('.mfp-img').attr('alt',thumbnailAlt)}
if(thumbnailTitle){$('.mfp-img').attr('title',thumbnailTitle)}
var link=item.el;item.data.title=link.data('mfp-title');if(link.hasClass('lightbox-video')){var linkId=link.attr('id');if(typeof linkId!='undefined'){var lightboxId=linkId.replace('lightbox','');var videoUrl=link.data('video');var videoType=link.data('type');item.src=videoUrl;item.mimeType=videoType;item.poster=poster[lightboxId]}}
if(link.hasClass('lightbox-model')){var linkId=link.attr('id');if(typeof linkId!='undefined'){item.type='model'}}}},mainClass:'mfp-img-mobile',gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1],tCounter:lightboxCounter},tClose:lightboxClose})})})}});function modelLoadTriggerHandler(event){var modelViewer=this.parentElement;modelViewer.dismissPoster();modelViewer.addEventListener('load',function(event){const[material]=this.model.materials;material.pbrMetallicRoughness.setBaseColorFactor('#FFFFFF');material.pbrMetallicRoughness.setMetallicFactor(0.7);material.pbrMetallicRoughness.setRoughnessFactor(0.3)})}
var player;let ytPlayers=[];function onYouTubePlayerAPIReady(){let sliderItems=document.querySelectorAll('.base-slider .gallery-slider-item-container');sliderItems.forEach(function(sliderItem){let iframes=sliderItem.getElementsByTagName("iframe");for(var i=0;i<iframes.length;i++){var iframe=iframes[i];ytPlayers.push(new YT.Player(iframe))}})
const pauseAllPlayer=(ytPlayer)=>{ytPlayer.forEach(player=>{player.pauseVideo()})};var pauseNextButton=document.querySelector(".base-slider .gallery-slider-controls-next");if(pauseNextButton)pauseNextButton.addEventListener("click",()=>pauseAllPlayer(ytPlayers));var pausePrevButton=document.querySelector(".base-slider .gallery-slider-controls-prev");if(pausePrevButton)pausePrevButton.addEventListener("click",()=>pauseAllPlayer(ytPlayers));}
var tag=document.createElement("script");tag.src="//www.youtube.com/player_api";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);var validator=!1;var validated=!1;let tabs=document.querySelectorAll(".box-element");if(tabs.length){let radio=document.querySelector('#radio'+tabs[0].dataset.form);let param=location.search.substring(1).split("&")[0].split("=");if(param[0]==="enquiryType"){openTab(tabs[param[1]],tabs[param[1]].dataset.form);radio=document.querySelector('#radio'+tabs[param[1]].dataset.form);radio.checked=!0}else{openTab(tabs[0],tabs[0].dataset.form);radio.checked=!0}}else{openTab(null,'')}
document.addEventListener('DOMContentLoaded',function(){setTimeout(function(){let cbxSerialDemand=document.querySelector('#product_serial_demand');let form=document.querySelector("#product-form");if(cbxSerialDemand){if(cbxSerialDemand.checked){form.classList.remove("gtm-productinquiry");form.classList.add("gtm-projectinquiry")}}},200)});function openTab(evt,element_id){$('input[name="tx_dlforms_forms[form][]"][value="'+element_id+'"]').prop('checked',!0);if(evt){$('#requestForm .form-description').hide();$('#requestForm .help-text-'+element_id).show();$('#requestForm input[disabled-before="1"], #requestForm button[disabled-before="1"], #requestForm textarea[disabled-before="1"]').each(function(){$(this).removeAttr('disabled');$(this).removeAttr('disabled-before')});var i,tabcontent,tablinks;tabcontent=document.getElementsByClassName("tabcontent");for(i=0;i<tabcontent.length;i++){tabcontent[i].style.display="none"}
tablinks=document.getElementsByClassName("tablinks");for(i=0;i<tablinks.length;i++){tablinks[i].parentElement.classList.remove('active')}
document.getElementById(element_id).style.display="block";evt.classList.add("active");let form=document.querySelector("#product-form");let cbxSerialDemand=document.querySelector('#product_serial_demand');form.classList.remove("gtm-productinquiry");form.classList.remove("gtm-projectinquiry");form.classList.remove("gtm-sparepartinquiry");form.classList.remove("gtm-otherinquiry");form.classList.remove("gtm-elpacproductinquiry");form.classList.remove("gtm-elpacseriesinquiry");switch(element_id){case "ProductEnquiry":cbxSerialDemand.addEventListener("change",changeSerialDemand);if(cbxSerialDemand.checked){form.classList.add("gtm-projectinquiry")}else{form.classList.add("gtm-productinquiry")}
break;case "Sparepart":form.classList.add("gtm-sparepartinquiry");break;case "General":form.classList.add("gtm-otherinquiry");break;case "ELPACSeries":form.classList.add("gtm-elpacseriesinquiry");break;case "ELPACArticle":form.classList.add("gtm-elpacproductinquiry");break}}
if($('#requestForm .product-check').prop('checked')){$('#requestForm .product-check').closest('.form-product').find('input[type="text"],input[type="number"]').attr('disabled','disabled').css('background','#eee');$('#requestForm .product-check').closest('.tabcontent').find('.product-unknown').removeClass('hidden');$('#requestForm .product-check').closest('.tabcontent').find('.product-unknown input, .product-unknown textarea').removeAttr('disabled')}else{$('#requestForm .product-check').closest('.form-product').find('input[type="text"],input[type="number"]').removeAttr('disabled').css('background','transparent');$('#requestForm .product-check').closest('.tabcontent').find('.product-unknown').addClass('hidden');$('#requestForm .product-check').closest('.tabcontent').find('.product-unknown input, .product-unknown textarea').attr('disabled','disabled')}
$('#requestForm input:hidden, #requestForm button:hidden, #requestForm textarea:hidden').not('[name^="tx_mediaupload_upload"],[name^="tx_dlforms_forms[form][]"]').each(function(){$(this).attr('disabled','disabled');$(this).attr('disabled-before','1');var attr=$(this).attr('required');if(typeof attr!==typeof undefined&&attr!==!1){$(this).attr('required-before','1');$(this).removeAttr('required')}});$('#requestForm .bs-searchbox input, #requestForm input:visible, #requestForm button:visible, #requestForm textarea:visible').each(function(){if($(this).attr('disabled-before')=='1'){$(this).removeAttr('disabled');$(this).removeAttr('disabled-before')}
if($(this).attr('required-before')=='1'){$(this).attr('required','required');$(this).removeAttr('required-before')}});$('#requestForm input.address.spec').removeAttr('disabled').removeAttr('required').removeAttr('disabled-before').val('05841');$('#requestForm input.url.spec').removeAttr('disabled').removeAttr('required').removeAttr('disabled-before');adjustRequiredFields();$('#query-modal').on('shown.bs.modal',function(event){$('#requestForm .bs-searchbox input, #requestForm input:visible, #requestForm button:visible, #requestForm textarea:visible').each(function(){if($(this).attr('disabled-before')=='1'){$(this).removeAttr('disabled');$(this).removeAttr('disabled-before')}
if($(this).attr('required-before')=='1'){$(this).attr('required','required');$(this).removeAttr('required-before')}});$('#requestForm input.address.spec').removeAttr('disabled').removeAttr('required').removeAttr('disabled-before').val('05841');$('#requestForm input.url.spec').removeAttr('disabled').removeAttr('required').removeAttr('disabled-before');adjustRequiredFields()});if(validator!==!1){if(validator.numberOfInvalids()){let privacyCheck=document.querySelector('#pricedeliverytimeprivacycheck');validator.errorList.forEach(function(error){error.element.classList.remove("invalid");if(error.element===privacyCheck){privacyCheck.closest('.privacy-checkbox').style.border="none"}})}
initJqueryValidator()}}
function changeSerialDemand(){if(this.checked){document.querySelector("#product-form").classList.remove("gtm-productinquiry");document.querySelector("#product-form").classList.add("gtm-projectinquiry")}else{document.querySelector("#product-form").classList.remove("gtm-projectinquiry");document.querySelector("#product-form").classList.add("gtm-productinquiry")}}
function adjustRequiredFields(){if($('.tx-dl-forms .row[data-special-required-fields=1]:visible').length>0){$('.tx-dl-forms .not-required').each(function(){$(this).removeAttr('required').closest('.row').find('label .required').hide()})}else{$('.tx-dl-forms .not-required').each(function(){$(this).attr('required','required').closest('.row').find('label .required').show()})}}
function initJqueryValidator(){if(validator!=!1){validator.destroy()}
validator=$("#requestForm > form").validate({invalidHandler:function(form,validator){var errors=validator.numberOfInvalids();if(errors){validated=!0;let pricedeliverytimeprivacycheck=0;$(validator.errorList[0].element)[0].scrollIntoView({block:"center"});$(validator.errorList).each(function(){$(this)[0].element.classList.add('invalid');if($(this)[0].element.tagName==="SELECT"||$(this)[0].element.tagName==="TEXTAREA"){$(this)[0].element.classList.add('invalid')}
if($(this)[0].element.id==="pricedeliverytimecountry"){$($(this)[0].element).parent().find('.select2').css({"border-color":"red"})}
if($(this)[0].element.id==="pricedeliverytimeprivacycheck"){$('#pricedeliverytimeprivacycheck').closest('.privacy-checkbox').css({"border":"1px solid red"});pricedeliverytimeprivacycheck++}});$(".invalid").keydown(function(){$(this)[0].classList.remove('invalid')});$(".invalid").on('change',function(){$(this)[0].classList.remove('invalid')});$('#pricedeliverytimeprivacycheck').on('click',function(){document.querySelector('#pricedeliverytimeprivacycheck').parentElement.querySelectorAll(".custom-control-indicator")[0].style.position='absolute';$('#pricedeliverytimeprivacycheck').closest('.privacy-checkbox').css({"border":"none"})});$('#pricedeliverytimecountry').on('change',function(){$('#pricedeliverytimecountry').parent().find('.select2').css({"border-color":"#AFAFAF"})})}else{validated=!1}},rules:{pricedeliverytimeprivacycheck:{required:!0}}})}
$(function(){var num=0;initJqueryValidator();$('.tx-dl-forms .field-function').on('change',function(event){checkFunctionField($(this).closest('form'))});$('.tx-dl-forms .function-check').on('change',function(event){var checked=$(this).prop('checked');var dropdown=$(this).closest('form').find('.field-function').first();var input=$(this).closest('form').find('.field-functioncustom').first();if(checked){dropdown.attr('disabled','disabled');input.removeAttr('disabled')}else{dropdown.removeAttr('disabled');input.attr('disabled','disabled')}
checkFunctionField($(this).closest('form'))});function checkFunctionField(form){var checked=form.find('.function-check').first().prop('checked');var selected_function=form.find('.field-function').first().val();if(checked==!1&&selected_function.toLowerCase()=='private'){form.find('.field-company').first().closest('.row').find('label .required').hide();form.find('.field-company').removeAttr('required')}else{form.find('.field-company').first().closest('.row').find('label .required').show();form.find('.field-company').attr('required','required')}}
$('.tx-dl-forms').on('change','.product-check',function(event){let product_unknown=document.getElementsByClassName("product-unknown["+getClassNumber(this.name)+"]");let product_known=document.getElementsByClassName("product-known["+getClassNumber(this.name)+"]");if($(this).prop('checked')){$(product_unknown).find('[data-required]').attr('required','required');$(product_known).find('[data-required]').removeAttr('required');for(let i=0;i<product_unknown.length;i++){product_unknown[i].classList.remove("hidden")}
for(let i=0;i<product_known.length;i++){product_known[i].classList.add("hidden")}
if(validated===!0){$('#product-form').valid()}}else{$(product_known).find('[data-required]').attr('required','required');$(product_unknown).find('[data-required]').removeAttr('required');for(let i=0;i<product_unknown.length;i++){product_unknown[i].classList.add("hidden")}
for(let i=0;i<product_known.length;i++){product_known[i].classList.remove("hidden")}}
$('#requestForm .bs-searchbox input, #requestForm input:visible, #requestForm button:visible, #requestForm textarea:visible').each(function(){if($(this).attr('disabled-before')=='1'){$(this).removeAttr('disabled');$(this).removeAttr('disabled-before')}
if($(this).attr('required-before')=='1'){$(this).attr('required','required');$(this).removeAttr('required-before')}})});$('.tx-dl-forms').on('click','.remove-product',function(event){$(this).closest('.form-product').remove()});$('.tx-dl-forms .add-product').on('click',function(event){num++;var products_container=$(this).closest('.form-products');var product_element=$(this).closest('.form-product').clone();product_element.html(product_element.html().replaceAll('xxx',num));product_element.find('label').removeAttr('for');product_element.find('input').not('[name^="tx_mediaupload_upload[uploadedFiles]"]').removeAttr('id');product_element.find('input').removeAttr('disabled');product_element.find('input').removeClass('typeahead-error');product_element.find('input').removeClass('typeahead-success');product_element.find('.message').hide();product_element.find('.unknown-check').remove();product_element.find('#media-upload-init').remove();product_element.find('#media-upload-init-field').remove();product_element.find('[class*="product-known"]').removeClass('hidden');product_element.find('[class*="product-unknown"]').addClass('hidden');product_element.find('div.add-product .fa-plus').removeClass('fa-plus').addClass('fa-minus');product_element.find('div.add-product').removeClass('add-product').addClass('remove-product');product_element.find('.add-product-text').addClass('hidden');product_element.find('.remove-product-text').removeClass('hidden');var newUploaderInstance=!1;if(product_element.find("[data-upload-property]").length){product_element.find('input[name^="tx_mediaupload_upload[uploadedFiles]"]').val('');uploadFieldContainer=product_element.find('[id^="jquery-wrapped-fine-uploader-"]').first();mainUploadJqFieldId=uploadFieldContainer.attr('id');newUploadJqFieldId=mainUploadJqFieldId+'-'+num;mainUploadFieldId=mainUploadJqFieldId.substring(29);uploadFieldContainer.html('');for(var i=0;i<MediaUpload.instances.length;i++){var mainInstance=MediaUpload.instances[i];if(mainInstance.id!==mainUploadFieldId){continue}
newUploaderInstance=JSON.parse(JSON.stringify(mainInstance));newUploaderInstance.id=mainUploadFieldId+'-'+num;newUploaderInstance.settings.property=newUploaderInstance.settings.property.replaceAll('xxx',num);newUploaderInstance.settings.uniqueId=newUploaderInstance.settings.uniqueId.replaceAll('xxx',num);product_element.html(product_element.html().replaceAll(mainUploadJqFieldId,newUploadJqFieldId));break}}
products_container.append('<div class="form-product">'+product_element.html()+'</div>');callTypeaheadForDescriptionFields(products_container.find('.form-product').last().find('.typeahead-productname').typeahead('destroy'));callTypeaheadForNumberFields(products_container.find('.form-product').last().find('.typeahead-productnumber').typeahead('destroy'));products_container.find('.form-product').last().find('.twitter-typeahead > .twitter-typeahead:nth-child(1)').remove();products_container.find('.form-product input').removeClass('inputloading').css('background','');if(newUploaderInstance){MediaUpload.instances.push(newUploaderInstance);initializeMediaUploadField(newUploaderInstance)}});function callTypeaheadForDescriptionFields(elements){elements.typeahead({hint:!0,minLength:3,highlight:!0},{limit:20,name:'my-dataset',async:!0,display:'value',templates:{suggestion:function(suggestion){return'<div>'+suggestion.show+'</div>'}},input_element:$(this),source:function(query,processSync,processAsync){if(query.indexOf("*")!==-1){this.cancel();return}
query="*"+query+"*";var input_element=$(this.$el[0].parentElement.parentElement).children("input:not(:disabled)").first();var requestdata={tx_solr:{q:query},mode:1};return $.post(solrAjaxSuggestUrl.replaceAll("&amp;","&"),requestdata,function(data){var messageContainer=input_element.closest('.form-product').find('.typeahead-message');var messageNotFound=messageContainer.find('.message-not-found');var messageFound=messageContainer.find('.message-found');if(data.length==0){input_element.addClass('typeahead-error');messageNotFound.show();messageFound.hide();messageContainer.show()}else{var temporaryValue='';for(var i in data){temporaryValue=data[i].value;data[i].value=data[i].other_value;data[i].other_value=temporaryValue}
input_element.removeClass('typeahead-error');messageContainer.hide()}
return processAsync(data)})}}).on('typeahead:selected',function(e,data){$(this).closest('.form-product').find('.typeahead-productnumber').val(data.other_value);$(this).addClass('typeahead-success');var messageContainer=$(this).closest('.form-product').find('.typeahead-message');var messageNotFound=messageContainer.find('.message-not-found');var messageFound=messageContainer.find('.message-found');messageNotFound.hide();messageFound.show();messageContainer.show()}).on('typeahead:asyncrequest',function(){$(this).closest('.form-product').find('.typeahead-productnumber').val('');$(this).addClass('inputloading');$(this).closest('.form-product').find('.typeahead-message').hide()}).on('typeahead:asynccancel typeahead:asyncreceive',function(){$(this).removeClass('inputloading')})}
function callTypeaheadForNumberFields(elements){elements.typeahead({hint:!0,minLength:3,highlight:!0},{limit:20,name:'my-dataset',async:!0,display:'show',templates:{suggestion:function(suggestion){return'<div>'+suggestion.show+'</div>'}},source:function(query,processSync,processAsync){if(query.indexOf("*")!==-1){this.cancel();return}
query="*"+query+"*";var input_element=$(this.$el[0].parentElement.parentElement).children("input:not(:disabled)").first();var requestdata={tx_solr:{q:query},mode:1};return $.post(solrAjaxSuggestUrl.replaceAll("&amp;","&"),requestdata,function(data){var messageContainer=input_element.closest('.form-product').find('.typeahead-message');var messageNotFound=messageContainer.find('.message-not-found');var messageFound=messageContainer.find('.message-found');if(data.length==0){input_element.addClass('typeahead-error');messageNotFound.show();messageFound.hide();messageContainer.show();if(document.querySelector('#sparepartunkown')){document.querySelector('#sparepartunkown').style.display="inline-block"}}else{input_element.removeClass('typeahead-error');messageContainer.hide()}
return processAsync(data)})}}).on('typeahead:selected',function(e,data){$(this).closest('.form-product').find('.typeahead-productname').val(data.show);$(this).addClass('typeahead-success');var messageContainer=$(this).closest('.form-product').find('.typeahead-message');var messageNotFound=messageContainer.find('.message-not-found');var messageFound=messageContainer.find('.message-found');messageNotFound.hide();messageFound.show();messageContainer.show();if(document.querySelector('#sparepartunkown')){document.querySelector('#sparepartunkown').style.display="none"}}).on('typeahead:asyncrequest',function(){$(this).closest('.form-product').find('.typeahead-productname').val('');$(this).addClass('inputloading');$(this).closest('.form-product').find('.typeahead-message').hide()}).on('typeahead:asynccancel typeahead:asyncreceive',function(){$(this).removeClass('inputloading')})}
callTypeaheadForDescriptionFields(jQuery('.typeahead-productname'));callTypeaheadForNumberFields(jQuery('.typeahead-productnumber'));if($('.make-this-active').length>0){$('button[tab-form=Sparepart]').trigger('click')}
$('.tx-dl-forms input[type=file]').change(function(e){if(e.target.files[0]){$(this).parent().find('.file-name').first().html(e.target.files[0].name);$(this).parent().find('.field-upload-overlay').addClass('selected')}else{$(this).parent().find('.file-name').first().html($(this).parent().find('.file-name').first().attr('data-default-text'));$(this).parent().find('.field-upload-overlay').removeClass('selected')}});adjustRequiredFields();$('#requestForm input.address.spec').removeAttr('disabled').removeAttr('required').removeAttr('disabled-before').val('05841');$('#requestForm input.url.spec').removeAttr('disabled').removeAttr('required').removeAttr('disabled-before')});String.prototype.replaceAll=function(search,replacement){var target=this;return target.replace(new RegExp(search,'g'),replacement)};$('.type-of-request').find('input[type=radio]').each(function(){$(this).on('click',function(){$('.pulse').each(function(){$(this).removeClass('pulse')})})});$('#pulse-row').find('.custom-control-input').each(function(){$(this).on('click',function(){if(validated===!0){$('#product-form').valid()}})});$('#pricedeliverytimefunctioncustomcheck').on('click',function(){if(validated===!0){if($(this)[0].checked===!0){$('#pricedeliverytimefunction').removeAttr('required');$('#pricedeliverytimefunction').removeClass('invalid');$('#pricedeliverytimefunctioncustom').attr('required','required');if($('#pricedeliverytimefunctioncustom').val()===null){$('#pricedeliverytimefunctioncustom').addClass('invalid')}}else{$('#pricedeliverytimefunctioncustom').removeAttr('required');$('#pricedeliverytimefunctioncustom').removeClass('invalid');$('#pricedeliverytimefunction').attr('required','required');if($('#pricedeliverytimefunction').val()===null){$('#pricedeliverytimefunction').addClass('invalid')}}
$('#pricedeliverytimefunctioncustom').valid()
$('#pricedeliverytimefunction').valid()}});$('input[name^="tx_dlforms_forms[productunknowncheck]"]').on('click',function(){if(validated===!0){if($('input[name^="tx_dlforms_forms[productunknowncheck]"]')[0].checked===!0){$('#Sparepart').find('.field-productname.tt-input').removeAttr('required');$('#Sparepart').find('.field-productnumber.tt-input').removeAttr('required');$('#Sparepart').find('.field-productcount').removeAttr('required');$('#Sparepart').find('.field-productname.tt-input').removeClass('invalid');$('#Sparepart').find('.field-productnumber.tt-input').removeClass('invalid');$('#Sparepart').find('.field-productcount').removeClass('invalid');$('#sparepartproductcountunknown').attr('required','required');$('#sparepartmessage').attr('required','required')}else{$('#Sparepart').find('.field-productname.tt-input').attr('required','required');$('#Sparepart').find('.field-productnumber.tt-input').attr('required','required');$('#Sparepart').find('.field-productcount').attr('required','required');if($('#Sparepart').find('.field-productname.tt-input').val()===null){$('#Sparepart').find('.field-productname.tt-input').addClass('invalid')}
if($('#Sparepart').find('.field-productnumber.tt-input').val()===null){$('#Sparepart').find('.field-productnumber.tt-input').addClass('invalid')}
if($('#Sparepart').find('.field-productcount').val()===null){$('#Sparepart').find('.field-productcount').addClass('invalid')}
$('#sparepartproductcountunknown').removeAttr(' $(\'#sparepartproductcountunknown\')');$('#sparepartmessage').removeAttr('required')}
$('#Sparepart').find('.field-productname.tt-input').valid();$('#Sparepart').find('.field-productnumber.tt-input').valid();$('#Sparepart').find('.field-productcount').valid()}});if(document.querySelector('#productnumberinput')){let productNumberInput=document.querySelector('#productnumberinput');productNumberInput.addEventListener('keyup',keyUpNumberInput)}
function keyUpNumberInput(){if(this.value.length<=3){if(document.querySelector('#sparepartunkown')){document.querySelector('#sparepartunkown').style.display="inline-block"}
$(this).closest('.form-product').find('.typeahead-message').hide()}}
function getClassNumber(string){string=string.split('[');return string[string.length-1].split(']')[0]}
$('#query-modal').on('hide.bs.modal',function(){$('.modal-body').scrollTop(0)});$('#product-query-modal').on('hide.bs.modal',function(){$('.modal-body').scrollTop(0)});$(document).ready(function(){if($('.selectpicker').length){$.loadScript('/typo3conf/ext/tmpl/Resources/Public/Js/select2.min.js',function(){$('.selectpicker').select2({closeOnSelect:!1,allowHtml:!1,allowClear:!1,tags:!1,templateSelection:function(data){if(data.id!==''){return data.element.parentNode.getAttribute('data-placeholder')}
return data.text}});$('#attributes-container .selectpicker').select2({closeOnSelect:!1,allowHtml:!1,allowClear:!1,tags:!1,dropdownParent:$('#attributes-container'),templateSelection:function(data){if(data.id!==''){return data.element.parentNode.getAttribute('data-placeholder')}
return data.text}});$('#attributes-container .selectpicker').on('select2:opening select2:closing',function(event){var $searchfield=$(this).parent().find('.select2-search__field');$searchfield.prop('readonly',!0)});$('#attributes-container .selectpicker').on('select2:open',function(e){const evt="scroll.select2";$(e.target).parents().off(evt);$(window).off(evt)});$('#product-form .selectpicker, .tx-powermail .selectpicker').select2({closeOnSelect:!1,allowHtml:!1,allowClear:!1,tags:!1,templateSelection:function(data){if(data.id!==''){}
return data.text}})})}});
/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
 * https://jqueryvalidation.org/
 * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.submitButton=b.currentTarget,a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.submitButton&&(c.settings.submitHandler||c.formSubmitted)&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),!c.settings.submitHandler||(e=c.settings.submitHandler.call(c,c.currentForm,b),d&&d.remove(),void 0!==e&&e)}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(null!=j&&(!j.form&&j.hasAttribute("contenteditable")&&(j.form=this.closest("form")[0],j.name=this.attr("name")),null!=j.form)){if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(a,b){i[b]=f[b],delete f[b]}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g)),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr.pseudos||a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||a.inArray(c.keyCode,d)!==-1||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){!this.form&&this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=a(this).attr("name"));var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=g.check(e)&&h))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)void 0!==a[b]&&null!==a[b]&&a[b]!==!1&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0],this.name=d),!(d in c||!b.objectLength(a(this).rules()))&&(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f,g=a(b).rules(),h=a.map(g,function(a,b){return b}).length,i=!1,j=this.elementValue(b);if("function"==typeof g.normalizer?f=g.normalizer:"function"==typeof this.settings.normalizer&&(f=this.settings.normalizer),f){if(j=f.call(b,j),"string"!=typeof j)throw new TypeError("The normalizer should return a string value.");delete g.normalizer}for(d in g){e={method:d,parameters:g[d]};try{if(c=a.validator.methods[d].call(this,j,b,e.parameters),"dependency-mismatch"===c&&1===h){i=!0;continue}if(i=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(k){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",k),k instanceof TypeError&&(k.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),k}}if(!i)return this.objectLength(g)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){"string"==typeof c&&(c={method:c});var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement.call(this,d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return!this.dependTypes[typeof a]||this.dependTypes[typeof a](a,b)},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.submitButton&&a("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return c="string"==typeof c&&c||"remote",a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0===e.param||e.param:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e<=d},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||a<=c},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e,f=a(c).attr("type"),g="Step attribute on input type "+f+" is not supported.",h=["text","number","range"],i=new RegExp("\\b"+f+"\\b"),j=f&&!i.test(h.join()),k=function(a){var b=(""+a).match(/(?:\.(\d+))?$/);return b&&b[1]?b[1].length:0},l=function(a){return Math.round(a*Math.pow(10,e))},m=!0;if(j)throw new Error(g);return e=k(d),(k(b)>e||l(b)%l(d)!==0)&&(m=!1),this.optional(c)||m},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};return a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a});
/*! jQuery Validation Plugin - v1.17.0 - 7/29/2017
 * https://jqueryvalidation.org/
 * Copyright (c) 2017 Jörn Zaefferer; Licensed MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return a.extend(a.validator.messages,{required:"Dieses Feld ist ein Pflichtfeld.",maxlength:a.validator.format("Geben Sie bitte maximal {0} Zeichen ein."),minlength:a.validator.format("Geben Sie bitte mindestens {0} Zeichen ein."),rangelength:a.validator.format("Geben Sie bitte mindestens {0} und maximal {1} Zeichen ein."),email:"Geben Sie bitte eine gültige E-Mail Adresse ein.",url:"Geben Sie bitte eine gültige URL ein.",date:"Bitte geben Sie ein gültiges Datum ein.",number:"Geben Sie bitte eine Nummer ein.",digits:"Geben Sie bitte nur Ziffern ein.",equalTo:"Bitte denselben Wert wiederholen.",range:a.validator.format("Geben Sie bitte einen Wert zwischen {0} und {1} ein."),max:a.validator.format("Geben Sie bitte einen Wert kleiner oder gleich {0} ein."),min:a.validator.format("Geben Sie bitte einen Wert größer oder gleich {0} ein."),creditcard:"Geben Sie bitte eine gültige Kreditkarten-Nummer ein.",step:a.validator.format("Bitte geben Sie ein Vielfaches von {0} ein.")}),a});!function(e){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return"EN"==e("html").attr("lang").toUpperCase()&&e.extend(e.validator.messages,{required:"This field is required.",maxlength:e.validator.format("Please enter a maximum of {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter at least {0} and maximum {1} characters."),email:"Please enter a valid e-mail address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",number:"Please enter a number.",digits:"Please enter digits only.",equalTo:"Please repeat the same value.",range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}.."),min:e.validator.format("Please enter a value greater than or equal to {0}."),creditcard:"Please enter a valid credit card number."}),e});(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","../jquery.validate"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(jQuery)}}(function($){if($('html').attr('lang').toUpperCase()=='RU'){$.extend($.validator.messages,{required:"Это поле является обязательным",maxlength:$.validator.format("Пожалуйста, введите максимум {0} символов."),minlength:$.validator.format("Пожалуйста, введите не менее {0} символов."),rangelength:$.validator.format("Пожалуйста, введите не менее {0} и не более {1} символов."),email:"Пожалуйста, введите действительный адрес электронной почты.",url:"Пожалуйста, введите действительный URL.",date:"Пожалуйста, введите действительную дату.",number:"Пожалуйста, введите номер.",digits:"Пожалуйста, введите только цифры.",equalTo:"Пожалуйста, повторите то же значение.",range:$.validator.format("Пожалуйста, введите значение между {0} и {1}."),max:$.validator.format("Пожалуйста, введите значение, меньшее или равное {0}."),min:$.validator.format("Пожалуйста, введите значение, большее или равное {0}."),creditcard:"Пожалуйста, введите действительный номер кредитной карты.",step:$.validator.format("Пожалуйста, введите значение, кратное {0}.")})}
return $}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","../jquery.validate"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(jQuery)}}(function($){if($('html').attr('lang').toUpperCase()=='ES'){$.extend($.validator.messages,{required:"Este campo es obligatorio",maxlength:$.validator.format("Por favor introduza un máximo de {0} carácteres"),minlength:$.validator.format("Por favor introduza un mínimo de {0} carácteres"),rangelength:$.validator.format("Por favor introduza un mínimo de {0} y un máximo de  {1} carácteres"),email:"Por favor introduzca una dirección de correo electrónico válida",url:"Por favor introduca una URL válida",date:"Por favor introduzca una fecha válida",number:"Por favor introduzca un número",digits:"Por favor introduzca sólo zifras",equalTo:"Por favor repita el mismo valor",range:$.validator.format("Por favor introduzca un valor entre {0} y {1}"),max:$.validator.format("Por favor introduzca un valor igual o menor que {0}"),min:$.validator.format("Por favor introduzca un valor igual o mayor que {0}"),creditcard:"Por favor introduzca un Número de targeta de crédito válido",step:$.validator.format("Introduzca un múltiplo de {0}.")})}
return $}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","../jquery.validate"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(jQuery)}}(function($){if($('html').attr('lang').toUpperCase()=='PT'){$.extend($.validator.messages,{required:"Este campo é obrigatório",maxlength:$.validator.format("Por favor introduza um máximo de {0} caracteres."),minlength:$.validator.format("Por favor introduza um minimo de {0} caracteres."),rangelength:$.validator.format("Por favor introduza pelo menos {0} e no máximo {1} caracteres."),email:"Por favor introduza um endereço de correio electrónico válido.",url:"Por favor introduza um URL válido.",date:"Por favor introduza uma data válida.",number:"Por favor introduza um número.",digits:"Por favor introduza apenas dígitos.",equalTo:"Por favor repita o mesmo valor.",range:$.validator.format("Por favor introduza um valor entre {0} e {1}."),max:$.validator.format("Por favor introduza um valor menor ou igual a {0}."),min:$.validator.format("Por favor introduza um valor maior ou igual a {0}."),creditcard:"Por favor, introduza um número de cartão de crédito válido.",step:$.validator.format("Por favor introduza um múltiplo de {0}.")})}
return $}));(function(factory){if(typeof define==="function"&&define.amd){define(["jquery","../jquery.validate"],factory)}else if(typeof module==="object"&&module.exports){module.exports=factory(require("jquery"))}else{factory(jQuery)}}(function($){if($('html').attr('lang').toUpperCase()=='FR'){$.extend($.validator.messages,{required:"Cet champ est obligatoire",maxlength:$.validator.format("Veuillez saisir un maximum de {0} caractères."),minlength:$.validator.format("Veuillez saisir au moins {0} caractères."),rangelength:$.validator.format("Veuillez saisir au moins {0} et au maximum {1} caractères."),email:"Veuillez entrer une adresse email valide.",url:"Veuillez saisir une URL valide.",date:"Veuillez entrer une date valide.",number:"Veuillez saisir un numéro.",digits:"Veuillez saisir uniquement des chiffres.",equalTo:"Veuillez répéter la même valeur.",range:$.validator.format("Veuillez saisir une valeur comprise entre {0} et {1}."),max:$.validator.format("Veuillez saisir une valeur inférieure ou égale à {0}."),min:$.validator.format("Veuillez saisir une valeur supérieure ou égale à {0}."),creditcard:"Veuillez saisir un numéro de carte de crédit valide",step:$.validator.format("Veuillez saisir un multiple de {0}.")})}
return $}));document.addEventListener('DOMContentLoaded',function(){var iframes=document.querySelectorAll('.social-gdpr-youtube-video, .social-gdpr-vimeo-video, .social-gdpr-google-maps, .social-gdpr-osm-map');iframes.forEach(function(iframe){['click','keydown'].forEach(function(e){iframe.addEventListener(e,function(event){if(event.keyCode===13||event.keyCode===32||e==='click'){if(event.target.tagName.toLowerCase()!=='a'){var iframe=event.currentTarget;iframe.parentNode.innerHTML=atob(iframe.children[0].getAttribute('data-iframe'));event.preventDefault()}}})})})});!function(){"use strict";(function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(e,t){let n=document.createEvent("CustomEvent");return t=t||{bubbles:!1,cancelable:!1,detail:null},n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n},void 0===NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})})(),function(e){function t(){window.dataLayer.push(arguments)}const n={cookieName:"cookie_consent",settingsClass:"",openButtonClass:"cookie-consent-open",detailsOpenContainerSelector:".detail, .show-details, .consent-modal",consentVariableName:"cookieConsent",containerDisplayStyle:"block",currentLanguageCode:null,expiryDays:365,modalContainer:null,modalForm:null,saveButton:null,denyButton:null,selectAllButton:null,isSelectAll:!1,isDeny:!1,isReediting:!1,reloadOnReeditDeny:!1,hideOnInit:!1,pushConsentToTagManager:!1,lazyloading:!1,lazyloadingTimeout:12e4,lazyloadingEvents:["mousedown","mousemove","keydown","scroll","touchstart"],consentScripts:[],consentMode:{},init:function(e){const n=this;if(this.cookieName="cookieName"in e?e.cookieName:this.cookieName,this.openButtonClass="openButtonClass"in e?e.openButtonClass:this.openButtonClass,this.currentLanguageCode="currentLanguageCode"in e?e.currentLanguageCode:this.currentLanguageCode,this.expiryDays="expiryDays"in e?parseInt(e.expiryDays):this.expiryDays,this.hideOnInit="hideOnInit"in e?Boolean(e.hideOnInit):this.hideOnInit,this.reloadOnReeditDeny="reloadOnReeditDeny"in e?Boolean(e.reloadOnReeditDeny):this.reloadOnReeditDeny,this.pushConsentToTagManager="pushConsentToTagManager"in e&&Boolean(e.pushConsentToTagManager),this.lazyloading="lazyloading"in e?Boolean(e.lazyloading):this.lazyloading,this.lazyloadingTimeout="lazyloadingTimeout"in e?1e3*parseInt(e.lazyloadingTimeout):this.lazyloadingTimeout,this.consentMode="consentMode"in e?e.consentMode:this.consentMode,window.dataLayer=window.dataLayer||[],window[this.consentVariableName]={consent:!1,options:[]},window.cookieConsentModalToggle=function(){n.modalContainer.style.display="none"===n.modalContainer.style.display?n.containerDisplayStyle:"none"},window.cookieConsentReplaceConsentButtons=function(){n.replaceConsentButtonsForAcceptedCookies()},Object.keys(this.consentMode).length>0){let e={};Object.values(this.consentMode).forEach((t=>t.forEach((t=>e[t]="denied")))),t("consent","default",e)}if("containerId"in e)try{this.modalContainer=document.querySelector("#"+e.containerId)}catch(e){throw new Error("invalid container selector")}null!==this.modalContainer&&(this.saveButton=this.modalContainer.querySelector("button.save, input.save"),this.denyButton=this.modalContainer.querySelector("button.deny, input.deny"),this.selectAllButton=this.modalContainer.querySelector("button.select-all, input.select-all"),this.registerButtonEvents(this.modalContainer),this.modalForm=this.modalContainer.querySelector("form")),!0===this.hasConsent()?this.consentEventDispatch():!1===this.hideOnInit&&!1===this.lazyloading?this.openModal(this.modalContainer):!1===this.hideOnInit&&!0===this.lazyloading&&this.lazyOpenModal(this.modalContainer),document.querySelectorAll("."+this.openButtonClass).forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),n.modalContainer.style.display=n.containerDisplayStyle,n.isReediting="true"}))})),document.addEventListener("click",(e=>{if(e.target.closest(".cookie-consent-replacement")instanceof HTMLElement){const t=e.target.classList.contains(".accept")?e.target:e.target.closest(".accept");if(t instanceof HTMLElement){let o=this.getCookie(),i=null!==o?o.getOptions():[];i.push(t.getAttribute("data-identifier")),n.setConsentCookie(i,e),n.replaceConsentButtons(t.getAttribute("data-identifier"))}}})),this.modalForm.querySelectorAll(".option").forEach((function(e){e.addEventListener("change",(function(){const e=this,t=n.modalForm.querySelector('.cookieoptions[data-parent="#'+this.id+'"]');t.querySelectorAll('input[type="checkbox"]').forEach((function(t){t.checked=e.checked})),n.updateParentOptionState(t)}))})),this.modalForm.querySelectorAll('.cookieoptions input[type="checkbox"]').forEach((function(e){e.addEventListener("change",(function(){const e=this.closest(".cookieoptions");e instanceof Element&&n.updateParentOptionState(e)}))}))},lazyOpenModal:function(e){const t=this;let n=null;0<this.lazyloadingTimeout&&(n=setTimeout((function(){t.openModal(e)}),this.lazyloadingTimeout));const o=function(){t.openModal(e),clearTimeout(n),t.lazyloadingEvents.forEach((function(e){document.removeEventListener(e,o)}))};this.lazyloadingEvents.forEach((function(e){document.addEventListener(e,o)}))},replaceConsentButtonsForAcceptedCookies:function(){this.getCookie().getOptions().forEach((e=>this.replaceConsentButtons(e)))},replaceConsentButtons:function(e){const t=this;document.querySelectorAll(".cookie-consent-replacement .accept").forEach((function(n){const o=n.closest(".cookie-consent-replacement"),i=document.createElement("textarea"),a=document.createElement("div");if(e===n.getAttribute("data-identifier")){if(i.innerHTML=o.getAttribute("data-replacement"),a.innerHTML=i.innerText,Array.prototype.slice.call(a.children).forEach((function(e){o.parentNode.appendChild(e),o.parentNode.insertBefore(e,o)})),!0===o.hasAttribute("data-scripts")){const e=JSON.parse(o.getAttribute("data-scripts"));for(let n in e){let o,i,a=!1,s=!1;"string"==typeof n&&(i=n),"string"==typeof e[n]?o=e[n]:(o=e[n].src,a=e[n].async,s=e[n].defer),-1===t.consentScripts.indexOf(o)&&(t.consentScripts.push(o),t.addScript(o,a,s,i))}}o.parentNode.removeChild(o)}}))},addScript:function(e,t,n,o){const i=document.createElement("script");i.async=t,i.defer=n,"string"==typeof o&&(i.onload=i.onreadystatechange=function(e,t){(t||!this.readyState||/loaded|complete/.test(this.readyState))&&(this.onload=null,this.onreadystatechange=null,t||window.dispatchEvent(new CustomEvent(o)))}),i.src=e,document.body.appendChild(i)},registerButtonEvents:function(e){const t=this,n=e.querySelector(".show-details");null!==this.selectAllButton&&this.selectAllButton.addEventListener("click",(function(e){t.isSelectAll=!0,t.isDeny=!1,t.toggleFormDisabledState(!0),t.modalForm.querySelectorAll('input[type="checkbox"]').forEach((function(e){e.checked=!0})),"undefined"!=typeof URLSearchParams?(e.preventDefault(),t.submitForm()):t.fallbackSubmitForm()})),null!==this.saveButton&&this.saveButton.addEventListener("click",(function(e){t.isSelectAll=!1,t.isDeny=!1,"undefined"!=typeof URLSearchParams?(e.preventDefault(),t.toggleFormDisabledState(!0),t.submitForm()):t.fallbackSubmitForm()})),null!==this.denyButton&&this.denyButton.addEventListener("click",(function(e){t.isSelectAll=!1,t.isDeny=!0,t.toggleFormDisabledState(!0),t.modalForm.querySelectorAll('input[type="checkbox"]:not(.option-necessary)').forEach((function(e){e.checked=!1})),"undefined"!=typeof URLSearchParams?(e.preventDefault(),t.toggleFormDisabledState(!0),t.submitForm(),t.reloadOnReeditDeny&&t.isReediting&&window.location.reload()):t.fallbackSubmitForm()})),null!==n&&n.addEventListener("click",(function(n){n.preventDefault(),t.toggleModalDetails(e)}))},toggleModalDetails:function(e){e.querySelectorAll(this.detailsOpenContainerSelector).forEach((function(e){e.classList.toggle("open")}))},openModalDetails:function(e){e.querySelectorAll(this.detailsOpenContainerSelector).forEach((function(e){e.classList.add("open")}))},closeModalDetails:function(e){e.querySelectorAll(this.detailsOpenContainerSelector).forEach((function(e){e.classList.remove("open")}))},hasCookie:function(){return null!==this.getCookie()&&this.getCookie()instanceof Object},hasConsent:function(){return!0===this.hasCookie()&&!0===this.getCookie().getConsent()},getCookie:function(){const e=this,t=document.cookie.match("(^|[^;]+)\\s*"+this.cookieName+"\\s*=\\s*([^;]+)");let n=null;try{n=null!==t?JSON.parse(decodeURIComponent(t.pop())):null}catch(e){return null}return null!==n&&(n.hasOption=function(t){return null===e.currentLanguageCode?0<=this.options.indexOf(t):e.currentLanguageCode in this.languageOptions&&0<=this.languageOptions[e.currentLanguageCode].indexOf(t)},n.getOptions=function(){return null===e.currentLanguageCode?this.options:e.currentLanguageCode in this.languageOptions?this.languageOptions[e.currentLanguageCode]:[]},n.getConsent=function(){return null===e.currentLanguageCode?this.consent:e.currentLanguageCode in this.languageConsent&&this.languageConsent[e.currentLanguageCode]}),n},submitForm:function(){const e=this;this.setXhrSubmit(this.modalForm,!0),setTimeout((function(){e.closeModal(e.modalContainer)}),200);try{const t=new FormData;this.modalForm.querySelectorAll("input").forEach((function(e){!1!==e.disabled||"checkbox"===e.type&&!0!==e.checked||t.append(e.name,e.value)}));const n=new URLSearchParams,o=t.entries();let i=o.next();for(;!1===i.done;)n.append(i.value[0],i.value[1]),i=o.next();!0===this.isDeny?n.append(this.modalForm.querySelector(".deny").getAttribute("name"),"1"):!0===this.isSelectAll&&n.append(this.modalForm.querySelector(".select-all").getAttribute("name"),"1"),fetch(this.modalForm.getAttribute("action"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n}).then((function(t){if(200!==t.status)throw new Error("xhr request failed: "+t.status+' - reason: "'+t.statusText+'"');e.isSelectAll=!1,e.toggleFormDisabledState(!1)})).catch((function(t){e.toggleFormDisabledState(!1),console.error(t)}))}catch(t){e.toggleFormDisabledState(!1),console.error(t)}this.setConsentCookie()},fallbackSubmitForm:function(){if(this.setXhrSubmit(this.modalForm,!1),!0===this.isSelectAll){const e=document.createElement("input");e.type="hidden",e.name=this.modalForm.querySelector(".select-all").getAttribute("name"),e.value="1",this.modalForm.appendChild(e)}this.setConsentCookie()},setConsentCookie:function(e,n){const o=new Date;o.setDate(o.getDate()+this.expiryDays),!1===Array.isArray(e)&&(e=[],this.modalForm.querySelectorAll('input[type="checkbox"]').forEach((function(t){null!==t.getAttribute("data-identifier")&&!0===t.checked&&e.push(t.getAttribute("data-identifier"))})));let i={};null===this.currentLanguageCode?(i.consent=!0,i.options=e):(i.languageConsent={},i.languageOptions={},!0===this.hasCookie()&&("languageOptions"in this.getCookie()&&(i.languageOptions=this.getCookie().languageOptions),"languageConsent"in this.getCookie()&&(i.languageConsent=this.getCookie().languageConsent)),i.languageConsent[this.currentLanguageCode]=!0,i.languageOptions[this.currentLanguageCode]=e),document.cookie=this.cookieName+"="+encodeURI(JSON.stringify(i))+";expires="+o.toUTCString()+";samesite=strict;path=/",!0===this.pushConsentToTagManager&&t({event:"cookieConsent",options:e}),this.consentEventDispatch(n)},setXhrSubmit:function(e,t){null!==e&&(e.querySelector(".is-ajax").value=!0===t?1:0)},toggleFormDisabledState:function(e){null!==this.selectAllButton&&(this.selectAllButton.disabled=e),this.saveButton.disabled=e,this.modalForm.querySelectorAll('input[type="checkbox"]:not(.option-necessary)').forEach((function(t){t.disabled=e}))},isModalOpen:function(e){return e.style.display===this.containerDisplayStyle},openModal:function(e){e.style.display=this.containerDisplayStyle,this.closeModalDetails(e)},closeModal:function(e){e.style.display="none",this.closeModalDetails(e)},consentEventDispatch:function(e){const n=this;let o,i={};if(Object.values(this.consentMode).forEach((e=>e.forEach((e=>i[e]="denied")))),void 0!==e&&(o=e.target.closest(".cookie-consent-replacement").parentNode),!1===this.hasCookie())throw new Error("Can't do event dispatch if the necessary cookie hasn't been set");window[this.consentVariableName]=this.getCookie(),window.dispatchEvent(new CustomEvent("cookieConsent",{detail:this.getCookie()})),this.modalForm.querySelectorAll('input[type="checkbox"]').forEach((function(e){!0===n.getCookie().hasOption(e.getAttribute("data-identifier"))&&(e.checked=!0)})),this.modalForm.querySelectorAll(".cookieoptions").forEach((function(e){n.updateParentOptionState(e)})),this.getCookie().getOptions().forEach((function(e){n.replaceConsentButtons(e),e in n.consentMode&&n.consentMode[e].forEach((e=>i[e]="granted"))})),Object.keys(i).length>0&&t("consent","update",i),window.dispatchEvent(new CustomEvent("cookieConsentButtonsReplaced",{detail:Object.assign({originalEvent:e,parentElement:o},this.getCookie())}))},updateParentOptionState:function(e){const t=this.modalForm.querySelector(e.getAttribute("data-parent")),n=t.closest(".label"),o=e.querySelectorAll('input[type="checkbox"]'),i=e.querySelectorAll('input[type="checkbox"]:checked');0===i.length?(n.classList.remove("partially-checked"),t.checked=!1):o.length===i.length?(n.classList.remove("partially-checked"),t.checked=!0):(n.classList.add("partially-checked"),t.checked=!1)}};document.addEventListener("DOMContentLoaded",(function(){try{n.init(e)}catch(e){console.error("Cookie Consent: "+e)}}))}("object"==typeof cookieConsentConfiguration?cookieConsentConfiguration:{})}();
/*!
 * typeahead.js 1.1.1
 * https://github.com/twitter/typeahead.js
 * Copyright 2013-2017 Twitter, Inc. and other contributors; Licensed MIT
 */
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return a.Bloodhound=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):a.Bloodhound=b(a.jQuery)}(this,function(a){var b=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},isElement:function(a){return!(!a||1!==a.nodeType)},isJQuery:function(b){return b instanceof a},toStr:function(a){return b.isUndefined(a)||null===a?"":a+""},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){if(!(d=c.call(null,e,a,b)))return!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){if(d=c.call(null,e,a,b))return!1}),!!d):d},mixin:a.extend,identity:function(a){return a},clone:function(b){return a.extend(!0,{},b)},getIdGenerator:function(){var a=0;return function(){return a++}},templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,j<=0?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},stringify:function(a){return b.isString(a)?a:JSON.stringify(a)},guid:function(){function a(a){var b=(Math.random().toString(16)+"000000000").substr(2,8);return a?"-"+b.substr(0,4)+"-"+b.substr(4,4):b}return"tt-"+a()+a(!0)+a(!0)+a()},noop:function(){}}}(),c="1.1.1",d=function(){"use strict";function a(a){return a=b.toStr(a),a?a.split(/\s+/):[]}function c(a){return a=b.toStr(a),a?a.split(/\W+/):[]}function d(a){a=b.toStr(a);var c=[],d="";return b.each(a.split(""),function(a){a.match(/\s+/)?d="":(c.push(d+a),d+=a)}),c}function e(a){return function(c){return c=b.isArray(c)?c:[].slice.call(arguments,0),function(d){var e=[];return b.each(c,function(c){e=e.concat(a(b.toStr(d[c])))}),e}}}return{nonword:c,whitespace:a,ngram:d,obj:{nonword:e(c),whitespace:e(a),ngram:e(d)}}}(),e=function(){"use strict";function c(c){this.maxSize=b.isNumber(c)?c:100,this.reset(),this.maxSize<=0&&(this.set=this.get=a.noop)}function d(){this.head=this.tail=null}function e(a,b){this.key=a,this.val=b,this.prev=this.next=null}return b.mixin(c.prototype,{set:function(a,b){var c,d=this.list.tail;this.size>=this.maxSize&&(this.list.remove(d),delete this.hash[d.key],this.size--),(c=this.hash[a])?(c.val=b,this.list.moveToFront(c)):(c=new e(a,b),this.list.add(c),this.hash[a]=c,this.size++)},get:function(a){var b=this.hash[a];if(b)return this.list.moveToFront(b),b.val},reset:function(){this.size=0,this.hash={},this.list=new d}}),b.mixin(d.prototype,{add:function(a){this.head&&(a.next=this.head,this.head.prev=a),this.head=a,this.tail=this.tail||a},remove:function(a){a.prev?a.prev.next=a.next:this.head=a.next,a.next?a.next.prev=a.prev:this.tail=a.prev},moveToFront:function(a){this.remove(a),this.add(a)}}),c}(),f=function(){"use strict";function c(a,c){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+b.escapeRegExChars(this.prefix)),this.ls=c||h,!this.ls&&this._noop()}function d(){return(new Date).getTime()}function e(a){return JSON.stringify(b.isUndefined(a)?null:a)}function f(b){return a.parseJSON(b)}function g(a){var b,c,d=[],e=h.length;for(b=0;b<e;b++)(c=h.key(b)).match(a)&&d.push(c.replace(a,""));return d}var h;try{h=window.localStorage,h.setItem("~~~","!"),h.removeItem("~~~")}catch(a){h=null}return b.mixin(c.prototype,{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=b.noop},_safeSet:function(a,b){try{this.ls.setItem(a,b)}catch(a){"QuotaExceededError"===a.name&&(this.clear(),this._noop())}},get:function(a){return this.isExpired(a)&&this.remove(a),f(this.ls.getItem(this._prefix(a)))},set:function(a,c,f){return b.isNumber(f)?this._safeSet(this._ttlKey(a),e(d()+f)):this.ls.removeItem(this._ttlKey(a)),this._safeSet(this._prefix(a),e(c))},remove:function(a){return this.ls.removeItem(this._ttlKey(a)),this.ls.removeItem(this._prefix(a)),this},clear:function(){var a,b=g(this.keyMatcher);for(a=b.length;a--;)this.remove(b[a]);return this},isExpired:function(a){var c=f(this.ls.getItem(this._ttlKey(a)));return!!(b.isNumber(c)&&d()>c)}}),c}(),g=function(){"use strict";function c(a){a=a||{},this.maxPendingRequests=a.maxPendingRequests||6,this.cancelled=!1,this.lastReq=null,this._send=a.transport,this._get=a.limiter?a.limiter(this._get):this._get,this._cache=a.cache===!1?new e(0):g}var d=0,f={},g=new e(10);return c.setMaxPendingRequests=function(a){this.maxPendingRequests=a},c.resetCache=function(){g.reset()},b.mixin(c.prototype,{_fingerprint:function(b){return b=b||{},b.url+b.type+a.param(b.data||{})},_get:function(a,b){function c(a){b(null,a),j._cache.set(h,a)}function e(){b(!0)}function g(){d--,delete f[h],j.onDeckRequestArgs&&(j._get.apply(j,j.onDeckRequestArgs),j.onDeckRequestArgs=null)}var h,i,j=this;h=this._fingerprint(a),this.cancelled||h!==this.lastReq||((i=f[h])?i.done(c).fail(e):d<this.maxPendingRequests?(d++,f[h]=this._send(a).done(c).fail(e).always(g)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(c,d){var e,f;d=d||a.noop,c=b.isString(c)?{url:c}:c||{},f=this._fingerprint(c),this.cancelled=!1,this.lastReq=f,(e=this._cache.get(f))?d(null,e):this._get(c,d)},cancel:function(){this.cancelled=!0}}),c}(),h=window.SearchIndex=function(){"use strict";function c(c){c=c||{},c.datumTokenizer&&c.queryTokenizer||a.error("datumTokenizer and queryTokenizer are both required"),this.identify=c.identify||b.stringify,this.datumTokenizer=c.datumTokenizer,this.queryTokenizer=c.queryTokenizer,this.matchAnyQueryToken=c.matchAnyQueryToken,this.reset()}function d(a){return a=b.filter(a,function(a){return!!a}),a=b.map(a,function(a){return a.toLowerCase()})}function e(){var a={};return a[i]=[],a[h]={},a}function f(a){for(var b={},c=[],d=0,e=a.length;d<e;d++)b[a[d]]||(b[a[d]]=!0,c.push(a[d]));return c}function g(a,b){var c=0,d=0,e=[];a=a.sort(),b=b.sort();for(var f=a.length,g=b.length;c<f&&d<g;)a[c]<b[d]?c++:a[c]>b[d]?d++:(e.push(a[c]),c++,d++);return e}var h="c",i="i";return b.mixin(c.prototype,{bootstrap:function(a){this.datums=a.datums,this.trie=a.trie},add:function(a){var c=this;a=b.isArray(a)?a:[a],b.each(a,function(a){var f,g;c.datums[f=c.identify(a)]=a,g=d(c.datumTokenizer(a)),b.each(g,function(a){var b,d,g;for(b=c.trie,d=a.split("");g=d.shift();)b=b[h][g]||(b[h][g]=e()),b[i].push(f)})})},get:function(a){var c=this;return b.map(a,function(a){return c.datums[a]})},search:function(a){var c,e,j=this;return c=d(this.queryTokenizer(a)),b.each(c,function(a){var b,c,d,f;if(e&&0===e.length&&!j.matchAnyQueryToken)return!1;for(b=j.trie,c=a.split("");b&&(d=c.shift());)b=b[h][d];if(b&&0===c.length)f=b[i].slice(0),e=e?g(e,f):f;else if(!j.matchAnyQueryToken)return e=[],!1}),e?b.map(f(e),function(a){return j.datums[a]}):[]},all:function(){var a=[];for(var b in this.datums)a.push(this.datums[b]);return a},reset:function(){this.datums={},this.trie=e()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),c}(),i=function(){"use strict";function a(a){this.url=a.url,this.ttl=a.ttl,this.cache=a.cache,this.prepare=a.prepare,this.transform=a.transform,this.transport=a.transport,this.thumbprint=a.thumbprint,this.storage=new f(a.cacheKey)}var c;return c={data:"data",protocol:"protocol",thumbprint:"thumbprint"},b.mixin(a.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(a){this.cache&&(this.storage.set(c.data,a,this.ttl),this.storage.set(c.protocol,location.protocol,this.ttl),this.storage.set(c.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var a,b={};return this.cache?(b.data=this.storage.get(c.data),b.protocol=this.storage.get(c.protocol),b.thumbprint=this.storage.get(c.thumbprint),a=b.thumbprint!==this.thumbprint||b.protocol!==location.protocol,b.data&&!a?b.data:null):null},fromNetwork:function(a){function b(){a(!0)}function c(b){a(null,e.transform(b))}var d,e=this;a&&(d=this.prepare(this._settings()),this.transport(d).fail(b).done(c))},clear:function(){return this.storage.clear(),this}}),a}(),j=function(){"use strict";function a(a){this.url=a.url,this.prepare=a.prepare,this.transform=a.transform,this.indexResponse=a.indexResponse,this.transport=new g({cache:a.cache,limiter:a.limiter,transport:a.transport,maxPendingRequests:a.maxPendingRequests})}return b.mixin(a.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(a,b){function c(a,c){b(a?[]:e.transform(c))}var d,e=this;if(b)return a=a||"",d=this.prepare(a,this._settings()),this.transport.get(d,c)},cancelLastRequest:function(){this.transport.cancel()}}),a}(),k=function(){"use strict";function d(d){var e;return d?(e={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:b.identity,transform:b.identity,transport:null},d=b.isString(d)?{url:d}:d,d=b.mixin(e,d),!d.url&&a.error("prefetch requires url to be set"),d.transform=d.filter||d.transform,d.cacheKey=d.cacheKey||d.url,d.thumbprint=c+d.thumbprint,d.transport=d.transport?h(d.transport):a.ajax,d):null}function e(c){var d;if(c)return d={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:b.identity,transport:null},c=b.isString(c)?{url:c}:c,c=b.mixin(d,c),!c.url&&a.error("remote requires url to be set"),c.transform=c.filter||c.transform,c.prepare=f(c),c.limiter=g(c),c.transport=c.transport?h(c.transport):a.ajax,delete c.replace,delete c.wildcard,delete c.rateLimitBy,delete c.rateLimitWait,c}function f(a){function b(a,b){return b.url=f(b.url,a),b}function c(a,b){return b.url=b.url.replace(g,encodeURIComponent(a)),b}function d(a,b){return b}var e,f,g;return e=a.prepare,f=a.replace,g=a.wildcard,e?e:e=f?b:a.wildcard?c:d}function g(a){function c(a){return function(c){return b.debounce(c,a)}}function d(a){return function(c){return b.throttle(c,a)}}var e,f,g;return e=a.limiter,f=a.rateLimitBy,g=a.rateLimitWait,e||(e=/^throttle$/i.test(f)?d(g):c(g)),e}function h(c){return function(d){function e(a){b.defer(function(){g.resolve(a)})}function f(a){b.defer(function(){g.reject(a)})}var g=a.Deferred();return c(d,e,f),g}}return function(c){var f,g;return f={initialize:!0,identify:b.stringify,datumTokenizer:null,queryTokenizer:null,matchAnyQueryToken:!1,sufficient:5,indexRemote:!1,sorter:null,local:[],prefetch:null,remote:null},c=b.mixin(f,c||{}),!c.datumTokenizer&&a.error("datumTokenizer is required"),!c.queryTokenizer&&a.error("queryTokenizer is required"),g=c.sorter,c.sorter=g?function(a){return a.sort(g)}:b.identity,c.local=b.isFunction(c.local)?c.local():c.local,c.prefetch=d(c.prefetch),c.remote=e(c.remote),c}}(),l=function(){"use strict";function c(a){a=k(a),this.sorter=a.sorter,this.identify=a.identify,this.sufficient=a.sufficient,this.indexRemote=a.indexRemote,this.local=a.local,this.remote=a.remote?new j(a.remote):null,this.prefetch=a.prefetch?new i(a.prefetch):null,this.index=new h({identify:this.identify,datumTokenizer:a.datumTokenizer,queryTokenizer:a.queryTokenizer}),a.initialize!==!1&&this.initialize()}var e;return e=window&&window.Bloodhound,c.noConflict=function(){return window&&(window.Bloodhound=e),c},c.tokenizers=d,b.mixin(c.prototype,{__ttAdapter:function(){function a(a,b,d){return c.search(a,b,d)}function b(a,b){return c.search(a,b)}var c=this;return this.remote?a:b},_loadPrefetch:function(){function b(a,b){return a?c.reject():(e.add(b),e.prefetch.store(e.index.serialize()),void c.resolve())}var c,d,e=this;return c=a.Deferred(),this.prefetch?(d=this.prefetch.fromCache())?(this.index.bootstrap(d),c.resolve()):this.prefetch.fromNetwork(b):c.resolve(),c.promise()},_initialize:function(){function a(){b.add(b.local)}var b=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(a),this.initPromise},initialize:function(a){return!this.initPromise||a?this._initialize():this.initPromise},add:function(a){return this.index.add(a),this},get:function(a){return a=b.isArray(a)?a:[].slice.call(arguments),this.index.get(a)},search:function(a,c,d){function e(a){var c=[];b.each(a,function(a){!b.some(f,function(b){return g.identify(a)===g.identify(b)})&&c.push(a)}),g.indexRemote&&g.add(c),d(c)}var f,g=this;return c=c||b.noop,d=d||b.noop,f=this.sorter(this.index.search(a)),c(this.remote?f.slice():f),this.remote&&f.length<this.sufficient?this.remote.get(a,e):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return g.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),c}();return l}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){var b=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},isElement:function(a){return!(!a||1!==a.nodeType)},isJQuery:function(b){return b instanceof a},toStr:function(a){return b.isUndefined(a)||null===a?"":a+""},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){if(!(d=c.call(null,e,a,b)))return!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){if(d=c.call(null,e,a,b))return!1}),!!d):d},mixin:a.extend,identity:function(a){return a},clone:function(b){return a.extend(!0,{},b)},getIdGenerator:function(){var a=0;return function(){return a++}},templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,j<=0?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},stringify:function(a){return b.isString(a)?a:JSON.stringify(a)},guid:function(){function a(a){var b=(Math.random().toString(16)+"000000000").substr(2,8);return a?"-"+b.substr(0,4)+"-"+b.substr(4,4):b}return"tt-"+a()+a(!0)+a(!0)+a()},noop:function(){}}}(),c=function(){"use strict";function a(a){var g,h;return h=b.mixin({},f,a),g={css:e(),classes:h,html:c(h),selectors:d(h)},{css:g.css,html:g.html,classes:g.classes,selectors:g.selectors,mixin:function(a){b.mixin(a,g)}}}function c(a){return{wrapper:'<span class="'+a.wrapper+'"></span>',menu:'<div role="listbox" class="'+a.menu+'"></div>'}}function d(a){var c={};return b.each(a,function(a,b){c[b]="."+a}),c}function e(){var a={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return b.isMsie()&&b.mixin(a.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),a}var f={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return a}(),d=function(){"use strict";function c(b){b&&b.el||a.error("EventBus initialized without el"),this.$el=a(b.el)}var d,e;return d="typeahead:",e={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},b.mixin(c.prototype,{_trigger:function(b,c){var e=a.Event(d+b);return this.$el.trigger.call(this.$el,e,c||[]),e},before:function(a){var b,c;return b=[].slice.call(arguments,1),c=this._trigger("before"+a,b),c.isDefaultPrevented()},trigger:function(a){var b;this._trigger(a,[].slice.call(arguments,1)),(b=e[a])&&this._trigger(b,[].slice.call(arguments,1))}}),c}(),e=function(){"use strict";function a(a,b,c,d){var e;if(!c)return this;for(b=b.split(i),c=d?h(c,d):c,this._callbacks=this._callbacks||{};e=b.shift();)this._callbacks[e]=this._callbacks[e]||{sync:[],async:[]},this._callbacks[e][a].push(c);return this}function b(b,c,d){return a.call(this,"async",b,c,d)}function c(b,c,d){return a.call(this,"sync",b,c,d)}function d(a){var b;if(!this._callbacks)return this;for(a=a.split(i);b=a.shift();)delete this._callbacks[b];return this}function e(a){var b,c,d,e,g;if(!this._callbacks)return this;for(a=a.split(i),d=[].slice.call(arguments,1);(b=a.shift())&&(c=this._callbacks[b]);)e=f(c.sync,this,[b].concat(d)),g=f(c.async,this,[b].concat(d)),e()&&j(g);return this}function f(a,b,c){function d(){for(var d,e=0,f=a.length;!d&&e<f;e+=1)d=a[e].apply(b,c)===!1;return!d}return d}function g(){var a;return a=window.setImmediate?function(a){setImmediate(function(){a()})}:function(a){setTimeout(function(){a()},0)}}function h(a,b){return a.bind?a.bind(b):function(){a.apply(b,[].slice.call(arguments,0))}}var i=/\s+/,j=g();return{onSync:c,onAsync:b,off:d,trigger:e}}(),f=function(a){"use strict";function c(a){return f[a.toUpperCase()]||a}function d(a,d,e,f){for(var g,h=[],i=0,j=a.length;i<j;i++){var k=b.escapeRegExChars(a[i]);f&&(k=k.replace(/\S/g,c)),h.push(k)}return g=e?"\\b("+h.join("|")+")\\b":"("+h.join("|")+")",d?new RegExp(g):new RegExp(g,"i")}var e={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1,diacriticInsensitive:!1},f={A:"[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Ａａ]",B:"[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Ｂｂ]",C:"[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Ｃｃ]",D:"[DdĎďǄ-ǆǱ-ǳᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Ｄｄ]",E:"[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ｅｅ]",F:"[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ﬀ-ﬄＦｆ]",G:"[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Ｇｇ]",H:"[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Ｈｈ]",I:"[IiÌ-Ïì-ïĨ-İĲĳǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕ﬁﬃＩｉ]",J:"[JjĲ-ĵǇ-ǌǰʲᴶⅉ⒥ⒿⓙⱼＪｊ]",K:"[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Ｋｋ]",L:"[LlĹ-ŀǇ-ǉˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿ﬂﬄＬｌ]",M:"[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Ｍｍ]",N:"[NnÑñŃ-ŉǊ-ǌǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Ｎｎ]",O:"[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Ｏｏ]",P:"[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Ｐｐ]",Q:"[Qqℚ⒬Ⓠⓠ㏃Ｑｑ]",R:"[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Ｒｒ]",S:"[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜ﬆＳｓ]",T:"[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ﬅﬆＴｔ]",U:"[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Ｕｕ]",V:"[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Ｖｖ]",W:"[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ｗｗ]",X:"[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Ｘｘ]",Y:"[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Ｙｙ]",Z:"[ZzŹ-žǱ-ǳᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Ｚｚ]"};return function(c){function f(b){var d,e,f;return(d=h.exec(b.data))&&(f=a.createElement(c.tagName),c.className&&(f.className=c.className),e=b.splitText(d.index),e.splitText(d[0].length),f.appendChild(e.cloneNode(!0)),b.parentNode.replaceChild(f,e)),!!d}function g(a,b){for(var c,d=3,e=0;e<a.childNodes.length;e++)c=a.childNodes[e],c.nodeType===d?e+=b(c)?1:0:g(c,b)}var h;c=b.mixin({},e,c),c.node&&c.pattern&&(c.pattern=b.isArray(c.pattern)?c.pattern:[c.pattern],h=d(c.pattern,c.caseSensitive,c.wordsOnly,c.diacriticInsensitive),g(c.node,f))}}(window.document),g=function(){"use strict";function c(c,e){c=c||{},c.input||a.error("input is missing"),e.mixin(this),this.$hint=a(c.hint),this.$input=a(c.input),this.$input.attr({"aria-activedescendant":"","aria-owns":this.$input.attr("id")+"_listbox",role:"combobox","aria-readonly":"true","aria-autocomplete":"list"}),a(e.menu).attr("id",this.$input.attr("id")+"_listbox"),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=d(this.$input),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=b.noop),this.onSync("cursorchange",this._updateDescendent)}function d(b){return a('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:b.css("font-family"),fontSize:b.css("font-size"),fontStyle:b.css("font-style"),fontVariant:b.css("font-variant"),fontWeight:b.css("font-weight"),wordSpacing:b.css("word-spacing"),letterSpacing:b.css("letter-spacing"),textIndent:b.css("text-indent"),textRendering:b.css("text-rendering"),textTransform:b.css("text-transform")}).insertAfter(b)}function f(a,b){return c.normalizeQuery(a)===c.normalizeQuery(b)}function g(a){return a.altKey||a.ctrlKey||a.metaKey||a.shiftKey}var h;return h={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},c.normalizeQuery=function(a){return b.toStr(a).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},b.mixin(c.prototype,e,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(a){var b=h[a.which||a.keyCode];this._managePreventDefault(b,a),b&&this._shouldTrigger(b,a)&&this.trigger(b+"Keyed",a)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(a,b){var c;switch(a){case"up":case"down":c=!g(b);break;default:c=!1}c&&b.preventDefault()},_shouldTrigger:function(a,b){var c;switch(a){case"tab":c=!g(b);break;default:c=!0}return c},_checkLanguageDirection:function(){var a=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==a&&(this.dir=a,this.$hint.attr("dir",a),this.trigger("langDirChanged",a))},_setQuery:function(a,b){var c,d;c=f(a,this.query),d=!!c&&this.query.length!==a.length,this.query=a,b||c?!b&&d&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},_updateDescendent:function(a,b){this.$input.attr("aria-activedescendant",b)},bind:function(){var a,c,d,e,f=this;return a=b.bind(this._onBlur,this),c=b.bind(this._onFocus,this),d=b.bind(this._onKeydown,this),e=b.bind(this._onInput,this),this.$input.on("blur.tt",a).on("focus.tt",c).on("keydown.tt",d),!b.isMsie()||b.isMsie()>9?this.$input.on("input.tt",e):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(a){h[a.which||a.keyCode]||b.defer(b.bind(f._onInput,f,a))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(a,b){this.setInputValue(a),this._setQuery(a,b)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(a){this.$input.val(a),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(a){this.$hint.val(a)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var a,b,c,d;a=this.getInputValue(),b=this.getHint(),c=a!==b&&0===b.indexOf(a),d=""!==a&&c&&!this.hasOverflow(),!d&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var a=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=a},isCursorAtEnd:function(){var a,c,d;return a=this.$input.val().length,c=this.$input[0].selectionStart,b.isNumber(c)?c===a:!document.selection||(d=document.selection.createRange(),d.moveStart("character",-a),a===d.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=a("<div>")}}),c}(),h=function(){"use strict";function c(c,e){c=c||{},c.templates=c.templates||{},c.templates.notFound=c.templates.notFound||c.templates.empty,c.source||a.error("missing source"),c.node||a.error("missing node"),c.name&&!h(c.name)&&a.error("invalid dataset name: "+c.name),e.mixin(this),this.highlight=!!c.highlight,this.name=b.toStr(c.name||j()),this.limit=c.limit||5,this.displayFn=d(c.display||c.displayKey),this.templates=g(c.templates,this.displayFn),this.source=c.source.__ttAdapter?c.source.__ttAdapter():c.source,this.async=b.isUndefined(c.async)?this.source.length>2:!!c.async,this._resetLastSuggestion(),this.$el=a(c.node).attr("role","presentation").addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function d(a){function c(b){return b[a]}return a=a||b.stringify,b.isFunction(a)?a:c}function g(c,d){function e(c){return a('<div role="option">').attr("id",b.guid()).text(d(c))}return{notFound:c.notFound&&b.templatify(c.notFound),pending:c.pending&&b.templatify(c.pending),header:c.header&&b.templatify(c.header),footer:c.footer&&b.templatify(c.footer),suggestion:c.suggestion||e}}function h(a){return/^[_a-zA-Z0-9-]+$/.test(a)}var i,j;return i={dataset:"tt-selectable-dataset",val:"tt-selectable-display",obj:"tt-selectable-object"},j=b.getIdGenerator(),c.extractData=function(b){var c=a(b);return c.data(i.obj)?{dataset:c.data(i.dataset)||"",val:c.data(i.val)||"",obj:c.data(i.obj)||null}:null},b.mixin(c.prototype,e,{_overwrite:function(a,b){b=b||[],b.length?this._renderSuggestions(a,b):this.async&&this.templates.pending?this._renderPending(a):!this.async&&this.templates.notFound?this._renderNotFound(a):this._empty(),this.trigger("rendered",b,!1,this.name)},_append:function(a,b){b=b||[],b.length&&this.$lastSuggestion.length?this._appendSuggestions(a,b):b.length?this._renderSuggestions(a,b):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(a),this.trigger("rendered",b,!0,this.name)},_renderSuggestions:function(a,b){var c;c=this._getSuggestionsFragment(a,b),this.$lastSuggestion=c.children().last(),this.$el.html(c).prepend(this._getHeader(a,b)).append(this._getFooter(a,b))},_appendSuggestions:function(a,b){var c,d;c=this._getSuggestionsFragment(a,b),d=c.children().last(),this.$lastSuggestion.after(c),this.$lastSuggestion=d},_renderPending:function(a){var b=this.templates.pending;this._resetLastSuggestion(),b&&this.$el.html(b({query:a,dataset:this.name}))},_renderNotFound:function(a){var b=this.templates.notFound;this._resetLastSuggestion(),b&&this.$el.html(b({query:a,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(c,d){var e,g=this;return e=document.createDocumentFragment(),b.each(d,function(b){var d,f;f=g._injectQuery(c,b),d=a(g.templates.suggestion(f)).data(i.dataset,g.name).data(i.obj,b).data(i.val,g.displayFn(b)).addClass(g.classes.suggestion+" "+g.classes.selectable),e.appendChild(d[0])}),this.highlight&&f({className:this.classes.highlight,node:e,pattern:c}),a(e)},_getFooter:function(a,b){return this.templates.footer?this.templates.footer({query:a,suggestions:b,dataset:this.name}):null},_getHeader:function(a,b){return this.templates.header?this.templates.header({query:a,suggestions:b,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=a()},_injectQuery:function(a,c){return b.isObject(c)?b.mixin({_query:a},c):c},update:function(b){function c(a){g||(g=!0,a=(a||[]).slice(0,e.limit),h=a.length,e._overwrite(b,a),h<e.limit&&e.async&&e.trigger("asyncRequested",b,e.name))}function d(c){if(c=c||[],!f&&h<e.limit){e.cancel=a.noop;var d=Math.abs(h-e.limit);h+=d,e._append(b,c.slice(0,d)),e.async&&e.trigger("asyncReceived",b,e.name)}}var e=this,f=!1,g=!1,h=0;this.cancel(),this.cancel=function(){f=!0,e.cancel=a.noop,e.async&&e.trigger("asyncCanceled",b,e.name)},this.source(b,c,d),!g&&c([])},cancel:a.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=a("<div>")}}),c}(),i=function(){"use strict";function c(c,d){function e(b){var c=f.$node.find(b.node).first();return b.node=c.length?c:a("<div>").appendTo(f.$node),new h(b,d)}var f=this;c=c||{},c.node||a.error("node is required"),d.mixin(this),this.$node=a(c.node),this.query=null,this.datasets=b.map(c.datasets,e)}return b.mixin(c.prototype,e,{_onSelectableClick:function(b){this.trigger("selectableClicked",a(b.currentTarget))},_onRendered:function(a,b,c,d){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",b,c,d)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return b.every(this.datasets,b.bind(function(a){var b=a.isEmpty();return this.$node.attr("aria-expanded",!b),b},this))},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var a=this.getActiveSelectable();a&&a.removeClass(this.classes.cursor)},_ensureVisible:function(a){var b,c,d,e;b=a.position().top,c=b+a.outerHeight(!0),d=this.$node.scrollTop(),e=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),b<0?this.$node.scrollTop(d+b):e<c&&this.$node.scrollTop(d+(c-e))},bind:function(){var c,d=this;return c=b.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,c),this.$node.on("mouseover",this.selectors.selectable,function(){d.setCursor(a(this))}),this.$node.on("mouseleave",function(){d._removeCursor()}),b.each(this.datasets,function(a){a.onSync("asyncRequested",d._propagate,d).onSync("asyncCanceled",d._propagate,d).onSync("asyncReceived",d._propagate,d).onSync("rendered",d._onRendered,d).onSync("cleared",d._onCleared,d)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.scrollTop(0),this.$node.addClass(this.classes.open)},close:function(){this.$node.attr("aria-expanded",!1),this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(a){this.$node.attr("dir",a)},selectableRelativeToCursor:function(a){var b,c,d,e;return c=this.getActiveSelectable(),b=this._getSelectables(),d=c?b.index(c):-1,e=d+a,e=(e+1)%(b.length+1)-1,e=e<-1?b.length-1:e,e===-1?null:b.eq(e)},setCursor:function(a){this._removeCursor(),(a=a&&a.first())&&(a.addClass(this.classes.cursor),this._ensureVisible(a))},getSelectableData:function(a){return a&&a.length?h.extractData(a):null},getActiveSelectable:function(){var a=this._getSelectables().filter(this.selectors.cursor).first();return a.length?a:null},getTopSelectable:function(){var a=this._getSelectables().first();return a.length?a:null},update:function(a){function c(b){b.update(a)}var d=a!==this.query;return d&&(this.query=a,b.each(this.datasets,c)),d},empty:function(){function a(a){a.clear()}b.each(this.datasets,a),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){function c(a){a.destroy()}this.$node.off(".tt"),this.$node=a("<div>"),b.each(this.datasets,c)}}),c}(),j=function(){"use strict";function c(c){this.$el=a("<span></span>",{role:"status","aria-live":"polite"}).css({position:"absolute",padding:"0",border:"0",height:"1px",width:"1px","margin-bottom":"-1px","margin-right":"-1px",overflow:"hidden",clip:"rect(0 0 0 0)","white-space":"nowrap"}),c.$input.after(this.$el),b.each(c.menu.datasets,b.bind(function(a){a.onSync&&(a.onSync("rendered",b.bind(this.update,this)),a.onSync("cleared",b.bind(this.cleared,this)))},this))}return b.mixin(c.prototype,{update:function(a,b){var c,d=b.length;c=1===d?{result:"result",is:"is"}:{result:"results",is:"are"},this.$el.text(d+" "+c.result+" "+c.is+" available, use up and down arrow keys to navigate.")},cleared:function(){this.$el.text("")}}),c}(),k=function(){"use strict";function a(){i.apply(this,[].slice.call(arguments,0))}var c=i.prototype;return b.mixin(a.prototype,i.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),c.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),c.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),c._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),c._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(a){return this.$node.css("ltr"===a?this.css.ltr:this.css.rtl),c.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),a}(),l=function(){"use strict";function c(c,e){var f,g,h,i,j,k,l,m,n,o,p;c=c||{},c.input||a.error("missing input"),c.menu||a.error("missing menu"),c.eventBus||a.error("missing event bus"),e.mixin(this),this.eventBus=c.eventBus,this.minLength=b.isNumber(c.minLength)?c.minLength:1,this.input=c.input,this.menu=c.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),f=d(this,"activate","open","_onFocused"),g=d(this,"deactivate","_onBlurred"),h=d(this,"isActive","isOpen","_onEnterKeyed"),i=d(this,"isActive","isOpen","_onTabKeyed"),j=d(this,"isActive","_onEscKeyed"),k=d(this,"isActive","open","_onUpKeyed"),l=d(this,"isActive","open","_onDownKeyed"),m=d(this,"isActive","isOpen","_onLeftKeyed"),n=d(this,"isActive","isOpen","_onRightKeyed"),o=d(this,"_openIfActive","_onQueryChanged"),p=d(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",f,this).onSync("blurred",g,this).onSync("enterKeyed",h,this).onSync("tabKeyed",i,this).onSync("escKeyed",j,this).onSync("upKeyed",k,this).onSync("downKeyed",l,this).onSync("leftKeyed",m,this).onSync("rightKeyed",n,this).onSync("queryChanged",o,this).onSync("whitespaceChanged",p,this).onSync("langDirChanged",this._onLangDirChanged,this)}function d(a){var c=[].slice.call(arguments,1);return function(){var d=[].slice.call(arguments);b.each(c,function(b){return a[b].apply(a,d)})}}return b.mixin(c.prototype,{_hacks:function(){var c,d;c=this.input.$input||a("<div>"),d=this.menu.$node||a("<div>"),c.on("blur.tt",function(a){var e,f,g;e=document.activeElement,f=d.is(e),g=d.has(e).length>0,b.isMsie()&&(f||g)&&(a.preventDefault(),a.stopImmediatePropagation(),b.defer(function(){c.focus()}))}),d.on("mousedown.tt",function(a){a.preventDefault()})},_onSelectableClicked:function(a,b){this.select(b)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(a,b,c,d){this._updateHint(),this.eventBus.trigger("render",b,c,d)},_onAsyncRequested:function(a,b,c){this.eventBus.trigger("asyncrequest",c,b)},_onAsyncCanceled:function(a,b,c){this.eventBus.trigger("asynccancel",c,b)},_onAsyncReceived:function(a,b,c){this.eventBus.trigger("asyncreceive",c,b)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(a,b){var c;(c=this.menu.getActiveSelectable())&&this.select(c)&&(b.preventDefault(),b.stopPropagation())},_onTabKeyed:function(a,b){var c;(c=this.menu.getActiveSelectable())?this.select(c)&&b.preventDefault():(c=this.menu.getTopSelectable())&&this.autocomplete(c)&&b.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getActiveSelectable()||this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getActiveSelectable()||this.menu.getTopSelectable())},_onQueryChanged:function(a,b){this._minLengthMet(b)?this.menu.update(b):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(a,b){this.dir!==b&&(this.dir=b,this.menu.setLanguageDirection(b))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(a){return a=b.isString(a)?a:this.input.getQuery()||"",a.length>=this.minLength},_updateHint:function(){var a,c,d,e,f,h,i;a=this.menu.getTopSelectable(),c=this.menu.getSelectableData(a),d=this.input.getInputValue(),!c||b.isBlankString(d)||this.input.hasOverflow()?this.input.clearHint():(e=g.normalizeQuery(d),f=b.escapeRegExChars(e),h=new RegExp("^(?:"+f+")(.+$)","i"),i=h.exec(c.val),i&&this.input.setHint(d+i[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(a){this.input.setQuery(b.toStr(a))},getVal:function(){return this.input.getQuery()},select:function(a){var b=this.menu.getSelectableData(a);return!(!b||this.eventBus.before("select",b.obj,b.dataset))&&(this.input.setQuery(b.val,!0),this.eventBus.trigger("select",b.obj,b.dataset),this.close(),!0)},autocomplete:function(a){var b,c,d;return b=this.input.getQuery(),c=this.menu.getSelectableData(a),d=c&&b!==c.val,!(!d||this.eventBus.before("autocomplete",c.obj,c.dataset))&&(this.input.setQuery(c.val),this.eventBus.trigger("autocomplete",c.obj,c.dataset),!0)},moveCursor:function(a){var b,c,d,e,f,g,h;return b=this.input.getQuery(),c=this.menu.selectableRelativeToCursor(a),d=this.menu.getSelectableData(c),e=d?d.obj:null,f=d?d.dataset:null,h=c?c.attr("id"):null,this.input.trigger("cursorchange",h),g=this._minLengthMet()&&this.menu.update(b),!g&&!this.eventBus.before("cursorchange",e,f)&&(this.menu.setCursor(c),d?this.input.setInputValue(d.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",e,f),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),c}();!function(){"use strict";function e(b,c){b.each(function(){var b,d=a(this);(b=d.data(q.typeahead))&&c(b,d)})}function f(a,b){return a.clone().addClass(b.classes.hint).removeData().css(b.css.hint).css(m(a)).prop("readonly",!0).removeAttr("id name placeholder required").attr({spellcheck:"false",tabindex:-1})}function h(a,b){a.data(q.attrs,{dir:a.attr("dir"),autocomplete:a.attr("autocomplete"),spellcheck:a.attr("spellcheck"),style:a.attr("style")}),a.addClass(b.classes.input).attr({spellcheck:!1});try{!a.attr("dir")&&a.attr("dir","auto")}catch(a){}return a}function m(a){return{backgroundAttachment:a.css("background-attachment"),backgroundClip:a.css("background-clip"),backgroundColor:a.css("background-color"),backgroundImage:a.css("background-image"),backgroundOrigin:a.css("background-origin"),backgroundPosition:a.css("background-position"),backgroundRepeat:a.css("background-repeat"),backgroundSize:a.css("background-size")}}function n(a){var c,d;c=a.data(q.www),d=a.parent().filter(c.selectors.wrapper),b.each(a.data(q.attrs),function(c,d){b.isUndefined(c)?a.removeAttr(d):a.attr(d,c)}),a.removeData(q.typeahead).removeData(q.www).removeData(q.attr).removeClass(c.classes.input),d.length&&(a.detach().insertAfter(d),d.remove())}function o(c){var d,e;return d=b.isJQuery(c)||b.isElement(c),e=d?a(c).first():[],e.length?e:null}var p,q,r;p=a.fn.typeahead,q={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},r={initialize:function(e,m){function n(){var c,n,r,s,t,u,v,w,x,y,z,A;b.each(m,function(a){a.highlight=!!e.highlight}),c=a(this),n=a(p.html.wrapper),r=o(e.hint),s=o(e.menu),t=e.hint!==!1&&!r,u=e.menu!==!1&&!s,t&&(r=f(c,p)),u&&(s=a(p.html.menu).css(p.css.menu)),r&&r.val(""),c=h(c,p),(t||u)&&(n.css(p.css.wrapper),c.css(t?p.css.input:p.css.inputWithNoHint),c.wrap(n).parent().prepend(t?r:null).append(u?s:null)),A=u?k:i,v=new d({el:c}),w=new g({hint:r,input:c},p),x=new A({node:s,datasets:m},p),y=new j({$input:c,menu:x}),z=new l({input:w,menu:x,eventBus:v,minLength:e.minLength},p),c.data(q.www,p),c.data(q.typeahead,z)}var p;return m=b.isArray(m)?m:[].slice.call(arguments,1),e=e||{},p=c(e.classNames),this.each(n)},isEnabled:function(){var a;return e(this.first(),function(b){a=b.isEnabled()}),a},enable:function(){return e(this,function(a){a.enable()}),this},disable:function(){return e(this,function(a){a.disable()}),this},isActive:function(){var a;return e(this.first(),function(b){a=b.isActive()}),a},activate:function(){return e(this,function(a){a.activate()}),this},deactivate:function(){return e(this,function(a){a.deactivate()}),this},isOpen:function(){var a;return e(this.first(),function(b){a=b.isOpen()}),a},open:function(){return e(this,function(a){a.open()}),this},close:function(){return e(this,function(a){a.close()}),this},select:function(b){var c=!1,d=a(b);return e(this.first(),function(a){c=a.select(d)}),c},autocomplete:function(b){var c=!1,d=a(b);return e(this.first(),function(a){c=a.autocomplete(d)}),c},moveCursor:function(a){var b=!1;return e(this.first(),function(c){b=c.moveCursor(a)}),b},val:function(a){var c;return arguments.length?(e(this,function(c){c.setVal(b.toStr(a))}),this):(e(this.first(),function(a){c=a.getVal()}),c)},destroy:function(){return e(this,function(a,b){n(b),a.destroy()}),this}},a.fn.typeahead=function(a){return r[a]?r[a].apply(this,[].slice.call(arguments,1)):r.initialize.apply(this,arguments)},a.fn.typeahead.noConflict=function(){return a.fn.typeahead=p,this}}()});
/**!

 @license
 handlebars v4.7.7

 Copyright (C) 2011-2019 by Yehuda Katz

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.

 */
(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&&typeof module==='object')
module.exports=factory();else if(typeof define==='function'&&define.amd)
define([],factory);else if(typeof exports==='object')
exports.Handlebars=factory();else root.Handlebars=factory()})(this,function(){return(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])
return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=!0;return module.exports}
__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)})([(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _handlebarsRuntime=__webpack_require__(2);var _handlebarsRuntime2=_interopRequireDefault(_handlebarsRuntime);var _handlebarsCompilerAst=__webpack_require__(45);var _handlebarsCompilerAst2=_interopRequireDefault(_handlebarsCompilerAst);var _handlebarsCompilerBase=__webpack_require__(46);var _handlebarsCompilerCompiler=__webpack_require__(51);var _handlebarsCompilerJavascriptCompiler=__webpack_require__(52);var _handlebarsCompilerJavascriptCompiler2=_interopRequireDefault(_handlebarsCompilerJavascriptCompiler);var _handlebarsCompilerVisitor=__webpack_require__(49);var _handlebarsCompilerVisitor2=_interopRequireDefault(_handlebarsCompilerVisitor);var _handlebarsNoConflict=__webpack_require__(44);var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);var _create=_handlebarsRuntime2['default'].create;function create(){var hb=_create();hb.compile=function(input,options){return _handlebarsCompilerCompiler.compile(input,options,hb)};hb.precompile=function(input,options){return _handlebarsCompilerCompiler.precompile(input,options,hb)};hb.AST=_handlebarsCompilerAst2['default'];hb.Compiler=_handlebarsCompilerCompiler.Compiler;hb.JavaScriptCompiler=_handlebarsCompilerJavascriptCompiler2['default'];hb.Parser=_handlebarsCompilerBase.parser;hb.parse=_handlebarsCompilerBase.parse;hb.parseWithoutProcessing=_handlebarsCompilerBase.parseWithoutProcessing;return hb}
var inst=create();inst.create=create;_handlebarsNoConflict2['default'](inst);inst.Visitor=_handlebarsCompilerVisitor2['default'];inst['default']=inst;exports['default']=inst;module.exports=exports['default']}),(function(module,exports){"use strict";exports["default"]=function(obj){return obj&&obj.__esModule?obj:{"default":obj}};exports.__esModule=!0}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireWildcard=__webpack_require__(3)['default'];var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _handlebarsBase=__webpack_require__(4);var base=_interopRequireWildcard(_handlebarsBase);var _handlebarsSafeString=__webpack_require__(37);var _handlebarsSafeString2=_interopRequireDefault(_handlebarsSafeString);var _handlebarsException=__webpack_require__(6);var _handlebarsException2=_interopRequireDefault(_handlebarsException);var _handlebarsUtils=__webpack_require__(5);var Utils=_interopRequireWildcard(_handlebarsUtils);var _handlebarsRuntime=__webpack_require__(38);var runtime=_interopRequireWildcard(_handlebarsRuntime);var _handlebarsNoConflict=__webpack_require__(44);var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);function create(){var hb=new base.HandlebarsEnvironment();Utils.extend(hb,base);hb.SafeString=_handlebarsSafeString2['default'];hb.Exception=_handlebarsException2['default'];hb.Utils=Utils;hb.escapeExpression=Utils.escapeExpression;hb.VM=runtime;hb.template=function(spec){return runtime.template(spec,hb)};return hb}
var inst=create();inst.create=create;_handlebarsNoConflict2['default'](inst);inst['default']=inst;exports['default']=inst;module.exports=exports['default']}),(function(module,exports){"use strict";exports["default"]=function(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}
newObj["default"]=obj;return newObj}};exports.__esModule=!0}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;exports.HandlebarsEnvironment=HandlebarsEnvironment;var _utils=__webpack_require__(5);var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);var _helpers=__webpack_require__(10);var _decorators=__webpack_require__(30);var _logger=__webpack_require__(32);var _logger2=_interopRequireDefault(_logger);var _internalProtoAccess=__webpack_require__(33);var VERSION='4.7.7';exports.VERSION=VERSION;var COMPILER_REVISION=8;exports.COMPILER_REVISION=COMPILER_REVISION;var LAST_COMPATIBLE_COMPILER_REVISION=7;exports.LAST_COMPATIBLE_COMPILER_REVISION=LAST_COMPATIBLE_COMPILER_REVISION;var REVISION_CHANGES={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'};exports.REVISION_CHANGES=REVISION_CHANGES;var objectType='[object Object]';function HandlebarsEnvironment(helpers,partials,decorators){this.helpers=helpers||{};this.partials=partials||{};this.decorators=decorators||{};_helpers.registerDefaultHelpers(this);_decorators.registerDefaultDecorators(this)}
HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:_logger2['default'],log:_logger2['default'].log,registerHelper:function registerHelper(name,fn){if(_utils.toString.call(name)===objectType){if(fn){throw new _exception2['default']('Arg not supported with multiple helpers')}
_utils.extend(this.helpers,name)}else{this.helpers[name]=fn}},unregisterHelper:function unregisterHelper(name){delete this.helpers[name]},registerPartial:function registerPartial(name,partial){if(_utils.toString.call(name)===objectType){_utils.extend(this.partials,name)}else{if(typeof partial==='undefined'){throw new _exception2['default']('Attempting to register a partial called "'+name+'" as undefined')}
this.partials[name]=partial}},unregisterPartial:function unregisterPartial(name){delete this.partials[name]},registerDecorator:function registerDecorator(name,fn){if(_utils.toString.call(name)===objectType){if(fn){throw new _exception2['default']('Arg not supported with multiple decorators')}
_utils.extend(this.decorators,name)}else{this.decorators[name]=fn}},unregisterDecorator:function unregisterDecorator(name){delete this.decorators[name]},resetLoggedPropertyAccesses:function resetLoggedPropertyAccesses(){_internalProtoAccess.resetLoggedProperties()}};var log=_logger2['default'].log;exports.log=log;exports.createFrame=_utils.createFrame;exports.logger=_logger2['default']}),(function(module,exports){'use strict';exports.__esModule=!0;exports.extend=extend;exports.indexOf=indexOf;exports.escapeExpression=escapeExpression;exports.isEmpty=isEmpty;exports.createFrame=createFrame;exports.blockParams=blockParams;exports.appendContextPath=appendContextPath;var escape={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#x27;','`':'&#x60;','=':'&#x3D;'};var badChars=/[&<>"'`=]/g,possible=/[&<>"'`=]/;function escapeChar(chr){return escape[chr]}
function extend(obj){for(var i=1;i<arguments.length;i++){for(var key in arguments[i]){if(Object.prototype.hasOwnProperty.call(arguments[i],key)){obj[key]=arguments[i][key]}}}
return obj}
var toString=Object.prototype.toString;exports.toString=toString;var isFunction=function isFunction(value){return typeof value==='function'};if(isFunction(/x/)){exports.isFunction=isFunction=function(value){return typeof value==='function'&&toString.call(value)==='[object Function]'}}
exports.isFunction=isFunction;var isArray=Array.isArray||function(value){return value&&typeof value==='object'?toString.call(value)==='[object Array]':!1};exports.isArray=isArray;function indexOf(array,value){for(var i=0,len=array.length;i<len;i++){if(array[i]===value){return i}}
return-1}
function escapeExpression(string){if(typeof string!=='string'){if(string&&string.toHTML){return string.toHTML()}else if(string==null){return''}else if(!string){return string+''}
string=''+string}
if(!possible.test(string)){return string}
return string.replace(badChars,escapeChar)}
function isEmpty(value){if(!value&&value!==0){return!0}else if(isArray(value)&&value.length===0){return!0}else{return!1}}
function createFrame(object){var frame=extend({},object);frame._parent=object;return frame}
function blockParams(params,ids){params.path=ids;return params}
function appendContextPath(contextPath,id){return(contextPath?contextPath+'.':'')+id}}),(function(module,exports,__webpack_require__){'use strict';var _Object$defineProperty=__webpack_require__(7)['default'];exports.__esModule=!0;var errorProps=['description','fileName','lineNumber','endLineNumber','message','name','number','stack'];function Exception(message,node){var loc=node&&node.loc,line=undefined,endLineNumber=undefined,column=undefined,endColumn=undefined;if(loc){line=loc.start.line;endLineNumber=loc.end.line;column=loc.start.column;endColumn=loc.end.column;message+=' - '+line+':'+column}
var tmp=Error.prototype.constructor.call(this,message);for(var idx=0;idx<errorProps.length;idx++){this[errorProps[idx]]=tmp[errorProps[idx]]}
if(Error.captureStackTrace){Error.captureStackTrace(this,Exception)}
try{if(loc){this.lineNumber=line;this.endLineNumber=endLineNumber;if(_Object$defineProperty){Object.defineProperty(this,'column',{value:column,enumerable:!0});Object.defineProperty(this,'endColumn',{value:endColumn,enumerable:!0})}else{this.column=column;this.endColumn=endColumn}}}catch(nop){}}
Exception.prototype=new Error();exports['default']=Exception;module.exports=exports['default']}),(function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(8),__esModule:!0}}),(function(module,exports,__webpack_require__){var $=__webpack_require__(9);module.exports=function defineProperty(it,key,desc){return $.setDesc(it,key,desc)}}),(function(module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;exports.registerDefaultHelpers=registerDefaultHelpers;exports.moveHelperToHooks=moveHelperToHooks;var _helpersBlockHelperMissing=__webpack_require__(11);var _helpersBlockHelperMissing2=_interopRequireDefault(_helpersBlockHelperMissing);var _helpersEach=__webpack_require__(12);var _helpersEach2=_interopRequireDefault(_helpersEach);var _helpersHelperMissing=__webpack_require__(25);var _helpersHelperMissing2=_interopRequireDefault(_helpersHelperMissing);var _helpersIf=__webpack_require__(26);var _helpersIf2=_interopRequireDefault(_helpersIf);var _helpersLog=__webpack_require__(27);var _helpersLog2=_interopRequireDefault(_helpersLog);var _helpersLookup=__webpack_require__(28);var _helpersLookup2=_interopRequireDefault(_helpersLookup);var _helpersWith=__webpack_require__(29);var _helpersWith2=_interopRequireDefault(_helpersWith);function registerDefaultHelpers(instance){_helpersBlockHelperMissing2['default'](instance);_helpersEach2['default'](instance);_helpersHelperMissing2['default'](instance);_helpersIf2['default'](instance);_helpersLog2['default'](instance);_helpersLookup2['default'](instance);_helpersWith2['default'](instance)}
function moveHelperToHooks(instance,helperName,keepHelper){if(instance.helpers[helperName]){instance.hooks[helperName]=instance.helpers[helperName];if(!keepHelper){delete instance.helpers[helperName]}}}}),(function(module,exports,__webpack_require__){'use strict';exports.__esModule=!0;var _utils=__webpack_require__(5);exports['default']=function(instance){instance.registerHelper('blockHelperMissing',function(context,options){var inverse=options.inverse,fn=options.fn;if(context===!0){return fn(this)}else if(context===!1||context==null){return inverse(this)}else if(_utils.isArray(context)){if(context.length>0){if(options.ids){options.ids=[options.name]}
return instance.helpers.each(context,options)}else{return inverse(this)}}else{if(options.data&&options.ids){var data=_utils.createFrame(options.data);data.contextPath=_utils.appendContextPath(options.data.contextPath,options.name);options={data:data}}
return fn(context,options)}})};module.exports=exports['default']}),(function(module,exports,__webpack_require__){(function(global){'use strict';var _Object$keys=__webpack_require__(13)['default'];var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _utils=__webpack_require__(5);var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);exports['default']=function(instance){instance.registerHelper('each',function(context,options){if(!options){throw new _exception2['default']('Must pass iterator to #each')}
var fn=options.fn,inverse=options.inverse,i=0,ret='',data=undefined,contextPath=undefined;if(options.data&&options.ids){contextPath=_utils.appendContextPath(options.data.contextPath,options.ids[0])+'.'}
if(_utils.isFunction(context)){context=context.call(this)}
if(options.data){data=_utils.createFrame(options.data)}
function execIteration(field,index,last){if(data){data.key=field;data.index=index;data.first=index===0;data.last=!!last;if(contextPath){data.contextPath=contextPath+field}}
ret=ret+fn(context[field],{data:data,blockParams:_utils.blockParams([context[field],field],[contextPath+field,null])})}
if(context&&typeof context==='object'){if(_utils.isArray(context)){for(var j=context.length;i<j;i++){if(i in context){execIteration(i,i,i===context.length-1)}}}else if(global.Symbol&&context[global.Symbol.iterator]){var newContext=[];var iterator=context[global.Symbol.iterator]();for(var it=iterator.next();!it.done;it=iterator.next()){newContext.push(it.value)}
context=newContext;for(var j=context.length;i<j;i++){execIteration(i,i,i===context.length-1)}}else{(function(){var priorKey=undefined;_Object$keys(context).forEach(function(key){if(priorKey!==undefined){execIteration(priorKey,i-1)}
priorKey=key;i++});if(priorKey!==undefined){execIteration(priorKey,i-1,!0)}})()}}
if(i===0){ret=inverse(this)}
return ret})};module.exports=exports['default']}.call(exports,(function(){return this}())))}),(function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(14),__esModule:!0}}),(function(module,exports,__webpack_require__){__webpack_require__(15);module.exports=__webpack_require__(21).Object.keys}),(function(module,exports,__webpack_require__){var toObject=__webpack_require__(16);__webpack_require__(18)('keys',function($keys){return function keys(it){return $keys(toObject(it))}})}),(function(module,exports,__webpack_require__){var defined=__webpack_require__(17);module.exports=function(it){return Object(defined(it))}}),(function(module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on  "+it);return it}}),(function(module,exports,__webpack_require__){var $export=__webpack_require__(19),core=__webpack_require__(21),fails=__webpack_require__(24);module.exports=function(KEY,exec){var fn=(core.Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn);$export($export.S+$export.F*fails(function(){fn(1)}),'Object',exp)}}),(function(module,exports,__webpack_require__){var global=__webpack_require__(20),core=__webpack_require__(21),ctx=__webpack_require__(22),PROTOTYPE='prototype';var $export=function(type,name,source){var IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{})[PROTOTYPE],key,own,out;if(IS_GLOBAL)source=name;for(key in source){own=!IS_FORCED&&target&&key in target;if(own&&key in exports)continue;out=own?target[key]:source[key];exports[key]=IS_GLOBAL&&typeof target[key]!='function'?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?(function(C){var F=function(param){return this instanceof C?new C(param):C(param)};F[PROTOTYPE]=C[PROTOTYPE];return F})(out):IS_PROTO&&typeof out=='function'?ctx(Function.call,out):out;if(IS_PROTO)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};$export.F=1;$export.G=2;$export.S=4;$export.P=8;$export.B=16;$export.W=32;module.exports=$export}),(function(module,exports){var global=module.exports=typeof window!='undefined'&&window.Math==Math?window:typeof self!='undefined'&&self.Math==Math?self:Function('return this')();if(typeof __g=='number')__g=global}),(function(module,exports){var core=module.exports={version:'1.2.6'};if(typeof __e=='number')__e=core}),(function(module,exports,__webpack_require__){var aFunction=__webpack_require__(23);module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}
return function(){return fn.apply(that,arguments)}}}),(function(module,exports){module.exports=function(it){if(typeof it!='function')throw TypeError(it+' is not a function!');return it}}),(function(module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);exports['default']=function(instance){instance.registerHelper('helperMissing',function(){if(arguments.length===1){return undefined}else{throw new _exception2['default']('Missing helper: "'+arguments[arguments.length-1].name+'"')}})};module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _utils=__webpack_require__(5);var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);exports['default']=function(instance){instance.registerHelper('if',function(conditional,options){if(arguments.length!=2){throw new _exception2['default']('#if requires exactly one argument')}
if(_utils.isFunction(conditional)){conditional=conditional.call(this)}
if(!options.hash.includeZero&&!conditional||_utils.isEmpty(conditional)){return options.inverse(this)}else{return options.fn(this)}});instance.registerHelper('unless',function(conditional,options){if(arguments.length!=2){throw new _exception2['default']('#unless requires exactly one argument')}
return instance.helpers['if'].call(this,conditional,{fn:options.inverse,inverse:options.fn,hash:options.hash})})};module.exports=exports['default']}),(function(module,exports){'use strict';exports.__esModule=!0;exports['default']=function(instance){instance.registerHelper('log',function(){var args=[undefined],options=arguments[arguments.length-1];for(var i=0;i<arguments.length-1;i++){args.push(arguments[i])}
var level=1;if(options.hash.level!=null){level=options.hash.level}else if(options.data&&options.data.level!=null){level=options.data.level}
args[0]=level;instance.log.apply(instance,args)})};module.exports=exports['default']}),(function(module,exports){'use strict';exports.__esModule=!0;exports['default']=function(instance){instance.registerHelper('lookup',function(obj,field,options){if(!obj){return obj}
return options.lookupProperty(obj,field)})};module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _utils=__webpack_require__(5);var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);exports['default']=function(instance){instance.registerHelper('with',function(context,options){if(arguments.length!=2){throw new _exception2['default']('#with requires exactly one argument')}
if(_utils.isFunction(context)){context=context.call(this)}
var fn=options.fn;if(!_utils.isEmpty(context)){var data=options.data;if(options.data&&options.ids){data=_utils.createFrame(options.data);data.contextPath=_utils.appendContextPath(options.data.contextPath,options.ids[0])}
return fn(context,{data:data,blockParams:_utils.blockParams([context],[data&&data.contextPath])})}else{return options.inverse(this)}})};module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;exports.registerDefaultDecorators=registerDefaultDecorators;var _decoratorsInline=__webpack_require__(31);var _decoratorsInline2=_interopRequireDefault(_decoratorsInline);function registerDefaultDecorators(instance){_decoratorsInline2['default'](instance)}}),(function(module,exports,__webpack_require__){'use strict';exports.__esModule=!0;var _utils=__webpack_require__(5);exports['default']=function(instance){instance.registerDecorator('inline',function(fn,props,container,options){var ret=fn;if(!props.partials){props.partials={};ret=function(context,options){var original=container.partials;container.partials=_utils.extend({},original,props.partials);var ret=fn(context,options);container.partials=original;return ret}}
props.partials[options.args[0]]=options.fn;return ret})};module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';exports.__esModule=!0;var _utils=__webpack_require__(5);var logger={methodMap:['debug','info','warn','error'],level:'info',lookupLevel:function lookupLevel(level){if(typeof level==='string'){var levelMap=_utils.indexOf(logger.methodMap,level.toLowerCase());if(levelMap>=0){level=levelMap}else{level=parseInt(level,10)}}
return level},log:function log(level){level=logger.lookupLevel(level);if(typeof console!=='undefined'&&logger.lookupLevel(logger.level)<=level){var method=logger.methodMap[level];if(!console[method]){method='log'}
for(var _len=arguments.length,message=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){message[_key-1]=arguments[_key]}
console[method].apply(console,message)}}};exports['default']=logger;module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _Object$create=__webpack_require__(34)['default'];var _Object$keys=__webpack_require__(13)['default'];var _interopRequireWildcard=__webpack_require__(3)['default'];exports.__esModule=!0;exports.createProtoAccessControl=createProtoAccessControl;exports.resultIsAllowed=resultIsAllowed;exports.resetLoggedProperties=resetLoggedProperties;var _createNewLookupObject=__webpack_require__(36);var _logger=__webpack_require__(32);var logger=_interopRequireWildcard(_logger);var loggedProperties=_Object$create(null);function createProtoAccessControl(runtimeOptions){var defaultMethodWhiteList=_Object$create(null);defaultMethodWhiteList.constructor=!1;defaultMethodWhiteList.__defineGetter__=!1;defaultMethodWhiteList.__defineSetter__=!1;defaultMethodWhiteList.__lookupGetter__=!1;var defaultPropertyWhiteList=_Object$create(null);defaultPropertyWhiteList.__proto__=!1;return{properties:{whitelist:_createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList,runtimeOptions.allowedProtoProperties),defaultValue:runtimeOptions.allowProtoPropertiesByDefault},methods:{whitelist:_createNewLookupObject.createNewLookupObject(defaultMethodWhiteList,runtimeOptions.allowedProtoMethods),defaultValue:runtimeOptions.allowProtoMethodsByDefault}}}
function resultIsAllowed(result,protoAccessControl,propertyName){if(typeof result==='function'){return checkWhiteList(protoAccessControl.methods,propertyName)}else{return checkWhiteList(protoAccessControl.properties,propertyName)}}
function checkWhiteList(protoAccessControlForType,propertyName){if(protoAccessControlForType.whitelist[propertyName]!==undefined){return protoAccessControlForType.whitelist[propertyName]===!0}
if(protoAccessControlForType.defaultValue!==undefined){return protoAccessControlForType.defaultValue}
logUnexpecedPropertyAccessOnce(propertyName);return!1}
function logUnexpecedPropertyAccessOnce(propertyName){if(loggedProperties[propertyName]!==!0){loggedProperties[propertyName]=!0;logger.log('error','Handlebars: Access has been denied to resolve the property "'+propertyName+'" because it is not an "own property" of its parent.\n'+'You can add a runtime option to disable the check or this warning:\n'+'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details')}}
function resetLoggedProperties(){_Object$keys(loggedProperties).forEach(function(propertyName){delete loggedProperties[propertyName]})}}),(function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(35),__esModule:!0}}),(function(module,exports,__webpack_require__){var $=__webpack_require__(9);module.exports=function create(P,D){return $.create(P,D)}}),(function(module,exports,__webpack_require__){'use strict';var _Object$create=__webpack_require__(34)['default'];exports.__esModule=!0;exports.createNewLookupObject=createNewLookupObject;var _utils=__webpack_require__(5);function createNewLookupObject(){for(var _len=arguments.length,sources=Array(_len),_key=0;_key<_len;_key++){sources[_key]=arguments[_key]}
return _utils.extend.apply(undefined,[_Object$create(null)].concat(sources))}}),(function(module,exports){'use strict';exports.__esModule=!0;function SafeString(string){this.string=string}
SafeString.prototype.toString=SafeString.prototype.toHTML=function(){return''+this.string};exports['default']=SafeString;module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _Object$seal=__webpack_require__(39)['default'];var _Object$keys=__webpack_require__(13)['default'];var _interopRequireWildcard=__webpack_require__(3)['default'];var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;exports.checkRevision=checkRevision;exports.template=template;exports.wrapProgram=wrapProgram;exports.resolvePartial=resolvePartial;exports.invokePartial=invokePartial;exports.noop=noop;var _utils=__webpack_require__(5);var Utils=_interopRequireWildcard(_utils);var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);var _base=__webpack_require__(4);var _helpers=__webpack_require__(10);var _internalWrapHelper=__webpack_require__(43);var _internalProtoAccess=__webpack_require__(33);function checkRevision(compilerInfo){var compilerRevision=compilerInfo&&compilerInfo[0]||1,currentRevision=_base.COMPILER_REVISION;if(compilerRevision>=_base.LAST_COMPATIBLE_COMPILER_REVISION&&compilerRevision<=_base.COMPILER_REVISION){return}
if(compilerRevision<_base.LAST_COMPATIBLE_COMPILER_REVISION){var runtimeVersions=_base.REVISION_CHANGES[currentRevision],compilerVersions=_base.REVISION_CHANGES[compilerRevision];throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. '+'Please update your precompiler to a newer version ('+runtimeVersions+') or downgrade your runtime to an older version ('+compilerVersions+').')}else{throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. '+'Please update your runtime to a newer version ('+compilerInfo[1]+').')}}
function template(templateSpec,env){if(!env){throw new _exception2['default']('No environment passed to template')}
if(!templateSpec||!templateSpec.main){throw new _exception2['default']('Unknown template object: '+typeof templateSpec)}
templateSpec.main.decorator=templateSpec.main_d;env.VM.checkRevision(templateSpec.compiler);var templateWasPrecompiledWithCompilerV7=templateSpec.compiler&&templateSpec.compiler[0]===7;function invokePartialWrapper(partial,context,options){if(options.hash){context=Utils.extend({},context,options.hash);if(options.ids){options.ids[0]=!0}}
partial=env.VM.resolvePartial.call(this,partial,context,options);var extendedOptions=Utils.extend({},options,{hooks:this.hooks,protoAccessControl:this.protoAccessControl});var result=env.VM.invokePartial.call(this,partial,context,extendedOptions);if(result==null&&env.compile){options.partials[options.name]=env.compile(partial,templateSpec.compilerOptions,env);result=options.partials[options.name](context,extendedOptions)}
if(result!=null){if(options.indent){var lines=result.split('\n');for(var i=0,l=lines.length;i<l;i++){if(!lines[i]&&i+1===l){break}
lines[i]=options.indent+lines[i]}
result=lines.join('\n')}
return result}else{throw new _exception2['default']('The partial '+options.name+' could not be compiled when running in runtime-only mode')}}
var container={strict:function strict(obj,name,loc){if(!obj||!(name in obj)){throw new _exception2['default']('"'+name+'" not defined in '+obj,{loc:loc})}
return container.lookupProperty(obj,name)},lookupProperty:function lookupProperty(parent,propertyName){var result=parent[propertyName];if(result==null){return result}
if(Object.prototype.hasOwnProperty.call(parent,propertyName)){return result}
if(_internalProtoAccess.resultIsAllowed(result,container.protoAccessControl,propertyName)){return result}
return undefined},lookup:function lookup(depths,name){var len=depths.length;for(var i=0;i<len;i++){var result=depths[i]&&container.lookupProperty(depths[i],name);if(result!=null){return depths[i][name]}}},lambda:function lambda(current,context){return typeof current==='function'?current.call(context):current},escapeExpression:Utils.escapeExpression,invokePartial:invokePartialWrapper,fn:function fn(i){var ret=templateSpec[i];ret.decorator=templateSpec[i+'_d'];return ret},programs:[],program:function program(i,data,declaredBlockParams,blockParams,depths){var programWrapper=this.programs[i],fn=this.fn(i);if(data||depths||blockParams||declaredBlockParams){programWrapper=wrapProgram(this,i,fn,data,declaredBlockParams,blockParams,depths)}else if(!programWrapper){programWrapper=this.programs[i]=wrapProgram(this,i,fn)}
return programWrapper},data:function data(value,depth){while(value&&depth--){value=value._parent}
return value},mergeIfNeeded:function mergeIfNeeded(param,common){var obj=param||common;if(param&&common&&param!==common){obj=Utils.extend({},common,param)}
return obj},nullContext:_Object$seal({}),noop:env.VM.noop,compilerInfo:templateSpec.compiler};function ret(context){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var data=options.data;ret._setup(options);if(!options.partial&&templateSpec.useData){data=initData(context,data)}
var depths=undefined,blockParams=templateSpec.useBlockParams?[]:undefined;if(templateSpec.useDepths){if(options.depths){depths=context!=options.depths[0]?[context].concat(options.depths):options.depths}else{depths=[context]}}
function main(context){return''+templateSpec.main(container,context,container.helpers,container.partials,data,blockParams,depths)}
main=executeDecorators(templateSpec.main,main,container,options.depths||[],data,blockParams);return main(context,options)}
ret.isTop=!0;ret._setup=function(options){if(!options.partial){var mergedHelpers=Utils.extend({},env.helpers,options.helpers);wrapHelpersToPassLookupProperty(mergedHelpers,container);container.helpers=mergedHelpers;if(templateSpec.usePartial){container.partials=container.mergeIfNeeded(options.partials,env.partials)}
if(templateSpec.usePartial||templateSpec.useDecorators){container.decorators=Utils.extend({},env.decorators,options.decorators)}
container.hooks={};container.protoAccessControl=_internalProtoAccess.createProtoAccessControl(options);var keepHelperInHelpers=options.allowCallsToHelperMissing||templateWasPrecompiledWithCompilerV7;_helpers.moveHelperToHooks(container,'helperMissing',keepHelperInHelpers);_helpers.moveHelperToHooks(container,'blockHelperMissing',keepHelperInHelpers)}else{container.protoAccessControl=options.protoAccessControl;container.helpers=options.helpers;container.partials=options.partials;container.decorators=options.decorators;container.hooks=options.hooks}};ret._child=function(i,data,blockParams,depths){if(templateSpec.useBlockParams&&!blockParams){throw new _exception2['default']('must pass block params')}
if(templateSpec.useDepths&&!depths){throw new _exception2['default']('must pass parent depths')}
return wrapProgram(container,i,templateSpec[i],data,0,blockParams,depths)};return ret}
function wrapProgram(container,i,fn,data,declaredBlockParams,blockParams,depths){function prog(context){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];var currentDepths=depths;if(depths&&context!=depths[0]&&!(context===container.nullContext&&depths[0]===null)){currentDepths=[context].concat(depths)}
return fn(container,context,container.helpers,container.partials,options.data||data,blockParams&&[options.blockParams].concat(blockParams),currentDepths)}
prog=executeDecorators(fn,prog,container,depths,data,blockParams);prog.program=i;prog.depth=depths?depths.length:0;prog.blockParams=declaredBlockParams||0;return prog}
function resolvePartial(partial,context,options){if(!partial){if(options.name==='@partial-block'){partial=options.data['partial-block']}else{partial=options.partials[options.name]}}else if(!partial.call&&!options.name){options.name=partial;partial=options.partials[partial]}
return partial}
function invokePartial(partial,context,options){var currentPartialBlock=options.data&&options.data['partial-block'];options.partial=!0;if(options.ids){options.data.contextPath=options.ids[0]||options.data.contextPath}
var partialBlock=undefined;if(options.fn&&options.fn!==noop){(function(){options.data=_base.createFrame(options.data);var fn=options.fn;partialBlock=options.data['partial-block']=function partialBlockWrapper(context){var options=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];options.data=_base.createFrame(options.data);options.data['partial-block']=currentPartialBlock;return fn(context,options)};if(fn.partials){options.partials=Utils.extend({},options.partials,fn.partials)}})()}
if(partial===undefined&&partialBlock){partial=partialBlock}
if(partial===undefined){throw new _exception2['default']('The partial '+options.name+' could not be found')}else if(partial instanceof Function){return partial(context,options)}}
function noop(){return''}
function initData(context,data){if(!data||!('root' in data)){data=data?_base.createFrame(data):{};data.root=context}
return data}
function executeDecorators(fn,prog,container,depths,data,blockParams){if(fn.decorator){var props={};prog=fn.decorator(prog,props,container,depths&&depths[0],data,blockParams,depths);Utils.extend(prog,props)}
return prog}
function wrapHelpersToPassLookupProperty(mergedHelpers,container){_Object$keys(mergedHelpers).forEach(function(helperName){var helper=mergedHelpers[helperName];mergedHelpers[helperName]=passLookupPropertyOption(helper,container)})}
function passLookupPropertyOption(helper,container){var lookupProperty=container.lookupProperty;return _internalWrapHelper.wrapHelper(helper,function(options){return Utils.extend({lookupProperty:lookupProperty},options)})}}),(function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(40),__esModule:!0}}),(function(module,exports,__webpack_require__){__webpack_require__(41);module.exports=__webpack_require__(21).Object.seal}),(function(module,exports,__webpack_require__){var isObject=__webpack_require__(42);__webpack_require__(18)('seal',function($seal){return function seal(it){return $seal&&isObject(it)?$seal(it):it}})}),(function(module,exports){module.exports=function(it){return typeof it==='object'?it!==null:typeof it==='function'}}),(function(module,exports){'use strict';exports.__esModule=!0;exports.wrapHelper=wrapHelper;function wrapHelper(helper,transformOptionsFn){if(typeof helper!=='function'){return helper}
var wrapper=function wrapper(){var options=arguments[arguments.length-1];arguments[arguments.length-1]=transformOptionsFn(options);return helper.apply(this,arguments)};return wrapper}}),(function(module,exports){(function(global){'use strict';exports.__esModule=!0;exports['default']=function(Handlebars){var root=typeof global!=='undefined'?global:window,$Handlebars=root.Handlebars;Handlebars.noConflict=function(){if(root.Handlebars===Handlebars){root.Handlebars=$Handlebars}
return Handlebars}};module.exports=exports['default']}.call(exports,(function(){return this}())))}),(function(module,exports){'use strict';exports.__esModule=!0;var AST={helpers:{helperExpression:function helperExpression(node){return node.type==='SubExpression'||(node.type==='MustacheStatement'||node.type==='BlockStatement')&&!!(node.params&&node.params.length||node.hash)},scopedId:function scopedId(path){return(/^\.|this\b/.test(path.original))},simpleId:function simpleId(path){return path.parts.length===1&&!AST.helpers.scopedId(path)&&!path.depth}}};exports['default']=AST;module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];var _interopRequireWildcard=__webpack_require__(3)['default'];exports.__esModule=!0;exports.parseWithoutProcessing=parseWithoutProcessing;exports.parse=parse;var _parser=__webpack_require__(47);var _parser2=_interopRequireDefault(_parser);var _whitespaceControl=__webpack_require__(48);var _whitespaceControl2=_interopRequireDefault(_whitespaceControl);var _helpers=__webpack_require__(50);var Helpers=_interopRequireWildcard(_helpers);var _utils=__webpack_require__(5);exports.parser=_parser2['default'];var yy={};_utils.extend(yy,Helpers);function parseWithoutProcessing(input,options){if(input.type==='Program'){return input}
_parser2['default'].yy=yy;yy.locInfo=function(locInfo){return new yy.SourceLocation(options&&options.srcName,locInfo)};var ast=_parser2['default'].parse(input);return ast}
function parse(input,options){var ast=parseWithoutProcessing(input,options);var strip=new _whitespaceControl2['default'](options);return strip.accept(ast)}}),(function(module,exports){"use strict";exports.__esModule=!0;var handlebars=(function(){var parser={trace:function trace(){},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,"EQUALS":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 anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];break;case 2:this.$=yy.prepareProgram($$[$0]);break;case 3:this.$=$$[$0];break;case 4:this.$=$$[$0];break;case 5:this.$=$$[$0];break;case 6:this.$=$$[$0];break;case 7:this.$=$$[$0];break;case 8:this.$=$$[$0];break;case 9:this.$={type:'CommentStatement',value:yy.stripComment($$[$0]),strip:yy.stripFlags($$[$0],$$[$0]),loc:yy.locInfo(this._$)};break;case 10:this.$={type:'ContentStatement',original:$$[$0],value:$$[$0],loc:yy.locInfo(this._$)};break;case 11:this.$=yy.prepareRawBlock($$[$0-2],$$[$0-1],$$[$0],this._$);break;case 12:this.$={path:$$[$0-3],params:$$[$0-2],hash:$$[$0-1]};break;case 13:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],!1,this._$);break;case 14:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],!0,this._$);break;case 15:this.$={open:$$[$0-5],path:$$[$0-4],params:$$[$0-3],hash:$$[$0-2],blockParams:$$[$0-1],strip:yy.stripFlags($$[$0-5],$$[$0])};break;case 16:this.$={path:$$[$0-4],params:$$[$0-3],hash:$$[$0-2],blockParams:$$[$0-1],strip:yy.stripFlags($$[$0-5],$$[$0])};break;case 17:this.$={path:$$[$0-4],params:$$[$0-3],hash:$$[$0-2],blockParams:$$[$0-1],strip:yy.stripFlags($$[$0-5],$$[$0])};break;case 18:this.$={strip:yy.stripFlags($$[$0-1],$$[$0-1]),program:$$[$0]};break;case 19:var inverse=yy.prepareBlock($$[$0-2],$$[$0-1],$$[$0],$$[$0],!1,this._$),program=yy.prepareProgram([inverse],$$[$0-1].loc);program.chained=!0;this.$={strip:$$[$0-2].strip,program:program,chain:!0};break;case 20:this.$=$$[$0];break;case 21:this.$={path:$$[$0-1],strip:yy.stripFlags($$[$0-2],$$[$0])};break;case 22:this.$=yy.prepareMustache($$[$0-3],$$[$0-2],$$[$0-1],$$[$0-4],yy.stripFlags($$[$0-4],$$[$0]),this._$);break;case 23:this.$=yy.prepareMustache($$[$0-3],$$[$0-2],$$[$0-1],$$[$0-4],yy.stripFlags($$[$0-4],$$[$0]),this._$);break;case 24:this.$={type:'PartialStatement',name:$$[$0-3],params:$$[$0-2],hash:$$[$0-1],indent:'',strip:yy.stripFlags($$[$0-4],$$[$0]),loc:yy.locInfo(this._$)};break;case 25:this.$=yy.preparePartialBlock($$[$0-2],$$[$0-1],$$[$0],this._$);break;case 26:this.$={path:$$[$0-3],params:$$[$0-2],hash:$$[$0-1],strip:yy.stripFlags($$[$0-4],$$[$0])};break;case 27:this.$=$$[$0];break;case 28:this.$=$$[$0];break;case 29:this.$={type:'SubExpression',path:$$[$0-3],params:$$[$0-2],hash:$$[$0-1],loc:yy.locInfo(this._$)};break;case 30:this.$={type:'Hash',pairs:$$[$0],loc:yy.locInfo(this._$)};break;case 31:this.$={type:'HashPair',key:yy.id($$[$0-2]),value:$$[$0],loc:yy.locInfo(this._$)};break;case 32:this.$=yy.id($$[$0-1]);break;case 33:this.$=$$[$0];break;case 34:this.$=$$[$0];break;case 35:this.$={type:'StringLiteral',value:$$[$0],original:$$[$0],loc:yy.locInfo(this._$)};break;case 36:this.$={type:'NumberLiteral',value:Number($$[$0]),original:Number($$[$0]),loc:yy.locInfo(this._$)};break;case 37:this.$={type:'BooleanLiteral',value:$$[$0]==='true',original:$$[$0]==='true',loc:yy.locInfo(this._$)};break;case 38:this.$={type:'UndefinedLiteral',original:undefined,value:undefined,loc:yy.locInfo(this._$)};break;case 39:this.$={type:'NullLiteral',original:null,value:null,loc:yy.locInfo(this._$)};break;case 40:this.$=$$[$0];break;case 41:this.$=$$[$0];break;case 42:this.$=yy.preparePath(!0,$$[$0],this._$);break;case 43:this.$=yy.preparePath(!1,$$[$0],this._$);break;case 44:$$[$0-2].push({part:yy.id($$[$0]),original:$$[$0],separator:$$[$0-1]});this.$=$$[$0-2];break;case 45:this.$=[{part:yy.id($$[$0]),original:$$[$0]}];break;case 46:this.$=[];break;case 47:$$[$0-1].push($$[$0]);break;case 48:this.$=[];break;case 49:$$[$0-1].push($$[$0]);break;case 50:this.$=[];break;case 51:$$[$0-1].push($$[$0]);break;case 58:this.$=[];break;case 59:$$[$0-1].push($$[$0]);break;case 64:this.$=[];break;case 65:$$[$0-1].push($$[$0]);break;case 70:this.$=[];break;case 71:$$[$0-1].push($$[$0]);break;case 78:this.$=[];break;case 79:$$[$0-1].push($$[$0]);break;case 82:this.$=[];break;case 83:$$[$0-1].push($$[$0]);break;case 86:this.$=[];break;case 87:$$[$0-1].push($$[$0]);break;case 90:this.$=[];break;case 91:$$[$0-1].push($$[$0]);break;case 94:this.$=[];break;case 95:$$[$0-1].push($$[$0]);break;case 98:this.$=[$$[$0]];break;case 99:$$[$0-1].push($$[$0]);break;case 100:this.$=[$$[$0]];break;case 101:$$[$0-1].push($$[$0]);break}},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],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]},{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 parseError(str,hash){throw new Error(str)},parse:function parse(input){var self=this,stack=[0],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1;this.lexer.setInput(input);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var yyloc=this.lexer.yylloc;lstack.push(yyloc);var ranges=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function popStack(n){stack.length=stack.length-2*n;vstack.length=vstack.length-n;lstack.length=lstack.length-n}
function lex(){var token;token=self.lexer.lex()||1;if(typeof token!=="number"){token=self.symbols_[token]||token}
return token}
var symbol,preErrorSymbol,state,action,a,r,yyval={},p,len,newState,expected;while(!0){state=stack[stack.length-1];if(this.defaultActions[state]){action=this.defaultActions[state]}else{if(symbol===null||typeof symbol=="undefined"){symbol=lex()}
action=table[state]&&table[state][symbol]}
if(typeof action==="undefined"||!action.length||!action[0]){var errStr="";if(!recovering){expected=[];for(p in table[state])if(this.terminals_[p]&&p>2){expected.push("'"+this.terminals_[p]+"'")}
if(this.lexer.showPosition){errStr="Parse error on line "+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'"}else{errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==1?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'")}
this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected})}}
if(action[0]instanceof Array&&action.length>1){throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol)}
switch(action[0]){case 1:stack.push(symbol);vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);stack.push(action[1]);symbol=null;if(!preErrorSymbol){yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc;if(recovering>0)recovering--}else{symbol=preErrorSymbol;preErrorSymbol=null}
break;case 2:len=this.productions_[action[1]][1];yyval.$=vstack[vstack.length-len];yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};if(ranges){yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]}
r=this.performAction.call(yyval,yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack);if(typeof r!=="undefined"){return r}
if(len){stack=stack.slice(0,-1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len)}
stack.push(this.productions_[action[1]][0]);vstack.push(yyval.$);lstack.push(yyval._$);newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:return!0}}
return!0}};var lexer=(function(){var lexer={EOF:1,parseError:function parseError(str,hash){if(this.yy.parser){this.yy.parser.parseError(str,hash)}else{throw new Error(str)}},setInput:function setInput(input){this._input=input;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};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function input(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.offset++;this.match+=ch;this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);if(lines){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}
if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return ch},unput:function unput(ch){var len=ch.length;var lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-len-1);this.offset-=len;var oldLines=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);if(lines.length-1)this.yylineno-=lines.length-1;var r=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len};if(this.options.ranges){this.yylloc.range=[r[0],r[0]+this.yyleng-len]}
return this},more:function more(){this._more=!0;return this},less:function less(n){this.unput(this.match.slice(n))},pastInput:function pastInput(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?'...':'')+past.substr(-20).replace(/\n/g,"")},upcomingInput:function upcomingInput(){var next=this.match;if(next.length<20){next+=this._input.substr(0,20-next.length)}
return(next.substr(0,20)+(next.length>20?'...':'')).replace(/\n/g,"")},showPosition:function showPosition(){var pre=this.pastInput();var c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},next:function next(){if(this.done){return this.EOF}
if(!this._input)this.done=!0;var token,match,tempMatch,index,col,lines;if(!this._more){this.yytext='';this.match=''}
var rules=this._currentRules();for(var i=0;i<rules.length;i++){tempMatch=this._input.match(this.rules[rules[i]]);if(tempMatch&&(!match||tempMatch[0].length>match[0].length)){match=tempMatch;index=i;if(!this.options.flex)break}}
if(match){lines=match[0].match(/(?:\r\n?|\n).*/g);if(lines)this.yylineno+=lines.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.matches=match;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}
this._more=!1;this._input=this._input.slice(match[0].length);this.matched+=match[0];token=this.performAction.call(this,this.yy,this,rules[index],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=!1;if(token)return token;else return}
if(this._input===""){return this.EOF}else{return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function lex(){var r=this.next();if(typeof r!=='undefined'){return r}else{return this.lex()}},begin:function begin(condition){this.conditionStack.push(condition)},popState:function popState(){return this.conditionStack.pop()},_currentRules:function _currentRules(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function topState(){return this.conditionStack[this.conditionStack.length-2]},pushState:function begin(condition){this.begin(condition)}};lexer.options={};lexer.performAction=function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){function strip(start,end){return yy_.yytext=yy_.yytext.substring(start,yy_.yyleng-end+start)}
var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:if(yy_.yytext.slice(-2)==="\\\\"){strip(0,1);this.begin("mu")}else if(yy_.yytext.slice(-1)==="\\"){strip(0,1);this.begin("emu")}else{this.begin("mu")}
if(yy_.yytext)return 15;break;case 1:return 15;break;case 2:this.popState();return 15;break;case 3:this.begin('raw');return 15;break;case 4:this.popState();if(this.conditionStack[this.conditionStack.length-1]==='raw'){return 15}else{strip(5,9);return'END_RAW_BLOCK'}
break;case 5:return 15;break;case 6:this.popState();return 14;break;case 7:return 65;break;case 8:return 68;break;case 9:return 19;break;case 10:this.popState();this.begin('raw');return 23;break;case 11:return 55;break;case 12:return 60;break;case 13:return 29;break;case 14:return 47;break;case 15:this.popState();return 44;break;case 16:this.popState();return 44;break;case 17:return 34;break;case 18:return 39;break;case 19:return 51;break;case 20:return 48;break;case 21:this.unput(yy_.yytext);this.popState();this.begin('com');break;case 22:this.popState();return 14;break;case 23:return 48;break;case 24:return 73;break;case 25:return 72;break;case 26:return 72;break;case 27:return 87;break;case 28:break;case 29:this.popState();return 54;break;case 30:this.popState();return 33;break;case 31:yy_.yytext=strip(1,2).replace(/\\"/g,'"');return 80;break;case 32:yy_.yytext=strip(1,2).replace(/\\'/g,"'");return 80;break;case 33:return 85;break;case 34:return 82;break;case 35:return 82;break;case 36:return 83;break;case 37:return 84;break;case 38:return 81;break;case 39:return 75;break;case 40:return 77;break;case 41:return 72;break;case 42:yy_.yytext=yy_.yytext.replace(/\\([\\\]])/g,'$1');return 72;break;case 43:return'INVALID';break;case 44:return 5;break}};lexer.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/];lexer.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}};return lexer})();parser.lexer=lexer;function Parser(){this.yy={}}Parser.prototype=parser;parser.Parser=Parser;return new Parser()})();exports["default"]=handlebars;module.exports=exports["default"]}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _visitor=__webpack_require__(49);var _visitor2=_interopRequireDefault(_visitor);function WhitespaceControl(){var options=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];this.options=options}
WhitespaceControl.prototype=new _visitor2['default']();WhitespaceControl.prototype.Program=function(program){var doStandalone=!this.options.ignoreStandalone;var isRoot=!this.isRootSeen;this.isRootSeen=!0;var body=program.body;for(var i=0,l=body.length;i<l;i++){var current=body[i],strip=this.accept(current);if(!strip){continue}
var _isPrevWhitespace=isPrevWhitespace(body,i,isRoot),_isNextWhitespace=isNextWhitespace(body,i,isRoot),openStandalone=strip.openStandalone&&_isPrevWhitespace,closeStandalone=strip.closeStandalone&&_isNextWhitespace,inlineStandalone=strip.inlineStandalone&&_isPrevWhitespace&&_isNextWhitespace;if(strip.close){omitRight(body,i,!0)}
if(strip.open){omitLeft(body,i,!0)}
if(doStandalone&&inlineStandalone){omitRight(body,i);if(omitLeft(body,i)){if(current.type==='PartialStatement'){current.indent=/([ \t]+$)/.exec(body[i-1].original)[1]}}}
if(doStandalone&&openStandalone){omitRight((current.program||current.inverse).body);omitLeft(body,i)}
if(doStandalone&&closeStandalone){omitRight(body,i);omitLeft((current.inverse||current.program).body)}}
return program};WhitespaceControl.prototype.BlockStatement=WhitespaceControl.prototype.DecoratorBlock=WhitespaceControl.prototype.PartialBlockStatement=function(block){this.accept(block.program);this.accept(block.inverse);var program=block.program||block.inverse,inverse=block.program&&block.inverse,firstInverse=inverse,lastInverse=inverse;if(inverse&&inverse.chained){firstInverse=inverse.body[0].program;while(lastInverse.chained){lastInverse=lastInverse.body[lastInverse.body.length-1].program}}
var strip={open:block.openStrip.open,close:block.closeStrip.close,openStandalone:isNextWhitespace(program.body),closeStandalone:isPrevWhitespace((firstInverse||program).body)};if(block.openStrip.close){omitRight(program.body,null,!0)}
if(inverse){var inverseStrip=block.inverseStrip;if(inverseStrip.open){omitLeft(program.body,null,!0)}
if(inverseStrip.close){omitRight(firstInverse.body,null,!0)}
if(block.closeStrip.open){omitLeft(lastInverse.body,null,!0)}
if(!this.options.ignoreStandalone&&isPrevWhitespace(program.body)&&isNextWhitespace(firstInverse.body)){omitLeft(program.body);omitRight(firstInverse.body)}}else if(block.closeStrip.open){omitLeft(program.body,null,!0)}
return strip};WhitespaceControl.prototype.Decorator=WhitespaceControl.prototype.MustacheStatement=function(mustache){return mustache.strip};WhitespaceControl.prototype.PartialStatement=WhitespaceControl.prototype.CommentStatement=function(node){var strip=node.strip||{};return{inlineStandalone:!0,open:strip.open,close:strip.close}};function isPrevWhitespace(body,i,isRoot){if(i===undefined){i=body.length}
var prev=body[i-1],sibling=body[i-2];if(!prev){return isRoot}
if(prev.type==='ContentStatement'){return(sibling||!isRoot?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(prev.original)}}
function isNextWhitespace(body,i,isRoot){if(i===undefined){i=-1}
var next=body[i+1],sibling=body[i+2];if(!next){return isRoot}
if(next.type==='ContentStatement'){return(sibling||!isRoot?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(next.original)}}
function omitRight(body,i,multiple){var current=body[i==null?0:i+1];if(!current||current.type!=='ContentStatement'||!multiple&&current.rightStripped){return}
var original=current.value;current.value=current.value.replace(multiple?/^\s+/:/^[ \t]*\r?\n?/,'');current.rightStripped=current.value!==original}
function omitLeft(body,i,multiple){var current=body[i==null?body.length-1:i-1];if(!current||current.type!=='ContentStatement'||!multiple&&current.leftStripped){return}
var original=current.value;current.value=current.value.replace(multiple?/\s+$/:/[ \t]+$/,'');current.leftStripped=current.value!==original;return current.leftStripped}
exports['default']=WhitespaceControl;module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);function Visitor(){this.parents=[]}
Visitor.prototype={constructor:Visitor,mutating:!1,acceptKey:function acceptKey(node,name){var value=this.accept(node[name]);if(this.mutating){if(value&&!Visitor.prototype[value.type]){throw new _exception2['default']('Unexpected node type "'+value.type+'" found when accepting '+name+' on '+node.type)}
node[name]=value}},acceptRequired:function acceptRequired(node,name){this.acceptKey(node,name);if(!node[name]){throw new _exception2['default'](node.type+' requires '+name)}},acceptArray:function acceptArray(array){for(var i=0,l=array.length;i<l;i++){this.acceptKey(array,i);if(!array[i]){array.splice(i,1);i--;l--}}},accept:function accept(object){if(!object){return}
if(!this[object.type]){throw new _exception2['default']('Unknown type: '+object.type,object)}
if(this.current){this.parents.unshift(this.current)}
this.current=object;var ret=this[object.type](object);this.current=this.parents.shift();if(!this.mutating||ret){return ret}else if(ret!==!1){return object}},Program:function Program(program){this.acceptArray(program.body)},MustacheStatement:visitSubExpression,Decorator:visitSubExpression,BlockStatement:visitBlock,DecoratorBlock:visitBlock,PartialStatement:visitPartial,PartialBlockStatement:function PartialBlockStatement(partial){visitPartial.call(this,partial);this.acceptKey(partial,'program')},ContentStatement:function ContentStatement(){},CommentStatement:function CommentStatement(){},SubExpression:visitSubExpression,PathExpression:function PathExpression(){},StringLiteral:function StringLiteral(){},NumberLiteral:function NumberLiteral(){},BooleanLiteral:function BooleanLiteral(){},UndefinedLiteral:function UndefinedLiteral(){},NullLiteral:function NullLiteral(){},Hash:function Hash(hash){this.acceptArray(hash.pairs)},HashPair:function HashPair(pair){this.acceptRequired(pair,'value')}};function visitSubExpression(mustache){this.acceptRequired(mustache,'path');this.acceptArray(mustache.params);this.acceptKey(mustache,'hash')}
function visitBlock(block){visitSubExpression.call(this,block);this.acceptKey(block,'program');this.acceptKey(block,'inverse')}
function visitPartial(partial){this.acceptRequired(partial,'name');this.acceptArray(partial.params);this.acceptKey(partial,'hash')}
exports['default']=Visitor;module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;exports.SourceLocation=SourceLocation;exports.id=id;exports.stripFlags=stripFlags;exports.stripComment=stripComment;exports.preparePath=preparePath;exports.prepareMustache=prepareMustache;exports.prepareRawBlock=prepareRawBlock;exports.prepareBlock=prepareBlock;exports.prepareProgram=prepareProgram;exports.preparePartialBlock=preparePartialBlock;var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);function validateClose(open,close){close=close.path?close.path.original:close;if(open.path.original!==close){var errorNode={loc:open.path.loc};throw new _exception2['default'](open.path.original+" doesn't match "+close,errorNode)}}
function SourceLocation(source,locInfo){this.source=source;this.start={line:locInfo.first_line,column:locInfo.first_column};this.end={line:locInfo.last_line,column:locInfo.last_column}}
function id(token){if(/^\[.*\]$/.test(token)){return token.substring(1,token.length-1)}else{return token}}
function stripFlags(open,close){return{open:open.charAt(2)==='~',close:close.charAt(close.length-3)==='~'}}
function stripComment(comment){return comment.replace(/^\{\{~?!-?-?/,'').replace(/-?-?~?\}\}$/,'')}
function preparePath(data,parts,loc){loc=this.locInfo(loc);var original=data?'@':'',dig=[],depth=0;for(var i=0,l=parts.length;i<l;i++){var part=parts[i].part,isLiteral=parts[i].original!==part;original+=(parts[i].separator||'')+part;if(!isLiteral&&(part==='..'||part==='.'||part==='this')){if(dig.length>0){throw new _exception2['default']('Invalid path: '+original,{loc:loc})}else if(part==='..'){depth++}}else{dig.push(part)}}
return{type:'PathExpression',data:data,depth:depth,parts:dig,original:original,loc:loc}}
function prepareMustache(path,params,hash,open,strip,locInfo){var escapeFlag=open.charAt(3)||open.charAt(2),escaped=escapeFlag!=='{'&&escapeFlag!=='&';var decorator=/\*/.test(open);return{type:decorator?'Decorator':'MustacheStatement',path:path,params:params,hash:hash,escaped:escaped,strip:strip,loc:this.locInfo(locInfo)}}
function prepareRawBlock(openRawBlock,contents,close,locInfo){validateClose(openRawBlock,close);locInfo=this.locInfo(locInfo);var program={type:'Program',body:contents,strip:{},loc:locInfo};return{type:'BlockStatement',path:openRawBlock.path,params:openRawBlock.params,hash:openRawBlock.hash,program:program,openStrip:{},inverseStrip:{},closeStrip:{},loc:locInfo}}
function prepareBlock(openBlock,program,inverseAndProgram,close,inverted,locInfo){if(close&&close.path){validateClose(openBlock,close)}
var decorator=/\*/.test(openBlock.open);program.blockParams=openBlock.blockParams;var inverse=undefined,inverseStrip=undefined;if(inverseAndProgram){if(decorator){throw new _exception2['default']('Unexpected inverse block on decorator',inverseAndProgram)}
if(inverseAndProgram.chain){inverseAndProgram.program.body[0].closeStrip=close.strip}
inverseStrip=inverseAndProgram.strip;inverse=inverseAndProgram.program}
if(inverted){inverted=inverse;inverse=program;program=inverted}
return{type:decorator?'DecoratorBlock':'BlockStatement',path:openBlock.path,params:openBlock.params,hash:openBlock.hash,program:program,inverse:inverse,openStrip:openBlock.strip,inverseStrip:inverseStrip,closeStrip:close&&close.strip,loc:this.locInfo(locInfo)}}
function prepareProgram(statements,loc){if(!loc&&statements.length){var firstLoc=statements[0].loc,lastLoc=statements[statements.length-1].loc;if(firstLoc&&lastLoc){loc={source:firstLoc.source,start:{line:firstLoc.start.line,column:firstLoc.start.column},end:{line:lastLoc.end.line,column:lastLoc.end.column}}}}
return{type:'Program',body:statements,strip:{},loc:loc}}
function preparePartialBlock(open,program,close,locInfo){validateClose(open,close);return{type:'PartialBlockStatement',name:open.path,params:open.params,hash:open.hash,program:program,openStrip:open.strip,closeStrip:close&&close.strip,loc:this.locInfo(locInfo)}}}),(function(module,exports,__webpack_require__){'use strict';var _Object$create=__webpack_require__(34)['default'];var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;exports.Compiler=Compiler;exports.precompile=precompile;exports.compile=compile;var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);var _utils=__webpack_require__(5);var _ast=__webpack_require__(45);var _ast2=_interopRequireDefault(_ast);var slice=[].slice;function Compiler(){}
Compiler.prototype={compiler:Compiler,equals:function equals(other){var len=this.opcodes.length;if(other.opcodes.length!==len){return!1}
for(var i=0;i<len;i++){var opcode=this.opcodes[i],otherOpcode=other.opcodes[i];if(opcode.opcode!==otherOpcode.opcode||!argEquals(opcode.args,otherOpcode.args)){return!1}}
len=this.children.length;for(var i=0;i<len;i++){if(!this.children[i].equals(other.children[i])){return!1}}
return!0},guid:0,compile:function compile(program,options){this.sourceNode=[];this.opcodes=[];this.children=[];this.options=options;this.stringParams=options.stringParams;this.trackIds=options.trackIds;options.blockParams=options.blockParams||[];options.knownHelpers=_utils.extend(_Object$create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,'if':!0,unless:!0,'with':!0,log:!0,lookup:!0},options.knownHelpers);return this.accept(program)},compileProgram:function compileProgram(program){var childCompiler=new this.compiler(),result=childCompiler.compile(program,this.options),guid=this.guid++;this.usePartial=this.usePartial||result.usePartial;this.children[guid]=result;this.useDepths=this.useDepths||result.useDepths;return guid},accept:function accept(node){if(!this[node.type]){throw new _exception2['default']('Unknown type: '+node.type,node)}
this.sourceNode.unshift(node);var ret=this[node.type](node);this.sourceNode.shift();return ret},Program:function Program(program){this.options.blockParams.unshift(program.blockParams);var body=program.body,bodyLength=body.length;for(var i=0;i<bodyLength;i++){this.accept(body[i])}
this.options.blockParams.shift();this.isSimple=bodyLength===1;this.blockParams=program.blockParams?program.blockParams.length:0;return this},BlockStatement:function BlockStatement(block){transformLiteralToPath(block);var program=block.program,inverse=block.inverse;program=program&&this.compileProgram(program);inverse=inverse&&this.compileProgram(inverse);var type=this.classifySexpr(block);if(type==='helper'){this.helperSexpr(block,program,inverse)}else if(type==='simple'){this.simpleSexpr(block);this.opcode('pushProgram',program);this.opcode('pushProgram',inverse);this.opcode('emptyHash');this.opcode('blockValue',block.path.original)}else{this.ambiguousSexpr(block,program,inverse);this.opcode('pushProgram',program);this.opcode('pushProgram',inverse);this.opcode('emptyHash');this.opcode('ambiguousBlockValue')}
this.opcode('append')},DecoratorBlock:function DecoratorBlock(decorator){var program=decorator.program&&this.compileProgram(decorator.program);var params=this.setupFullMustacheParams(decorator,program,undefined),path=decorator.path;this.useDecorators=!0;this.opcode('registerDecorator',params.length,path.original)},PartialStatement:function PartialStatement(partial){this.usePartial=!0;var program=partial.program;if(program){program=this.compileProgram(partial.program)}
var params=partial.params;if(params.length>1){throw new _exception2['default']('Unsupported number of partial arguments: '+params.length,partial)}else if(!params.length){if(this.options.explicitPartialContext){this.opcode('pushLiteral','undefined')}else{params.push({type:'PathExpression',parts:[],depth:0})}}
var partialName=partial.name.original,isDynamic=partial.name.type==='SubExpression';if(isDynamic){this.accept(partial.name)}
this.setupFullMustacheParams(partial,program,undefined,!0);var indent=partial.indent||'';if(this.options.preventIndent&&indent){this.opcode('appendContent',indent);indent=''}
this.opcode('invokePartial',isDynamic,partialName,indent);this.opcode('append')},PartialBlockStatement:function PartialBlockStatement(partialBlock){this.PartialStatement(partialBlock)},MustacheStatement:function MustacheStatement(mustache){this.SubExpression(mustache);if(mustache.escaped&&!this.options.noEscape){this.opcode('appendEscaped')}else{this.opcode('append')}},Decorator:function Decorator(decorator){this.DecoratorBlock(decorator)},ContentStatement:function ContentStatement(content){if(content.value){this.opcode('appendContent',content.value)}},CommentStatement:function CommentStatement(){},SubExpression:function SubExpression(sexpr){transformLiteralToPath(sexpr);var type=this.classifySexpr(sexpr);if(type==='simple'){this.simpleSexpr(sexpr)}else if(type==='helper'){this.helperSexpr(sexpr)}else{this.ambiguousSexpr(sexpr)}},ambiguousSexpr:function ambiguousSexpr(sexpr,program,inverse){var path=sexpr.path,name=path.parts[0],isBlock=program!=null||inverse!=null;this.opcode('getContext',path.depth);this.opcode('pushProgram',program);this.opcode('pushProgram',inverse);path.strict=!0;this.accept(path);this.opcode('invokeAmbiguous',name,isBlock)},simpleSexpr:function simpleSexpr(sexpr){var path=sexpr.path;path.strict=!0;this.accept(path);this.opcode('resolvePossibleLambda')},helperSexpr:function helperSexpr(sexpr,program,inverse){var params=this.setupFullMustacheParams(sexpr,program,inverse),path=sexpr.path,name=path.parts[0];if(this.options.knownHelpers[name]){this.opcode('invokeKnownHelper',params.length,name)}else if(this.options.knownHelpersOnly){throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper '+name,sexpr)}else{path.strict=!0;path.falsy=!0;this.accept(path);this.opcode('invokeHelper',params.length,path.original,_ast2['default'].helpers.simpleId(path))}},PathExpression:function PathExpression(path){this.addDepth(path.depth);this.opcode('getContext',path.depth);var name=path.parts[0],scoped=_ast2['default'].helpers.scopedId(path),blockParamId=!path.depth&&!scoped&&this.blockParamIndex(name);if(blockParamId){this.opcode('lookupBlockParam',blockParamId,path.parts)}else if(!name){this.opcode('pushContext')}else if(path.data){this.options.data=!0;this.opcode('lookupData',path.depth,path.parts,path.strict)}else{this.opcode('lookupOnContext',path.parts,path.falsy,path.strict,scoped)}},StringLiteral:function StringLiteral(string){this.opcode('pushString',string.value)},NumberLiteral:function NumberLiteral(number){this.opcode('pushLiteral',number.value)},BooleanLiteral:function BooleanLiteral(bool){this.opcode('pushLiteral',bool.value)},UndefinedLiteral:function UndefinedLiteral(){this.opcode('pushLiteral','undefined')},NullLiteral:function NullLiteral(){this.opcode('pushLiteral','null')},Hash:function Hash(hash){var pairs=hash.pairs,i=0,l=pairs.length;this.opcode('pushHash');for(;i<l;i++){this.pushParam(pairs[i].value)}
while(i--){this.opcode('assignToHash',pairs[i].key)}
this.opcode('popHash')},opcode:function opcode(name){this.opcodes.push({opcode:name,args:slice.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function addDepth(depth){if(!depth){return}
this.useDepths=!0},classifySexpr:function classifySexpr(sexpr){var isSimple=_ast2['default'].helpers.simpleId(sexpr.path);var isBlockParam=isSimple&&!!this.blockParamIndex(sexpr.path.parts[0]);var isHelper=!isBlockParam&&_ast2['default'].helpers.helperExpression(sexpr);var isEligible=!isBlockParam&&(isHelper||isSimple);if(isEligible&&!isHelper){var _name=sexpr.path.parts[0],options=this.options;if(options.knownHelpers[_name]){isHelper=!0}else if(options.knownHelpersOnly){isEligible=!1}}
if(isHelper){return'helper'}else if(isEligible){return'ambiguous'}else{return'simple'}},pushParams:function pushParams(params){for(var i=0,l=params.length;i<l;i++){this.pushParam(params[i])}},pushParam:function pushParam(val){var value=val.value!=null?val.value:val.original||'';if(this.stringParams){if(value.replace){value=value.replace(/^(\.?\.\/)*/g,'').replace(/\//g,'.')}
if(val.depth){this.addDepth(val.depth)}
this.opcode('getContext',val.depth||0);this.opcode('pushStringParam',value,val.type);if(val.type==='SubExpression'){this.accept(val)}}else{if(this.trackIds){var blockParamIndex=undefined;if(val.parts&&!_ast2['default'].helpers.scopedId(val)&&!val.depth){blockParamIndex=this.blockParamIndex(val.parts[0])}
if(blockParamIndex){var blockParamChild=val.parts.slice(1).join('.');this.opcode('pushId','BlockParam',blockParamIndex,blockParamChild)}else{value=val.original||value;if(value.replace){value=value.replace(/^this(?:\.|$)/,'').replace(/^\.\//,'').replace(/^\.$/,'')}
this.opcode('pushId',val.type,value)}}
this.accept(val)}},setupFullMustacheParams:function setupFullMustacheParams(sexpr,program,inverse,omitEmpty){var params=sexpr.params;this.pushParams(params);this.opcode('pushProgram',program);this.opcode('pushProgram',inverse);if(sexpr.hash){this.accept(sexpr.hash)}else{this.opcode('emptyHash',omitEmpty)}
return params},blockParamIndex:function blockParamIndex(name){for(var depth=0,len=this.options.blockParams.length;depth<len;depth++){var blockParams=this.options.blockParams[depth],param=blockParams&&_utils.indexOf(blockParams,name);if(blockParams&&param>=0){return[depth,param]}}}};function precompile(input,options,env){if(input==null||typeof input!=='string'&&input.type!=='Program'){throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed '+input)}
options=options||{};if(!('data' in options)){options.data=!0}
if(options.compat){options.useDepths=!0}
var ast=env.parse(input,options),environment=new env.Compiler().compile(ast,options);return new env.JavaScriptCompiler().compile(environment,options)}
function compile(input,options,env){if(options===undefined)options={};if(input==null||typeof input!=='string'&&input.type!=='Program'){throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed '+input)}
options=_utils.extend({},options);if(!('data' in options)){options.data=!0}
if(options.compat){options.useDepths=!0}
var compiled=undefined;function compileInput(){var ast=env.parse(input,options),environment=new env.Compiler().compile(ast,options),templateSpec=new env.JavaScriptCompiler().compile(environment,options,undefined,!0);return env.template(templateSpec)}
function ret(context,execOptions){if(!compiled){compiled=compileInput()}
return compiled.call(this,context,execOptions)}
ret._setup=function(setupOptions){if(!compiled){compiled=compileInput()}
return compiled._setup(setupOptions)};ret._child=function(i,data,blockParams,depths){if(!compiled){compiled=compileInput()}
return compiled._child(i,data,blockParams,depths)};return ret}
function argEquals(a,b){if(a===b){return!0}
if(_utils.isArray(a)&&_utils.isArray(b)&&a.length===b.length){for(var i=0;i<a.length;i++){if(!argEquals(a[i],b[i])){return!1}}
return!0}}
function transformLiteralToPath(sexpr){if(!sexpr.path.parts){var literal=sexpr.path;sexpr.path={type:'PathExpression',data:!1,depth:0,parts:[literal.original+''],original:literal.original+'',loc:literal.loc}}}}),(function(module,exports,__webpack_require__){'use strict';var _Object$keys=__webpack_require__(13)['default'];var _interopRequireDefault=__webpack_require__(1)['default'];exports.__esModule=!0;var _base=__webpack_require__(4);var _exception=__webpack_require__(6);var _exception2=_interopRequireDefault(_exception);var _utils=__webpack_require__(5);var _codeGen=__webpack_require__(53);var _codeGen2=_interopRequireDefault(_codeGen);function Literal(value){this.value=value}
function JavaScriptCompiler(){}
JavaScriptCompiler.prototype={nameLookup:function nameLookup(parent,name){return this.internalNameLookup(parent,name)},depthedLookup:function depthedLookup(name){return[this.aliasable('container.lookup'),'(depths, ',JSON.stringify(name),')']},compilerInfo:function compilerInfo(){var revision=_base.COMPILER_REVISION,versions=_base.REVISION_CHANGES[revision];return[revision,versions]},appendToBuffer:function appendToBuffer(source,location,explicit){if(!_utils.isArray(source)){source=[source]}
source=this.source.wrap(source,location);if(this.environment.isSimple){return['return ',source,';']}else if(explicit){return['buffer += ',source,';']}else{source.appendToBuffer=!0;return source}},initializeBuffer:function initializeBuffer(){return this.quotedString('')},internalNameLookup:function internalNameLookup(parent,name){this.lookupPropertyFunctionIsUsed=!0;return['lookupProperty(',parent,',',JSON.stringify(name),')']},lookupPropertyFunctionIsUsed:!1,compile:function compile(environment,options,context,asObject){this.environment=environment;this.options=options;this.stringParams=this.options.stringParams;this.trackIds=this.options.trackIds;this.precompile=!asObject;this.name=this.environment.name;this.isChild=!!context;this.context=context||{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(environment,options);this.useDepths=this.useDepths||environment.useDepths||environment.useDecorators||this.options.compat;this.useBlockParams=this.useBlockParams||environment.useBlockParams;var opcodes=environment.opcodes,opcode=undefined,firstLoc=undefined,i=undefined,l=undefined;for(i=0,l=opcodes.length;i<l;i++){opcode=opcodes[i];this.source.currentLocation=opcode.loc;firstLoc=firstLoc||opcode.loc;this[opcode.opcode].apply(this,opcode.args)}
this.source.currentLocation=firstLoc;this.pushSource('');if(this.stackSlot||this.inlineStack.length||this.compileStack.length){throw new _exception2['default']('Compile completed with content left on stack')}
if(!this.decorators.isEmpty()){this.useDecorators=!0;this.decorators.prepend(['var decorators = container.decorators, ',this.lookupPropertyFunctionVarDeclaration(),';\n']);this.decorators.push('return fn;');if(asObject){this.decorators=Function.apply(this,['fn','props','container','depth0','data','blockParams','depths',this.decorators.merge()])}else{this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');this.decorators.push('}\n');this.decorators=this.decorators.merge()}}else{this.decorators=undefined}
var fn=this.createFunctionContext(asObject);if(!this.isChild){var ret={compiler:this.compilerInfo(),main:fn};if(this.decorators){ret.main_d=this.decorators;ret.useDecorators=!0}
var _context=this.context;var programs=_context.programs;var decorators=_context.decorators;for(i=0,l=programs.length;i<l;i++){if(programs[i]){ret[i]=programs[i];if(decorators[i]){ret[i+'_d']=decorators[i];ret.useDecorators=!0}}}
if(this.environment.usePartial){ret.usePartial=!0}
if(this.options.data){ret.useData=!0}
if(this.useDepths){ret.useDepths=!0}
if(this.useBlockParams){ret.useBlockParams=!0}
if(this.options.compat){ret.compat=!0}
if(!asObject){ret.compiler=JSON.stringify(ret.compiler);this.source.currentLocation={start:{line:1,column:0}};ret=this.objectLiteral(ret);if(options.srcName){ret=ret.toStringWithSourceMap({file:options.destName});ret.map=ret.map&&ret.map.toString()}else{ret=ret.toString()}}else{ret.compilerOptions=this.options}
return ret}else{return fn}},preamble:function preamble(){this.lastContext=0;this.source=new _codeGen2['default'](this.options.srcName);this.decorators=new _codeGen2['default'](this.options.srcName)},createFunctionContext:function createFunctionContext(asObject){var _this=this;var varDeclarations='';var locals=this.stackVars.concat(this.registers.list);if(locals.length>0){varDeclarations+=', '+locals.join(', ')}
var aliasCount=0;_Object$keys(this.aliases).forEach(function(alias){var node=_this.aliases[alias];if(node.children&&node.referenceCount>1){varDeclarations+=', alias'+ ++aliasCount+'='+alias;node.children[0]='alias'+aliasCount}});if(this.lookupPropertyFunctionIsUsed){varDeclarations+=', '+this.lookupPropertyFunctionVarDeclaration()}
var params=['container','depth0','helpers','partials','data'];if(this.useBlockParams||this.useDepths){params.push('blockParams')}
if(this.useDepths){params.push('depths')}
var source=this.mergeSource(varDeclarations);if(asObject){params.push(source);return Function.apply(this,params)}else{return this.source.wrap(['function(',params.join(','),') {\n  ',source,'}'])}},mergeSource:function mergeSource(varDeclarations){var isSimple=this.environment.isSimple,appendOnly=!this.forceBuffer,appendFirst=undefined,sourceSeen=undefined,bufferStart=undefined,bufferEnd=undefined;this.source.each(function(line){if(line.appendToBuffer){if(bufferStart){line.prepend('  + ')}else{bufferStart=line}
bufferEnd=line}else{if(bufferStart){if(!sourceSeen){appendFirst=!0}else{bufferStart.prepend('buffer += ')}
bufferEnd.add(';');bufferStart=bufferEnd=undefined}
sourceSeen=!0;if(!isSimple){appendOnly=!1}}});if(appendOnly){if(bufferStart){bufferStart.prepend('return ');bufferEnd.add(';')}else if(!sourceSeen){this.source.push('return "";')}}else{varDeclarations+=', buffer = '+(appendFirst?'':this.initializeBuffer());if(bufferStart){bufferStart.prepend('return buffer + ');bufferEnd.add(';')}else{this.source.push('return buffer;')}}
if(varDeclarations){this.source.prepend('var '+varDeclarations.substring(2)+(appendFirst?'':';\n'))}
return this.source.merge()},lookupPropertyFunctionVarDeclaration:function lookupPropertyFunctionVarDeclaration(){return'\n      lookupProperty = container.lookupProperty || function(parent, propertyName) {\n        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n          return parent[propertyName];\n        }\n        return undefined\n    }\n    '.trim()},blockValue:function blockValue(name){var blockHelperMissing=this.aliasable('container.hooks.blockHelperMissing'),params=[this.contextName(0)];this.setupHelperArgs(name,0,params);var blockName=this.popStack();params.splice(1,0,blockName);this.push(this.source.functionCall(blockHelperMissing,'call',params))},ambiguousBlockValue:function ambiguousBlockValue(){var blockHelperMissing=this.aliasable('container.hooks.blockHelperMissing'),params=[this.contextName(0)];this.setupHelperArgs('',0,params,!0);this.flushInline();var current=this.topStack();params.splice(1,0,current);this.pushSource(['if (!',this.lastHelper,') { ',current,' = ',this.source.functionCall(blockHelperMissing,'call',params),'}'])},appendContent:function appendContent(content){if(this.pendingContent){content=this.pendingContent+content}else{this.pendingLocation=this.source.currentLocation}
this.pendingContent=content},append:function append(){if(this.isInline()){this.replaceStack(function(current){return[' != null ? ',current,' : ""']});this.pushSource(this.appendToBuffer(this.popStack()))}else{var local=this.popStack();this.pushSource(['if (',local,' != null) { ',this.appendToBuffer(local,undefined,!0),' }']);if(this.environment.isSimple){this.pushSource(['else { ',this.appendToBuffer("''",undefined,!0),' }'])}}},appendEscaped:function appendEscaped(){this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'),'(',this.popStack(),')']))},getContext:function getContext(depth){this.lastContext=depth},pushContext:function pushContext(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function lookupOnContext(parts,falsy,strict,scoped){var i=0;if(!scoped&&this.options.compat&&!this.lastContext){this.push(this.depthedLookup(parts[i++]))}else{this.pushContext()}
this.resolvePath('context',parts,i,falsy,strict)},lookupBlockParam:function lookupBlockParam(blockParamId,parts){this.useBlockParams=!0;this.push(['blockParams[',blockParamId[0],'][',blockParamId[1],']']);this.resolvePath('context',parts,1)},lookupData:function lookupData(depth,parts,strict){if(!depth){this.pushStackLiteral('data')}else{this.pushStackLiteral('container.data(data, '+depth+')')}
this.resolvePath('data',parts,0,!0,strict)},resolvePath:function resolvePath(type,parts,i,falsy,strict){var _this2=this;if(this.options.strict||this.options.assumeObjects){this.push(strictLookup(this.options.strict&&strict,this,parts,type));return}
var len=parts.length;for(;i<len;i++){this.replaceStack(function(current){var lookup=_this2.nameLookup(current,parts[i],type);if(!falsy){return[' != null ? ',lookup,' : ',current]}else{return[' && ',lookup]}})}},resolvePossibleLambda:function resolvePossibleLambda(){this.push([this.aliasable('container.lambda'),'(',this.popStack(),', ',this.contextName(0),')'])},pushStringParam:function pushStringParam(string,type){this.pushContext();this.pushString(type);if(type!=='SubExpression'){if(typeof string==='string'){this.pushString(string)}else{this.pushStackLiteral(string)}}},emptyHash:function emptyHash(omitEmpty){if(this.trackIds){this.push('{}')}
if(this.stringParams){this.push('{}');this.push('{}')}
this.pushStackLiteral(omitEmpty?'undefined':'{}')},pushHash:function pushHash(){if(this.hash){this.hashes.push(this.hash)}
this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function popHash(){var hash=this.hash;this.hash=this.hashes.pop();if(this.trackIds){this.push(this.objectLiteral(hash.ids))}
if(this.stringParams){this.push(this.objectLiteral(hash.contexts));this.push(this.objectLiteral(hash.types))}
this.push(this.objectLiteral(hash.values))},pushString:function pushString(string){this.pushStackLiteral(this.quotedString(string))},pushLiteral:function pushLiteral(value){this.pushStackLiteral(value)},pushProgram:function pushProgram(guid){if(guid!=null){this.pushStackLiteral(this.programExpression(guid))}else{this.pushStackLiteral(null)}},registerDecorator:function registerDecorator(paramSize,name){var foundDecorator=this.nameLookup('decorators',name,'decorator'),options=this.setupHelperArgs(name,paramSize);this.decorators.push(['fn = ',this.decorators.functionCall(foundDecorator,'',['fn','props','container',options]),' || fn;'])},invokeHelper:function invokeHelper(paramSize,name,isSimple){var nonHelper=this.popStack(),helper=this.setupHelper(paramSize,name);var possibleFunctionCalls=[];if(isSimple){possibleFunctionCalls.push(helper.name)}
possibleFunctionCalls.push(nonHelper);if(!this.options.strict){possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing'))}
var functionLookupCode=['(',this.itemsSeparatedBy(possibleFunctionCalls,'||'),')'];var functionCall=this.source.functionCall(functionLookupCode,'call',helper.callParams);this.push(functionCall)},itemsSeparatedBy:function itemsSeparatedBy(items,separator){var result=[];result.push(items[0]);for(var i=1;i<items.length;i++){result.push(separator,items[i])}
return result},invokeKnownHelper:function invokeKnownHelper(paramSize,name){var helper=this.setupHelper(paramSize,name);this.push(this.source.functionCall(helper.name,'call',helper.callParams))},invokeAmbiguous:function invokeAmbiguous(name,helperCall){this.useRegister('helper');var nonHelper=this.popStack();this.emptyHash();var helper=this.setupHelper(0,name,helperCall);var helperName=this.lastHelper=this.nameLookup('helpers',name,'helper');var lookup=['(','(helper = ',helperName,' || ',nonHelper,')'];if(!this.options.strict){lookup[0]='(helper = ';lookup.push(' != null ? helper : ',this.aliasable('container.hooks.helperMissing'))}
this.push(['(',lookup,helper.paramsInit?['),(',helper.paramsInit]:[],'),','(typeof helper === ',this.aliasable('"function"'),' ? ',this.source.functionCall('helper','call',helper.callParams),' : helper))'])},invokePartial:function invokePartial(isDynamic,name,indent){var params=[],options=this.setupParams(name,1,params);if(isDynamic){name=this.popStack();delete options.name}
if(indent){options.indent=JSON.stringify(indent)}
options.helpers='helpers';options.partials='partials';options.decorators='container.decorators';if(!isDynamic){params.unshift(this.nameLookup('partials',name,'partial'))}else{params.unshift(name)}
if(this.options.compat){options.depths='depths'}
options=this.objectLiteral(options);params.push(options);this.push(this.source.functionCall('container.invokePartial','',params))},assignToHash:function assignToHash(key){var value=this.popStack(),context=undefined,type=undefined,id=undefined;if(this.trackIds){id=this.popStack()}
if(this.stringParams){type=this.popStack();context=this.popStack()}
var hash=this.hash;if(context){hash.contexts[key]=context}
if(type){hash.types[key]=type}
if(id){hash.ids[key]=id}
hash.values[key]=value},pushId:function pushId(type,name,child){if(type==='BlockParam'){this.pushStackLiteral('blockParams['+name[0]+'].path['+name[1]+']'+(child?' + '+JSON.stringify('.'+child):''))}else if(type==='PathExpression'){this.pushString(name)}else if(type==='SubExpression'){this.pushStackLiteral('true')}else{this.pushStackLiteral('null')}},compiler:JavaScriptCompiler,compileChildren:function compileChildren(environment,options){var children=environment.children,child=undefined,compiler=undefined;for(var i=0,l=children.length;i<l;i++){child=children[i];compiler=new this.compiler();var existing=this.matchExistingProgram(child);if(existing==null){this.context.programs.push('');var index=this.context.programs.length;child.index=index;child.name='program'+index;this.context.programs[index]=compiler.compile(child,options,this.context,!this.precompile);this.context.decorators[index]=compiler.decorators;this.context.environments[index]=child;this.useDepths=this.useDepths||compiler.useDepths;this.useBlockParams=this.useBlockParams||compiler.useBlockParams;child.useDepths=this.useDepths;child.useBlockParams=this.useBlockParams}else{child.index=existing.index;child.name='program'+existing.index;this.useDepths=this.useDepths||existing.useDepths;this.useBlockParams=this.useBlockParams||existing.useBlockParams}}},matchExistingProgram:function matchExistingProgram(child){for(var i=0,len=this.context.environments.length;i<len;i++){var environment=this.context.environments[i];if(environment&&environment.equals(child)){return environment}}},programExpression:function programExpression(guid){var child=this.environment.children[guid],programParams=[child.index,'data',child.blockParams];if(this.useBlockParams||this.useDepths){programParams.push('blockParams')}
if(this.useDepths){programParams.push('depths')}
return'container.program('+programParams.join(', ')+')'},useRegister:function useRegister(name){if(!this.registers[name]){this.registers[name]=!0;this.registers.list.push(name)}},push:function push(expr){if(!(expr instanceof Literal)){expr=this.source.wrap(expr)}
this.inlineStack.push(expr);return expr},pushStackLiteral:function pushStackLiteral(item){this.push(new Literal(item))},pushSource:function pushSource(source){if(this.pendingContent){this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation));this.pendingContent=undefined}
if(source){this.source.push(source)}},replaceStack:function replaceStack(callback){var prefix=['('],stack=undefined,createdStack=undefined,usedLiteral=undefined;if(!this.isInline()){throw new _exception2['default']('replaceStack on non-inline')}
var top=this.popStack(!0);if(top instanceof Literal){stack=[top.value];prefix=['(',stack];usedLiteral=!0}else{createdStack=!0;var _name=this.incrStack();prefix=['((',this.push(_name),' = ',top,')'];stack=this.topStack()}
var item=callback.call(this,stack);if(!usedLiteral){this.popStack()}
if(createdStack){this.stackSlot--}
this.push(prefix.concat(item,')'))},incrStack:function incrStack(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push('stack'+this.stackSlot)}
return this.topStackName()},topStackName:function topStackName(){return'stack'+this.stackSlot},flushInline:function flushInline(){var inlineStack=this.inlineStack;this.inlineStack=[];for(var i=0,len=inlineStack.length;i<len;i++){var entry=inlineStack[i];if(entry instanceof Literal){this.compileStack.push(entry)}else{var stack=this.incrStack();this.pushSource([stack,' = ',entry,';']);this.compileStack.push(stack)}}},isInline:function isInline(){return this.inlineStack.length},popStack:function popStack(wrapped){var inline=this.isInline(),item=(inline?this.inlineStack:this.compileStack).pop();if(!wrapped&&item instanceof Literal){return item.value}else{if(!inline){if(!this.stackSlot){throw new _exception2['default']('Invalid stack pop')}
this.stackSlot--}
return item}},topStack:function topStack(){var stack=this.isInline()?this.inlineStack:this.compileStack,item=stack[stack.length-1];if(item instanceof Literal){return item.value}else{return item}},contextName:function contextName(context){if(this.useDepths&&context){return'depths['+context+']'}else{return'depth'+context}},quotedString:function quotedString(str){return this.source.quotedString(str)},objectLiteral:function objectLiteral(obj){return this.source.objectLiteral(obj)},aliasable:function aliasable(name){var ret=this.aliases[name];if(ret){ret.referenceCount++;return ret}
ret=this.aliases[name]=this.source.wrap(name);ret.aliasable=!0;ret.referenceCount=1;return ret},setupHelper:function setupHelper(paramSize,name,blockHelper){var params=[],paramsInit=this.setupHelperArgs(name,paramSize,params,blockHelper);var foundHelper=this.nameLookup('helpers',name,'helper'),callContext=this.aliasable(this.contextName(0)+' != null ? '+this.contextName(0)+' : (container.nullContext || {})');return{params:params,paramsInit:paramsInit,name:foundHelper,callParams:[callContext].concat(params)}},setupParams:function setupParams(helper,paramSize,params){var options={},contexts=[],types=[],ids=[],objectArgs=!params,param=undefined;if(objectArgs){params=[]}
options.name=this.quotedString(helper);options.hash=this.popStack();if(this.trackIds){options.hashIds=this.popStack()}
if(this.stringParams){options.hashTypes=this.popStack();options.hashContexts=this.popStack()}
var inverse=this.popStack(),program=this.popStack();if(program||inverse){options.fn=program||'container.noop';options.inverse=inverse||'container.noop'}
var i=paramSize;while(i--){param=this.popStack();params[i]=param;if(this.trackIds){ids[i]=this.popStack()}
if(this.stringParams){types[i]=this.popStack();contexts[i]=this.popStack()}}
if(objectArgs){options.args=this.source.generateArray(params)}
if(this.trackIds){options.ids=this.source.generateArray(ids)}
if(this.stringParams){options.types=this.source.generateArray(types);options.contexts=this.source.generateArray(contexts)}
if(this.options.data){options.data='data'}
if(this.useBlockParams){options.blockParams='blockParams'}
return options},setupHelperArgs:function setupHelperArgs(helper,paramSize,params,useRegister){var options=this.setupParams(helper,paramSize,params);options.loc=JSON.stringify(this.source.currentLocation);options=this.objectLiteral(options);if(useRegister){this.useRegister('options');params.push('options');return['options=',options]}else if(params){params.push(options);return''}else{return options}}};(function(){var reservedWords=('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(' ');var compilerWords=JavaScriptCompiler.RESERVED_WORDS={};for(var i=0,l=reservedWords.length;i<l;i++){compilerWords[reservedWords[i]]=!0}})();JavaScriptCompiler.isValidJavaScriptVariableName=function(name){return!JavaScriptCompiler.RESERVED_WORDS[name]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name)};function strictLookup(requireTerminal,compiler,parts,type){var stack=compiler.popStack(),i=0,len=parts.length;if(requireTerminal){len--}
for(;i<len;i++){stack=compiler.nameLookup(stack,parts[i],type)}
if(requireTerminal){return[compiler.aliasable('container.strict'),'(',stack,', ',compiler.quotedString(parts[i]),', ',JSON.stringify(compiler.source.currentLocation),' )']}else{return stack}}
exports['default']=JavaScriptCompiler;module.exports=exports['default']}),(function(module,exports,__webpack_require__){'use strict';var _Object$keys=__webpack_require__(13)['default'];exports.__esModule=!0;var _utils=__webpack_require__(5);var SourceNode=undefined;try{if(!1){var SourceMap=require('source-map');SourceNode=SourceMap.SourceNode}}catch(err){}
if(!SourceNode){SourceNode=function(line,column,srcFile,chunks){this.src='';if(chunks){this.add(chunks)}};SourceNode.prototype={add:function add(chunks){if(_utils.isArray(chunks)){chunks=chunks.join('')}
this.src+=chunks},prepend:function prepend(chunks){if(_utils.isArray(chunks)){chunks=chunks.join('')}
this.src=chunks+this.src},toStringWithSourceMap:function toStringWithSourceMap(){return{code:this.toString()}},toString:function toString(){return this.src}}}
function castChunk(chunk,codeGen,loc){if(_utils.isArray(chunk)){var ret=[];for(var i=0,len=chunk.length;i<len;i++){ret.push(codeGen.wrap(chunk[i],loc))}
return ret}else if(typeof chunk==='boolean'||typeof chunk==='number'){return chunk+''}
return chunk}
function CodeGen(srcFile){this.srcFile=srcFile;this.source=[]}
CodeGen.prototype={isEmpty:function isEmpty(){return!this.source.length},prepend:function prepend(source,loc){this.source.unshift(this.wrap(source,loc))},push:function push(source,loc){this.source.push(this.wrap(source,loc))},merge:function merge(){var source=this.empty();this.each(function(line){source.add(['  ',line,'\n'])});return source},each:function each(iter){for(var i=0,len=this.source.length;i<len;i++){iter(this.source[i])}},empty:function empty(){var loc=this.currentLocation||{start:{}};return new SourceNode(loc.start.line,loc.start.column,this.srcFile)},wrap:function wrap(chunk){var loc=arguments.length<=1||arguments[1]===undefined?this.currentLocation||{start:{}}:arguments[1];if(chunk instanceof SourceNode){return chunk}
chunk=castChunk(chunk,this,loc);return new SourceNode(loc.start.line,loc.start.column,this.srcFile,chunk)},functionCall:function functionCall(fn,type,params){params=this.generateList(params);return this.wrap([fn,type?'.'+type+'(':'(',params,')'])},quotedString:function quotedString(str){return'"'+(str+'').replace(/\\/g,'\\\\').replace(/"/g,'\\"').replace(/\n/g,'\\n').replace(/\r/g,'\\r').replace(/\u2028/g,'\\u2028').replace(/\u2029/g,'\\u2029')+'"'},objectLiteral:function objectLiteral(obj){var _this=this;var pairs=[];_Object$keys(obj).forEach(function(key){var value=castChunk(obj[key],_this);if(value!=='undefined'){pairs.push([_this.quotedString(key),':',value])}});var ret=this.generateList(pairs);ret.prepend('{');ret.add('}');return ret},generateList:function generateList(entries){var ret=this.empty();for(var i=0,len=entries.length;i<len;i++){if(i){ret.add(',')}
ret.add(castChunk(entries[i],this))}
return ret},generateArray:function generateArray(entries){var ret=this.generateList(entries);ret.prepend('[');ret.add(']');return ret}};exports['default']=CodeGen;module.exports=exports['default']})])});(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof module==='object'&&typeof module.exports==='object'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(function($){var menuTrees=[],mouse=!1,touchEvents='ontouchstart' in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(callback){return setTimeout(callback,1000/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(id){clearTimeout(id)},canAnimate=!!$.fn.animate;function initMouseDetection(disable){var eNS='.smartmenus_mouse';if(!mouseDetectionEnabled&&!disable){var firstTime=!0,lastMove=null,events={'mousemove':function(e){var thisMove={x:e.pageX,y:e.pageY,timeStamp:new Date().getTime()};if(lastMove){var deltaX=Math.abs(lastMove.x-thisMove.x),deltaY=Math.abs(lastMove.y-thisMove.y);if((deltaX>0||deltaY>0)&&deltaX<=2&&deltaY<=2&&thisMove.timeStamp-lastMove.timeStamp<=300){mouse=!0;if(firstTime){var $a=$(e.target).closest('a');if($a.is('a')){$.each(menuTrees,function(){if($.contains(this.$root[0],$a[0])){this.itemEnter({currentTarget:$a[0]});return!1}})}
firstTime=!1}}}
lastMove=thisMove}};events[touchEvents?'touchstart':'pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut']=function(e){if(isTouchEvent(e.originalEvent)){mouse=!1}};$(document).on(getEventsNS(events,eNS));mouseDetectionEnabled=!0}else if(mouseDetectionEnabled&&disable){$(document).off(eNS);mouseDetectionEnabled=!1}}
function isTouchEvent(e){return!/^(4|mouse)$/.test(e.pointerType)}
function getEventsNS(events,eNS){if(!eNS){eNS=''}
var eventsNS={};for(var i in events){eventsNS[i.split(' ').join(eNS+' ')+eNS]=events[i]}
return eventsNS}
$.SmartMenus=function(elm,options){this.$root=$(elm);this.opts=options;this.rootId='';this.accessIdPrefix='';this.$subArrow=null;this.activatedItems=[];this.visibleSubMenus=[];this.showTimeout=0;this.hideTimeout=0;this.scrollTimeout=0;this.clickActivated=!1;this.focusActivated=!1;this.zIndexInc=0;this.idInc=0;this.$firstLink=null;this.$firstSub=null;this.disabled=!1;this.$disableOverlay=null;this.$touchScrollingSub=null;this.cssTransforms3d='perspective' in elm.style||'webkitPerspective' in elm.style;this.wasCollapsible=!1;this.init()};$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){while(menuTrees.length){menuTrees[0].destroy()}
initMouseDetection(!0)},prototype:{init:function(refresh){var self=this;if(!refresh){menuTrees.push(this);this.rootId=(new Date().getTime()+Math.random()+'').replace(/\D/g,'');this.accessIdPrefix='sm-'+this.rootId+'-';if(this.$root.hasClass('sm-rtl')){this.opts.rightToLeftSubMenus=!0}
var eNS='.smartmenus';this.$root.data('smartmenus',this).attr('data-smartmenus-id',this.rootId).dataSM('level',1).on(getEventsNS({'mouseover focusin':$.proxy(this.rootOver,this),'mouseout focusout':$.proxy(this.rootOut,this),'keydown':$.proxy(this.rootKeyDown,this)},eNS)).on(getEventsNS({'mouseenter':$.proxy(this.itemEnter,this),'mouseleave':$.proxy(this.itemLeave,this),'mousedown':$.proxy(this.itemDown,this),'focus':$.proxy(this.itemFocus,this),'blur':$.proxy(this.itemBlur,this),'click':$.proxy(this.itemClick,this)},eNS),'a');eNS+=this.rootId;if(this.opts.hideOnClick){$(document).on(getEventsNS({'touchstart':$.proxy(this.docTouchStart,this),'touchmove':$.proxy(this.docTouchMove,this),'touchend':$.proxy(this.docTouchEnd,this),'click':$.proxy(this.docClick,this)},eNS))}
$(window).on(getEventsNS({'resize orientationchange':$.proxy(this.winResize,this)},eNS));if(this.opts.subIndicators){this.$subArrow=$('<span/>').addClass('sub-arrow');if(this.opts.subIndicatorsText){this.$subArrow.html(this.opts.subIndicatorsText)}}
initMouseDetection()}
this.$firstSub=this.$root.find('ul').each(function(){self.menuInit($(this))}).eq(0);this.$firstLink=this.$root.find('a').eq(0);if(this.opts.markCurrentItem){var reDefaultDoc=/(index|default)\.[^#\?\/]*/i,reHash=/#.*/,locHref=window.location.href.replace(reDefaultDoc,''),locHrefNoHash=locHref.replace(reHash,'');this.$root.find('a:not(.mega-menu a)').each(function(){var href=this.href.replace(reDefaultDoc,''),$this=$(this);if(href==locHref||href==locHrefNoHash){$this.addClass('current');if(self.opts.markCurrentTree){$this.parentsUntil('[data-smartmenus-id]','ul').each(function(){$(this).dataSM('parent-a').addClass('current')})}}})}
this.wasCollapsible=this.isCollapsible()},destroy:function(refresh){if(!refresh){var eNS='.smartmenus';this.$root.removeData('smartmenus').removeAttr('data-smartmenus-id').removeDataSM('level').off(eNS);eNS+=this.rootId;$(document).off(eNS);$(window).off(eNS);if(this.opts.subIndicators){this.$subArrow=null}}
this.menuHideAll();var self=this;this.$root.find('ul').each(function(){var $this=$(this);if($this.dataSM('scroll-arrows')){$this.dataSM('scroll-arrows').remove()}
if($this.dataSM('shown-before')){if(self.opts.subMenusMinWidth||self.opts.subMenusMaxWidth){$this.css({width:'',minWidth:'',maxWidth:''}).removeClass('sm-nowrap')}
if($this.dataSM('scroll-arrows')){$this.dataSM('scroll-arrows').remove()}
$this.css({zIndex:'',top:'',left:'',marginLeft:'',marginTop:'',display:''})}
if(($this.attr('id')||'').indexOf(self.accessIdPrefix)==0){$this.removeAttr('id')}}).removeDataSM('in-mega').removeDataSM('shown-before').removeDataSM('scroll-arrows').removeDataSM('parent-a').removeDataSM('level').removeDataSM('beforefirstshowfired').removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby').removeAttr('aria-expanded');this.$root.find('a.has-submenu').each(function(){var $this=$(this);if($this.attr('id').indexOf(self.accessIdPrefix)==0){$this.removeAttr('id')}}).removeClass('has-submenu').removeDataSM('sub').removeAttr('aria-haspopup').removeAttr('aria-controls').removeAttr('aria-expanded').closest('li').removeDataSM('sub');if(this.opts.subIndicators){this.$root.find('span.sub-arrow').remove()}
if(this.opts.markCurrentItem){this.$root.find('a.current').removeClass('current')}
if(!refresh){this.$root=null;this.$firstLink=null;this.$firstSub=null;if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}
menuTrees.splice($.inArray(this,menuTrees),1)}},disable:function(noOverlay){if(!this.disabled){this.menuHideAll();if(!noOverlay&&!this.opts.isPopup&&this.$root.is(':visible')){var pos=this.$root.offset();this.$disableOverlay=$('<div class="sm-jquery-disable-overlay"/>').css({position:'absolute',top:pos.top,left:pos.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}
this.disabled=!0}},docClick:function(e){if(this.$touchScrollingSub){this.$touchScrollingSub=null;return}
if(this.visibleSubMenus.length&&!$.contains(this.$root[0],e.target)||$(e.target).closest('a').length){this.menuHideAll()}},docTouchEnd:function(e){if(!this.lastTouch){return}
if(this.visibleSubMenus.length&&(this.lastTouch.x2===undefined||this.lastTouch.x1==this.lastTouch.x2)&&(this.lastTouch.y2===undefined||this.lastTouch.y1==this.lastTouch.y2)&&(!this.lastTouch.target||!$.contains(this.$root[0],this.lastTouch.target))){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}
var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll()},350)}
this.lastTouch=null},docTouchMove:function(e){if(!this.lastTouch){return}
var touchPoint=e.originalEvent.touches[0];this.lastTouch.x2=touchPoint.pageX;this.lastTouch.y2=touchPoint.pageY},docTouchStart:function(e){var touchPoint=e.originalEvent.touches[0];this.lastTouch={x1:touchPoint.pageX,y1:touchPoint.pageY,target:touchPoint.target}},enable:function(){if(this.disabled){if(this.$disableOverlay){this.$disableOverlay.remove();this.$disableOverlay=null}
this.disabled=!1}},getClosestMenu:function(elm){var $closestMenu=$(elm).closest('ul');while($closestMenu.dataSM('in-mega')){$closestMenu=$closestMenu.parent().closest('ul')}
return $closestMenu[0]||null},getHeight:function($elm){return this.getOffset($elm,!0)},getOffset:function($elm,height){var old;if($elm.css('display')=='none'){old={position:$elm[0].style.position,visibility:$elm[0].style.visibility};$elm.css({position:'absolute',visibility:'hidden'}).show()}
var box=$elm[0].getBoundingClientRect&&$elm[0].getBoundingClientRect(),val=box&&(height?box.height||box.bottom-box.top:box.width||box.right-box.left);if(!val&&val!==0){val=height?$elm[0].offsetHeight:$elm[0].offsetWidth}
if(old){$elm.hide().css(old)}
return val},getStartZIndex:function(root){var zIndex=parseInt(this[root?'$root':'$firstSub'].css('z-index'));if(!root&&isNaN(zIndex)){zIndex=parseInt(this.$root.css('z-index'))}
return!isNaN(zIndex)?zIndex:1},getTouchPoint:function(e){return e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e},getViewport:function(height){var name=height?'Height':'Width',val=document.documentElement['client'+name],val2=window['inner'+name];if(val2){val=Math.min(val,val2)}
return val},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function($elm){return this.getOffset($elm)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function($a){return this.handleEvents()&&!this.isLinkInMegaMenu($a)},isCollapsible:function(){return this.$firstSub.css('position')=='static'},isCSSOn:function(){return this.$firstLink.css('display')!='inline'},isFixed:function(){var isFixed=this.$root.css('position')=='fixed';if(!isFixed){this.$root.parentsUntil('body').each(function(){if($(this).css('position')=='fixed'){isFixed=!0;return!1}})}
return isFixed},isLinkInMegaMenu:function($a){return $(this.getClosestMenu($a[0])).hasClass('mega-menu')},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function($a,hideDeeperSubs){var $ul=$a.closest('ul'),level=$ul.dataSM('level');if(level>1&&(!this.activatedItems[level-2]||this.activatedItems[level-2][0]!=$ul.dataSM('parent-a')[0])){var self=this;$($ul.parentsUntil('[data-smartmenus-id]','ul').get().reverse()).add($ul).each(function(){self.itemActivate($(this).dataSM('parent-a'))})}
if(!this.isCollapsible()||hideDeeperSubs){this.menuHideSubMenus(!this.activatedItems[level-1]||this.activatedItems[level-1][0]!=$a[0]?level-1:level)}
this.activatedItems[level-1]=$a;if(this.$root.triggerHandler('activate.smapi',$a[0])===!1){return}
var $sub=$a.dataSM('sub');if($sub&&(this.isTouchMode()||(!this.opts.showOnClick||this.clickActivated))){this.menuShow($sub)}},itemBlur:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return}
this.$root.triggerHandler('blur.smapi',$a[0])},itemClick:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return}
if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==$a.closest('ul')[0]){this.$touchScrollingSub=null;e.stopPropagation();return!1}
if(this.$root.triggerHandler('click.smapi',$a[0])===!1){return!1}
var $sub=$a.dataSM('sub'),firstLevelSub=$sub?$sub.dataSM('level')==2:!1;if($sub){var subArrowClicked=$(e.target).is('.sub-arrow'),collapsible=this.isCollapsible(),behaviorToggle=/toggle$/.test(this.opts.collapsibleBehavior),behaviorLink=/link$/.test(this.opts.collapsibleBehavior),behaviorAccordion=/^accordion/.test(this.opts.collapsibleBehavior);if(!$sub.is(':visible')){if(!behaviorLink||!collapsible||subArrowClicked){if(this.opts.showOnClick&&firstLevelSub){this.clickActivated=!0}
this.itemActivate($a,behaviorAccordion);if($sub.is(':visible')){this.focusActivated=!0;return!1}}}else if(collapsible&&(behaviorToggle||subArrowClicked)){this.itemActivate($a,behaviorAccordion);this.menuHide($sub);if(behaviorToggle){this.focusActivated=!1}
return!1}}
if(this.opts.showOnClick&&firstLevelSub||$a.hasClass('disabled')||this.$root.triggerHandler('select.smapi',$a[0])===!1){return!1}},itemDown:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return}
$a.dataSM('mousedown',!0)},itemEnter:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return}
if(!this.isTouchMode()){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}
var self=this;this.showTimeout=setTimeout(function(){self.itemActivate($a)},this.opts.showOnClick&&$a.closest('ul').dataSM('level')==1?1:this.opts.showTimeout)}
this.$root.triggerHandler('mouseenter.smapi',$a[0])},itemFocus:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return}
if(this.focusActivated&&(!this.isTouchMode()||!$a.dataSM('mousedown'))&&(!this.activatedItems.length||this.activatedItems[this.activatedItems.length-1][0]!=$a[0])){this.itemActivate($a,!0)}
this.$root.triggerHandler('focus.smapi',$a[0])},itemLeave:function(e){var $a=$(e.currentTarget);if(!this.handleItemEvents($a)){return}
if(!this.isTouchMode()){$a[0].blur();if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}}
$a.removeDataSM('mousedown');this.$root.triggerHandler('mouseleave.smapi',$a[0])},menuHide:function($sub){if(this.$root.triggerHandler('beforehide.smapi',$sub[0])===!1){return}
if(canAnimate){$sub.stop(!0,!0)}
if($sub.css('display')!='none'){var complete=function(){$sub.css('z-index','')};if(this.isCollapsible()){if(canAnimate&&this.opts.collapsibleHideFunction){this.opts.collapsibleHideFunction.call(this,$sub,complete)}else{$sub.hide(this.opts.collapsibleHideDuration,complete)}}else{if(canAnimate&&this.opts.hideFunction){this.opts.hideFunction.call(this,$sub,complete)}else{$sub.hide(this.opts.hideDuration,complete)}}
if($sub.dataSM('scroll')){this.menuScrollStop($sub);$sub.css({'touch-action':'','-ms-touch-action':'','-webkit-transform':'',transform:''}).off('.smartmenus_scroll').removeDataSM('scroll').dataSM('scroll-arrows').hide()}
$sub.dataSM('parent-a').removeClass('highlighted').attr('aria-expanded','false');$sub.attr({'aria-expanded':'false','aria-hidden':'true'});var level=$sub.dataSM('level');this.activatedItems.splice(level-1,1);this.visibleSubMenus.splice($.inArray($sub,this.visibleSubMenus),1);this.$root.triggerHandler('hide.smapi',$sub[0])}},menuHideAll:function(){if(this.showTimeout){clearTimeout(this.showTimeout);this.showTimeout=0}
var level=this.opts.isPopup?1:0;for(var i=this.visibleSubMenus.length-1;i>=level;i--){this.menuHide(this.visibleSubMenus[i])}
if(this.opts.isPopup){if(canAnimate){this.$root.stop(!0,!0)}
if(this.$root.is(':visible')){if(canAnimate&&this.opts.hideFunction){this.opts.hideFunction.call(this,this.$root)}else{this.$root.hide(this.opts.hideDuration)}}}
this.activatedItems=[];this.visibleSubMenus=[];this.clickActivated=!1;this.focusActivated=!1;this.zIndexInc=0;this.$root.triggerHandler('hideAll.smapi')},menuHideSubMenus:function(level){for(var i=this.activatedItems.length-1;i>=level;i--){var $sub=this.activatedItems[i].dataSM('sub');if($sub){this.menuHide($sub)}}},menuInit:function($ul){if(!$ul.dataSM('in-mega')){if($ul.hasClass('mega-menu')){$ul.find('ul').dataSM('in-mega',!0)}
var level=2,par=$ul[0];while((par=par.parentNode.parentNode)!=this.$root[0]){level++}
var $a=$ul.prevAll('a').eq(-1);if(!$a.length){$a=$ul.prevAll().find('a').eq(-1)}
$a.addClass('has-submenu').dataSM('sub',$ul);$ul.dataSM('parent-a',$a).dataSM('level',level).parent().dataSM('sub',$ul);var aId=$a.attr('id')||this.accessIdPrefix+(++this.idInc),ulId=$ul.attr('id')||this.accessIdPrefix+(++this.idInc);$a.attr({id:aId,'aria-haspopup':'true','aria-controls':ulId,'aria-expanded':'false'});$ul.attr({id:ulId,'role':'group','aria-hidden':'true','aria-labelledby':aId,'aria-expanded':'false'});if(this.opts.subIndicators){$a[this.opts.subIndicatorsPos](this.$subArrow.clone())}}},menuPosition:function($sub){var $a=$sub.dataSM('parent-a'),$li=$a.closest('li'),$ul=$li.parent(),level=$sub.dataSM('level'),subW=this.getWidth($sub),subH=this.getHeight($sub),itemOffset=$a.offset(),itemX=itemOffset.left,itemY=itemOffset.top,itemW=this.getWidth($a),itemH=this.getHeight($a),$win=$(window),winX=$win.scrollLeft(),winY=$win.scrollTop(),winW=this.getViewportWidth(),winH=this.getViewportHeight(),horizontalParent=$ul.parent().is('[data-sm-horizontal-sub]')||level==2&&!$ul.hasClass('sm-vertical'),rightToLeft=this.opts.rightToLeftSubMenus&&!$li.is('[data-sm-reverse]')||!this.opts.rightToLeftSubMenus&&$li.is('[data-sm-reverse]'),subOffsetX=level==2?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,subOffsetY=level==2?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY,x,y;if(horizontalParent){x=rightToLeft?itemW-subW-subOffsetX:subOffsetX;y=this.opts.bottomToTopSubMenus?-subH-subOffsetY:itemH+subOffsetY}else{x=rightToLeft?subOffsetX-subW:itemW-subOffsetX;y=this.opts.bottomToTopSubMenus?itemH-subOffsetY-subH:subOffsetY}
if(this.opts.keepInViewport){var absX=itemX+x,absY=itemY+y;if(rightToLeft&&absX<winX){x=horizontalParent?winX-absX+x:itemW-subOffsetX}else if(!rightToLeft&&absX+subW>winX+winW){x=horizontalParent?winX+winW-subW-absX+x:subOffsetX-subW}
if(!horizontalParent){if(subH<winH&&absY+subH>winY+winH){y+=winY+winH-subH-absY}else if(subH>=winH||absY<winY){y+=winY-absY}}
if(horizontalParent&&(absY+subH>winY+winH+0.49||absY<winY)||!horizontalParent&&subH>winH+0.49){var self=this;if(!$sub.dataSM('scroll-arrows')){$sub.dataSM('scroll-arrows',$([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],$('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).on({mouseenter:function(){$sub.dataSM('scroll').up=$(this).hasClass('scroll-up');self.menuScroll($sub)},mouseleave:function(e){self.menuScrollStop($sub);self.menuScrollOut($sub,e)},'mousewheel DOMMouseScroll':function(e){e.preventDefault()}}).insertAfter($sub))}
var eNS='.smartmenus_scroll';$sub.dataSM('scroll',{y:this.cssTransforms3d?0:y-itemH,step:1,itemH:itemH,subH:subH,arrowDownH:this.getHeight($sub.dataSM('scroll-arrows').eq(1))}).on(getEventsNS({'mouseover':function(e){self.menuScrollOver($sub,e)},'mouseout':function(e){self.menuScrollOut($sub,e)},'mousewheel DOMMouseScroll':function(e){self.menuScrollMousewheel($sub,e)}},eNS)).dataSM('scroll-arrows').css({top:'auto',left:'0',marginLeft:x+(parseInt($sub.css('border-left-width'))||0),width:subW-(parseInt($sub.css('border-left-width'))||0)-(parseInt($sub.css('border-right-width'))||0),zIndex:$sub.css('z-index')}).eq(horizontalParent&&this.opts.bottomToTopSubMenus?0:1).show();if(this.isFixed()){var events={};events[touchEvents?'touchstart touchmove touchend':'pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp']=function(e){self.menuScrollTouch($sub,e)};$sub.css({'touch-action':'none','-ms-touch-action':'none'}).on(getEventsNS(events,eNS))}}}
$sub.css({top:'auto',left:'0',marginLeft:x,marginTop:y-itemH})},menuScroll:function($sub,once,step){var data=$sub.dataSM('scroll'),$arrows=$sub.dataSM('scroll-arrows'),end=data.up?data.upEnd:data.downEnd,diff;if(!once&&data.momentum){data.momentum*=0.92;diff=data.momentum;if(diff<0.5){this.menuScrollStop($sub);return}}else{diff=step||(once||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(data.step))}
var level=$sub.dataSM('level');if(this.activatedItems[level-1]&&this.activatedItems[level-1].dataSM('sub')&&this.activatedItems[level-1].dataSM('sub').is(':visible')){this.menuHideSubMenus(level-1)}
data.y=data.up&&end<=data.y||!data.up&&end>=data.y?data.y:(Math.abs(end-data.y)>diff?data.y+(data.up?diff:-diff):end);$sub.css(this.cssTransforms3d?{'-webkit-transform':'translate3d(0, '+data.y+'px, 0)',transform:'translate3d(0, '+data.y+'px, 0)'}:{marginTop:data.y});if(mouse&&(data.up&&data.y>data.downEnd||!data.up&&data.y<data.upEnd)){$arrows.eq(data.up?1:0).show()}
if(data.y==end){if(mouse){$arrows.eq(data.up?0:1).hide()}
this.menuScrollStop($sub)}else if(!once){if(this.opts.scrollAccelerate&&data.step<this.opts.scrollStep){data.step+=0.2}
var self=this;this.scrollTimeout=requestAnimationFrame(function(){self.menuScroll($sub)})}},menuScrollMousewheel:function($sub,e){if(this.getClosestMenu(e.target)==$sub[0]){e=e.originalEvent;var up=(e.wheelDelta||-e.detail)>0;if($sub.dataSM('scroll-arrows').eq(up?0:1).is(':visible')){$sub.dataSM('scroll').up=up;this.menuScroll($sub,!0)}}
e.preventDefault()},menuScrollOut:function($sub,e){if(mouse){if(!/^scroll-(up|down)/.test((e.relatedTarget||'').className)&&($sub[0]!=e.relatedTarget&&!$.contains($sub[0],e.relatedTarget)||this.getClosestMenu(e.relatedTarget)!=$sub[0])){$sub.dataSM('scroll-arrows').css('visibility','hidden')}}},menuScrollOver:function($sub,e){if(mouse){if(!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==$sub[0]){this.menuScrollRefreshData($sub);var data=$sub.dataSM('scroll'),upEnd=$(window).scrollTop()-$sub.dataSM('parent-a').offset().top-data.itemH;$sub.dataSM('scroll-arrows').eq(0).css('margin-top',upEnd).end().eq(1).css('margin-top',upEnd+this.getViewportHeight()-data.arrowDownH).end().css('visibility','visible')}}},menuScrollRefreshData:function($sub){var data=$sub.dataSM('scroll'),upEnd=$(window).scrollTop()-$sub.dataSM('parent-a').offset().top-data.itemH;if(this.cssTransforms3d){upEnd=-(parseFloat($sub.css('margin-top'))-upEnd)}
$.extend(data,{upEnd:upEnd,downEnd:upEnd+this.getViewportHeight()-data.subH})},menuScrollStop:function($sub){if(this.scrollTimeout){cancelAnimationFrame(this.scrollTimeout);this.scrollTimeout=0;$sub.dataSM('scroll').step=1;return!0}},menuScrollTouch:function($sub,e){e=e.originalEvent;if(isTouchEvent(e)){var touchPoint=this.getTouchPoint(e);if(this.getClosestMenu(touchPoint.target)==$sub[0]){var data=$sub.dataSM('scroll');if(/(start|down)$/i.test(e.type)){if(this.menuScrollStop($sub)){e.preventDefault();this.$touchScrollingSub=$sub}else{this.$touchScrollingSub=null}
this.menuScrollRefreshData($sub);$.extend(data,{touchStartY:touchPoint.pageY,touchStartTime:e.timeStamp})}else if(/move$/i.test(e.type)){var prevY=data.touchY!==undefined?data.touchY:data.touchStartY;if(prevY!==undefined&&prevY!=touchPoint.pageY){this.$touchScrollingSub=$sub;var up=prevY<touchPoint.pageY;if(data.up!==undefined&&data.up!=up){$.extend(data,{touchStartY:touchPoint.pageY,touchStartTime:e.timeStamp})}
$.extend(data,{up:up,touchY:touchPoint.pageY});this.menuScroll($sub,!0,Math.abs(touchPoint.pageY-prevY))}
e.preventDefault()}else{if(data.touchY!==undefined){if(data.momentum=Math.pow(Math.abs(touchPoint.pageY-data.touchStartY)/(e.timeStamp-data.touchStartTime),2)*15){this.menuScrollStop($sub);this.menuScroll($sub);e.preventDefault()}
delete data.touchY}}}}},menuShow:function($sub){if(!$sub.dataSM('beforefirstshowfired')){$sub.dataSM('beforefirstshowfired',!0);if(this.$root.triggerHandler('beforefirstshow.smapi',$sub[0])===!1){return}}
if(this.$root.triggerHandler('beforeshow.smapi',$sub[0])===!1){return}
$sub.dataSM('shown-before',!0);if(canAnimate){$sub.stop(!0,!0)}
if(!$sub.is(':visible')){var $a=$sub.dataSM('parent-a'),collapsible=this.isCollapsible();if(this.opts.keepHighlighted||collapsible){$a.addClass('highlighted')}
if(collapsible){$sub.removeClass('sm-nowrap').css({zIndex:'',width:'auto',minWidth:'',maxWidth:'',top:'',left:'',marginLeft:'',marginTop:''})}else{$sub.css('z-index',this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1);if(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth){$sub.css({width:'auto',minWidth:'',maxWidth:''}).addClass('sm-nowrap');if(this.opts.subMenusMinWidth){$sub.css('min-width',this.opts.subMenusMinWidth)}
if(this.opts.subMenusMaxWidth){var noMaxWidth=this.getWidth($sub);$sub.css('max-width',this.opts.subMenusMaxWidth);if(noMaxWidth>this.getWidth($sub)){$sub.removeClass('sm-nowrap').css('width',this.opts.subMenusMaxWidth)}}}
this.menuPosition($sub)}
var complete=function(){$sub.css('overflow','')};if(collapsible){if(canAnimate&&this.opts.collapsibleShowFunction){this.opts.collapsibleShowFunction.call(this,$sub,complete)}else{$sub.show(this.opts.collapsibleShowDuration,complete)}}else{if(canAnimate&&this.opts.showFunction){this.opts.showFunction.call(this,$sub,complete)}else{$sub.show(this.opts.showDuration,complete)}}
$a.attr('aria-expanded','true');$sub.attr({'aria-expanded':'true','aria-hidden':'false'});this.visibleSubMenus.push($sub);this.$root.triggerHandler('show.smapi',$sub[0])}},popupHide:function(noHideTimeout){if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}
var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll()},noHideTimeout?1:this.opts.hideTimeout)},popupShow:function(left,top){if(!this.opts.isPopup){alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.');return}
if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}
this.$root.dataSM('shown-before',!0);if(canAnimate){this.$root.stop(!0,!0)}
if(!this.$root.is(':visible')){this.$root.css({left:left,top:top});var self=this,complete=function(){self.$root.css('overflow','')};if(canAnimate&&this.opts.showFunction){this.opts.showFunction.call(this,this.$root,complete)}else{this.$root.show(this.opts.showDuration,complete)}
this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0);this.init(!0)},rootKeyDown:function(e){if(!this.handleEvents()){return}
switch(e.keyCode){case 27:var $activeTopItem=this.activatedItems[0];if($activeTopItem){this.menuHideAll();$activeTopItem[0].focus();var $sub=$activeTopItem.dataSM('sub');if($sub){this.menuHide($sub)}}
break;case 32:var $target=$(e.target);if($target.is('a')&&this.handleItemEvents($target)){var $sub=$target.dataSM('sub');if($sub&&!$sub.is(':visible')){this.itemClick({currentTarget:e.target});e.preventDefault()}}
break}},rootOut:function(e){if(!this.handleEvents()||this.isTouchMode()||e.target==this.$root[0]){return}
if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}
if(!this.opts.showOnClick||!this.opts.hideOnClick){var self=this;this.hideTimeout=setTimeout(function(){self.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(e){if(!this.handleEvents()||this.isTouchMode()||e.target==this.$root[0]){return}
if(this.hideTimeout){clearTimeout(this.hideTimeout);this.hideTimeout=0}},winResize:function(e){if(!this.handleEvents()){if(this.$disableOverlay){var pos=this.$root.offset();this.$disableOverlay.css({top:pos.top,left:pos.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}
return}
if(!('onorientationchange' in window)||e.type=='orientationchange'){var collapsible=this.isCollapsible();if(!(this.wasCollapsible&&collapsible)){if(this.activatedItems.length){this.activatedItems[this.activatedItems.length-1][0].blur()}
this.menuHideAll()}
this.wasCollapsible=collapsible}}}});$.fn.dataSM=function(key,val){if(val){return this.data(key+'_smartmenus',val)}
return this.data(key+'_smartmenus')};$.fn.removeDataSM=function(key){return this.removeData(key+'_smartmenus')};$.fn.smartmenus=function(options){if(typeof options=='string'){var args=arguments,method=options;Array.prototype.shift.call(args);return this.each(function(){var smartmenus=$(this).data('smartmenus');if(smartmenus&&smartmenus[method]){smartmenus[method].apply(smartmenus,args)}})}
return this.each(function(){var dataOpts=$(this).data('sm-options')||null;if(dataOpts){try{dataOpts=eval('('+dataOpts+')')}catch(e){dataOpts=null;alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}}
new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})};$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:'10em',subMenusMaxWidth:'20em',subIndicators:!0,subIndicatorsPos:'append',subIndicatorsText:'',scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function($ul,complete){$ul.fadeOut(200,complete)},collapsibleShowDuration:0,collapsibleShowFunction:function($ul,complete){$ul.slideDown(200,complete)},collapsibleHideDuration:0,collapsibleHideFunction:function($ul,complete){$ul.slideUp(200,complete)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:'default'};return $}));function initTypeaheadForSearchField(elements){elements.each(function(){element=$(this);let minLength=parseInt(element.data('autocomplete-min-length'));if(Number.isNaN(minLength)||minLength<=0){minLength=3}
element.typeahead({hint:!0,minLength:minLength,highlight:!0},{limit:20,name:'my-dataset',async:!0,display:'value',templates:{suggestion:function(suggestion){return'<div>'+suggestion.show+'</div>'}},input_element:$(this),www:{css:{wrapper:{display:'block'}}},source:function(query,processSync,processAsync){var ajaxUrl='';var input_element=$(this.$el[0].parentElement.parentElement).children("input").first();if(input_element&&input_element.data('autocomplete-url')){ajaxUrl=input_element.data('autocomplete-url')}
if(ajaxUrl===''||query.indexOf("*")!==-1){this.cancel();return}
query="*"+query+"*";var requestdata={tx_solr:{q:query}};if(typeof ajaxUrl.replaceAll==='function'){return $.post(ajaxUrl.replaceAll("&amp;","&"),requestdata,function(data){return processAsync(data)})}else{this.cancel();return}}}).on('typeahead:asynccancel typeahead:asyncreceive',function(){$(this).removeClass('inputloading')}).on('typeahead:selected',function(e){var input_element=$(e.currentTarget);if(input_element.data('submit-on-select')){var form=input_element.parents('form').first();if(form){form.submit()}}})})}
$(document).ready(function(){$('form.tx-solr-search-product-references').on('submit',function(e){e.preventDefault();let $form=$(e.target);let reference=$form.find('input.tx-solr-q.tt-input').val();$form.find('input#product-references-filter').val('product_references_stringM:"'+reference+'"');$form.unbind('submit');$form.submit()})});
/*! js-cookie v3.0.0-beta.3 | MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,r=e.Cookies=t();r.noConflict=function(){return e.Cookies=n,r}}())}(this,function(){"use strict";var e={read:function(e){return e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function n(r,o){function i(e,n,i){if("undefined"!=typeof document){"number"==typeof(i=t({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),n=r.write(n,e),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=e+"="+n+c}}return Object.create({set:i,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],o={},i=0;i<n.length;i++){var c=n[i].split("="),u=c.slice(1).join("=");'"'===u[0]&&(u=u.slice(1,-1));try{var f=e.read(c[0]);if(o[f]=r.read(u,f),t===f)break}catch(e){}}return t?o[t]:o}},remove:function(e,n){i(e,"",t({},n,{expires:-1}))},withAttributes:function(e){return n(this.converter,t({},this.attributes,e))},withConverter:function(e){return n(t({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(r)}})}(e,{path:"/"})});var maintext='Indem Sie die Website und ihre Angebote nutzen und weiter navigieren, akzeptieren Sie die notwendigen Cookies. In den <button class="btn btn-link" style="padding: 0;border: 0;line-height: 1.5;display: contents;" onclick="DldvT3ConsentManagementOpenModal()">Cookie-Einstellungen</button> können Sie die Cookie-Kategorien verwalten und zusätzliche Kategorien zulassen. Wenn Sie auf den Button „Akzeptieren“ klicken, werden alle Cookie-Kategorien aktiviert. Sie können Ihre Einwilligung jederzeit mit Wirkung für die Zukunft widerrufen. Weitere Informationen finden Sie in unserer Cookie-Richtlinie sowie unserem <a style="color: #005B9F;font-weight: 500;text-decoration: none;" href="'+$('#dv-t3-consent-management-modal').find('.modalHeader a').first().attr('href')+'" target="_blank" title="Datenschutzhinweis">Datenschutzhinweis</a> und <a style="color: #005B9F;font-weight: 500;text-decoration: none;" href="'+$('#dv-t3-consent-management-modal').find('.modalFooter a').first().attr('href')+'" title="Impressum">Impressum</a>.';var button='Alle akzeptieren';var alertCompareMessage='Sie benötigen mindestens 2 Produkte, um einen Vergleich durchführen zu können';var lightboxClose='Schließen';var lightboxCounter='<span class="mfp-counter">%curr% von %total%</span>';window.gaLoaded=!1;window.addEventListener('cookieConsent',function(event){if(event.detail.hasOption('_ga_*')){if(!1===window.gaLoaded){window.gaLoaded=!0;let gtmScript=document.createElement('script');gtmScript.innerHTML='window.initialReferrer = document.referrer;\n'+'Object.defineProperty(document, "referrer", {get : function(){\n'+'urlParams = new URLSearchParams(window.location.search);\n'+'forwardedReferrer = urlParams.get(\'dv_t3_referrer\');\n'+'if (forwardedReferrer) return forwardedReferrer;\n'+'return window.initialReferrer; \n'+'}});\n'+'(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\':\n'+'new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0],\n'+'j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src=\'https://www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);\n'+'})(window,document,\'script\',\'dataLayer\',\'GTM-N4LD6PQ\');';if(window.gaLoaded===!0){let head=document.head;head.insertBefore(gtmScript,head.lastChild)}}}else{if(!1!==window.gaLoaded){window.location.reload();window.gaLoaded=!1}}});function styledSelect(selector){$(selector).each(function(){var $this=$(this),numberOfOptions=$(this).children('option').length;if(!$this.is('select')){return}
$this.addClass('d-none');$this.wrap('<div class="select-styled-container"></div>');$this.after('<div class="select-styled"></div>');var $styledSelect=$this.next('div.select-styled');$styledSelect.text($this.children('option').eq(0).text());$styledSelect.after('<div class="select-options-container"></div>');var $listContainer=$styledSelect.next('div.select-options-container');var $list=$('<div />',{class:'select-options'}).appendTo($listContainer);for(var i=0;i<numberOfOptions;i++){$('<div />',{class:'select-option',text:$this.children('option').eq(i).text(),rel:$this.children('option').eq(i).val(),'data-hide':$this.children('option').eq(i).data('hide')}).appendTo($list);if($this.children('option').eq(i).is(':selected')){$('div[rel="'+$this.children('option').eq(i).val()+'"]').addClass('is-selected')}}
var $listItems=$list.children('.select-option');$styledSelect.click(function(e){e.stopPropagation();$('div.select-styled.active').not(this).each(function(){$(this).removeClass('active').next('.select-options-container').hide()});$(this).toggleClass('active').next('.select-options-container').toggle()});$listItems.click(function(e){e.stopPropagation();$styledSelect.text($(this).text()).removeClass('active');$this.val($(this).attr('rel'));$list.find('.select-option.is-selected').removeClass('is-selected');$list.find('.select-option[rel="'+$(this).attr('rel')+'"]').addClass('is-selected');$listContainer.hide();$this.change()});$(document).click(function(){$styledSelect.removeClass('active');$listContainer.hide()})})}
$.loadScript=function(url,callback){$.ajax({url:url,dataType:'script',success:callback,async:!0})};$.loadStyle=function(url){var link=document.createElement("link");link.href=url;link.type="text/css";link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)};(function(){var panelTriggers=document.getElementsByClassName('js-cd-panel-trigger');if(panelTriggers.length>0){for(var i=0;i<panelTriggers.length;i++){(function(i){var panelClass='js-cd-panel-'+panelTriggers[i].getAttribute('data-panel'),panel=document.getElementsByClassName(panelClass)[0];panelTriggers[i].addEventListener('click',function(event){event.preventDefault();addClass(panel,'cd-panel--is-visible')});panel.addEventListener('click',function(event){if(hasClass(event.target,'js-cd-close')||hasClass(event.target,panelClass)){event.preventDefault();removeClass(panel,'cd-panel--is-visible')}})})(i)}}
function hasClass(el,className){if(el.classList)return el.classList.contains(className);else return!!el.className.match(new RegExp('(\\s|^)'+className+'(\\s|$)'))}
function addClass(el,className){if(el.classList)el.classList.add(className);else if(!hasClass(el,className))el.className+=" "+className}
function removeClass(el,className){if(el.classList)el.classList.remove(className);else if(hasClass(el,className)){var reg=new RegExp('(\\s|^)'+className+'(\\s|$)');el.className=el.className.replace(reg,' ')}}})();$(document).ready(function(){$('.submenu.level-2').each(function(_,element){if($(window).width()>991){$(element).find('li').each(function(index,element){if(index>=4){$(element).hide()}})}});$('.show-more-navigation').click(function(){let show=$(this).attr('data-show');if(show==='more'){$(this).parent().find('li').each(function(index,element){$(element).show()});$(this).attr('data-show','less');$(this).find('.less').css('opacity','1').css('visibility','visible');$(this).find('.more').css('opacity','0').css('visibility','hidden')}else{$(this).parent().find('li').each(function(index,element){if(index>=3){$(element).hide()}});$(this).attr('data-show','more');$(this).find('.less').css('opacity','0').css('visibility','hidden');$(this).find('.more').css('opacity','1').css('visibility','visible')}});if($('.sub-menu-title').hasClass('active')){$('.sub-menu-title.active').next().find('li').each(function(index,element){$(element).show()});$('.sub-menu-title.active').next().children('.show-more-navigation').attr('data-show','less');$('.sub-menu-title.active').next().find('.less').css('opacity','1').css('visibility','visible');$('.sub-menu-title.active').next().find('.more').css('opacity','0').css('visibility','hidden')}});$(window).resize(function(){$('.submenu.level-2').each(function(_,element){if($(window).width()>991){$(element).find('li').each(function(index,element){if(index>=4){$(element).hide()}})}else{$(element).find('li').each(function(index,element){$(element).show()})}})});(function($){var $window=$(window),$html=$('.detail-product-description');function resize(){if($window.width()<768){return $html.addClass('cd-panel cd-panel--from-right js-cd-panel-main')}
$html.removeClass('cd-panel cd-panel--from-right js-cd-panel-main')}
$window.resize(resize).trigger('resize')})(jQuery);window.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('.panel-counselor').forEach(function(element){element.removeAttribute("style")});document.querySelectorAll('.cd-panel').forEach(function(element){element.removeAttribute("style")});document.querySelectorAll('.detail-product-description').forEach(function(element){element.removeAttribute("style")})});$(document).ready(function(){$(".panel-trigger-counselor").click(function(e){if(e.target.parentElement.children.length!==1){$(".cd-panel__content").animate({scrollTop:0},100)}
$(".panel-trigger-counselor").addClass('active');$("#panel-counselor").attr("style","transform:translateX(0%);");$('html').addClass('stop-scrolling')});$(".panel-counselor-close").click(function(){$(".panel-trigger-counselor").removeClass('active');$("#panel-counselor").attr("style","transform:translateX(108%);");$('html').removeClass('stop-scrolling');var uri=window.location.toString();if(uri.indexOf("#")>0){var clean_uri=uri.substring(0,uri.indexOf("#"));window.history.replaceState({},document.title,clean_uri)}});$("#panel-compare-close").click(function(){$("#panel-compare").attr("style","transform:translateX(108%);");$('html').removeClass('stop-scrolling')});$("#panel-counselor select[data-panel-menu]").each(function(){var menu=$(this);var panelContent=menu.parents('.cd-panel__content').first();var headlineIndex=0;var headlines=[];panelContent.find('h2:not(.panel-menu-ignore)').each(function(){var headlineText=$(this).text();if(headlineText!==''){headlines[headlineIndex]=headlineText}
headlineIndex++});menu.find('option').first().attr('data-hide','hide');for(var index in headlines){menu.append('<option value="'+index+'">'+headlines[index]+'</option>')}
menu.change(function(){var menu=$(this);var panelContent=menu.parents('.cd-panel__content').first();var headerIndex=menu.val();if(headerIndex===''){return}
var headerElement=panelContent.find('h2:not(.panel-menu-ignore):eq('+headerIndex+')');if(typeof headerElement=='undefined'){return}
var diff=panelContent.offset().top;if(panelContent.find('.panel-menu-sticky-container').length>0){var stickyContainer=panelContent.find('.panel-menu-sticky-container').first();diff+=stickyContainer.height()}
diff+=$(document).scrollTop();var currentOffset=panelContent.scrollTop();var calcOffset=headerElement.offset().top+currentOffset-diff;panelContent.animate({scrollTop:calcOffset},1000);menu.val('');menu.blur()})});styledSelect('#panel-counselor select[data-panel-menu]');$('#panel-counselor .panel-menu-sticky-container').each(function(){var container=$(this);var sticky=container.find('.sticky').first();var paddingContainerOuter=sticky.find('.padding-container-outer').first();var paddingContainerInner=sticky.find('.padding-container-inner').first();var stickyContent=sticky.find('.panel-menu-sticky-content').first();var panelHeader=container.parents('#panel-counselor').first().find('.cd-panel__header').first();var content=container.parents('#panel-counselor').first().find('.cd-panel__content').first();sticky.css('top',panelHeader.height()+'px');paddingContainerOuter.css('padding-right',content.css('padding-right'));paddingContainerInner.css('padding-right',content.css('padding-left'));container.height(sticky.outerHeight());stickyContent.css('padding-top',container.position().top+'px')});$(window).on("load",function(){$('.read-more-container').each(function(){var container=$(this);var content=container.find('.read-more-content').first();var button=container.find('.read-more-trigger').first();var row=container.parents('.cd-panel__content .row').first();var resizeSiblingImageHeight=container.is('.resize-sibling-image-height')&&window.innerWidth>991;container.addClass('expanded');var containerMaxH=content.height();container.removeClass('expanded');container.data('maxH',containerMaxH);button.click(function(){var button=$(this);var container=button.parents('.read-more-container').first();var content=container.find('.read-more-content').first();var maxH=container.data('maxH');var resizeSiblingImageHeight=container.is('.resize-sibling-image-height');var item=container.parents('.row .item').first();if(resizeSiblingImageHeight&&item.length===1){resizeImages=getSiblingImagesOnSameLevel(item);if(resizeImages.length>0){for(var i in resizeImages){resizeImages[i].find('img').each(function(){var image=$(this);var imageMaxH=image.data('maxH');image.animate({'max-height':imageMaxH+'px'},250,0,function(){$(this).css('max-height','none')})})}}}
button.hide();content.animate({'max-height':maxH+'px'},250,0,function(){$(this).parents('.read-more-container').first().addClass('expanded')})});if(resizeSiblingImageHeight&&row.length===1){var item=container.parents('.row .item').first();var otherColumns=getSiblingColumns(item);var resizeImages=[];if(item.length===1){resizeImages=getSiblingImagesOnSameLevel(item)}
if(resizeImages.length>0){otherColumns.hide();button.hide();var compressedHeight=item.height();otherColumns.show();button.show();for(var i in resizeImages){resizeImages[i].find('img').each(function(){var image=$(this);var maxH=image.height();image.data('maxH',maxH);image.css('max-height',compressedHeight+'px')})}}}})});$(document).mouseup(function(e){var container=$(".panel-counselor");var modal=$(".mfp-ready");if(!container.is(e.target)&&container.has(e.target).length===0&&modal.has(e.target).length===0){$(".panel-trigger-counselor").removeClass('active');$(".panel-counselor").attr("style","transform:translateX(108%);");$('html').removeClass('stop-scrolling');var uri=window.location.toString();if(uri.indexOf("#")>0){var clean_uri=uri.substring(0,uri.indexOf("#"));window.history.replaceState({},document.title,clean_uri)}}});$('.bookmark').click(function(){$("#panel-compare").attr("style","transform:translateX(0%);");$('body').addClass('stop-scrolling');$('html').addClass('stop-scrolling');$('#panel-compare-loader').show();$('#panel-compare-content').hide();ajaxUrl=generateBookmarkCompareAjaxUrl('remember',COOKIE_BOOKMARK);$('#panel-compare-content').load(ajaxUrl,function(){$('#panel-compare-loader').hide();$('#panel-compare-content').show();var updateValueContainer=$('#panel-compare-content #remember-update-cookie-value');if(updateValueContainer.length){var updateValue=updateValueContainer.val();setCookieStringValues(COOKIE_BOOKMARK,updateValue);cookieBookmarkNumber=getCookieValueNumbers(COOKIE_BOOKMARK);$('.bookmark').each(function(){$(this).text(cookieBookmarkNumber)})}})});function compareOverflow(){if($('#panel-compare-content .table-wrap').width()<$('#panel-compare-content .table-wrap').prop('scrollWidth')){$('#panel-compare-content .table-wrap').addClass('overflow');$('.table-clone th').addClass('overflow');$('.compare-navigation').removeClass('hidden')}else{$('#panel-compare-content .table-wrap').removeClass('overflow');$('.table-clone th').removeClass('overflow');$('.compare-navigation').addClass('hidden')}}
function compareNavigation(){$('.compare-navigation').find('.compare-navigation-prev, .compare-navigation-next').click(function(e){e.preventDefault();var container=$(this).parents('.card').first().find('.table-wrap').first();var direction=$(this).is('.compare-navigation-prev')?-1:1;var sideHeadSize=container.find('th').first().outerWidth();var currentOffset=container.scrollLeft();var scrollToOffset=null;container.find('table tbody .product-compare-elem').not('.hidden').each(function(){var offset=$(this).offset().left-$(this).parent().offset().left;var difference=offset-currentOffset-sideHeadSize;if(direction===1&&difference>0){scrollToOffset=offset;currentOffset=container.scrollLeft();return!1}
if(direction===-1){if(difference>=0){return!1}else{scrollToOffset=offset}}});if(scrollToOffset!==null){container.animate({scrollLeft:scrollToOffset-sideHeadSize},100)}})}
window.addEventListener("resize",compareOverflow,compareNavigation);$('.product-remember-remove').click(function(){compareOverflow();compareNavigation()});$('.compare').click(function(){cookieProducts=getCookieValueNumbers(COOKIE_COMPARE);if(cookieProducts<2){alert(alertCompareMessage)}else{$("#panel-compare").attr("style","transform:translateX(0%);");$('body').addClass('stop-scrolling');$('html').addClass('stop-scrolling');$('#panel-compare-loader').show();$('#panel-compare-content').hide();ajaxUrl=generateBookmarkCompareAjaxUrl('compare',COOKIE_COMPARE);$('#panel-compare-content').load(ajaxUrl,function(){$('#panel-compare-loader').hide();$('#panel-compare-content').show();var updateValueContainer=$('#panel-compare-content #compare-update-cookie-value');if(updateValueContainer.length){var updateValue=updateValueContainer.val();setCookieStringValues(COOKIE_COMPARE,updateValue);cookieCompareNumber=getCookieValueNumbers(COOKIE_COMPARE);$('.compare').each(function(){$(this).text(cookieCompareNumber)});compareOverflow();compareNavigation()}})}})});function getSiblingColumns(item){var row=item.parents('.row').first();var columnIndex=Array.prototype.indexOf.call(item[0].parentNode.children,item[0]);return row.children('.item').not(':nth-child('+(columnIndex+1)+')')}
function getSiblingImagesOnSameLevel(item){var otherColumns=getSiblingColumns(item);var images=[];if(otherColumns.length>0){otherColumns.each(function(){var column=$(this);var columnImages=column.find('.ce-image').toArray();for(var i in columnImages){var columnImage=$(columnImages[i]);if(columnImage.parents('.item').first()[0]===this){images.push(columnImage)}}})}
return images}
function mobileHeaderHeight(){var height=$("header").height();document.documentElement.style.setProperty("--mobile-header-height",`${height}px`)}
$(document).ready(function(){mobileHeaderHeight()});window.addEventListener("resize",mobileHeaderHeight);var observer=new MutationObserver(function(mutations){mobileHeaderHeight()});var target=document.querySelector('.additional-functions');observer.observe(target,{attributes:!0});function panelHeaderHeight(){var height=$(".cd-panel__header").height();document.documentElement.style.setProperty("--panel-header-height",`${height}px`)}
panelHeaderHeight();window.addEventListener("resize",panelHeaderHeight);generateBookmarkCompareAjaxUrl=function(action,cookieName){ajaxUrl=basePath?basePath:'/';ajaxUrl+='?type='+bookmarkComparePageType+'&tx_dlproducts_products[controller]=Product'+'&tx_dlproducts_products[action]='+action+'&tx_dlproducts_products[uidList]='+getCookieStringValues(cookieName);return ajaxUrl}
$(window).on('load resize scroll',function(){var win=$(this);if(win.innerWidth()>=992){if($(document).scrollTop()>111.75){$('#header .header-bottom-sticky').addClass('sticky').css({'z-index':'999998'});$('#mainContent').css({'padding-top':'51px'});$('#header').removeClass('sticky')}else{$('#header .header-bottom-sticky').removeClass('sticky');$('#mainContent').css({'padding-top':'0'});$('#header').removeClass('sticky')}}
if($(this).innerWidth()<992){$('#mainContent').css({'padding-top':'0'});$('#header .header-bottom-sticky').removeClass('sticky');$('#header').addClass('sticky')}});$(function(){$('#main-menu').smartmenus({subMenusSubOffsetX:1,subMenusSubOffsetY:-8})});$(function(){var $mainMenuState=$('#main-menu-state');if($mainMenuState.length){$mainMenuState.change(function(e){var $menu=$('#main-menu');if(this.checked){$menu.hide().slideDown(250,function(){$menu.css('display','')})}else{$menu.show().slideUp(250,function(){$menu.css('display','')})}});$(window).bind('beforeunload unload',function(){if($mainMenuState[0].checked){$mainMenuState[0].click()}})}
$('.sub-menu-title .sub-arrow').on('click',function(event){event.preventDefault();event.stopPropagation();let parent=$(event.target).parent('.sub-menu-title');if(parent.hasClass('highlighted')){parent.removeClass('highlighted');parent.next('.submenu.level-2.mobile-none').css('display','none')}else{parent.addClass('highlighted');parent.next('.submenu.level-2.mobile-none').css('display','block')}})});$(document).ready(function(){if($('.selectpicker').length){$.loadScript('/typo3conf/ext/tmpl/Resources/Public/Js/select2.min.js',function(){$('.selectpicker').select2({closeOnSelect:!1,allowHtml:!1,allowClear:!1,tags:!1,templateSelection:function(data){if(data.id!==''){return data.element.parentNode.getAttribute('data-placeholder')}
return data.text}});$('#attributes-container .selectpicker').select2({closeOnSelect:!1,allowHtml:!1,allowClear:!1,tags:!1,dropdownParent:$('#attributes-container'),templateSelection:function(data){if(data.id!==''){return data.element.parentNode.getAttribute('data-placeholder')}
return data.text}});$('#attributes-container .selectpicker').on('select2:opening select2:closing',function(event){var $searchfield=$(this).parent().find('.select2-search__field');$searchfield.prop('readonly',!0)});$('#attributes-container .selectpicker').on('select2:open',function(e){const evt="scroll.select2";$(e.target).parents().off(evt);$(window).off(evt)});$('#product-form .selectpicker, .tx-powermail .selectpicker').select2({closeOnSelect:!1,allowHtml:!1,allowClear:!1,tags:!1,templateSelection:function(data){if(data.id!==''){}
return data.text}})})}});$(window).scroll(function(){if($(this).scrollTop()>400){$('.mobile-help-nav').fadeIn()}else{$('.mobile-help-nav').fadeOut()}});$(window).scroll(function(){if($(this).scrollTop()>400){$('.scrollup').fadeIn()}else{$('.scrollup').fadeOut()}});$('.cd-panel__content').scroll(function(){if($(this).scrollTop()>400){$('.scrollupcouncellor').fadeIn()}else{$('.scrollupcouncellor').fadeOut()}});$('.scrollup').click(function(){$("html, body").animate({scrollTop:0},600);return!1});$('.scrollupcouncellor').click(function(){$(".cd-panel__content").animate({scrollTop:0},600);return!1});$('.anchor-link').click(function(){$("html, body").animate({scrollTop:$('#'+this.hash.substr(1)).offset().top-250},1000);return!1});$('.industries-anchor-link').click(function(){$("html, body").animate({scrollTop:$('#'+this.hash.substr(1)).offset().top-75},1000);return!1});if($('#panel-counselor a[href^="ref:"]').length){let referenceContainer=$('#panel-counselor .reference-container');let referenceList='<ul>';let refIndex=0;$('#panel-counselor a[href^="ref:"]').each(function(){refIndex++;let refLink=$(this);let refCiteId='ref-cite-'+refIndex;let refNoteId='ref-note-'+refIndex;let refContent=decodeURIComponent(refLink.attr('href').substring(4));refLink.attr('href','#'+refNoteId);refLink.attr('id',refCiteId);refLink.addClass('anchor-link-councellor');let refName=refLink.text();refLink.text('['+refName+']');refLink.wrap('<sup></sup>');referenceList+='<li id="'+refNoteId+'">'+refName+'. <a href="#'+refCiteId+'" class="anchor-link-councellor">^</a> '+refContent+'</li>'});referenceList+='</ul>';referenceContainer.append(referenceList)}
let currentOffset;let pageOffset;$('.panel-trigger-counselor').click(function(){$('#panel-counselor img').removeAttr('loading');$('#panel-counselor img').attr('loading','eager')});$('.anchor-link-councellor').click(function(){var height=$(".cd-panel__header").height();currentOffset=$(".cd-panel__content").scrollTop();pageOffset=$(document).scrollTop();var calcOffset=$('#'+this.hash.substr(1)).offset().top+currentOffset-height-pageOffset;$(".cd-panel__content").animate({scrollTop:calcOffset},1000);return!1});function toggleShowAttributeFilters(){var opened=$(this).hasClass('read-less');if(opened){$(this).html('<i class="fal fa-chevron-down"></i> '+more).removeClass('read-less');$('.dl-product-attribute-rows').siblings('.dl-product-attribute-rows.toggleable').slideUp();$('.dl-product-attributes').siblings('.dl-product-attributes.toggleable-attributes').slideUp()}else{$(this).html('<i class="fal fa-chevron-up"></i> '+less).addClass('read-less');$('.dl-product-attribute-rows').siblings('.dl-product-attribute-rows.toggleable').slideDown();$('.dl-product-attributes').siblings('.dl-product-attributes.toggleable-attributes').slideDown()}}
if($('.tx-dl-products #attributes-container').length>0){$('.tx-dl-products #attributes-container').each(function(){if(($(this).find('.dl-product-attribute-rows').length>1)&&($(this).find('.dl-product-attributes').length>1)){$('.dl-product-attribute-rows',this).eq(0).nextAll().hide().addClass('toggleable');$('.dl-product-attributes',this).eq(3).nextAll().hide().addClass('toggleable-attributes');$(this).append('<div class="read-more"><i class="fal fa-chevron-down"></i> '+more+'</div>')}
$(this).on('click','.read-more',toggleShowAttributeFilters)})}
$(document).on('click','.scroll-button',function(event){event.preventDefault();$('html, body').animate({scrollTop:$($.attr(this,'href')).offset().top-70},1000)});$(document).ready(function(){if($('.lightbox').length){$.loadStyle('/typo3conf/ext/tmpl/Resources/Public/Css/magnific-popup.css');$.loadScript('/typo3conf/ext/tmpl/Resources/Public/Js/jquery.magnific-popup.min.js',function(){$('.lightbox').magnificPopup({type:'image',mainClass:'mfp-img-mobile',gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]}})})}
if(window.location.hash.substr(1)!=''){const hash=window.location.hash.substr(1);if('#'+hash!=''&&$('#panel-counselor').find('#'+hash).length>0){$(".panel-trigger-counselor").trigger("click");setTimeout(function(){document.querySelector('#'+hash).scrollIntoView({behavior:'smooth'})},500)}}
initTypeaheadForSearchField($('#header .search-form form input[data-autocomplete-url]'));initTypeaheadForSearchField($('.tx-solr-search-form form input[data-autocomplete-url]'));if($('.math-tex').length){var script=document.createElement('script');script.src='/typo3conf/ext/tmpl/Resources/Public/Js/ckedior_Plugin/MathJax/MathJax.js?config=TeX-AMS_HTML';document.body.appendChild(script)}});$(document).ready(function(){const cookieConsentButton=$('#cookie-banner-content .cookie-consent-open');cookieConsentButton.on('click',function(event){event.preventDefault();$('#cookie-consent .consent-modal').css('display','block');$('#cookie-consent .cookie-banner').css('display','none')});document.getElementById('cookie-banner-content-toggle').addEventListener('click',function(e){e.preventDefault();var button=e.target;var content=document.getElementById('cookie-banner-content');button.classList.add('hide');content.classList.add('show')})});$(window).resize(function(){var width=$(window).width();if(width<=575){$('.site-footer .gridWrap .row').addClass('accordion');$('.site-footer .gridWrap .row').attr('id','accordion');$('.site-footer .gridWrap .row .footer-menu:gt(0)').addClass('card');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').addClass('card-header');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').addClass('collapsed');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').attr({'data-toggle':'collapse','aria-expanded':'true'});var cnt=0;$(".site-footer .gridWrap .row .footer-menu:gt(0) .footer").each(function(){$(this).attr('data-target',function(index){return"#collapse"+cnt});$(this).attr('aria-controls',function(index){return"collapse"+cnt});cnt++});$('.site-footer .gridWrap .row .footer-menu ul').each(function(){var me=$(this);if(me.parent('.collapse').length==0){me.wrap("<div class='collapse' data-parent='#accordion'></div>");me.addClass('card-body')}});var item=0;$(".site-footer .gridWrap .row .footer-menu .collapse").each(function(){$(this).attr('id',function(index){return"collapse"+item});$(this).attr('aria-labelledby',function(index){return"heading"+item});item++})}else{$('.site-footer .gridWrap .row').removeClass('accordion');$('.site-footer .gridWrap .row').removeAttr('id');$('.site-footer .gridWrap .row .footer-menu:gt(0)').removeClass('card');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').removeClass('card-header');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').removeClass('collapsed');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').removeAttr('data-toggle');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').removeAttr('aria-expanded');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').removeAttr('data-target');$('.site-footer .gridWrap .row .footer-menu:gt(0) .footer').removeAttr('aria-controls');$('.site-footer .gridWrap .row .footer-menu').find('div.collapse').contents().unwrap();$('.site-footer .gridWrap .row .footer-menu ul').removeClass('card-body');$(".site-footer .gridWrap .row .footer-menu .collapse").removeAttr('id');$(".site-footer .gridWrap .row .footer-menu .collapse").removeAttr('aria-labelledby')}});$(window).resize().trigger('resize');$(document).ready(function(){if($('.random-image-slider').length>0){var slideCount=$('.random-image-slider > div').length;var randomStart=Math.floor(Math.random()*slideCount);tns({startIndex:randomStart,container:'.random-image-slider',items:1,navPosition:'bottom',controlsText:['',''],lazyload:!0})}});$(document).ready(function(){$('.career-slider--container.two-slides').each(function(index){const container=$('.career-slider--container.two-slides')[index];const slider=tns({container:container,startIndex:0,items:1,responsive:{768:{items:2}},gutter:30,nav:!1,controlsText:['',''],controlsPosition:'bottom',lazyload:!0})})});$(document).ready(function(){$('.career-slider--container.three-slides').each(function(index){const container=$('.career-slider--container.three-slides')[index];const currentSlider=$('.career-slider--container.three-slides').eq(index);const slider=tns({container:container,startIndex:0,items:1,responsive:{768:{items:2},1200:{items:3}},gutter:30,nav:!1,controlsText:['',''],controlsPosition:'bottom',lazyload:!0});function updateSlideClass(){const activeSlides=currentSlider.find('.tns-slide-active');activeSlides.removeClass('tns-slide-blue');if(window.innerWidth>=1200&&activeSlides.length>=3){activeSlides.eq(1).addClass('tns-slide-blue')}}
updateSlideClass();slider.events.on('indexChanged',function(){updateSlideClass()});window.addEventListener('resize',function(){updateSlideClass()})})});$(document).ready(function(){$('.career-big-slider--container').each(function(index){const container=$('.career-big-slider--container')[index];const slider=tns({container:container,startIndex:0,items:1,nav:!1,controlsText:['',''],controlsPosition:'bottom',lazyload:!0})})});function equalizeHeight(myClass){var maxHeight=0;$(myClass).each(function(){if($(this).height()>maxHeight){maxHeight=$(this).height()}});$(myClass).height(maxHeight)}
function initEqualHeight(myClass){setTimeout(equalizeHeight(myClass),1000);window.addEventListener('resize',function(event){$(myClass).height("auto");setTimeout(equalizeHeight(myClass),1000)})}
initEqualHeight('.equal-height');let scrollY;$('.main-menu-btn').on('click',function(){if($('html').hasClass('no-scrolling')){$('html').removeClass('no-scrolling');window.scrollTo(0,scrollY)}else{$('html').addClass('no-scrolling');scrollY=window.scrollY}});$('.cd-btn').on('click',function(){$('html').addClass('no-scrolling');scrollY=window.scrollY});$('.cd-panel__close ').on('click',function(){$('html').removeClass('no-scrolling');window.scrollTo(0,scrollY)});$('.toggleSearch').click(function(){$('#search-mobile').slideToggle();if($('#search-mobile').is(":visible")){$('#search-mobile .tt-input').focus();$('#mainContent, .footer').click(function(){$('#search-mobile').slideUp();setTimeout(function(){mobileHeaderHeight()},500)})}});document.querySelectorAll('picture img').forEach(function(element){let height=element.getAttribute("height");if(!height>0){element.addEventListener('load',hideFallback);return}
hideFallback();function hideFallback(){document.querySelectorAll('.fallback').forEach(function(element){let fallbackImg=element.parentElement.parentElement.querySelector('.fallback')
if(fallbackImg){fallbackImg.style.display='none';element.style.display='none'}})}});const COOKIE_SEPARATOR=',';const COOKIE_BOOKMARK='product_bookmark';const COOKIE_COMPARE='product_compare';deleteCookieValue=function(cookieName,value){var oldCookie=Cookies.get(cookieName);if(oldCookie){oldCookieArr=oldCookie.split(COOKIE_SEPARATOR)}else{oldCookieArr=new Array()}
for(i=0;i<oldCookieArr.length;i++){if(value==oldCookieArr[i]){oldCookieArr.splice(i,1);newCookie=oldCookieArr.join(COOKIE_SEPARATOR);Cookies.set(cookieName,newCookie);return oldCookieArr.length}}
return oldCookieArr.length}
getCookieValueNumbers=function(cookieName){var oldCookie=Cookies.get(cookieName);if(oldCookie){oldCookieArr=oldCookie.split(COOKIE_SEPARATOR);return oldCookieArr.length}else{return 0}}
addCookieValue=function(cookieName,value){var oldCookie=Cookies.get(cookieName);if(oldCookie){oldCookieArr=oldCookie.split(COOKIE_SEPARATOR)}else{oldCookieArr=new Array()}
for(i=0;i<oldCookieArr.length;i++){if(value==oldCookieArr[i]){return oldCookieArr.length}}
oldCookieArr.push(value);countCookies=oldCookieArr.length;newCookie=oldCookieArr.join(COOKIE_SEPARATOR);if(newCookie!=''){Cookies.set(cookieName,newCookie)}
return countCookies}
getCookieStringValues=function(cookieName){return Cookies.get(cookieName)}
setCookieStringValues=function(cookieName,value){return Cookies.set(cookieName,value)}
deleteProductFromBookmark=function(productUid){$('#product-remember-elem-id-'+productUid).remove();countCookies=deleteCookieValue(COOKIE_BOOKMARK,productUid);$('.bookmark').each(function(){$(this).text(countCookies)});return!1}
deleteProductFromCompare=function(productUid){theId='product-compare-elem-id-'+productUid;refElem=$('#'+theId);refElemIterator=null;compareTable=refElem.parents('.table-for-compare');i=0;refElem.parents('.table-for-compare').find('tr').first().find('td').each(function(){if($(this).attr('id')==theId){refElemIterator=i}
i++});if(refElemIterator!==null){refElem.parents('.table-for-compare').find('tr').each(function(){$(this).find('td').eq(refElemIterator).remove()})}
countCookies=deleteCookieValue(COOKIE_COMPARE,productUid);$('.compare').each(function(){$(this).text(countCookies)});if(compareTable.find('tr').first().find('td').length==0){if($('#panel-compare-content .nav-tabs li:visible a:not(.active)').length>0){$('#panel-compare-content .nav-tabs li a.active').first().parent().hide();$('#panel-compare-content .nav-tabs li:visible a:not(.active)').first().click()}else{$('#panel-compare-close').click()}}
return!1}
$(document).ready(function(){cookieBookmarkNumber=getCookieValueNumbers(COOKIE_BOOKMARK);$('.bookmark').each(function(){$(this).text(cookieBookmarkNumber)});cookieCompareNumber=getCookieValueNumbers(COOKIE_COMPARE);$('.compare').each(function(){$(this).text(cookieCompareNumber)});if(cookieBookmarkNumber>0||cookieCompareNumber>0){$('.bookmark-compare-wrapper').show()}
$('.product-bookmark-button').click(function(e){e.preventDefault();countCookies=addCookieValue(COOKIE_BOOKMARK,$(this).data('product'));$('.bookmark').each(function(){$(this).text(countCookies)});$('.bookmark-compare-wrapper').show();$('.additional-functions').addClass('cbutton--click');setTimeout(function(){$('.additional-functions').removeClass('cbutton--click')},6000)});$('.product-compare-button').click(function(e){e.preventDefault();countCookies=addCookieValue(COOKIE_COMPARE,$(this).data('product'));$('.compare').each(function(){$(this).text(countCookies)});$('.bookmark-compare-wrapper').show();$('.additional-functions').addClass('cbutton--click');setTimeout(function(){$('.additional-functions').removeClass('cbutton--click')},6000)})});$(function(){$('[data-toggle="tooltooltip"]').tooltip()});$('[data-toggle="tooltip"]').tooltip({trigger:'hover'});$('.product-icons img').on('shown.bs.tooltip',function(){$('.tooltip').addClass('product-icon-tooltip')});$('.product-icons img').on('show.bs.tooltip',function(){$('.tooltip').addClass('product-icon-tooltip')});$('.tooltip-filter').on('shown.bs.tooltip',function(){$('.tooltip').addClass('product-filter-tooltip')});$('.tooltip-filter').on('show.bs.tooltip',function(){$('.tooltip').addClass('product-filter-tooltip')});let forms=document.querySelectorAll('form');forms.forEach(function(form){form.addEventListener('submit',function(){if(form.checkValidity()===!0){document.getElementById('pageloader').style.display='block'}else{document.getElementById('pageloader').style.display='none'}})});var stickyBar=document.querySelector('#sticky-bar');if(stickyBar){var stickyBarMobileTrigger=stickyBar.querySelector('#sticky-bar-trigger');stickyBarMobileTrigger.addEventListener('click',function(){if(stickyBar.classList.contains('mobile-show')){stickyBar.classList.remove('mobile-show')}else{stickyBar.classList.add('mobile-show')}});$("body").on("click",function(){$('.sticky-side-nav .side-nav-li').delay(1000).removeClass('hover_effect')})}
window.addEventListener("DOMContentLoaded",onLoadFunction);function onLoadFunction(e){onResizeFunction();window.addEventListener("resize",onResizeFunction)}
function onResizeFunction(e){let root=document.documentElement;let secondContainer=document.querySelector('.section-industries-header .second-container');if(secondContainer){root.style.setProperty('--second-container',secondContainer.offsetHeight+"px")}}