{"version":3,"file":"gf_collapsible_sections.js","names":["collapsibleSections","$","cssClasses","open","getFormMarkupVersion","form_or_id","formElementID","$form","formID","attr","window","hasOwnProperty","gf_get_form_id_by_html_id","replace","jQuery","indexOf","toString","length","find","is","isLegacyMarkup","isLegacyMode","collapsibleSectionsVars","useNewFeatures","openAndFocusInput","$sectionField","direction","hasClass","scrollTo","trigger","closest","data","selector","$focusSectionFieldInputContainer","next","focus","collapsibleSections_openAndFocusInput","elementOrSelector","$el","offset","duration","scrollPos","top","animate","scrollTop","collapsibleSections_Scrollto","onSectionKeyPress","e","key","$target","target","preventDefault","onSectionFocus","document","on","onSectionBlur","off","setup","formDomID","currentPage","gformID","$formWrapper","$collapsibleSections","formClasses","split","forEach","cls","trim","push","addClass","join","each","i","el","$section","this","$sectionCollapsible","$upToNextCollapsibleSectionFields","nextUntil","$upToEndSectionFields","$sectionFields","detach","$description","appendTo","append","$lastSection","hide","$fieldErrors","formIgnoreScroll","delay","setTimeout","prev","$errorSections","$currentlyOpenSections","first","$thisSection","refreshMCE","tinymce","editor","get","settings","extend","remove","init","conditionalLogicListenerAdded","conditionalLogicListener","formId","fields","isInit","removeClass","$signatureFields","gformSignatureResize","$this","getFormById","form_id","current_page","$forms","formDomId","setupDelay","collapsibleSections_setupDelay","setupDelayOverride","parseInt","isNaN","console","log","resize","gform","doAction","wcRechecks","bind","event","renderDelay","collapsibleSections_renderDelay","renderDelayOverride","ready","originalClass","filter","className","substring","lastIndexOf","slideUp","not","thisSelector","$thisTarget","slideDown"],"sources":["gf_collapsible_sections.js"],"sourcesContent":["var collapsibleSections = collapsibleSections || {};\n\n(function($){\n\n\tcollapsibleSections.cssClasses = {\n\t\t\"open\": \"collapsible-sections-open\"\n\t};\n\n\tcollapsibleSections.getFormMarkupVersion = function( form_or_id ){\n\t\tvar formElementID;\n\t\tvar formID = '';\n\t\tvar $form;\n\n\t\tif ( typeof form_or_id === 'undefined' || ( typeof form_or_id === 'string' && form_or_id === '' ) || ( typeof form_or_id === 'number' && form_or_id <= 0 ) ) {\n\t\t\tformElementID = $('form[id^=\"gform_\"]:first').attr('id');\n\t\t\tformID = ( window.hasOwnProperty('gf_get_form_id_by_html_id') ) ? window.gf_get_form_id_by_html_id( formElementID ) : formElementID.replace('gform_', '');\n\t\t\t$form = $('#' + formElementID);\n\t\t}\n\t\telse if ( form_or_id instanceof jQuery ) {\n\t\t\tformElementID = form_or_id.attr('id');\n\t\t\tformID = ( window.hasOwnProperty('gf_get_form_id_by_html_id') ) ? window.gf_get_form_id_by_html_id( formElementID ) : formElementID.replace('gform_', '');\n\t\t\t$form = form_or_id;\n\t\t}\n\t\telse if ( typeof form_or_id === 'string' && form_or_id.indexOf(\"gform_\") !== -1 ) {\n\t\t\tformID = (window.hasOwnProperty('gf_get_form_id_by_html_id')) ? window.gf_get_form_id_by_html_id( form_or_id ) : form_or_id.replace('gform_', '');\n\t\t\tformElementID = \"gform_\" + formID;\n\t\t\t$form = $('#' + formElementID);\n\t\t}\n\t\telse {\n\t\t\tformID = (window.hasOwnProperty('gf_get_form_id_by_html_id')) ? window.gf_get_form_id_by_html_id( \"gform_\" + form_or_id.toString() ) : form_or_id.toString();\n\t\t\tformElementID = \"gform_\" + formID;\n\t\t\t$form = $('#' + formElementID);\n\t\t}\n\n\t\tif ( !$form.length ) {\n\t\t\treturn $('.gform_body .gfield:first').is('li') ? 1 : 2;\n\t\t}\n\n\t\treturn $form.find('.gform_body .gfield:first').is('li') ? 1 : 2;\n\t};\n\n\tcollapsibleSections.isLegacyMarkup = function( form_or_id ) {\n\t\treturn ( collapsibleSections.getFormMarkupVersion( form_or_id ) === 1 );\n\t}\n\n\tcollapsibleSections.isLegacyMode = function() {\n\t\tvar useNewFeatures = ( collapsibleSectionsVars.hasOwnProperty('useNewFeatures') && collapsibleSectionsVars.useNewFeatures.toString() === 'true');\n\t\treturn !useNewFeatures;\n\t};\n\n\n\tcollapsibleSections.openAndFocusInput = function( $sectionField, direction ){\n\t\tif ( ! $sectionField.hasClass('collapsible-sections-field') ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( direction !== 'previous' ) {\n\t\t\tdirection = 'next';\n\t\t}\n\n\t\tif ( ! $sectionField.hasClass(collapsibleSections.cssClasses.open) ) {\n\t\t\t$sectionField.trigger('click');\n\t\t}\n\t\telse {\n\t\t\tcollapsibleSections.scrollTo( $sectionField );\n\t\t}\n\n\t\tvar $form = $sectionField.closest('form');\n\t\tvar formIgnoreScroll = ( typeof $form.data('ignore-scroll') !== 'undefined' && $form.data('ignore-scroll') === true );\n\n\t\tif ( !formIgnoreScroll ) {\n\t\t\t// only give focus if we're scrolling to the open section\n\t\t\tvar selector = ( direction === 'previous' ) ? ':last-of-type' : ':first';\n\t\t\tvar $focusSectionFieldInputContainer = $sectionField.next('.collapsible-sections-collapsible-body').find('.gfield'+selector+' .ginput_container');\n\t\t\tif ($focusSectionFieldInputContainer.find('> input').length) {\n\t\t\t\t$focusSectionFieldInputContainer.find('> input:first').focus();\n\t\t\t}\n\t\t\telse if ($focusSectionFieldInputContainer.find('> textarea').length) {\n\t\t\t\t$focusSectionFieldInputContainer.find('> textarea:first').focus();\n\t\t\t}\n\t\t\telse if ($focusSectionFieldInputContainer.find('> select').length) {\n\t\t\t\t$focusSectionFieldInputContainer.find('> select:first').focus();\n\t\t\t}\n\t\t\telse if ($focusSectionFieldInputContainer.hasClass('ginput_complex')) {\n\t\t\t\t$focusSectionFieldInputContainer.find('> span'+selector+' > input:first').focus();\n\t\t\t}\n\t\t\telse if ($focusSectionFieldInputContainer.hasClass('ginput_container_checkbox') || $focusSectionFieldInputContainer.hasClass('ginput_container_radio')) {\n\t\t\t\t$focusSectionFieldInputContainer.find('> ul > li'+selector+' > input:first').focus();\n\t\t\t}\n\t\t}\n\n\t};\n\twindow.collapsibleSections_openAndFocusInput = collapsibleSections.openAndFocusInput;// legacy support added in 1.1.0\n\n\tcollapsibleSections.scrollTo = function( elementOrSelector ){\n\n\t\tvar $el = $(elementOrSelector);\n\t\tif (!$el.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar $form = $el.closest('form');\n\t\tvar $formWrapper = $el.closest('.gform_wrapper');\n\t\tvar formID = $formWrapper.attr('id').replace('gform_wrapper_', '');\n\n\t\tvar formIgnoreScroll = ( typeof $form.data('ignore-scroll') !== 'undefined' && $form.data('ignore-scroll') === true );\n\n\t\tif (formIgnoreScroll === true) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar offset = (window.hasOwnProperty('gf_collapsible_sections_scroll_to_offset_'+formID)) ? window['gf_collapsible_sections_scroll_to_offset_'+formID] : 0;\n\t\tvar duration = (window.hasOwnProperty('gf_collapsible_sections_scroll_to_duration_'+formID)) ? window['gf_collapsible_sections_scroll_to_duration_'+formID] : 400;\n\t\tvar targetTop = $el.offset().top;\n\t\tvar scrollPos = targetTop - offset;\n\n\t\t$('html,body').animate({ scrollTop: scrollPos }, duration);\n\t};\n\twindow.collapsibleSections_Scrollto = collapsibleSections.scrollTo;// legacy support added in 1.1.0\n\n\tcollapsibleSections.onSectionKeyPress = function(e){\n\t\tif ( e.key === \"Enter\" || e.key === \" \" ) {\n\t\t\tvar $target = $(e.target);\n\t\t\tif ( $target.hasClass('collapsible-sections-field') ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$target.trigger('click');\n\t\t\t}\n\t\t}\n\t};\n\tcollapsibleSections.onSectionFocus = function(e){\n\t\t$(document).on('keypress', collapsibleSections.onSectionKeyPress);\n\t};\n\tcollapsibleSections.onSectionBlur = function(e){\n\t\t$(document).off('keypress', collapsibleSections.onSectionKeyPress);\n\t};\n\n\tcollapsibleSections.setup = function( formDomID, currentPage, gformID ) {\n\n\t\tvar $formWrapper = $('#gform_wrapper_'+formDomID);\n\t\tvar $collapsibleSections = $formWrapper.find('.collapsible-sections-field');\n\n\t\tif ($collapsibleSections.length) {\n\n\t\t\tvar $form = $formWrapper.find('form');\n\t\t\tif ( !$form.length ) {\n\t\t\t\t// woocommerce product addons form\n\t\t\t\t// when it's a variable product the form is WC form, and the GF wrapper is inside that\n\t\t\t\t// when it's a simple product then the form is the GF form, inside the wrapper, but missing the original CSS classes added to it\n\t\t\t\t// see below\n\t\t\t\t$form = $formWrapper.closest('form');\n\t\t\t}\n\n\t\t\tif ( $form.length && ( !$form.attr('class') || $form.attr('class').indexOf('collapsible-sections') === -1 ) ) {\n\t\t\t\t// the form doesn't have the classes that were added to it pre-render\n\t\t\t\t// this happens with woocommerce product addons plugin\n\t\t\t\t// we'll use the wrapper classes to add them back\n\t\t\t\tvar formClasses = [];\n\t\t\t\t$formWrapper.attr('class').split(' ').forEach(function(cls){\n\t\t\t\t\tif ( cls.trim() !== '' && ( cls.indexOf('cs-theme--') !== -1 || cls.indexOf('collapsible-sections') !== -1 ) ) {\n\t\t\t\t\t\tformClasses.push( cls.trim().replace('_wrapper', '') );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t$form.addClass( formClasses.join(' ') );\n\t\t\t}\n\n\t\t\t$collapsibleSections.each(function(i, el){\n\t\t\t\tvar $section = $(this);\n\t\t\t\tvar $sectionCollapsible = $section.next('.collapsible-sections-collapsible-body');\n\t\t\t\tif ( !$sectionCollapsible.length ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t$section.addClass('collapsible-sections-start-field');\n\t\t\t\t}\n\t\t\t\telse if ( i === $collapsibleSections.length - 1 ) {\n\t\t\t\t\t// add the end class if not set\n\t\t\t\t\t$section.addClass('collapsible-sections-end-field');\n\t\t\t\t}\n\n\t\t\t\tvar $upToNextCollapsibleSectionFields = $sectionCollapsible.nextUntil('.collapsible-sections-field');\n\t\t\t\tvar $upToEndSectionFields = $sectionCollapsible.nextUntil('.collapsible-sections-end-field');\n\n\t\t\t\tvar $sectionFields = ( $upToNextCollapsibleSectionFields.length > $upToEndSectionFields.length ) ? $upToEndSectionFields : $upToNextCollapsibleSectionFields;\n\t\t\t\t$sectionFields.detach();\n\n\t\t\t\tif ($section.hasClass('collapsible-sections-description-inside')) {\n\t\t\t\t\tvar $description = $section.find('.gsection_description');\n\t\t\t\t\tif ($description.length) {\n\t\t\t\t\t\t$description.detach().appendTo($sectionCollapsible);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$sectionCollapsible.append($sectionFields);\n\n\t\t\t\t$section.on('focus', collapsibleSections.onSectionFocus);\n\t\t\t\t$section.on('blur', collapsibleSections.onSectionBlur);\n\t\t\t});\n\n\t\t\tif ($formWrapper.hasClass('collapsible-sections-footer-inside_last_wrapper')) {\n\t\t\t\tvar $lastSection = $formWrapper.find('.collapsible-sections-collapsible-body:last');\n\t\t\t\t$formWrapper.find('.gform_footer').detach().appendTo($lastSection);\n\t\t\t}\n\n\t\t\tif ($formWrapper.hasClass('collapsible-sections-single-opens_wrapper')) {\n\t\t\t\t$formWrapper.find('.collapsible-sections-field:not(.collapsible-sections-open):not(.collapsible-sections-end-field-hidden)').each(function(){\n\t\t\t\t\tvar $section = $(this);\n\t\t\t\t\t$section.next('.collapsible-sections-collapsible-body').hide();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar $fieldErrors = $formWrapper.find('.gfield_error');\n\n\t\t\tif ($fieldErrors.length) {\n\n\t\t\t\tvar $form = $collapsibleSections.closest('form');\n\t\t\t\tvar formIgnoreScroll = ( typeof $form.data('ignore-scroll') !== 'undefined' && $form.data('ignore-scroll') === true );\n\n\t\t\t\t$form.data('ignore-scroll', true);// force to ignore scroll\n\t\t\t\tvar delay = (window.hasOwnProperty('gf_collapsible_sections_scroll_to_duration_'+gformID)) ? window['gf_collapsible_sections_scroll_to_duration_'+gformID] : 400;\n\t\t\t\tdelay += 100;\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t$form.data('ignore-scroll', formIgnoreScroll);// reset to original setting\n\t\t\t\t}, delay);\n\n\t\t\t\t$fieldErrors.each(function(){\n\t\t\t\t\tvar $errorSection = $(this).closest('.collapsible-sections-collapsible-body');\n\t\t\t\t\t$errorSection.prev('.collapsible-sections-field').addClass('collapsible-sections-section-error');\n\t\t\t\t});\n\n\t\t\t\tvar $errorSections = $formWrapper.find('.collapsible-sections-section-error');\n\t\t\t\tvar $currentlyOpenSections = $formWrapper.find('.collapsible-sections-open');\n\n\t\t\t\tif ($formWrapper.hasClass('collapsible-sections-single-opens_wrapper') && $errorSections.length) {\n\t\t\t\t\tif ($currentlyOpenSections.length && !$currentlyOpenSections.first().hasClass('collapsible-sections-section-error')) {\n\t\t\t\t\t\t// close the currently open section as it has no errors\n\t\t\t\t\t\t$currentlyOpenSections.first().trigger('click');\n\t\t\t\t\t}\n\t\t\t\t\t// open the first error section\n\t\t\t\t\tif ( !$errorSections.first().hasClass('collapsible-sections-open') ) {\n\t\t\t\t\t\t$errorSections.first().trigger('click');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (!$formWrapper.hasClass('collapsible-sections-single-opens_wrapper') && $errorSections.length) {\n\t\t\t\t\t// open all error sections\n\t\t\t\t\t$currentlyOpenSections.each(function(){\n\t\t\t\t\t\tvar $thisSection = $(this);\n\t\t\t\t\t\tif (!$thisSection.hasClass('collapsible-sections-section-error')) {\n\t\t\t\t\t\t\t$thisSection.trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t$errorSections.each(function(){\n\t\t\t\t\t\tvar $thisSection = $(this);\n\t\t\t\t\t\tif (!$thisSection.hasClass(collapsibleSections.cssClasses.open)) {\n\t\t\t\t\t\t\t$thisSection.trigger('click');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t};\n\n\tcollapsibleSections.refreshMCE = function(){\n\t\tif ( typeof tinymce === 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\t\t$('.collapsible-sections-collapsible-body textarea.wp-editor-area').each(function(){\n\t\t\tvar editor = tinymce.get( $(this).attr('id') );\n\t\t\tif ( editor ) {\n\t\t\t\tvar settings = $.extend({}, editor.settings);\n\t\t\t\teditor.remove();\n\t\t\t\ttinymce.init( settings );\n\t\t\t}\n\t\t});\n\t};\n\n\tvar conditionalLogicListenerAdded = false;\n\tcollapsibleSections.conditionalLogicListener = function() {\n\n\t\tif ( conditionalLogicListenerAdded ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$(document).on('gform_post_conditional_logic', function(e, formId, fields, isInit) {\n\t\t\t$('.gform_wrapper:not(.collapsible-sections-single-opens_wrapper) .collapsible-sections-field.collapsible-sections-open:hidden').each(function(){\n\t\t\t\tvar $section = $(this);\n\t\t\t\t$section.removeClass(collapsibleSections.cssClasses.open);\n\t\t\t\t$section.next('.collapsible-sections-collapsible-body:visible').hide();\n\t\t\t});\n\n\t\t\t$('.collapsible-sections-open-by-default:visible').each(function(){\n\t\t\t\tvar $section = $(this);\n\t\t\t\tif ( $section.data('collapsible-closed') !== true && $section.next('.collapsible-sections-collapsible-body').is(':hidden') ) {\n\t\t\t\t\tcollapsibleSections.openAndFocusInput( $section );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar $form = $('#gform_' + formId);\n\t\t\tvar $signatureFields = $form.find( '.gfield_signature_container' );\n\t\t\tif ( $signatureFields.length && typeof gformSignatureResize === 'function' ) {\n\t\t\t\t$signatureFields.each( function() {\n\t\t\t\t\tvar $this = $( this );\n\t\t\t\t\tsetTimeout(function () { gformSignatureResize( $this ); }, 200 );\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\tconditionalLogicListenerAdded = true;\n\n\t};\n\n\tcollapsibleSections.getFormById = function( form_id ) {\n\t\tvar $form = $('#gform_' + form_id);\n\t\tif ( !$form.length && $('.gform_wrapper[class*=\"_original_id_' + form_id + '\"]').length ) {\n\t\t\t// using Gravity Forms: Multiple Form Instances Add On\n\t\t\t$form = $('.gform_wrapper[class*=\"_original_id_' + form_id + '\"] form');\n\t\t}\n\t\treturn $form;\n\t};\n\n\tcollapsibleSections.init = function( form_id, current_page ) {\n\n\t\tvar $forms = collapsibleSections.getFormById(form_id);\n\t\tif ( !$forms.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$forms.each(function(){\n\n\t\t\tvar $form = $(this);\n\t\t\tvar formDomId = $form.attr('id').replace('gform_', '');\n\n\t\t\tvar $fieldsNeedingDelay = $('.gfield_signature_container');\n\t\t\tvar setupDelay = ($fieldsNeedingDelay.length) ? 1000 : 10;\n\t\t\tif (typeof window.collapsibleSections_setupDelay !== 'undefined') {\n\t\t\t\tvar setupDelayOverride = parseInt(window.collapsibleSections_setupDelay, 10);\n\t\t\t\tif (!isNaN(setupDelayOverride)) {\n\t\t\t\t\tsetupDelay = setupDelayOverride * 1000;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar formIgnoreScroll = (!window.hasOwnProperty('gf_collapsible_sections_scroll_to_'+form_id) || window['gf_collapsible_sections_scroll_to_'+form_id] === \"false\" || window['gf_collapsible_sections_scroll_to_'+form_id] === false);\n\t\t\t$form.data('ignore-scroll', formIgnoreScroll);\n\n\t\t\tsetTimeout(function(){\n\t\t\t\tcollapsibleSections.setup(formDomId, current_page, form_id);\n\t\t\t\tconsole.log('collapsibleSections.setup', formDomId);\n\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tcollapsibleSections.refreshMCE();\n\t\t\t\t\t$(document).trigger('gform_post_conditional_logic', [form_id, null, true]);\n\t\t\t\t\t$(window).resize();\n\t\t\t\t\tcollapsibleSections.conditionalLogicListener();\n\t\t\t\t\t$(document).trigger('gform_post_conditional_logic', [form_id, null, true]);\n\n\t\t\t\t\t$(document).trigger('gf_collapsible_sections_setup', [form_id, current_page, formDomId]);\n\t\t\t\t\tgform.doAction('gf_collapsible_sections_setup', form_id, current_page, formDomId);\n\t\t\t\t}, 100);\n\t\t\t}, setupDelay);\n\n\t\t});\n\n\t};\n\n\tvar wcRechecks = {};\n\t$(document).bind('gform_post_render', function(event, form_id, current_page){\n\n\t\tvar $forms = collapsibleSections.getFormById(form_id);\n\t\tif ( !$forms.length && !wcRechecks.hasOwnProperty(form_id.toString()) ) {\n\t\t\tvar renderDelay = 3000;\n\t\t\tif (typeof window.collapsibleSections_renderDelay !== 'undefined') {\n\t\t\t\tvar renderDelayOverride = parseInt(window.collapsibleSections_renderDelay, 10);\n\t\t\t\tif (!isNaN(renderDelayOverride)) {\n\t\t\t\t\trenderDelay = renderDelayOverride * 1000;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconsole.log('renderDelay', renderDelay);\n\t\t\twcRechecks[ form_id.toString() ] = setTimeout(function(){\n\t\t\t\tcollapsibleSections.init(form_id, current_page);\n\t\t\t}, renderDelay);\n\t\t}\n\t\telse if ( $forms.length ) {\n\t\t\tcollapsibleSections.init(form_id, current_page);\n\t\t}\n\n\t});\n\n\t$(document).ready(function(){\n\n\t\t$('body').on('click', '.collapsible-sections-field', function(e){\n\t\t\te.preventDefault();\n\t\t\tvar $section = $(this);\n\t\t\tvar $formWrapper = $section.closest('.gform_wrapper');\n\t\t\tvar $form = $formWrapper.find('form');\n\t\t\tif ( !$form.length ) {\n\t\t\t\t// probably woocommerce product addons form\n\t\t\t\t$form = $formWrapper.closest('form');\n\t\t\t}\n\n\t\t\tvar gformID = $form.attr('id').replace('gform_', '');\n\t\t\tif ( $formWrapper.attr('class').indexOf('original_id_') !== -1 ) {\n\t\t\t\t// using Gravity Forms: Multiple Form Instances Add On\n\t\t\t\tvar originalClass = $formWrapper.attr('class').split(\" \")\n\t\t\t\t\t.filter(function(className){\n\t\t\t\t\t\treturn ( className.indexOf(\"original_id_\") !== -1 );\n\t\t\t\t\t})[0];\n\t\t\t\tgformID = originalClass.substring(originalClass.lastIndexOf('_') + 1);\n\t\t\t}\n\n\t\t\tvar selector = $section.data('target');\n\t\t\tvar $target = $formWrapper.find(selector);\n\n\t\t\tif ($target.length) {\n\t\t\t\tif ($target.is(':visible')) {\n\t\t\t\t\t$section.attr('aria-pressed', 'false').attr('aria-expanded', 'false');\n\t\t\t\t\t$section.data('collapsible-closed', true);\n\t\t\t\t\t$target.slideUp('fast', function(){\n\t\t\t\t\t\t$section.removeClass(collapsibleSections.cssClasses.open);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ($formWrapper.length && $formWrapper.hasClass('collapsible-sections-single-opens_wrapper')) {\n\t\t\t\t\t\t$formWrapper.find('.collapsible-sections-field:visible').not($section).each(function(){\n\t\t\t\t\t\t\tvar $thisSection = $(this);\n\t\t\t\t\t\t\tvar thisSelector = $thisSection.data('target');\n\t\t\t\t\t\t\tvar $thisTarget = $formWrapper.find(thisSelector);\n\t\t\t\t\t\t\tif ($thisTarget.length) {\n\t\t\t\t\t\t\t\t$thisSection.attr('aria-pressed', 'false').attr('aria-expanded', 'false');\n\t\t\t\t\t\t\t\t$thisTarget.slideUp('fast', function(){\n\t\t\t\t\t\t\t\t\t$thisSection.removeClass(collapsibleSections.cssClasses.open);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t$section.addClass(collapsibleSections.cssClasses.open);\n\t\t\t\t\t$section.attr('aria-pressed', 'true').attr('aria-expanded', 'true');\n\t\t\t\t\t$section.data('collapsible-closed', false);\n\t\t\t\t\t$target.slideDown('fast', function(){\n\t\t\t\t\t\t$(document).trigger('gform_post_conditional_logic', [gformID, null, true]);\n\t\t\t\t\t\t$(window).resize();\n\t\t\t\t\t\tif ($formWrapper.hasClass('collapsible-sections-scrollto_wrapper')) {\n\t\t\t\t\t\t\tcollapsibleSections.scrollTo($section);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t});\n\n\n})(jQuery);\n"],"mappings":"AAAA,IAAIA,oBAAsBA,qBAAuB,CAAC,GAElD,SAAUC,GAETD,oBAAoBE,WAAa,CAChCC,KAAQ,6BAGTH,oBAAoBI,qBAAuB,SAAUC,GACpD,IAAIC,EAEAC,EADAC,EAAS,GAwBb,YArB2B,IAAfH,GAAsD,iBAAf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