golden hour
/home/phakp/public_html/wp/wp-content/themes/neve/header-footer-grid/assets/js/customizer
⬆️ Go Up
Upload
File/Folder
Size
Actions
builder.js
66.84 KB
Del
OK
builder.min.js
45.36 KB
Del
OK
customizer.js
7.29 KB
Del
OK
customizer.min.js
12.75 KB
Del
OK
Edit: builder.min.js
!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}function n(e){return e&&e.Math==Math&&e}function d(e){try{return!!e()}catch(e){return!0}}function g(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function r(e){return w.call(e).slice(8,-1)}function c(e){if(null==e)throw TypeError("Can't call method on "+e);return e}function h(e){return y(c(e))}function v(e){return"object"==typeof e?null!==e:"function"==typeof e}function p(e,t){if(!v(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!v(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!v(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!v(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}function l(e,t){return x.call(e,t)}function i(e){return C?S.createElement(e):{}}function I(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e}function f(t,n){try{T(u,t,n)}catch(e){u[t]=n}return n}var u=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),m=!d(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),o={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,s={f:a&&!o.call({1:2},1)?function(e){var t=a(this,e);return!!t&&t.enumerable}:o},w={}.toString,b="".split,y=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==r(e)?b.call(e,""):Object(e)}:Object,x={}.hasOwnProperty,S=u.document,C=v(S)&&v(S.createElement),O=!m&&!d(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}),E=Object.getOwnPropertyDescriptor,P={f:m?E:function(e,t){if(e=h(e),t=p(t,!0),O)try{return E(e,t)}catch(e){}if(l(e,t))return g(!s.f.call(e,t),e[t])}},A=Object.defineProperty,k={f:m?A:function(e,t,n){if(I(e),t=p(t,!0),I(n),O)try{return A(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},T=m?function(e,t,n){return k.f(e,t,g(1,n))}:function(e,t,n){return e[t]=n,e},R="__core-js_shared__",j=u[R]||f(R,{}),D=Function.toString;"function"!=typeof j.inspectSource&&(j.inspectSource=function(e){return D.call(e)});function z(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++X+B).toString(36)}function M(e){return V[e]||(V[e]=z(e))}var F,N,W,L=j.inspectSource,G=u.WeakMap,U="function"==typeof G&&/native code/.test(L(G)),$=t(function(e){(e.exports=function(e,t){return j[e]||(j[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),X=0,B=Math.random(),V=$("keys"),H={},J=u.WeakMap;if(U){var K=new J,Q=K.get,Y=K.has,q=K.set;F=function(e,t){return q.call(K,e,t),t},N=function(e){return Q.call(K,e)||{}},W=function(e){return Y.call(K,e)}}else{var Z=M("state");H[Z]=!0,F=function(e,t){return T(e,Z,t),t},N=function(e){return l(e,Z)?e[Z]:{}},W=function(e){return l(e,Z)}}function ee(e){return"function"==typeof e?e:void 0}function te(e,t){return arguments.length<2?ee(pe[e])||ee(u[e]):pe[e]&&pe[e][t]||u[e]&&u[e][t]}function ne(e){return isNaN(e=+e)?0:(0<e?we:me)(e)}function ie(e){return 0<e?be(ne(e),9007199254740991):0}function re(e,t){var n=ne(e);return n<0?ye(n+t,0):xe(n,t)}function oe(s){return function(e,t,n){var i,r=h(e),o=ie(r.length),a=re(n,o);if(s&&t!=t){for(;a<o;)if((i=r[a++])!=i)return!0}else for(;a<o;a++)if((s||a in r)&&r[a]===t)return s||a||0;return!s&&-1}}function ae(e,t){var n,i=h(e),r=0,o=[];for(n in i)!l(H,n)&&l(i,n)&&o.push(n);for(;t.length>r;)l(i,n=t[r++])&&(~Se(o,n)||o.push(n));return o}function se(e,t){for(var n=Ae(t),i=k.f,r=P.f,o=0;o<n.length;o++){var a=n[o];l(e,a)||i(e,a,r(t,a))}}function ce(e,t){var n=Te[ke(e)];return n==je||n!=Re&&("function"==typeof t?d(t):!!t)}function le(e,t){var n,i,r,o,a,s=e.target,c=e.global,l=e.stat;if(n=c?u:l?u[s]||f(s,{}):(u[s]||{}).prototype)for(i in t){if(o=t[i],r=e.noTargetGet?(a=ze(n,i))&&a.value:n[i],!De(c?i:s+(l?".":"#")+i,e.forced)&&void 0!==r){if(typeof o==typeof r)continue;se(o,r)}(e.sham||r&&r.sham)&&T(o,"sham",!0),ve(n,i,o,e)}}function fe(e){return Object(c(e))}function de(){}function ue(e){return"<script>"+e+"</"+$e+">"}var ge,he={set:F,get:N,has:W,enforce:function(e){return W(e)?N(e):F(e,{})},getterFor:function(n){return function(e){var t;if(!v(e)||(t=N(e)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return t}}},ve=t(function(e){var t=he.get,s=he.enforce,c=String(String).split("String");(e.exports=function(e,t,n,i){var r=!!i&&!!i.unsafe,o=!!i&&!!i.enumerable,a=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||l(n,"name")||T(n,"name",t),s(n).source=c.join("string"==typeof t?t:"")),e!==u?(r?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=n:T(e,t,n)):o?e[t]=n:f(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||L(this)})}),pe=u,me=Math.ceil,we=Math.floor,be=Math.min,ye=Math.max,xe=Math.min,_e={includes:oe(!0),indexOf:oe(!1)},Se=_e.indexOf,Ce=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Oe=Ce.concat("length","prototype"),Ee={f:Object.getOwnPropertyNames||function(e){return ae(e,Oe)}},Pe={f:Object.getOwnPropertySymbols},Ae=te("Reflect","ownKeys")||function(e){var t=Ee.f(I(e)),n=Pe.f;return n?t.concat(n(e)):t},Ie=/#|\.prototype\./,ke=ce.normalize=function(e){return String(e).replace(Ie,".").toLowerCase()},Te=ce.data={},Re=ce.NATIVE="N",je=ce.POLYFILL="P",De=ce,ze=P.f,Me=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())}),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ne=Array.isArray||function(e){return"Array"==r(e)},We=Object.keys||function(e){return ae(e,Ce)},Le=m?Object.defineProperties:function(e,t){I(e);for(var n,i=We(t),r=i.length,o=0;o<r;)k.f(e,n=i[o++],t[n]);return e},Ge=te("document","documentElement"),Ue="prototype",$e="script",Xe=M("IE_PROTO"),Be=function(){try{ge=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Be=ge?function(e){e.write(ue("")),e.close();var t=e.parentWindow.Object;return e=null,t}(ge):((t=i("iframe")).style.display="none",Ge.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ue("document.F=Object")),e.close(),e.F);for(var n=Ce.length;n--;)delete Be[Ue][Ce[n]];return Be()};H[Xe]=!0;function Ve(e){return l(ct,e)||(Me&&l(lt,e)?ct[e]=lt[e]:ct[e]=ft("Symbol."+e)),ct[e]}function He(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}function Je(e,t){var n;return Ne(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Ne(n.prototype)?v(n)&&null===(n=n[vt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}function Ke(g){var h=1==g,v=2==g,p=3==g,m=4==g,w=6==g,b=5==g||w;return function(e,t,n,i){for(var r,o,a=fe(e),s=y(a),c=function(i,r,e){if(He(i),void 0===r)return i;switch(e){case 0:return function(){return i.call(r)};case 1:return function(e){return i.call(r,e)};case 2:return function(e,t){return i.call(r,e,t)};case 3:return function(e,t,n){return i.call(r,e,t,n)}}return function(){return i.apply(r,arguments)}}(t,n,3),l=ie(s.length),f=0,d=i||Je,u=h?d(e,l):v?d(e,0):void 0;f<l;f++)if((b||f in s)&&(o=c(r=s[f],f,a),g))if(h)u[f]=o;else if(o)switch(g){case 3:return!0;case 5:return r;case 6:return f;case 2:pt.call(u,r)}else if(m)return!1;return w?-1:p||m?m:u}}function Qe(e,t){var n=Rt[e]=it(Et[xt]);return St(n,{type:yt,tag:e,description:t}),m||(n.description=t),n}function Ye(t,e){I(t);var n=h(e),i=We(n).concat($t(n));return wt(i,function(e){m&&!Ut.call(n,e)||Gt(t,e,n[e])}),t}function qe(e,t){var n=h(e),i=p(t,!0);if(n!==Ot||!l(Rt,i)||l(jt,i)){var r=At(n,i);return!r||!l(Rt,i)||l(n,bt)&&n[bt][i]||(r.enumerable=!0),r}}function Ze(e){var t=kt(h(e)),n=[];return wt(t,function(e){l(Rt,e)||l(H,e)||n.push(e)}),n}var et,tt,nt,it=Object.create||function(e,t){var n;return null!==e?(de[Ue]=I(e),n=new de,de[Ue]=null,n[Xe]=e):n=Be(),void 0===t?n:Le(n,t)},rt=Ee.f,ot={}.toString,at="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],st={f:function(e){return at&&"[object Window]"==ot.call(e)?function(e){try{return rt(e)}catch(e){return at.slice()}}(e):rt(h(e))}},ct=$("wks"),lt=u.Symbol,ft=Fe?lt:lt&<.withoutSetter||z,dt={f:Ve},ut=k.f,gt=k.f,ht=Ve("toStringTag"),vt=Ve("species"),pt=[].push,mt={forEach:Ke(0),map:Ke(1),filter:Ke(2),some:Ke(3),every:Ke(4),find:Ke(5),findIndex:Ke(6)},wt=mt.forEach,bt=M("hidden"),yt="Symbol",xt="prototype",_t=Ve("toPrimitive"),St=he.set,Ct=he.getterFor(yt),Ot=Object[xt],Et=u.Symbol,Pt=te("JSON","stringify"),At=P.f,It=k.f,kt=st.f,Tt=s.f,Rt=$("symbols"),jt=$("op-symbols"),Dt=$("string-to-symbol-registry"),zt=$("symbol-to-string-registry"),Mt=$("wks"),Ft=u.QObject,Nt=!Ft||!Ft[xt]||!Ft[xt].findChild,Wt=m&&d(function(){return 7!=it(It({},"a",{get:function(){return It(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=At(Ot,t);i&&delete Ot[t],It(e,t,n),i&&e!==Ot&&It(Ot,t,i)}:It,Lt=Fe?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Et},Gt=function(e,t,n){e===Ot&&Gt(jt,t,n),I(e);var i=p(t,!0);return I(n),l(Rt,i)?(n.enumerable?(l(e,bt)&&e[bt][i]&&(e[bt][i]=!1),n=it(n,{enumerable:g(0,!1)})):(l(e,bt)||It(e,bt,g(1,{})),e[bt][i]=!0),Wt(e,i,n)):It(e,i,n)},Ut=function(e){var t=p(e,!0),n=Tt.call(this,t);return!(this===Ot&&l(Rt,t)&&!l(jt,t))&&(!(n||!l(this,t)||!l(Rt,t)||l(this,bt)&&this[bt][t])||n)},$t=function(e){var t=e===Ot,n=kt(t?jt:h(e)),i=[];return wt(n,function(e){!l(Rt,e)||t&&!l(Ot,e)||i.push(Rt[e])}),i};Me||(ve((Et=function(e){if(this instanceof Et)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==e?String(e):void 0,n=z(t),i=function(e){this===Ot&&i.call(jt,e),l(this,bt)&&l(this[bt],n)&&(this[bt][n]=!1),Wt(this,n,g(1,e))};return m&&Nt&&Wt(Ot,n,{configurable:!0,set:i}),Qe(n,t)})[xt],"toString",function(){return Ct(this).tag}),ve(Et,"withoutSetter",function(e){return Qe(z(e),e)}),s.f=Ut,k.f=Gt,P.f=qe,Ee.f=st.f=Ze,Pe.f=$t,dt.f=function(e){return Qe(Ve(e),e)},m&&(It(Et[xt],"description",{configurable:!0,get:function(){return Ct(this).description}}),ve(Ot,"propertyIsEnumerable",Ut,{unsafe:!0}))),le({global:!0,wrap:!0,forced:!Me,sham:!Me},{Symbol:Et}),wt(We(Mt),function(e){var t,n;t=e,n=pe.Symbol||(pe.Symbol={}),l(n,t)||ut(n,t,{value:dt.f(t)})}),le({target:yt,stat:!0,forced:!Me},{for:function(e){var t=String(e);if(l(Dt,t))return Dt[t];var n=Et(t);return Dt[t]=n,zt[n]=t,n},keyFor:function(e){if(!Lt(e))throw TypeError(e+" is not a symbol");if(l(zt,e))return zt[e]},useSetter:function(){Nt=!0},useSimple:function(){Nt=!1}}),le({target:"Object",stat:!0,forced:!Me,sham:!m},{create:function(e,t){return void 0===t?it(e):Ye(it(e),t)},defineProperty:Gt,defineProperties:Ye,getOwnPropertyDescriptor:qe}),le({target:"Object",stat:!0,forced:!Me},{getOwnPropertyNames:Ze,getOwnPropertySymbols:$t}),le({target:"Object",stat:!0,forced:d(function(){Pe.f(1)})},{getOwnPropertySymbols:function(e){return Pe.f(fe(e))}}),Pt&&le({target:"JSON",stat:!0,forced:!Me||d(function(){var e=Et();return"[null]"!=Pt([e])||"{}"!=Pt({a:e})||"{}"!=Pt(Object(e))})},{stringify:function(e,t,n){for(var i,r=[e],o=1;o<arguments.length;)r.push(arguments[o++]);if((v(i=t)||void 0!==e)&&!Lt(e))return Ne(t)||(t=function(e,t){if("function"==typeof i&&(t=i.call(this,e,t)),!Lt(t))return t}),r[1]=t,Pt.apply(null,r)}});Et[xt][_t]||T(Et[xt],_t,Et[xt].valueOf),tt=yt,(et=Et)&&!l(et=nt?et:et.prototype,ht)&>(et,ht,{configurable:!0,value:tt}),H[bt]=!0;var Xt=k.f,Bt=u.Symbol;if(!(!m||"function"!=typeof Bt||"description"in Bt.prototype&&void 0===Bt().description)){var Vt={},Ht=function(e){var t=arguments.length<1||void 0===e?void 0:String(e),n=this instanceof Ht?new Bt(t):void 0===t?Bt():Bt(t);return""===t&&(Vt[n]=!0),n};se(Ht,Bt);var Jt=Ht.prototype=Bt.prototype;Jt.constructor=Ht;var Kt=Jt.toString,Qt="Symbol(test)"==String(Bt("test")),Yt=/^Symbol\((.*)\)[^)]+$/;Xt(Jt,"description",{configurable:!0,get:function(){var e=v(this)?this.valueOf():this,t=Kt.call(e);if(l(Vt,e))return"";var n=Qt?t.slice(7,-1):t.replace(Yt,"$1");return""===n?void 0:n}}),le({global:!0,forced:!0},{Symbol:Ht})}var qt,Zt,en=te("navigator","userAgent")||"",tn=u.process,nn=tn&&tn.versions,rn=nn&&nn.v8;rn?Zt=(qt=rn.split("."))[0]+qt[1]:en&&(!(qt=en.match(/Edge\/(\d+)/))||74<=qt[1])&&(qt=en.match(/Chrome\/(\d+)/))&&(Zt=qt[1]);function on(t){return 51<=cn||!d(function(){var e=[];return(e.constructor={})[ln]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function an(e){throw e}function sn(e,t){if(l(dn,e))return dn[e];var n=[][e],i=!!l(t=t||{},"ACCESSORS")&&t.ACCESSORS,r=l(t,0)?t[0]:an,o=l(t,1)?t[1]:void 0;return dn[e]=!!n&&!d(function(){if(i&&!m)return!0;var e={length:-1};i?fn(e,1,{enumerable:!0,get:an}):e[1]=1,n.call(e,r,o)})}var cn=Zt&&+Zt,ln=Ve("species"),fn=Object.defineProperty,dn={},un=mt.filter,gn=on("filter"),hn=sn("filter");le({target:"Array",proto:!0,forced:!gn||!hn},{filter:function(e,t){return un(this,e,1<arguments.length?t:void 0)}});var vn=Ve("unscopables"),pn=Array.prototype;null==pn[vn]&&k.f(pn,vn,{configurable:!0,value:it(null)});var mn,wn=mt.find,bn="find",yn=!0,xn=sn(bn);bn in[]&&Array(1)[bn](function(){yn=!1}),le({target:"Array",proto:!0,forced:yn||!xn},{find:function(e,t){return wn(this,e,1<arguments.length?t:void 0)}}),mn=bn,pn[vn][mn]=!0;function _n(e,t){var n=[][e];return!!n&&d(function(){n.call(null,t||function(){throw 1},1)})}var Sn=_e.indexOf,Cn=[].indexOf,On=!!Cn&&1/[1].indexOf(1,-0)<0,En=_n("indexOf"),Pn=sn("indexOf",{ACCESSORS:!0,1:0});le({target:"Array",proto:!0,forced:On||!En||!Pn},{indexOf:function(e,t){return On?Cn.apply(this,arguments)||0:Sn(this,e,1<arguments.length?t:void 0)}});var An=mt.map,In=on("map"),kn=sn("map");le({target:"Array",proto:!0,forced:!In||!kn},{map:function(e,t){return An(this,e,1<arguments.length?t:void 0)}});var Tn=on("slice"),Rn=sn("slice",{ACCESSORS:!0,0:0,1:2}),jn=Ve("species"),Dn=[].slice,zn=Math.max;le({target:"Array",proto:!0,forced:!Tn||!Rn},{slice:function(e,t){var n,i,r,o,a,s,c,l=h(this),f=ie(l.length),d=re(e,f),u=re(void 0===t?f:t,f);if(Ne(l)&&("function"!=typeof(n=l.constructor)||n!==Array&&!Ne(n.prototype)?v(n)&&null===(n=n[jn])&&(n=void 0):n=void 0,n===Array||void 0===n))return Dn.call(l,d,u);for(i=new(void 0===n?Array:n)(zn(u-d,0)),r=0;d<u;d++,r++)d in l&&(o=i,a=r,s=l[d],(c=p(a))in o?k.f(o,c,g(0,s)):o[c]=s);return i.length=r,i}});var Mn=[],Fn=Mn.sort,Nn=d(function(){Mn.sort(void 0)}),Wn=d(function(){Mn.sort(null)}),Ln=_n("sort");le({target:"Array",proto:!0,forced:Nn||!Wn||!Ln},{sort:function(e){return void 0===e?Fn.call(fe(this)):Fn.call(fe(this),He(e))}}),le({target:"Object",stat:!0,forced:d(function(){We(1)})},{keys:function(e){return We(fe(e))}});function Gn(s){return function(e){for(var t,n=h(e),i=We(n),r=i.length,o=0,a=[];o<r;)t=i[o++],m&&!Un.call(n,t)||a.push(s?[t,n[t]]:n[t]);return a}}var Un=s.f,$n={entries:Gn(!0),values:Gn(!1)}.values;le({target:"Object",stat:!0},{values:function(e){return $n(e)}});function Xn(e,t){return RegExp(e,t)}var Bn,Vn,Hn={UNSUPPORTED_Y:d(function(){var e=Xn("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),BROKEN_CARET:d(function(){var e=Xn("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},Jn=RegExp.prototype.exec,Kn=String.prototype.replace,Qn=Jn,Yn=(Bn=/a/,Vn=/b*/g,Jn.call(Bn,"a"),Jn.call(Vn,"a"),0!==Bn.lastIndex||0!==Vn.lastIndex),qn=Hn.UNSUPPORTED_Y||Hn.BROKEN_CARET,Zn=void 0!==/()??/.exec("")[1];(Yn||Zn||qn)&&(Qn=function(e){var t,n,i,r,o=this,a=qn&&o.sticky,s=function(){var e=I(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}.call(o),c=o.source,l=0,f=e;return a&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),f=String(e).slice(o.lastIndex),0<o.lastIndex&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(c="(?: "+c+")",f=" "+f,l++),n=new RegExp("^(?:"+c+")",s)),Zn&&(n=new RegExp("^"+c+"$(?!\\s)",s)),Yn&&(t=o.lastIndex),i=Jn.call(a?n:o,f),a?i?(i.input=i.input.slice(l),i[0]=i[0].slice(l),i.index=o.lastIndex,o.lastIndex+=i[0].length):o.lastIndex=0:Yn&&i&&(o.lastIndex=o.global?i.index+i[0].length:t),Zn&&i&&1<i.length&&Kn.call(i[0],n,function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)}),i});var ei=Qn;le({target:"RegExp",proto:!0,forced:/./.exec!==ei},{exec:ei});function ti(s){return function(e,t){var n,i,r=String(c(e)),o=ne(t),a=r.length;return o<0||a<=o?s?"":void 0:(n=r.charCodeAt(o))<55296||56319<n||o+1===a||(i=r.charCodeAt(o+1))<56320||57343<i?s?r.charAt(o):n:s?r.slice(o,o+2):i-56320+(n-55296<<10)+65536}}function ni(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return ei.call(e,t)}var ii,ri=Ve("species"),oi=!d(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),ai="$0"==="a".replace(/./,"$0"),si=Ve("replace"),ci=!!/./[si]&&""===/./[si]("a","$0"),li=!d(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),fi={codeAt:ti(!1),charAt:ti(!0)}.charAt,di=Math.max,ui=Math.min,gi=Math.floor,hi=/\$([$&'`]|\d\d?|<[^>]*>)/g,vi=/\$([$&'`]|\d\d?)/g;function pi(e){return(pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(n,e,t,i){var r=Ve(n),o=!d(function(){var e={};return e[r]=function(){return 7},7!=""[n](e)}),a=o&&!d(function(){var e=!1,t=/a/;return"split"===n&&((t={constructor:{}}).constructor[ri]=function(){return t},t.flags="",t[r]=/./[r]),t.exec=function(){return e=!0,null},t[r](""),!e});if(!o||!a||"replace"===n&&(!oi||!ai||ci)||"split"===n&&!li){var s=/./[r],c=t(r,""[n],function(e,t,n,i,r){return t.exec===ei?o&&!r?{done:!0,value:s.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}},{REPLACE_KEEPS_$0:ai,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ci}),l=c[0],f=c[1];ve(String.prototype,n,l),ve(RegExp.prototype,r,2==e?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}i&&T(RegExp.prototype[r],"sham",!0)}("replace",2,function(r,S,C,e){var O=e.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,E=e.REPLACE_KEEPS_$0,P=O?"$":"$0";return[function(e,t){var n=c(this),i=null==e?void 0:e[r];return void 0!==i?i.call(e,n,t):S.call(String(n),e,t)},function(e,t){if(!O&&E||"string"==typeof t&&-1===t.indexOf(P)){var n=C(S,e,this,t);if(n.done)return n.value}var i=I(e),r=String(this),o="function"==typeof t;o||(t=String(t));var a=i.global;if(a){var s=i.unicode;i.lastIndex=0}for(var c,l,f=[];;){var d=ni(i,r);if(null===d)break;if(f.push(d),!a)break;""===String(d[0])&&(i.lastIndex=(c=r,(l=ie(i.lastIndex))+(s?fi(c,l).length:1)))}for(var u,g="",h=0,v=0;v<f.length;v++){d=f[v];for(var p=String(d[0]),m=di(ui(ne(d.index),r.length),0),w=[],b=1;b<d.length;b++)w.push(void 0===(u=d[b])?u:String(u));var y=d.groups;if(o){var x=[p].concat(w,m,r);void 0!==y&&x.push(y);var _=String(t.apply(void 0,x))}else _=A(p,r,m,w,y,t);h<=m&&(g+=r.slice(h,m)+_,h=m+p.length)}return g+r.slice(h)}];function A(o,a,s,c,l,e){var f=s+o.length,d=c.length,t=vi;return void 0!==l&&(l=fe(l),t=hi),S.call(e,t,function(e,t){var n;switch(t.charAt(0)){case"$":return"$";case"&":return o;case"`":return a.slice(0,s);case"'":return a.slice(f);case"<":n=l[t.slice(1,-1)];break;default:var i=+t;if(0==i)return e;if(d<i){var r=gi(i/10);return 0===r?e:r<=d?void 0===c[r-1]?t.charAt(1):c[r-1]+t.charAt(1):e}n=c[i-1]}return void 0===n?"":n})}});var mi,wi,bi,yi,xi,_i,Si,Ci={};function Oi(e){var t=xi(".hfg--cp-sidebar .toggle");return!0===e?(t.addClass("active"),_i.previewer.send("header_sidebar_open"),!1):!1===e?(t.removeClass("active"),_i.previewer.send("header_sidebar_close"),!1):(t.hasClass("active")?_i.previewer.send("header_sidebar_close"):_i.previewer.send("header_sidebar_open"),void t.toggleClass("active"))}mi=jQuery,wi=mi(document),bi=wp.customize||null,yi=HFG_Layout_Builder.isRTL,ii=function(s,c){var e={id:c,controlId:"",cols:12,cellHeight:45,items:[],container:null,widgetsSidebar:null,ready:!1,devices:{desktop:"Desktop",mobile:"Mobile/Tablet"},activePanel:"desktop",panels:{},activeRow:"main",draggingItem:null,insertPoint:null,insertRow:null,getTemplate:_.memoize(function(){var i=this,r={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(e,t,n){return _.isUndefined(t)&&(t="tmpl-customize-control-"+i.type),!_.isUndefined(n)&&_.isString(n)?r.variable=n:r.variable="data",_.template(mi("#"+t).html(),null,r)(e)}}),drag_drop:function(){var r=this;mi(".hfg--device-panel",r.container).each(function(){var n=mi(this),i=n.data("device");r.panels[i]={},mi(".hfg--cb-items",n).each(function(e){var t=mi(this).attr("data-id")||"",n="_sid_"+i+e;t&&(n="_sid_"+i+"-"+t),mi(this).attr("id",n)}),mi(".grid-stack, .hfg--sidebar-items",n).each(function(){var e=mi(this).attr("data-id")||"";r.panels[i][e]=mi(this),mi(this).droppable({out:function(){},over:function(){},drop:function(e,t){var n=mi(this);r.gridster(n,t,e),r.save()}})});var e=mi("#_sid_mobile-sidebar",n),t=e.attr("id")||!1;mi(".grid-stack-item",n).draggable({revert:"invalid",connectToSortable:!!t&&"#"+t,start:function(e,t){mi("body").addClass("builder-item-moving"),mi(".hfg--cb-items",n).css("z-index",""),t.helper.parent().css("z-index",9999)},stop:function(e,t){mi("body").removeClass("builder-item-moving"),mi(".hfg--cb-items",n).css("z-index",""),t.helper.parent().css("z-index","")}}),0<e.length&&(e.sortable({revert:!0,change:function(){r.save()},receive:function(){mi(this).find(".grid-stack-item").removeAttr("style").attr("data-gs-width",1),r.save()}}),r.panels[i].sidebar=e)})},sortGrid:function(e){mi(".grid-stack-item",e).each(function(){var e=mi(this),t=e.attr("data-gs-x")||0;t=parseInt(t);var n=e.next();if(0<n.length){var i=n.attr("data-gs-x")||0;(i=parseInt(i))<t&&e.insertAfter(n)}})},getX:function(e){var t=e.attr("data-gs-x")||0;return parseInt(t)},getW:function(e,t){var n;return _.isUndefined(t)&&(t=!1),n=t?e.attr("data-df-width")||1:e.attr("data-gs-width")||1,parseInt(n)},gridGetItemInfo:function(e,t,n){var i,r=this.getX(e),o=this.getW(e),a=0,s=0,c=!1;for(i=r-1;0<=i&&!c;)0===t[i]?a++:c=!0,i--;for(c=!1,i=r+o;i<this.cols&&!c;)0===t[i]?s++:c=!0,i++;return{flag:t,x:r,w:o,item:e,before:a,after:s,id:e.attr("data-id")||"",wrapper:n}},updateItemsPositions:function(e){for(var t=this.cols,n=0;n<=t;n++)"object"!==pi(e[n])&&"function"!=typeof e[n]||e[n].attr("data-gs-x",n)},gridster:function(e,t,n){function g(e){for(var t=e.x,n=e.w,i=e.el,r=t;r<t+n;r++)C[r]=r===t?i:1}function c(e){for(var t=e.x,n=e.w,i=t;i<t+n;i++)C[i]=0}function h(e,t){for(var n=0,i=e;i<O;i++)if(0===C[i])n++;else if(t)return n;return n}function v(e,t){var n=0;void 0===t&&(t=!1);for(var i=e;0<=i;i--)if(0===C[i])n++;else if(t)return n;return n}function p(e){return 0===C[e]}function m(e,t){for(var n=e;n<e+t;){if(0!==C[n])return!1;n++}return!0}function w(e){if(e<0)return{x:-1,w:1};var t,n,i,r=-1;if(C[e]<=1)for(t=e,i=!1;0<=t&&!i;)1!==C[t]&&0!==C[t]&&(r=t,i=!0),t--;else r=e;for(t=r+1,n=r;1===C[t];)n++,t++;return{x:r,w:n+1-r}}function b(e){var t,n,i,r=-1;if(C[e]<O)for(t=e,i=!1;t<O&&!i;)1!==C[t]&&0!==C[t]&&(r=t,i=!0),t++;else r=e;for(t=r+1,n=r;1===C[t];)n++,t++;return{x:r,w:n+1-r}}function y(e,t){var n=C.slice(),i=v(e);if(0===i)return t;var r=w(e),o=0<=r.x?r.x+r.w-1:e,a=t;i<t&&(a=i);for(var s=0,c=0,l=o;c<=a&&0<=l;)0===C[l]&&(c++,s=l),l--;var f=[],d=0;for(l=s;l<=o;l++)(C[l]=0)!==n[l]&&(f[d]=n[l],d++);for(d=0,l=s;l<=o;l++)void 0!==f[d]?C[l]=f[d]:C[l]=0,d++;return t-a}function x(e,t){var n=C.slice(),i=h(e);if(0===i)return t;var r=w(e),o=0<=r.x?r.x:e,a=t;i<t&&(a=i);for(var s=e,c=0,l=o;c<a&&l<O;)0===C[l]&&(c++,s=l),l++;var f=[],d=0;for(l=o;l<=s;l++)(C[l]=0)!==n[l]&&(f[d]=n[l],d++);for(d=f.length-1,l=s;o<=l;l--)void 0!==f[d]?C[l]=f[d]:C[l]=0,d--;return t-a}function S(){E.updateItemsPositions(C)}function l(e,t){var n,i,r,o,a,s,f=e.x,c=e.w,l=function(){for(var e=0,t=0;t<O;t++)0===C[t]&&e++;return e}();if(l<=0)return!1;if(_.isUndefined(t)&&(t=!1),!t){if(p(f)){if(m(f,o=c))return g(e),e.el.attr("data-gs-x",f),e.el.attr("data-gs-width",o),!0;for((n=c<=(i=h(f,!0))+(r=v(f-1,!0))&&c-i<=r?f-(c-i):f-r)<0&&(n=0);1<=o;){if(m(n,o))return e.x=n,e.w=o,g(e),e.el.attr("data-gs-x",n),e.el.attr("data-gs-width",o),!0;o--}}if(1===C[f]){var d=w(f);if(0<=d.x&&f>d.x+Math.floor(d.w/2)&&f>d.x&&(n=d.x+d.w,c<=(i=h(n,!0))))return g({el:e.el,x:n,w:c}),e.el.attr("data-gs-x",n),e.el.attr("data-gs-width",c),!0}}console.log("--------------------------------------------------------"),function(e,t){var n,i,r,o,a=0,s=!1;if(console.log("insert at x",t),console.log("insert node",e),p(t)){if(console.log("empty_at_X",t),n=w(t),i=b(t),-1<n.x){if(console.log("found_item_left",n),(a=h(n.x))>=e.w)if(m(t,e.w))console.log("found",e),f=t,s=!0;else if(e.ox>t)for(r=n.x+n.w,o=(o=v(r))<=e.w?e.w-o:e.w,x(r+1,o),a=h(r),console.log("loop_start_i",r);r>n.x+n.w&&!s;)m(r,e.w)&&(console.log("found_in_loop__i",r),f=r,s=!0),r--;if(!s&&e.ox<t){console.log("try_move_items_to_left",n),r=n.x+n.w-1,o=v(n.x),console.log("el",o),o>e.w&&(o=e.w),o-=2,y(n.x,o),console.log("try_move_items_to_left_flag",C),console.log("el2",o),r-=a=h(r),i=b(t);var c=n.x+n.w;for(-1<i.x&&(c=i.x),console.log("loop_start 2_i",r);r<c&&!s;)m(r,e.w)&&(console.log("found_in_loop__@__i",r),f=r,s=!0),r++}s||(f=n.x+n.w,e.w=a,e.x=f,console.log("resize_new_w",a),console.log("resize_new_x",f))}else if(-1<i.x){console.log("found_item_right",i),i=b(t),a=h(t,!1),console.log("move_all_item_to Right");var l=a>=e.w?e.w:a;for(x(t,l),r=i.x,console.log("loop_start Right",r);0<=r&&!s;)m(r,e.w)&&(f=r,e.x=f,s=!0,console.log("found_in_while_r",r)),r--;s||(f=t,e.w=a,e.x=f,console.log("resize_r_new_w",a),console.log("resize_r_new_x",f))}}else if(console.log("x is not empty"),n=w(t),e.ox<n.x)if(y(t,e.w),console.log("Move All items to left"),p(t))f=t;else{for(;!p(t)&&t<=E.cols-1;)t++;f=t}else if(x(t,e.w),console.log("Move All items to right"),p(t))f=t;else{for(;!p(t)&&0<=t;)t--;f=t}f>E.cols&&(f=E.cols-1),e.x=f,console.log("new node x",f)}(e,_.clone(f));var u=0;for(f+c>E.cols-1&&(u=v(f,!0),console.log("le",u),0<u&&console.log("move_Left",f+c-E.cols-1)),S();1<=c;){if(c<=l){if(m(f,c))return console.log("",{x:f,w:c}),e.w=c,g(e),e.el.attr("data-gs-x",f),e.el.attr("data-gs-width",c),!0;for(u=v(f,!0),a=f-u,console.log("newX",a),s=a;s<O;){if(m(s,c))return console.log("Insert in While",{x:s,w:c}),e.w=c,g({el:e.el,x:s,w:c}),e.el.attr("data-gs-x",s),e.el.attr("data-gs-width",c),!0;s++}}c--}for(c=e.w;1<=c;){for(s=0;s<O;){if(m(s,c))return console.log("Insert in While 2",{x:s,w:c}),g({el:e.el,x:s,w:c}),e.el.attr("data-gs-x",s),e.el.attr("data-gs-width",c),!0;s++}c--}return console.log("Insert END While",{x:s,w:c}),!1}var C=[],O=this.cols,E=this,i=(C=E.getFlag(e)).slice(),r=e.offset();E.draggingItem=t.draggable;var o,a,s,f,d,u=e.width(),P=u/E.cols,A=t.offset;s=E.getW(t.draggable,!1),a=E.getW(t.draggable,!0),f=t.draggable.width(),console.log("DROP ITEM WIDTH",a),console.log("DROP ITEM cw WIDTH",s);var I=E.getX(t.draggable);yi&&c({el:t.draggable,x:I,w:a});var k,T=0,R=0,j=!1;if(t.draggable.parent().is(e)?(d=!0,console.log("Item in this row"),a=s):(d=!1,console.log("Not in this row"),a<s&&(a=s)),yi?(T=Math.round((r.left+u+10-n.clientX)/P),(R=Math.round((r.left+u-(A.left+f+10))/P))<0&&(R=0)):(T=Math.round((n.clientX-r.left)/P),(R=Math.round((A.left-r.left-10)/P))<0&&(R=0)),T>E.cols&&(T=E.cols),k=o=R,yi){if(!p(k))for(;k<E.cols&&!j;)p(k)?j=!0:k++}else if(!p(o)){for(;o<=T&&!j;)p(o)?j=!0:o++;T<o&&(o=T)}if(j||(o=d?R:T),o<0&&(o=0),o+a>=E.cols){for(j=!0,k=o;k+a>E.cols&&j;)p(k)?k--:(k++,j=!1);o=k}var D={el:t.draggable,x:o,w:a,ox:I,ow:s};D.x<=0&&(D.x=0);(d?(D.x=parseInt(t.draggable.attr("data-gs-x")||0),D.w=parseInt(t.draggable.attr("data-gs-width")||1),function(e,t){var n=e.w;c(e);var i=w(t),r=0;if(-1<i.x&&(r=i.x+i.w),m(t,n))return g({el:e.el,x:t,w:n});if(0<r&&m(r,n)&&r<=t){var o=b(t);if(-1<o.x&&e.w+t>=o.x)for(var a=_.clone(t);r<a;){if(m(a,n))return g({el:e.el,x:a,w:n});a--}if(t+n>E.cols){var s=E.cols-n;if(m(s,n))return g({el:e.el,x:s,w:n})}return g({el:e.el,x:r,w:n})}e.x=t,l(e,!0)}(D,o),!0):l(D))?(t.draggable.removeClass("item-from-list"),e.append(t.draggable),t.draggable.removeAttr("style"),console.log("DID Flag: ",C),E.draggingItem=null):(t.draggable.removeAttr("style"),console.log("Can not insert"),C=i),S(),E.updateAllGrids()},updateAllGrids:function(){var n=this;_.each(n.panels[n.activePanel],function(e,t){n.updateGridFlag(e)})},setGridWidth:function(e,t){var n,i,r=this,o=t.element,a=e.width(),s=t.size.width,c=t.originalSize.width,l=Math.ceil(a/r.cols)-1;i=yi?(n=t.originalPosition.left>t.position.left,c!==s):(n=t.originalPosition.left>t.position.left,t.originalPosition.left<t.position.left);var f,d,u,g=t.originalElement.attr("data-gs-width")||1,h=t.originalElement.attr("data-gs-x")||0;g=parseInt(g),h=parseInt(h);var v,p=r.getFlag(e),m=r.gridGetItemInfo(t.originalElement,p,e);if(n)return yi?(d=Math.floor((t.position.left-1)/l),(f=(d=r.cols-d)-h-g)>m.after&&(f=m.after),u=g+f,o.attr("data-gs-x",h).removeAttr("style")):((f=h-(d=Math.floor((t.position.left-1)/l)))>m.before&&(f=m.before),d=h-f,u=g+f,o.attr("data-gs-x",d).removeAttr("style")),o.attr("data-gs-width",u).removeAttr("style"),void r.updateGridFlag(e);if(i)return yi?t.originalPosition.left!==t.position.left?(d=Math.floor((t.position.left-1)/l),g<(f=g+h-(d=r.cols-d))&&(f=0),u=g-f,(d=h)<=0&&(d=0),console.log("diffRight_RTL_COL_New __left")):(d=Math.ceil((t.position.left+t.size.width-11)/l),(f=h-(d=r.cols-d))>m.before&&(f=m.before),d=h-f,u=g+f):((u=g-(f=(d=Math.round((t.position.left-1)/l))-h))<=0&&(u=1,f=0),d=h+f),o.attr("data-gs-x",d).removeAttr("style"),o.attr("data-gs-width",u).removeAttr("style"),void r.updateGridFlag(e);var w,b=m.x;w=Math.ceil((t.position.left+t.size.width-11)/l),v=m.w+(w-(b+m.w)),m.x+v>m.x+m.w+m.after&&(v=m.w+m.after),s<t.originalSize.width&&((w=Math.round((t.position.left+t.size.width-11)/l))<=b&&(w=b+1),v=m.w-(b+m.w-w)),v<=0&&(v=1),o.attr("data-gs-width",v).removeAttr("style"),r.updateGridFlag(e)},getFlag:function(e){var t,n=e.data("gridRowFlag")||[];if(_.isEmpty(n)){for(t=0;t<this.cols;t++)n[t]=0;e.data("gridRowFlag",n)}return n},updateGridFlag:function(e){var i,r=this,o=[];for(i=0;i<r.cols;i++)o[i]=0;return mi(".grid-stack-item",e).each(function(e){mi(this).removeAttr("style");var t=r.getX(mi(this)),n=r.getW(mi(this));for(i=t;i<t+n;i++)o[i]=i===t?mi(this):1}),e.data("gridRowFlag",o),r.updateItemsPositions(o),r.sortGrid(e),o},addNewWidget:function(e,t){var n=this,i=n.container.find(".hfg--device-panel.hfg--panel-"+n.activePanel),r=t;_.isObject(r)||(r=i.find(".hfg--cb-items").first());var o=e;o.draggable({revert:"invalid",appendTo:i,scroll:!1,zIndex:99999,handle:".grid-stack-item-content",start:function(e,t){mi("body").addClass("builder-item-moving"),mi(".hfg--cb-items",i).css("z-index",""),t.helper.parent().css("z-index",9999)},stop:function(){mi("body").removeClass("builder-item-moving"),mi(".hfg--cb-items",i).css("z-index",""),n.save()},drag:function(){}}).resizable({handles:"w, e",start:function(e,t){t.originalElement.css({right:"auto",left:t.position.left})},stop:function(e,t){n.setGridWidth(t.element.parent(),t),n.save()}}),r.append(o),n.updateGridFlag(r),o[0]&&mi("#accordion-section-"+o[0].dataset.section).removeClass("hfg-section-inactive")},addPanel:function(e){var t=this.getTemplate(),n="tmpl-hfg--cb-panel";if(0!==mi("#"+n).length)return _.isObject(s.rows)||(s.rows={}),'<div class="hfg--device-panel hfg-vertical-panel hfg--panel-'+e+'" data-device="'+e+'">'+t({device:e,id:s.id,rows:s.rows},n)+"</div>"},addDevicePanels:function(){var i=this;_.each(i.devices,function(e,t){var n=i.addPanel(t);mi(".hfg--cb-devices-switcher",i.container).append('<a href="#" class="switch-to switch-to-'+t+'" data-device="'+t+'"><span class="icon '+t+'-icon"></span><span>'+e+"</span></a>"),mi(".hfg--cb-body",i.container).append(n),mi(".hfg-widgets-panel-inner",i.widgetSidebarContainer).append('<div class=" hfg--widgets hfg--widgets-'+t+'" data-device="'+t+'"></div>')});var e=mi("#hfg-upsell-tmpl");e.length&&mi(e.html()).insertAfter(mi(".hfg--cb-devices-switcher",i.container))},addItem:function(e,t){var n=this.getTemplate(),i="tmpl-hfg--cb-item";if(0!==mi("#"+i).length){e.elementOrder=t;var r=n(e,i);return mi(r)}},addAvailableItems:function(){var a=this;_.each(a.devices,function(e,o){_.each(a.items,function(e,t){var n=!0;if(!_.isUndefined(e.devices)&&!_.isEmpty(e.devices))if(_.isString(e.devices))e.devices!==o&&(n=!1);else{var i=!1;_.each(e.devices,function(e){o===e&&(i=!0)}),i||(n=!1)}if(n){t=Object.keys(a.items).indexOf(t);var r=a.addItem(e,t);mi(".hfg--widgets-"+o,a.widgetSidebarContainer).prepend(r)}})})},switchToDevice:function(e,t){var n=this;1<_.size(n.devices)?(mi(".hfg--cb-devices-switcher a",n.container).removeClass("hfg--tab-active"),mi(".hfg--cb-devices-switcher .switch-to-"+e,n.container).addClass("hfg--tab-active"),mi(".hfg--device-panel",n.container).addClass("hfg--panel-hide"),mi(".hfg--device-panel.hfg--panel-"+e,n.container).removeClass("hfg--panel-hide"),n.activePanel=e,mi(".hfg--device-panel .hfg-available-items .item-from-list").each(function(e,t){mi("#accordion-section-"+mi(t)[0].dataset.section).removeClass("hfg-section-inactive")}),mi(".hfg--device-panel.hfg--panel-"+e+" .hfg-available-items .item-from-list").each(function(e,t){mi("#accordion-section-"+mi(t)[0].dataset.section).addClass("hfg-section-inactive")})):(mi(".hfg--device-panel.hfg--panel-"+e+" .hfg-available-items .item-from-list").each(function(e,t){mi("#accordion-section-"+mi(t)[0].dataset.section).addClass("hfg-section-inactive")}),mi(".hfg--cb-devices-switcher a",n.container).addClass("hfg--tab-active")),(_.isUndefined(t)||t)&&("desktop"===e?mi("#customize-footer-actions .preview-desktop").trigger("click"):mi("#customize-footer-actions .preview-mobile").trigger("click"))},addExistingRowsItems:function(){var a=this,t=!1;bi.control(a.controlId).setting.get()&&(t=JSON.parse(bi.control(a.controlId).setting.get())),_.isObject(t)||(t={}),_.each(a.panels,function(r,o){var e={};_.isObject(t[o])&&(e=t[o]),_.each(e,function(e,i){_.isUndefined(e)||_.each(e,function(e,t){var n=mi('.hfg--widgets[data-device="'+o+'"] .grid-stack-item[data-id="'+e.id+'"]').first();n.attr("data-gs-width",e.width),n.attr("data-gs-x",e.x),n.removeClass("item-from-list"),a.addNewWidget(n,r[i]),mi("#accordion-section-"+e.id).removeClass("hfg-section-inactive")})}),a.hideDuplicates(o)}),a.ready=!0},focus:function(){this.container.on("click",".hfg--cb-item-setting, .hfg--cb-item-name, .item-tooltip",function(e){e.preventDefault();var t=mi(this).data("section")||"",n=mi(this).attr("data-control")||"",i=!1;n&&(_.isUndefined(bi.control(n))||(bi.control(n).focus(),i=!0)),i||t&&!_.isUndefined(bi.section(t))&&bi.section(t).focus()}),this.container.on("click",".hfg--cb-row-settings",function(e){e.preventDefault();var t=mi(this).attr("data-id")||"",n=s.id+"_"+t;_.isUndefined(bi.section(n))||bi.section(n).focus()})},closeComponentsSidebar:function(){mi(".widgets-panel--visible").removeClass("widgets-panel--visible"),mi(".hfg--widgets.widgets--visible").removeClass("widgets--visible"),mi(this.widgetSidebarContainer).find(".component-search").val("").trigger("keyup"),mi(this.widgetSidebarContainer).removeClass("preview-right preview-left"),mi("body").removeClass("hfg--widgets-open"),mi(".hfg--component-preview.visible").removeClass("visible")},initComponentsSidebar:function(){var l=this;mi(l.container).on("click",".add-button--grid",function(e){l.insertPoint=mi(this).data("slot"),l.insertRow=mi(this).closest(".hfg--row-inner").find(".hfg--cb-items").data("id"),e.preventDefault(),l.closeComponentsSidebar();var t=e.target.getBoundingClientRect(),n=mi(".wp-full-overlay").hasClass("collapsed")?0:mi("#customize-controls").outerWidth(),i=mi(l.widgetSidebarContainer).outerWidth(),r=mi(l.widgetSidebarContainer).outerHeight(),o={top:t.top-(r+5)};6<l.insertPoint?(mi(l.widgetSidebarContainer).addClass("preview-left"),o.left=t.left-n-i+i/7+mi(this).outerWidth()):l.insertPoint<5?(mi(l.widgetSidebarContainer).addClass("preview-right"),o.left=t.left-n-i/7):o.left=t.left-n-i/2+mi(this).outerWidth()/2,mi(l.widgetSidebarContainer).css(o);var a=mi(this).closest(".hfg--device-panel")[0].getAttribute("data-device");mi(l.widgetSidebarContainer).addClass("widgets-panel--visible"),mi(l.widgetSidebarContainer).find(" .hfg--widgets-"+a).addClass("widgets--visible")}),mi(l.widgetSidebarContainer).on("click",".hfg-widgets-panel-header .close",function(e){l.closeComponentsSidebar()}),mi(l.widgetSidebarContainer).on("keyup input",".component-search",function(e){var t=e.target.value.toLowerCase();_.each(l.widgetSidebarContainer.find(".grid-stack-item"),function(e){mi(e).filter(function(){if(mi(this).hasClass("duplicate"))return!1;mi(this).toggle(-1<mi(this).text().toLowerCase().indexOf(t))})})}),mi(l.widgetSidebarContainer).on("click",".grid-stack-item",function(e){l.closeComponentsSidebar();var t=JSON.parse(bi.control(l.controlId).setting.get()),n=mi(this).closest(".hfg--widgets").data("device"),i=mi(this).data("df-width"),r=mi(this).data("id");void 0===t[n]&&(t[n]={}),void 0===t[n][l.insertRow]&&(t[n][l.insertRow]={});var o=Object.values(t[n][l.insertRow]),a={x:l.insertPoint,y:1,width:i,height:1,id:r};o.push(a),mi(this).attr("data-gs-x",l.insertPoint),mi(this).attr("data-gs-width",i),o.sort(function(e,t){return e.x<t.x?-1:e.x>t.x?1:0});for(var s=0;s<o.length;s++)o[s].id===r&&(s===o.length-1?12<o[s].x+o[s].width&&(o[s].width=o[s].x+o[s].width-12,mi(this).attr("data-gs-width",o[s].width)):o[s].x+o[s].width>o[s+1].x&&(o[s].width=o[s+1].x-o[s].x,mi(this).attr("data-gs-width",o[s].width)));var c=mi(this).find(".grid-stack-item-content");c.addClass("hfg-highlight"),setTimeout(function(){c.removeClass("hfg-highlight")},3500),mi("#_sid_"+n+"-"+l.insertRow,l.container[0]).append(this),l.addNewWidget(mi(this),mi(l.container[0]).find(" #_sid_"+n+"-"+l.insertRow)),bi.section(this.getAttribute("data-section")).focus(),l.save(),l.insertRow=null,l.insertPoint=null,l.hideDuplicates(n)})},remove:function(){var i=this;mi(i.container).on("click",".hfg--device-panel .hfg--cb-item-remove",function(e){e.preventDefault();var t=mi(this).closest(".grid-stack-item"),n=t.closest(".hfg--device-panel")[0].getAttribute("data-device");t.attr("data-gs-x",0),t.removeAttr("style"),mi(i.widgetSidebarContainer).find(".hfg--widgets-"+n).prepend(t),mi("#accordion-section-"+t[0].dataset.section).addClass("hfg-section-inactive"),i.updateAllGrids(),i.hideDuplicates(n),i.save()})},removeAllItems:function(){var i=this;mi(i.container).find(".grid-stack-item").each(function(e,t){var n=mi(t).closest(".hfg--device-panel")[0].getAttribute("data-device");mi(t).attr("data-gs-x",0),mi(t).removeAttr("style"),mi(i.widgetSidebarContainer).find(".hfg--widgets-"+n).prepend(t),i.updateAllGrids(),i.hideDuplicates(n)})},hideDuplicates:function(e){var t=mi(this.widgetSidebarContainer).find(".hfg--widgets-"+e+" .grid-stack-item"),n={};_.each(t,function(e){var t=mi(e).data("slug");if("hfg-generic-component"===t)return!1;void 0===n[t]&&(n[t]=[]),n[t].push(e)}),_.each(n,function(e,t){if(e.length<2)return mi(e[0]).removeClass("duplicate"),!1;_.each(e,function(e,t){if(0===t)return mi(e).removeClass("duplicate"),!1;mi(e).addClass("duplicate")})})},encodeValue:function(e){return JSON.stringify(e)},listenForLayoutSideloading:function(){var t=this;document.addEventListener("neve-changed-builder-value",function(e){return!!e.detail&&(e.detail.id===t.id&&(bi.control(t.controlId).setting.set(t.encodeValue(e.detail.value)),t.removeAllItems(),void t.addExistingRowsItems()))})},decodeValue:function(e){return JSON.parse(e)},save:function(){var i=this;if(i.ready){var r={};_.each(i.panels,function(e,n){r[n]={},_.each(e,function(e,t){r[n][t]=_.map(mi(" > .grid-stack-item",e),function(e){return e=mi(e),{x:i.getX(e),y:1,width:i.getW(e),height:1,id:e.data("id")||""}})})}),bi.control(i.controlId).setting.set(i.encodeValue(r))}},showPanel:function(){var t=this;this.container.find(".add-button--grid").addClass("hfg-highlight"),setTimeout(function(){t.container.find(".add-button--grid").removeClass("hfg-highlight")},1e3),this.container.removeClass("hfg--builder--hide").addClass("hfg--builder-show"),setTimeout(function(){var e=t.container.height();mi("#customize-preview").addClass("cb--preview-panel-show").css({bottom:e-1,"margin-top":"0px"})},100)},hidePanel:function(){this.container.removeClass("hfg--builder-show"),mi("#customize-preview").removeClass("cb--preview-panel-show").removeAttr("style")},togglePanel:function(){var t=this;bi.state("expandedPanel").bind(function(e){bi.panel(s.panel).expanded()?(wi.trigger("hfg_panel_builder_open",[s.panel]),top._current_builder_panel=c,t.showPanel()):(t.hidePanel(),t.closeComponentsSidebar())}),t.container.on("click",".hfg--panel-close",function(e){e.preventDefault(),t.container.toggleClass("hfg--builder--hide"),t.container.hasClass("hfg--builder--hide")?mi("#customize-preview").removeClass("cb--preview-panel-show"):mi("#customize-preview").addClass("cb--preview-panel-show")})},panelLayoutCSS:function(){var e=mi("#customize-controls").width();bi.state("paneVisible").get()||(e=0),yi?this.container.find(".hfg--cb-inner").css({"margin-right":e}):this.container.find(".hfg--cb-inner").css({"margin-left":e})},populateComponentPreviews:function(){var n=this,i=n.getTemplate();_.each(n.devices,function(e,t){_.each(n.items,function(e){if(null===e.description)return!1;var t=i(e,"tmpl-hfg--widgets-preview");mi(n.widgetSidebarContainer).append(t)})})},init:function(e,t,n){var i=this,r=i.getTemplate(),o=r(s,"tmpl-hfg--builder-panel"),a=r(s,"tmpl-hfg--widgets-sidebar");i.container=mi(o),i.widgetSidebarContainer=mi(a),mi("body .wp-full-overlay").append(i.container).append(i.widgetSidebarContainer),i.controlId=e,i.items=t,i.devices=n,s.section&&bi.section(s.section).container.addClass("hfg--hide"),i.addDevicePanels(),i.switchToDevice(i.activePanel),i.addAvailableItems(),i.populateComponentPreviews(),i.switchToDevice(i.activePanel),i.drag_drop(),i.initComponentsSidebar(),i.focus(),i.remove(),i.addExistingRowsItems(),i.listenForLayoutSideloading(),bi.panel(s.panel).expanded()?i.showPanel():(i.hidePanel(),i.closeComponentsSidebar()),bi.previewedDevice.bind(function(e){"desktop"===e?i.switchToDevice("desktop",!1):i.switchToDevice("mobile",!1)}),i.togglePanel(),bi.state("paneVisible").get()&&i.panelLayoutCSS(),bi.state("paneVisible").bind(function(){i.panelLayoutCSS()}),mi(window).resize(_.throttle(function(){i.panelLayoutCSS()},100)),i.container.on("click",".hfg--cb-devices-switcher a.switch-to",function(e){e.preventDefault();var t=mi(this).data("device");i.switchToDevice(t);var n=new CustomEvent("neveChangedRepsonsivePreview",{detail:t});document.dispatchEvent(n)}),wi.trigger("hfg_builder_panel_loaded",[c,i])}};return e.init(s.control_id,s.items,s.devices),e},xi=jQuery,_i=wp.customize||null,Si=xi(document),_i.bind("ready",function(e,t){_.each(HFG_Layout_Builder.builders,function(e,t){Ci[t]=new ii(e,t)}),_i.bind("pane-contents-reflowed",function(){setTimeout(function(){0===xi("#sub-accordion-panel-widgets .no-widget-areas-rendered-notice .footer_moved_widgets_text").length&&xi("#sub-accordion-panel-widgets .no-widget-areas-rendered-notice").append('<p class="footer_moved_widgets_text">'+HFG_Layout_Builder.footer_moved_widgets_text+"</p>")},1e3)}),_i.state("expandedSection").bind(function(e){xi(".hfg--device-panel .grid-stack-item").removeClass("item-active"),xi(".hfg--cb-row").removeClass("row-active"),e&&(xi('.hfg--cb-row[data-id="'+e.id+'"]').addClass("row-active"),xi(".hfg--device-panel .grid-stack-item.for-s-"+e.id).addClass("item-active"))})}),Si.on("click",".focus-section",function(e){e.preventDefault();var t=xi(this).attr("data-id")||"";(t=t||(t=xi(this).attr("href")||"").replace("#",""))&&_i.section(t)&&_i.section(t).focus()}),Si.on("click",".focus-control",function(e){e.preventDefault();var t=xi(this).attr("data-id")||"";(t=t||(t=xi(this).attr("href")||"").replace("#",""))&&_i.control(t)&&_i.control(t).focus()}),Si.on("click",".focus-panel",function(e){e.preventDefault();var t=xi(this).attr("data-id")||"";(t=t||(t=xi(this).attr("href")||"").replace("#",""))&&_i.panel(t)&&_i.panel(t).focus()}),Si.on("mouseover",".hfg--widgets .grid-stack-item",function(e){var t=xi(this),n=t.attr("data-id");xi(t).closest(".hfg--widgets-panel").find('[data-for-component="'+n+'"]').addClass("visible")}),Si.on("mouseleave",".hfg--widgets .grid-stack-item",function(e){var t=xi(this),n=t.attr("data-id");xi(t).closest(".hfg--widgets-panel").find('[data-for-component="'+n+'"]').removeClass("visible")}),Si.on("mouseover",".hfg--cb-row .grid-stack-item",function(e){var t=xi(this),n=xi(".hfg--cb-item-remove",t).outerWidth()+xi(".hfg--cb-item-setting",t).outerWidth();xi(".grid-stack-item-content",t).innerWidth()-50<n&&t.addClass("show-tooltip")}),Si.on("mouseleave",".hfg--cb-row .grid-stack-item",function(e){xi(this).removeClass("show-tooltip")}),_i.bind("ready",function(){_i.section.each(function(t){t.expanded.bind(function(e){var n=[];xi(".hfg--sidebar-items .grid-stack-item .grid-stack-item-content .hfg--cb-item-name").each(function(e,t){n.push(xi(t).data("section"))}),n.push("hfg_header_layout_sidebar"),-1!==n.indexOf(t.id)&&e&&"desktop"!==_i.previewedDevice.get()?Oi(!0):Oi(!1)})}),_i.previewer.bind("neve-toggle-navbar",function(){xi(".hfg--cp-sidebar .toggle").toggleClass("active")})}),Si.on("click",".hfg--cp-sidebar .toggle",function(){Oi()}),Si.on("click",".hfg--cp-sidebar .hfg--cb-row-settings,.hfg--cp-sidebar .grid-stack-item",function(){Oi(!0)}),Si.on("click",".quick-links a",function(e){e.preventDefault(),e.stopPropagation();var t=xi(this).data("control-focus");wp.customize.control(t).focus(),xi("label."+t).click()}),hashCode=function(e){var t,n=0;if(0===e.length)return n;for(t=0;t<this.length;t++)n=(n<<5)-n+this.charCodeAt(t),n|=0;return n},wp.customize.sectionConstructor.hfg_instructions=wp.customize.Section.extend({attachEvents:function(){},isContextuallyActive:function(){return!0}})}();
Save