-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6276.8a5dec3c.iframe.bundle.js
More file actions
1 lines (1 loc) · 20.8 KB
/
6276.8a5dec3c.iframe.bundle.js
File metadata and controls
1 lines (1 loc) · 20.8 KB
1
(self.webpackChunk_haaretz_a_htz_sg=self.webpackChunk_haaretz_a_htz_sg||[]).push([[6276],{"../../config/l-storybook-config/wwwroot/public/configShim.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>configShim});const configShim_namespaceObject=JSON.parse('{"brightspot":"https://www.haaretz.co.il","gqlServer":"https://fake-graphql-server.haaretz.co.il/graphql","gqlServerCluster":"http://fake-graphql-server.haaretz.co.il/graphql","bIServer":"https://services.haaretz.co.il/ds","env":"prod","msConfirmation":"https://services.haaretz.co.il/ms-confirmation","msPurchaseUrl":"https://ms-purchase.haaretz.co.il","cookieGenerator":"http://cookie-generator.ms-app","personalization":"https://services.haaretz.co.il/personalization","appType":"site","GA4Key":"G-V6JW03P6HP","UAKey":"UA-589309-3"}'),configShim={getSafe(property){const keys=Array.isArray(property)?property:property.split(".");let key,value=configShim_namespaceObject;for(;keys.length;){if(null===value||"object"!=typeof value){value=void 0;break}key=keys.shift(),value=value[key]}return value},get(property){const keyPath=Array.isArray(property)?property.join("."):property,value=this.getSafe(property);if(void 0===value)throw new Error(`Configuration property "${keyPath}" is not defined`);return value},has(property){return null!=property&&void 0!==this.getSafe(property)}}},"../../ds-atoms/s-htz-image/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-htz-image/src/HtzImage.tsx").Z},"../../ds-atoms/s-htz-picture/src/HtzPicture.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>HtzPicture});var defineProperty=__webpack_require__("../../../node_modules/.pnpm/@babel+runtime@7.22.10/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),objectWithoutProperties=__webpack_require__("../../../node_modules/.pnpm/@babel+runtime@7.22.10/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),jsx_runtime=__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react/jsx-runtime.js"),dist=__webpack_require__("../../theme/l-theme-shared/dist/index.js"),src=__webpack_require__("../../ds-atoms/s-htz-image/src/index.ts"),configShim=__webpack_require__("../../config/l-storybook-config/wwwroot/public/configShim.js"),buildBaseImgSrc=__webpack_require__("../../utils/s-image-utils/src/buildBaseImgSrc/index.ts"),buildBaseImgSrcset=__webpack_require__("../../utils/s-image-utils/src/buildBaseImgSrcset/index.ts"),buildSizesString=__webpack_require__("../../utils/s-image-utils/src/buildSizesString/index.ts"),getAspectData=__webpack_require__("../../utils/s-image-utils/src/getAspectData/index.ts"),style9=__webpack_require__("../../../node_modules/.pnpm/style9@0.18.2_rollup@2.79.1_webpack@5.88.2/node_modules/style9/index.mjs");const c={base:{}};function HtzSource(_ref){let{inlineStyle,styleExtend=[],imgData,aspect,media,contentId,widths,heights,sizes,type}=_ref;const env=configShim.Z.get("env"),minWidth=Math.min(...widths),minWidthIndex=widths.findIndex((num=>num===minWidth)),matchingHeightToMinWidth=heights&&heights[minWidthIndex],{isCropped,aspectRatio,aspectData}=(0,getAspectData.Z)(aspect,imgData),srcUrl=(0,buildBaseImgSrc.Z)({contentId,imgData,width:minWidth,height:matchingHeightToMinWidth,isCropped,aspectRatio,aspectData,env}),sizesString=sizes&&(0,buildSizesString.Z)(sizes),srcSetUrl=(0,buildBaseImgSrcset.Z)({src:srcUrl,widths,aspectRatio,heights,env}),{height,width}=aspectData||{width:imgData.width,height:imgData.height};return(0,jsx_runtime.jsx)("source",{className:(0,style9.Z)(c.base,...styleExtend),style:inlineStyle,sizes:sizesString,width,height,type:type?`image/${type}`:void 0,media,srcSet:srcSetUrl})}try{HtzSource.displayName="HtzSource",HtzSource.__docgenInfo={description:"",displayName:"HtzSource",props:{contentId:{defaultValue:null,description:"",name:"contentId",required:!0,type:{name:"string"}},inlineStyle:{defaultValue:null,description:"",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},imgData:{defaultValue:null,description:"",name:"imgData",required:!0,type:{name:'{ height: number; path: string; width: number; crops: { headline?: ({ height: number; width: number; x: number; y: number; } & { __typename: "ImageCrop"; } & { __typename: "ImageCrop"; }) | null | undefined; ... 4 more ...; wide?: ({ ...; } & ... 1 more ... & { ...; }) | ... 1 more ... | undefined; } & { ...; }; } &...'}},aspect:{defaultValue:null,description:"",name:"aspect",required:!0,type:{name:"enum",value:[{value:'"vertical"'},{value:'"square"'},{value:'"regular"'},{value:'"headline"'},{value:'"landscape"'},{value:'"wide"'},{value:'"full"'},{value:'"fullimage"'}]}},height:{defaultValue:null,description:"",name:"height",required:!1,type:{name:"number | undefined"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"number | undefined"}},widths:{defaultValue:null,description:"",name:"widths",required:!0,type:{name:"number[]"}},heights:{defaultValue:null,description:"",name:"heights",required:!1,type:{name:"number[] | undefined"}},sizes:{defaultValue:null,description:"",name:"sizes",required:!1,type:{name:"SizesType | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"avif"'},{value:'"webp"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-htz-picture/src/HtzSource.tsx#HtzSource"]={docgenInfo:HtzSource.__docgenInfo,name:"HtzSource",path:"../../ds-atoms/s-htz-picture/src/HtzSource.tsx#HtzSource"})}catch(__react_docgen_typescript_loader_error){}const _excluded=["inlineStyle","styleExtend","sources","imgData","alt","contentId","onLoad","isLazy","onError","loading","priority"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const HtzPicture_c={base:{height:"cWvkUx",maxWidth:"fwqTyU",verticalAlign:"eLDTYY",width:"cRUUAa"}};function HtzPicture(_ref){let{inlineStyle,styleExtend=[],sources,imgData,alt,contentId,onLoad,isLazy,onError,loading,priority}=_ref,attrs=(0,objectWithoutProperties.Z)(_ref,_excluded);if(0===sources.length)throw new Error('[HtzPicture]: the "sources" prop must be an array with at least two items: an item for <source /> and an item for <img /> \nIf you only need one aspect ratio or image type, use HtzImage instead.');if(1===sources.length)throw new Error("[HtzPicture]: the `sources` prop must be an array with at least two items: an item for <source /> and an item for <img />\nnIf you only need one aspect ratio or image type, use HtzImage instead.");const[fallbackImg,...restSources]=sources;for(const source of restSources){if(!source.aspect)throw new Error("[HtzPicture]: the `source` elements in the `sources` array must have aspect ratio prop");if(!source.sizes)throw new Error("[HtzPicture]: the `source` elements in the `sources` array must have sizes prop");if(!source.widths)throw new Error("[HtzPicture]: the `source` elements in the `sources` array must have widths prop");if(!source.from)throw new Error("[HtzPicture]: the `source` elements in the `sources` array must provide breakpoint for media query via `from` prop")}const sortedSources=restSources.sort(((a,b)=>b.from?a.from?dist.widthBpsInEm[a.from]+dist.widthBpsInEm[b.from]:0:1));return(0,jsx_runtime.jsxs)("picture",{children:[sortedSources.map((source=>(0,jsx_runtime.jsx)(HtzSource,{imgData,aspect:source.aspect,contentId,media:`(min-width:${dist.widthBpsInEm[source.from]}em)`,widths:source.widths,type:source.type,sizes:source.sizes},imgData.path))),(0,jsx_runtime.jsx)(src.Z,_objectSpread(_objectSpread({},attrs),{},{__typename:"htz_image_Image",alt,imgData,aspect:fallbackImg.aspect,contentId,type:"image",priority,widths:fallbackImg.widths,sizes:fallbackImg.sizes,onLoad,onError,loading,styleExtend:[HtzPicture_c.base,...styleExtend],inlineStyle}))]})}try{HtzPicture.displayName="HtzPicture",HtzPicture.__docgenInfo={description:"",displayName:"HtzPicture",props:{inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyHtzPicture(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <HtzPicture\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<HtzPicture styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},imgData:{defaultValue:null,description:"",name:"imgData",required:!0,type:{name:'{ height: number; path: string; width: number; crops: { headline?: ({ height: number; width: number; x: number; y: number; } & { __typename: "ImageCrop"; } & { __typename: "ImageCrop"; }) | null | undefined; ... 4 more ...; wide?: ({ ...; } & ... 1 more ... & { ...; }) | ... 1 more ... | undefined; } & { ...; }; } &...'}},sources:{defaultValue:null,description:"",name:"sources",required:!0,type:{name:"[FallbackSource, ...Source[]]"}},contentId:{defaultValue:null,description:"",name:"contentId",required:!0,type:{name:"string"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"eager"'},{value:'"lazy"'}]}},onLoad:{defaultValue:null,description:"",name:"onLoad",required:!1,type:{name:"OnLoad | undefined"}},isLazy:{defaultValue:null,description:"",name:"isLazy",required:!1,type:{name:"boolean | undefined"}},priority:{defaultValue:null,description:"",name:"priority",required:!1,type:{name:"boolean | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"ReactEventHandler<HTMLImageElement> | undefined"}},caption:{defaultValue:null,description:"",name:"caption",required:!1,type:{name:"string | null | undefined"}},alt:{defaultValue:null,description:"",name:"alt",required:!0,type:{name:"string"}},files:{defaultValue:null,description:"",name:"files",required:!0,type:{name:'({ height: number; path: string; width: number; crops: { headline?: ({ height: number; width: number; x: number; y: number; } & { __typename: "ImageCrop"; } & { __typename: "ImageCrop"; }) | null | undefined; ... 4 more ...; wide?: ({ ...; } & ... 1 more ... & { ...; }) | ... 1 more ... | undefined; } & { ...; }; } ...'}},credit:{defaultValue:null,description:"",name:"credit",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-htz-picture/src/HtzPicture.tsx#HtzPicture"]={docgenInfo:HtzPicture.__docgenInfo,name:"HtzPicture",path:"../../ds-atoms/s-htz-picture/src/HtzPicture.tsx#HtzPicture"})}catch(__react_docgen_typescript_loader_error){}},"../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/amp-context.shared-runtime.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"AmpStateContext",{enumerable:!0,get:function(){return AmpStateContext}});const AmpStateContext=__webpack_require__("../../../node_modules/.pnpm/@swc+helpers@0.5.2/node_modules/@swc/helpers/cjs/_interop_require_default.cjs")._(__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react/index.js")).default.createContext({})},"../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/amp-mode.js":(__unused_webpack_module,exports)=>{"use strict";function isInAmpMode(param){let{ampFirst=!1,hybrid=!1,hasQuery=!1}=void 0===param?{}:param;return ampFirst||hybrid&&hasQuery}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"isInAmpMode",{enumerable:!0,get:function(){return isInAmpMode}})},"../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/head.js":(module,exports,__webpack_require__)=>{var process=__webpack_require__("../../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");Object.defineProperty(exports,"__esModule",{value:!0}),function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:all[name]})}(exports,{defaultHead:function(){return defaultHead},default:function(){return _default}});const _interop_require_default=__webpack_require__("../../../node_modules/.pnpm/@swc+helpers@0.5.2/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"),_react=__webpack_require__("../../../node_modules/.pnpm/@swc+helpers@0.5.2/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs")._(__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react/index.js")),_sideeffect=_interop_require_default._(__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/side-effect.js")),_ampcontextsharedruntime=__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/amp-context.shared-runtime.js"),_headmanagercontextsharedruntime=__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js"),_ampmode=__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/amp-mode.js");__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/utils/warn-once.js");function defaultHead(inAmpMode){void 0===inAmpMode&&(inAmpMode=!1);const head=[_react.default.createElement("meta",{charSet:"utf-8"})];return inAmpMode||head.push(_react.default.createElement("meta",{name:"viewport",content:"width=device-width"})),head}function onlyReactElement(list,child){return"string"==typeof child||"number"==typeof child?list:child.type===_react.default.Fragment?list.concat(_react.default.Children.toArray(child.props.children).reduce(((fragmentList,fragmentChild)=>"string"==typeof fragmentChild||"number"==typeof fragmentChild?fragmentList:fragmentList.concat(fragmentChild)),[])):list.concat(child)}const METATYPES=["name","httpEquiv","charSet","itemProp"];function reduceComponents(headChildrenElements,props){const{inAmpMode}=props;return headChildrenElements.reduce(onlyReactElement,[]).reverse().concat(defaultHead(inAmpMode).reverse()).filter(function unique(){const keys=new Set,tags=new Set,metaTypes=new Set,metaCategories={};return h=>{let isUnique=!0,hasKey=!1;if(h.key&&"number"!=typeof h.key&&h.key.indexOf("$")>0){hasKey=!0;const key=h.key.slice(h.key.indexOf("$")+1);keys.has(key)?isUnique=!1:keys.add(key)}switch(h.type){case"title":case"base":tags.has(h.type)?isUnique=!1:tags.add(h.type);break;case"meta":for(let i=0,len=METATYPES.length;i<len;i++){const metatype=METATYPES[i];if(h.props.hasOwnProperty(metatype))if("charSet"===metatype)metaTypes.has(metatype)?isUnique=!1:metaTypes.add(metatype);else{const category=h.props[metatype],categories=metaCategories[metatype]||new Set;"name"===metatype&&hasKey||!categories.has(category)?(categories.add(category),metaCategories[metatype]=categories):isUnique=!1}}}return isUnique}}()).reverse().map(((c,i)=>{const key=c.key||i;if(process.env.__NEXT_OPTIMIZE_FONTS&&!inAmpMode&&"link"===c.type&&c.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some((url=>c.props.href.startsWith(url)))){const newProps={...c.props||{}};return newProps["data-href"]=newProps.href,newProps.href=void 0,newProps["data-optimized-fonts"]=!0,_react.default.cloneElement(c,newProps)}return _react.default.cloneElement(c,{key})}))}const _default=function Head(param){let{children}=param;const ampState=(0,_react.useContext)(_ampcontextsharedruntime.AmpStateContext),headManager=(0,_react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);return _react.default.createElement(_sideeffect.default,{reduceComponentsToState:reduceComponents,headManager,inAmpMode:(0,_ampmode.isInAmpMode)(ampState)},children)};("function"==typeof exports.default||"object"==typeof exports.default&&null!==exports.default)&&void 0===exports.default.__esModule&&(Object.defineProperty(exports.default,"__esModule",{value:!0}),Object.assign(exports.default,exports),module.exports=exports.default)},"../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/side-effect.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return SideEffect}});const _react=__webpack_require__("../../../node_modules/.pnpm/@swc+helpers@0.5.2/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs")._(__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/react/index.js")),isServer="undefined"==typeof window,useClientOnlyLayoutEffect=isServer?()=>{}:_react.useLayoutEffect,useClientOnlyEffect=isServer?()=>{}:_react.useEffect;function SideEffect(props){const{headManager,reduceComponentsToState}=props;function emitChange(){if(headManager&&headManager.mountedInstances){const headElements=_react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));headManager.updateHead(reduceComponentsToState(headElements,props))}}var _headManager_mountedInstances;isServer&&(null==headManager||null==(_headManager_mountedInstances=headManager.mountedInstances)||_headManager_mountedInstances.add(props.children),emitChange());return useClientOnlyLayoutEffect((()=>{var _headManager_mountedInstances;return null==headManager||null==(_headManager_mountedInstances=headManager.mountedInstances)||_headManager_mountedInstances.add(props.children),()=>{var _headManager_mountedInstances;null==headManager||null==(_headManager_mountedInstances=headManager.mountedInstances)||_headManager_mountedInstances.delete(props.children)}})),useClientOnlyLayoutEffect((()=>(headManager&&(headManager._pendingUpdate=emitChange),()=>{headManager&&(headManager._pendingUpdate=emitChange)}))),useClientOnlyEffect((()=>(headManager&&headManager._pendingUpdate&&(headManager._pendingUpdate(),headManager._pendingUpdate=null),()=>{headManager&&headManager._pendingUpdate&&(headManager._pendingUpdate(),headManager._pendingUpdate=null)}))),null}},"../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/utils/warn-once.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"warnOnce",{enumerable:!0,get:function(){return warnOnce}});let warnOnce=_=>{}},"../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/head.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__("../../../node_modules/.pnpm/next@13.5.4_@babel+core@7.22.10_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/shared/lib/head.js")}}]);