{"version":3,"sources":["jsdelivr-header.js","/wp/plugins/themify-builder/branches/5.3.0/themify/js/modules/themify.dropdown.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCNC,SAAY,EAAE,EAAU,GACxB,aAEA,IAAI,EACH,EACA,EAAM,QACJ,EAAQ,UACV,GAAO,aAER,MAAM,EAAW,SAAU,EAAG,GAC7B,MAAO,QAAQ,KAAK,EAAE,OAAS,EAAE,eAAiB,GAAG,eAAe,GAAG,OAAS,GAAK,EAAE,OAAS,EACjG,EACA,EAAW,SAAU,EAAG,GACvB,MAAM,EAAK,EAAG,KAAM,wBAAyB,QACzC,EAAK,EAAG,KAAM,oBAClB,IAAI,EAAG,QACG,IAAP,GACF,EAAK,IAAK,aAAc,WAAY,YACpC,EAAG,SAAU,2BACb,EAAI,YAAa,UAAW,SAAU,UAGtC,EAAK,SAAS,WACb,EAAG,MAAO,IAAK,aAAc,SAC9B,IACA,EAAG,YAAa,2BAChB,EAAI,YAAa,QAAS,SAAU,UACpC,EAAG,SAEJ,EAAG,QAAS,YAAY,EACzB,EA0CA,EAAQ,GAAG,oBAAmB,SAAS,GACnC,aAAiB,SACnB,EAAM,EAAM,YAEK,IAAf,EAAM,SACR,EAAM,CAAC,IAER,IAAI,IAAI,EAAE,EAAM,OAAO,EAAE,GAAG,IAAI,EAC/B,IAAI,EAAM,GAAG,UAAU,SAAS,kBAAkB,CACjD,EAAM,GAAG,WAAW,kBACpB,IAAI,EAAK,EAAM,GAAG,uBAAuB,0BACzC,IAAI,IAAI,EAAE,EAAK,OAAO,EAAE,GAAG,IAAI,EAAE,CAChC,IAAI,EAAO,EAAK,GAAG,SACnB,IAAI,IAAI,EAAE,EAAO,OAAO,EAAE,GAAG,IAAI,EAChC,GAAuB,MAApB,EAAO,GAAG,UAAkB,EAAO,GAAG,uBAAuB,eAAe,KAAO,EAAO,GAAG,UAAU,SAAS,oBAAoB,CACtI,IAAI,EAAM,EAAS,cAAc,QACjC,EAAM,UA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.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /wp/plugins/themify-builder/branches/5.3.0/themify/js/modules/themify.dropdown.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n",";(function ( $,document, Themify ) {\r\n\t'use strict';\r\n        \r\n\tlet startX,\r\n\t\tstartY,\r\n\t\tevent='click';\r\n\tif(Themify.isTouch){\r\n\t\tevent+=' touchend';\r\n\t}\r\n\tconst getCoord = function (e, c) {\r\n\t\treturn /touch/.test(e.type) ? (e.originalEvent || e).changedTouches[0]['page' + c] : e['page' + c];\r\n\t},\r\n\t_trigger = function (el,show){\r\n\t\tconst item=el.find( '.sub-menu, .children' ).first(),\r\n\t\t\t   sub= el.find( '> a .child-arrow' );\r\n\t\tlet ev='open';\r\n\t\tif(show===true){\r\n\t\t\titem.css( 'visibility', 'visible' ).slideDown();\r\n\t\t\tel.addClass( 'dropdown-open toggle-on' );\r\n\t\t\tsub.removeClass( 'closed' ).addClass( 'open' );\r\n\t\t}\r\n\t\telse{\r\n\t\t\titem.slideUp( function() {\r\n\t\t\t\t$( this ).css( 'visibility', 'hidden' );\r\n\t\t\t} );\r\n\t\t\tel.removeClass( 'dropdown-open toggle-on' );\r\n\t\t\tsub.removeClass( 'open' ).addClass( 'closed' );\r\n\t\t\tev='close';\r\n\t\t}\r\n\t\tel.trigger( 'dropdown_'+ev );\r\n\t},\r\n\t_init=function(){\r\n\t\tif(Themify.isTouch){\r\n            Themify.body.on('touchstart', '.child-arrow, .with-sub-arrow a', function(e){\r\n                    e.stopPropagation();\r\n                    startX = getCoord(e, 'X');\r\n                    startY = getCoord(e, 'Y');\r\n            });\r\n\t\t}\r\n\t\tThemify.body.on(event, '.child-arrow', function(e){\r\n\t\t\te.stopPropagation();\r\n\t\t\t// If movement is less than 20px, execute the handler\r\n\t\t\tif (\r\n\t\t\t\te.type === 'click'\r\n\t\t\t\t|| ( Math.abs(getCoord(e, 'X') - startX) < 20 && Math.abs(getCoord(e, 'Y') - startY) < 20 )\r\n\t\t\t) {\r\n\t\t\t\tconst menu_item = $( this ).closest( 'li' ),\r\n\t\t\t\t\tactive_tree = $( this ).parents( '.dropdown-open' );\r\n\t\t\t\t$( this ).closest( '.with-sub-arrow' ) // get the menu container\r\n\t\t\t\t\t.find( 'li.dropdown-open' ).not( active_tree ) // find open (if any) dropdowns\r\n\t\t\t\t\t.each(function(){\r\n\t\t\t\t\t\t_trigger( $( this ),false );\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t_trigger( menu_item, ! menu_item.hasClass( 'dropdown-open' ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t} )\r\n\t\t// clicking menu items where the URL is only \"#\" is the same as clicking the dropdown arrow\r\n\t\t.on( event, '.with-sub-arrow a', function(e){\r\n\t\t\t// If movement is less than 20px, execute the handler\r\n\t\t\tif (Math.abs(getCoord(e, 'X') - startX) < 20 && Math.abs(getCoord(e, 'Y') - startY) < 20) {\r\n\t\t\t\tif( $( this ).attr( 'href' ) === '#' ) {\r\n\t\t\t\t\te.stopPropagation();\r\n\t\t\t\t\t$( this ).find( '> .child-arrow' ).click();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} );\r\n\t};\r\n\t\r\n\tThemify.on('tf_dropdown_init',function(items){\r\n\t\tif(items instanceof jQuery){\r\n\t\t\titems=items.get();\r\n\t\t}\r\n\t\tif(items.length===undefined){\r\n\t\t\titems=[items];\r\n\t\t}\r\n\t\tfor(let i=items.length-1;i>-1;--i){\r\n\t\t\tif(!items[i].classList.contains('with-sub-arrow')){\r\n\t\t\t\titems[i].className+=' with-sub-arrow';\r\n\t\t\t\tlet item=items[i].getElementsByClassName('menu-item-has-children');\r\n\t\t\t\tfor(let j=item.length-1;j>-1;--j){\r\n\t\t\t\t\tlet childs=item[j].children;\r\n\t\t\t\t\tfor(let k=childs.length-1;k>-1;--k){\r\n\t\t\t\t\t\tif(childs[k].tagName==='A' && !childs[k].getElementsByClassName('child-arrow')[0] && !childs[k].classList.contains('themify_lightbox')){\r\n\t\t\t\t\t\t\tlet arrow=document.createElement('span');\r\n\t\t\t\t\t\t\tarrow.className='child-arrow closed';\r\n\t\t\t\t\t\t\tchilds[k].appendChild(arrow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\titem=items[i].getElementsByClassName('page_item_has_children');\r\n\t\t\t\tfor(let j=item.length-1;j>-1;--j){\r\n\t\t\t\t\tlet childs=item[j].children;\r\n\t\t\t\t\tfor(let k=childs.length-1;k>-1;--k){\r\n\t\t\t\t\t\tif(childs[k].tagName==='A' && !childs[k].getElementsByClassName('child-arrow')[0] && !childs[k].classList.contains('themify_lightbox')){\r\n\t\t\t\t\t\t\tlet arrow=document.createElement('span');\r\n\t\t\t\t\t\t\tarrow.className='child-arrow closed';\r\n\t\t\t\t\t\t\tchilds[k].appendChild(arrow);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t_init();\r\n\t});\r\n})( jQuery,document, Themify );"]}