PageSourceSearch

https://builderius.io/wp-content/plugins/builderius/assets/js/webc…/builderius-menu-toggle.js?ver=1.3.5-beta

js builderius.io collected 2026-10-02 04:54:24 UTC 11,062 bytes, 1 lines download raw bytes

1(()=>{"use strict";function t(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function e(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}}function n(n){return function r(i,s){switch(arguments.length){case 0:return r;case 1:return t(i)?r:e(function(t){return n(i,t)});default:return t(i)&&t(s)?r:t(i)?e(function(t){return n(t,s)}):t(s)?e(function(t){return n(i,t)}):n(i,s)}}}const r=e(function(t){return null==t});const i=n(function(t,e){return!r(e)&&t in e});function s(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var a=Object.prototype.toString;const o=function(){return"[object Arguments]"===a.call(arguments)?function(t){return"[object Arguments]"===a.call(t)}:function(t){return s("callee",t)}}(),c=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};var u=e(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():t==Set||t instanceof Set?new Set:t==Map||t instanceof Map?new Map:c(t)?[]:function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)?"":function(t){return"[object Object]"===Object.prototype.toString.call(t)}(t)?{}:o(t)?function(){return arguments}():function(t){var e=Object.prototype.toString.call(t);return"[object Uint8ClampedArray]"===e||"[object Int8Array]"===e||"[object Uint8Array]"===e||"[object Int16Array]"===e||"[object Uint16Array]"===e||"[object Int32Array]"===e||"[object Uint32Array]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object BigInt64Array]"===e||"[object BigUint64Array]"===e}(t)?t.constructor.from(""):void 0});const l=u;function f(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function h(t,e,n){for(var r=0,i=n.length;r<i;){if(t(e,n[r]))return!0;r+=1}return!1}const d="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};var p=!{toString:null}.propertyIsEnumerable("toString"),b=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],y=function(){return arguments.propertyIsEnumerable("length")}(),g=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};const m="function"!=typeof Object.keys||y?e(function(t){if(Object(t)!==t)return[];var e,n,r=[],i=y&&o(t);for(e in t)!s(e,t)||i&&"length"===e||(r[r.length]=e);if(p)for(n=b.length-1;n>=0;)s(e=b[n],t)&&!g(r,e)&&(r[r.length]=e),n-=1;return r}):e(function(t){return Object(t)!==t?[]:Object.keys(t)});const A=e(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function v(t,e,n,r){var i=f(t);function s(t,e){return _(t,e,n.slice(),r.slice())}return!h(function(t,e){return!h(s,e,t)},f(e),i)}function _(t,e,n,r){if(d(t,e))return!0;var i,a,o=A(t);if(o!==A(e))return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof e||!d(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!d(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var c=n.length-1;c>=0;){if(n[c]===t)return r[c]===e;c-=1}switch(o){case"Map":return t.size===e.size&&v(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&v(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=m(t);if(u.length!==m(e).length)return!1;var l=n.concat([t]),f=r.concat([e]);for(c=u.length-1;c>=0;){var h=u[c];if(!s(h,e)||!_(e[h],t[h],l,f))return!1;c-=1}return!0}const j=n(function(t,e){return _(t,e,[],[])});const S=e(function(t){return null!=t&&j(t,l(t))});function O(t,e){return e[t<0?e.length+t:t]}const C=e(function(t){return O(0,t)});const E=n(function(t,e){return e instanceof t||null!=e&&(e.constructor===t||"Object"===t.name&&"object"==typeof e)});function w(r){return function i(s,a,o){switch(arguments.length){case 0:return i;case 1:return t(s)?i:n(function(t,e){return r(s,t,e)});case 2:return t(s)&&t(a)?i:t(s)?n(function(t,e){return r(t,a,e)}):t(a)?n(function(t,e){return r(s,t,e)}):e(function(t){return r(s,a,t)});default:return t(s)&&t(a)&&t(o)?i:t(s)&&t(a)?n(function(t,e){return r(t,e,o)}):t(s)&&t(o)?n(function(t,e){return r(t,a,e)}):t(a)&&t(o)?n(function(t,e){return r(s,t,e)}):t(s)?e(function(t){return r(t,a,o)}):t(a)?e(function(t){return r(s,t,o)}):t(o)?e(function(t){return r(s,a,t)}):r(s,a,o)}}}const L=Number.isInteger||function(t){return(t|0)===t};const q=n(function(t,e){return null==e||e!=e?t:e});const I=w(function(t,e,n){return q(t,function(t,e){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;var i=t[r];n=L(i)?O(i,n):n[i]}return n}
1(e,n))}),x=t=>t.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&#0?39;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&");function k(t,...e){if("string"==typeof t)return x(t);let n=t[0];for(const[r,i]of e.entries())n=n+x(String(i))+t[r+1];return n}class M extends HTMLElement{static get observedAttributes(){return["data-style","data-action"]}constructor(){super(),this.isActive=!1,this.currentStyle="slider",this.iconTmpls={},this.changeState=this.changeState.bind(this),this.onReadyCb=()=>{this.reset(),this._initiateScript()},document.addEventListener("builderius.frontend.api.ready",()=>{this.onReadyCb()},!1)}connectedCallback(){M.isBuilderMode()&&this.onReadyCb()}disconnectedCallback(){this.reset(),document.removeEventListener("builderius.frontend.api.ready",()=>{},!1)}attributeChangedCallback(t){this._upgradeProperty(t)}_upgradeProperty(t){const e=this._camalize(t);if(i(e,this)){let t=this[e];delete this[e],this[e]=t}}_camalize(t){return t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(t,e)=>e.toUpperCase())}_fromDataset(t){const e={...this.dataset};return r(e[t])?e[t]:k(e[t])}_inDataset(t,e=null){return t in(r(e)?{...this.dataset}:{...e.dataset})}set dataStyle(t){["3dx","3dx-r","3dy","3dy-r","3dxy","3dxy-r","arrow","arrow-r","arrowalt","arrowalt-r","arrowturn","arrowturn-r","collapse","collapse-r","boring","elastic","elastic-r","emphatic","emphatic-r","slider","slider-r","spin","spin-r","minus","spring","spring-r","stand","stand-r","vortex","vortex-r","squeeze"].includes(t)?this.currentStyle=t:this.currentStyle="slider",this.onReadyCb()}get dataStyle(){return this._fromDataset("style")}set dataAction(t){}get dataAction(){const t=this._fromDataset("action");return["open","close","toggle"].includes(t)?t:null}set dataAriaControls(t){}get dataAriaControls(){return this._fromDataset("ariaControls")}_setElements(){this.isActive=["close"].includes(this.dataAction);const t=this.querySelectorAll(":scope > template"),e={};if([...t].length&&[...t].forEach(t=>{const{tmpl:n="open"}={...t.dataset};let i;i=S([...t.children])&&!r(t.content)?[...t.content.childNodes].map(t=>t.outerHTML):[...t.children].map(t=>t.outerHTML),n&&!S(i)&&(e[n]=i.join(""))}),S(Object.values(e))||e.open||(e.open=C(Object.values(e))),e.close&&!e.open&&(e.open=e.close),this.iconTmpls={...e},!M.isBuilderMode()&&[...t].length>0&&(this.innerHTML=""),!this._btn){if(this._btn=document.createElement("button"),this._btn.setAttribute("type","button"),this._btn.setAttribute("aria-label","open menu"),this.dataAriaControls&&this._btn.setAttribute("aria-controls",this.dataAriaControls),this.isActive?(this._btn.classList.add("is-active"),this._btn.setAttribute("aria-expanded",!0),this._btn.setAttribute("aria-label","close menu")):this._btn.setAttribute("aria-expanded",!1),S(Object.values(this.iconTmpls))?(this._btn.classList.add("hamburger"),this._btn.classList.add(`hamburger--${this.currentStyle}`),this._btn.innerHTML='<span class="hamburger-box" aria-hidden="true">\n<span class="hamburger-inner"></span></span>'):this._updateCustomIcon(),this.appendChild(this._btn),!this.dataAction)return;this._btn.addEventListener("click",()=>{this.changeState()})}}_initiateScript(){try{this._setElements(),this._dispatchEvent("ready",{el:this})}catch(t){return t}}_updateCustomIcon(){const t=Object.keys(this.iconTmpls);let e="";if(!t.length)return;e=!0===this.isActive&&t.includes("close")?this.iconTmpls.close:(!1===this.isActive&&t.includes("open"),this.iconTmpls.open),this._btn.innerHTML=e;const n=this._btn.querySelectorAll("svg");[...n].length&&[...n].forEach(t=>t.setAttribute("aria-hidden",!0))}_toggleActiveClass(){["close","open"].includes(this.dataAction)||this._btn&&(!0===this.isActive?(this._btn.classList.add("is-active"),this._btn.setAttribute("aria-expanded",!0),this._btn.setAttribute("aria-label","close menu")):(this._btn.classList.remove("is-active"),this._btn.setAttribute("aria-expanded",!1),this._btn.setAttribute("aria-label","open menu")),this._updateCustomIcon())}_parseJson(t){let e={};if(E(Array,t))e=t.map(t=>this._parseJson(t));else if(E(Object,t))for(let n in t)e[n]=this._parseJson(t[n]);else E(String,t)?(t=M.fromJson(t),e=E(Object,t)?this._parseJson(t):t):e=t;return e}_dispatchEvent(t,e=null){const n={bubbles:!1,cancelable:!0,detail:e},r=new CustomEvent(t,n),i=new CustomEvent(`builderius-menu-toggle-${t}`,n);this.dispatchEvent(r),window.dispatchEvent(i)}changeState(t=null){["close","open"].includes(this.dataAction)?"close"===this.dataAction?this.isActive=!1:this.isActive=!0:r(t)?this.isActive=!this.isActive:this.isActive=E(Boolean,t)?t:!r(t)&&!S(t),this._toggleActiveClass(),this._dispatchEvent("updated",{el:this,isActive:this.isActive})}reset(){this._btn&&(this._btn.removeEventListener("click",()=>{this.changeState()}),this._btn.remove(),this._btn=null)}reInit(){this.onReadyCb()}testComponent(){return this.onReadyCb()}static fromJson(t){let e={};if(E(String,t))try{e=JSON.parse(k(t))}catch(e){return t}return e}static isBuilderMode(){return!1!==I(!1,["BuilderiusInner"],window)}}void 0===customElements.get("builderius-menu-toggle")&&customElements.define("builderius-menu-toggle",M)})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.