{"version":3,"sources":["webpack:///./node_modules/.pnpm/@polydice+icook-image-helper@3.0.3_react@17.0.2/node_modules/@polydice/icook-image-helper/dist/index.js","webpack:///./app/assets/javascripts/reactjs/components/Product/ProductFundraisingTimer.jsx","webpack:///./app/assets/javascripts/reactjs/components/Category/CategoryProduct.module.scss","webpack:///./app/assets/javascripts/reactjs/components/Category/CategoryProducts.module.scss","webpack:///./app/assets/javascripts/reactjs/components/Category/CategoryProduct.jsx","webpack:///./app/assets/javascripts/reactjs/components/Category/FundraisingProduct.jsx","webpack:///./app/assets/javascripts/reactjs/components/Category/CategoryProducts.jsx"],"names":["module","exports","t","o","r","e","n","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","u","assign","arguments","length","apply","this","split","join","a","includes","URL","searchParams","format","width","height","test","map","f","env","IMAGINARY_ORIGIN","type","url","stripmeta","background","nocrop","entries","filter","b","memo","loading","src","srcSet","className","alt","indexOf","getOwnPropertySymbols","propertyIsEnumerable","jsx","Fragment","for","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","key","ref","__self","__source","defaultProps","$$typeof","props","_owner","current","jsxs","Error","setTimeout","clearTimeout","concat","run","fun","array","y","nextTick","Array","push","title","browser","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","ProductFundraisingTimer","endTime","timeIsUpCallback","now","dayjs","Date","diff","useState","seconds","setSeconds","useEffect","timer","setInterval","prevSeconds","clearInterval","generateFormattedTime","number","unit","style","marginLeft","fontSize","CategoryProduct","product","utm","name","slug","subtitle","started_at","ended_at","square_cover","isFundraisingProduct","selling_program_id","nowDate","startDate","endDate","isComingSoon","isBefore","isOver","isAfter","utmQuery","styles","categoryProduct","href","categoryProductFigure","categoryProductFigureImage","medium","sizes","categoryProductFigureBadge","categoryProductFigureBadgeLimit","createBadge","categoryProductName","categoryProductDescription","FundraisingProduct","percentage","crowdfundingTotal","crowdfundingCount","description","cover","funding_goal","total_revenue_adjustment","total_order_count_adjustment","setIsOver","categoryProductFundraising","categoryProductFigureCover","categoryProductFigureCoverText","categoryProductFigureCoverDate","categoryProductDetail","categoryProductDetailDate","categoryProductDetailDateIcon","categoryProductDetailDateText","categoryProductDetailNumber","categoryProductDetailNumberIcon","categoryProductDetailProgress","categoryProductDetailProgressStart","categoryProductDetailProgressEnd","categoryProductDetailPrice","categoryProductDetailPriceNumber","categoryProductDetailPriceNumberIsOver","formatter","categoryProductDetailPriceText","CategoryProducts","crowdfunding","products","productsTotal","productsCount","categoryProducts","id"],"mappings":";8EAAAA,EAAOC,QAAQ,SAASC,GAAG,IAAIC,EAAE,GAAG,SAASC,EAAEC,GAAG,GAAGF,EAAEE,GAAG,OAAOF,EAAEE,GAAGJ,QAAQ,IAAIK,EAAEH,EAAEE,GAAG,CAACE,EAAEF,EAAEG,GAAE,EAAGP,QAAQ,IAAI,OAAOC,EAAEG,GAAGI,KAAKH,EAAEL,QAAQK,EAAEA,EAAEL,QAAQG,GAAGE,EAAEE,GAAE,EAAGF,EAAEL,QAAQ,OAAOG,EAAEM,EAAER,EAAEE,EAAEO,EAAER,EAAEC,EAAEQ,EAAE,SAASV,EAAEC,EAAEE,GAAGD,EAAED,EAAED,EAAEC,IAAIU,OAAOC,eAAeZ,EAAEC,EAAE,CAACY,YAAW,EAAGC,IAAIX,KAAKD,EAAEA,EAAE,SAASF,GAAG,oBAAoBe,QAAQA,OAAOC,aAAaL,OAAOC,eAAeZ,EAAEe,OAAOC,YAAY,CAACC,MAAM,WAAWN,OAAOC,eAAeZ,EAAE,aAAa,CAACiB,OAAM,KAAMf,EAAEF,EAAE,SAASA,EAAEC,GAAG,GAAG,EAAEA,IAAID,EAAEE,EAAEF,IAAI,EAAEC,EAAE,OAAOD,EAAE,GAAG,EAAEC,GAAG,iBAAiBD,GAAGA,GAAGA,EAAEkB,WAAW,OAAOlB,EA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JA,cACAC,EAEI,EAFJA,cACA7D,EACI,EADJA,IAEA,OACE,yBAASzE,UAAW0F,IAAO6C,iBAA3B,SACGJ,EACC,oBAAInI,UAAU,WAAd,SACGoI,EAASpJ,KAAI,SAACwF,GAAD,OACZ,cAAC,EAAD,CAEEA,QAASA,EACTgC,kBAAmB6B,EAAc7D,EAAQgE,IACzC/B,kBAAmB6B,EAAc9D,EAAQgE,IACzC/D,IAAKA,GAJAD,EAAQgE,SASnB,oBAAIxI,UAAU,WAAd,SACGoI,EAASpJ,KAAI,SAACwF,GAAD,OACZ,cAAC,EAAD,CAAkCA,QAASA,EAASC,IAAKA,GAAnCD,EAAQgE,YAgB1CN,EAAiBpH,aAAe,CAC9BqH,cAAc,EACdE,cAAe,KACfC,cAAe,KACf7D,KAAK,GAGQyD","file":"js/CategoryProducts-d8bc4511ced8ee9c85e4.chunk.js","sourcesContent":["module.exports=function(t){var o={};function r(e){if(o[e])return o[e].exports;var n=o[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=o,r.d=function(t,o,e){r.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:e})},r.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},r.t=function(t,o){if(1&o&&(t=r(t)),8&o)return t;if(4&o&&\"object\"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,\"default\",{enumerable:!0,value:t}),2&o&&\"string\"!=typeof t)for(var n in t)r.d(e,n,function(o){return t[o]}.bind(null,n));return e},r.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(o,\"a\",o),o},r.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},r.p=\"\",r(r.s=4)}([function(t,o,r){\"use strict\";(function(t){r.d(o,\"b\",(function(){return c})),r.d(o,\"a\",(function(){return u}));var e=function(){return(e=Object.assign||function(t){for(var o,r=1,e=arguments.length;r<e;r++)for(var n in o=arguments[r])Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);return t}).apply(this,arguments)},n={\"uploads-tv-icook.icook.network\":\"uploads-tv-icook.s3.amazonaws.com\",\"uploads-newsroom-icook.icook.network\":\"uploads-newsroom-icook.s3.amazonaws.com\",\"uploads-pr-icook.icook.network\":\"uploads-pr-icook.s3.amazonaws.com\",\"uploads-market-icook.icook.network\":\"uploads-market-icook.s3.amazonaws.com\",\"uploads-blog-icook.icook.network\":\"storage.googleapis.com/uploads-blog-icook\",\"tokyo-kitchen.icook.network\":\"tokyo-kitchen.icook.tw.s3.amazonaws.com\",\"d1z4dgcdljp5f1.cloudfront.net\":\"uploads-newsroom-icook.s3.amazonaws.com\",\"dbjdsnch130xu.cloudfront.net\":\"tokyo-kitchen.icook.tw.s3.amazonaws.com\",\"d33ykodo9bnqvz.cloudfront.net\":\"uploads-pr-icook.s3.amazonaws.com\",\"d5aadpl255coo.cloudfront.net\":\"uploads-tv-icook.s3.amazonaws.com\",\"d1rp2dn3l01ufj.cloudfront.net\":\"uploads-market-icook.s3.amazonaws.com\",\"d1u3re4llvaoqi.cloudfront.net\":\"uploads-blog-icook.s3.amazonaws.com\"};function i(t){var o=t,r=o.split(\"/\"),e=r[2],i=n[e];return i&&(r[0]=\"http:\",r[2]=i,o=r.join(\"/\")),o}function a(t){try{if(t.includes(\"imageproxy.icook.network\")){var o=new URL(t).searchParams.get(\"url\");if(o)return o}}catch(t){}return t}function c(o,r){var n=r.format,c=void 0===n?\"auto\":n,u=r.width,s=r.height;if(/\\.gif$/i.test(o))return o;var l=[o].map(a).map(i)[0],f=t.env.IMAGINARY_ORIGIN||\"https://imageproxy.icook.network\",p=!u||!s,d=p?\"/resize\":\"/convert\",m=e({type:c,url:l,stripmeta:!0,background:\"255,255,255\"},p?{width:u,height:s,nocrop:!u||!s}:{});return\"\"+f+d+\"?\"+Object.entries(m).filter((function(t){t[0];return!!t[1]})).map((function(t){return t[0]+\"=\"+t[1]})).join(\"&\")}function u(t,o){return o.map((function(o){return c(t,{width:o})+\" \"+o+\"w\"})).join(\", \")}}).call(this,r(6))},function(t,o){t.exports=require(\"react\")},function(t,o,r){\"use strict\";t.exports=r(5)},,function(t,o,r){\"use strict\";r.r(o);var e=r(2),n=r(1),i=r(0);r.d(o,\"batchImageSrcSet\",(function(){return i.a})),r.d(o,\"imaginaryUrl\",(function(){return i.b}));var a=function(){return(a=Object.assign||function(t){for(var o,r=1,e=arguments.length;r<e;r++)for(var n in o=arguments[r])Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);return t}).apply(this,arguments)},c=function(t,o){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var n=0;for(e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(r[e[n]]=t[e[n]])}return r};o.default=Object(n.memo)((function(t){var o=t.loading,r=void 0===o?\"lazy\":o,n=t.src,u=t.srcSet,s=t.className,l=void 0===s?\"\":s,f=t.alt,p=void 0===f?\"\":f,d=c(t,[\"loading\",\"src\",\"srcSet\",\"className\",\"alt\"]),m=function(){var t,o=\"\";return u&&(o=Object(i.a)(n,u)),\"lazy\"===r?a(a({},d),((t={className:l+\" lazyload\",src:\"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=\"})[\"data-src\"]=n,t[\"data-srcset\"]=o,t)):a({src:n,srcSet:o,className:l},d)}();return Object(e.jsx)(\"img\",a({alt:p},m),void 0)}))},function(t,o,r){\"use strict\";\n/** @license React v16.14.0\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var e=r(1),n=60103;if(o.Fragment=60107,\"function\"==typeof Symbol&&Symbol.for){var i=Symbol.for;n=i(\"react.element\"),o.Fragment=i(\"react.fragment\")}var a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(t,o,r){var e,i={},s=null,l=null;for(e in void 0!==r&&(s=\"\"+r),void 0!==o.key&&(s=\"\"+o.key),void 0!==o.ref&&(l=o.ref),o)c.call(o,e)&&!u.hasOwnProperty(e)&&(i[e]=o[e]);if(t&&t.defaultProps)for(e in o=t.defaultProps)void 0===i[e]&&(i[e]=o[e]);return{$$typeof:n,type:t,key:s,ref:l,props:i,_owner:a.current}}o.jsx=s,o.jsxs=s},function(t,o){var r,e,n=t.exports={};function i(){throw new Error(\"setTimeout has not been defined\")}function a(){throw new Error(\"clearTimeout has not been defined\")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(o){try{return r.call(null,t,0)}catch(o){return r.call(this,t,0)}}}!function(){try{r=\"function\"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{e=\"function\"==typeof clearTimeout?clearTimeout:a}catch(t){e=a}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var t=c(p);l=!0;for(var o=s.length;o;){for(u=s,s=[];++f<o;)u&&u[f].run();f=-1,o=s.length}u=null,l=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===a||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{e(t)}catch(o){try{return e.call(null,t)}catch(o){return e.call(this,t)}}}(t)}}function m(t,o){this.fun=t,this.array=o}function y(){}n.nextTick=function(t){var o=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)o[r-1]=arguments[r];s.push(new m(t,o)),1!==s.length||l||c(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title=\"browser\",n.browser=!0,n.env={},n.argv=[],n.version=\"\",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(t){return[]},n.binding=function(t){throw new Error(\"process.binding is not supported\")},n.cwd=function(){return\"/\"},n.chdir=function(t){throw new Error(\"process.chdir is not supported\")},n.umask=function(){return 0}}]);","import { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport dayjs from 'dayjs';\nimport { generateFormattedTime } from 'reactjs/components/utility';\n\nconst ProductFundraisingTimer = ({ className, endTime, timeIsUpCallback }) => {\n const now = dayjs(new Date());\n const end = dayjs(endTime);\n const diff = end.diff(now, 'second');\n const [seconds, setSeconds] = useState(diff > 0 ? diff : 0);\n\n useEffect(() => {\n const timer = setInterval(() => {\n setSeconds((prevSeconds) => {\n if (prevSeconds === 0) {\n clearInterval(timer);\n return 0;\n }\n return prevSeconds - 1;\n });\n }, 1000);\n return () => clearInterval(timer);\n }, []);\n\n const { number, unit } = generateFormattedTime(seconds);\n\n if (seconds === 0) {\n timeIsUpCallback();\n return null;\n }\n\n return (\n <span className={className}>\n {number}\n <small style={{ marginLeft: '1px', fontSize: '0.9em' }}>{unit}</small>\n </span>\n );\n};\n\nProductFundraisingTimer.propTypes = {\n className: PropTypes.string,\n endTime: PropTypes.string.isRequired,\n timeIsUpCallback: PropTypes.func.isRequired\n};\n\nProductFundraisingTimer.defaultProps = {\n className: ''\n};\n\nexport default ProductFundraisingTimer;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"categoryProduct\":\"CategoryProduct-module__categoryProduct___2VsAX\",\"categoryProductFigure\":\"CategoryProduct-module__categoryProductFigure___2PAMQ\",\"categoryProductFigureImage\":\"CategoryProduct-module__categoryProductFigureImage___30f0v\",\"categoryProductFigureBadge\":\"CategoryProduct-module__categoryProductFigureBadge___1jAf_\",\"categoryProductFigureBadgeLimit\":\"CategoryProduct-module__categoryProductFigureBadgeLimit___2nEvd\",\"categoryProductName\":\"CategoryProduct-module__categoryProductName___3Dm_S\",\"categoryProductDescription\":\"CategoryProduct-module__categoryProductDescription___1v82j\",\"categoryProductFundraising\":\"CategoryProduct-module__categoryProductFundraising___2ZPD1\",\"categoryProductFigureCover\":\"CategoryProduct-module__categoryProductFigureCover___13hNm\",\"categoryProductFigureCoverText\":\"CategoryProduct-module__categoryProductFigureCoverText___1mLFh\",\"categoryProductFigureCoverDate\":\"CategoryProduct-module__categoryProductFigureCoverDate___UhaP9\",\"categoryProductDetailDate\":\"CategoryProduct-module__categoryProductDetailDate___1NGa0\",\"categoryProductDetailDateIcon\":\"CategoryProduct-module__categoryProductDetailDateIcon___2lcxu\",\"categoryProductDetailDateText\":\"CategoryProduct-module__categoryProductDetailDateText___CjtJ6\",\"categoryProductDetailNumber\":\"CategoryProduct-module__categoryProductDetailNumber___3QeyO\",\"categoryProductDetailNumberIcon\":\"CategoryProduct-module__categoryProductDetailNumberIcon___3-1Pm\",\"categoryProductDetailProgress\":\"CategoryProduct-module__categoryProductDetailProgress___ILMJc\",\"categoryProductDetailProgressStart\":\"CategoryProduct-module__categoryProductDetailProgressStart___2EekE\",\"categoryProductDetailProgressEnd\":\"CategoryProduct-module__categoryProductDetailProgressEnd___3ufhw\",\"categoryProductDetailPrice\":\"CategoryProduct-module__categoryProductDetailPrice___lzy_x\",\"categoryProductDetailPriceNumber\":\"CategoryProduct-module__categoryProductDetailPriceNumber___1uB5S\",\"categoryProductDetailPriceNumberIsOver\":\"CategoryProduct-module__categoryProductDetailPriceNumberIsOver___3vB8M\",\"categoryProductDetailPriceText\":\"CategoryProduct-module__categoryProductDetailPriceText___3S_Wq\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"categoryProducts\":\"CategoryProducts-module__categoryProducts___3uU6X\"};","import Image from '@polydice/icook-image-helper';\nimport dayjs from 'dayjs';\nimport { ProductProps } from '../../propTypes/product';\nimport styles from './CategoryProduct.module.scss';\n\nconst CategoryProduct = ({ product, utm }) => {\n const {\n name,\n slug,\n subtitle,\n started_at,\n ended_at,\n square_cover,\n selling_program_id\n } = product;\n\n const isFundraisingProduct = selling_program_id === 2;\n\n const nowDate = dayjs(new Date());\n const startDate = dayjs(started_at);\n const endDate = dayjs(ended_at);\n const isComingSoon = nowDate.isBefore(startDate);\n const isOver = nowDate.isAfter(endDate);\n\n const createBadge = () => {\n if (isFundraisingProduct && isComingSoon) {\n return <div className={styles.categoryProductFigureBadge}>å³å°‡ä¸Šç·š</div>;\n } else if (isFundraisingProduct && isOver) {\n return <div className={styles.categoryProductFigureBadge}>已下架</div>;\n }\n const diff = endDate.diff(nowDate, 'day', true);\n return diff > 0 && diff <= 7 ? (\n <div\n className={`${styles.categoryProductFigureBadge} ${styles.categoryProductFigureBadgeLimit}`}\n >\n å³å°‡æˆªæ¢\n </div>\n ) : null;\n };\n\n const utmQuery = utm\n ? '?utm_source=icook&utm_medium=web&utm_campaign=order_complete'\n : '';\n\n return (\n <li className=\"grid-xs-12-6 grid-sm-12-4 grid-md-12-3\">\n <a\n className={styles.categoryProduct}\n href={`/products/${slug}${utmQuery}`}\n >\n <figure\n className={`ratio-container ratio-container-1-1 ${styles.categoryProductFigure}`}\n >\n <Image\n className={`img-responsive ${styles.categoryProductFigureImage}`}\n src={square_cover.medium.url}\n srcSet={[520, 260]}\n sizes=\"(min-width:1200px) 255px, (min-width:992px) 205px, (min-width:768px) 210px, calc(50vw - 45px)\"\n alt={name}\n />\n {createBadge()}\n </figure>\n <h2 className={styles.categoryProductName}>{name}</h2>\n <p className={styles.categoryProductDescription}>{subtitle}</p>\n </a>\n </li>\n );\n};\n\nCategoryProduct.propTypes = {\n product: ProductProps.isRequired,\n utm: ProductProps.bool\n};\n\nexport default CategoryProduct;\n","import Image from '@polydice/icook-image-helper';\nimport dayjs from 'dayjs';\nimport PropTypes from 'prop-types';\nimport { useState } from 'react';\nimport ProductFundraisingTimer from '../Product/ProductFundraisingTimer';\nimport { formatter } from '../utility';\nimport styles from './CategoryProduct.module.scss';\n\nconst FundraisingProduct = ({\n product,\n crowdfundingTotal,\n crowdfundingCount,\n utm\n}) => {\n const {\n name,\n slug,\n description,\n cover,\n started_at,\n ended_at,\n funding_goal,\n selling_program_id,\n total_revenue_adjustment,\n total_order_count_adjustment\n } = product;\n const isFundraisingProduct = selling_program_id === 2;\n\n const getProgress = () => {\n const percentage = crowdfundingTotal / funding_goal;\n return percentage > 1 ? 100 : percentage * 100;\n };\n\n const nowDate = dayjs(new Date());\n const startDate = dayjs(started_at);\n const endDate = dayjs(ended_at);\n const isComingSoon = nowDate.isBefore(startDate);\n const [isOver, setIsOver] = useState(nowDate.isAfter(endDate));\n\n const createBadge = () => {\n if (isFundraisingProduct && isComingSoon) {\n return (\n <div className={styles.categoryProductFigureCover}>\n <h5 className={styles.categoryProductFigureCoverText}>å³å°‡ä¸Šç·š</h5>\n <span className={styles.categoryProductFigureCoverDate}>\n {startDate.format('YYYY/MM/DD')}\n </span>\n </div>\n );\n } else if (isFundraisingProduct && isOver) {\n return (\n <div className={styles.categoryProductFigureCover}>\n <strong className={styles.categoryProductFigureCoverText}>\n 活動æˆåŠŸ\n </strong>\n </div>\n );\n }\n const diff = endDate.diff(nowDate, 'day', true);\n return diff > 0 && diff <= 7 ? (\n <div\n className={`${styles.categoryProductFigureBadge} ${styles.categoryProductFigureBadgeLimit}`}\n >\n å³å°‡æˆªæ¢\n </div>\n ) : null;\n };\n\n const utmQuery = utm\n ? '?utm_source=icook&utm_medium=web&utm_campaign=order_complete'\n : '';\n return (\n <li className=\"grid-xs-12-12 grid-sm-12-6 grid-md-12-4\">\n <a\n className={`${styles.categoryProduct} ${styles.categoryProductFundraising}`}\n href={`/products/${slug}${utmQuery}`}\n >\n <figure\n className={`ratio-container ratio-container-16-9 ${styles.categoryProductFigure}`}\n >\n <Image\n className={`img-responsive ${styles.categoryProductFigureImage}`}\n src={cover.medium.url}\n srcSet={[600, 300]}\n sizes=\"(min-width:768px) 300px, 600px\"\n alt={name}\n />\n {createBadge()}\n </figure>\n <h2 className={styles.categoryProductName}>{name}</h2>\n <p className={styles.categoryProductDescription}>{description}</p>\n {isFundraisingProduct && !isComingSoon && (\n <div className={styles.categoryProductDetail}>\n <span className={styles.categoryProductDetailDate}>\n <i\n className={`icon-calendar-regular ${styles.categoryProductDetailDateIcon}`}\n />\n <span className={styles.categoryProductDetailDateText}>\n {isOver ? '已下架' : '倒數'}\n </span>\n {!isOver && (\n <ProductFundraisingTimer\n endTime={ended_at}\n timeIsUpCallback={() => setIsOver(true)}\n />\n )}\n </span>\n <span className={styles.categoryProductDetailNumber}>\n <i\n className={`icon-user-regular ${styles.categoryProductDetailNumberIcon}`}\n />\n {crowdfundingCount + total_order_count_adjustment}人\n </span>\n <div className={styles.categoryProductDetailProgress}>\n <div\n className={styles.categoryProductDetailProgressStart}\n style={{\n width: `${getProgress()}%`\n }}\n />\n {isOver && (\n <div className={styles.categoryProductDetailProgressEnd} />\n )}\n </div>\n <div className={styles.categoryProductDetailPrice}>\n <span\n className={`${styles.categoryProductDetailPriceNumber} ${\n isOver ? styles.categoryProductDetailPriceNumberIsOver : ''\n }`}\n >\n NT$ {formatter(crowdfundingTotal + total_revenue_adjustment)}\n </span>\n <span className={styles.categoryProductDetailPriceText}>\n ç´¯ç©éŠ·å”®é‡‘é¡\n </span>\n </div>\n </div>\n )}\n </a>\n </li>\n );\n};\n\nFundraisingProduct.propTypes = {\n product: PropTypes.shape({\n name: PropTypes.string.isRequired,\n slug: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n started_at: PropTypes.string.isRequired,\n ended_at: PropTypes.string.isRequired,\n funding_goal: PropTypes.number.isRequired,\n selling_program_id: PropTypes.number.isRequired,\n total_revenue_adjustment: PropTypes.number.isRequired,\n total_order_count_adjustment: PropTypes.number.isRequired,\n cover: PropTypes.shape({\n medium: PropTypes.shape({\n url: PropTypes.string.isRequired\n }).isRequired\n }).isRequired\n }).isRequired,\n crowdfundingTotal: PropTypes.number,\n crowdfundingCount: PropTypes.number,\n utm: PropTypes.bool\n};\n\nFundraisingProduct.defaultProps = {\n crowdfundingTotal: null,\n crowdfundingCount: null,\n utm: false\n};\n\nexport default FundraisingProduct;\n","import PropTypes from 'prop-types';\nimport { ProductProps } from '../../propTypes/product';\nimport CategoryProduct from './CategoryProduct';\nimport styles from './CategoryProducts.module.scss';\nimport FundraisingProduct from './FundraisingProduct';\n\nconst CategoryProducts = ({\n crowdfunding,\n products,\n productsTotal,\n productsCount,\n utm\n}) => {\n return (\n <section className={styles.categoryProducts}>\n {crowdfunding ? (\n <ul className=\"grid-row\">\n {products.map((product) => (\n <FundraisingProduct\n key={product.id}\n product={product}\n crowdfundingTotal={productsTotal[product.id]}\n crowdfundingCount={productsCount[product.id]}\n utm={utm}\n />\n ))}\n </ul>\n ) : (\n <ul className=\"grid-row\">\n {products.map((product) => (\n <CategoryProduct key={product.id} product={product} utm={utm} />\n ))}\n </ul>\n )}\n </section>\n );\n};\n\nCategoryProducts.propTypes = {\n crowdfunding: PropTypes.bool,\n products: PropTypes.arrayOf(ProductProps).isRequired,\n productsTotal: PropTypes.objectOf(PropTypes.number),\n productsCount: PropTypes.objectOf(PropTypes.number),\n utm: PropTypes.bool\n};\n\nCategoryProducts.defaultProps = {\n crowdfunding: false,\n productsTotal: null,\n productsCount: null,\n utm: false\n};\n\nexport default CategoryProducts;\n"],"sourceRoot":""}