vendor: 17,050 bytes, lines 1-22
1/*! 2 * jQuery Form Plugin 3 * version: 4.3.0 4 * Requires jQuery v1.7.2 or later 5 * Project repository: https://github.com/jquery-form/form 6 7 * Copyright 2017 Kevin Morris 8 * Copyright 2006 M. Alsup 9 10 * Dual licensed under the LGPL-2.1+ or MIT licenses 11 * https://github.com/jquery-form/form#license 12 13 * This library is free software; you can redistribute it and/or 14 * modify it under the terms of the GNU Lesser General Public 15 * License as published by the Free Software Foundation; either 16 * version 2.1 of the License, or (at your option) any later version. 17 * This library is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * Lesser General Public License for more details. 21 */ 22!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: skipping 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.call(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.type;"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});
23 24; 25/** 26* DO NOT EDIT THIS FILE. 27* See the following change record for more information, 28* https://www.drupal.org/node/2815083 29* @preserve 30**/ 31(function ($, Drupal) { 32 Drupal.theme.progressBar = function (id) { 33 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>'; 34 }; 35 Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) { 36 this.id = id; 37 this.method = method || 'GET'; 38 this.updateCallback = updateCallback; 39 this.errorCallback = errorCallback; 40 this.element = $(Drupal.theme('progressBar', id)); 41 }; 42 $.extend(Drupal.ProgressBar.prototype, { 43 setProgress: function setProgress(percentage, message, label) { 44 if (percentage >= 0 && percentage <= 100) { 45 $(this.element).find('div.progress__bar').css('width', "".concat(percentage, "%")); 46 $(this.element).find('div.progress__percentage').html("".concat(percentage, "%")); 47 } 48 $('div.progress__description', this.element).html(message); 49 $('div.progress__label', this.element).html(label); 50 if (this.updateCallback) { 51 this.updateCallback(percentage, message, this); 52 } 53 }, 54 startMonitoring: function startMonitoring(uri, delay) { 55 this.delay = delay; 56 this.uri = uri; 57 this.sendPing(); 58 }, 59 stopMonitoring: function stopMonitoring() { 60 clearTimeout(this.timer); 61 this.uri = null; 62 }, 63 sendPing: function sendPing() { 64 if (this.timer) { 65 clearTimeout(this.timer); 66 } 67 if (this.uri) { 68 var pb = this; 69 var uri = this.uri; 70 if (uri.indexOf('?') === -1) { 71 uri += '?'; 72 } else { 73 uri += '&'; 74 } 75 uri += '_format=json'; 76 $.ajax({ 77 type: this.method, 78 url: uri, 79 data: '', 80 dataType: 'json', 81 success: function success(progress) { 82 if (progress.status === 0) { 83 pb.displayError(progress.data); 84 return; 85 } 86 pb.setProgress(progress.percentage, progress.message, progress.label); 87 pb.timer = setTimeout(function () { 88 pb.sendPing(); 89 }, pb.delay); 90 }, 91 error: function error(xmlhttp) { 92 var e = new Drupal.AjaxError(xmlhttp, pb.uri); 93 pb.displayError("<pre>".concat(e.message, "</pre>")); 94 } 95 }); 96 } 97 }, 98 displayError: function displayError(string) { 99 var error = $('<div class="messages messages--error"></div>').html(string); 100 $(this.element).before(error).hide(); 101 if (this.errorCallback) { 102 this.errorCallback(this); 103 } 104 } 105 }); 106})(jQuery, Drupal);; 107loadjs=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;
107for(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}();; 108/** 109* DO NOT EDIT THIS FILE. 110* See the following change record for more information, 111* https://www.drupal.org/node/2815083 112* @preserve 113**/ 114(function (Drupal) { 115 Drupal.behaviors.responsiveImageAJAX = { 116 attach: function attach() { 117 if (window.picturefill) { 118 window.picturefill(); 119 } 120 } 121 }; 122})(Drupal);; 123/** 124* DO NOT EDIT THIS FILE. 125* See the following change record for more information, 126* https://www.drupal.org/node/2815083 127* @preserve 128**/ 129function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 130function _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."); } 131function _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); } 132function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 133function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 134function _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; } 135(function ($, window, Drupal, drupalSettings, loadjs, _ref) { 136 var isFocusable = _ref.isFocusable, 137 tabbable = _ref.tabbable; 138 Drupal.behaviors.AJAX = { 139 attach: function attach(context, settings) { 140 function loadAjaxBehavior(base) { 141 var elementSettings = settings.ajax[base]; 142 if (typeof elementSettings.selector === 'undefined') { 143 elementSettings.selector = "#".concat(base); 144 } 145 once('drupal-ajax', $(elementSettings.selector)).forEach(function (el) { 146 elementSettings.element = el; 147 elementSettings.base = base; 148 Drupal.ajax(elementSettings); 149 }); 150 } 151 Object.keys(settings.ajax || {}).forEach(function (base) { 152 return loadAjaxBehavior(base); 153 }); 154 Drupal.ajax.bindAjaxLinks(document.body); 155 once('ajax', '.use-ajax-submit').forEach(function (el) { 156 var elementSettings = {}; 157 elementSettings.url = $(el.form).attr('action'); 158 elementSettings.setClick = true; 159 elementSettings.event = 'click'; 160 elementSettings.progress = { 161 type: 'throbber' 162 }; 163 elementSettings.base = el.id; 164 elementSettings.element = el; 165 Drupal.ajax(elementSettings); 166 }); 167 }, 168 detach: function detach(context, settings, trigger) { 169 if (trigger === 'unload') { 170 Drupal.ajax.expired().forEach(function (instance) { 171 Drupal.ajax.instances[instance.instanceIndex] = null; 172 }); 173 } 174 } 175 }; 176 Drupal.AjaxError = function (xmlhttp, uri, customMessage) { 177 var statusCode; 178 var statusText; 179 var responseText; 180 if (xmlhttp.status) { 181 statusCode = "\n".concat(Drupal.t('An AJAX HTTP error occurred.'), "\n").concat(Drupal.t('HTTP Result Code: !status', { 182 '!status': xmlhttp.status 183 })); 184 } else { 185 statusCode = "\n".concat(Drupal.t('An AJAX HTTP request terminated abnormally.')); 186 } 187 statusCode += "\n".concat(Drupal.t('Debugging information follows.')); 188 var pathText = "\n".concat(Drupal.t('Path: !uri', { 189 '!uri': uri 190 })); 191 statusText = ''; 192 try { 193 statusText = "\n".concat(Drupal.t('StatusText: !statusText', { 194 '!statusText': xmlhttp.statusText.trim() 195 })); 196 } catch (e) {} 197 responseText = ''; 198 try { 199 responseText = "\n".concat(Drupal.t('ResponseText: !responseText', { 200 '!responseText': xmlhttp.responseText.trim() 201 })); 202 } catch (e) {} 203 responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, ''); 204 responseText = responseText.replace(/[\n]+\s+/g, '\n'); 205 var readyStateText = xmlhttp.status === 0 ? "\n".concat(Drupal.t('ReadyState: !readyState', { 206 '!readyState': xmlhttp.readyState 207 })) : ''; 208 customMessage = customMessage ? "\n".concat(Drupal.t('CustomMessage: !customMessage', { 209 '!customMessage': customMessage 210 })) : ''; 211 this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText; 212 this.name = 'AjaxError'; 213 }; 214 Drupal.AjaxError.prototype = new Error(); 215 Drupal.AjaxError.prototype.constructor = Drupal.AjaxError; 216 Drupal.ajax = function (settings) { 217 if (arguments.length !== 1) { 218 throw new Error('Drupal.ajax() function must be called with one configuration object only'); 219 } 220 var base = settings.base || false; 221 var element = settings.element || false; 222 delete settings.base; 223 delete settings.element; 224 if (!settings.progress && !element) { 225 settings.progress = false;
226 } 227 var ajax = new Drupal.Ajax(base, element, settings); 228 ajax.instanceIndex = Drupal.ajax.instances.length; 229 Drupal.ajax.instances.push(ajax); 230 return ajax; 231 }; 232 Drupal.ajax.instances = []; 233 Drupal.ajax.expired = function () { 234 return Drupal.ajax.instances.filter(function (instance) { 235 return instance && instance.element !== false && !document.body.contains(instance.element); 236 }); 237 }; 238 Drupal.ajax.bindAjaxLinks = function (element) { 239 once('ajax', '.use-ajax', element).forEach(function (ajaxLink) { 240 var $linkElement = $(ajaxLink); 241 var elementSettings = { 242 progress: { 243 type: 'throbber' 244 }, 245 dialogType: $linkElement.data('dialog-type'), 246 dialog: $linkElement.data('dialog-options'), 247 dialogRenderer: $linkElement.data('dialog-renderer'), 248 base: $linkElement.attr('id'), 249 element: ajaxLink 250 }; 251 var href = $linkElement.attr('href'); 252 if (href) { 253 elementSettings.url = href; 254 elementSettings.event = 'click'; 255 } 256 Drupal.ajax(elementSettings); 257 }); 258 }; 259 Drupal.Ajax = function (base, element, elementSettings) { 260 var defaults = { 261 event: element ? 'mousedown' : null, 262 keypress: true, 263 selector: base ? "#".concat(base) : null, 264 effect: 'none', 265 speed: 'none', 266 method: 'replaceWith', 267 progress: { 268 type: 'throbber', 269 message: Drupal.t('Please wait...') 270 }, 271 submit: { 272 js: true 273 } 274 }; 275 $.extend(this, defaults, elementSettings); 276 this.commands = new Drupal.AjaxCommands(); 277 this.instanceIndex = false; 278 if (this.wrapper) { 279 this.wrapper = "#".concat(this.wrapper); 280 } 281 this.element = element; 282 this.element_settings = elementSettings; 283 this.elementSettings = elementSettings; 284 if (this.element && this.element.form) { 285 this.$form = $(this.element.form); 286 } 287 if (!this.url) { 288 var $element = $(this.element); 289 if ($element.is('a')) { 290 this.url = $element.attr('href'); 291 } else if (this.element && element.form) { 292 this.url = this.$form.attr('action'); 293 } 294 } 295 var originalUrl = this.url; 296 this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1'); 297 if (drupalSettings.ajaxTrustedUrl[originalUrl]) { 298 drupalSettings.ajaxTrustedUrl[this.url] = true; 299 } 300 var ajax = this; 301 ajax.options = { 302 url: ajax.url, 303 data: ajax.submit, 304 isInProgress: function isInProgress() { 305 return ajax.ajaxing; 306 }, 307 beforeSerialize: function beforeSerialize(elementSettings, options) { 308 return ajax.beforeSerialize(elementSettings, options); 309 }, 310 beforeSubmit: function beforeSubmit(formValues, elementSettings, options) { 311 ajax.ajaxing = true; 312 return ajax.beforeSubmit(formValues, elementSettings, options); 313 }, 314 beforeSend: function beforeSend(xmlhttprequest, options) { 315 ajax.ajaxing = true; 316 return ajax.beforeSend(xmlhttprequest, options); 317 }, 318 success: function success(response, status, xmlhttprequest) { 319 var _this = this; 320 if (typeof response === 'string') { 321 response = $.parseJSON(response); 322 } 323 if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) { 324 if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { 325 var customMessage = Drupal.t('The response failed verification so will not be processed.'); 326 return ajax.error(xmlhttprequest, ajax.url, customMessage); 327 } 328 } 329 return Promise.resolve(ajax.success(response, status)).then(function () { 330 ajax.ajaxing = false; 331 $(document).trigger('ajaxSuccess', [xmlhttprequest, _this]); 332 $(document).trigger('ajaxComplete', [xmlhttprequest, _this]); 333 if (--$.active === 0) { 334 $(document).trigger('ajaxStop'); 335 } 336 }); 337 }, 338 error: function error(xmlhttprequest, status, _error) { 339 ajax.ajaxing = false; 340 }, 341 complete: function complete(xmlhttprequest, status) { 342 if (status === 'error' || status === 'parsererror') { 343 return ajax.error(xmlhttprequest, ajax.url); 344 } 345 }, 346 dataType: 'json', 347 jsonp: false, 348 type: 'POST' 349 }; 350 if (elementSettings.dialog) { 351 ajax.options.data.dialogOptions = elementSettings.dialog; 352 } 353 if (ajax.options.url.indexOf('?') === -1) { 354 ajax.options.url += '?'; 355 } else { 356 ajax.options.url += '&'; 357 } 358 var wrapper = "drupal_".concat(elementSettings.dialogType || 'ajax'); 359 if (elementSettings.dialogRenderer) { 360 wrapper += ".".concat(elementSettings.dialogRenderer); 361 } 362 ajax.options.url += "".concat(Drupal.ajax.WRAPPER_FORMAT, "=").concat(wrapper); 363 $(ajax.element).on(elementSettings.event, function (event) { 364 if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) { 365 throw new Error(Drupal.t('The callback URL is not local and n
365ot trusted: !url', { 366 '!url': ajax.url 367 })); 368 } 369 return ajax.eventResponse(this, event); 370 }); 371 if (elementSettings.keypress) { 372 $(ajax.element).on('keypress', function (event) { 373 return ajax.keypressResponse(this, event); 374 }); 375 } 376 if (elementSettings.prevent) { 377 $(ajax.element).on(elementSettings.prevent, false); 378 } 379 }; 380 Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format'; 381 Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax'; 382 Drupal.Ajax.prototype.execute = function () { 383 if (this.ajaxing) { 384 return; 385 } 386 try { 387 this.beforeSerialize(this.element, this.options); 388 return $.ajax(this.options); 389 } catch (e) { 390 this.ajaxing = false; 391 window.alert("An error occurred while attempting to process ".concat(this.options.url, ": ").concat(e.message)); 392 return $.Deferred().reject(); 393 } 394 }; 395 Drupal.Ajax.prototype.keypressResponse = function (element, event) { 396 var ajax = this; 397 if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') { 398 event.preventDefault(); 399 event.stopPropagation(); 400 $(element).trigger(ajax.elementSettings.event); 401 } 402 }; 403 Drupal.Ajax.prototype.eventResponse = function (element, event) { 404 event.preventDefault(); 405 event.stopPropagation(); 406 var ajax = this; 407 if (ajax.ajaxing) { 408 return; 409 } 410 try { 411 if (ajax.$form) { 412 if (ajax.setClick) { 413 element.form.clk = element; 414 } 415 ajax.$form.ajaxSubmit(ajax.options); 416 } else { 417 ajax.beforeSerialize(ajax.element, ajax.options); 418 $.ajax(ajax.options); 419 } 420 } catch (e) { 421 ajax.ajaxing = false; 422 window.alert("An error occurred while attempting to process ".concat(ajax.options.url, ": ").concat(e.message)); 423 } 424 }; 425 Drupal.Ajax.prototype.beforeSerialize = function (element, options) { 426 if (this.$form && document.body.contains(this.$form.get(0))) { 427 var settings = this.settings || drupalSettings; 428 Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize'); 429 } 430 options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1; 431 var pageState = drupalSettings.ajaxPageState; 432 options.data['ajax_page_state[theme]'] = pageState.theme; 433 options.data['ajax_page_state[theme_token]'] = pageState.theme_token; 434 options.data['ajax_page_state[libraries]'] = pageState.libraries; 435 }; 436 Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {}; 437 Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) { 438 if (this.$form) { 439 options.extraData = options.extraData || {}; 440 options.extraData.ajax_iframe_upload = '1'; 441 var v = $.fieldValue(this.element); 442 if (v !== null) { 443 options.extraData[this.element.name] = v; 444 } 445 } 446 $(this.element).prop('disabled', true); 447 if (!this.progress || !this.progress.type) { 448 return; 449 } 450 var progressIndicatorMethod = "setProgressIndicator".concat(this.progress.type.slice(0, 1).toUpperCase()).concat(this.progress.type.slice(1).toLowerCase()); 451 if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') { 452 this[progressIndicatorMethod].call(this); 453 } 454 }; 455 Drupal.theme.ajaxProgressThrobber = function (message) { 456 var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : ''; 457 var throbber = '<div class="throbber"> </div>'; 458 return "<div class=\"ajax-progress ajax-progress-throbber\">".concat(throbber).concat(messageMarkup, "</div>"); 459 }; 460 Drupal.theme.ajaxProgressIndicatorFullscreen = function () { 461 return '<div class="ajax-progress ajax-progress-fullscreen"> </div>'; 462 }; 463 Drupal.theme.ajaxProgressMessage = function (message) { 464 return "<div class=\"message\">".concat(message, "</div>"); 465 }; 466 Drupal.theme.ajaxProgressBar = function ($element) { 467 return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element); 468 }; 469 Drupal.Ajax.prototype.setProgressIndicatorBar = function () { 470 var progressBar = new Drupal.ProgressBar("ajax-progress-".concat(this.element.i
470d), $.noop, this.progress.method, $.noop); 471 if (this.progress.message) { 472 progressBar.setProgress(-1, this.progress.message); 473 } 474 if (this.progress.url) { 475 progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); 476 } 477 this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element)); 478 this.progress.object = progressBar; 479 $(this.element).after(this.progress.element); 480 }; 481 Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { 482 this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message)); 483 $(this.element).after(this.progress.element); 484 }; 485 Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { 486 this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen')); 487 $('body').append(this.progress.element); 488 }; 489 Drupal.Ajax.prototype.commandExecutionQueue = function (response, status) { 490 var _this2 = this; 491 var ajaxCommands = this.commands; 492 return Object.keys(response || {}).reduce(function (executionQueue, key) { 493 return executionQueue.then(function () { 494 var command = response[key].command; 495 if (command && ajaxCommands[command]) { 496 return ajaxCommands[command](_this2, response[key], status); 497 } 498 }); 499 }, Promise.resolve()); 500 }; 501 Drupal.Ajax.prototype.success = function (response, status) { 502 var _this3 = this; 503 if (this.progress.element) { 504 $(this.progress.element).remove(); 505 } 506 if (this.progress.object) { 507 this.progress.object.stopMonitoring(); 508 } 509 $(this.element).prop('disabled', false); 510 var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray(); 511 var focusChanged = Object.keys(response || {}).some(function (key) { 512 var _response$key = response[key], 513 command = _response$key.command, 514 method = _response$key.method; 515 return command === 'focusFirst' || command === 'invoke' && method === 'focus'; 516 }); 517 return this.commandExecutionQueue(response, status).then(function () { 518 if (!focusChanged && _this3.element && !$(_this3.element).data('disable-refocus')) { 519 var target = false;
520 for (var n = elementParents.length - 1; !target && n >= 0; n--) { 521 target = document.querySelector("[data-drupal-selector=\"".concat(elementParents[n].getAttribute('data-drupal-selector'), "\"]")); 522 } 523 if (target) { 524 $(target).trigger('focus'); 525 } 526 } 527 if (_this3.$form && document.body.contains(_this3.$form.get(0))) { 528 var settings = _this3.settings || drupalSettings; 529 Drupal.attachBehaviors(_this3.$form.get(0), settings); 530 } 531 _this3.settings = null; 532 }).catch(function (error) { 533 return console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error', { 534 '!error': error 535 })); 536 }); 537 }; 538 Drupal.Ajax.prototype.getEffect = function (response) { 539 var type = response.effect || this.effect; 540 var speed = response.speed || this.speed; 541 var effect = {}; 542 if (type === 'none') { 543 effect.showEffect = 'show'; 544 effect.hideEffect = 'hide'; 545 effect.showSpeed = ''; 546 } else if (type === 'fade') { 547 effect.showEffect = 'fadeIn'; 548 effect.hideEffect = 'fadeOut'; 549 effect.showSpeed = speed; 550 } else { 551 effect.showEffect = "".concat(type, "Toggle"); 552 effect.hideEffect = "".concat(type, "Toggle"); 553 effect.showSpeed = speed; 554 } 555 return effect; 556 }; 557 Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { 558 if (this.progress.element) { 559 $(this.progress.element).remove(); 560 } 561 if (this.progress.object) { 562 this.progress.object.stopMonitoring(); 563 } 564 $(this.wrapper).show(); 565 $(this.element).prop('disabled', false); 566 if (this.$form && document.body.contains(this.$form.get(0))) { 567 var settings = this.settings || drupalSettings; 568 Drupal.attachBehaviors(this.$form.get(0), settings); 569 } 570 throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage); 571 }; 572 Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) { 573 return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) { 574 return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)); 575 }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent; 576 }; 577 Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) { 578 return $('<div></div>').append($elements); 579 }; 580 Drupal.AjaxCommands = function () {}; 581 Drupal.AjaxCommands.prototype = { 582 insert: function insert(ajax, response) { 583 var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); 584 var method = response.method || ajax.method; 585 var effect = ajax.getEffect(response); 586 var settings = response.settings || ajax.settings || drupalSettings; 587 var $newContent = $($.parseHTML(response.data, document, true)); 588 $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response); 589 switch (method) { 590 case 'html': 591 case 'replaceWith': 592 case 'replaceAll': 593 case 'empty': 594 case 'remove': 595 Drupal.detachBehaviors($wrapper.get(0), settings); 596 break; 597 default: 598 break; 599 } 600 $wrapper[method]($newContent); 601 if (effect.showEffect !== 'show') { 602 $newContent.hide(); 603 } 604 var $ajaxNewContent = $newContent.find('.ajax-new-content'); 605 if ($ajaxNewContent.length) { 606 $ajaxNewContent.hide(); 607 $newContent.show(); 608 $ajaxNewContent[effect.showEffect](effect.showSpeed); 609 } else if (effect.showEffect !== 'show') { 610 $newContent[effect.showEffect](effect.showSpeed); 611 } 612 if ($newContent.parents('html').length) { 613 $newContent.each(function (index, element) { 614 if (element.nodeType === Node.ELEMENT_NODE) { 615 Drupal.attachBehaviors(element, settings); 616 } 617 }); 618 } 619 }, 620 remove: function remove(ajax, response, status) { 621 var settings = response.settings || ajax.settings || drupalSettings; 622 $(response.selector).each(function () { 623 Drupal.detachBehaviors(this, settings); 624 }).remove(); 625 }, 626 changed: function changed(ajax, response, status) { 627 var $element = $(response.selector); 628 if (!$element.hasClass('ajax-changed')) { 629 $element.addClass('ajax-changed'); 630 if (response.asterisk) { 631 $element.find(response.asterisk).append(" <abbr class=\"ajax-changed\" title=\"".concat(Drupal.t('Changed'), "\">*</abbr> ")); 632 } 633 } 634 }, 635 alert: function alert(ajax, response, status) { 636 window.alert(response.text); 637 }, 638 announce: function announce(ajax, response) { 639 if (response.priority) { 640 Drupal.announce(response.text, response.priority); 641 } else { 642 Drupal.announce(response.text); 643 } 644 }, 645 redirect: function redirect(ajax, response, status) { 646 window.location = response.url; 647 }, 648 css: function css(ajax, response, status) { 649 $(response.selector).css(response.argument); 650 }, 651 settings: function settings(ajax, response, status) { 652 var ajaxSettings = drupalSettings.ajax; 653 if (ajaxSettings) {
654 Drupal.ajax.expired().forEach(function (instance) { 655 if (instance.selector) { 656 var selector = instance.selector.replace('#', ''); 657 if (selector in ajaxSettings) { 658 delete ajaxSettings[selector]; 659 } 660 } 661 }); 662 } 663 if (response.merge) { 664 $.extend(true, drupalSettings, response.settings); 665 } else { 666 ajax.settings = response.settings; 667 } 668 }, 669 data: function data(ajax, response, status) { 670 $(response.selector).data(response.name, response.value); 671 }, 672 focusFirst: function focusFirst(ajax, response, status) { 673 var focusChanged = false; 674 var container = document.querySelector(response.selector); 675 if (container) { 676 var tabbableElements = tabbable(container); 677 if (tabbableElements.length) { 678 tabbableElements[0].focus(); 679 focusChanged = true; 680 } else if (isFocusable(container)) { 681 container.focus(); 682 focusChanged = true; 683 } 684 } 685 if (ajax.hasOwnProperty('element') && !focusChanged) { 686 ajax.element.focus(); 687 } 688 }, 689 invoke: function invoke(ajax, response, status) { 690 var $element = $(response.selector); 691 $element[response.method].apply($element, _toConsumableArray(response.args)); 692 }, 693 restripe: function restripe(ajax, response, status) { 694 $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even'); 695 }, 696 update_build_id: function update_build_id(ajax, response, status) { 697 document.querySelectorAll("input[name=\"form_build_id\"][value=\"".concat(response.old, "\"]")).forEach(function (item) { 698 item.value = response.new; 699 }); 700 }, 701 add_css: function add_css(ajax, response, status) { 702 $('head').prepend(response.data); 703 }, 704 message: function message(ajax, response) { 705 var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); 706 if (response.clearPrevious) { 707 messages.clear(); 708 } 709 messages.add(response.message, response.messageOptions); 710 }, 711 add_js: function add_js(ajax, response, status) { 712 var parentEl = document.querySelector(response.selector || 'body'); 713 var settings = ajax.settings || drupalSettings; 714 var allUniqueBundleIds = response.data.map(function (script) { 715 var uniqueBundleId = script.src + ajax.instanceIndex; 716 loadjs(script.src, uniqueBundleId, { 717 async: false, 718 before: function before(path, scriptEl) { 719 Object.keys(script).forEach(function (attributeKey) { 720 scriptEl.setAttribute(attributeKey, script[attributeKey]); 721 }); 722 parentEl.appendChild(scriptEl); 723 return false; 724 } 725 }); 726 return uniqueBundleId; 727 }); 728 return new Promise(function (resolve, reject) { 729 loadjs.ready(allUniqueBundleIds, { 730 success: function success() { 731 Drupal.attachBehaviors(parentEl, settings); 732 resolve(); 733 }, 734 error: function error(depsNotFound) { 735 var message = Drupal.t("The following files could not be loaded: @dependencies", { 736 '@dependencies': depsNotFound.join(', ') 737 }); 738 reject(message); 739 } 740 }); 741 }); 742 } 743 }; 744 var stopEvent = function stopEvent(xhr, settings) { 745 return xhr.getResponseHeader('X-Drupal-Ajax-Token') === '1' && settings.isInProgress && settings.isInProgress(); 746 }; 747 $.extend(true, $.event.special, { 748 ajaxSuccess: { 749 trigger: function trigger(event, xhr, settings) { 750 if (stopEvent(xhr, settings)) { 751 return false; 752 } 753 } 754 }, 755 ajaxComplete: { 756 trigger: function trigger(event, xhr, settings) { 757 if (stopEvent(xhr, settings)) { 758 $.active++; 759 return false; 760 } 761 } 762 } 763 }); 764})(jQuery, window, Drupal, drupalSettings, loadjs, window.tabbable);; 765/** 766* DO NOT EDIT THIS FILE. 767* See the following change record for more information, 768* https://www.drupal.org/node/2815083 769* @preserve 770**/ 771(function ($, Drupal, drupalSettings) { 772 Drupal.Views = {}; 773 Drupal.Views.parseQueryString = function (query) { 774 var args = {}; 775 var pos = query.indexOf('?'); 776 if (pos !== -1) { 777 query = query.substring(pos + 1); 778 } 779 var pair; 780 var pairs = query.split('&'); 781 for (var i = 0; i < pairs.length; i++) { 782 pair = pairs[i].split('='); 783 if (pair[0] !== 'q' && pair[1]) { 784 args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' ')); 785 } 786 } 787 return args; 788 }; 789 Drupal.Views.parseViewArgs = function (href, viewPath) { 790 var returnObj = {}; 791 var path = Drupal.Views.getPath(href); 792 var viewHref = Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length); 793 if (viewHref && path.substring(0, viewHref.length + 1) === "".concat(viewHref, "/")) { 794 returnObj.view_args = decodeURIComponent(path.substring(viewHref.length + 1, path.length)); 795 returnObj.view_path = path; 796 } 797 return returnObj; 798 }; 799 Drupal.Views.pathPortion = function (href) { 800 var protocol = window.location.protocol; 801 if (href.substring(0, protocol.length) === protocol) { 802 href = href.substring(href.indexOf('/', protocol.length + 2)); 803 } 804 return href; 805 }; 806 Drupal.Views.getPath = function (href) { 807 href = Drupal.Views.pathPortion(href); 808 href = href.substring(drupalSettings.path.baseUrl.length, href.length); 809 if (href.substring(0, 3) === '?q=') { 810 href = href.substring(3, href.length); 811 } 812 var chars = ['#', '?', '&']; 813 for (var i = 0; i < chars.length; i++) { 814 if (href.indexOf(chars[i]) > -1) { 815 href = href.substr(0, href.indexOf(chars[i])); 816 } 817 } 818 return href; 819 }; 820})(jQuery, Drupal, drupalSettings);;
821/** 822* DO NOT EDIT THIS FILE. 823* See the following change record for more information, 824* https://www.drupal.org/node/2815083 825* @preserve 826**/ 827(function ($, Drupal, drupalSettings) { 828 Drupal.behaviors.ViewsAjaxView = {}; 829 Drupal.behaviors.ViewsAjaxView.attach = function (context, settings) { 830 if (settings && settings.views && settings.views.ajaxViews) { 831 var ajaxViews = settings.views.ajaxViews; 832 Object.keys(ajaxViews || {}).forEach(function (i) { 833 Drupal.views.instances[i] = new Drupal.views.ajaxView(ajaxViews[i]); 834 }); 835 } 836 }; 837 Drupal.behaviors.ViewsAjaxView.detach = function (context, settings, trigger) { 838 if (trigger === 'unload') { 839 if (settings && settings.views && settings.views.ajaxViews) { 840 var ajaxViews = settings.views.ajaxViews; 841 Object.keys(ajaxViews || {}).forEach(function (i) { 842 var selector = ".js-view-dom-id-".concat(ajaxViews[i].view_dom_id); 843 if ($(selector, context).length) { 844 delete Drupal.views.instances[i]; 845 delete settings.views.ajaxViews[i]; 846 } 847 }); 848 } 849 } 850 }; 851 Drupal.views = {}; 852 Drupal.views.instances = {}; 853 Drupal.views.ajaxView = function (settings) { 854 var selector = ".js-view-dom-id-".concat(settings.view_dom_id); 855 this.$view = $(selector); 856 var ajaxPath = drupalSettings.views.ajax_path; 857 if (ajaxPath.constructor.toString().indexOf('Array') !== -1) { 858 ajaxPath = ajaxPath[0]; 859 } 860 var queryString = window.location.search || ''; 861 if (queryString !== '') { 862 queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, ''); 863 if (queryString !== '') { 864 queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString; 865 } 866 } 867 this.element_settings = { 868 url: ajaxPath + queryString, 869 submit: settings, 870 setClick: true, 871 event: 'click', 872 selector: selector, 873 progress: { 874 type: 'fullscreen' 875 } 876 }; 877 this.settings = settings; 878 this.$exposed_form = $("form#views-exposed-form-".concat(settings.view_name.replace(/_/g, '-'), "-").concat(settings.view_display_id.replace(/_/g, '-'))); 879 once('exposed-form', this.$exposed_form).forEach($.proxy(this.attachExposedFormAjax, this)); 880 once('ajax-pager', this.$view.filter($.proxy(this.filterNestedViews, this))).forEach($.proxy(this.attachPagerAjax, this)); 881 var selfSettings = $.extend({}, this.element_settings, { 882 event: 'RefreshView', 883 base: this.selector, 884 element: this.$view.get(0) 885 }); 886 this.refreshViewAjax = Drupal.ajax(selfSettings); 887 }; 888 Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () { 889 var that = this; 890 this.exposedFormAjax = []; 891 $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) { 892 var selfSettings = $.extend({}, that.element_settings, { 893 base: $(this).attr('id'), 894 element: this 895 }); 896 that.exposedFormAjax[index] = Drupal.ajax(selfSettings); 897 }); 898 }; 899 Drupal.views.ajaxView.prototype.filterNestedViews = function () { 900 return !this.$view.parents('.view').length; 901 }; 902 Drupal.views.ajaxView.prototype.attachPagerAjax = function () { 903 this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a').each($.proxy(this.attachPagerLinkAjax, this)); 904 }; 905 Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) { 906 var $link = $(link); 907 var viewData = {}; 908 var href = $link.attr('href'); 909 $.extend(viewData, this.settings, Drupal.Views.parseQueryString(href), Drupal.Views.parseViewArgs(href, this.settings.view_base_path)); 910 var selfSettings = $.extend({}, this.element_settings, {
911 submit: viewData, 912 base: false, 913 element: link 914 }); 915 this.pagerAjax = Drupal.ajax(selfSettings); 916 }; 917 Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) { 918 var offset = $(response.selector).offset(); 919 var scrollTarget = response.selector; 920 while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) { 921 scrollTarget = $(scrollTarget).parent(); 922 } 923 if (offset.top - 10 < $(scrollTarget).scrollTop()) { 924 $(scrollTarget).animate({ 925 scrollTop: offset.top - 10 926 }, 500); 927 } 928 }; 929})(jQuery, Drupal, drupalSettings);; 930/** 931 * @file 932 * Extends core ajax_view.js. 933 */ 934 935(function ($, Drupal) { 936 'use strict'; 937 938 /** 939 * @method 940 */ 941 Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () { 942 var that = this; 943 this.exposedFormAjax = []; 944 $('button[type=submit], input[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) { 945 var self_settings = $.extend({}, that.element_settings, { 946 base: $(this).attr('id'), 947 element: this 948 }); 949 that.exposedFormAjax[index] = Drupal.ajax(self_settings); 950 }); 951 }; 952 953})(jQuery, Drupal); 954; 955/** 956* DO NOT EDIT THIS FILE. 957* See the following change record for more information, 958* https://www.drupal.org/node/2815083 959* @preserve 960**/ 961Drupal.debounce = function (func, wait, immediate) { 962 var timeout; 963 var result; 964 return function () { 965 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 966 args[_key] = arguments[_key]; 967 } 968 var context = this; 969 var later = function later() { 970 timeout = null; 971 if (!immediate) { 972 result = func.apply(context, args); 973 } 974 }; 975 var callNow = immediate && !timeout; 976 clearTimeout(timeout); 977 timeout = setTimeout(later, wait); 978 if (callNow) { 979 result = func.apply(context, args); 980 } 981 return result; 982 }; 983};; 984/** 985 * @file 986 * Infinite Scroll JS. 987 */ 988 989(function ($, Drupal, debounce) { 990 "use strict"; 991 992 // Cached reference to $(window). 993 var $window = $(window); 994 995 // The threshold for how far to the bottom you should reach before reloading. 996 var scrollThreshold = 200; 997 998 // The selector for the automatic pager. 999 var automaticPagerSelector = '[data-drupal-views-infinite-scroll-pager="automatic"]'; 1000 1001 // The selector for both manual load and automatic pager. 1002 var pagerSelector = '[data-drupal-views-infinite-scroll-pager]'; 1003 1004 // The selector for the automatic pager. 1005 var contentWrapperSelector = '[data-drupal-views-infinite-scroll-content-wrapper]'; 1006 1007 // The event and namespace that is bound to window for automatic scrolling. 1008 var scrollEvent = 'scroll.views_infinite_scroll'; 1009 1010 /** 1011 * Insert a views infinite scroll view into the document. 1012 * 1013 * @param {jQuery} $newView 1014 * New content detached from the DOM. 1015 */ 1016 $.fn.infiniteScrollInsertView = function ($newView) { 1017 // Extract the view DOM ID from the view classes. 1018 var matches = /(js-view-dom-id-\w+)/.exec(this.attr('class')); 1019 1020 if (!matches) { 1021 return; 1022 } 1023 1024 var currentViewId = matches[1].replace('js-view-dom-id-', 'views_dom_id:'); 1025 1026 // Get the existing ajaxViews object. 1027 var view = Drupal.views.instances[currentViewId]; 1028 // Remove once so that the exposed form and pager are processed on 1029 // behavior attach. 1030 once.remove('ajax-pager', view.$view); 1031 once.remove('exposed-form', view.$exposed_form); 1032 // Make sure infinite scroll can be reinitialized. 1033 var $existingPager = view.$view.find(pagerSelector); 1034 once.remove('infinite-scroll', $existingPager); 1035 1036 var $newRows = $newView.find(contentWrapperSelector).children(); 1037 var $newPager = $newView.find(pagerSelector); 1038 1039 view.$view.find(contentWrapperSelector) 1040 // Trigger a jQuery event on the wrapper to inform that new content was 1041 // loaded and allow other scripts to respond to the event. 1042 .trigger('views_infinite_scroll.new_content', $newRows.clone()) 1043 // Add the new rows to existing view. 1044 .append($newRows); 1045 1046 // Replace the pager link with the new link and ajaxPageState values. 1047 $existingPager.replaceWith($newPager); 1048 1049 // Run views and VIS behaviors. 1050 Drupal.attachBehaviors(view.$view[0]); 1051 }; 1052 1053 /** 1054 * Handle the automatic paging based on the scroll amount. 1055 * 1056 * @type {Drupal~behavior} 1057 * 1058 * @prop {Drupal~behaviorAttach} attach 1059 * Initialize infinite scroll pagers and bind the scroll event. 1060 * @prop {Drupal~behaviorDetach} detach 1061 * During `unload` remove the scroll event binding. 1062 */ 1063 Drupal.behaviors.views_infinite_scroll_automatic = { 1064 attach : function (context, settings) { 1065 once('infinite-scroll', automaticPagerSelector, context).forEach(function (elem) { 1066 var $pager = $(elem); 1067 $pager.addClass('visually-hidden'); 1068 var isLoadNeeded = function () { 1069 return window.innerHeight + window.pageYOffset > $pager.offset().top - scrollThreshold; 1070 }; 1071 $window.on(scrollEvent, debounce(function () { 1072 if (isLoadNeeded()) { 1073 $pager.find('[rel=next]').click(); 1074 $window.off(scrollEvent); 1075 } 1076 }, 200)); 1077 if (isLoadNeeded()) { 1078 $window.trigger(scrollEvent); 1079 } 1080 }); 1081 }, 1082 detach: function (context, settings, trigger) { 1083 // In the case where the view is removed from the document, remove it's 1084 // events. This is important in the case a view being refreshed for a reason 1085 // other than a scroll. AJAX filters are a good example of the event needing 1086 // to be destroyed earlier than above. 1087 if (trigger === 'unload') { 1088 if (once.remove('infinite-scroll', automaticPagerSelector, context).length) { 1089 $window.off(scrollEvent); 1090 } 1091 } 1092 } 1093 }; 1094 1095 /** 1096 * Views AJAX pagination filter. 1097 * 1098 * In case the Entity View Attachment is rendered in a view context, 1099 * the default filter function prevents the required 'Use AJAX' setting 1100 * to work. 1101 * 1102 * @return {Boolean} 1103 * Whether to apply the Views AJAX paginator. VIS requires this setting 1104 * for pagination. 1105 */ 1106 Drupal.views.ajaxView.prototype.filterNestedViews = function () { 1107 return this.$view.hasClass('view-eva') || !this.$view.parents('.view').length; 1108 }; 1109 1110})(jQuery, Drupal, Drupal.debounce); 1111;
vendor: 23,089 bytes, lines 1112-1116
1112/* 1113 * jQuery FlexSlider v2.7.2 1114 * Copyright 2012 WooThemes 1115 * Contributing Author: Tyler Smith 1116 */!function($){var e=!0;$.flexslider=function(t,a){var n=$(t);void 0===a.rtl&&"rtl"==$("html").attr("dir")&&(a.rtl=!0),n.vars=$.extend({},$.flexslider.defaults,a);var i=n.vars.namespace,r=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||r||window.DocumentTouch&&document instanceof DocumentTouch)&&n.vars.touch,o="click touchend MSPointerUp keyup",l="",c,d="vertical"===n.vars.direction,u=n.vars.reverse,v=n.vars.itemWidth>0,p="fade"===n.vars.animation,m=""!==n.vars.asNavFor,f={};$.data(t,"flexslider",n),f={init:function(){n.animating=!1,n.currentSlide=parseInt(n.vars.startAt?n.vars.startAt:0,10),isNaN(n.currentSlide)&&(n.currentSlide=0),n.animatingTo=n.currentSlide,n.atEnd=0===n.currentSlide||n.currentSlide===n.last,n.containerSelector=n.vars.selector.substr(0,n.vars.selector.search(" ")),n.slides=$(n.vars.selector,n),n.container=$(n.containerSelector,n),n.count=n.slides.length,n.syncExists=$(n.vars.sync).length>0,"slide"===n.vars.animation&&(n.vars.animation="swing"),n.prop=d?"top":n.vars.rtl?"marginRight":"marginLeft",n.args={},n.manualPause=!1,n.stopped=!1,n.started=!1,n.startTimeout=null,n.transitions=!n.vars.video&&!p&&n.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return n.pfx=t[a].replace("Perspective","").toLowerCase(),n.prop="-"+n.pfx+"-transform",!0;return!1}(),n.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,n.ensureAnimationEnd="",""!==n.vars.controlsContainer&&(n.controlsContainer=$(n.vars.controlsContainer).length>0&&$(n.vars.controlsContainer)),""!==n.vars.manualControls&&(n.manualControls=$(n.vars.manualControls).length>0&&$(n.vars.manualControls)),""!==n.vars.customDirectionNav&&(n.customDirectionNav=2===$(n.vars.customDirectionNav).length&&$(n.vars.customDirectionNav)),n.vars.randomize&&(n.slides.sort(function(){return Math.round(Math.random())-.5}),n.container.empty().append(n.slides)),n.doMath(),n.setup("init"),n.vars.controlNav&&f.controlNav.setup(),n.vars.directionNav&&f.directionNav.setup(),n.vars.keyboard&&(1===$(n.containerSelector).length||n.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!n.animating&&(39===t||37===t)){var a=n.vars.rtl?37===t?n.getTarget("next"):39===t&&n.getTarget("prev"):39===t?n.getTarget("next"):37===t&&n.getTarget("prev");n.flexAnimate(a,n.vars.pauseOnAction)}}),n.vars.mousewheel&&n.bind("mousewheel",function(e,t,a,i){e.preventDefault();var r=t<0?n.getTarget("next"):n.getTarget("prev");n.flexAnimate(r,n.vars.pauseOnAction)}),n.vars.pausePlay&&f.pausePlay.setup(),n.vars.slideshow&&n.vars.pauseInvisible&&f.pauseInvisible.init(),n.vars.slideshow&&(n.vars.pauseOnHover&&n.hover(function(){n.manualPlay||n.manualPause||n.pause()},function(){n.manualPause||n.manualPlay||n.stopped||n.play()}),n.vars.pauseInvisible&&f.pauseInvisible.isHidden()||(n.vars.initDelay>0?n.startTimeout=setTimeout(n.play,n.vars.initDelay):n.play())),m&&f.asNav.setup(),s&&n.vars.touch&&f.touch(),(!p||p&&n.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",f.resize),n.find("img").attr("draggable","false"),setTimeout(function(){n.vars.start(n)},200)},asNav:{setup:function(){n.asNav=!0,n.animatingTo=Math.floor(n.currentSlide/n.move),n.currentItem=n.currentSlide,n.slides.removeClass(i+"active-slide").eq(n.currentItem).addClass(i+"active-slide"),r?(t._slider=n,n.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),a=t.index();$(n.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})})):n.slides.on(o,function(e){e.preventDefault();var t=$(this),a=t.index(),r;r=n.vars.rtl?-1*(t.offset().right-$(n).scrollLeft()):t.offset().left-$(n).scrollLeft(),r<=0&&t.hasClass(i+"active-slide")?n.flexAnimate(n.getTarget("prev"),!0):$(n.vars.asNavFor).data("flexslider").animating||t.hasClass(i+"active-slide")||(n.direction=n.currentItem<a?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){n.manualControls?f.controlNav.setupManual():f.controlNav.setupPaging()},setupPaging:function(){var e="thumbnails"===n.vars.controlNav?"control-thumbs":"control-paging",t=1,a,r;if(n.controlNavScaffold=$('<ol class="'+i+"control-nav "+i+e+'"></ol>'),n.pagingCount>1)for(var s=0;s<n.pagingCount;s++){if(r=n.slides.eq(s),void 0===r.attr("data-thumb-alt")&&r.attr("data-thumb-alt",""),a=$("<a></a>").attr("href","#").text(t),"thumbnails"===n.vars.controlNav&&(a=$("<img/>").attr("src",r.attr("data-thumb"))),""!==r.attr("data-thumb-alt")&&a.attr("alt",r.attr("data-thumb-alt")),"thumbnails"===n.vars.controlNav&&!0===n.vars.thumbCaptions){var c=r.attr("data-thumbcaption");if(""!==c&&void 0!==c){var d=$("<span></span>").addClass(i+"caption").text(c);a.append(d)}}var u=$("<li>");a.appendTo(u),u.append("</li>"),n.controlNavScaffold.append(u),t++}n.controlsContainer?$(n.controlsContainer).append(n.controlNavScaffold):n.append(n.controlNavScaffold),f.controlNav.set(),f.controlNav.active(),n.controlNavScaffold.delegate("a, img",o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(n.direction=a>n.currentSlide?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},setupManual:function(){n.controlNav=n.manualControls,f.controlNav.active(),n.controlNav.bind(o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(a>n.currentSlide?n.direction="next":n.direction="prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===n.vars.controlNav?"img":"a";n.controlNav=$("."+i+"control-nav li "+e,n.controlsContainer?n.controlsContainer:n)},active:function(){n.controlNav.removeClass(i+"active").eq(n.animatingTo).addClass(i+"active")},update:function(e,t){n.pagingCount>1&&"add"===e?n.controlNavScaffold.append($('<li><a href="#">'+n.count+"</a></li>")):1===n.pagingCount?n.controlNavScaffold.find("li").remove():n.controlNav.eq(t).closest("li").remove(),f.controlNav.set(),n.pagingCount>1&&n.pagingCount!==n.controlNav.length?n.update(t,e):f.controlNav.active()}},directionNav:{setup:function(){var e=$('<ul class="'+i+'direction-nav"><li class="'+i+'nav-prev"><a class="'+i+'prev" href="#">'+n.vars.prevText+'</a></li><li class="'+i+'nav-next"><a class="'+i+'next" href="#">'+n.vars.nextText+"</a></li></ul>");n.customDirectionNav?n.directionNav=n.customDirectionNav:n.controlsContainer?($(n.controlsContainer).append(e),n.directionNav=$("."+i+"direction-nav li a",n.controlsContainer)):(n.append(e),n.directionNav=$("."+i+"direction-nav li a",n)),f.directionNav.update(),n.directionNav.bind(o,function(e){e.preventDefault();var t;""!==l&&l!==e.type||(t=$(this).hasClass(i+"next")?n.getTarget("next"):n.getTarget("prev"),n.flexAnimate(t,n.vars.pauseOnAction)),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";1===n.pagingCount?n.directionNav.addClass(e).attr("tabindex","-1"):n.vars.animationLoop?n.directionNav.removeClass(e).removeAttr("tabindex"):0===n.animatingTo?n.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):n.animatingTo===n.last?n.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):n.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('<div class="'+i+'pauseplay"><a href="#"></a></div>');n.controlsContainer?(n.controlsContainer.append(e),n.pausePlay=$("."+i+"pauseplay a",n.controlsContainer)):(n.append(e),n.pausePlay=$("."+i+"pauseplay a",n)),f.pausePlay.update(n.vars.slideshow?i+"pause":i+"play"),n.pausePlay.bind(o,function(e){e.preventDefault(),""!==l&&l!==e.type||($(this).hasClass(i+"pause")?(n.manualPause=!0,n.manualPlay=!1,n.pause()):(n.manualPause=!1,n.manualPlay=!0,n.play())),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(e){"play"===e?n.pausePlay.removeClass(i+"pause").addClass(i+"play").html(n.vars.playText):n.pausePlay.removeClass(i+"play").addClass(i+"pause").html(n.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),n.animating?e.preventDefault():(n.pause(),t._gesture.addPointer(e.pointerId),w=0,c=d?n.h:n.w,f=Number(new Date),l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c)}function a(e){e.stopPropagation();var a=e.target._slider;if(a){var n=-e.translationX,i=-e.translationY;if(w+=d?i:n,m=(a.vars.rtl?-1:1)*w,x=d?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA)return void setImmediate(function(){t._gesture.stop()});(!x||Number(new Date)-f>500)&&(e.preventDefault(),!p&&a.transitions&&(a.vars.animationLoop||(m=w/(0===a.currentSlide&&w<0||a.currentSlide===a.last&&w>0?Math.abs(w)/c+2:1)),a.setProps(l+m,"setTouch")))}}function i(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!x&&null!==m){var a=u?-m:m,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):p||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}s=null,o=null,m=null,l=null,w=0}}var s,o,l,c,m,f,g,h,S,x=!1,y=0,b=0,w=0;r?(t.style.msTouchAction="none",t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",e,!1),t._slider=n,t.addEventListener("MSGestureChange",a,!1),t.addEventListener("MSGestureEnd",i,!1)):(g=function(e){n.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(n.pause(),c=d?n.h:n.w,f=Number(new Date),y=e.touches[0].pageX,b=e.touches[0].pageY,l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c,s=d?b:y,o=d?y:b,t.addEventListener("touchmove",h,!1),t.addEventListener("touchend",S,!1))},h=function(e){y=e.touches[0].pageX,b=e.touches[0].pageY,m=d?s-b:(n.vars.rtl?-1:1)*(s-y),x=d?Math.abs(m)<Math.abs(y-o):Math.abs(m)<Math.abs(b-o);var t=500;(!x||Number(new Date)-f>500)&&(e.preventDefault(),!p&&n.transitions&&(n.vars.animationLoop||(m/=0===n.currentSlide&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/c+2:1),n.setProps(l+m,"setTouch")))},S=function(e){if(t.removeEventListener("touchmove",h,!1),n.animatingTo===n.currentSlide&&!x&&null!==m){var a=u?-m:m,i=a>0?n.getTarget("next"):n.getTarget("prev");n.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?n.flexAnimate(i,n.vars.pauseOnAction):p||n.flexAnimate(n.currentSlide,n.vars.pauseOnAction,!0)}t.removeEventListener("touchend",S,!1),s=null,o=null,m=null,l=null},t.addEventListener("touchstart",g,!1))},resize:function(){!n.animating&&n.is(":visible")&&(v||n.doMath(),p?f.smoothHeight():v?(n.slides.width(n.computedW),n.update(n.pagingCount),n.setProps()):d?(n.viewport.height(n.h),n.setProps(n.h,"setTotal")):(n.vars.smoothHeight&&f.smoothHeight(),n.newSlides.width(n.computedW),n.setProps(n.computedW,"setTotal")))},smoothHeight:function(e){if(!d||p){var t=p?n:n.viewport;e?t.animate({height:n.slides.eq(n.animatingTo).innerHeight()},e):t.innerHeight(n.slides.eq(n.animatingTo).innerHeight())}},sync:function(e){var t=$(n.vars.sync).data("flexslider"),a=n.animatingTo;switch(e){case"animate":t.flexAnimate(a,n.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause();break}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=f.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){f.pauseInvisible.isHidden()?n.startTimeout?clearTimeout(n.startTimeout):n.pause():n.started?n.play():n.vars.initDelay>0?setTimeout(n.play,n.vars.initDelay):n.play()})}},isHidden:function(){var e=f.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(c),c=setTimeout(function(){l=""},3e3)}},n.flexAnimate=function(e,t,a,r,o){if(n.vars.animationLoop||e===n.currentSlide||(n.direction=e>n.currentSlide?"next":"prev"),m&&1===n.pagingCount&&(n.direction=n.currentItem<e?"next":"prev"),!n.animating&&(n.canAdvance(e,o)||a)&&n.is(":visible")){if(m&&r){var l=$(n.vars.asNavFor).data("flexslider");if(n.atEnd=0===e||e===n.count-1,l.flexAnimate(e,!0,!1,!0,o),n.direction=n.currentItem<e?"next":"prev",l.direction=n.direction,Math.ceil((e+1)/n.visible)-1===n.currentSlide||0===e)return n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),!1;n.currentItem=e,n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),e=Math.floor(e/n.visible)}if(n.animating=!0,n.animatingTo=e,t&&n.pause(),n.vars.before(n),n.syncExists&&!o&&f.sync("animate"),n.vars.controlNav&&f.controlNav.active(),v||n.slides.removeClass(i+"active-slide").eq(e).addClass(i+"active-slide"),n.atEnd=0===e||e===n.last,n.vars.directionNav&&f.directionNav.update(),e===n.last&&(n.vars.end(n),n.vars.animationLoop||n.pause()),p)s?(n.slides.eq(n.currentSlide).css({opacity:0,zIndex:1}),n.slides.eq(e).css({opacity:1,zIndex:2}),n.wrapup(c)):(n.slides.eq(n.currentSlide).css({zIndex:1}).animate({opacity:0},n.vars.animationSpeed,n.vars.easing),n.slides.eq(e).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing,n.wrapup));else{var c=d?n.slides.filter(":first").height():n.computedW,g,h,S;v?(g=n.vars.itemMargin,S=(n.itemW+g)*n.move*n.animatingTo,h=S>n.limit&&1!==n.visible?n.limit:S):h=0===n.currentSlide&&e===n.count-1&&n.vars.animationLoop&&"next"!==n.direction?u?(n.count+n.cloneOffset)*c:0:n.currentSlide===n.last&&0===e&&n.vars.animationLoop&&"prev"!==n.direction?u?0:(n.count+1)*c:u?(n.count-1-e+n.cloneOffset)*c:(e+n.cloneOffset)*c,n.setProps(h,"",n.vars.animationSpeed),n.transitions?(n.vars.animationLoop&&n.atEnd||(n.animating=!1,n.currentSlide=n.animatingTo),n.container.unbind("webkitTransitionEnd transitionend"),n.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(n.ensureAnimationEnd),n.wrapup(c)}),clearTimeout(n.ensureAnimationEnd),n.ensureAnimationEnd=setTimeout(function(){n.wrapup(c)},n.vars.animationSpeed+100)):n.container.animate(n.args,n.vars.animationSpeed,n.vars.easing,function(){n.wrapup(c)})}n.vars.smoothHeight&&f.smoothHeight(n.vars.animationSpeed)}},n.wrapup=function(e){p||v||(0===n.currentSlide&&n.animatingTo===n.last&&n.vars.animationLoop?n.setProps(e,"jumpEnd"):n.currentSlide===n.last&&0===n.animatingTo&&n.vars.animationLoop&&n.setProps(e,"jumpStart")),n.animating=!1,n.currentSlide=n.animatingTo,n.vars.after(n)},n.animateSlides=function(){!n.animating&&e&&n.flexAnimate(n.getTarget("next"))},n.pause=function(){clearInterval(n.animatedSlides),n.animatedSlides=null,n.playing=!1,n.vars.pausePlay&&f.pausePlay.update("play"),n.syncExists&&f.sync("pause")},n.play=function(){n.playing&&clearInterval(n.animatedSlides),n.animatedSlides=n.animatedSlides||setInterval(n.animateSlides,n.vars.slideshowSpeed),n.started=n.playing=!0,n.vars.pausePlay&&f.pausePlay.update("pause"),n.syncExists&&f.sync("play")},n.stop=function(){n.pause(),n.stopped=!0},n.canAdvance=function(e,t){var a=m?n.pagingCount-1:n.last;return!!t||(!(!m||n.currentItem!==n.count-1||0!==e||"prev"!==n.direction)||(!m||0!==n.currentItem||e!==n.pagingCount-1||"next"===n.direction)&&(!(e===n.currentSlide&&!m)&&(!!n.vars.animationLoop||(!n.atEnd||0!==n.currentSlide||e!==a||"next"===n.direction)&&(!n.atEnd||n.currentSlide!==a||0!==e||"next"!==n.direction))))},n.getTarget=function(e){return n.direction=e,"next"===e?n.currentSlide===n.last?0:n.currentSlide+1:0===n.currentSlide?n.last:n.currentSlide-1},n.setProps=function(e,t,a){var i=function(){var a=e||(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo;return function(){if(v)return"setTouch"===t?e:u&&n.animatingTo===n.last?0:u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:n.animatingTo===n.last?n.limit:a;switch(t){case"setTotal":return u?(n.count-1-n.currentSlide+n.cloneOffset)*e:(n.currentSlide+n.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return u?e:n.count*e;case"jumpStart":return u?n.count*e:e;default:return e}}()*(n.vars.rtl?1:-1)+"px"}();n.transitions&&(i=n.isFirefox?d?"translate3d(0,"+i+",0)":"translate3d("+parseInt(i)+"px,0,0)":d?"translate3d(0,"+i+",0)":"translate3d("+(n.vars.rtl?-1:1)*parseInt(i)+"px,0,0)",a=void 0!==a?a/1e3+"s":"0s",n.container.css("-"+n.pfx+"-transition-duration",a),n.container.css("transition-duration",a)),n.args[n.prop]=i,(n.transitions||void 0===a)&&n.container.css(n.args),n.container.css("transform",i)},n.setup=function(e){if(p)n.vars.rtl?n.slides.css({width:"100%",float:"right",marginLeft:"-100%",position:"relative"}):n.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?n.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+n.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(n.currentSlide).css({opacity:1,zIndex:2}):0==n.vars.fadeFirstSlide?n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).css({opacity:1}):n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing)),n.vars.smoothHeight&&f.smoothHeight();else{var t,a;"init"===e&&(n.viewport=$('<div class="'+i+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(n).append(n.container),n.cloneCount=0,n.cloneOffset=0,u&&(a=$.makeArray(n.slides).reverse(),n.slides=$(a),n.container.empty().append(n.slides))),n.vars.animationLoop&&!v&&(n.cloneCount=2,n.cloneOffset=1,"init"!==e&&n.container.find(".clone").remove(),n.container.append(f.uniqueID(n.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(f.uniqueID(n.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),n.newSlides=$(n.vars.selector,n),t=u?n.count-1-n.currentSlide+n.cloneOffset:n.currentSlide+n.cloneOffset,d&&!v?(n.container.height(200*(n.count+n.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){n.newSlides.css({display:"block"}),n.doMath(),n.viewport.height(n.h),n.setProps(t*n.h,"init")},"init"===e?100:0)):(n.container.width(200*(n.count+n.cloneCount)+"%"),n.setProps(t*n.computedW,"init"),setTimeout(function(){n.doMath(),n.vars.rtl&&n.isFirefox?n.newSlides.css({width:n.computedW,marginRight:n.computedM,float:"right",display:"block"}):n.newSlides.css({width:n.computedW,marginRight:n.computedM,float:"left",display:"block"}),n.vars.smoothHeight&&f.smoothHeight()},"init"===e?100:0))}v||n.slides.removeClass(i+"active-slide").eq(n.currentSlide).addClass(i+"active-slide"),n.vars.init(n)},n.doMath=function(){var e=n.slides.first(),t=n.vars.itemMargin,a=n.vars.minItems,i=n.vars.maxItems;n.w=void 0===n.viewport?n.width():n.viewport.width(),n.isFirefox&&(n.w=n.width()),n.h=e.height(),n.boxPadding=e.outerWidth()-e.width(),v?(n.itemT=n.vars.itemWidth+t,n.itemM=t,n.minW=a?a*n.itemT:n.w,n.maxW=i?i*n.itemT-t:n.w,n.itemW=n.minW>n.w?(n.w-t*(a-1))/a:n.maxW<n.w?(n.w-t*(i-1))/i:n.vars.itemWidth>n.w?n.w:n.vars.itemWidth,n.visible=Math.floor(n.w/n.itemW),n.move=n.vars.move>0&&n.vars.move<n.visible?n.vars.move:n.visible,n.pagingCount=Math.ceil((n.count-n.visible)/n.move+1),n.last=n.pagingCount-1,n.limit=1===n.pagingCount?0:n.vars.itemWidth>n.w?n.itemW*(n.count-1)+t*(n.count-1):(n.itemW+t)*n.count-n.w-t):(n.itemW=n.w,n.itemM=t,n.pagingCount=n.count,n.last=n.count-1),n.computedW=n.itemW-n.boxPadding,n.computedM=n.itemM},n.update=function(e,t){n.doMath(),v||(e<n.currentSlide?n.currentSlide+=1:e<=n.currentSlide&&0!==e&&(n.currentSlide-=1),n.animatingTo=n.currentSlide),n.vars.controlNav&&!n.manualControls&&("add"===t&&!v||n.pagingCount>n.controlNav.length?f.controlNav.update("add"):("remove"===t&&!v||n.pagingCount<n.controlNav.length)&&(v&&n.currentSlide>n.last&&(n.currentSlide-=1,n.animatingTo-=1),f.controlNav.update("remove",n.last))),n.vars.directionNav&&f.directionNav.update()},n.addSlide=function(e,t){var a=$(e);n.count+=1,n.last=n.count-1,d&&u?void 0!==t?n.slides.eq(n.count-t).after(a):n.container.prepend(a):void 0!==t?n.slides.eq(t).before(a):n.container.append(a),n.update(t,"add"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.added(n)},n.removeSlide=function(e){var t=isNaN(e)?n.slides.index($(e)):e;n.count-=1,n.last=n.count-1,isNaN(e)?$(e,n.slides).remove():d&&u?n.slides.eq(n.last).remove():n.slides.eq(e).remove(),n.doMath(),n.update(t,"remove"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.removed(n)},f.init()},$(window).blur(function(t){e=!1}).focus(function(t){e=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&!1===e.allowOneSlide||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery);
1116; 1117/** 1118 * @file 1119 * Loads the FlexSlider library. 1120 */ 1121 1122(function ($) { 1123 1124 'use strict'; 1125 1126 Drupal.behaviors.flexslider = { 1127 attach: function (context, settings) { 1128 var sliders = []; 1129 var id; 1130 if ($.type(settings.flexslider) !== 'undefined' && $.type(settings.flexslider.instances) !== 'undefined') { 1131 1132 for (id in settings.flexslider.instances) { 1133 1134 if (settings.flexslider.instances.hasOwnProperty(id)) { 1135 if ($.type(settings.flexslider.optionsets) !== 'undefined' && settings.flexslider.instances[id] in settings.flexslider.optionsets) { 1136 if (settings.flexslider.optionsets[settings.flexslider.instances[id]].asNavFor !== '') { 1137 // We have to initialize all the sliders which are "asNavFor" first. 1138 _flexslider_init(id, settings.flexslider.optionsets[settings.flexslider.instances[id]], context); 1139 } 1140 else { 1141 // Everyone else is second. 1142 sliders[id] = settings.flexslider.optionsets[settings.flexslider.instances[id]]; 1143 } 1144 } 1145 } 1146 } 1147 } 1148 // Slider set. 1149 for (id in sliders) { 1150 if (sliders.hasOwnProperty(id)) { 1151 _flexslider_init(id, settings.flexslider.optionsets[settings.flexslider.instances[id]], context); 1152 } 1153 } 1154 } 1155 }; 1156 1157 /** 1158 * Initialize the flexslider instance. 1159 * 1160 * @param {string} id 1161 * Id selector of the flexslider object. 1162 * @param {object} optionset 1163 * The optionset to apply to the flexslider object. 1164 * @param {object} context 1165 * The DOM context. 1166 * @private 1167 */ 1168 function _flexslider_init(id, optionset, context) { 1169 $('#' + id, context).once('flexslider').each(function () { 1170 // Remove width/height attributes. 1171 // @todo load the css path from the settings 1172 $(this).find('ul.slides > li > *').removeAttr('width').removeAttr('height'); 1173 1174 if (optionset) { 1175 // Add events that developers can use to interact. 1176 $(this).flexslider($.extend(optionset, { 1177 start: function (slider) { 1178 slider.trigger('start', [slider]); 1179 }, 1180 before: function (slider) { 1181 slider.trigger('before', [slider]); 1182 }, 1183 after: function (slider) { 1184 slider.trigger('after', [slider]); 1185 }, 1186 end: function (slider) { 1187 slider.trigger('end', [slider]); 1188 }, 1189 added: function (slider) { 1190 slider.trigger('added', [slider]); 1191 }, 1192 removed: function (slider) { 1193 slider.trigger('removed', [slider]); 1194 }, 1195 init: function (slider) { 1196 slider.trigger('init', [slider]); 1197 } 1198 })); 1199 } 1200 else { 1201 $(this).flexslider(); 1202 } 1203 }); 1204 } 1205 1206}(jQuery)); 1207; 1208/** 1209 * @file 1210 * Affix for Bootstrap 4. 1211 * https://www.codeply.com/users/skelly 1212 * 1213 */ 1214(function ($, Drupal) { 1215 1216 'use strict'; 1217 1218 Drupal.behaviors.bootstrap_barrio_affix = { 1219 attach: function (context, settings) { 1220 var toggleAffix = function (affixElement, scrollElement, wrapper) { 1221 1222 var height = affixElement.outerHeight(), 1223 top = wrapper.offset().top; 1224 1225 if (scrollElement.scrollTop() >= top){ 1226 wrapper.height(height); 1227 affixElement.addClass("affix"); 1228 } 1229 else { 1230 affixElement.removeClass("affix"); 1231 wrapper.height('auto'); 1232 } 1233 1234 }; 1235 1236 $(once('affixed', '[data-toggle="affix"]', context)).each(function () { 1237 var ele = $(this), 1238 wrapper = $('<div></div>'); 1239 1240 ele.before(wrapper); 1241 $(window).on('scroll resize', function () { 1242 toggleAffix(ele, $(this), wrapper); 1243 }); 1244 1245 // init 1246 toggleAffix(ele, $(window), wrapper); 1247 }); 1248 } 1249 } 1250})(jQuery, Drupal); 1251;
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.