/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0 +~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndexif(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML=" ";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNodereturn e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0 ":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1 :\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1 )[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e \x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML=" ",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML=" ",v.option=!!ce.lastChild;var ge={thead:[1," ","
"],col:[2," ","
"],tr:[2," ","
"],td:[3," ","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n "," "]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d \s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n ").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1 ").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 ");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1> ")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditionalreturn void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s}); ; // this part of the code is deprecated and will be removed in a later version // therefore jQuery usage will be not rewritten // turn of the deprecated standard/classic ecommerce feature and this code will not execute jQuery(function() { jQuery( document ).on( 'click', '.add_to_cart_button:not(.product_type_variable, .product_type_grouped, .single_add_to_cart_button)', function() { var productdata = jQuery( this ).closest( '.product' ).find( '.gtm4wp_productdata' ); window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.addProductToCart', 'productName': productdata.data( 'gtm4wp_product_name' ), 'productSKU': jQuery( this ).data( 'product_sku' ), 'productID': jQuery( this ).data( 'product_id' ), }); }); jQuery( document ).on( 'click', '.single_add_to_cart_button', function() { var _product_form = jQuery( this ).closest( 'form.cart' ); var _product_id = jQuery( '[name=gtm4wp_id]', _product_form ).val(); var _product_name = jQuery( '[name=gtm4wp_name]', _product_form ).val(); var _product_sku = jQuery( '[name=gtm4wp_sku]', _product_form ).val(); var _product_is_grouped = jQuery( _product_form ).hasClass( 'grouped_form' ); if ( ! _product_is_grouped ) { window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.addProductToCart', 'productName': _product_name, 'productSKU': _product_sku, 'productID': _product_id }); } }); }); ; window.gtm4wp_last_selected_product_variation; window.gtm4wp_changedetail_fired_during_pageload=false; window.gtm4wp_is_cart = false; window.gtm4wp_is_checkout = false; window.gtm4wp_checkout_step_fired = []; // step 1 will be the billing section which is reported during pageload, no need to handle here window.gtm4wp_shipping_payment_method_step_offset = gtm4wp_needs_shipping_address ? 0 : -1; window.gtm4wp_first_container_id = ""; function gtm4wp_map_eec_to_ga4( productdata ) { if ( !productdata ) { return; } const category_path = productdata.category ? productdata.category : ''; const category_parts = category_path.toString().split('/'); // default, required parameters let ga4_product = { 'item_id': productdata.id ? productdata.id : '', 'item_name': productdata.name ? productdata.name : '', 'item_brand': productdata.brand ? productdata.brand : '', 'price': productdata.price ? productdata.price : "" }; // category, also handle category path if ( 1 == category_parts.length ) { ga4_product.item_category = category_parts[0]; } else if ( category_parts.length > 1 ) { ga4_product.item_category = category_parts[0]; for( let i=1; i < Math.min( 5, category_parts.length ); i++ ) { ga4_product[ 'item_category' + (i+1) ] = category_parts[i]; } } // optional parameters which should not be included in the array if not set if ( productdata.variant ) { ga4_product.item_variant = productdata.variant; } if ( productdata.list ) { ga4_product.item_list_name = productdata.list; } if ( productdata.position ) { ga4_product.index = productdata.position; } if ( productdata.quantity ) { ga4_product.quantity = productdata.quantity; } if ( productdata.coupon ) { ga4_product.coupon = productdata.coupon; } ga4_product.google_business_vertical = gtm4wp_business_vertical; ga4_product[ gtm4wp_business_vertical_id ] = gtm4wp_id_prefix + ga4_product[ "item_id" ]; return ga4_product; } function gtm4wp_handle_cart_qty_change() { document.querySelectorAll( '.product-quantity input.qty' ).forEach(function( qty_el ) { const original_value = qty_el.defaultValue; let current_value = parseInt( qty_el.value ); if ( isNaN( current_value ) ) { current_value = original_value; } // is quantity changed changed? if ( original_value != current_value ) { const cart_item_temp = qty_el.closest( '.cart_item' ); const productdata = cart_item_temp && cart_item_temp.querySelector( '.remove' ); if ( !productdata ) { return; } let productprice = productdata.getAttribute( 'data-gtm4wp_product_price' ); if ( typeof productprice == "string" ) { productprice = parseFloat( productprice ); if ( isNaN( productprice ) ) { productprice = 0; } } else if ( typeof productprice != "number" ) { productprice = 0; } // does the quantity increase? if ( original_value < current_value ) { // yes => handle add to cart event const product_data = { 'name': productdata.getAttribute( 'data-gtm4wp_product_name' ), 'id': productdata.getAttribute( 'data-gtm4wp_product_id' ), 'price': productprice.toFixed(2), 'category': productdata.getAttribute( 'data-gtm4wp_product_cat' ), 'variant': productdata.getAttribute( 'data-gtm4wp_product_variant' ), 'stocklevel': productdata.getAttribute( 'data-gtm4wp_product_stocklevel' ), 'brand': productdata.getAttribute( 'data-gtm4wp_product_brand' ), 'quantity': current_value - original_value }; // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.addProductToCartEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'add': { 'products': [ product_data ] } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'add_to_cart', 'ecommerce': { 'currency': gtm4wp_currency, // ga4 version 'value': productprice.toFixed(2) * (current_value - original_value), 'items': [ gtm4wp_map_eec_to_ga4( product_data ) ] } }); } else { // no => handle remove from cart event const product_data = { 'name': productdata.getAttribute( 'data-gtm4wp_product_name' ), 'id': productdata.getAttribute( 'data-gtm4wp_product_id' ), 'price': productprice.toFixed(2), 'category': productdata.getAttribute( 'data-gtm4wp_product_cat' ), 'variant': productdata.getAttribute( 'data-gtm4wp_product_variant' ), 'stocklevel': productdata.getAttribute( 'data-gtm4wp_product_stocklevel' ), 'brand': productdata.getAttribute( 'data-gtm4wp_product_brand' ), 'quantity': original_value - current_value }; // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.removeFromCartEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'remove': { 'products': [ product_data ] } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'remove_from_cart', 'ecommerce': { 'currency': gtm4wp_currency, 'value': productprice.toFixed(2) * (original_value - current_value), 'items': [ gtm4wp_map_eec_to_ga4( product_data ) ] } }); } } // end if qty changed }); // end each qty field } // end gtm4wp_handle_cart_qty_change() function gtm4wp_handle_payment_method_change() { // do not report checkout step if already reported if ( gtm4wp_checkout_step_fired.indexOf( 'payment_method' ) > -1 ) { return; } // do not fire event during page load if ( 'complete' != document.readyState ) { return; } let payment_type = '(payment type not found)'; let payment_el = document.querySelector( '.payment_methods input:checked' ); if ( !payment_el ) { payment_el = document.querySelector( 'input[name^=payment_method]' ); // select the first input element } if ( payment_el ) { payment_type = payment_el.value; } // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.checkoutStepEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'checkout': { 'actionField': { 'step': 4 + window.gtm4wp_checkout_step_offset + gtm4wp_shipping_payment_method_step_offset }, 'products': window.gtm4wp_checkout_products } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'add_payment_info', 'ecommerce': { 'currency': gtm4wp_currency, 'payment_type': payment_type, 'value': window.gtm4wp_checkout_value, 'items': window.gtm4wp_checkout_products_ga4 } }); gtm4wp_checkout_step_fired.push( 'payment_method' ); } // end gtm4wp_handle_payment_method_change() function gtm4wp_handle_shipping_method_change() { // do not report checkout step if already reported if ( gtm4wp_checkout_step_fired.indexOf( 'shipping_method' ) > -1 ) { return; } // do not fire event during page load if ( 'complete' != document.readyState ) { return; } let shipping_tier = '(shipping tier not found)'; let shipping_el = document.querySelector( 'input[name^=shipping_method]:checked' ); if ( !shipping_el ) { shipping_el = document.querySelector( 'input[name^=shipping_method]' ); // select the first input element } if ( shipping_el ) { shipping_tier = shipping_el.value; } // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.checkoutStepEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'checkout': { 'actionField': { 'step': 3 + window.gtm4wp_checkout_step_offset + gtm4wp_shipping_payment_method_step_offset }, 'products': window.gtm4wp_checkout_products } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'add_shipping_info', 'ecommerce': { 'currency': gtm4wp_currency, 'shipping_tier': shipping_tier, 'value': window.gtm4wp_checkout_value, 'items': window.gtm4wp_checkout_products_ga4 } }); gtm4wp_checkout_step_fired.push( 'shipping_method' ); } function gtm4wp_process_woocommerce_pages() { window.gtm4wp_is_cart = false; window.gtm4wp_is_checkout = false; const doc_body = document.querySelector( 'body' ); if ( doc_body ) { window.gtm4wp_is_cart = doc_body.classList && doc_body.classList.contains( 'woocommerce-cart' ); window.gtm4wp_is_checkout = doc_body.classList && doc_body.classList.contains( 'woocommerce-checkout' ); } // loop through WC blocks to set proper listname and position parameters const gtm4wp_product_block_names = { 'wp-block-handpicked-products': { 'displayname': 'Handpicked Products', 'counter': 1 }, 'wp-block-product-best-sellers': { 'displayname': 'Best Selling Products', 'counter': 1 }, 'wp-block-product-category': { 'displayname': 'Product Category List', 'counter': 1 }, 'wp-block-product-new': { 'displayname': 'New Products', 'counter': 1 }, 'wp-block-product-on-sale': { 'displayname': 'Sale Products', 'counter': 1 }, 'wp-block-products-by-attribute': { 'displayname': 'Products By Attribute', 'counter': 1 }, 'wp-block-product-tag': { 'displayname': 'Products By Tag', 'counter': 1 }, 'wp-block-product-top-rated': { 'displayname': 'Top Rated Products', 'counter': 1 }, } document.querySelectorAll( '.wc-block-grid .wc-block-grid__product' ).forEach( function( product_grid_item ) { const product_grid_container = product_grid_item.closest( '.wc-block-grid' ); const product_data = product_grid_item.querySelector( '.gtm4wp_productdata' ); if ( product_grid_container && product_data ) { const product_grid_container_classes = product_grid_container.classList; if ( product_grid_container_classes ) { for(let i in gtm4wp_product_block_names) { if ( product_grid_container_classes.contains( i ) ) { product_data.setAttribute("data-gtm4wp_productlist_name", gtm4wp_product_block_names[i].displayname); product_data.setAttribute("data-gtm4wp_product_listposition", gtm4wp_product_block_names[i].counter); gtm4wp_product_block_names[i].counter++; } } } } }); // track impressions of products in product lists if ( document.querySelectorAll( '.gtm4wp_productdata,.widget-product-item' ).length > 0 ) { let products = []; let ga4_products = []; let productprice = 0; let product_data; document.querySelectorAll( '.gtm4wp_productdata,.widget-product-item' ).forEach( function( dom_productdata ) { productprice = dom_productdata.getAttribute( 'data-gtm4wp_product_price' ); if ( typeof productprice == "string" ) { productprice = parseFloat( productprice ); if ( isNaN( productprice ) ) { productprice = 0; } } else if ( typeof productprice != "number" ) { productprice = 0; } product_data = { 'name': dom_productdata.getAttribute( 'data-gtm4wp_product_name' ), 'id': dom_productdata.getAttribute( 'data-gtm4wp_product_id' ), 'price': productprice.toFixed(2), 'category': dom_productdata.getAttribute( 'data-gtm4wp_product_cat' ), 'position': dom_productdata.getAttribute( 'data-gtm4wp_product_listposition' ), 'list': dom_productdata.getAttribute( 'data-gtm4wp_productlist_name' ), 'stocklevel': dom_productdata.getAttribute( 'data-gtm4wp_product_stocklevel' ), 'brand': dom_productdata.getAttribute( 'data-gtm4wp_product_brand' ) }; products.push(product_data); ga4_products.push( gtm4wp_map_eec_to_ga4( product_data ) ); }); if ( gtm4wp_product_per_impression > 0 ) { // Need to split the product submissions up into chunks in order to avoid the GA 8kb submission limit let chunk let ga4_chunk; while ( products.length ) { chunk = products.splice( 0, gtm4wp_product_per_impression ); ga4_chunk = ga4_products.splice( 0, gtm4wp_product_per_impression ); // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.productImpressionEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'impressions': chunk } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'view_item_list', 'ecommerce': { 'currency': gtm4wp_currency, 'items': ga4_chunk } }); } } else { for( var i=0; i 0 ) { if ( gtm4wp_last_selected_product_variation ) { const qty_el = product_form.querySelector( '[name=quantity]' ); gtm4wp_last_selected_product_variation.quantity = (qty_el && qty_el.value) || 1; // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.addProductToCartEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'add': { 'products': [gtm4wp_last_selected_product_variation] } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'add_to_cart', 'ecommerce': { 'currency': gtm4wp_currency, 'value': gtm4wp_last_selected_product_variation.price * gtm4wp_last_selected_product_variation.quantity, 'items': [ gtm4wp_map_eec_to_ga4( gtm4wp_last_selected_product_variation ) ] } }); } } else if ( product_is_grouped ) { const products_in_group = document.querySelectorAll( '.grouped_form .gtm4wp_productdata' ); let products = []; let ga4_products = []; let sum_value = 0; products_in_group.forEach( function( dom_productdata ) { const product_qty_input = document.querySelectorAll( 'input[name=quantity\\[' + dom_productdata.getAttribute( 'data-gtm4wp_product_id' ) + '\\]]' ); if ( product_qty_input.length > 0 ) { product_qty = (product_qty_input[0] && product_qty_input[0].value) || 1; } else { return true; } if ( 0 == product_qty ) { return true; } const product_data = { 'id': gtm4wp_use_sku_instead ? dom_productdata.getAttribute( 'data-gtm4wp_product_sku' ) : dom_productdata.getAttribute( 'data-gtm4wp_product_id' ), 'name': dom_productdata.getAttribute( 'data-gtm4wp_product_name' ), 'price': dom_productdata.getAttribute( 'data-gtm4wp_product_price' ), 'category': dom_productdata.getAttribute( 'data-gtm4wp_product_cat' ), 'quantity': product_qty, 'stocklevel': dom_productdata.getAttribute( 'data-gtm4wp_product_stocklevel' ), 'brand': dom_productdata.getAttribute( 'data-gtm4wp_product_brand' ) }; products.push( product_data ); ga4_products.push( gtm4wp_map_eec_to_ga4( product_data ) ); sum_value += product_data.price * product_data.quantity; }); if ( 0 == products.length ) { return true; } // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.addProductToCartEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'add': { 'products': products } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'add_to_cart', 'ecommerce': { 'currency': gtm4wp_currency, 'value': sum_value, 'items': ga4_products } }); } else { const product_id_el = gtm4wp_use_sku_instead ? product_form.querySelector( '[name=gtm4wp_sku]' ) : product_form.querySelector( '[name=gtm4wp_id]' ); const product_data = { 'id': product_id_el && product_id_el.value, 'name': product_form.querySelector( '[name=gtm4wp_name]' ) && product_form.querySelector( '[name=gtm4wp_name]' ).value, 'price': product_form.querySelector( '[name=gtm4wp_price]' ) && product_form.querySelector( '[name=gtm4wp_price]' ).value, 'category': product_form.querySelector( '[name=gtm4wp_category]' ) && product_form.querySelector( '[name=gtm4wp_category]' ).value, 'quantity': product_form.querySelector( '[name=quantity]' ) && product_form.querySelector( '[name=quantity]' ).value, 'stocklevel': product_form.querySelector( '[name=gtm4wp_stocklevel]' ) && product_form.querySelector( '[name=gtm4wp_stocklevel]' ).value, 'brand': product_form.querySelector( '[name=gtm4wp_brand]' ) && product_form.querySelector( '[name=gtm4wp_brand]' ).value }; // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.addProductToCartEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'add': { 'products': [ product_data ] } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'add_to_cart', 'ecommerce': { 'currency': gtm4wp_currency, 'value': product_data.price * product_data.quantity, 'items': [ gtm4wp_map_eec_to_ga4( product_data ) ] } }); } }); // track remove links in mini cart widget and on cart page document.addEventListener( 'click', function( e ) { const dom_productdata = e.target; if ( !dom_productdata || !dom_productdata.closest( '.mini_cart_item a.remove,.product-remove a.remove' ) ) { return true; } let qty = 0; const cart_item_el = dom_productdata.closest( '.cart_item' ); let qty_element = cart_item_el && cart_item_el.querySelectorAll( '.product-quantity input.qty' ); if ( !qty_element || ( qty_element.length === 0 ) ) { const mini_cart_item_el = dom_productdata.closest( '.mini_cart_item' ); qty_element = mini_cart_item_el && mini_cart_item_el.querySelectorAll( '.quantity' ); if ( qty_element && ( qty_element.length > 0 ) ) { qty = parseInt( qty_element[0].textContent ); if ( Number.isNaN( qty ) ) { qty = 0; } } } else { qty = qty_element[0].value; } if ( qty === 0 ) { return true; } const product_data = { 'name': dom_productdata.getAttribute( 'data-gtm4wp_product_name' ), 'id': dom_productdata.getAttribute( 'data-gtm4wp_product_id' ), 'price': dom_productdata.getAttribute( 'data-gtm4wp_product_price' ), 'category': dom_productdata.getAttribute( 'data-gtm4wp_product_cat' ), 'variant': dom_productdata.getAttribute( 'data-gtm4wp_product_variant' ), 'stocklevel': dom_productdata.getAttribute( 'data-gtm4wp_product_stocklevel' ), 'brand': dom_productdata.getAttribute( 'data-gtm4wp_product_brand' ), 'quantity': qty }; // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.removeFromCartEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'remove': { 'products': [ product_data ] } } }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'remove_from_cart', 'ecommerce': { 'currency': gtm4wp_currency, 'value': product_data.price * product_data.quantity, 'items': [ gtm4wp_map_eec_to_ga4( product_data ) ] } }); }); // track clicks in product lists let productlist_item_selector = '.products li:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),' +'.wc-block-grid__products li:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),' +'.products>div:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),' +'.widget-product-item,' +'.woocommerce-grouped-product-list-item__label a' document.addEventListener( 'click', function( e ) { // do nothing if GTM is blocked for some reason if ( 'undefined' == typeof google_tag_manager ) { return true; } const event_target_element = e.target; const matching_link_element = event_target_element.closest( productlist_item_selector ); if ( !matching_link_element ) { return true; } let temp_selector = event_target_element.closest( '.product,.wc-block-grid__product' ); let dom_productdata; if ( temp_selector ) { dom_productdata = temp_selector.querySelector( '.gtm4wp_productdata' ); } else { temp_selector = event_target_element.closest( '.products li' ); if ( temp_selector ) { dom_productdata = temp_selector.querySelector( '.gtm4wp_productdata' ); } else { temp_selector = event_target_element.closest( '.products>div' ); if ( temp_selector ) { dom_productdata = temp_selector.querySelector( '.gtm4wp_productdata' ); } else { temp_selector = event_target_element.closest( '.woocommerce-grouped-product-list-item__label' ); if ( temp_selector ) { dom_productdata = temp_selector.querySelector( '.gtm4wp_productdata' ); } else { dom_productdata = event_target_element; } } } } if ( ( 'undefined' == typeof dom_productdata.getAttribute( 'data-gtm4wp_product_id' ) ) || ( '' == dom_productdata.getAttribute( 'data-gtm4wp_product_id' ) ) ) { return true; } // only act on links pointing to the product detail page if ( dom_productdata.getAttribute( 'data-gtm4wp_product_url' ) != matching_link_element.getAttribute( 'href' ) ) { return true; } const product_data = { 'id': dom_productdata.getAttribute( 'data-gtm4wp_product_id' ), 'name': dom_productdata.getAttribute( 'data-gtm4wp_product_name' ), 'price': dom_productdata.getAttribute( 'data-gtm4wp_product_price' ), 'category': dom_productdata.getAttribute( 'data-gtm4wp_product_cat' ), 'stocklevel': dom_productdata.getAttribute( 'data-gtm4wp_product_stocklevel' ), 'brand': dom_productdata.getAttribute( 'data-gtm4wp_product_brand' ), 'position': dom_productdata.getAttribute( 'data-gtm4wp_product_listposition' ) }; for (let i in window.google_tag_manager) { if (i.substring(0,4).toLowerCase() == "gtm-") { window.gtm4wp_first_container_id = i; break; } } // do not do anything if GTM was not loaded for any reason if ( "" === window.gtm4wp_first_container_id ) { return true; } const ctrl_key_pressed = e.ctrlKey || e.metaKey; e.preventDefault(); if ( ctrl_key_pressed ) { // we need to open the new tab/page here so that popup blocker of the browser doesn't block our code window.productpage_window = window.open( 'about:blank', '_blank' ); } // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.productClickEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'click': { 'actionField': {'list': dom_productdata.getAttribute( 'data-gtm4wp_productlist_name' )}, 'products': [ product_data ] } }, 'eventCallback': function( container_id ) { if ( "undefined" !== typeof container_id && window.gtm4wp_first_container_id != container_id) { // only call this for the first loaded container return true; } // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'select_item', 'ecommerce': { 'currency': gtm4wp_currency, 'items': [ gtm4wp_map_eec_to_ga4( product_data ) ] }, 'eventCallback': function() { if ( ctrl_key_pressed && productpage_window ) { productpage_window.location.href = dom_productdata.getAttribute( 'data-gtm4wp_product_url' ); } else { document.location.href = dom_productdata.getAttribute( 'data-gtm4wp_product_url' ); } }, 'eventTimeout': 2000 }); }, 'eventTimeout': 2000 }); }); // track variable products on their detail pages // currently, we need to use jQuery here since WooCommerce is firing this event using jQuery // that can not be catched using vanilla JS jQuery( document ).on( 'found_variation', function( event, product_variation ) { if ( "undefined" == typeof product_variation ) { // some ither plugins trigger this event without variation data return; } if ( (document.readyState === "interactive") && gtm4wp_changedetail_fired_during_pageload ) { // some custom attribute rendering plugins fire this event multiple times during page load return; } const product_form = event.target; const product_variant_id = product_form.querySelector( '[name=variation_id]' ) && product_form.querySelector( '[name=variation_id]' ).value; const product_id = product_form.querySelector( '[name=gtm4wp_id]' ) && product_form.querySelector( '[name=gtm4wp_id]' ).value; const product_name = product_form.querySelector( '[name=gtm4wp_name]' ) && product_form.querySelector( '[name=gtm4wp_name]' ).value; const product_sku = product_form.querySelector( '[name=gtm4wp_sku]' ) && product_form.querySelector( '[name=gtm4wp_sku]' ).value; const product_category = product_form.querySelector( '[name=gtm4wp_category]' ) && product_form.querySelector( '[name=gtm4wp_category]' ).value; const product_price = product_form.querySelector( '[name=gtm4wp_price]' ) && product_form.querySelector( '[name=gtm4wp_price]' ).value; const product_stocklevel = product_form.querySelector( '[name=gtm4wp_stocklevel]' ) && product_form.querySelector( '[name=gtm4wp_stocklevel]' ).value; const product_brand = product_form.querySelector( '[name=gtm4wp_brand]' ) && product_form.querySelector( '[name=gtm4wp_brand]' ).value; let current_product_detail_data = { name: product_name, id: 0, price: 0, category: product_category, stocklevel: product_stocklevel, brand: product_brand, variant: '' }; current_product_detail_data.id = product_variation.variation_id; if ( gtm4wp_use_sku_instead && product_variation.sku && ('' !== product_variation.sku) ) { current_product_detail_data.id = product_variation.sku; } current_product_detail_data.price = product_variation.display_price; let product_variation_attribute_values = []; for( let attrib_key in product_variation.attributes ) { product_variation_attribute_values.push( product_variation.attributes[ attrib_key ] ); } current_product_detail_data.variant = product_variation_attribute_values.join(','); gtm4wp_last_selected_product_variation = current_product_detail_data; // fire ga3 version window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.changeDetailViewEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, 'detail': { 'products': [ current_product_detail_data ] } }, 'ecomm_prodid': gtm4wp_id_prefix + current_product_detail_data.id, 'ecomm_pagetype': 'product', 'ecomm_totalvalue': current_product_detail_data.price, }); // fire ga4 version window[ gtm4wp_datalayer_name ].push({ 'event': 'view_item', 'ecommerce': { 'currency': gtm4wp_currency, 'value': current_product_detail_data.price, 'items': [ gtm4wp_map_eec_to_ga4( current_product_detail_data ) ] } }); if ( document.readyState === "interactive" ) { gtm4wp_changedetail_fired_during_pageload = true; } }); jQuery( '.variations select' ).trigger( 'change' ); // initiate codes in WooCommere Quick View // currently, we need to use jQuery here since WooCommerce Quick View is showing the popup using // jQuery AJAX calls that can not be catched using vanilla JS jQuery( document ).ajaxSuccess( function( event, xhr, settings ) { if(typeof settings !== 'undefined') { if (settings.url.indexOf( 'wc-api=WC_Quick_View' ) > -1 ) { setTimeout( function() { const dl_data = document.querySelector('#gtm4wp_quickview_data'); if ( dl_data && dl_data.dataset && dl_data.dataset.gtm4wp_datalayer ) { try { const dl_data_obj = JSON.parse( dl_data.dataset.gtm4wp_datalayer ); if ( dl_data_obj && window.dataLayer ) { window.dataLayer.push(dl_data_obj); } } catch(e) { console && console.error && console.error( e.message ); } } }, 500); } } }); // codes for enhanced ecommerce events on cart page if ( gtm4wp_is_cart ) { document.addEventListener( 'click', function( e ) { let event_target_element = e.target; if ( !event_target_element ) { // for some reason event target is not specificed return true; } if ( !event_target_element.closest( '[name=update_cart]' ) ) { return true; } gtm4wp_handle_cart_qty_change(); }); document.addEventListener( 'keypress', function( e ) { let event_target_element = e.target; if ( !event_target_element ) { // for some reason event target is not specificed return true; } if ( !event_target_element.closest( '.woocommerce-cart-form input[type=number]' ) ) { return true; } gtm4wp_handle_cart_qty_change(); }); } // codes for enhanced ecommerce events on checkout page if ( gtm4wp_is_checkout ) { window.gtm4wp_checkout_step_offset = window.gtm4wp_checkout_step_offset || 0; window.gtm4wp_checkout_value = window.gtm4wp_checkout_value || 0; window.gtm4wp_checkout_products = window.gtm4wp_checkout_products || []; window.gtm4wp_checkout_products_ga4 = window.gtm4wp_checkout_products_ga4 || []; // this checkout step is not reported to GA4 as currently there is no option to report in-between custom steps document.addEventListener( 'focusout', function( e ) { let event_target_element = e.target; if ( !event_target_element ) { // for some reason event target is not specificed return true; } if ( !event_target_element.closest || !event_target_element.closest( 'input[name^=shipping_]:not(input[name^=shipping_method])' ) ) { return true; } // do not report checkout step if already reported if ( gtm4wp_checkout_step_fired.indexOf( 'shipping' ) > -1 ) { return; } // do not report checkout step if user is traversing through the section without filling in any data if ( event_target_element.value.trim() == '' ) { return; } window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.checkoutStepEEC', 'ecommerce': { 'currencyCode': gtm4wp_currency, // ga3 version 'checkout': { 'actionField': { 'step': 2 + window.gtm4wp_checkout_step_offset }, 'products': window.gtm4wp_checkout_products } } }); gtm4wp_checkout_step_fired.push( 'shipping' ); }); document.addEventListener( 'change', function( e ) { let event_target_element = e.target; if ( !event_target_element ) { // for some reason event target is not specificed return true; } if ( !event_target_element.closest( 'input[name^=shipping_method]' ) ) { return true; } gtm4wp_handle_shipping_method_change(); }); document.addEventListener( 'change', function( e ) { let event_target_element = e.target; if ( !event_target_element ) { // for some reason event target is not specificed return true; } if ( !event_target_element.closest( 'input[name=payment_method]' ) ) { return true; } gtm4wp_handle_payment_method_change(); }); document.addEventListener( 'submit', function( e ) { let event_target_element = e.target; if ( !event_target_element ) { // for some reason event target is not specificed return true; } if ( !event_target_element.closest( 'form[name=checkout]' ) ) { return true; } if ( gtm4wp_checkout_step_fired.indexOf( 'shipping_method' ) == -1 ) { // shipping methods are not visible if only one is available // and if the user has already a pre-selected method, no click event will fire to report the checkout step gtm4wp_handle_shipping_method_change(); } if ( gtm4wp_checkout_step_fired.indexOf( 'payment_method' ) == -1 ) { // if the user has already a pre-selected method, no click event will fire to report the checkout step gtm4wp_handle_payment_method_change(); } let shipping_el = document.querySelector( 'input[name^=shipping_method]:checked' ); if ( !shipping_el ) { shipping_el = document.querySelector( 'input[name^=shipping_method]' ); // select the first input element } if ( shipping_el ) { window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.checkoutOptionEEC', 'ecommerce': { 'checkout_option': { 'actionField': { 'step': 3 + window.gtm4wp_checkout_step_offset + gtm4wp_shipping_payment_method_step_offset, 'option': 'Shipping: ' + shipping_el.value } } } }); } let payment_el = document.querySelector( '.payment_methods input:checked' ); if ( !payment_el ) { payment_el = document.querySelector( 'input[name^=payment_method]' ); // select the first input element } if ( payment_el ) { window[ gtm4wp_datalayer_name ].push({ 'event': 'gtm4wp.checkoutOptionEEC', 'ecommerce': { 'checkout_option': { 'actionField': { 'step': 4 + window.gtm4wp_checkout_step_offset + gtm4wp_shipping_payment_method_step_offset, 'option': 'Payment: ' + payment_el.value } } } }); } }); } // codes for Google Ads dynamic remarketing // this part of the code is deprecated and will be removed in a later version // therefore jQuery usage will be not rewritten // turn of the deprecated Google Ads remarketing feature and this code will not execute if ( window.gtm4wp_remarketing&& !gtm4wp_is_cart && !gtm4wp_is_checkout ) { if ( jQuery( '.gtm4wp_productdata' ).length > 0 ) { for( var i=0; i
")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;e.collisionWidth>n?0 o?0 ",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o =this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});; /*! * jQuery UI Sortable 1.13.2 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","./core"],t):t(jQuery)}(function(u){"use strict";return u.widget("ui.sortable",u.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t *{ cursor: "+r.cursor+" !important; } ").appendTo(o)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return u.ui.ddmanager&&(u.ui.ddmanager.current=this),u.ui.ddmanager&&!r.dropBehaviour&&u.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY t[this.floating?"width":"height"]?l&&c:r ",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===o?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),u(" ",i.document[0]).appendTo(t)):"tr"===o?i._createTrPlaceholder(i.currentItem,t):"img"===o&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!r.forcePlaceholderSize||(e.height()&&(!r.forcePlaceholderSize||"tbody"!==o&&"tr"!==o)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=u(r.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),r.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){u(" ",i.document[0]).attr("colspan",u(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,o,r,n,h,a,l,c=null,p=null,f=this.containers.length-1;0<=f;f--)u.contains(this.currentItem[0],this.containers[f].element[0])||(this._intersectsWith(this.containers[f].containerCache)?c&&u.contains(this.containers[f].element[0],c.element[0])||(c=this.containers[f],p=f):this.containers[f].containerCache.over&&(this.containers[f]._trigger("out",t,this._uiHash(this)),this.containers[f].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(i=1e4,s=null,o=(a=c.floating||this._isFloating(this.currentItem))?"left":"top",r=a?"width":"height",l=a?"pageX":"pageY",e=this.items.length-1;0<=e;e--)u.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(n=this.items[e].item.offset()[o],h=!1,t[l]-n>this.items[e][r]/2&&(h=!0),Math.abs(t[l]-n) this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this===this.currentContainer||e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))),i=this.containers.length-1;0<=i;i--)e||s.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i ").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),i.autoHide&&z(this.element).on("mouseenter",function(){i.disabled||(e._removeClass("ui-resizable-autohide"),e._handles.show())}).on("mouseleave",function(){i.disabled||e.resizing||(e._addClass("ui-resizable-autohide"),e._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){z(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var i;return this.elementIsWrapper&&(t(this.element),i=this.element,this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")}).insertAfter(i),i.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,i){switch(this._super(t,i),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!i}},_setupHandles:function(){var t,i,e,s,h,n=this.options,o=this;if(this.handles=n.handles||(z(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=z(),this._addedHandles=z(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i "),this._addClass(h,"ui-resizable-handle "+s),h.css({zIndex:n.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(h),this._addedHandles=this._addedHandles.add(h));this._renderAxis=function(t){var i,e,s;for(i in t=t||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=z(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=z(this.handles[i],this.element),s=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),e=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(e,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){o.resizing||(this.className&&(h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=h&&h[1]?h[1]:"se")}),n.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var i,e,s=!1;for(i in this.handles)(e=z(this.handles[i])[0])!==t.target&&!z.contains(e,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,e,s=this.options,h=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),e=this._num(this.helper.css("top")),s.containment&&(i+=z(s.containment).scrollLeft()||0,e+=z(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:e},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalPosition={left:i,top:e},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,h=z(".ui-resizable-"+this.axis).css("cursor"),z("body").css("cursor","auto"===h?this.axis+"-resize":h),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i=this.originalMousePosition,e=this.axis,s=t.pageX-i.left||0,i=t.pageY-i.top||0,e=this._change[e];return this._updatePrevProperties(),e&&(e=e.apply(this,[t,s,i]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),z.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var i,e,s,h=this.options,n=this;return this._helper&&(e=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:n.sizeDiff.height,i=i?0:n.sizeDiff.width,i={width:n.helper.width()-i,height:n.helper.height()-e},e=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,s=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null,h.animate||this.element.css(z.extend(i,{top:s,left:e})),n.helper.height(n.size.height),n.helper.width(n.size.width),this._helper&&!h.animate&&this._proportionallyResize()),z("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var i,e,s,h=this.options,h={minWidth:this._isNumber(h.minWidth)?h.minWidth:0,maxWidth:this._isNumber(h.maxWidth)?h.maxWidth:1/0,minHeight:this._isNumber(h.minHeight)?h.minHeight:0,maxHeight:this._isNumber(h.maxHeight)?h.maxHeight:1/0};(this._aspectRatio||t)&&(t=h.minHeight*this.aspectRatio,e=h.minWidth/this.aspectRatio,i=h.maxHeight*this.aspectRatio,s=h.maxWidth/this.aspectRatio,h.minWidth t.width,o=this._isNumber(t.height)&&i.minHeight&&i.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,r=/sw|nw|w/.test(e),e=/nw|ne|n/.test(e);return n&&(t.width=i.minWidth),o&&(t.height=i.minHeight),s&&(t.width=i.maxWidth),h&&(t.height=i.maxHeight),n&&r&&(t.left=a-i.minWidth),s&&r&&(t.left=a-i.maxWidth),o&&e&&(t.top=l-i.minHeight),h&&e&&(t.top=l-i.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var i=0,e=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],h=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];i<4;i++)e[i]=parseFloat(s[i])||0,e[i]+=parseFloat(h[i])||0;return{height:e[0]+e[2],width:e[1]+e[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,i=0,e=this.helper||this.element;i ").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,i){return{width:this.originalSize.width+i}},w:function(t,i){var e=this.originalSize;return{left:this.originalPosition.left+i,width:e.width-i}},n:function(t,i,e){var s=this.originalSize;return{top:this.originalPosition.top+e,height:s.height-e}},s:function(t,i,e){return{height:this.originalSize.height+e}},se:function(t,i,e){return z.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},sw:function(t,i,e){return z.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,e]))},ne:function(t,i,e){return z.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,e]))},nw:function(t,i,e){return z.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,e]))}},_propagate:function(t,i){z.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),z.ui.plugin.add("resizable","animate",{stop:function(i){var e=z(this).resizable("instance"),t=e.options,s=e._proportionallyResizeElements,h=s.length&&/textarea/i.test(s[0].nodeName),n=h&&e._hasScroll(s[0],"left")?0:e.sizeDiff.height,h=h?0:e.sizeDiff.width,h={width:e.size.width-h,height:e.size.height-n},n=parseFloat(e.element.css("left"))+(e.position.left-e.originalPosition.left)||null,o=parseFloat(e.element.css("top"))+(e.position.top-e.originalPosition.top)||null;e.element.animate(z.extend(h,o&&n?{top:o,left:n}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(e.element.css("width")),height:parseFloat(e.element.css("height")),top:parseFloat(e.element.css("top")),left:parseFloat(e.element.css("left"))};s&&s.length&&z(s[0]).css({width:t.width,height:t.height}),e._updateCache(t),e._propagate("resize",i)}})}}),z.ui.plugin.add("resizable","containment",{start:function(){var e,s,t,i,h=z(this).resizable("instance"),n=h.options,o=h.element,n=n.containment,o=n instanceof z?n.get(0):/parent/.test(n)?o.parent().get(0):n;o&&(h.containerElement=z(o),/document/.test(n)||n===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:z(document),left:0,top:0,width:z(document).width(),height:z(document).height()||document.body.parentNode.scrollHeight}):(e=z(o),s=[],z(["Top","Right","Left","Bottom"]).each(function(t,i){s[t]=h._num(e.css("padding"+i))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-s[3],width:e.innerWidth()-s[1]},n=h.containerOffset,i=h.containerSize.height,t=h.containerSize.width,t=h._hasScroll(o,"left")?o.scrollWidth:t,i=h._hasScroll(o)?o.scrollHeight:i,h.parentData={element:o,left:n.left,top:n.top,width:t,height:i}))},resize:function(t){var i=z(this).resizable("instance"),e=i.options,s=i.containerOffset,h=i.position,t=i._aspectRatio||t.shiftKey,n={top:0,left:0},o=i.containerElement,a=!0;o[0]!==document&&/static/.test(o.css("position"))&&(n=s),h.left<(i._helper?s.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-s.left:i.position.left-n.left),t&&(i.size.height=i.size.width/i.aspectRatio,a=!1),i.position.left=e.helper?s.left:0),h.top<(i._helper?s.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-s.top:i.position.top),t&&(i.size.width=i.size.height*i.aspectRatio,a=!1),i.position.top=i._helper?s.top:0),o=i.containerElement.get(0)===i.element.parent().get(0),e=/relative|absolute/.test(i.containerElement.css("position")),o&&e?(i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top):(i.offset.left=i.element.offset().left,i.offset.top=i.element.offset().top),h=Math.abs(i.sizeDiff.width+(i._helper?i.offset.left-n.left:i.offset.left-s.left)),o=Math.abs(i.sizeDiff.height+(i._helper?i.offset.top-n.top:i.offset.top-s.top)),h+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-h,t&&(i.size.height=i.size.width/i.aspectRatio,a=!1)),o+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-o,t&&(i.size.width=i.size.height*i.aspectRatio,a=!1)),a||(i.position.left=i.prevPosition.left,i.position.top=i.prevPosition.top,i.size.width=i.prevSize.width,i.size.height=i.prevSize.height)},stop:function(){var t=z(this).resizable("instance"),i=t.options,e=t.containerOffset,s=t.containerPosition,h=t.containerElement,n=z(t.helper),o=n.offset(),a=n.outerWidth()-t.sizeDiff.width,n=n.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(h.css("position"))&&z(this).css({left:o.left-s.left-e.left,width:a,height:n}),t._helper&&!i.animate&&/static/.test(h.css("position"))&&z(this).css({left:o.left-s.left-e.left,width:a,height:n})}}),z.ui.plugin.add("resizable","alsoResize",{start:function(){var t=z(this).resizable("instance").options;z(t.alsoResize).each(function(){var t=z(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,e){var i=z(this).resizable("instance"),s=i.options,h=i.originalSize,n=i.originalPosition,o={height:i.size.height-h.height||0,width:i.size.width-h.width||0,top:i.position.top-n.top||0,left:i.position.left-n.left||0};z(s.alsoResize).each(function(){var t=z(this),s=z(this).data("ui-resizable-alsoresize"),h={},i=t.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];z.each(i,function(t,i){var e=(s[i]||0)+(o[i]||0);e&&0<=e&&(h[i]=e||null)}),t.css(h)})},stop:function(){z(this).removeData("ui-resizable-alsoresize")}}),z.ui.plugin.add("resizable","ghost",{start:function(){var t=z(this).resizable("instance"),i=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==z.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=z(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=z(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),z.ui.plugin.add("resizable","grid",{resize:function(){var t,i=z(this).resizable("instance"),e=i.options,s=i.size,h=i.originalSize,n=i.originalPosition,o=i.axis,a="number"==typeof e.grid?[e.grid,e.grid]:e.grid,l=a[0]||1,r=a[1]||1,p=Math.round((s.width-h.width)/l)*l,s=Math.round((s.height-h.height)/r)*r,d=h.width+p,g=h.height+s,u=e.maxWidth&&e.maxWidth d,m=e.minHeight&&e.minHeight>g;e.grid=a,f&&(d+=l),m&&(g+=r),u&&(d-=l),c&&(g-=r),/^(se|s|e)$/.test(o)?(i.size.width=d,i.size.height=g):/^(ne)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.top=n.top-s):/^(sw)$/.test(o)?(i.size.width=d,i.size.height=g,i.position.left=n.left-p):((g-r<=0||d-l<=0)&&(t=i._getPaddingPlusBorderDimensions(this)),0 {var t={204:()=>{!function(t,e){"use strict";acf.hooks=new function(){var t={removeFilter:function(e,i){return"string"==typeof e&&n("filters",e,i),t},applyFilters:function(){var e=Array.prototype.slice.call(arguments),n=e.shift();return"string"==typeof n?o("filters",n,e):t},addFilter:function(e,n,o,r){return"string"==typeof e&&"function"==typeof n&&i("filters",e,n,o=parseInt(o||10,10),r),t},removeAction:function(e,i){return"string"==typeof e&&n("actions",e,i),t},doAction:function(){var e=Array.prototype.slice.call(arguments),n=e.shift();return"string"==typeof n&&o("actions",n,e),t},addAction:function(e,n,o,r){return"string"==typeof e&&"function"==typeof n&&i("actions",e,n,o=parseInt(o||10,10),r),t},storage:function(){return e}},e={actions:{},filters:{}};function n(t,n,i,o){if(e[t][n])if(i){var r,a=e[t][n];if(o)for(r=a.length;r--;){var s=a[r];s.callback===i&&s.context===o&&a.splice(r,1)}else for(r=a.length;r--;)a[r].callback===i&&a.splice(r,1)}else e[t][n]=[]}function i(t,n,i,o,r){var a={callback:i,priority:o,context:r},s=e[t][n];s?(s.push(a),s=function(t){for(var e,n,i,o=1,r=t.length;o e.priority;)t[n]=t[n-1],--n;t[n]=e}return t}(s)):s=[a],e[t][n]=s}function o(t,n,i){var o=e[t][n];if(!o)return"filters"===t&&i[0];var r=0,a=o.length;if("filters"===t)for(;r {var t;t=jQuery,acf.models.Modal=acf.Model.extend({data:{title:"",content:"",toolbar:""},events:{"click .acf-modal-close":"onClickClose"},setup:function(e){t.extend(this.data,e),this.$el=t(),this.render()},initialize:function(){this.open()},render:function(){var e=this.get("title"),n=this.get("content"),i=this.get("toolbar"),o=t(["
",'
','
',"

"+e+"

",' ',"
",'
'+n+"
",'
'+i+"
","
",'
',"
"].join(""));this.$el&&this.$el.replaceWith(o),this.$el=o,acf.doAction("append",o)},update:function(t){this.data=acf.parseArgs(t,this.data),this.render()},title:function(t){this.$(".acf-modal-title h2").html(t)},content:function(t){this.$(".acf-modal-content").html(t)},toolbar:function(t){this.$(".acf-modal-toolbar").html(t)},open:function(){t("body").append(this.$el)},close:function(){this.remove()},onClickClose:function(t,e){t.preventDefault(),this.close()}}),acf.newModal=function(t){return new acf.models.Modal(t)}},9653:()=>{var t,e,n;t=jQuery,e=/^(\S+)\s*(.*)$/,n=acf.Model=function(){this.cid=acf.uniqueId("acf"),this.data=t.extend(!0,{},this.data),this.setup.apply(this,arguments),this.$el&&!this.$el.data("acf")&&this.$el.data("acf",this);var e=function(){this.initialize(),this.addEvents(),this.addActions(),this.addFilters()};this.wait&&!acf.didAction(this.wait)?this.addAction(this.wait,e):e.apply(this)},t.extend(n.prototype,{id:"",cid:"",$el:null,data:{},busy:!1,changed:!1,events:{},actions:{},filters:{},eventScope:"",wait:!1,priority:10,get:function(t){return this.data[t]},has:function(t){return null!=this.get(t)},set:function(t,e,n){var i=this.get(t);return i==e||(this.data[t]=e,n||(this.changed=!0,this.trigger("changed:"+t,[e,i]),this.trigger("changed",[t,e,i]))),this},inherit:function(e){return e instanceof jQuery&&(e=e.data()),t.extend(this.data,e),this},prop:function(){return this.$el.prop.apply(this.$el,arguments)},setup:function(e){t.extend(this,e)},initialize:function(){},addElements:function(t){if(!(t=t||this.elements||null)||!Object.keys(t).length)return!1;for(var e in t)this.addElement(e,t[e])},addElement:function(t,e){this["$"+t]=this.$(e)},addEvents:function(t){if(!(t=t||this.events||null))return!1;for(var n in t){var i=n.match(e);this.on(i[1],i[2],t[n])}},removeEvents:function(t){if(!(t=t||this.events||null))return!1;for(var n in t){var i=n.match(e);this.off(i[1],i[2],t[n])}},getEventTarget:function(e,n){return e||this.$el||t(document)},validateEvent:function(e){return!this.eventScope||t(e.target).closest(this.eventScope).is(this.$el)},proxyEvent:function(e){return this.proxy((function(n){if(this.validateEvent(n)){var i=acf.arrayArgs(arguments),o=i.slice(1),r=[n,t(n.currentTarget)].concat(o);e.apply(this,r)}}))},on:function(t,e,n,i){var o,r,a,s,c;t instanceof jQuery?i?(o=t,r=e,a=n,s=i):(o=t,r=e,s=n):n?(r=t,a=e,s=n):(r=t,s=e),o=this.getEventTarget(o),"string"==typeof s&&(s=this.proxyEvent(this[s])),r=r+"."+this.cid,c=a?[r,a,s]:[r,s],o.on.apply(o,c)},off:function(t,e,n){var i,o,r,a;t instanceof jQuery?n?(i=t,o=e,r=n):(i=t,o=e):e?(o=t,r=e):o=t,i=this.getEventTarget(i),o=o+"."+this.cid,a=r?[o,r]:[o],i.off.apply(i,a)},trigger:function(t,e,n){var i=this.getEventTarget();return n?i.trigger.apply(i,arguments):i.triggerHandler.apply(i,arguments),this},addActions:function(t){if(!(t=t||this.actions||null))return!1;for(var e in t)this.addAction(e,t[e])},removeActions:function(t){if(!(t=t||this.actions||null))return!1;for(var e in t)this.removeAction(e,t[e])},addAction:function(t,e,n){n=n||this.priority,"string"==typeof e&&(e=this[e]),acf.addAction(t,e,n,this)},removeAction:function(t,e){acf.removeAction(t,this[e])},addFilters:function(t){if(!(t=t||this.filters||null))return!1;for(var e in t)this.addFilter(e,t[e])},addFilter:function(t,e,n){n=n||this.priority,"string"==typeof e&&(e=this[e]),acf.addFilter(t,e,n,this)},removeFilters:function(t){if(!(t=t||this.filters||null))return!1;for(var e in t)this.removeFilter(e,t[e])},removeFilter:function(t,e){acf.removeFilter(t,this[e])},$:function(t){return this.$el.find(t)},remove:function(){this.removeEvents(),this.removeActions(),this.removeFilters(),this.$el.remove()},setTimeout:function(t,e){return setTimeout(this.proxy(t),e)},time:function(){console.time(this.id||this.cid)},timeEnd:function(){console.timeEnd(this.id||this.cid)},show:function(){acf.show(this.$el)},hide:function(){acf.hide(this.$el)},proxy:function(e){return t.proxy(e,this)}}),n.extend=function(e){var n,i=this;return n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return i.apply(this,arguments)},t.extend(n,i),n.prototype=Object.create(i.prototype),t.extend(n.prototype,e),n.prototype.constructor=n,n},acf.models={},acf.getInstance=function(t){return t.data("acf")},acf.getInstances=function(e){var n=[];return e.each((function(){n.push(acf.getInstance(t(this)))})),n}},86:()=>{var t,e;t=jQuery,e=acf.Model.extend({data:{text:"",type:"",timeout:0,dismiss:!0,target:!1,close:function(){}},events:{"click .acf-notice-dismiss":"onClickClose"},tmpl:function(){return'
'},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.show()},render:function(){this.type(this.get("type")),this.html("

"+this.get("text")+"

"),this.get("dismiss")&&(this.$el.append(' '),this.$el.addClass("-dismiss"));var t=this.get("timeout");t&&this.away(t)},update:function(e){t.extend(this.data,e),this.initialize(),this.removeEvents(),this.addEvents()},show:function(){var t=this.get("target");t&&t.prepend(this.$el)},hide:function(){this.$el.remove()},away:function(t){this.setTimeout((function(){acf.remove(this.$el)}),t)},type:function(t){var e=this.get("type");e&&this.$el.removeClass("-"+e),this.$el.addClass("-"+t),"error"==t&&this.$el.addClass("acf-error-message")},html:function(t){this.$el.html(acf.escHtml(t))},text:function(t){this.$("p").html(acf.escHtml(t))},onClickClose:function(t,e){t.preventDefault(),this.get("close").apply(this,arguments),this.remove()}}),acf.newNotice=function(t){return"object"!=typeof t&&(t={text:t}),new e(t)},new acf.Model({wait:"prepare",priority:1,initialize:function(){var e=t(".acf-admin-notice");e.length&&t("h1:first").after(e)}})},8729:()=>{jQuery,new acf.Model({events:{"click .acf-panel-title":"onClick"},onClick:function(t,e){t.preventDefault(),this.toggle(e.parent())},isOpen:function(t){return t.hasClass("-open")},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},open:function(t){t.addClass("-open"),t.find(".acf-panel-title i").attr("class","dashicons dashicons-arrow-down")},close:function(t){t.removeClass("-open"),t.find(".acf-panel-title i").attr("class","dashicons dashicons-arrow-right")}})},7904:()=>{var t;t=jQuery,acf.models.Popup=acf.Model.extend({data:{title:"",content:"",width:0,height:0,loading:!1,openedBy:null},events:{'click [data-event="close"]':"onClickClose","click .acf-close-popup":"onClickClose",keydown:"onPressEscapeClose"},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.open(),this.focus(),this.lockFocusToPopup(!0)},tmpl:function(){return[' "].join("")},render:function(){var t=this.get("title"),e=this.get("content"),n=this.get("loading"),i=this.get("width"),o=this.get("height");this.title(t),this.content(e),i&&this.$(".acf-popup-box").css("width",i),o&&this.$(".acf-popup-box").css("min-height",o),this.loading(n),acf.doAction("append",this.$el)},focus:function(){this.$el.find(".acf-icon").first().trigger("focus")},lockFocusToPopup:function(e){let n=t("#wpwrap");n.length&&(n[0].inert=e,n.attr("aria-hidden",e))},update:function(t){this.data=acf.parseArgs(t,this.data),this.render()},title:function(t){this.$(".title:first h3").html(t)},content:function(t){this.$(".inner:first").html(t)},loading:function(t){var e=this.$(".loading:first");t?e.show():e.hide()},open:function(){t("body").append(this.$el)},close:function(){this.lockFocusToPopup(!1),this.returnFocusToOrigin(),this.remove()},onClickClose:function(t,e){t.preventDefault(),this.close()},onPressEscapeClose:function(t){"Escape"===t.key&&this.close()},returnFocusToOrigin:function(){this.data.openedBy instanceof t&&this.data.openedBy.closest("body").length>0&&this.data.openedBy.trigger("focus")}}),acf.newPopup=function(t){return new acf.models.Popup(t)}},7861:()=>{!function(t,e){acf.newTooltip=function(t){return"object"!=typeof t&&(t={text:t}),t.confirmRemove!==e?(t.textConfirm=acf.__("Remove"),t.textCancel=acf.__("Cancel"),new i(t)):t.confirm!==e?new i(t):new n(t)};var n=acf.Model.extend({data:{text:"",timeout:0,target:null},tmpl:function(){return'
'},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.show(),this.position();var e=this.get("timeout");e&&setTimeout(t.proxy(this.fade,this),e)},update:function(e){t.extend(this.data,e),this.initialize()},render:function(){this.html(this.get("text"))},show:function(){t("body").append(this.$el)},hide:function(){this.$el.remove()},fade:function(){this.$el.addClass("acf-fade-up"),this.setTimeout((function(){this.remove()}),250)},html:function(t){this.$el.html(t)},position:function(){var e=this.$el,n=this.get("target");if(n){e.removeClass("right left bottom top").css({top:0,left:0});var i=n.outerWidth(),o=n.outerHeight(),r=n.offset().top,a=n.offset().left,s=e.outerWidth(),c=e.outerHeight(),l=e.offset().top,u=r-c-l,f=a+i/2-s/2;f<10?(e.addClass("right"),f=a+i,u=r+o/2-c/2-l):f+s+10>t(window).width()?(e.addClass("left"),f=a-s,u=r+o/2-c/2-l):u-t(window).scrollTop()<10?(e.addClass("bottom"),u=r+o-l):e.addClass("top"),e.css({top:u,left:f})}}}),i=n.extend({data:{text:"",textConfirm:"",textCancel:"",target:null,targetConfirm:!0,confirm:function(){},cancel:function(){},context:!1},events:{'click [data-event="cancel"]':"onCancel",'click [data-event="confirm"]':"onConfirm"},addEvents:function(){acf.Model.prototype.addEvents.apply(this);var e=t(document),n=this.get("target");this.setTimeout((function(){this.on(e,"click","onCancel")})),this.get("targetConfirm")&&this.on(n,"click","onConfirm")},removeEvents:function(){acf.Model.prototype.removeEvents.apply(this);var e=t(document),n=this.get("target");this.off(e,"click"),this.off(n,"click")},render:function(){var t=[this.get("text")||acf.__("Are you sure?"),' '+(this.get("textConfirm")||acf.__("Yes"))+" ",' '+(this.get("textCancel")||acf.__("No"))+" "].join(" ");this.html(t),this.$el.addClass("-confirm")},onCancel:function(t,e){t.preventDefault(),t.stopImmediatePropagation();var n=this.get("cancel"),i=this.get("context")||this;n.apply(i,arguments),this.remove()},onConfirm:function(t,e){t.preventDefault(),t.stopImmediatePropagation();var n=this.get("confirm"),i=this.get("context")||this;n.apply(i,arguments),this.remove()}});acf.models.Tooltip=n,acf.models.TooltipConfirm=i,new acf.Model({tooltip:!1,events:{"mouseenter .acf-js-tooltip":"showTitle","mouseup .acf-js-tooltip":"hideTitle","mouseleave .acf-js-tooltip":"hideTitle","focus .acf-js-tooltip":"showTitle","blur .acf-js-tooltip":"hideTitle","keyup .acf-js-tooltip":"onKeyUp"},showTitle:function(t,e){var n=e.attr("title");n&&(e.attr("title",""),this.tooltip?this.tooltip.update({text:n,target:e}):this.tooltip=acf.newTooltip({text:n,target:e}))},hideTitle:function(t,e){this.tooltip.hide(),e.attr("title",this.tooltip.get("text"))},onKeyUp:function(t,e){"Escape"===t.key&&this.hideTitle(t,e)}})}(jQuery)},7806:()=>{!function(t,e){var n={};window.acf=n,n.data={},n.get=function(t){return this.data[t]||null},n.has=function(t){return null!==this.get(t)},n.set=function(t,e){return this.data[t]=e,this};var i=0;n.uniqueId=function(t){var e=++i+"";return t?t+e:e},n.uniqueArray=function(t){return t.filter((function(t,e,n){return n.indexOf(t)===e}))};var o="";n.uniqid=function(t,e){var n;void 0===t&&(t="");var i=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?Array(e-t.length+1).join("0")+t:t};return o||(o=Math.floor(123456789*Math.random())),o++,n=t,n+=i(parseInt((new Date).getTime()/1e3,10),8),n+=i(o,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},n.strReplace=function(t,e,n){return n.split(t).join(e)},n.strCamelCase=function(t){var e=t.match(/([a-zA-Z0-9]+)/g);return e?e.map((function(t,e){var n=t.charAt(0);return(0===e?n.toLowerCase():n.toUpperCase())+t.slice(1)})).join(""):""},n.strPascalCase=function(t){var e=n.strCamelCase(t);return e.charAt(0).toUpperCase()+e.slice(1)},n.strSlugify=function(t){return n.strReplace("_","-",t.toLowerCase())},n.strSanitize=function(t){var n={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",ß:"s",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",ĝ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o"," ":"_","'":"","?":"","/":"","\\":"",".":"",",":"","`":"",">":"","<":"",'"':"","[":"","]":"","|":"","{":"","}":"","(":"",")":""};return(t=t.replace(/\W/g,(function(t){return n[t]!==e?n[t]:t}))).toLowerCase()},n.strMatch=function(t,e){for(var n=0,i=Math.min(t.length,e.length),o=0;o ":">",'"':""","'":"'"};return(""+t).replace(/[&<>"']/g,(function(t){return e[t]}))},n.strUnescape=function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'"};return(""+t).replace(/&|<|>|"|'/g,(function(t){return e[t]}))},n.escAttr=n.strEscape,n.escHtml=function(t){return(""+t).replace(/ ").html(e).text()},n.parseArgs=function(e,n){return"object"!=typeof e&&(e={}),"object"!=typeof n&&(n={}),t.extend({},n,e)},window.acfL10n==e&&(acfL10n={}),n.__=function(t){return acfL10n[t]||t},n._x=function(t,e){return acfL10n[t+"."+e]||acfL10n[t]||t},n._n=function(t,e,i){return 1==i?n.__(t):n.__(e)},n.isArray=function(t){return Array.isArray(t)},n.isObject=function(t){return"object"==typeof t};var r=function(t,e,i){var o=(e=e.replace("[]","[%%index%%]")).match(/([^\[\]])+/g);if(o)for(var r=o.length,a=t,s=0;s ');var s=e.parent();e.css({height:n,width:i,margin:o,position:"absolute"}),setTimeout((function(){s.css({opacity:0,height:t.endHeight})}),50),setTimeout((function(){e.attr("style",a),s.remove(),t.complete()}),301)},u=function(e){var n=e.target,i=n.height(),o=n.children().length,r=t(' ');n.addClass("acf-remove-element"),setTimeout((function(){n.html(r)}),251),setTimeout((function(){n.removeClass("acf-remove-element"),r.css({height:e.endHeight})}),300),setTimeout((function(){n.remove(),e.complete()}),451)};n.duplicate=function(t){t instanceof jQuery&&(t={target:t}),t=n.parseArgs(t,{target:!1,search:"",replace:"",rename:!0,before:function(t){},after:function(t,e){},append:function(t,e){t.after(e)}}),t.target=t.target||t.$el;var e=t.target;t.search=t.search||e.attr("data-id"),t.replace=t.replace||n.uniqid(),t.before(e),n.doAction("before_duplicate",e);var i=e.clone();return t.rename&&n.rename({target:i,search:t.search,replace:t.replace,replacer:"function"==typeof t.rename?t.rename:null}),i.removeClass("acf-clone"),i.find(".ui-sortable").removeClass("ui-sortable"),t.after(e,i),n.doAction("after_duplicate",e,i),t.append(e,i),n.doAction("duplicate",e,i),n.doAction("append",i),i},n.rename=function(t){t instanceof jQuery&&(t={target:t});var e=(t=n.parseArgs(t,{target:!1,destructive:!1,search:"",replace:"",replacer:null})).target;t.search||(t.search=e.attr("data-id")),t.replace||(t.replace=n.uniqid("acf")),t.replacer||(t.replacer=function(t,e,n,i){return e.replace(n,i)});var i=function(e){return function(n,i){return t.replacer(e,i,t.search,t.replace)}};if(t.destructive){var o=n.strReplace(t.search,t.replace,e.outerHTML());e.replaceWith(o)}else e.attr("data-id",t.replace),e.find('[id*="'+t.search+'"]').attr("id",i("id")),e.find('[for*="'+t.search+'"]').attr("for",i("for")),e.find('[name*="'+t.search+'"]').attr("name",i("name"));return e},n.prepareForAjax=function(t){return t.nonce=n.get("nonce"),t.post_id=n.get("post_id"),n.has("language")&&(t.lang=n.get("language")),n.applyFilters("prepare_for_ajax",t)},n.startButtonLoading=function(t){t.prop("disabled",!0),t.after(' ')},n.stopButtonLoading=function(t){t.prop("disabled",!1),t.next(".acf-loading").remove()},n.showLoading=function(t){t.append('
')},n.hideLoading=function(t){t.children(".acf-loading-overlay").remove()},n.updateUserSetting=function(e,i){var o={action:"acf/ajax/user_setting",name:e,value:i};t.ajax({url:n.get("ajaxurl"),data:n.prepareForAjax(o),type:"post",dataType:"html"})},n.val=function(t,e,n){var i=t.val();return e!==i&&(t.val(e),t.is("select")&&null===t.val()?(t.val(i),!1):(!0!==n&&t.trigger("change"),!0))},n.show=function(t,e){return e&&n.unlock(t,"hidden",e),!n.isLocked(t,"hidden")&&!!t.hasClass("acf-hidden")&&(t.removeClass("acf-hidden"),!0)},n.hide=function(t,e){return e&&n.lock(t,"hidden",e),!t.hasClass("acf-hidden")&&(t.addClass("acf-hidden"),!0)},n.isHidden=function(t){return t.hasClass("acf-hidden")},n.isVisible=function(t){return!n.isHidden(t)};var f=function(t,e){return!(t.hasClass("acf-disabled")||(e&&n.unlock(t,"disabled",e),n.isLocked(t,"disabled")||!t.prop("disabled")||(t.prop("disabled",!1),0)))};n.enable=function(e,n){if(e.attr("name"))return f(e,n);var i=!1;return e.find("[name]").each((function(){f(t(this),n)&&(i=!0)})),i};var d=function(t,e){return e&&n.lock(t,"disabled",e),!t.prop("disabled")&&(t.prop("disabled",!0),!0)};n.disable=function(e,n){if(e.attr("name"))return d(e,n);var i=!1;return e.find("[name]").each((function(){d(t(this),n)&&(i=!0)})),i},n.isset=function(t){for(var e=1;e -1){var a=window.URL||window.webkitURL,s=new Image;s.onload=function(){o.width=this.width,o.height=this.height,e(o)},s.src=a.createObjectURL(r)}else e(o);else e(o)},n.isAjaxSuccess=function(t){return t&&t.success},n.getAjaxMessage=function(t){return n.isget(t,"data","message")},n.getAjaxError=function(t){return n.isget(t,"data","error")},n.getXhrError=function(t){if(t.responseJSON){if(t.responseJSON.message)return t.responseJSON.message;if(t.responseJSON.data&&t.responseJSON.data.error)return t.responseJSON.data.error}else if(t.statusText)return t.statusText;return""},n.renderSelect=function(t,e){var i=t.val(),o=[],r=function(t){var e="";return t.map((function(t){var i=t.text||t.label||"",a=t.id||t.value||"";o.push(a),t.children?e+=' '+r(t.children)+" ":e+=' "})),e};return t.html(r(e)),o.indexOf(i)>-1&&t.val(i),t.val()};var h,p,v,g,m,y=function(t,e){return t.data("acf-lock-"+e)||[]},w=function(t,e,n){t.data("acf-lock-"+e,n)};n.lock=function(t,e,n){var i=y(t,e);i.indexOf(n)<0&&(i.push(n),w(t,e,i))},n.unlock=function(t,e,n){var i=y(t,e),o=i.indexOf(n);return o>-1&&(i.splice(o,1),w(t,e,i)),0===i.length},n.isLocked=function(t,e){return y(t,e).length>0},n.isGutenberg=function(){return!!(window.wp&&wp.data&&wp.data.select&&wp.data.select("core/editor"))},n.objectToArray=function(t){return Object.keys(t).map((function(e){return t[e]}))},n.debounce=function(t,e){var n;return function(){var i=this,o=arguments,r=function(){t.apply(i,o)};clearTimeout(n),n=setTimeout(r,e)}},n.throttle=function(t,e){var n=!1;return function(){n||(n=!0,setTimeout((function(){n=!1}),e),t.apply(this,arguments))}},n.isInView=function(t){t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect();return e.top!==e.bottom&&e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},n.onceInView=(h=[],p=0,v=function(){h.forEach((function(t){n.isInView(t.el)&&(t.callback.apply(this),m(t.id))}))},g=n.debounce(v,300),m=function(e){(h=h.filter((function(t){return t.id!==e}))).length||t(window).off("scroll resize",g).off("acfrefresh orientationchange",v)},function(e,i){e instanceof jQuery&&(e=e[0]),n.isInView(e)?i.apply(this):function(e,n){h.length||t(window).on("scroll resize",g).on("acfrefresh orientationchange",v),h.push({id:p++,el:e,callback:n})}(e,i)}),n.once=function(t){var n=0;return function(){return n++>0?t=e:t.apply(this,arguments)}},n.focusAttention=function(e){var i=1e3;e.addClass("acf-attention -focused"),n.isInView(e)||(t("body, html").animate({scrollTop:e.offset().top-t(window).height()/2},500),i+=500),setTimeout((function(){e.removeClass("-focused"),setTimeout((function(){e.removeClass("acf-attention")}),250)}),i)},n.onFocus=function(e,n){var i=!1,o=!1,r=function(){i=!0,setTimeout((function(){i=!1}),1),s(!0)},a=function(){i||s(!1)},s=function(i){o!==i&&(i?(t(document).on("click",a),e.on("blur","input, select, textarea",a)):(t(document).off("click",a),e.off("blur","input, select, textarea",a)),o=i,n(i))};e.on("click",r),e.on("focus","input, select, textarea",r)},t.fn.exists=function(){return t(this).length>0},t.fn.outerHTML=function(){return t(this).get(0).outerHTML},Array.prototype.indexOf||(Array.prototype.indexOf=function(e){return t.inArray(e,this)}),n.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},n.refresh=n.debounce((function(){t(window).trigger("acfrefresh"),n.doAction("refresh")}),0),t(document).ready((function(){n.doAction("ready")})),t(window).on("load",(function(){setTimeout((function(){n.doAction("load")}))})),t(window).on("beforeunload",(function(){n.doAction("unload")})),t(window).on("resize",(function(){n.doAction("resize")})),t(document).on("sortstart",(function(t,e){n.doAction("sortstart",e.item,e.placeholder)})),t(document).on("sortstop",(function(t,e){n.doAction("sortstop",e.item,e.placeholder)}))}(jQuery)}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";n(7806),n(204),n(9653),n(7904),n(2206),n(8729),n(86),n(7861)})()})();; (()=>{var e={7787:()=>{!function(e,t){acf.newCompatibility=function(e,t){return(t=t||{}).__proto__=e.__proto__,e.__proto__=t,e.compatibility=t,t},acf.getCompatibility=function(e){return e.compatibility||null};var i=acf.newCompatibility(acf,{l10n:{},o:{},fields:{},update:acf.set,add_action:acf.addAction,remove_action:acf.removeAction,do_action:acf.doAction,add_filter:acf.addFilter,remove_filter:acf.removeFilter,apply_filters:acf.applyFilters,parse_args:acf.parseArgs,disable_el:acf.disable,disable_form:acf.disable,enable_el:acf.enable,enable_form:acf.enable,update_user_setting:acf.updateUserSetting,prepare_for_ajax:acf.prepareForAjax,is_ajax_success:acf.isAjaxSuccess,remove_el:acf.remove,remove_tr:acf.remove,str_replace:acf.strReplace,render_select:acf.renderSelect,get_uniqid:acf.uniqid,serialize_form:acf.serialize,esc_html:acf.strEscape,str_sanitize:acf.strSanitize});i._e=function(e,t){e=e||"";var i=(t=t||"")?e+"."+t:e,a={"image.select":"Select Image","image.edit":"Edit Image","image.update":"Update Image"};if(a[i])return acf.__(a[i]);var n=this.l10n[e]||"";return t&&(n=n[t]||""),n},i.get_selector=function(t){var i=".acf-field";if(!t)return i;if(e.isPlainObject(t)){if(e.isEmptyObject(t))return i;for(var a in t){t=t[a];break}}return i+="-"+t,i=acf.strReplace("_","-",i),acf.strReplace("field-field-","field-",i)},i.get_fields=function(e,t,i){var a={is:e||"",parent:t||!1,suppressFilters:i||!1};return a.is&&(a.is=this.get_selector(a.is)),acf.findFields(a)},i.get_field=function(e,t){var i=this.get_fields.apply(this,arguments);return!!i.length&&i.first()},i.get_closest_field=function(e,t){return e.closest(this.get_selector(t))},i.get_field_wrap=function(e){return e.closest(this.get_selector())},i.get_field_key=function(e){return e.data("key")},i.get_field_type=function(e){return e.data("type")},i.get_data=function(e,t){return acf.parseArgs(e.data(),t)},i.maybe_get=function(e,t,i){void 0===i&&(i=null),keys=String(t).split(".");for(var a=0;a 1){for(var c=0;c 0?t.substr(0,n):t,r=n>0?t.substr(n+1):"",o=function(t){t.$el=e(this),acf.field_group&&(t.$field=t.$el.closest(".acf-field-object")),"function"==typeof a.event&&(t=a.event(t)),a[i].apply(a,arguments)};r?e(document).on(s,r,o):e(document).on(s,o)},get:function(e,t){return t=t||null,void 0!==this[e]&&(t=this[e]),t},set:function(e,t){return this[e]=t,"function"==typeof this["_set_"+e]&&this["_set_"+e].apply(this),this}},i.field=acf.model.extend({type:"",o:{},$field:null,_add_action:function(e,t){var i=this;e=e+"_field/type="+i.type,acf.add_action(e,(function(e){i.set("$field",e),i[t].apply(i,arguments)}))},_add_filter:function(e,t){var i=this;e=e+"_field/type="+i.type,acf.add_filter(e,(function(e){i.set("$field",e),i[t].apply(i,arguments)}))},_add_event:function(t,i){var a=this,n=t.substr(0,t.indexOf(" ")),s=t.substr(t.indexOf(" ")+1),r=acf.get_selector(a.type);e(document).on(n,r+" "+s,(function(t){var n=e(this),s=acf.get_closest_field(n,a.type);s.length&&(s.is(a.$field)||a.set("$field",s),t.$el=n,t.$field=s,a[i].apply(a,[t]))}))},_set_$field:function(){"function"==typeof this.focus&&this.focus()},doFocus:function(e){return this.set("$field",e)}}),acf.newCompatibility(acf.validation,{remove_error:function(e){acf.getField(e).removeError()},add_warning:function(e,t){acf.getField(e).showNotice({text:t,type:"warning",timeout:1e3})},fetch:acf.validateForm,enableSubmit:acf.enableSubmit,disableSubmit:acf.disableSubmit,showSpinner:acf.showSpinner,hideSpinner:acf.hideSpinner,unlockForm:acf.unlockForm,lockForm:acf.lockForm}),i.tooltip={tooltip:function(e,t){return acf.newTooltip({text:e,target:t}).$el},temp:function(e,t){acf.newTooltip({text:e,target:t,timeout:250})},confirm:function(e,t,i,a,n){acf.newTooltip({confirm:!0,text:i,target:e,confirm:function(){t(!0)},cancel:function(){t(!1)}})},confirm_remove:function(e,t){acf.newTooltip({confirmRemove:!0,target:e,confirm:function(){t(!0)},cancel:function(){t(!1)}})}},i.media=new acf.Model({activeFrame:!1,actions:{new_media_popup:"onNewMediaPopup"},frame:function(){return this.activeFrame},onNewMediaPopup:function(e){this.activeFrame=e.frame},popup:function(e){return e.mime_types&&(e.allowedTypes=e.mime_types),e.id&&(e.attachment=e.id),acf.newMediaPopup(e).frame}}),i.select2={init:function(e,t,i){return t.allow_null&&(t.allowNull=t.allow_null),t.ajax_action&&(t.ajaxAction=t.ajax_action),i&&(t.field=acf.getField(i)),acf.newSelect2(e,t)},destroy:function(e){return acf.getInstance(e).destroy()}},i.postbox={render:function(e){return e.edit_url&&(e.editLink=e.edit_url),e.edit_title&&(e.editTitle=e.edit_title),acf.newPostbox(e)}},acf.newCompatibility(acf.screen,{update:function(){return this.set.apply(this,arguments)},fetch:acf.screen.check}),i.ajax=acf.screen}(jQuery)},682:()=>{!function(e,t){var __=acf.__,i=function(e){return e?""+e:""},a=function(e,t){return i(e).toLowerCase()===i(t).toLowerCase()},n=acf.Condition.extend({type:"hasValue",operator:"!=empty",label:__("Has any value"),fieldTypes:["text","textarea","number","range","email","url","password","image","file","wysiwyg","oembed","select","checkbox","radio","button_group","link","post_object","page_link","relationship","taxonomy","user","google_map","date_picker","date_time_picker","time_picker","color_picker"],match:function(e,t){let i=t.val();return i instanceof Array&&(i=i.length),!!i},choices:function(e){return' '}});acf.registerConditionType(n);var s=n.extend({type:"hasNoValue",operator:"==empty",label:__("Has no value"),match:function(e,t){return!n.prototype.match.apply(this,arguments)}});acf.registerConditionType(s);var r=acf.Condition.extend({type:"equalTo",operator:"==",label:__("Value is equal to"),fieldTypes:["text","textarea","number","range","email","url","password"],match:function(e,t){return acf.isNumeric(e.value)?(i=e.value,n=t.val(),parseFloat(i)===parseFloat(n)):a(e.value,t.val());var i,n},choices:function(e){return' '}});acf.registerConditionType(r);var o=r.extend({type:"notEqualTo",operator:"!=",label:__("Value is not equal to"),match:function(e,t){return!r.prototype.match.apply(this,arguments)}});acf.registerConditionType(o);var c=acf.Condition.extend({type:"patternMatch",operator:"==pattern",label:__("Value matches pattern"),fieldTypes:["text","textarea","email","url","password","wysiwyg"],match:function(e,t){return a=t.val(),n=e.value,s=new RegExp(i(n),"gi"),i(a).match(s);var a,n,s},choices:function(e){return' '}});acf.registerConditionType(c);var l=acf.Condition.extend({type:"contains",operator:"==contains",label:__("Value contains"),fieldTypes:["text","textarea","number","email","url","password","wysiwyg","oembed","select"],match:function(e,t){return a=t.val(),n=e.value,i(a).indexOf(i(n))>-1;var a,n},choices:function(e){return' '}});acf.registerConditionType(l);var d=r.extend({type:"trueFalseEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(e){return[{id:1,text:__("Checked")}]}});acf.registerConditionType(d);var u=o.extend({type:"trueFalseNotEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(e){return[{id:1,text:__("Checked")}]}});acf.registerConditionType(u);var f=acf.Condition.extend({type:"selectEqualTo",operator:"==",label:__("Value is equal to"),fieldTypes:["select","checkbox","radio","button_group"],match:function(e,t){var n,s=t.val();return s instanceof Array?(n=e.value,s.map((function(e){return i(e)})).indexOf(n)>-1):a(e.value,s)},choices:function(e){var t=[],i=e.$setting("choices textarea").val().split("\n");return e.$input("allow_null").prop("checked")&&t.push({id:"",text:__("Null")}),i.map((function(e){(e=e.split(":"))[1]=e[1]||e[0],t.push({id:e[0].trim(),text:e[1].trim()})})),t}});acf.registerConditionType(f);var p=f.extend({type:"selectNotEqualTo",operator:"!=",label:__("Value is not equal to"),match:function(e,t){return!f.prototype.match.apply(this,arguments)}});acf.registerConditionType(p);var h=acf.Condition.extend({type:"greaterThan",operator:">",label:__("Value is greater than"),fieldTypes:["number","range"],match:function(e,t){var i,a,n=t.val();return n instanceof Array&&(n=n.length),i=n,a=e.value,parseFloat(i)>parseFloat(a)},choices:function(e){return' '}});acf.registerConditionType(h);var g=h.extend({type:"lessThan",operator:"<",label:__("Value is less than"),match:function(e,t){var i,a,n=t.val();return n instanceof Array&&(n=n.length),null==n||!1===n||(i=n,a=e.value,parseFloat(i) '}});acf.registerConditionType(g);var m=h.extend({type:"selectionGreaterThan",label:__("Selection is greater than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(m);var v=g.extend({type:"selectionLessThan",label:__("Selection is less than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(v)}(jQuery)},2849:()=>{!function(e,t){var i=[];acf.Condition=acf.Model.extend({type:"",operator:"==",label:"",choiceType:"input",fieldTypes:[],data:{conditions:!1,field:!1,rule:{}},events:{change:"change",keyup:"change",enableField:"change",disableField:"change"},setup:function(t){e.extend(this.data,t)},getEventTarget:function(e,t){return e||this.get("field").$el},change:function(e,t){this.get("conditions").change(e)},match:function(e,t){return!1},calculate:function(){return this.match(this.get("rule"),this.get("field"))},choices:function(e){return' '}}),acf.newCondition=function(e,t){var i=t.get("field"),a=i.getField(e.field);if(!i||!a)return!1;var n={rule:e,target:i,conditions:t,field:a},s=a.get("type"),r=e.operator;return new(acf.getConditionTypes({fieldType:s,operator:r})[0]||acf.Condition)(n)};var a=function(e){return acf.strPascalCase(e||"")+"Condition"};acf.registerConditionType=function(e){var t=e.prototype.type,n=a(t);acf.models[n]=e,i.push(t)},acf.getConditionType=function(e){var t=a(e);return acf.models[t]||!1},acf.registerConditionForFieldType=function(e,t){var i=acf.getConditionType(e);i&&i.prototype.fieldTypes.push(t)},acf.getConditionTypes=function(e){e=acf.parseArgs(e,{fieldType:"",operator:""});var t=[];return i.map((function(i){var a=acf.getConditionType(i),n=a.prototype.fieldTypes,s=a.prototype.operator;e.fieldType&&-1===n.indexOf(e.fieldType)||e.operator&&s!==e.operator||t.push(a)})),t}}(jQuery)},3155:()=>{!function(e,t){var i="conditional_logic",a=(new acf.Model({id:"conditionsManager",priority:20,actions:{new_field:"onNewField"},onNewField:function(e){e.has("conditions")&&e.getConditions().render()}}),function(t,i){var a=acf.getFields({key:i,sibling:t.$el,suppressFilters:!0});return a.length||(a=acf.getFields({key:i,parent:t.$el.parent(),suppressFilters:!0})),!a.length&&e(".acf-field-settings").length&&(a=acf.getFields({key:i,parent:t.$el.parents(".acf-field-settings:first"),suppressFilters:!0})),!!a.length&&a[0]});acf.Field.prototype.getField=function(e){var t=a(this,e);if(t)return t;for(var i=this.parents(),n=0;n {!function(e,t){var i=0,a=acf.Field.extend({type:"accordion",wait:"",$control:function(){return this.$(".acf-fields:first")},initialize:function(){if(!this.$el.hasClass("acf-accordion")&&!this.$el.is("td")){if(this.get("endpoint"))return this.remove();var t=this.$el,a=this.$labelWrap(),s=this.$inputWrap(),r=this.$control(),o=s.children(".description");if(o.length&&a.append(o),this.$el.is("tr")){var c=this.$el.closest("table"),l=e('
'),d=e('
'),u=e('
'),f=e(" ");l.append(a.html()),u.append(f),d.append(u),s.append(l),s.append(d),a.remove(),r.remove(),s.attr("colspan",2),a=l,s=d,r=f}t.addClass("acf-accordion"),a.addClass("acf-accordion-title"),s.addClass("acf-accordion-content"),i++,this.get("multi_expand")&&t.attr("multi-expand",1);var p=acf.getPreference("this.accordions")||[];void 0!==p[i-1]&&this.set("open",p[i-1]),this.get("open")&&(t.addClass("-open"),s.css("display","block")),a.prepend(n.iconHtml({open:this.get("open")}));var h=t.parent();r.addClass(h.hasClass("-left")?"-left":""),r.addClass(h.hasClass("-clear")?"-clear":""),r.append(t.nextUntil(".acf-field-accordion",".acf-field")),r.removeAttr("data-open data-multi_expand data-endpoint")}}});acf.registerFieldType(a);var n=new acf.Model({actions:{unload:"onUnload"},events:{"click .acf-accordion-title":"onClick","invalidField .acf-accordion":"onInvalidField"},isOpen:function(e){return e.hasClass("-open")},toggle:function(e){this.isOpen(e)?this.close(e):this.open(e)},iconHtml:function(e){return acf.isGutenberg()?e.open?' ':' ':e.open?' ':' '},open:function(t){var i=acf.isGutenberg()?0:300;t.find(".acf-accordion-content:first").slideDown(i).css("display","block"),t.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!0})),t.addClass("-open"),acf.doAction("show",t),t.attr("multi-expand")||t.siblings(".acf-accordion.-open").each((function(){n.close(e(this))}))},close:function(e){var t=acf.isGutenberg()?0:300;e.find(".acf-accordion-content:first").slideUp(t),e.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!1})),e.removeClass("-open"),acf.doAction("hide",e)},onClick:function(e,t){e.preventDefault(),this.toggle(t.parent())},onInvalidField:function(e,t){this.busy||(this.busy=!0,this.setTimeout((function(){this.busy=!1}),1e3),this.open(t))},onUnload:function(t){var i=[];e(".acf-accordion").each((function(){var t=e(this).hasClass("-open")?1:0;i.push(t)})),i.length&&acf.setPreference("this.accordions",i)}})}(jQuery)},1357:()=>{var e;jQuery,e=acf.Field.extend({type:"button_group",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-button-group")},$input:function(){return this.$("input:checked")},setValue:function(e){this.$('input[value="'+e+'"]').prop("checked",!0).trigger("change")},onClick:function(e,t){var i=t.parent("label"),a=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),t.prop("checked",!1).trigger("change"))}}),acf.registerFieldType(e)},8171:()=>{var e,t;e=jQuery,t=acf.Field.extend({type:"checkbox",events:{"change input":"onChange","click .acf-add-checkbox":"onClickAdd","click .acf-checkbox-toggle":"onClickToggle","click .acf-checkbox-custom":"onClickCustom"},$control:function(){return this.$(".acf-checkbox-list")},$toggle:function(){return this.$(".acf-checkbox-toggle")},$input:function(){return this.$('input[type="hidden"]')},$inputs:function(){return this.$('input[type="checkbox"]').not(".acf-checkbox-toggle")},getValue:function(){var t=[];return this.$(":checked").each((function(){t.push(e(this).val())})),!!t.length&&t},onChange:function(e,t){var i=t.prop("checked"),a=t.parent("label"),n=this.$toggle();i?a.addClass("selected"):a.removeClass("selected"),n.length&&(0==this.$inputs().not(":checked").length?n.prop("checked",!0):n.prop("checked",!1))},onClickAdd:function(e,t){var i='
  • ';t.parent("li").before(i)},onClickToggle:function(e,t){var i=t.prop("checked"),a=this.$('input[type="checkbox"]'),n=this.$("label");a.prop("checked",i),i?n.addClass("selected"):n.removeClass("selected")},onClickCustom:function(e,t){var i=t.prop("checked"),a=t.next('input[type="text"]');i?a.prop("disabled",!1):(a.prop("disabled",!0),""==a.val()&&t.parent("li").remove())}}),acf.registerFieldType(t)},9459:()=>{var e;jQuery,e=acf.Field.extend({type:"color_picker",wait:"load",events:{duplicateField:"onDuplicate"},$control:function(){return this.$(".acf-color-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},setValue:function(e){acf.val(this.$input(),e),this.$inputText().iris("color",e)},initialize:function(){var e=this.$input(),t=this.$inputText(),i=function(i){setTimeout((function(){acf.val(e,t.val())}),1)},a={defaultColor:!1,palettes:!0,hide:!0,change:i,clear:i};a=acf.applyFilters("color_picker_args",a,this),t.wpColorPicker(a)},onDuplicate:function(e,t,i){$colorPicker=i.find(".wp-picker-container"),$inputText=i.find('input[type="text"]'),$colorPicker.replaceWith($inputText)}}),acf.registerFieldType(e)},7597:()=>{var e,t;e=jQuery,t=acf.Field.extend({type:"date_picker",events:{'blur input[type="text"]':"onBlur",duplicateField:"onDuplicate"},$control:function(){return this.$(".acf-date-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},initialize:function(){if(this.has("save_format"))return this.initializeCompatibility();var e=this.$input(),t=this.$inputText(),i={dateFormat:this.get("date_format"),altField:e,altFormat:"yymmdd",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")};i=acf.applyFilters("date_picker_args",i,this),acf.newDatePicker(t,i),acf.doAction("date_picker_init",t,i,this)},initializeCompatibility:function(){var e=this.$input(),t=this.$inputText();t.val(e.val());var i={dateFormat:this.get("date_format"),altField:e,altFormat:this.get("save_format"),changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")},a=(i=acf.applyFilters("date_picker_args",i,this)).dateFormat;i.dateFormat=this.get("save_format"),acf.newDatePicker(t,i),t.datepicker("option","dateFormat",a),acf.doAction("date_picker_init",t,i,this)},onBlur:function(){this.$inputText().val()||acf.val(this.$input(),"")},onDuplicate:function(e,t,i){i.find('input[type="text"]').removeClass("hasDatepicker").removeAttr("id")}}),acf.registerFieldType(t),new acf.Model({priority:5,wait:"ready",initialize:function(){var t=acf.get("locale"),i=acf.get("rtl"),a=acf.get("datePickerL10n");return!!a&&void 0!==e.datepicker&&(a.isRTL=i,e.datepicker.regional[t]=a,void e.datepicker.setDefaults(a))}}),acf.newDatePicker=function(t,i){if(void 0===e.datepicker)return!1;i=i||{},t.datepicker(i),e("body > #ui-datepicker-div").exists()&&e("body > #ui-datepicker-div").wrap('
    ')}},684:()=>{var e,t;e=jQuery,t=acf.models.DatePickerField.extend({type:"date_time_picker",$control:function(){return this.$(".acf-date-time-picker")},initialize:function(){var e=this.$input(),t=this.$inputText(),i={dateFormat:this.get("date_format"),timeFormat:this.get("time_format"),altField:e,altFieldTimeOnly:!1,altFormat:"yy-mm-dd",altTimeFormat:"HH:mm:ss",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day"),controlType:"select",oneLine:!0};i=acf.applyFilters("date_time_picker_args",i,this),acf.newDateTimePicker(t,i),acf.doAction("date_time_picker_init",t,i,this)}}),acf.registerFieldType(t),new acf.Model({priority:5,wait:"ready",initialize:function(){var t=acf.get("locale"),i=acf.get("rtl"),a=acf.get("dateTimePickerL10n");return!!a&&void 0!==e.timepicker&&(a.isRTL=i,e.timepicker.regional[t]=a,void e.timepicker.setDefaults(a))}}),acf.newDateTimePicker=function(t,i){if(void 0===e.timepicker)return!1;i=i||{},t.datetimepicker(i),e("body > #ui-datepicker-div").exists()&&e("body > #ui-datepicker-div").wrap('
    ')}},5647:()=>{var e,t;e=jQuery,t=acf.models.ImageField.extend({type:"file",$control:function(){return this.$(".acf-file-uploader")},$input:function(){return this.$('input[type="hidden"]:first')},validateAttachment:function(e){return void 0!==(e=e||{}).id&&(e=e.attributes),acf.parseArgs(e,{url:"",alt:"",title:"",filename:"",filesizeHumanReadable:"",icon:"/wp-includes/images/media/default.png"})},render:function(e){e=this.validateAttachment(e),this.$("img").attr({src:e.icon,alt:e.alt,title:e.title}),this.$('[data-name="title"]').text(e.title),this.$('[data-name="filename"]').text(e.filename).attr("href",e.url),this.$('[data-name="filesize"]').text(e.filesizeHumanReadable);var t=e.id||"";acf.val(this.$input(),t),t?this.$control().addClass("has-value"):this.$control().removeClass("has-value")},selectAttachment:function(){var t=this.parent(),i=t&&"repeater"===t.get("type");acf.newMediaPopup({mode:"select",title:acf.__("Select File"),field:this.get("key"),multiple:i,library:this.get("library"),allowedTypes:this.get("mime_types"),select:e.proxy((function(e,i){i>0?this.append(e,t):this.render(e)}),this)})},editAttachment:function(){var t=this.val();if(!t)return!1;acf.newMediaPopup({mode:"edit",title:acf.__("Edit File"),button:acf.__("Update File"),attachment:t,field:this.get("key"),select:e.proxy((function(e,t){this.render(e)}),this)})}}),acf.registerFieldType(t)},8489:()=>{!function(e,t){var i=acf.Field.extend({type:"google_map",map:!1,wait:"load",events:{'click a[data-name="clear"]':"onClickClear",'click a[data-name="locate"]':"onClickLocate",'click a[data-name="search"]':"onClickSearch","keydown .search":"onKeydownSearch","keyup .search":"onKeyupSearch","focus .search":"onFocusSearch","blur .search":"onBlurSearch",showField:"onShow"},$control:function(){return this.$(".acf-google-map")},$search:function(){return this.$(".search")},$canvas:function(){return this.$(".canvas")},setState:function(e){this.$control().removeClass("-value -loading -searching"),"default"===e&&(e=this.val()?"value":""),e&&this.$control().addClass("-"+e)},getValue:function(){var e=this.$input().val();return!!e&&JSON.parse(e)},setValue:function(e,t){var i="";e&&(i=JSON.stringify(e)),acf.val(this.$input(),i),t||(this.renderVal(e),acf.doAction("google_map_change",e,this.map,this))},renderVal:function(e){e?(this.setState("value"),this.$search().val(e.address),this.setPosition(e.lat,e.lng)):(this.setState(""),this.$search().val(""),this.map.marker.setVisible(!1))},newLatLng:function(e,t){return new google.maps.LatLng(parseFloat(e),parseFloat(t))},setPosition:function(e,t){this.map.marker.setPosition({lat:parseFloat(e),lng:parseFloat(t)}),this.map.marker.setVisible(!0),this.center()},center:function(){var e=this.map.marker.getPosition();if(e)var t=e.lat(),i=e.lng();else t=this.get("lat"),i=this.get("lng");this.map.setCenter({lat:parseFloat(t),lng:parseFloat(i)})},initialize:function(){!function(t){if(n)return t();if(acf.isset(window,"google","maps","Geocoder"))return n=new google.maps.Geocoder,t();if(acf.addAction("google_map_api_loaded",t),!a){var i=acf.get("google_map_api");i&&(a=!0,e.ajax({url:i,dataType:"script",cache:!0,success:function(){n=new google.maps.Geocoder,acf.doAction("google_map_api_loaded")}}))}}(this.initializeMap.bind(this))},initializeMap:function(){var e=this.getValue(),t=acf.parseArgs(e,{zoom:this.get("zoom"),lat:this.get("lat"),lng:this.get("lng")}),i={scrollwheel:!1,zoom:parseInt(t.zoom),center:{lat:parseFloat(t.lat),lng:parseFloat(t.lng)},mapTypeId:google.maps.MapTypeId.ROADMAP,marker:{draggable:!0,raiseOnDrag:!0},autocomplete:{}};i=acf.applyFilters("google_map_args",i,this);var a=new google.maps.Map(this.$canvas()[0],i),n=acf.parseArgs(i.marker,{draggable:!0,raiseOnDrag:!0,map:a});n=acf.applyFilters("google_map_marker_args",n,this);var s=new google.maps.Marker(n),r=!1;if(acf.isset(google,"maps","places","Autocomplete")){var o=i.autocomplete||{};o=acf.applyFilters("google_map_autocomplete_args",o,this),(r=new google.maps.places.Autocomplete(this.$search()[0],o)).bindTo("bounds",a)}this.addMapEvents(this,a,s,r),a.acf=this,a.marker=s,a.autocomplete=r,this.map=a,e&&this.setPosition(e.lat,e.lng),acf.doAction("google_map_init",a,s,this)},addMapEvents:function(e,t,i,a){google.maps.event.addListener(t,"click",(function(t){var i=t.latLng.lat(),a=t.latLng.lng();e.searchPosition(i,a)})),google.maps.event.addListener(i,"dragend",(function(){var t=this.getPosition().lat(),i=this.getPosition().lng();e.searchPosition(t,i)})),a&&google.maps.event.addListener(a,"place_changed",(function(){var t=this.getPlace();e.searchPlace(t)})),google.maps.event.addListener(t,"zoom_changed",(function(){var i=e.val();i&&(i.zoom=t.getZoom(),e.setValue(i,!0))}))},searchPosition:function(e,t){this.setState("loading");var i={lat:e,lng:t};n.geocode({location:i},function(i,a){if(this.setState(""),"OK"!==a)this.showNotice({text:acf.__("Location not found: %s").replace("%s",a),type:"warning"});else{var n=this.parseResult(i[0]);n.lat=e,n.lng=t,this.val(n)}}.bind(this))},searchPlace:function(e){if(e)if(e.geometry){e.formatted_address=this.$search().val();var t=this.parseResult(e);this.val(t)}else e.name&&this.searchAddress(e.name)},searchAddress:function(e){if(e){var t=e.split(",");if(2==t.length){var i=parseFloat(t[0]),a=parseFloat(t[1]);if(i&&a)return this.searchPosition(i,a)}this.setState("loading"),n.geocode({address:e},function(t,i){if(this.setState(""),"OK"!==i)this.showNotice({text:acf.__("Location not found: %s").replace("%s",i),type:"warning"});else{var a=this.parseResult(t[0]);a.address=e,this.val(a)}}.bind(this))}},searchLocation:function(){if(!navigator.geolocation)return alert(acf.__("Sorry, this browser does not support geolocation"));this.setState("loading"),navigator.geolocation.getCurrentPosition(function(e){this.setState("");var t=e.coords.latitude,i=e.coords.longitude;this.searchPosition(t,i)}.bind(this),function(e){this.setState("")}.bind(this))},parseResult:function(e){var t={address:e.formatted_address,lat:e.geometry.location.lat(),lng:e.geometry.location.lng()};t.zoom=this.map.getZoom(),e.place_id&&(t.place_id=e.place_id),e.name&&(t.name=e.name);var i={street_number:["street_number"],street_name:["street_address","route"],city:["locality","postal_town"],state:["administrative_area_level_1","administrative_area_level_2","administrative_area_level_3","administrative_area_level_4","administrative_area_level_5"],post_code:["postal_code"],country:["country"]};for(var a in i)for(var n=i[a],s=0;s {var e,t;e=jQuery,t=acf.Field.extend({type:"image",$control:function(){return this.$(".acf-image-uploader")},$input:function(){return this.$('input[type="hidden"]:first')},events:{'click a[data-name="add"]':"onClickAdd",'click a[data-name="edit"]':"onClickEdit",'click a[data-name="remove"]':"onClickRemove",'change input[type="file"]':"onChange"},initialize:function(){"basic"===this.get("uploader")&&this.$el.closest("form").attr("enctype","multipart/form-data")},validateAttachment:function(e){e&&e.attributes&&(e=e.attributes),e=acf.parseArgs(e,{id:0,url:"",alt:"",title:"",caption:"",description:"",width:0,height:0});var t=acf.isget(e,"sizes",this.get("preview_size"));return t&&(e.url=t.url,e.width=t.width,e.height=t.height),e},render:function(e){e=this.validateAttachment(e),this.$("img").attr({src:e.url,alt:e.alt}),e.id?(this.val(e.id),this.$control().addClass("has-value")):(this.val(""),this.$control().removeClass("has-value"))},append:function(e,t){var i=function(e,t){for(var i=acf.getFields({key:e.get("key"),parent:t.$el}),a=0;a 0?this.append(e,t):this.render(e)}),this)})},editAttachment:function(){var t=this.val();t&&acf.newMediaPopup({mode:"edit",title:acf.__("Edit Image"),button:acf.__("Update Image"),attachment:t,field:this.get("key"),select:e.proxy((function(e,t){this.render(e)}),this)})},removeAttachment:function(){this.render(!1)},onClickAdd:function(e,t){this.selectAttachment()},onClickEdit:function(e,t){this.editAttachment()},onClickRemove:function(e,t){this.removeAttachment()},onChange:function(t,i){var a=this.$input();i.val()||a.val(""),acf.getFileInputData(i,(function(t){a.val(e.param(t))}))}}),acf.registerFieldType(t)},4658:()=>{var e,t;e=jQuery,t=acf.Field.extend({type:"link",events:{'click a[data-name="add"]':"onClickEdit",'click a[data-name="edit"]':"onClickEdit",'click a[data-name="remove"]':"onClickRemove","change .link-node":"onChange"},$control:function(){return this.$(".acf-link")},$node:function(){return this.$(".link-node")},getValue:function(){var e=this.$node();return!!e.attr("href")&&{title:e.html(),url:e.attr("href"),target:e.attr("target")}},setValue:function(e){e=acf.parseArgs(e,{title:"",url:"",target:""});var t=this.$control(),i=this.$node();t.removeClass("-value -external"),e.url&&t.addClass("-value"),"_blank"===e.target&&t.addClass("-external"),this.$(".link-title").html(e.title),this.$(".link-url").attr("href",e.url).html(e.url),i.html(e.title),i.attr("href",e.url),i.attr("target",e.target),this.$(".input-title").val(e.title),this.$(".input-target").val(e.target),this.$(".input-url").val(e.url).trigger("change")},onClickEdit:function(e,t){acf.wpLink.open(this.$node())},onClickRemove:function(e,t){this.setValue(!1)},onChange:function(e,t){var i=this.getValue();this.setValue(i)}}),acf.registerFieldType(t),acf.wpLink=new acf.Model({getNodeValue:function(){var e=this.get("node");return{title:acf.decode(e.html()),url:e.attr("href"),target:e.attr("target")}},setNodeValue:function(e){var t=this.get("node");t.text(e.title),t.attr("href",e.url),t.attr("target",e.target),t.trigger("change")},getInputValue:function(){return{title:e("#wp-link-text").val(),url:e("#wp-link-url").val(),target:e("#wp-link-target").prop("checked")?"_blank":""}},setInputValue:function(t){e("#wp-link-text").val(t.title),e("#wp-link-url").val(t.url),e("#wp-link-target").prop("checked","_blank"===t.target)},open:function(t){this.on("wplink-open","onOpen"),this.on("wplink-close","onClose"),this.set("node",t);var i=e(' ');e("body").append(i);var a=this.getNodeValue();wpLink.open("acf-link-textarea",a.url,a.title,null)},onOpen:function(){e("#wp-link-wrap").addClass("has-text-field");var t=this.getNodeValue();this.setInputValue(t),t.url&&wpLinkL10n&&e("#wp-link-submit").val(wpLinkL10n.update)},close:function(){wpLink.close()},onClose:function(){if(!this.has("node"))return!1;var t=e("#wp-link-submit");if(t.is(":hover")||t.is(":focus")){var i=this.getInputValue();this.setNodeValue(i)}this.off("wplink-open"),this.off("wplink-close"),e("#acf-link-textarea").remove(),this.set("node",null)}})},719:()=>{var e,t;e=jQuery,t=acf.Field.extend({type:"oembed",events:{'click [data-name="clear-button"]':"onClickClear","keypress .input-search":"onKeypressSearch","keyup .input-search":"onKeyupSearch","change .input-search":"onChangeSearch"},$control:function(){return this.$(".acf-oembed")},$input:function(){return this.$(".input-value")},$search:function(){return this.$(".input-search")},getValue:function(){return this.$input().val()},getSearchVal:function(){return this.$search().val()},setValue:function(e){e?this.$control().addClass("has-value"):this.$control().removeClass("has-value"),acf.val(this.$input(),e)},showLoading:function(e){acf.showLoading(this.$(".canvas"))},hideLoading:function(){acf.hideLoading(this.$(".canvas"))},maybeSearch:function(){var t=this.val(),i=this.getSearchVal();if(!i)return this.clear();if("http"!=i.substr(0,4)&&(i="http://"+i),i!==t){var a=this.get("timeout");a&&clearTimeout(a);var n=e.proxy(this.search,this,i);this.set("timeout",setTimeout(n,300))}},search:function(t){var i={action:"acf/fields/oembed/search",s:t,field_key:this.get("key")};(a=this.get("xhr"))&&a.abort(),this.showLoading();var a=e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(i),type:"post",dataType:"json",context:this,success:function(e){e&&e.html||(e={url:!1,html:""}),this.val(e.url),this.$(".canvas-media").html(e.html)},complete:function(){this.hideLoading()}});this.set("xhr",a)},clear:function(){this.val(""),this.$search().val(""),this.$(".canvas-media").html("")},onClickClear:function(e,t){this.clear()},onKeypressSearch:function(e,t){13==e.which&&(e.preventDefault(),this.maybeSearch())},onKeyupSearch:function(e,t){t.val()&&this.maybeSearch()},onChangeSearch:function(e,t){this.maybeSearch()}}),acf.registerFieldType(t)},1281:()=>{var e;jQuery,e=acf.models.SelectField.extend({type:"page_link"}),acf.registerFieldType(e)},1987:()=>{var e;jQuery,e=acf.models.SelectField.extend({type:"post_object"}),acf.registerFieldType(e)},2557:()=>{var e;jQuery,e=acf.Field.extend({type:"radio",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-radio-list")},$input:function(){return this.$("input:checked")},$inputText:function(){return this.$('input[type="text"]')},getValue:function(){var e=this.$input().val();return"other"===e&&this.get("other_choice")&&(e=this.$inputText().val()),e},onClick:function(e,t){var i=t.parent("label"),a=i.hasClass("selected"),n=t.val();this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),t.prop("checked",!1).trigger("change"),n=!1),this.get("other_choice")&&("other"===n?this.$inputText().prop("disabled",!1):this.$inputText().prop("disabled",!0))}}),acf.registerFieldType(e)},2489:()=>{var e;jQuery,e=acf.Field.extend({type:"range",events:{'input input[type="range"]':"onChange","change input":"onChange"},$input:function(){return this.$('input[type="range"]')},$inputAlt:function(){return this.$('input[type="number"]')},setValue:function(e){this.busy=!0,acf.val(this.$input(),e),acf.val(this.$inputAlt(),this.$input().val(),!0),this.busy=!1},onChange:function(e,t){this.busy||this.setValue(t.val())}}),acf.registerFieldType(e)},714:()=>{var e,t;e=jQuery,t=acf.Field.extend({type:"relationship",events:{"keypress [data-filter]":"onKeypressFilter","change [data-filter]":"onChangeFilter","keyup [data-filter]":"onChangeFilter","click .choices-list .acf-rel-item":"onClickAdd","keypress .choices-list .acf-rel-item":"onKeypressFilter","keypress .values-list .acf-rel-item":"onKeypressFilter",'click [data-name="remove_item"]':"onClickRemove"},$control:function(){return this.$(".acf-relationship")},$list:function(e){return this.$("."+e+"-list")},$listItems:function(e){return this.$list(e).find(".acf-rel-item")},$listItem:function(e,t){return this.$list(e).find('.acf-rel-item[data-id="'+t+'"]')},getValue:function(){var t=[];return this.$listItems("values").each((function(){t.push(e(this).data("id"))})),!!t.length&&t},newChoice:function(e){return["
  • ",' '+e.text+" ","
  • "].join("")},newValue:function(e){return["
  • ",' ',' '+e.text,' '," ","
  • "].join("")},initialize:function(){var e=this.proxy(acf.once((function(){this.$list("values").sortable({items:"li",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,update:this.proxy((function(){this.$input().trigger("change")}))}),this.$list("choices").scrollTop(0).on("scroll",this.proxy(this.onScrollChoices)),this.fetch()})));this.$el.one("mouseover",e),this.$el.one("focus","input",e),acf.onceInView(this.$el,e)},onScrollChoices:function(e){if(!this.get("loading")&&this.get("more")){var t=this.$list("choices"),i=Math.ceil(t.scrollTop()),a=Math.ceil(t[0].scrollHeight),n=Math.ceil(t.innerHeight()),s=this.get("paged")||1;i+n>=a&&(this.set("paged",s+1),this.fetch())}},onKeypressFilter:function(e,t){t.hasClass("acf-rel-item-add")&&13==e.which&&this.onClickAdd(e,t),t.hasClass("acf-rel-item-remove")&&13==e.which&&this.onClickRemove(e,t),13==e.which&&e.preventDefault()},onChangeFilter:function(e,t){var i=t.val(),a=t.data("filter");this.get(a)!==i&&(this.set(a,i),this.set("paged",1),t.is("select")?this.fetch():this.maybeFetch())},onClickAdd:function(e,t){var i=this.val(),a=parseInt(this.get("max"));if(t.hasClass("disabled"))return!1;if(a>0&&i&&i.length>=a)return this.showNotice({text:acf.__("Maximum values reached ( {max} values )").replace("{max}",a),type:"warning"}),!1;t.addClass("disabled");var n=this.newValue({id:t.data("id"),text:t.html()});this.$list("values").append(n),this.$input().trigger("change")},onClickRemove:function(e,t){let i;e.preventDefault(),i=t.hasClass("acf-rel-item-remove")?t:t.parent();const a=i.parent(),n=i.data("id");a.remove(),this.$listItem("choices",n).removeClass("disabled"),this.$input().trigger("change")},maybeFetch:function(){var e=this.get("timeout");e&&clearTimeout(e),e=this.setTimeout(this.fetch,300),this.set("timeout",e)},getAjaxData:function(){var e=this.$control().data();for(var t in e)e[t]=this.get(t);return e.action="acf/fields/relationship/query",e.field_key=this.get("key"),acf.applyFilters("relationship_ajax_data",e,this)},fetch:function(){(n=this.get("xhr"))&&n.abort();var t=this.getAjaxData(),i=this.$list("choices");1==t.paged&&i.html("");var a=e('
  • '+acf.__("Loading")+"
  • ");i.append(a),this.set("loading",!0);var n=e.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",data:acf.prepareForAjax(t),context:this,success:function(t){if(!t||!t.results||!t.results.length)return this.set("more",!1),void(1==this.get("paged")&&this.$list("choices").append("
  • "+acf.__("No matches found")+"
  • "));this.set("more",t.more);var a=this.walkChoices(t.results),n=e(a),s=this.val();s&&s.length&&s.map((function(e){n.find('.acf-rel-item[data-id="'+e+'"]').addClass("disabled")})),i.append(n);var r=!1,o=!1;i.find(".acf-rel-label").each((function(){var t=e(this),i=t.siblings("ul");if(r&&r.text()==t.text())return o.append(i.children()),void e(this).parent().remove();r=t,o=i}))},complete:function(){this.set("loading",!1),a.remove()}});this.set("xhr",n)},walkChoices:function(t){var i=function(t){var a="";return e.isArray(t)?t.map((function(e){a+=i(e)})):e.isPlainObject(t)&&(void 0!==t.children?(a+='
  • '+acf.escHtml(t.text)+'
      ',a+=i(t.children),a+="
  • "):a+='
  • '+acf.escHtml(t.text)+"
  • "),a};return i(t)}}),acf.registerFieldType(t)},6965:()=>{var e;jQuery,e=acf.Field.extend({type:"select",select2:!1,wait:"load",events:{removeField:"onRemove",duplicateField:"onDuplicate"},$input:function(){return this.$("select")},initialize:function(){var e=this.$input();if(this.inherit(e),this.get("ui")){var t=this.get("ajax_action");t||(t="acf/fields/"+this.get("type")+"/query"),this.select2=acf.newSelect2(e,{field:this,ajax:this.get("ajax"),multiple:this.get("multiple"),placeholder:this.get("placeholder"),allowNull:this.get("allow_null"),ajaxAction:t})}},onRemove:function(){this.select2&&this.select2.destroy()},onDuplicate:function(e,t,i){this.select2&&(i.find(".select2-container").remove(),i.find("select").removeClass("select2-hidden-accessible"))}}),acf.registerFieldType(e)},177:()=>{!function(e,t){var i="tab",a=acf.Field.extend({type:"tab",wait:"",tabs:!1,tab:!1,events:{duplicateField:"onDuplicate"},findFields:function(){let e=".acf-field";return"acf_field_settings_tabs"===this.get("key")&&(e=".acf-field-settings-main"),"acf_field_group_settings_tabs"===this.get("key")&&(e=".field-group-settings-tab"),this.$el.nextUntil(".acf-field-tab",e)},getFields:function(){return acf.getFields(this.findFields())},findTabs:function(){return this.$el.prevAll(".acf-tab-wrap:first")},findTab:function(){return this.$(".acf-tab-button")},initialize:function(){if(this.$el.is("td"))return this.events={},!1;var e=this.findTabs(),t=this.findTab(),i=acf.parseArgs(t.data(),{endpoint:!1,placement:"",before:this.$el});!e.length||i.endpoint?this.tabs=new s(i):this.tabs=e.data("acf"),this.tab=this.tabs.addTab(t,this)},isActive:function(){return this.tab.isActive()},showFields:function(){this.getFields().map((function(e){e.show(this.cid,i),e.hiddenByTab=!1}),this)},hideFields:function(){this.getFields().map((function(e){e.hide(this.cid,i),e.hiddenByTab=this.tab}),this)},show:function(e){var t=acf.Field.prototype.show.apply(this,arguments);return t&&(this.tab.show(),this.tabs.refresh()),t},hide:function(e){var t=acf.Field.prototype.hide.apply(this,arguments);return t&&(this.tab.hide(),this.isActive()&&this.tabs.reset()),t},enable:function(e){this.getFields().map((function(e){e.enable(i)}))},disable:function(e){this.getFields().map((function(e){e.disable(i)}))},onDuplicate:function(e,t,i){this.isActive()&&i.prevAll(".acf-tab-wrap:first").remove()}});acf.registerFieldType(a);var n=0,s=acf.Model.extend({tabs:[],active:!1,actions:{refresh:"onRefresh",close_field_object:"onCloseFieldObject"},data:{before:!1,placement:"top",index:0,initialized:!1},setup:function(t){e.extend(this.data,t),this.tabs=[],this.active=!1;var i=this.get("placement"),a=this.get("before"),s=a.parent();if("left"==i&&s.hasClass("acf-fields")&&s.addClass("-sidebar"),a.is("tr"))this.$el=e('
    ');else{let t="acf-hl acf-tab-group";"acf_field_settings_tabs"===this.get("key")&&(t="acf-field-settings-tab-bar"),this.$el=e('
    ')}a.before(this.$el),this.set("index",n,!0),n++},initializeTabs:function(){if("acf_field_settings_tabs"!==this.get("key")||!e("#acf-field-group-fields").hasClass("hide-tabs")){var t=this.getVisible().shift(),i=(acf.getPreference("this.tabs")||[])[this.get("index")];this.tabs[i]&&this.tabs[i].isVisible()&&(t=this.tabs[i]),t?this.selectTab(t):this.closeTabs(),this.set("initialized",!0)}},getVisible:function(){return this.tabs.filter((function(e){return e.isVisible()}))},getActive:function(){return this.active},setActive:function(e){return this.active=e},hasActive:function(){return!1!==this.active},isActive:function(e){var t=this.getActive();return t&&t.cid===e.cid},closeActive:function(){this.hasActive()&&this.closeTab(this.getActive())},openTab:function(e){this.closeActive(),e.open(),this.setActive(e)},closeTab:function(e){e.close(),this.setActive(!1)},closeTabs:function(){this.tabs.map(this.closeTab,this)},selectTab:function(e){this.tabs.map((function(t){e.cid!==t.cid&&this.closeTab(t)}),this),this.openTab(e)},addTab:function(t,i){var a=e("
  • "+t.outerHTML()+"
  • "),n=t.attr("class").replace("acf-tab-button","");a.addClass(n),this.$("ul").append(a);var s=new r({$el:a,field:i,group:this});return this.tabs.push(s),s},reset:function(){return this.closeActive(),this.refresh()},refresh:function(){if(this.hasActive())return!1;var e=this.getVisible().shift();return e&&this.openTab(e),e},onRefresh:function(){if("left"===this.get("placement")){var e=this.$el.parent(),t=this.$el.children("ul"),i=e.is("td")?"height":"min-height",a=t.position().top+t.outerHeight(!0)-1;e.css(i,a)}},onCloseFieldObject:function(e){const t=this.getVisible().find((t=>{const i=t.$el.closest("div[data-id]").data("id");if(e.data.id===i)return t}));t&&setTimeout((()=>{this.openTab(t)}),300)}}),r=acf.Model.extend({group:!1,field:!1,events:{"click a":"onClick"},index:function(){return this.$el.index()},isVisible:function(){return acf.isVisible(this.$el)},isActive:function(){return this.$el.hasClass("active")},open:function(){this.$el.addClass("active"),this.field.showFields()},close:function(){this.$el.removeClass("active"),this.field.hideFields()},onClick:function(e,t){e.preventDefault(),this.toggle()},toggle:function(){this.isActive()||this.group.openTab(this)}});new acf.Model({priority:50,actions:{prepare:"render",append:"render",unload:"onUnload",show:"render",invalid_field:"onInvalidField"},findTabs:function(){return e(".acf-tab-wrap")},getTabs:function(){return acf.getInstances(this.findTabs())},render:function(e){this.getTabs().map((function(e){e.get("initialized")||e.initializeTabs()}))},onInvalidField:function(e){this.busy||e.hiddenByTab&&(e.hiddenByTab.toggle(),this.busy=!0,this.setTimeout((function(){this.busy=!1}),100))},onUnload:function(){var e=[];this.getTabs().map((function(t){if(t.$el.children(".acf-field-settings-tab-bar").length)return!0;var i=t.hasActive()?t.getActive().index():0;e.push(i)})),e.length&&acf.setPreference("this.tabs",e)}})}(jQuery)},2573:()=>{var e,t;e=jQuery,t=acf.Field.extend({type:"taxonomy",data:{ftype:"select"},select2:!1,wait:"load",events:{'click a[data-name="add"]':"onClickAdd",'click input[type="radio"]':"onClickRadio",removeField:"onRemove"},$control:function(){return this.$(".acf-taxonomy-field")},$input:function(){return this.getRelatedPrototype().$input.apply(this,arguments)},getRelatedType:function(){var e=this.get("ftype");return"multi_select"==e&&(e="select"),e},getRelatedPrototype:function(){return acf.getFieldType(this.getRelatedType()).prototype},getValue:function(){return this.getRelatedPrototype().getValue.apply(this,arguments)},setValue:function(){return this.getRelatedPrototype().setValue.apply(this,arguments)},initialize:function(){this.getRelatedPrototype().initialize.apply(this,arguments)},onRemove:function(){var e=this.getRelatedPrototype();e.onRemove&&e.onRemove.apply(this,arguments)},onClickAdd:function(t,i){var a=this,n=!1,s=!1,r=!1,o=!1,c=!1,l=!1,d=function(e){n.loading(!1),n.content(e),s=n.$("form"),r=n.$('input[name="term_name"]'),o=n.$('select[name="term_parent"]'),c=n.$(".acf-submit-button"),r.trigger("focus"),n.on("submit","form",u)},u=function(t,i){if(t.preventDefault(),t.stopImmediatePropagation(),""===r.val())return r.trigger("focus"),!1;acf.startButtonLoading(c);var n={action:"acf/fields/taxonomy/add_term",field_key:a.get("key"),term_name:r.val(),term_parent:o.length?o.val():0};e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(n),type:"post",dataType:"json",success:f})},f=function(e){acf.stopButtonLoading(c),l&&l.remove(),acf.isAjaxSuccess(e)?(r.val(""),p(e.data),l=acf.newNotice({type:"success",text:acf.getAjaxMessage(e),target:s,timeout:2e3,dismiss:!1})):l=acf.newNotice({type:"error",text:acf.getAjaxError(e),target:s,timeout:2e3,dismiss:!1}),r.trigger("focus")},p=function(t){var i=e(' ");t.term_parent?o.children('option[value="'+t.term_parent+'"]').after(i):o.append(i),acf.getFields({type:"taxonomy"}).map((function(e){e.get("taxonomy")==a.get("taxonomy")&&e.appendTerm(t)})),a.selectTerm(t.term_id)};!function(){n=acf.newPopup({title:i.attr("title"),loading:!0,width:"300px"});var t={action:"acf/fields/taxonomy/add_term",field_key:a.get("key")};e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(t),type:"post",dataType:"html",success:d})}()},appendTerm:function(e){"select"==this.getRelatedType()?this.appendTermSelect(e):this.appendTermCheckbox(e)},appendTermSelect:function(e){this.select2.addOption({id:e.term_id,text:e.term_label})},appendTermCheckbox:function(t){var i=this.$("[name]:first").attr("name"),a=this.$("ul:first");"checkbox"==this.getRelatedType()&&(i+="[]");var n=e(['
  • '," ","
  • "].join(""));if(t.term_parent){var s=a.find('li[data-id="'+t.term_parent+'"]');(a=s.children("ul")).exists()||(a=e('
    '),s.append(a))}a.append(n)},selectTerm:function(e){"select"==this.getRelatedType()?this.select2.selectOption(e):this.$('input[value="'+e+'"]').prop("checked",!0).trigger("change")},onClickRadio:function(e,t){var i=t.parent("label"),a=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),t.prop("checked",!1).trigger("change"))}}),acf.registerFieldType(t)},9047:()=>{var e,t;e=jQuery,t=acf.models.DatePickerField.extend({type:"time_picker",$control:function(){return this.$(".acf-time-picker")},initialize:function(){var e=this.$input(),t=this.$inputText(),i={timeFormat:this.get("time_format"),altField:e,altFieldTimeOnly:!1,altTimeFormat:"HH:mm:ss",showButtonPanel:!0,controlType:"select",oneLine:!0,closeText:acf.get("dateTimePickerL10n").selectText,timeOnly:!0,onClose:function(e,t,i){var a=t.dpDiv.find(".ui-datepicker-close");!e&&a.is(":hover")&&i._updateDateTime()}};i=acf.applyFilters("time_picker_args",i,this),acf.newTimePicker(t,i),acf.doAction("time_picker_init",t,i,this)}}),acf.registerFieldType(t),acf.newTimePicker=function(t,i){if(void 0===e.timepicker)return!1;i=i||{},t.timepicker(i),e("body > #ui-datepicker-div").exists()&&e("body > #ui-datepicker-div").wrap('
    ')}},1788:()=>{var e;jQuery,e=acf.Field.extend({type:"true_false",events:{"change .acf-switch-input":"onChange","focus .acf-switch-input":"onFocus","blur .acf-switch-input":"onBlur","keypress .acf-switch-input":"onKeypress"},$input:function(){return this.$('input[type="checkbox"]')},$switch:function(){return this.$(".acf-switch")},getValue:function(){return this.$input().prop("checked")?1:0},initialize:function(){this.render()},render:function(){var e=this.$switch();if(e.length){var t=e.children(".acf-switch-on"),i=e.children(".acf-switch-off"),a=Math.max(t.width(),i.width());a&&(t.css("min-width",a),i.css("min-width",a))}},switchOn:function(){this.$input().prop("checked",!0),this.$switch().addClass("-on")},switchOff:function(){this.$input().prop("checked",!1),this.$switch().removeClass("-on")},onChange:function(e,t){t.prop("checked")?this.switchOn():this.switchOff()},onFocus:function(e,t){this.$switch().addClass("-focus")},onBlur:function(e,t){this.$switch().removeClass("-focus")},onKeypress:function(e,t){return 37===e.keyCode?this.switchOff():39===e.keyCode?this.switchOn():void 0}}),acf.registerFieldType(e)},4429:()=>{var e;jQuery,e=acf.Field.extend({type:"url",events:{'keyup input[type="url"]':"onkeyup"},$control:function(){return this.$(".acf-input-wrap")},$input:function(){return this.$('input[type="url"]')},initialize:function(){this.render()},isValid:function(){var e=this.val();return!!e&&(-1!==e.indexOf("://")||0===e.indexOf("//"))},render:function(){this.isValid()?this.$control().addClass("-valid"):this.$control().removeClass("-valid")},onkeyup:function(e,t){this.render()}}),acf.registerFieldType(e)},7790:()=>{var e;jQuery,e=acf.models.SelectField.extend({type:"user"}),acf.registerFieldType(e),acf.addFilter("select2_ajax_data",(function(e,t,i,a,n){if(!a)return e;const s=a.get("queryNonce");return s&&s.length&&(e.user_query_nonce=s),e}))},4850:()=>{var e;jQuery,e=acf.Field.extend({type:"wysiwyg",wait:"load",events:{"mousedown .acf-editor-wrap.delay":"onMousedown",unmountField:"disableEditor",remountField:"enableEditor",removeField:"disableEditor"},$control:function(){return this.$(".acf-editor-wrap")},$input:function(){return this.$("textarea")},getMode:function(){return this.$control().hasClass("tmce-active")?"visual":"text"},initialize:function(){this.$control().hasClass("delay")||this.initializeEditor()},initializeEditor:function(){var e=this.$control(),t=this.$input(),i={tinymce:!0,quicktags:!0,toolbar:this.get("toolbar"),mode:this.getMode(),field:this},a=t.attr("id"),n=acf.uniqueId("acf-editor-"),s=t.data(),r=t.val();acf.rename({target:e,search:a,replace:n,destructive:!0}),this.set("id",n,!0),this.$input().data(s).val(r),acf.tinymce.initialize(n,i)},onMousedown:function(e){e.preventDefault();var t=this.$control();t.removeClass("delay"),t.find(".acf-editor-toolbar").remove(),this.initializeEditor()},enableEditor:function(){"visual"==this.getMode()&&acf.tinymce.enable(this.get("id"))},disableEditor:function(){acf.tinymce.destroy(this.get("id"))}}),acf.registerFieldType(e)},6291:()=>{!function(e,t){var i=[];acf.Field=acf.Model.extend({type:"",eventScope:".acf-field",wait:"ready",setup:function(e){this.$el=e,this.inherit(e),this.inherit(this.$control())},val:function(e){return e!==t?this.setValue(e):this.prop("disabled")?null:this.getValue()},getValue:function(){return this.$input().val()},setValue:function(e){return acf.val(this.$input(),e)},__:function(e){return acf._e(this.type,e)},$control:function(){return!1},$input:function(){return this.$("[name]:first")},$inputWrap:function(){return this.$(".acf-input:first")},$labelWrap:function(){return this.$(".acf-label:first")},getInputName:function(){return this.$input().attr("name")||""},parent:function(){var e=this.parents();return!!e.length&&e[0]},parents:function(){var e=this.$el.parents(".acf-field");return acf.getFields(e)},show:function(e,t){var i=acf.show(this.$el,e);return i&&(this.prop("hidden",!1),acf.doAction("show_field",this,t)),i},hide:function(e,t){var i=acf.hide(this.$el,e);return i&&(this.prop("hidden",!0),acf.doAction("hide_field",this,t)),i},enable:function(e,t){var i=acf.enable(this.$el,e);return i&&(this.prop("disabled",!1),acf.doAction("enable_field",this,t)),i},disable:function(e,t){var i=acf.disable(this.$el,e);return i&&(this.prop("disabled",!0),acf.doAction("disable_field",this,t)),i},showEnable:function(e,t){return this.enable.apply(this,arguments),this.show.apply(this,arguments)},hideDisable:function(e,t){return this.disable.apply(this,arguments),this.hide.apply(this,arguments)},showNotice:function(e){"object"!=typeof e&&(e={text:e}),this.notice&&this.notice.remove(),e.target=this.$inputWrap(),this.notice=acf.newNotice(e)},removeNotice:function(e){this.notice&&(this.notice.away(e||0),this.notice=!1)},showError:function(i){this.$el.addClass("acf-error"),i!==t&&this.showNotice({text:i,type:"error",dismiss:!1}),acf.doAction("invalid_field",this),this.$el.one("focus change","input, select, textarea",e.proxy(this.removeError,this))},removeError:function(){this.$el.removeClass("acf-error"),this.removeNotice(250),acf.doAction("valid_field",this)},trigger:function(e,t,i){return"invalidField"==e&&(i=!0),acf.Model.prototype.trigger.apply(this,[e,t,i])}}),acf.newField=function(e){var t=e.data("type"),i=a(t),n=new(acf.models[i]||acf.Field)(e);return acf.doAction("new_field",n),n};var a=function(e){return acf.strPascalCase(e||"")+"Field"};acf.registerFieldType=function(e){var t=e.prototype.type,n=a(t);acf.models[n]=e,i.push(t)},acf.getFieldType=function(e){var t=a(e);return acf.models[t]||!1},acf.getFieldTypes=function(e){e=acf.parseArgs(e,{category:""});var t=[];return i.map((function(i){var a=acf.getFieldType(i),n=a.prototype;e.category&&n.category!==e.category||t.push(a)})),t}}(jQuery)},1580:()=>{!function(e,t){acf.findFields=function(t){var i=".acf-field",a=!1;return(t=acf.parseArgs(t,{key:"",name:"",type:"",is:"",parent:!1,sibling:!1,limit:!1,visible:!1,suppressFilters:!1,excludeSubFields:!1})).suppressFilters||(t=acf.applyFilters("find_fields_args",t)),t.key&&(i+='[data-key="'+t.key+'"]'),t.type&&(i+='[data-type="'+t.type+'"]'),t.name&&(i+='[data-name="'+t.name+'"]'),t.is&&(i+=t.is),t.visible&&(i+=":visible"),t.suppressFilters||(i=acf.applyFilters("find_fields_selector",i,t)),t.parent?(a=t.parent.find(i),t.excludeSubFields&&(a=a.not(t.parent.find(".acf-is-subfields .acf-field")))):a=t.sibling?t.sibling.siblings(i):e(i),t.suppressFilters||(a=a.not(".acf-clone .acf-field"),a=acf.applyFilters("find_fields",a)),t.limit&&(a=a.slice(0,t.limit)),a},acf.findField=function(e,t){return acf.findFields({key:e,limit:1,parent:t,suppressFilters:!0})},acf.getField=function(e){e instanceof jQuery||(e=acf.findField(e));var t=e.data("acf");return t||(t=acf.newField(e)),t},acf.getFields=function(t){t instanceof jQuery||(t=acf.findFields(t));var i=[];return t.each((function(){var t=acf.getField(e(this));i.push(t)})),i},acf.findClosestField=function(e){return e.closest(".acf-field")},acf.getClosestField=function(e){var t=acf.findClosestField(e);return this.getField(t)};var i=function(e){var t=e+"_field",i=e+"Field";acf.addAction(t,(function(n){var s=acf.arrayArgs(arguments),r=s.slice(1),o=["type","name","key"];o.map((function(e){var i="/"+e+"="+n.get(e);s=[t+i,n].concat(r),acf.doAction.apply(null,s)})),a.indexOf(e)>-1&&n.trigger(i,r)}))},a=["remove","unmount","remount","sortstart","sortstop","show","hide","unload","valid","invalid","enable","disable","duplicate"];["prepare","ready","load","append","remove","unmount","remount","sortstart","sortstop","show","hide","unload"].map((function(e){var t=e,a=e+"_fields",n=e+"_field";acf.addAction(t,(function(e){var t=acf.arrayArgs(arguments),i=t.slice(1),n=acf.getFields({parent:e});if(n.length){var s=[a,n].concat(i);acf.doAction.apply(null,s)}})),acf.addAction(a,(function(e){var t=acf.arrayArgs(arguments),i=t.slice(1);e.map((function(e,t){var a=[n,e].concat(i);acf.doAction.apply(null,a)}))})),i(e)})),["valid","invalid","enable","disable","new","duplicate"].map(i),new acf.Model({id:"fieldsEventManager",events:{'click .acf-field a[href="#"]':"onClick","change .acf-field":"onChange"},onClick:function(e){e.preventDefault()},onChange:function(){e("#_acf_changed").val(1)}}),new acf.Model({id:"duplicateFieldsManager",actions:{duplicate:"onDuplicate",duplicate_fields:"onDuplicateFields"},onDuplicate:function(e,t){var i=acf.getFields({parent:e});if(i.length){var a=acf.findFields({parent:t});acf.doAction("duplicate_fields",i,a)}},onDuplicateFields:function(t,i){t.map((function(t,a){acf.doAction("duplicate_field",t,e(i[a]))}))}})}(jQuery)},5938:()=>{var e;e=jQuery,new acf.Model({priority:90,actions:{new_field:"refresh",show_field:"refresh",hide_field:"refresh",remove_field:"refresh",unmount_field:"refresh",remount_field:"refresh"},refresh:function(){acf.refresh()}}),new acf.Model({priority:1,actions:{sortstart:"onSortstart",sortstop:"onSortstop"},onSortstart:function(e){acf.doAction("unmount",e)},onSortstop:function(e){acf.doAction("remount",e)}}),new acf.Model({actions:{sortstart:"onSortstart"},onSortstart:function(t,i){t.is("tr")&&(i.html(' '),t.addClass("acf-sortable-tr-helper"),t.children().each((function(){e(this).width(e(this).width())})),i.height(t.height()+"px"),t.removeClass("acf-sortable-tr-helper"))}}),new acf.Model({actions:{after_duplicate:"onAfterDuplicate"},onAfterDuplicate:function(t,i){var a=[];t.find("select").each((function(t){a.push(e(this).val())})),i.find("select").each((function(t){e(this).val(a[t])}))}}),new acf.Model({id:"tableHelper",priority:20,actions:{refresh:"renderTables"},renderTables:function(t){var i=this;e(".acf-table:visible").each((function(){i.renderTable(e(this))}))},renderTable:function(t){var i=t.find("> thead > tr:visible > th[data-key]"),a=t.find("> tbody > tr:visible > td[data-key]");if(!i.length||!a.length)return!1;i.each((function(t){var i=e(this),n=i.data("key"),s=a.filter('[data-key="'+n+'"]'),r=s.filter(".acf-hidden");s.removeClass("acf-empty"),s.length===r.length?acf.hide(i):(acf.show(i),r.addClass("acf-empty"))})),i.css("width","auto"),i=i.not(".acf-hidden");var n=100;i.length,i.filter("[data-width]").each((function(){var t=e(this).data("width");e(this).css("width",t+"%"),n-=t}));var s=i.not("[data-width]");if(s.length){var r=n/s.length;s.css("width",r+"%"),n=0}n>0&&i.last().css("width","auto"),a.filter(".-collapsed-target").each((function(){var t=e(this);t.parent().hasClass("-collapsed")?t.attr("colspan",i.length):t.removeAttr("colspan")}))}}),new acf.Model({id:"fieldsHelper",priority:30,actions:{refresh:"renderGroups"},renderGroups:function(){var t=this;e(".acf-fields:visible").each((function(){t.renderGroup(e(this))}))},renderGroup:function(t){var i=0,a=0,n=e(),s=t.children(".acf-field[data-width]:visible");return!!s.length&&(t.hasClass("-left")?(s.removeAttr("data-width"),s.css("width","auto"),!1):(s.removeClass("-r0 -c0").css({"min-height":0}),s.each((function(t){var s=e(this),r=s.position(),o=Math.ceil(r.top),c=Math.ceil(r.left);n.length&&o>i&&(n.css({"min-height":a+"px"}),r=s.position(),o=Math.ceil(r.top),c=Math.ceil(r.left),i=0,a=0,n=e()),acf.get("rtl")&&(c=Math.ceil(s.parent().width()-(r.left+s.outerWidth()))),0==o?s.addClass("-r0"):0==c&&s.addClass("-c0");var l=Math.ceil(s.outerHeight())+1;a=Math.max(a,l),i=Math.max(i,o),n=n.add(s)})),void(n.length&&n.css({"min-height":a+"px"}))))}}),new acf.Model({id:"bodyClassShiftHelper",events:{keydown:"onKeyDown",keyup:"onKeyUp"},isShiftKey:function(e){return 16===e.keyCode},onKeyDown:function(t){this.isShiftKey(t)&&e("body").addClass("acf-keydown-shift")},onKeyUp:function(t){this.isShiftKey(t)&&e("body").removeClass("acf-keydown-shift")}})},3812:()=>{!function(e,t){acf.newMediaPopup=function(e){var t=null;return e=acf.parseArgs(e,{mode:"select",title:"",button:"",type:"",field:!1,allowedTypes:"",library:"all",multiple:!1,attachment:0,autoOpen:!0,open:function(){},select:function(){},close:function(){}}),t="edit"==e.mode?new acf.models.EditMediaPopup(e):new acf.models.SelectMediaPopup(e),e.autoOpen&&setTimeout((function(){t.open()}),1),acf.doAction("new_media_popup",t),t};var i=function(){var e=acf.get("post_id");return acf.isNumeric(e)?e:0};acf.getMimeTypes=function(){return this.get("mimeTypes")},acf.getMimeType=function(e){var t=acf.getMimeTypes();if(void 0!==t[e])return t[e];for(var i in t)if(-1!==i.indexOf(e))return t[i];return!1};var a=acf.Model.extend({id:"MediaPopup",data:{},defaults:{},frame:!1,setup:function(t){e.extend(this.data,t)},initialize:function(){var e=this.getFrameOptions();this.addFrameStates(e);var t=wp.media(e);t.acf=this,this.addFrameEvents(t,e),this.frame=t},open:function(){this.frame.open()},close:function(){this.frame.close()},remove:function(){this.frame.detach(),this.frame.remove()},getFrameOptions:function(){var e={title:this.get("title"),multiple:this.get("multiple"),library:{},states:[]};return this.get("type")&&(e.library.type=this.get("type")),"uploadedTo"===this.get("library")&&(e.library.uploadedTo=i()),this.get("attachment")&&(e.library.post__in=[this.get("attachment")]),this.get("button")&&(e.button={text:this.get("button")}),e},addFrameStates:function(e){var t=wp.media.query(e.library);this.get("field")&&acf.isset(t,"mirroring","args")&&(t.mirroring.args._acfuploader=this.get("field")),e.states.push(new wp.media.controller.Library({library:t,multiple:this.get("multiple"),title:this.get("title"),priority:20,filterable:"all",editable:!0,allowLocalEdits:!0})),acf.isset(wp,"media","controller","EditImage")&&e.states.push(new wp.media.controller.EditImage)},addFrameEvents:function(e,t){e.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-media-modal -"+this.acf.get("mode"))}),e),e.on("content:render:edit-image",(function(){var e=this.state().get("image"),t=new wp.media.view.EditImage({model:e,controller:this}).render();this.content.set(t),t.loadEditor()}),e),e.on("select",(function(){var t=e.state().get("selection");t&&t.each((function(t,i){e.acf.get("select").apply(e.acf,[t,i])}))})),e.on("close",(function(){setTimeout((function(){e.acf.get("close").apply(e.acf),e.acf.remove()}),1)}))}});acf.models.SelectMediaPopup=a.extend({id:"SelectMediaPopup",setup:function(e){e.button||(e.button=acf._x("Select","verb")),a.prototype.setup.apply(this,arguments)},addFrameEvents:function(e,t){acf.isset(_wpPluploadSettings,"defaults","multipart_params")&&(_wpPluploadSettings.defaults.multipart_params._acfuploader=this.get("field"),e.on("open",(function(){delete _wpPluploadSettings.defaults.multipart_params._acfuploader}))),e.on("content:activate:browse",(function(){var t=!1;try{t=e.content.get().toolbar}catch(e){return void console.log(e)}e.acf.customizeFilters.apply(e.acf,[t])})),a.prototype.addFrameEvents.apply(this,arguments)},customizeFilters:function(t){var i=t.get("filters");if("image"==this.get("type")&&(i.filters.all.text=acf.__("All images"),delete i.filters.audio,delete i.filters.video,delete i.filters.image,e.each(i.filters,(function(e,t){t.props.type=t.props.type||"image"}))),this.get("allowedTypes")&&this.get("allowedTypes").split(" ").join("").split(".").join("").split(",").map((function(e){var t=acf.getMimeType(e);if(t){var a={text:t,props:{status:null,type:t,uploadedTo:null,orderby:"date",order:"DESC"},priority:20};i.filters[t]=a}})),"uploadedTo"===this.get("library")){var a=this.frame.options.library.uploadedTo;delete i.filters.unattached,delete i.filters.uploaded,e.each(i.filters,(function(e,t){t.text+=" ("+acf.__("Uploaded to this post")+")",t.props.uploadedTo=a}))}var n=this.get("field");e.each(i.filters,(function(e,t){t.props._acfuploader=n})),t.get("search").model.attributes._acfuploader=n,i.renderFilters&&i.renderFilters()}}),acf.models.EditMediaPopup=a.extend({id:"SelectMediaPopup",setup:function(e){e.button||(e.button=acf._x("Update","verb")),a.prototype.setup.apply(this,arguments)},addFrameEvents:function(e,t){e.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-expanded"),"browse"!=this.content.mode()&&this.content.mode("browse");var t=this.state().get("selection"),i=wp.media.attachment(e.acf.get("attachment"));t.add(i)}),e),a.prototype.addFrameEvents.apply(this,arguments)}}),new acf.Model({id:"customizePrototypes",wait:"ready",initialize:function(){if(acf.isset(window,"wp","media","view")){var e=i();e&&acf.isset(wp,"media","view","settings","post")&&(wp.media.view.settings.post.id=e),this.customizeAttachmentsButton(),this.customizeAttachmentsRouter(),this.customizeAttachmentFilters(),this.customizeAttachmentCompat(),this.customizeAttachmentLibrary()}},customizeAttachmentsButton:function(){if(acf.isset(wp,"media","view","Button")){var e=wp.media.view.Button;wp.media.view.Button=e.extend({initialize:function(){var e=_.defaults(this.options,this.defaults);this.model=new Backbone.Model(e),this.listenTo(this.model,"change",this.render)}})}},customizeAttachmentsRouter:function(){if(acf.isset(wp,"media","view","Router")){var t=wp.media.view.Router;wp.media.view.Router=t.extend({addExpand:function(){var t=e([' ',' '+acf.__("Expand Details")+" ",' '+acf.__("Collapse Details")+" "," "].join(""));t.on("click",(function(t){t.preventDefault();var i=e(this).closest(".media-modal");i.hasClass("acf-expanded")?i.removeClass("acf-expanded"):i.addClass("acf-expanded")})),this.$el.append(t)},initialize:function(){return t.prototype.initialize.apply(this,arguments),this.addExpand(),this}})}},customizeAttachmentFilters:function(){acf.isset(wp,"media","view","AttachmentFilters","All")&&(wp.media.view.AttachmentFilters.All.prototype.renderFilters=function(){this.$el.html(_.chain(this.filters).map((function(t,i){return{el:e(" ").val(i).html(t.text)[0],priority:t.priority||50}}),this).sortBy("priority").pluck("el").value())})},customizeAttachmentCompat:function(){if(acf.isset(wp,"media","view","AttachmentCompat")){var t=wp.media.view.AttachmentCompat,i=!1;wp.media.view.AttachmentCompat=t.extend({render:function(){return this.rendered?this:(t.prototype.render.apply(this,arguments),this.$("#acf-form-data").length?(clearTimeout(i),i=setTimeout(e.proxy((function(){this.rendered=!0,acf.doAction("append",this.$el)}),this),50),this):this)},save:function(e){var t;e&&e.preventDefault(),t=acf.serializeForAjax(this.$el),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(t).always(_.bind(this.postSave,this))}})}},customizeAttachmentLibrary:function(){if(acf.isset(wp,"media","view","Attachment","Library")){var e=wp.media.view.Attachment.Library;wp.media.view.Attachment.Library=e.extend({render:function(){var t=acf.isget(this,"controller","acf"),i=acf.isget(this,"model","attributes");if(t&&i){i.acf_errors&&this.$el.addClass("acf-disabled");var a=t.get("selected");a&&a.indexOf(i.id)>-1&&this.$el.addClass("acf-selected")}return e.prototype.render.apply(this,arguments)},toggleSelection:function(t){this.collection;var i=this.options.selection,a=this.model,n=(i.single(),this.controller),s=acf.isget(this,"model","attributes","acf_errors"),r=n.$el.find(".media-frame-content .media-sidebar");if(r.children(".acf-selection-error").remove(),r.children().removeClass("acf-hidden"),n&&s){var o=acf.isget(this,"model","attributes","filename");return r.children().addClass("acf-hidden"),r.prepend(['
    ',' '+acf.__("Restricted")+" ",' '+o+" ",' '+s+" ","
    "].join("")),i.reset(),void i.single(a)}return e.prototype.toggleSelection.apply(this,arguments)}})}}})}(jQuery)},1128:()=>{var e;e=jQuery,new acf.Model({wait:"prepare",priority:1,initialize:function(){(acf.get("postboxes")||[]).map(acf.newPostbox)}}),acf.getPostbox=function(t){return"string"==typeof arguments[0]&&(t=e("#"+arguments[0])),acf.getInstance(t)},acf.getPostboxes=function(){return acf.getInstances(e(".acf-postbox"))},acf.newPostbox=function(e){return new acf.models.Postbox(e)},acf.models.Postbox=acf.Model.extend({data:{id:"",key:"",style:"default",label:"top",edit:""},setup:function(t){t.editLink&&(t.edit=t.editLink),e.extend(this.data,t),this.$el=this.$postbox()},$postbox:function(){return e("#"+this.get("id"))},$hide:function(){return e("#"+this.get("id")+"-hide")},$hideLabel:function(){return this.$hide().parent()},$hndle:function(){return this.$("> .hndle")},$handleActions:function(){return this.$("> .postbox-header .handle-actions")},$inside:function(){return this.$("> .inside")},isVisible:function(){return this.$el.hasClass("acf-hidden")},isHiddenByScreenOptions:function(){return this.$el.hasClass("hide-if-js")||"none"==this.$el.css("display")},initialize:function(){if(this.$el.addClass("acf-postbox"),"block"!==acf.get("editor")){var e=this.get("style");"default"!==e&&this.$el.addClass(e)}this.$inside().addClass("acf-fields").addClass("-"+this.get("label"));var t=this.get("edit");if(t){var i=' ',a=this.$handleActions();a.length?a.prepend(i):this.$hndle().append(i)}this.show()},show:function(){this.$el.hasClass("hide-if-js")?this.$hide().prop("checked",!1):(this.$hideLabel().show(),this.$hide().prop("checked",!0),this.$el.show().removeClass("acf-hidden"),acf.doAction("show_postbox",this))},enable:function(){acf.enable(this.$el,"postbox")},showEnable:function(){this.enable(),this.show()},hide:function(){this.$hideLabel().hide(),this.$el.hide().addClass("acf-hidden"),acf.doAction("hide_postbox",this)},disable:function(){acf.disable(this.$el,"postbox")},hideDisable:function(){this.disable(),this.hide()},html:function(e){this.$inside().html(e),acf.doAction("append",this.$el)}})},7240:()=>{var e;e=jQuery,acf.screen=new acf.Model({active:!0,xhr:!1,timeout:!1,wait:"load",events:{"change #page_template":"onChange","change #parent_id":"onChange","change #post-formats-select":"onChange","change .categorychecklist":"onChange","change .tagsdiv":"onChange",'change .acf-taxonomy-field[data-save="1"]':"onChange","change #product-type":"onChange"},isPost:function(){return"post"===acf.get("screen")},isUser:function(){return"user"===acf.get("screen")},isTaxonomy:function(){return"taxonomy"===acf.get("screen")},isAttachment:function(){return"attachment"===acf.get("screen")},isNavMenu:function(){return"nav_menu"===acf.get("screen")},isWidget:function(){return"widget"===acf.get("screen")},isComment:function(){return"comment"===acf.get("screen")},getPageTemplate:function(){var t=e("#page_template");return t.length?t.val():null},getPageParent:function(t,i){return(i=e("#parent_id")).length?i.val():null},getPageType:function(e,t){return this.getPageParent()?"child":"parent"},getPostType:function(){return e("#post_type").val()},getPostFormat:function(t,i){if((i=e("#post-formats-select input:checked")).length){var a=i.val();return"0"==a?"standard":a}return null},getPostCoreTerms:function(){var t={},i=acf.serialize(e(".categorydiv, .tagsdiv"));for(var a in i.tax_input&&(t=i.tax_input),i.post_category&&(t.category=i.post_category),t)acf.isArray(t[a])||(t[a]=t[a].split(/,[\s]?/));return t},getPostTerms:function(){var e=this.getPostCoreTerms();for(var t in acf.getFields({type:"taxonomy"}).map((function(t){if(t.get("save")){var i=t.val(),a=t.get("taxonomy");i&&(e[a]=e[a]||[],i=acf.isArray(i)?i:[i],e[a]=e[a].concat(i))}})),null!==(productType=this.getProductType())&&(e.product_type=[productType]),e)e[t]=acf.uniqueArray(e[t]);return e},getProductType:function(){var t=e("#product-type");return t.length?t.val():null},check:function(){if("post"===acf.get("screen")){this.xhr&&this.xhr.abort();var t=acf.parseArgs(this.data,{action:"acf/ajax/check_screen",screen:acf.get("screen"),exists:[]});this.isPost()&&(t.post_id=acf.get("post_id")),null!==(postType=this.getPostType())&&(t.post_type=postType),null!==(pageTemplate=this.getPageTemplate())&&(t.page_template=pageTemplate),null!==(pageParent=this.getPageParent())&&(t.page_parent=pageParent),null!==(pageType=this.getPageType())&&(t.page_type=pageType),null!==(postFormat=this.getPostFormat())&&(t.post_format=postFormat),null!==(postTerms=this.getPostTerms())&&(t.post_terms=postTerms),acf.getPostboxes().map((function(e){t.exists.push(e.get("key"))})),t=acf.applyFilters("check_screen_args",t),this.xhr=e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(t),type:"post",dataType:"json",context:this,success:function(e){"post"==acf.get("screen")?this.renderPostScreen(e):"user"==acf.get("screen")&&this.renderUserScreen(e),acf.doAction("check_screen_complete",e,t)}})}},onChange:function(e,t){this.setTimeout(this.check,1)},renderPostScreen:function(t){var i=function(t,i){var a=e._data(t[0]).events;for(var n in a)for(var s=0;s =0;n--)if(e("#"+i[n]).length)return e("#"+i[n]).after(e("#"+t));for(n=a+1;n =5.5)var o=['
    ','

    '," "+acf.escHtml(n.title)+" ","

    ",'
    ',' ","
    ","
    "].join("");else o=[' ",'

    '," "+acf.escHtml(n.title)+" ","

    "].join("");n.classes||(n.classes="");var c=e(['
    ',o,'
    ',n.html,"
    ","
    "].join(""));if(e("#adv-settings").length){var l=e("#adv-settings .metabox-prefs"),d=e([' "].join(""));i(l.find("input").first(),d.find("input")),l.append(d)}e(".postbox").length&&(i(e(".postbox .handlediv").first(),c.children(".handlediv")),i(e(".postbox .hndle").first(),c.children(".hndle"))),"side"===n.position?e("#"+n.position+"-sortables").append(c):e("#"+n.position+"-sortables").prepend(c);var u=[];if(t.results.map((function(t){n.position===t.position&&e("#"+n.position+"-sortables #"+t.id).length&&u.push(t.id)})),a(n.id,u),t.sorted)for(var f in t.sorted){let e=t.sorted[f];if("string"==typeof e&&(e=e.split(","),a(n.id,e)))break}r=acf.newPostbox(n),acf.doAction("append",c),acf.doAction("append_postbox",r)}return r.showEnable(),t.visible.push(n.id),n})),acf.getPostboxes().map((function(e){-1===t.visible.indexOf(e.get("id"))&&(e.hideDisable(),t.hidden.push(e.get("id")))})),e("#acf-style").html(t.style),acf.doAction("refresh_post_screen",t)},renderUserScreen:function(e){}}),new acf.Model({postEdits:{},wait:"prepare",initialize:function(){acf.isGutenberg()&&(wp.data.subscribe(acf.debounce(this.onChange).bind(this)),acf.screen.getPageTemplate=this.getPageTemplate,acf.screen.getPageParent=this.getPageParent,acf.screen.getPostType=this.getPostType,acf.screen.getPostFormat=this.getPostFormat,acf.screen.getPostCoreTerms=this.getPostCoreTerms,acf.unload.disable(),parseFloat(acf.get("wp_version"))>=5.3&&this.addAction("refresh_post_screen",this.onRefreshPostScreen),wp.domReady(acf.refresh))},onChange:function(){var e=["template","parent","format"];(wp.data.select("core").getTaxonomies()||[]).map((function(t){e.push(t.rest_base)}));var t=wp.data.select("core/editor").getPostEdits(),i={};e.map((function(e){void 0!==t[e]&&(i[e]=t[e])})),JSON.stringify(i)!==JSON.stringify(this.postEdits)&&(this.postEdits=i,acf.screen.check())},getPageTemplate:function(){return wp.data.select("core/editor").getEditedPostAttribute("template")},getPageParent:function(e,t){return wp.data.select("core/editor").getEditedPostAttribute("parent")},getPostType:function(){return wp.data.select("core/editor").getEditedPostAttribute("type")},getPostFormat:function(e,t){return wp.data.select("core/editor").getEditedPostAttribute("format")},getPostCoreTerms:function(){var e={};return(wp.data.select("core").getTaxonomies()||[]).map((function(t){var i=wp.data.select("core/editor").getEditedPostAttribute(t.rest_base);i&&(e[t.slug]=i)})),e},onRefreshPostScreen:function(e){var t=wp.data.select("core/edit-post"),i=wp.data.dispatch("core/edit-post"),a={};t.getActiveMetaBoxLocations().map((function(e){a[e]=t.getMetaBoxesPerLocation(e)}));var n=[];for(var s in a)a[s].map((function(e){n.push(e.id)}));for(var s in e.results.filter((function(e){return-1===n.indexOf(e.id)})).map((function(e,t){var i=e.position;a[i]=a[i]||[],a[i].push({id:e.id,title:e.title})})),a)a[s]=a[s].filter((function(t){return-1===e.hidden.indexOf(t.id)}));i.setAvailableMetaBoxesPerLocation(a)}})},5796:()=>{!function(e,t){function i(){return acf.isset(window,"jQuery","fn","select2","amd")?4:!!acf.isset(window,"Select2")&&3}acf.newSelect2=function(e,t){if(t=acf.parseArgs(t,{allowNull:!1,placeholder:"",multiple:!1,field:!1,ajax:!1,ajaxAction:"",ajaxData:function(e){return e},ajaxResults:function(e){return e}}),4==i())var a=new n(e,t);else a=new s(e,t);return acf.doAction("new_select2",a),a};var a=acf.Model.extend({setup:function(t,i){e.extend(this.data,i),this.$el=t},initialize:function(){},selectOption:function(e){var t=this.getOption(e);t.prop("selected")||t.prop("selected",!0).trigger("change")},unselectOption:function(e){var t=this.getOption(e);t.prop("selected")&&t.prop("selected",!1).trigger("change")},getOption:function(e){return this.$('option[value="'+e+'"]')},addOption:function(t){t=acf.parseArgs(t,{id:"",text:"",selected:!1});var i=this.getOption(t.id);return i.length||((i=e(" ")).html(t.text),i.attr("value",t.id),i.prop("selected",t.selected),this.$el.append(i)),i},getValue:function(){var t=[],i=this.$el.find("option:selected");return i.exists()?((i=i.sort((function(e,t){return+e.getAttribute("data-i")-+t.getAttribute("data-i")}))).each((function(){var i=e(this);t.push({$el:i,id:i.attr("value"),text:i.text()})})),t):t},mergeOptions:function(){},getChoices:function(){var t=function(i){var a=[];return i.children().each((function(){var i=e(this);i.is("optgroup")?a.push({text:i.attr("label"),children:t(i)}):a.push({id:i.attr("value"),text:i.text()})})),a};return t(this.$el)},getAjaxData:function(e){var t={action:this.get("ajaxAction"),s:e.term||"",paged:e.page||1},i=this.get("field");i&&(t.field_key=i.get("key"));var a=this.get("ajaxData");return a&&(t=a.apply(this,[t,e])),t=acf.applyFilters("select2_ajax_data",t,this.data,this.$el,i||!1,this),acf.prepareForAjax(t)},getAjaxResults:function(e,t){e=acf.parseArgs(e,{results:!1,more:!1});var i=this.get("ajaxResults");return i&&(e=i.apply(this,[e,t])),acf.applyFilters("select2_ajax_results",e,t,this)},processAjaxResults:function(t,i){return(t=this.getAjaxResults(t,i)).more&&(t.pagination={more:!0}),setTimeout(e.proxy(this.mergeOptions,this),1),t},destroy:function(){this.$el.data("select2")&&this.$el.select2("destroy"),this.$el.siblings(".select2-container").remove()}}),n=a.extend({initialize:function(){var i=this.$el,a={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),multiple:this.get("multiple"),data:[],escapeMarkup:function(e){return"string"!=typeof e?e:acf.escHtml(e)}};acf.isset(window,"jQuery","fn","selectWoo")||(a.templateSelection=function(t){var i=e(' ');return i.html(acf.escHtml(t.text)),i.data("element",t.element),i}),a.multiple&&this.getValue().map((function(e){e.$el.detach().appendTo(i)}));var n=i.attr("data-ajax");n!==t&&(i.removeData("ajax"),i.removeAttr("data-ajax")),this.get("ajax")&&(a.ajax={url:acf.get("ajaxurl"),delay:250,dataType:"json",type:"post",cache:!1,data:e.proxy(this.getAjaxData,this),processResults:e.proxy(this.processAjaxResults,this)});var s=this.get("field");a=acf.applyFilters("select2_args",a,i,this.data,s||!1,this),i.select2(a);var r=i.next(".select2-container");if(a.multiple){var o=r.find("ul");o.sortable({stop:function(t){o.find(".select2-selection__choice").each((function(){if(e(this).data("data"))var t=e(e(this).data("data").element);else t=e(e(this).find("span.acf-selection").data("element"));t.detach().appendTo(i)})),i.trigger("change")}}),i.on("select2:select",this.proxy((function(e){this.getOption(e.params.data.id).detach().appendTo(this.$el)})))}i.on("select2:open",(()=>{e(".select2-container--open .select2-search__field").get(-1).focus()})),r.addClass("-acf"),n!==t&&i.attr("data-ajax",n),acf.doAction("select2_init",i,a,this.data,s||!1,this)},mergeOptions:function(){var t=!1,i=!1;e('.select2-results__option[role="group"]').each((function(){var a=e(this).children("ul"),n=e(this).children("strong");if(i&&i.text()===n.text())return t.append(a.children()),void e(this).remove();t=a,i=n}))}}),s=a.extend({initialize:function(){var t=this.$el,i=this.getValue(),a=this.get("multiple"),n={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),separator:"||",multiple:this.get("multiple"),data:this.getChoices(),escapeMarkup:function(e){return acf.escHtml(e)},dropdownCss:{"z-index":"999999999"},initSelection:function(e,t){t(a?i:i.shift())}},s=t.siblings("input");s.length||(s=e(' '),t.before(s)),inputValue=i.map((function(e){return e.id})).join("||"),s.val(inputValue),n.multiple&&i.map((function(e){e.$el.detach().appendTo(t)})),n.allowClear&&(n.data=n.data.filter((function(e){return""!==e.id}))),t.removeData("ajax"),t.removeAttr("data-ajax"),this.get("ajax")&&(n.ajax={url:acf.get("ajaxurl"),quietMillis:250,dataType:"json",type:"post",cache:!1,data:e.proxy(this.getAjaxData,this),results:e.proxy(this.processAjaxResults,this)});var r=this.get("field");n=acf.applyFilters("select2_args",n,t,this.data,r||!1,this),s.select2(n);var o=s.select2("container"),c=e.proxy(this.getOption,this);if(n.multiple){var l=o.find("ul");l.sortable({stop:function(){l.find(".select2-search-choice").each((function(){var i=e(this).data("select2Data");c(i.id).detach().appendTo(t)})),t.trigger("change")}})}s.on("select2-selecting",(function(i){var a=i.choice,n=c(a.id);n.length||(n=e(' ")),n.detach().appendTo(t)})),o.addClass("-acf"),acf.doAction("select2_init",t,n,this.data,r||!1,this),s.on("change",(function(){var e=s.val();e.indexOf("||")&&(e=e.split("||")),t.val(e).trigger("change")})),t.hide()},mergeOptions:function(){var t=!1;e("#select2-drop .select2-result-with-children").each((function(){var i=e(this).children("ul"),a=e(this).children(".select2-result-label");if(t&&t.text()===a.text())return t.append(i.children()),void e(this).remove();t=a}))},getAjaxData:function(e,t){var i={term:e,page:t},n=this.get("field");return i=acf.applyFilters("select2_ajax_data",i,this.data,this.$el,n||!1,this),a.prototype.getAjaxData.apply(this,[i])}});new acf.Model({priority:5,wait:"prepare",actions:{duplicate:"onDuplicate"},initialize:function(){var e=acf.get("locale"),t=(acf.get("rtl"),acf.get("select2L10n")),a=i();return!!t&&0!==e.indexOf("en")&&void(4==a?this.addTranslations4():3==a&&this.addTranslations3())},addTranslations4:function(){var e=acf.get("select2L10n"),t=acf.get("locale");t=t.replace("_","-");var i={errorLoading:function(){return e.load_fail},inputTooLong:function(t){var i=t.input.length-t.maximum;return i>1?e.input_too_long_n.replace("%d",i):e.input_too_long_1},inputTooShort:function(t){var i=t.minimum-t.input.length;return i>1?e.input_too_short_n.replace("%d",i):e.input_too_short_1},loadingMore:function(){return e.load_more},maximumSelected:function(t){var i=t.maximum;return i>1?e.selection_too_long_n.replace("%d",i):e.selection_too_long_1},noResults:function(){return e.matches_0},searching:function(){return e.searching}};jQuery.fn.select2.amd.define("select2/i18n/"+t,[],(function(){return i}))},addTranslations3:function(){var t=acf.get("select2L10n"),i=acf.get("locale");i=i.replace("_","-");var a={formatMatches:function(e){return e>1?t.matches_n.replace("%d",e):t.matches_1},formatNoMatches:function(){return t.matches_0},formatAjaxError:function(){return t.load_fail},formatInputTooShort:function(e,i){var a=i-e.length;return a>1?t.input_too_short_n.replace("%d",a):t.input_too_short_1},formatInputTooLong:function(e,i){var a=e.length-i;return a>1?t.input_too_long_n.replace("%d",a):t.input_too_long_1},formatSelectionTooBig:function(e){return e>1?t.selection_too_long_n.replace("%d",e):t.selection_too_long_1},formatLoadMore:function(){return t.load_more},formatSearching:function(){return t.searching}};e.fn.select2.locales=e.fn.select2.locales||{},e.fn.select2.locales[i]=a,e.extend(e.fn.select2.defaults,a)},onDuplicate:function(e,t){t.find(".select2-container").remove()}})}(jQuery)},8061:()=>{var e;e=jQuery,acf.tinymce={defaults:function(){return"undefined"!=typeof tinyMCEPreInit&&{tinymce:tinyMCEPreInit.mceInit.acf_content,quicktags:tinyMCEPreInit.qtInit.acf_content}},initialize:function(e,t){(t=acf.parseArgs(t,{tinymce:!0,quicktags:!0,toolbar:"full",mode:"visual",field:!1})).tinymce&&this.initializeTinymce(e,t),t.quicktags&&this.initializeQuicktags(e,t)},initializeTinymce:function(t,i){var a=e("#"+t),n=this.defaults(),s=acf.get("toolbars"),r=i.field||!1;if(r.$el,"undefined"==typeof tinymce)return!1;if(!n)return!1;if(tinymce.get(t))return this.enable(t);var o=e.extend({},n.tinymce,i.tinymce);o.id=t,o.selector="#"+t;var c=i.toolbar;if(c&&s&&s[c])for(var l=1;l<=4;l++)o["toolbar"+l]=s[c][l]||"";if(o.setup=function(e){e.on("change",(function(t){e.save(),a.trigger("change")})),e.on("mouseup",(function(e){var t=new MouseEvent("mouseup");window.dispatchEvent(t)}))},o.wp_autoresize_on=!1,o.tadv_noautop||(o.wpautop=!0),o=acf.applyFilters("wysiwyg_tinymce_settings",o,t,r),tinyMCEPreInit.mceInit[t]=o,"visual"==i.mode){tinymce.init(o);var d=tinymce.get(t);if(!d)return!1;d.acf=i.field,acf.doAction("wysiwyg_tinymce_init",d,d.id,o,r)}},initializeQuicktags:function(t,i){var a=this.defaults();if("undefined"==typeof quicktags)return!1;if(!a)return!1;var n=e.extend({},a.quicktags,i.quicktags);n.id=t;var s=i.field||!1;s.$el,n=acf.applyFilters("wysiwyg_quicktags_settings",n,n.id,s),tinyMCEPreInit.qtInit[t]=n;var r=quicktags(n);if(!r)return!1;this.buildQuicktags(r),acf.doAction("wysiwyg_quicktags_init",r,r.id,n,s)},buildQuicktags:function(e){var t,i,a,n,s,r,o,c;for(r in e.canvas,t=e.name,i=e.settings,n="",a={},o="",c=e.id,i.buttons&&(o=","+i.buttons+","),edButtons)edButtons[r]&&(s=edButtons[r].id,o&&-1!==",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,".indexOf(","+s+",")&&-1===o.indexOf(","+s+",")||edButtons[r].instance&&edButtons[r].instance!==c||(a[s]=edButtons[r],edButtons[r].html&&(n+=edButtons[r].html(t+"_"))));o&&-1!==o.indexOf(",dfw,")&&(a.dfw=new QTags.DFWButton,n+=a.dfw.html(t+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(a.textdirection=new QTags.TextDirectionButton,n+=a.textdirection.html(t+"_")),e.toolbar.innerHTML=n,e.theButtons=a,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[e])},disable:function(e){this.destroyTinymce(e)},remove:function(e){this.destroyTinymce(e)},destroy:function(e){this.destroyTinymce(e)},destroyTinymce:function(e){if("undefined"==typeof tinymce)return!1;var t=tinymce.get(e);return!!t&&(t.save(),t.destroy(),!0)},enable:function(e){this.enableTinymce(e)},enableTinymce:function(t){return"undefined"!=typeof switchEditors&&void 0!==tinyMCEPreInit.mceInit[t]&&(e("#"+t).show(),switchEditors.go(t,"tmce"),!0)}},new acf.Model({priority:5,actions:{prepare:"onPrepare",ready:"onReady"},onPrepare:function(){var t=e("#acf-hidden-wp-editor");t.exists()&&t.appendTo("body")},onReady:function(){acf.isset(window,"wp","oldEditor")&&(wp.editor.autop=wp.oldEditor.autop,wp.editor.removep=wp.oldEditor.removep),acf.isset(window,"tinymce","on")&&tinymce.on("AddEditor",(function(e){var t=e.editor;"acf"===t.id.substr(0,3)&&(t=tinymce.editors.content||t,tinymce.activeEditor=t,wpActiveEditor=t.id)}))}})},1417:()=>{var e;e=jQuery,acf.unload=new acf.Model({wait:"load",active:!0,changed:!1,actions:{validation_failure:"startListening",validation_success:"stopListening"},events:{"change form .acf-field":"startListening","submit form":"stopListening"},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(){this.stopListening()},startListening:function(){!this.changed&&this.active&&(this.changed=!0,e(window).on("beforeunload",this.onUnload))},stopListening:function(){this.changed=!1,e(window).off("beforeunload",this.onUnload)},onUnload:function(){return acf.__("The changes you made will be lost if you navigate away from this page")}})},6148:()=>{!function(e,t){var i=acf.Model.extend({id:"Validator",data:{errors:[],notice:null,status:""},events:{"changed:status":"onChangeStatus"},addErrors:function(e){e.map(this.addError,this)},addError:function(e){this.data.errors.push(e)},hasErrors:function(){return this.data.errors.length},clearErrors:function(){return this.data.errors=[]},getErrors:function(){return this.data.errors},getFieldErrors:function(){var e=[],t=[];return this.getErrors().map((function(i){if(i.input){var a=t.indexOf(i.input);a>-1?e[a]=i:(e.push(i),t.push(i.input))}})),e},getGlobalErrors:function(){return this.getErrors().filter((function(e){return!e.input}))},showErrors:function(){if(this.hasErrors()){var t=this.getFieldErrors(),i=this.getGlobalErrors(),a=0,n=!1;t.map((function(e){var t=this.$('[name="'+e.input+'"]').first();if(t.length||(t=this.$('[name^="'+e.input+'"]').first()),t.length){a++;var i=acf.getClosestField(t);r(i.$el),i.showError(e.message),n||(n=i.$el)}}),this);var s=acf.__("Validation failed");if(i.map((function(e){s+=". "+e.message})),1==a?s+=". "+acf.__("1 field requires attention"):a>1&&(s+=". "+acf.__("%d fields require attention").replace("%d",a)),this.has("notice"))this.get("notice").update({type:"error",text:s});else{var o=acf.newNotice({type:"error",text:s,target:this.$el});this.set("notice",o)}n||(n=this.get("notice").$el),setTimeout((function(){e("html, body").animate({scrollTop:n.offset().top-e(window).height()/2},500)}),10)}},onChangeStatus:function(e,t,i,a){this.$el.removeClass("is-"+a).addClass("is-"+i)},validate:function(t){if(t=acf.parseArgs(t,{event:!1,reset:!1,loading:function(){},complete:function(){},failure:function(){},success:function(e){e.submit()}}),"valid"==this.get("status"))return!0;if("validating"==this.get("status"))return!1;if(!this.$(".acf-field").length)return!0;if(t.event){var i=e.Event(null,t.event);t.success=function(){acf.enableSubmit(e(i.target)).trigger(i)}}acf.doAction("validation_begin",this.$el),acf.lockForm(this.$el),t.loading(this.$el,this),this.set("status","validating");var a=acf.serialize(this.$el);return a.action="acf/validate_save_post",e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",context:this,success:function(e){if(acf.isAjaxSuccess(e)){var t=acf.applyFilters("validation_complete",e.data,this.$el,this);t.valid||this.addErrors(t.errors)}},complete:function(){acf.unlockForm(this.$el),this.hasErrors()?(this.set("status","invalid"),acf.doAction("validation_failure",this.$el,this),this.showErrors(),t.failure(this.$el,this)):(this.set("status","valid"),this.has("notice")&&this.get("notice").update({type:"success",text:acf.__("Validation successful"),timeout:1e3}),acf.doAction("validation_success",this.$el,this),acf.doAction("submit",this.$el),t.success(this.$el,this),acf.lockForm(this.$el),t.reset&&this.reset()),t.complete(this.$el,this),this.clearErrors()}}),!1},setup:function(e){this.$el=e},reset:function(){this.set("errors",[]),this.set("notice",null),this.set("status",""),acf.unlockForm(this.$el)}}),a=function(e){var t=e.data("acf");return t||(t=new i(e)),t};acf.validateForm=function(e){return a(e.form).validate(e)},acf.enableSubmit=function(e){return e.removeClass("disabled").removeAttr("disabled")},acf.disableSubmit=function(e){return e.addClass("disabled").attr("disabled",!0)},acf.showSpinner=function(e){return e.addClass("is-active"),e.css("display","inline-block"),e},acf.hideSpinner=function(e){return e.removeClass("is-active"),e.css("display","none"),e},acf.lockForm=function(e){var t=n(e),i=t.find('.button, [type="submit"]').not(".acf-nav, .acf-repeater-add-row"),a=t.find(".spinner, .acf-spinner");return acf.hideSpinner(a),acf.disableSubmit(i),acf.showSpinner(a.last()),e},acf.unlockForm=function(e){var t=n(e),i=t.find('.button, [type="submit"]').not(".acf-nav, .acf-repeater-add-row"),a=t.find(".spinner, .acf-spinner");return acf.enableSubmit(i),acf.hideSpinner(a),e};var n=function(e){var t;return(t=e.find("#submitdiv")).length||(t=e.find("#submitpost")).length||(t=e.find("p.submit").last()).length||(t=e.find(".acf-form-submit")).length?t:e},s=acf.debounce((function(e){e.submit()})),r=function(e){var t=e.parents(".acf-postbox");if(t.length){var i=acf.getPostbox(t);i&&i.isHiddenByScreenOptions()&&(i.$el.removeClass("hide-if-js"),i.$el.css("display",""))}};acf.validation=new acf.Model({id:"validation",active:!0,wait:"prepare",actions:{ready:"addInputEvents",append:"addInputEvents"},events:{'click input[type="submit"]':"onClickSubmit",'click button[type="submit"]':"onClickSubmit","click #save-post":"onClickSave","submit form#post":"onSubmitPost","submit form":"onSubmit"},initialize:function(){acf.get("validation")||(this.active=!1,this.actions={},this.events={})},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(e){a(e).reset()},addInputEvents:function(t){if("safari"!==acf.get("browser")){var i=e(".acf-field [name]",t);i.length&&this.on(i,"invalid","onInvalid")}},onInvalid:function(e,t){e.preventDefault();var i=t.closest("form");i.length&&(a(i).addError({input:t.attr("name"),message:acf.strEscape(e.target.validationMessage)}),s(i))},onClickSubmit:function(t,i){e(".acf-field input").each((function(){this.checkValidity()||r(e(this))})),this.set("originalEvent",t)},onClickSave:function(e,t){this.set("ignore",!0)},onClickSubmitGutenberg:function(t,i){acf.validateForm({form:e("#editor"),event:t,reset:!0,failure:function(e,t){var i=t.get("notice").$el;i.appendTo(".components-notice-list"),i.find(".acf-notice-dismiss").removeClass("small")}})||(t.preventDefault(),t.stopImmediatePropagation())},onSubmitPost:function(t,i){"dopreview"===e("input#wp-preview").val()&&(this.set("ignore",!0),acf.unlockForm(i))},onSubmit:function(e,t){if(!this.active||this.get("ignore")||e.isDefaultPrevented())return this.allowSubmit();acf.validateForm({form:t,event:this.get("originalEvent")})||e.preventDefault()},allowSubmit:function(){return this.set("ignore",!1),this.set("originalEvent",!1),!0}}),new acf.Model({wait:"prepare",initialize:function(){acf.isGutenberg()&&this.customizeEditor()},customizeEditor:function(){var t=wp.data.dispatch("core/editor"),i=wp.data.select("core/editor"),a=wp.data.dispatch("core/notices"),n=t.savePost,s=!1,r="";wp.data.subscribe((function(){var e=i.getEditedPostAttribute("status");s="publish"===e||"future"===e,r="publish"!==e?e:r})),t.savePost=function(i){i=i||{};var o=this,c=arguments;return new Promise((function(n,o){return i.isAutosave||i.isPreview?n("Validation ignored (autosave)."):s?void(acf.validateForm({form:e("#editor"),reset:!0,complete:function(e,i){t.unlockPostSaving("acf")},failure:function(e,i){var n=i.get("notice");a.createErrorNotice(n.get("text"),{id:"acf-validation",isDismissible:!0}),n.remove(),r&&t.editPost({status:r}),o("Validation failed.")},success:function(){a.removeNotice("acf-validation"),n("Validation success.")}})?n("Validation bypassed."):t.lockPostSaving("acf")):n("Validation ignored (draft).")})).then((function(){return n.apply(o,c)})).catch((function(e){}))}}})}(jQuery)}},t={};function i(a){var n=t[a];if(void 0!==n)return n.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";i(6291),i(1580),i(2213),i(1357),i(8171),i(9459),i(7597),i(684),i(8489),i(6691),i(5647),i(4658),i(719),i(2557),i(2489),i(714),i(6965),i(177),i(1987),i(1281),i(7790),i(2573),i(9047),i(1788),i(4429),i(4850),i(2849),i(3155),i(682),i(1417),i(1128),i(3812),i(7240),i(5796),i(8061),i(6148),i(5938),i(7787)})()})();;