PageSourceSearch

https://sustainable-generation.com/wp-content/cache/min/1/wp-conte…/gp-address-autocomplete.js?ver=1790896438

js sustainable-generation.com collected 2026-10-06 16:43:38 UTC 29,119 bytes, 1 lines download raw bytes

vendor: 2,686 bytes, line 1
1(()=>{var e={705:(e,t,n)=>{var o=n(639).Symbol;e.exports=o},932:e=>{e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length,i=Array(o);++n<o;)i[n]=t(e[n],n,e);return i}},239:(e,t,n)=>{var o=n(705),i=n(607),r=n(333),s=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):r(e)}},674:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},531:(e,t,n)=>{var o=n(705),i=n(932),r=n(469),s=n(448),a=o?o.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(r(t))return i(t,e)+"";if(s(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},389:(e,t,n)=>{var o=n(674)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=o},957:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},607:(e,t,n)=>{var o=n(705),i=Object.prototype,r=i.hasOwnProperty,s=i.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=r.call(e,a),n=e[a];try{e[a]=void 0;var o=!0}catch(e){}var i=s.call(e);return o&&(t?e[a]=n:delete e[a]),i}},333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:(e,t,n)=>{var o=n(957),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();e.exports=r},816:(e,t,n)=>{var o=n(389),i=n(833),r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
17f]/g,s=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=i(e))&&e.replace(r,o).replace(s,"")}},469:e=>{var t=Array.isArray;e.exports=t},5:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},448:(e,t,n)=>{var o=n(239),i=n(5);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==o(e)}},833:(e,t,n)=>{var o=n(531);e.exports=function(e){return null==e?"":o(e)}},274:function(e,t){var n,o;void 0===(o="function"==typeof(n=function(){var e=/(auto|scroll)/,t=function(e,n){return null===e.parentNode?n:t(e.parentNode,n.concat([e]))},n=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},o=function(t){return e.test(function(e){return n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")}(t))};return function(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var n=t(e.parentNode,[]),i=0;i<n.length;i+=1)if(o(n[i]))return n[i];return document.scrollingElement||document.documentElement}}})?n.apply(t,[]):n)||(e.exports=o)}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(816),t=n.n(e);var o=setTimeout;function i(e){return Boolean(e&&void 0!==e.length)}function r(){}function s(e){if(!(this instanceof s))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function a(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,s._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void u(t.promise,e)}c(t.promise,o)}else(1===e._state?c:u)(t.promise,e._value)}))):e._deferreds.push(t)}function c(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof s)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void p((o=n,i=t,function(){o.apply(i,arguments)}),e)}e._state=1,e._value=t,l(e)}catch(t){u(e,t)}var o,i}function u(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&s._immediateFn((function(){e._handled||s._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)a(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e((function(e){n||(n=!0,c(t,e))}),(function(e){n||(n=!0,u(t,e))}))}catch(e){if(n)return;n=!0,u(t,e)}}s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){var n=new this.constructor(r);return a(this,new d(e,t,n)),n},s.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))},s.all=function(e){return new s((function(t,n){if(!i(e))return n(new TypeError("Promise.all accepts an array"));var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var r=o.length;function s(e,i){try{if(i&&("object"==typeof i||"function"==typeof i)){var a=i.then;if("function"==typeof a)return void a.call(i,(function(t){s(e,t)}),n)}o[e]=i,0==--r&&t(o)}catch(e){n(e)}}for(var a=0;a<o.length;a++)s(a,o[a])}))},s.allSettled=function(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);var i=o.length;function r(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var s=n.then;if("function"==typeof s)return void s.call(n,(function(t){r(e,t)}),(function(n){o[e]={status:"rejected",reason:n},0==--i&&t(o)}))}o[e]={status:"fulfilled",value:n},0==--i&&t(o)}for(var s=0;s<o.length;s++)r(s,o[s])}))},s.resolve=function(e){return e&&"object"==typeof e&&e.constructor===s?e:new s((function(t){t(e)}))},s.reject=function(e){return new s((function(t,n){n(e)}))},s.race=function(e){return new s((function(t,n){if(!i(e))return n(new TypeError("Promise.race accepts an array"));for(var o=0,r=e.length;o<r;o++)s.resolve(e[o]).then(t,n)}))},s._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){o(e,0)},s._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};const f=s;var g=n(274),v=n.n(g),h=function(e,t,n,o){return new(n||(n=f))((function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function a(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))},m=function(e,t){var n,o,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;
1function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(i=2&a[0]?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],o=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},y=window.jQuery,w={address:["establishment","point_of_interest","premise","street_address","subpremise"],geocode:[],establishment:["establishment"],regions:["(regions)"],"(regions)":["(regions)"],cities:["(cities)"],"(cities)":["(cities)"]};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,o=new Array(n);n--;)o[n]=[t[n],e[t[n]]];return o}
1),window.gpaaInit=function(){if(!window.gpaaReady){var e=new CustomEvent("gpaa_api_ready");document.dispatchEvent(e),window.gpaaReady=!0}},document.addEventListener("gpaa_api_ready",(function(){console.debug("GP Address Autocomplete: Google Maps API ready.")}));var b=function(){function e(n){var o,i,r,s=this;this.suggestions=[],this.activeSuggestionIndex=-1,this.suggestionsAbortListeners=[],this.suggestionsRequestId=0,this.coordinatesListenerBound=!1,this.initAutocomplete=function(){return h(s,void 0,f,(function(){var t,n,o;return m(this,(function(i){switch(i.label){case 0:return[4,e.getPlacesAPIAvailability()];case 1:return"available"===i.sent()?(this.initPlacesApi(),[2]):"function"!=typeof(null===(o=null===(n=null===(t=null===window||void 0===window?void 0:window.google)||void 0===t?void 0:t.maps)||void 0===n?void 0:n.places)||void 0===o?void 0:o.Autocomplete)?(console.error("GP Address Autocomplete: The Google Maps Places library is not available. Check that your API key is valid and that the Maps JavaScript API is enabled for your Google Cloud project."),[2]):(this.initPac(),[2])}}))}))},this.initPac=function(){var e;null===(e=s.pacContainer)||void 0===e||e.remove(),s.inputs=s.getInputEls(s.inputSelectors),s.autocomplete&&google.maps.event.clearInstanceListeners(s.autocomplete),s.autocompleteListener&&google.maps.event.removeListener(s.autocompleteListener),s.inputs.autocomplete.readOnly||(s.waitForPacContainer().then((function(e){var t;s.pacContainer=e,null===(t=s.pacContainer)||void 0===t||t.classList.add("pac-container-gpaa","gform-theme__no-reset--el","gform-theme__no-reset--children"),window.gform.applyFilters("gpaa_use_fixed_positioner",!0,s,s.formId,s.fieldId)&&s.addFixedPositioner(),s.preventBrowserAutocomplete()})).catch((function(e){console.error("Unable to initialize GP Address Autocomplete.",e)})),s.autocomplete=new google.maps.places.Autocomplete(s.inputs.autocomplete,s.autocompleteOptions),s.inputs.autocomplete.addEventListener("keydown",(function(e){var t=!1;document.querySelectorAll(".pac-container").forEach((function(e){"none"!==window.getComputedStyle(e).display&&(t=!0)})),"Enter"!==e.code&&13!==e.keyCode||!t||e.preventDefault()})),s.autocompleteListener=s.autocomplete.addListener("place_changed",(function(){return s.fillFields()})),s.bindCoordinatesListener())},this.bindCoordinatesListener=function(){s.coordinatesListenerBound||(s.coordinatesListenerBound=!0,window.gform.addAction("gpaa_fields_filled",(function(e,t){t===s&&s.fillCoordinatesMetaInput(e)})))},this.initPlacesApi=function(){s.teardownSuggestions(),s.inputs=s.getInputEls(s.inputSelectors),s.inputs.autocomplete&&(s.inputs.autocomplete.readOnly||(s.applyLegacyInputMarkers(),s.sessionToken=new google.maps.places.AutocompleteSessionToken,s.pacContainer=s.createSuggestionsContainer(),s.addSuggestionsPositioner(),s.preventBrowserAutocomplete(),s.bindSuggestionsListeners(),s.bindCoordinatesListener()))},this.applyLegacyInputMarkers=function(){s.inputs.autocomplete.classList.add("pac-target-input"),s.inputs.autocomplete.getAttribute("placeholder")||s.inputs.autocomplete.setAttribute("placeholder",window.GP_ADDRESS_AUTOCOMPLETE_CONSTANTS.placeholder)},this.teardownSuggestions=function(){var e,t;s.suggestionsAbortListeners.forEach((function(e){return e()})),s.suggestionsAbortListeners=[],s.suggestionsDebounce&&clearTimeout(s.suggestionsDebounce),null===(e=s.pacContainerStyleObserver)||void 0===e||e.disconnect(),null===(t=s.pacContainer)||void 0===t||t.remove(),s.pacContainer=void 0,s.suggestions=[],s.activeSuggestionIndex=-1},this.createSuggestionsContainer=function(){var e=document.createElement("div");return e.className=["pac-container","pac-container-gpaa","gpaa-pac-container","gform-theme__no-reset--el","gform-theme__no-reset--children"].join(" "),e.setAttribute("role","listbox"),e.style.display="none",e},this.bindSuggestionsListeners=function(){var e=s.inputs.autocomplete,t=function(e,t,n,o){e.addEventListener(t,n,o),s.suggestionsAbortListeners.push((function(){return e.removeEventListener(t,n,o)}))};t(e,"input",(function(){s.queueFetchSuggestions(e.value)})),t(e,"keydown",(function(e){s.handleSuggestionsKeydown(e)})),t(e,"blur",(function(){setTimeout((function(){return s.hideSuggestions()}),150)})),t(document,"mousedown",(function(t){var n,o=t.target;o===e||(null===(n=s.pacContainer)||void 0===n?void 0:n.contains(o))||s.hideSuggestions()}))},this.handleSuggestionsKeydown=function(e){if(s.suggestions.length&&s.isSuggestionsVisible())switch(e.key){case"ArrowDown":e.preventDefault(),s.setActiveSuggestion((s.activeSuggestionIndex+1)%s.suggestions.length);break;case"ArrowUp":e.preventDefault(),s.setActiveSuggestion(s.activeSuggestionIndex<=0?s.suggestions.length-1:s.activeSuggestionIndex-1);break;case"Enter":e.preventDefault(),s.activeSuggestionIndex>-1&&s.selectSuggestion(s.activeSuggestionIndex);break;case"Escape":s.hideSuggestions();break;case"Tab":s.activeSuggestionIndex>-1&&s.selectSuggestion(s.activeSuggestionIndex)}},this.isSuggestionsVisible=function(){return!!s.pacContainer&&"none"!==s.pacContainer.style.display},this.queueFetchSuggestions=function(e){s.suggestionsDebounce&&clearTimeout(s.suggestionsDebounce),e.trim().length<3?s.hideSuggestions():s.suggestionsDebounce=setTimeout((function(){return s.fetchSuggestions(e)}),200)},this.fetchSuggestions=function(e){return h(s,void 0,f,(function(){var t,n,o,i;return m(this,(function(r){switch(r.label){case 0:t=++this.suggestionsRequestId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(this.getAutocompleteRequest(e))];case 2:return n=r.sent(),[3,4];case 3:return o=r.sent(),console.error("GP Address Autocomplete: Unable to fetch suggestions.",o),[2];case 4:return t!==this.suggestionsRequestId||(this.suggestions=(null!==(i=null==n?void 0:n.suggestions)&&void 0!==i?i:[]).filter((function(e){return e.placePrediction})),this.renderSuggestions()),[2]}}))}))},this.renderSuggestions=function(){s.pacContainer&&(s.pacContainer.innerHTML="",s.activeSuggestionIndex=-1,s.suggestions.length?(s.suggestions.forEach((function(e,t){var n,o,i,r,a,c=e.placePrediction,u=document.createElement("div");u.className="pac-item gpaa-pac-item",u.setAttribute("role","option");var l=document.createElement("span");if(l.className="pac-item-query gpaa-pac-item-query",l.textContent=null!==(r=null!==(o=null===(n=c.mainText)||void 0===n?void 0:n.text)&&void 0!==o?o:null===(i=c.text)||void 0===i?void 0:i.text)&&void 0!==r?r:"",u.appendChild(l),null===(a=c.secondaryText)||void 0===a?void 0:a.text){var d=document.createElement("span");d.className="gpaa-pac-item-secondary",d.textContent=c.secondaryText.text,u.appendChild(d)}u.addEventListener("mousedown",(function(e){e.preventDefault(),s.selectSuggestion(t)})),u.addEventListener("mouseenter",(function(){return s.setActiveSuggestion(t)})),s.pacContainer.appendChild(u)})),s.pacContainer.style.display="",s.positionPacContainer()):s.hideSuggestions())},this.setActiveSuggestion=function(e){var t,n=null===(t=s.pacContainer)||void 0===t?void 0:t.querySelectorAll(".pac-item");
1if(null==n?void 0:n.length){n.forEach((function(e){e.classList.remove("pac-item-selected","gpaa-pac-item-selected"),e.setAttribute("aria-selected","false")})),s.activeSuggestionIndex=e;var o=n[e];o&&(o.classList.add("pac-item-selected","gpaa-pac-item-selected"),o.setAttribute("aria-selected","true"))}},this.hideSuggestions=function(){s.pacContainer&&(s.pacContainer.style.display="none"),s.activeSuggestionIndex=-1},this.selectSuggestion=function(e){return h(s,void 0,f,(function(){var t,n,o,i;return m(this,(function(r){switch(r.label){case 0:if(!(t=null===(i=this.suggestions[e])||void 0===i?void 0:i.placePrediction))return[2];this.hideSuggestions(),n=t.toPlace(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n.fetchFields({fields:["addressComponents","formattedAddress","location","adrFormatAddress"]})];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),console.error("GP Address Autocomplete: Unable to fetch place details.",o),[2];case 4:return this.sessionToken=new google.maps.places.AutocompleteSessionToken,this.fillFields(this.normalizePlace(n)),[2]}}))}))},this.addSuggestionsPositioner=function(){if(s.pacContainer){var e=v()(s.inputs.autocomplete);y(s.inputs.autocomplete).closest(".tingle-modal").length&&(e=y(s.inputs.autocomplete).closest(".tingle-modal")[0]),e.appendChild(s.pacContainer);var t=function(){s.isSuggestionsVisible()&&s.positionPacContainer()};e.addEventListener("scroll",t),document.addEventListener("scroll",t),window.addEventListener("resize",t),s.suggestionsAbortListeners.push((function(){e.removeEventListener("scroll",t),document.removeEventListener("scroll",t),window.removeEventListener("resize",t)}));var n=new ResizeObserver(t);n.observe(e),s.suggestionsAbortListeners.push((function(){return n.disconnect()}))}},this.waitForPacContainer=function(){var e;return new f((function(t,n){e=setInterval((function(){s.pacContainer=s.getAutocompletePacContainer(),s.pacContainer&&(clearInterval(e),t(s.pacContainer))}),25),setTimeout((function(){clearInterval(e),n("GP Address Autocomplete: Could not find the pac-container.")}),5e3)}))},this.addFixedPositioner=function(){var e=v()(s.inputs.autocomplete);y(s.inputs.autocomplete).closest(".tingle-modal").length&&(e=y(s.inputs.autocomplete).closest(".tingle-modal")[0]),y(s.pacContainer).appendTo(e),s.pacContainerStyleObserver&&s.pacContainerStyleObserver.disconnect();var t=!1;s.pacContainerStyleObserver=new MutationObserver((function(){t||requestAnimationFrame((function(){s.positionPacContainer()}))})),e.addEventListener("scroll",(function(){t=!0,s.positionPacContainer(),t=!1})),document.addEventListener("scroll",(function(){t=!0,s.positionPacContainer(),t=!1})),s.pacContainerStyleObserver.observe(s.pacContainer,{attributes:!0,attributeFilter:["style"]}),new ResizeObserver((function(){return s.positionPacContainer()})).observe(e)},this.getVisualViewportOffset=function(){var e;return"undefined"!=typeof CSS&&(null===(e=CSS.supports)||void 0===e?void 0:e.call(CSS,"-webkit-backdrop-filter","none"))&&window.visualViewport?{x:window.visualViewport.offsetLeft,y:window.visualViewport.offsetTop}:{x:0,y:0}},this.positionPacContainer=function(){var e,t,n,o;if(s.pacContainer){var i=s.inputs.autocomplete.getBoundingClientRect();(null===(e=s.pacContainer)||void 0===e?void 0:e.classList.contains("pac-container-gpaa-position-managed"))||null===(t=s.pacContainer)||void 0===t||t.classList.add("pac-container-gpaa-position-managed"),null===(n=s.pacContainerStyleObserver)||void 0===n||n.disconnect();var r=s.getVisualViewportOffset();s.pacContainer.style.top=i.y+i.height+r.y+"px",s.pacContainer.style.left=i.x+r.x+"px",s.pacContainer.classList.contains("gpaa-pac-container")&&(s.pacContainer.style.width=i.width+"px"),null===(o=s.pacContainerStyleObserver)||void 0===o||o.observe(s.pacContainer,{attributes:!0,attributeFilter:["style"]})}},this.fillFields=function(e){var n,o,i,r,a,c,u,l,d,p,f=null!=e?e:null===(n=s.autocomplete)||void 0===n?void 0:n.getPlace();if(f){for(var g,v=s.parseAdrAddressHTML(null!==(o=f.adr_address)&&void 0!==o?o:""),h={address1:v["street-address"],address2:v["extended-address"],postcode:v["postal-code"],city:v.locality,stateProvince:v.region,country:"",autocomplete:void 0},m=0,y=f.address_components;m<y.length;m++)"country"===(A=y[m]).types[0]&&(g=A.short_name);for(var w=0,b=f.address_components;w<b.length;w++){var A,_=(A=b[w]).types.filter((function(e){return"political"!==e}))[0];switch(_){case"locality":h.city||(h.city=A.long_name);break;case"administrative_area_level_2":case"administrative_area_level_1":A.short_name===h.stateProvince?(h.stateProvince=A.long_name,"select"===(null===(i=s.inputs.stateProvince)||void 0===i?void 0:i.tagName.toLowerCase())&&(s.inputs.stateProvince.querySelector('option[value="'.concat(h.stateProvince,'"]'))||(h.stateProvince=t()(h.stateProvince)))):("administrative_area_level_1"===_&&!h.stateProvince&&g&&-1!==["NL","NZ","FR"].indexOf(g)||"administrative_area_level_2"===_&&!h.stateProvince&&g&&-1!==["GB"].indexOf(g))&&(h.stateProvince=A.long_name);break;case"country":var S=window.GP_ADDRESS_AUTOCOMPLETE_CONSTANTS.countries,C=A.short_name,P=A.long_name,I=null==S?void 0:S[A.short_name],x=s.inputs.country;x instanceof HTMLSelectElement&&(x.querySelector('option[value="'.concat(C,'"]'))?h.country=C:x.querySelector('option[value="'.concat(P,'"]'))?h.country=P:
1x.querySelector('option[value="'.concat(I,'"]'))&&(h.country=I)),h.country||(h.country=I)}}h=window.gform.applyFilters("gpaa_values",h,f,s,s.formId,s.fieldId);for(var E=0,L=["stateProvince","country"];E<L.length;E++){var T=L[E],O=s.inputs[T];O instanceof HTMLInputElement&&"hidden"===O.type&&(h[T]=O.value)}s.inputs.autocomplete&&(s.inputs.autocomplete.value=null!==(r=h.autocomplete)&&void 0!==r?r:"",s.triggerChange(s.inputs.autocomplete)),s.inputs.address1&&(s.inputs.address1.value=null!==(a=h.address1)&&void 0!==a?a:"",s.triggerChange(s.inputs.address1)),s.inputs.address2&&(s.inputs.address2.value=null!==(c=h.address2)&&void 0!==c?c:"",s.triggerChange(s.inputs.address2)),s.inputs.city&&(s.inputs.city.value=null!==(u=h.city)&&void 0!==u?u:"",s.triggerChange(s.inputs.city)),s.inputs.stateProvince&&(s.inputs.stateProvince.value=null!==(l=h.stateProvince)&&void 0!==l?l:"",s.triggerChange(s.inputs.stateProvince)),s.inputs.postalCode&&(s.inputs.postalCode.value=null!==(d=h.postcode)&&void 0!==d?d:"",s.triggerChange(s.inputs.postalCode)),s.inputs.country&&(s.inputs.country.value=null!==(p=h.country)&&void 0!==p?p:"",s.triggerChange(s.inputs.country)),window.gform.doAction("gpaa_fields_filled",f,s,s.formId,s.fieldId)}else console.warn("GP Address Autocomplete: Google API not ready.")},this.formId=n.formId,this.fieldId=n.fieldId,this.inputSelectors=n.inputSelectors,this.inputs=this.getInputEls(this.inputSelectors),this.addressType=n.addressType,this.inputs.autocomplete?(o=function(){s.init()},window.gpaaReady?o():(document.addEventListener("gpaa_api_ready",o),(null===(r=null===(i=null===window||void 0===window?void 0:window.google)||void 0===i?void 0:i.maps)||void 0===r?void 0:r.places)&&(console.debug("GP Address Autocomplete: Google Maps API already loaded."),window.gpaaInit()))):setTimeout((function(){return s.init()}),1e3)}return e.prototype.getAutocompletePacContainer=function(){var e,t;if(!this.autocomplete)return null;var n=null===(t=null===(e=this.autocomplete)||void 0===e?void 0:e.gm_accessors_)||void 0===t?void 0:t.place;if(!n)return null;var o=Object.keys(n).find((function(e){return"object"==typeof n[e]&&n[e].hasOwnProperty("gm_accessors_")})),i=n[o].gm_accessors_.input[o],r=Object.keys(i).find((function(e){return i[e].classList&&i[e].classList.contains("pac-container")}));return i[r]},e.prototype.init=function(){return h(this,void 0,void 0,(function(){return m(this,(function(t){switch(t.label){case 0:return this.inputs.autocomplete||(this.inputs=this.getInputEls(this.inputSelectors),this.inputs.autocomplete)?void 0===e.instances["".concat(this.formId,"-").concat(this.fieldId)]?[3,2]:[4,e.instances["".concat(this.formId,"-").concat(this.fieldId)].initAutocomplete()]:(console.debug("GP Address Autocomplete: No input found yet. It could be due to it being in a modal that has yet to initialize."),[2]);case 1:return t.sent(),[2];case 2:return e.instances["".concat(this.formId,"-").concat(this.fieldId)]=this,[4,this.initAutocomplete()];case 3:return t.sent(),this.bindGPPAListener(),window.gform.doAction("gpaa_init",this,this.formId,this.fieldId),[2]}}))}))},e.prototype.preventBrowserAutocomplete=function(){if(window.gform.applyFilters("gpaa_prevent_browser_autocomplete",!0,this,this.formId,this.fieldId))for(var e=0,t=Object.entries(this.inputs);e<t.length;e++){var n=t[e],o=n[0],i=n[1],r="new-password";r=window.gform.applyFilters("gpaa_field_autocomplete_value",r,i,o,this,this.formId,this.fieldId),null==i||i.setAttribute("autocomplete",r)}else this.inputs.autocomplete.removeAttribute("autocomplete")},e.prototype.bindGPPAListener=function(){var e=this;y(document).on("gppa_updated_batch_fields",(function(t,n,o){parseInt(n)===e.formId&&-1!==(o=o.map((function(e){return parseInt(e)}))).indexOf(e.fieldId)&&e.init()}))},e.prototype.getInputEls=function(e){for(var t={},n=0,o=Object.entries(e);n<o.length;n++){var i=o[n],r=i[0],s=i[1];t[r]=document.querySelector(s)}return t},Object.defineProperty(e.prototype,"autocompleteOptions",{get:function(){var e=window.GP_ADDRESS_AUTOCOMPLETE_CONSTANTS.allowed_countries,t={componentRestrictions:void 0,fields:["address_components","formatted_address","geometry","adr_address"],types:["address"]};return"us"===this.addressType?t.componentRestrictions={country:["us"]}:"canadian"===this.addressType?t.componentRestrictions={country:["ca"]}:(null==e?void 0:e.length)&&(t.componentRestrictions={country:e}),window.gform.applyFilters("gpaa_autocomplete_options",t,this,this.formId,this.fieldId)}
1,enumerable:!1,configurable:!0}),e.getPlacesAPIAvailability=function(){return h(this,void 0,f,(function(){var t;return m(this,(function(n){switch(n.label){case 0:if("unknown"!==e.placesApiNewAvailability)return[2,e.placesApiNewAvailability];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:"test",sessionToken:new google.maps.places.AutocompleteSessionToken})];case 2:return n.sent(),e.placesApiNewAvailability="available",[3,4];case 3:return t=n.sent(),e.placesApiNewAvailability="unavailable",console.warn('GP Address Autocomplete: The Places API (New) is unavailable for this API key, falling back to the legacy Places Autocomplete. If addresses do not autocomplete, enable the "Places API (New)" for your Google Cloud project.',t),[3,4];case 4:return[2,e.placesApiNewAvailability]}}))}))},e.prototype.getAutocompleteRequest=function(e){var t,n,o=this.autocompleteOptions,i=null===(t=o.componentRestrictions)||void 0===t?void 0:t.country,r={input:e,sessionToken:this.sessionToken};if(i&&(r.includedRegionCodes=(Array.isArray(i)?i:[i]).slice(0,15)),null===(n=o.types)||void 0===n?void 0:n.length){var s=[];o.types.forEach((function(e){var t;(null!==(t=w[e])&&void 0!==t?t:[e]).forEach((function(e){-1===s.indexOf(e)&&s.push(e)}))})),s.length&&(r.includedPrimaryTypes=s.slice(0,5))}return r},e.prototype.normalizePlace=function(e){var t,n,o,i,r={place_id:null!==(t=e.id)&&void 0!==t?t:void 0,adr_address:null!==(n=e.adrFormatAddress)&&void 0!==n?n:"",formatted_address:null!==(o=e.formattedAddress)&&void 0!==o?o:void 0,address_components:(null!==(i=e.addressComponents)&&void 0!==i?i:[]).map((function(e){var t,n;return{long_name:null!==(t=e.longText)&&void 0!==t?t:"",short_name:null!==(n=e.shortText)&&void 0!==n?n:"",types:e.types}}))};return e.location&&(r.geometry={location:e.location}),r},e.prototype.fillCoordinatesMetaInput=function(e){var t=document.querySelector("#gform_".concat(this.formId)),n=null==t?void 0:t.querySelector('input[name="gpaa_place_'.concat(this.fieldId,'"]'));n&&(n.value=e?JSON.stringify(e):"")},e.prototype.triggerChange=function(e){e.dispatchEvent(new Event("change")),y(e).trigger("change")},e.prototype.parseAdrAddressHTML=function(e){for(var t,n={},o=/<(?:span|div) class="(post-office-box|extended-address|street-address|locality|region|postal-code|country-name)">(.*?)<\/(?:span|div)>/gm;null!==(t=o.exec(e));)t.index===o.lastIndex&&o.lastIndex++,n[t[1]]=this.decodeHTMLEntities(t[2]);return n},e.prototype.decodeHTMLEntities=function(e){var t=document.createElement("textarea");t.innerHTML=e;var n=t.value;return t.remove(),n},e.placesApiNewAvailability="unknown",e.instances={},e}();window.GP_Address_Autocomplete=b})()})()

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.