UNPKG

206 kBSource Map (JSON)View Raw
1{"version":3,"file":"react-pdf.browser.cjs.min.js","sources":["../src/utils/warning.js","../src/elements/Root.js","../src/utils/upperFirst.js","../src/utils/matchPercent.js","../src/elements/Node.js","../src/stylesheet/yogaValue.js","../src/stylesheet/transformUnits.js","../src/stylesheet/borders.js","../src/stylesheet/boxModel.js","../src/stylesheet/transformFontWeight.js","../src/stylesheet/objectPosition.js","../src/stylesheet/transformOrigin.js","../src/stylesheet/transformStyles.js","../src/stylesheet/index.js","../src/mixins/debug.js","../src/mixins/borders.js","../src/mixins/clipping.js","../src/mixins/transform.js","../src/utils/deepMerge.js","../src/utils/isFunction.js","../src/stylesheet/inherit.js","../src/elements/Base.js","../src/mixins/ruler.js","../src/elements/TextInstance.js","../src/utils/pageSizes.js","../src/elements/Page.js","../src/elements/View.js","../src/font/font.js","../src/font/emoji.js","../src/font/hyphenation.js","../src/font/standard.js","../src/font/index.js","../src/layout/fontSubstitution/standardFont.js","../src/layout/fontSubstitution/index.js","../src/layout/index.js","../src/utils/url.js","../src/utils/png.js","../src/utils/jpeg.js","../src/utils/cache.js","../src/utils/image.js","../src/utils/emoji.js","../src/utils/ignorableChars.js","../src/utils/attributedString.js","../src/elements/Text.js","../src/elements/Link.js","../src/elements/Note.js","../src/utils/objectFit.js","../src/elements/Image.js","../src/elements/Document.js","../src/utils/painter.js","../src/elements/Canvas.js","../src/elements/index.js","../src/utils/propsEqual.js","../src/renderer.js","../src/index.js","../src/dom.js"],"sourcesContent":["function printWarning(format, ...args) {\n let argIndex = 0;\n const message = 'Warning: ' + format.replace(/%s/g, () => args[argIndex++]);\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n throw new Error(message);\n } catch (x) {}\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production';\n\nconst warning = __DEV__\n ? (condition, format, ...args) => {\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument',\n );\n }\n if (!condition) {\n printWarning(format, ...args);\n }\n }\n : () => {};\n\nexport default warning;\n","import PDFDocument from '@react-pdf/pdfkit';\n\nclass Root {\n constructor() {\n this.isDirty = false;\n this.document = null;\n this.instance = null;\n }\n\n get name() {\n return 'Root';\n }\n\n appendChild(child) {\n this.document = child;\n }\n\n removeChild() {\n this.document.cleanup();\n this.document = null;\n }\n\n markDirty() {\n this.isDirty = true;\n }\n\n cleanup() {\n this.document.cleanup();\n }\n\n finish() {\n this.document.finish();\n }\n\n async render() {\n this.instance = new PDFDocument({ autoFirstPage: false });\n await this.document.render();\n this.cleanup();\n this.isDirty = false;\n }\n}\n\nexport default Root;\n","const upperFirst = value => value.charAt(0).toUpperCase() + value.slice(1);\n\nexport default upperFirst;\n","const isPercent = value => /((-)?\\d+\\.?\\d*)%/g.exec(value);\n\nconst matchPercent = value => {\n const match = isPercent(value);\n\n if (match) {\n const value = parseFloat(match[1], 10);\n const percent = value / 100;\n\n return {\n value,\n percent,\n absValue: Math.abs(value),\n absPercent: Math.abs(percent),\n };\n }\n\n return null;\n};\n\nexport default matchPercent;\n","import Yoga from 'yoga-layout';\n\nimport upperFirst from '../utils/upperFirst';\nimport matchPercent from '../utils/matchPercent';\n\nclass Node {\n constructor() {\n this.parent = null;\n this.children = [];\n this.computed = false;\n this.layout = Yoga.Node.createDefault();\n }\n\n appendChild(child) {\n if (child) {\n child.parent = this;\n this.children.push(child);\n this.layout.insertChild(child.layout, this.layout.getChildCount());\n }\n }\n\n appendChildBefore(child, beforeChild) {\n const index = this.children.indexOf(beforeChild);\n\n if (index !== -1 && child) {\n child.parent = this;\n this.children.splice(index, 0, child);\n this.layout.insertChild(child.layout, index);\n }\n }\n\n removeChild(child) {\n const index = this.children.indexOf(child);\n\n if (index !== -1) {\n child.parent = null;\n this.children.splice(index, 1);\n this.layout.removeChild(child.layout);\n }\n\n child.cleanup();\n }\n\n removeAllChilds() {\n const children = [...this.children];\n for (let i = 0; i < children.length; i++) {\n children[i].remove();\n }\n }\n\n remove() {\n this.parent.removeChild(this);\n }\n\n setDimension(attr, value) {\n const fixedMethod = `set${upperFirst(attr)}`;\n const percentMethod = `${fixedMethod}Percent`;\n const percent = matchPercent(value);\n\n if (percent) {\n this.layout[percentMethod](percent.value);\n } else {\n this.layout[fixedMethod](value);\n }\n }\n\n setPosition(edge, value) {\n const percent = matchPercent(value);\n\n if (percent) {\n this.layout.setPositionPercent(edge, percent.value);\n } else {\n this.layout.setPosition(edge, value);\n }\n }\n\n setPadding(edge, value) {\n const percent = matchPercent(value);\n\n if (percent) {\n this.layout.setPaddingPercent(edge, percent.value);\n } else {\n this.layout.setPadding(edge, value);\n }\n }\n\n setMargin(edge, value) {\n const percent = matchPercent(value);\n\n if (percent) {\n this.layout.setMarginPercent(edge, percent.value);\n } else {\n this.layout.setMargin(edge, value);\n }\n }\n\n setBorder(edge, value) {\n if (matchPercent(value)) {\n throw new Error('Node: You cannot set percentage border widths');\n }\n this.layout.setBorder(edge, value);\n }\n\n getAbsoluteLayout() {\n const parent = this.parent;\n const parentLayout =\n parent && parent.getAbsoluteLayout\n ? parent.getAbsoluteLayout()\n : { left: 0, top: 0 };\n\n return {\n left: this.left + parentLayout.left,\n top: this.top + parentLayout.top,\n height: this.height,\n width: this.width,\n };\n }\n\n copyStyle(node) {\n this.layout.copyStyle(node.layout);\n }\n\n calculateLayout() {\n this.layout.calculateLayout();\n this.computed = true;\n }\n\n isEmpty() {\n return this.children.length === 0;\n }\n\n markDirty() {\n return this.layout.markDirty();\n }\n\n onAppendDynamically() {}\n\n cleanup() {\n this.children.forEach(c => c.cleanup());\n this.layout.unsetMeasureFunc();\n Yoga.Node.destroy(this.layout);\n }\n\n get position() {\n return this.layout.getPositionType() === Yoga.POSITION_TYPE_ABSOLUTE\n ? 'absolute'\n : 'relative';\n }\n\n get top() {\n return this.layout.getComputedTop() || 0;\n }\n\n get left() {\n return this.layout.getComputedLeft() || 0;\n }\n\n get right() {\n return this.layout.getComputedRight() || 0;\n }\n\n get bottom() {\n return this.layout.getComputedBottom() || 0;\n }\n\n get width() {\n return this.layout.getComputedWidth();\n }\n\n get minWidth() {\n return this.layout.getMinWidth().value;\n }\n\n get maxWidth() {\n return this.layout.getMaxWidth().value;\n }\n\n get height() {\n return this.layout.getComputedHeight();\n }\n\n get minHeight() {\n return this.layout.getMinHeight().value;\n }\n\n get maxHeight() {\n return this.layout.getMaxHeight().value;\n }\n\n get paddingTop() {\n return this.layout.getComputedPadding(Yoga.EDGE_TOP) || 0;\n }\n\n get paddingRight() {\n return this.layout.getComputedPadding(Yoga.EDGE_RIGHT) || 0;\n }\n\n get paddingBottom() {\n return this.layout.getComputedPadding(Yoga.EDGE_BOTTOM) || 0;\n }\n\n get paddingLeft() {\n return this.layout.getComputedPadding(Yoga.EDGE_LEFT) || 0;\n }\n\n get marginTop() {\n return this.layout.getComputedMargin(Yoga.EDGE_TOP) || 0;\n }\n\n get marginRight() {\n return this.layout.getComputedMargin(Yoga.EDGE_RIGHT) || 0;\n }\n\n get marginBottom() {\n return this.layout.getComputedMargin(Yoga.EDGE_BOTTOM) || 0;\n }\n\n get marginLeft() {\n return this.layout.getComputedMargin(Yoga.EDGE_LEFT) || 0;\n }\n\n get borderTopWidth() {\n return this.layout.getComputedBorder(Yoga.EDGE_TOP) || 0;\n }\n\n get borderRightWidth() {\n return this.layout.getComputedBorder(Yoga.EDGE_RIGHT) || 0;\n }\n\n get borderBottomWidth() {\n return this.layout.getComputedBorder(Yoga.EDGE_BOTTOM) || 0;\n }\n\n get borderLeftWidth() {\n return this.layout.getComputedBorder(Yoga.EDGE_LEFT) || 0;\n }\n\n get padding() {\n return {\n top: this.paddingTop,\n right: this.paddingRight,\n bottom: this.paddingBottom,\n left: this.paddingLeft,\n };\n }\n\n get margin() {\n return {\n top: this.marginTop,\n right: this.marginRight,\n bottom: this.marginBottom,\n left: this.marginLeft,\n };\n }\n\n set position(value) {\n this.layout.setPositionType(\n value === 'absolute'\n ? Yoga.POSITION_TYPE_ABSOLUTE\n : Yoga.POSITION_TYPE_RELATIVE,\n );\n }\n\n set top(value) {\n this.setPosition(Yoga.EDGE_TOP, value);\n }\n\n set left(value) {\n this.setPosition(Yoga.EDGE_LEFT, value);\n }\n\n set right(value) {\n this.setPosition(Yoga.EDGE_RIGHT, value);\n }\n\n set bottom(value) {\n this.setPosition(Yoga.EDGE_BOTTOM, value);\n }\n\n set width(value) {\n this.setDimension('width', value);\n }\n\n set minWidth(value) {\n this.setDimension('minWidth', value);\n }\n\n set maxWidth(value) {\n this.setDimension('maxWidth', value);\n }\n\n set height(value) {\n this.setDimension('height', value);\n }\n\n set minHeight(value) {\n this.setDimension('minHeight', value);\n }\n\n set maxHeight(value) {\n this.setDimension('maxHeight', value);\n }\n\n set paddingTop(value) {\n this.setPadding(Yoga.EDGE_TOP, value);\n }\n\n set paddingRight(value) {\n this.setPadding(Yoga.EDGE_RIGHT, value);\n }\n\n set paddingBottom(value) {\n this.setPadding(Yoga.EDGE_BOTTOM, value);\n }\n\n set paddingLeft(value) {\n this.setPadding(Yoga.EDGE_LEFT, value);\n }\n\n set marginTop(value) {\n this.setMargin(Yoga.EDGE_TOP, value);\n }\n\n set marginRight(value) {\n this.setMargin(Yoga.EDGE_RIGHT, value);\n }\n\n set marginBottom(value) {\n this.setMargin(Yoga.EDGE_BOTTOM, value);\n }\n\n set marginLeft(value) {\n this.setMargin(Yoga.EDGE_LEFT, value);\n }\n\n set padding(value) {\n this.paddingTop = value;\n this.paddingRight = value;\n this.paddingBottom = value;\n this.paddingLeft = value;\n }\n\n set margin(value) {\n this.marginTop = value;\n this.marginRight = value;\n this.marginBottom = value;\n this.marginLeft = value;\n }\n\n set borderTopWidth(value) {\n this.setBorder(Yoga.EDGE_TOP, value);\n }\n\n set borderRightWidth(value) {\n this.setBorder(Yoga.EDGE_RIGHT, value);\n }\n\n set borderBottomWidth(value) {\n this.setBorder(Yoga.EDGE_BOTTOM, value);\n }\n\n set borderLeftWidth(value) {\n this.setBorder(Yoga.EDGE_LEFT, value);\n }\n}\n\nexport default Node;\n","import Yoga from 'yoga-layout';\n\nconst yogaValue = (prop, value) => {\n const isAlignType = prop =>\n prop === 'alignItems' || prop === 'alignContent' || prop === 'alignSelf';\n\n switch (value) {\n case 'auto':\n if (prop === 'alignSelf') {\n return Yoga.ALIGN_AUTO;\n }\n break;\n case 'flex':\n return Yoga.DISPLAY_FLEX;\n case 'none':\n return Yoga.DISPLAY_NONE;\n case 'row':\n return Yoga.FLEX_DIRECTION_ROW;\n case 'row-reverse':\n return Yoga.FLEX_DIRECTION_ROW_REVERSE;\n case 'column':\n return Yoga.FLEX_DIRECTION_COLUMN;\n case 'column-reverse':\n return Yoga.FLEX_DIRECTION_COLUMN_REVERSE;\n case 'stretch':\n return Yoga.ALIGN_STRETCH;\n case 'baseline':\n return Yoga.ALIGN_BASELINE;\n case 'space-around':\n if (prop === 'justifyContent') {\n return Yoga.JUSTIFY_SPACE_AROUND;\n } else if (isAlignType(prop)) {\n return Yoga.ALIGN_SPACE_AROUND;\n }\n break;\n case 'space-between':\n if (prop === 'justifyContent') {\n return Yoga.JUSTIFY_SPACE_BETWEEN;\n } else if (isAlignType(prop)) {\n return Yoga.ALIGN_SPACE_BETWEEN;\n }\n break;\n case 'around':\n return Yoga.JUSTIFY_SPACE_AROUND;\n case 'between':\n return Yoga.JUSTIFY_SPACE_BETWEEN;\n case 'wrap':\n return Yoga.WRAP_WRAP;\n case 'wrap-reverse':\n return Yoga.WRAP_WRAP_REVERSE;\n case 'nowrap':\n return Yoga.WRAP_NO_WRAP;\n case 'flex-start':\n if (prop === 'justifyContent') {\n return Yoga.JUSTIFY_FLEX_START;\n } else if (isAlignType(prop)) {\n return Yoga.ALIGN_FLEX_START;\n }\n break;\n case 'flex-end':\n if (prop === 'justifyContent') {\n return Yoga.JUSTIFY_FLEX_END;\n } else if (isAlignType(prop)) {\n return Yoga.ALIGN_FLEX_END;\n }\n break;\n case 'center':\n if (prop === 'justifyContent') {\n return Yoga.JUSTIFY_CENTER;\n } else if (isAlignType(prop)) {\n return Yoga.ALIGN_CENTER;\n }\n break;\n default:\n return value;\n }\n};\n\n// These are not supported yet\n\n// ALIGN_AUTO: 0,\n// DIMENSION_WIDTH: 0,\n// DIMENSION_HEIGHT: 1,\n// DIRECTION_INHERIT: 0,\n// DIRECTION_LTR: 1,\n// DIRECTION_RTL: 2,\n// EDGE_LEFT: 0,\n// EDGE_TOP: 1,\n// EDGE_RIGHT: 2,\n// EDGE_BOTTOM: 3,\n// EDGE_START: 4,\n// EDGE_END: 5,\n// EDGE_HORIZONTAL: 6,\n// EDGE_VERTICAL: 7,\n// EDGE_ALL: 8,\n// MEASURE_MODE_UNDEFINED: 0,\n// MEASURE_MODE_EXACTLY: 1,\n// MEASURE_MODE_AT_MOST: 2,\n// NODE_TYPE_DEFAULT: 0,\n// NODE_TYPE_TEXT: 1,\n// OVERFLOW_VISIBLE: 0,\n// OVERFLOW_HIDDEN: 1,\n// OVERFLOW_SCROLL: 2,\n// POSITION_TYPE_RELATIVE: 0,\n// POSITION_TYPE_ABSOLUTE: 1,\n// PRINT_OPTIONS_LAYOUT: 1,\n// PRINT_OPTIONS_STYLE: 2,\n// PRINT_OPTIONS_CHILDREN: 4,\n// UNIT_UNDEFINED: 0,\n// UNIT_POINT: 1,\n// UNIT_PERCENT: 2,\n// UNIT_AUTO: 3,\n\nexport default yogaValue;\n","const DPI = 72; // 72pt per inch.\n\nconst parseValue = value => {\n const match = /^(-?\\d*\\.?\\d+)(in|mm|cm|pt|vh|vw)?$/g.exec(value);\n\n if (match) {\n return { value: parseFloat(match[1], 10), unit: match[2] || 'pt' };\n }\n\n return { value, unit: undefined };\n};\n\nconst parseScalar = (value, container) => {\n const scalar = parseValue(value);\n switch (scalar.unit) {\n case 'in':\n return scalar.value * DPI;\n case 'mm':\n return scalar.value * (1 / 25.4) * DPI;\n case 'cm':\n return scalar.value * (1 / 2.54) * DPI;\n case 'vh':\n if (container.isAutoHeight) {\n throw new Error(\n 'vh unit not supported in auto-height pages. Please specify page height if you want to use vh.',\n );\n }\n\n return scalar.value * (container.height / 100);\n case 'vw':\n return scalar.value * (container.width / 100);\n default:\n return scalar.value;\n }\n};\n\nexport default parseScalar;\n","export const isBorderStyle = (key, value) =>\n key.match(/^border/) && typeof value === 'string';\n\nconst matchBorderShorthand = value =>\n value.match(/(\\d+(px|in|mm|cm|pt|vw|vh)?)\\s(\\S+)\\s(\\S+)/);\n\n// Transforms shorthand border values\nexport const processBorders = (key, value) => {\n const match = matchBorderShorthand(value);\n\n if (match) {\n if (key.match(/.Color/)) {\n return match[4];\n } else if (key.match(/.Style/)) {\n return match[3];\n } else if (key.match(/.Width/)) {\n return match[1];\n } else {\n throw new Error(`StyleSheet: Invalid '${value}' for '${key}'`);\n }\n }\n\n return value;\n};\n","export const isBoxModelStyle = (key, value) =>\n key.match(/^(margin)|(padding)/) && typeof value === 'string';\n\nconst matchBoxModel = value => value.match(/\\d+(px|in|mm|cm|pt|%|vw|vh)?/g);\n\n// Transforms shorthand margin and padding values\nexport const processBoxModel = (key, value) => {\n const match = matchBoxModel(value);\n\n if (match) {\n if (key.match(/.Top/)) {\n return match[0];\n } else if (key.match(/.Right/)) {\n return match[1] || match[0];\n } else if (key.match(/.Bottom/)) {\n return match[2] || match[0];\n } else if (key.match(/.Left/)) {\n return match[3] || match[1] || match[0];\n } else {\n throw new Error(`StyleSheet: Invalid '${value}' for '${key}'`);\n }\n }\n\n return value;\n};\n","// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Common_weight_name_mapping\nconst FONT_WEIGHTS = {\n thin: 100,\n hairline: 100,\n ultralight: 200,\n extralight: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semibold: 600,\n demibold: 600,\n bold: 700,\n ultrabold: 800,\n extrabold: 800,\n heavy: 900,\n black: 900,\n};\n\nexport const isFontWeightStyle = key => key.match(/^fontWeight/);\n\nexport const processFontWeight = value => {\n if (!value) return FONT_WEIGHTS.normal;\n if (typeof value === 'number') return value;\n return FONT_WEIGHTS[value.toLowerCase()];\n};\n","export const isObjectPositionStyle = (key, value) =>\n key.match(/^objectPosition/) && typeof value === 'string';\n\nconst matchObjectPosition = value =>\n value.match(/\\d+(px|in|mm|cm|pt|%|vw|vh)?/g);\n\n// Transforms shorthand objectPosition values\nexport const processObjectPosition = (key, value) => {\n const match = matchObjectPosition(value);\n\n if (match) {\n if (key.match(/.X/)) {\n return match[0];\n } else if (key.match(/.Y/)) {\n return match[1];\n } else {\n throw new Error(`StyleSheet: Invalid '${value}' for '${key}'`);\n }\n }\n\n return value;\n};\n","export const isTransformOriginStyle = (key, value) =>\n key.match(/^transformOrigin/) && typeof value === 'string';\n\nconst matchTransformOrigin = value =>\n value.match(/(-?\\d+(px|in|mm|cm|pt|%|vw|vh)?)|top|right|bottom|left|center/g);\n\nconst transformOffsetKeywords = value => {\n switch (value) {\n case 'top':\n case 'left':\n return '0%';\n case 'right':\n case 'bottom':\n return '100%';\n case 'center':\n return '50%';\n default:\n return value;\n }\n};\n\n// Transforms shorthand transformOrigin values\nexport const processTransformOrigin = (key, value) => {\n const match = matchTransformOrigin(value);\n\n if (match) {\n let result;\n\n if (key.match(/.X/)) {\n result = match[0];\n } else if (key.match(/.Y/)) {\n result = match[1] || match[0];\n } else {\n throw new Error(`StyleSheet: Invalid '${value}' for '${key}'`);\n }\n\n return transformOffsetKeywords(result);\n }\n\n return value;\n};\n","import yogaValue from './yogaValue';\nimport parseScalar from './transformUnits';\nimport { isBorderStyle, processBorders } from './borders';\nimport { isBoxModelStyle, processBoxModel } from './boxModel';\nimport { isFontWeightStyle, processFontWeight } from './transformFontWeight';\nimport { isObjectPositionStyle, processObjectPosition } from './objectPosition';\nimport {\n isTransformOriginStyle,\n processTransformOrigin,\n} from './transformOrigin';\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconst styleShorthands = {\n margin: {\n marginTop: true,\n marginRight: true,\n marginBottom: true,\n marginLeft: true,\n },\n marginHorizontal: {\n marginLeft: true,\n marginRight: true,\n },\n marginVertical: {\n marginTop: true,\n marginBottom: true,\n },\n padding: {\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n },\n paddingHorizontal: {\n paddingLeft: true,\n paddingRight: true,\n },\n paddingVertical: {\n paddingTop: true,\n paddingBottom: true,\n },\n border: {\n borderTopColor: true,\n borderTopStyle: true,\n borderTopWidth: true,\n borderRightColor: true,\n borderRightStyle: true,\n borderRightWidth: true,\n borderBottomColor: true,\n borderBottomStyle: true,\n borderBottomWidth: true,\n borderLeftColor: true,\n borderLeftStyle: true,\n borderLeftWidth: true,\n },\n borderTop: {\n borderTopColor: true,\n borderTopStyle: true,\n borderTopWidth: true,\n },\n borderRight: {\n borderRightColor: true,\n borderRightStyle: true,\n borderRightWidth: true,\n },\n borderBottom: {\n borderBottomColor: true,\n borderBottomStyle: true,\n borderBottomWidth: true,\n },\n borderLeft: {\n borderLeftColor: true,\n borderLeftStyle: true,\n borderLeftWidth: true,\n },\n borderColor: {\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n },\n borderRadius: {\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderBottomRightRadius: true,\n borderBottomLeftRadius: true,\n },\n borderStyle: {\n borderTopStyle: true,\n borderRightStyle: true,\n borderBottomStyle: true,\n borderLeftStyle: true,\n },\n borderWidth: {\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n },\n objectPosition: {\n objectPositionX: true,\n objectPositionY: true,\n },\n transformOrigin: {\n transformOriginX: true,\n transformOriginY: true,\n },\n};\n\n// Expand the shorthand properties to isolate every declaration from the others.\nconst expandStyles = style => {\n if (!style) return style;\n\n const propsArray = Object.keys(style);\n const resolvedStyle = {};\n\n for (let i = 0; i < propsArray.length; i++) {\n const key = propsArray[i];\n const value = style[key];\n\n switch (key) {\n case 'display':\n case 'flex':\n case 'flexDirection':\n case 'flexWrap':\n case 'flexFlow':\n case 'flexGrow':\n case 'flexShrink':\n case 'flexBasis':\n case 'justifyContent':\n case 'alignSelf':\n case 'alignItems':\n case 'alignContent':\n case 'order':\n resolvedStyle[key] = yogaValue(key, value);\n break;\n case 'textAlignVertical':\n resolvedStyle.verticalAlign = value === 'center' ? 'middle' : value;\n break;\n case 'margin':\n case 'marginHorizontal':\n case 'marginVertical':\n case 'padding':\n case 'paddingHorizontal':\n case 'paddingVertical':\n case 'border':\n case 'borderTop':\n case 'borderRight':\n case 'borderBottom':\n case 'borderLeft':\n case 'borderColor':\n case 'borderRadius':\n case 'borderStyle':\n case 'borderWidth':\n case 'objectPosition':\n case 'transformOrigin':\n {\n const expandedProps = styleShorthands[key];\n for (const propName in expandedProps) {\n if (hasOwnProperty.call(expandedProps, propName)) {\n resolvedStyle[propName] = value;\n }\n }\n }\n break;\n default:\n resolvedStyle[key] = value;\n break;\n }\n }\n\n return resolvedStyle;\n};\n\nconst transformStyles = (style, container) => {\n const expandedStyles = expandStyles(style);\n const propsArray = Object.keys(expandedStyles);\n const resolvedStyle = {};\n\n for (let i = 0; i < propsArray.length; i++) {\n const key = propsArray[i];\n const value = expandedStyles[key];\n\n let resolved;\n if (isBorderStyle(key, value)) {\n resolved = processBorders(key, value);\n } else if (isBoxModelStyle(key, value)) {\n resolved = processBoxModel(key, value);\n } else if (isObjectPositionStyle(key, value)) {\n resolved = processObjectPosition(key, value);\n } else if (isTransformOriginStyle(key, value)) {\n resolved = processTransformOrigin(key, value);\n } else if (isFontWeightStyle(key, value)) {\n resolved = processFontWeight(value);\n } else {\n resolved = value;\n }\n\n resolvedStyle[key] = parseScalar(resolved, container);\n }\n\n return resolvedStyle;\n};\n\nexport default transformStyles;\n","import matchMedia from 'media-engine';\nimport transformStyles from './transformStyles';\n\nconst create = styles => styles;\n\nconst flatten = input => {\n if (!Array.isArray(input)) {\n input = [input];\n }\n\n const result = input.reduce((acc, style) => {\n if (style) {\n const s = Array.isArray(style) ? flatten(style) : style;\n\n Object.keys(s).forEach(key => {\n if (s[key] !== null && s[key] !== undefined) {\n acc[key] = s[key];\n }\n });\n }\n\n return acc;\n }, {});\n\n return result;\n};\n\nconst resolveMediaQueries = (input, container) => {\n const result = Object.keys(input).reduce((acc, key) => {\n if (/@media/.test(key)) {\n return {\n ...acc,\n ...matchMedia({ [key]: input[key] }, container),\n };\n }\n\n return { ...acc, [key]: input[key] };\n }, {});\n\n return result;\n};\n\nconst resolve = (styles, container) => {\n if (!styles) return null;\n\n styles = flatten(styles);\n styles = resolveMediaQueries(styles, container);\n styles = transformStyles(styles, container);\n\n return styles;\n};\n\nconst absoluteFillObject = {\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n};\n\nexport default {\n hairlineWidth: 1,\n create,\n resolve,\n flatten,\n absoluteFillObject,\n};\n","const Debug = {\n debug() {\n const layout = this.getAbsoluteLayout();\n const padding = this.padding;\n const margin = this.margin;\n\n this.root.instance.save();\n\n this.debugContent(layout, margin, padding);\n this.debugPadding(layout, margin, padding);\n this.debugMargin(layout, margin);\n this.debugText(layout, margin);\n this.debugOrigin();\n\n this.root.instance.restore();\n },\n debugOrigin() {\n if (this.style.transform) {\n const origin = this.origin;\n this.root.instance\n .circle(origin[0], origin[1], 3)\n .fill('red')\n .circle(origin[0], origin[1], 5)\n .stroke('red');\n }\n },\n debugText(layout, margin) {\n const roundedWidth = Math.round(this.width + margin.left + margin.right);\n const roundedHeight = Math.round(this.height + margin.top + margin.bottom);\n\n this.root.instance\n .fontSize(4)\n .opacity(1)\n .fillColor('black')\n .text(\n `${roundedWidth} x ${roundedHeight}`,\n layout.left - margin.left,\n Math.max(layout.top - margin.top - 4, 1),\n );\n },\n debugContent(layout, margin, padding) {\n this.root.instance\n .fillColor('#a1c6e7')\n .opacity(0.5)\n .rect(\n layout.left + padding.left,\n layout.top + padding.top,\n layout.width - padding.left - padding.right,\n layout.height - padding.top - padding.bottom,\n )\n .fill();\n },\n debugPadding(layout, margin, padding) {\n this.root.instance.fillColor('#c4deb9').opacity(0.5);\n\n // Padding top\n this.root.instance\n .rect(\n layout.left + padding.left,\n layout.top,\n layout.width - padding.right - padding.left,\n padding.top,\n )\n .fill();\n\n // Padding left\n this.root.instance\n .rect(layout.left, layout.top, padding.left, layout.height)\n .fill();\n\n // Padding right\n this.root.instance\n .rect(\n layout.left + layout.width - padding.right,\n layout.top,\n padding.right,\n layout.height,\n )\n .fill();\n\n // Padding bottom\n this.root.instance\n .rect(\n layout.left + padding.left,\n layout.top + layout.height - padding.bottom,\n layout.width - padding.right - padding.left,\n padding.bottom,\n )\n .fill();\n },\n debugMargin(layout, margin) {\n this.root.instance.fillColor('#f8cca1').opacity(0.5);\n\n // Margin top\n this.root.instance\n .rect(layout.left, layout.top - margin.top, layout.width, margin.top)\n .fill();\n\n // Margin left\n this.root.instance\n .rect(\n layout.left - margin.left,\n layout.top - margin.top,\n margin.left,\n layout.height + margin.top + margin.bottom,\n )\n .fill();\n\n // Margin right\n this.root.instance\n .rect(\n layout.left + layout.width,\n layout.top - margin.top,\n margin.right,\n layout.height + margin.top + margin.bottom,\n )\n .fill();\n\n // Margin bottom\n this.root.instance\n .rect(\n layout.left,\n layout.top + layout.height,\n layout.width,\n margin.bottom,\n )\n .fill();\n },\n};\n\nexport default Debug;\n","// Ref: https://www.w3.org/TR/css-backgrounds-3/#borders\n\n// This constant is used to approximate a symmetrical arc using a cubic Bezier curve.\nconst KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);\n\nfunction drawBorders() {\n const { instance } = this.root;\n const layout = this.getAbsoluteLayout();\n\n const {\n borderTopWidth,\n borderLeftWidth,\n borderRightWidth,\n borderBottomWidth,\n } = this;\n\n const {\n opacity,\n borderTopLeftRadius = 0,\n borderTopRightRadius = 0,\n borderBottomLeftRadius = 0,\n borderBottomRightRadius = 0,\n borderTopColor = 'black',\n borderTopStyle = 'solid',\n borderLeftColor = 'black',\n borderLeftStyle = 'solid',\n borderRightColor = 'black',\n borderRightStyle = 'solid',\n borderBottomColor = 'black',\n borderBottomStyle = 'solid',\n } = this.style;\n\n const style = {\n borderTopColor,\n borderTopWidth,\n borderTopStyle,\n borderLeftColor,\n borderLeftWidth,\n borderLeftStyle,\n borderRightColor,\n borderRightWidth,\n borderRightStyle,\n borderBottomColor,\n borderBottomWidth,\n borderBottomStyle,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n };\n\n const { width, height } = layout;\n const rtr = Math.min(borderTopRightRadius, 0.5 * width, 0.5 * height);\n const rtl = Math.min(borderTopLeftRadius, 0.5 * width, 0.5 * height);\n const rbr = Math.min(borderBottomRightRadius, 0.5 * width, 0.5 * height);\n const rbl = Math.min(borderBottomLeftRadius, 0.5 * width, 0.5 * height);\n\n instance.save();\n instance.strokeOpacity(opacity);\n\n if (borderTopWidth) {\n instance.save();\n clipBorderTop(instance, layout, style, rtr, rtl);\n fillBorderTop(instance, layout, style, rtr, rtl);\n instance.restore();\n }\n\n if (borderRightWidth) {\n instance.save();\n clipBorderRight(instance, layout, style, rtr, rbr);\n fillBorderRight(instance, layout, style, rtr, rbr);\n instance.restore();\n }\n\n if (borderBottomWidth) {\n instance.save();\n clipBorderBottom(instance, layout, style, rbl, rbr);\n fillBorderBottom(instance, layout, style, rbl, rbr);\n instance.restore();\n }\n\n if (borderLeftWidth) {\n instance.save();\n clipBorderLeft(instance, layout, style, rbl, rtl);\n fillBorderLeft(instance, layout, style, rbl, rtl);\n instance.restore();\n }\n\n instance.restore();\n}\n\nconst clipBorderTop = (ctx, layout, style, rtr, rtl) => {\n const { top, left, width, height } = layout;\n const { borderTopWidth, borderRightWidth, borderLeftWidth } = style;\n\n // Clip outer top border edge\n ctx.moveTo(left + rtl, top);\n ctx.lineTo(left + width - rtr, top);\n\n // Ellipse coefficients outer top right cap\n const c0 = rtr * (1.0 - KAPPA);\n\n // Clip outer top right cap\n ctx.bezierCurveTo(\n left + width - c0,\n top,\n left + width,\n top + c0,\n left + width,\n top + rtr,\n );\n\n // Move down in case the margin exceedes the radius\n const topRightYCoord = top + Math.max(borderTopWidth, rtr);\n ctx.lineTo(left + width, topRightYCoord);\n\n // Clip inner top right cap\n ctx.lineTo(left + width - borderRightWidth, topRightYCoord);\n\n // Ellipse coefficients inner top right cap\n const innerTopRightRadiusX = Math.max(rtr - borderRightWidth, 0);\n const innerTopRightRadiusY = Math.max(rtr - borderTopWidth, 0);\n const c1 = innerTopRightRadiusX * (1.0 - KAPPA);\n const c2 = innerTopRightRadiusY * (1.0 - KAPPA);\n\n // Clip inner top right cap\n ctx.bezierCurveTo(\n left + width - borderRightWidth,\n top + borderTopWidth + c2,\n left + width - borderRightWidth - c1,\n top + borderTopWidth,\n left + width - borderRightWidth - innerTopRightRadiusX,\n top + borderTopWidth,\n );\n\n // Clip inner top border edge\n ctx.lineTo(left + Math.max(rtl, borderLeftWidth), top + borderTopWidth);\n\n // Ellipse coefficients inner top left cap\n const innerTopLeftRadiusX = Math.max(rtl - borderLeftWidth, 0);\n const innerTopLeftRadiusY = Math.max(rtl - borderTopWidth, 0);\n const c3 = innerTopLeftRadiusX * (1.0 - KAPPA);\n const c4 = innerTopLeftRadiusY * (1.0 - KAPPA);\n const topLeftYCoord = top + Math.max(borderTopWidth, rtl);\n\n // Clip inner top left cap\n ctx.bezierCurveTo(\n left + borderLeftWidth + c3,\n top + borderTopWidth,\n left + borderLeftWidth,\n top + borderTopWidth + c4,\n left + borderLeftWidth,\n topLeftYCoord,\n );\n ctx.lineTo(left, topLeftYCoord);\n\n // Move down in case the margin exceedes the radius\n ctx.lineTo(left, top + rtl);\n\n // Ellipse coefficients outer top left cap\n const c5 = rtl * (1.0 - KAPPA);\n\n // Clip outer top left cap\n ctx.bezierCurveTo(left, top + c5, left + c5, top, left + rtl, top);\n ctx.closePath();\n ctx.clip();\n\n // Clip border top cap joins\n if (borderRightWidth) {\n const trSlope = -borderTopWidth / borderRightWidth;\n ctx.moveTo(left + width / 2, trSlope * (-width / 2) + top);\n ctx.lineTo(left + width, top);\n ctx.lineTo(left, top);\n ctx.lineTo(left, top + height);\n ctx.closePath();\n ctx.clip();\n }\n\n if (borderLeftWidth) {\n const trSlope = -borderTopWidth / borderLeftWidth;\n ctx.moveTo(left + width / 2, trSlope * (-width / 2) + top);\n ctx.lineTo(left, top);\n ctx.lineTo(left + width, top);\n ctx.lineTo(left + width, top + height);\n ctx.closePath();\n ctx.clip();\n }\n};\n\nconst fillBorderTop = (ctx, layout, style, rtr, rtl) => {\n const { top, left, width } = layout;\n const {\n borderTopColor,\n borderTopWidth,\n borderTopStyle,\n borderRightWidth,\n borderLeftWidth,\n } = style;\n\n const c0 = rtl * (1.0 - KAPPA);\n const c1 = rtr * (1.0 - KAPPA);\n\n ctx.moveTo(left, top + Math.max(rtl, borderTopWidth));\n ctx.bezierCurveTo(left, top + c0, left + c0, top, left + rtl, top);\n ctx.lineTo(left + width - rtr, top);\n ctx.bezierCurveTo(\n left + width - c1,\n top,\n left + width,\n top + c1,\n left + width,\n top + rtr,\n );\n\n ctx.strokeColor(borderTopColor);\n ctx.lineWidth(\n Math.max(borderRightWidth, borderTopWidth, borderLeftWidth) * 2,\n );\n\n if (borderTopStyle === 'dashed') {\n ctx.dash(borderTopWidth * 2, { space: borderTopWidth * 1.2 });\n } else if (borderTopStyle === 'dotted') {\n ctx.dash(borderTopWidth, { space: borderTopWidth * 1.2 });\n }\n\n ctx.stroke();\n ctx.undash();\n};\n\nconst clipBorderRight = (ctx, layout, style, rtr, rbr) => {\n const { top, left, width, height } = layout;\n const { borderTopWidth, borderRightWidth, borderBottomWidth } = style;\n\n // Clip outer right border edge\n ctx.moveTo(left + width, top + rtr);\n ctx.lineTo(left + width, top + height - rbr);\n\n // Ellipse coefficients outer bottom right cap\n const c0 = rbr * (1.0 - KAPPA);\n\n // Clip outer top right cap\n ctx.bezierCurveTo(\n left + width,\n top + height - c0,\n left + width - c0,\n top + height,\n left + width - rbr,\n top + height,\n );\n\n // Move left in case the margin exceedes the radius\n const topBottomXCoord = left + width - Math.max(borderRightWidth, rbr);\n ctx.lineTo(topBottomXCoord, top + height);\n\n // Clip inner bottom right cap\n ctx.lineTo(topBottomXCoord, top + height - borderBottomWidth);\n\n // Ellipse coefficients inner bottom right cap\n const innerBottomRightRadiusX = Math.max(rbr - borderRightWidth, 0);\n const innerBottomRightRadiusY = Math.max(rbr - borderBottomWidth, 0);\n const c1 = innerBottomRightRadiusX * (1.0 - KAPPA);\n const c2 = innerBottomRightRadiusY * (1.0 - KAPPA);\n\n // Clip inner top right cap\n ctx.bezierCurveTo(\n left + width - borderRightWidth - c1,\n top + height - borderBottomWidth,\n left + width - borderRightWidth,\n top + height - borderBottomWidth - c2,\n left + width - borderRightWidth,\n top + height - Math.max(rbr, borderBottomWidth),\n );\n\n // Clip inner right border edge\n ctx.lineTo(\n left + width - borderRightWidth,\n top + Math.max(rtr, borderTopWidth),\n );\n\n // Ellipse coefficients inner top right cap\n const innerTopRightRadiusX = Math.max(rtr - borderRightWidth, 0);\n const innerTopRightRadiusY = Math.max(rtr - borderTopWidth, 0);\n const c3 = innerTopRightRadiusX * (1.0 - KAPPA);\n const c4 = innerTopRightRadiusY * (1.0 - KAPPA);\n const topRightXCoord = left + width - Math.max(rtr, borderRightWidth);\n\n // Clip inner top left cap\n ctx.bezierCurveTo(\n left + width - borderRightWidth,\n top + borderTopWidth + c4,\n left + width - borderRightWidth - c3,\n top + borderTopWidth,\n topRightXCoord,\n top + borderTopWidth,\n );\n ctx.lineTo(topRightXCoord, top);\n\n // Move right in case the margin exceedes the radius\n ctx.lineTo(left + width - rtr, top);\n\n // Ellipse coefficients outer top right cap\n const c5 = rtr * (1.0 - KAPPA);\n\n // Clip outer top right cap\n ctx.bezierCurveTo(\n left + width - c5,\n top,\n left + width,\n top + c5,\n left + width,\n top + rtr,\n );\n\n ctx.closePath();\n ctx.clip();\n\n // Clip border right cap joins\n if (borderTopWidth) {\n const trSlope = -borderTopWidth / borderRightWidth;\n ctx.moveTo(left + width / 2, trSlope * (-width / 2) + top);\n ctx.lineTo(left + width, top);\n ctx.lineTo(left + width, top + height);\n ctx.lineTo(left, top + height);\n ctx.closePath();\n ctx.clip();\n }\n\n if (borderBottomWidth) {\n const brSlope = borderBottomWidth / borderRightWidth;\n ctx.moveTo(left + width / 2, brSlope * (-width / 2) + top + height);\n ctx.lineTo(left + width, top + height);\n ctx.lineTo(left + width, top);\n ctx.lineTo(left, top);\n ctx.closePath();\n ctx.clip();\n }\n};\n\nconst fillBorderRight = (ctx, layout, style, rtr, rbr) => {\n const { top, left, width, height } = layout;\n const {\n borderRightColor,\n borderRightStyle,\n borderRightWidth,\n borderTopWidth,\n borderBottomWidth,\n } = style;\n\n const c0 = rbr * (1.0 - KAPPA);\n const c1 = rtr * (1.0 - KAPPA);\n\n ctx.moveTo(left + width - rtr, top);\n ctx.bezierCurveTo(\n left + width - c1,\n top,\n left + width,\n top + c1,\n left + width,\n top + rtr,\n );\n ctx.lineTo(left + width, top + height - rbr);\n ctx.bezierCurveTo(\n left + width,\n top + height - c0,\n left + width - c0,\n top + height,\n left + width - rbr,\n top + height,\n );\n\n ctx.strokeColor(borderRightColor);\n ctx.lineWidth(\n Math.max(borderRightWidth, borderTopWidth, borderBottomWidth) * 2,\n );\n\n if (borderRightStyle === 'dashed') {\n ctx.dash(borderRightWidth * 2, { space: borderRightWidth * 1.2 });\n } else if (borderRightStyle === 'dotted') {\n ctx.dash(borderRightWidth, { space: borderRightWidth * 1.2 });\n }\n\n ctx.stroke();\n ctx.undash();\n};\n\nconst clipBorderBottom = (ctx, layout, style, rbl, rbr) => {\n const { top, left, width, height } = layout;\n const { borderBottomWidth, borderRightWidth, borderLeftWidth } = style;\n\n // Clip outer top border edge\n ctx.moveTo(left + width - rbr, top + height);\n ctx.lineTo(left + rbl, top + height);\n\n // Ellipse coefficients outer top right cap\n const c0 = rbl * (1.0 - KAPPA);\n\n // Clip outer top right cap\n ctx.bezierCurveTo(\n left + c0,\n top + height,\n left,\n top + height - c0,\n left,\n top + height - rbl,\n );\n\n // Move up in case the margin exceedes the radius\n const bottomLeftYCoord = top + height - Math.max(borderBottomWidth, rbl);\n ctx.lineTo(left, bottomLeftYCoord);\n\n // Clip inner bottom left cap\n ctx.lineTo(left + borderLeftWidth, bottomLeftYCoord);\n\n // Ellipse coefficients inner top right cap\n const innerBottomLeftRadiusX = Math.max(rbl - borderLeftWidth, 0);\n const innerBottomLeftRadiusY = Math.max(rbl - borderBottomWidth, 0);\n const c1 = innerBottomLeftRadiusX * (1.0 - KAPPA);\n const c2 = innerBottomLeftRadiusY * (1.0 - KAPPA);\n\n // Clip inner bottom left cap\n ctx.bezierCurveTo(\n left + borderLeftWidth,\n top + height - borderBottomWidth - c2,\n left + borderLeftWidth + c1,\n top + height - borderBottomWidth,\n left + borderLeftWidth + innerBottomLeftRadiusX,\n top + height - borderBottomWidth,\n );\n\n // Clip inner bottom border edge\n ctx.lineTo(\n left + width - Math.max(rbr, borderRightWidth),\n top + height - borderBottomWidth,\n );\n\n // Ellipse coefficients inner top left cap\n const innerBottomRightRadiusX = Math.max(rbr - borderRightWidth, 0);\n const innerBottomRightRadiusY = Math.max(rbr - borderBottomWidth, 0);\n const c3 = innerBottomRightRadiusX * (1.0 - KAPPA);\n const c4 = innerBottomRightRadiusY * (1.0 - KAPPA);\n const bottomRightYCoord = top + height - Math.max(borderBottomWidth, rbr);\n\n // Clip inner top left cap\n ctx.bezierCurveTo(\n left + width - borderRightWidth - c3,\n top + height - borderBottomWidth,\n left + width - borderRightWidth,\n top + height - borderBottomWidth - c4,\n left + width - borderRightWidth,\n bottomRightYCoord,\n );\n ctx.lineTo(left + width, bottomRightYCoord);\n\n // Move down in case the margin exceedes the radius\n ctx.lineTo(left + width, top + height - rbr);\n\n // Ellipse coefficients outer top left cap\n const c5 = rbr * (1.0 - KAPPA);\n\n // Clip outer top left cap\n ctx.bezierCurveTo(\n left + width,\n top + height - c5,\n left + width - c5,\n top + height,\n left + width - rbr,\n top + height,\n );\n ctx.closePath();\n ctx.clip();\n\n // Clip border bottom cap joins\n if (borderRightWidth) {\n const brSlope = borderBottomWidth / borderRightWidth;\n ctx.moveTo(left + width / 2, brSlope * (-width / 2) + top + height);\n ctx.lineTo(left + width, top + height);\n ctx.lineTo(left, top + height);\n ctx.lineTo(left, top);\n ctx.closePath();\n ctx.clip();\n }\n\n if (borderLeftWidth) {\n const trSlope = -borderBottomWidth / borderLeftWidth;\n ctx.moveTo(left + width / 2, trSlope * (width / 2) + top + height);\n ctx.lineTo(left, top + height);\n ctx.lineTo(left + width, top + height);\n ctx.lineTo(left + width, top);\n ctx.closePath();\n ctx.clip();\n }\n};\n\nconst fillBorderBottom = (ctx, layout, style, rbl, rbr) => {\n const { top, left, width, height } = layout;\n const {\n borderBottomColor,\n borderBottomStyle,\n borderBottomWidth,\n borderRightWidth,\n borderLeftWidth,\n } = style;\n\n const c0 = rbl * (1.0 - KAPPA);\n const c1 = rbr * (1.0 - KAPPA);\n\n ctx.moveTo(left + width, top + height - rbr);\n ctx.bezierCurveTo(\n left + width,\n top + height - c1,\n left + width - c1,\n top + height,\n left + width - rbr,\n top + height,\n );\n ctx.lineTo(left + rbl, top + height);\n ctx.bezierCurveTo(\n left + c0,\n top + height,\n left,\n top + height - c0,\n left,\n top + height - rbl,\n );\n\n ctx.strokeColor(borderBottomColor);\n ctx.lineWidth(\n Math.max(borderBottomWidth, borderRightWidth, borderLeftWidth) * 2,\n );\n\n if (borderBottomStyle === 'dashed') {\n ctx.dash(borderBottomWidth * 2, { space: borderBottomWidth * 1.2 });\n } else if (borderBottomStyle === 'dotted') {\n ctx.dash(borderBottomWidth, { space: borderBottomWidth * 1.2 });\n }\n\n ctx.stroke();\n ctx.undash();\n};\n\nconst clipBorderLeft = (ctx, layout, style, rbl, rtl) => {\n const { top, left, width, height } = layout;\n const { borderTopWidth, borderLeftWidth, borderBottomWidth } = style;\n\n // Clip outer left border edge\n ctx.moveTo(left, top + height - rbl);\n ctx.lineTo(left, top + rtl);\n\n // Ellipse coefficients outer top left cap\n const c0 = rtl * (1.0 - KAPPA);\n\n // Clip outer top left cap\n ctx.bezierCurveTo(left, top + c0, left + c0, top, left + rtl, top);\n\n // Move right in case the margin exceedes the radius\n const topLeftCoordX = left + Math.max(borderLeftWidth, rtl);\n ctx.lineTo(topLeftCoordX, top);\n\n // Clip inner top left cap\n ctx.lineTo(topLeftCoordX, top + borderTopWidth);\n\n // Ellipse coefficients inner top left cap\n const innerTopLeftRadiusX = Math.max(rtl - borderLeftWidth, 0);\n const innerTopLeftRadiusY = Math.max(rtl - borderTopWidth, 0);\n const c1 = innerTopLeftRadiusX * (1.0 - KAPPA);\n const c2 = innerTopLeftRadiusY * (1.0 - KAPPA);\n\n // Clip inner top right cap\n ctx.bezierCurveTo(\n left + borderLeftWidth + c1,\n top + borderTopWidth,\n left + borderLeftWidth,\n top + borderTopWidth + c2,\n left + borderLeftWidth,\n top + Math.max(rtl, borderTopWidth),\n );\n\n // Clip inner left border edge\n ctx.lineTo(\n left + borderLeftWidth,\n top + height - Math.max(rbl, borderBottomWidth),\n );\n\n // Ellipse coefficients inner bottom left cap\n const innerBottomLeftRadiusX = Math.max(rbl - borderLeftWidth, 0);\n const innerBottomLeftRadiusY = Math.max(rbl - borderBottomWidth, 0);\n const c3 = innerBottomLeftRadiusX * (1.0 - KAPPA);\n const c4 = innerBottomLeftRadiusY * (1.0 - KAPPA);\n const bottomLeftXCoord = left + Math.max(rbl, borderLeftWidth);\n\n // Clip inner top left cap\n ctx.bezierCurveTo(\n left + borderLeftWidth,\n top + height - borderBottomWidth - c4,\n left + borderLeftWidth + c3,\n top + height - borderBottomWidth,\n bottomLeftXCoord,\n top + height - borderBottomWidth,\n );\n ctx.lineTo(bottomLeftXCoord, top + height);\n\n // Move left in case the margin exceedes the radius\n ctx.lineTo(left + rbl, top + height);\n\n // Ellipse coefficients outer top right cap\n const c5 = rbl * (1.0 - KAPPA);\n\n // Clip outer top right cap\n ctx.bezierCurveTo(\n left + c5,\n top + height,\n left,\n top + height - c5,\n left,\n top + height - rbl,\n );\n\n ctx.closePath();\n ctx.clip();\n\n // Clip border right cap joins\n if (borderBottomWidth) {\n const trSlope = -borderBottomWidth / borderLeftWidth;\n ctx.moveTo(left + width / 2, trSlope * (width / 2) + top + height);\n ctx.lineTo(left, top + height);\n ctx.lineTo(left, top);\n ctx.lineTo(left + width, top);\n ctx.closePath();\n ctx.clip();\n }\n\n if (borderBottomWidth) {\n const trSlope = -borderTopWidth / borderLeftWidth;\n ctx.moveTo(left + width / 2, trSlope * (-width / 2) + top);\n ctx.lineTo(left, top);\n ctx.lineTo(left, top + height);\n ctx.lineTo(left + width, top + height);\n ctx.closePath();\n ctx.clip();\n }\n};\n\nconst fillBorderLeft = (ctx, layout, style, rbl, rtl) => {\n const { top, left, height } = layout;\n const {\n borderLeftColor,\n borderLeftStyle,\n borderLeftWidth,\n borderTopWidth,\n borderBottomWidth,\n } = style;\n\n const c0 = rbl * (1.0 - KAPPA);\n const c1 = rtl * (1.0 - KAPPA);\n\n ctx.moveTo(left + rbl, top + height);\n ctx.bezierCurveTo(\n left + c0,\n top + height,\n left,\n top + height - c0,\n left,\n top + height - rbl,\n );\n ctx.lineTo(left, top + rtl);\n ctx.bezierCurveTo(left, top + c1, left + c1, top, left + rtl, top);\n\n ctx.strokeColor(borderLeftColor);\n ctx.lineWidth(\n Math.max(borderLeftWidth, borderTopWidth, borderBottomWidth) * 2,\n );\n\n if (borderLeftStyle === 'dashed') {\n ctx.dash(borderLeftWidth * 2, { space: borderLeftWidth * 1.2 });\n } else if (borderLeftStyle === 'dotted') {\n ctx.dash(borderLeftWidth, { space: borderLeftWidth * 1.2 });\n }\n\n ctx.stroke();\n ctx.undash();\n};\n\nexport default { drawBorders };\n","// This constant is used to approximate a symmetrical arc using a cubic\n// Bezier curve.\nconst KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);\n\nconst Clipping = {\n clip() {\n const { top, left, width, height } = this.getAbsoluteLayout();\n\n const {\n borderTopLeftRadius = 0,\n borderTopRightRadius = 0,\n borderBottomRightRadius = 0,\n borderBottomLeftRadius = 0,\n } = this.style;\n\n // Border top\n const rtr = Math.min(borderTopRightRadius, 0.5 * width, 0.5 * height);\n const ctr = rtr * (1.0 - KAPPA);\n\n this.root.instance.moveTo(left + rtr, top);\n this.root.instance.lineTo(left + width - rtr, top);\n this.root.instance.bezierCurveTo(\n left + width - ctr,\n top,\n left + width,\n top + ctr,\n left + width,\n top + rtr,\n );\n\n // Border right\n const rbr = Math.min(borderBottomRightRadius, 0.5 * width, 0.5 * height);\n const cbr = rbr * (1.0 - KAPPA);\n\n this.root.instance.lineTo(left + width, top + height - rbr);\n this.root.instance.bezierCurveTo(\n left + width,\n top + height - cbr,\n left + width - cbr,\n top + height,\n left + width - rbr,\n top + height,\n );\n\n // Border bottom\n const rbl = Math.min(borderBottomLeftRadius, 0.5 * width, 0.5 * height);\n const cbl = rbl * (1.0 - KAPPA);\n\n this.root.instance.lineTo(left + rbl, top + height);\n this.root.instance.bezierCurveTo(\n left + cbl,\n top + height,\n left,\n top + height - cbl,\n left,\n top + height - rbl,\n );\n\n // Border left\n const rtl = Math.min(borderTopLeftRadius, 0.5 * width, 0.5 * height);\n const ctl = rtl * (1.0 - KAPPA);\n\n this.root.instance.lineTo(left, top + rtl);\n this.root.instance.bezierCurveTo(\n left,\n top + ctl,\n left + ctl,\n top,\n left + rtl,\n top,\n );\n this.root.instance.closePath();\n this.root.instance.clip();\n },\n};\n\nexport default Clipping;\n","const getRotation = transform => {\n const match = /rotate\\((-?\\d+.?\\d+)(.+)\\)/g.exec(transform);\n\n if (match && match[1] && match[2]) {\n const value = match[1];\n return match[2] === 'rad' ? (value * 180) / Math.PI : value;\n }\n\n return 0;\n};\n\nconst getTranslateX = transform => {\n const matchX = /translateX\\((-?\\d+\\.?d*)\\)/g.exec(transform);\n const matchGeneric = /translate\\((-?\\d+\\.?d*).*,\\s*(-?\\d+\\.?d*).*\\)/g.exec(\n transform,\n );\n\n if (matchX && matchX[1]) return matchX[1];\n if (matchGeneric && matchGeneric[1]) return matchGeneric[1];\n\n return 0;\n};\n\nconst getTranslateY = transform => {\n const matchY = /translateY\\((-?\\d+\\.?\\d*)\\)/g.exec(transform);\n const matchGeneric = /translate\\((-?\\d+\\.?\\d*).*,\\s*(-?\\d+\\.?\\d*).*\\)/g.exec(\n transform,\n );\n\n if (matchY && matchY[1]) return matchY[1];\n if (matchGeneric && matchGeneric[2]) return matchGeneric[2];\n\n return 0;\n};\n\nconst getScaleX = transform => {\n const matchX = /scaleX\\((-?\\d+\\.?\\d*)\\)/g.exec(transform);\n const matchGeneric = /scale\\((-?\\d+\\.?\\d*).*,\\s*(-?\\d+\\.?\\d*).*\\)/g.exec(\n transform,\n );\n\n if (matchX && matchX[1]) return matchX[1];\n if (matchGeneric && matchGeneric[1]) return matchGeneric[1];\n\n return 1;\n};\n\nconst getScaleY = transform => {\n const matchY = /scaleY\\((-?\\d+\\.?\\d*)\\)/g.exec(transform);\n const matchGeneric = /scale\\((-?\\d+\\.?\\d*).*,\\s*(-?\\d+\\.?\\d*).*\\)/g.exec(\n transform,\n );\n\n if (matchY && matchY[1]) return matchY[1];\n if (matchGeneric && matchGeneric[2]) return matchGeneric[2];\n\n return 1;\n};\n\nconst getMatrix = transform => {\n const match = /matrix\\(([^,]+),([^,]+),([^,]+),([^,]+),([^,]+),([^,]+)\\)/g.exec(\n transform,\n );\n if (match) return match.slice(1, 7);\n return null;\n};\n\nconst applySingleTransformation = (element, transform, origin) => {\n if (/rotate/g.test(transform)) {\n element.root.instance.rotate(getRotation(transform), { origin });\n } else if (/scaleX/g.test(transform)) {\n element.root.instance.scale(getScaleX(transform), 1, { origin });\n } else if (/scaleY/g.test(transform)) {\n element.root.instance.scale(1, getScaleY(transform), { origin });\n } else if (/scale/g.test(transform)) {\n element.root.instance.scale(getScaleX(transform), getScaleY(transform), {\n origin,\n });\n } else if (/translateX/g.test(transform)) {\n element.root.instance.translate(getTranslateX(transform), 1, { origin });\n } else if (/translateY/g.test(transform)) {\n element.root.instance.translate(1, getTranslateY(transform), { origin });\n } else if (/translate/g.test(transform)) {\n element.root.instance.translate(\n getTranslateX(transform),\n getTranslateY(transform),\n { origin },\n );\n } else if (/matrix/g.test(transform)) {\n element.root.instance.transform(...getMatrix(transform));\n }\n};\n\nconst Transformations = {\n applyTransformations() {\n let match;\n const re = /[a-zA-Z]+\\([^)]+\\)/g;\n const origin = this.origin;\n const transform = (this.style && this.style.transform) || '';\n\n while ((match = re.exec(transform)) != null) {\n applySingleTransformation(this, match[0], origin);\n }\n },\n};\n\nexport default Transformations;\n","import { isNil, mergeDeepWith } from 'ramda';\n\nconst merge = (a, b) => {\n return isNil(b) ? a : b;\n};\n\nconst deepMerge = objs =>\n objs.reduce((acc, obj) => {\n return mergeDeepWith(merge, acc, obj);\n }, {});\n\nexport default deepMerge;\n","import { compose, equals, type } from 'ramda';\n\nconst isFunction = compose(\n equals('Function'),\n type,\n);\n\nexport default isFunction;\n","export const inheritedProperties = [\n 'color',\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontWeight',\n 'letterSpacing',\n 'opacity',\n 'textDecoration',\n 'lineHeight',\n 'textAlign',\n 'visibility',\n 'wordSpacing',\n];\n","import { pick, toPairsIn } from 'ramda';\n\nimport Node from './Node';\nimport StyleSheet from '../stylesheet';\nimport Debug from '../mixins/debug';\nimport Borders from '../mixins/borders';\nimport Clipping from '../mixins/clipping';\nimport Transform from '../mixins/transform';\nimport warning from '../utils/warning';\nimport deepMerge from '../utils/deepMerge';\nimport upperFirst from '../utils/upperFirst';\nimport isFunction from '../utils/isFunction';\nimport matchPercent from '../utils/matchPercent';\nimport { inheritedProperties } from '../stylesheet/inherit';\n\nclass Base extends Node {\n constructor(root, props) {\n super();\n\n this.root = root;\n this.style = {};\n this.props = deepMerge([\n this.constructor.defaultProps,\n Base.defaultProps,\n props,\n ]);\n\n warning(!this.props.styles, '\"styles\" prop passed instead of \"style\" prop');\n }\n\n get page() {\n return this.parent.page;\n }\n\n get wrap() {\n return this.props.wrap;\n }\n\n get break() {\n return this.props.break;\n }\n\n get fixed() {\n return this.props.fixed;\n }\n\n get minPresenceAhead() {\n return this.props.minPresenceAhead;\n }\n\n get absolute() {\n return this.props.style.position === 'absolute';\n }\n\n get origin() {\n const { transformOriginX, transformOriginY } = this.style;\n const { left, top, width, height } = this.getAbsoluteLayout();\n\n const percentX = matchPercent(transformOriginX);\n const percentY = matchPercent(transformOriginY);\n\n const offsetX = percentX ? width * percentX.percent : transformOriginX;\n const offsetY = percentY ? height * percentY.percent : transformOriginY;\n\n return [left + offsetX, top + offsetY];\n }\n\n set break(value) {\n this.props.break = value;\n }\n\n appendChild(child) {\n super.appendChild(child);\n this.root.markDirty();\n }\n\n appendChildBefore(child, beforeChild) {\n super.appendChildBefore(child, beforeChild);\n this.root.markDirty();\n }\n\n removeChild(child) {\n super.removeChild(child);\n this.root.markDirty();\n }\n\n update(newProps) {\n this.props = deepMerge([\n this.constructor.defaultProps,\n Base.defaultProps,\n newProps,\n ]);\n this.root.markDirty();\n }\n\n applyProps() {\n this.style = this.resolveStyles();\n\n toPairsIn(this.style).map(([attribute, value]) => {\n this.applyStyle(attribute, value);\n });\n\n this.children.forEach(child => {\n if (child.applyProps) child.applyProps();\n });\n }\n\n resolveStyles() {\n const { size, orientation, isAutoHeight } = this.page;\n const container = {\n orientation,\n isAutoHeight,\n width: size.width,\n height: size.height,\n };\n\n const ownStyles = StyleSheet.resolve(this.props.style, container);\n\n const inheritedStyles = this.parent\n ? pick(inheritedProperties, this.parent.style)\n : {};\n\n return { ...inheritedStyles, ...ownStyles };\n }\n\n applyStyle(attribute, value) {\n if (value === undefined) return;\n\n const setter = `set${upperFirst(attribute)}`;\n\n switch (attribute) {\n case 'marginTop':\n case 'marginRight':\n case 'marginBottom':\n case 'marginLeft':\n case 'paddingTop':\n case 'paddingRight':\n case 'paddingBottom':\n case 'paddingLeft':\n case 'borderTopWidth':\n case 'borderRightWidth':\n case 'borderBottomWidth':\n case 'borderLeftWidth':\n case 'position':\n case 'top':\n case 'right':\n case 'bottom':\n case 'left':\n case 'width':\n case 'height':\n case 'minHeight':\n case 'maxHeight':\n case 'minWidth':\n case 'maxWidth':\n this[attribute] = value;\n break;\n default:\n if (isFunction(this.layout[setter])) {\n this.layout[setter](value);\n }\n }\n }\n\n getLayoutData() {\n const layout = this.getAbsoluteLayout();\n\n return {\n type: this.name,\n top: layout.top,\n left: layout.left,\n width: layout.width,\n style: this.style,\n height: layout.height,\n children: this.children.map(c => {\n return c.getLayoutData();\n }),\n };\n }\n\n drawBackgroundColor() {\n const { backgroundColor, opacity = 1 } = this.style;\n const { left, top, width, height } = this.getAbsoluteLayout();\n\n if (backgroundColor) {\n this.root.instance.save();\n\n this.clip();\n\n this.root.instance\n .fillOpacity(opacity)\n .fillColor(backgroundColor)\n .rect(left, top, width, height)\n .fill()\n .restore();\n }\n }\n\n clone() {\n const clone = new this.constructor(this.root, this.props);\n\n clone.copyStyle(this);\n clone.style = this.style;\n\n return clone;\n }\n\n onNodeSplit(height, clone) {\n this.calculateLayout();\n\n clone.marginTop = 0;\n clone.paddingTop = 0;\n\n // If a height was given to the element, we need to substract the remaining wrapping height\n // If not, we just let Yoga calculate the appropiate height when layout get's calculated.\n if (clone.style.height) {\n clone.height = this.height - height;\n }\n\n this.height = height;\n this.marginBottom = 0;\n this.paddingBottom = 0;\n }\n\n async renderChildren() {\n for (let i = 0; i < this.children.length; i++) {\n await this.children[i].render();\n }\n }\n}\n\nBase.defaultProps = {\n style: {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n transformOriginX: '50%',\n transformOriginY: '50%',\n },\n minPresenceAhead: 0,\n};\n\nObject.assign(Base.prototype, Debug);\nObject.assign(Base.prototype, Borders);\nObject.assign(Base.prototype, Clipping);\nObject.assign(Base.prototype, Transform);\n\nexport default Base;\n","import matchPercent from '../utils/matchPercent';\n\nconst RULER_WIDTH = 13;\nconst RULER_COLOR = 'white';\nconst RULER_FONT_SIZE = 5;\nconst DEFAULT_RULER_STEPS = 50;\nconst LINE_WIDTH = 0.5;\nconst LINE_COLOR = 'gray';\nconst GRID_COLOR = '#ababab';\n\nconst range = (max, steps) =>\n Array.from({ length: Math.ceil(max / steps) }, (_, i) => i * steps);\n\nconst matchPercentage = value => {\n const match = matchPercent(value);\n return match ? 100 / match.value : null;\n};\n\nconst Ruler = {\n getRulerWidth() {\n return RULER_WIDTH;\n },\n hasHorizontalRuler() {\n return this.props.ruler || this.props.horizontalRuler;\n },\n hasVerticalRuler() {\n return this.props.ruler || this.props.verticalRuler;\n },\n getHorizontalSteps() {\n const value =\n this.props.horizontalRulerSteps ||\n this.props.rulerSteps ||\n DEFAULT_RULER_STEPS;\n\n if (typeof value === 'string') {\n const percentage = matchPercentage(value);\n if (percentage) {\n const width = this.width - (this.hasVerticalRuler() ? RULER_WIDTH : 0);\n return width / percentage;\n }\n throw new Error('Page: Invalid horizontal steps value');\n }\n\n return value;\n },\n getVerticalSteps() {\n const value =\n this.props.verticalRulerSteps ||\n this.props.rulerSteps ||\n DEFAULT_RULER_STEPS;\n\n if (typeof value === 'string') {\n const percentage = matchPercentage(value);\n if (percentage) {\n const height =\n this.height - (this.hasHorizontalRuler() ? RULER_WIDTH : 0);\n return height / percentage;\n }\n throw new Error('Page: Invalid horizontal steps value');\n }\n\n return value;\n },\n renderRuler() {\n const hasHorizontalRuler = this.hasHorizontalRuler();\n const hasVerticalRuler = this.hasVerticalRuler();\n\n if (hasHorizontalRuler || hasVerticalRuler) {\n this.root.instance\n .save()\n .lineWidth(LINE_WIDTH)\n .fontSize(RULER_FONT_SIZE)\n .opacity(1);\n\n if (hasHorizontalRuler) this.drawHorizontalRuler();\n\n if (hasVerticalRuler) this.drawVerticalRuler();\n\n if (hasHorizontalRuler && hasVerticalRuler) {\n this.root.instance\n .rect(0, 0, RULER_WIDTH - LINE_WIDTH, RULER_WIDTH - LINE_WIDTH)\n .fill(RULER_COLOR);\n }\n\n this.root.instance.restore();\n }\n },\n drawHorizontalRuler() {\n const offset = this.hasVerticalRuler() ? RULER_WIDTH : 0;\n\n this.root.instance\n .rect(offset, 0, this.width, RULER_WIDTH)\n .fill(RULER_COLOR)\n .moveTo(this.hasVerticalRuler() ? RULER_WIDTH : 0, RULER_WIDTH)\n .lineTo(this.width, RULER_WIDTH)\n .stroke(LINE_COLOR);\n\n const hRange = range(this.width, this.getHorizontalSteps());\n\n hRange.map(step => {\n this.root.instance\n .moveTo(offset + step, 0)\n .lineTo(offset + step, RULER_WIDTH)\n .stroke(LINE_COLOR)\n .fillColor('black')\n .text(`${Math.round(step)}`, offset + step + 1, 1);\n });\n\n hRange.map(step => {\n if (step !== 0) {\n this.root.instance\n .moveTo(offset + step, RULER_WIDTH)\n .lineTo(offset + step, this.height)\n .stroke(GRID_COLOR);\n }\n });\n },\n drawVerticalRuler() {\n const offset = this.hasHorizontalRuler() ? RULER_WIDTH : 0;\n\n this.root.instance\n .rect(0, offset, RULER_WIDTH, this.height)\n .fill(RULER_COLOR)\n .moveTo(RULER_WIDTH, this.hasHorizontalRuler() ? RULER_WIDTH : 0)\n .lineTo(RULER_WIDTH, this.height)\n .stroke(LINE_COLOR);\n\n const vRange = range(this.height, this.getVerticalSteps());\n\n vRange.map(step => {\n this.root.instance\n .moveTo(0, offset + step)\n .lineTo(RULER_WIDTH, offset + step)\n .stroke(LINE_COLOR)\n .fillColor('black')\n .text(`${Math.round(step)}`, 1, offset + step + 1);\n });\n\n vRange.map(step => {\n if (step !== 0) {\n this.root.instance\n .moveTo(RULER_WIDTH, offset + step)\n .lineTo(this.width, offset + step)\n .stroke(GRID_COLOR);\n }\n });\n },\n};\n\nexport default Ruler;\n","class TextInstance {\n constructor(root, value) {\n this.root = root;\n this.value = value;\n this.parent = null;\n this.props = {};\n }\n\n get name() {\n return 'TextInstance';\n }\n\n getLayoutData() {\n return this.value;\n }\n\n remove() {\n this.parent.removeChild(this);\n }\n\n clone() {\n return new this.constructor(this.root, this.value);\n }\n\n cleanup() {}\n\n update(value) {\n this.value = value;\n this.parent.computed = false;\n this.parent.container = null;\n this.root.markDirty();\n }\n}\n\nexport default TextInstance;\n","const PAGE_SIZES = {\n '4A0': [4767.87, 6740.79],\n '2A0': [3370.39, 4767.87],\n A0: [2383.94, 3370.39],\n A1: [1683.78, 2383.94],\n A2: [1190.55, 1683.78],\n A3: [841.89, 1190.55],\n A4: [595.28, 841.89],\n A5: [419.53, 595.28],\n A6: [297.64, 419.53],\n A7: [209.76, 297.64],\n A8: [147.4, 209.76],\n A9: [104.88, 147.4],\n A10: [73.7, 104.88],\n B0: [2834.65, 4008.19],\n B1: [2004.09, 2834.65],\n B2: [1417.32, 2004.09],\n B3: [1000.63, 1417.32],\n B4: [708.66, 1000.63],\n B5: [498.9, 708.66],\n B6: [354.33, 498.9],\n B7: [249.45, 354.33],\n B8: [175.75, 249.45],\n B9: [124.72, 175.75],\n B10: [87.87, 124.72],\n C0: [2599.37, 3676.54],\n C1: [1836.85, 2599.37],\n C2: [1298.27, 1836.85],\n C3: [918.43, 1298.27],\n C4: [649.13, 918.43],\n C5: [459.21, 649.13],\n C6: [323.15, 459.21],\n C7: [229.61, 323.15],\n C8: [161.57, 229.61],\n C9: [113.39, 161.57],\n C10: [79.37, 113.39],\n RA0: [2437.8, 3458.27],\n RA1: [1729.13, 2437.8],\n RA2: [1218.9, 1729.13],\n RA3: [864.57, 1218.9],\n RA4: [609.45, 864.57],\n SRA0: [2551.18, 3628.35],\n SRA1: [1814.17, 2551.18],\n SRA2: [1275.59, 1814.17],\n SRA3: [907.09, 1275.59],\n SRA4: [637.8, 907.09],\n EXECUTIVE: [521.86, 756.0],\n FOLIO: [612.0, 936.0],\n LEGAL: [612.0, 1008.0],\n LETTER: [612.0, 792.0],\n TABLOID: [792.0, 1224.0],\n};\n\n// Return page size in an object { width, height } given the passed size and orientation\n// Accepts page type string, number, array or object as parameter\nconst getPageSize = (size, orientation = 'portrait') => {\n let result;\n\n if (typeof size === 'string') {\n result = PAGE_SIZES[size.toUpperCase()];\n } else if (Array.isArray(size)) {\n result = size;\n } else if (typeof size === 'number') {\n result = [size];\n } else if (typeof size === 'object' && size.width) {\n result = [size.width, size.height];\n } else {\n throw new Error(`Invalid Page size: ${size}`);\n }\n\n return orientation === 'portrait'\n ? { width: result[0], height: result[1] }\n : { width: result[1], height: result[0] };\n};\n\nexport default getPageSize;\n","import { Fragment } from 'react';\nimport Yoga from 'yoga-layout';\n\nimport Base from './Base';\nimport Ruler from '../mixins/ruler';\nimport warning from '../utils/warning';\nimport { createInstance } from './index';\nimport TextInstance from './TextInstance';\nimport getPageSize from '../utils/pageSizes';\nimport matchPercent from '../utils/matchPercent';\n\nclass Page extends Base {\n static defaultProps = {\n size: 'A4',\n wrap: true,\n orientation: 'portrait',\n };\n\n constructor(root, props) {\n super(root, props);\n\n this._size = null;\n }\n\n get name() {\n return 'Page';\n }\n\n get document() {\n return this.parent;\n }\n\n get page() {\n return this;\n }\n\n get orientation() {\n return this.props.orientation;\n }\n\n get size() {\n if (this._size) return this._size;\n\n this._size = getPageSize(this.props.size, this.orientation);\n\n // Adjust size for ruler\n if (this.hasHorizontalRuler()) {\n this._size.width += this.getRulerWidth();\n }\n\n if (this.hasVerticalRuler()) {\n this._size.height += this.getRulerWidth();\n }\n\n return this._size;\n }\n\n get isAutoHeight() {\n return typeof this.size.height === 'undefined';\n }\n\n resetMargins() {\n if (\n !!this.marginTop ||\n !!this.marginBottom ||\n !!this.marginLeft ||\n !!this.marginRight\n ) {\n warning(\n false,\n 'Margin values are not allowed on Page element. Use padding instead.',\n );\n\n this.marginTop = 0;\n this.marginBottom = 0;\n this.marginLeft = 0;\n this.marginRight = 0;\n }\n }\n\n applyProps() {\n super.applyProps();\n\n this.top = 0;\n this.left = 0;\n this.width = this.size.width;\n\n this.resetMargins();\n\n // Add some padding if ruler present, so we can see the whole page inside it\n const rulerWidth = this.getRulerWidth();\n\n if (this.hasHorizontalRuler()) {\n this.paddingTop = this.paddingTop + rulerWidth;\n }\n\n if (this.hasVerticalRuler()) {\n this.paddingLeft = this.paddingLeft + rulerWidth;\n }\n }\n\n setPadding(edge, value) {\n const dimension =\n edge === Yoga.EDGE_TOP || edge === Yoga.EDGE_BOTTOM\n ? this.size.height\n : this.size.width;\n\n const match = matchPercent(value);\n\n if (match) {\n this.layout.setPadding(edge, dimension * match.percent);\n } else {\n this.layout.setPadding(edge, value);\n }\n }\n\n async addDynamicChild(parent, elements) {\n if (!elements) return;\n const children = Array.isArray(elements) ? elements : [elements];\n\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n const { type, props } = child;\n\n if (typeof child === 'string') {\n const instance = new TextInstance(this.root, child);\n parent.appendChild(instance);\n } else if (type !== Fragment) {\n const instance = createInstance(child, this.root);\n await instance.onAppendDynamically();\n parent.appendChild(instance);\n instance.applyProps();\n await this.addDynamicChild(instance, props.children);\n } else {\n await this.addDynamicChild(parent, props.children);\n }\n }\n }\n\n async renderDynamicNodes(props, cb) {\n const listToExplore = this.children.slice(0);\n\n while (listToExplore.length > 0) {\n const node = listToExplore.shift();\n const condition = cb ? cb(node) : true;\n\n if (condition && node.props.render) {\n node.removeAllChilds();\n const elements = node.props.render(props);\n await this.addDynamicChild(node, elements);\n if (!node.fixed) node.props.render = null;\n continue;\n }\n\n if (node.children) {\n listToExplore.push(...node.children);\n }\n }\n }\n\n async nodeWillWrap(props) {\n await this.renderDynamicNodes(props);\n this.calculateLayout();\n }\n\n onNodeSplit(height, clone) {\n clone.marginTop = 0;\n this.marginBottom = 0;\n this.calculateLayout();\n }\n\n clone() {\n const clone = super.clone();\n clone._size = this.size;\n return clone;\n }\n\n update(newProps) {\n super.update(newProps);\n this._size = null;\n }\n\n async render() {\n const { instance } = this.root;\n\n if (!this.isAutoHeight) {\n this.height = this.size.height;\n }\n\n this.calculateLayout();\n\n const height = this.isAutoHeight ? this.height : this.size.height;\n\n instance.addPage({\n size: [this.size.width, height],\n margin: 0,\n });\n\n if (this.style.backgroundColor) {\n instance\n .fillColor(this.style.backgroundColor)\n .rect(0, 0, this.size.width, height)\n .fill();\n }\n\n await this.renderChildren();\n\n if (this.props.debug) {\n this.debug();\n }\n\n this.renderRuler();\n }\n}\n\nObject.assign(Page.prototype, Ruler);\n\nexport default Page;\n","import Base from './Base';\n\nclass View extends Base {\n static defaultProps = {\n wrap: true,\n };\n\n get name() {\n return 'View';\n }\n\n async render() {\n this.root.instance.save();\n this.applyTransformations();\n this.drawBackgroundColor();\n this.drawBorders();\n await this.renderChildren();\n if (this.props.debug) this.debug();\n this.root.instance.restore();\n }\n}\n\nexport default View;\n","import isUrl from 'is-url';\nimport fontkit from '@react-pdf/fontkit';\nimport fetch from 'cross-fetch';\n\nimport { processFontWeight } from '../stylesheet/transformFontWeight';\n\nconst fetchFont = async (src, options) => {\n const response = await fetch(src, options);\n\n const buffer = await (response.buffer\n ? response.buffer()\n : response.arrayBuffer());\n\n return buffer.constructor.name === 'Buffer' ? buffer : Buffer.from(buffer);\n};\n\nclass FontSource {\n constructor(src, fontFamily, fontStyle, fontWeight, options) {\n this.src = src;\n this.fontFamily = fontFamily;\n this.fontStyle = fontStyle || 'normal';\n this.fontWeight = processFontWeight(fontWeight) || 400;\n\n this.data = null;\n this.loading = false;\n this.options = options;\n }\n\n async load() {\n this.loading = true;\n\n if (BROWSER || isUrl(this.src)) {\n const { headers, body, method = 'GET' } = this.options;\n const data = await fetchFont(this.src, { method, body, headers });\n this.data = fontkit.create(data);\n } else {\n this.data = await new Promise((resolve, reject) =>\n fontkit.open(this.src, (err, data) =>\n err ? reject(err) : resolve(data),\n ),\n );\n }\n\n this.loading = false;\n }\n}\n\nclass Font {\n static create(family) {\n return new Font(family);\n }\n\n constructor(family) {\n this.family = family;\n this.sources = [];\n }\n\n register({ src, fontWeight, fontStyle, ...options }) {\n this.sources.push(\n new FontSource(src, this.fontFamily, fontStyle, fontWeight, options),\n );\n }\n\n resolve(descriptor) {\n const { fontWeight = 400, fontStyle = 'normal' } = descriptor;\n const styleSources = this.sources.filter(s => s.fontStyle === fontStyle);\n\n // Weight resolution. https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights\n const exactFit = styleSources.find(s => s.fontWeight === fontWeight);\n\n if (exactFit) return exactFit;\n\n let res;\n\n if (fontWeight >= 400 && fontWeight <= 500) {\n const leftOffset = styleSources.filter(s => s.fontWeight <= fontWeight);\n const rightOffset = styleSources.filter(s => s.fontWeight > 500);\n const fit = styleSources.filter(\n s => s.fontWeight >= fontWeight && s.fontWeight < 500,\n );\n\n res = fit[0] || leftOffset[leftOffset.length - 1] || rightOffset[0];\n }\n\n const lt = styleSources.filter(s => s.fontWeight < fontWeight);\n const gt = styleSources.filter(s => s.fontWeight > fontWeight);\n\n if (fontWeight < 400) {\n res = lt[lt.length - 1] || gt[0];\n }\n\n if (fontWeight > 500) {\n res = gt[0] || lt[lt.length - 1];\n }\n\n if (!res) {\n throw new Error(\n `Could not resolve font for ${\n this.fontFamily\n }, fontWeight ${fontWeight}`,\n );\n }\n\n return res;\n }\n}\n\nexport default Font;\n","let emojiSource;\n\nexport const registerEmojiSource = ({ url, format = 'png' }) => {\n emojiSource = { url, format };\n};\n\nexport const getEmojiSource = () => emojiSource;\n\nexport default {\n registerEmojiSource,\n getEmojiSource,\n};\n","let hyphenationCallback;\n\nexport const registerHyphenationCallback = callback => {\n hyphenationCallback = callback;\n};\n\nexport const getHyphenationCallback = () => hyphenationCallback;\n\nexport default {\n registerHyphenationCallback,\n getHyphenationCallback,\n};\n","export default [\n 'Courier',\n 'Courier-Bold',\n 'Courier-Oblique',\n 'Helvetica',\n 'Helvetica-Bold',\n 'Helvetica-Oblique',\n 'Times-Roman',\n 'Times-Bold',\n 'Times-Italic',\n];\n","import font from './font';\nimport emoji from './emoji';\nimport standardFonts from './standard';\nimport hyphenation from './hyphenation';\nimport warning from '../utils/warning';\n\nlet fonts = {};\n\nconst register = (src, data) => {\n if (typeof src === 'object') {\n data = src;\n } else {\n warning(\n false,\n 'Font.register will not longer accept the font source as first argument. Please move it into the data object. For more info refer to https://react-pdf.org/fonts',\n );\n\n data.src = src;\n }\n\n const { family } = data;\n\n if (!fonts[family]) {\n fonts[family] = font.create(family);\n }\n\n // Bulk loading\n if (data.fonts) {\n for (let i = 0; i < data.fonts.length; i++) {\n fonts[family].register({ family, ...data.fonts[i] });\n }\n } else {\n fonts[family].register(data);\n }\n};\n\nconst getRegisteredFonts = () => fonts;\n\nconst getRegisteredFontFamilies = () => Object.keys(fonts);\n\nconst getFont = descriptor => {\n const { fontFamily } = descriptor;\n const isStandard = standardFonts.includes(fontFamily);\n\n if (isStandard) return null;\n\n if (!fonts[fontFamily]) {\n throw new Error(\n `Font family not registered: ${fontFamily}. Please register it calling Font.register() method.`,\n );\n }\n\n return fonts[fontFamily].resolve(descriptor);\n};\n\nconst load = async function(descriptor, doc) {\n const { fontFamily } = descriptor;\n const isStandard = standardFonts.includes(fontFamily);\n\n if (isStandard) return;\n\n const font = getFont(descriptor);\n\n // We cache the font to avoid fetching it many times\n if (!font.data && !font.loading) {\n await font.load();\n }\n};\n\nconst reset = function() {\n for (const font in fonts) {\n if (fonts.hasOwnProperty(font)) {\n fonts[font].data = null;\n }\n }\n};\n\nconst clear = function() {\n fonts = {};\n};\n\nexport default {\n register,\n getRegisteredFonts,\n getRegisteredFontFamilies,\n getFont,\n load,\n clear,\n reset,\n ...emoji,\n ...hyphenation,\n};\n","import { PDFFont } from '@react-pdf/pdfkit';\n\nclass StandardFont {\n constructor(src) {\n this.name = src;\n this.src = PDFFont.open(null, src);\n }\n\n layout(str) {\n const [encoded, positions] = this.src.encode(str);\n\n return {\n positions,\n stringIndices: positions.map((_, i) => i),\n glyphs: encoded.map((g, i) => {\n const glyph = this.getGlyph(parseInt(g, 16));\n glyph.advanceWidth = positions[i].advanceWidth;\n return glyph;\n }),\n };\n }\n\n glyphForCodePoint(codePoint) {\n const glyph = this.getGlyph(codePoint);\n glyph.advanceWidth = 400;\n return glyph;\n }\n\n getGlyph(id) {\n return {\n id,\n _font: this.src,\n codePoints: [id],\n isLigature: false,\n name: this.src.font.characterToGlyph(id),\n };\n }\n\n hasGlyphForCodePoint(codePoint) {\n return this.src.font.characterToGlyph(codePoint) !== '.notdef';\n }\n\n // Based on empirical observation\n get ascent() {\n return 900;\n }\n\n // Based on empirical observation\n get descent() {\n switch (this.name) {\n case 'Times-Roman':\n case 'Times-Bold':\n case 'Times-Italic':\n return -220;\n case 'Courier':\n case 'Courier-Bold':\n case 'Courier-Oblique':\n return -230;\n default:\n return -200;\n }\n }\n\n get lineGap() {\n return 0;\n }\n\n get unitsPerEm() {\n return 1000;\n }\n}\n\nexport default StandardFont;\n","import { pathOr, last } from 'ramda';\n\nimport StandardFont from './standardFont';\n\nconst fontCache = {};\n\nconst IGNORED_CODE_POINTS = [173];\n\nconst getFontSize = pathOr(12, ['attributes', 'fontSize']);\n\nconst getFallbackFont = () => {\n return getOrCreateFont('Helvetica');\n};\n\nconst getOrCreateFont = name => {\n if (fontCache[name]) return fontCache[name];\n\n const font = new StandardFont(name);\n fontCache[name] = font;\n\n return font;\n};\n\nconst shouldFallbackToFont = (codePoint, font) => {\n return (\n !IGNORED_CODE_POINTS.includes(codePoint) &&\n !font.hasGlyphForCodePoint(codePoint) &&\n getFallbackFont().hasGlyphForCodePoint(codePoint)\n );\n};\n\nconst fontSubstitution = () => ({ string, runs }) => {\n let lastFont = null;\n let lastIndex = 0;\n let index = 0;\n\n const res = [];\n\n for (const run of runs) {\n const fontSize = getFontSize(run);\n const defaultFont =\n typeof run.attributes.font === 'string'\n ? getOrCreateFont(run.attributes.font)\n : run.attributes.font;\n\n if (string.length === 0) {\n res.push({ start: 0, end: 0, attributes: { font: defaultFont } });\n break;\n }\n\n for (const char of string.slice(run.start, run.end)) {\n const codePoint = char.codePointAt();\n const shouldFallback = shouldFallbackToFont(codePoint, defaultFont);\n const font = shouldFallback ? getFallbackFont() : defaultFont;\n\n // If the default font does not have a glyph and the fallback font does, we use it\n if (font !== lastFont) {\n if (lastFont) {\n res.push({\n start: lastIndex,\n end: index,\n attributes: {\n font: lastFont,\n scale: lastFont ? fontSize / lastFont.unitsPerEm : 0,\n },\n });\n }\n\n lastFont = font;\n lastIndex = index;\n }\n\n index += char.length;\n }\n }\n\n if (lastIndex < string.length) {\n const fontSize = getFontSize(last(runs));\n\n res.push({\n start: lastIndex,\n end: string.length,\n attributes: {\n font: lastFont,\n scale: lastFont ? fontSize / lastFont.unitsPerEm : 0,\n },\n });\n }\n\n return { string, runs: res };\n};\n\nexport default fontSubstitution;\n","import layoutEngine from '@react-pdf/textkit/layout';\nimport linebreaker from '@react-pdf/textkit/engines/linebreaker';\nimport justification from '@react-pdf/textkit/engines/justification';\nimport textDecoration from '@react-pdf/textkit/engines/textDecoration';\nimport scriptItemizer from '@react-pdf/textkit/engines/scriptItemizer';\nimport wordHyphenation from '@react-pdf/textkit/engines/wordHyphenation';\n\nimport fontSubstitution from './fontSubstitution';\n\nconst engines = {\n linebreaker,\n justification,\n textDecoration,\n scriptItemizer,\n wordHyphenation,\n fontSubstitution,\n};\n\nconst engine = layoutEngine(engines);\n\nexport default engine;\n","const PROTOCOL_REGEXP = /^([a-z]+\\:(\\/\\/)?)/i;\n\nexport const getURL = value => {\n if (!value) return '';\n\n if (typeof value === 'string' && !value.match(PROTOCOL_REGEXP)) {\n return `http://${value}`;\n }\n\n return value;\n};\n","import PNG from '@react-pdf/png-js';\n\nPNG.isValid = function(data) {\n try {\n return !!new PNG(data);\n } catch (e) {\n return false;\n }\n};\n\nexport default PNG;\n","// Extracted from https://github.com/devongovett/pdfkit/blob/master/lib/image/jpeg.coffee\n\nconst MARKERS = [\n 0xffc0,\n 0xffc1,\n 0xffc2,\n 0xffc3,\n 0xffc5,\n 0xffc6,\n 0xffc7,\n 0xffc8,\n 0xffc9,\n 0xffca,\n 0xffcb,\n 0xffcc,\n 0xffcd,\n 0xffce,\n 0xffcf,\n];\n\nclass JPEG {\n data = null;\n width = null;\n height = null;\n\n constructor(data) {\n this.data = data;\n\n if (data.readUInt16BE(0) !== 0xffd8) {\n throw new Error('SOI not found in JPEG');\n }\n\n let marker;\n let pos = 2;\n\n while (pos < data.length) {\n marker = data.readUInt16BE(pos);\n pos += 2;\n if (MARKERS.includes(marker)) {\n break;\n }\n pos += data.readUInt16BE(pos);\n }\n\n if (!MARKERS.includes(marker)) {\n throw new Error('Invalid JPEG.');\n }\n\n pos += 3;\n this.height = data.readUInt16BE(pos);\n\n pos += 2;\n this.width = data.readUInt16BE(pos);\n }\n}\n\nJPEG.isValid = function(data) {\n if (!data || !Buffer.isBuffer(data) || data.readUInt16BE(0) !== 0xffd8) {\n return false;\n }\n\n let marker;\n let pos = 2;\n\n while (pos < data.length) {\n marker = data.readUInt16BE(pos);\n pos += 2;\n if (MARKERS.includes(marker)) {\n break;\n }\n pos += data.readUInt16BE(pos);\n }\n\n if (!MARKERS.includes(marker)) {\n return false;\n }\n\n return true;\n};\n\nexport default JPEG;\n","const createCache = ({ limit = 100 } = {}) => {\n let cache = {};\n let keys = [];\n\n return {\n get: key => cache[key],\n set: (key, value) => {\n keys.push(key);\n if (keys.length > limit) {\n delete cache[keys.shift()];\n }\n cache[key] = value;\n },\n reset: () => {\n cache = {};\n keys = [];\n },\n length: () => keys.length,\n };\n};\n\nexport default createCache;\n","import fs from 'fs';\nimport url from 'url';\nimport path from 'path';\nimport fetch from 'cross-fetch';\n\nimport PNG from './png';\nimport JPEG from './jpeg';\nimport createCache from './cache';\n\nexport const IMAGE_CACHE = createCache({ limit: 30 });\n\nexport const getAbsoluteLocalPath = src => {\n if (BROWSER) {\n throw new Error('Cannot check local paths in client-side environment');\n }\n\n const { protocol, auth, host, port, hostname, path: pathname } = url.parse(\n src,\n );\n const absolutePath = path.resolve(pathname);\n if ((protocol && protocol !== 'file:') || auth || host || port || hostname) {\n return undefined;\n }\n return absolutePath;\n};\n\nexport const isDangerousLocalPath = (\n filename,\n { safePath = './public' } = {},\n) => {\n if (BROWSER) {\n throw new Error(\n 'Cannot check dangerous local path in client-side environemnt',\n );\n }\n const absoluteSafePath = path.resolve(safePath);\n const absoluteFilePath = path.resolve(filename);\n return !absoluteFilePath.startsWith(absoluteSafePath);\n};\n\nconst fetchLocalFile = (src, { safePath, allowDangerousPaths = false } = {}) =>\n new Promise((resolve, reject) => {\n try {\n if (BROWSER) {\n return reject(new Error('Cannot fetch local file in this environemnt'));\n }\n const absolutePath = getAbsoluteLocalPath(src);\n if (!absolutePath) {\n return reject(new Error(`Cannot fetch non-local path: ${src}`));\n }\n if (\n !allowDangerousPaths &&\n isDangerousLocalPath(absolutePath, { safePath })\n ) {\n return reject(new Error(`Cannot fetch dangerous local path: ${src}`));\n }\n fs.readFile(absolutePath, (err, data) =>\n err ? reject(err) : resolve(data),\n );\n } catch (err) {\n reject(err);\n }\n });\n\nconst fetchRemoteFile = async (uri, options) => {\n const response = await fetch(uri, options);\n\n const buffer = await (response.buffer\n ? response.buffer()\n : response.arrayBuffer());\n\n return buffer.constructor.name === 'Buffer' ? buffer : Buffer.from(buffer);\n};\n\nconst isValidFormat = format => {\n const lower = format.toLowerCase();\n return lower === 'jpg' || lower === 'jpeg' || lower === 'png';\n};\n\nconst guessFormat = buffer => {\n let format;\n\n if (JPEG.isValid(buffer)) {\n format = 'jpg';\n } else if (PNG.isValid(buffer)) {\n format = 'png';\n }\n\n return format;\n};\n\nconst isCompatibleBase64 = ({ uri }) =>\n /^data:image\\/[a-zA-Z]*;base64,[^\"]*/g.test(uri);\n\nfunction getImage(body, extension) {\n switch (extension.toLowerCase()) {\n case 'jpg':\n case 'jpeg':\n return new JPEG(body);\n case 'png':\n return new PNG(body);\n default:\n return null;\n }\n}\n\nconst resolveBase64Image = ({ uri }) => {\n const match = /^data:image\\/([a-zA-Z]*);base64,([^\"]*)/g.exec(uri);\n const format = match[1];\n const data = match[2];\n\n if (!isValidFormat(format)) {\n throw new Error(`Base64 image invalid format: ${format}`);\n }\n\n return new Promise(resolve => {\n return resolve(getImage(Buffer.from(data, 'base64'), format));\n });\n};\n\nconst resolveImageFromData = src => {\n if (src.data && src.format) {\n return new Promise(resolve => resolve(getImage(src.data, src.format)));\n }\n\n throw new Error(`Invalid data given for local file: ${JSON.stringify(src)}`);\n};\n\nconst resolveBufferImage = buffer => {\n const format = guessFormat(buffer);\n\n if (format) {\n return new Promise(resolve => resolve(getImage(buffer, format)));\n }\n};\n\nconst getImageFormat = body => {\n const isPng =\n body[0] === 137 &&\n body[1] === 80 &&\n body[2] === 78 &&\n body[3] === 71 &&\n body[4] === 13 &&\n body[5] === 10 &&\n body[6] === 26 &&\n body[7] === 10;\n\n const isJpg = body[0] === 255 && body[1] === 216 && body[2] === 255;\n\n let extension = '';\n if (isPng) {\n extension = 'png';\n } else if (isJpg) {\n extension = 'jpg';\n } else {\n throw new Error('Not valid image extension');\n }\n\n return extension;\n};\n\nconst resolveImageFromUrl = async (src, options) => {\n const { uri, body, headers, method = 'GET' } = src;\n\n const data =\n !BROWSER && getAbsoluteLocalPath(uri)\n ? await fetchLocalFile(uri, options)\n : await fetchRemoteFile(uri, { body, headers, method });\n\n const extension = getImageFormat(data);\n\n return getImage(data, extension);\n};\n\nexport const resolveImage = (src, { cache = true, ...options } = {}) => {\n const cacheKey = src.data ? src.data.toString() : src.uri;\n\n if (cache && IMAGE_CACHE.get(cacheKey)) {\n return IMAGE_CACHE.get(cacheKey);\n }\n\n let image;\n if (isCompatibleBase64(src)) {\n image = resolveBase64Image(src);\n } else if (Buffer.isBuffer(src)) {\n image = resolveBufferImage(src);\n } else if (typeof src === 'object' && src.data) {\n image = resolveImageFromData(src);\n } else {\n image = resolveImageFromUrl(src, options);\n }\n\n if (!image) {\n throw new Error('Cannot resolve image');\n }\n\n if (cache) {\n IMAGE_CACHE.set(cacheKey, image);\n }\n\n return image;\n};\n","/* eslint-disable no-cond-assign */\nimport emojiRegex from 'emoji-regex';\nimport Font from '../font';\nimport { resolveImage } from '../utils/image';\n\n// Caches emoji images data\nconst emojis = {};\nconst regex = emojiRegex();\n\nconst reflect = promise => (...args) => promise(...args).then(v => v, e => e);\n\n// Returns a function to be able to mock resolveImage.\nconst makeFetchEmojiImage = () => reflect(resolveImage);\n\n/**\n * When an emoji as no color, it might still have 2 parts,\n * the canonical emoji and an empty string.\n * ex.\n * (no color) Array.from('❤️') => [\"❤\", \"️\"]\n * (w/ color) Array.from('👍🏿') => [\"👍\", \"🏿\"]\n *\n * The empty string needs to be removed otherwise the generated\n * url will be incorect.\n */\nconst _removeNoColor = x => x !== '️';\n\nconst getCodePoints = string =>\n Array.from(string)\n .filter(_removeNoColor)\n .map(char => char.codePointAt(0).toString(16))\n .join('-');\n\nconst buildEmojiUrl = emoji => {\n const { url, format } = Font.getEmojiSource();\n return `${url}${getCodePoints(emoji)}.${format}`;\n};\n\nexport const fetchEmojis = string => {\n const emojiSource = Font.getEmojiSource();\n\n if (!emojiSource || !emojiSource.url) return [];\n\n const promises = [];\n\n let match;\n while ((match = regex.exec(string))) {\n const emoji = match[0];\n\n if (!emojis[emoji] || emojis[emoji].loading) {\n const emojiUrl = buildEmojiUrl(emoji);\n\n emojis[emoji] = { loading: true };\n const fetchEmojiImage = makeFetchEmojiImage();\n promises.push(\n fetchEmojiImage({ uri: emojiUrl }).then(image => {\n emojis[emoji].loading = false;\n emojis[emoji].data = image.data;\n }),\n );\n }\n }\n\n return promises;\n};\n\nexport const embedEmojis = fragments => {\n const result = [];\n\n for (let i = 0; i < fragments.length; i++) {\n const fragment = fragments[i];\n\n let match;\n let lastIndex = 0;\n\n while ((match = regex.exec(fragment.string))) {\n const index = match.index;\n const emoji = match[0];\n const emojiSize = fragment.attributes.fontSize;\n const chunk = fragment.string.slice(lastIndex, index + match[0].length);\n\n // If emoji image was found, we create a new fragment with the\n // correct attachment and object substitution character;\n if (emojis[emoji] && emojis[emoji].data) {\n result.push({\n string: chunk.replace(match, String.fromCharCode(0xfffc)),\n attributes: {\n ...fragment.attributes,\n attachment: {\n width: emojiSize,\n height: emojiSize,\n yOffset: Math.floor(emojiSize * 0.1),\n image: emojis[emoji].data,\n },\n },\n });\n } else {\n // If no emoji data, we just replace the emoji with a nodef char\n result.push({\n string: chunk.replace(match, String.fromCharCode(0)),\n attributes: fragment.attributes,\n });\n }\n\n lastIndex = index + emoji.length;\n }\n\n if (lastIndex < fragment.string.length) {\n result.push({\n string: fragment.string.slice(lastIndex),\n attributes: fragment.attributes,\n });\n }\n }\n\n return result;\n};\n","const IGNORABLE_CODEPOINTS = [\n 8232, // LINE_SEPARATOR\n 8233, // PARAGRAPH_SEPARATOR\n];\n\nconst buildSubsetForFont = font =>\n IGNORABLE_CODEPOINTS.reduce((acc, codePoint) => {\n if (font.hasGlyphForCodePoint && font.hasGlyphForCodePoint(codePoint)) {\n return acc;\n }\n return [...acc, String.fromCharCode(codePoint)];\n }, []);\n\nexport const ignoreChars = fragments =>\n fragments.map(fragment => {\n const charSubset = buildSubsetForFont(fragment.attributes.font);\n const subsetRegex = new RegExp(charSubset.join('|'));\n\n return {\n string: fragment.string.replace(subsetRegex, ''),\n attributes: fragment.attributes,\n };\n });\n","import { isNil, propEq, prop, complement, compose } from 'ramda';\nimport AttributedString from '@react-pdf/textkit/attributedString';\n\nimport Font from '../font';\nimport { embedEmojis } from './emoji';\nimport { ignoreChars } from './ignorableChars';\n\nconst PREPROCESSORS = [ignoreChars, embedEmojis];\n\nconst capitalize = value => value.replace(/(^|\\s)\\S/g, l => l.toUpperCase());\n\nconst isImage = propEq('name', 'Image');\n\nconst isTextInstance = compose(\n complement(isNil),\n prop('value'),\n);\n\nconst transformText = (text, transformation) => {\n switch (transformation) {\n case 'uppercase':\n return text.toUpperCase();\n case 'lowercase':\n return text.toLowerCase();\n case 'capitalize':\n return capitalize(text);\n default:\n return text;\n }\n};\n\nexport const getFragments = instance => {\n if (!instance) return [{ string: '' }];\n\n let fragments = [];\n const {\n color = 'black',\n backgroundColor,\n fontFamily = 'Helvetica',\n fontWeight,\n fontStyle,\n fontSize = 18,\n textAlign = 'left',\n lineHeight,\n textDecoration,\n textDecorationColor,\n textDecorationStyle,\n textTransform,\n letterSpacing,\n textIndent,\n opacity,\n } = instance.style;\n\n const obj = Font.getFont({ fontFamily, fontWeight, fontStyle });\n const font = obj ? obj.data : fontFamily;\n const attributes = {\n font,\n color,\n opacity,\n fontSize,\n backgroundColor,\n align: textAlign,\n indent: textIndent,\n link: instance.src,\n characterSpacing: letterSpacing,\n underlineStyle: textDecorationStyle,\n underline: textDecoration === 'underline',\n underlineColor: textDecorationColor || color,\n strike: textDecoration === 'line-through',\n strikeStyle: textDecorationStyle,\n strikeColor: textDecorationColor || color,\n lineHeight: lineHeight ? lineHeight * fontSize : null,\n };\n\n instance.children.forEach(child => {\n if (isImage(child)) {\n fragments.push({\n string: String.fromCharCode(0xfffc),\n attributes: {\n ...attributes,\n attachment: {\n width: child.style.width || fontSize,\n height: child.style.height || fontSize,\n image: child.image.data,\n },\n },\n });\n } else if (isTextInstance(child)) {\n fragments.push({\n string: transformText(child.value, textTransform),\n attributes,\n });\n } else {\n if (child) {\n fragments.push(...getFragments(child));\n }\n }\n });\n\n for (const preprocessor of PREPROCESSORS) {\n fragments = preprocessor(fragments);\n }\n\n return fragments;\n};\n\nexport const getAttributedString = instance => {\n return AttributedString.fromFragments(getFragments(instance));\n};\n","import Yoga from 'yoga-layout';\nimport PDFRenderer from '@react-pdf/textkit/renderers/pdf';\nimport AttributedString from '@react-pdf/textkit/attributedString';\n\nimport Base from './Base';\nimport Font from '../font';\nimport layout from '../layout';\nimport { getURL } from '../utils/url';\nimport { getAttributedString } from '../utils/attributedString';\n\nclass Text extends Base {\n static defaultProps = {\n wrap: true,\n widows: 2,\n orphans: 2,\n };\n\n constructor(root, props) {\n super(root, props);\n\n this.start = 0;\n this.end = 0;\n\n this.blocks = null;\n this.computed = false;\n this.attributedString = null;\n this.layoutOptions = {\n hyphenationPenalty: props.hyphenationPenalty,\n hyphenationCallback: Font.getHyphenationCallback(),\n shrinkWhitespaceFactor: { before: -0.5, after: -0.5 },\n };\n\n this.layout.setMeasureFunc(this.measureText.bind(this));\n }\n\n get name() {\n return 'Text';\n }\n\n get src() {\n return getURL(this.props.src || this.props.href);\n }\n\n get lines() {\n if (!this.blocks) return [];\n\n return this.blocks\n .reduce((acc, block) => [...acc, ...block], [])\n .splice(this.start, this.end);\n }\n\n get linesHeight() {\n if (!this.blocks) return -1;\n return this.lines.reduce((acc, line) => acc + line.box.height, 0);\n }\n\n get linesWidth() {\n if (!this.blocks) return -1;\n return Math.max(\n ...this.lines.map(line => AttributedString.advanceWidth(line)),\n );\n }\n\n appendChild(child) {\n if (child) {\n child.parent = this;\n this.children.push(child);\n this.computed = false;\n this.attributedString = null;\n this.markDirty();\n }\n }\n\n removeChild(child) {\n const index = this.children.indexOf(child);\n\n if (index !== -1) {\n child.parent = null;\n this.children.splice(index, 1);\n this.computed = false;\n this.attributedString = null;\n this.markDirty();\n\n child.cleanup();\n }\n }\n\n lineIndexAtHeight(height) {\n let counter = 0;\n\n for (let i = 0; i < this.lines.length; i++) {\n const line = this.lines[i];\n if (counter + line.box.height > height) return i;\n counter += line.box.height;\n }\n\n return this.lines.length;\n }\n\n heightAtLineIndex(index) {\n let counter = 0;\n\n for (let i = 0; i < index; i++) {\n const line = this.lines[i];\n counter += line.box.height;\n }\n\n return counter;\n }\n\n layoutText(width, height) {\n this.attributedString = getAttributedString(this);\n\n // Text layout is expensive. That's why we ensure to only do it once\n // (except dynamic nodes. Those change content and needs to relayout every time)\n if (!this.blocks || this.props.render) {\n // Do the actual text layout.\n /// If height null or NaN, we take some liberty on layout height\n const container = {\n x: 0,\n y: 0,\n width,\n height: height || Infinity,\n maxLines: this.style.maxLines,\n truncateMode: this.style.textOverflow,\n };\n this.blocks = layout(\n this.attributedString,\n container,\n this.layoutOptions,\n );\n }\n\n // Get the total amount of rendered lines\n const linesCount = this.blocks.reduce((acc, b) => acc + b.length, 0);\n\n this.end = linesCount + 1;\n this.computed = true;\n }\n\n measureText(width, widthMode, height, heightMode) {\n if (widthMode === Yoga.MEASURE_MODE_EXACTLY) {\n this.layoutText(width, height);\n\n return { height: this.linesHeight };\n }\n\n if (widthMode === Yoga.MEASURE_MODE_AT_MOST) {\n this.layoutText(width, height);\n\n return {\n height: this.linesHeight,\n width: Math.min(width, this.linesWidth),\n };\n }\n\n return {};\n }\n\n resolveStyles() {\n const styles = super.resolveStyles();\n\n // Inherit relative positioning for inline childs\n if (\n this.parent &&\n this.parent.name === 'Text' &&\n this.parent.style.position === 'relative'\n ) {\n styles.top = styles.top || this.parent.style.top;\n styles.bottom = styles.bottom || this.parent.style.bottom;\n styles.position = styles.position || 'relative';\n }\n\n // Apply default link styles\n if (this.src) {\n styles.color = styles.color || 'blue';\n styles.textDecoration = styles.textDecoration || 'underline';\n }\n\n return styles;\n }\n\n wrapHeight(height) {\n const { orphans, widows } = this.props;\n const linesQuantity = this.lines.length;\n const sliceHeight = height - this.paddingTop;\n const slicedLine = this.lineIndexAtHeight(sliceHeight);\n\n if (linesQuantity < orphans) {\n return height;\n } else if (slicedLine < orphans || linesQuantity < orphans + widows) {\n return 0;\n } else if (linesQuantity === orphans + widows) {\n return this.heightAtLineIndex(orphans);\n } else if (linesQuantity - slicedLine < widows) {\n return height - this.heightAtLineIndex(widows - 1);\n }\n\n return height;\n }\n\n onNodeSplit(height, clone) {\n const wrapHeight = this.wrapHeight(height);\n const slicedLineIndex = this.lineIndexAtHeight(wrapHeight);\n\n clone.marginTop = 0;\n clone.paddingTop = 0;\n clone.start = slicedLineIndex;\n clone.attributedString = this.attributedString;\n\n this.height = wrapHeight;\n this.marginBottom = 0;\n this.paddingBottom = 0;\n this.end = slicedLineIndex;\n }\n\n clone() {\n const text = super.clone();\n\n text.layoutEngine = this.layoutEngine;\n\n // Save calculated layout for non-dynamic clone elements\n if (this.blocks && !this.props.render) {\n text.blocks = [...this.blocks];\n }\n\n return text;\n }\n\n renderText() {\n const { top, left } = this.getAbsoluteLayout();\n const initialY = this.lines[0] ? this.lines[0].box.y : 0;\n\n // We translate lines based on Yoga container\n this.root.instance.save();\n this.root.instance.translate(\n left + this.padding.left,\n top + this.padding.top - initialY,\n );\n\n // Perform actual text rendering on document\n PDFRenderer.render(this.root.instance, [this.lines]);\n\n this.root.instance.restore();\n }\n\n async render() {\n this.root.instance.save();\n this.applyTransformations();\n this.drawBackgroundColor();\n this.drawBorders();\n\n // Calculate text layout if needed\n // This can happen if measureText was not called by Yoga\n if (!this.computed) {\n this.layoutText(\n this.width - this.padding.left - this.padding.right,\n this.height - this.padding.top - this.padding.bottom,\n );\n }\n\n this.renderText();\n\n if (this.props.debug) {\n this.debug();\n }\n\n this.root.instance.restore();\n }\n}\n\nexport default Text;\n","import Base from './Base';\nimport { getURL } from '../utils/url';\n\nclass Link extends Base {\n get name() {\n return 'Link';\n }\n\n get src() {\n return getURL(this.props.src || this.props.href);\n }\n\n async render() {\n const { top, left, width, height } = this.getAbsoluteLayout();\n this.root.instance.link(left, top, width, height, this.src);\n await this.renderChildren();\n if (this.props.debug) this.debug();\n }\n}\n\nexport default Link;\n","import Base from './Base';\n\nclass Note extends Base {\n static defaultProps = {};\n\n get name() {\n return 'Note';\n }\n\n appendChild(child) {\n if (child.name !== 'TextInstance') {\n throw new Error('Note only accepts string children');\n }\n\n if (child) {\n child.parent = this;\n this.children.push(child);\n }\n }\n\n removeChild(child) {\n const index = this.children.indexOf(child);\n\n if (index !== -1) {\n child.parent = null;\n this.children.splice(index, 1);\n }\n\n child.cleanup();\n }\n\n applyProps() {\n super.applyProps();\n this.height = 0;\n this.width = 0;\n }\n\n async render() {\n const { top, left } = this.getAbsoluteLayout();\n const value = this.children[0] ? this.children[0].value : '';\n\n this.root.instance.note(left, top, 0, 0, value);\n }\n}\n\nexport default Note;\n","import matchPercent from './matchPercent';\n\nconst isNumeric = n => {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\nconst applyContainObjectFit = (cw, ch, iw, ih, px, py) => {\n const cr = cw / ch;\n const ir = iw / ih;\n\n const pxp = matchPercent(px);\n const pyp = matchPercent(py);\n const pxv = pxp ? pxp.percent : 0.5;\n const pyv = pyp ? pyp.percent : 0.5;\n\n if (cr > ir) {\n const height = ch;\n const width = height * ir;\n const yOffset = isNumeric(py) ? py : 0;\n const xOffset = isNumeric(px) ? px : (cw - width) * pxv;\n\n return { width, height, xOffset, yOffset };\n } else {\n const width = cw;\n const height = width / ir;\n const xOffset = isNumeric(px) ? px : 0;\n const yOffset = isNumeric(py) ? py : (ch - height) * pyv;\n\n return { width, height, yOffset, xOffset };\n }\n};\n\nconst applyNoneObjectFit = (cw, ch, iw, ih, px, py) => {\n const width = iw;\n const height = ih;\n const pxp = matchPercent(px);\n const pyp = matchPercent(py);\n const pxv = pxp ? pxp.percent : 0.5;\n const pyv = pyp ? pyp.percent : 0.5;\n const xOffset = isNumeric(px) ? px : (cw - width) * pxv;\n const yOffset = isNumeric(py) ? py : (ch - height) * pyv;\n\n return { width, height, xOffset, yOffset };\n};\n\nconst applyCoverObjectFit = (cw, ch, iw, ih, px, py) => {\n const ir = iw / ih;\n const cr = cw / ch;\n\n const pxp = matchPercent(px);\n const pyp = matchPercent(py);\n const pxv = pxp ? pxp.percent : 0.5;\n const pyv = pyp ? pyp.percent : 0.5;\n\n if (cr > ir) {\n const width = cw;\n const height = width / ir;\n const xOffset = isNumeric(px) ? px : 0;\n const yOffset = isNumeric(py) ? py : (ch - height) * pyv;\n return { width, height, yOffset, xOffset };\n } else {\n const height = ch;\n const width = height * ir;\n const xOffset = isNumeric(px) ? px : (cw - width) * pxv;\n const yOffset = isNumeric(py) ? py : 0;\n return { width, height, xOffset, yOffset };\n }\n};\n\nconst applyScaleDownObjectFit = (cw, ch, iw, ih, px, py) => {\n const containDimension = applyContainObjectFit(cw, ch, iw, ih, px, py);\n const noneDimension = applyNoneObjectFit(cw, ch, iw, ih, px, py);\n\n return containDimension.width < noneDimension.width\n ? containDimension\n : noneDimension;\n};\n\nconst applyFillObjectFit = (cw, ch, px, py) => {\n return {\n width: cw,\n height: ch,\n xOffset: matchPercent(px) ? 0 : px || 0,\n yOffset: matchPercent(py) ? 0 : py || 0,\n };\n};\n\nexport const resolveObjectFit = (type = 'fill', cw, ch, iw, ih, px, py) => {\n switch (type) {\n case 'contain':\n return applyContainObjectFit(cw, ch, iw, ih, px, py);\n case 'cover':\n return applyCoverObjectFit(cw, ch, iw, ih, px, py);\n case 'none':\n return applyNoneObjectFit(cw, ch, iw, ih, px, py);\n case 'scale-down':\n return applyScaleDownObjectFit(cw, ch, iw, ih, px, py);\n default:\n return applyFillObjectFit(cw, ch, px, py);\n }\n};\n","import Yoga from 'yoga-layout';\n\nimport Base from './Base';\nimport warning from '../utils/warning';\nimport { resolveImage } from '../utils/image';\nimport { resolveObjectFit } from '../utils/objectFit';\n\nconst SAFETY_HEIGHT = 10;\n\nclass Image extends Base {\n static defaultProps = {\n wrap: false,\n cache: true,\n style: {},\n };\n\n constructor(root, props) {\n super(root, props);\n\n this.image = null;\n this.layout.setMeasureFunc(this.measureImage.bind(this));\n }\n\n get name() {\n return 'Image';\n }\n\n shouldGrow() {\n return !!this.style.flexGrow;\n }\n\n measureImage(width, widthMode, height, heightMode) {\n const imageMargin = this.margin;\n const pagePadding = this.page.padding;\n const pageArea = this.page.isAutoHeight\n ? Infinity\n : this.page.size.height -\n pagePadding.top -\n pagePadding.bottom -\n imageMargin.top -\n imageMargin.bottom -\n SAFETY_HEIGHT;\n\n // Skip measure if image data not present yet\n if (!this.image) return { width: 0, height: 0 };\n\n if (\n widthMode === Yoga.MEASURE_MODE_EXACTLY &&\n heightMode === Yoga.MEASURE_MODE_UNDEFINED\n ) {\n const scaledHeight = width / this.ratio;\n return { height: Math.min(pageArea, scaledHeight) };\n }\n\n if (\n heightMode === Yoga.MEASURE_MODE_EXACTLY &&\n (widthMode === Yoga.MEASURE_MODE_AT_MOST ||\n widthMode === Yoga.MEASURE_MODE_UNDEFINED)\n ) {\n return { width: Math.min(height * this.ratio, width) };\n }\n\n if (\n widthMode === Yoga.MEASURE_MODE_EXACTLY &&\n heightMode === Yoga.MEASURE_MODE_AT_MOST\n ) {\n const scaledHeight = width / this.ratio;\n return { height: Math.min(height, pageArea, scaledHeight) };\n }\n\n if (\n widthMode === Yoga.MEASURE_MODE_AT_MOST &&\n heightMode === Yoga.MEASURE_MODE_AT_MOST\n ) {\n if (this.ratio > 1) {\n return {\n width: width,\n height: Math.min(width / this.ratio, height),\n };\n } else {\n return {\n width: Math.min(height * this.ratio, width),\n height: height,\n };\n }\n }\n\n return { height, width };\n }\n\n get ratio() {\n return this.image.data ? this.image.width / this.image.height : 1;\n }\n\n get src() {\n const src = this.props.src || this.props.source;\n return typeof src === 'string' ? { uri: src } : src;\n }\n\n async fetch() {\n const { cache, safePath, allowDangerousPaths } = this.props;\n\n if (!this.src) {\n warning(false, 'Image should receive either a \"src\" or \"source\" prop');\n return;\n }\n\n try {\n this.image = await resolveImage(this.src, {\n cache,\n safePath,\n allowDangerousPaths,\n });\n } catch (e) {\n this.image = { width: 0, height: 0 };\n console.warn(e.message);\n }\n }\n\n clone() {\n const clone = super.clone();\n clone.image = this.image;\n return clone;\n }\n\n async onAppendDynamically() {\n await this.fetch();\n }\n\n renderImage() {\n const padding = this.padding;\n const { left, top } = this.getAbsoluteLayout();\n const { opacity, objectPositionX, objectPositionY } = this.style;\n\n this.root.instance.save();\n\n // Clip path to keep image inside border radius\n this.clip();\n\n if (this.image.data) {\n const { width, height, xOffset, yOffset } = resolveObjectFit(\n this.style.objectFit,\n this.width - padding.left - padding.right,\n this.height - padding.top - padding.bottom,\n this.image.width,\n this.image.height,\n objectPositionX,\n objectPositionY,\n );\n\n if (width !== 0 && height !== 0) {\n this.root.instance\n .fillOpacity(opacity)\n .image(\n this.image.data,\n left + padding.left + xOffset,\n top + padding.top + yOffset,\n { width, height },\n );\n } else {\n warning(\n false,\n `Image with src '${\n this.props.src\n }' skipped due to invalid dimensions`,\n );\n }\n }\n\n this.root.instance.restore();\n }\n\n async render() {\n this.root.instance.save();\n this.applyTransformations();\n this.drawBackgroundColor();\n this.renderImage();\n this.drawBorders();\n\n if (this.props.debug) {\n this.debug();\n }\n\n this.root.instance.restore();\n }\n}\n\nexport default Image;\n","import wrapPages from 'page-wrapping';\n\nimport Font from '../font';\nimport { fetchEmojis } from '../utils/emoji';\n\nclass Document {\n static defaultProps = {\n author: null,\n keywords: null,\n subject: null,\n title: null,\n };\n\n constructor(root, props) {\n this.root = root;\n this.style = {};\n this.props = props;\n this.children = [];\n this.subpages = [];\n }\n\n get name() {\n return 'Document';\n }\n\n appendChild(child) {\n child.parent = this;\n this.children.push(child);\n }\n\n removeChild(child) {\n const index = this.children.indexOf(child);\n\n if (index !== -1) {\n child.parent = null;\n this.children.splice(index, 1);\n }\n\n child.cleanup();\n }\n\n addMetaData() {\n const { title, author, subject, keywords, creator, producer } = this.props;\n\n // The object keys need to start with a capital letter by the PDF spec\n if (title) this.root.instance.info.Title = title;\n if (author) this.root.instance.info.Author = author;\n if (subject) this.root.instance.info.Subject = subject;\n if (keywords) this.root.instance.info.Keywords = keywords;\n\n this.root.instance.info.Creator = creator || 'react-pdf';\n this.root.instance.info.Producer = producer || 'react-pdf';\n }\n\n async loadFonts() {\n const promises = [];\n const listToExplore = this.children.slice(0);\n\n while (listToExplore.length > 0) {\n const node = listToExplore.shift();\n\n if (node.style && node.style.fontFamily) {\n promises.push(Font.load(node.style, this.root.instance));\n }\n\n if (node.children) {\n node.children.forEach(childNode => {\n listToExplore.push(childNode);\n });\n }\n }\n\n await Promise.all(promises);\n }\n\n async loadEmojis() {\n const promises = [];\n const listToExplore = this.children.slice(0);\n\n while (listToExplore.length > 0) {\n const node = listToExplore.shift();\n\n if (typeof node === 'string') {\n promises.push(...fetchEmojis(node));\n } else if (typeof node.value === 'string') {\n promises.push(...fetchEmojis(node.value));\n } else if (node.children) {\n node.children.forEach(childNode => {\n listToExplore.push(childNode);\n });\n }\n }\n\n await Promise.all(promises);\n }\n\n async loadImages() {\n const promises = [];\n const listToExplore = this.children.slice(0);\n\n while (listToExplore.length > 0) {\n const node = listToExplore.shift();\n\n if (node.name === 'Image') {\n promises.push(node.fetch());\n }\n\n if (node.children) {\n node.children.forEach(childNode => {\n listToExplore.push(childNode);\n });\n }\n }\n\n await Promise.all(promises);\n }\n\n async loadAssets() {\n await Promise.all([this.loadFonts(), this.loadImages(), this.loadEmojis()]);\n }\n\n applyProps() {\n this.children.forEach(child => child.applyProps());\n }\n\n update(newProps) {\n this.props = newProps;\n }\n\n cleanup() {\n this.subpages.forEach(p => p.cleanup());\n }\n\n finish() {\n this.children.forEach(c => c.cleanup());\n }\n\n getLayoutData() {\n return {\n type: this.name,\n children: this.subpages.map(c => c.getLayoutData()),\n };\n }\n\n async wrapPages() {\n let pageCount = 1;\n const pages = [];\n\n for (const page of this.children) {\n if (page.wrap) {\n const wrapArea = page.isAutoHeight\n ? Infinity\n : page.size.height - (page.style.paddingBottom || 0);\n\n const subpages = await wrapPages(page, wrapArea, pageCount);\n\n pageCount += subpages.length;\n\n pages.push(...subpages);\n } else {\n pages.push(page);\n }\n }\n\n return pages;\n }\n\n async renderPages() {\n this.subpages = await this.wrapPages();\n\n for (let j = 0; j < this.subpages.length; j++) {\n // Update dynamic text nodes with total pages info\n this.subpages[j].renderDynamicNodes(\n {\n pageNumber: j + 1,\n totalPages: this.subpages.length,\n },\n node => node.name === 'Text',\n );\n await this.subpages[j].render();\n }\n\n return this.subpages;\n }\n\n async render() {\n try {\n this.addMetaData();\n this.applyProps();\n await this.loadAssets();\n await this.renderPages();\n this.root.instance.end();\n Font.reset();\n } catch (e) {\n throw e;\n }\n }\n}\n\nexport default Document;\n","export const availableMethods = [\n 'dash',\n 'clip',\n 'save',\n 'path',\n 'fill',\n 'font',\n 'text',\n 'rect',\n 'scale',\n 'moveTo',\n 'lineTo',\n 'stroke',\n 'rotate',\n 'circle',\n 'lineCap',\n 'opacity',\n 'ellipse',\n 'polygon',\n 'restore',\n 'lineJoin',\n 'fontSize',\n 'fillColor',\n 'lineWidth',\n 'translate',\n 'miterLimit',\n 'strokeColor',\n 'fillOpacity',\n 'roundedRect',\n 'strokeOpacity',\n 'bezierCurveTo',\n 'quadraticCurveTo',\n 'linearGradient',\n 'radialGradient',\n];\n\nconst painter = function(instance) {\n const p = availableMethods.reduce(\n (acc, prop) => ({\n ...acc,\n [prop]: (...args) => {\n instance[prop](...args);\n return p;\n },\n }),\n {},\n );\n\n return p;\n};\n\nexport default painter;\n","import Base from './Base';\n\nimport painter from '../utils/painter';\nimport warning from '../utils/warning';\n\nclass Canvas extends Base {\n static defaultProps = {\n style: {},\n wrap: false,\n };\n\n get name() {\n return 'Canvas';\n }\n\n async render() {\n const { left, top, width, height } = this.getAbsoluteLayout();\n\n const availableWidth = width - this.paddingLeft - this.paddingRight;\n const availableHeight = height - this.paddingTop - this.paddingBottom;\n\n warning(\n availableWidth && availableHeight,\n 'Canvas element has null width or height. Please provide valid values via the `style` prop in order to correctly render it.',\n );\n\n this.root.instance.save();\n this.applyTransformations();\n this.drawBackgroundColor();\n this.drawBorders();\n this.clip();\n\n this.root.instance.translate(\n left + this.paddingLeft,\n top + this.paddingTop,\n );\n\n if (this.props.paint) {\n this.props.paint(\n painter(this.root.instance),\n availableWidth,\n availableHeight,\n );\n }\n\n this.root.instance.restore();\n\n if (this.props.debug) {\n this.debug();\n }\n }\n}\n\nexport default Canvas;\n","import Root from './Root';\nimport Page from './Page';\nimport View from './View';\nimport Text from './Text';\nimport Link from './Link';\nimport Note from './Note';\nimport Image from './Image';\nimport Document from './Document';\nimport Canvas from './Canvas';\nimport TextInstance from './TextInstance';\n\nconst constructors = {\n ROOT: Root,\n PAGE: Page,\n TEXT: Text,\n LINK: Link,\n VIEW: View,\n NOTE: Note,\n IMAGE: Image,\n CANVAS: Canvas,\n DOCUMENT: Document,\n TEXT_INSTANCE: TextInstance,\n};\n\nfunction createInstance(element, root) {\n const { type, props = {} } = element;\n\n if (constructors[type]) {\n return new constructors[type](root, props);\n }\n\n throw new Error(`Invalid element of type ${type} passed to PDF renderer`);\n}\n\nexport { createInstance };\n","const propsEqual = (a, b) => {\n const oldPropsKeys = Object.keys(a);\n const newPropsKeys = Object.keys(b);\n\n if (oldPropsKeys.length !== newPropsKeys.length) {\n return false;\n }\n\n for (let i = 0; i < oldPropsKeys.length; i++) {\n const propName = oldPropsKeys[i];\n\n if (propName === 'render') {\n if (!a[propName] !== !b[propName]) {\n return false;\n }\n continue;\n }\n\n if (propName !== 'children' && a[propName] !== b[propName]) {\n if (\n typeof a[propName] === 'object' &&\n typeof b[propName] === 'object' &&\n propsEqual(a[propName], b[propName])\n ) {\n continue;\n }\n\n return false;\n }\n\n if (\n propName === 'children' &&\n (typeof a[propName] === 'string' || typeof b[propName] === 'string')\n ) {\n return a[propName] === b[propName];\n }\n }\n\n return true;\n};\n\nexport default propsEqual;\n","'use strict';\n\nimport ReactFiberReconciler from 'react-reconciler';\nimport {\n unstable_scheduleCallback as schedulePassiveEffects,\n unstable_cancelCallback as cancelPassiveEffects\n} from 'scheduler';\n\nimport { createInstance } from './elements';\nimport propsEqual from './utils/propsEqual';\n\nconst emptyObject = {};\n\n// If the Link has a strign child or render prop, substitute the instance by a Text,\n// that will ultimately render the inline Link via the textkit PDF renderer.\nconst shouldReplaceLink = (type, props) =>\n type === 'LINK' &&\n (typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n Array.isArray(props.children) ||\n props.render);\n\nconst PDFRenderer = ReactFiberReconciler({\n schedulePassiveEffects,\n cancelPassiveEffects,\n supportsMutation: true,\n appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n },\n\n createInstance(type, props, internalInstanceHandle) {\n const instanceType = shouldReplaceLink(type, props) ? 'TEXT' : type;\n return createInstance(\n { type: instanceType, props },\n internalInstanceHandle,\n );\n },\n\n createTextInstance(text, rootContainerInstance) {\n return createInstance(\n { type: 'TEXT_INSTANCE', props: text },\n rootContainerInstance,\n );\n },\n\n finalizeInitialChildren(element, type, props) {\n return false;\n },\n\n getPublicInstance(instance) {\n return instance;\n },\n\n prepareForCommit() {\n // Noop\n },\n\n prepareUpdate(element, type, oldProps, newProps) {\n return !propsEqual(oldProps, newProps);\n },\n\n resetAfterCommit() {\n // Noop\n },\n\n resetTextContent(element) {\n // Noop\n },\n\n getRootHostContext() {\n return emptyObject;\n },\n\n getChildHostContext() {\n return emptyObject;\n },\n\n shouldSetTextContent(type, props) {\n return false;\n },\n\n now: Date.now,\n\n useSyncScheduling: true,\n\n appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n },\n\n appendChildToContainer(parentInstance, child) {\n parentInstance.appendChild(child);\n },\n\n insertBefore(parentInstance, child, beforeChild) {\n parentInstance.appendChildBefore(child, beforeChild);\n },\n\n removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n },\n\n removeChildFromContainer(parentInstance, child) {\n parentInstance.removeChild(child);\n },\n\n commitTextUpdate(textInstance, oldText, newText) {\n textInstance.update(newText);\n },\n\n commitUpdate(instance, updatePayload, type, oldProps, newProps) {\n instance.update(newProps);\n },\n});\n\nexport default PDFRenderer;\n","import BlobStream from 'blob-stream';\nimport PDFRenderer from './renderer';\nimport StyleSheet from './stylesheet';\nimport { createInstance } from './elements';\nimport Font from './font';\nimport { version } from '../package.json';\n\nconst View = 'VIEW';\nconst Text = 'TEXT';\nconst Link = 'LINK';\nconst Page = 'PAGE';\nconst Note = 'NOTE';\nconst Image = 'IMAGE';\nconst Document = 'DOCUMENT';\nconst Canvas = 'CANVAS';\n\nconst pdf = input => {\n const container = createInstance({ type: 'ROOT' });\n const mountNode = PDFRenderer.createContainer(container);\n\n if (input) updateContainer(input);\n\n function callOnRender(params = {}) {\n if (container.document.props.onRender) {\n const layoutData = container.document.getLayoutData();\n container.document.props.onRender({ ...params, layoutData });\n }\n }\n\n function isDirty() {\n return container.isDirty;\n }\n\n function updateContainer(doc) {\n PDFRenderer.updateContainer(doc, mountNode, null);\n }\n\n async function toBlob() {\n await container.render();\n\n const stream = container.instance.pipe(BlobStream());\n\n return new Promise((resolve, reject) => {\n stream.on('finish', () => {\n try {\n const blob = stream.toBlob('application/pdf');\n\n callOnRender({ blob });\n\n resolve(blob);\n } catch (error) {\n reject(error);\n }\n });\n\n stream.on('error', reject);\n });\n }\n\n async function toBuffer() {\n await container.render();\n\n callOnRender();\n\n return container.instance;\n }\n\n function toString() {\n let result = '';\n container.render();\n\n return new Promise((resolve, reject) => {\n try {\n container.instance.on('data', function(buffer) {\n result += buffer;\n });\n\n container.instance.on('end', function() {\n callOnRender({ string: result });\n resolve(result);\n });\n } catch (error) {\n reject(error);\n }\n });\n }\n\n return {\n isDirty,\n container,\n updateContainer,\n toBuffer,\n toBlob,\n toString,\n };\n};\n\nexport {\n version,\n PDFRenderer,\n View,\n Text,\n Link,\n Page,\n Font,\n Note,\n Image,\n Document,\n Canvas,\n StyleSheet,\n createInstance,\n pdf,\n};\n","/* eslint-disable no-unused-vars */\nimport React from 'react';\n\nimport warning from '../src/utils/warning';\n\nimport {\n pdf,\n View,\n Text,\n Link,\n Page,\n Font,\n Note,\n Image,\n Canvas,\n version,\n StyleSheet,\n PDFRenderer,\n createInstance,\n Document as PDFDocument,\n} from './index';\n\nconst flatStyles = stylesArray =>\n stylesArray.reduce((acc, style) => ({ ...acc, ...style }), {});\n\nexport const Document = ({ children, ...props }) => {\n return <PDFDocument {...props}>{children}</PDFDocument>;\n};\n\nclass InternalBlobProvider extends React.PureComponent {\n state = { blob: null, url: null, loading: true, error: null };\n\n constructor(props) {\n super(props);\n\n // Create new root container for this render\n this.instance = pdf();\n }\n\n componentDidMount() {\n this.renderDocument();\n this.onDocumentUpdate();\n }\n\n componentDidUpdate() {\n this.renderDocument();\n\n if (this.instance.isDirty() && !this.state.error) {\n this.onDocumentUpdate();\n }\n }\n\n renderDocument() {\n this.instance.updateContainer(this.props.document);\n }\n\n onDocumentUpdate() {\n const oldBlobUrl = this.state.url;\n\n this.instance\n .toBlob()\n .then(blob => {\n this.setState(\n { blob, url: URL.createObjectURL(blob), loading: false },\n () => URL.revokeObjectURL(oldBlobUrl),\n );\n })\n .catch(error => {\n this.setState({ error });\n console.error(error);\n throw error;\n });\n }\n\n render() {\n return this.props.children(this.state);\n }\n}\n\nexport const BlobProvider = ({ document: doc, children }) => {\n if (!doc) {\n warning(false, 'You should pass a valid document to BlobProvider');\n return null;\n }\n\n return <InternalBlobProvider document={doc}>{children}</InternalBlobProvider>;\n};\n\nexport const PDFViewer = ({\n className,\n style,\n children,\n innerRef,\n ...props\n}) => {\n return (\n <InternalBlobProvider document={children}>\n {({ url }) => (\n <iframe\n className={className}\n ref={innerRef}\n src={url}\n style={Array.isArray(style) ? flatStyles(style) : style}\n {...props}\n />\n )}\n </InternalBlobProvider>\n );\n};\n\nexport const PDFDownloadLink = ({\n document: doc,\n className,\n style,\n children,\n fileName = 'document.pdf',\n}) => {\n if (!doc) {\n warning(false, 'You should pass a valid document to PDFDownloadLink');\n return null;\n }\n\n const downloadOnIE = blob => () => {\n if (window.navigator.msSaveBlob) {\n window.navigator.msSaveBlob(blob, fileName);\n }\n };\n\n return (\n <InternalBlobProvider document={doc}>\n {params => (\n <a\n className={className}\n download={fileName}\n href={params.url}\n onClick={downloadOnIE(params.blob)}\n style={Array.isArray(style) ? flatStyles(style) : style}\n >\n {typeof children === 'function' ? children(params) : children}\n </a>\n )}\n </InternalBlobProvider>\n );\n};\n\nexport {\n pdf,\n View,\n Text,\n Link,\n Page,\n Font,\n Note,\n Image,\n Canvas,\n version,\n StyleSheet,\n PDFRenderer,\n createInstance,\n} from './index';\n\nexport default {\n pdf,\n View,\n Text,\n Link,\n Page,\n Font,\n Note,\n Image,\n Canvas,\n version,\n Document,\n PDFViewer,\n StyleSheet,\n PDFRenderer,\n BlobProvider,\n createInstance,\n PDFDownloadLink,\n};\n"],"names":["printWarning","format","args","argIndex","message","replace","console","error","Error","x","__DEV__","process","env","NODE_ENV","warning","condition","undefined","Root","isDirty","document","instance","appendChild","child","removeChild","cleanup","markDirty","finish","render","PDFDocument","autoFirstPage","this","upperFirst","value","charAt","toUpperCase","slice","isPercent","exec","matchPercent","match","parseFloat","percent","absValue","Math","abs","absPercent","Node","parent","children","computed","layout","Yoga","createDefault","push","insertChild","getChildCount","appendChildBefore","beforeChild","index","indexOf","splice","removeAllChilds","i","length","remove","setDimension","attr","fixedMethod","percentMethod","setPosition","edge","setPositionPercent","setPadding","setPaddingPercent","setMargin","setMarginPercent","setBorder","getAbsoluteLayout","parentLayout","left","top","height","width","copyStyle","node","calculateLayout","isEmpty","onAppendDynamically","forEach","c","unsetMeasureFunc","destroy","getPositionType","POSITION_TYPE_ABSOLUTE","setPositionType","POSITION_TYPE_RELATIVE","getComputedTop","EDGE_TOP","getComputedLeft","EDGE_LEFT","getComputedRight","EDGE_RIGHT","getComputedBottom","EDGE_BOTTOM","getComputedWidth","getMinWidth","getMaxWidth","getComputedHeight","getMinHeight","getMaxHeight","getComputedPadding","getComputedMargin","getComputedBorder","paddingTop","right","paddingRight","bottom","paddingBottom","paddingLeft","marginTop","marginRight","marginBottom","marginLeft","yogaValue","prop","isAlignType","ALIGN_AUTO","DISPLAY_FLEX","DISPLAY_NONE","FLEX_DIRECTION_ROW","FLEX_DIRECTION_ROW_REVERSE","FLEX_DIRECTION_COLUMN","FLEX_DIRECTION_COLUMN_REVERSE","ALIGN_STRETCH","ALIGN_BASELINE","JUSTIFY_SPACE_AROUND","ALIGN_SPACE_AROUND","JUSTIFY_SPACE_BETWEEN","ALIGN_SPACE_BETWEEN","WRAP_WRAP","WRAP_WRAP_REVERSE","WRAP_NO_WRAP","JUSTIFY_FLEX_START","ALIGN_FLEX_START","JUSTIFY_FLEX_END","ALIGN_FLEX_END","JUSTIFY_CENTER","ALIGN_CENTER","DPI","parseValue","unit","parseScalar","container","scalar","isAutoHeight","isBorderStyle","key","matchBorderShorthand","processBorders","isBoxModelStyle","matchBoxModel","processBoxModel","FONT_WEIGHTS","thin","hairline","ultralight","extralight","light","normal","medium","semibold","demibold","bold","ultrabold","extrabold","heavy","black","isFontWeightStyle","processFontWeight","toLowerCase","isObjectPositionStyle","matchObjectPosition","processObjectPosition","isTransformOriginStyle","matchTransformOrigin","transformOffsetKeywords","processTransformOrigin","result","hasOwnProperty","Object","prototype","styleShorthands","margin","marginHorizontal","marginVertical","padding","paddingHorizontal","paddingVertical","border","borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderStyle","borderWidth","objectPosition","objectPositionX","objectPositionY","transformOrigin","transformOriginX","transformOriginY","expandStyles","style","propsArray","keys","resolvedStyle","verticalAlign","expandedProps","propName","call","transformStyles","expandedStyles","resolved","create","styles","flatten","input","Array","isArray","reduce","acc","s","resolveMediaQueries","test","matchMedia","resolve","absoluteFillObject","position","hairlineWidth","Debug","debug","root","save","debugContent","debugPadding","debugMargin","debugText","debugOrigin","restore","transform","origin","circle","fill","stroke","roundedWidth","round","roundedHeight","fontSize","opacity","fillColor","text","max","rect","KAPPA","sqrt","drawBorders","rtr","min","rtl","rbr","rbl","strokeOpacity","clipBorderTop","fillBorderTop","clipBorderRight","fillBorderRight","clipBorderBottom","fillBorderBottom","clipBorderLeft","fillBorderLeft","ctx","moveTo","lineTo","c0","bezierCurveTo","topRightYCoord","innerTopRightRadiusX","innerTopRightRadiusY","c1","c2","innerTopLeftRadiusX","innerTopLeftRadiusY","c3","c4","topLeftYCoord","c5","closePath","clip","trSlope","strokeColor","lineWidth","dash","space","undash","topBottomXCoord","innerBottomRightRadiusX","innerBottomRightRadiusY","topRightXCoord","brSlope","bottomLeftYCoord","innerBottomLeftRadiusX","innerBottomLeftRadiusY","bottomRightYCoord","topLeftCoordX","bottomLeftXCoord","Clipping","ctr","cbr","cbl","ctl","getRotation","PI","getTranslateX","matchX","matchGeneric","getTranslateY","matchY","getScaleX","getScaleY","getMatrix","applySingleTransformation","element","rotate","scale","translate","Transformations","applyTransformations","re","merge","a","b","isNil","deepMerge","objs","obj","mergeDeepWith","isFunction","compose","equals","type","inheritedProperties","Base","props","_this","constructor","defaultProps","update","newProps","applyProps","resolveStyles","toPairsIn","map","attribute","_this2","applyStyle","page","size","orientation","ownStyles","StyleSheet","inheritedStyles","pick","setter","getLayoutData","name","drawBackgroundColor","backgroundColor","fillOpacity","clone","onNodeSplit","renderChildren","wrap","break","fixed","minPresenceAhead","percentX","percentY","assign","Borders","Transform","RULER_WIDTH","RULER_COLOR","RULER_FONT_SIZE","DEFAULT_RULER_STEPS","LINE_WIDTH","LINE_COLOR","GRID_COLOR","range","steps","from","ceil","_","matchPercentage","Ruler","getRulerWidth","hasHorizontalRuler","ruler","horizontalRuler","hasVerticalRuler","verticalRuler","getHorizontalSteps","horizontalRulerSteps","rulerSteps","percentage","getVerticalSteps","verticalRulerSteps","renderRuler","drawHorizontalRuler","drawVerticalRuler","offset","hRange","step","vRange","TextInstance","PAGE_SIZES","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","RA0","RA1","RA2","RA3","RA4","SRA0","SRA1","SRA2","SRA3","SRA4","EXECUTIVE","FOLIO","LEGAL","LETTER","TABLOID","getPageSize","Page","_size","resetMargins","rulerWidth","dimension","addDynamicChild","elements","Fragment","createInstance","renderDynamicNodes","cb","listToExplore","shift","nodeWillWrap","addPage","View","emojiSource","hyphenationCallback","fetchFont","src","options","fetch","response","buffer","arrayBuffer","Buffer","FontSource","fontFamily","fontStyle","fontWeight","data","loading","load","headers","body","method","fontkit","Promise","reject","open","err","Font","family","sources","register","descriptor","res","styleSources","filter","exactFit","find","leftOffset","rightOffset","lt","gt","registerEmojiSource","url","getEmojiSource","registerHyphenationCallback","callback","getHyphenationCallback","fonts","font","getRegisteredFonts","getRegisteredFontFamilies","getFont","standardFonts","includes","doc","reset","clear","emoji","hyphenation","StandardFont","PDFFont","str","encode","encoded","positions","stringIndices","glyphs","g","glyph","getGlyph","parseInt","advanceWidth","glyphForCodePoint","codePoint","id","_font","codePoints","isLigature","characterToGlyph","hasGlyphForCodePoint","fontCache","IGNORED_CODE_POINTS","getFontSize","pathOr","getFallbackFont","getOrCreateFont","shouldFallbackToFont","fontSubstitution","string","runs","lastFont","lastIndex","run","defaultFont","attributes","start","end","char","codePointAt","unitsPerEm","last","engines","linebreaker","justification","textDecoration","scriptItemizer","wordHyphenation","engine","layoutEngine","PROTOCOL_REGEXP","getURL","PNG","isValid","e","MARKERS","JPEG","readUInt16BE","marker","pos","isBuffer","createCache","limit","cache","get","set","IMAGE_CACHE","getAbsoluteLocalPath","isDangerousLocalPath","filename","safePath","fetchLocalFile","allowDangerousPaths","fetchRemoteFile","uri","isValidFormat","lower","guessFormat","isCompatibleBase64","getImage","extension","resolveBase64Image","resolveImageFromData","JSON","stringify","resolveBufferImage","getImageFormat","isPng","isJpg","resolveImageFromUrl","resolveImage","image","cacheKey","toString","emojis","regex","emojiRegex","reflect","promise","then","v","makeFetchEmojiImage","_removeNoColor","getCodePoints","join","buildEmojiUrl","fetchEmojis","promises","emojiUrl","fetchEmojiImage","embedEmojis","fragments","fragment","emojiSize","chunk","String","fromCharCode","attachment","yOffset","floor","IGNORABLE_CODEPOINTS","buildSubsetForFont","ignoreChars","charSubset","subsetRegex","RegExp","PREPROCESSORS","capitalize","l","isImage","propEq","isTextInstance","complement","transformText","transformation","getFragments","color","textAlign","lineHeight","textDecorationColor","textDecorationStyle","textTransform","letterSpacing","textIndent","align","indent","link","characterSpacing","underlineStyle","underline","underlineColor","strike","strikeStyle","strikeColor","preprocessor","getAttributedString","AttributedString","fromFragments","Text","blocks","attributedString","layoutOptions","hyphenationPenalty","shrinkWhitespaceFactor","before","after","setMeasureFunc","measureText","bind","lineIndexAtHeight","counter","lines","line","box","heightAtLineIndex","layoutText","y","Infinity","maxLines","truncateMode","textOverflow","linesCount","widthMode","heightMode","MEASURE_MODE_EXACTLY","linesHeight","MEASURE_MODE_AT_MOST","linesWidth","wrapHeight","orphans","widows","linesQuantity","sliceHeight","slicedLine","slicedLineIndex","renderText","initialY","PDFRenderer","href","block","Link","Note","note","isNumeric","n","isNaN","isFinite","applyContainObjectFit","cw","ch","iw","ih","px","py","cr","ir","pxp","pyp","pxv","pyv","xOffset","applyNoneObjectFit","applyCoverObjectFit","applyScaleDownObjectFit","containDimension","noneDimension","applyFillObjectFit","resolveObjectFit","SAFETY_HEIGHT","Image","measureImage","shouldGrow","flexGrow","imageMargin","pagePadding","pageArea","MEASURE_MODE_UNDEFINED","scaledHeight","ratio","warn","_context","renderImage","objectFit","source","Document","subpages","addMetaData","title","author","subject","keywords","creator","producer","info","Title","Author","Subject","Keywords","Creator","Producer","loadFonts","childNode","all","loadEmojis","loadImages","loadAssets","p","wrapPages","pageCount","pages","wrapArea","renderPages","j","pageNumber","totalPages","availableMethods","painter","Canvas","availableWidth","availableHeight","paint","constructors","ROOT","PAGE","TEXT","LINK","VIEW","NOTE","IMAGE","CANVAS","DOCUMENT","TEXT_INSTANCE","propsEqual","oldPropsKeys","newPropsKeys","emptyObject","shouldReplaceLink","ReactFiberReconciler","schedulePassiveEffects","cancelPassiveEffects","supportsMutation","appendInitialChild","parentInstance","internalInstanceHandle","createTextInstance","rootContainerInstance","finalizeInitialChildren","getPublicInstance","prepareForCommit","prepareUpdate","oldProps","resetAfterCommit","resetTextContent","getRootHostContext","getChildHostContext","shouldSetTextContent","now","Date","useSyncScheduling","appendChildToContainer","insertBefore","removeChildFromContainer","commitTextUpdate","textInstance","oldText","newText","commitUpdate","updatePayload","pdf","mountNode","createContainer","callOnRender","params","onRender","layoutData","updateContainer","stream","pipe","BlobStream","on","blob","toBlob","toBuffer","flatStyles","stylesArray","React","InternalBlobProvider","state","componentDidMount","renderDocument","onDocumentUpdate","componentDidUpdate","oldBlobUrl","setState","URL","createObjectURL","revokeObjectURL","catch","PureComponent","BlobProvider","PDFViewer","className","innerRef","ref","PDFDownloadLink","fileName","download","onClick","window","navigator","msSaveBlob","version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