diff --git a/themes/osi/assets/js/build/theme.asset.php b/themes/osi/assets/js/build/theme.asset.php index d91162f..337df28 100644 --- a/themes/osi/assets/js/build/theme.asset.php +++ b/themes/osi/assets/js/build/theme.asset.php @@ -1 +1 @@ - array(), 'version' => '1a77530059955fb6eaa5'); + array(), 'version' => 'ee5da5bfafd11f296b5b'); diff --git a/themes/osi/assets/js/build/theme.js b/themes/osi/assets/js/build/theme.js index 1ff42ac..c314f18 100644 --- a/themes/osi/assets/js/build/theme.js +++ b/themes/osi/assets/js/build/theme.js @@ -1 +1 @@ -(()=>{var e={690:()=>{jQuery},706:()=>{var e,t,a,n,s;e=jQuery,t=e(window).scrollTop(),a=e(".header-main"),e("#content"),e("body #content:not(.has_no_sidebar)"),n=-1,s="header-main-small",a.innerHeight(),a.innerHeight(),e(window).on("scroll",(function(r){var o=e(this).scrollTop();e(window).width()>784?o>100?a.addClass(s):a.removeClass(s):(o>120&&o>t?(n=-1,a.addClass(s)):(-1==n&&(n=o),o{var e;e=jQuery,(()=>{const t=e(".license-categories"),a=["ls","categories"],n=e(".license-search input"),s=e(".category-filter-cb"),r=e("#clear-search"),o=e("#clear-categories"),l=e("#search-prompt"),i=e("#toggle-license-search"),c=e("#toggle-license-categories");let d=window.location.href,u={};const h=()=>{const s={};n.length&&(""!==n.val()?(s.ls=n.val(),l.removeClass("hide"),l.find("span").html(n.val()),i.removeClass("open").siblings().removeClass("open")):(delete s.ls,l.addClass("hide"),i.addClass("open").siblings().addClass("open")));const r=t.find("input:checked");r.length?(r.each(((t,a)=>{s.categories||(s.categories=[]),s.categories.push(e(a).val())})),s.categories=s.categories.join(","),o.removeClass("hide"),c.find("span").html("("+r.length+")")):(delete s.categories,o.addClass("hide"),c.find("span").html(""));const h=new URL(d),m=new URL(d);for(const e of m.searchParams.entries())h.searchParams.delete(e[0]);for(const e in s)h.searchParams.set(e,s[e]);window.history.pushState({path:h.toString()},"",h.toString()),d=h.toString();let v=!1;a.forEach((e=>{u[e]===s[e]&&typeof u[e]==typeof s[e]||(v=!0)})),u=s,v&&p()},m=()=>{e(".license-table .term-item").on("click",(function(a){a.preventDefault();const n=e(this).attr("data-term");t.find('[value="'+n+'"]').prop("checked",!0).parent("label").addClass("active"),h()}))},p=()=>{const t=e(".license-table tbody");t.html("Loading..."),e.post(OSI_LICENSE_DB.ajaxURL,{action:OSI_LICENSE_DB.action,...u},(e=>{e.success&&e.data?.html&&e.data.licenses.length?(t.html(e.data.html),m()):t.html("No licenses found! Please try widening your search.")})).fail((()=>{t.html("Something went wrong! Please refresh and try again.")}))};(()=>{const e=new URL(d);a.forEach((t=>{e.searchParams.has(t)&&(u[t]=e.searchParams.get(t))}))})(),u.s&&n.val(u.s),u.categories&&u.categories.trim().split(",").forEach((e=>{e=e.trim();const a=t.find(`#osi-filter-cb-${e}`);a.length&&a.prop("checked",!0)})),s.each((function(){e(this).is(":checked")&&e(this).parent("label").addClass("active")})),s.is(":checked")&&o.removeClass("hide"),s.on("change",(function(){e(this).parent("label").toggleClass("active"),h()})),e(".license-search form").on("submit",(function(e){e.preventDefault(),h()})),r.on("click",(function(){n.val(""),h()})),o.on("click",(function(){s.prop("checked",!1).parent("label").removeClass("active"),h()})),m()})()},386:()=>{!function(e){const t=jQuery(".single-license .license-meta > span");let a,n;for(let e=0;e{var e;(e=jQuery)(".sub-menu").addClass("menu-collapse"),e(".menu-item-has-children > a").append(''),e(".menu-toggle").on("click",(function(t){t.preventDefault(),e(this).parent().next(".sub-menu").hasClass("menu-collapse")?(e(this).parent().next(".sub-menu").removeClass("menu-collapse"),e(this).parent().parent(".menu-item-has-children").addClass("tab-active"),e(this).parent().parent().parent(".sub-menu").addClass("can-overflow"),e(this).addClass("menu-toggle-active"),t.stopPropagation()):(e(this).parent().next(".sub-menu").addClass("menu-collapse"),e(this).parent().parent(".menu-item-has-children").removeClass("tab-active"),e(this).parent().parent().parent(".sub-menu").removeClass("can-overflow"),e(this).parent().parent().find(".sub-menu").removeClass("can-overflow"),e(this).removeClass("menu-toggle-active"),t.stopPropagation())}))},14:()=>{!function(){var e,t,a,n,s,r;if((e=document.getElementById("site-navigation"))&&void 0!==(t=e.getElementsByTagName("button")[0]))if(void 0!==(a=e.getElementsByTagName("ul")[0])){for(a.setAttribute("aria-expanded","false"),-1===a.className.indexOf("nav-menu")&&(a.className+=" nav-menu"),t.onclick=function(){-1!==e.className.indexOf("toggled")?(e.className=e.className.replace(" toggled",""),t.setAttribute("aria-expanded","false"),a.setAttribute("aria-expanded","false")):(e.className+=" toggled",t.setAttribute("aria-expanded","true"),a.setAttribute("aria-expanded","true"))},s=0,r=(n=a.getElementsByTagName("a")).length;s a, .page_item_has_children > a");if("ontouchstart"in window)for(t=function(e){var t,a=this.parentNode;if(a.classList.contains("focus"))a.classList.remove("focus");else{for(e.preventDefault(),t=0;t{var e;(e=jQuery)("#openSearch").click((function(){e(".header-search-wrapper").slideDown(),e(this).addClass("active"),e(".header-search-wrapper .search-field").focus()})),e("#closeSearch").click((function(){e(".header-search-wrapper").slideUp(),e("#openSearch").removeClass("active")}))},823:()=>{var e,t=document.getElementById("openMainMenu"),a=document.getElementById("closeSidebar"),n=document.getElementById("openSidebar"),s=".nav-main";function r(){var e=document.querySelectorAll("html")[0],t=e.className;-1===t.indexOf("open-the-menu")?e.className=t+" open-the-menu":e.className=t.replace(" open-the-menu","")}function o(){var e=document.querySelectorAll("html")[0],t=e.className;-1===t.indexOf("open-the-sidebar")?e.className=t+" open-the-sidebar":e.className=t.replace(" open-the-sidebar","")}function l(){var e=window.innerHeight,t=window.matchMedia("(max-width: 48.9em)");document.addEventListener("DOMContentLoaded",(function(){t.matches&&(document.querySelectorAll(s)[0].style.height=e-50+"px")}),!1),t.addListener((function(t){t.matches?document.querySelectorAll(s)[0].style.height=e-50+"px":document.querySelectorAll(s)[0].style.height=null}))}null!=t&&(t.attachEvent?(t.attachEvent("onclick",r),null!==n&&n.attachEvent("onclick",o)):(t.addEventListener("click",r),null!==n&&n.addEventListener("click",o))),null!=a&&(a.attachEvent?a.attachEvent("onclick",r):a.addEventListener("click",r)),l(),document.addEventListener("DOMContentLoaded",(function(){l()}),!1),window.onresize=function(){clearTimeout(e),e=setTimeout((function(){l()}),100)}},103:()=>{/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var e,t=location.hash.substring(1);/^[A-z0-9_-]+$/.test(t)&&(e=document.getElementById(t))&&(/^(?:a|select|input|button|textarea)$/i.test(e.tagName)||(e.tabIndex=-1),e.focus())}),!1)},624:()=>{"use strict";class e{constructor(e){this.tableNode=e,this.columnHeaders=e.querySelectorAll("thead th"),this.sortColumns=[];for(var t=0;tn.value?-1:1}));n.firstChild;)n.removeChild(n.lastChild);for(var d=0;d{var e;(e=jQuery)(document).ready((function(){e(".toggle-header h2").click((function(){var t=e(this).parent().attr("id");e(this).parent().hasClass("open")?(e(this).parent().removeClass("open"),e('[data-toggle="'+t+'"]').removeClass("open")):(e(this).parent().addClass("open"),e('[data-toggle="'+t+'"]').addClass("open"))}))}))}},t={};function a(n){var s=t[n];if(void 0!==s)return s.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,a),r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";a(690),a(706),a(876),a(14),a(624),a(655),a(7),a(823),a(103),a(151),a(386)})()})(); \ No newline at end of file +(()=>{var e={690:()=>{jQuery},648:()=>{document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("remoteForm-form-ContributionPage7"),t=document.getElementById("first_name").closest(".form-group"),n=document.getElementById("last_name").closest(".form-group"),a=document.getElementById("email-primary").closest(".form-group"),s=document.getElementById("credit_card_number").closest(".form-group"),o=document.getElementById("cvv2").closest(".form-group"),r=document.getElementById("credit_card_exp_date_M").closest(".form-group"),l=document.getElementById("credit_card_exp_date_Y").closest(".form-group"),c=document.getElementById("remoteform-submit"),i=document.querySelector("label.rf-label").parentNode,d=document.querySelectorAll('.form-check-input:not([value="54"])'),u=document.createElement("div");u.className="form-check-grid",i.parentNode.insertBefore(u,i),d.forEach((e=>{u.appendChild(e.parentNode)}));const m=document.createElement("div");m.style.display="none",m.append(t,n,a,s,o,r,l,c),e.insertBefore(m,i.nextSibling),document.querySelectorAll(".form-check-label").forEach((e=>{e.textContent=e.textContent.replace(/ - \$[\d\.]+/,"")}));const h=document.querySelector('input[value="54"]');h&&(h.type="checkbox",h.closest(".form-check").querySelector("label").textContent="Yes, I want to become an OSI member!",m.prepend(h.closest(".form-check"))),d.forEach((e=>{e.nextElementSibling.addEventListener("click",(function(){d.forEach((t=>{t!==e&&(t.checked=!1)})),e.checked=!0,e.dispatchEvent(new Event("change"))}))}));const p=document.createElement("button");p.textContent="Contribute",p.type="button",p.addEventListener("click",(()=>{"none"===m.style.display?(m.style.display="block",p.textContent="Cancel",m.style.transition="all 0.3s ease"):(m.style.display="none",p.textContent="Contribute")})),e.appendChild(p)}))},706:()=>{var e,t,n,a,s;e=jQuery,t=e(window).scrollTop(),n=e(".header-main"),e("#content"),e("body #content:not(.has_no_sidebar)"),a=-1,s="header-main-small",n.innerHeight(),n.innerHeight(),e(window).on("scroll",(function(o){var r=e(this).scrollTop();e(window).width()>784?r>100?n.addClass(s):n.removeClass(s):(r>120&&r>t?(a=-1,n.addClass(s)):(-1==a&&(a=r),r{var e;e=jQuery,(()=>{const t=e(".license-categories"),n=["ls","categories"],a=e(".license-search input"),s=e(".category-filter-cb"),o=e("#clear-search"),r=e("#clear-categories"),l=e("#search-prompt"),c=e("#toggle-license-search"),i=e("#toggle-license-categories");let d=window.location.href,u={};const m=()=>{const s={};a.length&&(""!==a.val()?(s.ls=a.val(),l.removeClass("hide"),l.find("span").html(a.val()),c.removeClass("open").siblings().removeClass("open")):(delete s.ls,l.addClass("hide"),c.addClass("open").siblings().addClass("open")));const o=t.find("input:checked");o.length?(o.each(((t,n)=>{s.categories||(s.categories=[]),s.categories.push(e(n).val())})),s.categories=s.categories.join(","),r.removeClass("hide"),i.find("span").html("("+o.length+")")):(delete s.categories,r.addClass("hide"),i.find("span").html(""));const m=new URL(d),h=new URL(d);for(const e of h.searchParams.entries())m.searchParams.delete(e[0]);for(const e in s)m.searchParams.set(e,s[e]);window.history.pushState({path:m.toString()},"",m.toString()),d=m.toString();let g=!1;n.forEach((e=>{u[e]===s[e]&&typeof u[e]==typeof s[e]||(g=!0)})),u=s,g&&p()},h=()=>{e(".license-table .term-item").on("click",(function(n){n.preventDefault();const a=e(this).attr("data-term");t.find('[value="'+a+'"]').prop("checked",!0).parent("label").addClass("active"),m()}))},p=()=>{const t=e(".license-table tbody");t.html("Loading..."),e.post(OSI_LICENSE_DB.ajaxURL,{action:OSI_LICENSE_DB.action,...u},(e=>{e.success&&e.data?.html&&e.data.licenses.length?(t.html(e.data.html),h()):t.html("No licenses found! Please try widening your search.")})).fail((()=>{t.html("Something went wrong! Please refresh and try again.")}))};(()=>{const e=new URL(d);n.forEach((t=>{e.searchParams.has(t)&&(u[t]=e.searchParams.get(t))}))})(),u.s&&a.val(u.s),u.categories&&u.categories.trim().split(",").forEach((e=>{e=e.trim();const n=t.find(`#osi-filter-cb-${e}`);n.length&&n.prop("checked",!0)})),s.each((function(){e(this).is(":checked")&&e(this).parent("label").addClass("active")})),s.is(":checked")&&r.removeClass("hide"),s.on("change",(function(){e(this).parent("label").toggleClass("active"),m()})),e(".license-search form").on("submit",(function(e){e.preventDefault(),m()})),o.on("click",(function(){a.val(""),m()})),r.on("click",(function(){s.prop("checked",!1).parent("label").removeClass("active"),m()})),h()})()},386:()=>{!function(e){const t=jQuery(".single-license .license-meta > span");let n,a;for(let e=0;e{var e;(e=jQuery)(".sub-menu").addClass("menu-collapse"),e(".menu-item-has-children > a").append(''),e(".menu-toggle").on("click",(function(t){t.preventDefault(),e(this).parent().next(".sub-menu").hasClass("menu-collapse")?(e(this).parent().next(".sub-menu").removeClass("menu-collapse"),e(this).parent().parent(".menu-item-has-children").addClass("tab-active"),e(this).parent().parent().parent(".sub-menu").addClass("can-overflow"),e(this).addClass("menu-toggle-active"),t.stopPropagation()):(e(this).parent().next(".sub-menu").addClass("menu-collapse"),e(this).parent().parent(".menu-item-has-children").removeClass("tab-active"),e(this).parent().parent().parent(".sub-menu").removeClass("can-overflow"),e(this).parent().parent().find(".sub-menu").removeClass("can-overflow"),e(this).removeClass("menu-toggle-active"),t.stopPropagation())}))},14:()=>{!function(){var e,t,n,a,s,o;if((e=document.getElementById("site-navigation"))&&void 0!==(t=e.getElementsByTagName("button")[0]))if(void 0!==(n=e.getElementsByTagName("ul")[0])){for(n.setAttribute("aria-expanded","false"),-1===n.className.indexOf("nav-menu")&&(n.className+=" nav-menu"),t.onclick=function(){-1!==e.className.indexOf("toggled")?(e.className=e.className.replace(" toggled",""),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false")):(e.className+=" toggled",t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"))},s=0,o=(a=n.getElementsByTagName("a")).length;s a, .page_item_has_children > a");if("ontouchstart"in window)for(t=function(e){var t,n=this.parentNode;if(n.classList.contains("focus"))n.classList.remove("focus");else{for(e.preventDefault(),t=0;t{var e;(e=jQuery)("#openSearch").click((function(){e(".header-search-wrapper").slideDown(),e(this).addClass("active"),e(".header-search-wrapper .search-field").focus()})),e("#closeSearch").click((function(){e(".header-search-wrapper").slideUp(),e("#openSearch").removeClass("active")}))},823:()=>{var e,t=document.getElementById("openMainMenu"),n=document.getElementById("closeSidebar"),a=document.getElementById("openSidebar"),s=".nav-main";function o(){var e=document.querySelectorAll("html")[0],t=e.className;-1===t.indexOf("open-the-menu")?e.className=t+" open-the-menu":e.className=t.replace(" open-the-menu","")}function r(){var e=document.querySelectorAll("html")[0],t=e.className;-1===t.indexOf("open-the-sidebar")?e.className=t+" open-the-sidebar":e.className=t.replace(" open-the-sidebar","")}function l(){var e=window.innerHeight,t=window.matchMedia("(max-width: 48.9em)");document.addEventListener("DOMContentLoaded",(function(){t.matches&&(document.querySelectorAll(s)[0].style.height=e-50+"px")}),!1),t.addListener((function(t){t.matches?document.querySelectorAll(s)[0].style.height=e-50+"px":document.querySelectorAll(s)[0].style.height=null}))}null!=t&&(t.attachEvent?(t.attachEvent("onclick",o),null!==a&&a.attachEvent("onclick",r)):(t.addEventListener("click",o),null!==a&&a.addEventListener("click",r))),null!=n&&(n.attachEvent?n.attachEvent("onclick",o):n.addEventListener("click",o)),l(),document.addEventListener("DOMContentLoaded",(function(){l()}),!1),window.onresize=function(){clearTimeout(e),e=setTimeout((function(){l()}),100)}},103:()=>{/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var e,t=location.hash.substring(1);/^[A-z0-9_-]+$/.test(t)&&(e=document.getElementById(t))&&(/^(?:a|select|input|button|textarea)$/i.test(e.tagName)||(e.tabIndex=-1),e.focus())}),!1)},624:()=>{"use strict";class e{constructor(e){this.tableNode=e,this.columnHeaders=e.querySelectorAll("thead th"),this.sortColumns=[];for(var t=0;ta.value?-1:1}));a.firstChild;)a.removeChild(a.lastChild);for(var d=0;d{var e;(e=jQuery)(document).ready((function(){e(".toggle-header h2").click((function(){var t=e(this).parent().attr("id");e(this).parent().hasClass("open")?(e(this).parent().removeClass("open"),e('[data-toggle="'+t+'"]').removeClass("open")):(e(this).parent().addClass("open"),e('[data-toggle="'+t+'"]').addClass("open"))}))}))}},t={};function n(a){var s=t[a];if(void 0!==s)return s.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(690),n(706),n(876),n(14),n(624),n(655),n(7),n(823),n(103),n(151),n(386),n(648)})()})(); \ No newline at end of file diff --git a/themes/osi/assets/js/build/vendor.asset.php b/themes/osi/assets/js/build/vendor.asset.php index 8609cfe..70243a7 100644 --- a/themes/osi/assets/js/build/vendor.asset.php +++ b/themes/osi/assets/js/build/vendor.asset.php @@ -1 +1 @@ - array('jquery'), 'version' => 'e025ea38feca3ffa8690'); + array('jquery'), 'version' => '9a08034ec8a2505dbde0'); diff --git a/themes/osi/assets/js/build/vendor.js b/themes/osi/assets/js/build/vendor.js index 018f873..b3a6c3f 100644 --- a/themes/osi/assets/js/build/vendor.js +++ b/themes/osi/assets/js/build/vendor.js @@ -1 +1 @@ -(()=>{"use strict";var e={358:(e,t,n)=>{var i,r,o,s;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}jQuery(document).ready((function(e){function t(t){var n='';t.find(".sortable").append(n),t.find(".sortable").find(".repeater:last").slideDown("slow",(function(){e(this).find("input").focus()}))}function n(t){var n=t.find(".repeater-input").map((function(){return e(this).val()})).toArray();t.find(".customize-control-sortable-repeater").val(n),t.find(".customize-control-sortable-repeater").trigger("change")}function i(t){var n=t.find(".sortable-pill-checkbox").map((function(){if(e(this).is(":checked"))return e(this).val()})).toArray();t.find(".customize-control-sortable-pill-checkbox").val(n).trigger("change")}function r(e){var t={font:e.find(".google-fonts-list").val(),regularweight:e.find(".google-fonts-regularweight-style").val(),italicweight:e.find(".google-fonts-italicweight-style").val(),boldweight:e.find(".google-fonts-boldweight-style").val(),category:e.find(".google-fonts-category").val()};e.find(".customize-control-google-font-selection").val(JSON.stringify(t)).trigger("change")}function o(e){var t;return(e=e.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(e.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),t=parseInt(t)):t=100,t}function s(e,t,n,i){var r,o,s;r=t.data("a8cIris"),o=t.data("wpWpColorPicker"),r._color._alpha=e,s=r._color.toString(),t.val(s),o.toggler.css({"background-color":s}),i&&a(e,n),t.wpColorPicker("color",s)}function a(e,t){t.slider("value",e),t.find(".ui-slider-handle").text(e.toString())}e(".sortable_repeater_control").each((function(){var n,i=e(this).find(".customize-control-sortable-repeater").val().split(","),r=i.length;if(r>0&&(e(this).find(".repeater-input").val(i[0]),r>1))for(n=1;n1?e(this).parent().slideUp("fast",(function(){var t=e(this).parent().parent();e(this).remove(),n(t)})):(e(this).parent().find(".repeater-input").val(""),n(e(this).parent().parent().parent()))})),e(".customize-control-sortable-repeater-add").click((function(i){i.preventDefault(),t(e(this).parent()),n(e(this).parent())})),e(".sortable_repeater.sortable").change((function(){n(e(this).parent())})),e(".sortable_repeater.sortable").on("blur",".repeater-input",(function(){var t=e(this),n=t.val();n&&!n.match(/^.+:\/\/.*/)&&t.val("https://"+n).trigger("change")})),e(".slider-custom-control").each((function(){var t=e(this).find(".customize-control-slider-value").val(),n=e(this).find(".slider"),i=parseFloat(n.attr("slider-min-value")),r=parseFloat(n.attr("slider-max-value")),o=parseFloat(n.attr("slider-step-value"));n.slider({value:t,min:i,max:r,step:o,change:function(t,n){e(this).parent().find(".customize-control-slider-value").trigger("change")}})})),e(".slider").on("slide",(function(t,n){e(this).parent().find(".customize-control-slider-value").val(n.value)})),e(".slider-reset").on("click",(function(){var t=e(this).attr("slider-reset-value");e(this).parent().find(".customize-control-slider-value").val(t),e(this).parent().find(".slider").slider("value",t)})),e(".customize-control-slider-value").blur((function(){var t=e(this).val(),n=e(this).parent().find(".slider"),i=parseInt(n.attr("slider-min-value")),r=parseInt(n.attr("slider-max-value"));tr&&(t=r,e(this).val(t)),e(this).parent().find(".slider").slider("value",t)})),e(".single-accordion-toggle").click((function(){var t=e(this);e(this).parent().find(".single-accordion").slideToggle("slow",(function(){t.toggleClass("single-accordion-toggle-rotate",e(this).is(":visible"))}))})),e(".multi-image-checkbox").on("change",(function(){var t,n;n=(t=e(this).parent().parent()).find(".multi-image-checkbox").map((function(){if(e(this).is(":checked"))return e(this).val()})).toArray(),t.find(".customize-control-multi-image-checkbox").val(n).trigger("change")})),e(".pill_checkbox_control .sortable").sortable({placeholder:"pill-ui-state-highlight",update:function(t,n){i(e(this).parent())}}),e(".pill_checkbox_control .sortable-pill-checkbox").on("change",(function(){i(e(this).parent().parent().parent())})),e(".customize-control-dropdown-select2").each((function(){e(".customize-control-select2").select2({allowClear:!0})})),e(".customize-control-select2").on("change",(function(){var t=e(this).val();e(this).parent().find(".customize-control-dropdown-select2").val(t).trigger("change")})),e(".google-fonts-list").each((function(t,n){e(n).hasClass("select2-hidden-accessible")||e(n).select2()})),e(".google-fonts-list").on("change",(function(){var t=e(this).parent().parent().find(".google-fonts-regularweight-style"),n=e(this).parent().parent().find(".google-fonts-italicweight-style"),i=e(this).parent().parent().find(".google-fonts-boldweight-style"),o=e(this).val(),s=e(this).attr("control-name"),a=0,l=0;t.empty(),n.empty(),i.empty(),n.prop("disabled",!1),i.prop("disabled",!1);var c=_wpCustomizeSettings.controls[s],u=e.map(c.mtmfontslist,(function(e,t){if(e.family===o)return t})),d=u[0];e.each(c.mtmfontslist[d].variants,(function(r,o){t.append(e("").val(o).html(o)),o.indexOf("italic")>=0?(n.append(e("").val(o).html(o)),a++):(i.append(e("").val(o).html(o)),l++)})),0==a&&(n.append(e("").val("").html("Not Available for this font")),n.prop("disabled","disabled")),0==l&&(i.append(e("").val("").html("Not Available for this font")),i.prop("disabled","disabled")),e(this).parent().parent().find(".google-fonts-category").val(c.mtmfontslist[d].category),r(e(this).parent().parent())})),e(".google_fonts_select_control select").on("change",(function(){r(e(this).parent().parent())})),e(".customize-control-tinymce-editor").each((function(){var t=_wpCustomizeSettings.controls[e(this).attr("id")].mtmtinymcetoolbar1,n=_wpCustomizeSettings.controls[e(this).attr("id")].mtmtinymcetoolbar2,i=_wpCustomizeSettings.controls[e(this).attr("id")].mtmmediabuttons;wp.editor.initialize(e(this).attr("id"),{tinymce:{wpautop:!0,toolbar1:t,toolbar2:n},quicktags:!0,mediaButtons:i})})),e(document).on("tinymce-editor-init",(function(t,n){n.on("change",(function(t){tinyMCE.triggerSave(),e("#"+n.id).trigger("change")}))})),e(".alpha-color-control").each((function(){var t,n,i,r,l,c,u,d,p;t=e(this),n=t.val().replace(/\s+/g,""),i=t.attr("data-palette"),r=t.attr("data-show-opacity"),l=t.attr("data-default-color"),c={change:function(e,n){var i,r,s;i=t.attr("data-customize-setting-link"),r=t.wpColorPicker("color"),l==r&&(s=o(r),d.find(".ui-slider-handle").text(s)),wp.customize(i,(function(e){e.set(r)})),u.find(".transparency").css("background-color",n.color.toString("no-alpha"))},palettes:-1!==i.indexOf("|")?i.split("|"):"false"!=i},t.wpColorPicker(c),u=t.parents(".wp-picker-container:first"),e('
').appendTo(u.find(".wp-picker-holder")),d=u.find(".alpha-slider"),p={create:function(t,i){var r=e(this).slider("value");e(this).find(".ui-slider-handle").text(r),e(this).siblings(".transparency ").css("background-color",n)},value:o(n),range:"max",step:1,min:0,max:100,animate:300},d.slider(p),"true"==r&&d.find(".ui-slider-handle").addClass("show-opacity"),u.find(".min-click-zone").on("click",(function(){s(0,t,d,!0)})),u.find(".max-click-zone").on("click",(function(){s(100,t,d,!0)})),u.find(".iris-palette").on("click",(function(){var n,i;a(i=o(n=e(this).css("background-color")),d),100!=i&&(n=n.replace(/[^,]+(?=\))/,(i/100).toFixed(2))),t.wpColorPicker("color",n)})),u.find(".button.wp-picker-clear").on("click",(function(){var e=t.attr("data-customize-setting-link");t.wpColorPicker("color","#ffffff"),wp.customize(e,(function(e){e.set("")})),a(100,d)})),u.find(".button.wp-picker-default").on("click",(function(){a(o(l),d)})),t.on("input",(function(){a(o(e(this).val()),d)})),d.slider().on("slide",(function(n,i){s(parseFloat(i.value)/100,t,d,!1),e(this).find(".ui-slider-handle").text(i.value)}))})),Color.prototype.toString=function(e){if("no-alpha"==e)return this.toCSS("rgba","1").replace(/\s+/g,"");if(1>this._alpha)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var n=6-t.length-1;n>=0;n--)t="0"+t;return"#"+t}})),jQuery,(s=wp.customize).sectionConstructor["mtm-upsell"]=s.Section.extend({attachEvents:function(){},isContextuallyActive:function(){return!0}}),r=[n(567)],void 0===(o="function"==typeof(i=function(n){var i=function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var i=n.fn.select2.amd;var r,o,s,l,c,u,d,p,h,f,g,m,v,y,_,w;function b(e,t){return v.call(e,t)}function x(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=g.map,m=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,g.nodeIdCompat&&_.test(e[s])&&(e[s]=e[s].replace(_,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,(function(e){i=i.add(e)})),n=i}t.append(n)},t.__cache={};var r=0;return t.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++r),t=r.toString())),t},t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);t.__cache[r]||(t.__cache[r]={}),t.__cache[r][n]=i},t.GetData=function(n,i){var r=t.GetUniqueElementId(n);return i?t.__cache[r]&&null!=t.__cache[r][i]?t.__cache[r][i]:e(n).data(i):t.__cache[r]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t})),i.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('
    ');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e(''),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});f.append(u),l.append(c),l.append(f)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",(function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())})),n.on("results:append",(function(e){r.append(e.data),n.isOpen()&&r.setClasses()})),n.on("query",(function(e){r.hideMessages(),r.showLoading(e)})),n.on("select",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("open",(function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()})),n.on("close",(function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),n.on("results:select",(function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:n})}})),n.on("results:previous",(function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===i?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}})),n.on("results:next",(function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===n?r.$results.scrollTop(0):othis.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(t,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=r(o):e(n).append(o)},n})),i.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),i.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")})),e.on("disable",(function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,(function(n){var i=e(n.target).closest(".select2");e(".select2.select2-container--open").each((function(){this!=i[0]&&t.GetData(this,"element").select2("close")}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i})),i.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.trigger("focus")}))},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r})),i.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
      '),e},i.prototype.bind=function(t,r){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(e){o.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!o.isDisabled()){var i=e(this).parent(),r=n.GetData(i[0],"data");o.trigger("unselect",{originalEvent:t,data:r})}}))},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('
    • ×
    • ')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i×');n.StoreData(o[0],"data",i),this.$selection.find(".select2-selection__rendered").prepend(o)}},i})),i.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,i,r){var o=this,s=i.id+"-results";e.call(this,i,r),i.on("open",(function(){o.$search.attr("aria-controls",s),o.$search.trigger("focus")})),i.on("close",(function(){o.$search.val(""),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),i.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),i.on("disable",(function(){o.$search.prop("disabled",!0)})),i.on("focus",(function(e){o.$search.trigger("focus")})),i.on("results:focus",(function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),i.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(){i._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected((function(){e.call(i,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){var i=null!=e?e.length:0;0=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),i.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),i.define("select2/dropdown/search",["jquery","../utils"],(function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this,o=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout((function(){r.$search.trigger("focus")}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||r.$search.trigger("focus")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})),n.on("results:focus",(function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}))},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n})),i.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e})),i.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",(function(e){i.lastParams=e,i.loading=!0})),t.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&t){var n=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=n+50&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('
    • '),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),i.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e(""),i=t.call(this);return n.append(i),this.$dropdownContainer=n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)})),e(window).on(o+" "+s+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=lo.bottom+a,p={left:o.left,top:s.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f={top:0,left:0};(e.contains(document.body,h[0])||h[0].isConnected)&&(f=h.offset()),p.top-=f.top,p.left-=f.left,n||i||(r="below"),d||!u||n?!u&&d&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(p.top=s.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(p)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),i.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r})),i.define("select2/compat/utils",["jquery"],(function(e){return{syncCssClasses:function(t,n,i){var r,o,s=[];(r=e.trim(t.attr("class")))&&e((r=""+r).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&s.push(this)})),(r=e.trim(n.attr("class")))&&e((r=""+r).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(o=i(this))&&s.push(o)})),t.attr("class",s.join(" "))}}})),i.define("select2/compat/containerCss",["jquery","./utils"],(function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("containerCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i})),i.define("select2/compat/dropdownCss",["jquery","./utils"],(function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("dropdownCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i})),i.define("select2/compat/initSelection",["jquery"],(function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;this._isInitialized?t.call(this,n):this.initSelection.call(null,this.$element,(function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)}))},t})),i.define("select2/compat/inputData",["jquery","../utils"],(function(e,t){function n(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `';t.find(".sortable").append(n),t.find(".sortable").find(".repeater:last").slideDown("slow",(function(){e(this).find("input").focus()}))}function n(t){var n=t.find(".repeater-input").map((function(){return e(this).val()})).toArray();t.find(".customize-control-sortable-repeater").val(n),t.find(".customize-control-sortable-repeater").trigger("change")}function i(t){var n=t.find(".sortable-pill-checkbox").map((function(){if(e(this).is(":checked"))return e(this).val()})).toArray();t.find(".customize-control-sortable-pill-checkbox").val(n).trigger("change")}function r(e){var t={font:e.find(".google-fonts-list").val(),regularweight:e.find(".google-fonts-regularweight-style").val(),italicweight:e.find(".google-fonts-italicweight-style").val(),boldweight:e.find(".google-fonts-boldweight-style").val(),category:e.find(".google-fonts-category").val()};e.find(".customize-control-google-font-selection").val(JSON.stringify(t)).trigger("change")}function o(e){var t;return(e=e.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(e.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),t=parseInt(t)):t=100,t}function s(e,t,n,i){var r,o,s;r=t.data("a8cIris"),o=t.data("wpWpColorPicker"),r._color._alpha=e,s=r._color.toString(),t.val(s),o.toggler.css({"background-color":s}),i&&a(e,n),t.wpColorPicker("color",s)}function a(e,t){t.slider("value",e),t.find(".ui-slider-handle").text(e.toString())}e(".sortable_repeater_control").each((function(){var n,i=e(this).find(".customize-control-sortable-repeater").val().split(","),r=i.length;if(r>0&&(e(this).find(".repeater-input").val(i[0]),r>1))for(n=1;n1?e(this).parent().slideUp("fast",(function(){var t=e(this).parent().parent();e(this).remove(),n(t)})):(e(this).parent().find(".repeater-input").val(""),n(e(this).parent().parent().parent()))})),e(".customize-control-sortable-repeater-add").click((function(i){i.preventDefault(),t(e(this).parent()),n(e(this).parent())})),e(".sortable_repeater.sortable").change((function(){n(e(this).parent())})),e(".sortable_repeater.sortable").on("blur",".repeater-input",(function(){var t=e(this),n=t.val();n&&!n.match(/^.+:\/\/.*/)&&t.val("https://"+n).trigger("change")})),e(".slider-custom-control").each((function(){var t=e(this).find(".customize-control-slider-value").val(),n=e(this).find(".slider"),i=parseFloat(n.attr("slider-min-value")),r=parseFloat(n.attr("slider-max-value")),o=parseFloat(n.attr("slider-step-value"));n.slider({value:t,min:i,max:r,step:o,change:function(t,n){e(this).parent().find(".customize-control-slider-value").trigger("change")}})})),e(".slider").on("slide",(function(t,n){e(this).parent().find(".customize-control-slider-value").val(n.value)})),e(".slider-reset").on("click",(function(){var t=e(this).attr("slider-reset-value");e(this).parent().find(".customize-control-slider-value").val(t),e(this).parent().find(".slider").slider("value",t)})),e(".customize-control-slider-value").blur((function(){var t=e(this).val(),n=e(this).parent().find(".slider"),i=parseInt(n.attr("slider-min-value")),r=parseInt(n.attr("slider-max-value"));tr&&(t=r,e(this).val(t)),e(this).parent().find(".slider").slider("value",t)})),e(".single-accordion-toggle").click((function(){var t=e(this);e(this).parent().find(".single-accordion").slideToggle("slow",(function(){t.toggleClass("single-accordion-toggle-rotate",e(this).is(":visible"))}))})),e(".multi-image-checkbox").on("change",(function(){var t,n;n=(t=e(this).parent().parent()).find(".multi-image-checkbox").map((function(){if(e(this).is(":checked"))return e(this).val()})).toArray(),t.find(".customize-control-multi-image-checkbox").val(n).trigger("change")})),e(".pill_checkbox_control .sortable").sortable({placeholder:"pill-ui-state-highlight",update:function(t,n){i(e(this).parent())}}),e(".pill_checkbox_control .sortable-pill-checkbox").on("change",(function(){i(e(this).parent().parent().parent())})),e(".customize-control-dropdown-select2").each((function(){e(".customize-control-select2").select2({allowClear:!0})})),e(".customize-control-select2").on("change",(function(){var t=e(this).val();e(this).parent().find(".customize-control-dropdown-select2").val(t).trigger("change")})),e(".google-fonts-list").each((function(t,n){e(n).hasClass("select2-hidden-accessible")||e(n).select2()})),e(".google-fonts-list").on("change",(function(){var t=e(this).parent().parent().find(".google-fonts-regularweight-style"),n=e(this).parent().parent().find(".google-fonts-italicweight-style"),i=e(this).parent().parent().find(".google-fonts-boldweight-style"),o=e(this).val(),s=e(this).attr("control-name"),a=0,l=0;t.empty(),n.empty(),i.empty(),n.prop("disabled",!1),i.prop("disabled",!1);var c=_wpCustomizeSettings.controls[s],u=e.map(c.mtmfontslist,(function(e,t){if(e.family===o)return t})),d=u[0];e.each(c.mtmfontslist[d].variants,(function(r,o){t.append(e("").val(o).html(o)),o.indexOf("italic")>=0?(n.append(e("").val(o).html(o)),a++):(i.append(e("").val(o).html(o)),l++)})),0==a&&(n.append(e("").val("").html("Not Available for this font")),n.prop("disabled","disabled")),0==l&&(i.append(e("").val("").html("Not Available for this font")),i.prop("disabled","disabled")),e(this).parent().parent().find(".google-fonts-category").val(c.mtmfontslist[d].category),r(e(this).parent().parent())})),e(".google_fonts_select_control select").on("change",(function(){r(e(this).parent().parent())})),e(".customize-control-tinymce-editor").each((function(){var t=_wpCustomizeSettings.controls[e(this).attr("id")].mtmtinymcetoolbar1,n=_wpCustomizeSettings.controls[e(this).attr("id")].mtmtinymcetoolbar2,i=_wpCustomizeSettings.controls[e(this).attr("id")].mtmmediabuttons;wp.editor.initialize(e(this).attr("id"),{tinymce:{wpautop:!0,toolbar1:t,toolbar2:n},quicktags:!0,mediaButtons:i})})),e(document).on("tinymce-editor-init",(function(t,n){n.on("change",(function(t){tinyMCE.triggerSave(),e("#"+n.id).trigger("change")}))})),e(".alpha-color-control").each((function(){var t,n,i,r,l,c,u,d,p;t=e(this),n=t.val().replace(/\s+/g,""),i=t.attr("data-palette"),r=t.attr("data-show-opacity"),l=t.attr("data-default-color"),c={change:function(e,n){var i,r,s;i=t.attr("data-customize-setting-link"),r=t.wpColorPicker("color"),l==r&&(s=o(r),d.find(".ui-slider-handle").text(s)),wp.customize(i,(function(e){e.set(r)})),u.find(".transparency").css("background-color",n.color.toString("no-alpha"))},palettes:-1!==i.indexOf("|")?i.split("|"):"false"!=i},t.wpColorPicker(c),u=t.parents(".wp-picker-container:first"),e('
      ').appendTo(u.find(".wp-picker-holder")),d=u.find(".alpha-slider"),p={create:function(t,i){var r=e(this).slider("value");e(this).find(".ui-slider-handle").text(r),e(this).siblings(".transparency ").css("background-color",n)},value:o(n),range:"max",step:1,min:0,max:100,animate:300},d.slider(p),"true"==r&&d.find(".ui-slider-handle").addClass("show-opacity"),u.find(".min-click-zone").on("click",(function(){s(0,t,d,!0)})),u.find(".max-click-zone").on("click",(function(){s(100,t,d,!0)})),u.find(".iris-palette").on("click",(function(){var n,i;a(i=o(n=e(this).css("background-color")),d),100!=i&&(n=n.replace(/[^,]+(?=\))/,(i/100).toFixed(2))),t.wpColorPicker("color",n)})),u.find(".button.wp-picker-clear").on("click",(function(){var e=t.attr("data-customize-setting-link");t.wpColorPicker("color","#ffffff"),wp.customize(e,(function(e){e.set("")})),a(100,d)})),u.find(".button.wp-picker-default").on("click",(function(){a(o(l),d)})),t.on("input",(function(){a(o(e(this).val()),d)})),d.slider().on("slide",(function(n,i){s(parseFloat(i.value)/100,t,d,!1),e(this).find(".ui-slider-handle").text(i.value)}))})),Color.prototype.toString=function(e){if("no-alpha"==e)return this.toCSS("rgba","1").replace(/\s+/g,"");if(1>this._alpha)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var n=6-t.length-1;n>=0;n--)t="0"+t;return"#"+t}})),jQuery,(s=wp.customize).sectionConstructor["mtm-upsell"]=s.Section.extend({attachEvents:function(){},isContextuallyActive:function(){return!0}}),r=[n(567)],void 0===(o="function"==typeof(i=function(n){var i=function(){if(n&&n.fn&&n.fn.select2&&n.fn.select2.amd)var i=n.fn.select2.amd;var r,o,s,l,c,u,d,p,h,f,g,m,v,y,_,w;function b(e,t){return v.call(e,t)}function x(e,t){var n,i,r,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=g.map,m=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,g.nodeIdCompat&&_.test(e[s])&&(e[s]=e[s].replace(_,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,(function(e){i=i.add(e)})),n=i}t.append(n)},t.__cache={};var r=0;return t.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++r),t=r.toString())),t},t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);t.__cache[r]||(t.__cache[r]={}),t.__cache[r][n]=i},t.GetData=function(n,i){var r=t.GetUniqueElementId(n);return i?t.__cache[r]&&null!=t.__cache[r][i]?t.__cache[r][i]:e(n).data(i):t.__cache[r]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t})),i.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('
        ');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e(''),r=this.options.get("translations").get(t.message);i.append(n(r(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});f.append(u),l.append(c),l.append(f)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n,i){var r=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",(function(e){r.clear(),r.append(e.data),n.isOpen()&&(r.setClasses(),r.highlightFirstItem())})),n.on("results:append",(function(e){r.append(e.data),n.isOpen()&&r.setClasses()})),n.on("query",(function(e){r.hideMessages(),r.showLoading(e)})),n.on("select",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())})),n.on("open",(function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()})),n.on("close",(function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),n.on("results:select",(function(){var e=r.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:n})}})),n.on("results:previous",(function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var i=n-1;0===e.length&&(i=0);var o=t.eq(i);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===i?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}})),n.on("results:next",(function(){var e=r.getHighlightedResults(),t=r.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===n?r.$results.scrollTop(0):othis.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=i(t,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=r(o):e(n).append(o)},n})),i.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),i.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n},i.prototype.bind=function(e,t){var i=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",r),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")})),e.on("disable",(function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,(function(n){var i=e(n.target).closest(".select2");e(".select2.select2-container--open").each((function(){this!=i[0]&&t.GetData(this,"element").select2("close")}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i})),i.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.trigger("focus")}))},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;r?n.attr("title",r):n.removeAttr("title")}else this.clear()},r})),i.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
          '),e},i.prototype.bind=function(t,r){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(e){o.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!o.isDisabled()){var i=e(this).parent(),r=n.GetData(i[0],"data");o.trigger("unselect",{originalEvent:t,data:r})}}))},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('
        • ×
        • ')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i×');n.StoreData(o[0],"data",i),this.$selection.find(".select2-selection__rendered").prepend(o)}},i})),i.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,i,r){var o=this,s=i.id+"-results";e.call(this,i,r),i.on("open",(function(){o.$search.attr("aria-controls",s),o.$search.trigger("focus")})),i.on("close",(function(){o.$search.val(""),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),i.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),i.on("disable",(function(){o.$search.prop("disabled",!0)})),i.on("focus",(function(e){o.$search.trigger("focus")})),i.on("results:focus",(function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),i.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(){i._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected((function(){e.call(i,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){var i=null!=e?e.length:0;0=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),i.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),i.define("select2/dropdown/search",["jquery","../utils"],(function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var r=this,o=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){r.handleSearch(e)})),n.on("open",(function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout((function(){r.$search.trigger("focus")}),0)})),n.on("close",(function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||r.$search.trigger("focus")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})),n.on("results:focus",(function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}))},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n})),i.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e})),i.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",(function(e){i.lastParams=e,i.loading=!0})),t.on("query:append",(function(e){i.lastParams=e,i.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&t){var n=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=n+50&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('
        • '),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),i.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e(""),i=t.call(this);return n.append(i),this.$dropdownContainer=n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var r=this,o="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),l.on(o,(function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)})),e(window).on(o+" "+s+" "+a,(function(e){r._positionDropdown(),r._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id,o="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(r),e(window).off(r+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=lo.bottom+a,p={left:o.left,top:s.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f={top:0,left:0};(e.contains(document.body,h[0])||h[0].isConnected)&&(f=h.offset()),p.top-=f.top,p.left-=f.left,n||i||(r="below"),d||!u||n?!u&&d&&n&&(r="below"):r="above",("above"==r||n&&"below"!==r)&&(p.top=s.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(p)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),i.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},r})),i.define("select2/compat/utils",["jquery"],(function(e){return{syncCssClasses:function(t,n,i){var r,o,s=[];(r=e.trim(t.attr("class")))&&e((r=""+r).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&s.push(this)})),(r=e.trim(n.attr("class")))&&e((r=""+r).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(o=i(this))&&s.push(o)})),t.attr("class",s.join(" "))}}})),i.define("select2/compat/containerCss",["jquery","./utils"],(function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("containerCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i})),i.define("select2/compat/dropdownCss",["jquery","./utils"],(function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var r=i.call(this),o=this.options.get("dropdownCssClass")||"";e.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},i})),i.define("select2/compat/initSelection",["jquery"],(function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;this._isInitialized?t.call(this,n):this.initSelection.call(null,this.$element,(function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)}))},t})),i.define("select2/compat/inputData",["jquery","../utils"],(function(e,t){function n(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `