woocommerce/6.065a66ac.iframe.bundle.js

1 line
51 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunk_woocommerce_storybook=self.webpackChunk_woocommerce_storybook||[]).push([[6],{"../../packages/js/components/src/flag/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var classnames__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__),emoji_flags__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/emoji-flags@1.3.0/node_modules/emoji-flags/index.js"),emoji_flags__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(emoji_flags__WEBPACK_IMPORTED_MODULE_1__),lodash__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"),_wordpress_element__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),Flag=function Flag(_ref){var code=_ref.code,order=_ref.order,className=_ref.className,size=_ref.size,hideFromScreenReader=_ref.hideFromScreenReader,classes=classnames__WEBPACK_IMPORTED_MODULE_0___default()("woocommerce-flag",className),_code=code||"unknown";order&&order.shipping&&order.shipping.country?_code=order.shipping.country:order&&order.billing&&order.billing.country&&(_code=order.billing.country);var inlineStyles={fontSize:size},emoji=(0,lodash__WEBPACK_IMPORTED_MODULE_2__.get)(emoji_flags__WEBPACK_IMPORTED_MODULE_1___default().countryCode(_code),"emoji");return(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)("div",{className:classes,style:inlineStyles,"aria-hidden":hideFromScreenReader},emoji&&(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)("span",null,emoji),!emoji&&(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};Flag.propTypes={code:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,order:prop_types__WEBPACK_IMPORTED_MODULE_4___default().object,className:prop_types__WEBPACK_IMPORTED_MODULE_4___default().string,size:prop_types__WEBPACK_IMPORTED_MODULE_4___default().number};const __WEBPACK_DEFAULT_EXPORT__=Flag},"../../packages/js/components/src/product-image/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>product_image});var esm_extends=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js"),objectWithoutProperties=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react=__webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),classnames=__webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),lodash=__webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"),_excluded=["product","width","height","className","alt"];const product_image=function ProductImage(_ref){var product=_ref.product,_ref$width=_ref.width,width=void 0===_ref$width?33:_ref$width,_ref$height=_ref.height,height=void 0===_ref$height?33:_ref$height,_ref$className=_ref.className,className=void 0===_ref$className?"":_ref$className,alt=_ref.alt,props=(0,objectWithoutProperties.A)(_ref,_excluded),productImage=(0,lodash.get)(product,["images",0])||(0,lodash.get)(product,["image"]),src=productImage&&productImage.src||!1,altText=alt||productImage&&productImage.alt||"",classes=classnames_default()("woocommerce-product-image",className,{"i