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AKwC,MAAMuC,UAArB,CAIA,IAAMC,EAAaC,MAAMC,SAASnF,KAAKC,KAAKmF,eACtC,OACAC,EAAAA,EAA0CF,SAASnF,KAAKC,KAAKmF,cACnEpF,KAAKC,KAAKwC,MAAMuC,UACZC,GAA6B,SAAfA,EAAwB,GAAHK,OAAML,EAAU,MAAO,MAN9D,CAOJ,EAKA7F,KAAI,WAAG,IAAAmG,EACoB,QAAvBA,EAAAvF,KAAKW,0BAAkB,IAAA4E,GAAvBA,EAAyBC,iBACrB,SACAxF,KAAKyE,qBAAqBgB,KAAKzF,OAEnCA,KAAKC,KAAKuF,iBAAiB,SAAUxF,KAAK8E,qBAAqBW,KAAKzF,OACpEA,KAAKqE,2BACDrE,KAAK+D,yBAAyB/D,KAAKqE,4BACvCK,EAAAA,EAAAA,IAAmB1E,KAAKC,MACxBD,KAAK+E,kBACT,E","sources":["webpack:///./html/wp-content/themes/ls/src/js/main/components/forms/agnosticFormControllerInit.js","webpack:///./html/wp-content/themes/ls/src/js/main/components/forms/core/agnosticFormController.js"],"sourcesContent":["import AgnosticFormController from 'root/main/components/forms/core/agnosticFormController';\nimport { LoggingHandler } from 'root/utils/errorReporting/LoggingHandler';\n\nexport default function (els) {\n    if (els) {\n        try {\n            /* in case the form was loaded on a page ( not in a lightbox ) we want to make sure that multiple forms can exist on the same page\n             * If it was loaded on a page then the argument that has been passed to the dynamically loaded form, should be a NodeList\n             * */\n            if (els.length > 0 && els instanceof NodeList) {\n                Array.from(els).forEach(el => {\n                    const agnosticForm = new AgnosticFormController(el);\n                    agnosticForm.init();\n                });\n            } else {\n                /* if it is a single element and not a NodeList it means the form has be loaded in a lightbox\n                 * where we are passing only the form element as an argument to the dynamically loaded form\n                 * in the lightboxFormInit.js under the formLightboxCallback\n                 */\n                const agnosticForm = new AgnosticFormController(els);\n                agnosticForm.init();\n            }\n        } catch (e) {\n            LoggingHandler().logError(e, {\n                searchTerm: 'agnostic-form-load-init-error',\n                tags: ['forms'],\n                fileName: 'agnosticFormControllerInit.js',\n                additionalData: {\n                    url: window.location.href,\n                },\n            });\n        }\n    }\n}\n","import productMapping from 'root/global_configs/product_mapping';\nimport formConstants from 'root/global_configs/formConstants.json';\nimport { progressIndicator } from 'root/main/components/progressIndicator';\nimport { handleZipCodeField } from 'root/helpers/formHelpers';\n\nexport default function AgnosticFormController(el) {\n    this.form = el;\n\n    this.isHiddenField = fields => {\n        if (fields) {\n            return Array.from(fields).every(field => field.type === 'hidden');\n        } else {\n            return false;\n        }\n    };\n\n    this.contentIDHiddenFields =\n        this.isHiddenField(this.form.content_post_id) && this.form.content_post_id;\n    this.formID = this.isHiddenField(this.form.form_id) && this.form.form_id;\n    this.productSelectField = this.form.querySelector('select[name=product]');\n    this.agnosticBusinessTypeField = this.form.agnostic_business_type;\n    this.roleSelectField = this.form.role;\n    this.agnosticBusinessTypeFieldOptions = this.agnosticBusinessTypeField\n        ? this.agnosticBusinessTypeField.options\n        : [];\n}\n\nAgnosticFormController.prototype = {\n    /**\n     * Remove the hidden fields of name content_post_id (on submit) which don't match the selected product\n     */\n    removeNotMatchingContentIDHiddenField(productSelectedValue) {\n        Array.from(this.contentIDHiddenFields)\n            .filter(\n                field =>\n                    this.productSelectField &&\n                    productSelectedValue !== field.dataset.productName.toLowerCase()\n            )\n            .forEach(field => field.remove());\n    },\n    /**\n     * Store the hidden business type spans corresponding to the selected product in an array\n     * @param productSelectedValue\n     * @returns {unknown[]}\n     */\n    getMatchingBusinessTypeSpans(productSelectedValue) {\n        const spanEls = this.agnosticBusinessTypeField\n            ? this.agnosticBusinessTypeField.querySelectorAll('span')\n            : [];\n        return Array.from(spanEls).filter(\n            spanEl =>\n                spanEl.dataset.productName &&\n                spanEl.dataset.productName.toLowerCase() === productSelectedValue\n        );\n    },\n    /**\n     * Store the business type options which are not corresponding to the selected product in an array\n     * @param productSelectedValue\n     * @returns {unknown[]}\n     */\n    getNotMatchingBusinessTypeOptions(productSelectedValue) {\n        return (\n            this.agnosticBusinessTypeFieldOptions.length > 0 &&\n            Array.from(this.agnosticBusinessTypeFieldOptions).filter(\n                option =>\n                    option.dataset.productName &&\n                    option.dataset.productName.toLowerCase() !== productSelectedValue\n            )\n        );\n    },\n    /**\n     * Convert the option HTML tag to a span HTML tag in order to hide it\n     * and copy the value and data attribute from the option tag to the newly created span tag\n     * @param optionEl\n     */\n    convertOptionToSpanTag(optionEl) {\n        const spanEl = document.createElement('span');\n        spanEl.innerHTML = optionEl.innerHTML;\n        spanEl.setAttribute('value', optionEl.value);\n        spanEl.setAttribute('data-product-name', optionEl.dataset.productName);\n        spanEl.style.display = 'none';\n        optionEl.parentElement.replaceChild(spanEl, optionEl);\n    },\n    /**\n     * Convert the span HTML tag to an option HTML tag in order to show it\n     * and restore its value and data attribute\n     * @param spanEl\n     */\n    convertSpanToOptionTag(spanEl) {\n        const optionEl = document.createElement('option');\n        optionEl.innerHTML = spanEl.innerHTML;\n        optionEl.setAttribute('value', spanEl.getAttribute('value'));\n        optionEl.setAttribute('data-product-name', spanEl.dataset.productName);\n        spanEl.parentElement.replaceChild(optionEl, spanEl);\n        optionEl.style.display = 'inline-block';\n    },\n    /**\n     * Based on the selected product, show the options corresponding to this product,\n     * and hide the options which are not\n     * @param optionsToHide\n     * @param spansToShow\n     */\n    alternateDisplayingBusinessTypeOptions(optionsToHide = [], spansToShow = []) {\n        /**\n         * On Safari hiding the select field option will not work,\n         * as a workaround we're converting the option to a span HTML tag to hide it\n         * and converting the span HTML tag back to an option HTML tag to show it\n         */\n        Array.isArray(optionsToHide) &&\n            optionsToHide.length > 0 &&\n            optionsToHide.forEach(option => this.convertOptionToSpanTag(option));\n\n        Array.isArray(spansToShow) &&\n            spansToShow.length > 0 &&\n            spansToShow.forEach(spanEl => this.convertSpanToOptionTag(spanEl));\n    },\n    /* Show the role field when \"golf\" is selected */\n    showGolfRole() {\n        if (this.roleSelectField) {\n            this.roleSelectField.parentElement.style.display = 'block';\n            this.roleSelectField.options[0].value = '';\n            this.roleSelectField.options[0].text = '';\n            this.roleSelectField.options[0].selected = false;\n            if (this.roleSelectField.closest('[data-formfield=ls-form-field]'))\n                this.roleSelectField\n                    .closest('[data-formfield=ls-form-field]')\n                    .classList.remove('js-field-valid');\n        }\n    },\n    /* Hide the role select field when a product other than golf was selected */\n    // TODO: Refactor the default-role-field behaviour to toggle required on/off instead, then remove raiseLabel hack in formUI.js\n    hideGolfRole() {\n        if (this.roleSelectField) {\n            this.roleSelectField.parentElement.style.display = 'none';\n            this.roleSelectField.options[0].value = 'default-role-field';\n            this.roleSelectField.options[0].text = 'default-role-field';\n            this.roleSelectField.options[0].selected = true;\n            this.roleSelectField.parentElement.classList.remove('js-field-invalid');\n            this.roleSelectField.classList.remove('js-input-error');\n        }\n        this.resetBusinessTypeOnProductSelection();\n    },\n    /* revert changes when another product has been selected */\n    showAgnosticBusinessTypeField() {\n        if (this.agnosticBusinessTypeField) {\n            this.agnosticBusinessTypeField.parentElement.style.display = 'block';\n            if (this.agnosticBusinessTypeField.closest('[data-formfield=ls-form-field]'))\n                this.agnosticBusinessTypeField\n                    .closest('[data-formfield=ls-form-field]')\n                    .classList.remove('js-field-valid');\n        }\n    },\n    hideAgnosticBusinessTypeField() {\n        if (this.agnosticBusinessTypeFieldOptions.length > 0) {\n            this.agnosticBusinessTypeField.parentElement.style.display = 'none';\n            /* change the first option form having an empty space as a value to golf as a value */\n            this.agnosticBusinessTypeFieldOptions[0].value = 'golf';\n            /* This is important to make the form submit correctly on iOS devices */\n            this.agnosticBusinessTypeFieldOptions[0].text = 'golf';\n            /* set the product data attribute to be converted to span and gets hidden when another product is selected */\n            this.agnosticBusinessTypeFieldOptions[0].setAttribute(\n                'data-product-name',\n                'golf'\n            );\n            /* force select the first option which will make the field valid */\n            this.agnosticBusinessTypeFieldOptions[0].selected = true;\n        }\n    },\n    /**\n     * When golf is selected the business type field should be hidden\n     * set the first option of the business type field to 'golf' and force select\n     * this will make the field valid, and the form can be submitted as the submit button will be enabled\n     * @param productSelectedValue\n     */\n    showCorrectSelectElement(productSelectedValue) {\n        if (productSelectedValue === 'empty') {\n            this.hideAgnosticBusinessTypeField();\n            this.hideGolfRole();\n        } else if (productSelectedValue === 'golf') {\n            this.hideAgnosticBusinessTypeField();\n            this.showGolfRole();\n        } else {\n            this.showAgnosticBusinessTypeField();\n            this.hideGolfRole();\n        }\n    },\n    /**\n     * reset the business type everytime a new product is selected\n     */\n    resetBusinessTypeOnProductSelection() {\n        /**\n         *  in case another product has been selected after golf was previously selected,\n         *  we want to make sure to have an empty option selected\n         */\n        if (this.agnosticBusinessTypeFieldOptions.length > 0) {\n            if (this.agnosticBusinessTypeFieldOptions[0].text !== '') {\n                const emptyOptionEl = document.createElement('option');\n                if (this.agnosticBusinessTypeField)\n                    this.agnosticBusinessTypeField.add(emptyOptionEl, '');\n                Array.from(this.agnosticBusinessTypeFieldOptions).forEach(option => {\n                    if (option.text === '') {\n                        option.selected = true;\n                    }\n                });\n            } else {\n                /* reset the business types field to have an empty option selected */\n                this.agnosticBusinessTypeFieldOptions[0].value = '';\n                this.agnosticBusinessTypeFieldOptions[0].text = '';\n                this.agnosticBusinessTypeFieldOptions[0].selected = true;\n            }\n        }\n    },\n    /**\n     * Remove agnostic_ from business_type hidden field in order to be received correctly by external service\n     */\n    restoreBusinessTypeName() {\n        if (this.agnosticBusinessTypeField) {\n            this.agnosticBusinessTypeField.name =\n                this.agnosticBusinessTypeField.name.replace(/agnostic_/g, '');\n        }\n    },\n    /**\n     * Return the selected product\n     */\n    getProductSelectedValue() {\n        if (this.productSelectField?.value) {\n            return productMapping[this.productSelectField.value] ?? '';\n        } else {\n            return 'empty';\n        }\n    },\n    /**\n     * Aggregate the functionality that will be executed when the product is selected (on change event)\n     */\n    eventHandlerOnChange() {\n        const productSelectedValue = this.getProductSelectedValue();\n        if (productSelectedValue) {\n            this.showCorrectSelectElement(productSelectedValue);\n            this.alternateDisplayingBusinessTypeOptions(\n                this.getNotMatchingBusinessTypeOptions(productSelectedValue),\n                this.getMatchingBusinessTypeSpans(productSelectedValue)\n            );\n            handleZipCodeField(this.form, productSelectedValue);\n        }\n        const timelineContainer = this.form.querySelector(\n            '[data-leadform-step=progress-indicator]'\n        );\n        if (timelineContainer)\n            progressIndicator(timelineContainer, 0).syncProgressIndicatorToStep();\n    },\n    /**\n     * Aggregate the functionality that will be executed when the form is submitted (on submit event)\n     */\n    eventHandlerOnSubmit() {\n        const productSelectedValue = this.getProductSelectedValue();\n        productSelectedValue &&\n            this.removeNotMatchingContentIDHiddenField(productSelectedValue);\n        this.restoreBusinessTypeName();\n    },\n    /**\n     * Catch to make sure that the minHeight of the form always reflects the form elements visible on page load, in case agnosticFormController.js runs after formUI.js and has hidden some elements\n     */\n    updateFormHeight() {\n        if (!this.form.style.minHeight) {\n            return;\n        }\n\n        const formHeight = isNaN(parseInt(this.form.clientHeight))\n            ? 'auto'\n            : formConstants.errorMessageDefaultHeight + parseInt(this.form.clientHeight);\n        this.form.style.minHeight =\n            formHeight && formHeight !== 'auto' ? `${formHeight}px` : 'auto';\n    },\n    /**\n     * the init function is invoked in the lightboxFormInit in case the form has been loaded in a lightbox\n     * and on DOMContentLoaded in case the form has been loaded on a page\n     */\n    init() {\n        this.productSelectField?.addEventListener(\n            'change',\n            this.eventHandlerOnChange.bind(this)\n        );\n        this.form.addEventListener('submit', this.eventHandlerOnSubmit.bind(this));\n        this.getProductSelectedValue() &&\n            this.showCorrectSelectElement(this.getProductSelectedValue());\n        handleZipCodeField(this.form);\n        this.updateFormHeight();\n    },\n};\n"],"names":["els","length","NodeList","Array","from","forEach","el","AgnosticFormController","init","e","LoggingHandler","logError","searchTerm","tags","fileName","additionalData","url","window","location","href","this","form","isHiddenField","fields","every","field","type","contentIDHiddenFields","content_post_id","formID","form_id","productSelectField","querySelector","agnosticBusinessTypeField","agnostic_business_type","roleSelectField","role","agnosticBusinessTypeFieldOptions","options","prototype","removeNotMatchingContentIDHiddenField","productSelectedValue","_this","filter","dataset","productName","toLowerCase","remove","getMatchingBusinessTypeSpans","spanEls","querySelectorAll","spanEl","getNotMatchingBusinessTypeOptions","option","convertOptionToSpanTag","optionEl","document","createElement","innerHTML","setAttribute","value","style","display","parentElement","replaceChild","convertSpanToOptionTag","getAttribute","alternateDisplayingBusinessTypeOptions","_this2","optionsToHide","arguments","undefined","spansToShow","isArray","showGolfRole","text","selected","closest","classList","hideGolfRole","resetBusinessTypeOnProductSelection","showAgnosticBusinessTypeField","hideAgnosticBusinessTypeField","showCorrectSelectElement","emptyOptionEl","add","restoreBusinessTypeName","name","replace","getProductSelectedValue","_this$productSelectFi","_productMapping$this$","productMapping","eventHandlerOnChange","handleZipCodeField","timelineContainer","progressIndicator","syncProgressIndicatorToStep","eventHandlerOnSubmit","updateFormHeight","minHeight","formHeight","isNaN","parseInt","clientHeight","formConstants","concat","_this$productSelectFi2","addEventListener","bind"],"sourceRoot":""}