{"ast":null,"code":"'use client';\n\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"animationType\", \"children\", \"onDismiss\", \"onRequestClose\", \"onShow\", \"transparent\", \"visible\"];\nimport * as React from 'react';\nimport ModalPortal from \"./ModalPortal\";\nimport ModalAnimation from \"./ModalAnimation\";\nimport ModalContent from \"./ModalContent\";\nimport ModalFocusTrap from \"./ModalFocusTrap\";\nvar uniqueModalIdentifier = 0;\nvar activeModalStack = [];\nvar activeModalListeners = {};\nfunction notifyActiveModalListeners() {\n  if (activeModalStack.length === 0) {\n    return;\n  }\n  var activeModalId = activeModalStack[activeModalStack.length - 1];\n  activeModalStack.forEach(modalId => {\n    if (modalId in activeModalListeners) {\n      activeModalListeners[modalId](modalId === activeModalId);\n    }\n  });\n}\nfunction removeActiveModal(modalId) {\n  if (modalId in activeModalListeners) {\n    activeModalListeners[modalId](false);\n    delete activeModalListeners[modalId];\n  }\n  var index = activeModalStack.indexOf(modalId);\n  if (index !== -1) {\n    activeModalStack.splice(index, 1);\n    notifyActiveModalListeners();\n  }\n}\nfunction addActiveModal(modalId, listener) {\n  removeActiveModal(modalId);\n  activeModalStack.push(modalId);\n  activeModalListeners[modalId] = listener;\n  notifyActiveModalListeners();\n}\nvar Modal = React.forwardRef((props, forwardedRef) => {\n  var animationType = props.animationType,\n    children = props.children,\n    onDismiss = props.onDismiss,\n    onRequestClose = props.onRequestClose,\n    onShow = props.onShow,\n    transparent = props.transparent,\n    _props$visible = props.visible,\n    visible = _props$visible === void 0 ? true : _props$visible,\n    rest = _objectWithoutPropertiesLoose(props, _excluded);\n  var modalId = React.useMemo(() => uniqueModalIdentifier++, []);\n  var _React$useState = React.useState(false),\n    isActive = _React$useState[0],\n    setIsActive = _React$useState[1];\n  var onDismissCallback = React.useCallback(() => {\n    removeActiveModal(modalId);\n    if (onDismiss) {\n      onDismiss();\n    }\n  }, [modalId, onDismiss]);\n  var onShowCallback = React.useCallback(() => {\n    addActiveModal(modalId, setIsActive);\n    if (onShow) {\n      onShow();\n    }\n  }, [modalId, onShow]);\n  React.useEffect(() => {\n    return () => removeActiveModal(modalId);\n  }, [modalId]);\n  return React.createElement(ModalPortal, null, React.createElement(ModalAnimation, {\n    animationType: animationType,\n    onDismiss: onDismissCallback,\n    onShow: onShowCallback,\n    visible: visible\n  }, React.createElement(ModalFocusTrap, {\n    active: isActive\n  }, React.createElement(ModalContent, _extends({}, rest, {\n    active: isActive,\n    onRequestClose: onRequestClose,\n    ref: forwardedRef,\n    transparent: transparent\n  }), children))));\n});\nexport default Modal;","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","React","ModalPortal","ModalAnimation","ModalContent","ModalFocusTrap","uniqueModalIdentifier","activeModalStack","activeModalListeners","notifyActiveModalListeners","length","activeModalId","forEach","modalId","removeActiveModal","index","indexOf","splice","addActiveModal","listener","push","Modal","forwardRef","props","forwardedRef","animationType","children","onDismiss","onRequestClose","onShow","transparent","_props$visible","visible","rest","useMemo","_React$useState","useState","isActive","setIsActive","onDismissCallback","useCallback","onShowCallback","useEffect","createElement","active","ref"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/exports/Modal/index.js"],"sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n'use client';\n\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"animationType\", \"children\", \"onDismiss\", \"onRequestClose\", \"onShow\", \"transparent\", \"visible\"];\nimport * as React from 'react';\nimport ModalPortal from './ModalPortal';\nimport ModalAnimation from './ModalAnimation';\nimport ModalContent from './ModalContent';\nimport ModalFocusTrap from './ModalFocusTrap';\nvar uniqueModalIdentifier = 0;\nvar activeModalStack = [];\nvar activeModalListeners = {};\nfunction notifyActiveModalListeners() {\n  if (activeModalStack.length === 0) {\n    return;\n  }\n  var activeModalId = activeModalStack[activeModalStack.length - 1];\n  activeModalStack.forEach(modalId => {\n    if (modalId in activeModalListeners) {\n      activeModalListeners[modalId](modalId === activeModalId);\n    }\n  });\n}\nfunction removeActiveModal(modalId) {\n  if (modalId in activeModalListeners) {\n    // Before removing this listener we should probably tell it\n    // that it's no longer the active modal for sure.\n    activeModalListeners[modalId](false);\n    delete activeModalListeners[modalId];\n  }\n  var index = activeModalStack.indexOf(modalId);\n  if (index !== -1) {\n    activeModalStack.splice(index, 1);\n    notifyActiveModalListeners();\n  }\n}\nfunction addActiveModal(modalId, listener) {\n  removeActiveModal(modalId);\n  activeModalStack.push(modalId);\n  activeModalListeners[modalId] = listener;\n  notifyActiveModalListeners();\n}\nvar Modal = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {\n  var animationType = props.animationType,\n    children = props.children,\n    onDismiss = props.onDismiss,\n    onRequestClose = props.onRequestClose,\n    onShow = props.onShow,\n    transparent = props.transparent,\n    _props$visible = props.visible,\n    visible = _props$visible === void 0 ? true : _props$visible,\n    rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n  // Set a unique model identifier so we can correctly route\n  // dismissals and check the layering of modals.\n  var modalId = React.useMemo(() => uniqueModalIdentifier++, []);\n  var _React$useState = React.useState(false),\n    isActive = _React$useState[0],\n    setIsActive = _React$useState[1];\n  var onDismissCallback = React.useCallback(() => {\n    removeActiveModal(modalId);\n    if (onDismiss) {\n      onDismiss();\n    }\n  }, [modalId, onDismiss]);\n  var onShowCallback = React.useCallback(() => {\n    addActiveModal(modalId, setIsActive);\n    if (onShow) {\n      onShow();\n    }\n  }, [modalId, onShow]);\n  React.useEffect(() => {\n    return () => removeActiveModal(modalId);\n  }, [modalId]);\n  return /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(ModalAnimation, {\n    animationType: animationType,\n    onDismiss: onDismissCallback,\n    onShow: onShowCallback,\n    visible: visible\n  }, /*#__PURE__*/React.createElement(ModalFocusTrap, {\n    active: isActive\n  }, /*#__PURE__*/React.createElement(ModalContent, _extends({}, rest, {\n    active: isActive,\n    onRequestClose: onRequestClose,\n    ref: forwardedRef,\n    transparent: transparent\n  }), children))));\n});\nexport default Modal;"],"mappings":"AAUA,YAAY;;AAEZ,OAAOA,QAAQ,MAAM,gCAAgC;AACrD,OAAOC,6BAA6B,MAAM,qDAAqD;AAC/F,IAAIC,SAAS,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,CAAC;AAChH,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,WAAW;AAClB,OAAOC,cAAc;AACrB,OAAOC,YAAY;AACnB,OAAOC,cAAc;AACrB,IAAIC,qBAAqB,GAAG,CAAC;AAC7B,IAAIC,gBAAgB,GAAG,EAAE;AACzB,IAAIC,oBAAoB,GAAG,CAAC,CAAC;AAC7B,SAASC,0BAA0BA,CAAA,EAAG;EACpC,IAAIF,gBAAgB,CAACG,MAAM,KAAK,CAAC,EAAE;IACjC;EACF;EACA,IAAIC,aAAa,GAAGJ,gBAAgB,CAACA,gBAAgB,CAACG,MAAM,GAAG,CAAC,CAAC;EACjEH,gBAAgB,CAACK,OAAO,CAACC,OAAO,IAAI;IAClC,IAAIA,OAAO,IAAIL,oBAAoB,EAAE;MACnCA,oBAAoB,CAACK,OAAO,CAAC,CAACA,OAAO,KAAKF,aAAa,CAAC;IAC1D;EACF,CAAC,CAAC;AACJ;AACA,SAASG,iBAAiBA,CAACD,OAAO,EAAE;EAClC,IAAIA,OAAO,IAAIL,oBAAoB,EAAE;IAGnCA,oBAAoB,CAACK,OAAO,CAAC,CAAC,KAAK,CAAC;IACpC,OAAOL,oBAAoB,CAACK,OAAO,CAAC;EACtC;EACA,IAAIE,K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