{"version":3,"file":"js/application-be3cd82b7cdf3fdfb530.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/components sync ^\\.\\/.*$","webpack:///./app/javascript/components/Bank.js","webpack:///./app/javascript/components/BankVerification.js","webpack:///./app/javascript/components/CardPin.js","webpack:///./app/javascript/components/Dashboard.js","webpack:///./app/javascript/components/ForgotPassword.js","webpack:///./app/javascript/components/IdentityVerification.js","webpack:///./app/javascript/components/Login.js","webpack:///./app/javascript/components/OrderOptions.js","webpack:///./app/javascript/components/Personal.js","webpack:///./app/javascript/components/Referral.js","webpack:///./app/javascript/components/Registration.js","webpack:///./app/javascript/components/ReviewAndSubmit.js","webpack:///./app/javascript/components/Signature.js","webpack:///./app/javascript/components/ThankYou.js","webpack:///./app/javascript/components/TripPlanning.js","webpack:///./app/javascript/components/client/Client.js","webpack:///./app/javascript/components/shared/AccountTypes.js","webpack:///./app/javascript/components/shared/ApplicationProgress.js","webpack:///./app/javascript/components/shared/CheckboxInput.js","webpack:///./app/javascript/components/shared/ErrorMessages.js","webpack:///./app/javascript/components/shared/LoadingIndicator.js","webpack:///./app/javascript/components/shared/PasswordInput.js","webpack:///./app/javascript/components/shared/SsnInput.js","webpack:///./app/javascript/components/shared/States.js","webpack:///./app/javascript/components/shared/StripeErrors.js","webpack:///./app/javascript/components/shared/StripeFieldErrors.js","webpack:///./app/javascript/components/shared/UserSummaryCharts.js","webpack:///./app/javascript/components/shared/UserSummaryStats.js","webpack:///./app/javascript/components/shared/Utilities.js","webpack:///./app/javascript/components/shared/charts/BarChart.js","webpack:///./app/javascript/components/shared/charts/LineChart.js","webpack:///./app/javascript/components/shared/charts/PieChart.js","webpack:///./app/javascript/packs/application.js","webpack:///./node_modules/@react-google-maps/api/dist/esm.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/prop-types/lib/has.js","webpack:///./node_modules/react-async-script/lib/esm/async-script-loader.js","webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.development.js","webpack:///./node_modules/react-dom/cjs/react-dom.development.js","webpack:///./node_modules/react-dom/index.js","webpack:///./node_modules/react-dom/server.browser.js","webpack:///./node_modules/react-google-recaptcha/lib/esm/index.js","webpack:///./node_modules/react-google-recaptcha/lib/esm/recaptcha-wrapper.js","webpack:///./node_modules/react-google-recaptcha/lib/esm/recaptcha.js","webpack:///./node_modules/react-is/cjs/react-is.development.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react-plaid-link/dist/index.umd.js","webpack:///./node_modules/react/cjs/react-jsx-runtime.development.js","webpack:///./node_modules/react/cjs/react.development.js","webpack:///./node_modules/react/index.js","webpack:///./node_modules/react/jsx-runtime.js","webpack:///./node_modules/react_ujs/react_ujs/index.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/detect.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/native.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/pjax.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinks.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinksClassic.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinksClassicDeprecated.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromGlobal.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContext.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContextWithGlobalFallback.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContextsWithGlobalFallback.js","webpack:///./node_modules/react_ujs/react_ujs/src/reactDomClient.js","webpack:///./node_modules/react_ujs/react_ujs/src/renderHelpers.js","webpack:///./node_modules/scheduler/cjs/scheduler-tracing.development.js","webpack:///./node_modules/scheduler/cjs/scheduler.development.js","webpack:///./node_modules/scheduler/index.js","webpack:///./node_modules/scheduler/tracing.js","webpack:///(webpack)/buildin/global.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/application.js\");\n","var map = {\n\t\"./Bank\": \"./app/javascript/components/Bank.js\",\n\t\"./Bank.js\": \"./app/javascript/components/Bank.js\",\n\t\"./BankVerification\": \"./app/javascript/components/BankVerification.js\",\n\t\"./BankVerification.js\": \"./app/javascript/components/BankVerification.js\",\n\t\"./CardPin\": \"./app/javascript/components/CardPin.js\",\n\t\"./CardPin.js\": \"./app/javascript/components/CardPin.js\",\n\t\"./Dashboard\": \"./app/javascript/components/Dashboard.js\",\n\t\"./Dashboard.js\": \"./app/javascript/components/Dashboard.js\",\n\t\"./ForgotPassword\": \"./app/javascript/components/ForgotPassword.js\",\n\t\"./ForgotPassword.js\": \"./app/javascript/components/ForgotPassword.js\",\n\t\"./IdentityVerification\": \"./app/javascript/components/IdentityVerification.js\",\n\t\"./IdentityVerification.js\": \"./app/javascript/components/IdentityVerification.js\",\n\t\"./Login\": \"./app/javascript/components/Login.js\",\n\t\"./Login.js\": \"./app/javascript/components/Login.js\",\n\t\"./OrderOptions\": \"./app/javascript/components/OrderOptions.js\",\n\t\"./OrderOptions.js\": \"./app/javascript/components/OrderOptions.js\",\n\t\"./Personal\": \"./app/javascript/components/Personal.js\",\n\t\"./Personal.js\": \"./app/javascript/components/Personal.js\",\n\t\"./Referral\": \"./app/javascript/components/Referral.js\",\n\t\"./Referral.js\": \"./app/javascript/components/Referral.js\",\n\t\"./Registration\": \"./app/javascript/components/Registration.js\",\n\t\"./Registration.js\": \"./app/javascript/components/Registration.js\",\n\t\"./ReviewAndSubmit\": \"./app/javascript/components/ReviewAndSubmit.js\",\n\t\"./ReviewAndSubmit.js\": \"./app/javascript/components/ReviewAndSubmit.js\",\n\t\"./Signature\": \"./app/javascript/components/Signature.js\",\n\t\"./Signature.js\": \"./app/javascript/components/Signature.js\",\n\t\"./ThankYou\": \"./app/javascript/components/ThankYou.js\",\n\t\"./ThankYou.js\": \"./app/javascript/components/ThankYou.js\",\n\t\"./TripPlanning\": \"./app/javascript/components/TripPlanning.js\",\n\t\"./TripPlanning.js\": \"./app/javascript/components/TripPlanning.js\",\n\t\"./client/Client\": \"./app/javascript/components/client/Client.js\",\n\t\"./client/Client.js\": \"./app/javascript/components/client/Client.js\",\n\t\"./shared/AccountTypes\": \"./app/javascript/components/shared/AccountTypes.js\",\n\t\"./shared/AccountTypes.js\": \"./app/javascript/components/shared/AccountTypes.js\",\n\t\"./shared/ApplicationProgress\": \"./app/javascript/components/shared/ApplicationProgress.js\",\n\t\"./shared/ApplicationProgress.js\": \"./app/javascript/components/shared/ApplicationProgress.js\",\n\t\"./shared/CheckboxInput\": \"./app/javascript/components/shared/CheckboxInput.js\",\n\t\"./shared/CheckboxInput.js\": \"./app/javascript/components/shared/CheckboxInput.js\",\n\t\"./shared/ErrorMessages\": \"./app/javascript/components/shared/ErrorMessages.js\",\n\t\"./shared/ErrorMessages.js\": \"./app/javascript/components/shared/ErrorMessages.js\",\n\t\"./shared/LoadingIndicator\": \"./app/javascript/components/shared/LoadingIndicator.js\",\n\t\"./shared/LoadingIndicator.js\": \"./app/javascript/components/shared/LoadingIndicator.js\",\n\t\"./shared/PasswordInput\": \"./app/javascript/components/shared/PasswordInput.js\",\n\t\"./shared/PasswordInput.js\": \"./app/javascript/components/shared/PasswordInput.js\",\n\t\"./shared/SsnInput\": \"./app/javascript/components/shared/SsnInput.js\",\n\t\"./shared/SsnInput.js\": \"./app/javascript/components/shared/SsnInput.js\",\n\t\"./shared/States\": \"./app/javascript/components/shared/States.js\",\n\t\"./shared/States.js\": \"./app/javascript/components/shared/States.js\",\n\t\"./shared/StripeErrors\": \"./app/javascript/components/shared/StripeErrors.js\",\n\t\"./shared/StripeErrors.js\": \"./app/javascript/components/shared/StripeErrors.js\",\n\t\"./shared/StripeFieldErrors\": \"./app/javascript/components/shared/StripeFieldErrors.js\",\n\t\"./shared/StripeFieldErrors.js\": \"./app/javascript/components/shared/StripeFieldErrors.js\",\n\t\"./shared/UserSummaryCharts\": \"./app/javascript/components/shared/UserSummaryCharts.js\",\n\t\"./shared/UserSummaryCharts.js\": \"./app/javascript/components/shared/UserSummaryCharts.js\",\n\t\"./shared/UserSummaryStats\": \"./app/javascript/components/shared/UserSummaryStats.js\",\n\t\"./shared/UserSummaryStats.js\": \"./app/javascript/components/shared/UserSummaryStats.js\",\n\t\"./shared/Utilities\": \"./app/javascript/components/shared/Utilities.js\",\n\t\"./shared/Utilities.js\": \"./app/javascript/components/shared/Utilities.js\",\n\t\"./shared/charts/BarChart\": \"./app/javascript/components/shared/charts/BarChart.js\",\n\t\"./shared/charts/BarChart.js\": \"./app/javascript/components/shared/charts/BarChart.js\",\n\t\"./shared/charts/LineChart\": \"./app/javascript/components/shared/charts/LineChart.js\",\n\t\"./shared/charts/LineChart.js\": \"./app/javascript/components/shared/charts/LineChart.js\",\n\t\"./shared/charts/PieChart\": \"./app/javascript/components/shared/charts/PieChart.js\",\n\t\"./shared/charts/PieChart.js\": \"./app/javascript/components/shared/charts/PieChart.js\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./app/javascript/components sync recursive ^\\\\.\\\\/.*$\";","import React, { useEffect, useState } from \"react\";\nimport client from \"./client/Client\";\nimport LoadingIndicator from \"./shared/LoadingIndicator\";\nimport ApplicationProgress from \"./shared/ApplicationProgress\";\nimport ErrorMessages from \"./shared/ErrorMessages\";\nimport StripeErrors from \"./shared/StripeErrors\";\nimport StripeFieldErrors from \"./shared/StripeFieldErrors\";\n\nimport { renderLabel } from \"./shared/Utilities\";\nimport { accountTypes } from \"./shared/AccountTypes\";\n\nexport default function Bank() {\n const [busy, setBusy] = useState(true);\n const [saveBusy, setSaveBusy] = useState(false);\n\n const [errorMessages, setErrorMessages] = useState([]);\n const [stripeErrors, setStripeErrors] = useState([]);\n\n const [bankName, setBankName] = useState();\n const [bankRoutingNumber, setBankRoutingNumber] = useState();\n const [bankAccountNumber, setBankAccountNumber] = useState();\n const [accountType, setAccountType] = useState(null);\n\n const [accountHolderName, setAccountHolderName] = useState(null);\n const [accountHolderType, setAccountHolderType] = useState(null);\n\n const [stripePk, setStripePk] = useState(null);\n\n useEffect(() => {\n initialize();\n }, [])\n\n const initialize = async () => {\n const response = await client.getData(\"/user-portal/fpa/bank\");\n \n setBankName(response.result?.bank_account?.bank_name)\n setBankRoutingNumber(response.result?.bank_account?.bank_routing_number)\n setBankAccountNumber(response.result?.bank_account?.bank_account_number)\n setAccountType(response.result?.bank_account?.account_type)\n setStripePk(response.result?.stripe_pk);\n\n setAccountHolderName(`${response.result?.fuel_program_application.first_name} ${response.result?.fuel_program_application.last_name}`);\n setAccountHolderType('individual');\n\n setBusy(false);\n }\n\n const save = async () => {\n setSaveBusy(true);\n\n setErrorMessages([]);\n setStripeErrors([]);\n\n const stripe = Stripe(stripePk);\n\n const stripeResult = await stripe.createToken('bank_account', {\n country: 'US',\n currency: 'usd',\n routing_number: bankRoutingNumber || '0',\n account_number: bankAccountNumber || '0',\n account_holder_name: accountHolderName,\n account_holder_type: accountHolderType\n });\n\n if (stripeResult.error) {\n setStripeErrors([stripeResult.error]);\n } else {\n const request = {\n bank_account: {\n bank_name: bankName || '',\n bank_routing_number: bankRoutingNumber || '',\n bank_account_number: bankAccountNumber || '',\n account_type: accountType || '',\n stripe_token_id: stripeResult.token.id\n }\n };\n \n const response = await client.postData(\"/user-portal/fpa/bank\", request);\n\n if (response.status === client.Error) {\n setErrorMessages(response.error_messages);\n }\n }\n\n setSaveBusy(false);\n }\n\n return (\n
Please call us at: 800-275-5089 so we may further assist you in verifying your account.
\n\n We will manually review the information you have provided and attempt to verify your bank information with a $0.01 ACH deposit by one of our customer service staff [1].\n
\n\n If we need something, we'll followup by calling or emailing you. If everything looks good we'll auto approve your application. In the mean time, sit tight and enjoy the top-notch customer service.\n
\n\n [1] Once verified, we will charge a one-time $20 fee for manual verification.\n
\nNow that your bank has been verified, you can continue and submit your application
\nWe could not verify your account with the depoit amounts you provided
\nPlease call us at: 800-275-5089 so we may assist you in verifying your account.
\nNow that your bank has been verified, you can continue and submit your application
\nThe banking institution you chose did not have an account number that matches your Routing/Account numbers from the previous page.
\nGo back to the 'Bank' page and verify your account numbers, then try your instant verifiation again.
\nIf you don't have access to your bank through Plaid, you can always use the ACH-Deposit verification process.
\n\n We need to verify your bank account information. To do this, we have partnered with 3rd party bank verification providers. Choose from either instant verification or ACH-deposit verification using verifiable and small deposit amounts.\n
\n\n\n\n Is your bank a large, well known financial institution? If so, you might be able to verify your account by logging into your account and authorizing an identity verification.\n
\n\n If your bank isn't supported by Plaid, we can verify your bank information using automatic small ACH deposits, which you will then self-verify. This process takes 1-3 business days to complete.\n
\n\n If you need some help verifying your bank, we can charge you a $20 service fee to manually verify your banking information.\n This will entail us making an ACH penny deposit. This process may take up to 10 business days.\n
\n\n We sent two small deposits to the bank account you listed. It may take 1-2 business days for the deposit to complete. If you know the deposit amounts, please enter them in the fields below (in no particular order).\n
\n\n You can exit this application now and come back to continue after the deposits have been made.\n
\n\n\n Please specify a 4-digit secure pin to use when fueling with your card.\n
\n\n\n With no applications to fill out, or bank agreements to update, its pretty dull in here right now. Ho hum.\n
\n\n Apply to join the TSD Open Roads RV fuel discount program and enjoy discounts on diesel fuel throughout the continental United States of America.\n
\n\n You have outstanding banking agreements that need signatures in order for your account to remain in good standing\n
\n\n Enter your email and we will send a password reset code if the email corresponds to an existing account.\n
\n\n Remember your password? \n Login\n
\n\n Enter the verification code we sent you.\n
\n\n Enter a new password and password confirmation\n
\nNow that your identity has been verified, you can continue your application.
\n\n Please contact customer service at 1-800-275-5089 to assist with the approval process.\n
\n\n Customer Service Hours\n
\nMon | \n08:00 am – 05:00 pm | \n\n |
Tue | \n08:00 am – 05:00 pm | \n\n |
Wed | \n08:00 am – 05:00 pm | \n\n |
Thu | \n08:00 am – 05:00 pm | \n\n |
Fri | \n08:00 am – 05:00 pm | \n\n |
Sat | \n08:00 am – 04:00 pm | \n\n |
Sun | \n08:00 am – 04:00 pm | \n\n |
Due to increased security requirements from our financial institutions, we will need to verify
your identity using information such as: phone number, home address, and a photo identity card.
\n Need to create an account? \n Sign Up\n
\n\n Forgot your password? \n Forgot Password\n
\n\n Enter a name of your referrer, or select from popular referrers on the right.\n
\n\n Help us identify the people responsible for growing our program, and recongnise their contribution.\n
\n\n setReferrerAccountId(referrer.id)} />\n | \n\n | \n \n {referrer.brand_name}\n | \n
\n
\n \n\n There are no signup fees or membership fees to join. There are no long-term contracts\n to sign and no hidden fees.\n
\n\n
\n By joining our program, you will have access to discount diesel prices at specified\n locations such as Love's and Travel Centers of America. Current members are saving\n 30 to 40 cents per gallon off the pump price.\n
\n\n There are no signup fees or membership fees to join. There are no long-term contracts\n to sign and no hidden fees.\n
\n\n
\n Already a registered user? \n Sign In\n
\nWe will start processing your application soon.
\nTransactions (Year to Date)
\nSpending (Year to Date)
\nSavings (Year to Date)
\nClusterer
begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this);\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.timerRefStatic;\n }\n }\n var map = this.getMap();\n var bounds = map !== null && 'getBounds' in map ? map.getBounds() : null;\n var zoom = (map === null || map === void 0 ? void 0 : map.getZoom()) || 0;\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n var mapBounds = zoom > 3 ? new google.maps.LatLngBounds(bounds === null || bounds === void 0 ? void 0 : bounds.getSouthWest(), bounds === null || bounds === void 0 ? void 0 : bounds.getNorthEast()) : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n var extendedMapBounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize, this.markers.length);\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers[i];\n if (marker && !marker.isAdded && this.isMarkerInBounds(marker, extendedMapBounds) && (!this.ignoreHidden || this.ignoreHidden && marker.getVisible())) {\n this.addToClosestCluster(marker);\n }\n }\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(function () {\n _this.createClusters(iLast);\n }, 0);\n } else {\n this.timerRefStatic = null;\n /**\n * This event is fired when the Clusterer
stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this);\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var cluster = _a[_i];\n cluster.updateIcon();\n }\n }\n };\n Clusterer.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-types\n var prop = property;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.prototype[prop] = object.prototype[prop];\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return Clusterer;\n}();\nfunction ownKeys$c(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread$c(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nvar eventMap$e = {\n onClick: 'click',\n onClusteringBegin: 'clusteringbegin',\n onClusteringEnd: 'clusteringend',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover'\n};\nvar updaterMap$e = {\n averageCenter(instance, averageCenter) {\n instance.setAverageCenter(averageCenter);\n },\n batchSizeIE(instance, batchSizeIE) {\n instance.setBatchSizeIE(batchSizeIE);\n },\n calculator(instance, calculator) {\n instance.setCalculator(calculator);\n },\n clusterClass(instance, clusterClass) {\n instance.setClusterClass(clusterClass);\n },\n enableRetinaIcons(instance, enableRetinaIcons) {\n instance.setEnableRetinaIcons(enableRetinaIcons);\n },\n gridSize(instance, gridSize) {\n instance.setGridSize(gridSize);\n },\n ignoreHidden(instance, ignoreHidden) {\n instance.setIgnoreHidden(ignoreHidden);\n },\n imageExtension(instance, imageExtension) {\n instance.setImageExtension(imageExtension);\n },\n imagePath(instance, imagePath) {\n instance.setImagePath(imagePath);\n },\n imageSizes(instance, imageSizes) {\n instance.setImageSizes(imageSizes);\n },\n maxZoom(instance, maxZoom) {\n instance.setMaxZoom(maxZoom);\n },\n minimumClusterSize(instance, minimumClusterSize) {\n instance.setMinimumClusterSize(minimumClusterSize);\n },\n styles(instance, styles) {\n instance.setStyles(styles);\n },\n title(instance, title) {\n instance.setTitle(title);\n },\n zoomOnClick(instance, zoomOnClick) {\n instance.setZoomOnClick(zoomOnClick);\n }\n};\nvar defaultOptions$4 = {};\nfunction MarkerClustererFunctional(props) {\n var children = props.children,\n options = props.options,\n averageCenter = props.averageCenter,\n batchSizeIE = props.batchSizeIE,\n calculator = props.calculator,\n clusterClass = props.clusterClass,\n enableRetinaIcons = props.enableRetinaIcons,\n gridSize = props.gridSize,\n ignoreHidden = props.ignoreHidden,\n imageExtension = props.imageExtension,\n imagePath = props.imagePath,\n imageSizes = props.imageSizes,\n maxZoom = props.maxZoom,\n minimumClusterSize = props.minimumClusterSize,\n styles = props.styles,\n title = props.title,\n zoomOnClick = props.zoomOnClick,\n onClick = props.onClick,\n onClusteringBegin = props.onClusteringBegin,\n onClusteringEnd = props.onClusteringEnd,\n onMouseOver = props.onMouseOver,\n onMouseOut = props.onMouseOut,\n onLoad = props.onLoad,\n onUnmount = props.onUnmount;\n var _useState99 = useState(null),\n _useState100 = _slicedToArray(_useState99, 2),\n instance = _useState100[0],\n setInstance = _useState100[1];\n var map = useContext(MapContext);\n var _useState101 = useState(null),\n _useState102 = _slicedToArray(_useState101, 2),\n clickListener = _useState102[0],\n setClickListener = _useState102[1];\n var _useState103 = useState(null),\n _useState104 = _slicedToArray(_useState103, 2),\n clusteringBeginListener = _useState104[0],\n setClusteringBeginListener = _useState104[1];\n var _useState105 = useState(null),\n _useState106 = _slicedToArray(_useState105, 2),\n clusteringEndListener = _useState106[0],\n setClusteringEndListener = _useState106[1];\n var _useState107 = useState(null),\n _useState108 = _slicedToArray(_useState107, 2),\n mouseoutListener = _useState108[0],\n setMouseoutListener = _useState108[1];\n var _useState109 = useState(null),\n _useState110 = _slicedToArray(_useState109, 2),\n mouseoverListener = _useState110[0],\n setMouseoverListener = _useState110[1];\n useEffect(() => {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, eventMap$e.onMouseOut, onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(() => {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, eventMap$e.onMouseOver, onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(() => {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, eventMap$e.onClick, onClick));\n }\n }, [onClick]);\n useEffect(() => {\n if (instance && onClusteringBegin) {\n if (clusteringBeginListener !== null) {\n google.maps.event.removeListener(clusteringBeginListener);\n }\n setClusteringBeginListener(google.maps.event.addListener(instance, eventMap$e.onClusteringBegin, onClusteringBegin));\n }\n }, [onClusteringBegin]);\n useEffect(() => {\n if (instance && onClusteringEnd) {\n if (clusteringEndListener !== null) {\n google.maps.event.removeListener(clusteringEndListener);\n }\n setClusteringBeginListener(google.maps.event.addListener(instance, eventMap$e.onClusteringEnd, onClusteringEnd));\n }\n }, [onClusteringEnd]);\n useEffect(() => {\n if (typeof averageCenter !== 'undefined' && instance !== null) {\n updaterMap$e.averageCenter(instance, averageCenter);\n }\n }, [instance, averageCenter]);\n useEffect(() => {\n if (typeof batchSizeIE !== 'undefined' && instance !== null) {\n updaterMap$e.batchSizeIE(instance, batchSizeIE);\n }\n }, [instance, batchSizeIE]);\n useEffect(() => {\n if (typeof calculator !== 'undefined' && instance !== null) {\n updaterMap$e.calculator(instance, calculator);\n }\n }, [instance, calculator]);\n useEffect(() => {\n if (typeof clusterClass !== 'undefined' && instance !== null) {\n updaterMap$e.clusterClass(instance, clusterClass);\n }\n }, [instance, clusterClass]);\n useEffect(() => {\n if (typeof enableRetinaIcons !== 'undefined' && instance !== null) {\n updaterMap$e.enableRetinaIcons(instance, enableRetinaIcons);\n }\n }, [instance, enableRetinaIcons]);\n useEffect(() => {\n if (typeof gridSize !== 'undefined' && instance !== null) {\n updaterMap$e.gridSize(instance, gridSize);\n }\n }, [instance, gridSize]);\n useEffect(() => {\n if (typeof ignoreHidden !== 'undefined' && instance !== null) {\n updaterMap$e.ignoreHidden(instance, ignoreHidden);\n }\n }, [instance, ignoreHidden]);\n useEffect(() => {\n if (typeof imageExtension !== 'undefined' && instance !== null) {\n updaterMap$e.imageExtension(instance, imageExtension);\n }\n }, [instance, imageExtension]);\n useEffect(() => {\n if (typeof imagePath !== 'undefined' && instance !== null) {\n updaterMap$e.imagePath(instance, imagePath);\n }\n }, [instance, imagePath]);\n useEffect(() => {\n if (typeof imageSizes !== 'undefined' && instance !== null) {\n updaterMap$e.imageSizes(instance, imageSizes);\n }\n }, [instance, imageSizes]);\n useEffect(() => {\n if (typeof maxZoom !== 'undefined' && instance !== null) {\n updaterMap$e.maxZoom(instance, maxZoom);\n }\n }, [instance, maxZoom]);\n useEffect(() => {\n if (typeof minimumClusterSize !== 'undefined' && instance !== null) {\n updaterMap$e.minimumClusterSize(instance, minimumClusterSize);\n }\n }, [instance, minimumClusterSize]);\n useEffect(() => {\n if (typeof styles !== 'undefined' && instance !== null) {\n updaterMap$e.styles(instance, styles);\n }\n }, [instance, styles]);\n useEffect(() => {\n if (typeof title !== 'undefined' && instance !== null) {\n updaterMap$e.title(instance, title);\n }\n }, [instance, title]);\n useEffect(() => {\n if (typeof zoomOnClick !== 'undefined' && instance !== null) {\n updaterMap$e.zoomOnClick(instance, zoomOnClick);\n }\n }, [instance, zoomOnClick]);\n useEffect(() => {\n if (!map) return;\n var clustererOptions = _objectSpread$c({}, options || defaultOptions$4);\n var clusterer = new Clusterer(map, [], clustererOptions);\n if (averageCenter) {\n updaterMap$e.averageCenter(clusterer, averageCenter);\n }\n if (batchSizeIE) {\n updaterMap$e.batchSizeIE(clusterer, batchSizeIE);\n }\n if (calculator) {\n updaterMap$e.calculator(clusterer, calculator);\n }\n if (clusterClass) {\n updaterMap$e.clusterClass(clusterer, clusterClass);\n }\n if (enableRetinaIcons) {\n updaterMap$e.enableRetinaIcons(clusterer, enableRetinaIcons);\n }\n if (gridSize) {\n updaterMap$e.gridSize(clusterer, gridSize);\n }\n if (ignoreHidden) {\n updaterMap$e.ignoreHidden(clusterer, ignoreHidden);\n }\n if (imageExtension) {\n updaterMap$e.imageExtension(clusterer, imageExtension);\n }\n if (imagePath) {\n updaterMap$e.imagePath(clusterer, imagePath);\n }\n if (imageSizes) {\n updaterMap$e.imageSizes(clusterer, imageSizes);\n }\n if (maxZoom) {\n updaterMap$e.maxZoom(clusterer, maxZoom);\n }\n if (minimumClusterSize) {\n updaterMap$e.minimumClusterSize(clusterer, minimumClusterSize);\n }\n if (styles) {\n updaterMap$e.styles(clusterer, styles);\n }\n if (title) {\n updaterMap$e.title(clusterer, title);\n }\n if (zoomOnClick) {\n updaterMap$e.zoomOnClick(clusterer, zoomOnClick);\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(clusterer, eventMap$e.onMouseOut, onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(clusterer, eventMap$e.onMouseOver, onMouseOver));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(clusterer, eventMap$e.onClick, onClick));\n }\n if (onClusteringBegin) {\n setClusteringBeginListener(google.maps.event.addListener(clusterer, eventMap$e.onClusteringBegin, onClusteringBegin));\n }\n if (onClusteringEnd) {\n setClusteringEndListener(google.maps.event.addListener(clusterer, eventMap$e.onClusteringEnd, onClusteringEnd));\n }\n setInstance(clusterer);\n if (onLoad) {\n onLoad(clusterer);\n }\n return () => {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (clusteringBeginListener !== null) {\n google.maps.event.removeListener(clusteringBeginListener);\n }\n if (clusteringEndListener !== null) {\n google.maps.event.removeListener(clusteringEndListener);\n }\n if (onUnmount) {\n onUnmount(clusterer);\n }\n };\n }, []);\n return instance !== null ? children(instance) || null : null;\n}\nvar MarkerClustererF = /*#__PURE__*/memo(MarkerClustererFunctional);\nclass ClustererComponent extends PureComponent {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"registeredEvents\", []);\n _defineProperty(this, \"state\", {\n markerClusterer: null\n });\n _defineProperty(this, \"setClustererCallback\", () => {\n if (this.state.markerClusterer !== null && this.props.onLoad) {\n this.props.onLoad(this.state.markerClusterer);\n }\n });\n }\n componentDidMount() {\n if (this.context) {\n var markerClusterer = new Clusterer(this.context, [], this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: {},\n nextProps: this.props,\n instance: markerClusterer\n });\n this.setState(() => {\n return {\n markerClusterer\n };\n }, this.setClustererCallback);\n }\n }\n componentDidUpdate(prevProps) {\n if (this.state.markerClusterer) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps,\n nextProps: this.props,\n instance: this.state.markerClusterer\n });\n }\n }\n componentWillUnmount() {\n if (this.state.markerClusterer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.markerClusterer);\n }\n unregisterEvents(this.registeredEvents);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.state.markerClusterer.setMap(null);\n }\n }\n render() {\n return this.state.markerClusterer !== null ? this.props.children(this.state.markerClusterer) : null;\n }\n}\n_defineProperty(ClustererComponent, \"contextType\", MapContext);\n\n// This handler prevents an event in the InfoBox from being passed on to the map.\nfunction cancelHandler(event) {\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n}\nvar InfoBox = /** @class */function () {\n function InfoBox(options) {\n if (options === void 0) {\n options = {};\n }\n this.getCloseClickHandler = this.getCloseClickHandler.bind(this);\n this.closeClickHandler = this.closeClickHandler.bind(this);\n this.createInfoBoxDiv = this.createInfoBoxDiv.bind(this);\n this.addClickHandler = this.addClickHandler.bind(this);\n this.getCloseBoxImg = this.getCloseBoxImg.bind(this);\n this.getBoxWidths = this.getBoxWidths.bind(this);\n this.setBoxStyle = this.setBoxStyle.bind(this);\n this.setPosition = this.setPosition.bind(this);\n this.getPosition = this.getPosition.bind(this);\n this.setOptions = this.setOptions.bind(this);\n this.setContent = this.setContent.bind(this);\n this.setVisible = this.setVisible.bind(this);\n this.getContent = this.getContent.bind(this);\n this.getVisible = this.getVisible.bind(this);\n this.setZIndex = this.setZIndex.bind(this);\n this.getZIndex = this.getZIndex.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.panBox = this.panBox.bind(this);\n this.extend = this.extend.bind(this);\n this.close = this.close.bind(this);\n this.draw = this.draw.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.open = this.open.bind(this);\n this.extend(InfoBox, google.maps.OverlayView);\n // Standard options (in common with google.maps.InfoWindow):\n this.content = options.content || '';\n this.disableAutoPan = options.disableAutoPan || false;\n this.maxWidth = options.maxWidth || 0;\n this.pixelOffset = options.pixelOffset || new google.maps.Size(0, 0);\n this.position = options.position || new google.maps.LatLng(0, 0);\n this.zIndex = options.zIndex || null;\n // Additional options (unique to InfoBox):\n this.boxClass = options.boxClass || 'infoBox';\n this.boxStyle = options.boxStyle || {};\n this.closeBoxMargin = options.closeBoxMargin || '2px';\n this.closeBoxURL = options.closeBoxURL || 'http://www.google.com/intl/en_us/mapfiles/close.gif';\n if (options.closeBoxURL === '') {\n this.closeBoxURL = '';\n }\n this.infoBoxClearance = options.infoBoxClearance || new google.maps.Size(1, 1);\n if (typeof options.visible === 'undefined') {\n if (typeof options.isHidden === 'undefined') {\n options.visible = true;\n } else {\n options.visible = !options.isHidden;\n }\n }\n this.isHidden = !options.visible;\n this.alignBottom = options.alignBottom || false;\n this.pane = options.pane || 'floatPane';\n this.enableEventPropagation = options.enableEventPropagation || false;\n this.div = null;\n this.closeListener = null;\n this.moveListener = null;\n this.mapListener = null;\n this.contextListener = null;\n this.eventListeners = null;\n this.fixedWidthSet = null;\n }\n InfoBox.prototype.createInfoBoxDiv = function () {\n var _this = this;\n // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n var ignoreHandler = function ignoreHandler(event) {\n event.returnValue = false;\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (!_this.enableEventPropagation) {\n cancelHandler(event);\n }\n };\n if (!this.div) {\n this.div = document.createElement('div');\n this.setBoxStyle();\n if (typeof this.content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + this.content;\n } else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(this.content);\n }\n var panes = this.getPanes();\n if (panes !== null) {\n panes[this.pane].appendChild(this.div); // Add the InfoBox div to the DOM\n }\n this.addClickHandler();\n if (this.div.style.width) {\n this.fixedWidthSet = true;\n } else {\n if (this.maxWidth !== 0 && this.div.offsetWidth > this.maxWidth) {\n this.div.style.width = this.maxWidth + 'px';\n this.fixedWidthSet = true;\n } else {\n // The following code is needed to overcome problems with MSIE\n var bw = this.getBoxWidths();\n this.div.style.width = this.div.offsetWidth - bw.left - bw.right + 'px';\n this.fixedWidthSet = false;\n }\n }\n this.panBox(this.disableAutoPan);\n if (!this.enableEventPropagation) {\n this.eventListeners = [];\n // Cancel event propagation.\n // Note: mousemove not included (to resolve Issue 152)\n var events = ['mousedown', 'mouseover', 'mouseout', 'mouseup', 'click', 'dblclick', 'touchstart', 'touchend', 'touchmove'];\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n this.eventListeners.push(google.maps.event.addListener(this.div, event_1, cancelHandler));\n }\n // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n this.eventListeners.push(google.maps.event.addListener(this.div, 'mouseover', function () {\n if (_this.div) {\n _this.div.style.cursor = 'default';\n }\n }));\n }\n this.contextListener = google.maps.event.addListener(this.div, 'contextmenu', ignoreHandler);\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n google.maps.event.trigger(this, 'domready');\n }\n };\n InfoBox.prototype.getCloseBoxImg = function () {\n var img = '';\n if (this.closeBoxURL !== '') {\n img = '