{"ast":null,"code":"\"use strict\";\n\nimport * as React from 'react';\nimport Dimensions from \"react-native-web/dist/exports/Dimensions\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { initialWindowMetrics, SafeAreaInsetsContext, SafeAreaProvider } from 'react-native-safe-area-context';\nimport { FrameSizeProvider } from \"./useFrameSize.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst {\n  width = 0,\n  height = 0\n} = Dimensions.get('window');\nconst initialMetrics = Platform.OS === 'web' || initialWindowMetrics == null ? {\n  frame: {\n    x: 0,\n    y: 0,\n    width,\n    height\n  },\n  insets: {\n    top: 0,\n    left: 0,\n    right: 0,\n    bottom: 0\n  }\n} : initialWindowMetrics;\nexport function SafeAreaProviderCompat({\n  children,\n  style\n}) {\n  const insets = React.useContext(SafeAreaInsetsContext);\n  children = _jsx(FrameSizeProvider, {\n    initialFrame: initialMetrics.frame,\n    children: children\n  });\n  if (insets) {\n    return _jsx(View, {\n      style: [styles.container, style],\n      children: children\n    });\n  }\n  return _jsx(SafeAreaProvider, {\n    initialMetrics: initialMetrics,\n    style: style,\n    children: children\n  });\n}\nSafeAreaProviderCompat.initialMetrics = initialMetrics;\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1\n  }\n});","map":{"version":3,"names":["React","Dimensions","Platform","StyleSheet","View","initialWindowMetrics","SafeAreaInsetsContext","SafeAreaProvider","FrameSizeProvider","jsx","_jsx","width","height","get","initialMetrics","OS","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","useContext","initialFrame","styles","container","create","flex"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/elements/src/SafeAreaProviderCompat.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n  Dimensions,\n  Platform,\n  type StyleProp,\n  StyleSheet,\n  View,\n  type ViewStyle,\n} from 'react-native';\nimport {\n  initialWindowMetrics,\n  SafeAreaInsetsContext,\n  SafeAreaProvider,\n} from 'react-native-safe-area-context';\n\nimport { FrameSizeProvider } from './useFrameSize';\n\ntype Props = {\n  children: React.ReactNode;\n  style?: StyleProp<ViewStyle>;\n};\n\nconst { width = 0, height = 0 } = Dimensions.get('window');\n\n// To support SSR on web, we need to have empty insets for initial values\n// Otherwise there can be mismatch between SSR and client output\n// We also need to specify empty values to support tests environments\nconst initialMetrics =\n  Platform.OS === 'web' || initialWindowMetrics == null\n    ? {\n        frame: { x: 0, y: 0, width, height },\n        insets: { top: 0, left: 0, right: 0, bottom: 0 },\n      }\n    : initialWindowMetrics;\n\nexport function SafeAreaProviderCompat({ children, style }: Props) {\n  const insets = React.useContext(SafeAreaInsetsContext);\n\n  children = (\n    <FrameSizeProvider initialFrame={initialMetrics.frame}>\n      {children}\n    </FrameSizeProvider>\n  );\n\n  if (insets) {\n    // If we already have insets, don't wrap the stack in another safe area provider\n    // This avoids an issue with updates at the cost of potentially incorrect values\n    // https://github.com/react-navigation/react-navigation/issues/174\n    return <View style={[styles.container, style]}>{children}</View>;\n  }\n\n  return (\n    <SafeAreaProvider initialMetrics={initialMetrics} style={style}>\n      {children}\n    </SafeAreaProvider>\n  );\n}\n\nSafeAreaProviderCompat.initialMetrics = initialMetrics;\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n  },\n});\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,QAAA;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAS9B,SACEC,oBAAoB,EACpBC,qBAAqB,EACrBC,gBAAgB,QACX,gCAAgC;AAEvC,SAASC,iBAAiB;AAAyB,SAAAC,GAAA,IAAAC,IAAA;AAOnD,MAAM;EAAEC,KAAK,GAAG,CAAC;EAAEC,MAAM,GAAG;AAAE,CAAC,GAAGX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC;AAK1D,MAAMC,c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