{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/frontend/frontend.js","webpack:///./assets/js/frontend/components/labels.js","webpack:///./assets/js/frontend/components/autocomplete.js","webpack:///./assets/js/frontend/components/international.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Labels","init","Autocomplete","International","$","window","jQuery","document","ready","button","on","e","preventDefault","innerHTML","html","spinnerSVG","setTimeout","prop","addClass","attr","removeClass","parents","submit","google","componentForm","street_number","route","locality","administrative_area_level_1","country","postal_code","initAutocomplete","elements","options","types","componentRestrictions","autocomplete","_loop","parent","maps","places","setFields","addListener","place","getPlace","clearInputs","address_components","length","addressType","val","find","trigger","event","addDomListener","keyCode","component","elems","querySelectorAll","countrySelected","selectElement","target","labelEl","prev","stateEl","closest","cityEl","label","replace"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF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BXoD,EAAkB,SAAE/C,GACzB,IAAMgD,EAAgBhD,EAAEiD,OAClB3E,EAAQ0E,EAAc1E,MACtBqD,EAASlC,EAAGuD,GAAgBtC,QAAS,6BAEvCwC,EAAUvB,EAAOY,KAAM,gBAAiBY,KAAM,SAC9CC,EAAUzB,EAAOY,KAAM,gCAAiCc,QAAS,6BACjEC,EAAS3B,EAAOY,KAAM,aAAcc,QAAS,6BAC7CE,SAEC,kBAAoBjF,GACxBiF,EAAQL,EAAQ/C,OAAOqD,QAAS,YAAa,eAC7CJ,EAAQ7C,SAAU,gBAClB+C,EAAO/C,SAAU,sBAEjBgD,EAAQL,EAAQ/C,OAAOqD,QAAS,eAAgB,YAChDJ,EAAQ3C,YAAa,gBACrB6C,EAAO7C,YAAa,qBAGrByC,EAAQ/C,KAAMoD,eAGEjE,KAtCJ,WACZG,EAAGG,UAAWG,GAAI,oBAAqB,WACtC,IAAI8C,EAAQjD,SAASkD,iBAAkB,sCAElCD,GACJpD,EAAGoD,GAAQ9C,GAAI,SAAUgD","file":"frontend.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","import Labels from './components/labels';\nimport Autocomplete from './components/autocomplete';\nimport International from './components/international';\n\nLabels.init();\nAutocomplete.init();\nInternational.init();\n","const $ = window.jQuery;\n\nconst init = () => {\n\t$( document ).ready( function() {\n\t\tlet button = $( '.gform_button.button.spirit-button' );\n\n\t\tif ( button ) {\n\t\t\tbutton.on( 'click', updateSubmitButton );\n\t\t}\n\n\t\tfunction updateSubmitButton( e ) {\n\t\t\te.preventDefault();\n\n\t\t\tlet innerHTML = button.html();\n\t\t\tbutton.html( window.spinnerSVG );\n\n\t\t\t// setting slight delay so gravityforms still submits the form properly.\n\t\t\tsetTimeout( function() {\n\t\t\t\tbutton.prop( 'disabled', true );\n\t\t\t\tbutton.addClass( 'spirit-button--loading' );\n\t\t\t\tbutton.attr( 'data-loader', 'true' );\n\t\t\t}, 200 );\n\n\t\t\tsetTimeout( function() {\n\t\t\t\tbutton.prop( 'disabled', false );\n\t\t\t\tbutton.removeClass( 'spirit-button--loading' );\n\t\t\t\tbutton.attr( 'data-loader', '' );\n\t\t\t\tbutton.html( innerHTML );\n\t\t\t}, 6000 );\n\n\t\t\tsetTimeout( function() {\n\t\t\t\tbutton.parents( 'form' ).submit();\n\t\t\t}, 100 );\n\t\t}\n\t} );\n};\n\nexport default { init };\n","const $ = window.jQuery;\nconst google = window.google;\nconst componentForm = {\n\tstreet_number: 'short_name', // eslint-disable-line camelcase\n\troute: 'long_name',\n\tlocality: 'long_name',\n\tadministrative_area_level_1: 'long_name', // eslint-disable-line camelcase\n\tcountry: 'long_name',\n\tpostal_code: 'short_name' // eslint-disable-line camelcase\n};\n\n/**\n * Initialize functionality\n */\nconst init = () => {\n\t/*$('.bk-address-autocomplete input[type=text]').focus(function(){\n\t\t$(this).parent().addClass('address-autocomplete');\n\t\tlet elems = document.querySelectorAll( '.address-autocomplete input[type=text]' );\n\n\t\tif ( elems ) {\n\t\t\tinitAutocomplete( elems );\n\t\t}\n\t});*/\n\t$( document ).on( 'gform_post_render', function() {\n\t\tlet elems = document.querySelectorAll( '.address-autocomplete input[type=text]' );\n\n\t\tif ( elems ) {\n\t\t\tinitAutocomplete( elems );\n\t\t}\n\t} );\n};\n\n/**\n * Initialize any autocompletes.\n *\n * @param {NodeList} elements Address autocomplete elements\n */\nconst initAutocomplete = ( elements ) => {\n\tconst options = {\n\t\t//types: [ 'geocode' ],\n\t\ttypes: [ '(regions)' ],\n\t\tcomponentRestrictions: {country: 'us'}\n\t};\n\n\tlet autocomplete;\n\n\tfor ( let i = 0; i < elements.length; ++i ) {\n\t\tconst parent = $( elements[ i ] ).parents( '.ginput_container_address' );\n\t\tautocomplete = new google.maps.places.Autocomplete( elements[ i ], options );\n\n\t\tautocomplete.setFields( ['address_components'] );\n\n\t\tautocomplete.addListener( 'place_changed', function() {\n\t\t\tconst place = autocomplete.getPlace();\n\n\t\t\tclearInputs( parent );\n\n\t\t\tfor ( let i = 0; i < place.address_components.length; ++i ) {\n\t\t\t\tlet addressType = place.address_components[ i ].types[0];\n\n\t\t\t\tif ( componentForm[ addressType ] ) {\n\t\t\t\t\tlet val = place.address_components[ i ][ componentForm[ addressType ] ];\n\n\t\t\t\t\tif ( 'route' === addressType ) {\n\t\t\t\t\t\taddressType = 'street_number';\n\t\t\t\t\t\tval = `${parent.find( `.${addressType}` ).val()} ${val}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tparent.find( `.${addressType}` ).val( val ).trigger( 'change' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tgoogle.maps.event.addDomListener( elements[ i ], 'keydown', function( e ) {\n\t\t\tif ( 13 === e.keyCode && $( '.pac-container:visible' ).length ) {\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t} );\n\t}\n};\n\n/**\n * Clear form inputs.\n *\n * @param {jQuery} parent Address block\n */\nconst clearInputs = ( parent ) => {\n\tfor ( let component in componentForm ) {\n\t\tparent.find( `.${component}` ).val( '' );\n\t}\n};\n\nexport default { init };\n","const $ = window.jQuery;\n\n/**\n * Initialize functionality\n */\nconst init = () => {\n\t$( document ).on( 'gform_post_render', function() {\n\t\tlet elems = document.querySelectorAll( '.ginput_container_address .country' );\n\n\t\tif ( elems ) {\n\t\t\t$( elems ).on( 'change', countrySelected );\n\t\t}\n\t} );\n};\n\n/**\n * Listen for changes to the country field.\n *\n * @param {Event} e\n */\nconst countrySelected = ( e ) => {\n\tconst selectElement = e.target;\n\tconst value = selectElement.value;\n\tconst parent = $( selectElement ).parents( '.ginput_container_address' );\n\n\tlet labelEl = parent.find( '.postal_code' ).prev( 'label' );\n\tlet stateEl = parent.find( '.administrative_area_level_1' ).closest( '.spirit-form__field-group' );\n\tlet cityEl = parent.find( '.locality' ).closest( '.spirit-form__field-group' );\n\tlet label;\n\n\tif ( 'United States' !== value ) {\n\t\tlabel = labelEl.html().replace( /ZIP Code/g, 'Postal Code' );\n\t\tstateEl.addClass( 'hide-spinner' );\n\t\tcityEl.addClass( 'spirit-col-md-12' );\n\t} else {\n\t\tlabel = labelEl.html().replace( /Postal Code/g, 'ZIP Code' );\n\t\tstateEl.removeClass( 'hide-spinner' );\n\t\tcityEl.removeClass( 'spirit-col-md-12' );\n\t}\n\n\tlabelEl.html( label );\n};\n\nexport default { init };\n"],"sourceRoot":""}