vendor: 89,947 bytes, lines 1-2
1/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 2!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,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},S=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||S).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.3",E=function(e,t){return new E.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)}E.fn=E.prototype={jquery:f,constructor:E,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=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(n){return this.pushStack(E.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(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(E.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},E.extend=E.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&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,a[t]=E.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},E.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=y.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))?E.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:v}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.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,S,y,s,c,v,E="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+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=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,S)){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))&&v(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+" "]&&(!y||!y.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)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector(:is("+c+"))"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$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[E]=!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 ye(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 ve(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,S=!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.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),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=E,!C.getElementsByName||!C.getElementsByName(E).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&&S){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&&S){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&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.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&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.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)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=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&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(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&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.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),v(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,!S):void 0;return void 0!==r?r:d.attributes||!S?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($," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,y){var v="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===y?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=v!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(v){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)[E]||(a[E]={}))[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)[E]||(a[E]={}))[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[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=y)===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[E]?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(B,"$1"));return s[E]?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=S?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:ye(function(){return[0]}),last:ye(function(e,t){return[t-1]}),eq:ye(function(e,t,n){return[n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(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[E]||(e[E]={}))[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,y,v,e){return y&&!y[E]&&(y=Ce(y)),v&&!v[E]&&(v=Ce(v,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?v||(e?d:l||y)?[]:t:f;if(g&&g(f,p,n,r),y){i=Te(p,u),y(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(v||d){if(v){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);v(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),v?v(null,t,p,r):H.apply(t,p)})}function Se(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))[E]){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(B,"$1"),t,s<n&&Se(e.slice(s,n)),n<r&&Se(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(B," ")}),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,y,v,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Se(t[n]))[E]?i.push(a):o.push(a);(a=A(e,(y=o,m=0<(v=i).length,x=0<y.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=!S);while(s=y[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=v[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+v.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&&S&&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)&&ve(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,!S,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},d.sortStable=E.split("").sort(j).join("")===E,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);E.find=d,E.expr=d.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=d.uniqueSort,E.text=d.getText,E.isXMLDoc=d.isXML,E.contains=d.contains,E.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&&E(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=E.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)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1<i.call(n,e)!==r}):E.filter(n,e,r)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,function(e){return 1===e.nodeType}))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter(function(){for(t=0;t<r;t++)if(E.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,i[t],n);return 1<r?E.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)?E(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.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 E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.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(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);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}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&E(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&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(E(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(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.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),E.merge([],e.childNodes))}},function(r,i){E.fn[r]=function(e,t){var n=E.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=E.filter(t,n)),1<this.length&&(H[r]||E.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])}}E.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},E.each(e.match(P)||[],function(e,t){n[t]=!0}),n):E.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){E.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 E.each(arguments,function(e,t){var n;while(-1<(n=E.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<E.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},E.extend({Deferred:function(e){var o=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.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 E.Deferred(function(r){E.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){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(E.Deferred.getStackHook&&(t.stackTrace=E.Deferred.getStackHook()),C.setTimeout(t))}}return E.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?E.extend(e,a):a}},s={};return E.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=E.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$/;E.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)},E.readyException=function(e){C.setTimeout(function(){throw e})};var F=E.Deferred();function $(){S.removeEventListener("DOMContentLoaded",$),C.removeEventListener("load",$),E.ready()}E.fn.ready=function(e){return F.then(e)["catch"](function(e){E.readyException(e)}),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0)!==e&&0<--E.readyWait||F.resolveWith(S,[E])}}),E.ready.then=F.then,"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?C.setTimeout(E.ready):(S.addEventListener("DOMContentLoaded",$),C.addEventListener("load",$));var B=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)B(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(E(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=E.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||E.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&&!E.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}E.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)}}),E.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)}):B(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)})}}),E.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,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){E.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:E.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),E.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?E.queue(this[0],t):void 0===n?this:this.each(function(){var e=E.queue(this,t,n);E._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&E.dequeue(this,t)})},dequeue:function(e){return this.each(function(){E.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.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=S.documentElement,ie=function(e){return E.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return E.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"===E.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=s(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),c=e.nodeType&&(E.cssNumber[t]||"px"!==l&&+u)&&te.exec(E.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)E.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.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=E.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}E.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)?E(this).show():E(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=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",v.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 ye(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)?E.merge([e],n):n}function ve(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,v.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))E.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]+E.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;E.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<E.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(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 S.activeElement}catch(e){}}()==("focus"===t)}function Se(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)Se(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 E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}function Ee(e,i,o){o?(Y.set(e,i,!1),E.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)(E.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:E.event.trigger(E.extend(r[0],E.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&E.event.add(e,i,we)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(re,i),n.guid||(n.guid=E.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(e){return"undefined"!=typeof E&&E.event.triggered!==e.type?E.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=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.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),E.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.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=E.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,y.handle)||E.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=E.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=E.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=((E.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<E(i,this).index(l):E.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(E.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[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(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)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.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&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.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()}},E.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},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},function(t,e){E.event.special[t]={setup:function(){return Ee(this,t,Ce),!1},trigger:function(){return Ee(this,t),!0},_default:function(e){return Y.get(e.target,t)},delegateType:e}}),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){E.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||E.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),E.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(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(){E.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")&&E(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++)E.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=E.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&&!v.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=E.map(ye(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=E.clone(u,!0,!0),s&&E.merge(a,ye(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,E.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&E.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._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?E.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}E.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(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(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||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=E.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]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?E.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&&(E.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return E.clone(this,e,t)})},html:function(e){return B(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=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(ye(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;E.inArray(this,n)<0&&(E.cleanData(ye(this)),t&&t.replaceChild(e,this))},n)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){E.fn[e]=function(e){for(var t,n=[],r=E(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),E(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ie=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},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return(n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace($e,"$1")||void 0),""!==a||ie(e)||(a=E.style(e,t)),!v.pixelBoxStyles()&&Pe.test(a)&&We.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function _e(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=S.createElement("div"),l=S.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,E.extend(v,{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=S.createElement("table"),t=S.createElement("tr"),n=S.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 ze=["Webkit","Moz","ms"],Ue=S.createElement("div").style,Xe={};function Ve(e){var t=E.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(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+=E.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=E.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=E.css(e,"border"+ne[a]+"Width",!0,i))):(u+=E.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=E.css(e,"border"+ne[a]+"Width",!0,i):s+=E.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 Ze(e,t,n){var r=Me(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(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=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=E.cssHooks[t]||E.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]||(E.cssNumber[s]?"":"px")),v.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 Re.test(t)||(t=Ve(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],function(e,u){E.cssHooks[u]={get:function(e,t,n){if(t)return!Ge.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):Ie(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Me(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===E.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=E.css(e,u)),Je(0,t,s)}}}),E.cssHooks.marginLeft=_e(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),E.each({margin:"",padding:"",border:"Width"},function(i,o){E.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&&(E.cssHooks[i+o].set=Je)}),E.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=E.css(e,t[a],!1,r);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)},e,t,1<arguments.length)}}),((E.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=E.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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.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=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=et.prototype.init,E.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===S.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,E.fx.interval),E.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(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 ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=E.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),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:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=E.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=E.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=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return E.map(c,ct,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),E.fx.timer(E.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(ft,{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],ft.tweeners[n]=ft.tweeners[n]||[],ft.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),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=E._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--,E.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||E.style(e,r)}if((u=!E.isEmptyObject(t))||!E.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=E.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=E.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.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||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)E.style(e,r,d[r])})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"==typeof e?E.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.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&&E.dequeue(this,r.queue)},r},E.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=E.isEmptyObject(t),o=E.speed(e,n,r),a=function(){var e=ft(this,E.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=E.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&&at.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||E.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=E.timers,o=n?n.length:0;for(t.finish=!0,E.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})}}),E.each(["toggle","show","hide"],function(e,r){var i=E.fn[r];E.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),E.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){E.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),tt=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){nt||(nt=!0,st())},E.fx.stop=function(){nt=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(r,e){return r=E.fx&&E.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)}})},rt=S.createElement("input"),it=S.createElement("select").appendChild(S.createElement("option")),rt.type="checkbox",v.checkOn=""!==rt.value,v.optSelected=it.selected,(rt=S.createElement("input")).value="t",rt.type="radio",v.radioValue="t"===rt.value;var pt,dt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return B(this,E.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){E.removeAttr(this,e)})}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void E.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=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.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)}}),pt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||E.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}E.fn.extend({prop:function(e,t){return B(this,E.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[E.propFix[e]||e]})}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.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=E.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),v.optSelected||(E.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)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this}),E.fn.extend({addClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){E(this).addClass(t.call(this,e,vt(this)))}):(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){E(this).removeClass(t.call(this,e,vt(this)))}):arguments.length?(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=yt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return m(t)?this.each(function(e){E(this).toggleClass(t.call(this,e,vt(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=mt(t),this.each(function(){if(s)for(o=E(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;E.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,E(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=E.map(t,function(e){return null==e?"":e+""})),(r=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=E.valHooks[t.type]||E.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:yt(E.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=E(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=E.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<E.inArray(E.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<E.inArray(E(e).val(),t)}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||S],d=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||S,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+E.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[E.expando]?e:new E.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]:E.makeArray(t,[e]),c=E.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||S)&&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),E.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),E.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each(function(){E.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),v.focusin||E.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){E.event.simulate(r,e.target,E.event.fix(e))};E.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 Tt=C.location,Ct={guid:Date.now()},St=/\?/;E.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||E.error("Invalid XML: "+(n?E.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Et=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(n,e,r,i){var t;if(Array.isArray(e))E.each(e,function(e,t){r||Et.test(n)?i(n,t):jt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)jt(n+"["+t+"]",e[t],r,i)}E.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&&!E.isPlainObject(e))E.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=S.createElement("a");function Ft(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 $t(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,E.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 Bt(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Wt.href=Tt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,E.ajaxSettings),t):Bt(E.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),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,y=E.ajaxSetup({},t),v=y.context||y,m=y.context&&(v.nodeType||v.jquery)?E(v):E.event,x=E.Deferred(),b=E.Callbacks("once memory"),w=y.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.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&&(y.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),y.url=((e||y.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(P)||[""],null==y.crossDomain){r=S.createElement("a");try{r.href=y.url,r.href=r.href,y.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){y.crossDomain=!0}}if(y.data&&y.processData&&"string"!=typeof y.data&&(y.data=E.param(y.data,y.traditional)),$t(Rt,y,t,T),h)return T;for(i in(g=E.event&&y.global)&&0==E.active++&&E.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Ot.test(y.type),f=y.url.replace(qt,""),y.hasContent?y.data&&y.processData&&0===(y.contentType||"").indexOf("application/x-www-form-urlencoded")&&(y.data=y.data.replace(Dt,"+")):(o=y.url.slice(f.length),y.data&&(y.processData||"string"==typeof y.data)&&(f+=(St.test(f)?"&":"?")+y.data,delete y.data),!1===y.cache&&(f=f.replace(Lt,"$1"),o=(St.test(f)?"&":"?")+"_="+Ct.guid+++o),y.url=f+o),y.ifModified&&(E.lastModified[f]&&T.setRequestHeader("If-Modified-Since",E.lastModified[f]),E.etag[f]&&T.setRequestHeader("If-None-Match",E.etag[f])),(y.data&&y.hasContent&&!1!==y.contentType||t.contentType)&&T.setRequestHeader("Content-Type",y.contentType),T.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+It+"; q=0.01":""):y.accepts["*"]),y.headers)T.setRequestHeader(i,y.headers[i]);if(y.beforeSend&&(!1===y.beforeSend.call(v,T,y)||h))return T.abort();if(u="abort",b.add(y.complete),T.done(y.success),T.fail(y.error),c=$t(Mt,y,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,y]),h)return T;y.async&&0<y.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},y.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]}(y,T,n)),!i&&-1<E.inArray("script",y.dataTypes)&&E.inArray("json",y.dataTypes)<0&&(y.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}}(y,s,T,i),i?(y.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(E.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(E.etag[f]=u)),204===e||"HEAD"===y.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(v,[o,l,T]):x.rejectWith(v,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,y,i?o:a]),b.fireWith(v,[T,l]),g&&(m.trigger("ajaxComplete",[T,y]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],function(e,i){E[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),E.ajax(E.extend({url:e,type:i,dataType:r,data:t,success:n},E.isPlainObject(e)&&e))}}),E.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=E(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){E(this).wrapInner(n.call(this,e))}):this.each(function(){var e=E(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){E(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){E(this).replaceWith(this.childNodes)}),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=E.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,E.ajaxTransport(function(i){var o,a;if(v.cors||zt&&!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(_t[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()}}}),E.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),E.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 E.globalEval(e),e}}}),E.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),E.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=E("<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)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.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(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.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?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&E.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.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,E.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)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.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"===E.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"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(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)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(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?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.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)}}),E.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){E.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.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||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=A,E.isFunction=m,E.isWindow=x,E.camelCase=X,E.type=w,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var Yt=C.jQuery,Qt=C.$;return E.noConflict=function(e){return C.$===E&&(C.$=Qt),e&&C.jQuery===E&&(C.jQuery=Yt),E},"undefined"==typeof e&&(C.jQuery=C.$=E),E});
vendor: 5,246 bytes, lines 3-9
3; 4!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ 5// Underscore.js 1.13.6 6// https://underscorejs.org 7// (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors 8// Underscore may be freely distributed under the MIT license. 9var n="1.13.6",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);
vendor: 12,180 bytes, line 9
9if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),dn=V?fn(vn):x("Map"),gn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return U(n)?n:[n]}function Bn(n){return tn.toPath(n)}function Nn(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function In(n,r,t){var e=Nn(n,Bn(r));return w(e)?t:e}function Tn(n){return n}function kn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Dn(n){return n=Bn(n),function(r){return Nn(r,n)}}function Rn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Fn(n,r,t){return null==n?Tn:D(n)?Rn(n,r,t):_(n)&&!U(n)?kn(n):Dn(n)}function Vn(n,r){return Fn(n,r,1/0)}function Pn(n,r,t){return tn.iteratee!==Vn?tn.iteratee(n,r):Fn(n,r,t)}function qn(){}function Un(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=En,tn.iteratee=Vn;var Wn=Date.now||function(){return(new Date).getTime()};function zn(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var Ln={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},$n=zn(Ln),Cn=zn(_n(Ln)),Kn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Jn=/(.)^/,Gn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Hn=/\\|'|\r|\n|\u2028|\u2029/g;function Qn(n){return"\\"+Gn[n]}var Xn=/^\s*(\w|\$)+\s*$/;var Yn=0;function Zn(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var nr=j((function(n,r){var t=nr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return Zn(n,e,this,this,i)};return e}));nr.placeholder=tn;var rr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return Zn(n,e,r,this,t.concat(u))}));return e})),tr=K(Y);function er(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(tr(a)&&(U(a)||L(a)))if(r>1)er(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var ur=j((function(n,r){var t=(r=er(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=rr(n[e],n)}return n}));var or=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ir=nr(or,tn,1);function ar(n){return function(){return!n.apply(this,arguments)}}function fr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var cr=nr(fr,2);function lr(n,r,t){r=Pn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function sr(n){return function(r,t,e){t=Pn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var pr=sr(1),vr=sr(-1);function hr(n,r,t,e){for(var u=(t=Pn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function yr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var dr=yr(1,pr,hr),gr=yr(-1,vr);function br(n,r,t){var e=(tr(n)?pr:lr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function mr(n,r,t){var e,u;if(r=Rn(r,t),tr(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function jr(n,r,t){r=Pn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function _r(n){var r=function(r,t,e,u){var o=!tr(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Rn(t,u,4),e,o)}}var wr=_r(1),Ar=_r(-1);function xr(n,r,t){var e=[];return r=Pn(r,t),mr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Sr(n,r,t){r=Pn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!r(n[i],i,n))return!1}return!0}function Or(n,r,t){r=Pn(r,t);for(var e=!tr(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Mr(n,r,t,e){return tr(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),dr(n,r,t)>=0}var Er=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Bn(r),e=r.slice(0,-1),r=r[r.length-1]),jr(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=Nn(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Br(n,r){return jr(n,Dn(r))}function Nr(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=Pn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}var Ir=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Tr(n){return n?U(n)?i.call(n):S(n)?n.match(Ir):tr(n)?jr(n,Tn):jn(n):[]}function kr(n,r,t){if(null==r||t)return tr(n)||(n=jn(n)),n[Un(n.length-1)];var e=Tr(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Un(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function Dr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=Pn(e,u),mr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Rr=Dr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Fr=Dr((function(n,r,t){n[t]=r})),Vr=Dr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Pr=Dr((function(n,r,t){n[t?0:1].push(r)}),!0);function qr(n,r,t){return r in t}var Ur=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Rn(e,r[1])),r=an(n)):(e=qr,r=er(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Wr=j((function(n,r){var t,e=r[0];return D(e)?(e=ar(e),r.length>1&&(t=r[1])):(r=jr(er(r,!1,!1),String),e=function(n,t){return!Mr(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=er(r,!0,!0),xr(n,(function(n){return!Mr(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=Pn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Mr(o,c)||(o.push(c),u.push(f)):Mr(u,f)||u.push(f)}return u}var Gr=j((function(n){return Jr(er(n,!0,!0))}));function Hr(n){for(var r=n&&Nr(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Br(n,e);return t}var Qr=j(Hr);function Xr(n,r){return n._chain?tn(r).chain():r}function Yr(n){return mr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Xr(this,t.apply(tn,n))}})),tn}mr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Xr(this,t)}})),mr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Xr(this,n)}}));var Zr=Yr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:dn,isWeakMap:gn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:function(n){return _(n)?U(n)?n.slice():xn({},n):n},tap:function(n,r){return r(n),n},get:In,has:function(n,r){for(var t=(r=Bn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=Pn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:Tn,constant:C,noop:qn,toPath:En,property:Dn,propertyOf:function(n){return null==n?qn:function(r){return In(n,r)}},matcher:kn,matches:kn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Rn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Un,now:Wn,escape:$n,unescape:Cn,templateSettings:Kn,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e=RegExp([(r.escape||Jn).source,(r.interpolate||Jn).source,(r.evaluate||Jn).source].join("|")+"|$","g"),u=0,o="__p+='";n.replace(e,(function(r,t,e,i,a){return o+=n.slice(u,a).replace(Hn,Qn),u=a+r.length,t?o+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?o+="'+\n((__t=("+e+"))==null?'':__t)+\n'":i&&(o+="';\n"+i+"\n__p+='"),r})),o+="';\n";var i,a=r.variable;if(a){if(!Xn.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{i=new Function(a,"_",o)}catch(n){throw n.source=o,n}var f=function(n){return i.call(this,n,tn)};return f.source="function("+a+"){\n"+o+"}",f},result:function(n,r,t){var e=(r=Bn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Yn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Vn,partial:nr,bind:rr,bindAll:ur,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:or,defer:ir,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:Wn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=Wn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=Wn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=Wn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return nr(r,n)},negate:ar,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}}
9,before:fr,once:cr,findKey:lr,findIndex:pr,findLastIndex:vr,sortedIndex:hr,indexOf:dr,lastIndexOf:gr,find:br,detect:br,findWhere:function(n,r){return br(n,kn(r))},each:mr,forEach:mr,map:jr,collect:jr,reduce:wr,foldl:wr,inject:wr,reduceRight:Ar,foldr:Ar,filter:xr,select:xr,reject:function(n,r,t){return xr(n,ar(Pn(r)),t)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:Er,pluck:Br,where:function(n,r){return xr(n,kn(r))},max:Nr,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=tr(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=Pn(r,t),mr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return kr(n,1/0)},sample:kr,sortBy:function(n,r,t){var e=0;return r=Pn(r,t),Br(jr(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Rr,indexBy:Fr,countBy:Vr,partition:Pr,toArray:Tr,size:function(n){return null==n?0:tr(n)?n.length:nn(n).length},pick:Ur,omit:Wr,first:Lr,head:Lr,take:Lr,initial:zr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:$r(n,Math.max(0,n.length-r))},rest:$r,tail:$r,drop:$r,compact:function(n){return xr(n,Boolean)},flatten:function(n,r){return er(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:Gr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Mr(r,o)){var i;for(i=1;i<t&&Mr(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Hr,transpose:Hr,zip:Qr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Yr,default:tn});return Zr._=Zr,Zr}));; 10/** 11* DO NOT EDIT THIS FILE. 12* See the following change record for more information, 13* https://www.drupal.org/node/2815083 14* @preserve 15**/ 16if (!Element.prototype.matches) { 17 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 18}; 19/** 20* DO NOT EDIT THIS FILE. 21* See the following change record for more information, 22* https://www.drupal.org/node/2815083 23* @preserve 24**/ 25if (typeof Object.assign !== 'function') { 26 Object.defineProperty(Object, 'assign', { 27 value: function assign(target, varArgs) { 28 'use strict'; 29 30 if (target === null || target === undefined) { 31 throw new TypeError('Cannot convert undefined or null to object'); 32 } 33 var to = Object(target); 34 for (var index = 1; index < arguments.length; index++) { 35 var nextSource = arguments[index]; 36 if (nextSource !== null && nextSource !== undefined) { 37 for (var nextKey in nextSource) { 38 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 39 to[nextKey] = nextSource[nextKey]; 40 } 41 } 42 } 43 } 44 return to; 45 }, 46 writable: true, 47 configurable: true 48 }); 49}; 50/** 51* DO NOT EDIT THIS FILE. 52* See the following change record for more information, 53* https://www.drupal.org/node/2815083 54* @preserve 55**/ 56if (window.NodeList && !NodeList.prototype.forEach) { 57 NodeList.prototype.forEach = Array.prototype.forEach; 58}; 59/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ 60;(function(root, factory) { 61 // https://github.com/umdjs/umd/blob/master/returnExports.js 62 if (typeof exports == 'object') { 63 // For Node.js. 64 module.exports = factory(root); 65 } else if (typeof define == 'function' && define.amd) { 66 // For AMD. Register as an anonymous module. 67 define([], factory.bind(root, root)); 68 } else { 69 // For browser globals (not exposing the function separately). 70 factory(root); 71 } 72}(typeof global != 'undefined' ? global : this, function(root) { 73 74 if (root.CSS && root.CSS.escape) { 75 return root.CSS.escape; 76 } 77
78 // https://drafts.csswg.org/cssom/#serialize-an-identifier 79 var cssEscape = function(value) { 80 if (arguments.length == 0) { 81 throw new TypeError('`CSS.escape` requires an argument.'); 82 } 83 var string = String(value); 84 var length = string.length; 85 var index = -1; 86 var codeUnit; 87 var result = ''; 88 var firstCodeUnit = string.charCodeAt(0); 89 while (++index < length) { 90 codeUnit = string.charCodeAt(index); 91 // Note: there’s no need to special-case astral symbols, surrogate 92 // pairs, or lone surrogates. 93 94 // If the character is NULL (U+0000), then the REPLACEMENT CHARACTER 95 // (U+FFFD). 96 if (codeUnit == 0x0000) { 97 result += '\uFFFD'; 98 continue; 99 } 100 101 if ( 102 // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is 103 // U+007F, […] 104 (codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F || 105 // If the character is the first character and is in the range [0-9] 106 // (U+0030 to U+0039), […] 107 (index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) || 108 // If the character is the second character and is in the range [0-9] 109 // (U+0030 to U+0039) and the first character is a `-` (U+002D), […] 110 ( 111 index == 1 && 112 codeUnit >= 0x0030 && codeUnit <= 0x0039 && 113 firstCodeUnit == 0x002D 114 ) 115 ) { 116 // https://drafts.csswg.org/cssom/#escape-a-character-as-code-point 117 result += '\\' + codeUnit.toString(16) + ' '; 118 continue; 119 } 120 121 if ( 122 // If the character is the first character and is a `-` (U+002D), and 123 // there is no second character, […] 124 index == 0 && 125 length == 1 && 126 codeUnit == 0x002D 127 ) { 128 result += '\\' + string.charAt(index); 129 continue; 130 } 131 132 // If the character is not handled by one of the above rules and is 133 // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or 134 // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to 135 // U+005A), or [a-z] (U+0061 to U+007A), […] 136 if ( 137 codeUnit >= 0x0080 || 138 codeUnit == 0x002D || 139 codeUnit == 0x005F || 140 codeUnit >= 0x0030 && codeUnit <= 0x0039 || 141 codeUnit >= 0x0041 && codeUnit <= 0x005A || 142 codeUnit >= 0x0061 && codeUnit <= 0x007A 143 ) { 144 // the character itself 145 result += string.charAt(index); 146 continue; 147 } 148 149 // Otherwise, the escaped character. 150 // https://drafts.csswg.org/cssom/#escape-a-character 151 result += '\\' + string.charAt(index); 152 153 } 154 return result; 155 }; 156 157 if (!root.CSS) { 158 root.CSS = {}; 159 } 160 161 root.CSS.escape = cssEscape; 162 return cssEscape; 163 164})); 165; 166!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){z=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof U?function(){U(a)}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t<N;t+=2){var e=Q[t],n=Q[t+1];e(n),Q[t]=void 0,Q[t+1]=void 0}N=0}function f(){try{var t=Function("return this")().require("vertx");return U=t.runOnLoop||t.runOnContext,i()}catch(e){return c()}}function l(t,e){var n=this,r=new this.constructor(p);void 0===r[V]&&x(r);var o=n._state;if(o){var i=arguments[o-1];z(function(){return T(o,r,i,n._result)})}else j(n,r,t,e);return r}function h(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(p);return w(n,t),n}function p(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function _(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function y(t,e,n){z(function(t){var r=!1,o=_(n,e,function(n){r||(r=!0,e!==n?w(t,n):A(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,S(t,o))},t)}function m(t,e){e._state===Z?A(t,e._result):e._state===$?S(t,e._result):j(e,void 0,function(e){return w(t,e)},function(e){return S(t,e)})}function b(t,n,r){n.constructor===t.constructor&&r===l&&n.constructor.resolve===h?m(t,n):void 0===r?A(t,n):e(r)?y(t,n,r):A(t,n)}function w(e,n){if(e===n)S(e,v());else if(t(n)){var r=void 0;try{r=n.then}catch(o){return void S(e,o)}b(e,n,r)}else A(e,n)}
vendor: 1,465 bytes, line 166
166function g(t){t._onerror&&t._onerror(t._result),E(t)}function A(t,e){t._state===X&&(t._result=e,t._state=Z,0!==t._subscribers.length&&z(E,t))}function S(t,e){t._state===X&&(t._state=$,t._result=e,z(g,t))}function j(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+Z]=n,o[i+$]=r,0===i&&t._state&&z(E,t)}function E(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?T(n,r,o,i):o(i);t._subscribers.length=0}}function T(t,n,r,o){var i=e(r),s=void 0,u=void 0,c=!0;if(i){try{s=r(o)}catch(a){c=!1,u=a}if(n===s)return void S(n,d())}else s=o;n._state!==X||(i&&c?w(n,s):c===!1?S(n,u):t===Z?A(n,s):t===$&&S(n,s))}function M(t,e){try{e(function(e){w(t,e)},function(e){S(t,e)})}catch(n){S(t,n)}}function P(){return tt++}function x(t){t[V]=tt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function C(){return new Error("Array Methods must be provided an Array")}function O(t){return new et(this,t).promise}function k(t){var e=this;return new e(L(t)?function(n,r){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function F(t){var e=this,n=new e(p);return S(n,t),n}function Y(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
166onstructor cannot be called as a function.")}function D(){var t=void 0;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=nt}var K=void 0;K=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var L=K,N=0,U=void 0,W=void 0,z=function(t,e){Q[N]=t,Q[N+1]=e,N+=2,2===N&&(W?W(a):R())},B="undefined"!=typeof window?window:void 0,G=B||{},H=G.MutationObserver||G.WebKitMutationObserver,I="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),J="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Q=new Array(1e3),R=void 0;R=I?o():H?s():J?u():void 0===B&&"function"==typeof require?f():c();var V=Math.random().toString(36).substring(2),X=void 0,Z=1,$=2,tt=0,et=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(p),this.promise[V]||x(this.promise),L(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&A(this.promise,this._result))):S(this.promise,C())}return t.prototype._enumerate=function(t){for(var e=0;this._state===X&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===h){var o=void 0,i=void 0,s=!1;try{o=t.then}catch(u){s=!0,i=u}if(o===l&&t._state!==X)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===nt){var c=new n(p);s?S(c,i):b(c,t,o),this._willSettleAt(c,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===X&&(this._remaining--,t===$?S(r,n):this._result[e]=n),0===this._remaining&&A(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;j(t,void 0,function(t){return n._settledAt(Z,e,t)},function(t){return n._settledAt($,e,t)})},t}(),nt=function(){function t(e){this[V]=P(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!=typeof e&&Y(),this instanceof t?M(this,e):q())}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype["finally"]=function(t){var n=this,r=n.constructor;return e(t)?n.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):n.then(t,t)},t}();return nt.prototype.then=l,nt.all=O,nt.race=k,nt.resolve=h,nt.reject=F,nt._setScheduler=n,nt._setAsap=r,nt._asap=z,nt.polyfill=D,nt.Promise=nt,nt.polyfill(),nt});; 167/*! @drupal/once - v1.0.1 - 2021-06-12 */ 168var once=function(){"use strict";var n=/[\11\12\14\15\40]+/,e="data-once",t=document;function r(n,t,r){return n[t+"Attribute"](e,r)}function o(e){if("string"!=typeof e)throw new TypeError("once ID must be a string");if(""===e||n.test(e))throw new RangeError("once ID must not be empty or contain spaces");return'[data-once~="'+e+'"]'}function u(n){if(!(n instanceof Element))throw new TypeError("The element must be an instance of Element");return!0}function i(n,e){void 0===e&&(e=t);var r=n;if(null===n)r=[];else{if(!n)throw new TypeError("Selector must not be empty");"string"!=typeof n||e!==t&&!u(e)?n instanceof Element&&(r=[n]):r=e.querySelectorAll(n)}return Array.prototype.slice.call(r)}function c(n,e,t){return e.filter((function(e){var r=u(e)&&e.matches(n);return r&&t&&t(e),r}))}function f(e,t){var o=t.add,u=t.remove,i=[];r(e,"has")&&r(e,"get").trim().split(n).forEach((function(n){i.indexOf(n)<0&&n!==u&&i.push(n)})),o&&i.push(o);var c=i.join(" ");r(e,""===c?"remove":"set",c)}function a(n,e,t){return c(":not("+o(n)+")",i(e,t),(function(e){return f(e,{add:n})}))}return a.remove=function(n,e,t){return c(o(n),i(e,t),(function(e){return f(e,{remove:n})}))},a.filter=function(n,e,t){return c(o(n),i(e,t))},a.find=function(n,e){return i(n?o(n):"[data-once]",e)},a}(); 169 170; 171/*! 172 * jQuery Once v2.2.3 - http://github.com/robloach/jquery-once 173 * @license MIT, GPL-2.0 174 * http://opensource.org/licenses/MIT 175 * http://opensource.org/licenses/GPL-2.0 176 */ 177(function(e){"use strict";if(typeof exports==="object"&&typeof exports.nodeName!=="string"){e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(t){"use strict";var r=function(e){e=e||"once";if(typeof e!=="string"){throw new TypeError("The jQuery Once id parameter must be a string")}return e};t.fn.once=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)!==true}).data(n,true)};t.fn.removeOnce=function(e){return this.findOnce(e).removeData("jquery-once-"+r(e))};t.fn.findOnce=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)===true})}}); 178 179window.drupalTranslations = {"strings":{"":{"Home":"Hjem","Title":"Tittel","Next":"Neste","closed":"lukket","Cancel":"Avbryt","Edit":"Rediger","Search":"S\u00f8k","Save":"Lagre","Open":"\u00c5pne","Sunday":"s\u00f8ndag","Monday":"mandag","Tuesday":"tirsdag","Wednesday":"onsdag","Thursday":"torsdag","Friday":"fredag","Saturday":"l\u00f8rdag","Add":"Legg til","ID":"ID","Continue":"Fortsett","Filter":"Filtrer","Advanced":"Avansert","Mon":"man","Tue":"tir","Wed":"ons","Thu":"tor","Fri":"fre","Sat":"l\u00f8r","Sun":"s\u00f8n","May":"mai","Close":"Lukk","Show":"Vis","Select all rows in this table":"Velg alle rader i denne tabellen","Deselect all rows in this table":"Ikke velg noen rader i denne tabellen","Query":"Sp\u00f8rring","Jan":"jan","Feb":"feb","Mar":"mar","Apr":"apr","Jun":"jun","Jul":"jul","Aug":"aug","Sep":"sep","Oct":"okt","Nov":"nov","Dec":"des","Extend":"Utvid","Changed":"Endret","Loading...":"Laster...","Please wait...":"
179Vent litt...","Hide":"Skjul","Not promoted":"Ikke forfremmet","Error message":"Feilmelding","Warning message":"Varselmelding","Remove group":"Fjern gruppe","By @name on @date":"Av @name, den @date","By @name":"Av @name","Not in menu":"Ikke i en meny","Alias: @alias":"Alias: @alias","No alias":"Ingen alias","@label":"@label","New revision":"Ny versjon","Compact":"Kompakt","Drag to re-order":"Dra og slipp for \u00e5 forandre rekkef\u00f8lgen","Changes made in this table will not be saved until the form is submitted.":"Endringer i denne tabellen lagres f\u00f8rst n\u00e5r skjemaet sendes.","Show description":"Vis beskrivelse","This permission is inherited from the authenticated user role.":"Denne tillatelsen er arvet fra rollen for autentisert bruker.","No revision":"Ingen versjon","Not restricted":"Ikke avgrenset","(active tab)":"(aktiv fane)","Status message":"Statusmelding","An AJAX HTTP error occurred.":"En AJAX HTTP-feil har oppst\u00e5tt.","HTTP Result Code: !status":"HTTP-resultatkode: !status","An AJAX HTTP request terminated abnormally.":"En AJAX HTTP-foresp\u00f8rsel avsluttet unormalt.","Debugging information follows.":"Feils\u00f8kingsinformasjon f\u00f8lger.","Path: !uri":"Sti: !uri","StatusText: !statusText":"StatusTekst: !statusText","ResponseText: !responseText":"SvarTekst: !responseText","ReadyState: !readyState":"Klartilstand: !readyState","Restricted to certain pages":"Begrenset til visse sider","The block cannot be placed in this region.":"Blokka kan ikke plasseres i dette omr\u00e5det.","Hide summary":"Skjul sammendrag","Edit summary":"Rediger sammendrag","Collapse":"Folde sammen","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Den valgte filen %filename kan ikke lastes opp. Kun filer med f\u00f8lgende filtyper er tillatt: %extensions.","Show row weights":"Vis radvekter","Hide row weights":"Skjul rekkevekter","View mode":"Visningsmodus","Apply (all displays)":"Bruk (alle visninger)","Apply (this display)":"Bruk (denne fremvisningen)","Revert to default":"Tilbakestill til standard","Hide description":"Skjul beskrivelse","Needs to be updated":"M\u00e5 oppdateres","Does not need to be updated":"M\u00e5 ikke oppdateres","Show all columns":"Vis alle kolonner","Show table cells that were hidden to make the table fit within a small screen.":"Vis tabellceller som var skjult for \u00e5 f\u00e5 tabellen til \u00e5 passe p\u00e5 en liten skjerm.","List additional actions":"List flere handlinger","Flag other translations as outdated":"Merk andre oversettelser som utdatert","Do not flag other translations as outdated":"Ikke merk andre oversettelser som udatert","opened":"\u00e5pen","Horizontal orientation":"Horisontal stilling","Vertical orientation":"Vertikal stilling","Tray orientation changed to @orientation.":"Skuffens retning ble endret til @orientation.","You have unsaved changes.":"Du har ulagrede endringer.","@action @title configuration options":"@action @title konfigurasjonsalternativer","Tabbing is no longer constrained by the Contextual module.":"Bruk av tabulator er ikke lenger begrenset av kontekstuell-modulen.","Tabbing is constrained to a set of @contextualsCount and the edit mode toggle.":"Bruk av tabulator er begrenset til et sett av @contextualsCount og veksleknappen for redigeringsmodus.","Press the esc key to exit.":"Trykk p\u00e5 esc for \u00e5 avslutte.","@count contextual link\u0003@count contextual links":"@count kontekstuell lenke\u0003@count kontekstuelle lenker","!tour_item of !total":"!tour_item av !total","End tour":"Avslutt omvisning","The toolbar cannot be set to a horizontal orientation when it is locked.":"Verkt\u00f8ylinjen kan ikke endres til horisontal stilling n\u00e5r den er l\u00e5st.","Changing the text format to %text_format will permanently remove content that is not allowed in that text format.\u003Cbr\u003E\u003Cbr\u003ESave your changes before switching the text format to avoid losing data.":"Endring av tekstformat til %text_format vil permanent fjerne innhold som ikke er tillatt i det nye tekstformatet. \u003Cbr \/\u003E\u003Cbr \/\u003ELagre endringene f\u00f8r du bytter tekstformat for \u00e5 unng\u00e5 \u00e5 miste data.","Change text format?":"Endre tekstformat?","Leave preview?":"Forlat forh\u00e5ndsvisning?","Leave preview":"Forlat forh\u00e5ndsvisning","Leaving the preview will cause unsaved changes to be lost. Are you sure you want to leave the preview?":"Hvis du forlater forh\u00e5ndsvisning, vil ulagrede endringer g\u00e5 tapt. Er du sikker p\u00e5 at du vil forlate forh\u00e5ndsvisning?","CTRL+Left click will prevent this dialog from showing and proceed to the clicked link.":"CTRL+venstreklikk vil hindre at denne dialogboksen vises, og fortsett til lenken du klikket p\u00e5.","Tray \u0022@tray\u0022 @action.":"Skuff \u0022@tray\u0022 @action.","Tray @action.":"Skuff @action.","Hide lower priority columns":"Skjul kolonner med lavere prioritet","The response failed verification so will not be processed.":"Responsen ble ikke verifisert, s\u00e5 den vil ikke bli behandlet.","The callback URL is not local and n
179ot trusted: !url":"Tilbakemeldings-URLen er ikke lokal og kan ikke klareres: !url","CustomMessage: !customMessage":"EgendefinertMelding: !customMessage","Authored on @date":"Skrevet p\u00e5 @date","1 block is available in the modified list.\u0003@count blocks are available in the modified list.":"En blokk er tilgjengelig i den endrede listen.\u0003@count blokker er tilgjengelige i den endrede listen.","Zero items selected":"Ingen elementer valgt","All @count items selected":"Alle @count elementer er valgt","Select all media":"Velg alle media","Show media item weights":"Vis vekter for medieelementer","Hide media item weights":"Skjul vekter for medieelementer","Insert Media":"Sett inn media","All available blocks are listed.":"Alle tilgjengelige blokker vises.","Block previews are visible. Block labels are hidden.":"Forh\u00e5ndsvisning av blokker er aktivert. Blokktitler er skjulte.","Block previews are hidden. Block labels are visible.":"Forh\u00e5ndsvisning av blokker er deaktivert. Blokktitler er synlige.","An error occurred while trying to preview the media. Please save your work and reload this page.":"Det oppstod en feil ved fors\u00f8k p\u00e5 \u00e5 forh\u00e5ndsvise media. Vennligst lagre arbeidet ditt og last inn denne siden p\u00e5\u00a0nytt.","Text alternative":"Alternativ tekst","Field Not Editable":"Feltet kan ikke redigeres","CKEditor 5 is not compatible with IE11.":"CKEditor 5 er ikke kompatibel med IE11.","Preview failed":"Klarte ikke forh\u00e5ndsvise","Drupal Media toolbar":"Verkt\u00f8ylinje for Drupal Media","Link media":"Lenke til media","A rich text editor is available for this field when used with \u003Ca href=\u0022@supported-browsers\u0022\u003Esupported browsers\u003C\/a\u003E other than Internet Explorer.":"Et rik tekst-editor er tilgjengelig for dette feltet n\u00e5r det brukes i en \u003Ca href=\u0022@supported-browsers\u0022\u003Enettleser vi st\u00f8tter\u003C\/a\u003E, men ikke i Internet Explorer.","Media widget":"Skjermelement for media","Not all functionality may be available because some information could not be retrieved.":"Det er kanskje noe funksjonalitet som ikke er tilgjengelig fordi noe av informasjonen ikke kunne hentes.","Alternative text override":"Alternativ tekst","Default alternative text:":"Standard alternativ tekst:","Override media image alternative text":"Overstyr alternativ tekst for mediebilde","Enter media caption":"Skriv inn bildetekst","Caption media":"Bildetekst for media","Toggle caption off":"AvSl\u00e5 av bildetekst","Toggle caption on":"Sl\u00e5 p\u00e5 bildetekst","Decorative image":"Dekorativt bilde","Add missing alternative text":"Legg til manglende alternativ tekst","Change image alternative text":"Endre alternativ tekst for bilde","An error occurred during the execution of the Ajax response: !error":"Det oppstod en feil under utf\u00f8relsen av Ajax-responsen: !error","All modules":"Alle moduler","@enabled of @total":"@enabled av @total","Automatic alias":"Automatisk alias","Insert this token into your form":"Sett inn denne plassholderen i skjemaet","First click a text field to insert your tokens into.":"Klikk f\u00f8rst p\u00e5 et tekstfelt hvor plassholderen skal settes inn.","from":"fra","Show more":"Vis flere","Show less":"Vis f\u00e6rre","Search...":"S\u00f8k","Clear filters":"Nullstill valg","Sort":"Sorter","View results":"Vis resultater","Change filters":"Filtrer produktutvalg","articles":"artikler","Your search returned \u003Cspan class=\u0022count\u0022\u003E1\u003C\/span\u003E hit\u0003Your search returned \u003Cspan class=\u0022count\u0022\u003E@count\u003C\/span\u003E hits":"S\u00f8ket ditt ga \u003Cspan class=\u0022count\u0022\u003E1\u003C\/span\u003E treff\u0003S\u00f8ket ditt ga \u003Cspan class=\u0022count\u0022\u003E@count\u003C\/span\u003E treff","See all results for @query":"Se alle resultater for @query","Extended":"Utvidet","Name of new segment":"Navn p\u00e5 nytt segment","New segment":"Nytt segment"},"Long month name":{"January":"januar","February":"februar","March":"mars","April":"april","May":"mai","June":"juni","July":"juli","August":"august","September":"september","October":"oktober","November":"november","December":"desember"}},"pluralFormula":{"1":0,"default":1}};; 180/** 181* DO NOT EDIT THIS FILE. 182* See the following change record for more information, 183* https://www.drupal.org/node/2815083 184* @preserve 185**/ 186(function () { 187 var settingsElement = document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]'); 188 window.drupalSettings = {}; 189 if (settingsElement !== null) { 190 window.drupalSettings = JSON.parse(settingsElement.textContent); 191 } 192})();; 193/** 194* DO NOT EDIT THIS FILE. 195* See the following change record for more information, 196* https://www.drupal.org/node/2815083 197* @preserve 198**/ 199window.Drupal = { 200 behaviors: {}, 201 locale: {} 202}; 203(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) { 204 Drupal.throwError = function (error) { 205 setTimeout(function () { 206 throw error; 207 }, 0); 208 }; 209 Drupal.attachBehaviors = function (context, settings) { 210 context = context || document; 211 settings = settings || drupalSettings; 212 var behaviors = Drupal.behaviors;
213 Object.keys(behaviors || {}).forEach(function (i) { 214 if (typeof behaviors[i].attach === 'function') { 215 try { 216 behaviors[i].attach(context, settings); 217 } catch (e) { 218 Drupal.throwError(e); 219 } 220 } 221 }); 222 }; 223 Drupal.detachBehaviors = function (context, settings, trigger) { 224 context = context || document; 225 settings = settings || drupalSettings; 226 trigger = trigger || 'unload'; 227 var behaviors = Drupal.behaviors; 228 Object.keys(behaviors || {}).forEach(function (i) { 229 if (typeof behaviors[i].detach === 'function') { 230 try { 231 behaviors[i].detach(context, settings, trigger); 232 } catch (e) { 233 Drupal.throwError(e); 234 } 235 } 236 }); 237 }; 238 Drupal.checkPlain = function (str) { 239 str = str.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); 240 return str; 241 }; 242 Drupal.formatString = function (str, args) { 243 var processedArgs = {}; 244 Object.keys(args || {}).forEach(function (key) { 245 switch (key.charAt(0)) { 246 case '@': 247 processedArgs[key] = Drupal.checkPlain(args[key]); 248 break; 249 case '!': 250 processedArgs[key] = args[key]; 251 break; 252 default: 253 processedArgs[key] = Drupal.theme('placeholder', args[key]); 254 break; 255 } 256 }); 257 return Drupal.stringReplace(str, processedArgs, null); 258 }; 259 Drupal.stringReplace = function (str, args, keys) { 260 if (str.length === 0) { 261 return str; 262 } 263 if (!Array.isArray(keys)) { 264 keys = Object.keys(args || {}); 265 keys.sort(function (a, b) { 266 return a.length - b.length; 267 }); 268 } 269 if (keys.length === 0) { 270 return str; 271 } 272 var key = keys.pop(); 273 var fragments = str.split(key); 274 if (keys.length) { 275 for (var i = 0; i < fragments.length; i++) { 276 fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); 277 } 278 } 279 return fragments.join(args[key]); 280 }; 281 Drupal.t = function (str, args, options) { 282 options = options || {}; 283 options.context = options.context || ''; 284 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) { 285 str = drupalTranslations.strings[options.context][str]; 286 } 287 if (args) { 288 str = Drupal.formatString(str, args); 289 } 290 return str; 291 }; 292 Drupal.url = function (path) { 293 return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path; 294 }; 295 Drupal.url.toAbsolute = function (url) { 296 var urlParsingNode = document.createElement('a'); 297 try { 298 url = decodeURIComponent(url); 299 } catch (e) {} 300 urlParsingNode.setAttribute('href', url); 301 return urlParsingNode.cloneNode(false).href; 302 }; 303 Drupal.url.isLocal = function (url) { 304 var absoluteUrl = Drupal.url.toAbsolute(url); 305 var protocol = window.location.protocol; 306 if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) { 307 protocol = 'https:'; 308 } 309 var baseUrl = "".concat(protocol, "//").concat(window.location.host).concat(drupalSettings.path.baseUrl.slice(0, -1)); 310 try { 311 absoluteUrl = decodeURIComponent(absoluteUrl); 312 } catch (e) {} 313 try { 314 baseUrl = decodeURIComponent(baseUrl); 315 } catch (e) {} 316 return absoluteUrl === baseUrl || absoluteUrl.indexOf("".concat(baseUrl, "/")) === 0; 317 }; 318 Drupal.formatPlural = function (count, singular, plural, args, options) { 319 args = args || {}; 320 args['@count'] = count; 321 var pluralDelimiter = drupalSettings.pluralDelimiter; 322 var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter); 323 var index = 0; 324 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) { 325 index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default; 326 } else if (args['@count'] !== 1) { 327 index = 1; 328 } 329 return translations[index]; 330 }; 331 Drupal.encodePath = function (item) { 332 return window.encodeURIComponent(item).replace(/%2F/g, '/'); 333 }; 334 Drupal.deprecationError = function (_ref) { 335 var message = _ref.message; 336 if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) { 337 console.warn("[Deprecation] ".concat(message)); 338 } 339 }; 340 Drupal.deprecatedProperty = function (_ref2) { 341 var target = _ref2.target, 342 deprecatedProperty = _ref2.deprecatedProperty, 343 message = _ref2.message; 344 if (!Proxy || !Reflect) { 345 return target; 346 } 347 return new Proxy(target, { 348 get: function get(target, key) { 349 if (key === deprecatedProperty) { 350 Drupal.deprecationError({ 351 message: message 352 }); 353 } 354 for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { 355 rest[_key - 2] = arguments[_key]; 356 } 357 return Reflect.get.apply(Reflect, [target, key].concat(rest)); 358 } 359 }); 360 }; 361 Drupal.theme = function (func) { 362 if (func in Drupal.theme) { 363 var _Drupal$theme; 364 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 365 args[_key2 - 1] = arguments[_key2]; 366 }
vendor: 10,940 bytes, lines 367-404
367 return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args); 368 } 369 }; 370 Drupal.theme.placeholder = function (str) { 371 return "<em class=\"placeholder\">".concat(Drupal.checkPlain(str), "</em>"); 372 }; 373})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);; 374/** 375* DO NOT EDIT THIS FILE. 376* See the following change record for more information, 377* https://www.drupal.org/node/2815083 378* @preserve 379**/ 380if (window.jQuery) { 381 jQuery.noConflict(); 382} 383document.documentElement.className += ' js'; 384(function (Drupal, drupalSettings) { 385 var domReady = function domReady(callback) { 386 var listener = function listener() { 387 callback(); 388 document.removeEventListener('DOMContentLoaded', listener); 389 }; 390 if (document.readyState !== 'loading') { 391 setTimeout(callback, 0); 392 } else { 393 document.addEventListener('DOMContentLoaded', listener); 394 } 395 }; 396 domReady(function () { 397 Drupal.attachBehaviors(document, drupalSettings); 398 }); 399})(Drupal, window.drupalSettings);; 400/*! picturefill - v3.0.2 - 2016-02-12 401 * https://scottjehl.github.io/picturefill/ 402 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT 403 */ 404!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||" "===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")}
404,j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);; 405/*! 406* tabbable 5.3.3 407* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 408*/ 409!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.tabbable,o=e.tabbable={};t(o),o.noConflict=function(){return e.tabbable=n,o}}())}(this,(function(e){"use strict";var t=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],n=t.join(","),o="undefined"==typeof Element,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!o&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},a=function(e,t,o){var i=Array.prototype.slice.apply(e.querySelectorAll(n));return t&&r.call(e,n)&&i.unshift(e),i=i.filter(o)},l=function e(t,o,i){for(var a=[],l=Array.from(t);l.length;){var u=l.shift();if("SLOT"===u.tagName){var c=u.assignedElements(),d=e(c.length?c:u.children,!0,i);i.flatten?a.push.apply(a,d):a.push({scope:u,candidates:d})}else{r.call(u,n)&&i.filter(u)&&(o||!t.includes(u))&&a.push(u);var f=u.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(u),s=!i.shadowRootFilter||i.shadowRootFilter(u);if(f&&s){var p=e(!0===f?u.children:f.children,!0,i);i.flatten?a.push.apply(a,p):a.push({scope:u,candidates:p})}else l.unshift.apply(l,u.children)}}return a},u=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},c=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},f=function(e){return function(e){return d(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||i(e),o=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var r=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!r||r===e}(e)}
409,s=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},p=function(e,t){return!(t.disabled||function(e){return d(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var a=r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r.call(a,"details:not([open]) *"))return!0;var l=i(e).host,u=(null==l?void 0:l.ownerDocument.contains(l))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return s(e)}else{if("function"==typeof o){for(var c=e;e;){var d=e.parentElement,f=i(e);if(d&&!d.shadowRoot&&!0===o(d))return s(e);e=e.assignedSlot?e.assignedSlot:d||f===e.ownerDocument?d:f.host}e=c}if(u)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var o=t.children.item(n);if("LEGEND"===o.tagName)return!!r.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},h=function(e,t){return!(f(t)||u(t)<0||!p(e,t))},b=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},m=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:p.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a(e,t.includeContainer,p.bind(null,t))},e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==r.call(e,m)&&p(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==r.call(e,n)&&h(t,e)},e.tabbable=function(e,t){return function e(t){var n=[],o=[];return t.forEach((function(t,r){var i=!!t.scope,a=i?t.scope:t,l=u(a,i),c=i?e(t.candidates):a;0===l?i?n.push.apply(n,c):n.push(a):o.push({documentOrder:r,tabIndex:l,item:t,isScope:i,content:c})})),o.sort(c).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)}((t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:b}):a(e,t.includeContainer,h.bind(null,t)))},Object.defineProperty(e,"__esModule",{value:!0})})); 410 411; 412/** 413 * @file 414 * Defines Javascript behaviors for the commerce_google_tag_manager module. 415 */ 416 417(function ($, window, drupalSettings) { 418 'use strict'; 419 420 $(function() { 421 if (!drupalSettings) { 422 return; 423 } 424 425 var settings = drupalSettings.commerceGoogleTagManager || {}; 426 var url = settings.eventsUrl; 427 var dataLayerVariable = settings.dataLayerVariable; 428 429 if (!dataLayerVariable || !window.hasOwnProperty(dataLayerVariable)) { 430 return; 431 } 432 433 var dataLayer = window[dataLayerVariable]; 434 435 $.get(url, function(data) { 436 if (data && data.length) { 437 data.forEach(function(eventData) { 438 dataLayer.push(eventData); 439 }); 440 } 441 }); 442 }); 443})(jQuery, window, drupalSettings); 444; 445/** 446 * @file 447 * Drupal Bootstrap object. 448 */ 449 450/** 451 * All Drupal Bootstrap JavaScript APIs are contained in this namespace. 452 * 453 * @param {underscore} _ 454 * @param {jQuery} $ 455 * @param {Drupal} Drupal 456 * @param {drupalSettings} drupalSettings 457 */ 458(function (_, $, Drupal, drupalSettings) { 459 'use strict'; 460 461 /** 462 * @typedef Drupal.bootstrap 463 */ 464 var Bootstrap = { 465 processedOnce: {}, 466 settings: drupalSettings.bootstrap || {} 467 }; 468 469 /** 470 * Wraps Drupal.checkPlain() to ensure value passed isn't empty. 471 * 472 * Encodes special characters in a plain-text string for display as HTML. 473 * 474 * @param {string} str 475 * The string to be encoded. 476 * 477 * @return {string} 478 * The encoded string. 479 * 480 * @ingroup sanitization 481 */ 482 Bootstrap.checkPlain = function (str) { 483 return str && Drupal.checkPlain(str) || ''; 484 }; 485 486 /** 487 * Creates a jQuery plugin. 488 * 489 * @param {String} id 490 * A jQuery plugin identifier located in $.fn. 491 * @param {Function} plugin 492 * A constructor function used to initialize the for the jQuery plugin. 493 * @param {Boolean} [noConflict]
494 * Flag indicating whether or not to create a ".noConflict()" helper method 495 * for the plugin. 496 */ 497 Bootstrap.createPlugin = function (id, plugin, noConflict) { 498 // Immediately return if plugin doesn't exist. 499 if ($.fn[id] !== void 0) { 500 return this.fatal('Specified jQuery plugin identifier already exists: @id. Use Drupal.bootstrap.replacePlugin() instead.', {'@id': id}); 501 } 502 503 // Immediately return if plugin isn't a function. 504 if (typeof plugin !== 'function') { 505 return this.fatal('You must provide a constructor function to create a jQuery plugin "@id": @plugin', {'@id': id, '@plugin': plugin}); 506 } 507 508 // Add a ".noConflict()" helper method. 509 this.pluginNoConflict(id, plugin, noConflict); 510 511 $.fn[id] = plugin; 512 }; 513 514 /** 515 * Diff object properties. 516 * 517 * @param {...Object} objects 518 * Two or more objects. The first object will be used to return properties 519 * values. 520 * 521 * @return {Object} 522 * Returns the properties of the first passed object that are not present 523 * in all other passed objects. 524 */ 525 Bootstrap.diffObjects = function (objects) { 526 var args = Array.prototype.slice.call(arguments); 527 return _.pick(args[0], _.difference.apply(_, _.map(args, function (obj) { 528 return Object.keys(obj); 529 }))); 530 }; 531 532 /** 533 * Map of supported events by regular expression. 534 * 535 * @type {Object<Event|MouseEvent|KeyboardEvent|TouchEvent,RegExp>} 536 */ 537 Bootstrap.eventMap = { 538 Event: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/, 539 MouseEvent: /^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/, 540 KeyboardEvent: /^(?:key(?:down|press|up))$/, 541 TouchEvent: /^(?:touch(?:start|end|move|cancel))$/ 542 }; 543 544 /** 545 * Extends a jQuery Plugin. 546 * 547 * @param {String} id 548 * A jQuery plugin identifier located in $.fn. 549 * @param {Function} callback 550 * A constructor function used to initialize the for the jQuery plugin. 551 * 552 * @return {Function|Boolean} 553 * The jQuery plugin constructor or FALSE if the plugin does not exist. 554 */ 555 Bootstrap.extendPlugin = function (id, callback) { 556 // Immediately return if plugin doesn't exist. 557 if (typeof $.fn[id] !== 'function') { 558 return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id': id}); 559 } 560 561 // Immediately return if callback isn't a function. 562 if (typeof callback !== 'function') { 563 return this.fatal('You must provide a callback function to extend the jQuery plugin "@id": @callback', {'@id': id, '@callback': callback}); 564 } 565 566 // Determine existing plugin constructor. 567 var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id]; 568 var plugin = callback.apply(constructor, [this.settings]); 569 if (!$.isPlainObject(plugin)) { 570 return this.fatal('Returned value from callback is not a plain object that can be used to extend the jQuery plugin "@id": @obj', {'@obj': plugin}); 571 } 572 573 this.wrapPluginConstructor(constructor, plugin, true); 574 575 return $.fn[id]; 576 }; 577 578 Bootstrap.superWrapper = function (parent, fn) { 579 return function () { 580 var previousSuper = this.super; 581 this.super = parent; 582 var ret = fn.apply(this, arguments); 583 if (previousSuper) { 584 this.super = previousSuper; 585 } 586 else { 587 delete this.super; 588 } 589 return ret; 590 }; 591 }; 592 593 /** 594 * Provide a helper method for displaying when something is went wrong. 595 * 596 * @param {String} message 597 * The message to display. 598 * @param {Object} [args] 599 * An arguments to use in message. 600 * 601 * @return {Boolean} 602 * Always returns FALSE. 603 */ 604 Bootstrap.fatal = function (message, args) { 605 if (this.settings.dev && console.warn) { 606 for (var name in args) { 607 if (args.hasOwnProperty(name) && typeof args[name] === 'object') { 608 args[name] = JSON.stringify(args[name]); 609 } 610 } 611 Drupal.throwError(new Error(Drupal.formatString(message, args))); 612 } 613 return false; 614 }; 615 616 /** 617 * Intersects object properties. 618 * 619 * @param {...Object} objects 620 * Two or more objects. The first object will be used to return properties 621 * values. 622 * 623 * @return {Object} 624 * Returns the properties of first passed object that intersects with all 625 * other passed objects. 626 */ 627 Bootstrap.intersectObjects = function (objects) { 628 var args = Array.prototype.slice.call(arguments); 629 return _.pick(args[0], _.intersection.apply(_, _.map(args, function (obj) { 630 return Object.keys(obj); 631 }
631))); 632 }; 633 634 /** 635 * Normalizes an object's values. 636 * 637 * @param {Object} obj 638 * The object to normalize. 639 * 640 * @return {Object} 641 * The normalized object. 642 */ 643 Bootstrap.normalizeObject = function (obj) { 644 if (!$.isPlainObject(obj)) { 645 return obj; 646 } 647 648 for (var k in obj) { 649 if (typeof obj[k] === 'string') { 650 if (obj[k] === 'true') { 651 obj[k] = true; 652 } 653 else if (obj[k] === 'false') { 654 obj[k] = false; 655 } 656 else if (obj[k].match(/^[\d-.]$/)) { 657 obj[k] = parseFloat(obj[k]); 658 } 659 } 660 else if ($.isPlainObject(obj[k])) { 661 obj[k] = Bootstrap.normalizeObject(obj[k]); 662 } 663 } 664 665 return obj; 666 }; 667 668 /** 669 * An object based once plugin (similar to jquery.once, but without the DOM). 670 * 671 * @param {String} id 672 * A unique identifier. 673 * @param {Function} callback 674 * The callback to invoke if the identifier has not yet been seen. 675 * 676 * @return {Bootstrap} 677 */ 678 Bootstrap.once = function (id, callback) { 679 // Immediately return if identifier has already been processed. 680 if (this.processedOnce[id]) { 681 return this; 682 } 683 callback.call(this, this.settings); 684 this.processedOnce[id] = true; 685 return this; 686 }; 687 688 /** 689 * Provide jQuery UI like ability to get/set options for Bootstrap plugins. 690 * 691 * @param {string|object} key 692 * A string value of the option to set, can be dot like to a nested key. 693 * An object of key/value pairs. 694 * @param {*} [value] 695 * (optional) A value to set for key. 696 * 697 * @returns {*} 698 * - Returns nothing if key is an object or both key and value parameters 699 * were provided to set an option. 700 * - Returns the a value for a specific setting if key was provided. 701 * - Returns an object of key/value pairs of all the options if no key or 702 * value parameter was provided. 703 * 704 * @see https://github.com/jquery/jquery-ui/blob/master/ui/widget.js 705 */ 706 Bootstrap.option = function (key, value) { 707 var options = $.isPlainObject(key) ? $.extend({}, key) : {}; 708 709 // Get all options (clone so it doesn't reference the internal object). 710 if (arguments.length === 0) { 711 return $.extend({}, this.options); 712 } 713 714 // Get/set single option. 715 if (typeof key === "string") { 716 // Handle nested keys in dot notation. 717 // e.g., "foo.bar" => { foo: { bar: true } } 718 var parts = key.split('.'); 719 key = parts.shift(); 720 var obj = options; 721 if (parts.length) { 722 for (var i = 0; i < parts.length - 1; i++) { 723 obj[parts[i]] = obj[parts[i]] || {}; 724 obj = obj[parts[i]]; 725 } 726 key = parts.pop(); 727 } 728 729 // Get. 730 if (arguments.length === 1) { 731 return obj[key] === void 0 ? null : obj[key]; 732 } 733 734 // Set. 735 obj[key] = value; 736 } 737 738 // Set multiple options. 739 $.extend(true, this.options, options); 740 }; 741 742 /** 743 * Adds a ".noConflict()" helper method if needed. 744 * 745 * @param {String} id 746 * A jQuery plugin identifier located in $.fn. 747 * @param {Function} plugin 748 * @param {Function} plugin 749 * A constructor function used to initialize the for the jQuery plugin. 750 * @param {Boolean} [noConflict] 751 * Flag indicating whether or not to create a ".noConflict()" helper method 752 * for the plugin. 753 */ 754 Bootstrap.pluginNoConflict = function (id, plugin, noConflict) { 755 if (plugin.noConflict === void 0 && (noConflict === void 0 || noConflict)) { 756 var old = $.fn[id]; 757 plugin.noConflict = function () { 758 $.fn[id] = old; 759 return this; 760 }; 761 } 762 }; 763 764 /** 765 * Creates a handler that relays to another event name. 766 * 767 * @param {HTMLElement|jQuery} target 768 * A target element. 769 * @param {String} name 770 * The name of the event to trigger. 771 * @param {Boolean} [stopPropagation=true] 772 * Flag indicating whether to stop the propagation of the event, defaults 773 * to true. 774 * 775 * @return {Function} 776 * An even handler callback function. 777 */ 778 Bootstrap.relayEvent = function (target, name, stopPropagation) { 779 return function (e) { 780 if (stopPropagation === void 0 || stopPropagation) { 781 e.stopPropagation(); 782 } 783 var $target = $(target);
784 var parts = name.split('.').filter(Boolean); 785 var type = parts.shift(); 786 e.target = $target[0]; 787 e.currentTarget = $target[0]; 788 e.namespace = parts.join('.'); 789 e.type = type; 790 $target.trigger(e); 791 }; 792 }; 793 794 /** 795 * Replaces a Bootstrap jQuery plugin definition. 796 * 797 * @param {String} id 798 * A jQuery plugin identifier located in $.fn. 799 * @param {Function} callback 800 * A callback function that is immediately invoked and must return a 801 * function that will be used as the plugin constructor. 802 * @param {Boolean} [noConflict] 803 * Flag indicating whether or not to create a ".noConflict()" helper method 804 * for the plugin. 805 */ 806 Bootstrap.replacePlugin = function (id, callback, noConflict) { 807 // Immediately return if plugin doesn't exist. 808 if (typeof $.fn[id] !== 'function') { 809 return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id': id}); 810 } 811 812 // Immediately return if callback isn't a function. 813 if (typeof callback !== 'function') { 814 return this.fatal('You must provide a valid callback function to replace a jQuery plugin: @callback', {'@callback': callback}); 815 } 816 817 // Determine existing plugin constructor. 818 var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id]; 819 var plugin = callback.apply(constructor, [this.settings]); 820 821 // Immediately return if plugin isn't a function. 822 if (typeof plugin !== 'function') { 823 return this.fatal('Returned value from callback is not a usable function to replace a jQuery plugin "@id": @plugin', {'@id': id, '@plugin': plugin}); 824 } 825 826 this.wrapPluginConstructor(constructor, plugin); 827 828 // Add a ".noConflict()" helper method. 829 this.pluginNoConflict(id, plugin, noConflict); 830 831 $.fn[id] = plugin; 832 }; 833 834 /** 835 * Simulates a native event on an element in the browser. 836 * 837 * Note: This is a fairly complete modern implementation. If things aren't 838 * working quite the way you intend (in older browsers), you may wish to use 839 * the jQuery.simulate plugin. If it's available, this method will defer to 840 * that plugin. 841 * 842 * @see https://github.com/jquery/jquery-simulate 843 * 844 * @param {HTMLElement|jQuery} element 845 * A DOM element to dispatch event on. Note: this may be a jQuery object, 846 * however be aware that this will trigger the same event for each element 847 * inside the jQuery collection; use with caution. 848 * @param {String|String[]} type 849 * The type(s) of event to simulate. 850 * @param {Object} [options] 851 * An object of options to pass to the event constructor. Typically, if 852 * an event is being proxied, you should just pass the original event 853 * object here. This allows, if the browser supports it, to be a truly 854 * simulated event. 855 * 856 * @return {Boolean} 857 * The return value is false if event is cancelable and at least one of the 858 * event handlers which handled this event called Event.preventDefault(). 859 * Otherwise it returns true. 860 */ 861 Bootstrap.simulate = function (element, type, options) { 862 // Handle jQuery object wrappers so it triggers on each element. 863 var ret = true; 864 if (element instanceof $) { 865 element.each(function () { 866 if (!Bootstrap.simulate(this, type, options)) { 867 ret = false;
868 } 869 }); 870 return ret; 871 } 872 873 if (!(element instanceof HTMLElement)) { 874 this.fatal('Passed element must be an instance of HTMLElement, got "@type" instead.', { 875 '@type': typeof element, 876 }); 877 } 878 879 // Defer to the jQuery.simulate plugin, if it's available. 880 if (typeof $.simulate === 'function') { 881 new $.simulate(element, type, options); 882 return true; 883 } 884 885 var event; 886 var ctor; 887 var types = [].concat(type); 888 for (var i = 0, l = types.length; i < l; i++) { 889 type = types[i]; 890 for (var name in this.eventMap) { 891 if (this.eventMap[name].test(type)) { 892 ctor = name; 893 break; 894 } 895 } 896 if (!ctor) { 897 throw new SyntaxError('Only rudimentary HTMLEvents, KeyboardEvents and MouseEvents are supported: ' + type); 898 } 899 var opts = {bubbles: true, cancelable: true}; 900 if (ctor === 'KeyboardEvent' || ctor === 'MouseEvent') { 901 $.extend(opts, {ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1}); 902 } 903 if (ctor === 'MouseEvent') { 904 $.extend(opts, {button: 0, pointerX: 0, pointerY: 0, view: window}); 905 } 906 if (options) { 907 $.extend(opts, options); 908 } 909 if (typeof window[ctor] === 'function') { 910 event = new window[ctor](type, opts); 911 if (!element.dispatchEvent(event)) { 912 ret = false;
913 } 914 } 915 else if (document.createEvent) { 916 event = document.createEvent(ctor); 917 event.initEvent(type, opts.bubbles, opts.cancelable); 918 if (!element.dispatchEvent(event)) { 919 ret = false; 920 } 921 } 922 else if (typeof element.fireEvent === 'function') { 923 event = $.extend(document.createEventObject(), opts); 924 if (!element.fireEvent('on' + type, event)) { 925 ret = false; 926 } 927 } 928 else if (typeof element[type]) { 929 element[type](); 930 } 931 } 932 return ret; 933 }; 934 935 /** 936 * Strips HTML and returns just text. 937 * 938 * @param {String|Element|jQuery} html 939 * A string of HTML content, an Element DOM object or a jQuery object. 940 * 941 * @return {String} 942 * The text without HTML tags. 943 * 944 * @todo Replace with http://locutus.io/php/strings/strip_tags/ 945 */ 946 Bootstrap.stripHtml = function (html) { 947 if (html instanceof $) { 948 html = html.html(); 949 } 950 else if (html instanceof Element) { 951 html = html.innerHTML; 952 } 953 var tmp = document.createElement('DIV'); 954 tmp.innerHTML = html; 955 return (tmp.textContent || tmp.innerText || '').replace(/^[\s\n\t]*|[\s\n\t]*$/, ''); 956 }; 957 958 /** 959 * Provide a helper method for displaying when something is unsupported. 960 * 961 * @param {String} type 962 * The type of unsupported object, e.g. method or option. 963 * @param {String} name 964 * The name of the unsupported object. 965 * @param {*} [value] 966 * The value of the unsupported object. 967 */ 968 Bootstrap.unsupported = function (type, name, value) { 969 Bootstrap.warn('Unsupported by Drupal Bootstrap: (@type) @name -> @value', { 970 '@type': type, 971 '@name': name, 972 '@value': typeof value === 'object' ? JSON.stringify(value) : value 973 }); 974 }; 975 976 /** 977 * Provide a helper method to display a warning. 978 * 979 * @param {String} message 980 * The message to display. 981 * @param {Object} [args] 982 * Arguments to use as replacements in Drupal.formatString. 983 */ 984 Bootstrap.warn = function (message, args) { 985 if (this.settings.dev && console.warn) { 986 console.warn(Drupal.formatString(message, args)); 987 } 988 }; 989 990 /** 991 * Wraps a plugin with common functionality. 992 * 993 * @param {Function} constructor 994 * A plugin constructor being wrapped. 995 * @param {Object|Function} plugin 996 * The plugin being wrapped. 997 * @param {Boolean} [extend = false] 998 * Whether to add super extensibility. 999 */ 1000 Bootstrap.wrapPluginConstructor = function (constructor, plugin, extend) { 1001 var proto = constructor.prototype; 1002 1003 // Add a jQuery UI like option getter/setter method. 1004 var option = this.option; 1005 if (proto.option === void(0)) { 1006 proto.option = function () { 1007 return option.apply(this, arguments); 1008 }; 1009 } 1010 1011 if (extend) { 1012 // Handle prototype properties separately. 1013 if (plugin.prototype !== void 0) { 1014 for (var key in plugin.prototype) { 1015 if (!plugin.prototype.hasOwnProperty(key)) continue; 1016 var value = plugin.prototype[key]; 1017 if (typeof value === 'function') { 1018 proto[key] = this.superWrapper(proto[key] || function () {}, value); 1019 } 1020 else { 1021 proto[key] = $.isPlainObject(value) ? $.extend(true, {}, proto[key], value) : value; 1022 } 1023 } 1024 } 1025 delete plugin.prototype; 1026 1027 // Handle static properties. 1028 for (key in plugin) { 1029 if (!plugin.hasOwnProperty(key)) continue; 1030 value = plugin[key]; 1031 if (typeof value === 'function') { 1032 constructor[key] = this.superWrapper(constructor[key] || function () {}, value); 1033 } 1034 else { 1035 constructor[key] = $.isPlainObject(value) ? $.extend(true, {}, constructor[key], value) : value; 1036 } 1037 } 1038 } 1039 }; 1040 1041 // Add Bootstrap to the global Drupal object. 1042 Drupal.bootstrap = Drupal.bootstrap || Bootstrap; 1043 1044})(window._, window.jQuery, window.Drupal, window.drupalSettings); 1045; 1046(function ($, _) { 1047 1048 /** 1049 * @class Attributes 1050 * 1051 * Modifies attributes. 1052 * 1053 * @param {Object|Attributes} attributes 1054 * An object to initialize attributes with. 1055 */ 1056 var Attributes = function (attributes) { 1057 this.data = {}; 1058 this.data['class'] = [];
1059 this.merge(attributes); 1060 }; 1061 1062 /** 1063 * Renders the attributes object as a string to inject into an HTML element. 1064 * 1065 * @return {String} 1066 * A rendered string suitable for inclusion in HTML markup. 1067 */ 1068 Attributes.prototype.toString = function () { 1069 var output = ''; 1070 var name, value; 1071 var checkPlain = function (str) { 1072 return str && str.toString().replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>') || ''; 1073 }; 1074 var data = this.getData(); 1075 for (name in data) { 1076 if (!data.hasOwnProperty(name)) continue; 1077 value = data[name]; 1078 if (_.isFunction(value)) value = value(); 1079 if (_.isObject(value)) value = _.values(value); 1080 if (_.isArray(value)) value = value.join(' '); 1081 output += ' ' + checkPlain(name) + '="' + checkPlain(value) + '"'; 1082 } 1083 return output; 1084 }; 1085 1086 /** 1087 * Renders the Attributes object as a plain object. 1088 * 1089 * @return {Object} 1090 * A plain object suitable for inclusion in DOM elements. 1091 */ 1092 Attributes.prototype.toPlainObject = function () { 1093 var object = {}; 1094 var name, value; 1095 var data = this.getData(); 1096 for (name in data) { 1097 if (!data.hasOwnProperty(name)) continue; 1098 value = data[name]; 1099 if (_.isFunction(value)) value = value(); 1100 if (_.isObject(value)) value = _.values(value); 1101 if (_.isArray(value)) value = value.join(' '); 1102 object[name] = value; 1103 } 1104 return object; 1105 }; 1106 1107 /** 1108 * Add class(es) to the array. 1109 * 1110 * @param {string|Array} value 1111 * An individual class or an array of classes to add. 1112 * 1113 * @return {Attributes} 1114 * 1115 * @chainable 1116 */ 1117 Attributes.prototype.addClass = function (value) { 1118 var args = Array.prototype.slice.call(arguments); 1119 this.data['class'] = this.sanitizeClasses(this.data['class'].concat(args)); 1120 return this; 1121 }; 1122 1123 /** 1124 * Returns whether the requested attribute exists. 1125 * 1126 * @param {string} name 1127 * An attribute name to check. 1128 * 1129 * @return {boolean} 1130 * TRUE or FALSE 1131 */ 1132 Attributes.prototype.exists = function (name) { 1133 return this.data[name] !== void(0) && this.data[name] !== null; 1134 }; 1135 1136 /** 1137 * Retrieve a specific attribute from the array. 1138 * 1139 * @param {string} name 1140 * The specific attribute to retrieve. 1141 * @param {*} defaultValue 1142 * (optional) The default value to set if the attribute does not exist. 1143 * 1144 * @return {*} 1145 * A specific attribute value, passed by reference. 1146 */ 1147 Attributes.prototype.get = function (name, defaultValue) { 1148 if (!this.exists(name)) this.data[name] = defaultValue; 1149 return this.data[name]; 1150 }; 1151 1152 /** 1153 * Retrieves a cloned copy of the internal attributes data object. 1154 * 1155 * @return {Object} 1156 */ 1157 Attributes.prototype.getData = function () { 1158 return _.extend({}, this.data); 1159 }; 1160 1161 /** 1162 * Retrieves classes from the array. 1163 * 1164 * @return {Array} 1165 * The classes array. 1166 */ 1167 Attributes.prototype.getClasses = function () { 1168 return this.get('class', []); 1169 }; 1170 1171 /** 1172 * Indicates whether a class is present in the array. 1173 * 1174 * @param {string|Array} className 1175 * The class(es) to search for. 1176 * 1177 * @return {boolean} 1178 * TRUE or FALSE 1179 */ 1180 Attributes.prototype.hasClass = function (className) { 1181 className = this.sanitizeClasses(Array.prototype.slice.call(arguments)); 1182 var classes = this.getClasses(); 1183 for (var i = 0, l = className.length; i < l; i++) { 1184 // If one of the classes fails, immediately return false. 1185 if (_.indexOf(classes, className[i]) === -1) { 1186 return false; 1187 } 1188 } 1189 return true; 1190 }; 1191 1192 /** 1193 * Merges multiple values into the array. 1194 * 1195 * @param {Attributes|Node|jQuery|Object} object 1196 * An Attributes object with existing data, a Node DOM element, a jQuery 1197 * instance or a plain object where the key is the attribute name and the 1198 * value is the attribute value. 1199 * @param {boolean} [recursive] 1200 * Flag determining whether or not to recursively merge key/value pairs. 1201 * 1202 * @return {Attributes} 1203 * 1204 * @chainable 1205 */ 1206 Attributes.prototype.merge = function (object, recursive) { 1207 // Immediately return if there is nothing to merge. 1208 if (!object) { 1209 return this; 1210 } 1211 1212 // Get attributes from a jQuery element. 1213 if (object instanceof $) { 1214 object = object[0]; 1215 } 1216 1217 // Get attributes from a DOM element. 1218 if (object instanceof Node) { 1219 object = Array.prototype.slice.call(object.attributes).reduce(function (attributes, attribute) { 1220 attributes[attribute.name] = attribute.value; 1221 return attributes; 1222 }, {}); 1223 } 1224 // Get attributes from an Attributes instance. 1225 else if (object instanceof Attributes) { 1226 object = object.getData(); 1227 } 1228 // Otherwise, clone the object. 1229 else { 1230 object = _.extend({}, object); 1231 } 1232 1233 // By this point, there should be a valid plain object. 1234 if (!$.isPlainObject(object)) { 1235 setTimeout(function () { 1236 throw new Error('Passed object is not supported: ' + object); 1237 }); 1238 return this; 1239 } 1240 1241 // Handle classes separately. 1242 if (object && object['class'] !== void 0) { 1243 this.addClass(object['class']); 1244 delete object['class']; 1245 } 1246 1247 if (recursive === void 0 || recursive) { 1248 this.data = $.extend(true, {}, this.data, object); 1249 } 1250 else { 1251 this.data = $.extend({}, this.data, object); 1252 } 1253 1254 return this; 1255 }; 1256 1257 /** 1258 * Removes an attribute from the array. 1259 * 1260 * @param {string} name 1261 * The name of the attribute to remove. 1262 * 1263 * @return {Attributes} 1264 * 1265 * @chainable 1266 */ 1267 Attributes.prototype.remove = function (name) { 1268 if (this.exists(name)) delete this.data[name]; 1269 return this; 1270 }; 1271 1272 /** 1273 * Removes a class from the attributes array. 1274 * 1275 * @param {...string|Array} className 1276 * An individual class or an array of classes to remove. 1277 * 1278 * @return {Attributes} 1279 * 1280 * @chainable 1281 */ 1282 Attributes.prototype.removeClass = function (className) { 1283 var remove = this.sanitizeClasses(Array.prototype.slice.apply(arguments)); 1284 this.data['class'] = _.without(this.getClasses(), remove); 1285 return this; 1286 }; 1287 1288 /** 1289 * Replaces a class in the attributes array. 1290 * 1291 * @param {string} oldValue 1292 * The old class to remove. 1293 * @param {string} newValue 1294 * The new class. It will not be added if the old class does not exist. 1295 * 1296 * @return {Attributes} 1297 * 1298 * @chainable 1299 */ 1300 Attributes.prototype.replaceClass = function (oldValue, newValue) { 1301 var classes = this.getClasses(); 1302 var i = _.indexOf(this.sanitizeClasses(oldValue), classes); 1303 if (i >= 0) { 1304 classes[i] = newValue; 1305 this.set('class', classes); 1306 } 1307 return this; 1308 }; 1309 1310 /** 1311 * Ensures classes are flattened into a single is an array and sanitized. 1312 * 1313 * @param {...String|Array} classes 1314 * The class or classes to sanitize. 1315 * 1316 * @return {Array} 1317 * A sanitized array of classes. 1318 */ 1319 Attributes.prototype.sanitizeClasses = function (classes) { 1320 return _.chain(Array.prototype.slice.call(arguments)) 1321 // Flatten in case there's a mix of strings and arrays. 1322 .flatten() 1323 1324 // Split classes that may have been added with a space as a separator. 1325 .map(function (string) { 1326 return string.split(' '); 1327 }) 1328 1329 // Flatten again since it was just split into arrays. 1330 .flatten() 1331 1332 // Filter out empty items. 1333 .filter() 1334
1335 // Clean the class to ensure it's a valid class name. 1336 .map(function (value) { 1337 return Attributes.cleanClass(value); 1338 }) 1339 1340 // Ensure classes are unique. 1341 .uniq() 1342 1343 // Retrieve the final value. 1344 .value(); 1345 }; 1346 1347 /** 1348 * Sets an attribute on the array. 1349 * 1350 * @param {string} name 1351 * The name of the attribute to set. 1352 * @param {*} value 1353 * The value of the attribute to set. 1354 * 1355 * @return {Attributes} 1356 * 1357 * @chainable 1358 */ 1359 Attributes.prototype.set = function (name, value) { 1360 var obj = $.isPlainObject(name) ? name : {}; 1361 if (typeof name === 'string') { 1362 obj[name] = value; 1363 } 1364 return this.merge(obj); 1365 }; 1366 1367 /** 1368 * Prepares a string for use as a CSS identifier (element, class, or ID name). 1369 * 1370 * Note: this is essentially a direct copy from 1371 * \Drupal\Component\Utility\Html::cleanCssIdentifier 1372 * 1373 * @param {string} identifier 1374 * The identifier to clean. 1375 * @param {Object} [filter] 1376 * An object of string replacements to use on the identifier. 1377 * 1378 * @return {string} 1379 * The cleaned identifier. 1380 */ 1381 Attributes.cleanClass = function (identifier, filter) { 1382 filter = filter || { 1383 ' ': '-', 1384 '_': '-', 1385 '/': '-', 1386 '[': '-', 1387 ']': '' 1388 }; 1389 1390 identifier = identifier.toLowerCase(); 1391 1392 if (filter['__'] === void 0) { 1393 identifier = identifier.replace('__', '#DOUBLE_UNDERSCORE#'); 1394 } 1395 1396 identifier = identifier.replace(Object.keys(filter), Object.keys(filter).map(function(key) { return filter[key]; })); 1397 1398 if (filter['__'] === void 0) { 1399 identifier = identifier.replace('#DOUBLE_UNDERSCORE#', '__'); 1400 } 1401
1402 identifier = identifier.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/g, ''); 1403 identifier = identifier.replace(['/^[0-9]/', '/^(-[0-9])|^(--)/'], ['_', '__']); 1404 1405 return identifier; 1406 }; 1407 1408 /** 1409 * Creates an Attributes instance. 1410 * 1411 * @param {object|Attributes} [attributes] 1412 * An object to initialize attributes with. 1413 * 1414 * @return {Attributes} 1415 * An Attributes instance. 1416 * 1417 * @constructor 1418 */ 1419 Attributes.create = function (attributes) { 1420 return new Attributes(attributes); 1421 }; 1422 1423 window.Attributes = Attributes; 1424 1425})(window.jQuery, window._); 1426; 1427/** 1428 * @file 1429 * Theme hooks for the Drupal Bootstrap base theme. 1430 */ 1431(function ($, Drupal, Bootstrap, Attributes) { 1432 1433 /** 1434 * Fallback for theming an icon if the Icon API module is not installed. 1435 */ 1436 if (!Drupal.icon) Drupal.icon = { bundles: {} }; 1437 if (!Drupal.theme.icon || Drupal.theme.prototype.icon) { 1438 $.extend(Drupal.theme, /** @lends Drupal.theme */ { 1439 /** 1440 * Renders an icon. 1441 * 1442 * @param {string} bundle 1443 * The bundle which the icon belongs to. 1444 * @param {string} icon 1445 * The name of the icon to render. 1446 * @param {object|Attributes} [attributes] 1447 * An object of attributes to also apply to the icon. 1448 * 1449 * @returns {string} 1450 */ 1451 icon: function (bundle, icon, attributes) { 1452 if (!Drupal.icon.bundles[bundle]) return ''; 1453 attributes = Attributes.create(attributes).addClass('icon').set('aria-hidden', 'true'); 1454 icon = Drupal.icon.bundles[bundle](icon, attributes); 1455 return '<span' + attributes + '></span>'; 1456 } 1457 }); 1458 } 1459 1460 /** 1461 * Callback for modifying an icon in the "bootstrap" icon bundle. 1462 * 1463 * @param {string} icon 1464 * The icon being rendered. 1465 * @param {Attributes} attributes 1466 * Attributes object for the icon. 1467 */ 1468 Drupal.icon.bundles.bootstrap = function (icon, attributes) { 1469 attributes.addClass(['glyphicon', 'glyphicon-' + icon]); 1470 }; 1471 1472 /** 1473 * Add necessary theming hooks. 1474 */ 1475 $.extend(Drupal.theme, /** @lends Drupal.theme */ { 1476 1477 /** 1478 * Renders a Bootstrap AJAX glyphicon throbber. 1479 * 1480 * @returns {string} 1481 */ 1482 ajaxThrobber: function () { 1483 return Drupal.theme('bootstrapIcon', 'refresh', {'class': ['ajax-throbber', 'glyphicon-spin'] }); 1484 }, 1485 1486 /** 1487 * Renders a button element. 1488 * 1489 * @param {object|Attributes} attributes 1490 * An object of attributes to apply to the button. If it contains one of: 1491 * - value: The label of the button. 1492 * - context: The context type of Bootstrap button, can be one of: 1493 * - default 1494 * - primary 1495 * - success 1496 * - info 1497 * - warning 1498 * - danger 1499 * - link 1500 * 1501 * @returns {string} 1502 */ 1503 button: function (attributes) { 1504 attributes = Attributes.create(attributes).addClass('btn'); 1505 var context = attributes.get('context', 'default'); 1506 var label = attributes.get('value', ''); 1507 attributes.remove('context').remove('value'); 1508 if (!attributes.hasClass(['btn-default', 'btn-primary', 'btn-success', 'btn-info', 'btn-warning', 'btn-danger', 'btn-link'])) { 1509 attributes.addClass('btn-' + Bootstrap.checkPlain(context)); 1510 } 1511 1512 // Attempt to, intelligently, provide a default button "type". 1513 if (!attributes.exists('type')) { 1514 attributes.set('type', attributes.hasClass('form-submit') ? 'submit' : 'button'); 1515 } 1516 1517 return '<button' + attributes + '>' + label + '</button>'; 1518 }, 1519 1520 /** 1521 * Alias for "button" theme hook. 1522 * 1523 * @param {object|Attributes} attributes 1524 * An object of attributes to apply to the button. 1525 * 1526 * @see Drupal.theme.button() 1527 * 1528 * @returns {string} 1529 */ 1530 btn: function (attributes) { 1531 return Drupal.theme('button', attributes); 1532 }, 1533 1534 /** 1535 * Renders a button block element. 1536 * 1537 * @param {object|Attributes} attributes 1538 * An object of attributes to apply to the button. 1539 * 1540 * @see Drupal.theme.button() 1541 * 1542 * @returns {string} 1543 */ 1544 'btn-block': function (attributes) { 1545 return Drupal.theme('button', Attributes.create(attributes).addClass('btn-block')); 1546 }, 1547 1548 /**
1549 * Renders a large button element. 1550 * 1551 * @param {object|Attributes} attributes 1552 * An object of attributes to apply to the button. 1553 * 1554 * @see Drupal.theme.button() 1555 * 1556 * @returns {string} 1557 */ 1558 'btn-lg': function (attributes) { 1559 return Drupal.theme('button', Attributes.create(attributes).addClass('btn-lg')); 1560 }, 1561 1562 /** 1563 * Renders a small button element. 1564 * 1565 * @param {object|Attributes} attributes 1566 * An object of attributes to apply to the button. 1567 * 1568 * @see Drupal.theme.button() 1569 * 1570 * @returns {string} 1571 */ 1572 'btn-sm': function (attributes) { 1573 return Drupal.theme('button', Attributes.create(attributes).addClass('btn-sm')); 1574 }, 1575 1576 /** 1577 * Renders an extra small button element. 1578 * 1579 * @param {object|Attributes} attributes 1580 * An object of attributes to apply to the button. 1581 * 1582 * @see Drupal.theme.button() 1583 * 1584 * @returns {string} 1585 */ 1586 'btn-xs': function (attributes) { 1587 return Drupal.theme('button', Attributes.create(attributes).addClass('btn-xs')); 1588 }, 1589 1590 /** 1591 * Renders a glyphicon. 1592 * 1593 * @param {string} name 1594 * The name of the glyphicon. 1595 * @param {object|Attributes} [attributes] 1596 * An object of attributes to apply to the icon. 1597 * 1598 * @returns {string} 1599 */ 1600 bootstrapIcon: function (name, attributes) { 1601 return Drupal.theme('icon', 'bootstrap', name, attributes); 1602 } 1603 1604 }); 1605 1606})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes); 1607;
vendor: 37,045 bytes, lines 1608-1614
1608/*! 1609 * Bootstrap v3.3.7 (http://getbootstrap.com) 1610 * Copyright 2011-2016 Twitter, Inc. 1611 * Licensed under the MIT license 1612 */ 1613if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){ 1614this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
1614; 1615/** 1616 * This file contains global functions. 1617 **/ 1618 1619// Helper-function to add css var and use it in css to set correct height for mobile browser. 1620const oneVhValue = function () { 1621 // Get the viewport height and multiply it by 1% to get a value for a vh unit. 1622 const vh = window.innerHeight * 0.01; 1623 // Set the value in the --vh custom property to the root of the document 1624 document.documentElement.style.setProperty('--vh', (vh) + 'px'); 1625} 1626window.addEventListener('resize', oneVhValue); 1627oneVhValue(); 1628 1629// Helper-function to add var for using it in CSS. 1630// Calculates window scrollbar width. 1631const scrollbarWidthVar = function () { 1632 const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth; 1633 document.documentElement.style.setProperty('--scrollbarWidth', (scrollbarWidth) + 'px'); 1634} 1635scrollbarWidthVar(); 1636window.addEventListener('resize', scrollbarWidthVar); 1637 1638(function ($) { 1639 1640 // Bugfix: Some dialogs (LB page) does not remove the 'modal-open' classname. 1641 $(window).on('dialog:afterclose', () => { 1642 setTimeout(() => { 1643 // Check before remove the class name as there can be several modals opened at once. 1644 if (!$('body').find('.modal').length) { 1645 $('body').removeClass('modal-open'); 1646 } 1647 else if (!$('body').hasClass('modal-open')) { 1648 // Add the class name back if there is an open modal. 1649 $('body').addClass('modal-open'); 1650 } 1651 }, 0); 1652 }); 1653 1654 // Close dialog when click on '.modal-dialog'. 1655 $('body').on('click', '.modal-dialog', function (ev) { 1656 // Not LB edit page. 1657 if (ev.currentTarget === ev.target && !$('.layout-builder-form').length) { 1658 $(ev.currentTarget).closest('.modal').dialog('close'); 1659 } 1660 }); 1661 // Close dialog when click on '.modal'. 1662 $('body').on('click', '.modal', function (ev) { 1663 // Not LB edit page. 1664 if (ev.currentTarget === ev.target && !$('.layout-builder-form').length) { 1665 $(ev.currentTarget).dialog('close'); 1666 } 1667 }); 1668 1669})(jQuery); 1670 1671/* SLIDE UP */ 1672const slideUp = (target, duration= 500) => { 1673 target.style.transitionProperty = 'height, margin, padding'; 1674 target.style.transitionDuration = duration + 'ms'; 1675 target.style.boxSizing = 'border-box'; 1676 target.style.height = target.offsetHeight + 'px'; 1677 target.offsetHeight; 1678 target.style.overflow = 'hidden'; 1679 target.style.height = 0; 1680 target.style.paddingTop = 0; 1681 target.style.paddingBottom = 0; 1682 target.style.marginTop = 0; 1683 target.style.marginBottom = 0; 1684 window.setTimeout( () => { 1685 target.style.display = 'none'; 1686 target.style.removeProperty('height'); 1687 target.style.removeProperty('padding-top'); 1688 target.style.removeProperty('padding-bottom'); 1689 target.style.removeProperty('margin-top'); 1690 target.style.removeProperty('margin-bottom'); 1691 target.style.removeProperty('overflow'); 1692 target.style.removeProperty('transition-duration'); 1693 target.style.removeProperty('transition-property'); 1694 }, duration); 1695} 1696 1697/* SLIDE DOWN */ 1698const slideDown = (target, duration= 500, displayValue = 'block') => { 1699 target.style.removeProperty('display'); 1700 let display = window.getComputedStyle(target).display; 1701 if (display === 'none') display = displayValue; 1702 target.style.display = display; 1703 let height = target.offsetHeight; 1704 target.style.overflow = 'hidden'; 1705 target.style.height = 0; 1706 target.style.paddingTop = 0; 1707 target.style.paddingBottom = 0; 1708 target.style.marginTop = 0; 1709 target.style.marginBottom = 0; 1710 target.offsetHeight; 1711 target.style.boxSizing = 'border-box'; 1712 target.style.transitionProperty = "height, margin, padding"; 1713 target.style.transitionDuration = duration + 'ms'; 1714 target.style.height = height + 'px'; 1715 target.style.removeProperty('padding-top'); 1716 target.style.removeProperty('padding-bottom'); 1717 target.style.removeProperty('margin-top'); 1718 target.style.removeProperty('margin-bottom'); 1719 window.setTimeout( () => { 1720 target.style.removeProperty('height'); 1721 target.style.removeProperty('overflow'); 1722 target.style.removeProperty('transition-duration'); 1723 target.style.removeProperty('transition-property'); 1724 }, duration); 1725} 1726 1727/* TOOGLE */ 1728const slideToggle = (target, duration = 500, displayValue = 'block') => { 1729 if (window.getComputedStyle(target).display === 'none') { 1730 return slideDown(target, duration, displayValue); 1731 } else { 1732 return slideUp(target, duration); 1733 } 1734} 1735 1736// Add custom ajax complete event. 1737const send = XMLHttpRequest.prototype.send; 1738XMLHttpRequest.prototype.send = function () { 1739 this.addEventListener('load', function() { 1740 document.dispatchEvent(new Event('ajax_complete')); 1741 }); 1742 return send.apply(this, arguments) 1743} 1744 1745function setCookie(cookieName, cookieValue, expiryDays) { 1746 var d = new Date(); 1747 d.setTime(d.getTime() + (expiryDays*24*60*60*1000)); 1748 var expires = "expires="+ d.toUTCString(); 1749 document.cookie = cookieName + "=" + cookieValue + "; " + expires + "; path=/"; 1750} 1751function getCookie(name) { 1752 var value = "; " + document.cookie; 1753 var parts = value.split("; " + name + "="); 1754 if (parts.length == 2) return parts.pop().split(";").shift(); 1755} 1756; 1757/* No need to wrap with Drupal.behaviors to prevent double execution for example after aja
1757x events */ 1758if (getCookie('currentURL') && getCookie('currentURL') !== window.location.href) { 1759 setCookie('previousURL', getCookie('currentURL'), { 1760 path: '/', 1761 }); 1762} 1763setTimeout(() => { 1764 setCookie('currentURL', window.location.href, { 1765 path: '/', 1766 }); 1767}, 100); 1768document.addEventListener('ajax_complete', () => { 1769 setCookie('currentURL', window.location.href, { 1770 path: '/', 1771 }); 1772}); 1773 1774(function () { 1775 Drupal.behaviors.storeBackBtnPath = { 1776 attach(context) { 1777 setTimeout(() => { 1778 // It allows to go back to the prev. page of view (pagination). 1779 if (getCookie('previousURL') && getCookie('previousURL').includes('?page=') 1780 && (document.body.classList.contains('page-node-type-news') 1781 || document.body.classList.contains('page-node-type-event') 1782 || document.body.classList.contains('page-node-type-hall'))) { 1783 document.querySelector('.page-header > .back-btn', context).setAttribute('href', getCookie('previousURL')) 1784 } 1785 1786 if (getCookie('previousURL') 1787 // It allows to go back to a view with active filter. 1788 // OR go back to /tidligere-arrangementer with archived pages. 1789 && (getCookie('previousURL').includes('event_category=') || getCookie('previousURL').includes('tidligere-arrangementer')) 1790 && document.body.classList.contains('page-node-type-event')) { 1791 document.querySelector('.page-header > .back-btn', context).setAttribute('href', getCookie('previousURL')) 1792 } 1793 }, 100); 1794 }, 1795 }; 1796})(); 1797; 1798(function ($) { 1799 1800 // Stop massive dropdown from closing when beeing clicked inside. 1801 $(document).on('click', '.massive-dropdown.dropdown-menu', function (e) { 1802 e.stopPropagation(); 1803 }); 1804 1805 // Language menu 1806 if ($('html').attr('lang')) { 1807 var lang = $('html').attr('lang'); 1808 $('.dropdown.language-menu .value').html(lang); 1809 } 1810 1811})(jQuery); 1812; 1813(function ($) { 1814 'use strict'; 1815 // Remove class on page load 1816 $(function() { 1817 $('body').removeClass('preload'); 1818 }); 1819 1820 /** 1821 * Move search 1822 **/ 1823 Drupal.behaviors.moveSearch = { 1824 attach: function attach(context) { 1825 swapSearchPos(); 1826 $(window).resize(function() { 1827 swapSearchPos(); 1828 }); 1829 } 1830 }; 1831 1832 let search = $('.region-header-center .elasticsearch-ui-search'); 1833 1834 function swapSearchPos() { 1835 if ($(window).outerWidth() < 1025) { 1836 if ($('.mobile-search-wrap .elasticsearch-ui-search').length === 0) { 1837 $('.mobile-search-wrap').append(search); 1838 } 1839 } else { 1840 if ($('.region-header-center .elasticsearch-ui-search').length === 0) { 1841 $('.region-header-center').append(search); 1842 } 1843 } 1844 } 1845 1846})(jQuery); 1847; 1848/** 1849 * @file 1850 * Opens the Usercentrics privacy settings from links to #cookie-innstillinger. 1851 */ 1852(function (Drupal, once) { 1853 Drupal.behaviors.tsCmpSettingsLink = { 1854 attach(context) { 1855 once('ts-cmp-settings-link', 'a[href="#cookie-innstillinger"]', context).forEach((link) => { 1856 link.addEventListener('click', (event) => { 1857 if (window.UC_UI && typeof window.UC_UI.showSecondLayer === 'function') { 1858 event.preventDefault(); 1859 window.UC_UI.showSecondLayer(); 1860 } 1861 }); 1862 }); 1863 }, 1864 }; 1865})(Drupal, once); 1866; 1867!function(_,u,l){"use strict";var t,p=void 0===l.eu_cookie_compliance.cookie_value_disagreed||""===l.eu_cookie_compliance.cookie_value_disagreed?"0":l.eu_cookie_compliance.cookie_value_disagreed,r=void 0===l.eu_cookie_compliance.cookie_value_agreed_show_thank_you||""===l.eu_cookie_compliance.cookie_value_agreed_show_thank_you?"1":l.eu_cookie_compliance.cookie_value_agreed_show_thank_you,s=void 0===l.eu_cookie_compliance.cookie_value_agreed||""===l.eu_cookie_compliance.cookie_value_agreed?"2":l.eu_cookie_compliance.cookie_value_agreed;function m(e,o,i){var c="",n=(void 0!==i.expires&&("number"==typeof i.expires&&(n=new Date,i.expires=n.setTime(n.getTime()+24*i.expires*60*60*1e3)),c="; expires="+i.expires.toUTCString()),void 0===i.path?"/":i.path),a="";void 0!==i.domain&&(a="; domain="+i.domain),document.cookie=e+"="+(o||"")+c+"; path="+n+a+"; SameSite=Strict"}function a(e){var o=document.cookie.split(";");if(void 0===e)return o;for(var i=e+"=",c=0;c<o.length;c++){for(var n=o[c];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(i))return n.substring(i.length,n.length)}return null}function k(e){document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}u.behaviors.euCookieCompliancePopup={attach:function(e){if(void 0!==l.eu_cookie_compliance){const i=document.querySelector(l.eu_cookie_compliance.containing_element);var o;i.getAttribute("data-eu-cookie-compliance-once")||(i.setAttribute("data-eu-cookie-compliance-once","true"),g=d.getCurrentStatus(),h=d.getAcceptedCategories(),l.eu_cookie_compliance.popup_eu_only_js?u.eu_cookie_compliance.showBanner()&&(o=l.path.baseUrl+l.path.pathPrefix+"eu-cookie-compliance-check",_.getJSON(o,{},function(e){e.in_eu?u.eu_cookie_compliance.execute():(u.eu_cookie_compliance.setStatus(s),l.eu_cookie_compliance.geoip_match=!1,c||"function"!=typeof euCookieComplianceLoadScripts||euCookieComplianceLoadScripts(),"categories"===l.eu_cookie_compliance.method&&(e=l.eu_cookie_compliance.cookie_categories,u.eu_cookie_compliance.setAcceptedCategories(e),u.eu_cookie_compliance.loadCategoryScripts(e)))})):l.eu_cookie_compliance.hide_the_banner||u.eu_cookie_compliance.execute(),_(i).addClass("eu-cookie-compliance-status-"+u.eu_cookie_compliance.getCurrentStatus()))}}},u.eu_cookie_compliance=u.eu_cookie_compliance||function(){(u.eu_cookie_compliance.queue=u.eu_cookie_compliance.queue||[]).push(arguments)},u.eu_cookie_compliance.a=+new Date;var d=u.eu_cookie_compliance,h=[],g=null,c=(d.updateSelectedCategories=function(e){h=e},d.updateCurrentStatus=function(e){g=e},u.eu_cookie_compliance.execute=function(){try{var e,o,i;l.eu_cookie_compliance.popup_enabled&&u.eu_cookie_compliance.cookiesEnabled()&&l.eu_cookie_compliance.modules_allow_popup&&(g=u.eu_cookie_compliance.getCurrentStatus(),void 0===u.eu_cookie_compliance.getVersion()&&u.eu_cookie_compliance.setVersion("unknown"),!0===l.eu_cookie_compliance.popup_eu_only&&!0!==l.eu_cookie_compliance.geoip_match||(e=u.eu_cookie_compliance.getVersion()!==l.eu_cookie_compliance.cookie_policy_version,o=void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed":l.eu_cookie_compliance.cookie_name,i=!l.eu_cookie_compliance.open_by_default||null!==g&&!e||"null"===a(o)&&l.eu_cookie_compliance.settings_tab_enabled,g!==p||!l.eu_cookie_compliance.settings_tab_enabled||"opt_in"!==l.eu_cookie_compliance.method&&"categories"!==l.eu_cookie_compliance.method?g===p&&"default"===l.eu_cookie_compliance.method||null===g||g!==p&&l.eu_cookie_compliance.withdraw_enabled&&l.eu_cookie_compliance.withdraw_button_on_info_popup||g!==p&&e?!l.eu_cookie_compliance.withdraw_enabled&&l.eu_cookie_compliance.disagree_do_not_show_popup&&null!==g||(window.matchMedia("(max-width: "+l.eu_cookie_compliance.mobile_breakpoint+"px)").matches&&l.eu_cookie_compliance.use_mobile_message?u.eu_cookie_compliance.createPopup(l.eu_cookie_compliance.mobile_popup_html_info,i):u.eu_cookie_compliance.createPopup(l.eu_cookie_compliance.popup_html_info,i),u.eu_cookie_compliance.initPopup(),u.eu_cookie_compliance.resizeListener()):g===r&&l.eu_cookie_compliance.popup_agreed_enabled?(u.eu_cookie_compliance.createPopup(l.eu_cookie_compliance.popup_html_agreed),u.eu_cookie_compliance.attachHideEvents()):g===s&&l.eu_cookie_compliance.withdraw_enabled&&!l.eu_cookie_compliance.withdraw_button_on_info_popup&&(u.eu_cookie_compliance.createWithdrawBanner(l.eu_cookie_compliance.withdraw_markup),u.eu_cookie_compliance.initPopup(),u.eu_cookie_compliance.resizeListener()):(u.eu_cookie_compliance.createPopup(l.eu_cookie_compliance.popup_html_info,null!==g),_(".eu-cookie-withdraw-tab").click(u.eu_cookie_compliance.toggleWithdrawBanner),u.eu_cookie_compliance.attachAgreeEvents())))}catch(e){}},u.eu_cookie_compliance.initPopup=function(){u.eu_cookie_compliance.attachAgreeEvents(),"categories"===l.eu_cookie_compliance.method&&(u.eu_cookie_compliance.setPreferenceCheckboxes(h),u.eu_cookie_compliance.attachSavePreferencesEvents()),l.eu_cookie_compliance.withdraw_enabled&&(u.eu_cookie_compliance.attachWithdrawEvents(),g!==r&&g!==s||(_(".eu-cookie-withdraw-button").removeClass("visually-hidden"),_(".eu-cookie-compliance-reject-button").addClass("visually-hidden")))},u.eu_cookie_compliance.positionTab=function(){if(l.eu_cookie_compliance.popup_position){let e=_(".eu-cookie-withdraw-tab").outerHeight();_("#sliding-popup").length&&(e+=_("#sliding-popup").outerHeight()),_(".eu-cookie-withdraw-wrapper").length?_(".eu-cookie-withdraw-tab").css("margin-top","0"):_(".eu-cookie-withdraw-tab").css("margin-top",e+"px")}},u.eu_cookie_compliance.createWithdrawBanner=function(e){var o=_("<div></div>").html(e),e=_(".eu-cookie-withdraw-banner",o),i=(o.attr({id:"sliding-popup",role:"alertdialog","aria-describedby":"popup-text","aria-label":u.t("Cookie compliance banner")}),o.addClass("eu-cookie-withdraw-wrapper"),o.trigger("eu_cookie_compliance_popup_close"),l.eu_cookie_compliance.popup_use_bare_css||l.eu_cookie_compliance.popup_use_olivero_css||e.height(l.eu_cookie_compliance.popup_height).width(l.eu_cookie_compliance.popup_width),o.hide(),0);l.eu_cookie_compliance.popup_position?(o.prependTo(l.eu_cookie_compliance.containing_element),i=parseInt(o.outerHeight()),o.show().addClass("sliding-popup-top").addClass("clearfix").css({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(i)}),setTimeout(function(){var e=o.outerHeight();o.animate({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(e)},l.eu_cookie_compliance.popup_delay,null),l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":-e+"px"})}.bind(o),0)):(l.eu_cookie_compliance.better_support_for_screen_readers?o.prependTo(l.eu_cookie_compliance.containing_element):o.appendTo(l.eu_cookie_compliance.containing_element),i=o.outerHeight(),o.show().addClass("sliding-popup-bottom").css({bottom:-1*i}),setTimeout(function(){var e=o.outerHeight();o.animate({bottom:-1*e},l.eu_cookie_compliance.popup_delay,null)}.bind(o),0)),_("body").removeClass("eu-cookie-compliance-popup-open"),e.attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1)},u.eu_cookie_compliance.getBannerTopPosition=function(e){let o;return l.eu_cookie_compliance.fixed_top_position?(o=0,_(".toolbar-tray-horizontal.is-active").length&&(o+=parseInt(_(".toolbar-tray-horizontal.is-active").css("height"))),_(".toolbar-bar").length&&!_("#gin-toolbar-bar").length&&(o+=parseInt(_(".toolbar-bar").css("height"))),o+"px"):0},u.eu_cookie_compliance.getBannerTopHiddenPosition=function(e){let o=0;return l.eu_cookie_compliance.fixed_top_position?o=-e:(_(".toolbar-tray-horizontal.is-active").length&&(o=-parseInt(_(".toolbar-tray-horizontal.is-active").css("height"))),_(".toolbar-bar").length&&!_("#gin-toolbar-bar").length&&(o-=parseInt(_(".toolbar-bar").css("height")))),o+"px"},u.eu_cookie_compliance.getBannerBottomHiddenPosition=function(){return-_("#sliding-popup").outerHeight()+"px"},u.eu_cookie_compliance.toggleWithdrawBanner=function(){var e,o,i,c=_("#sliding-popup"),n=parseInt(c.outerHeight()),a=c.find(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").is(":visible");a&&(e=parseInt(c.css("top")),o=parseInt(_(l.eu_cookie_compliance.containing_element).css("padding-top")),i=parseInt(_(l.eu_cookie_compliance.containing_element).css("margin-top")),a=l.eu_cookie_compliance.popup_position?l.eu_cookie_compliance.fixed_top_position?!(e===-n):!(e===-(o+i+n)):0===parseInt(c.css("bottom"))),l.eu_cookie_compliance.popup_position?a?(l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":-n+"px"},l.eu_cookie_compliance.popup_delay),c.animate({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(n)},l.eu_cookie_compliance.popup_delay).trigger("eu_cookie_compliance_popup_close")):(l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":"0px"},l.eu_cookie_compliance.popup_delay),c.find(".eu-cookie-compliance-banner").show(),c.animate({top:u.eu_cookie_compliance.getBannerTopPosition(n)},l.eu_cookie_compliance.popup_delay).trigger("eu_cookie_compliance_popup_open")):a?c.animate({bottom:-1*n},l.eu_cookie_compliance.popup_delay).trigger("eu_cookie_compliance_popup_close"):(c.find(".eu-cookie-compliance-banner").show(),c.animate({bottom:0},l.eu_cookie_compliance.popup_delay).trigger("eu_cookie_compliance_popup_open")),a?(_("body").removeClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1)):(_("body").addClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!1).find("a, button, input").attr("tabindex",0))},u.eu_cookie_compliance.resizeListener=function(){var e,o,i,c=_("#sliding-popup"),n=(e=function(){var e=c.outerHeight();l.eu_cookie_compliance.popup_position?(parseFloat(c.css("top"))<0&&(_("body").hasClass("eu-cookie-compliance-popup-open")?(l.eu_cookie_compliance.fixed_top_position||_("body").css({"margin-top":"0px"}),c.css("top",u.eu_cookie_compliance.getBannerTopPosition(e))):(l.eu_cookie_compliance.fixed_top_position||_("body").css({"margin-top":-e+"px"}),c.css("top",u.eu_cookie_compliance.getBannerTopHiddenPosition(e)))),u.eu_cookie_compliance.positionTab()):0!==parseFloat(c.css("bottom"))&&c.css("bottom",-1*e),u.eu_cookie_compliance.positionTab()},o=50,function(){clearTimeout(i),i=setTimeout(function(){clearTimeout(i),e()},o)});setTimeout(function(){n()}),window.addEventListener("resize",n)},u.eu_cookie_compliance.createPopup=function(e,o){var i=_("<div></div>").html(e),e=(i.attr({id:"sliding-popup",role:"alertdialog","aria-describedby":"popup-text","aria-label":u.t("Cookie compliance banner")}),l.eu_cookie_compliance.popup_use_bare_css||l.eu_cookie_compliance.popup_use_olivero_css||i.height(l.eu_cookie_compliance.popup_height).width(l.eu_cookie_compliance.popup_width),i.hide(),0);l.eu_cookie_compliance.popup_position?(i.prependTo(l.eu_cookie_compliance.containing_element),e=i.outerHeight(),i.addClass("sliding-popup-top clearfix").css({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(e)}),!0!==o?(i.show(),i.animate({top:u.eu_cookie_compliance.getBannerTopPosition(e)},l.eu_cookie_compliance.popup_delay,null,function(){i.trigger("eu_cookie_compliance_popup_open"),u.eu_cookie_compliance.positionTab()})):(l.eu_cookie_compliance.fixed_top_position||_("body").css({"margin-top":-e+"px"}),setTimeout(function(){i.show(),u.eu_cookie_compliance.positionTab()},0))):(l.eu_cookie_compliance.better_support_for_screen_readers?i.prependTo(l.eu_cookie_compliance.containing_element):i.appendTo(l.eu_cookie_compliance.containing_element),e=i.outerHeight(),i.show().addClass("sliding-popup-bottom").css({bottom:-1*e}),!0!==o&&i.animate({bottom:0},l.eu_cookie_compliance.popup_delay,null,function(){i.trigger("eu_cookie_compliance_popup_open")})),!0!==o?(_("body").addClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!1).find("a, button, input").attr("tabindex",0)):(_("body").removeClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1))},u.eu_cookie_compliance.attachAgreeEvents=function(){var e,o,i=l.eu_cookie_compliance.popup_clicking_confirmation,c=l.eu_cookie_compliance.popup_scrolling_confirmation;"categories"===l.eu_cookie_compliance.method&&l.eu_cookie_compliance.enable_save_preferences_button?_(".agree-button").click(u.eu_cookie_compliance.acceptAllAction):_(".agree-button").click(u.eu_cookie_compliance.acceptAction),_(".decline-button").click(u.eu_cookie_compliance.declineAction),_(".eu-cookie-compliance-close-button").click(u.eu_cookie_compliance.closeAction),_(".eu-cookie-compliance-reject-button").click(u.eu_cookie_compliance.rejectAllAction),i&&_("a, input[type=submit], button[type=submit]").not(".popup-content *").bind("click.euCookieCompliance",u.eu_cookie_compliance.acceptAction),c&&(e=!1,o=function(){e?(u.eu_cookie_compliance.acceptAction(),_(window).off("scroll",o)):e=!0},_(window).bind("scroll",o)),_(".find-more-button").no
1867t(".find-more-button-processed").addClass("find-more-button-processed").click(u.eu_cookie_compliance.moreInfoAction)},u.eu_cookie_compliance.closeAction=function(){switch(l.eu_cookie_compliance.close_button_action){case"close_banner":u.eu_cookie_compliance.toggleWithdrawBanner();break;case"save_preferences":u.eu_cookie_compliance.savePreferencesAction();break;case"reject_all_cookies":u.eu_cookie_compliance.rejectAllAction();break;case"accept_all_cookies":u.eu_cookie_compliance.acceptAllAction()}},u.eu_cookie_compliance.attachSavePreferencesEvents=function(){_(".eu-cookie-compliance-save-preferences-button").click(u.eu_cookie_compliance.savePreferencesAction)},u.eu_cookie_compliance.attachHideEvents=function(){var e=l.eu_cookie_compliance.popup_hide_agreed,o=l.eu_cookie_compliance.popup_clicking_confirmation;_(".hide-popup-button").click(function(){u.eu_cookie_compliance.changeStatus(s)}),o&&_("a, input[type=submit], button[type=submit]").unbind("click.euCookieCompliance"),e&&_("a, input[type=submit], button[type=submit]").bind("click.euCookieComplianceHideAgreed",function(){u.eu_cookie_compliance.changeStatus(s)}),_(".find-more-button").not(".find-more-button-processed").addClass("find-more-button-processed").click(u.eu_cookie_compliance.moreInfoAction)},u.eu_cookie_compliance.attachWithdrawEvents=function(){_(".eu-cookie-withdraw-button").click(u.eu_cookie_compliance.withdrawAction),_(".eu-cookie-withdraw-tab").click(u.eu_cookie_compliance.toggleWithdrawBanner)},u.eu_cookie_compliance.acceptAction=function(){var e=l.eu_cookie_compliance.popup_agreed_enabled,o=r;e||(u.eu_cookie_compliance.setStatus(r),o=s),c||"function"!=typeof euCookieComplianceLoadScripts||euCookieComplianceLoadScripts(),void 0!==t&&clearInterval(t),"categories"===l.eu_cookie_compliance.method&&(e=_("#eu-cookie-compliance-categories input:checkbox:checked").map(function(){return _(this).val()}).get(),u.eu_cookie_compliance.setAcceptedCategories(e),u.eu_cookie_compliance.loadCategoryScripts(e),e.length||(o=p)),u.eu_cookie_compliance.changeStatus(o),l.eu_cookie_compliance.withdraw_enabled&&l.eu_cookie_compliance.withdraw_button_on_info_popup&&(u.eu_cookie_compliance.attachWithdrawEvents(),g!==r&&g!==s||(_(".eu-cookie-withdraw-button").removeClass("visually-hidden"),_(".eu-cookie-compliance-reject-button").addClass("visually-hidden")))},u.eu_cookie_compliance.acceptAllAction=function(){var e=l.eu_cookie_compliance.cookie_categories;u.eu_cookie_compliance.setPreferenceCheckboxes(e),u.eu_cookie_compliance.acceptAction()},u.eu_cookie_compliance.rejectAllAction=function(){u.eu_cookie_compliance.setStatus(p),u.eu_cookie_compliance.setPreferenceCheckboxes([]),u.eu_cookie_compliance.acceptAction()},u.eu_cookie_compliance.savePreferencesAction=function(){var e=_("#eu-cookie-compliance-categories input:checkbox:checked").map(function(){return _(this).val()}).get(),o=l.eu_cookie_compliance.popup_agreed_enabled,i=r;o||(u.eu_cookie_compliance.setStatus(r),i=s),c||"function"!=typeof euCookieComplianceLoadScripts||euCookieComplianceLoadScripts(),c=!0,u.eu_cookie_compliance.setAcceptedCategories(e),u.eu_cookie_compliance.loadCategoryScripts(e),e.length||(i=p),u.eu_cookie_compliance.changeStatus(i)},u.eu_cookie_compliance.loadCategoryScripts=function(e){for(var o in e)!0!==i[e[o]]&&"function"==typeof euCookieComplianceLoadScripts&&(euCookieComplianceLoadScripts(e[o]),i[e[o]]=!0)},u.eu_cookie_compliance.declineAction=function(){parseInt(l.eu_cookie_compliance.set_cookie_session_zero_on_disagree)&&(l.eu_cookie_compliance.cookie_session=1),u.eu_cookie_compliance.setStatus(p);var e,o=_("#sliding-popup");(o.hasClass("sliding-popup-top")?(e=o.outerHeight(),l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":-e+"px"},l.eu_cookie_compliance.popup_delay),l.eu_cookie_compliance.settings_tab_enabled?o.animate({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(e)},l.eu_cookie_compliance.popup_delay,null):o.animate({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(e)},l.eu_cookie_compliance.popup_delay,null,function(){l.eu_cookie_compliance.fixed_top_position||_("body").css({"margin-top":0}),o.hide()})):l.eu_cookie_compliance.settings_tab_enabled?o.animate({bottom:-1*o.outerHeight()},l.eu_cookie_compliance.popup_delay,null):o.animate({bottom:-1*o.outerHeight()},l.eu_cookie_compliance.popup_delay,null,function(){o.hide()})).trigger("eu_cookie_compliance_popup_close"),_("body").removeClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1)},u.eu_cookie_compliance.withdrawAction=function(){parseInt(l.eu_cookie_compliance.set_cookie_session_zero_on_disagree)&&(l.eu_cookie_compliance.cookie_session=1),u.eu_cookie_compliance.setStatus(null),u.eu_cookie_compliance.setAcceptedCategories([]),location.reload()},u.eu_cookie_compliance.moreInfoAction=function(){l.eu_cookie_compliance.disagree_do_not_show_popup?(u.eu_cookie_compliance.setStatus(p),l.eu_cookie_compliance.withdraw_enabled&&l.eu_cookie_compliance.withdraw_button_on_info_popup?_("#sliding-popup .eu-cookie-compliance-banner").trigger("eu_cookie_compliance_popup_close").hide():_("#sliding-popup").trigger("eu_cookie_compliance_popup_close").remove(),_("body").removeClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1)):l.eu_cookie_compliance.popup_link_new_window?window.open(l.eu_cookie_compliance.popup_link):window.location.href=l.eu_cookie_compliance.popup_link},u.eu_cookie_compliance.getCookieStatus=function(){var e=a(void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed":l.eu_cookie_compliance.cookie_name);return e=void 0!==e&&"null"!==e?e:null},u.eu_cookie_compliance.getCurrentStatus=function(){var e=new o,e=(d.handleEvent("preStatusLoad",e),g=u.eu_cookie_compliance.getCookieStatus(),new n);return d.handleEvent("postStatusLoad",e),g},u.eu_cookie_compliance.setPreferenceCheckboxes=function(e){for(var o in null===u.eu_cookie_compliance.getCookieStatus()&&u.eu_cookie_compliance.getCookieStatus()!==p||_("#eu-cookie-compliance-categories input:checkbox").not(":disabled").prop("checked",!1),e){o=document.getElementById("cookie-category-"+e[o]);null!==o&&(o.checked=!0)}},u.eu_cookie_compliance.getAcceptedCategories=function(){var e=new C;d.handleEvent("prePreferencesLoad",e);var o,e=a(void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed-categories":l.eu_cookie_compliance.cookie_name+"-categories");for(o in h=null!=e?(-1!==e.indexOf("%")&&(e=decodeURI(e).replaceAll(/%2C/g,",")),JSON.parse(e)):[],l.eu_cookie_compliance.cookie_categories_details){var i=l.eu_cookie_compliance.cookie_categories_details[o];"required"===i.checkbox_default_state&&-1===_.inArray(i.id,h)&&h.push(i.id)}e=new S;return d.handleEvent("postPreferencesLoad",e),h},u.eu_cookie_compliance.changeStatus=function(o){var e,i=l.eu_cookie_compliance.reload_page,c=g;if(g!==parseInt(o)){if(l.eu_cookie_compliance.popup_position){let e=_("#sliding-popup").outerHeight();l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":-e+"px"},l.eu_cookie_compliance.popup_delay),_(".sliding-popup-top").animate({top:u.eu_cookie_compliance.getBannerTopHiddenPosition(e)},l.eu_cookie_compliance.popup_delay,function(){o!==r||null!==c||i?c===r&&(l.eu_cookie_compliance.withdraw_enabled&&l.eu_cookie_compliance.withdraw_button_on_info_popup?(_("#sliding-popup").hide(),window.matchMedia("(max-width: "+l.eu_cookie_compliance.mobile_breakpoint+"px)").matches&&l.eu_cookie_compliance.use_mobile_message?_(".sliding-popup-top").not(".eu-cookie-withdraw-wrapper").html(l.eu_cookie_compliance.mobile_popup_html_info):_(".sliding-popup-top").not(".eu-cookie-withdraw-wrapper").html(l.eu_cookie_compliance.popup_html_info),e=_("#sliding-popup").outerHeight(),l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":-e+"px"},l.eu_cookie_compliance.popup_delay),_(".sliding-popup-top").css("top",u.eu_cookie_compliance.getBannerTopHiddenPosition(e)),_(".sliding-popup-top").not(".eu-cookie-withdraw-wrapper").trigger("eu_cookie_compliance_popup_close"),u.eu_cookie_compliance.initPopup(),u.eu_cookie_compliance.resizeListener(),_("#sliding-popup").show()):(_(".sliding-popup-top").not(".eu-cookie-withdraw-wrapper").trigger("eu_cookie_compliance_popup_close").remove(),_("body").css({"margin-top":"0px"})),_("body").removeClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1)):(l.eu_cookie_compliance.fixed_top_position||_("body").animate({"margin-top":"0px"},l.eu_cookie_compliance.popup_delay),_(".sliding-popup-top").not(".eu-cookie-withdraw-wrapper").html(l.eu_cookie_compliance.popup_html_agreed).animate({top:u.eu_cookie_compliance.getBannerTopPosition(e)},l.eu_cookie_compliance.popup_delay),u.eu_cookie_compliance.attachHideEvents()),l.eu_cookie_compliance.withdraw_enabled&&!l.eu_cookie_compliance.withdraw_button_on_info_popup&&u.eu_cookie_compliance.showWithdrawBanner(o)})}else _(".sliding-popup-bottom").animate({bottom:-1*_("#sliding-popup").outerHeight()},l.eu_cookie_compliance.popup_delay,function(){o!==r||null!==c||i?c===r&&(_("#sliding-popup").css("display","none"),l.eu_cookie_compliance.withdraw_enabled&&l.eu_cookie_compliance.withdraw_button_on_info_popup?(window.matchMedia("(max-width: "+l.eu_cookie_compliance.mobile_breakpoint+"px)").matches&&l.eu_cookie_compliance.use_mobile_message?_(".sliding-popup-bottom").not(".eu-cookie-withdraw-wrapper").html(l.eu_cookie_compliance.mobile_popup_html_info):_(".sliding-popup-bottom").not(".eu-cookie-withdraw-wrapper").html(l.eu_cookie_compliance.popup_html_info),_(".sliding-popup-bottom").css("bottom",u.eu_cookie_compliance.getBannerBottomHiddenPosition()),_(".sliding-popup-bottom").not(".eu-cookie-withdraw-wrapper").trigger("eu_cookie_compliance_popup_close"),u.eu_cookie_compliance.initPopup(),u.eu_cookie_compliance.resizeListener(),_("#sliding-popup").css("display","block")):_(".sliding-popup-bottom").not(".eu-cookie-withdraw-wrapper").trigger("eu_cookie_compliance_popup_close").remove(),_("body").removeClass("eu-cookie-compliance-popup-open"),_(".eu-cookie-compliance-banner, .eu-cookie-withdraw-banner").attr("aria-hidden",!0).find("a, button, input").attr("tabindex",-1)):(_(".sliding-popup-bottom").not(".eu-cookie-withdraw-wrapper").html(l.eu_cookie_compliance.popup_html_agreed).animate({bottom:0},l.eu_cookie_compliance.popup_delay),u.eu_cookie_compliance.attachHideEvents()),l.eu_cookie_compliance.withdraw_enabled&&!l.eu_cookie_compliance.withdraw_button_on_info_popup&&u.eu_cookie_compliance.showWithdrawBanner(o)});if(l.eu_cookie_compliance.reload_page)if(0!==(e=l.eu_cookie_compliance.reload_routes_list).length){for(var n=l.path.currentPath,a=!1,t=0;!a&&t<e.length;t++)var p=new RegExp(e[t],"g"),a=null!==n.match(p);(a&&!l.eu_cookie_compliance.reload_options||!a&&l.eu_cookie_compliance.reload_options)&&location.reload()}else location.reload();u.eu_cookie_compliance.setStatus(o)}},u.eu_cookie_compliance.showWithdrawBanner=function(e){e===s&&l.eu_cookie_compliance.withdraw_enabled&&(l.eu_cookie_compliance.withdraw_button_on_info_popup||(u.eu_cookie_compliance.createWithdrawBanner(l.eu_cookie_compliance.withdraw_markup),u.eu_cookie_compliance.resizeListener()),u.eu_cookie_compliance.attachWithdrawEvents(),l.eu_cookie_compliance.popup_position&&u.eu_cookie_compliance.positionTab())},u.eu_cookie_compliance.setStatus=function(e){var o=new b,o=(d.handleEvent("preStatusSave",o),new Date),i=l.eu_cookie_compliance.domain||"",c=l.eu_cookie_compliance.domain_all_sites?"/":l.path.baseUrl,n=void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed":l.eu_cookie_compliance.cookie_name;1<c.length&&(a=c.length-1,c.lastIndexOf("/")===a&&(c=c.substring(0,a)));parseInt(l.eu_cookie_compliance.cookie_session)?m(n,e,{path:c,domain:i,sameSite:"strict"}):(a=parseInt(l.eu_cookie_compliance.cookie_lifetime),o.setDate(o.getDate()+a),m(n,e,{expires:o,path:c,domain:i,sameSite:"strict"}));var a="eu-cookie-compliance-status-"+g,n="eu-cookie-compliance-status-"+e,c=(_("."+a).removeClass(a).addClass(n),g=e,_(document).trigger("eu_cookie_compliance.changeStatus",[e]),u.eu_cookie_compliance.setVersion(),l.eu_cookie_compliance.store_consent&&(e===r&&l.eu_cookie_compliance.popup_agreed_enabled||e===s&&!l.eu_cookie_compliance.popup_agreed_enabled)&&(o=l.path.baseUrl+l.path.pathPrefix+"eu-cookie-compliance/store_consent/banner",_.post(o,{},function(e){})),new v);d.handleEvent("postStatusSave",c),e===p&&"opt_out"===l.eu_cookie_compliance.method&&(t=setInterval(u.eu_cookie_compliance.BlockCookies,5e3))},u.eu_cookie_compliance.setAcceptedCategories=function(e){var o=new P,o=(d.handleEvent("prePreferencesSave",o),new Date),i=l.eu_cookie_compliance.domain||"",c=l.eu_cookie_compliance.domain_all_sites?"/":l.path.baseUrl,n=void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed-categories":l.eu_cookie_compliance.cookie_name+"-categories",a=(1<c.length&&(a=c.length-1,c.lastIndexOf("/")===a&&(c=c.substring(0,a))),JSON.stringify(e)),t=(parseInt(l.eu_cookie_compliance.cookie_session)?m(n,a,{path:c,domain:i,sameSite:"strict"}):(t=parseInt(l.eu_cookie_compliance.cookie_lifetime),o.setDate(o.getDate()+t),m(n,a,{expires:o,path:c,domain:i,sameSite:"strict"}
1867)),h=e,_(document).trigger("eu_cookie_compliance.changePreferences",[e]),new B);d.handleEvent("postPreferencesSave",t)},u.eu_cookie_compliance.hasAgreed=function(e){var o=g===r||g===s;return o=void 0!==e&&o&&"categories"===l.eu_cookie_compliance.method?u.eu_cookie_compliance.hasAgreedWithCategory(e):o},u.eu_cookie_compliance.hasAgreedWithCategory=function(e){return-1!==_.inArray(e,h)},u.eu_cookie_compliance.showBanner=function(){var e=!1;return g===p&&"default"===l.eu_cookie_compliance.method||null===g?l.eu_cookie_compliance.disagree_do_not_show_popup&&null!==g||(e=!0):(g===r&&l.eu_cookie_compliance.popup_agreed_enabled||g===s&&l.eu_cookie_compliance.withdraw_enabled)&&(e=!0),e},u.eu_cookie_compliance.cookiesEnabled=function(){var e=navigator.cookieEnabled;return void 0!==navigator.cookieEnabled||e||(date.setDate(date.getDate()+100),m("testcookie","testcookie",{expires:date,sameSite:"strict"}),e=-1!==a("testcookie").indexOf("testcookie")),e},u.eu_cookie_compliance.cookieMatches=function(e,o){if(e===o)return!0;if(o.indexOf("*")<0)return!1;try{return new RegExp("^"+o.replace(/\./g,"\\.").replace(/\*/g,".+")+"$","g").test(e)}catch(e){return!1}},u.eu_cookie_compliance.isAllowed=function(e){if(0===e.indexOf("SESS")||0===e.indexOf("SSESS"))return!0;var o,i=l.eu_cookie_compliance.allowed_cookies.split(/\r\n|\n|\r/g);for(o in i.push(void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed":l.eu_cookie_compliance.cookie_name),i.push(void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed-categories":l.eu_cookie_compliance.cookie_name+"-categories"),i.push(void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed-version":l.eu_cookie_compliance.cookie_name+"-version"),i)if("string"==typeof i[o]){if(u.eu_cookie_compliance.cookieMatches(e,i[o]))return!0;if("categories"===l.eu_cookie_compliance.method){var c=i[o].indexOf(":");if(-1!==c){var n=i[o].substr(0,c),c=i[o].substr(c+1);if(u.eu_cookie_compliance.cookieMatches(e,c)&&u.eu_cookie_compliance.hasAgreedWithCategory(n))return!0}}}return!1},u.eu_cookie_compliance.getVersion=function(){return!!u.eu_cookie_compliance.hasAgreed()&&a(void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed-version":l.eu_cookie_compliance.cookie_name+"-version")},!(u.eu_cookie_compliance.setVersion=function(e){if(!u.eu_cookie_compliance.hasAgreed())return!1;var o=new Date,i=l.eu_cookie_compliance.domain||"",c=l.eu_cookie_compliance.domain_all_sites?"/":l.path.baseUrl,n=void 0===l.eu_cookie_compliance.cookie_name||""===l.eu_cookie_compliance.cookie_name?"cookie-agreed-version":l.eu_cookie_compliance.cookie_name+"-version",a=(1<c.length&&(a=c.length-1,c.lastIndexOf("/")===a&&(c=c.substring(0,a))),void 0!==e?e:l.eu_cookie_compliance.cookie_policy_version);parseInt(l.eu_cookie_compliance.cookie_session)?m(n,a,{path:c,domain:i,sameSite:"strict"}):(e=parseInt(l.eu_cookie_compliance.cookie_lifetime),o.setDate(o.getDate()+e),m(n,a,{expires:o,path:c,domain:i,sameSite:"strict"}))})),i={},o=(_(function(){void 0!==l.eu_cookie_compliance&&(u.eu_cookie_compliance.hasAgreed()||null===g&&"opt_in"!==l.eu_cookie_compliance.method&&"categories"!==l.eu_cookie_compliance.method)&&("function"==typeof euCookieComplianceLoadScripts&&euCookieComplianceLoadScripts(),c=!0,"categories"===l.eu_cookie_compliance.method&&u.eu_cookie_compliance.loadCategoryScripts(h))}),u.eu_cookie_compliance.BlockCookies=function(){var e,o=u.eu_cookie_compliance.getCookieStatus();if(o!==r&&o!==s||"categories"===l.eu_cookie_compliance.method||void 0===t)for(e in a()){var i,c=window.location.hostname,n=!1;if(!u.eu_cookie_compliance.isAllowed(e)){for(;!n&&""!==c;)k(e),(n=!a(e))||(k(e),n=!a(e)),c=-1===(i=c.indexOf("."))?"":c.substring(i+1);n||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/;")}}else clearInterval(t)},void 0===l.eu_cookie_compliance||!l.eu_cookie_compliance.automatic_cookies_removal||("opt_in"!==l.eu_cookie_compliance.method||null!==g&&u.eu_cookie_compliance.hasAgreed())&&("opt_out"!==l.eu_cookie_compliance.method||u.eu_cookie_compliance.hasAgreed()||null===g)&&"categories"!==l.eu_cookie_compliance.method||(t=setInterval(u.eu_cookie_compliance.BlockCookies,5e3)),d.handleEvent=function(e,o){for(var i=function(e){var o=[];if(void 0!==u.eu_cookie_compliance&&void 0!==u.eu_cookie_compliance.queue&&u.eu_cookie_compliance.queue.length)for(var i,c,n=0;n<u.eu_cookie_compliance.queue.length;n++)u.eu_cookie_compliance.queue[n].length&&(i=(c=u.eu_cookie_compliance.queue[n])[0],c=c[1],"string"==typeof i&&"function"==typeof c&&i===e&&o.push(c));return o}(e),c=0;c<i.length;c++)void 0!==i[c]&&(o.subscribe(i[c]),o.fire({currentStatus:g,currentCategories:h}),o.unsubscribe(i[c]))},(T=e.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;
1867this.handlers.forEach(function(e){e.call(i,o)})},e);function e(){this.handlers=[]}(T=f.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var n=f;function f(){this.handlers=[]}(T=w.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var b=w;function w(){this.handlers=[]}(T=y.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var v=y;function y(){this.handlers=[]}(T=x.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var C=x;function x(){this.handlers=[]}(T=A.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var S=A;function A(){this.handlers=[]}(T=E.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var P=E;function E(){this.handlers=[]}(T=H.prototype).subscribe=function(e){this.handlers.push(e)},T.unsubscribe=function(o){this.handlers=this.handlers.filter(function(e){if(e!==o)return e})},T.fire=function(o,e){var i=e||window;this.handlers.forEach(function(e){e.call(i,o)})};var T,B=H;function H(){this.handlers=[]}}(jQuery,Drupal,drupalSettings,window.Cookies);; 1868/** 1869 * @file 1870 * Bootstrap Popovers. 1871 */ 1872 1873var Drupal = Drupal || {}; 1874 1875(function ($, Drupal, Bootstrap) { 1876 "use strict"; 1877 1878 var $document = $(document); 1879 1880 /** 1881 * Extend the Bootstrap Popover plugin constructor class. 1882 */ 1883 Bootstrap.extendPlugin('popover', function (settings) { 1884 return { 1885 DEFAULTS: { 1886 animation: !!settings.popover_animation, 1887 autoClose: !!settings.popover_auto_close, 1888 enabled: settings.popover_enabled, 1889 html: !!settings.popover_html, 1890 placement: settings.popover_placement, 1891 selector: settings.popover_selector, 1892 trigger: settings.popover_trigger, 1893 title: settings.popover_title, 1894 content: settings.popover_content, 1895 delay: parseInt(settings.popover_delay, 10), 1896 container: settings.popover_container 1897 } 1898 }; 1899 }); 1900 1901 /** 1902 * Bootstrap Popovers. 1903 * 1904 * @todo This should really be properly delegated if selector option is set. 1905 */ 1906 Drupal.behaviors.bootstrapPopovers = { 1907 $activePopover: null, 1908 attach: function (context) { 1909 // Immediately return if popovers are not available. 1910 if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) { 1911 return; 1912 } 1913 1914 var _this = this; 1915 1916 $document 1917 .on('show.bs.popover', '[data-toggle=popover]', function () { 1918 var $trigger = $(this); 1919 var popover = $trigger.data('bs.popover'); 1920 1921 // Only keep track of clicked triggers that we're manually handling. 1922 if (popover.options.originalTrigger === 'click') { 1923 if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) { 1924 _this.$activePopover.popover('hide'); 1925 } 1926 _this.$activePopover = $trigger; 1927 } 1928 }) 1929 // Unfortunately, :focusable is only made available when using jQuery 1930 // UI. While this would be the most semantic pseudo selector to use 1931 // here, jQuery UI may not always be loaded. Instead, just use :visible 1932 // here as this just needs some sort of selector here. This activates 1933 // delegate binding to elements in jQuery so it can work it's bubbling 1934 // focus magic since elements don't really propagate their focus events. 1935 // @see https://www.drupal.org/project/bootstrap/issues/3013236 1936 .on('focus.bs.popover', ':visible', function (e) { 1937 var $target = $(e.target); 1938 if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) { 1939 _this.$activePopover.popover('hide'); 1940 _this.$activePopover = null; 1941 } 1942 }) 1943 .on('click.bs.popover', function (e) { 1944 var $target = $(e.target); 1945 if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) { 1946 _this.$activePopover.popover('hide'); 1947 _this.$activePopover = null; 1948 } 1949 }) 1950 .on('keyup.bs.popover', function (e) { 1951 if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) { 1952 _this.$activePopover.popover('hide'); 1953 _this.$activePopover = null; 1954 } 1955 }) 1956 ; 1957 1958 var elements = $(context).find('[data-toggle=popover]').toArray(); 1959 for (var i = 0; i < elements.length; i++) { 1960 var $element = $(elements[i]); 1961 var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data()); 1962 1963 // Store the original trigger. 1964 options.originalTrigger = options.trigger; 1965 1966 // If the trigger is "click", then we'll handle it manually here. 1967 if (options.trigger === 'click') { 1968 options.trigger = 'manual'; 1969 } 1970 1971 // Retrieve content from a target element. 1972 var target = options.target || $element.is('a[href^="#"]') && $element.attr('href'); 1973 var $target = $document.find(target).clone(); 1974 if (!options.content && $target[0]) { 1975 $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden'); 1976 options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || ''; 1977 } 1978 1979 // Initialize the popover. 1980 $element.popover(options); 1981 1982 // Handle clicks manually. 1983 if (options.originalTrigger === 'click') { 1984 // To ensure the element is bound multiple times, remove any 1985 // previously set event handler before adding another one. 1986 $element 1987 .off('click.drupal.bootstrap.popover') 1988 .on('click.drupal.bootstrap.popover', function (e) { 1989 $(this).popover('toggle'); 1990 e.preventDefault(); 1991 e.stopPropagation(); 1992 }) 1993 ; 1994 } 1995 } 1996 }, 1997 detach: function (context) { 1998 // Immediately return if popovers are not available. 1999 if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) { 2000 return; 2001 } 2002 2003 // Destroy all popovers. 2004 $(context).find('[data-toggle="popover"]') 2005 .off('click.drupal.bootstrap.popover') 2006 .popover('destroy') 2007 ; 2008 }, 2009 getOption: function(name, defaultValue, element) { 2010 var $element = element ? $(element) : this.$activePopover; 2011 var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options); 2012 if (options[name] !== void 0) { 2013 return options[name]; 2014 } 2015 return defaultValue !== void 0 ? defaultValue : void 0; 2016 } 2017 }; 2018 2019})(window.jQuery, window.Drupal, window.Drupal.bootstrap); 2020; 2021/** 2022 * @file 2023 * Bootstrap Tooltips. 2024 */ 2025 2026var Drupal = Drupal || {}; 2027 2028(function ($, Drupal, Bootstrap) { 2029 "use strict"; 2030 2031 /** 2032 * Extend the Bootstrap Tooltip plugin constructor class. 2033 */ 2034 Bootstrap.extendPlugin('tooltip', function (settings) { 2035 return { 2036 DEFAULTS: { 2037 animation: !!settings.tooltip_animation, 2038 enabled: settings.tooltip_enabled, 2039 html: !!settings.tooltip_html, 2040 placement: settings.tooltip_placement, 2041 selector: settings.tooltip_selector, 2042 trigger: settings.tooltip_trigger, 2043 delay: parseInt(settings.tooltip_delay, 10), 2044 container: settings.tooltip_container 2045 } 2046 }; 2047 }); 2048 2049 /** 2050 * Bootstrap Tooltips. 2051 * 2052 * @todo This should really be properly delegated if selector option is set. 2053 */ 2054 Drupal.behaviors.bootstrapTooltips = { 2055 attach: function (context) { 2056 // Immediately return if tooltips are not available. 2057 if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) { 2058 return; 2059 } 2060 2061 var elements = $(context).find('[data-toggle="tooltip"]').toArray(); 2062 for (var i = 0; i < elements.length; i++) { 2063 var $element = $(elements[i]); 2064 var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data()); 2065 $element.tooltip(options); 2066 } 2067 }, 2068 detach: function (context) { 2069 // Immediately return if tooltips are not available. 2070 if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) { 2071 return; 2072 } 2073 2074 // Destroy all tooltips. 2075 $(context).find('[data-toggle="tooltip"]').tooltip('destroy'); 2076 } 2077 }; 2078 2079})(window.jQuery, window.Drupal, window.Drupal.bootstrap); 2080; 2081((Drupal) => { 2082 Drupal.behaviors.storeMainMenu = { 2083 attach(context) { 2084 const headerMainMenu = context.querySelector('.main-header ul.main-menu'); 2085 2086 if (headerMainMenu) { 2087 headerMainMenu.querySelectorAll('li.has-children > a, li.has-children > span').forEach((item) => { 2088 item.addEventListener('click', (e) => { 2089 if (window.innerWidth <= 1024) { 2090 e.preventDefault(); 2091 slideToggle(e.currentTarget.nextElementSibling, 300); 2092 } 2093 }); 2094 }); 2095 } 2096 } 2097 }; 2098})(Drupal); 2099; 2100(function (Drupal) {
2101 Drupal.behaviors.storeLayoutEditPage = { 2102 attach: function attach(context) { 2103 const webforms = context.classList && context.classList.contains('webform-submission-form') 2104 ? context 2105 : context.querySelectorAll('.webform-submission-form'); 2106 2107 if (webforms 2108 && (document.body.classList.contains('nymedia-layout__layout-builder--edit-page') 2109 || document.body.querySelector('.node-layout-builder-form'))) { 2110 // Disable webform submit btn to prevent focusing on the LB edit page. 2111 webforms.forEach((form) => { 2112 form.querySelector('.webform-button--submit').setAttribute('disabled', 'disabled'); 2113 }); 2114 } 2115 } 2116 }; 2117})(Drupal); 2118; 2119/** 2120* DO NOT EDIT THIS FILE. 2121* See the following change record for more information, 2122* https://www.drupal.org/node/2815083 2123* @preserve 2124**/ 2125Drupal.debounce = function (func, wait, immediate) { 2126 var timeout; 2127 var result; 2128 return function () { 2129 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 2130 args[_key] = arguments[_key]; 2131 } 2132 var context = this; 2133 var later = function later() { 2134 timeout = null; 2135 if (!immediate) { 2136 result = func.apply(context, args); 2137 } 2138 }; 2139 var callNow = immediate && !timeout; 2140 clearTimeout(timeout); 2141 timeout = setTimeout(later, wait); 2142 if (callNow) { 2143 result = func.apply(context, args); 2144 } 2145 return result; 2146 }; 2147};; 2148/** 2149* DO NOT EDIT THIS FILE. 2150* See the following change record for more information, 2151* https://www.drupal.org/node/2815083 2152* @preserve 2153**/ 2154(function ($, once) { 2155 var deprecatedMessageSuffix = "is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256"; 2156 var originalJQOnce = $.fn.once; 2157 var originalJQRemoveOnce = $.fn.removeOnce; 2158 $.fn.once = function jQueryOnce(id) { 2159 Drupal.deprecationError({ 2160 message: "jQuery.once() ".concat(deprecatedMessageSuffix) 2161 }); 2162 return originalJQOnce.apply(this, [id]); 2163 }; 2164 $.fn.removeOnce = function jQueryRemoveOnce(id) { 2165 Drupal.deprecationError({ 2166 message: "jQuery.removeOnce() ".concat(deprecatedMessageSuffix) 2167 }); 2168 return originalJQRemoveOnce.apply(this, [id]); 2169 }; 2170 var drupalOnce = once; 2171 function augmentedOnce(id, selector, context) { 2172 originalJQOnce.apply($(selector, context), [id]); 2173 return drupalOnce(id, selector, context); 2174 } 2175 function remove(id, selector, context) { 2176 originalJQRemoveOnce.apply($(selector, context), [id]); 2177 return drupalOnce.remove(id, selector, context); 2178 } 2179 window.once = Object.assign(augmentedOnce, drupalOnce, { 2180 remove: remove 2181 }); 2182})(jQuery, once);; 2183/** 2184* DO NOT EDIT THIS FILE. 2185* See the following change record for more information, 2186* https://www.drupal.org/node/2815083 2187* @preserve 2188**/ 2189(function ($, Drupal, debounce) { 2190 $.fn.drupalGetSummary = function () { 2191 var callback = this.data('summaryCallback'); 2192 return this[0] && callback ? callback(this[0]).trim() : ''; 2193 }; 2194 $.fn.drupalSetSummary = function (callback) { 2195 var self = this; 2196 if (typeof callback !== 'function') { 2197 var val = callback; 2198 callback = function callback() { 2199 return val; 2200 }; 2201 } 2202 return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () { 2203 self.trigger('summaryUpdated'); 2204 }).trigger('summaryUpdated'); 2205 }; 2206 Drupal.behaviors.formSingleSubmit = { 2207 attach: function attach() { 2208 function onFormSubmit(e) { 2209 var $form = $(e.currentTarget); 2210 var formValues = $form.serialize(); 2211 var previousValues = $form.attr('data-drupal-form-submit-last'); 2212 if (previousValues === formValues) { 2213 e.preventDefault(); 2214 } else { 2215 $form.attr('data-drupal-form-submit-last', formValues); 2216 } 2217 } 2218 $(once('form-single-submit', 'body')).on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit); 2219 } 2220 }; 2221 function triggerFormUpdated(element) { 2222 $(element).trigger('formUpdated'); 2223 } 2224 function fieldsList(form) { 2225 return [].map.call(form.querySelectorAll('[name][id]'), function (el) { 2226 return el.id; 2227 }); 2228 } 2229 Drupal.behaviors.formUpdated = { 2230 attach: function attach(context) { 2231 var $context = $(context);
2232 var contextIsForm = $context.is('form'); 2233 var $forms = $(once('form-updated', contextIsForm ? $context : $context.find('form'))); 2234 var formFields; 2235 if ($forms.length) { 2236 $.makeArray($forms).forEach(function (form) { 2237 var events = 'change.formUpdated input.formUpdated '; 2238 var eventHandler = debounce(function (event) { 2239 triggerFormUpdated(event.target); 2240 }, 300); 2241 formFields = fieldsList(form).join(','); 2242 form.setAttribute('data-drupal-form-fields', formFields); 2243 $(form).on(events, eventHandler); 2244 }); 2245 } 2246 if (contextIsForm) { 2247 formFields = fieldsList(context).join(','); 2248 var currentFields = $(context).attr('data-drupal-form-fields'); 2249 if (formFields !== currentFields) { 2250 triggerFormUpdated(context); 2251 } 2252 } 2253 }, 2254 detach: function detach(context, settings, trigger) { 2255 var $context = $(context); 2256 var contextIsForm = $context.is('form'); 2257 if (trigger === 'unload') { 2258 once.remove('form-updated', contextIsForm ? $context : $context.find('form')).forEac
2258h(function (form) { 2259 form.removeAttribute('data-drupal-form-fields'); 2260 $(form).off('.formUpdated'); 2261 }); 2262 } 2263 } 2264 }; 2265 Drupal.behaviors.fillUserInfoFromBrowser = { 2266 attach: function attach(context, settings) { 2267 var userInfo = ['name', 'mail', 'homepage']; 2268 var $forms = $(once('user-info-from-browser', '[data-user-info-from-browser]')); 2269 if ($forms.length) { 2270 userInfo.forEach(function (info) { 2271 var $element = $forms.find("[name=".concat(info, "]")); 2272 var browserData = localStorage.getItem("Drupal.visitor.".concat(info)); 2273 if (!$element.length) { 2274 return; 2275 } 2276 var emptyValue = $element[0].value === ''; 2277 var defaultValue = $element.attr('data-drupal-default-value') === $element[0].value; 2278 if (browserData && (emptyValue || defaultValue)) { 2279 $element.each(function (index, item) { 2280 item.value = browserData; 2281 }); 2282 } 2283 }); 2284 } 2285 $forms.on('submit', function () { 2286 userInfo.forEach(function (info) { 2287 var $element = $forms.find("[name=".concat(info, "]")); 2288 if ($element.length) { 2289 localStorage.setItem("Drupal.visitor.".concat(info), $element[0].value); 2290 } 2291 }); 2292 }); 2293 } 2294 }; 2295 var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) { 2296 var url; 2297 if (e.type === 'click') { 2298 url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget; 2299 } else { 2300 url = window.location; 2301 } 2302 var hash = url.hash.substr(1); 2303 if (hash) { 2304 var $target = $("#".concat(hash)); 2305 $('body').trigger('formFragmentLinkClickOrHashChange', [$target]); 2306 setTimeout(function () { 2307 return $target.trigger('focus'); 2308 }, 300); 2309 } 2310 }; 2311 var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true); 2312 $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange); 2313 $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange); 2314})(jQuery, Drupal, Drupal.debounce);; 2315/** 2316 * @file 2317 * Extends methods from core/misc/form.js. 2318 */ 2319 2320(function ($, window, Drupal, drupalSettings, once) { 2321 2322 /** 2323 * Behavior for "forms_has_error_value_toggle" theme setting. 2324 */ 2325 Drupal.behaviors.bootstrapForm = { 2326 attach: function (context) { 2327 if (drupalSettings.bootstrap && drupalSettings.bootstrap.forms_has_error_value_toggle) { 2328 var $context = $(context); 2329 $(once('error', '.form-item.has-error:not(.form-type-password.has-feedback)', context)).each(function () { 2330 var $formItem = $(this); 2331 var $input = $formItem.find(':input'); 2332 $input.on('keyup focus blur', function () { 2333 if (this.defaultValue !== void 0) { 2334 $formItem[this.defaultValue !== this.value ? 'removeClass' : 'addClass']('has-error'); 2335 $input[this.defaultValue !== this.value ? 'removeClass' : 'addClass']('error'); 2336 } 2337 }); 2338 }); 2339 } 2340 } 2341 }; 2342 2343 2344})(jQuery, this, Drupal, drupalSettings, once); 2345; 2346/** 2347 * @file 2348 * Webform behaviors. 2349 */ 2350 2351(function ($, Drupal) { 2352 2353 'use strict'; 2354 2355 // Trigger Drupal's attaching of behaviors after the page is 2356 // completely loaded. 2357 // @see https://stackoverflow.com/questions/37838430/detect-if-page-is-load-from-back-button 2358 // @see https://stackoverflow.com/questions/20899274/how-to-refresh-page-on-back-button-click/20899422#20899422 2359 var isChrome = (/chrom(e|ium)/.test(window.navigator.userAgent.toLowerCase())); 2360 if (isChrome) { 2361 // Track back button in navigation. 2362 // @see https://stackoverflow.com/questions/37838430/detect-if-page-is-load-from-back-button 2363 var backButton = false; 2364 if (window.performance) { 2365 var navEntries = window.performance.getEntriesByType('navigation'); 2366 if (navEntries.length > 0 && navEntries[0].type === 'back_forward') { 2367 backButton = true; 2368 } 2369 else if (window.performance.navigation 2370 && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) { 2371 backButton = true; 2372 } 2373 } 2374 2375 // If the back button is pressed, delay Drupal's attaching of behaviors. 2376 if (backButton) { 2377 var attachBehaviors = Drupal.attachBehaviors; 2378 Drupal.attachBehaviors = function (context, settings) { 2379 setTimeout(function (context, settings) { 2380 attachBehaviors(context, settings); 2381 }, 300); 2382 }; 2383 } 2384 } 2385 2386})(jQuery, Drupal); 2387; 2388/** 2389* DO NOT EDIT THIS FILE. 2390* See the following change record for more information, 2391* https://www.drupal.org/node/2815083 2392* @preserve 2393**/ 2394(function ($, Drupal) { 2395 var states = { 2396 postponed: [] 2397 }; 2398 Drupal.states = states; 2399 function invert(a, invertState) { 2400 return invertState && typeof a !== 'undefined' ? !a : a; 2401 } 2402 function _compare2(a, b) { 2403 if (a === b) { 2404 return typeof a === 'undefined' ? a : true; 2405 } 2406 return typeof a === 'undefined' || typeof b === 'undefined'; 2407 } 2408 function ternary(a, b) { 2409 if (typeof a === 'undefined') { 2410 return b; 2411 } 2412 if (typeof b === 'undefined') { 2413 return a; 2414 } 2415 return a && b; 2416 } 2417 Drupal.behaviors.states = { 2418 attach: function attach(context, settings) { 2419 var $states = $(context).find('[data-drupal-states]'); 2420 var il = $states.length; 2421 var _loop = function _loop(i) { 2422 var config = JSON.parse($states[i].getAttribute('data-drupal-states')); 2423 Object.keys(config || {}
2423).forEach(function (state) { 2424 new states.Dependent({ 2425 element: $($states[i]), 2426 state: states.State.sanitize(state), 2427 constraints: config[state] 2428 }); 2429 }); 2430 }; 2431 for (var i = 0; i < il; i++) { 2432 _loop(i); 2433 } 2434 while (states.postponed.length) { 2435 states.postponed.shift()(); 2436 } 2437 } 2438 }; 2439 states.Dependent = function (args) { 2440 var _this = this; 2441 $.extend(this, { 2442 values: {}, 2443 oldValue: null 2444 }, args); 2445 this.dependees = this.getDependees(); 2446 Object.keys(this.dependees || {}).forEach(function (selector) { 2447 _this.initializeDependee(selector, _this.dependees[selector]); 2448 }); 2449 }; 2450 states.Dependent.comparisons = { 2451 RegExp: function RegExp(reference, value) { 2452 return reference.test(value); 2453 }, 2454 Function: function Function(reference, value) { 2455 return reference(value); 2456 }, 2457 Number: function Number(reference, value) { 2458 return typeof value === 'string' ? _compare2(reference.toString(), value) : _compare2(reference, value); 2459 } 2460 }; 2461 states.Dependent.prototype = { 2462 initializeDependee: function initializeDependee(selector, dependeeStates) { 2463 var _this2 = this; 2464 this.values[selector] = {}; 2465 Object.keys(dependeeStates).forEach(function (i) { 2466 var state = dependeeStates[i]; 2467 if ($.inArray(state, dependeeStates) === -1) { 2468 return; 2469 } 2470 state = states.State.sanitize(state); 2471 _this2.values[selector][state.name] = null; 2472 $(selector).on("state:".concat(state), { 2473 selector: selector, 2474 state: state 2475 }, function (e) { 2476 _this2.update(e.data.selector, e.data.state, e.value); 2477 }); 2478 new states.Trigger({ 2479 selector: selector, 2480 state: state 2481 }); 2482 }); 2483 }, 2484 compare: function compare(reference, selector, state) { 2485 var value = this.values[selector][state.name]; 2486 if (reference.constructor.name in states.Dependent.comparisons) { 2487 return states.Dependent.comparisons[reference.constructor.name](reference, value); 2488 } 2489 return _compare2(reference, value); 2490 }, 2491 update: function update(selector, state, value) { 2492 if (value !== this.values[selector][state.name]) { 2493 this.values[selector][state.name] = value; 2494 this.reevaluate(); 2495 } 2496 }, 2497 reevaluate: function reevaluate() { 2498 var value = this.verifyConstraints(this.constraints); 2499 if (value !== this.oldValue) { 2500 this.oldValue = value; 2501 value = invert(value, this.state.invert); 2502 this.element.trigger({ 2503 type: "state:".concat(this.state), 2504 value: value, 2505 trigger: true 2506 }); 2507 } 2508 }, 2509 verifyConstraints: function verifyConstraints(constraints, selector) { 2510 var result; 2511 if ($.isArray(constraints)) { 2512 var hasXor = $.inArray('xor', constraints) === -1; 2513 var len = constraints.length; 2514 for (var i = 0; i < len; i++) { 2515 if (constraints[i] !== 'xor') { 2516 var constraint = this.checkConstraints(constraints[i], selector, i); 2517 if (constraint && (hasXor || result)) { 2518 return hasXor; 2519 } 2520 result = result || constraint; 2521 } 2522 } 2523 } else if ($.isPlainObject(constraints)) { 2524 for (var n in constraints) { 2525 if (constraints.hasOwnProperty(n)) { 2526 result = ternary(result, this.checkConstraints(constraints[n], selector, n)); 2527 if (result === false) { 2528 return false; 2529 } 2530 } 2531 } 2532 } 2533 return result; 2534 }, 2535 checkConstraints: function checkConstraints(value, selector, state) { 2536 if (typeof state !== 'string' || /[0-9]/.test(state[0])) { 2537 state = null; 2538 } else if (typeof selector === 'undefined') { 2539 selector = state; 2540 state = null; 2541 } 2542 if (state !== null) { 2543 state = states.State.sanitize(state); 2544 return invert(this.compare(value, selector, state), state.invert); 2545 } 2546 return this.verifyConstraints(value, selector); 2547 }, 2548 getDependees: function getDependees() { 2549 var cache = {}; 2550 var _compare = this.compare; 2551 this.compare = function (reference, selector, state) { 2552 (cache[selector] || (cache[selector] = [])).push(state.name); 2553 }; 2554 this.verifyConstraints(this.constraints); 2555 this.compare = _compare; 2556 return cache; 2557 } 2558 }; 2559 states.Trigger = function (args) { 2560 $.extend(this, args); 2561 if (this.state in states.Trigger.states) { 2562 this.element = $(this.selector); 2563 if (!this.element.data("trigger:".concat(this.state))) { 2564 this.initialize(); 2565 } 2566 } 2567 }; 2568 states.Trigger.prototype = { 2569 initialize: function initialize() { 2570 var _this3 = this; 2571 var trigger = states.Trigger.states[this.state]; 2572 if (typeof trigger === 'function') { 2573 trigger.call(window, this.element); 2574 } else { 2575 Object.keys(trigger || {}
2575).forEach(function (event) { 2576 _this3.defaultTrigger(event, trigger[event]); 2577 }); 2578 } 2579 this.element.data("trigger:".concat(this.state), true); 2580 }, 2581 defaultTrigger: function defaultTrigger(event, valueFn) { 2582 var oldValue = valueFn.call(this.element); 2583 this.element.on(event, $.proxy(function (e) { 2584 var value = valueFn.call(this.element, e); 2585 if (oldValue !== value) { 2586 this.element.trigger({ 2587 type: "state:".concat(this.state), 2588 value: value, 2589 oldValue: oldValue 2590 }); 2591 oldValue = value; 2592 } 2593 }, this)); 2594 states.postponed.push($.proxy(function () { 2595 this.element.trigger({ 2596 type: "state:".concat(this.state), 2597 value: oldValue, 2598 oldValue: null 2599 }); 2600 }, this)); 2601 } 2602 }; 2603 states.Trigger.states = { 2604 empty: { 2605 keyup: function keyup() { 2606 return this.val() === ''; 2607 }, 2608 change: function change() { 2609 return this.val() === ''; 2610 } 2611 }, 2612 checked: { 2613 change: function change() { 2614 var checked = false; 2615 this.each(function () { 2616 checked = $(this).prop('checked'); 2617 return !checked; 2618 }); 2619 return checked; 2620 } 2621 }, 2622 value: { 2623 keyup: function keyup() { 2624 if (this.length > 1) { 2625 return this.filter(':checked').val() || false; 2626 } 2627 return this.val(); 2628 }, 2629 change: function change() { 2630 if (this.length > 1) { 2631 return this.filter(':checked').val() || false; 2632 } 2633 return this.val(); 2634 } 2635 }, 2636 collapsed: { 2637 collapsed: function collapsed(e) { 2638 return typeof e !== 'undefined' && 'value' in e ? e.value : !this.is('[open]'); 2639 } 2640 } 2641 }; 2642 states.State = function (state) { 2643 this.pristine = state; 2644 this.name = state; 2645 var process = true; 2646 do { 2647 while (this.name.charAt(0) === '!') { 2648 this.name = this.name.substring(1); 2649 this.invert = !this.invert; 2650 } 2651 if (this.name in states.State.aliases) { 2652 this.name = states.State.aliases[this.name]; 2653 } else { 2654 process = false; 2655 } 2656 } while (process); 2657 }; 2658 states.State.sanitize = function (state) { 2659 if (state instanceof states.State) { 2660 return state; 2661 } 2662 return new states.State(state); 2663 }; 2664 states.State.aliases = { 2665 enabled: '!disabled', 2666 invisible: '!visible', 2667 invalid: '!valid', 2668 untouched: '!touched', 2669 optional: '!required', 2670 filled: '!empty', 2671 unchecked: '!checked', 2672 irrelevant: '!relevant', 2673 expanded: '!collapsed', 2674 open: '!collapsed', 2675 closed: 'collapsed', 2676 readwrite: '!readonly' 2677 }; 2678 states.State.prototype = { 2679 invert: false, 2680 toString: function toString() { 2681 return this.name; 2682 } 2683 }; 2684 var $document = $(document); 2685 $document.on('state:disabled', function (e) { 2686 if (e.trigger) { 2687 $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value).find('select, input, textarea').prop('disabled', e.value); 2688 } 2689 }); 2690 $document.on('state:required', function (e) { 2691 if (e.trigger) { 2692 if (e.value) { 2693 var label = "label".concat(e.target.id ? "[for=".concat(e.target.id, "]") : ''); 2694 var $label = $(e.target).attr({ 2695 required: 'required', 2696 'aria-required': 'true' 2697 }).closest('.js-form-item, .js-form-wrapper').find(label); 2698 if (!$label.hasClass('js-form-required').length) { 2699 $label.addClass('js-form-required form-required'); 2700 } 2701 } else { 2702 $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required'); 2703 } 2704 } 2705 }); 2706 $document.on('state:visible', function (e) { 2707 if (e.trigger) { 2708 $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value); 2709 } 2710 }); 2711 $document.on('state:checked', function (e) { 2712 if (e.trigger) { 2713 $(e.target).closest('.js-form-item, .js-form-wrapper').find('input').prop('checked', e.value).trigger('change'); 2714 } 2715 }); 2716 $document.on('state:collapsed', function (e) { 2717 if (e.trigger) { 2718 if ($(e.target).is('[open]') === e.value) { 2719 $(e.target).find('> summary').trigger('click'); 2720 } 2721 } 2722 }); 2723})(jQuery, Drupal);; 2724/** 2725 * @file 2726 * Extends core/misc/states.js. 2727 */ 2728(function($) { 2729 2730 // Unbind core state.js from document first so we can then override below. 2731 $(document).unbind('state:disabled'); 2732 2733 /** 2734 * Global state change handlers. These are bound to "document" to cover all 2735 * elements whose state changes. Events sent to elements within the page 2736 * bubble up to these handlers. We use this system so that themes and modules 2737 * can override these state change handlers for particular parts of a page. 2738 */ 2739 $(document).bind('state:disabled', function(e) { 2740 // Only act when this change was triggered by a dependency and not by the 2741 // element monitoring itself. 2742 if (e.trigger) { 2743 $(e.target) 2744 .attr('disabled', e.value) 2745 .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value) 2746 .find(':input').attr('disabled', e.value); 2747 2748 // Note: WebKit nightlies don't reflect that change correctly. 2749 // See https://bugs.webkit.org/show_bug.cgi?id=23789 2750 } 2751 }); 2752 2753})(jQuery); 2754; 2755/** 2756 * @file 2757 * JavaScript behaviors for custom webform #states. 2758 */ 2759 2760(function ($, Drupal) { 2761 2762 'use strict'; 2763 2764 Drupal.webform = Drupal.webform || {}; 2765 Drupal.webform.states = Drupal.webform.states || {}; 2766 Drupal.webform.states.slideDown = Drupal.webform.states.slideDown || {}; 2767 Drupal.webform.states.slideDown.duration = 'slow'; 2768 Drupal.webform.states.slideUp = Drupal.webform.states.slideUp || {}; 2769 Drupal.webform.states.slideUp.duration = 'fast'; 2770 2771 /* ************************************************************************ */ 2772 // jQuery functions. 2773 /* ************************************************************************ */ 2774 2775 /** 2776 * Check if an element has a specified data attribute. 2777 * 2778 * @param {string} data 2779 * The data attribute name. 2780 * 2781 * @return {boolean} 2782 * TRUE if an element has a specified data attribute. 2783 */ 2784 $.fn.hasData = function (data) { 2785 return (typeof this.data(data) !== 'undefined'); 2786 }; 2787 2788 /**
2789 * Check if element is within the webform or not. 2790 * 2791 * @return {boolean} 2792 * TRUE if element is within the webform. 2793 */ 2794 $.fn.isWebform = function () { 2795 return $(this).closest('form.webform-submission-form, form[id^="webform"], form[data-is-webform]').length ? true : false; 2796 }; 2797 2798 /** 2799 * Check if element is to be treated as a webform element. 2800 * 2801 * @return {boolean} 2802 * TRUE if element is to be treated as a webform element. 2803 */ 2804 $.fn.isWebformElement = function () { 2805 return ($(this).isWebform() || $(this).closest('[data-is-webform-element]').length) ? true : false; 2806 }; 2807 2808 /* ************************************************************************ */ 2809 // Trigger. 2810 /* ************************************************************************ */ 2811 2812 // The change event is triggered by cut-n-paste and select menus. 2813 // Issue #2445271: #states element empty check not triggered on mouse 2814 // based paste. 2815 // @see https://www.drupal.org/node/2445271 2816 Drupal.states.Trigger.states.empty.change = function change() { 2817 return this.val() === ''; 2818 }; 2819 2820 /* ************************************************************************ */ 2821 // Dependents. 2822 /* ************************************************************************ */ 2823 2824 // Apply solution included in #1962800 patch. 2825 // Issue #1962800: Form #states not working with literal integers as 2826 // values in IE11. 2827 // @see https://www.drupal.org/project/drupal/issues/1962800 2828 // @see https://www.drupal.org/files/issues/core-states-not-working-with-integers-ie11_1962800_46.patch 2829 // 2830 // This issue causes pattern, less than, and greater than support to break. 2831 // @see https://www.drupal.org/project/webform/issues/2981724 2832 var states = Drupal.states; 2833 Drupal.states.Dependent.prototype.compare = function compare(reference, selector, state) { 2834 var value = this.values[selector][state.name]; 2835 2836 var name = reference.constructor.name; 2837 if (!name) { 2838 name = $.type(reference); 2839 2840 name = name.charAt(0).toUpperCase() + name.slice(1); 2841 } 2842 if (name in states.Dependent.comparisons) { 2843 return states.Dependent.comparisons[name](reference, value); 2844 } 2845 2846 if (reference.constructor.name in states.Dependent.comparisons) { 2847 return states.Dependent.comparisons[reference.constructor.name](reference, value); 2848 } 2849 2850 return _compare2(reference, value); 2851 }; 2852 function _compare2(a, b) { 2853 if (a === b) { 2854 return typeof a === 'undefined' ? a : true; 2855 } 2856 2857 return typeof a === 'undefined' || typeof b === 'undefined'; 2858 } 2859 2860 // Adds pattern, less than, and greater than support to #state API. 2861 // @see http://drupalsun.com/julia-evans/2012/03/09/extending-form-api-states-regular-expressions 2862 Drupal.states.Dependent.comparisons.Object = function (reference, value) { 2863 if ('pattern' in reference) { 2864 return (new RegExp(reference['pattern'])).test(value); 2865 } 2866 else if ('!pattern' in reference) { 2867 return !((new RegExp(reference['!pattern'])).test(value)); 2868 } 2869 else if ('less' in reference) { 2870 return (value !== '' && parseFloat(reference['less']) > parseFloat(value)); 2871 } 2872 else if ('less_equal' in reference) { 2873 return (value !== '' && parseFloat(reference['less_equal']) >= parseFloat(value)); 2874 } 2875 else if ('greater' in reference) { 2876 return (value !== '' && parseFloat(reference['greater']) < parseFloat(value)); 2877 } 2878 else if ('greater_equal' in reference) { 2879 return (value !== '' && parseFloat(reference['greater_equal']) <= parseFloat(value)); 2880 } 2881 else if ('between' in reference || '!between' in reference) { 2882 if (value === '') { 2883 return false; 2884 } 2885 2886 var between = reference['between'] || reference['!between']; 2887 var betweenParts = between.split(':'); 2888 var greater = betweenParts[0]; 2889 var less = (typeof betweenParts[1] !== 'undefined') ? betweenParts[1] : null; 2890 var isGreaterThan = (greater === null || greater === '' || parseFloat(value) >= parseFloat(greater)); 2891 var isLessThan = (less === null || less === '' || parseFloat(value) <= parseFloat(less)); 2892 var result = (isGreaterThan && isLessThan); 2893 return (reference['!between']) ? !result : result; 2894 } 2895 else { 2896 return reference.indexOf(value) !== false; 2897 } 2898 }; 2899 2900 /* ************************************************************************ */ 2901 // States events. 2902 /* ************************************************************************ */ 2903 2904 var $document = $(document); 2905 2906 $document.on('state:required', function (e) { 2907 if (e.trigger && $(e.target).isWebformElement()) { 2908 var $target = $(e.target); 2909 // Fix #required file upload. 2910 // @see Issue #2860529: Conditional required File upload field don't work. 2911 toggleRequired($target.find('input[type="file"]'), e.value); 2912 2913 // Fix #required for radios and likert. 2914 // @see Issue #2856795: If radio buttons are required but not filled form is nevertheless submitted. 2915 if ($target.is('.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .webform-likert-table')) { 2916 $target.toggleClass('required', e.value); 2917 toggleRequired($target.find('input[type="radio"]'), e.value); 2918 } 2919 2920 // Fix #required for checkboxes. 2921 // @see Issue #2938414: Checkboxes don't support #states required. 2922 // @see checkboxRequiredhandler 2923 if ($target.is('.js-form-type-checkboxes, .js-form-type-webform-checkboxes-other, .js-webform-type-checkboxes, .js-webform-type-webform-checkboxes-other')) { 2924 $target.toggleClass('required', e.value); 2925 var $checkboxes = $target.find('input[type="checkbox"]'); 2926 if (e.value) { 2927 // Add event handler. 2928 $checkboxes.on('click', statesCheckboxesRequiredEventHandler); 2929 // Initialize and add required attribute. 2930 checkboxesRequired($target); 2931 } 2932 else { 2933 // Remove event handler. 2934 $checkboxes.off('click', statesCheckboxesRequiredEventHandler); 2935 // Remove required attribute. 2936 toggleRequired($checkboxes, false); 2937 } 2938 } 2939 2940 // Fix #required for tableselect. 2941 // @see Issue #3212581: Table select does not trigger client side validation 2942 if ($target.is('.js-webform-tableselect')) { 2943 $target.toggleClass('required', e.value); 2944 var isMultiple = $target.is('[multiple]'); 2945 if (isMultiple) { 2946 // Checkboxes. 2947 var $tbody = $target.find('tbody'); 2948 var $checkboxes = $tbody.find('input[type="checkbox"]'); 2949 copyRequireMessage($target, $checkboxes); 2950 if (e.value) { 2951 $checkboxes.on('click change', statesCheckboxesRequiredEventHandler); 2952 checkboxesRequired($tbody); 2953 } 2954 else { 2955 $checkboxes.off('click change ', statesCheckboxesRequiredEventHandler); 2956 toggleRequired($tbody, false); 2957 } 2958 } 2959 else { 2960 // Radios. 2961 var $radios = $target.find('input[type="radio"]'); 2962 copyRequireMessage($target, $radios); 2963 toggleRequired($radios, e.value); 2964 } 2965 } 2966 2967 // Fix required label for elements without the for attribute. 2968 // @see Issue #3145300: Conditional Visible Select Other not working. 2969 if ($target.is('.js-form-type-webform-select-other, .js-webform-type-webform-select-other')) { 2970 var $select = $target.find('select'); 2971 toggleRequired($select, e.value); 2972 copyRequireMessage($target, $select); 2973 } 2974 if ($target.find('> label:not([for])').length) { 2975 $target.find('> label').toggleClass('js-form-required form-required', e.value); 2976 } 2977 2978 // Fix required label for checkboxes and radios. 2979 // @see Issue #2938414: Checkboxes don't support #states required 2980 // @see Issue #2731991: Setting required on radios marks all options required. 2981 // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset. 2982 // Fix #required for fieldsets. 2983 // @see Issue #2977569: Hidden fieldsets that become visible with conditional logic cannot be made required. 2984 if ($target.is('.js-webform-type-radios, .js-webform-type-checkboxes, fieldset')) { 2985 $target.find('legend span.fieldset-legend:not(.visually-hidden)').toggleClass('js-form-required form-required', e.value); 2986 } 2987 2988 // Issue #2986017: Fieldsets shouldn't have required attribute. 2989 if ($target.is('fieldset')) { 2990 $target.removeAttr('required aria-required'); 2991 } 2992 } 2993 }); 2994 2995 $document.on('state:checked', function (e) { 2996 if (e.trigger) { 2997 $(e.target).trigger('change'); 2998 } 2999 }); 3000 3001 $document.on('state:readonly', function (e) { 3002 if (e.trigger && $(e.target).isWebformElement()) { 3003 $(e.target).prop('readonly', e.value).closest('.js-form-item, .js-form-wrapper').toggleClass('webform-readonly', e.value).find('input, textarea').prop('readonly', e.value); 3004 3005 // Trigger webform:readonly. 3006 $(e.target).trigger('webform:readonly') 3007 .find('select, input, textarea, button').trigger('webform:readonly'); 3008 } 3009 }); 3010 3011 $document.on('state:visible state:visible-slide', function (e) { 3012 if (e.trigger && $(e.target).isWebformElement()) { 3013 if (e.value) { 3014 $(':input', e.target).addBack().each(function () { 3015 restoreValueAndRequired(this); 3016 triggerEventHandlers(this); 3017 }); 3018 } 3019 else { 3020 // @see https://www.sitepoint.com/jquery-function-clear-form-data/ 3021 $(':input', e.target).addBack().each(function () { 3022 backupValueAndRequired(this); 3023 clearValueAndRequired(this); 3024 triggerEventHandlers(this); 3025 }); 3026 } 3027 } 3028 }); 3029 3030 $document.on('state:visible-slide', function (e) { 3031 if (e.trigger && $(e.target).isWebformElement()) { 3032 var effect = e.value ? 'slideDown' : 'slideUp'; 3033 var duration = Drupal.webform.states[effect].duration; 3034 $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper')[effect](duration); 3035 } 3036 }); 3037 Drupal.states.State.aliases['invisible-slide'] = '!visible-slide'; 3038 3039 $document.on('state:disabled', function (e) { 3040 if (e.trigger && $(e.target).isWebformElement()) { 3041 // Make sure disabled property is set before triggering webform:disabled. 3042 // Copied from: core/misc/states.js 3043 $(e.target) 3044 .prop('disabled', e.value) 3045 .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value) 3046 .find('select, input, textarea, button').prop('disabled', e.value); 3047 3048 // Never disable hidden file[fids] because the existing values will 3049 // be completely lost when the webform is submitted. 3050 var fileElements = $(e.target) 3051 .find(':input[type="hidden"][name$="[fids]"]'); 3052 if (fileElements.length) { 3053 // Remove 'disabled' attribute from fieldset which will block 3054 // all disabled elements from being submitted. 3055 if ($(e.target).is('fieldset')) { 3056 $(e.target).prop('disabled', false); 3057 } 3058 fileElements.removeAttr('disabled'); 3059 } 3060 3061 // Trigger webform:disabled. 3062 $(e.target).trigger('webform:disabled') 3063 .find('select, input, textarea, button').trigger('webform:disabled'); 3064 } 3065 }); 3066 3067 /* ************************************************************************ */ 3068 // Behaviors. 3069 /* ************************************************************************ */ 3070 3071 /** 3072 * Adds HTML5 validation to required checkboxes. 3073 * 3074 * @type {Drupal~behavior} 3075 * 3076 * @see https://www.drupal.org/project/webform/issues/3068998 3077 */ 3078 Drupal.behaviors.webformCheckboxesRequired = { 3079 attach: function (context) { 3080 $('.js-form-type-checkboxes.required, .js-form-type-webform-checkboxes-other.required, .js-webform-type-checkboxes.required, .js-webform-type-webform-checkboxes-other.required, .js-webform-type-webform-radios-other.checkboxes', context) 3081 .once('webform-checkboxes-required') 3082 .each(function () { 3083 var $element = $(this); 3084 $element.find('input[type="checkbox"]').on('click', statesCheckboxesRequiredEventHandler); 3085 setTimeout(function () {checkboxesRequired($element);}); 3086 }); 3087 } 3088 }; 3089 3090 /** 3091 * Adds HTML5 validation to required radios. 3092 * 3093 * @type {Drupal~behavior} 3094 * 3095 * @see https://www.drupal.org/project/webform/issues/2856795 3096 */ 3097 Drupal.behaviors.webformRadiosRequired = { 3098 attach: function (context) { 3099 $('.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .js-webform-type-webform-scale', context) 3100 .once('webform-radios-required') 3101 .each(function () { 3102 var $element = $(this); 3103 setTimeout(function () {radiosRequired($element);}); 3104 }); 3105 } 3106 }; 3107 3108 /** 3109 * Adds HTML5 validation to required table select. 3110 * 3111 * @type {Drupal~behavior} 3112 * 3113 * @see https://www.drupal.org/project/webform/issues/2856795 3114 */ 3115 Drupal.behaviors.webformTableSelectRequired = { 3116 attach: function (context) { 3117 $('.js-webform-tableselect.required', context) 3118 .once('webform-tableselect-required') 3119 .each(function () { 3120 var $element = $(this); 3121 var $tbody = $element.find('tbody'); 3122 var isMultiple = $element.is('[multiple]'); 3123 3124 if (isMultiple) { 3125 // Check all checkbox triggers checkbox 'change' event on 3126 // select and deselect all. 3127 // @see Drupal.tableSelect 3128 $tbody.find('input[type="checkbox"]').on('click change', function () { 3129 checkboxesRequired($tbody); 3130 }); 3131 } 3132 3133 setTimeout(function () { 3134 isMultiple ? checkboxesRequired($tbody) : radiosRequired($element); 3135 }); 3136 }); 3137 } 3138 }; 3139 3140 /** 3141 * Add HTML5 multiple checkboxes required validation. 3142 * 3143 * @param {jQuery} $element
3144 * An jQuery object containing HTML5 radios. 3145 * 3146 * @see https://stackoverflow.com/a/37825072/145846 3147 */ 3148 function checkboxesRequired($element) { 3149 var $firstCheckbox = $element.find('input[type="checkbox"]').first(); 3150 var isChecked = $element.find('input[type="checkbox"]').is(':checked'); 3151 toggleRequired($firstCheckbox, !isChecked); 3152 copyRequireMessage($element, $firstCheckbox); 3153 } 3154 3155 /** 3156 * Add HTML5 radios required validation. 3157 * 3158 * @param {jQuery} $element 3159 * An jQuery object containing HTML5 radios. 3160 * 3161 * @see https://www.drupal.org/project/webform/issues/2856795 3162 */ 3163 function radiosRequired($element) { 3164 var $radios = $element.find('input[type="radio"]'); 3165 var isRequired = $element.hasClass('required'); 3166 toggleRequired($radios, isRequired); 3167 copyRequireMessage($element, $radios); 3168 } 3169 3170 /* ************************************************************************ */ 3171 // Event handlers. 3172 /* ************************************************************************ */ 3173 3174 /** 3175 * Trigger #states API HTML5 multiple checkboxes required validation. 3176 * 3177 * @see https://stackoverflow.com/a/37825072/145846 3178 */ 3179 function statesCheckboxesRequiredEventHandler() { 3180 var $element = $(this).closest('.js-webform-type-checkboxes, .js-webform-type-webform-checkboxes-other'); 3181 checkboxesRequired($element); 3182 } 3183 3184 /** 3185 * Trigger an input's event handlers. 3186 * 3187 * @param {element} input 3188 * An input. 3189 */ 3190 function triggerEventHandlers(input) { 3191 var $input = $(input); 3192 var type = input.type; 3193 var tag = input.tagName.toLowerCase(); 3194 // Add 'webform.states' as extra parameter to event handlers. 3195 // @see Drupal.behaviors.webformUnsaved 3196 var extraParameters = ['webform.states']; 3197 if (type === 'checkbox' || type === 'radio') { 3198 $input 3199 .trigger('change', extraParameters) 3200 .trigger('blur', extraParameters); 3201 } 3202 else if (tag === 'select') { 3203 // Do not trigger the onchange event for Address element's country code 3204 // when it is initialized. 3205 // @see \Drupal\address\Element\Country 3206 if ($input.closest('.webform-type-address').length) { 3207 if (!$input.data('webform-states-address-initialized') 3208 && $input.attr('autocomplete') === 'country' 3209 && $input.val() === $input.find("option[selected]").attr('value')) { 3210 return; 3211 } 3212 $input.data('webform-states-address-initialized', true); 3213 } 3214 3215 $input 3216 .trigger('change', extraParameters) 3217 .trigger('blur', extraParameters); 3218 } 3219 else if (type !== 'submit' && type !== 'button' && type !== 'file') { 3220 // Make sure input mask is removed and then reset when value is restored. 3221 // @see https://www.drupal.org/project/webform/issues/3124155 3222 // @see https://www.drupal.org/project/webform/issues/3202795 3223 var hasInputMask = ($.fn.inputmask && $input.hasClass('js-webform-input-mask')); 3224 hasInputMask && $input.inputmask('remove'); 3225 3226 $input 3227 .trigger('input', extraParameters) 3228 .trigger('change', extraParameters) 3229 .trigger('keydown', extraParameters) 3230 .trigger('keyup', extraParameters) 3231 .trigger('blur', extraParameters); 3232 3233 hasInputMask && $input.inputmask(); 3234 } 3235 } 3236 3237 /* ************************************************************************ */ 3238 // Backup and restore value functions. 3239 /* ************************************************************************ */ 3240 3241 /** 3242 * Backup an input's current value and required attribute 3243 * 3244 * @param {element} input 3245 * An input. 3246 */ 3247 function backupValueAndRequired(input) { 3248 var $input = $(input); 3249 var type = input.type; 3250 var tag = input.tagName.toLowerCase(); // Normalize case. 3251 3252 // Backup required. 3253 if ($input.prop('required') && !$input.hasData('webform-required')) { 3254 $input.data('webform-required', true); 3255 } 3256 3257 // Backup value. 3258 if (!$input.hasData('webform-value')) { 3259 if (type === 'checkbox' || type === 'radio') { 3260 $input.data('webform-value', $input.prop('checked')); 3261 } 3262 else if (tag === 'select') { 3263 var values = []; 3264 $input.find('option:selected').each(function (i, option) { 3265 values[i] = option.value; 3266 }); 3267 $input.data('webform-value', values); 3268 } 3269 else if (type !== 'submit' && type !== 'button') { 3270 $input.data('webform-value', input.value); 3271 } 3272 } 3273 } 3274 3275 /** 3276 * Restore an input's value and required attribute. 3277 * 3278 * @param {element} input 3279 * An input. 3280 */ 3281 function restoreValueAndRequired(input) { 3282 var $input = $(input); 3283 3284 // Restore value. 3285 var value = $input.data('webform-value'); 3286 if (typeof value !== 'undefined') { 3287 var type = input.type; 3288 var tag = input.tagName.toLowerCase(); // Normalize case. 3289 3290 if (type === 'checkbox' || type === 'radio') { 3291 $input.prop('checked', value); 3292 } 3293 else if (tag === 'select') { 3294 $.each(value, function (i, option_value) { 3295 // Prevent "Syntax error, unrecognized expression" error by 3296 // escaping single quotes. 3297 // @see https://forum.jquery.com/topic/escape-characters-prior-to-using-selector 3298 option_value = option_value.replace(/'/g, "\\\'"); 3299 $input.find("option[value='" + option_value + "']").prop('selected', true); 3300 }); 3301 } 3302 else if (type !== 'submit' && type !== 'button') { 3303 input.value = value; 3304 } 3305 $input.removeData('webform-value'); 3306 } 3307 3308 // Restore required. 3309 var required = $input.data('webform-required'); 3310 if (typeof required !== 'undefined') { 3311 if (required) { 3312 $input.prop('required', true); 3313 } 3314 $input.removeData('webform-required'); 3315 } 3316 } 3317 3318 /** 3319 * Clear an input's value and required attributes. 3320 * 3321 * @param {element} input 3322 * An input. 3323 */ 3324 function clearValueAndRequired(input) { 3325 var $input = $(input); 3326 3327 // Check for #states no clear attribute.
3328 // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/ 3329 if ($input.closest('[data-webform-states-no-clear]').length) { 3330 return; 3331 } 3332 3333 // Clear value. 3334 var type = input.type; 3335 var tag = input.tagName.toLowerCase(); // Normalize case. 3336 if (type === 'checkbox' || type === 'radio') { 3337 $input.prop('checked', false); 3338 } 3339 else if (tag === 'select') { 3340 if ($input.find('option[value=""]').length) { 3341 $input.val(''); 3342 } 3343 else { 3344 input.selectedIndex = -1; 3345 } 3346 } 3347 else if (type !== 'submit' && type !== 'button') { 3348 input.value = (type === 'color') ? '#000000' : ''; 3349 } 3350 3351 // Clear required. 3352 $input.prop('required', false); 3353 } 3354 3355 /* ************************************************************************ */ 3356 // Helper functions. 3357 /* ************************************************************************ */ 3358 3359 /** 3360 * Toggle an input's required attributes. 3361 * 3362 * @param {element} $input 3363 * An input. 3364 * @param {boolean} required 3365 * Is input required. 3366 */ 3367 function toggleRequired($input, required) { 3368 var isCheckboxOrRadio = ($input.attr('type') === 'radio' || $input.attr('type') === 'checkbox'); 3369 if (required) { 3370 if (isCheckboxOrRadio) { 3371 $input.attr({'required': 'required'}); 3372 } 3373 else { 3374 $input.attr({'required': 'required', 'aria-required': 'true'}); 3375 } 3376 } 3377 else { 3378 if (isCheckboxOrRadio) { 3379 $input.removeAttr('required'); 3380 } 3381 else { 3382 $input.removeAttr('required aria-required'); 3383 } 3384 } 3385 } 3386 3387 /** 3388 * Copy the clientside_validation.module's message. 3389 * 3390 * @param {jQuery} $source 3391 * The source element. 3392 * @param {jQuery} $destination 3393 * The destination element. 3394 */ 3395 function copyRequireMessage($source, $destination) { 3396 if ($source.attr('data-msg-required')) { 3397 $destination.attr('data-msg-required', $source.attr('data-msg-required')); 3398 } 3399 } 3400 3401})(jQuery, Drupal); 3402; 3403/** 3404 * @file 3405 * JavaScript behaviors for webforms. 3406 */ 3407 3408(function ($, Drupal) { 3409 3410 'use strict'; 3411 3412 /** 3413 * Remove single submit event listener. 3414 * 3415 * @type {Drupal~behavior} 3416 * 3417 * @prop {Drupal~behaviorAttach} attach 3418 * Attaches the behavior for removing single submit event listener. 3419 * 3420 * @see Drupal.behaviors.formSingleSubmit 3421 */ 3422 Drupal.behaviors.webformRemoveFormSingleSubmit = { 3423 attach: function attach() { 3424 function onFormSubmit(e) { 3425 var $form = $(e.currentTarget); 3426 $form.removeAttr('data-drupal-form-submit-last'); 3427 } 3428 $('body') 3429 .once('webform-single-submit') 3430 .on('submit.singleSubmit', 'form.webform-remove-single-submit', onFormSubmit); 3431 } 3432 }; 3433 3434 /** 3435 * Prevent webform autosubmit on wizard pages. 3436 * 3437 * @type {Drupal~behavior} 3438 * 3439 * @prop {Drupal~behaviorAttach} attach 3440 * Attaches the behavior for disabling webform autosubmit. 3441 * Wizard pages need to be progressed with the Previous or Next buttons, 3442 * not by pressing Enter. 3443 */ 3444 Drupal.behaviors.webformDisableAutoSubmit = { 3445 attach: function (context) { 3446 // Not using context so that inputs loaded via Ajax will have autosubmit 3447 // disabled. 3448 // @see http://stackoverflow.com/questions/11235622/jquery-disable-form-submit-on-enter 3449 $('.js-webform-disable-autosubmit input') 3450 .not(':button, :submit, :reset, :image, :file') 3451 .once('webform-disable-autosubmit') 3452 .on('keyup keypress', function (e) { 3453 if (e.which === 13) { 3454 e.preventDefault(); 3455 return false; 3456 } 3457 }); 3458 } 3459 }; 3460 3461 /** 3462 * Custom required and pattern validation error messages. 3463 * 3464 * @type {Drupal~behavior} 3465 * 3466 * @prop {Drupal~behaviorAttach} attach 3467 * Attaches the behavior for the webform custom required and pattern 3468 * validation error messages. 3469 * 3470 * @see http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message 3471 **/ 3472 Drupal.behaviors.webformRequiredError = { 3473 attach: function (context) { 3474 $(context).find(':input[data-webform-required-error], :input[data-webform-pattern-error]').once('webform-required-error') 3475 .on('invalid', function () { 3476 this.setCustomValidity(''); 3477 if (this.valid) { 3478 return; 3479 } 3480 3481 if (this.validity.patternMismatch && $(this).attr('data-webform-pattern-error')) { 3482 this.setCustomValidity($(this).attr('data-webform-pattern-error')); 3483 } 3484 else if (this.validity.valueMissing && $(this).attr('data-webform-required-error')) { 3485 this.setCustomValidity($(this).attr('data-webform-required-error')); 3486 } 3487 }) 3488 .on('input change', function () { 3489 // Find all related elements by name and reset custom validity. 3490 // This specifically applies to required radios and checkboxes. 3491 var name = $(this).attr('name'); 3492 $(this.form).find(':input[name="' + name + '"]').each(function () { 3493 this.setCustomValidity(''); 3494 }); 3495 }); 3496 } 3497 }; 3498 3499 // When #state:required is triggered we need to reset the target elements 3500 // custom validity. 3501 $(document).on('state:required', function (e) { 3502 $(e.target).filter('[data-webform-required-error]') 3503 .each(function () {this.setCustomValidity('');}); 3504 }); 3505 3506})(jQuery, Drupal); 3507; 3508/** 3509 * @file 3510 * JavaScript behaviors for details element. 3511 */ 3512 3513(function ($, Drupal) { 3514 3515 'use strict'; 3516 3517 // Determine if local storage exists and is enabled. 3518 // This approach is copied from Modernizr. 3519 // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731 3520 var hasLocalStorage = (function () { 3521 try { 3522 localStorage.setItem('webform', 'webform'); 3523 localStorage.removeItem('webform'); 3524 return true; 3525 } 3526 catch (e) { 3527 return false;
3528 } 3529 }()); 3530 3531 /** 3532 * Attach handler to save details open/close state. 3533 * 3534 * @type {Drupal~behavior} 3535 */ 3536 Drupal.behaviors.webformDetailsSave = { 3537 attach: function (context) { 3538 if (!hasLocalStorage) { 3539 return; 3540 } 3541 3542 // Summary click event handler. 3543 $('details > summary', context).once('webform-details-summary-save').on('click', function () { 3544 var $details = $(this).parent(); 3545 3546 // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/ 3547 if ($details[0].hasAttribute('data-webform-details-nosave')) { 3548 return; 3549 } 3550 3551 var name = Drupal.webformDetailsSaveGetName($details); 3552 if (!name) { 3553 return; 3554 } 3555 3556 var open = ($details.attr('open') !== 'open') ? '1' : '0'; 3557 localStorage.setItem(name, open); 3558 }); 3559 3560 // Initialize details open state via local storage. 3561 $('details', context).once('webform-details-save').each(function () { 3562 var $details = $(this); 3563 3564 var name = Drupal.webformDetailsSaveGetName($details); 3565 if (!name) { 3566 return; 3567 } 3568 3569 var open = localStorage.getItem(name); 3570 if (open === null) { 3571 return; 3572 } 3573 3574 if (open === '1') { 3575 $details.attr('open', 'open'); 3576 } 3577 else { 3578 $details.removeAttr('open'); 3579 } 3580 }); 3581 } 3582 3583 }; 3584 3585 /** 3586 * Get the name used to store the state of details element. 3587 * 3588 * @param {jQuery} $details 3589 * A details element. 3590 * 3591 * @return {string} 3592 * The name used to store the state of details element. 3593 */ 3594 Drupal.webformDetailsSaveGetName = function ($details) { 3595 if (!hasLocalStorage) { 3596 return ''; 3597 } 3598 3599 // Ignore details that are vertical tabs pane. 3600 if ($details.hasClass('vertical-tabs__pane')) { 3601 return ''; 3602 } 3603 3604 // Any details element not included a webform must have define its own id. 3605 var webformId = $details.attr('data-webform-element-id'); 3606 if (webformId) { 3607 return 'Drupal.webform.' + webformId.replace('--', '.'); 3608 } 3609 3610 var detailsId = $details.attr('id'); 3611 if (!detailsId) { 3612 return ''; 3613 } 3614 3615 var $form = $details.parents('form'); 3616 if (!$form.length || !$form.attr('id')) { 3617 return ''; 3618 } 3619 3620 var formId = $form.attr('id'); 3621 if (!formId) { 3622 return ''; 3623 } 3624 3625 // ISSUE: When Drupal renders a webform in a modal dialog it appends a unique 3626 // identifier to webform ids and details ids. (i.e. my-form--FeSFISegTUI) 3627 // WORKAROUND: Remove the unique id that delimited using double dashes. 3628 formId = formId.replace(/--.+?$/, '').replace(/-/g, '_'); 3629 detailsId = detailsId.replace(/--.+?$/, '').replace(/-/g, '_'); 3630 return 'Drupal.webform.' + formId + '.' + detailsId; 3631 }; 3632 3633})(jQuery, Drupal); 3634; 3635/** 3636* DO NOT EDIT THIS FILE. 3637* See the following change record for more information, 3638* https://www.drupal.org/node/2815083 3639* @preserve 3640**/ 3641(function (Drupal, debounce) { 3642 var liveElement; 3643 var announcements = []; 3644 Drupal.behaviors.drupalAnnounce = { 3645 attach: function attach(context) { 3646 if (!liveElement) { 3647 liveElement = document.createElement('div'); 3648 liveElement.id = 'drupal-live-announce'; 3649 liveElement.className = 'visually-hidden'; 3650 liveElement.setAttribute('aria-live', 'polite'); 3651 liveElement.setAttribute('aria-busy', 'false'); 3652 document.body.appendChild(liveElement); 3653 } 3654 } 3655 }; 3656 function announce() { 3657 var text = []; 3658 var priority = 'polite'; 3659 var announcement; 3660 var il = announcements.length; 3661 for (var i = 0; i < il; i++) { 3662 announcement = announcements.pop(); 3663 text.unshift(announcement.text); 3664 if (announcement.priority === 'assertive') { 3665 priority = 'assertive'; 3666 } 3667 } 3668 if (text.length) { 3669 liveElement.innerHTML = ''; 3670 liveElement.setAttribute('aria-busy', 'true'); 3671 liveElement.setAttribute('aria-live', priority); 3672 liveElement.innerHTML = text.join('\n'); 3673 liveElement.setAttribute('aria-busy', 'false'); 3674 } 3675 } 3676 Drupal.announce = function (text, priority) { 3677 announcements.push({ 3678 text: text, 3679 priority: priority 3680 }); 3681 return debounce(announce, 200)(); 3682 }; 3683})(Drupal, Drupal.debounce);; 3684/** 3685 * @file 3686 * JavaScript behaviors for details element. 3687 */ 3688 3689(function ($, Drupal) { 3690 3691 'use strict'; 3692 3693 Drupal.webform = Drupal.webform || {}; 3694 Drupal.webform.detailsToggle = Drupal.webform.detailsToggle || {}; 3695 Drupal.webform.detailsToggle.options = Drupal.webform.detailsToggle.options || {}; 3696 3697 /** 3698 * Attach handler to toggle details open/close state. 3699 * 3700 * @type {Drupal~behavior} 3701 */ 3702 Drupal.behaviors.webformDetailsToggle = { 3703 attach: function (context) { 3704 $('.js-webform-details-toggle', context).once('webform-details-toggle').each(function () { 3705 var $form = $(this); 3706 var $tabs = $form.find('.webform-tabs'); 3707 3708 // Get only the main details elements and ignore all nested details. 3709 var selector = ($tabs.length) ? '.webform-tab' : '.js-webform-details-toggle, .webform-elements'; 3710 var $details = $form.find('details').filter(function () { 3711 var $parents = $(this).parentsUntil(selector); 3712 return ($parents.find('details').length === 0); 3713 }); 3714 3715 // Toggle is only useful when there are two or more details elements. 3716 if ($details.length < 2) { 3717 return; 3718 } 3719 3720 var options = $.extend({ 3721 button: '<button type="button" class="webform-details-toggle-state"></button>' 3722 }, Drupal.webform.detailsToggle.options); 3723 3724 // Create toggle buttons. 3725 var $toggle = $(options.button) 3726 .attr('title', Drupal.t('Toggle details widget state.')) 3727 .on('click', function (e) { 3728 // Get details that are not vertical tabs pane. 3729 var $details = $form.find('details:not(.vertical-tabs__pane)'); 3730 var open; 3731 if (Drupal.webform.detailsToggle.isFormDetailsOpen($form)) { 3732 $details.removeAttr('open'); 3733 open = 0; 3734 } 3735 else { 3736 $details.attr('open', 'open'); 3737 open = 1; 3738 } 3739 Drupal.webform.detailsToggle.setDetailsToggleLabel($form); 3740 3741 // Set the saved states for all the details elements. 3742 // @see webform.element.details.save.js 3743 if (Drupal.webformDetailsSaveGetName) { 3744 $details.each(function () { 3745 // Note: Drupal.webformDetailsSaveGetName checks if localStorage 3746 // exists and is enabled. 3747 // @see webform.element.details.save.js 3748 var name = Drupal.webformDetailsSaveGetName($(this)); 3749 if (name) {
3750 localStorage.setItem(name, open); 3751 } 3752 }); 3753 } 3754 }) 3755 .wrap('<div class="webform-details-toggle-state-wrapper"></div>') 3756 .parent(); 3757 3758 if ($tabs.length) { 3759 // Add toggle state before the tabs. 3760 $tabs.find('.item-list:first-child').eq(0).before($toggle); 3761 } 3762 else { 3763 // Add toggle state link to first details element. 3764 $details.eq(0).before($toggle); 3765 } 3766 3767 Drupal.webform.detailsToggle.setDetailsToggleLabel($form); 3768 }); 3769 } 3770 }; 3771 3772 /** 3773 * Determine if a webform's details are all opened. 3774 * 3775 * @param {jQuery} $form 3776 * A webform. 3777 * 3778 * @return {boolean} 3779 * TRUE if a webform's details are all opened. 3780 */ 3781 Drupal.webform.detailsToggle.isFormDetailsOpen = function ($form) { 3782 return ($form.find('details[open]').length === $form.find('details').length); 3783 }; 3784 3785 /** 3786 * Set a webform's details toggle state widget label. 3787 * 3788 * @param {jQuery} $form 3789 * A webform. 3790 */ 3791 Drupal.webform.detailsToggle.setDetailsToggleLabel = function ($form) { 3792 var isOpen = Drupal.webform.detailsToggle.isFormDetailsOpen($form); 3793 3794 var label = (isOpen) ? Drupal.t('Collapse all') : Drupal.t('Expand all'); 3795 $form.find('.webform-details-toggle-state').html(label); 3796 3797 var text = (isOpen) ? Drupal.t('All details have been expanded.') : Drupal.t('All details have been collapsed.'); 3798 Drupal.announce(text); 3799 }; 3800 3801})(jQuery, Drupal); 3802; 3803/** 3804* DO NOT EDIT THIS FILE. 3805* See the following change record for more information, 3806* https://www.drupal.org/node/2815083 3807* @preserve 3808**/ 3809(function ($, Drupal) { 3810 Drupal.theme.progressBar = function (id) { 3811 return "<div id=\"".concat(id, "\" class=\"progress\" aria-live=\"polite\">") + '<div class="progress__label"> </div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description"> </div>' + '</div>'; 3812 }; 3813 Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) { 3814 this.id = id; 3815 this.method = method || 'GET'; 3816 this.updateCallback = updateCallback; 3817 this.errorCallback = errorCallback; 3818 this.element = $(Drupal.theme('progressBar', id)); 3819 }; 3820 $.extend(Drupal.ProgressBar.prototype, { 3821 setProgress: function setProgress(percentage, message, label) { 3822 if (percentage >= 0 && percentage <= 100) { 3823 $(this.element).find('div.progress__bar').css('width', "".concat(percentage, "%")); 3824 $(this.element).find('div.progress__percentage').html("".concat(percentage, "%")); 3825 } 3826 $('div.progress__description', this.element).html(message); 3827 $('div.progress__label', this.element).html(label); 3828 if (this.updateCallback) { 3829 this.updateCallback(percentage, message, this); 3830 } 3831 }, 3832 startMonitoring: function startMonitoring(uri, delay) { 3833 this.delay = delay; 3834 this.uri = uri; 3835 this.sendPing(); 3836 }, 3837 stopMonitoring: function stopMonitoring() { 3838 clearTimeout(this.timer); 3839 this.uri = null; 3840 }, 3841 sendPing: function sendPing() { 3842 if (this.timer) { 3843 clearTimeout(this.timer); 3844 } 3845 if (this.uri) { 3846 var pb = this; 3847 var uri = this.uri; 3848 if (uri.indexOf('?') === -1) { 3849 uri += '?'; 3850 } else { 3851 uri += '&'; 3852 } 3853 uri += '_format=json'; 3854 $.ajax({ 3855 type: this.method, 3856 url: uri, 3857 data: '', 3858 dataType: 'json', 3859 success: function success(progress) { 3860 if (progress.status === 0) { 3861 pb.displayError(progress.data); 3862 return; 3863 } 3864 pb.setProgress(progress.percentage, progress.message, progress.label); 3865 pb.timer = setTimeout(function () { 3866 pb.sendPing(); 3867 }, pb.delay); 3868 }, 3869 error: function error(xmlhttp) { 3870 var e = new Drupal.AjaxError(xmlhttp, pb.uri); 3871 pb.displayError("<pre>".concat(e.message, "</pre>")); 3872 } 3873 }); 3874 } 3875 }, 3876 displayError: function displayError(string) { 3877 var error = $('<div class="messages messages--error"></div>').html(string); 3878 $(this.element).before(error).hide(); 3879 if (this.errorCallback) { 3880 this.errorCallback(this); 3881 } 3882 } 3883 }); 3884})(jQuery, Drupal);; 3885/** 3886 * @file 3887 * Extends methods from core/misc/progress.js. 3888 */ 3889 3890(function ($, Drupal) { 3891 3892 'use strict'; 3893 3894 /** 3895 * Theme function for the progress bar. 3896 * 3897 * @param {string} id 3898 * 3899 * @return {string} 3900 * The HTML for the progress bar. 3901 */ 3902 Drupal.theme.progressBar = function (id) { 3903 return '<div class="progress-wrapper" aria-live="polite">' + 3904 '<div class="message"></div>'+ 3905 '<div id ="' + id + '" class="progress progress-striped active">' + 3906 '<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">' + 3907 '<span class="percentage"></span>' + 3908 '</div>' + 3909 '</div>' + 3910 '<div class="progress-label"></div>' + 3911 '</div>'; 3912 }; 3913 3914 $.extend(Drupal.ProgressBar.prototype, /** @lends Drupal.ProgressBar */{ 3915 3916 /** 3917 * Set the percentage and status message for the progressbar. 3918 * 3919 * @param {number} percentage 3920 * @param {string} message 3921 * @param {string} label 3922 */ 3923 setProgress: function (percentage, message, label) { 3924 if (percentage >= 0 && percentage <= 100) {
3925 $(this.element).find('.progress-bar').css('width', percentage + '%').attr('aria-valuenow', percentage); 3926 $(this.element).find('.percentage').html(percentage + '%'); 3927 } 3928 if (message) { 3929 // Remove the unnecessary whitespace at the end of the message. 3930 message = message.replace(/<br\/> |\s*$/, ''); 3931 3932 $('.message', this.element).html(message); 3933 } 3934 if (label) { 3935 $('.progress-label', this.element).html(label); 3936 } 3937 if (this.updateCallback) { 3938 this.updateCallback(percentage, message, this); 3939 } 3940 }, 3941 3942 /** 3943 * Display errors on the page. 3944 * 3945 * @param {string} string 3946 */ 3947 displayError: function (string) { 3948 var error = $('<div class="alert alert-block alert-error"><button class="close" data-dismiss="alert">×</button><h4>' + Drupal.t('Error message') + '</h4></div>').append(string); 3949 $(this.element).before(error).hide(); 3950 3951 if (this.errorCallback) { 3952 this.errorCallback(this); 3953 } 3954 } 3955 }); 3956 3957})(jQuery, Drupal); 3958; 3959loadjs=function(){var h=function(){},c={},u={},f={};function o(e,n){if(e){var r=f[e];if(u[e]=n,r)for(;r.length;)r[0](e,n),r.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function d(r,t,s,i){var c,o,e=document,n=s.async,u=(s.numRetries||0)+1,f=s.before||h,l=r.replace(/[\?|#].*$/,""),a=r.replace(/^(css|img)!/,"");i=i||0,/(^css!|\.css$)/.test(l)?((o=e.createElement("link")).rel="stylesheet",o.href=a,(c="hideFocus"in o)&&o.relList&&(c=0,o.rel="preload",o.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(l)?(o=e.createElement("img")).src=a:((o=e.createElement("script")).src=r,o.async=void 0===n||n),!(o.onload=o.onerror=o.onbeforeload=function(e){var n=e.type[0];if(c)try{o.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((i+=1)<u)return d(r,t,s,i)}else if("preload"==o.rel&&"style"==o.as)return o.rel="stylesheet";t(r,n,e.defaultPrevented)})!==f(r,o)&&e.head.appendChild(o)}function r(e,n,r){var t,s;if(n&&n.trim&&(t=n),s=(t?r:n)||{},t){if(t in c)throw"LoadJS";c[t]=!0}function i(n,r){!function(e,t,n){var r,s,i=(e=e.push?e:[e]).length,c=i,o=[];for(r=function(e,n,r){if("e"==n&&o.push(e),"b"==n){if(!r)return;o.push(e)}--i||t(o)},s=0;s<c;s++)d(e[s],r,n)}(e,function(e){l(s,e),n&&l({success:n,error:r},e),o(t,e)},s)}if(s.returnPromise)return new Promise(i);i()}return r.ready=function(e,n){return function(e,r){e=e.push?e:[e];var n,t,s,i=[],c=e.length,o=c;
3959for(n=function(e,n){n.length&&i.push(e),--o||r(i)};c--;)t=e[c],(s=u[t])?n(t,s):(f[t]=f[t]||[]).push(n)}(e,function(e){l(n,e)}),r},r.done=function(e){o(e,[])},r.reset=function(){c={},u={},f={}},r.isDefined=function(e){return e in c},r}();; 3960/** 3961* DO NOT EDIT THIS FILE. 3962* See the following change record for more information, 3963* https://www.drupal.org/node/2815083 3964* @preserve 3965**/ 3966(function (Drupal) { 3967 Drupal.behaviors.responsiveImageAJAX = { 3968 attach: function attach() { 3969 if (window.picturefill) { 3970 window.picturefill(); 3971 } 3972 } 3973 }; 3974})(Drupal);; 3975/** 3976* DO NOT EDIT THIS FILE. 3977* See the following change record for more information, 3978* https://www.drupal.org/node/2815083 3979* @preserve 3980**/ 3981function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 3982function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 3983function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 3984function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 3985function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 3986function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 3987(function ($, window, Drupal, drupalSettings, loadjs, _ref) { 3988 var isFocusable = _ref.isFocusable, 3989 tabbable = _ref.tabbable; 3990 Drupal.behaviors.AJAX = { 3991 attach: function attach(context, settings) { 3992 function loadAjaxBehavior(base) { 3993 var elementSettings = settings.ajax[base]; 3994 if (typeof elementSettings.selector === 'undefined') { 3995 elementSettings.selector = "#".concat(base); 3996 } 3997 once('drupal-ajax', $(elementSettings.selector)).forEach(function (el) { 3998 elementSettings.element = el; 3999 elementSettings.base = base; 4000 Drupal.ajax(elementSettings); 4001 }); 4002 } 4003 Object.keys(settings.ajax || {}).forEach(function (base) { 4004 return loadAjaxBehavior(base); 4005 }); 4006 Drupal.ajax.bindAjaxLinks(document.body); 4007 once('ajax', '.use-ajax-submit').forEach(function (el) { 4008 var elementSettings = {}; 4009 elementSettings.url = $(el.form).attr('action'); 4010 elementSettings.setClick = true; 4011 elementSettings.event = 'click'; 4012 elementSettings.progress = { 4013 type: 'throbber' 4014 }; 4015 elementSettings.base = el.id; 4016 elementSettings.element = el; 4017 Drupal.ajax(elementSettings); 4018 }); 4019 }, 4020 detach: function detach(context, settings, trigger) { 4021 if (trigger === 'unload') { 4022 Drupal.ajax.expired().forEach(function (instance) { 4023 Drupal.ajax.instances[instance.instanceIndex] = null; 4024 }); 4025 } 4026 } 4027 }; 4028 Drupal.AjaxError = function (xmlhttp, uri, customMessage) { 4029 var statusCode; 4030 var statusText; 4031 var responseText; 4032 if (xmlhttp.status) { 4033 statusCode = "\n".concat(Drupal.t('An AJAX HTTP error occurred.'), "\n").concat(Drupal.t('HTTP Result Code: !status', { 4034 '!status': xmlhttp.status 4035 })); 4036 } else { 4037 statusCode = "\n".concat(Drupal.t('An AJAX HTTP request terminated abnormally.')); 4038 } 4039 statusCode += "\n".concat(Drupal.t('Debugging information follows.')); 4040 var pathText = "\n".concat(Drupal.t('Path: !uri', { 4041 '!uri': uri 4042 })); 4043 statusText = ''; 4044 try { 4045 statusText = "\n".concat(Drupal.t('StatusText: !statusText', { 4046 '!statusText': xmlhttp.statusText.trim() 4047 })); 4048 } catch (e) {} 4049 responseText = ''; 4050 try { 4051 responseText = "\n".concat(Drupal.t('ResponseText: !responseText', { 4052 '!responseText': xmlhttp.responseText.trim() 4053 })); 4054 } catch (e) {} 4055 responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, ''); 4056 responseText = responseText.replace(/[\n]+\s+/g, '\n'); 4057 var readyStateText = xmlhttp.status === 0 ? "\n".concat(Drupal.t('ReadyState: !readyState', { 4058 '!readyState': xmlhttp.readyState 4059 })) : ''; 4060 customMessage = customMessage ? "\n".concat(Drupal.t('CustomMessage: !customMessage', { 4061 '!customMessage': customMessage 4062 })) : ''; 4063 this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText; 4064 this.name = 'AjaxError'; 4065 }; 4066 Drupal.AjaxError.prototype = new Error(); 4067 Drupal.AjaxError.prototype.constructor = Drupal.AjaxError; 4068 Drupal.ajax = function (settings) { 4069 if (arguments.length !== 1) { 4070 throw new Error('Drupal.ajax() function must be called with one configuration object only'); 4071 } 4072 var base = settings.base || false; 4073 var element = settings.element || false; 4074 delete settings.base; 4075 delete settings.element; 4076 if (!settings.progress && !element) { 4077 settings.progress = false;
4078 } 4079 var ajax = new Drupal.Ajax(base, element, settings); 4080 ajax.instanceIndex = Drupal.ajax.instances.length; 4081 Drupal.ajax.instances.push(ajax); 4082 return ajax; 4083 }; 4084 Drupal.ajax.instances = []; 4085 Drupal.ajax.expired = function () { 4086 return Drupal.ajax.instances.filter(function (instance) { 4087 return instance && instance.element !== false && !document.body.contains(instance.element); 4088 }); 4089 }; 4090 Drupal.ajax.bindAjaxLinks = function (element) { 4091 once('ajax', '.use-ajax', element).forEach(function (ajaxLink) { 4092 var $linkElement = $(ajaxLink); 4093 var elementSettings = { 4094 progress: { 4095 type: 'throbber' 4096 }, 4097 dialogType: $linkElement.data('dialog-type'), 4098 dialog: $linkElement.data('dialog-options'), 4099 dialogRenderer: $linkElement.data('dialog-renderer'), 4100 base: $linkElement.attr('id'), 4101 element: ajaxLink 4102 }; 4103 var href = $linkElement.attr('href'); 4104 if (href) { 4105 elementSettings.url = href; 4106 elementSettings.event = 'click'; 4107 } 4108 Drupal.ajax(elementSettings); 4109 }); 4110 }; 4111 Drupal.Ajax = function (base, element, elementSettings) { 4112 var defaults = { 4113 event: element ? 'mousedown' : null, 4114 keypress: true, 4115 selector: base ? "#".concat(base) : null, 4116 effect: 'none', 4117 speed: 'none', 4118 method: 'replaceWith', 4119 progress: { 4120 type: 'throbber', 4121 message: Drupal.t('Please wait...') 4122 }, 4123 submit: { 4124 js: true 4125 } 4126 }; 4127 $.extend(this, defaults, elementSettings); 4128 this.commands = new Drupal.AjaxCommands(); 4129 this.instanceIndex = false; 4130 if (this.wrapper) { 4131 this.wrapper = "#".concat(this.wrapper); 4132 } 4133 this.element = element; 4134 this.element_settings = elementSettings; 4135 this.elementSettings = elementSettings; 4136 if (this.element && this.element.form) { 4137 this.$form = $(this.element.form); 4138 } 4139 if (!this.url) { 4140 var $element = $(this.element); 4141 if ($element.is('a')) { 4142 this.url = $element.attr('href'); 4143 } else if (this.element && element.form) { 4144 this.url = this.$form.attr('action'); 4145 } 4146 } 4147 var originalUrl = this.url; 4148 this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1'); 4149 if (drupalSettings.ajaxTrustedUrl[originalUrl]) { 4150 drupalSettings.ajaxTrustedUrl[this.url] = true; 4151 } 4152 var ajax = this; 4153 ajax.options = { 4154 url: ajax.url, 4155 data: ajax.submit, 4156 isInProgress: function isInProgress() { 4157 return ajax.ajaxing; 4158 }, 4159 beforeSerialize: function beforeSerialize(elementSettings, options) { 4160 return ajax.beforeSerialize(elementSettings, options); 4161 }, 4162 beforeSubmit: function beforeSubmit(formValues, elementSettings, options) { 4163 ajax.ajaxing = true; 4164 return ajax.beforeSubmit(formValues, elementSettings, options); 4165 }, 4166 beforeSend: function beforeSend(xmlhttprequest, options) { 4167 ajax.ajaxing = true; 4168 return ajax.beforeSend(xmlhttprequest, options); 4169 }, 4170 success: function success(response, status, xmlhttprequest) { 4171 var _this = this; 4172 if (typeof response === 'string') { 4173 response = $.parseJSON(response); 4174 } 4175 if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) { 4176 if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { 4177 var customMessage = Drupal.t('The response failed verification so will not be processed.'); 4178 return ajax.error(xmlhttprequest, ajax.url, customMessage); 4179 } 4180 } 4181 return Promise.resolve(ajax.success(response, status)).then(function () { 4182 ajax.ajaxing = false; 4183 $(document).trigger('ajaxSuccess', [xmlhttprequest, _this]); 4184 $(document).trigger('ajaxComplete', [xmlhttprequest, _this]); 4185 if (--$.active === 0) { 4186 $(document).trigger('ajaxStop'); 4187 } 4188 }); 4189 }, 4190 error: function error(xmlhttprequest, status, _error) { 4191 ajax.ajaxing = false; 4192 }, 4193 complete: function complete(xmlhttprequest, status) { 4194 if (status === 'error' || status === 'parsererror') { 4195 return ajax.error(xmlhttprequest, ajax.url); 4196 } 4197 }, 4198 dataType: 'json', 4199 jsonp: false, 4200 type: 'POST' 4201 }; 4202 if (elementSettings.dialog) { 4203 ajax.options.data.dialogOptions = elementSettings.dialog; 4204 } 4205 if (ajax.options.url.indexOf('?') === -1) { 4206 ajax.options.url += '?'; 4207 } else { 4208 ajax.options.url += '&'; 4209 } 4210 var wrapper = "drupal_".concat(elementSettings.dialogType || 'ajax'); 4211 if (elementSettings.dialogRenderer) { 4212 wrapper += ".".concat(elementSettings.dialogRenderer); 4213 } 4214 ajax.options.url += "".concat(Drupal.ajax.WRAPPER_FORMAT, "=").concat(wrapper); 4215 $(ajax.element).on(elementSettings.event, function (event) { 4216 if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) { 4217 throw new Error(Drupal.t('The callback URL is not local and n
4217ot trusted: !url', { 4218 '!url': ajax.url 4219 })); 4220 } 4221 return ajax.eventResponse(this, event); 4222 }); 4223 if (elementSettings.keypress) { 4224 $(ajax.element).on('keypress', function (event) { 4225 return ajax.keypressResponse(this, event); 4226 }); 4227 } 4228 if (elementSettings.prevent) { 4229 $(ajax.element).on(elementSettings.prevent, false); 4230 } 4231 }; 4232 Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format'; 4233 Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax'; 4234 Drupal.Ajax.prototype.execute = function () { 4235 if (this.ajaxing) { 4236 return; 4237 } 4238 try { 4239 this.beforeSerialize(this.element, this.options); 4240 return $.ajax(this.options); 4241 } catch (e) { 4242 this.ajaxing = false; 4243 window.alert("An error occurred while attempting to process ".concat(this.options.url, ": ").concat(e.message)); 4244 return $.Deferred().reject(); 4245 } 4246 }; 4247 Drupal.Ajax.prototype.keypressResponse = function (element, event) { 4248 var ajax = this; 4249 if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') { 4250 event.preventDefault(); 4251 event.stopPropagation(); 4252 $(element).trigger(ajax.elementSettings.event); 4253 } 4254 }; 4255 Drupal.Ajax.prototype.eventResponse = function (element, event) { 4256 event.preventDefault(); 4257 event.stopPropagation(); 4258 var ajax = this; 4259 if (ajax.ajaxing) { 4260 return; 4261 } 4262 try { 4263 if (ajax.$form) { 4264 if (ajax.setClick) { 4265 element.form.clk = element; 4266 } 4267 ajax.$form.ajaxSubmit(ajax.options); 4268 } else { 4269 ajax.beforeSerialize(ajax.element, ajax.options); 4270 $.ajax(ajax.options); 4271 } 4272 } catch (e) { 4273 ajax.ajaxing = false; 4274 window.alert("An error occurred while attempting to process ".concat(ajax.options.url, ": ").concat(e.message)); 4275 } 4276 }; 4277 Drupal.Ajax.prototype.beforeSerialize = function (element, options) { 4278 if (this.$form && document.body.contains(this.$form.get(0))) { 4279 var settings = this.settings || drupalSettings; 4280 Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize'); 4281 } 4282 options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1; 4283 var pageState = drupalSettings.ajaxPageState; 4284 options.data['ajax_page_state[theme]'] = pageState.theme; 4285 options.data['ajax_page_state[theme_token]'] = pageState.theme_token; 4286 options.data['ajax_page_state[libraries]'] = pageState.libraries; 4287 }; 4288 Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {}; 4289 Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) { 4290 if (this.$form) { 4291 options.extraData = options.extraData || {}; 4292 options.extraData.ajax_iframe_upload = '1'; 4293 var v = $.fieldValue(this.element); 4294 if (v !== null) { 4295 options.extraData[this.element.name] = v; 4296 } 4297 } 4298 $(this.element).prop('disabled', true); 4299 if (!this.progress || !this.progress.type) { 4300 return; 4301 } 4302 var progressIndicatorMethod = "setProgressIndicator".concat(this.progress.type.slice(0, 1).toUpperCase()).concat(this.progress.type.slice(1).toLowerCase()); 4303 if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') { 4304 this[progressIndicatorMethod].call(this); 4305 } 4306 }; 4307 Drupal.theme.ajaxProgressThrobber = function (message) { 4308 var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : ''; 4309 var throbber = '<div class="throbber"> </div>'; 4310 return "<div class=\"ajax-progress ajax-progress-throbber\">".concat(throbber).concat(messageMarkup, "</div>"); 4311 }; 4312 Drupal.theme.ajaxProgressIndicatorFullscreen = function () { 4313 return '<div class="ajax-progress ajax-progress-fullscreen"> </div>'; 4314 }; 4315 Drupal.theme.ajaxProgressMessage = function (message) { 4316 return "<div class=\"message\">".concat(message, "</div>"); 4317 }; 4318 Drupal.theme.ajaxProgressBar = function ($element) { 4319 return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element); 4320 }; 4321 Drupal.Ajax.prototype.setProgressIndicatorBar = function () { 4322 var progressBar = new Drupal.ProgressBar("ajax-progress-".concat(this.element.i
4322d), $.noop, this.progress.method, $.noop); 4323 if (this.progress.message) { 4324 progressBar.setProgress(-1, this.progress.message); 4325 } 4326 if (this.progress.url) { 4327 progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); 4328 } 4329 this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element)); 4330 this.progress.object = progressBar; 4331 $(this.element).after(this.progress.element); 4332 }; 4333 Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { 4334 this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message)); 4335 $(this.element).after(this.progress.element); 4336 }; 4337 Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { 4338 this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen')); 4339 $('body').append(this.progress.element); 4340 }; 4341 Drupal.Ajax.prototype.commandExecutionQueue = function (response, status) { 4342 var _this2 = this; 4343 var ajaxCommands = this.commands; 4344 return Object.keys(response || {}).reduce(function (executionQueue, key) { 4345 return executionQueue.then(function () { 4346 var command = response[key].command; 4347 if (command && ajaxCommands[command]) { 4348 return ajaxCommands[command](_this2, response[key], status); 4349 } 4350 }); 4351 }, Promise.resolve()); 4352 }; 4353 Drupal.Ajax.prototype.success = function (response, status) { 4354 var _this3 = this; 4355 if (this.progress.element) { 4356 $(this.progress.element).remove(); 4357 } 4358 if (this.progress.object) { 4359 this.progress.object.stopMonitoring(); 4360 } 4361 $(this.element).prop('disabled', false); 4362 var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray(); 4363 var focusChanged = Object.keys(response || {}).some(function (key) { 4364 var _response$key = response[key], 4365 command = _response$key.command, 4366 method = _response$key.method; 4367 return command === 'focusFirst' || command === 'invoke' && method === 'focus'; 4368 }); 4369 return this.commandExecutionQueue(response, status).then(function () { 4370 if (!focusChanged && _this3.element && !$(_this3.element).data('disable-refocus')) { 4371 var target = false;
4372 for (var n = elementParents.length - 1; !target && n >= 0; n--) { 4373 target = document.querySelector("[data-drupal-selector=\"".concat(elementParents[n].getAttribute('data-drupal-selector'), "\"]")); 4374 } 4375 if (target) { 4376 $(target).trigger('focus'); 4377 } 4378 } 4379 if (_this3.$form && document.body.contains(_this3.$form.get(0))) { 4380 var settings = _this3.settings || drupalSettings; 4381 Drupal.attachBehaviors(_this3.$form.get(0), settings); 4382 } 4383 _this3.settings = null; 4384 }).catch(function (error) { 4385 return console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error', { 4386 '!error': error 4387 })); 4388 }); 4389 }; 4390 Drupal.Ajax.prototype.getEffect = function (response) { 4391 var type = response.effect || this.effect; 4392 var speed = response.speed || this.speed; 4393 var effect = {}; 4394 if (type === 'none') { 4395 effect.showEffect = 'show'; 4396 effect.hideEffect = 'hide'; 4397 effect.showSpeed = ''; 4398 } else if (type === 'fade') { 4399 effect.showEffect = 'fadeIn'; 4400 effect.hideEffect = 'fadeOut'; 4401 effect.showSpeed = speed; 4402 } else { 4403 effect.showEffect = "".concat(type, "Toggle"); 4404 effect.hideEffect = "".concat(type, "Toggle"); 4405 effect.showSpeed = speed; 4406 } 4407 return effect; 4408 }; 4409 Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { 4410 if (this.progress.element) { 4411 $(this.progress.element).remove(); 4412 } 4413 if (this.progress.object) { 4414 this.progress.object.stopMonitoring(); 4415 } 4416 $(this.wrapper).show(); 4417 $(this.element).prop('disabled', false); 4418 if (this.$form && document.body.contains(this.$form.get(0))) { 4419 var settings = this.settings || drupalSettings; 4420 Drupal.attachBehaviors(this.$form.get(0), settings); 4421 } 4422 throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage); 4423 }; 4424 Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) { 4425 return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) { 4426 return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)); 4427 }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent; 4428 }; 4429 Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) { 4430 return $('<div></div>').append($elements); 4431 }; 4432 Drupal.AjaxCommands = function () {}; 4433 Drupal.AjaxCommands.prototype = { 4434 insert: function insert(ajax, response) { 4435 var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); 4436 var method = response.method || ajax.method; 4437 var effect = ajax.getEffect(response); 4438 var settings = response.settings || ajax.settings || drupalSettings; 4439 var $newContent = $($.parseHTML(response.data, document, true)); 4440 $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response); 4441 switch (method) { 4442 case 'html': 4443 case 'replaceWith': 4444 case 'replaceAll': 4445 case 'empty': 4446 case 'remove': 4447 Drupal.detachBehaviors($wrapper.get(0), settings); 4448 break; 4449 default: 4450 break; 4451 } 4452 $wrapper[method]($newContent); 4453 if (effect.showEffect !== 'show') { 4454 $newContent.hide(); 4455 } 4456 var $ajaxNewContent = $newContent.find('.ajax-new-content'); 4457 if ($ajaxNewContent.length) { 4458 $ajaxNewContent.hide(); 4459 $newContent.show(); 4460 $ajaxNewContent[effect.showEffect](effect.showSpeed); 4461 } else if (effect.showEffect !== 'show') { 4462 $newContent[effect.showEffect](effect.showSpeed); 4463 } 4464 if ($newContent.parents('html').length) { 4465 $newContent.each(function (index, element) { 4466 if (element.nodeType === Node.ELEMENT_NODE) { 4467 Drupal.attachBehaviors(element, settings); 4468 } 4469 }); 4470 } 4471 }, 4472 remove: function remove(ajax, response, status) { 4473 var settings = response.settings || ajax.settings || drupalSettings; 4474 $(response.selector).each(function () { 4475 Drupal.detachBehaviors(this, settings); 4476 }).remove(); 4477 }, 4478 changed: function changed(ajax, response, status) { 4479 var $element = $(response.selector); 4480 if (!$element.hasClass('ajax-changed')) { 4481 $element.addClass('ajax-changed'); 4482 if (response.asterisk) { 4483 $element.find(response.asterisk).append(" <abbr class=\"ajax-changed\" title=\"".concat(Drupal.t('Changed'), "\">*</abbr> ")); 4484 } 4485 } 4486 }, 4487 alert: function alert(ajax, response, status) { 4488 window.alert(response.text); 4489 }, 4490 announce: function announce(ajax, response) { 4491 if (response.priority) { 4492 Drupal.announce(response.text, response.priority); 4493 } else { 4494 Drupal.announce(response.text); 4495 } 4496 }, 4497 redirect: function redirect(ajax, response, status) { 4498 window.location = response.url; 4499 }, 4500 css: function css(ajax, response, status) { 4501 $(response.selector).css(response.argument); 4502 }, 4503 settings: function settings(ajax, response, status) { 4504 var ajaxSettings = drupalSettings.ajax; 4505 if (ajaxSettings) {
4506 Drupal.ajax.expired().forEach(function (instance) { 4507 if (instance.selector) { 4508 var selector = instance.selector.replace('#', ''); 4509 if (selector in ajaxSettings) { 4510 delete ajaxSettings[selector]; 4511 } 4512 } 4513 }); 4514 } 4515 if (response.merge) { 4516 $.extend(true, drupalSettings, response.settings); 4517 } else { 4518 ajax.settings = response.settings; 4519 } 4520 }, 4521 data: function data(ajax, response, status) { 4522 $(response.selector).data(response.name, response.value); 4523 }, 4524 focusFirst: function focusFirst(ajax, response, status) { 4525 var focusChanged = false; 4526 var container = document.querySelector(response.selector); 4527 if (container) { 4528 var tabbableElements = tabbable(container); 4529 if (tabbableElements.length) { 4530 tabbableElements[0].focus(); 4531 focusChanged = true; 4532 } else if (isFocusable(container)) { 4533 container.focus(); 4534 focusChanged = true; 4535 } 4536 } 4537 if (ajax.hasOwnProperty('element') && !focusChanged) { 4538 ajax.element.focus(); 4539 } 4540 }, 4541 invoke: function invoke(ajax, response, status) { 4542 var $element = $(response.selector); 4543 $element[response.method].apply($element, _toConsumableArray(response.args)); 4544 }, 4545 restripe: function restripe(ajax, response, status) { 4546 $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even'); 4547 }, 4548 update_build_id: function update_build_id(ajax, response, status) { 4549 document.querySelectorAll("input[name=\"form_build_id\"][value=\"".concat(response.old, "\"]")).forEach(function (item) { 4550 item.value = response.new; 4551 }); 4552 }, 4553 add_css: function add_css(ajax, response, status) { 4554 $('head').prepend(response.data); 4555 }, 4556 message: function message(ajax, response) { 4557 var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); 4558 if (response.clearPrevious) { 4559 messages.clear(); 4560 } 4561 messages.add(response.message, response.messageOptions); 4562 }, 4563 add_js: function add_js(ajax, response, status) { 4564 var parentEl = document.querySelector(response.selector || 'body'); 4565 var settings = ajax.settings || drupalSettings; 4566 var allUniqueBundleIds = response.data.map(function (script) { 4567 var uniqueBundleId = script.src + ajax.instanceIndex; 4568 loadjs(script.src, uniqueBundleId, { 4569 async: false, 4570 before: function before(path, scriptEl) { 4571 Object.keys(script).forEach(function (attributeKey) { 4572 scriptEl.setAttribute(attributeKey, script[attributeKey]); 4573 }); 4574 parentEl.appendChild(scriptEl); 4575 return false; 4576 } 4577 }); 4578 return uniqueBundleId; 4579 }); 4580 return new Promise(function (resolve, reject) { 4581 loadjs.ready(allUniqueBundleIds, { 4582 success: function success() { 4583 Drupal.attachBehaviors(parentEl, settings); 4584 resolve(); 4585 }, 4586 error: function error(depsNotFound) { 4587 var message = Drupal.t("The following files could not be loaded: @dependencies", { 4588 '@dependencies': depsNotFound.join(', ') 4589 }); 4590 reject(message); 4591 } 4592 }); 4593 }); 4594 } 4595 }; 4596 var stopEvent = function stopEvent(xhr, settings) { 4597 return xhr.getResponseHeader('X-Drupal-Ajax-Token') === '1' && settings.isInProgress && settings.isInProgress(); 4598 }; 4599 $.extend(true, $.event.special, { 4600 ajaxSuccess: { 4601 trigger: function trigger(event, xhr, settings) { 4602 if (stopEvent(xhr, settings)) { 4603 return false; 4604 } 4605 } 4606 }, 4607 ajaxComplete: { 4608 trigger: function trigger(event, xhr, settings) { 4609 if (stopEvent(xhr, settings)) { 4610 $.active++; 4611 return false; 4612 } 4613 } 4614 } 4615 }); 4616})(jQuery, window, Drupal, drupalSettings, loadjs, window.tabbable);; 4617/** 4618 * @file 4619 * Extends methods from core/misc/ajax.js. 4620 */ 4621 4622(function ($, window, Drupal, drupalSettings) { 4623 4624 /** 4625 * Attempts to find the closest glyphicon progress indicator. 4626 * 4627 * @param {jQuery|Element} element 4628 * A DOM element. 4629 * 4630 * @returns {jQuery} 4631 * A jQuery object. 4632 */ 4633 Drupal.Ajax.prototype.findGlyphicon = function (element) { 4634 return $(element).closest('.form-item').find('.ajax-progress.glyphicon') 4635 }; 4636 4637 /** 4638 * Starts the spinning of the glyphicon progress indicator. 4639 * 4640 * @param {jQuery|Element} element 4641 * A DOM element. 4642 * @param {string} [message] 4643 * An optional message to display (tooltip) for the progress. 4644 * 4645 * @returns {jQuery} 4646 * A jQuery object. 4647 */ 4648 Drupal.Ajax.prototype.glyphiconStart = function (element, message) { 4649 var $glyphicon = this.findGlyphicon(element); 4650 if ($glyphicon[0]) { 4651 $glyphicon.addClass('glyphicon-spin'); 4652 4653 // Add any message as a tooltip to the glyphicon. 4654 if ($.fn.tooltip && drupalSettings.bootstrap.tooltip_enabled) { 4655 $glyphicon 4656 .removeAttr('data-toggle') 4657 .removeAttr('data-original-title') 4658 .removeAttr('title') 4659 .tooltip('destroy') 4660 ; 4661 4662 if (message) { 4663 $glyphicon.attr('data-toggle', 'tooltip').attr('title', message).tooltip(); 4664 } 4665 } 4666 4667 // Append a message for screen readers. 4668 if (message) { 4669 $glyphicon.parent().append('<div class="sr-only message">' + message + '</div>'); 4670 } 4671 } 4672 return $glyphicon; 4673 }; 4674 4675 /** 4676 * Stop the spinning of a glyphicon progress indicator. 4677 * 4678 * @param {jQuery|Element} element 4679 * A DOM element. 4680 */ 4681 Drupal.Ajax.prototype.glyphiconStop = function (element) { 4682 var $glyphicon = this.findGlyphicon(element); 4683 if ($glyphicon[0]) { 4684 $glyphicon.removeClass('glyphicon-spin'); 4685 if ($.fn.tooltip && drupalSettings.bootstrap.tooltip_enabled) { 4686 $glyphicon 4687 .removeAttr('data-toggle') 4688 .removeAttr('data-original-title') 4689 .removeAttr('title') 4690 .tooltip('destroy') 4691 ; 4692 } 4693 } 4694 }; 4695 4696 /** 4697 * Sets the throbber progress indicator. 4698 */ 4699 Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { 4700 var $element = $(this.element); 4701 4702 // Find an existing glyphicon progress indicator. 4703 var $glyphicon = this.glyphiconStart($element, this.progress.message); 4704 if ($glyphicon[0]) { 4705 this.progress.element = $glyphicon.parent(); 4706 this.progress.glyphicon = true; 4707 return; 4708 } 4709 4710 // Otherwise, add a glyphicon throbber after the element. 4711 if (!this.progress.element) { 4712 this.progress.element = $(Drupal.theme('ajaxThrobber')); 4713 } 4714 if (this.progress.message) { 4715 this.progress.element.after('<div class="message">' + this.progress.message + '</div>'); 4716 } 4717 4718 // If element is an input DOM element type (not :input), append after. 4719 if ($element.is('input')) { 4720 $element.after(this.progress.element); 4721 } 4722 // Otherwise append the throbber inside the element. 4723 else { 4724 $element.append(this.progress.element); 4725 } 4726 }; 4727 4728 4729 /** 4730 * Handler for the form redirection completion. 4731 * 4732 * @param {Array.<Drupal.AjaxCommands~commandDefinition>} response 4733 * @param {number} status 4734 */ 4735 var success = Drupal.Ajax.prototype.success; 4736 Drupal.Ajax.prototype.success = function (response, status) { 4737 if (this.progress.element) { 4738 4739 // Stop a glyphicon throbber. 4740 if (this.progress.glyphicon) { 4741 this.glyphiconStop(this.progress.element); 4742 } 4743 // Remove the progress element. 4744 else { 4745 this.progress.element.remove(); 4746 } 4747 4748 // Remove any message set. 4749 this.progress.element.parent().find('.message').remove(); 4750 } 4751 4752 // Invoke the original success handler. 4753 return success.apply(this, [response, status]); 4754 }; 4755 4756})(jQuery, this, Drupal, drupalSettings); 4757; 4758/** 4759 * @file 4760 * JavaScript behaviors for webform scroll top. 4761 */ 4762 4763(function ($, Drupal) { 4764 4765 'use strict'; 4766 4767 Drupal.webform = Drupal.webform || {}; 4768 // Allow scrollTopOffset to be custom defined or based on whether there is a 4769 // floating toolbar. 4770 Drupal.webform.scrollTopOffset = Drupal.webform.scrollTopOffset || ($('#toolbar-administration').length ? 140 : 10); 4771 4772 /** 4773 * Scroll to top ajax command. 4774 * 4775 * @param {Element} element 4776 * The element to scroll to. 4777 * @param {string} target 4778 * Scroll to target. (form or page) 4779 */ 4780 Drupal.webformScrollTop = function (element, target) { 4781 if (!target) { 4782 return; 4783 } 4784 4785 var $element = $(element); 4786 4787 // Scroll to the top of the view. This will allow users 4788 // to browse newly loaded content after e.g. clicking a pager 4789 // link. 4790 var offset = $element.offset(); 4791 // We can't guarantee that the scrollable object should be 4792 // the body, as the view could be embedded in something 4793 // more complex such as a modal popup. Recurse up the DOM 4794 // and scroll the first element that has a non-zero top. 4795 var $scrollTarget = $element; 4796 while ($scrollTarget.scrollTop() === 0 && $($scrollTarget).parent()) { 4797 $scrollTarget = $scrollTarget.parent(); 4798 } 4799 4800 if (target === 'page' && $scrollTarget.length && $scrollTarget[0].tagName === 'HTML') { 4801 // Scroll to top when scroll target is the entire page. 4802 // @see https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport 4803 var rect = $($scrollTarget)[0].getBoundingClientRect(); 4804 if (!(rect.top >= 0 && rect.left >= 0 && rect.bottom <= $(window).height() && rect.right <= $(window).width())) { 4805 $scrollTarget.animate({scrollTop: 0}, 500); 4806 } 4807 } 4808 else { 4809 // Only scroll upward. 4810 if (offset.top - Drupal.webform.scrollTopOffset < $scrollTarget.scrollTop()) { 4811 $scrollTarget.animate({scrollTop: (offset.top - Drupal.webform.scrollTopOffset)}, 500); 4812 } 4813 } 4814 }; 4815 4816 /** 4817 * Scroll element into view. 4818 * 4819 * @param {jQuery} $element 4820 * An element. 4821 */ 4822 Drupal.webformScrolledIntoView = function ($element) { 4823 if (!Drupal.webformIsScrolledIntoView($element)) { 4824 $('html, body').animate({scrollTop: $element.offset().top - Drupal.webform.scrollTopOffset}, 500); 4825 } 4826 }; 4827 4828 /** 4829 * Determine if element is visible in the viewport. 4830 * 4831 * @param {Element} element 4832 * An element. 4833 * 4834 * @return {boolean} 4835 * TRUE if element is visible in the viewport. 4836 * 4837 * @see https://stackoverflow.com/questions/487073/check-if-element-is-visible-after-scrolling 4838 */ 4839 Drupal.webformIsScrolledIntoView = function (element) { 4840 var docViewTop = $(window).scrollTop(); 4841 var docViewBottom = docViewTop + $(window).height(); 4842 4843 var elemTop = $(element).offset().top; 4844 var elemBottom = elemTop + $(element).height(); 4845 4846 return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop)); 4847 }; 4848 4849})(jQuery, Drupal); 4850; 4851/** 4852 * @file 4853 * JavaScript behaviors for Ajax. 4854 */ 4855 4856(function ($, Drupal, drupalSettings) { 4857 4858 'use strict'; 4859 4860 Drupal.webform = Drupal.webform || {}; 4861 Drupal.webform.ajax = Drupal.webform.ajax || {}; 4862 // Allow scrollTopOffset to be custom defined or based on whether there is a 4863 // floating toolbar. 4864 Drupal.webform.ajax.scrollTopOffset = Drupal.webform.ajax.scrollTopOffset || ($('#toolbar-administration').length ? 140 : 10); 4865 4866 // Set global scroll top offset. 4867 // @todo Remove in Webform 6.x. 4868 Drupal.webform.scrollTopOffset = Drupal.webform.ajax.scrollTopOffset; 4869 4870 /** 4871 * Provide Webform Ajax link behavior. 4872 * 4873 * Display fullscreen progress indicator instead of throbber. 4874 * Copied from: Drupal.behaviors.AJAX 4875 * 4876 * @type {Drupal~behavior} 4877 * 4878 * @prop {Drupal~behaviorAttach} attach 4879 * Attaches the behavior to a.webform-ajax-link. 4880 */ 4881 Drupal.behaviors.webformAjaxLink = { 4882 attach: function (context) { 4883 $('.webform-ajax-link', context).once('webform-ajax-link').each(function () { 4884 var element_settings = {}; 4885 element_settings.progress = {type: 'fullscreen'}; 4886 4887 // For anchor tags, these will go to the target of the anch
4887or rather 4888 // than the usual location. 4889 var href = $(this).attr('href'); 4890 if (href) { 4891 element_settings.url = href; 4892 element_settings.event = 'click'; 4893 } 4894 element_settings.dialogType = $(this).data('dialog-type'); 4895 element_settings.dialogRenderer = $(this).data('dialog-renderer'); 4896 element_settings.dialog = $(this).data('dialog-options'); 4897 element_settings.base = $(this).attr('id'); 4898 element_settings.element = this; 4899 Drupal.ajax(element_settings); 4900 4901 // Close all open modal dialogs when opening off-canvas dialog. 4902 if (element_settings.dialogRenderer === 'off_canvas') { 4903 $(this).on('click', function () { 4904 $('.ui-dialog.webform-ui-dialog:visible').find('.ui-dialog-content').dialog('close'); 4905 }); 4906 } 4907 }); 4908 } 4909 }; 4910 4911 /** 4912 * Adds a hash (#) to current pages location for links and buttons 4913 * 4914 * @type {Drupal~behavior} 4915 * 4916 * @prop {Drupal~behaviorAttach} attach 4917 * Attaches the behavior to a[data-hash] or :button[data-hash]. 4918 * 4919 * @see \Drupal\webform_ui\WebformUiEntityElementsForm::getElementRow 4920 * @see Drupal.behaviors.webformFormTabs 4921 */ 4922 Drupal.behaviors.webformAjaxHash = { 4923 attach: function (context) { 4924 $('[data-hash]', context).once('webform-ajax-hash').each(function () { 4925 var hash = $(this).data('hash'); 4926 if (hash) { 4927 $(this).on('click', function () { 4928 location.hash = $(this).data('hash'); 4929 }); 4930 } 4931 }); 4932 } 4933 }; 4934 4935 /** 4936 * Provide Ajax callback for confirmation back to link. 4937 * 4938 * @type {Drupal~behavior} 4939 * 4940 * @prop {Drupal~behaviorAttach} attach 4941 * Attaches the behavior to confirmation back to link. 4942 */ 4943 Drupal.behaviors.webformConfirmationBackAjax = { 4944 attach: function (context) { 4945 $('.js-webform-confirmation-back-link-ajax', context) 4946 .once('webform-confirmation-back-ajax') 4947 .on('click', function (event) { 4948 var $form = $(this).parents('form'); 4949 4950 // Trigger the Ajax call back for the hidden submit button. 4951 // @see \Drupal\webform\WebformSubmissionForm::getCustomForm 4952 $form.find('.js-webform-confirmation-back-submit-ajax').trigger('click'); 4953 4954 // Move the progress indicator from the submit button to after this link. 4955 // @todo Figure out a better way to set a progress indicator. 4956 var $progress_indicator = $form.find('.ajax-progress'); 4957 if ($progress_indicator) { 4958 $(this).after($progress_indicator); 4959 } 4960 4961 // Cancel the click event. 4962 event.preventDefault(); 4963 event.stopPropagation(); 4964 }); 4965 } 4966 }; 4967 4968 /** ********************************************************************** **/ 4969 // Ajax commands. 4970 /** ********************************************************************** **/ 4971 4972 /** 4973 * Track the updated table row key. 4974 */ 4975 var updateKey; 4976 4977 /** 4978 * Track the add element key. 4979 */ 4980 var addElement; 4981 4982 /** 4983 * Command to insert new content into the DOM. 4984 * 4985 * @param {Drupal.Ajax} ajax 4986 * {@link Drupal.Ajax} object created by {@link Drupal.ajax}. 4987 * @param {object} response 4988 * The response from the Ajax request. 4989 * @param {string} response.data 4990 * The data to use with the jQuery method. 4991 * @param {string} [response.method] 4992 * The jQuery DOM manipulation method to be used. 4993 * @param {string} [response.selector] 4994 * A optional jQuery selector string. 4995 * @param {object} [response.settings] 4996 * An optional array of settings that will be used. 4997 * @param {number} [status] 4998 * The XMLHttpRequest status. 4999 */ 5000 Drupal.AjaxCommands.prototype.webformInsert = function (ajax, response, status) { 5001 // Insert the HTML. 5002 this.insert(ajax, response, status); 5003 5004 // Add element. 5005 if (addElement) { 5006 var addSelector = (addElement === '_root_') 5007 ? '#webform-ui-add-element' 5008 : '[data-drupal-selector="edit-webform-ui-elements-' + addElement + '-add"]'; 5009 $(addSelector).trigger('click'); 5010 } 5011 5012 // If not add element, then scroll to and highlight the updated table row. 5013 if (!addElement && updateKey) { 5014 var $element = $('tr[data-webform-key="' + updateKey + '"]'); 5015 5016 // Highlight the updated element's row. 5017 $element.addClass('color-success'); 5018 setTimeout(function () {$element.removeClass('color-success');}, 3000); 5019 5020 // Focus first tabbable item for the updated elements and handlers. 5021 $element.find(':tabbable:not(.tabledrag-handle)').eq(0).trigger('focus'); 5022 5023 // Scroll element into view. 5024 Drupal.webformScrolledIntoView($element); 5025 } 5026 else { 5027 // Focus main content. 5028 $('#main-content').trigger('focus'); 5029 } 5030 5031 // Display main page's status message in a floating container. 5032 var $wrapper = $(response.selector); 5033 if ($wrapper.parents('.ui-dialog').length === 0) { 5034 var $messages = $wrapper.find('.messages'); 5035 // If 'add element' don't show any messages. 5036 if (addElement) { 5037 $messages.remove(); 5038 } 5039 else if ($messages.length) { 5040 var $floatingMessage = $('#webform-ajax-messages'); 5041 if ($floatingMessage.length === 0) { 5042 $floatingMessage = $('<div id="webform-ajax-messages" class="webform-ajax-messages"></div>'); 5043 $('body').append($floatingMessage); 5044 } 5045 if ($floatingMessage.is(':animated')) { 5046 $floatingMessage.stop(true, true); 5047 } 5048 $floatingMessage.html($messages).show().delay(3000).fadeOut(1000); 5049 } 5050 } 5051 5052 updateKey = null; // Reset element update. 5053 addElement = null; // Reset add element. 5054 }; 5055 5056 /** 5057 * Scroll to top ajax command. 5058 * 5059 * @param {Drupal.Ajax} [ajax] 5060 * A {@link Drupal.ajax} object. 5061 * @param {object} response 5062 * Ajax response. 5063 * @param {string} response.selector 5064 * Selector to use. 5065 * 5066 * @see Drupal.AjaxCommands.prototype.viewScrollTop 5067 */ 5068 Drupal.AjaxCommands.prototype.webformScrollTop = function (ajax, response) { 5069 // Scroll top. 5070 Drupal.webformScrollTop(response.selector, response.target); 5071 5072 // Focus on the form wrapper content bookmark if 5073 // .js-webform-autofocus is not enabled. 5074 // @see \Drupal\webform\Form\WebformAjaxFormTrait::buildAjaxForm 5075 var $form = $(response.selector + '-content').find('form'); 5076 if (!$form.hasClass('js-webform-autofocus')) { 5077 $(response.selector + '-content').trigger('focus'); 5078 } 5079 }; 5080 5081 /** 5082 * Command to refresh the current webform page. 5083 * 5084 * @param {Drupal.Ajax} [ajax] 5085 * {@link Drupal.Ajax} object created by {@link Drupal.ajax}. 5086 * @param {object} response 5087 * The response from the Ajax request. 5088 * @param {string} response.url 5089 * The URL to redirect to. 5090 * @param {number} [status] 5091 * The XMLHttpRequest status. 5092 */ 5093 Drupal.AjaxCommands.prototype.webformRefresh = function (ajax, response, status) { 5094 // Get URL path name. 5095 // @see https://stackoverflow.com/questions/6944744/javascript-get-portion-of-url-path 5096 var a = document.createElement('a'); 5097 a.href = response.url; 5098 var forceReload = (response.url.match(/\?reload=([^&]+)($|&)/)) ? RegExp.$1 : null; 5099 if (forceReload) { 5100 response.url = response.url.replace(/\?reload=([^&]+)($|&)/, ''); 5101 this.redirect(ajax, response, status); 5102 return; 5103 } 5104 5105 if (a.pathname === window.location.pathname && $('.webform-ajax-refresh').length) { 5106 updateKey = (response.url.match(/[?|&]update=([^&]+)($|&)/)) ? RegExp.$1 : null; 5107 addElement = (response.url.match(/[?|&]add_element=([^&]+)($|&)/)) ? RegExp.$1 : null; 5108 $('.webform-ajax-refresh').trigger('click'); 5109 } 5110 else { 5111 // Clear unsaved information flag so that the current webform page 5112 // can be redirected. 5113 // @see Drupal.behaviors.webformUnsaved.clear 5114 if (Drupal.behaviors.webformUnsaved) { 5115 Drupal.behaviors.webformUnsaved.clear(); 5116 } 5117 5118 // For webform embedded in an iframe, open all redirects in the top 5119 // of the browser window. 5120 // @see \Drupal\webform_share\Controller\WebformShareController::page 5121 if (drupalSettings.webform_share && 5122 drupalSettings.webform_share.page) { 5123 window.top.location = response.url; 5124 } 5125 else { 5126 this.redirect(ajax, response, status); 5127 } 5128 } 5129 }; 5130 5131 /** 5132 * Command to close a off-canvas and modal dialog. 5133 * 5134 * If no selector is given, it defaults to trying to close the modal. 5135 * 5136 * @param {Drupal.Ajax} [ajax] 5137 * {@link Drupal.Ajax} object created by {@link Drupal.ajax}. 5138 * @param {object} response 5139 * The response from the Ajax request. 5140 * @param {string} response.selector 5141 * Selector to use. 5142 * @param {bool} response.persist 5143 * Whether to persist the dialog element or not. 5144 * @param {number} [status] 5145 * The HTTP status code. 5146 */ 5147 Drupal.AjaxCommands.prototype.webformCloseDialog = function (ajax, response, status) { 5148 if ($('#drupal-off-canvas').length) { 5149 // Close off-canvas system tray which is not triggered by close dialog 5150 // command. 5151 // @see Drupal.behaviors.offCanvasEvents 5152 $('#drupal-off-canvas').remove(); 5153 $('body').removeClass('js-tray-open'); 5154 // Remove all *.off-canvas events 5155 $(document).off('.off-canvas'); 5156 $(window).off('.off-canvas'); 5157 var edge = document.documentElement.dir === 'rtl' ? 'left' : 'right'; 5158 var $mainCanvasWrapper = $('[data-off-canvas-main-canvas]'); 5159 $mainCanvasWrapper.css('padding-' + edge, 0); 5160 5161 // Resize tabs when closing off-canvas system tray. 5162 $(window).trigger('resize.tabs'); 5163 } 5164 5165 // https://stackoverflow.com/questions/15763909/jquery-ui-dialog-check-if-exists-by-instance-method 5166 if ($(response.selector).hasClass('ui-dialog-content')) { 5167 this.closeDialog(ajax, response, status); 5168 } 5169 }; 5170 5171 /** 5172 * Triggers confirm page reload. 5173 * 5174 * @param {Drupal.Ajax} [ajax] 5175 * A {@link Drupal.ajax} object. 5176 * @param {object} response 5177 * Ajax response. 5178 * @param {string} response.message 5179 * A message to be displayed in the confirm dialog. 5180 */ 5181 Drupal.AjaxCommands.prototype.webformConfirmReload = function (ajax, response) { 5182 if (window.confirm(response.message)) { 5183 window.location.reload(true); 5184 } 5185 }; 5186 5187})(jQuery, Drupal, drupalSettings); 5188; 5189/** 5190 * @file 5191 * JavaScript behaviors for message element integration. 5192 */ 5193 5194(function ($, Drupal) { 5195 5196 'use strict'; 5197 5198 // Determine if local storage exists and is enabled. 5199 // This approach is copied from Modernizr. 5200 // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731 5201 var hasLocalStorage = (function () { 5202 try { 5203 localStorage.setItem('webform', 'webform'); 5204 localStorage.removeItem('webform'); 5205 return true; 5206 } 5207 catch (e) { 5208 return false;
5209 } 5210 }()); 5211 5212 // Determine if session storage exists and is enabled. 5213 // This approach is copied from Modernizr. 5214 // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731 5215 var hasSessionStorage = (function () { 5216 try { 5217 sessionStorage.setItem('webform', 'webform'); 5218 sessionStorage.removeItem('webform'); 5219 return true; 5220 } 5221 catch (e) { 5222 return false; 5223 } 5224 }()); 5225 5226 /** 5227 * Behavior for handler message close. 5228 * 5229 * @type {Drupal~behavior} 5230 */ 5231 Drupal.behaviors.webformMessageClose = { 5232 attach: function (context) { 5233 $(context).find('.js-webform-message--close').once('webform-message--close').each(function () { 5234 var $element = $(this); 5235 5236 var id = $element.attr('data-message-id'); 5237 var storage = $element.attr('data-message-storage'); 5238 var effect = $element.attr('data-message-close-effect') || 'hide'; 5239 switch (effect) { 5240 case 'slide': effect = 'slideUp'; break; 5241 5242 case 'fade': effect = 'fadeOut'; break; 5243 } 5244 5245 // Check storage status. 5246 if (isClosed($element, storage, id)) { 5247 return; 5248 } 5249 5250 // Only show element if it's style is not set to 'display: none' 5251 // and it is not hidden via .js-webform-states-hidden. 5252 if ($element.attr('style') !== 'display: none;' && !$element.hasClass('js-webform-states-hidden')) { 5253 $element.show(); 5254 } 5255 5256 $element.find('.js-webform-message__link').on('click', function (event) { 5257 $element[effect](); 5258 setClosed($element, storage, id); 5259 $element.trigger('close'); 5260 event.preventDefault(); 5261 }); 5262 }); 5263 } 5264 }; 5265 5266 function isClosed($element, storage, id) { 5267 if (!id || !storage) { 5268 return false; 5269 } 5270 5271 switch (storage) { 5272 case 'local': 5273 if (hasLocalStorage) { 5274 return localStorage.getItem('Drupal.webform.message.' + id) || false; 5275 } 5276 return false; 5277 5278 case 'session': 5279 if (hasSessionStorage) { 5280 return sessionStorage.getItem('Drupal.webform.message.' + id) || false; 5281 } 5282 return false; 5283 5284 default: 5285 return false; 5286 } 5287 } 5288 5289 function setClosed($element, storage, id) { 5290 if (!id || !storage) { 5291 return; 5292 } 5293 5294 switch (storage) { 5295 case 'local': 5296 if (hasLocalStorage) { 5297 localStorage.setItem('Drupal.webform.message.' + id, true); 5298 } 5299 break; 5300 5301 case 'session': 5302 if (hasSessionStorage) { 5303 sessionStorage.setItem('Drupal.webform.message.' + id, true); 5304 } 5305 break; 5306 5307 case 'user': 5308 case 'state': 5309 case 'custom': 5310 $.get($element.find('.js-webform-message__link').attr('href')); 5311 return true; 5312 } 5313 } 5314 5315})(jQuery, Drupal); 5316; 5317/*! 5318 * jQuery Form Plugin 5319 * version: 4.3.0 5320 * Requires jQuery v1.7.2 or later 5321 * Project repository: https://github.com/jquery-form/form 5322 5323 * Copyright 2017 Kevin Morris 5324 * Copyright 2006 M. Alsup 5325 5326 * Dual licensed under the LGPL-2.1+ or MIT licenses 5327 * https://github.com/jquery-form/form#license 5328 5329 * This library is free software; you can redistribute it and/or 5330 * modify it under the terms of the GNU Lesser General Public 5331 * License as published by the Free Software Foundation; either 5332 * version 2.1 of the License, or (at your option) any later version. 5333 * This library is distributed in the hope that it will be useful, 5334 * but WITHOUT ANY WARRANTY; without even the implied warranty of 5335 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5336 * Lesser General Public License for more details. 5337 */ 5338!function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t),t}:r(jQuery)}(function(q){"use strict";var m=/\r?\n/g,S={};S.fileapi=void 0!==q('<input type="file">').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: ski
5338pping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0<arguments.length?(M={url:M,data:e,dataType:t},"function"==typeof r&&(M.success=r)):void 0===M&&(M={}),O=M.method||M.type||this.attr2("method"),n=(n=(n="string"==typeof(a=M.url||this.attr2("action"))?q.trim(a):"")||window.location.href||"")&&(n.match(/^([^#]+)/)||[])[1],o=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",M=q.extend(!0,{url:n,success:q.ajaxSettings.success,type:O||q.ajaxSettings.type,iframeSrc:o},M);var i={};if(this.trigger("form-pre-serialize",[this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(M.beforeSerialize&&!1===M.beforeSerialize(this,M))return N("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var s=M.traditional;void 0===s&&(s=q.ajaxSettings.traditional);var u,c,C=[],l=this.formToArray(M.semantic,C,M.filtering);if(M.data&&(c=q.isFunction(M.data)?M.data(l):M.data,M.extraData=c,u=q.param(c,s)),M.beforeSubmit&&!1===M.beforeSubmit(l,this,M))return N("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[l,this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var f=q.param(l,s);u&&(f=f?f+"&"+u:u),"GET"===M.type.toUpperCase()?(M.url+=(0<=M.url.indexOf("?")?"&":"?")+f,M.data=null):M.data=f;var d,m,p,h=[];M.resetForm&&h.push(function(){X.resetForm()}),M.clearForm&&h.push(function(){X.clearForm(M.includeHidden)}),!M.dataType&&M.target?(d=M.success||function(){},h.push(function(e,t,r){var a=arguments,n=M.replaceTarget?"replaceWith":"html";q(M.target)[n](e).each(function(){d.apply(this,a)})})):M.success&&(q.isArray(M.success)?q.merge(h,M.success):h.push(M.success)),M.success=function(e,t,r){for(var a=M.context||this,n=0,o=h.length;n<o;n++)h[n].apply(a,[e,t,r||X,X])},M.error&&(m=M.error,M.error=function(e,t,r){var a=M.context||this;m.apply(a,[e,t,r,X])}),M.complete&&(p=M.complete,M.complete=function(e,t){var r=M.context||this;p.apply(r,[e,t,X])});var v=0<q("input[type=file]:enabled",this).filter(function(){return""!==q(this).val()}).length,g="multipart/form-data",x=X.attr("enctype")===g||X.attr("encoding")===g,y=S.fileapi&&S.formdata;N("fileAPI :"+y);var b,T=(v||x)&&!y;!1!==M.iframe&&(M.iframe||T)?M.closeKeepAlive?q.get(M.closeKeepAlive,function(){b=w(l)}):b=w(l):b=(v||x)&&y?function(e){for(var r=new FormData,t=0;t<e.length;t++)r.append(e[t].name,e[t].value);if(M.extraData){var a=function(e){var t,r,a=q.param(e,M.traditional).split("&"),n=a.length,o=[];for(t=0;t<n;t++)a[t]=a[t].replace(/\+/g," "),r=a[t].split("="),o.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return o}(M.extraData);for(t=0;t<a.length;t++)a[t]&&r.append(a[t][0],a[t][1])}M.data=null;var n=q.extend(!0,{},q.ajaxSettings,M,{contentType:!1,processData:!1,cache:!1,type:O||"POST"});M.uploadProgress&&(n.xhr=function(){var e=q.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,a=e.total;e.lengthComputable&&(t=Math.ceil(r/a*100)),M.uploadProgress(e,r,a,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){M.formData?t.data=M.formData:t.data=r,o&&o.call(this,e,t)},q.ajax(n)}(l):q.ajax(M),X.removeData("jqxhr").data("jqxhr",b);for(var j=0;j<C.length;j++)C[j]=null;return this.trigger("form-submit-notify",[this,M]),this;function w(e){var t,r,l,f,o,d,m,p,a,n,h,v,i=X[0],g=q.Deferred();if(g.abort=function(e){p.abort(e)},e)for(r=0;r<C.length;r++)t=q(C[r]),_?t.prop("disabled",!1):t.removeAttr("disabled");(l=q.extend(!0,{},q.ajaxSettings,M)).context=l.context||l,o="jqFormIO"+(new Date).getTime();var s=i.ownerDocument,u=X.closest("body");if(l.iframeTarget?(n=(d=q(l.iframeTarget,s)).attr2("name"))?o=n:d.attr2("name",o):(d=q('<iframe name="'+o+'" src="'+l.iframeSrc+'" />',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.c
vendor: 9,900 bytes, line 5338
5338all(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('<input type="hidden" name="'+l.extraData[n].name+'">',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('<input type="hidden" name="'+n+'">',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0<arguments.length)&&(e={url:e,data:t,dataType:r},"function"==typeof a&&(e.success=a)),(e=e||{}).delegation=e.delegation&&q.isFunction(q.fn.on),e.delegation||0!==this.length)return e.delegation?(q(document).off("submit.form-plugin",this.selector,o).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,o).on("click.form-plugin",this.selector,e,i),this):(e.beforeFormUnbind&&e.beforeFormUnbind(this,e),this.ajaxFormUnbind().on("submit.form-plugin",e,o).on("click.form-plugin",e,i));var n={s:this.selector,c:this.context};return!q.isReady&&n.s?(N("DOM not ready, queuing ajaxForm"),q(function(){q(n.s,n.c).ajaxForm(e)})):N("terminating; zero elements found by selector"+(q.isReady?"":" (DOM not ready)")),this},q.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},q.fn.formToArray=function(e,t,r){var a=[];if(0===this.length)return a;var n,o,i,s,u,c,l,f,d,m,p=this[0],h=this.attr("id"),v=(v=e||void 0===p.elements?p.getElementsByTagName("*"):p.elements)&&q.makeArray(v);if(h&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(n=q(':input[form="'+h+'"]').get()).length&&(v=(v||[]).concat(n)),!v||!v.length)return a;for(q.isFunction(r)&&(v=q.map(v,r)),o=0,c=v.length;o<c;o++)if((m=(u=v[o]).name)&&!u.disabled)if(e&&p.clk&&"image"===u.type)p.clk===u&&(a.push({name:m,value:q(u).val(),type:u.type}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y}));else if((s=q.fieldValue(u,!0))&&s.constructor===Array)for(t&&t.push(u),i=0,l=s.length;i<l;i++)a.push({name:m,value:s[i]});else if(S.fileapi&&"file"===u.type){t&&t.push(u);var g=u.files;if(g.length)for(i=0;i<g.length;i++)a.push({name:m,value:g[i],type:u.type});else a.push({name:m,value:"",type:u.type})}else null!=s&&(t&&t.push(u),a.push({name:m,value:s,type:u.type,required:u.required}));return e||!p.clk||(m=(d=(f=q(p.clk))[0]).name)&&!d.disabled&&"image"===d.type&&(a.push({name:m,value:f.val()}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y})),a},q.fn.formSerialize=function(e){return q.param(this.formToArray(e))},q.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=q.fieldValue(this,n);if(t&&t.constructor===Array)for(var r=0,a=t.length;r<a;r++)o.push({name:e,value:t[r]});else null!=t&&o.push({name:this.name,value:t})}}),q.param(o)},q.fn.fieldValue=function(e){for(var t=[],r=0,a=this.length;r<a;r++){var n=this[r],o=q.fieldValue(n,e);null==o||o.constructor===Array&&!o.length||(o.constructor===Array?q.merge(t,o):t.push(o))}return t},q.fieldValue=function(e,t){var r=e.name,a=e.type,n=e.tagName.toLowerCase();if(void 0===t&&(t=!0),t&&(!r||e.disabled||"reset"===a||"button"===a||("checkbox"===a||"radio"===a)&&!e.checked||("submit"===a||"image"===a)&&e.form&&e.form.clk!==e||"select"===n&&-1===e.selectedIndex))return null;if("select"!==n)return q(e).val().replace(m,"\r\n");var o=e.selectedIndex;if(o<0)return null;for(var i=[],s=e.options,u="select-one"===a,c=u?o+1:s.length,l=u?o:0;l<c;l++){var f=s[l];if(f.selected&&!f.disabled){var d=(d=f.value)||(f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value);if(u)return d;i.push(d)}}return i},q.fn.clearForm=function(e){return this.each(function(){q("input,select,textarea",this).clearFields(e)})},q.fn.clearFields=q.fn.clearInputs=function(r){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();a.test(e)||"textarea"===t?this.value="":"checkbox"===e||"radio"===e?this.checked=!1:"select"===t?this.selectedIndex=-1:"file"===e?/MSIE/.test(navigator.userAgent)?q(this).replaceWith(q(this).clone(!0)):q(this).val(""):r&&(!0===r&&/hidden/.test(e)||"string"==typeof r&&q(this).is(r))&&(this.value="")})},q.fn.resetForm=function(){return this.each(function(){var t=q(this),e=this.tagName.toLowerCase();switch(e){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var r=t.parents("select");return r.length&&r[0].multiple?"option"===e?this.selected=this.defaultSelected:t.find("option").resetForm():r.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var a=q(t.attr("for")),n=t.find("input,select,textarea");return a[0]&&n.unshift(a[0]),n.resetForm(),!0;case"form":return"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},q.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},q.fn.selected=function(r){return void 0===r&&(r=!0),this.each(function(){var e,t=this.t
5338ype;"checkbox"===t||"radio"===t?this.checked=r:"option"===this.tagName.toLowerCase()&&(e=q(this).parent("select"),r&&e[0]&&"select-one"===e[0].type&&e.find("option").selected(!1),this.selected=r)})},q.fn.ajaxSubmit.debug=!1}); 5339 5340; 5341/** 5342 * @file 5343 * JavaScript behaviors for checkboxes. 5344 */ 5345 5346(function ($, Drupal) { 5347 5348 'use strict'; 5349 5350 /** 5351 * Adds check all or none checkboxes support. 5352 * 5353 * @type {Drupal~behavior} 5354 * 5355 * @see https://www.drupal.org/project/webform/issues/3068998 5356 */ 5357 Drupal.behaviors.webformCheckboxesAllorNone = { 5358 attach: function (context) { 5359 $('[data-options-all], [data-options-none]', context) 5360 .once('webform-checkboxes-all-or-none') 5361 .each(function () { 5362 var $element = $(this); 5363 5364 var options_all_value = $element.data('options-all'); 5365 var options_none_value = $element.data('options-none'); 5366 5367 // Get all checkboxes. 5368 var $checkboxes = $element.find('input[type="checkbox"]'); 5369 5370 // Get all options/checkboxes. 5371 var $options = $checkboxes 5372 .not('[value="' + options_all_value + '"]') 5373 .not('[value="' + options_none_value + '"]'); 5374 5375 // Get options all and none checkboxes. 5376 var $options_all = $element 5377 .find(':checkbox[value="' + options_all_value + '"]'); 5378 var $options_none = $element 5379 .find(':checkbox[value="' + options_none_value + '"]'); 5380 5381 // All of the above. 5382 if ($options_all.length) { 5383 $options_all.on('click', toggleCheckAllEventHandler); 5384 if ($options_all.prop('checked')) { 5385 toggleCheckAllEventHandler(); 5386 } 5387 } 5388 5389 // None of the above. 5390 if ($options_none.length) { 5391 $options_none.on('click', toggleCheckNoneEventHandler); 5392 toggleCheckNoneEventHandler(); 5393 } 5394 5395 $options.on('click', toggleCheckboxesEventHandler); 5396 toggleCheckboxesEventHandler(); 5397 5398 /** 5399 * Toggle check all checkbox checked state. 5400 */ 5401 function toggleCheckAllEventHandler() { 5402 if ($options_all.prop('checked')) { 5403 // Uncheck options none. 5404 if ($options_none.is(':checked')) { 5405 $options_none 5406 .prop('checked', false) 5407 .trigger('change', ['webform.states']); 5408 } 5409 // Check check all unchecked options. 5410 $options.not(':checked') 5411 .prop('checked', true) 5412 .trigger('change', ['webform.states']); 5413 } 5414 else { 5415 // Check uncheck all checked options. 5416 $options.filter(':checked') 5417 .prop('checked', false) 5418 .trigger('change', ['webform.states']); 5419 } 5420 } 5421 5422 /** 5423 * Toggle check none checkbox checked state. 5424 */ 5425 function toggleCheckNoneEventHandler() { 5426 if ($options_none.prop('checked')) { 5427 $checkboxes 5428 .not('[value="' + options_none_value + '"]') 5429 .filter(':checked') 5430 .prop('checked', false) 5431 .trigger('change', ['webform.states']); 5432 } 5433 } 5434 5435 /** 5436 * Toggle check all checkbox checked state. 5437 */ 5438 function toggleCheckboxesEventHandler() { 5439 var isAllChecked = ($options.filter(':checked').length === $options.length); 5440 if ($options_all.length 5441 && $options_all.prop('checked') !== isAllChecked) { 5442 $options_all 5443 .prop('checked', isAllChecked) 5444 .trigger('change', ['webform.states']); 5445 } 5446 var isOneChecked = $options.is(':checked'); 5447 if ($options_none.length 5448 && isOneChecked) { 5449 $options_none 5450 .prop('checked', false) 5451 .trigger('change', ['webform.states']); 5452 } 5453 } 5454 }); 5455 } 5456 }; 5457 5458})(jQuery, Drupal); 5459; 5460/** 5461 * @file 5462 * JavaScript behaviors for options elements. 5463 */ 5464 5465(function ($, Drupal) { 5466 5467 'use strict'; 5468 5469 /** 5470 * Attach handlers to options buttons element. 5471 * 5472 * @type {Drupal~behavior} 5473 */ 5474 Drupal.behaviors.webformOptionsButtons = { 5475 attach: function (context) { 5476 // Place <input> inside of <label> before the label. 5477 $(context).find('label.webform-options-display-buttons-label > input[type="checkbox"], label.webform-options-display-buttons-label > input[type="radio"]').each(function () { 5478 var $input = $(this); 5479 var $label = $input.parent(); 5480 $input.detach().insertBefore($label); 5481 }); 5482 } 5483 }; 5484 5485})(jQuery, Drupal); 5486;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.