PageSourceSearch

https://cityofponchatoula.com/_/js/c/55a42fea8b0896d8b4a3a7ddda5e16d5ee1ead62.js?_n=m6a0c86c8972f78.63299530

js cityofponchatoula.com collected 2026-10-05 11:39:47 UTC 69,803 bytes, 1,114 lines download raw bytes

1
2/* cached asset-dump98e6a8b281a9cba7430393cd9c2d0c670ee2c0fd: */
3var forge = forge || {};
4forge.blockCallback = function(block, action, callbackFunc) {
5    var obj = {
6        id: block.id,
7        action: action,
8        uri: block.callbackUri + "/" + action,
9        requestPath:  window.location.pathname
10    };
11    return callbackFunc.apply(obj);
12};
13forge.requestData = function(data) {
14    data = data || {};
15    data.userId      = forge.user ? forge.user.id : null;
16    data.pageId      = forge.page ? forge.page.id : null;
17    data.requestPath = window.location.pathname;
18    return data;
19};
20/* cached asset-dump29dcb2ad1ba372b46a81445bc8370d7c0dc56669: */
21!function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function g(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}return function e(l){function C(e,n,o){var t;if("undefined"!=typeof document){if(1<arguments.length){if("number"==typeof(o=g({path:"/"},C.defaults,o)).expires){var r=new Date;r.setMilliseconds(r.getMilliseconds()+864e5*o.expires),o.expires=r}o.expires=o.expires?o.expires.toUTCString():"";try{t=JSON.stringify(n),/^[\{\[]/.test(t)&&(n=t)}catch(e){}n=l.write?l.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var i="";for(var c in o)o[c]&&(i+="; "+c,!0!==o[c]&&(i+="="+o[c]));return document.cookie=e+"="+n+i}e||(t={});for(var a=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,f=0;f<a.length;f++){var p=a[f].split("="),d=p.slice(1).join("=");this.json||'"'!==d.charAt(0)||(d=d.slice(1,-1));try{var u=p[0].replace(s,decodeURIComponent);if(d=l.read?l.read(d,u):l(d,u)||d.replace(s,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(e){}if(e===u){t=d;break}e||(t[u]=d)}catch(e){}}return t}}return(C.set=C).get=function(e){return C.call(C,e)},C.getJSON=function(){return C.apply({json:!0},[].slice.call(arguments))},C.defaults={},C.remove=function(e,n){C(e,"",g(n,{expires:-1}))},C.withConverter=e,C}(function(){})});
22/* cached asset-dump4aac6e31c8c8a89735d19049e7223f1843ff5522: */
23window.stopVideosOnClose = function(id) {
24    var el = document.querySelector("[data-modal-body-id='" + id + "']");
25    var iframes = el.querySelectorAll("iframe")
26    for(var idx = 0; idx < iframes.length; idx++) {
27        // youtube
28        iframes[idx].contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*')
29        // vimeo
30        iframes[idx].contentWindow.postMessage('{"method":"pause"}', '*');
31    }
32};
33
34/* Because iframes will not autoplay videos anymore by default,
35we need to replace the iframe with a new one with the autoplay parameter. Since
36this is only happening within a trusted event (ie, the user clicked something),
37it will actually autoplay. */
38window.startVideosOnOpen = function(id) {
39    var el = document.querySelector("[data-modal-body-id='" + id + "']");
40    var iframes = el.querySelectorAll("iframe")
41    for(var idx = 0; idx < iframes.length; idx++) {
42        const iframe = iframes[idx]
43        if (!iframe.src && iframe.dataset.src) {
44            iframe.src = iframe.dataset.src
45        }
46        // make sure the frame source is https
47        iframe.src = iframe.src.replace("http:", "https:")
48        // add a timestamp to the end of the src to have it refresh
49        iframe.src = iframe.src + (iframe.src.indexOf("?") > -1 ? "&" : "?") + "t=" + new Date().getTime()
50    }
51};
52
53/* cached asset-dumpaa164dbb80339a3e41df866cebd3e882cbf2d5c2: */
54"use strict";
55
56(function () {
57  var __data_block_id = 13456857;
58  var __block_id = "dtGRq";
59  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
60  if (!foundBlockNode) {
61    var templates = document.querySelectorAll('template');
62    for (var i = 0; i < templates.length; i++) {
63      if (templates[i].content.querySelector('.f_' + __block_id)) {
64        foundBlockNode = true;
65        break;
66      }
67    }
68  }
69  if (foundBlockNode) {
70    var ready = function ready(counter) {
71      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
72        if (counter == 10) {
73          throw Error("Giving up waiting for block data");
74          return;
75        }
76        return setTimeout(function () {
77          ready(counter + 1);
78        }, 250);
79      }
80      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
81        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
82      }
83      var showHeaderCloseButton = __forgePageBlockData[__data_block_id].showHeaderCloseButton;
84      var showHeader = __forgePageBlockData[__data_block_id].showHeader;
85      var title = __forgePageBlockData[__data_block_id].title;
86      var size = __forgePageBlockData[__data_block_id].size;
87      var position = __forgePageBlockData[__data_block_id].position;
88      var overlayOpacity = __forgePageBlockData[__data_block_id].overlayOpacity;
89      var modalId = __forgePageBlockData[__data_block_id].modalId;
90      var openOnClick = __forgePageBlockData[__data_block_id].openOnClick;
91      var openOnEnter = __forgePageBlockData[__data_block_id].openOnEnter;
92      var openOnLeave = __forgePageBlockData[__data_block_id].openOnLeave;
93      var openOnMobile = __forgePageBlockData[__data_block_id].openOnMobile;
94      var openAfter = __forgePageBlockData[__data_block_id].openAfter;
95      var show = __forgePageBlockData[__data_block_id].show;
96      var _block = __forgePageBlockData[__data_block_id]._block;
97      var _page = __forgePageBlockData[__data_block_id]._page;
98      var _ts = __forgePageBlockData[__data_block_id]._ts;
99      var _elements = __forgePageBlockData[__data_block_id]._elements;
100      var block = {
101        id: "13456857",
102        callbackUri: "/_/b/13456857"
103      };
104      var call = function call(action, callbackFunc) {
105        return forge.blockCallback(block, action, callbackFunc);
106      };
107      var callback = function callback(action, data) {
108        return call(action, function () {
109          data = withData(data || {});
110
111          // check if any of the formData is a File or Blob
112          var isFile = false;
113          for (var key in data) {
114            if (!isFile && data[key]) {
115              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
116              for (var i = 0; i < arr.length; i++) {
117                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
118                  isFile = true;
119                  break;
120                }
121              }
122            }
123          }
124          if (isFile) {
125            var formData = new FormData();
126            for (var key in data) {
127              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
128                for (var idx in data[key]) {
129                  formData.append(key + '[' + idx + ']', data[key][idx]);
130                }
131              } else {
132                formData.append(key, data[key]);
133              }
134            }
135            return axios.post(this.uri, formData, {
136              headers: {
137                'Content-Type': 'multipart/form-data',
138                'X-Lazy-Load': 'off'
139              }
140            });
141          } else {
142            return axios.post(this.uri, data, {
143              headers: {
144                'X-Lazy-Load': 'off'
145              }
146            });
147          }
148        });
149      };
150      var withData = function withData(data) {
151        return forge.requestData(data);
152      };
153      var openModal = function openModal() {
154        var lastShown = Cookies.get('mosaic-popup-' + modalId);
155        if (show == 'once') {
156          if (lastShown) {
157            return; // we only need to show it once
158          }
159        } else if (show == 'daily') {
160          var now = new Date().getTime();
161          if (now - lastShown < 86400000) {
162            return; // not tomorrow yet
163          }
164        }
165        var el = document.querySelector("[data-modal-id='modal-popup-" + modalId + "']");
166        el.dispatchEvent(new Event("open"));
167        // stop any videos on close
168        el.addEventListener("close", function () {
169          var iframes = el.querySelectorAll("iframe");
170          for (var idx = 0; idx < iframes.length; idx++) {
171            // youtube
172            iframes[idx].contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*');
173            // vimeo
174            iframes[idx].contentWindow.postMessage('{"method":"pause"}', '*');
175          }
176        });
177        Cookies.set('mosaic-popup-' + modalId, new Date().getTime());
178        return false;
179      };
180      var openers = document.querySelectorAll("[href='#" + modalId + "']");
181      openers.forEach(function (opener) {
182        opener.addEventListener("click", function (event) {
183          event.preventDefault();
184          event.stopPropagation();
185          openModal();
186          return false;
187        });
188      });
189      function addEvent(obj, evt, fn) {
190        if (obj.addEventListener) {
191          obj.addEventListener(evt, fn, false);
192        } else if (obj.attachEvent) {
193          obj.attachEvent("on" + evt, fn);
194        }
195      }
196      if (openOnMobile || window.innerWidth > 768) {
197        if (openOnLeave) {
198          var opened = false;
199          addEvent(window, "mouseleave", function (event) {
200            if (!opened) {
201              if (event.toElement == null) {
202                openModal();
203                opened = true;
204              }
205            }
206          });
207        } else if (openOnEnter) {
208          setTimeout(function () {
209            openModal();
210            // add 50ms as a buffer because openAfter=0 isn't working
211          }, openAfter * 1000 + 50);
212        }
213      }
214      if (!('openMosaicPopup' in window)) {
215        window.mosaicPopups = {};
216        window.openMosaicPopup = function (popupName) {
217          if (popupName in window.mosaicPopups) {
218            window.mosaicPopups[popupName]();
219          }
220        };
221      }
222      window.mosaicPopups[modalId] = openModal;
223    };
224    ready(0);
225  }
226})();
227
228/* cached asset-dumpee67ddbd4dcb06dcd37c53f837c520340e859a08: */
229"use strict";
230
231function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
232function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {};
vendor: 2,123 bytes, lines 232-236
232 i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
233function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
234function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
235function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
236function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }
vendor: 8,926 bytes, lines 236-237
236; }
237function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEac
vendor: 5,467 bytes, lines 237-245
237h(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
238function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
239function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
240function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
241function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
242function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
243function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
244function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
245function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
246function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
247(function () {
248  var __data_block_id = 13456859;
249  var __block_id = "dtGRs";
250  var foundBlockNode = document.getElementsByClassName("f_" + __block_id).length > 0;
251  if (!foundBlockNode) {
252    var templates = document.querySelectorAll('template');
253    for (var i = 0; i < templates.length; i++) {
254      if (templates[i].content.querySelector('.f_' + __block_id)) {
255        foundBlockNode = true;
256        break;
257      }
258    }
259  }
260  if (foundBlockNode) {
261    var ready = function ready(counter) {
262      if (!('__forgePageBlockData' in window) || !(__data_block_id in __forgePageBlockData)) {
263        if (counter == 10) {
264          throw Error("Giving up waiting for block data");
265          return;
266        }
267        return setTimeout(function () {
268          ready(counter + 1);
269        }, 250);
270      }
271      if (typeof __forgePageBlockData[__data_block_id] == 'number') {
272        __forgePageBlockData[__data_block_id] = __forgePageBlockData[__forgePageBlockData[__data_block_id]] || {};
273      }
274      var useCaptcha = __forgePageBlockData[__data_block_id].useCaptcha;
275      var objectModelMap = __forgePageBlockData[__data_block_id].objectModelMap;
276      var form = __forgePageBlockData[__data_block_id].form;
277      var form_id = __forgePageBlockData[__data_block_id].form_id;
278      var form_settings = __forgePageBlockData[__data_block_id].form_settings;
279      var form_fields = __forgePageBlockData[__data_block_id].form_fields;
280      var form_structure = __forgePageBlockData[__data_block_id].form_structure;
281      var form_google_maps_enabled = __forgePageBlockData[__data_block_id].form_google_maps_enabled;
282      var form_has_google_maps_api_key = __forgePageBlockData[__data_block_id].form_has_google_maps_api_key;
283      var conversion_meta = __forgePageBlockData[__data_block_id].conversion_meta;
284      var button = __forgePageBlockData[__data_block_id].button;
285      var centerButtons = __forgePageBlockData[__data_block_id].centerButtons;
286      var buttonColumnSpan = __forgePageBlockData[__data_block_id].buttonColumnSpan;
287      var prevPageButton = __forgePageBlockData[__data_block_id].prevPageButton;
288      var nextPageButton = __forgePageBlockData[__data_block_id].nextPageButton;
289      var showLabels = __forgePageBlockData[__data_block_id].showLabels;
290      var showPlaceholders = __forgePageBlockData[__data_block_id].showPlaceholders;
291      var showPageNumbers = __forgePageBlockData[__data_block_id].showPageNumbers;
292      var _block = __forgePageBlockData[__data_block_id]._block;
293      var _page = __forgePageBlockData[__data_block_id]._page;
294      var _ts = __forgePageBlockData[__data_block_id]._ts;
295      var _elements = __forgePageBlockData[__data_block_id]._elements;
296      var block = {
297        id: "13456859",
298        callbackUri: "/_/b/13456859"
299      };
300      var call = function call(action, callbackFunc) {
301        return forge.blockCallback(block, action, callbackFunc);
302      };
303      var callback = function callback(action, data) {
304        return call(action, function () {
305          data = withData(data || {});
306
307          // check if any of the formData is a File or Blob
308          var isFile = false;
309          for (var key in data) {
310            if (!isFile && data[key]) {
311              var arr = Array.isArray(data[key]) ? data[key] : [data[key]];
312              for (var i = 0; i < arr.length; i++) {
313                if (arr[i] === Object(arr[i]) && (arr[i].constructor == File || arr[i].constructor === Blob)) {
314                  isFile = true;
315                  break;
316                }
317              }
318            }
319          }
320          if (isFile) {
321            var formData = new FormData();
322            for (var key in data) {
323              if (data[key] && (Array.isArray(data[key]) || data[key] === Object(data[key])) && data[key].constructor !== File && data[key].constructor !== Blob) {
324                for (var idx in data[key]) {
325                  formData.append(key + '[' + idx + ']', data[key][idx]);
326                }
327              } else {
328                formData.append(key, data[key]);
329              }
330            }
331            return axios.post(this.uri, formData, {
332              headers: {
333                'Content-Type': 'multipart/form-data',
334                'X-Lazy-Load': 'off'
335              }
336            });
337          } else {
338            return axios.post(this.uri, data, {
339              headers: {
340                'X-Lazy-Load': 'off'
341              }
342            });
343          }
344        });
345      };
346      var withData = function withData(data) {
347        return forge.requestData(data);
348      };
349
350      /**
351       * This script relies on the BladeScript functionality which is scoped automatically (providing form_id, form_fields and optionally conversion_meta)
352       */
353
354      //window.forgeForms = window.forgeForms || {}
355
356      // Wrap in IIFE to handle both pre-Alpine and post-Alpine loading scenarios
357      (function () {
358        var form = function form() {
359          return {
360            formInitilized: new Date().getTime(),
361            timeoutCounter: 0,
362            autocompleteTimeoutCounter: 0,
363            input: form_fields,
364            successMessage: "",
365            successRedirect: "",
366            errorMessage: "",
367            sending: false,
368            recaptchaWidgetId: null,
369            currentPage: 1,
370            numberOfPages: _typeof(form_settings) === 'object' && form_settings && 'pages' in form_settings ? form_settings.pages : 1,
371            formStructure: typeof form_structure !== 'undefined' ? form_structure : {},
372            init: function init() {
373              var _this = this;
374              this.$nextTick(function () {
375                _this.initializeAddressFields();
376                _this.initializeGoogleAutocomplete();
377                setTimeout(function () {
378                  if (_this.$refs.captchaButton) {
379                    if (!_this.recaptchaScriptExists()) {
380                      _this.loadRecaptcha();
381                    }
382                    _this.initRecaptcha();
383                  }
384                }, 3000);
385              });
386            },
387            initializeAddressFields: function initializeAddressFields() {
388              var _this2 = this;
389              if (!this.formStructure) return;
390              Object.entries(this.formStructure).forEach(function (_ref) {
391                var _ref2 = _slicedToArray(_ref, 2),
392                  slug = _ref2[0],
393                  type = _ref2[1];
394                if (type === 'address') {
395                  if (!_this2.input[slug] || _typeof(_this2.input[slug]) !== 'object') {
396                    _this2.input[slug] = {
397                      line1: '',
398                      line2: '',
399                      city: '',
400                      state: '',
401                      postalCode: '',
402                      country: '',
403                      fullAddress: ''
404                    };
405                  } else {
406                    // Ensure fullAddress is present if object exists but incomplete
407                    if (!('fullAddress' in _this2.input[slug])) {
408                      _this2.input[slug].fullAddress = '';
409                    }
410                  }
411                }
412              });
413            },
414            initializeGoogleAutocomplete: function initializeGoogleAutocomplete() {
415              var _this3 = this,
416                _this$$refs$addressAu,
417                _this$$refs$addressAu2,
418                _this$$refs$addressAu3;
419              this.autocompleteTimeoutCounter++;
420
421              // Give up after 120 attempts (60 seconds at 500ms intervals)
422              if (this.autocompleteTimeoutCounter > 120) {
423                console.warn('Google Maps API not available for address autocomplete');
424                return;
425              }
426
427              // Check if Google Maps API is loaded
428              if (typeof google === 'undefined' || typeof google.maps === 'undefined' || typeof google.maps.places === 'undefined') {
429                setTimeout(function () {
430                  _this3.initializeGoogleAutocomplete();
431                }, 500);
432                return;
433              }
434
435              // Find all address input fields in this form
436              var addressInputs = this.$el.querySelectorAll('input[data-address="true"]');
437
438              // Capture the Alpine component context
439              var alpineComponent = this;
440
441              // Get style templates
442              var dropdownStyles = ((_this$$refs$addressAu = this.$refs.addressAutocompleteDropdownStyles) === null || _this$$refs$addressAu === void 0 ? void 0 : _this$$refs$addressAu.classList) || null;
443              var itemStyles = ((_this$$refs$addressAu2 = this.$refs.addressAutocompleteItemStyles) === null || _this$$refs$addressAu2 === void 0 ? void 0 : _this$$refs$addressAu2.classList) || null;
444              var itemSelectedStyles = ((_this$$refs$addressAu3 = this.$refs.addressAutocompleteItemSelectedStyles) === null || _this$$refs$addressAu3 === void 0 ? void 0 : _this$$refs$addressAu3.classList) || null;
445              addressInputs.forEach(function (input) {
446                var slug = input.dataset.slug;
447                if (!slug) return;
448
449                // Create dropdown container for suggestions
450                var dropdown = document.createElement('div');
451                // Apply classes from template or fallback to defaults
452                if (dropdownStyles) {
453                  dropdown.className = Array.from(dropdownStyles).join(' ') + ' hidden';
454                } else {
455                  dropdown.className = 'absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto hidden';
456                }
457                dropdown.setAttribute('role', 'listbox');
458
459                // Position dropdown relative to input's parent
460                var parent = input.parentElement;
461                if (parent && window.getComputedStyle(parent).position === 'static') {
462                  parent.style.position = 'relative';
463                }
464                parent.appendChild(dropdown);
465                var debounceTimer;
466                var currentSuggestions = [];
467                var selectedIndex = -1;
468
469                // Handle input changes
470                input.addEventListener('input', /*#__PURE__*/function () {
471                  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
472                    var value;
473                    return _regeneratorRuntime().wrap(function _callee3$(_context3) {
474                      while (1) {
475                        switch (_context3.prev = _context3.next) {
476                          case 0:
477                            value = e.target.value; // Clear previous timer
478                            clearTimeout(debounceTimer);
479                            if (!(!value || value.length < 3)) {
480                              _context3.next = 7;
481                              break;
482                            }
483                            dropdown.classList.add('hidden');
484                            currentSuggestions = [];
485                            selectedIndex = -1;
486                            return _context3.abrupt("return");
487                          case 7:
488                            // Debounce the API call
489                            debounceTimer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
490                              var request, _yield$google$maps$pl, suggestions;
491                              return _regeneratorRuntime().wrap(function _callee2$(_context2) {
492                                while (1) {
493                                  switch (_context2.prev = _context2.next) {
494                                    case 0:
495                                      _context2.prev = 0;
496                                      request = {
497                                        input: value,
498                                        includedPrimaryTypes: ['geocode'],
499                                        language: 'en'
500                                      };
501                                      _context2.next = 4;
502                                      return google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request);
503                                    case 4:
504                                      _yield$google$maps$pl = _context2.sent;
505                                      suggestions = _yield$google$maps$pl.suggestions;
506                                      currentSuggestions = suggestions || [];
507                                      selectedIndex = -1;
508                                      if (currentSuggestions.length) {
509                                        _context2.next = 11;
510                                        break;
511                                      }
512                                      dropdown.classList.add('hidden');
513                                      return _context2.abrupt("return");
514                                    case 11:
515                                      // Build dropdown UI with classes from templates
516                                      dropdown.innerHTML = '';
517                                      currentSuggestions.forEach(function (suggestion, index) {
518                                        var item = document.createElement('div');
519                                        // Apply classes from template or fallback to defaults
520                                        if (itemStyles) {
521                                          item.className = Array.from(itemStyles).join(' ');
522                                        } else {
523                                          item.className = 'px-4 py-3 cursor-pointer hover:bg-gray-100 border-b border-gray-100 last:border-b-0';
524                                        }
525                                        item.setAttribute('role', 'option');
526                                        item.setAttribute('data-index', index);
527                                        item.textContent = suggestion.placePrediction.text.toString();
528
529                                        // Handle click selection
530                                        item.addEventListener('click', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
531                                          return _regeneratorRuntime().wrap(function _callee$(_context) {
532                                            while (1) {
533                                              switch (_context.prev = _context.next) {
534                                                case 0:
535                                                  _context.next = 2;
536                                                  return handlePlaceSelection(suggestion.placePrediction);
537                                                case 2:
538                                                case "end":
539                                                  return _context.stop();
540                                              }
541                                            }
542                                          }, _callee);
543                                        })));
544                                        dropdown.appendChild(item);
545                                      });
546                                      dropdown.classList.remove('hidden');
547                                      _context2.next = 20;
548                                      break;
549                                    case 16:
550                                      _context2.prev = 16;
551                                      _context2.t0 = _context2["catch"](0);
552                                      console.error('Error fetching autocomplete suggestions:', _context2.t0);
553                                      dropdown.classList.add('hidden');
554                                    case 20:
555                                    case "end":
556                                      return _context2.stop();
557                                  }
558                                }
559                              }, _callee2, null, [[0, 16]]);
560                            })), 300);
561                          case 8:
562                          case "end":
563                            return _context3.stop();
564                        }
565                      }
566                    }, _callee3);
567                  }));
568                  return function (_x2) {
569                    return _ref3.apply(this, arguments);
570                  };
571                }());
572
573                // Handle keyboard navigation
574                input.addEventListener('keydown', /*#__PURE__*/function () {
575                  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e) {
576                    var items;
577                    return _regeneratorRuntime().wrap(function _callee4$(_context4) {
578                      while (1) {
579                        switch (_context4.prev = _context4.next) {
580                          case 0:
581                            items = dropdown.querySelectorAll('[role="option"]');
582                            if (!(e.key === 'ArrowDown')) {
583                              _context4.next = 7;
584                              break;
585                            }
586                            e.preventDefault();
587                            selectedIndex = Math.min(selectedIndex + 1, currentSuggestions.length - 1);
588                            updateSelectedItem(items, selectedIndex);
589                            _context4.next = 21;
590                            break;
591                          case 7:
592                            if (!(e.key === 'ArrowUp')) {
593                              _context4.next = 13;
594                              break;
595                            }
596                            e.preventDefault();
597                            selectedIndex = Math.max(selectedIndex - 1, -1);
598                            updateSelectedItem(items, selectedIndex);
599                            _context4.next = 21;
600                            break;
601                          case 13:
602                            if (!(e.key === 'Enter' && selectedIndex >= 0)) {
603                              _context4.next = 20;
604                              break;
605                            }
606                            e.preventDefault();
607                            if (!currentSuggestions[selectedIndex]) {
608                              _context4.next = 18;
609                              break;
610                            }
611                            _context4.next = 18;
612                            return handlePlaceSelection(currentSuggestions[selectedIndex].placePrediction);
613                          case 18:
614                            _context4.next = 21;
615                            break;
616                          case 20:
617                            if (e.key === 'Escape') {
618                              dropdown.classList.add('hidden');
619                              selectedIndex = -1;
620                            }
621                          case 21:
622                          case "end":
623                            return _context4.stop();
624                        }
625                      }
626                    }, _callee4);
627                  }));
628                  return function (_x3) {
629                    return _ref6.apply(this, arguments);
630                  };
631                }());
632
633                // Update visual selection
634                var updateSelectedItem = function updateSelectedItem(items, index) {
635                  items.forEach(function (item, i) {
636                    if (i === index) {
637                      // Apply selected state classes from template
638                      if (itemSelectedStyles) {
639                        item.className = Array.from(itemSelectedStyles).join(' ');
640                      } else {
641                        // Fallback: just add bg-gray-100 to existing classes
642                        item.classList.add('bg-gray-100');
643                      }
644                      item.scrollIntoView({
645                        block: 'nearest'
646                      });
647                    } else {
648                      // Apply normal state classes from template
649                      if (itemStyles) {
650                        item.className = Array.from(itemStyles).join(' ');
651                      } else {
652                        // Fallback: remove bg-gray-100
653                        item.classList.remove('bg-gray-100');
654                      }
655                    }
656                  });
657                };
658
659                // Handle place selection
660                var handlePlaceSelection = /*#__PURE__*/function () {
661                  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(placePrediction) {
662                    var place, addressComponents, addressData;
663                    return _regeneratorRuntime().wrap(function _callee5$(_context5) {
664                      while (1) {
665                        switch (_context5.prev = _context5.next) {
666                          case 0:
667                            _context5.prev = 0;
668                            // Convert prediction to Place object
669                            place = placePrediction.toPlace(); // Fetch place details including address components
670                            _context5.next = 4;
671                            return place.fetchFields({
672                              fields: ['addressComponents', 'formattedAddress']
673                            });
674                          case 4:
675                            addressComponents = place.addressComponents;
676                            if (addressComponents) {
677                              _context5.next = 7;
678                              break;
679                            }
680                            return _context5.abrupt("return");
681                          case 7:
682                            // Parse address components
683                            addressData = {
684                              line1: '',
685                              line2: '',
686                              city: '',
687                              state: '',
688                              postalCode: '',
689                              country: '',
690                              fullAddress: place.formattedAddress || ''
691                            }; // Extract address components
692                            addressComponents.forEach(function (component) {
693                              var types = component.types;
694                              if (types.includes('street_number')) {
695                                addressData.line1 = component.longText + ' ' + addressData.line1;
696                              } else if (types.includes('route')) {
697                                addressData.line1 += component.longText;
698                              } else if (types.includes('locality')) {
699                                addressData.city = component.longText;
700                              } else if (types.includes('administrative_area_level_1')) {
701                                addressData.state = component.shortText;
702                              } else if (types.includes('postal_code')) {
703                                addressData.postalCode = component.longText;
704                              } else if (types.includes('country')) {
705                                addressData.country = component.longText;
706                              }
707                            });
708
709                            // Trim line1
710                            addressData.line1 = addressData.line1.trim();
711
712                            // Update the input field display with full address
713                            input.value = addressData.fullAddress;
714
715                            // Update the Alpine data
716                            alpineComponent.input[slug].line1 = addressData.line1;
717                            alpineComponent.input[slug].line2 = addressData.line2;
718                            alpineComponent.input[slug].city = addressData.city;
719                            alpineComponent.input[slug].state = addressData.state;
720                            alpineComponent.input[slug].postalCode = addressData.postalCode;
721                            alpineComponent.input[slug].country = addressData.country;
722                            alpineComponent.input[slug].fullAddress = addressData.fullAddress;
723
724                            // Hide dropdown
725                            dropdown.classList.add('hidden');
726                            currentSuggestions = [];
727                            selectedIndex = -1;
728                            _context5.next = 26;
729                            break;
730                          case 23:
731                            _context5.prev = 23;
732                            _context5.t0 = _context5["catch"](0);
733                            console.error('Error fetching place details:', _context5.t0);
734                          case 26:
735                          case "end":
736                            return _context5.stop();
737                        }
738                      }
739                    }, _callee5, null, [[0, 23]]);
740                  }));
741                  return function handlePlaceSelection(_x4) {
742                    return _ref7.apply(this, arguments);
743                  };
744                }();
745
746                // Hide dropdown when clicking outside
747                document.addEventListener('click', function (e) {
748                  if (!input.contains(e.target) && !dropdown.contains(e.target)) {
749                    dropdown.classList.add('hidden');
750                    selectedIndex = -1;
751                  }
752                });
753              });
754            },
755            prevPage: function prevPage() {
756              this.currentPage--;
757              if (typeof gtag !== "undefined") {
758                gtag("event", "form_prev_page", {
759                  'page': this.currentPage,
760                  'form': form_id
761                });
762              }
763            },
764            nextPage: function nextPage() {
765              this.currentPage++;
766              if (typeof gtag !== "undefined") {
767                gtag("event", "form_next_page", {
768                  'page': this.currentPage,
769                  'form': form_id
770                });
771              }
772            },
773            recaptchaScriptExists: function recaptchaScriptExists() {
774              var url = "https://www.google.com/recaptcha/api.js?render=explicit";
775              var scripts = document.getElementsByTagName("script");
776              for (var i = scripts.length; i--;) {
777                if (scripts[i].src == url) {
778                  return true;
779                }
780              }
781              return false;
782            },
783            getNextSibling: function getNextSibling(elem, selector) {
784              // Get the next sibling element
785              try {
786                var sibling = elem.nextElementSibling;
787                if (!sibling) return;
788                // If there's no selector, return the first sibling
789                if (!selector) return sibling;
790                // If the sibling matches our selector, use it
791                // If not, jump to the next sibling and continue the loop
792                while (sibling) {
793                  if (sibling.matches(selector)) return sibling;
794                  sibling = sibling.nextElementSibling;
795                }
796                return sibling;
797              } catch (error) {}
798            },
799            loadRecaptcha: function loadRecaptcha() {
800              // Only init recaptcha if we have a recaptcha button ref
801              if (!this.$refs.captchaButton) {
802                return;
803              }
804              var recaptchaScript = document.createElement("script");
805              recaptchaScript.async = true;
806              recaptchaScript.type = "text/javascript";
807              recaptchaScript.setAttribute("src", "https://www.google.com/recaptcha/api.js?render=explicit");
808              document.head.appendChild(recaptchaScript);
809            },
810            initRecaptcha: function initRecaptcha() {
811              var _this4 = this;
812              // Only init recaptcha if we have a recaptcha button ref
813              if (!this.$refs.captchaButton) {
814                return;
815              }
816              this.timeoutCounter++;
817              if (this.timeoutCounter === 120) {
818                console.log("Giving up on recaptcha");
819                return;
820              }
821              var submitBtn = this.$refs.captchaButton;
822              try {
823                setTimeout(function () {
824                  if (typeof grecaptcha === "undefined" || typeof grecaptcha.render === "undefined") {
825                    _this4.initRecaptcha();
826                  } else {
827                    var _this4$$refs$captchaB;
828                    _this4.recaptchaWidgetId = grecaptcha.render(submitBtn.getAttribute("id"), {
829                      sitekey: (_this4$$refs$captchaB = _this4.$refs.captchaButton.dataset.sitekey) !== null && _this4$$refs$captchaB !== void 0 ? _this4$$refs$captchaB : "",
830                      badge: "bottomleft",
831                      size: "invisible",
832                      callback: _this4.recaptchaPassed.bind(_this4),
833                      errorCallback: console.error,
834                      expiredCallback: console.error
835                    });
836                  }
837                }, 500);
838                var checkForBadge = setInterval(function () {
839                  var badge = document.querySelector(".grecaptcha-badge");
840                  if (badge) {
841                    document.body.append(badge);
842                    clearInterval(checkForBadge);
843                  }
844                }, 50);
845              } catch (error) {}
846            },
847            usingRecaptcha: function usingRecaptcha() {
848              return this.$refs.captchaButton || typeof this.input["g-recaptcha-response"] !== "undefined";
849            },
850            recaptchaPassed: function recaptchaPassed(code) {
851              this.input["g-recaptcha-response"] = code;
852              grecaptcha.reset(this.recaptchaWidgetId);
853              this.submit();
854            },
855            submit: function submit(cb, skip) {
856              var _this5 = this;
857              // Manually update the inputs from the form itself in case the user used auto-fill and
858              // the browser didn't behave correctly or something.
859              if (!skip) {
860                var inputs = document.querySelectorAll("[x-data='".concat(form_id, "'] [x-model]"));
861                var foundAutofill = false;
862                for (var i = 0; i < inputs.length; i++) {
863                  // Wrap this in a try/catch because non webkit browsers will log errors on this pseudo element
864                  try {
865                    if (inputs[i].matches(':-webkit-autofill')) {
866                      inputs[i].dispatchEvent(new Event("input"));
867                      foundAutofill = true;
868                    }
869                  } catch (error) {}
870                }
871                if (foundAutofill) {
872                  // Wait a beat to let alpine catch the change events
873                  setTimeout(function () {
874                    _this5.submit(cb, true);
875                  }, 100);
876                  return false;
877                }
878              }
879
880              // If captcha is required (ref exists) and didn't pass
881              if (this.usingRecaptcha() && !this.input["g-recaptcha-response"]) {
882                // get outta here
883                console.log('Recaptcha required. Double check you have both a x-ref="captchaButton" and a field named "g-recaptcha-response" in your PHP.');
884                alert("Oops, it looks like the form isn't quite ready yet. Please wait a few seconds and try again.");
885                cb && typeof cb === "function" && cb(false);
886                return false;
887              }
888
889              // Update form state
890              this.sending = true;
891              this.input.form_submitted_in = new Date().getTime() - this.formInitilized;
892              // Submit the submit callback
893              callback("submit", this.input).then(function (res) {
894                console.log("Form submitted at " + new Date().getTime());
895                try {
896                  setTimeout(function () {
897                    var node = document.getElementById(form_id);
898                    if (node && 'scrollIntoView' in node) {
899                      console.log("Form scrolling to Success Message at " + new Date().getTime());
900                      node.scrollIntoView({
901                        block: "start",
902                        behavior: "smooth"
903                      });
904                    }
905                  }, 100);
906
907                  // If we don't get a success message back, something went from (even if it's a 200 code)
908                  if (!res.data || !res.data.message && !res.data.redirect) {
909                    // Show error and reset form
910                    _this5.successMessage = null;
911                    _this5.errorMessage = "An unknown error occurred. Please use another method to get in touch and report this issue.";
912                    _this5.sending = false;
913                    cb && typeof cb === "function" && cb(false);
914                    return; // get out of here
915                  }
916
917                  // SUCCESS
918                  console.log("Form conversion recorded at " + new Date().getTime());
919                  _this5.recordConversion();
920                  if (res.data.redirect) {
921                    // wait a second to let the conversion fire
922                    setTimeout(function () {
923                      window.location.href = res.data.redirect;
924                    }, 1000);
925                  } else {
926                    _this5.successMessage = res.data.message;
927                  }
928
929                  // Reset form state
930                  _this5.errorMessage = null;
931                  _this5.sending = false;
932                  cb && typeof cb === "function" && cb(true);
933                } catch (e) {
934                  console.log(e);
935                }
936              })["catch"](function (_ref8) {
937                var response = _ref8.response;
938                var node = document.getElementById(form_id);
939                if (node && 'scrollIntoView' in node) {
940                  node.scrollIntoView({
941                    block: "start",
942                    behavior: "smooth"
943                  });
944                }
945
946                // Reset form fields and error message
947                var message = "";
948                var invalids = _this5.$el.getElementsByClassName("is-invalid");
949                var _iterator = _createForOfIteratorHelper(invalids),
950                  _step;
951                try {
952                  for (_iterator.s(); !(_step = _iterator.n()).done;) {
953                    var element = _step.value;
954                    element.classList.remove("is-invalid");
955                  }
956
957                  // If errors weren't sent, something else went wrong but we want to give some feedback
958                } catch (err) {
959                  _iterator.e(err);
960                } finally {
961                  _iterator.f();
962                }
963                if (!response.data || !response.data.errors) {
964                  message = "An unknown error occurred. Please use another method to get in touch and report this issue.";
965                  // We have errors
966                } else {
967                  // If a string
968                  if (typeof response.data.errors === "string") {
969                    // Single error (likely not field related) set message to error
970                    message = response.data.errors;
971                    // If it's an array
972                  } else {
973                    // Append each to the message
974                    for (var _i2 = 0, _Object$entries = Object.entries(response.data.errors); _i2 < _Object$entries.length; _i2++) {
975                      var _this5$getNextSibling;
976                      var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
977                        field = _Object$entries$_i[0],
978                        msg = _Object$entries$_i[1];
979                      var input = _this5.$el.querySelector(".input\\:" + field);
980                      var feedback = (_this5$getNextSibling = _this5.getNextSibling(input, ".invalid-feedback")) !== null && _this5$getNextSibling !== void 0 ? _this5$getNextSibling : null;
981
982                      // If we have a feedback div specifically for this input
983                      if (input && feedback) {
984                        // Send message there
985                        feedback.innerHTML = msg;
986                      } else {
987                        var m = Array.isArray(msg) ? msg.join("<br>") : msg;
988                        //  Otherwise send to the primary error message area
989                        message += message !== "" ? "<br>" + m : m;
990                      }
991                      if (input) {
992                        // Also mark field invalid
993                        input.classList.add("is-invalid");
994                      }
995                    }
996                  }
997                }
998                // Reset form state
999                _this5.successMessage = null;
1000                _this5.currentPage = 1;
1001                _this5.errorMessage = message;
1002                _this5.sending = false;
1003                cb && typeof cb === "function" && cb(false);
1004              });
1005            },
1006            recordConversion: function recordConversion() {
1007              if ('disableConversions' in window) {
1008                return;
1009              }
1010              var cm = typeof conversion_meta !== "undefined" ? conversion_meta : false;
1011              var eventAction = cm && cm.action ? cm.action : "submit";
1012              var eventCategory = cm && cm.category ? cm.category : "form";
1013              var eventLabel = cm && cm.label ? cm.label : location.pathname;
1014              var includeInAnalytics = cm && cm.includeInAnalytics ? cm.includeInAnalytics : [];
1015              var analyticsData = {};
1016              var _iterator2 = _createForOfIteratorHelper(includeInAnalytics),
1017                _step2;
1018              try {
1019                for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1020                  var aKey = _step2.value;
1021                  analyticsData[aKey] = aKey in this.input ? this.input[aKey] : null;
1022                }
1023
1024                // Analytics is configured
1025              } catch (err) {
1026                _iterator2.e(err);
1027              } finally {
1028                _iterator2.f();
1029              }
1030              if (typeof gtag !== "undefined") {
1031                var eventDetails = _objectSpread({
1032                  event_category: eventCategory,
1033                  event_label: eventLabel
1034                }, analyticsData);
1035                // Send event
1036                gtag("event", eventAction, eventDetails);
1037                console.log("Conversion event sent to Google Tag Manager", {
1038                  eventAction: eventAction,
1039                  eventDetails: eventDetails
1040                });
1041              }
1042              window.dataLayer = window.dataLayer || [];
1043              window.dataLayer.push({
1044                'event': 'generate_lead',
1045                'form_submission': eventLabel,
1046                'form_data': analyticsData
1047              });
1048              try {
1049                window.dispatchEvent(new CustomEvent('generate_lead', {
1050                  detail: {
1051                    action_type: eventAction || 'Form Submission',
1052                    category: eventCategory || 'Form',
1053                    label: eventLabel || window.location.href,
1054                    form_id: form_id,
1055                    page_url: window.location.href
1056                  }
1057                }));
1058              } catch (error) {
1059                // just in case :)
1060                console.error('Error dispatching generate_lead event', error);
1061              }
1062            }
1063          };
1064        };
1065
1066        // Track registered forms globally
1067        if (!window.__registeredForms) {
1068          window.__registeredForms = {};
1069        }
1070
1071        // Register component - must happen before Alpine walks the DOM
1072        function registerComponent() {
1073          if (!window.__registeredForms[form_id]) {
1074            Alpine.data(form_id, form);
1075            window.__registeredForms[form_id] = true;
1076
1077            // Only register "mosaicForm" once for backwards compatibility
1078            // This will point to the FIRST form on the page
1079            if (!window.__registeredForms['mosaicForm']) {
1080              Alpine.data("mosaicForm", form);
1081              window.__registeredForms['mosaicForm'] = true;
1082            }
1083          }
1084        }
1085
1086        // Use alpine:init to ensure we register before Alpine processes the DOM
1087        document.addEventListener('alpine:init', function () {
1088          registerComponent();
1089        });
1090
1091        // Also register immediately if Alpine has already initialized
1092        // This handles the case where scripts load after Alpine has started
1093        if (window.Alpine && window.Alpine.version) {
1094          registerComponent();
1095
1096          // If Alpine has already processed the DOM, manually initialize this form
1097          // Use requestAnimationFrame to ensure DOM is ready
1098          requestAnimationFrame(function () {
1099            var formElement = document.querySelector("[x-data=\"".concat(form_id, "\"]"));
1100            if (formElement && !formElement._x_dataStack) {
1101              // Element exists but hasn't been initialized by Alpine yet
1102              try {
1103                Alpine.initTree(formElement);
1104              } catch (e) {
1105                console.warn('Failed to initialize form', form_id, e);
1106              }
1107            }
1108          });
1109        }
1110      })();
1111    };
1112    ready(0);
1113  }
1114})();

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.