{"version":3,"file":"js/global-4e0e9cc07d8c71a2747a.js","mappings":"svDAwBsCA,IAAlCC,OAAOC,wBAAuC,IAAD,qBAC/CD,OAAOC,uBAAyBC,EAAAA,GADlC,c,gBAOgCH,IAA5BC,OAAOG,kBAAiC,IAAD,qBACzCH,OAAOG,kBAAmB,IACrB,0BAAIC,EAAAA,EAAAA,OAAU,IAAD,qBAElBC,MACE,6FAEI,IAAD,sBACLC,EAAAA,EAAAA,GACE,IAAIC,MAAJ,0CAAoDP,OAAOQ,SAASC,SAEvE,YAEDC,EAAAA,EAAAA,IAAO,6B,2oECrCP,IAAMC,GAAgB,WAAG,IAMzB,SAAST,EAAoBU,GAG3B,GAHqC,IAAD,kBAGS,IAAzCC,OAAOC,KAAKH,GAAkBI,OAAc,CAAC,IAAD,UAC9C,IAAMD,GAAI,WAAGD,OAAOC,KAAKF,IADqB,WAG1CE,EAAKC,OAAS,GAAI,IAAD,qBACnBD,EAAKE,SAAQ,SAACC,GAAW,IAAD,kBACtBN,EAAiBM,GAASL,EAAQK,MAFjB,WAMnBJ,OAAOK,OAAOP,IANhB,mBAHF,iB","sources":["webpack://StravaModern/./app/javascript/globalLibraries.js","webpack://StravaModern/./app/javascript/utils/public-service-env.js"],"sourcesContent":["// This file is deprecated and only used to move node_modules accessed in the\n// sprockets asset pipeline to webpack entry points\n// adding random string to force recompile:\n// A998D3152224818D225A880A9B627F1FB4484DD7E408EACA1B243326ED4AA01B\n\n// importing jquery using script-loader to mimic adding jQuery via a script tag\n/* eslint-disable no-unused-vars,import/extensions */\nimport 'jquery/dist/jquery.min.js';\nimport 'leaflet/dist/leaflet.js';\nimport 'dexie/dist/dexie.min.js';\nimport 'intersection-observer/intersection-observer.js';\nimport '@strava/clio/dist/strava_analytics.min.js';\nimport '@strava/autotrack/autotrack.js';\nimport 'dropzone/dist/dropzone.js';\nimport 'blueimp-load-image/js/load-image.all.min.js';\nimport 'dropzone/dist/min/dropzone.min.css';\n\nimport { setPublicServiceEnv } from './utils/public-service-env';\nimport { devLog, isDev } from './utils/devUtils';\n\nimport { logError } from './utils/sentry';\n\n// Expose method on global scope that sets public keys that are commonly passed\n// to 3rd party libs or tooling.\nif (window.stravaPublicServiceEnv === undefined) {\n window.stravaPublicServiceEnv = setPublicServiceEnv;\n}\n\n// check if global libraries are being loaded multiple times.\n// Loading the libs might cause issues like https://reactjs.org/docs/error-decoder.html/?invariant=321\n// since react is loaded twice etc\nif (window.globalLibsLoaded === undefined) {\n window.globalLibsLoaded = true;\n} else if (isDev()) {\n // eslint-disable-next-line no-alert\n alert(\n 'WARNING: global libraries are loaded twice on this page. This could cause react errors.'\n );\n} else {\n logError(\n new Error(`global libraries are loaded twice on - ${window.location.href}`)\n );\n}\n\ndevLog('loading global libraries');\n","// Object containing no secret key value pairs that are expected to be seen and\n// used in the browser. This keys are commonly passed to 3rd party libs or tooling.\n//\n// Data that gets set to this object is set in the following file:\n// app/views/common/_react_public_service_env.haml\n//\n// Do not set values directly into this object here as that is not intended use\nconst publicServiceEnv = {};\n\n/**\n * Sets data to an object and freezes it on the initial call.\n * @param {Object} envData Object containing key value pairs that are not nested objects\n */\nfunction setPublicServiceEnv(envData) {\n // Only update the object if it's empty as we do not want to allow any updated\n // after the initial call to this method\n if (Object.keys(publicServiceEnv).length === 0) {\n const keys = Object.keys(envData);\n\n if (keys.length > 0) {\n keys.forEach((value) => {\n publicServiceEnv[value] = envData[value];\n });\n\n // Freeze object so that it can not be updated or changed\n Object.freeze(publicServiceEnv);\n }\n }\n}\n\nexport { publicServiceEnv, setPublicServiceEnv };\n"],"names":["undefined","window","stravaPublicServiceEnv","setPublicServiceEnv","globalLibsLoaded","isDev","alert","logError","Error","location","href","devLog","publicServiceEnv","envData","Object","keys","length","forEach","value","freeze"],"sourceRoot":""}