{"version":3,"sources":["webpack:///./node_modules/@tti/image-transform/dist/esm/ImageTransform.js","webpack:///./node_modules/@tti/image-transform/dist/esm/index.js","webpack:///./src/stories/Widgets/Products/ProductList/ProductList.styles.ts","webpack:///./src/stories/Widgets/Products/ProductList/ProductList.tsx","webpack:///./node_modules/@tti/brand-empire/dist/esm/helpers/brand.js","webpack:///./node_modules/@tti/brand-empire/dist/esm/helpers/fonts.js","webpack:///./node_modules/@tti/brand-empire/dist/esm/helpers/grids.js"],"names":["FormatMode","imageUrl","this","_params","split","length","_imageUrl","queries","query","push","join","key","value","toString","width","addParameter","height","mode","url","ProductListStyles","Grid","styled","section","grids","Default","brand","grey","from","Device","TabletLarge","CardStyles","Card","MobileLarge","DesktopLarge","ProductList","props","rowItems","useMedia","until","React","createElement","products","map","x","index","Object","assign","blue","base","light","dark","white","black","11","7","1","helveticaConfig","family","weight","style","font","helvetica","ls","sitePadding"],"mappings":"0GAAO,IAAIA,E,kCACX,SAAWA,GACPA,EAAgB,IAAI,MACpBA,EAAmB,OAAI,SACvBA,EAAiB,KAAI,OACrBA,EAAgB,IAAI,MACpBA,EAAgB,IAAI,MACpBA,EAAoB,QAAI,UAN5B,CAOGA,IAAeA,EAAa,KAmDhB,MAlDf,MACI,YAAYC,GACRC,KAAKC,QAAU,GAEf,MAAMC,EAAQH,EAASG,MAAM,KAE7B,GAAIA,EAAMC,OAAS,EACfH,KAAKI,UAAYF,EAAM,OAD3B,CAKA,GAAIA,EAAMC,OAAS,EAAG,CAElB,MAAME,EAAUH,EAAM,GAAGA,MAAM,KAE/B,IAAK,MAAMI,KAASD,EAChBL,KAAKC,QAAQM,KAAKD,GAG1BN,KAAKI,UAAYF,EAAM,IAE3B,UACI,MAAO,GAAGF,KAAKI,aAAaJ,KAAKC,QAAQO,KAAK,OAElD,aAAaC,EAAKC,GACgB,IAA1BV,KAAKI,UAAUD,QAGnBH,KAAKC,QAAQM,KAAK,GAAGE,KAAOC,EAAMC,cAEtC,MAAMC,GAEF,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gB,gBAAgBE,OAAQF,EAAgB,gBAAgBG,OACvI,oBAAuBC,EAAKJ,EAAgB,qBAAqBC,OAAQD,EAAgB,qBAAqBE,OAAQF,EAAgB,qBAAqBG,OAC3J,qBAAwBC,EAAKJ,EAAgB,sBAAsBC,OAAQD,EAAgB,sBAAsBE,OAAQF,EAAgB,sBAAsBG,QAEnKG,GAAKlD,GACM,QAAQA,EAAQ,cChC/B,MAAMoC,EAAO,GAAI;;;;EAKXe,EAAc,GAAI;;;;;;EAWT,OACXvC,QALY,GAAI;IAChBwB;IACAe","file":"45-71b3db7f55de756d7386.js","sourcesContent":["export var FormatMode;\r\n(function (FormatMode) {\r\n FormatMode[\"Pad\"] = \"pad\";\r\n FormatMode[\"BoxPad\"] = \"boxpad\";\r\n FormatMode[\"Crop\"] = \"crop\";\r\n FormatMode[\"Min\"] = \"min\";\r\n FormatMode[\"Max\"] = \"max\";\r\n FormatMode[\"Stretch\"] = \"stretch\";\r\n})(FormatMode || (FormatMode = {}));\r\nclass ImageTransform {\r\n constructor(imageUrl) {\r\n this._params = [];\r\n // Check if the url has an existing params and pass them into _params first\r\n const split = imageUrl.split('?');\r\n // This means it's got multiple ? in and I'm not dealing with that\r\n if (split.length > 2) {\r\n this._imageUrl = split[0];\r\n return;\r\n }\r\n // If we have a querystring\r\n if (split.length > 1) {\r\n // Split the querystring on &\r\n const queries = split[1].split('&');\r\n // Loop through and add them\r\n for (const query of queries) {\r\n this._params.push(query);\r\n }\r\n }\r\n this._imageUrl = split[0];\r\n }\r\n get url() {\r\n return `${this._imageUrl}?${this._params.join('&')}`;\r\n }\r\n addParameter(key, value) {\r\n if (this._imageUrl.length === 0) {\r\n return;\r\n }\r\n this._params.push(`${key}=${value.toString()}`);\r\n }\r\n width(width) {\r\n this.addParameter('width', width);\r\n return this;\r\n }\r\n height(height) {\r\n this.addParameter('height', height);\r\n return this;\r\n }\r\n mode(mode) {\r\n this.addParameter('mode', mode);\r\n return this;\r\n }\r\n entropyCrop() {\r\n this.addParameter('entropycrop', 1);\r\n return this;\r\n }\r\n toString() {\r\n return this.url;\r\n }\r\n}\r\nexport default ImageTransform;\r\n","import ImageTransform, { FormatMode } from './ImageTransform';\r\nexport default ImageTransform;\r\nexport { FormatMode };\r\n","import grids from '@helpers/grids';\r\nimport { Device, from } from '@helpers/media';\r\nimport { CardStyles } from '@stories/Components/Cards/Card/Card.styles';\r\nimport { brand } from '@tti/brand-empire';\r\nimport styled from 'styled-components';\r\nconst Grid = styled.section `\r\n ${grids.Default};\r\n background-color: ${brand.grey[1]};\r\n padding-top: 40px;\r\n padding-bottom: 40px;\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n padding-top: 80px;\r\n padding-bottom: 80px;\r\n }\r\n\r\n ${CardStyles.Card} {\r\n grid-column: span 12;\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n grid-column: span 6;\r\n }\r\n\r\n @media ${from(Device.TabletLarge)} {\r\n grid-column: span 4;\r\n }\r\n\r\n @media ${from(Device.DesktopLarge)} {\r\n grid-column: span 3;\r\n }\r\n }\r\n`;\r\nexport const ProductListStyles = {\r\n Grid,\r\n};\r\n","import { Device, until } from '@helpers/media';\r\nimport useMedia from '@hooks/useMedia';\r\nimport Card from '@stories/Components/Cards/Card/Card';\r\nimport React from 'react';\r\nimport { ProductListStyles } from './ProductList.styles';\r\nconst ProductList = (props) => {\r\n const rowItems = useMedia([until(Device.MobileLarge), until(Device.TabletLarge), until(Device.DesktopLarge)], [1, 2, 3], 4);\r\n return (React.createElement(ProductListStyles.Grid, null, props.products.map((x, index) => (React.createElement(Card, Object.assign({ key: x.imageUrl }, x, { index: index, rowItems: rowItems }))))));\r\n};\r\nexport default ProductList;\r\n","export default {\r\n blue: {\r\n base: '#006eaf',\r\n light: '#007cf9',\r\n dark: '#00578b',\r\n },\r\n white: '#fff',\r\n black: '#2c2a29',\r\n grey: {\r\n 11: '#53565a',\r\n 7: '#97999b',\r\n 1: '#EDEDED',\r\n },\r\n};\r\n","import { css } from 'styled-components';\r\nexport const helveticaConfig = {\r\n ['57-condensed']: {\r\n family: 'Helvetica Neue LT W05_57 Cond',\r\n weight: 400,\r\n style: 'normal',\r\n },\r\n ['77-condensed-bold']: {\r\n family: 'Helvetica Neue LT W05_77 Bd Cn',\r\n weight: 700,\r\n style: 'normal',\r\n },\r\n ['87-condensed-heavy']: {\r\n family: 'Helvetica Neue LT W05_87 Hv Cn',\r\n weight: 900,\r\n style: 'normal',\r\n },\r\n};\r\n// TODO: I can't for the life of me get the return type of this function to play nicely with styled components when importing, leaving this for now\r\nfunction font(family, weight, style) {\r\n return css `\r\n font-family: ${family};\r\n font-weight: ${weight};\r\n font-style: ${style};\r\n `;\r\n}\r\nexport default {\r\n helvetica: {\r\n ['57-condensed']: font(helveticaConfig['57-condensed'].family, helveticaConfig['57-condensed'].weight, helveticaConfig['57-condensed'].style),\r\n ['77-condensed-bold']: font(helveticaConfig['77-condensed-bold'].family, helveticaConfig['77-condensed-bold'].weight, helveticaConfig['77-condensed-bold'].style),\r\n ['87-condensed-heavy']: font(helveticaConfig['87-condensed-heavy'].family, helveticaConfig['87-condensed-heavy'].weight, helveticaConfig['87-condensed-heavy'].style),\r\n },\r\n ls: (value) => {\r\n return `calc(${value / 1000} * 1em)`;\r\n },\r\n};\r\n","import { css } from 'styled-components';\r\nconst base = css `\r\n display: grid;\r\n grid-gap: 16px;\r\n width: 100%;\r\n`;\r\nconst sitePadding = css `\r\n padding: 18px 0px;\r\n\r\n @media (min-width: 768px) {\r\n padding: 170px;\r\n }\r\n`;\r\nconst Default = css `\r\n ${base};\r\n ${sitePadding};\r\n`;\r\nexport default {\r\n Default,\r\n};\r\n"],"sourceRoot":""}