{"ast":null,"code":"import PropTypes from 'prop-types';\nimport { allEvents } from 'make-event-props';\nimport pdfjs from '../pdfjs.js';\nimport { isDefined } from './utils.js';\nimport LinkService from '../LinkService.js';\nconst {\n  PDFDataRangeTransport\n} = pdfjs;\nexport const eventProps = (() => {\n  const result = {};\n  allEvents.forEach(eventName => {\n    result[eventName] = PropTypes.func;\n  });\n  return result;\n})();\nconst isTypedArray = PropTypes.oneOfType([PropTypes.instanceOf(Int8Array), PropTypes.instanceOf(Uint8Array), PropTypes.instanceOf(Uint8ClampedArray), PropTypes.instanceOf(Int16Array), PropTypes.instanceOf(Uint16Array), PropTypes.instanceOf(Int32Array), PropTypes.instanceOf(Uint32Array), PropTypes.instanceOf(Float32Array), PropTypes.instanceOf(Float64Array)]);\nconst fileTypes = [PropTypes.string, PropTypes.instanceOf(ArrayBuffer), PropTypes.shape({\n  data: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(ArrayBuffer), PropTypes.arrayOf(PropTypes.number.isRequired), isTypedArray]).isRequired\n}), PropTypes.shape({\n  range: PropTypes.instanceOf(PDFDataRangeTransport).isRequired\n}), PropTypes.shape({\n  url: PropTypes.string.isRequired\n})];\nif (typeof Blob !== 'undefined') {\n  fileTypes.push(PropTypes.instanceOf(Blob));\n}\nexport const isClassName = PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]);\nexport const isFile = PropTypes.oneOfType(fileTypes);\nexport const isLinkService = PropTypes.instanceOf(LinkService);\nexport const isLinkTarget = PropTypes.oneOf(['_self', '_blank', '_parent', '_top']);\nexport const isPage = PropTypes.shape({\n  commonObjs: PropTypes.shape({}).isRequired,\n  getAnnotations: PropTypes.func.isRequired,\n  getTextContent: PropTypes.func.isRequired,\n  getViewport: PropTypes.func.isRequired,\n  render: PropTypes.func.isRequired\n});\nexport const isPageIndex = function isPageIndex(props, propName, componentName) {\n  const {\n    [propName]: pageIndex,\n    pageNumber,\n    pdf\n  } = props;\n  if (!isDefined(pdf)) {\n    return null;\n  }\n  if (isDefined(pageIndex)) {\n    if (typeof pageIndex !== 'number') {\n      return new Error(`\\`${propName}\\` of type \\`${typeof pageIndex}\\` supplied to \\`${componentName}\\`, expected \\`number\\`.`);\n    }\n    if (pageIndex < 0) {\n      return new Error(`Expected \\`${propName}\\` to be greater or equal to 0.`);\n    }\n    const {\n      numPages\n    } = pdf;\n    if (pageIndex + 1 > numPages) {\n      return new Error(`Expected \\`${propName}\\` to be less or equal to ${numPages - 1}.`);\n    }\n  } else if (!isDefined(pageNumber)) {\n    return new Error(`\\`${propName}\\` not supplied. Either pageIndex or pageNumber must be supplied to \\`${componentName}\\`.`);\n  }\n  // Everything is fine\n  return null;\n};\nexport const isPageNumber = function isPageNumber(props, propName, componentName) {\n  const {\n    [propName]: pageNumber,\n    pageIndex,\n    pdf\n  } = props;\n  if (!isDefined(pdf)) {\n    return null;\n  }\n  if (isDefined(pageNumber)) {\n    if (typeof pageNumber !== 'number') {\n      return new Error(`\\`${propName}\\` of type \\`${typeof pageNumber}\\` supplied to \\`${componentName}\\`, expected \\`number\\`.`);\n    }\n    if (pageNumber < 1) {\n      return new Error(`Expected \\`${propName}\\` to be greater or equal to 1.`);\n    }\n    const {\n      numPages\n    } = pdf;\n    if (pageNumber > numPages) {\n      return new Error(`Expected \\`${propName}\\` to be less or equal to ${numPages}.`);\n    }\n  } else if (!isDefined(pageIndex)) {\n    return new Error(`\\`${propName}\\` not supplied. Either pageIndex or pageNumber must be supplied to \\`${componentName}\\`.`);\n  }\n  // Everything is fine\n  return null;\n};\nexport const isPdf = PropTypes.oneOfType([\n// Ideally, this would be `PropTypes.instanceOf(PDFDocumentProxy)`, but it can't be imported.\nPropTypes.any, PropTypes.oneOf([false])]);\nexport const isRef = PropTypes.oneOfType([PropTypes.func, PropTypes.exact({\n  current: PropTypes.any\n})]);\nexport const isRenderMode = PropTypes.oneOf(['canvas', 'custom', 'none', 'svg']);\nexport const isRotate = PropTypes.oneOf([0, 90, 180, 270]);","map":{"version":3,"names":["PropTypes","allEvents","pdfjs","isDefined","LinkService","PDFDataRangeTransport","eventProps","result","forEach","eventName","func","isTypedArray","oneOfType","instanceOf","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","fileTypes","string","ArrayBuffer","shape","data","arrayOf","number","isRequired","range","url","Blob","push","isClassName","isFile","isLinkService","isLinkTarget","oneOf","isPage","commonObjs","getAnnotations","getTextContent","getViewport","render","isPageIndex","props","propName","componentName","pageIndex","pageNumber","pdf","Error","numPages","isPageNumber","isPdf","any","isRef","exact","current","isRenderMode","isRotate"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/node_modules/react-pdf/dist/esm/shared/propTypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { allEvents } from 'make-event-props';\nimport pdfjs from '../pdfjs.js';\nimport { isDefined } from './utils.js';\nimport LinkService from '../LinkService.js';\nconst { PDFDataRangeTransport } = pdfjs;\nexport const eventProps = (() => {\n    const result = {};\n    allEvents.forEach((eventName) => {\n        result[eventName] = PropTypes.func;\n    });\n    return result;\n})();\nconst isTypedArray = PropTypes.oneOfType([\n    PropTypes.instanceOf(Int8Array),\n    PropTypes.instanceOf(Uint8Array),\n    PropTypes.instanceOf(Uint8ClampedArray),\n    PropTypes.instanceOf(Int16Array),\n    PropTypes.instanceOf(Uint16Array),\n    PropTypes.instanceOf(Int32Array),\n    PropTypes.instanceOf(Uint32Array),\n    PropTypes.instanceOf(Float32Array),\n    PropTypes.instanceOf(Float64Array),\n]);\nconst fileTypes = [\n    PropTypes.string,\n    PropTypes.instanceOf(ArrayBuffer),\n    PropTypes.shape({\n        data: PropTypes.oneOfType([\n            PropTypes.string,\n            PropTypes.instanceOf(ArrayBuffer),\n            PropTypes.arrayOf(PropTypes.number.isRequired),\n            isTypedArray,\n        ]).isRequired,\n    }),\n    PropTypes.shape({\n        range: PropTypes.instanceOf(PDFDataRangeTransport).isRequired,\n    }),\n    PropTypes.shape({\n        url: PropTypes.string.isRequired,\n    }),\n];\nif (typeof Blob !== 'undefined') {\n    fileTypes.push(PropTypes.instanceOf(Blob));\n}\nexport const isClassName = PropTypes.oneOfType([\n    PropTypes.string,\n    PropTypes.arrayOf(PropTypes.string),\n]);\nexport const isFile = PropTypes.oneOfType(fileTypes);\nexport const isLinkService = PropTypes.instanceOf(LinkService);\nexport const isLinkTarget = PropTypes.oneOf(['_self', '_blank', '_parent', '_top']);\nexport const isPage = PropTypes.shape({\n    commonObjs: PropTypes.shape({}).isRequired,\n    getAnnotations: PropTypes.func.isRequired,\n    getTextContent: PropTypes.func.isRequired,\n    getViewport: PropTypes.func.isRequired,\n    render: PropTypes.func.isRequired,\n});\nexport const isPageIndex = function isPageIndex(props, propName, componentName) {\n    const { [propName]: pageIndex, pageNumber, pdf } = props;\n    if (!isDefined(pdf)) {\n        return null;\n    }\n    if (isDefined(pageIndex)) {\n        if (typeof pageIndex !== 'number') {\n            return new Error(`\\`${propName}\\` of type \\`${typeof pageIndex}\\` supplied to \\`${componentName}\\`, expected \\`number\\`.`);\n        }\n        if (pageIndex < 0) {\n            return new Error(`Expected \\`${propName}\\` to be greater or equal to 0.`);\n        }\n        const { numPages } = pdf;\n        if (pageIndex + 1 > numPages) {\n            return new Error(`Expected \\`${propName}\\` to be less or equal to ${numPages - 1}.`);\n        }\n    }\n    else if (!isDefined(pageNumber)) {\n        return new Error(`\\`${propName}\\` not supplied. Either pageIndex or pageNumber must be supplied to \\`${componentName}\\`.`);\n    }\n    // Everything is fine\n    return null;\n};\nexport const isPageNumber = function isPageNumber(props, propName, componentName) {\n    const { [propName]: pageNumber, pageIndex, pdf } = props;\n    if (!isDefined(pdf)) {\n        return null;\n    }\n    if (isDefined(pageNumber)) {\n        if (typeof pageNumber !== 'number') {\n            return new Error(`\\`${propName}\\` of type \\`${typeof pageNumber}\\` supplied to \\`${componentName}\\`, expected \\`number\\`.`);\n        }\n        if (pageNumber < 1) {\n            return new Error(`Expected \\`${propName}\\` to be greater or equal to 1.`);\n        }\n        const { numPages } = pdf;\n        if (pageNumber > numPages) {\n            return new Error(`Expected \\`${propName}\\` to be less or equal to ${numPages}.`);\n        }\n    }\n    else if (!isDefined(pageIndex)) {\n        return new Error(`\\`${propName}\\` not supplied. Either pageIndex or pageNumber must be supplied to \\`${componentName}\\`.`);\n    }\n    // Everything is fine\n    return null;\n};\nexport const isPdf = PropTypes.oneOfType([\n    // Ideally, this would be `PropTypes.instanceOf(PDFDocumentProxy)`, but it can't be imported.\n    PropTypes.any,\n    PropTypes.oneOf([false]),\n]);\nexport const isRef = PropTypes.oneOfType([\n    PropTypes.func,\n    PropTypes.exact({\n        current: PropTypes.any,\n    }),\n]);\nexport const isRenderMode = PropTypes.oneOf(['canvas', 'custom', 'none', 'svg']);\nexport const isRotate = PropTypes.oneOf([0, 90, 180, 270]);\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,OAAOC,KAAK,MAAM,aAAa;AAC/B,SAASC,SAAS,QAAQ,YAAY;AACtC,OAAOC,WAAW,MAAM,mBAAmB;AAC3C,MAAM;EAAEC;AAAsB,CAAC,GAAGH,KAAK;AACvC,OAAO,MAAMI,UAAU,GAAG,CAAC,MAAM;EAC7B,MAAMC,MAAM,GAAG,CAAC,CAAC;EACjBN,SAAS,CAACO,OAAO,CAAEC,SAAS,IAAK;IAC7BF,MAAM,CAACE,SAAS,CAAC,GAAGT,SAAS,CAACU,IAAI;EACtC,CAAC,CAAC;EACF,OAAOH,MAAM;AACjB,CAAC,EAAE,CAAC;AACJ,MAAMI,YAAY,GAAGX,SAAS,CAACY,SAAS,CAAC,CACrCZ,SAAS,CAACa,UAAU,CAACC,SAAS,CAAC,EAC/Bd,SAAS,CAACa,UAAU,CAACE,UAAU,CAAC,EAChCf,SAAS,CAACa,UAAU,CAACG,iBAAiB,CAAC,EACvChB,SAAS,CAACa,UAAU,CAACI,UAAU,CAAC,EAChCjB,SAAS,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