{"version":3,"file":"js/common-3db7dabc6d5f1979bdf8.js","mappings":"uKAYA,GAAsB,qBAAXA,OAAwB,CAAC,IAADC,EAAAC,EAAAC,EAAAC,EACjC,MAAMC,IAA0B,QAAhBJ,EAACD,OAAOM,gBAAQ,IAAAL,GAAQ,QAARA,EAAfA,EAAiBM,cAAM,IAAAN,GAAvBA,EAAyBO,UACpCC,GAAgC,QAAfP,EAAAF,OAAOM,gBAAQ,IAAAJ,GAAQ,QAARA,EAAfA,EAAiBK,cAAM,IAAAL,OAAA,EAAvBA,EAAyBO,iBAAkB,EAC5DC,EAAeD,EAAiB,EAEhCE,EAAa,CACjBC,IAAKC,EAAAA,IACLC,QAASC,EAAAA,IACTC,YAAaC,aACbC,aAAc,CACZC,KAAM,CACJC,IAAoB,QAAjBjB,EAAEH,OAAOM,gBAAQ,IAAAH,GAAQ,QAARA,EAAfA,EAAiBkB,cAAM,IAAAlB,OAAA,EAAvBA,EAAyBiB,IAC9BE,WAA2B,QAAjBlB,EAAEJ,OAAOM,gBAAQ,IAAAF,GAAQ,QAARA,EAAfA,EAAiBiB,cAAM,IAAAjB,OAAA,EAAvBA,EAAyBkB,aAGzCC,eAAgB,EAChBlB,UACAmB,OAAQ,UACRC,aAAc,CAAC,SAAU,YAAa,aACtCC,aAAc,CAACC,EAAAA,KACfC,iBAAkB,CAChBC,QAAS,CACP,eAAgB,6BAGpBC,UAAAA,CAAWC,EAAOC,GAChB,OAlCqBC,EAkCCD,EAAKE,6BAjCVC,EAAAA,IAAc,CAAC,IAAK,IAAK,IAAK,KAAKC,SAAc,OAALH,QAAK,IAALA,OAAK,EAALA,EAAOI,QAkC3D,KAGFN,EAtCb,IAA2BE,CAuCvB,GAQEvB,IACFC,EAAW2B,yBAA2B7B,EACtCE,EAAWe,aAAaa,KACtBZ,EAAAA,EAAyB,CACvBa,aAAa,MAKnBb,EAAAA,EAAYhB,EACd,C","sources":["webpack://artprice/./app/javascript/sentry.js"],"sourcesContent":["import * as Sentry from '@sentry/react';\nimport { AxiosError } from 'axios';\nimport { SENTRY_DSN, VERSION } from './constants/rails';\n\nfunction shouldIgnoreError(error) {\n  if (error instanceof AxiosError && [429, 449, 401, 403].includes(error?.status)) {\n    return true;\n  }\n\n  return false;\n}\n\nif (typeof window !== 'undefined') {\n  const enabled = !window.artprice?.sentry?.disabled;\n  const replaySampling = window.artprice?.sentry?.replaySampling || 0.0;\n  const enableReplay = replaySampling > 0.0;\n\n  const sentryConf = {\n    dsn: SENTRY_DSN,\n    release: VERSION,\n    environment: process.env.RAILS_ENV,\n    initialScope: {\n      tags: {\n        bot: window.artprice?.client?.bot,\n        suspicious: window.artprice?.client?.suspicious,\n      },\n    },\n    normalizeDepth: 6,\n    enabled,\n    tunnel: '/tunnel',\n    ignoreErrors: ['jQuery', 'Hydration', 'hydrating'],\n    integrations: [Sentry.extraErrorDataIntegration()],\n    transportOptions: {\n      headers: {\n        'Content-Type': 'text/plain;charset=UTF-8',\n      },\n    },\n    beforeSend(event, hint) {\n      if (shouldIgnoreError(hint.originalException)) {\n        return null;\n      }\n\n      return event;\n    },\n    // integrations(integrations) {\n    //   const filteredIntregrations = integrations.filter(integration => integration.name !== 'Dedupe');\n    //\n    //   return [...filteredIntregrations, Sentry.extraErrorDataIntegration()];\n    // },\n  };\n\n  if (enableReplay) {\n    sentryConf.replaysOnErrorSampleRate = replaySampling;\n    sentryConf.integrations.push(\n      Sentry.replayIntegration({\n        maskAllText: false,\n      }),\n    );\n  }\n\n  Sentry.init(sentryConf);\n}\n"],"names":["window","_window$artprice","_window$artprice2","_window$artprice3","_window$artprice4","enabled","artprice","sentry","disabled","replaySampling","enableReplay","sentryConf","dsn","SENTRY_DSN","release","VERSION","environment","process","initialScope","tags","bot","client","suspicious","normalizeDepth","tunnel","ignoreErrors","integrations","Sentry","transportOptions","headers","beforeSend","event","hint","error","originalException","AxiosError","includes","status","replaysOnErrorSampleRate","push","maskAllText"],"sourceRoot":""}