-
Notifications
You must be signed in to change notification settings - Fork 0
/
5887.0d5dca14.iframe.bundle.js
1 lines (1 loc) · 96.6 KB
/
5887.0d5dca14.iframe.bundle.js
1
"use strict";(self.webpackChunk_haaretz_a_htz_sg=self.webpackChunk_haaretz_a_htz_sg||[]).push([[5887],{"../../ds-atoms/s-button/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-button/src/Button.tsx").ZP},"../../ds-atoms/s-checkbox/src/Checkbox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),_haaretz_s_icon__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../ds-atoms/s-icon/src/index.ts"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["children","inlineStyle","inputRef","styleExtend","state"],_excluded2=["id","children","styleExtend"],_excluded3=["checked","indeterminate","labelledBy","onChange","state"],_excluded4=["checked","labelledBy","state","onChange"],_excluded5=["inlineStyle","checked","children","styleExtend","labelStyleExtend","state","appearance","errorText"];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,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.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 c={wrapper:{alignItems:"UXrF",columnGap:"haEjPJ",cursor:"jsvbrX",display:"gSBWlu",position:"cjScYX",":hover":{"--bgc":"fzoiaU"},":focus-within":{"--bgc":"bbwlVK","--outline-wdth":"dUxYfZ","--outline-offst":"jHGNYW"}},input:{pointerEvents:"eDssNQ",touchAction:"eAoQVk",height:"edsxqC",opacity:"UXrzu",position:"bEvNbr",width:"lksDzB"},iconWrapper:{aspectRatio:"eUirwo",animationDirection:"cDbPWT",animationDuration:"kutyqb",animationTimingFunction:"jHFOea",backgroundColor:"hYzRbx",borderTopLeftRadius:"gQJVfF",borderTopRightRadius:"bnguzQ",borderBottomRightRadius:"fBfCSu",borderBottomLeftRadius:"bzskLL",flexGrow:"bcjLCN",flexShrink:"hriXhD",outlineColor:"gTHOLO",outlineOffset:"gNTabI",outlineStyle:"gcyyum",outlineWidth:"bJaMpz",overflowX:"dUvWpK",overflowY:"hRLVFh",position:"cjScYX",transform:"bomRby",transitionDuration:"gfbbeE",transitionProperty:"brlMGR",transitionTimingFunction:"iaemGh",width:"bTRldR",borderBottomColor:"HruPG",borderBottomStyle:"hpBjJb",borderBottomWidth:"ctibpX",paddingBottom:"eejUxl",borderInlineEndColor:"kLbdKx",borderInlineEndStyle:"hszzXi",borderInlineEndWidth:"bTnXNj",paddingInlineEnd:"cfEHVR",borderInlineStartColor:"kQqHuw",borderInlineStartStyle:"itlHSH",borderInlineStartWidth:"hXXzlB",paddingInlineStart:"kQDwxQ",borderTopColor:"iSDUms",borderTopStyle:"FwRrA",borderTopWidth:"izykGz",paddingTop:"bdXHYu","@media all and (min-width:80em)":{width:"dFXptg",transform:"kNxdej"},"::after":{content:"fqXcHQ",position:"dyMCpl",borderTopLeftRadius:"egXUdk",borderTopRightRadius:"jEBaki",borderBottomRightRadius:"hhujTk",borderBottomLeftRadius:"gIrsMR",height:"icgjhN",width:"eQIpIg",top:"dcXKhu",left:"eAtoVx",animationDuration:"bqTaPC",animationDirection:"cgkoDA",animationTimingFunction:"cfqwSZ"}},iconWrapperShow:{animationName:"fsoalw","::after":{backgroundColor:"evCPOd",content:"fqXcHQ",transform:"fXEFWd",animationName:"gSLJoa"}},iconWrapperHide:{animationName:"faINfC","::after":{backgroundColor:"feRPlP",transform:"dBEGOL",animationName:"fFJoFJ"}},iconWrapperChecked:{backgroundColor:"fIcjCT"},icon:{animationDirection:"cDbPWT",animationDuration:"kutyqb",animationTimingFunction:"jHFOea",borderTopLeftRadius:"gQJVfF",borderTopRightRadius:"bnguzQ",borderBottomRightRadius:"fBfCSu",borderBottomLeftRadius:"bzskLL",color:"kAWnRk",left:"gpkvrq",pointerEvents:"eDssNQ",position:"bEvNbr",top:"gWNFme",transform:"pgDyb",visibility:"dWytAe",zIndex:"ljRbsE",fontSize:"gVscJz",lineHeight:"kvNqZl","@media all and (min-width:102em)":{fontSize:"boPXgS",lineHeight:"bnVOLt"}},iconChecked:{visibility:"esoNju"},iconShow:{animationName:"enOfS"},iconHide:{animationName:"gVSSVO"},disabled:{cursor:"kFEjTq",opacity:"iItPPl"},label:{color:"kCxIXX",fontSize:"gVscJz",lineHeight:"kvNqZl","@media all and (min-width:102em)":{fontSize:"hyhpVP",lineHeight:"kRmCJO"}},toggle:{"--width":"bOxbDD",height:"jbsTrU",backgroundColor:"ckMgaR",borderTopLeftRadius:"jWjrEQ",borderTopRightRadius:"eKtERL",borderBottomRightRadius:"BRobm",borderBottomLeftRadius:"iovjFN",outlineColor:"gTHOLO",outlineOffset:"gNTabI",outlineStyle:"gcyyum",outlineWidth:"bJaMpz",position:"cjScYX",transform:"bomRby",transitionDuration:"fzcltM",transitionProperty:"brlMGR",transitionTimingFunction:"iaemGh",width:"claTSo","@media all and (min-width:80em)":{"--width":"jsjgQH",transform:"kNxdej"},"::after":{aspectRatio:"YxqGG",content:"fqXcHQ",backgroundColor:"evCPOd",position:"dyMCpl",borderTopLeftRadius:"iZcnBH",borderTopRightRadius:"glXHhV",borderBottomRightRadius:"kQHMoA",borderBottomLeftRadius:"goPOai",height:"fiybOz",transform:"hMKtoM",top:"dXSlMo",transitionProperty:"Za_dny",transitionDuration:"enlUTT",transitionTimingFunction:"fkNSWz"}},toggleChecked:{backgroundColor:"fIcjCT","::after":{transform:"eHQyf",backgroundColor:"ePIri"}},error:{color:"flyuuT",fontSize:"gVscJz",lineHeight:"kvNqZl","@media all and (min-width:102em)":{fontSize:"hyhpVP",lineHeight:"kRmCJO"}}},CheckboxWrapper=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function CheckboxWrapper(_ref,ref){let{children,inlineStyle,inputRef,styleExtend=[],state="enabled"}=_ref,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref,_excluded);const isDisabled="disabled"===state;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("label",_objectSpread(_objectSpread({},attrs),{},{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.wrapper,isDisabled&&c.disabled,...styleExtend),style:inlineStyle,ref,"data-testid":"checkbox-label",children}))})),CheckboxText=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function CheckboxText(_ref2,ref){let{id,children,styleExtend=[]}=_ref2,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref2,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",_objectSpread(_objectSpread({},attrs),{},{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.label,...styleExtend),id,ref,children}))})),FauxCheckbox=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function FauxCheckbox(_ref3,ref){let{checked,indeterminate,labelledBy,onChange:onChangeProp,state="enabled"}=_ref3,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref3,_excluded3);const wasChecked=react__WEBPACK_IMPORTED_MODULE_2__.useRef(checked),_inputRef=react__WEBPACK_IMPORTED_MODULE_2__.useRef(null),inputRef=null!=ref?ref:_inputRef,[isIndeterminate,setIsIndeterminate]=react__WEBPACK_IMPORTED_MODULE_2__.useState(indeterminate),{attrsOverride,isChecked,isDisabled,onChange}=useCheckbox(checked,labelledBy,onChangeProp,state,setIsIndeterminate),checkedChanged=wasChecked.current!==isChecked;return wasChecked.current=isChecked,react__WEBPACK_IMPORTED_MODULE_2__.useEffect((()=>{"current"in inputRef&&inputRef.current&&(inputRef.current.indeterminate=!!indeterminate),setIsIndeterminate(indeterminate)}),[indeterminate,inputRef]),react__WEBPACK_IMPORTED_MODULE_2__.useEffect((()=>{"current"in inputRef&&inputRef.current&&null!=isIndeterminate&&(inputRef.current.indeterminate=isIndeterminate)}),[isIndeterminate,isChecked,inputRef]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input",_objectSpread(_objectSpread(_objectSpread({},attrs),attrsOverride),{},{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.input),checked:isChecked,disabled:isDisabled,onChange,ref:inputRef})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{"aria-hidden":"true",className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.iconWrapper,(isChecked||isIndeterminate)&&c.iconWrapperChecked,checkedChanged&&(isChecked||isIndeterminate)&&c.iconWrapperShow,checkedChanged&&!(isChecked||isIndeterminate)&&c.iconWrapperHide),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_haaretz_s_icon__WEBPACK_IMPORTED_MODULE_5__.Z,{icon:isIndeterminate?"minus":"check",styleExtend:[c.icon,(isChecked||isIndeterminate)&&c.iconChecked,checkedChanged&&(isChecked||isIndeterminate)&&c.iconShow,checkedChanged&&!(isChecked||isIndeterminate)&&c.iconHide]})})]})})),Toggle=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function Toggle(_ref4,ref){let{checked,labelledBy,state="enabled",onChange:onChangeProp}=_ref4,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref4,_excluded4);const{attrsOverride,isChecked,isDisabled,onChange}=useCheckbox(checked,labelledBy,onChangeProp,state);return attrs.indeterminate&&delete attrs.indeterminate,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input",_objectSpread(_objectSpread(_objectSpread({},attrs),attrsOverride),{},{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.input),checked:isChecked,disabled:isDisabled,onChange,ref})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{"aria-hidden":"true",className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.toggle,isChecked&&c.toggleChecked)})]})})),Checkbox=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function Checkbox(_ref5,ref){let{inlineStyle,checked=!1,children,styleExtend=[],labelStyleExtend,state="enabled",appearance,errorText}=_ref5,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref5,_excluded5);const checkboxId=react__WEBPACK_IMPORTED_MODULE_2__.useId(),labelId=react__WEBPACK_IMPORTED_MODULE_2__.useId(),inputRef=react__WEBPACK_IMPORTED_MODULE_2__.useRef(null),[validationState,setValidationState]=react__WEBPACK_IMPORTED_MODULE_2__.useState("default");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(CheckboxWrapper,{style:inlineStyle,styleExtend,inputRef:ref||inputRef,state,children:["toggle"===appearance?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Toggle,_objectSpread(_objectSpread({},attrs),{},{checked,id:checkboxId,labelledBy:labelId,state,ref:ref||inputRef})):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(FauxCheckbox,_objectSpread(_objectSpread({},attrs),{},{onChange:event=>{errorText&&"default"!==validationState&&setValidationState("default"),"function"==typeof attrs.onChange&&attrs.onChange(event)},onInvalid:event=>{errorText&&setValidationState("invalid"),"function"==typeof attrs.onInvalid&&attrs.onInvalid(event)},checked,id:checkboxId,labelledBy:labelId,state,ref:ref||inputRef})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(CheckboxText,{styleExtend:labelStyleExtend,id:labelId,children:[children,errorText&&"invalid"===validationState?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.error),children:errorText}):null]})]})}));Checkbox.__docgenInfo={description:"",methods:[],displayName:"Checkbox",props:{checked:{defaultValue:{value:"false",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1},state:{defaultValue:{value:"'enabled'",computed:!1},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Checkbox;function useCheckbox(checked,labelledBy,onChangeProp,state,setIsIndeterminate){const[isChecked,setIsChecked]=react__WEBPACK_IMPORTED_MODULE_2__.useState(checked),isDisabled="disabled"===state,attrsOverride=function getAttrsOverride(_ref6){let{labelledBy}=_ref6;const attrsOverride={type:"checkbox"};return labelledBy&&(attrsOverride["aria-labelledby"]=labelledBy),attrsOverride}({labelledBy});return react__WEBPACK_IMPORTED_MODULE_2__.useEffect((()=>{setIsChecked(checked)}),[checked]),{attrsOverride,isChecked,isDisabled,onChange:function onChange(evt){evt.target.checked=!isChecked,setIsChecked(evt.target.checked),setIsIndeterminate&&setIsIndeterminate(!1),onChangeProp&&onChangeProp(evt)}}}CheckboxWrapper.__docgenInfo={description:"",methods:[],displayName:"CheckboxWrapper",props:{styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1},state:{defaultValue:{value:"'enabled'",computed:!1},required:!1}}},CheckboxText.__docgenInfo={description:"",methods:[],displayName:"CheckboxText",props:{styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1}}},FauxCheckbox.__docgenInfo={description:"",methods:[],displayName:"FauxCheckbox",props:{state:{defaultValue:{value:"'enabled'",computed:!1},required:!1}}},Toggle.__docgenInfo={description:"",methods:[],displayName:"Toggle",props:{state:{defaultValue:{value:"'enabled'",computed:!1},required:!1}}};try{CheckboxWrapper.displayName="CheckboxWrapper",CheckboxWrapper.__docgenInfo={description:"",displayName:"CheckboxWrapper",props:{inputRef:{defaultValue:null,description:"A refference to the `input` element that is rendered inside the wrapper.",name:"inputRef",required:!0,type:{name:"ForwardedRef<HTMLInputElement>"}},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 MyCheckbox(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Checkbox\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<Checkbox styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},labelStyleExtend:{defaultValue:null,description:"Same as styledExtend, but for the label of the checkbox.",name:"labelStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},state:{defaultValue:{value:"enabled"},description:"The functional state of the component.\n@defaultValue 'enabled'",name:"state",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"disabled"'},{value:'"enabled"'}]}},errorText:{defaultValue:null,description:"",name:"errorText",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-checkbox/src/Checkbox.tsx#CheckboxWrapper"]={docgenInfo:CheckboxWrapper.__docgenInfo,name:"CheckboxWrapper",path:"../../ds-atoms/s-checkbox/src/Checkbox.tsx#CheckboxWrapper"})}catch(__react_docgen_typescript_loader_error){}try{CheckboxText.displayName="CheckboxText",CheckboxText.__docgenInfo={description:"",displayName:"CheckboxText",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},styleExtend:{defaultValue:{value:"[]"},description:"",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-checkbox/src/Checkbox.tsx#CheckboxText"]={docgenInfo:CheckboxText.__docgenInfo,name:"CheckboxText",path:"../../ds-atoms/s-checkbox/src/Checkbox.tsx#CheckboxText"})}catch(__react_docgen_typescript_loader_error){}try{FauxCheckbox.displayName="FauxCheckbox",FauxCheckbox.__docgenInfo={description:"",displayName:"FauxCheckbox",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 MyCheckbox(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Checkbox\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<Checkbox styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},labelStyleExtend:{defaultValue:null,description:"Same as styledExtend, but for the label of the checkbox.",name:"labelStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},state:{defaultValue:{value:"enabled"},description:"The functional state of the component.\n@defaultValue 'enabled'",name:"state",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"disabled"'},{value:'"enabled"'}]}},errorText:{defaultValue:null,description:"",name:"errorText",required:!1,type:{name:"string | undefined"}},labelledBy:{defaultValue:null,description:"An ID of the element describing the checkbox or toggle",name:"labelledBy",required:!1,type:{name:"string | undefined"}},indeterminate:{defaultValue:null,description:"Set the checkbox to an indeterminate state.",name:"indeterminate",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-checkbox/src/Checkbox.tsx#FauxCheckbox"]={docgenInfo:FauxCheckbox.__docgenInfo,name:"FauxCheckbox",path:"../../ds-atoms/s-checkbox/src/Checkbox.tsx#FauxCheckbox"})}catch(__react_docgen_typescript_loader_error){}try{Toggle.displayName="Toggle",Toggle.__docgenInfo={description:"",displayName:"Toggle",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 MyCheckbox(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Checkbox\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<Checkbox styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},labelStyleExtend:{defaultValue:null,description:"Same as styledExtend, but for the label of the checkbox.",name:"labelStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},state:{defaultValue:{value:"enabled"},description:"The functional state of the component.\n@defaultValue 'enabled'",name:"state",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"disabled"'},{value:'"enabled"'}]}},errorText:{defaultValue:null,description:"",name:"errorText",required:!1,type:{name:"string | undefined"}},labelledBy:{defaultValue:null,description:"An ID of the element describing the checkbox or toggle",name:"labelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-checkbox/src/Checkbox.tsx#Toggle"]={docgenInfo:Toggle.__docgenInfo,name:"Toggle",path:"../../ds-atoms/s-checkbox/src/Checkbox.tsx#Toggle"})}catch(__react_docgen_typescript_loader_error){}try{Checkbox.displayName="Checkbox",Checkbox.__docgenInfo={description:"",displayName:"Checkbox",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 MyCheckbox(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Checkbox\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<Checkbox styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},labelStyleExtend:{defaultValue:null,description:"Same as styledExtend, but for the label of the checkbox.",name:"labelStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},state:{defaultValue:{value:"enabled"},description:"The functional state of the component.\n@defaultValue 'enabled'",name:"state",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"disabled"'},{value:'"enabled"'}]}},errorText:{defaultValue:null,description:"",name:"errorText",required:!1,type:{name:"string | undefined"}},checked:{defaultValue:{value:"false"},description:"Set the `checked` state of the checkbox or toggle.\n@defaultValue false",name:"checked",required:!1,type:{name:"boolean | undefined"}},appearance:{defaultValue:null,description:"",name:"appearance",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"checkbox"'},{value:'"toggle"'}]}},indeterminate:{defaultValue:null,description:"Set the checkbox to an indeterminate state.",name:"indeterminate",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-checkbox/src/Checkbox.tsx#Checkbox"]={docgenInfo:Checkbox.__docgenInfo,name:"Checkbox",path:"../../ds-atoms/s-checkbox/src/Checkbox.tsx#Checkbox"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-atoms/s-checkbox/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-checkbox/src/Checkbox.tsx").ZP},"../../ds-atoms/s-click-area/src/ClickArea.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{pL:()=>DEFAULT_ELEMENT,Kx:()=>_ClickArea,ZP:()=>src_ClickArea});var defineProperty=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),objectWithoutProperties=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),jsx_runtime=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js");const src=__webpack_require__("../../ds-atoms/s-ripple/src/Ripple.tsx").Z;var s_visually_hidden_src=__webpack_require__("../../ds-atoms/s-visually-hidden/src/index.ts"),react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["as","children","disableRipple","inlineStyle","onClick","onFocus","onBlur","screenReaderText","size","rippleSize","styleExtend","rippleExpansionState"];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 c={base:{"--_size":"hdFffA",backgroundColor:"KqcXP",minHeight:"gbheqr",minWidth:"geazWn",position:"cjScYX",transform:"iTaucd",transitionDuration:"hxGPkc",transitionProperty:"PQKIY",":focus":{outlineStyle:"larHMv"},":active":{transform:"iNlVNY"}},extraSmallSize:{"--size":"jKtEpn"},smallSize:{"--size":"iJqbGP"},mediumSize:{"--size":"gSaMJF"},largeSize:{"--size":"dLAWNH"},disabled:{opacity:"iItPPl",":active":{transform:"hFTWVM"}}},DEFAULT_ELEMENT="button",ClickArea=react.forwardRef((function ClickArea(_ref,ref){let{as,children=null,disableRipple,inlineStyle,onClick:onClickProp,onFocus:onFocusProp,onBlur:onBlurProp,screenReaderText,size="medium",rippleSize,styleExtend=[],rippleExpansionState}=_ref,attrs=(0,objectWithoutProperties.Z)(_ref,_excluded);const[rippleState,setRippleState]=react.useState(rippleExpansionState||"contracted"),Element=as||DEFAULT_ELEMENT,isDisabled=isTruthyBooleanish(attrs["aria-disabled"])||isTruthyBooleanish(attrs.disabled),sizeClass=`${size}Size`;return(0,jsx_runtime.jsxs)(Element,_objectSpread(_objectSpread({},attrs),{},{className:(0,style9.Z)(c.base,c[sizeClass],isDisabled&&c.disabled,...styleExtend),style:inlineStyle,ref,onClick:isDisabled?void 0:evt=>{onClickProp&&onClickProp(evt),rippleExpansionState||setRippleState("pulse")},onFocus:isDisabled?void 0:evt=>{onFocusProp&&onFocusProp(evt),rippleExpansionState||setRippleState("expanded")},onBlur:isDisabled?void 0:evt=>{onBlurProp&&onBlurProp(evt),rippleExpansionState||setRippleState("contracting")},children:[disableRipple||isDisabled?null:(0,jsx_runtime.jsx)(src,{size:rippleSize,expansionState:rippleState,onPulseEnd:setRippleState}),screenReaderText?(0,jsx_runtime.jsx)(s_visually_hidden_src.ZP,{children:screenReaderText}):null,children]}))}));ClickArea.__docgenInfo={description:"",methods:[],displayName:"ClickArea",props:{children:{defaultValue:{value:"null",computed:!1},required:!1},size:{defaultValue:{value:"'medium'",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1}}};const src_ClickArea=ClickArea;function _ClickArea(_props){return null}function isTruthyBooleanish(value){return!0===value||"true"===value}try{_ClickArea.displayName="_ClickArea",_ClickArea.__docgenInfo={description:"",displayName:"_ClickArea",props:{children:{defaultValue:{value:"null"},description:"The Children to be rendered inside `<ClickArea>`",name:"children",required:!1,type:{name:"ReactNode"}},size:{defaultValue:{value:"medium"},description:"Size for the click area. also controls the the size of the Ripple.",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'},{value:'"extraSmall"'},{value:'"medium"'}]}},screenReaderText:{defaultValue:null,description:"Text that will only be visible to screen readers",name:"screenReaderText",required:!1,type:{name:"ReactNode"}},disableRipple:{defaultValue:null,description:"Prevent the ClickArea from emiting a ripple to indicate interactivity",name:"disableRipple",required:!1,type:{name:"boolean | undefined"}},rippleSize:{defaultValue:null,description:"Set the size of the ripple",name:"rippleSize",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'},{value:'"extraSmall"'},{value:'"medium"'}]}},rippleExpansionState:{defaultValue:null,description:"Directly control the ripple state from the outside",name:"rippleExpansionState",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"contracted"'},{value:'"contracting"'},{value:'"expanded"'},{value:'"pulse"'}]}},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 MyClickArea(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <ClickArea\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<ClickArea styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-click-area/src/ClickArea.tsx#_ClickArea"]={docgenInfo:_ClickArea.__docgenInfo,name:"_ClickArea",path:"../../ds-atoms/s-click-area/src/ClickArea.tsx#_ClickArea"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-atoms/s-click-area/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-click-area/src/ClickArea.tsx").ZP},"../../ds-atoms/s-no-ssr/src/NoSSR.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>NoSSR});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js");function NoSSR(_ref){let{children}=_ref;const[loaded,setLoaded]=react__WEBPACK_IMPORTED_MODULE_1__.useState(!1);return react__WEBPACK_IMPORTED_MODULE_1__.useEffect((()=>{setLoaded(!0)}),[]),loaded?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children}):null}try{NoSSR.displayName="NoSSR",NoSSR.__docgenInfo={description:"",displayName:"NoSSR",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-no-ssr/src/NoSSR.tsx#NoSSR"]={docgenInfo:NoSSR.__docgenInfo,name:"NoSSR",path:"../../ds-atoms/s-no-ssr/src/NoSSR.tsx#NoSSR"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-atoms/s-no-ssr/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-no-ssr/src/NoSSR.tsx").Z},"../../ds-atoms/s-popover/src/Popover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__,p:()=>DEFAULT_ELEMENT});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@floating-ui/react/dist/floating-ui.react.esm.js"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/core/dist/floating-ui.core.mjs"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js"),_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),_haaretz_s_no_ssr__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("../../ds-atoms/s-no-ssr/src/index.ts"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs"),console=__webpack_require__("../../../node_modules/.pnpm/[email protected]/node_modules/console-browserify/index.js");const _excluded=["as","children","inlineStyle","styleExtend","refersToRef","placement","openOn","keepInView","isOpen","kind","defaultIsOpen","onToggle","closeOn","offsetInRem"],_excluded2=["onClick","onKeyDown","onKeyUp","onMouseDown","onPointerDown","onFocus","onBlur","onMouseMove","onPointerEnter"];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,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.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 arrowWidth="0.75rem",borderWidth="1px",arrowPadding="0.5rem",c={elemntsWrapper:{position:"bEvNbr",top:"gdRGRW",left:"caCrFV",color:"kCxIXX",borderTopLeftRadius:"gvQKzB",borderTopRightRadius:"gXtGmO",borderBottomRightRadius:"gGmREU",borderBottomLeftRadius:"ia_DRrH",zIndex:"jvKoxA"},popover:{backgroundColor:"ebWxcl",borderTopLeftRadius:"gvQKzB",borderTopRightRadius:"gXtGmO",borderBottomRightRadius:"gGmREU",borderBottomLeftRadius:"ia_DRrH",borderBottomColor:"kYcEZx",borderBottomStyle:"hpBjJb",borderBottomWidth:"ctibpX",paddingBottom:"eejUxl",borderInlineEndColor:"flIjzH",borderInlineEndStyle:"hszzXi",borderInlineEndWidth:"bTnXNj",paddingInlineEnd:"cfEHVR",borderInlineStartColor:"kjKJfC",borderInlineStartStyle:"itlHSH",borderInlineStartWidth:"hXXzlB",paddingInlineStart:"kQDwxQ",borderTopColor:"bvireM",borderTopStyle:"FwRrA",borderTopWidth:"izykGz",paddingTop:"bdXHYu"},arrow:{},arrowKeepInBound:{position:"bEvNbr",aspectRatio:"eUirwo",top:"jbTRU",left:"kFDthg",width:"cFMWHx",transform:"dqImtA"},arrowBehind:{position:"bEvNbr",aspectRatio:"eUirwo",top:"fsoPQz",left:"bRScxA",width:"hiDeJu",backgroundColor:"glmvMr",transform:"dqImtA",zIndex:"iYxGWt"},arrowFront:{position:"bEvNbr",aspectRatio:"eUirwo",top:"cDlTOD",left:"bZPMts",width:"iTSRZl",backgroundColor:"ebWxcl",transform:"dqImtA",zIndex:"hTKfVG"},topArrowPadding:{paddingTop:"dmKgnC"},bottomArrowPadding:{paddingBottom:"dPFrWx"},leftArrowPadding:{paddingLeft:"JxWnH"},rightArrowPadding:{paddingRight:"cVJMrm"}},DEFAULT_ELEMENT="div";function Popover(props){return"undefined"==typeof window?null:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(PopoverClient,_objectSpread({},props))}let rootFontSize;function PopoverClient(_ref){var _middlewareData$arrow2,_middlewareData$arrow4;let{as,children=null,inlineStyle,styleExtend=[],refersToRef,placement="top",openOn:openOnProp,keepInView,isOpen:isOpenProp,kind="popover",defaultIsOpen,onToggle,closeOn="esc+blur",offsetInRem="0rem"}=_ref,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref,_excluded);const popoverId=react__WEBPACK_IMPORTED_MODULE_2__.useId(),Element=as||DEFAULT_ELEMENT,arrowRef=react__WEBPACK_IMPORTED_MODULE_2__.useRef(null),[isOpen,setIsOpen]=react__WEBPACK_IMPORTED_MODULE_2__.useState(defaultIsOpen||!1),open=null!=isOpenProp?isOpenProp:isOpen;rootFontSize=null==rootFontSize?Number.parseInt(getComputedStyle(document.documentElement).fontSize):rootFontSize,null==isOpenProp||onToggle||console.warn('<Popover>: You set a value to "isOpen", making it a controlled component,\n but did not set an "onToggle" handler,\n making the controlling component unaware of internal changes.');const isPopover="popover"===kind,openOn=openOnProp||(isPopover?"click":"hover+focus"),showOnHover="hover+focus"===openOn||"hover"===openOn,showOnFocus="hover+focus"===openOn||"focus"===openOn,showOnClick="click"===openOn,closeOnBlur="blur"===closeOn||"esc+blur"===closeOn,closeOnOptions={enabled:"controlled"!==closeOn,escapeKey:"esc"===closeOn||"esc+blur"===closeOn,outsidePress:closeOnBlur},handleOpenStateChange=react__WEBPACK_IMPORTED_MODULE_2__.useCallback((isOpenFromLibrary=>{onToggle?onToggle(isOpenFromLibrary):setIsOpen(isOpenFromLibrary)}),[onToggle]),{x,y,context,middlewareData,refs,placement:popoverPlacement}=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.YF)({placement,open,onOpenChange:handleOpenStateChange,middleware:[(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_6__.cv)(Number.parseFloat(offsetInRem)*rootFontSize),...keepInView?[(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_6__.uY)(),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_6__.RR)()]:[],(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_7__.x7)({element:arrowRef})],whileElementsMounted:_floating_ui_react__WEBPACK_IMPORTED_MODULE_8__.Me}),{getReferenceProps,getFloatingProps}=(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.NI)([(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.XI)(context,{enabled:showOnHover}),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.KK)(context,{enabled:showOnFocus}),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.eS)(context,{enabled:showOnClick}),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.qs)(context,{role:"dialog"}),(0,_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.bQ)(context,closeOn&&closeOnOptions)]),arrowSide={top:"bottom",right:"left",bottom:"top",left:"right"}[popoverPlacement.split("-")[0]],arrowX=react__WEBPACK_IMPORTED_MODULE_2__.useMemo((()=>{var _middlewareData$arrow;return null===(_middlewareData$arrow=middlewareData.arrow)||void 0===_middlewareData$arrow?void 0:_middlewareData$arrow.x}),[null===(_middlewareData$arrow2=middlewareData.arrow)||void 0===_middlewareData$arrow2?void 0:_middlewareData$arrow2.x]),arrowY=react__WEBPACK_IMPORTED_MODULE_2__.useMemo((()=>{var _middlewareData$arrow3;return null===(_middlewareData$arrow3=middlewareData.arrow)||void 0===_middlewareData$arrow3?void 0:_middlewareData$arrow3.y}),[null===(_middlewareData$arrow4=middlewareData.arrow)||void 0===_middlewareData$arrow4?void 0:_middlewareData$arrow4.y]),arrowBehindPosition=`calc((${arrowWidth} * -0.5) + ${borderWidth} + ${arrowPadding})`,arrowFrontPosition=`calc((${arrowWidth} * -0.5) + (${borderWidth} * 2 + ${arrowPadding}))`,arrowKeepInBoundPosition=`calc((${arrowWidth} * -0.7) + ${borderWidth} + ${arrowPadding})`;react__WEBPACK_IMPORTED_MODULE_2__.useLayoutEffect((()=>{const refersToElement=null==refersToRef?void 0:refersToRef.current,_getReferenceProps=getReferenceProps(),{onClick,onKeyDown,onKeyUp,onMouseDown,onPointerDown,onFocus,onBlur,onMouseMove,onPointerEnter}=_getReferenceProps,refAttrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_getReferenceProps,_excluded2),events={click:onClick,keydown:onKeyDown,keyup:onKeyUp,mousedown:onMouseDown,pointerdown:onPointerDown,focus:onFocus,blur:onBlur,mousemove:onMouseMove,pointerenter:onPointerEnter};return refersToElement&&(refs.setReference(refersToElement),refersToElement.setAttribute("aria-describedby",popoverId),Object.entries(events).forEach((_ref2=>{let[event,fn]=_ref2;"function"==typeof fn&&refersToElement.addEventListener(event,fn)})),Object.entries(refAttrs).forEach((_ref3=>{let[attr,value]=_ref3;"function"!=typeof value&&null!=value&&refersToElement.setAttribute(attr,value)}))),()=>{refersToElement&&(refersToElement.removeAttribute("aria-describedby"),Object.entries(events).forEach((_ref4=>{let[event,fn]=_ref4;"function"==typeof fn&&refersToElement.removeEventListener(event,fn)})),Object.entries(refAttrs).forEach((_ref5=>{let[attr,value]=_ref5;"function"!=typeof value&&refersToElement.removeAttribute(attr)})))}}),[getReferenceProps,popoverId,refersToRef,refs]);const ArrowPaddingClass=`${arrowSide}ArrowPadding`,PopoverElement=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",_objectSpread(_objectSpread({className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.elemntsWrapper,arrowSide&&c[ArrowPaddingClass]),ref:refs.setFloating,style:_objectSpread({"--y":`${y}px`,"--x":`${x}px`},inlineStyle)},getFloatingProps()),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Element,_objectSpread(_objectSpread({id:popoverId,role:"tooltip"===kind?"tooltip":"region","data-testid":"popover",className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.popover,...styleExtend)},attrs),{},{children})),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.arrow),style:{"--arrowX":null!=arrowX?`${arrowX}px`:"","--arrowY":null!=arrowY?`${arrowY}px`:""},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.arrowKeepInBound),ref:arrowRef,style:_objectSpread({},arrowSide&&{[arrowSide]:arrowKeepInBoundPosition})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.arrowBehind),style:_objectSpread({},arrowSide&&{[arrowSide]:arrowBehindPosition})}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c.arrowFront),style:_objectSpread({},arrowSide&&{[arrowSide]:arrowFrontPosition})})]})]}));return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_haaretz_s_no_ssr__WEBPACK_IMPORTED_MODULE_9__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.ll,{children:open&&(isPopover?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_floating_ui_react__WEBPACK_IMPORTED_MODULE_5__.wD,{context,modal:!closeOnBlur,order:["content","floating","reference"],children:PopoverElement}):PopoverElement)})})}const __WEBPACK_DEFAULT_EXPORT__=Popover;try{Popover.displayName="Popover",Popover.__docgenInfo={description:"",displayName:"Popover",props:{children:{defaultValue:null,description:"The Children to be rendered inside `<Popover>`",name:"children",required:!1,type:{name:"ReactNode"}},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 MyPopover(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Popover\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:null,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<Popover styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},refersToRef:{defaultValue:null,description:"The element's ref the popover refers to.\nHover, click and focus on this element will make\nthe popover open.",name:"refersToRef",required:!0,type:{name:"MutableRefObject<Element | null>"}},placement:{defaultValue:null,description:"Places the popover element relatively to the chosen side.\n@defaultValue 'top'",name:"placement",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bottom"'},{value:'"left"'},{value:'"right"'},{value:'"top"'},{value:'"bottom-end"'},{value:'"bottom-start"'},{value:'"left-end"'},{value:'"left-start"'},{value:'"right-end"'},{value:'"right-start"'},{value:'"top-end"'},{value:'"top-start"'}]}},openOn:{defaultValue:null,description:"Determines on what condition will the popover open.\n@defaultValue 'top'",name:"openOn",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"click"'},{value:'"hover+focus"'},{value:'"focus"'},{value:'"hover"'},{value:'"controlled"'}]}},keepInView:{defaultValue:null,description:"Changes the anchoring position of the popover to keep it in view.\n@defaultValue true",name:"keepInView",required:!1,type:{name:"boolean | undefined"}},isOpen:{defaultValue:null,description:"Determines if the popover should be open or not.",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},kind:{defaultValue:null,description:"Determines if should behave as a popover or a tooltip.",name:"kind",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"tooltip"'},{value:'"popover"'}]}},defaultIsOpen:{defaultValue:null,description:"The default state of IsOpen, useful for things such as keeping\nthe component uncontrolled but having the popover already opened\non mount.",name:"defaultIsOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"Callback to make the component controlled, allows you to use\nthe internal state.",name:"onToggle",required:!1,type:{name:"((isOpen: boolean) => void) | undefined"}},closeOn:{defaultValue:null,description:"Determines on what condition will the popover close.",name:"closeOn",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"controlled"'},{value:'"esc"'},{value:'"blur"'},{value:'"esc+blur"'}]}},offsetInRem:{defaultValue:null,description:'A placement modifier that translates the floating element along the main axis.\nBased on rem units. It is suggested to use "space" babel macro for this.\n@example ```ts\n<Popover offset={space(4)} />\n```',name:"offsetInRem",required:!1,type:{name:"`${number}rem` | undefined"}},as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:'ComponentType<any> | "div" | "section" | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-popover/src/Popover.tsx#Popover"]={docgenInfo:Popover.__docgenInfo,name:"Popover",path:"../../ds-atoms/s-popover/src/Popover.tsx#Popover"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-atoms/s-popover/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-popover/src/Popover.tsx").Z},"../../ds-atoms/s-ripple/src/Ripple.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const c={base:{"--scale":"frpakM",backgroundColor:"kcXJjy",borderTopLeftRadius:"eCJvpO",borderTopRightRadius:"KuLii",borderBottomRightRadius:"cPOOyy",borderBottomLeftRadius:"dJEuaT",left:"gpkvrq",opacity:"gOeSjL",pointerEvents:"eDssNQ",position:"bEvNbr",top:"gWNFme",transform:"iQwhDo",transitionDuration:"bMlzRK",transitionProperty:"fFNiPZ",transitionTimingFunction:"iaemGh",zIndex:"iYxGWt"},extraSmallSize:{paddingTop:"jWWtke",paddingRight:"ftIldC",paddingBottom:"bnHxUw",paddingLeft:"iDuqPI"},smallSize:{paddingTop:"icKiSN",paddingRight:"eeREmo",paddingBottom:"fZMRmg",paddingLeft:"hRjOno"},mediumSize:{paddingTop:"evejof",paddingRight:"ficYLN",paddingBottom:"fZuMrP",paddingLeft:"hAZelr"},largeSize:{paddingTop:"eTWfTD",paddingRight:"bjpAAw",paddingBottom:"jENALy",paddingLeft:"calZuD"},contracting:{opacity:"UXrzu",transitionDuration:"hxGPkc"},expanded:{"--scale":"FBwSk",opacity:"iaNtwv",transitionDuration:"eWLwSv"},pulse:{"--scale":"FBwSk",opacity:"UXrzu",transitionDuration:"eWLwSv"}},Ripple=react__WEBPACK_IMPORTED_MODULE_1__.forwardRef((function Ripple(_ref,ref){let{size="medium",expansionState="contracted",onPulseEnd,inlineStyle,styleExtend=[]}=_ref;const sizeClass=`${size}Size`,onTransitionEnd=react__WEBPACK_IMPORTED_MODULE_1__.useCallback((()=>{["pulse","contracting"].includes(expansionState)&&onPulseEnd&&onPulseEnd("contracted")}),[expansionState,onPulseEnd]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.base,"expanded"===expansionState&&c.expanded,"contracting"===expansionState&&c.contracting,"pulse"===expansionState&&c.pulse,c[sizeClass],...styleExtend),style:inlineStyle,ref,onTransitionEnd})}));Ripple.__docgenInfo={description:"",methods:[],displayName:"Ripple",props:{size:{defaultValue:{value:"'medium'",computed:!1},required:!1},expansionState:{defaultValue:{value:"'contracted'",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Ripple;try{Ripple.displayName="Ripple",Ripple.__docgenInfo={description:"",displayName:"Ripple",props:{size:{defaultValue:{value:"medium"},description:"The size of the ripple.",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'},{value:'"extraSmall"'},{value:'"medium"'}]}},expansionState:{defaultValue:{value:"contracted"},description:"Controls the ripple's state and animation.\n\n* **`contracted`:** is the off state, when the ripple is not visible.\n* **`expanded`:** shows the ripple at its full size.\n* **`contracting`:** animates the ripple from its full size to the off state.\n* **`pulse`:** animates the ripple from its off state to its full size, but\n fade it out in the end.",name:"expansionState",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"contracted"'},{value:'"contracting"'},{value:'"expanded"'},{value:'"pulse"'}]}},onPulseEnd:{defaultValue:null,description:"A callback that is executed when the ripple animation is over\nin the `pulse` and `contracting` states and indicates what\nshould the next `expansionState` be.\n\nCan be used to notifying controlling ascendant components that the ripple\nhas finished animating and they can change state if needed\n(mostly the state that controls the `expansionState` prop).",name:"onPulseEnd",required:!0,type:{name:'(nextState: "contracted" | "contracting" | "expanded" | "pulse" | undefined) => void'}},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 MyRipple(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Ripple\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<Ripple styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-ripple/src/Ripple.tsx#Ripple"]={docgenInfo:Ripple.__docgenInfo,name:"Ripple",path:"../../ds-atoms/s-ripple/src/Ripple.tsx#Ripple"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-molecules/s-action-bar/src/components/action-bars/MagazineBar/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>action_bars_MagazineBar});var defineProperty=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),jsx_runtime=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),style9=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const src_uuidValidator=function uuidValidator(uuid){return/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(uuid)};var vanilla=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jotai/esm/vanilla.mjs"),react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/jotai/esm/react.mjs");const baseArticleIdAtom=(0,vanilla.cn)(null);baseArticleIdAtom.debugPrivate=!0;const articleIdAtom=(0,vanilla.cn)((get=>get(baseArticleIdAtom)),((_get,set,articleId)=>{set(baseArticleIdAtom,src_uuidValidator(articleId)?articleId:null)}));articleIdAtom.debugLabel="articleId";const src_articleId=function useArticleId(){return(0,react.KO)(articleIdAtom)};var src_user=__webpack_require__("../../utils/s-atoms/src/user/index.ts"),src=__webpack_require__("../../ds-atoms/s-click-area/src/index.ts"),s_icon_src=__webpack_require__("../../ds-atoms/s-icon/src/index.ts"),useMutation=__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@tanstack/react-query/build/lib/useMutation.mjs"),GraphqlFetcher=__webpack_require__("../../graphql/s-graphql-fetcher/src/GraphqlFetcher.tsx");const UpdateReadingListMutationDocument="\n mutation UpdateReadingListMutation($input: UpdateReadingListInput!) {\n updateReadingList(input: $input) {\n status\n error\n }\n}\n ",useUpdateReadingListMutation=options=>(0,useMutation.D)(["UpdateReadingListMutation"],(variables=>(0,GraphqlFetcher.Z)(UpdateReadingListMutationDocument,variables)()),options);useUpdateReadingListMutation.getKey=()=>["UpdateReadingListMutation"],useUpdateReadingListMutation.fetcher=(variables,options)=>(0,GraphqlFetcher.Z)(UpdateReadingListMutationDocument,variables,options);var s_popover_src=__webpack_require__("../../ds-atoms/s-popover/src/index.ts"),useQuery=__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@tanstack/react-query/build/lib/useQuery.mjs");__webpack_require__("../../../node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@tanstack/react-query/build/lib/useInfiniteQuery.mjs");const CheckArticleQueryDocument="\n query CheckArticleQuery($input: CheckArticleInput!) {\n checkArticle(input: $input) {\n __typename\n exist\n total\n full\n }\n}\n ",useCheckArticleQuery=(variables,options)=>(0,useQuery.a)(["CheckArticleQuery",variables],(0,GraphqlFetcher.Z)(CheckArticleQueryDocument,variables),options);useCheckArticleQuery.document=CheckArticleQueryDocument,useCheckArticleQuery.getKey=variables=>["CheckArticleQuery",variables];useCheckArticleQuery.fetcher=(variables,options)=>(0,GraphqlFetcher.Z)(CheckArticleQueryDocument,variables,options);var compiled_react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),s_button_src=__webpack_require__("../../ds-atoms/s-button/src/index.ts"),s_checkbox_src=__webpack_require__("../../ds-atoms/s-checkbox/src/index.ts");function ActionBtnPopover_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 ActionBtnPopover_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ActionBtnPopover_ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ActionBtnPopover_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={popover:{display:"gSBWlu",flexDirection:"iMkoWi",paddingTop:"jWWtke",paddingBottom:"bnHxUw",paddingLeft:"iDuqPI",paddingRight:"ftIldC"},closeBtnWrapper:{transform:"gNtwRN",position:"bEvNbr",zIndex:"bsOvLZ",alignSelf:"bdwdaF",fontSize:"fUqtKm"},titleWrapper:{paddingTop:"bKjKUN",fontSize:"iKjpVA",lineHeight:"cVaJzg","@media all and (min-width:80em) and (max-width:101.9375em)":{fontSize:"gPowFU",lineHeight:"eaJJqD"},"@media all and (min-width:102em)":{fontSize:"jbDMjY",lineHeight:"kzePcG"}},title:{fontWeight:"iLdtFu"},subTitle:{fontWeight:"buowod"},btn:{color:"URsRO",display:"gSBWlu",alignItems:"foGVKH",columnGap:"cUcBkx",backgroundColor:"KqcXP",":hover":{color:"demQfb"}},btnText:{fontWeight:"iLdtFu",fontSize:"gVscJz",lineHeight:"kvNqZl","@media all and (min-width:37.5em) and (max-width:79.9375em)":{fontSize:"cWAeKA",lineHeight:"bSApwy"},"@media all and (min-width:80em) and (max-width:101.9375em)":{fontSize:"cEKNZk",lineHeight:"gMAJcp"},"@media all and (min-width:102em)":{fontSize:"hyhpVP",lineHeight:"kRmCJO"}},buttonsWrapper:{display:"gSBWlu",columnGap:"jOsPdM",marginTop:"iqhvfj"},successColor:{color:"bzRhTf"},checkbox:{marginTop:"iPaXlm",marginBottom:"biWxPv"},label:{fontSize:"fyHdVr",lineHeight:"iKTruj","@media all and (min-width:80em) and (max-width:101.9375em)":{fontSize:"cEKNZk",lineHeight:"gMAJcp"},"@media all and (min-width:102em)":{fontSize:"hyhpVP",lineHeight:"kRmCJO"}}},PopoverBtn=_ref=>{let{text,icon,onClick,iconVariant,buttonComponent}=_ref;return buttonComponent?(0,jsx_runtime.jsx)(s_button_src.ZP,ActionBtnPopover_objectSpread(ActionBtnPopover_objectSpread({},buttonComponent),{},{onClick:buttonComponent.href?void 0:onClick,as:buttonComponent.href?"a":"button",children:text})):(0,jsx_runtime.jsxs)("button",{className:(0,style9.Z)(c.btn),onClick,children:[icon&&(0,jsx_runtime.jsx)(s_icon_src.Z,{icon,variant:iconVariant}),(0,jsx_runtime.jsx)("span",{className:(0,style9.Z)(c.btnText,"success"===iconVariant&&c.successColor),children:text})]})};function ActionBtnContent(_ref2){let{title,subTitle,btn1,btn2,styleExtend=[],onClose,children=null,titleStyleExtend=[],subTitleStyleExtend=[],checkbox,checkboxOnChange}=_ref2;return(0,jsx_runtime.jsxs)("div",{className:(0,style9.Z)(c.popover,...styleExtend),children:[(0,jsx_runtime.jsx)("div",{className:(0,style9.Z)(c.closeBtnWrapper),children:(0,jsx_runtime.jsx)(src.ZP,{rippleSize:"small",onClick:onClose,children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"close"})})}),children,title&&(0,jsx_runtime.jsxs)("div",{className:(0,style9.Z)(c.titleWrapper),children:[(0,jsx_runtime.jsx)("h3",{className:(0,style9.Z)(c.title,...titleStyleExtend),children:title}),subTitle&&(0,jsx_runtime.jsx)("h4",{className:(0,style9.Z)(c.subTitle,...subTitleStyleExtend),children:subTitle})]}),checkbox&&(0,jsx_runtime.jsx)(s_checkbox_src.ZP,{styleExtend:[c.checkbox],labelStyleExtend:[c.label],onChange:checkboxOnChange,children:checkbox}),btn1&&(0,jsx_runtime.jsxs)("div",{className:(0,style9.Z)(c.buttonsWrapper),children:[(0,jsx_runtime.jsx)(PopoverBtn,ActionBtnPopover_objectSpread(ActionBtnPopover_objectSpread({},btn1),{},{onClick:btn1.onClick})),btn2&&(0,jsx_runtime.jsx)(PopoverBtn,ActionBtnPopover_objectSpread(ActionBtnPopover_objectSpread({},btn2),{},{onClick:btn2.onClick}))]})]})}try{ActionBtnPopover.displayName="ActionBtnPopover",ActionBtnPopover.__docgenInfo={description:"",displayName:"ActionBtnPopover",props:{title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string | undefined"}},btn1:{defaultValue:null,description:"",name:"btn1",required:!1,type:{name:"PopoverBtnProps | undefined"}},btn2:{defaultValue:null,description:"",name:"btn2",required:!1,type:{name:"PopoverBtnProps | undefined"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => void) | 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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},titleStyleExtend:{defaultValue:{value:"[]"},description:"",name:"titleStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},subTitleStyleExtend:{defaultValue:{value:"[]"},description:"",name:"subTitleStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},children:{defaultValue:{value:"null"},description:"The Children to be rendered inside `<ActionBtnPopover>`",name:"children",required:!1,type:{name:"ReactNode"}},checkbox:{defaultValue:null,description:"",name:"checkbox",required:!1,type:{name:"string | undefined"}},checkboxOnChange:{defaultValue:null,description:"",name:"checkboxOnChange",required:!1,type:{name:"ChangeEventHandler<HTMLInputElement> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/ActionBtnPopover.tsx#ActionBtnPopover"]={docgenInfo:ActionBtnPopover.__docgenInfo,name:"ActionBtnPopover",path:"../../ds-molecules/s-action-bar/src/components/ActionBtnPopover.tsx#ActionBtnPopover"})}catch(__react_docgen_typescript_loader_error){}var console=__webpack_require__("../../../node_modules/.pnpm/[email protected]/node_modules/console-browserify/index.js");function BookmarkBtn_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 BookmarkBtn_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?BookmarkBtn_ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):BookmarkBtn_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const BookmarkBtn_c={saveText:{marginInlineStart:"gceMZP",fontSize:"jrcYoY",lineHeight:"oZPxp","@media all and (max-width:37.4375em)":{marginInlineStart:"eouzrK"},"@media all and (min-width:80em) and (max-width:101.9375em)":{fontSize:"kHlstv",lineHeight:"jcQgYi"},"@media all and (min-width:102em)":{marginInlineStart:"hvfnkC"}},title:{color:"hMCaoS"},subTitle:{maxWidth:"jRSMdG"},cappedPopover:{minWidth:"hyCdXP"}},SHOW_CAPPED="SHOW_CAPPED";function onChange(evt){try{localStorage.setItem(SHOW_CAPPED,evt.target.checked.toString())}catch(e){console.error(e)}}function BookmarkBtn(_ref){var _data$checkArticle3,_data$checkArticle4,_data$checkArticle5;let{clickAreaStyleExtend,iconStyleExtend,offsetInRem}=_ref;const[articleId]=src_articleId(),[popoverType,setPopoverType]=compiled_react.useState(),[isReadingListFull,setIsReadingListFull]=compiled_react.useState(!1),[user]=(0,src_user.Z)(),isPayingUser="paying"===user.type,{data,isLoading}=useCheckArticleQuery({input:{articleId:articleId||""}},{enabled:"undefined"!=typeof document}),[isSaved,setIsSaved]=compiled_react.useState(!1),[isPopoverOpen,setIsPopoverOpen]=compiled_react.useState(!1),refersToRef=compiled_react.useRef(null),updateReadingListMutation=useUpdateReadingListMutation();function onToggle(){if("ok"===popoverType){if(isSaved)return void setIsPopoverOpen(!1)}else setIsPopoverOpen((prev=>!prev))}function onClose(){setIsPopoverOpen(!1)}function updateReadingList(){updateReadingListMutation.mutate({input:{action:isSaved?"removeArticle":"addArticle",articleId}},{onSuccess:_ref2=>{let{updateReadingList:{status}}=_ref2;"ok"===status&&(setIsSaved((prev=>(setIsPopoverOpen(!prev),!prev))),setPopoverType("ok"))}})}function createAlert(alertType){updateReadingListMutation.mutate({input:{action:"createAlert",articleId,alertType}},{onSettled:()=>{onToggle()}})}compiled_react.useEffect((()=>{var _data$checkArticle,_data$checkArticle2;isLoading||(setIsSaved(!(null==data||null===(_data$checkArticle=data.checkArticle)||void 0===_data$checkArticle||!_data$checkArticle.exist)),setIsReadingListFull(!(null==data||null===(_data$checkArticle2=data.checkArticle)||void 0===_data$checkArticle2||!_data$checkArticle2.full)))}),[null==data||null===(_data$checkArticle3=data.checkArticle)||void 0===_data$checkArticle3?void 0:_data$checkArticle3.exist,null==data||null===(_data$checkArticle4=data.checkArticle)||void 0===_data$checkArticle4?void 0:_data$checkArticle4.full,isLoading]);const popoverByType={ok:(0,jsx_runtime.jsx)(ActionBtnContent,{title:"הכתבה נשמרה",subTitle:"האם תרצו לקבל תזכורת למייל?",onClose,btn1:{text:"מחר",onClick:()=>createAlert("day")},btn2:{text:"בשבוע הבא",onClick:()=>createAlert("week")}}),capped:(0,jsx_runtime.jsx)(ActionBtnContent,{title:`רשימת הקריאה מוגבלת ל-${null==data||null===(_data$checkArticle5=data.checkArticle)||void 0===_data$checkArticle5?void 0:_data$checkArticle5.total} כתבות.`,titleStyleExtend:[BookmarkBtn_c.title],subTitle:"עם שמירת כתבה חדשה תימחק הכתבה הישנה ביותר.",subTitleStyleExtend:[BookmarkBtn_c.subTitle],styleExtend:[BookmarkBtn_c.cappedPopover],onClose,btn1:{text:"הבנתי",onClick:updateReadingList,buttonComponent:{variant:"brand"}},btn2:{text:"בטל",onClick:onClose,buttonComponent:{priority:"tertiary"}},checkbox:"אל תציג לי הודעה זו שוב",checkboxOnChange:onChange})},payingUserPopover=popoverType&&(0,jsx_runtime.jsx)(s_popover_src.Z,{refersToRef,onToggle,isOpen:isPopoverOpen,defaultIsOpen:!1,placement:"bottom-end",offsetInRem,keepInView:!0,children:popoverByType[popoverType]});return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(src.ZP,{styleExtend:clickAreaStyleExtend,rippleSize:"small",ref:refersToRef,disabled:isLoading,"aria-disabled":!!isLoading||void 0,onClick:function onClick(){const shouldShowCapped=function getShowCappedStatus(){let showCapped=!0;try{showCapped="true"!==localStorage.getItem(SHOW_CAPPED)}catch(e){console.error(e)}return showCapped}();isReadingListFull&&shouldShowCapped?(setPopoverType("capped"),setIsPopoverOpen(!0)):updateReadingList()},"data-testid":"bookmark-btn",children:[(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"bookmark",variant:"neutral",styleExtend:iconStyleExtend}),(0,jsx_runtime.jsx)("span",{className:(0,style9.Z)(BookmarkBtn_c.saveText),children:isSaved?"הסירו":"שמרו"})]}),isPayingUser?payingUserPopover:null]})}try{BookmarkBtn.displayName="BookmarkBtn",BookmarkBtn.__docgenInfo={description:"",displayName:"BookmarkBtn",props:{offsetInRem:{defaultValue:null,description:"",name:"offsetInRem",required:!1,type:{name:"`${number}rem` | undefined"}},iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:null,description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/BookmarkBtn/BookmarkBtn.tsx#BookmarkBtn"]={docgenInfo:BookmarkBtn.__docgenInfo,name:"BookmarkBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/BookmarkBtn/BookmarkBtn.tsx#BookmarkBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_BookmarkBtn=function BookmarkBtnWithSuspense(props){return(0,jsx_runtime.jsx)(compiled_react.Suspense,{fallback:null,children:(0,jsx_runtime.jsx)(BookmarkBtn,BookmarkBtn_objectSpread({},props))})};const CommentsCountQueryDocument='\n query CommentsCountQuery($id: ID!) {\n CommentsElement(id: $id, sort: lastToFirst, cursor: "", count: 0) {\n __typename\n totalCount\n }\n}\n ',useCommentsCountQuery=(variables,options)=>(0,useQuery.a)(["CommentsCountQuery",variables],(0,GraphqlFetcher.Z)(CommentsCountQueryDocument,variables),options);useCommentsCountQuery.document=CommentsCountQueryDocument,useCommentsCountQuery.getKey=variables=>["CommentsCountQuery",variables];function TotalCount_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 TotalCount_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?TotalCount_ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):TotalCount_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}useCommentsCountQuery.fetcher=(variables,options)=>(0,GraphqlFetcher.Z)(CommentsCountQueryDocument,variables,options);const TotalCount_c={base:{fontSize:"gVscJz",lineHeight:"kvNqZl","@media all and (min-width:80em) and (max-width:101.9375em)":{fontSize:"gPowFU",lineHeight:"eaJJqD"}}};function TotalCount(_ref){var _data$CommentsElement,_data$CommentsElement2;let{commentsElementId}=_ref;const{data,isFetching,isLoading}=useCommentsCountQuery({id:commentsElementId||""},{enabled:"undefined"!=typeof window});return isLoading||isFetching?null:null!=data&&null!==(_data$CommentsElement=data.CommentsElement)&&void 0!==_data$CommentsElement&&_data$CommentsElement.totalCount?(0,jsx_runtime.jsx)("span",{className:(0,style9.Z)(TotalCount_c.base),children:null==data||null===(_data$CommentsElement2=data.CommentsElement)||void 0===_data$CommentsElement2?void 0:_data$CommentsElement2.totalCount}):null}function TotalCountWithSuspense(props){return(0,jsx_runtime.jsx)(compiled_react.Suspense,{fallback:null,children:(0,jsx_runtime.jsx)(TotalCount,TotalCount_objectSpread({},props))})}try{TotalCount.displayName="TotalCount",TotalCount.__docgenInfo={description:"",displayName:"TotalCount",props:{commentsElementId:{defaultValue:null,description:"",name:"commentsElementId",required:!0,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/CommentsBtn/TotalCount.tsx#TotalCount"]={docgenInfo:TotalCount.__docgenInfo,name:"TotalCount",path:"../../ds-molecules/s-action-bar/src/components/buttons/CommentsBtn/TotalCount.tsx#TotalCount"})}catch(__react_docgen_typescript_loader_error){}const CommentsBtn_c={clickArea:{display:"gSBWlu",columnGap:"cUcBkx"}};function CommentsBtn(_ref){let{clickAreaStyleExtend=[],iconStyleExtend,commentsElementId}=_ref;return(0,jsx_runtime.jsxs)(src.ZP,{as:"a",styleExtend:[CommentsBtn_c.clickArea,...clickAreaStyleExtend],rippleSize:"small",href:"#comments-section","data-testid":"comments-btn",children:[(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"comments",styleExtend:iconStyleExtend,variant:"neutral"}),(0,jsx_runtime.jsx)(TotalCountWithSuspense,{commentsElementId})]})}try{CommentsBtn.displayName="CommentsBtn",CommentsBtn.__docgenInfo={description:"",displayName:"CommentsBtn",props:{iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:{value:"[]"},description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},commentsElementId:{defaultValue:null,description:"",name:"commentsElementId",required:!0,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/CommentsBtn/CommentsBtn.tsx#CommentsBtn"]={docgenInfo:CommentsBtn.__docgenInfo,name:"CommentsBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/CommentsBtn/CommentsBtn.tsx#CommentsBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_CommentsBtn=CommentsBtn;var src_platform=__webpack_require__("../../utils/s-atoms/src/platform/index.ts");const GenerateGiftTokenPersonalMutationDocument="\n mutation GenerateGiftTokenPersonalMutation($input: GenerateGiftTokenInput!) {\n generateGiftToken(input: $input) {\n data {\n count\n limit\n status\n }\n error\n }\n}\n ",useGenerateGiftTokenPersonalMutation=options=>(0,useMutation.D)(["GenerateGiftTokenPersonalMutation"],(variables=>(0,GraphqlFetcher.Z)(GenerateGiftTokenPersonalMutationDocument,variables)()),options);useGenerateGiftTokenPersonalMutation.getKey=()=>["GenerateGiftTokenPersonalMutation"],useGenerateGiftTokenPersonalMutation.fetcher=(variables,options)=>(0,GraphqlFetcher.Z)(GenerateGiftTokenPersonalMutationDocument,variables,options);var GiftBtn_console=__webpack_require__("../../../node_modules/.pnpm/[email protected]/node_modules/console-browserify/index.js");function GiftBtn_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 GiftBtn_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?GiftBtn_ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):GiftBtn_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const GiftBtn_c={popover:{maxWidth:"gljRWT"},countText:{color:"hBVYrM",fontWeight:"iLdtFu"},exceededText:{paddingInlineEnd:"bWNKbL"},exceededPopover:{maxWidth:"iNxHM"}};function GiftBtn(_ref){let{clickAreaStyleExtend,iconStyleExtend,offsetInRem,canonicalUrl,title}=_ref;const[articleId]=src_articleId(),[platform]=(0,src_platform.Z)(),[user]=(0,src_user.Z)(),isPayingUser="paying"===user.type,refersToRef=compiled_react.useRef(null),[isPopoverOpen,setIsPopoverOpen]=compiled_react.useState(!1),[giftCount,setGiftCount]=compiled_react.useState(10),[popoverType,setPopoverType]=compiled_react.useState(isPayingUser?void 0:"nonPaying"),generateGiftTokenMutation=useGenerateGiftTokenPersonalMutation(),[hasBeenCopied,setHasBeenCopied]=compiled_react.useState(!1),[shouldMutate,setShouldMutate]=compiled_react.useState(!0),navigatorShareTitle=`🎁 קיבלת במתנה כתבה מהארץ!\n${title}`;function onToggle(isOpenFromPopover){setIsPopoverOpen(isOpenFromPopover)}const sharedProps={styleExtend:[GiftBtn_c.popover],onToggle,onClose:()=>setIsPopoverOpen(!1)},popoverByType={success:(0,jsx_runtime.jsx)(ActionBtnContent,GiftBtn_objectSpread({title:"כתבה במתנה",subTitle:"לשלוח את הכתבה ללא תשלום לחברים",btn1:{text:hasBeenCopied?"הלינק הועתק":"העתק לינק",icon:hasBeenCopied?"check":"like",iconVariant:hasBeenCopied?"success":"brand",onClick:()=>{var _navigator3;null===(_navigator3=navigator)||void 0===_navigator3||null===(_navigator3=_navigator3.clipboard)||void 0===_navigator3||_navigator3.writeText(canonicalUrl),setHasBeenCopied(!0)}},btn2:{text:"שתף בוואטסאפ",icon:"whattsup",onClick:()=>{const msg=encodeURIComponent(`${navigatorShareTitle}\n${canonicalUrl}`),whatsappUrl=`${"mobile"===platform?"whatsapp://":"https://web.whatsapp.com/"}send?text=${msg}`;"mobile"===platform?window.location.href=whatsappUrl:window.open(whatsappUrl,"popup","width=635,height=800,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no")}}},sharedProps)),exceeded:(0,jsx_runtime.jsx)(ActionBtnContent,GiftBtn_objectSpread(GiftBtn_objectSpread({},sharedProps),{},{styleExtend:[GiftBtn_c.exceededPopover],children:(0,jsx_runtime.jsxs)("div",{className:(0,style9.Z)(GiftBtn_c.exceededText),children:["שלחת ",(0,jsx_runtime.jsx)("span",{className:(0,style9.Z)(GiftBtn_c.countText),children:giftCount})," כתבות במתנה החודש. החל מחודש הבא ניתן יהיה לשלוח ",giftCount," כתבות נוספות"]})})),error:(0,jsx_runtime.jsx)(ActionBtnContent,GiftBtn_objectSpread(GiftBtn_objectSpread({},sharedProps),{},{children:"לא ניתן לשלוח כרגע מתנות. אנא נסו שוב מאוחר יותר"})),nonPaying:(0,jsx_runtime.jsx)(ActionBtnContent,GiftBtn_objectSpread({title:"כתבה במתנה",subTitle:"רכשו מינוי ותוכלו לשלוח כתבות במתנה לחברים ולמשפחה",btn1:{text:"לרכישה",buttonComponent:{variant:"sales",href:"https://promotion-stage.haaretz.co.il/offers?htm_source=site&htm_medium=button&htm_campaign=gift&htm_content=subscribe"}}},sharedProps))};return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src.ZP,{styleExtend:clickAreaStyleExtend,rippleSize:"small",onClick:async()=>{setShouldMutate(!isPopoverOpen),isPayingUser&&shouldMutate&&generateGiftTokenMutation.mutate({input:{articleId:articleId||""}},{onSuccess:async _ref2=>{let{generateGiftToken:{data}}=_ref2;"exceeded"===(null==data?void 0:data.status)?(setGiftCount(data.count),setPopoverType("exceeded")):"ok"===(null==data?void 0:data.status)?(async()=>{var _navigator,_navigator2;const shareData={title:navigatorShareTitle,url:canonicalUrl};if((null===(_navigator=navigator)||void 0===_navigator?void 0:_navigator.canShare)&&(null===(_navigator2=navigator)||void 0===_navigator2?void 0:_navigator2.canShare(shareData)))try{await navigator.share(shareData)}catch{setPopoverType("success")}else setPopoverType("success")})():setPopoverType("error")},onError:err=>{GiftBtn_console.error(err),setPopoverType("error")}})},ref:refersToRef,disabled:isPayingUser&&generateGiftTokenMutation.isLoading,"data-testid":"gift-btn",children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"gift",styleExtend:iconStyleExtend,variant:"neutral"})}),(0,jsx_runtime.jsx)(s_popover_src.Z,{refersToRef,onToggle,isOpen:isPopoverOpen,placement:"bottom-start",offsetInRem,children:popoverType&&popoverByType[popoverType]})]})}try{GiftBtn.displayName="GiftBtn",GiftBtn.__docgenInfo={description:"",displayName:"GiftBtn",props:{canonicalUrl:{defaultValue:null,description:"",name:"canonicalUrl",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string | null | undefined"}},offsetInRem:{defaultValue:null,description:"",name:"offsetInRem",required:!1,type:{name:"`${number}rem` | undefined"}},iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:null,description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/GiftBtn/GiftBtn.tsx#GiftBtn"]={docgenInfo:GiftBtn.__docgenInfo,name:"GiftBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/GiftBtn/GiftBtn.tsx#GiftBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_GiftBtn=GiftBtn;function PrintBtn(_ref){let{clickAreaStyleExtend,iconStyleExtend}=_ref;const[user]=(0,src_user.Z)(),isPayingUser="paying"===user.type;return(0,jsx_runtime.jsx)(src.ZP,{styleExtend:clickAreaStyleExtend,rippleSize:"small",onClick:isPayingUser?window.print:()=>{alert("Implement paywall modal for print button")},"data-testid":"print-btn",children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"printer",styleExtend:iconStyleExtend,variant:"neutral"})})}try{PrintBtn.displayName="PrintBtn",PrintBtn.__docgenInfo={description:"",displayName:"PrintBtn",props:{iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:null,description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/PrintBtn/PrintBtn.tsx#PrintBtn"]={docgenInfo:PrintBtn.__docgenInfo,name:"PrintBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/PrintBtn/PrintBtn.tsx#PrintBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_PrintBtn=PrintBtn;var ShareBtn_console=__webpack_require__("../../../node_modules/.pnpm/[email protected]/node_modules/console-browserify/index.js");function ShareBtn(_ref){let{clickAreaStyleExtend,iconStyleExtend,canonicalUrl}=_ref;const[platform]=(0,src_platform.Z)(),[isNativeShareSupported,setIsNativeShareSupported]=compiled_react.useState(!0),shareData=compiled_react.useMemo((()=>({url:canonicalUrl})),[canonicalUrl]),shareSupported="undefined"==typeof window||navigator.canShare&&navigator.canShare(shareData);if(shareSupported!==isNativeShareSupported&&setIsNativeShareSupported(shareSupported),"desktop"===platform||!isNativeShareSupported)return null;return(0,jsx_runtime.jsx)(src.ZP,{styleExtend:clickAreaStyleExtend,rippleSize:"small","data-testid":"share-btn",onClick:async()=>{try{await navigator.share(shareData)}catch(e){ShareBtn_console.error(e)}},children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"share",styleExtend:iconStyleExtend,variant:"neutral"})})}try{ShareBtn.displayName="ShareBtn",ShareBtn.__docgenInfo={description:"",displayName:"ShareBtn",props:{canonicalUrl:{defaultValue:null,description:"",name:"canonicalUrl",required:!0,type:{name:"string"}},iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:null,description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/ShareBtn/ShareBtn.tsx#ShareBtn"]={docgenInfo:ShareBtn.__docgenInfo,name:"ShareBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/ShareBtn/ShareBtn.tsx#ShareBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_ShareBtn=ShareBtn;function WhatsappBtn(_ref){let{clickAreaStyleExtend,iconStyleExtend,canonicalUrl}=_ref;const[platform]=(0,src_platform.Z)();return(0,jsx_runtime.jsx)(src.ZP,{styleExtend:clickAreaStyleExtend,rippleSize:"small","data-testid":"whatsapp-btn",onClick:()=>{const url=`${"mobile"===platform?"whatsapp://":"https://web.whatsapp.com/"}send?text=${canonicalUrl}${encodeURIComponent("?utm_source=Web_Share&utm_medium=Whatsapp&utm_campaign=Share")}`;return"mobile"===platform?window.location.href=url:window.open(url,"popup","width=635,height=800,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no"),!1},children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"whattsup",styleExtend:iconStyleExtend,variant:"neutral"})})}try{WhatsappBtn.displayName="WhatsappBtn",WhatsappBtn.__docgenInfo={description:"",displayName:"WhatsappBtn",props:{canonicalUrl:{defaultValue:null,description:"",name:"canonicalUrl",required:!0,type:{name:"string"}},iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:null,description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/WhatsappBtn/WhatsappBtn.tsx#WhatsappBtn"]={docgenInfo:WhatsappBtn.__docgenInfo,name:"WhatsappBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/WhatsappBtn/WhatsappBtn.tsx#WhatsappBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_WhatsappBtn=WhatsappBtn;var userAtom=__webpack_require__("../../utils/s-atoms/src/user/userAtom.ts");const baseZenModeAtom=(0,vanilla.cn)(!1),zenModeAtom=(0,vanilla.cn)((get=>get(baseZenModeAtom)||!1),((get,set,zenMode)=>{"paying"===get(userAtom.L).type&&set(baseZenModeAtom,zenMode)}));zenModeAtom.debugLabel="zenMode";const src_zenMode=function useZenMode(){return(0,react.KO)(zenModeAtom)},ZenBtn_c={base:{":hover":{"--icon-color-override":"kbIeiA"}}};function ZenBtn(_ref){let{clickAreaStyleExtend=[],iconStyleExtend}=_ref;const[zenMode,setZenMode]=src_zenMode(),[platform]=(0,src_platform.Z)(),[user]=(0,src_user.Z)();if("mobile"===platform)return null;const isPayingUser="paying"===user.type;return(0,jsx_runtime.jsxs)(src.ZP,{styleExtend:[...clickAreaStyleExtend,zenMode&&ZenBtn_c.base],rippleSize:"small",onClick:()=>isPayingUser?setZenMode(!zenMode):void alert("Implement paywall modal for zen button"),"data-testid":"zen-btn",children:[(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"zen",styleExtend:iconStyleExtend,variant:zenMode?"brand":"neutral"}),(0,jsx_runtime.jsx)("span",{children:"קריאת זן"})]})}try{ZenBtn.displayName="ZenBtn",ZenBtn.__docgenInfo={description:"",displayName:"ZenBtn",props:{iconStyleExtend:{defaultValue:null,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<Button styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"iconStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},clickAreaStyleExtend:{defaultValue:{value:"[]"},description:"",name:"clickAreaStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/buttons/ZenBtn/ZenBtn.tsx#ZenBtn"]={docgenInfo:ZenBtn.__docgenInfo,name:"ZenBtn",path:"../../ds-molecules/s-action-bar/src/components/buttons/ZenBtn/ZenBtn.tsx#ZenBtn"})}catch(__react_docgen_typescript_loader_error){}const buttons_ZenBtn=ZenBtn;function MagazineBar_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 MagazineBar_objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?MagazineBar_ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):MagazineBar_ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const MagazineBar_c={base:{display:"gSBWlu",justifyContent:"kJzccJ",paddingTop:"kpCrIt",paddingBottom:"fZMRmg",width:"cRUUAa","@media all and (min-width:37.5em) and (max-width:63.9375em)":{paddingTop:"igNknX",paddingBottom:"mFeBq"},"@media all and (min-width:64em) and (max-width:79.9375em)":{justifyContent:"fkVtED",rowGap:"iVWewc",columnGap:"knPQyJ",paddingTop:"iFPQbI",paddingBottom:"uAPXg"},"@media all and (min-width:80em) and (max-width:101.9375em)":{justifyContent:"hZLcFQ",rowGap:"cvYKtG",columnGap:"vTzWU",paddingTop:"cuHaWk",paddingBottom:"chxJeM"},"@media all and (min-width:102em)":{rowGap:"iwmFGP",columnGap:"kkHQNI",paddingTop:"deqCVf"}},icon:{color:"kOeBDb",fontSize:"hHyHSZ","@media all and (min-width:48em) and (max-width:63.9375em)":{fontSize:"dEmJxA"},"@media all and (min-width:64em) and (max-width:79.9375em)":{fontSize:"ftGOwJ"},"@media all and (min-width:80em)":{fontSize:"kltmtJ"}},clickArea:{"--icon-color-override":"emdvbj",display:"gSBWlu",alignItems:"foGVKH",justifyContent:"IVbXa",":hover":{"--icon-color-override":"gHrpil",color:"iCMDHA"}}},styleSharedProps={iconStyleExtend:[MagazineBar_c.icon],clickAreaStyleExtend:[MagazineBar_c.clickArea]};function MagazineBar(_ref){let{canonicalUrl,title,commentsElementId}=_ref;return(0,jsx_runtime.jsxs)("div",{className:(0,style9.Z)(MagazineBar_c.base),children:[(0,jsx_runtime.jsx)(buttons_CommentsBtn,MagazineBar_objectSpread(MagazineBar_objectSpread({},styleSharedProps),{},{commentsElementId})),(0,jsx_runtime.jsx)(buttons_GiftBtn,MagazineBar_objectSpread(MagazineBar_objectSpread({},styleSharedProps),{},{offsetInRem:"-0.3125rem",canonicalUrl,title})),(0,jsx_runtime.jsx)(buttons_WhatsappBtn,MagazineBar_objectSpread(MagazineBar_objectSpread({},styleSharedProps),{},{canonicalUrl})),(0,jsx_runtime.jsx)(buttons_ShareBtn,MagazineBar_objectSpread(MagazineBar_objectSpread({},styleSharedProps),{},{canonicalUrl})),(0,jsx_runtime.jsx)(buttons_PrintBtn,MagazineBar_objectSpread({},styleSharedProps)),(0,jsx_runtime.jsx)(buttons_ZenBtn,MagazineBar_objectSpread({},styleSharedProps)),(0,jsx_runtime.jsx)(buttons_BookmarkBtn,MagazineBar_objectSpread(MagazineBar_objectSpread({},styleSharedProps),{},{offsetInRem:"-0.3125rem"}))]})}try{MagazineBar.displayName="MagazineBar",MagazineBar.__docgenInfo={description:"",displayName:"MagazineBar",props:{commentsElementId:{defaultValue:null,description:"",name:"commentsElementId",required:!0,type:{name:"string | null | undefined"}},canonicalUrl:{defaultValue:null,description:"",name:"canonicalUrl",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-action-bar/src/components/action-bars/MagazineBar/MagazineBar.tsx#MagazineBar"]={docgenInfo:MagazineBar.__docgenInfo,name:"MagazineBar",path:"../../ds-molecules/s-action-bar/src/components/action-bars/MagazineBar/MagazineBar.tsx#MagazineBar"})}catch(__react_docgen_typescript_loader_error){}const action_bars_MagazineBar=MagazineBar}}]);