!function(){var t={482:function(){!function(t){var e=acf.Field.extend({type:"flexible_content",wait:"",events:{'click [data-name="add-layout"]':"onClickAdd",'click [data-name="duplicate-layout"]':"onClickDuplicate",'click [data-name="remove-layout"]':"onClickRemove",'click [data-name="collapse-layout"]':"onClickCollapse",showField:"onShow",unloadField:"onUnload",mouseover:"onHover"},$control:function(){return this.$(".acf-flexible-content:first")},$layoutsWrap:function(){return this.$(".acf-flexible-content:first > .values")},$layouts:function(){return this.$(".acf-flexible-content:first > .values > .layout")},$layout:function(t){return this.$(".acf-flexible-content:first > .values > .layout:eq("+t+")")},$clonesWrap:function(){return this.$(".acf-flexible-content:first > .clones")},$clones:function(){return this.$(".acf-flexible-content:first > .clones > .layout")},$clone:function(t){return this.$('.acf-flexible-content:first > .clones > .layout[data-layout="'+t+'"]')},$actions:function(){return this.$(".acf-actions:last")},$button:function(){return this.$(".acf-actions:last .button")},$popup:function(){return this.$(".tmpl-popup:last")},getPopupHTML:function(){var e=this.$popup().html(),a=t(e),i=this.$layouts();return a.find("[data-layout]").each((function(){var e=t(this),a=e.data("min")||0,n=e.data("max")||0,o=e.data("layout")||"",s=function(e){return i.filter((function(){return t(this).data("layout")===e})).length}(o);if(n&&s>=n)e.addClass("disabled");else if(a&&s'+r+"")}})),a.outerHTML()},getValue:function(){return this.$layouts().length},allowRemove:function(){var t=parseInt(this.get("min"));return!t||tthis.val()},isFull:function(){var t=parseInt(this.get("max"));return t&&this.val()>=t},addSortable:function(t){1!=this.get("max")&&this.$layoutsWrap().sortable({items:"> .layout",handle:"> .acf-fc-layout-handle",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,stop:function(e,a){t.render()},update:function(e,a){t.$input().trigger("change")}})},addCollapsed:function(){var e=i.load(this.get("key"));if(!e)return!1;this.$layouts().each((function(a){e.indexOf(a)>-1&&t(this).addClass("-collapsed")}))},addUnscopedEvents:function(e){this.on("invalidField",".layout",(function(a){e.onInvalidField(a,t(this))}))},initialize:function(){this.addUnscopedEvents(this),this.addCollapsed(),acf.disable(this.$clonesWrap(),this.cid),this.render()},render:function(){this.$layouts().each((function(e){t(this).find(".acf-fc-layout-order:first").html(e+1)})),0==this.val()?this.$control().addClass("-empty"):this.$control().removeClass("-empty"),this.isFull()?this.$button().addClass("disabled"):this.$button().removeClass("disabled")},onShow:function(t,e,a){var i=acf.getFields({is:":visible",parent:this.$el});acf.doAction("show_fields",i)},validateAdd:function(){if(this.allowAdd())return!0;var t=this.get("max"),e=acf.__("This field has a limit of {max} {label} {identifier}"),a=acf._n("layout","layouts",t);return e=(e=(e=e.replace("{max}",t)).replace("{label}","")).replace("{identifier}",a),this.showNotice({text:e,type:"warning"}),!1},onClickAdd:function(t,e){if(!this.validateAdd())return!1;var i=null;e.hasClass("acf-icon")&&(i=e.closest(".layout")).addClass("-hover");var n=new a({target:e,targetConfirm:!1,text:this.getPopupHTML(),context:this,confirm:function(t,e){e.hasClass("disabled")||this.add({layout:e.data("layout"),before:i})},cancel:function(){i&&i.removeClass("-hover")}});n.on("click","[data-layout]","onConfirm")},add:function(t){if(t=acf.parseArgs(t,{layout:"",before:!1}),!this.allowAdd())return!1;var e=acf.duplicate({target:this.$clone(t.layout),append:this.proxy((function(e,a){t.before?t.before.before(a):this.$layoutsWrap().append(a),acf.enable(a,this.cid),this.render()}))});return this.$input().trigger("change"),e},onClickDuplicate:function(t,e){if(!this.validateAdd())return!1;var a=e.closest(".layout");this.duplicateLayout(a)},duplicateLayout:function(t){if(!this.allowAdd())return!1;var e=this.get("key"),a=acf.duplicate({target:t,rename:function(t,a,i,n){return"id"===t?a.replace(e+"-"+i,e+"-"+n):a.replace(e+"]["+i,e+"]["+n)},before:function(t){acf.doAction("unmount",t)},after:function(t,e){acf.doAction("remount",t)}});return this.$input().trigger("change"),this.render(),acf.focusAttention(a),a},validateRemove:function(){if(this.allowRemove())return!0;var t=this.get("min"),e=acf.__("This field requires at least {min} {label} {identifier}"),a=acf._n("layout","layouts",t);return e=(e=(e=e.replace("{min}",t)).replace("{label}","")).replace("{identifier}",a),this.showNotice({text:e,type:"warning"}),!1},onClickRemove:function(t,e){var a=e.closest(".layout");if(t.shiftKey)return this.removeLayout(a);a.addClass("-hover"),acf.newTooltip({confirmRemove:!0,target:e,context:this,confirm:function(){this.removeLayout(a)},cancel:function(){a.removeClass("-hover")}})},removeLayout:function(t){var e=this,a=1==this.getValue()?60:0;acf.remove({target:t,endHeight:a,complete:function(){e.$input().trigger("change"),e.render()}})},onClickCollapse:function(t,e){var a=e.closest(".layout");this.isLayoutClosed(a)?this.openLayout(a):this.closeLayout(a)},isLayoutClosed:function(t){return t.hasClass("-collapsed")},openLayout:function(t){t.removeClass("-collapsed"),acf.doAction("show",t,"collapse")},closeLayout:function(t){t.addClass("-collapsed"),acf.doAction("hide",t,"collapse"),this.renderLayout(t)},renderLayout:function(e){var a=e.children("input").attr("name").replace("[acf_fc_layout]",""),i={action:"acf/fields/flexible_content/layout_title",field_key:this.get("key"),i:e.index(),layout:e.data("layout"),value:acf.serialize(e,a)};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(i),dataType:"html",type:"post",success:function(t){t&&e.children(".acf-fc-layout-handle").html(t)}})},onUnload:function(){var e=[];this.$layouts().each((function(a){t(this).hasClass("-collapsed")&&e.push(a)})),e=e.length?e:null,i.save(this.get("key"),e)},onInvalidField:function(t,e){this.isLayoutClosed(e)&&this.openLayout(e)},onHover:function(){this.addSortable(this),this.off("mouseover")}});acf.registerFieldType(e);var a=acf.models.TooltipConfirm.extend({events:{"click [data-layout]":"onConfirm",'click [data-event="cancel"]':"onCancel"},render:function(){this.html(this.get("text")),this.$el.addClass("acf-fc-popup")}});acf.registerConditionForFieldType("hasValue","flexible_content"),acf.registerConditionForFieldType("hasNoValue","flexible_content"),acf.registerConditionForFieldType("lessThan","flexible_content"),acf.registerConditionForFieldType("greaterThan","flexible_content");var i=new acf.Model({name:"this.collapsedLayouts",key:function(t,e){var a=this.get(t+e)||0;return a++,this.set(t+e,a,!0),a>1&&(t+="-"+a),t},load:function(t){t=this.key(t,"load");var e=acf.getPreference(this.name);return!(!e||!e[t])&&e[t]},save:function(e,a){e=this.key(e,"save");var i=acf.getPreference(this.name)||{};null===a?delete i[e]:i[e]=a,t.isEmptyObject(i)&&(i=null),acf.setPreference(this.name,i)}})}(jQuery)},925:function(){var t,e;t=jQuery,e=acf.Field.extend({type:"gallery",events:{"click .acf-gallery-add":"onClickAdd","click .acf-gallery-edit":"onClickEdit","click .acf-gallery-remove":"onClickRemove","click .acf-gallery-attachment":"onClickSelect","click .acf-gallery-close":"onClickClose","change .acf-gallery-sort":"onChangeSort","click .acf-gallery-update":"onUpdate",mouseover:"onHover",showField:"render"},actions:{validation_begin:"onValidationBegin",validation_failure:"onValidationFailure",resize:"onResize"},onValidationBegin:function(){acf.disable(this.$sideData(),this.cid)},onValidationFailure:function(){acf.enable(this.$sideData(),this.cid)},$control:function(){return this.$(".acf-gallery")},$collection:function(){return this.$(".acf-gallery-attachments")},$attachments:function(){return this.$(".acf-gallery-attachment")},$attachment:function(t){return this.$('.acf-gallery-attachment[data-id="'+t+'"]')},$active:function(){return this.$(".acf-gallery-attachment.active")},$main:function(){return this.$(".acf-gallery-main")},$side:function(){return this.$(".acf-gallery-side")},$sideData:function(){return this.$(".acf-gallery-side-data")},isFull:function(){var t=parseInt(this.get("max")),e=this.$attachments().length;return t&&e>=t},getValue:function(){var e=[];return this.$attachments().each((function(){e.push(t(this).data("id"))})),!!e.length&&e},addUnscopedEvents:function(e){this.on("change",".acf-gallery-side",(function(a){e.onUpdate(a,t(this))}))},addSortable:function(t){this.$collection().sortable({items:".acf-gallery-attachment",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,start:function(t,e){e.placeholder.html(e.item.html()),e.placeholder.removeAttr("style")},update:function(e,a){t.$input().trigger("change")}}),this.$control().resizable({handles:"s",minHeight:200,stop:function(t,e){acf.update_user_setting("gallery_height",e.size.height)}})},initialize:function(){this.addUnscopedEvents(this),this.render()},render:function(){var t=this.$(".acf-gallery-sort"),e=this.$(".acf-gallery-add"),a=this.$attachments().length;this.isFull()?e.addClass("disabled"):e.removeClass("disabled"),a?t.removeClass("disabled"):t.addClass("disabled"),this.resize()},resize:function(){var t=this.$control().width(),e=Math.round(t/150);e=Math.min(e,8),this.$control().attr("data-columns",e)},onResize:function(){this.resize()},openSidebar:function(){this.$control().addClass("-open");var t=this.$control().width()/3;t=parseInt(t),t=Math.max(t,350),this.$(".acf-gallery-side-inner").css({width:t-1}),this.$side().animate({width:t-1},250),this.$main().animate({right:t},250)},closeSidebar:function(){this.$control().removeClass("-open"),this.$active().removeClass("active"),acf.disable(this.$side());var t=this.$(".acf-gallery-side-data");this.$main().animate({right:0},250),this.$side().animate({width:0},250,(function(){t.html("")}))},onClickAdd:function(e,a){this.isFull()?this.showNotice({text:acf.__("Maximum selection reached"),type:"warning"}):acf.newMediaPopup({mode:"select",title:acf.__("Add Image to Gallery"),field:this.get("key"),multiple:"add",library:this.get("library"),allowedTypes:this.get("mime_types"),selected:this.val(),select:t.proxy((function(t,e){this.appendAttachment(t,e)}),this)})},appendAttachment:function(e,a){if(e=this.validateAttachment(e),!this.isFull()&&!this.$attachment(e.id).length){var i=['"].join(""),n=t(i);if(this.$collection().append(n),"prepend"===this.get("insert")){var o=this.$attachments().eq(a);o.length&&o.before(n)}this.renderAttachment(e),this.render(),this.$input().trigger("change")}},validateAttachment:function(t){if((t=acf.parseArgs(t,{id:"",url:"",alt:"",title:"",filename:"",type:"image"})).attributes){t=t.attributes;var e=acf.isget(t,"sizes",this.get("preview_size"),"url");null!==e&&(t.url=e)}return t},renderAttachment:function(t){t=this.validateAttachment(t);var e=this.$attachment(t.id);if("image"==t.type)e.find(".filename").remove();else{var a=acf.isget(t,"image","src");null!==a&&(t.url=a),e.find(".filename").text(t.filename)}t.url||(t.url=acf.get("mimeTypeIcon"),e.addClass("-icon")),e.find("img").attr({src:t.url,alt:t.alt,title:t.title}),acf.val(e.find("input"),t.id)},editAttachment:function(e){acf.newMediaPopup({mode:"edit",title:acf.__("Edit Image"),button:acf.__("Update Image"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.renderAttachment(t)}),this)})},onClickEdit:function(t,e){var a=e.data("id");a&&this.editAttachment(a)},removeAttachment:function(t){this.closeSidebar(),this.$attachment(t).remove(),this.render(),this.$input().trigger("change")},onClickRemove:function(t,e){t.preventDefault(),t.stopPropagation();var a=e.data("id");a&&this.removeAttachment(a)},selectAttachment:function(e){var a=this.$attachment(e);if(!a.hasClass("active")){var i=this.proxy((function(){this.$side().find(":focus").trigger("blur"),this.$active().removeClass("active"),a.addClass("active"),this.openSidebar(),n()})),n=this.proxy((function(){var a={action:"acf/fields/gallery/get_attachment",field_key:this.get("key"),id:e};this.has("xhr")&&this.get("xhr").abort(),acf.showLoading(this.$sideData());var i=t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"html",cache:!1,success:o});this.set("xhr",i)})),o=this.proxy((function(t){if(t){var e=this.$sideData();e.html(t),e.find(".compat-field-acf-form-data").remove(),e.find("> table.form-table > tbody").append(e.find("> .compat-attachment-fields > tbody > tr")),acf.doAction("append",e)}}));i()}},onClickSelect:function(t,e){var a=e.data("id");a&&this.selectAttachment(a)},onClickClose:function(t,e){this.closeSidebar()},onChangeSort:function(e,a){if(!a.hasClass("disabled")){var i=a.val();if(i){var n=[];this.$attachments().each((function(){n.push(t(this).data("id"))}));var o=this.proxy((function(){var e={action:"acf/fields/gallery/get_sort_order",field_key:this.get("key"),ids:n,sort:i};t.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",cache:!1,data:acf.prepareForAjax(e),success:s})})),s=this.proxy((function(t){acf.isAjaxSuccess(t)&&(t.data.reverse(),t.data.map((function(t){this.$collection().prepend(this.$attachment(t))}),this))}));o()}}},onUpdate:function(e,a){var i=this.$(".acf-gallery-update");if(!i.hasClass("disabled")){var n=acf.serialize(this.$sideData());i.addClass("disabled"),i.before(' '),n.action="acf/fields/gallery/update_attachment",t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(n),type:"post",dataType:"json",complete:function(){i.removeClass("disabled"),i.prev(".acf-loading").remove()}})}},onHover:function(){this.addSortable(this),this.off("mouseover")}}),acf.registerFieldType(e),acf.registerConditionForFieldType("hasValue","gallery"),acf.registerConditionForFieldType("hasNoValue","gallery"),acf.registerConditionForFieldType("selectionLessThan","gallery"),acf.registerConditionForFieldType("selectionGreaterThan","gallery")},945:function(){!function(t){var e=acf.Field.extend({type:"repeater",wait:"",events:{'click a[data-event="add-row"]':"onClickAdd",'click a[data-event="duplicate-row"]':"onClickDuplicate",'click a[data-event="remove-row"]':"onClickRemove",'click a[data-event="collapse-row"]':"onClickCollapse",showField:"onShow",unloadField:"onUnload",mouseover:"onHover",unloadField:"onUnload"},$control:function(){return this.$(".acf-repeater:first")},$table:function(){return this.$("table:first")},$tbody:function(){return this.$("tbody:first")},$rows:function(){return this.$("tbody:first > tr").not(".acf-clone")},$row:function(t){return this.$("tbody:first > tr:eq("+t+")")},$clone:function(){return this.$("tbody:first > tr.acf-clone")},$actions:function(){return this.$(".acf-actions:last")},$button:function(){return this.$(".acf-actions:last .button")},getValue:function(){return this.$rows().length},allowRemove:function(){var t=parseInt(this.get("min"));return!t||tthis.val()},addSortable:function(t){1!=this.get("max")&&this.$tbody().sortable({items:"> tr",handle:"> td.order",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,stop:function(e,a){t.render()},update:function(e,a){t.$input().trigger("change")}})},addCollapsed:function(){var e=a.load(this.get("key"));if(!e)return!1;this.$rows().each((function(a){e.indexOf(a)>-1&&t(this).find(".-collapsed-target").length&&t(this).addClass("-collapsed")}))},addUnscopedEvents:function(e){this.on("invalidField",".acf-row",(function(a){var i=t(this);e.isCollapsed(i)&&e.expand(i)}))},initialize:function(){this.addUnscopedEvents(this),this.addCollapsed(),acf.disable(this.$clone(),this.cid),this.render()},render:function(){this.$rows().each((function(e){t(this).find("> .order > span").html(e+1)}));var e=this.$control(),a=this.$button();0==this.val()?e.addClass("-empty"):e.removeClass("-empty"),this.allowAdd()?(e.removeClass("-max"),a.removeClass("disabled")):(e.addClass("-max"),a.addClass("disabled"))},validateAdd:function(){if(this.allowAdd())return!0;var t=this.get("max"),e=acf.__("Maximum rows reached ({max} rows)");return e=e.replace("{max}",t),this.showNotice({text:e,type:"warning"}),!1},onClickAdd:function(t,e){if(!this.validateAdd())return!1;e.hasClass("acf-icon")?this.add({before:e.closest(".acf-row")}):this.add()},add:function(t){if(!this.allowAdd())return!1;t=acf.parseArgs(t,{before:!1});var e=acf.duplicate({target:this.$clone(),append:this.proxy((function(e,a){t.before?t.before.before(a):e.before(a),a.removeClass("acf-clone"),acf.enable(a,this.cid),this.render()}))});return this.$input().trigger("change"),e},onClickDuplicate:function(t,e){if(!this.validateAdd())return!1;var a=e.closest(".acf-row");this.duplicateRow(a)},duplicateRow:function(t){if(!this.allowAdd())return!1;var e=this.get("key"),a=acf.duplicate({target:t,rename:function(t,a,i,n){return"id"===t?a.replace(e+"-"+i,e+"-"+n):a.replace(e+"]["+i,e+"]["+n)},before:function(t){acf.doAction("unmount",t)},after:function(t,e){acf.doAction("remount",t)}});return this.$input().trigger("change"),this.render(),acf.focusAttention(a),a},validateRemove:function(){if(this.allowRemove())return!0;var t=this.get("min"),e=acf.__("Minimum rows reached ({min} rows)");return e=e.replace("{min}",t),this.showNotice({text:e,type:"warning"}),!1},onClickRemove:function(t,e){var a=e.closest(".acf-row");if(t.shiftKey)return this.remove(a);a.addClass("-hover"),acf.newTooltip({confirmRemove:!0,target:e,context:this,confirm:function(){this.remove(a)},cancel:function(){a.removeClass("-hover")}})},remove:function(t){var e=this;acf.remove({target:t,endHeight:0,complete:function(){e.$input().trigger("change"),e.render()}})},isCollapsed:function(t){return t.hasClass("-collapsed")},collapse:function(t){t.addClass("-collapsed"),acf.doAction("hide",t,"collapse")},expand:function(t){t.removeClass("-collapsed"),acf.doAction("show",t,"collapse")},onClickCollapse:function(t,e){var a=e.closest(".acf-row"),i=this.isCollapsed(a);t.shiftKey&&(a=this.$rows()),i?this.expand(a):this.collapse(a)},onShow:function(t,e,a){var i=acf.getFields({is:":visible",parent:this.$el});acf.doAction("show_fields",i)},onUnload:function(){var e=[];this.$rows().each((function(a){t(this).hasClass("-collapsed")&&e.push(a)})),e=e.length?e:null,a.save(this.get("key"),e)},onHover:function(){this.addSortable(this),this.off("mouseover")}});acf.registerFieldType(e),acf.registerConditionForFieldType("hasValue","repeater"),acf.registerConditionForFieldType("hasNoValue","repeater"),acf.registerConditionForFieldType("lessThan","repeater"),acf.registerConditionForFieldType("greaterThan","repeater");var a=new acf.Model({name:"this.collapsedRows",key:function(t,e){var a=this.get(t+e)||0;return a++,this.set(t+e,a,!0),a>1&&(t+="-"+a),t},load:function(t){t=this.key(t,"load");var e=acf.getPreference(this.name);return!(!e||!e[t])&&e[t]},save:function(e,a){e=this.key(e,"save");var i=acf.getPreference(this.name)||{};null===a?delete i[e]:i[e]=a,t.isEmptyObject(i)&&(i=null),acf.setPreference(this.name,i)}})}(jQuery)}},e={};function a(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,a),o.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";a(945),a(482),a(925)}()}();