{"version":3,"sources":["webpack:///./presentation/components/Shortcode/Alt.tsx","webpack:///./presentation/components/Shortcode/Bold.tsx","webpack:///./presentation/components/Shortcode/Italic.tsx","webpack:///./presentation/components/Shortcode/Link.tsx","webpack:///./presentation/components/Shortcode/Text.tsx","webpack:///src/presentation/components/Shortcode/Tooltip.tsx","webpack:///./presentation/components/Shortcode/PendingShortcode.tsx","webpack:///./presentation/components/Shortcode/Shortcode.tsx","webpack:///./presentation/components/Shortcode/index.ts","webpack:///./presentation/utils/urlLanguageParse.ts","webpack:///./presentation/utils/getActiveImageWithAspectRatios.ts","webpack:///./domain/constants/imageAspectRatio.ts","webpack:///./presentation/utils/imageAspectRatioPercentage.ts","webpack:///../node_modules/@uds/illustrations/dist/es/illustrations.js","webpack:///./presentation/utils/createImageUrl.ts"],"names":["getColor","theme","against","Against","LIGHT","NEUTRAL","palette","primary","DARK","tertiary","Alt","RecursiveShortcode","elements","rest","useTheme","style","color","displayName","Bold","fontWeight","fontStyle","Link","contentType","attributes","isExternalRoute","route","useIsExternalRoute","goto","href","id","analyticskey","size","TextButtonSize","INHERIT","rel","target","newTab","formatText","text","newline","values","formattedText","replace","_","match","replaceValues","split","join","escapeShortCodes","string","reduce","prev","cur","i","nl2br","Text","ReactTooltip","lazy","TooltipShortcode","isMinLg","useBreakpoints","eventToggle","undefined","padding","cssTheme","CallToAction","fallback","tagName","useDefaultStyles","content","maxWidth","randomWidth","Math","floor","random","PendingShortcode","code","display","width","lines","Glyph","Sup","List","OrderedList","ListItem","TickListItem","ProductPrice","PhoneNumber","map","element","index","Shortcode","JSON","stringify","props","String","getAgainst","type","name","glyph","Italic","Tooltip","ShortcodeWrapper","url","language","length","parsedLanguage","toUpperCase","breakpoints","image","imagesWithAspectRatios","imageUrl","imageAspectRatio","preserveDimension","findResponsiveItem","ImageAspectRatio","imageAspectRatioPercentage","ratio","W16H9","W4H3","W1H1","W32H9","W64H9","W3H4","W9H16","W9H32","reactPropsRegex","fn","cache","arg","memoize","prop","test","charCodeAt","restOp","obj","keysToExclude","Object","keys","filter","includes","acc","curr","assign","warnIfInvalid","value","componentName","Root","tag","options","render","ref","as","component","class","className","filteredProps","indexOf","key","_len","arguments","classNames","Array","_key","Boolean","cx","vars","variable","result","unit","__linaria","Result","innerRef","extends","styled$1","_ref","iconSize","iconName","themeSpacing","gu","getSize","createPaintbrushUrl$1","icon","params","URLSearchParams","illustrations","forEach","append","iconSet","toString","Illustration$1","alt","spacing","children","src","importance","loading","hasIllustration","r","isNotNilOrEmpty","media","currentLanguage","createPaintbrushUrl","illustration","urlLanguageParse"],"mappings":"+GAKA,MAAMA,EAAW,CAACC,EAAcC,KAC9B,OAAQA,GACN,KAAKC,IAAQC,MAEb,KAAKD,IAAQE,QACX,OAAOJ,EAAMK,QAAQC,QACvB,KAAKJ,IAAQK,KACX,OAAOP,EAAMK,QAAQG,SACvB,QACE,MAAO,YAGPC,EAAM,IAAiF,IAAhF,mBAAEC,EAAF,SAAsBC,EAAtB,QAAgCV,KAAYW,GAAoC,EAC3F,MAAM,MAAEZ,GAAUa,cAClB,OACE,sBACEC,MAAO,CACLC,MAAOhB,EAASC,EAAOC,IAF3B,SAKGS,EAAqB,cAACA,EAAD,CAAoBC,SAAUA,EAAUV,QAASA,KAAaW,IAAW,QAKrGH,EAAIO,YAAc,MAEHP,QC5Bf,MAAMQ,EAAO,QAAC,SAAEN,EAAF,mBAAYD,KAAuBE,GAApC,SACX,sBAAME,MAAO,CAAEI,WAAY,QAA3B,SACGR,EAAqB,cAACA,EAAD,CAAoBC,SAAUA,KAAcC,IAAW,QAIjFK,EAAKD,YAAc,OAEJC,QCRf,MAAMA,EAAO,QAAC,SAAEN,EAAF,mBAAYD,KAAuBE,GAApC,SACX,sBAAME,MAAO,CAAEK,UAAW,UAA1B,SACGT,EAAqB,cAACA,EAAD,CAAoBC,SAAUA,KAAcC,IAAW,QAIjFK,EAAKD,YAAc,OAEJC,Q,wBCLf,MAAMG,EAAO,IAA0G,IAAzG,mBAAEV,E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A,MAAMC,EAAkBC,IAAgBC,IAAiB,gBAE1C,KACbC,EAIAvM,EACAwM,IAEAH,IACED,EACA,kBACEK,YAAmB,SACjBF,EAAMG,cADW,EACK,GAEtB1M,IAEJ,kBAAM2M,YAAgB,SAACJ,EAAMzF,UAAP,EAAmB,GAAnB,MAAuB0F,IAAmB,KARlEH,CASEE","file":"pex-static/34/3.800f367ee4b988cb48c9.chunk.js","sourcesContent":["import React from 'react';\nimport { Theme, useTheme, Colorway as Against } from '@uds/theme-utils';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst getColor = (theme: Theme, against: Against | undefined) => {\n switch (against) {\n case Against.LIGHT:\n return theme.palette.primary;\n case Against.NEUTRAL:\n return theme.palette.primary;\n case Against.DARK:\n return theme.palette.tertiary;\n default:\n return 'inherit';\n }\n};\nconst Alt = ({ RecursiveShortcode, elements, against, ...rest }: RecursiveShortcodeProps) => {\n const { theme } = useTheme();\n return (\n \n {RecursiveShortcode ? : null}\n \n );\n};\n\nAlt.displayName = 'Alt';\n\nexport default Alt;\n","import React from 'react';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Bold = ({ elements, RecursiveShortcode, ...rest }: RecursiveShortcodeProps) => (\n \n {RecursiveShortcode ? : null}\n \n);\n\nBold.displayName = 'Bold';\n\nexport default Bold;\n","import React from 'react';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Bold = ({ elements, RecursiveShortcode, ...rest }: RecursiveShortcodeProps) => (\n \n {RecursiveShortcode ? : null}\n \n);\n\nBold.displayName = 'Bold';\n\nexport default Bold;\n","import React from 'react';\nimport { ReactRouterTextButton } from '@uds/react-router-adapter';\nimport { Size as TextButtonSize } from '@uds/text-button';\nimport { useIsExternalRoute } from 'domain/selectors/common';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\nconst Link = ({ RecursiveShortcode, elements, contentType, attributes, against, ...rest }: RecursiveShortcodeProps) => {\n const [isExternalRoute, route] = useIsExternalRoute(attributes?.goto);\n return (\n \n {/* @ts-ignore: error when upgrading to @ux/config */}\n \n \n );\n};\n\nLink.displayName = 'Link';\n\nexport default Link;\n","import React, { Fragment } from 'react';\n\nconst escapeShortCodes = (text: string) => {\n if (typeof text !== 'string') {\n return null;\n }\n const replaceA = (text ?? '').split('[!').join('[');\n const replaceB = replaceA.split('!/]').join('/]');\n const replaceC = replaceB.split('[/!').join('[/');\n return replaceC;\n // using split/join because for some reason replaceAll fails for backstop\n // tests but not for backstop storybook?\n // if anyone can tell me why, I'd appreciate it.\n // return (text ?? '').replaceAll('[!', '[').replaceAll('!/]', '/]')\n // .replaceAll('[/!', '[/');\n};\n\nconst replaceValues = (text: string, values?: Record) => {\n if (values == null) {\n return text;\n }\n return text.replace(/{(?[^{]*)}/g, (_, match) => {\n return values[match];\n });\n};\n\nconst nl2br = (string: string) =>\n (string ?? '')\n .split('\\n')\n // @ts-ignore typescript cant figure typing out\n // eslint-disable-next-line react/no-array-index-key\n .reduce((prev, cur, i) => [prev,
, cur]);\n\nconst formatText = (text: string, newline: boolean | Element | undefined, values?: Record) => {\n const formattedText = replaceValues(escapeShortCodes(text) ?? '', values);\n if (newline === false) {\n return formattedText;\n }\n return nl2br(formattedText);\n};\n\ninterface OuterProps {\n text?: string | undefined;\n nl2br?: boolean | Element;\n values?: Record;\n}\nconst Text = ({ text, nl2br, values }: OuterProps) => {formatText(text ?? '', nl2br, values)};\n\nText.displayName = 'Text';\n\nexport default Text;\n","import React, { lazy, Suspense } from 'react';\nimport TextButton, { Size as TextButtonSize } from '@uds/text-button';\nimport { cssTheme } from '@uds/theme-utils';\nimport { useBreakpoints } from '@uds/responsive';\n\nimport { RecursiveShortcodeProps } from './Shortcode';\n\n/*\n React-Tooltip is a heavy dependency therefore we asynchronously load it in\n and gracefully decorate the functionality in once it has loaded\n*/\nconst ReactTooltip = lazy(\n () =>\n import(\n /* webpackChunkName: \"react-tooltip-lite\" */\n 'react-tooltip-lite'\n ),\n);\n\nconst TooltipShortcode = ({ RecursiveShortcode, attributes, elements }: RecursiveShortcodeProps) => {\n const { isMinLg } = useBreakpoints();\n const eventToggle = isMinLg ? undefined : 'onClick';\n const padding = cssTheme.gu2;\n const CallToAction = {attributes?.label};\n\n return (\n \n {/* @ts-ignore children doesnt exist */}\n \n {/* @ts-ignore: error when upgrading to @ux/config */}\n \n \n }\n >\n {CallToAction}\n \n \n );\n};\n\nTooltipShortcode.displayName = 'TooltipShortcode';\n\nexport default TooltipShortcode;\n","import React from 'react';\nimport { Shimmer } from '@uds/penders';\n\nimport { ShortcodeProps } from './';\n\nexport interface OuterProps {\n code?: ShortcodeProps;\n}\n\n// random % width for shimmer betwen 50% and 95%\nconst randomWidth = () => Math.floor(Math.random() * (95 - 50) + 50);\n\nconst PendingShortcode = ({ code }: OuterProps) => (\n \n \n \n);\n\nPendingShortcode.displayName = 'PendingShortcode';\n\nexport default PendingShortcode;\n","import React, { Suspense, lazy, ReactNode } from 'react';\nimport { getAgainst } from 'presentation/utils/colorway';\nimport { Layout } from 'domain/constants/layout';\n/*\n These shortcodes should not be lazy loaded in as they are already in the\n main bundle and it causes a unnecessary shimmer which makes the page feel\n less responsive\n*/\nimport { Colorway as Against } from '@uds/theme-utils';\nimport { IconName } from '@uds/glyphs';\n\nimport Alt from './Alt';\nimport Bold from './Bold';\nimport Italic from './Italic';\nimport Link from './Link';\nimport Text from './Text';\nimport Tooltip from './Tooltip';\nimport PendingShortcode from './PendingShortcode';\n\nimport { ShortcodeProps } from '.';\n\nconst Glyph = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-glyph\" */\n './Glyph'\n ),\n);\n\nconst Sup = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-sup\" */\n './Sup'\n ),\n);\n\nconst List = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-list\" */\n './List'\n ),\n);\n\nconst OrderedList = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-ordered-list\" */\n './OrderedList'\n ),\n);\n\nconst ListItem = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-list-item\" */\n './ListItem'\n ),\n);\n\nconst TickListItem = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-tick-list-item\" */\n './TickListItem'\n ),\n);\n\nconst ProductPrice = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-product-price\" */\n './ProductPrice'\n ),\n);\n\nconst PhoneNumber = lazy(\n () =>\n import(\n /* webpackChunkName: \"shortcode-phone-number\" */\n './PhoneNumber'\n ),\n);\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare const i: number;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare const element: ShortcodeProps;\n\nexport interface ShortcodeAttributesProps {\n glyph: string;\n use?: number;\n number?: number;\n RecursiveShortcode: (props: RecursiveShortcodeProps) => JSX.Element;\n analyticskey?: string;\n goto?: string;\n label?: ReactNode;\n icon: IconName;\n prices?: Array<{\n gross: number;\n net: number;\n raw: number;\n tax: number;\n }>;\n inctax?: string;\n style?: string;\n rel?: string;\n newTab?: string;\n}\nexport interface RecursiveShortcodeProps {\n elements?: Array;\n RecursiveShortcode?: (props: RecursiveShortcodeProps) => JSX.Element;\n type?: string;\n name?: string;\n layout?: Layout;\n against?: Against;\n attributes?: ShortcodeAttributesProps | undefined;\n nl2br?: boolean;\n rest?: {\n [key: string]: any;\n };\n [key: string]: any;\n}\n\nconst RecursiveShortcode = ({ elements = [], ...rest }: RecursiveShortcodeProps) => (\n <>\n {elements.map((element, index) => (\n // Temporarily allow index as key waiting for BE to add ids\n // eslint-disable-next-line react/no-array-index-key\n \n ))}\n \n);\n\nexport interface ShortcodeOuterProps {\n against?: Against;\n code: RecursiveShortcodeProps;\n type?: string;\n name?: string;\n values?: Record;\n}\n\nconst Shortcode = ({ code, ...rest }: RecursiveShortcodeProps) => {\n let props = {\n ...rest,\n } as RecursiveShortcodeProps;\n if (typeof code === 'string' || code instanceof String) {\n props.code = code;\n } else {\n props = {\n ...props,\n ...code,\n };\n }\n\n props.against = getAgainst(props.against);\n props.RecursiveShortcode = RecursiveShortcode;\n props.attributes = props?.attributes ?? ({} as ShortcodeAttributesProps);\n\n const { type, name, values } = props;\n if (typeof props.code === 'string') {\n return ;\n }\n if (props.type === 'text') {\n return ;\n }\n if (type === 'element') {\n switch (name) {\n case 'list':\n if (props?.attributes?.style === 'number') {\n return ;\n }\n return ;\n case 'li':\n if (props?.attributes?.style === 'glyph') {\n return ;\n }\n return ;\n case 'i':\n return ;\n case 'b':\n return ;\n case 'alt':\n return ;\n case 'sup':\n return ;\n case 'glyph':\n return ;\n case 'tel':\n return ;\n case 'link':\n return ;\n case 'productprice':\n return ;\n case 'tooltip':\n return ;\n case 'root':\n return ;\n default:\n return null;\n }\n }\n return null;\n};\n\nconst ShortcodeWrapper = (props: RecursiveShortcodeProps) => (\n }>\n \n \n);\n\nShortcodeWrapper.displayName = 'Shortcode';\n\nexport default ShortcodeWrapper;\n","import Shortcode, { RecursiveShortcodeProps } from './Shortcode';\n\n// TODO: help.. please.\nexport type ShortcodeProps = RecursiveShortcodeProps;\n\nexport default Shortcode;\n","export default (url: string, language?: string) => {\n if (url && url.length && language) {\n let parsedLanguage;\n if (language.split('-').length === 2) {\n parsedLanguage = [language.split('-')[0], language.split('-')[1].toUpperCase()].join('-');\n } else {\n parsedLanguage = language;\n }\n return url.replace('{{language}}', parsedLanguage);\n }\n return url;\n};\n","import { BreakpointProps } from '@ux/responsive';\nimport { ImagesWithAspectRatios, ImageWithAspectRatios } from 'core/ribbons/primitives';\nimport { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\nimport { Dimension } from 'domain/constants/dimension';\nimport findResponsiveItem from 'presentation/utils/findResponsiveItem';\n\n/**\n * If imagesWithAspectRatios is present in ribbon props, this should be used.\n * This array follows the existing standard of [mobile,tablet,desktop] structure.\n * Where imagesWithAspectRatios is empty/omitted, the existing imageUrl and imageAspectRatio should be used.\n */\n\ntype ImageProps = {\n imageUrl?: string;\n imageAspectRatio?: ImageAspectRatio;\n preserveDimension?: Dimension | string;\n};\n\nexport default (\n breakpoints: BreakpointProps,\n image: ImageProps,\n imagesWithAspectRatios: ImagesWithAspectRatios | undefined,\n): ImageWithAspectRatios => {\n const { imageUrl: url, imageAspectRatio, preserveDimension } = image;\n\n if (imagesWithAspectRatios != null && imagesWithAspectRatios.length > 0) {\n const activeImageWithAspectRatios = findResponsiveItem(breakpoints, imagesWithAspectRatios);\n return activeImageWithAspectRatios || {};\n }\n\n return {\n url,\n imageAspectRatio,\n preserveDimension,\n };\n};\n","export enum ImageAspectRatio {\n W16H9 = '16:9',\n W4H3 = '4:3',\n W1H1 = '1:1',\n W32H9 = '32:9',\n W64H9 = '64:9',\n W3H4 = '3:4',\n W9H16 = '9:16',\n W9H32 = '9:32',\n}\n","import { ImageAspectRatio } from 'domain/constants/imageAspectRatio';\n\nexport const imageAspectRatioPercentage = (ratio: ImageAspectRatio | undefined) => {\n if (ratio == null) {\n return '56.25%';\n }\n const map: { [key in ImageAspectRatio]: number } = {\n [ImageAspectRatio.W16H9]: 56.25,\n [ImageAspectRatio.W4H3]: 75,\n [ImageAspectRatio.W1H1]: 100,\n [ImageAspectRatio.W32H9]: 28.125,\n [ImageAspectRatio.W64H9]: 14.0625,\n [ImageAspectRatio.W3H4]: 133.3333,\n [ImageAspectRatio.W9H16]: 177.7778,\n [ImageAspectRatio.W9H32]: 355.5556,\n };\n return `${map[ratio] ?? 56.25}%`;\n};\n","import { gu2px, useTheme } from '@uds/theme-utils';\nimport * as React from 'react';\nimport './illustration.stylesheet_1xw0u3m.css';\nimport { jsx } from 'react/jsx-runtime';\n\nfunction memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */ && prop.charCodeAt(1) === 110\n /* n */ && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */);\n\nfunction cx() {\n for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {\n classNames[_key] = arguments[_key];\n }\n return classNames.filter(Boolean).join(' ');\n}\n\n/**\n * This file contains an runtime version of `styled` component. Responsibilities of the component are:\n * - returns ReactElement based on HTML tag used with `styled` or custom React Component\n * - injects classNames for the returned component\n * - injects CSS variables used to define dynamic styles based on props\n */\n\n// Workaround for rest operator\nconst restOp = (obj, keysToExclude) => Object.keys(obj).filter(prop => !keysToExclude.includes(prop)).reduce((acc, curr) => Object.assign(acc, {\n [curr]: obj[curr]\n}), {}); // rest operator workaround\n\nconst warnIfInvalid = (value, componentName) => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof value === 'string' ||\n // eslint-disable-next-line no-self-compare\n typeof value === 'number' && isFinite(value)) {\n return;\n }\n const stringified = typeof value === 'object' ? JSON.stringify(value) : String(value); // eslint-disable-next-line no-console\n\n console.warn(`An interpolation evaluated to '${stringified}' in the component '${componentName}', which is probably a mistake. You should explicitly cast or transform the value to a string.`);\n }\n}; // If styled wraps custom component, that component should have className property\n\nfunction styled(tag) {\n return options => {\n if (process.env.NODE_ENV !== 'production') {\n if (Array.isArray(options)) {\n // We received a strings array since it's used as a tag\n throw new Error('Using the \"styled\" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');\n }\n }\n const render = (props, ref) => {\n const {\n as: component = tag,\n class: className\n } = props;\n const rest = restOp(props, ['as', 'class']);\n let filteredProps; // Check if it's an HTML tag and not a custom element\n\n if (typeof component === 'string' && component.indexOf('-') === -1) {\n filteredProps = {}; // eslint-disable-next-line guard-for-in\n\n for (const key in rest) {\n if (key === 'as' || index(key)) {\n // Don't pass through invalid attributes to HTML elements\n filteredProps[key] = rest[key];\n }\n }\n } else {\n filteredProps = rest;\n }\n filteredProps.ref = ref;\n filteredProps.className = cx(filteredProps.className || className, options.class);\n const {\n vars\n } = options;\n if (vars) {\n const style = {}; // eslint-disable-next-line guard-for-in\n\n for (const name in vars) {\n const variable = vars[name];\n const result = variable[0];\n const unit = variable[1] || '';\n const value = typeof result === 'function' ? result(props) : result;\n warnIfInvalid(value, options.name);\n style[`--${name}`] = `${value}${unit}`;\n }\n filteredProps.style = Object.assign(style, filteredProps.style);\n }\n if (tag.__linaria && tag !== component) {\n // If the underlying tag is a styled component, forward the `as` prop\n // Otherwise the styles from the underlying component will be ignored\n filteredProps.as = component;\n return /*#__PURE__*/React.createElement(tag, filteredProps);\n }\n return /*#__PURE__*/React.createElement(component, filteredProps);\n };\n const Result = React.forwardRef ? /*#__PURE__*/React.forwardRef(render) :\n // React.forwardRef won't available on older React versions and in Preact\n // Fallback to a innerRef prop in that case\n props => {\n const rest = restOp(props, ['innerRef']);\n return render(rest, props.innerRef);\n };\n Result.displayName = options.name; // These properties will be read by the babel plugin for interpolation\n\n Result.__linaria = {\n className: options.class,\n extends: tag\n };\n return Result;\n };\n}\nvar styled$1 = process.env.NODE_ENV !== 'production' ? new Proxy(styled, {\n get(o, prop) {\n return o(prop);\n }\n}) : styled;\n\nconst getSize = _ref => {\n let {\n iconSize,\n iconName,\n themeSpacing\n } = _ref;\n if (iconSize == null) {\n // if banner add more spacing\n const gu = /^banner/.test(iconName) ? 8 : 2;\n return `${gu2px(gu, themeSpacing)}`;\n }\n return iconSize;\n};\nconst Root = /*#__PURE__*/styled$1(\"div\")({\n name: \"Root\",\n class: \"r14nixs\",\n vars: {\n \"r14nixs-0\": [props => getSize(props), \"px\"]\n }\n});\nconst classNames = {\n remote: \"r1ccyfzc\"\n};\n\nconst baseUrl = 'https://paintbrush.heg-cp.com';\nconst createPaintbrushUrl = (icon, theme) => {\n const params = new URLSearchParams();\n Object.keys(theme.palette.illustrations).forEach(key => {\n params.append(`palette[${key}]`, theme.palette.illustrations[key]);\n });\n params.append('iconSet', theme.iconSet);\n return `${baseUrl}/illustrations/${icon}.svg?${params.toString()}`;\n};\nvar createPaintbrushUrl$1 = createPaintbrushUrl;\n\nconst Illustration = _ref => {\n let {\n icon,\n alt,\n size\n } = _ref;\n const {\n theme\n } = useTheme();\n return /*#__PURE__*/jsx(Root, {\n iconName: icon,\n iconSize: size,\n themeSpacing: theme.spacing,\n children: /*#__PURE__*/jsx(\"img\", {\n src: createPaintbrushUrl$1(icon, theme),\n alt: alt,\n className: classNames.remote\n // @ts-ignore: This is sort of supported\n ,\n importance: \"low\",\n loading: \"lazy\"\n })\n });\n};\nvar Illustration$1 = Illustration;\n\nexport { Illustration$1 as Illustration, createPaintbrushUrl$1 as createPaintbrushUrl, Illustration$1 as default };\n","// /*\n// createImageUrl(\n// {\n// illustration: ?String,\n// imageUrl: ?String,\n// },\n// theme,\n// currentLanguage,\n// );\n\n// Returns a painbtrush URL if an illustration is provided,\n// otherwise returns a static imageUrl\n// */\n\nimport { createPaintbrushUrl } from '@uds/illustrations';\nimport { isNotNilOrEmpty } from '@team-griffin/capra';\nimport * as r from 'ramda';\nimport urlLanguageParse from 'presentation/utils/urlLanguageParse';\nimport { Theme } from '@uds/theme-utils';\n\nconst hasIllustration = r.propSatisfies(isNotNilOrEmpty, 'illustration');\n\nexport default (\n media: {\n illustration: string | undefined;\n imageUrl: string | undefined;\n },\n theme: Theme,\n currentLanguage?: string,\n) =>\n r.ifElse(\n hasIllustration,\n () =>\n createPaintbrushUrl(\n media.illustration ?? '',\n // @ts-ignore: mismatching types after upgrade\n theme,\n ),\n () => urlLanguageParse(media.imageUrl ?? '', currentLanguage ?? ''),\n )(media);\n"],"sourceRoot":""}