@goodhood-web/nebenan-base 4.16.0-development.5 → 4.16.0-development.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/index.mjs +124 -127
- package/package.json +1 -1
- package/style.css +1 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";var KE=Object.defineProperty;var ZE=(e,t,n)=>t in e?KE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t,n)=>ZE(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),b=require("react"),C=require("@goodhood-web/ui"),He=require("@goodhood-web/api/core"),Wp=require("@goodhood-web/services/chargebee"),Ee=require("@goodhood-web/services/snowplow"),Lf=require("lodash"),he=require("react-hook-form"),Vp=require("@zxcvbn-ts/core"),Av=require("@hookform/resolvers"),Kn=require("@goodhood-web/services/analytics"),Ie=require("@goodhood-web/api/core_v2"),ce=require("zod"),Yl=require("react-dom"),fo=require("uuid"),Rw=require("@tanstack/react-query"),JE=require("@goodhood-web/services/engagement");var Ts=typeof document<"u"?document.currentScript:null;function Nw(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const y=Nw(b),QE=Nw(Yl);function Dw(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Dw(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function $(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Dw(e))&&(i&&(i+=" "),i+=t);return i}const YE="_accordionBtnWrapper_nc5qt_146",XE="_heading_nc5qt_151",$E="_title_nc5qt_163",eT="_icon_nc5qt_180",tT="_iconExpanded_nc5qt_186",nT="_panel_nc5qt_194",Ms={accordionBtnWrapper:YE,heading:XE,title:$E,icon:eT,iconExpanded:tT,panel:nT},iT=({children:e,id:t,isOpen:n=!1,onClick:i,title:r})=>{const[a,s]=b.useState(n),o=()=>{s(l=>!l),i&&i()};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Ms.accordionBtnWrapper,children:h.jsxs("button",{id:`accordion-header-${t}`,className:$(Ms.heading),"aria-expanded":a,"aria-controls":`accordion-panel-${t}`,"data-expanded":a,onClick:o,children:[h.jsx(C.Typography,{type:"body-semibold",as:"h3",className:Ms.title,"data-expanded":a,children:r}),h.jsx(C.Icon,{name:"chevron_down",size:"24",className:$(Ms.icon,{[Ms.iconExpanded]:a})})]})}),h.jsx("div",{id:`accordion-panel-${t}`,className:$(Ms.panel),"data-expanded":a,"aria-labelledby":`accordion-header-${t}`,hidden:!a,children:e})]})},rT="_root_54kt0_146",aT="_button_54kt0_149",sT="_thumbnail_54kt0_152",oT="_card_54kt0_155",lT="_cardBody_54kt0_164",cT="_text_54kt0_172",uT="_text__withIcon_54kt0_178",dT="_rightIcon_54kt0_182",Fr={root:rT,button:aT,thumbnail:sT,card:oT,cardBody:lT,text:cT,text__withIcon:uT,rightIcon:dT},Gp=({description:e,headline:t,image:n,onClick:i,onDelete:r,url:a,withDeleteIcon:s=!1})=>{const o=a!=null&&a.startsWith("http")?a:`https://${a}`;return h.jsxs("div",{className:Fr.root,children:[h.jsx(C.Button,{className:Fr.button,onClick:i,href:o,target:"_blank",children:h.jsx(C.Card,{borderRadius:!0,withoutPadding:!0,className:Fr.card,children:h.jsxs(C.CardBody,{className:Fr.cardBody,children:[n&&h.jsx(C.Thumbnail,{className:Fr.thumbnail,shape:"square",size:"64",alt:n.alt,src:n.src}),h.jsxs("div",{className:$(Fr.text,{[Fr.text__withIcon]:s}),children:[h.jsx(C.Typography,{type:"body-semibold",children:t}),h.jsx(C.Typography,{type:"detail-regular",children:a}),h.jsx(C.Typography,{type:"detail-regular",children:e})]})]})})}),s&&r&&h.jsx("div",{className:Fr.rightIcon,children:h.jsx(C.IconButton,{icon:"cross_circle",size:"medium",ariaLabel:"delete attachment",onClick:r})})]})};var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fT(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}function hT(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Up=hT,mT=typeof ve=="object"&&ve&&ve.Object===Object&&ve,pT=mT,gT=pT,vT=typeof self=="object"&&self&&self.Object===Object&&self,bT=gT||vT||Function("return this")(),Bw=bT,wT=Bw,yT=function(){return wT.Date.now()},kT=yT,xT=/\s/;function ST(e){for(var t=e.length;t--&&xT.test(e.charAt(t)););return t}var CT=ST,ET=CT,TT=/^\s+/;function MT(e){return e&&e.slice(0,ET(e)+1).replace(TT,"")}var AT=MT,PT=Bw,zT=PT.Symbol,Ow=zT,Pv=Ow,Hw=Object.prototype,FT=Hw.hasOwnProperty,jT=Hw.toString,el=Pv?Pv.toStringTag:void 0;function LT(e){var t=FT.call(e,el),n=e[el];try{e[el]=void 0;var i=!0}catch{}var r=jT.call(e);return i&&(t?e[el]=n:delete e[el]),r}var IT=LT,RT=Object.prototype,NT=RT.toString;function DT(e){return NT.call(e)}var BT=DT,zv=Ow,OT=IT,HT=BT,_T="[object Null]",WT="[object Undefined]",Fv=zv?zv.toStringTag:void 0;function VT(e){return e==null?e===void 0?WT:_T:Fv&&Fv in Object(e)?OT(e):HT(e)}var GT=VT;function UT(e){return e!=null&&typeof e=="object"}var qT=UT,KT=GT,ZT=qT,JT="[object Symbol]";function QT(e){return typeof e=="symbol"||ZT(e)&&KT(e)==JT}var YT=QT,XT=AT,jv=Up,$T=YT,Lv=NaN,eM=/^[-+]0x[0-9a-f]+$/i,tM=/^0b[01]+$/i,nM=/^0o[0-7]+$/i,iM=parseInt;function rM(e){if(typeof e=="number")return e;if($T(e))return Lv;if(jv(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jv(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=XT(e);var n=tM.test(e);return n||nM.test(e)?iM(e.slice(2),n?2:8):eM.test(e)?Lv:+e}var aM=rM,sM=Up,D1=kT,Iv=aM,oM="Expected a function",lM=Math.max,cM=Math.min;function uM(e,t,n){var i,r,a,s,o,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(oM);t=Iv(t)||0,sM(n)&&(u=!!n.leading,f="maxWait"in n,a=f?lM(Iv(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d);function m(M){var z=i,P=r;return i=r=void 0,c=M,s=e.apply(P,z),s}function p(M){return c=M,o=setTimeout(w,t),u?m(M):s}function v(M){var z=M-l,P=M-c,F=t-z;return f?cM(F,a-P):F}function g(M){var z=M-l,P=M-c;return l===void 0||z>=t||z<0||f&&P>=a}function w(){var M=D1();if(g(M))return k(M);o=setTimeout(w,v(M))}function k(M){return o=void 0,d&&i?m(M):(i=r=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,i=l=r=o=void 0}function T(){return o===void 0?s:k(D1())}function E(){var M=D1(),z=g(M);if(i=arguments,r=this,l=M,z){if(o===void 0)return p(l);if(f)return clearTimeout(o),o=setTimeout(w,t),m(l)}return o===void 0&&(o=setTimeout(w,t)),s}return E.cancel=x,E.flush=T,E}var _w=uM;const Ww=Fn(_w);var dM=_w,fM=Up,hM="Expected a function";function mM(e,t,n){var i=!0,r=!0;if(typeof e!="function")throw new TypeError(hM);return fM(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),dM(e,t,{leading:i,maxWait:t,trailing:r})}var pM=mM;const gM=Fn(pM),Fo=799,vM=690,Jt=(e=Fo)=>{if(typeof window>"u"||typeof document>"u")return!1;const t=document.documentElement.clientWidth<=e;return("ontouchstart"in window||navigator.maxTouchPoints>0)&&t},$e=(e=vM)=>{const[t,n]=b.useState(void 0),i=b.useCallback(gM(()=>{typeof window<"u"&&n(window.matchMedia(`(min-width: ${e}px)`).matches)},300),[e]);return b.useEffect(()=>{if(typeof window<"u")return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[e,i]),t},Vw=e=>{if(!e)return 0;const t=e.split("/").pop(),n=Number(t);return isNaN(n)?0:n},bM=(e,t="de-DE")=>new Intl.NumberFormat(t,{currency:"EUR",style:"currency"}).format(e/100),qp=e=>Math.round(e)/100,Il=e=>typeof e=="string"?e:e.src,Gw=(e,t,n)=>[{category:"feature_payments",currency:"EUR",id:t,name:n,price:qp(e)}],wM=(e,t,n=0)=>({currency:"EUR",products:Gw(n,e,t),total_value:qp(n)}),yM=(e,t,n)=>({currency:"EUR",payment_method:"chargebee",products:Gw(e,t,n),revenue:qp(e),total_quantity:1,transaction_id:kM()}),jr=()=>Math.floor(Math.random()*65536).toString(16).padStart(4,"0"),kM=()=>`${jr()}${jr()}-${jr()}-${jr()}-${jr()}-${jr()}${jr()}${jr()}`,Re=(e,t="de-DE")=>e[t],En=(e,t,n="*****")=>{if(typeof t=="string"){const i=new RegExp(`\\{${t}\\}`,"g");return e.replace(i,n)}else return Object.entries(t).reduce((i,[r,a])=>{const s=new RegExp(`\\{${r}\\}`,"g");return i.replace(s,a)},e)},xM=(e,t,n="keypress")=>{b.useEffect(()=>{const i=Array.isArray(e)?e:[e],r=a=>{i.includes(a.key)&&(a.preventDefault(),t(a))};return window.addEventListener(n,r),()=>{window.removeEventListener(n,r)}},[e,t,n])};function Td(e){if(!e)return null;const t=e.match(/^gid:\/\/([^/]+)\/([^/]+)\/(.+)$/);if(!t)return null;const[,n,i,r]=t,a=/^\d+$/.test(r)?parseInt(r,10):void 0;return{id:r,model:i,namespace:n,numericId:a}}function SM(e){const t=Td(e);return(t==null?void 0:t.numericId)??null}function CM(e,t="de-DE",n="EUR"){if(e==null)return"Zu verschenken";const i=e/100;return new Intl.NumberFormat(t,{currency:n,maximumFractionDigits:2,minimumFractionDigits:0,style:"currency"}).format(i)}function EM(e,t="Zu verschenken"){return!e||e===0?t:CM(e)}function TM(){}var MM=TM;const Al=Fn(MM),Uw=b.createContext({navigate:()=>Al}),xt=()=>{const{navigate:e}=b.useContext(Uw);return b.useCallback((t,n)=>{e(t,n)},[e])},qw="data:image/webp;base64,UklGRiILAABXRUJQVlA4WAoAAAAQAAAAZQQA4gEAQUxQSFIAAAABFyAQSFKffI2ICAdFbSM5r4VYjj+ifo7o/wSMnJbBf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf/zHf4cCVlA4IKoKAAAQtACdASpmBOMBPjEYi0SiIaEQGgQgIAMEtLd9Ww/7sHIiX7i/Y/WB1A/p7G973x3mygPlx+zfa5wAH6Jf1/dHfql+1XvW/4D1AegB+o3Wd+gB5ZP7AfCJ+0H7neylq29l1F2/HLHiNmogKxRKvNNZ06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp0cdZ/7gnBN/0BmrG5vNNZ06dOnTp06dOnTp06dOnTp06dOnTp06dOjov2UI1msCr5K31tgeJDUntPzFiF8Tl+d3xasYsQvicvzu+LVjFiF8Tl+d3xasYsQvicvzu+LVjE/uBDQEzzNfTp06dOnTp06dOnTp06dOnTo65zxHVLJHScFMZZlx+ISciqw3+DJORT6IGsAjVzT3GolXmms6dOnTp06dOnTp06OuZ1lumUVMPI9cve4JwTgnBOCcE4JwTgnBOCcE4JwTgnBOCcE4JwTgBzns+RiLubzTWdOnTp06dOnTp06dOm+nb2JrkNksJqMA+7mVosgwW946q7L3HmPMeY8x5jzHmPMeY8x5jzHmPMeY8x5jzHlyxPP04BC01nTp06dOnTp06dOnTp06b5zHXV2H7b23tdQObN/LOZzACJMOa8h0Veaazp06dOnTp06dOnTp06dOnTp06dN/Ohg6KONQSRaax3AcxVbFmCIKYhL1A40C1UV1/mms6dOnTp06dOnTp06dOnTp06dOnTp03jOGwC00HE0uqgJsUgHMZHYmY0SF5VPqEcnXxKRIPNDGoERXPTtrjSNgLv1FV9PcaiVeaazp06dOnTp06dOoHe/iYMqn60IhaC9DjeFW8o9Q/1Ba4LH9GRFjaua1qRWG/wZJyCASV+lOnTp06dOnTp06dOnTp06dOnTp2DuaNSY2t2GNDUBRbsCEgEdFnMyYu6OSWZcfiEnIqrnmtu5X09xqJV5prOnTp06dOnTp06VkUS0MBym4Vn0ILcSeeksy4/EJORVYb/BknIqrxWZxDwdfTp06dOnTp06dOnTp06dOnS89KD4AS26Lj/yfGlgZp7jUSrzTWdOnTp06dOnTp06dOnTp06dOnTp06PHoc//Muh5zT3GolXmms6dOnTp06dOnTp06dOnTp06dOnTSeHXoeQmRkx+chbecQk5FVhv8GSciqw3+Bha29tNZ06dOnTp06dOnTp06dOnTp06gd6X7wxTyj+4EJORVYb/BknIqsN/gcSV3FEq801nTp06dOnTp06dOnTp06gd8HWHUkfWLtOvxCTkVWG/wZJyKrDfwKNcR5p7jUSrzTWdOnTp06dOnTp05nJQ7G0468bdNtVbdbehDlnprtvQhyz0123oQurlJmzGolXmms6dOnTp06dOnTp06dNKsJ3r5FwK9ELfN8OgcJzKx4GD/8wcoTbB/+YOUJtg4Rdzeaazp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTp06dOnTfAAA/v/4ZWAAAAAAAAAAAAAAAAAABlsE/F49wncaRYOn0HIgONBEmiPAXMgKn1C/87TSNBkyYGVUJ/yRkS5e2Xcdy1lkhthuLU80JBP/6l8jTOYAEGYo++U/hVRdJxBra4SauXzeuWF0y0Z4Cg4u9+ZsVhF5HXOD08ZpLGUrxkgBiWY7+Bn5+TZVPnXznCJ8vMBXWbEnPHaF616ASRcKyW/+UK4YEf9UKzbAABVJfBdw8tne8t/1ZCx9yXwAE90dLQJzl+eGWPQFDhTavaFAWldIckw9+mRe1kW3AGyIDTKAiGAQWyyxk2vGTa8ZNrxk2vGTa8ZNrvEaflSPaXCqELJYABzrIkrb7171OTIxUyIvv/ZDKR5JyRrt5BYaemMLzBpvcM3cuVJxOgfVW2heNdlIS4hghghghghghgl0+bKvMLdhOyBy+o+h00r7s4KvP976mD211MUCB0cWsn12LF2yOAj/WjhnHWIPwWtFMrAp72STaQ/0JdrzbSt2+EqnI0Q4Vur2oTIEQ2I7iNFW3v5fiCFPy/CFcgF88msvGjPvGRy8hWRFxkrW86brioUBPHLlKFAKCixcZrVjQXWQNoveB/zG3MfaAP6ED2SJrH+ntufHCyhRR280XM9yO0s/nslYx/r6Hwevx7K4Q/+wXHm2nI5Acn0wIuyzwfyGBblDgDqqXFHr2Kb15+3lVZdp/zV2B4KFHEE+1oFsPZX3/1Pf8qvCLFwxyjaonXXMBe/LE/BAPToABOfVPZ0pTdt5oFkPtu45nH+8Xr3HKGkByfTAi7LPTCBciYfzft5NE+3TY0Wpr+2wgwDzEsaTq4RsJ0sdNl4oX1IFuf+VpVqhL3yVYnoTKBn6AkCjs/fkedLd8YA65t7YYQ7LHoZ/XNvbDCHZY9DOwvExxBfgB8PTqPlUt4R10TUrCQLgM7lP/1c/XJMG3jXwP4X93vkn+WGu8LVg0VSInlLL6zkOqKGRpJvqbQ+AB3jxIcVvTcv/kt624Q5Wrp5pKu0fJuYQHGoNPhqAg4KJjlTJwUF2IFuQxGcC1jBXxHg1nmicLh1CVDrGHd8Paa9o06Z/RLh+Z0XkvicACfEa4U+wJvoesv72R4ACpYf88GFBmscu+fS+92sPxyyLXC4TT2fa6DixkDtAnophRJP5WfhkOGQjPefYWGuxDzsWS60tXNFh2xVTkKAVjdnyeduJpmgSC3+7SB6LRq9/APkTBOToSZGZU6xPvTwfNGBjQFO+5h3VGi/1JAoiRQUT3nmRJqwJDB59wFPMWGR8sduSLfRe7sOYnl04SRJSZkWuFwuFwuE41+SYR2AA0pYoXHQOv9ZN2McOYWqiQfyVdQtI5uIO3KrCtf//9oRxwCNNXS8naa4xIqGdC9CAi17QG8KAKjt/bCbdv0IP8TfeJbMqpVKpVKozicu98T1SQFq5ZWccOWK/ZBQAVunBZ+pqGC4JVCHAAADiynlxcHm6NICnIWPFPnAAAKBzKxg7uUAAEOnK40iupvAmzLnSbumpw2nT9I2h9sHrLCQ/vWKAWH8f4M2VRass878KdogIIhHVJGHdwdX75qXiJ+010g2Bti47za9OgaHjUBZnF2myfnyESY9k1i4RJiESqdGuiOcC9Kp0a6I5wL0qnRrojnAvSkbr1gZtd3PEelY4ALPNkO/ygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",AM="_sheet__header_114fy_146",PM="_sheet__content_114fy_153",zM="_sheet__content__sticker_114fy_166",FM="_sheet__content__headline_114fy_169",jM="_sheet__content__label_114fy_178",LM="_sheet__content__button_114fy_181",IM="_sheet__image_114fy_188",Tn={sheet__header:AM,sheet__content:PM,sheet__content__sticker:zM,sheet__content__headline:FM,"sheet__content__headline--error":"_sheet__content__headline--error_114fy_172",sheet__content__label:jM,sheet__content__button:LM,sheet__image:IM},RM={"de-DE":{loading:{title:"Dein Beitrag wird gleich hervorgehoben."},success:{label:"Die Zahlung war erfolgreich.",title:"Dein Angebot wird jetzt hervorgehoben.",cta:"Zum Marktplatz"},error:{text:`**Dein Angebot ist online, aber ohne Hervorhebung.**
|
|
2
|
-
Schließe jetzt deine Zahlung ab.`,title:"Zahlung unterbrochen",cta:"Zahlung abschließen"}}},Va=Re(RM),NM=()=>h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Tn.sheet__image,children:h.jsx(C.Image,{src:Il(qw),alt:"highlight illustration"})}),h.jsx("div",{className:Tn.sheet__content,children:h.jsx(C.Typography,{type:"h3",className:Tn.sheet__content__label,children:Va.loading.title})})]}),DM=()=>{const e=xt(),t=()=>e("/feed/marketplace");return h.jsxs("div",{className:Tn.sheet__content,children:[h.jsx("div",{className:Tn.sheet__content__sticker,children:h.jsx(C.Sticker,{icon:"checkmark",size:"large",color:"green"})}),h.jsx(C.Typography,{type:"body-large",className:Tn.sheet__content__label,children:Va.success.label}),h.jsx(C.Typography,{type:"h3",className:Tn.sheet__content__headline,children:Va.success.title}),h.jsx("div",{className:Tn.sheet__content__button,children:h.jsx(C.ButtonPrimary,{text:Va.success.cta,onClick:t,size:"medium"})})]})},BM=({onClick:e})=>h.jsxs("div",{className:Tn.sheet__content,children:[h.jsx("div",{className:Tn.sheet__content__sticker,children:h.jsx(C.Sticker,{icon:"error",size:"large",color:"orange"})}),h.jsxs("div",{className:Tn["sheet__content__headline--error"],children:[h.jsx(C.Typography,{type:"h3",children:Va.error.title}),h.jsx(C.Typography,{type:"body-regular",markdown:!0,children:Va.error.text})]}),h.jsx("div",{className:Tn.sheet__content__button,children:h.jsx(C.ButtonSecondary,{text:Va.error.cta,onClick:e,size:"medium",color:"lavender"})})]}),Kw=({isLoading:e,onCheckout:t,onDismiss:n,open:i,paymentInterrupted:r})=>{const a=$e(800);return h.jsx(C.Sheet,{open:i,onDismiss:n,header:h.jsx("div",{className:Tn.sheet__header,children:!e&&h.jsx(C.IconButton,{icon:"cross",size:"medium",onClick:n})}),content:r?h.jsx(BM,{onClick:t}):e?h.jsx(NM,{}):h.jsx(DM,{}),footer:h.jsx(h.Fragment,{}),bottomSheet:!a,breakpoint:"800"})},OM=async(e,t)=>(await He.API.getApi().POST("/api/core/v3/posts/{post_id}/payment_intent",{body:{payment_intent:{product_id:t}},params:{path:{post_id:Number(e)}}})).data,HM=async e=>{const t=await He.API.getApi().GET("/api/core/v3/payment_intents/{payment_intent_id}/chargebee_confirmation/new",{params:{path:{payment_intent_id:e}}});if(!(t!=null&&t.data))throw new Error("No data returned from chargebee confirmation endpoint");return{expires_at:t.data.expires_at,id:t.data.hosted_page_id,url:t.data.checkout_url}},Zw=e=>{const[t,n]=b.useState(!1),[i,r]=b.useState(!1),[a,s]=b.useState(""),[o,l]=b.useState(null),[c,u]=b.useState(null),[f,d]=b.useState(null),m=Wp.useOpenCheckout(),p=Ee.useSnowplowTrack(),v=
|
|
2
|
+
Schließe jetzt deine Zahlung ab.`,title:"Zahlung unterbrochen",cta:"Zahlung abschließen"}}},Va=Re(RM),NM=()=>h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Tn.sheet__image,children:h.jsx(C.Image,{src:Il(qw),alt:"highlight illustration"})}),h.jsx("div",{className:Tn.sheet__content,children:h.jsx(C.Typography,{type:"h3",className:Tn.sheet__content__label,children:Va.loading.title})})]}),DM=()=>{const e=xt(),t=()=>e("/feed/marketplace");return h.jsxs("div",{className:Tn.sheet__content,children:[h.jsx("div",{className:Tn.sheet__content__sticker,children:h.jsx(C.Sticker,{icon:"checkmark",size:"large",color:"green"})}),h.jsx(C.Typography,{type:"body-large",className:Tn.sheet__content__label,children:Va.success.label}),h.jsx(C.Typography,{type:"h3",className:Tn.sheet__content__headline,children:Va.success.title}),h.jsx("div",{className:Tn.sheet__content__button,children:h.jsx(C.ButtonPrimary,{text:Va.success.cta,onClick:t,size:"medium"})})]})},BM=({onClick:e})=>h.jsxs("div",{className:Tn.sheet__content,children:[h.jsx("div",{className:Tn.sheet__content__sticker,children:h.jsx(C.Sticker,{icon:"error",size:"large",color:"orange"})}),h.jsxs("div",{className:Tn["sheet__content__headline--error"],children:[h.jsx(C.Typography,{type:"h3",children:Va.error.title}),h.jsx(C.Typography,{type:"body-regular",markdown:!0,children:Va.error.text})]}),h.jsx("div",{className:Tn.sheet__content__button,children:h.jsx(C.ButtonSecondary,{text:Va.error.cta,onClick:e,size:"medium",color:"lavender"})})]}),Kw=({isLoading:e,onCheckout:t,onDismiss:n,open:i,paymentInterrupted:r})=>{const a=$e(800);return h.jsx(C.Sheet,{open:i,onDismiss:n,header:h.jsx("div",{className:Tn.sheet__header,children:!e&&h.jsx(C.IconButton,{icon:"cross",size:"medium",onClick:n})}),content:r?h.jsx(BM,{onClick:t}):e?h.jsx(NM,{}):h.jsx(DM,{}),footer:h.jsx(h.Fragment,{}),bottomSheet:!a,breakpoint:"800"})},OM=async(e,t)=>(await He.API.getApi().POST("/api/core/v3/posts/{post_id}/payment_intent",{body:{payment_intent:{product_id:t}},params:{path:{post_id:Number(e)}}})).data,HM=async e=>{const t=await He.API.getApi().GET("/api/core/v3/payment_intents/{payment_intent_id}/chargebee_confirmation/new",{params:{path:{payment_intent_id:e}}});if(!(t!=null&&t.data))throw new Error("No data returned from chargebee confirmation endpoint");return{expires_at:t.data.expires_at,id:t.data.hosted_page_id,url:t.data.checkout_url}},Zw=e=>{const[t,n]=b.useState(!1),[i,r]=b.useState(!1),[a,s]=b.useState(""),[o,l]=b.useState(null),[c,u]=b.useState(null),[f,d]=b.useState(null),m=Wp.useOpenCheckout(),p=Ee.useSnowplowTrack(),v=(E,M)=>{p("add_to_cart",{entities:[new Ee.HoodMessage({id:E||0})],main:[M]})},g=b.useCallback(async(E,M,z)=>{const P=M!==(f==null?void 0:f.productId);if(z&&l(z),d({postId:E,productId:M}),!m){console.error("Chargebee checkout instance not available");return}let F=a,I;if(!a||P){if(!E||!M){console.error("Post ID or Product ID not provided");return}n(!0);try{if(I=await OM(E,M),!I)return console.error("No payment intent ID returned from API");F=I.id,s(F)}catch{r(!0)}finally{n(!1)}}m({getHostedPage:async()=>HM(F),layout:"in_app",onClose:w,onError:w,onStep:A=>{if(A==="cart_screen"){if(I){const{hood_message_id:j=0,product:{id:L,name:O,price_cents:N}}=I,D=wM(L,O,N);v(j,D),u({hood_message_id:j,payload:D});return}c&&v(c.hood_message_id||0,c.payload)}}})},[m,a,c]),w=()=>{setTimeout(()=>{r(!0)},0)},k=()=>{r(!1),f&&g(f.postId,f.productId)},x=()=>{r(!1),o&&(e==null||e(o))};return{PremiumFeatureCheckoutModal:h.jsx(Kw,{isLoading:t,open:t||i,onDismiss:x,onCheckout:k,paymentInterrupted:i}),startCheckout:g}},_M=async e=>(await He.API.getApi().GET("/api/core/v3/posts/{post_id}/payment_intent",{params:{path:{post_id:Number(e)}}})).data,WM=async(e,t)=>{const n=await He.API.getApi().POST("/api/core/v3/payment_intents/{payment_intent_id}/chargebee_confirmation",{body:{chargebee:{hosted_page_id:e}},params:{path:{payment_intent_id:t}}});return n==null?void 0:n.data},VM=(e,t)=>{const[n,i]=b.useState(!1),[r,a]=b.useState(!1),s=b.useRef(!1),o=Ee.useSnowplowTrack();return b.useEffect(()=>{if(s.current)return;const c=new URLSearchParams(window.location.search).get("id");if(!c)return;let u=e;if(!u){const d=window.location.pathname.match(/\/feed\/(\d+)/);u=d==null?void 0:d[1]}if(!u)return;s.current=!0,a(!0),(async()=>{const d=await _M(u);if(!d){const v=new Error("No payment intent found");t==null||t.captureException(v,{hostedPageId:c,postId:u}),a(!1);return}if(!await WM(c,d.id)){const v=new Error("Payment confirmation returned empty response");t==null||t.captureException(v,{hostedPageId:c,paymentIntentId:d.id,postId:u}),a(!1);return}const p=yM(d.product.price_cents,d.product.id,d.product.name);o("purchase",{entities:[new Ee.HoodMessage({id:d.hood_message_id||0})],main:[p]}),a(!1),i(!0)})().catch(d=>{t==null||t.captureException(d,{hostedPageId:c,postId:u}),a(!1)})},[e,t,o]),{isSuccess:n,loading:r}},GM=({isSuccess:e,loading:t})=>{const[n,i]=b.useState(!1),[r,a]=b.useState(e),s=b.useCallback(()=>{const o=new URL(window.location.href);o.searchParams.delete("id"),o.searchParams.delete("state"),window.history.replaceState({},"",o.toString()),i(!1),a(!1)},[]);return r&&!n&&i(!0),h.jsx(Kw,{isLoading:t,open:n,onDismiss:s,onCheckout:Lf.noop,paymentInterrupted:!1})},UM="_root_n6fil_146",qM="_root__search_n6fil_149",Rv={root:UM,root__search:qM};/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
5
5
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -910,7 +910,7 @@ Body: ${e.body}
|
|
|
910
910
|
|
|
911
911
|
Reactions: ${e.counters?Object.values(e.counters).reduce((n,i)=>n+i,0):0}
|
|
912
912
|
`})},rge="_root_g4rwp_146",l0={root:rge},nC=({ads:e,bookmarks:t,feedItems:n,feedType:i,onCreateContent:r,viewMode:a=Ap.grid})=>{if(!(n!=null&&n.length))return null;const s=a===Ap.grid?Kle(n,e):Qle(n,e);return s?h.jsx("section",{className:l0.root,children:s.map((o,l)=>{switch(o.type){case"grid-feed-ad":return h.jsx("div",{className:l0.listItem,children:o.content},`grid-feed-item-${l}`);case"grid-feed-aggregator":return h.jsx(nge,{bookmarks:t,feedType:i,items:o.items,onCreateContent:r||o.onCreateContent},`grid-feed-item-${l}`);case"grid-feed-message":return h.jsx("div",{className:l0.listItem,children:h.jsx(ige,{hoodMessage:o.hoodMessage})},`grid-feed-item-${l}`)}})}):null},age=e=>`cross-sell_aggregator_${e??"free"}`,sge="_root_1b0j6_146",oge="_root__body_1b0j6_154",lge="_root__body__header_1b0j6_157",cge="_root__body__header__controls_1b0j6_167",uge="_navigation_1b0j6_177",Br={root:sge,root__body:oge,root__body__header:lge,root__body__header__controls:cge,navigation:uge,"swiper-slide":"_swiper-slide_1b0j6_186"};function iC({category:e,categoryLink:t,categorySlug:n,className:i,items:r,linkLabel:a}){const s=b.useRef(null),o=b.useRef(null),l=b.useRef(null),c=b.useRef(null),u=Kn.useOnScreen(c,!0),f=Kn.useTrack(),d=xt(),m=age(n);b.useEffect(()=>{u&&f("view",{element_name:m})},[u]);const p=()=>{d(t),f("click",{click_name:`${m}_all`,element_name:`${m}`})};function v(){return h.jsx(C.CardHeader,{headline:e??"Neue Angebote",type:"h4",className:Br.root__body__header,rightElement:h.jsxs("div",{className:Br.root__body__header__controls,children:[h.jsx(C.TextButton,{color:"blue",text:a,size:"medium",onClick:p}),h.jsxs("div",{className:Br.navigation,children:[h.jsx("div",{ref:o,children:h.jsx(C.IconButton,{icon:"chevron_left",size:"medium",className:Br.arrow,ariaLabel:"Previous"})}),h.jsx("div",{ref:l,children:h.jsx(C.IconButton,{icon:"chevron_right",size:"medium",className:Br.arrow,ariaLabel:"Next"})})]})]})})}function g(){const w=()=>{f("click",{click_name:`${m}_item`,element_name:m})};return h.jsx(Jc,{ref:s,init:!1,modules:[p1,g1],slidesPerView:"auto",spaceBetween:8,slidesOffsetBefore:12,slidesOffsetAfter:12,onBeforeInit:k=>{k.params.navigation.nextEl=l.current,k.params.navigation.prevEl=o.current},navigation:{nextEl:l.current,prevEl:o.current},children:r.map((k,x)=>h.jsx(Qc,{tabIndex:0,className:Br["swiper-slide"],children:h.jsx(rv,{id:k.id,title:k.title,image:k.image,reserved:k.reserved,price:k.price,timeStamp:k.timeStamp,onClick:w,reservedText:"Reserviert",premiumFeature:k.premiumFeature})},x))})}return h.jsx("div",{ref:c,"data-testid":"marketplace-aggregator-card",children:h.jsxs(C.Card,{className:$(Br.root,i),responsive:!0,children:[v(),h.jsx(C.CardBody,{className:Br.root__body,children:g()})]})})}const dge=({handleReport:e,id:t,isAuthenticated:n,open:i})=>{const[r,a]=b.useState(!1),[s,o]=b.useState(null),[l,c]=b.useState(null),[u,f]=b.useState(void 0);return b.useEffect(()=>{i&&(a(!0),o(null),Promise.allSettled([Ie.getComplaintReasons(),...n?[He.API.getApi().GET("/api/core/v3/profile",{})]:[]]).then(d=>{const[m,p]=d;if(m.status==="rejected"||!m.value){o("Failed to load complaint reasons");return}c(m.value.complaint_reasons),n&&p&&(p.status==="fulfilled"&&p.value.data?f({email:p.value.data.email,firstname:p.value.data.firstname,id:p.value.data.id,lastname:p.value.data.lastname}):p.status==="rejected"&&console.warn("Failed to fetch user profile, continuing without pre-filled data:",p.reason))}).catch(d=>{o("An unexpected error occurred"),console.error("Error in complaint modal setup:",d)}).finally(()=>{a(!1)}))},[i,n]),i?r?h.jsx("div",{className:"complaint-modal-loading",children:"Loading..."}):s||!l?h.jsx("div",{className:"complaint-modal-error",children:s||"Unable to load complaint form"}):h.jsx(m7,{subjectId:t,handleModalClick:e,open:i,complaintReasons:l,reporter:u}):null},fge="_body_1o0zo_146",hge={body:fge},mge=({handleClose:e,id:t,open:n})=>{const i=xt(),r=()=>{Ie.muteFeedItem({id:t}).then(()=>{i("/feed")}).catch(a=>{console.log(a)})};return h.jsx(C.Modal,{headerTitle:"Möchtest du diesen Inhalt ausblenden?",onClose:e,open:n,modalBody:h.jsx("div",{className:hge.body,children:h.jsx(C.Typography,{type:"body-regular",children:"Du kannst die ausgeblendeten Inhalte in deinen Einstellungen jederzeit wieder einblenden."})}),modalFooter:h.jsxs(h.Fragment,{children:[h.jsx(C.TextButton,{onClick:e,color:"blue",size:"large",text:"Abbrechen"}),h.jsx(C.ButtonPrimary,{onClick:r,text:"Bestätigen"})]})})},pge="_modalBody_mjsqw_146",gge="_sheetBody_mjsqw_151",w4={modalBody:pge,sheetBody:gge},S1=({cancelText:e,content:t,footer:n,handleClose:i,open:r,title:a})=>{const s=()=>h.jsx(C.CardHeader,{headline:a,as:"h2",rightElement:h.jsx(C.IconButton,{ariaLabel:"close-sheet",onClick:i,icon:"cross",size:"medium"})});return Jt()?h.jsx(C.BottomSheet,{open:r,onClose:i,sheetBody:h.jsx("div",{className:w4.sheetBody,children:t}),sheetHeader:s(),footer:n}):h.jsx(C.Modal,{open:r,onClose:i,modalBody:h.jsx("div",{className:w4.modalBody,children:t}),headerTitle:a,modalFooter:h.jsxs(h.Fragment,{children:[h.jsx(C.TextButton,{onClick:i,color:"blue",size:"large",text:e||"Abbrechen"}),n]})})},vge="_body__notice_132d7_149",bge={body__notice:vge},wge="_infoList_1no4o_146",yge="_infoList__data_1no4o_149",kge="_row_1no4o_153",xge="_link_1no4o_157",Gu={infoList:wge,infoList__data:yge,row:kge,link:xge},Sge=({post:e})=>{const t=[{text:"Status",value:e.status},{text:"Letzte Reaktion",value:Cp(e.updatedAt)},{text:"Erstellt",value:Cp(e.createdAt)},{href:e.author.url,text:"Von",value:e.author.name},{text:"Sichtbarkeit",value:h.jsxs("span",{children:[e.hoodTitle," & Umgebung"]})}];return h.jsx("ul",{className:Gu.infoList,children:t.map((n,i)=>h.jsxs("li",{className:Gu.row,children:[h.jsx(C.Typography,{type:"body-semibold",children:n.text}),": ",n.href?h.jsx(C.TextButton,{className:Gu.link,color:"deepPurple",size:"link",text:n.value,href:n.href}):h.jsx(C.Typography,{type:"body-regular",className:Gu.infoList__data,children:n.value})]},i))})},Cge="_body_132d7_146",Ege={body:Cge},Tge=({handleClose:e,open:t})=>h.jsx(C.Modal,{headerTitle:"Öffentliche Beiträge. Was ist das?",onClose:e,open:t,modalFooter:h.jsx(h.Fragment,{children:h.jsx(C.TextButton,{onClick:e,color:"blue",size:"large",text:"Schließen"})}),modalBody:h.jsx("div",{className:Ege.body,children:h.jsx(C.Typography,{type:"body-regular",children:'Um beispielsweise auch Personen außerhalb der Nachbarschaft zu erreichen, kann der Verfasser einen Beitrag als "Öffentlichen Beitrag" markieren. Dieser ist dann auch im nicht-eingeloggten Zustand auf der Nachbarschaftsseite sichtbar. Öffentliche Beiträge zeigen nur den Inhalt des Beitrags und den Namen der Nachbarschaft, aus der der Beitrag stammt. Namen, Profilbilder und Antworten anderer Nachbarn verbleiben geschützt in der Nachbarschaft und können von Außenstehenden nicht gesehen werden. So schützen wir euch und eure nachbarschaftliche Privatsphäre.'})})}),rC=({handleOpen:e,isPublic:t,item:n,open:i})=>{const[r,a]=b.useState(!1),s=()=>{a(!r)},o=()=>h.jsxs(h.Fragment,{children:[h.jsx(Sge,{post:n}),t&&h.jsx("div",{className:bge.body__notice,children:h.jsx(C.Notice,{context:"info",headline:"Hinweis",variant:"detailed",bodyText:"Dieser Beitrag wurde vom Verfasser als öffentlicher Beitrag erstellt und kann außerhalb von nebenan.de gesehen werden. Reaktionen und Antworten auf den Beitrag sind außerhalb der Nachbarschaft nicht sichtbar.",type:"embedded",cta:{onClick:s,text:"Mehr zu öffentlichen Beiträgen"}})})]});return h.jsx(h.Fragment,{children:r?h.jsx(Tge,{open:r,handleClose:s}):h.jsx(S1,{handleClose:()=>e(!1),open:i,title:"Beitragsinformationen",content:h.jsx(o,{})})})},Mge=e=>{var t,n;return{author:{name:(t=e.author_details)==null?void 0:t.name,url:(n=e.author_details)==null?void 0:n.profile_url},createdAt:e.created_at,hoodTitle:e.hood_title,status:"aktiv",updatedAt:e.updated_at}},Age=({handleOpen:e,id:t,open:n})=>{const[i,r]=b.useState(null);if(b.useEffect(()=>{t&&Ie.getPost({id:t}).then(s=>{r(s)}).catch(s=>{console.log(s)})},[n,t]),!i)return;const a=Mge(i);return h.jsx(rC,{item:a,isPublic:uoe(i),handleOpen:e,open:n})},Pge="_dropdownCluster_19fqo_146",zge={dropdownCluster:Pge},aC=({id:e,isAuthenticated:t,isMine:n})=>{const[i,r]=b.useState(!1),[a,s]=b.useState(!1),o=b.useRef(null),[l,c]=b.useState(!1),[u,f]=b.useState(!1),d=Kn.useTrack(),m=xt(),p=()=>{d("click",{click_name:"post_more_details",section:"marketplace_detail_page"}),r(!i)},v=()=>{r(!1),s(!a)},g=()=>{r(!1),c(!0)},w=()=>{r(!1),f(!u)},x=[{onClick:()=>{m(`/feed/${e}/edit`)},text:"Beitrag bearbeiten"}],T=[{onClick:v,text:"Inhalt melden"},...t?[{onClick:g,text:"Beitrag ausblenden"}]:[]],E=[{onClick:w,text:"Beitragsinformationen"}],M=[...n?x:T,...E];return h.jsxs(h.Fragment,{children:[h.jsx(mge,{id:e,handleClose:()=>c(!1),open:l}),h.jsx(dge,{id:e,handleReport:v,isAuthenticated:t,open:a}),h.jsx(Age,{id:e,handleOpen:w,open:u}),h.jsx(C.Popup,{placement:"bottom-end",strategy:"fixed",open:i,offset:{crossAxis:0,mainAxis:-24},anchor:o.current,handleClickAway:()=>p(),children:h.jsx(C.DropdownCard,{onClose:()=>r(!1),headerProps:{text:"Schließen"},hasHeader:!0,className:zge.dropdownCluster,items:M})}),h.jsx(C.IconButton,{ref:o,icon:"more_dots",size:"medium",onClick:p,ariaLabel:"action button"})]})},Fge=({className:e,id:t,isAuthenticated:n,isMine:i})=>{const r=Kn.useTrack(),a=()=>{window.history.back(),r("click",{click_name:"marketplace_detail_page_back_cta",section:"marketplace_detail_page"})},s=h.jsx(C.IconButton,{onClick:a,icon:"chevron_left",size:"medium",ariaLabel:"action button"});return h.jsx(C.CardHeader,{className:e,headline:"Marktplatz",leftElement:s,rightElement:h.jsx(aC,{id:t,isAuthenticated:n,isMine:i})})},jge="_root_j6qqv_146",Lge="_root__content_j6qqv_155",y4={root:jge,root__content:Lge},Ige=()=>{const e=xt(),t=()=>{e("/feed/marketplace")};return h.jsx(C.Card,{className:y4.root,responsive:!0,children:h.jsx(C.CardBody,{className:y4.root__content,children:h.jsx(C.EmptyState,{size:"large",buttons:[{buttonType:"primary","data-testid":"back-to-marketplace",onClick:t,text:"Zu deinem Marktplatz"}],primaryText:"Nichts gefunden?",secondaryText:"Es gibt noch viel mehr zu entdecken"})})})},Rge="_modal_1xtjz_146",Nge="_header_1xtjz_156",Dge="_content_1xtjz_166",Bge="_closeButtonContainer_1xtjz_185",Oge="_closeButton_1xtjz_185",Hge="_swiper_1xtjz_196",_ge="_swiperSlide_1xtjz_200",Wge="_navigation_1xtjz_210",Vge="_pagination_1xtjz_233",Gge="_footer_1xtjz_240",Nn={modal:Rge,header:Nge,content:Dge,closeButtonContainer:Bge,closeButton:Oge,swiper:Hge,swiperSlide:_ge,navigation:Wge,"navigation--hidden":"_navigation--hidden_1xtjz_221",pagination:Vge,"pagination--hidden":"_pagination--hidden_1xtjz_236",footer:Gge},k4=(e,t)=>{if(!Jt())return e.map((r,a)=>({hidden:!1,position:a,slideIndex:a,src:r,type:"image"}));const n=[],i=new Set(t==null?void 0:t.map(r=>r.position));return e.forEach((r,a)=>{let s=a;for(;i.has(s);)s++;i.add(s),n.push({hidden:!1,position:s,slideIndex:a,src:r,type:"image"})}),t==null||t.forEach(({position:r,render:a})=>{n.push({hidden:!1,position:r,render:a,type:"ad"})}),n.sort((r,a)=>r.position-a.position)},Uge=({index:e,slides:t})=>{let n=0;if(!Jt())return n;t[e].type==="ad"&&(n+=1);const a=t.slice(0,e).filter(s=>s.type==="ad");return n+=a.length,n},c0=({activeIndex:e,slides:t})=>t.findIndex(n=>n.type==="image"&&n.slideIndex===e),qge=e=>e.length===0?e:[...e].sort((n,i)=>n.position-i.position).map((n,i)=>({...n,position:i})),sC=({activeIndex:e,ads:t,footerAd:n,images:i,onClose:r,open:a})=>{const s=k4(i,t),[o,l]=b.useState(null),c=b.useRef(null),u=b.useRef(null),f=b.useRef(null),[d,m]=b.useState(null),[p,v]=b.useState(s),g=c0({activeIndex:e,slides:s}),[w,k]=b.useState(g>=0?g:0),x=$e(800),T=()=>{v(k4(i,t))};b.useEffect(()=>{T()},[x]),b.useEffect(()=>{if(a){const P=c0({activeIndex:e,slides:s});k(P>=0?P:0)}},[a]),b.useEffect(()=>{if(!a||!o)return;const P=c0({activeIndex:e,slides:p}),F=p[P];m(F.type==="ad"?null:F.slideIndex),o.slideToLoop(P,0)},[p,a,o,e]);const E=P=>{const F=p[P.realIndex];k(F.position),m(F.type==="ad"?null:F.slideIndex)},M=()=>{const P=Uge({index:w,slides:p});r(w-P)},z=P=>{const F=p.filter(I=>I.position!==P);v(qge(F))};return xM(["Escape","Esc"],M,"keyup"),i.length===0?null:h.jsx(es,{children:h.jsx(S9,{open:a,className:Nn.modal,children:h.jsxs("div",{className:Nn.content,children:[h.jsxs("div",{className:Nn.header,children:[h.jsxs(C.Typography,{type:"h5",className:$(Nn.pagination,{[Nn["pagination--hidden"]]:d===null}),children:[d?d+1:1," von ",i.length]}),h.jsx("span",{className:Nn.closeButtonContainer,children:h.jsx(C.IconButton,{ariaLabel:"Close",icon:"cross_circle",size:"large",onClick:M,className:Nn.closeButton})})]}),h.jsxs("div",{className:$(Nn.navigation,{[Nn["navigation--hidden"]]:p[w]&&p[w].type!=="ad"&&Jt()}),children:[h.jsx(C.CarouselNavigation,{direction:"left",ref:u}),h.jsx(C.CarouselNavigation,{direction:"right",ref:f})]}),h.jsx(Jc,{keyboard:{enabled:!0},onSwiper:l,className:Nn.swiper,ref:c,onRealIndexChange:E,init:!1,initialSlide:w,zoom:!0,modules:[fee,p1,g1,ree,see],slidesPerView:1,loop:!0,draggable:!0,grabCursor:!0,onBeforeInit:P=>{P.params.navigation.nextEl=f.current,P.params.navigation.prevEl=u.current},children:p.filter(P=>!P.hidden).map((P,F)=>h.jsx(Qc,{className:Nn.swiperSlide,children:P.type==="image"?h.jsx("div",{className:"swiper-zoom-container",children:h.jsx("img",{src:P.src})}):P.render({onHide:()=>z(P.position)})},F))}),p[w]&&p[w].type!=="ad"&&h.jsx("div",{className:Nn.footer,children:n==null?void 0:n.render({onHide:Lf.noop})})]})})})},oC=({ads:e=[],ctaSlot:t,footerAd:n,images:i,reserved:r,stickerSlot:a,type:s="slideshow"})=>{const[o,l]=b.useState(0),[c,u]=b.useState(!1),f=m=>{l(m),u(!0)},d=m=>{l(m),u(!1)};return h.jsxs("div",{children:[h.jsx(sC,{activeIndex:o,ads:e,footerAd:n,images:i,onClose:d,open:c}),h.jsx(B2,{activeIndex:o,ctaSlot:t,images:i,onImageClick:f,reserved:r,stickerSlot:a,type:s})]})},Kge="_root_bnp9i_146",Zge="_root__cta_bnp9i_158",Jge="_root__notice_bnp9i_161",u0={root:Kge,root__cta:Zge,root__notice:Jge},Qge="_sheet__content_8odui_152",Yge="_sheet__footer_8odui_160",Xge="_sheet__body_8odui_174",$ge="_sheet__body__headline_8odui_180",e2e="_sheet__header_8odui_186",t2e="_sheet__image_8odui_192",Wa={sheet__content:Qge,sheet__footer:Yge,sheet__body:Xge,sheet__body__headline:$ge,sheet__header:e2e,sheet__image:t2e},n2e={"de-DE":{split_payment:{label:"Wähle aus, wie du deinen Beitrag hervorhebst.",title:"Mehr Sichtbarkeit, schnellerer Verkauf",cta:"Jetzt bezahlen {price}",cta_disabled:"Jetzt bezahlen"},success:{label:"Die Zahlung war erfolgreich.",title:"Dein Angebot wird jetzt hervorgehoben.",cta:"Zum Marktplatz"}}},Ff=Re(n2e),i2e=({onChange:e,postId:t,selectedOption:n})=>h.jsxs("div",{className:Wa.sheet__content,children:[h.jsx("div",{className:Wa.sheet__image,children:h.jsx(C.Image,{src:Il(qw),alt:"highlight promo illustration"})}),h.jsxs("div",{className:Wa.sheet__body,children:[h.jsxs("div",{className:Wa.sheet__body__headline,children:[h.jsx(C.Typography,{type:"h3",children:Ff.split_payment.title}),h.jsx(C.Typography,{type:"body-regular",children:Ff.split_payment.label})]}),h.jsx($2,{onChange:e,postId:t,includeNoneOption:!1,defaultValue:n})]})]}),r2e=({onDismiss:e})=>h.jsx("div",{className:Wa.sheet__header,children:h.jsx(C.IconButton,{icon:"cross",size:"medium",onClick:e})}),a2e=({onClick:e,selectedOption:t})=>{const{pill:n,value:i}=t||{pill:"",value:""},r=!i||i==="free",a=r?Ff.split_payment.cta_disabled:En(Ff.split_payment.cta,{price:n});return h.jsx("div",{className:Wa.sheet__footer,children:h.jsx(C.ButtonPrimary,{fullWidth:!0,disabled:r,size:"large",text:a,onClick:e})})},s2e=({onDismiss:e,open:t,postId:n})=>{const[i,r]=b.useState(),{PremiumFeatureCheckoutModal:a,startCheckout:s}=Zw(),o=()=>{!i||!i.id||(e(),s(n,i==null?void 0:i.id))},l=c=>r(c);return h.jsxs(h.Fragment,{children:[h.jsx(C.Sheet,{sheetClassName:Wa.root__sheet,open:t,onDismiss:e,header:h.jsx(r2e,{onDismiss:e}),breakpoint:"800",content:h.jsx(i2e,{selectedOption:i,onChange:l,postId:n}),footer:h.jsx(a2e,{selectedOption:i,onClick:o})}),a]})},o2e=({chargebeeProviderConfig:e,featureAddons:t,isMine:n,postId:i})=>{const[r,a]=b.useState(!1),[s,o]=b.useState(!1),[l,c]=b.useState(n),u=Ee.useSnowplowTrack(),f=foe(t);b.useEffect(()=>{if(!n)return;(async()=>{try{const v=await qS(i);if(!v)return;const g=v.some(({available:w})=>!w);o(g),c(!1)}catch(v){console.error("Failed to load premium feature products",v),c(!1)}})()},[i,n]);const d=()=>{u("click",{main:[new Ee.Click({name:"marketplace_pdp_upsell",value:"clicked"})]}),a(!0)},m=()=>a(!1);return!f&&!n?null:h.jsx(h.Fragment,{children:h.jsx("div",{className:u0.root,children:!l&&(s||f?h.jsxs(h.Fragment,{children:[h.jsx(C.Notice,{size:"small",variant:"simple",className:u0.root__notice,...n?{notificationBubble:{ariaLabel:"notice"}}:{icon:{name:"loudspeaker",size:"24"}},color:"green",headline:n?"Derzeit Hervorgehoben":"Aktuell häufiger angesehen!",cta:n?{color:"blue",onClick:d,rightIcon:h.jsx(C.Icon,{name:"chevron_right",size:"16"}),text:"Mehr"}:void 0}),r&&s&&h.jsx($2,{hasPremiumFeature:s,postId:i,includeNoneOption:!1,onDismiss:m})]}):h.jsxs(h.Fragment,{children:[h.jsx(C.ButtonTertiary,{text:"Beitrag hervorheben",size:"small",color:"blue",onClick:d,className:u0.root__cta,leftIcon:h.jsx(C.Icon,{name:"rocket_outline",size:"16"})}),h.jsx(Wp.ChargebeeProvider,{site:e.site,children:h.jsx(s2e,{open:r,onDismiss:m,postId:i})})]}))})})},l2e="_postAuthor_gsl0q_146",c2e="_postAuthor__thumbnail_gsl0q_161",u2e="_postAuthor__text_gsl0q_165",d2e="_postAuthor__author_gsl0q_173",f2e="_postAuthor__groupName_gsl0q_173",h2e="_postAuthor__metadata_gsl0q_176",m2e="_postAuthor__authorAlt_gsl0q_176",p2e="_postAuthor__icon_gsl0q_179",g2e="_postAuthor__feedItemCategory_gsl0q_182",v2e="_postAuthor__rating_gsl0q_187",wn={postAuthor:l2e,"postAuthor--hasBadge":"_postAuthor--hasBadge_gsl0q_152","postAuthor--hasFeedItemCategory":"_postAuthor--hasFeedItemCategory_gsl0q_155","postAuthor--hasThreeLines":"_postAuthor--hasThreeLines_gsl0q_158",postAuthor__thumbnail:c2e,postAuthor__text:u2e,postAuthor__author:d2e,postAuthor__groupName:f2e,postAuthor__metadata:h2e,postAuthor__authorAlt:m2e,postAuthor__icon:p2e,postAuthor__feedItemCategory:g2e,postAuthor__rating:v2e},b2e="_rating_1w32v_146",w2e="_rating__star_1w32v_151",y2e="_rating__overlay_1w32v_155",d0={rating:b2e,rating__star:w2e,rating__overlay:y2e},k2e=(e,t)=>y.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("g",{id:"star"},y.createElement("path",{id:"Vector",d:"M5.57967 1.69546C5.75161 1.34707 6.24842 1.34707 6.42036 1.69546L7.46087 3.80376C7.49501 3.87293 7.561 3.92088 7.63734 3.93197L9.96398 4.27005C10.3485 4.32592 10.502 4.79841 10.2238 5.0696L8.54019 6.71068C8.48495 6.76452 8.45975 6.8421 8.47279 6.91813L8.87022 9.23537C8.9359 9.6183 8.53398 9.91031 8.19009 9.72952L6.10908 8.63546C6.0408 8.59957 5.95923 8.59957 5.89095 8.63546L3.80994 9.72952C3.46605 9.91031 3.06413 9.6183 3.12981 9.23537L3.52724 6.91813C3.54028 6.8421 3.51508 6.76452 3.45984 6.71068L1.77626 5.0696C1.49805 4.79841 1.65157 4.32592 2.03605 4.27005L4.36269 3.93197C4.43903 3.92088 4.50502 3.87293 4.53916 3.80376L5.57967 1.69546Z",fill:"#D2D0DB",stroke:"#D2D0DB",strokeWidth:.703125}))),x2e=b.forwardRef(k2e),S2e=({ariaLabel:e,className:t,max:n,value:i})=>{const r=Math.round(i/n*100);return h.jsxs("div",{className:$(d0.rating,t),"aria-label":e,children:[Array.from(Array(n).keys()).map((a,s)=>h.jsx(x2e,{className:d0.rating__star},s)),h.jsx("div",{className:d0.rating__overlay,style:{width:`${100-r}%`}})]})},lC=({author:e,className:t,feedItemCategory:n,groupName:i,metadata:r,onMoreClick:a,rating:s,showMoreIcon:o,thumbnail:l})=>{const u=b.useRef(null),[f,d]=b.useState(0),[m,p]=b.useState(0),v=()=>{p(window.innerWidth)};b.useEffect(()=>(v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}),[]),b.useEffect(()=>{u.current!==null&&d(u.current.offsetHeight)},[m]);const g=()=>{switch(l==null?void 0:l.thumbnailType){case"badge":return h.jsx(C.Badge,{...l});case"thumbnailCircular":return h.jsx(C.Thumbnail,{...l});case"thumbnailSquare":return h.jsx(C.Thumbnail,{...l});case"thumbnailWrapper":return h.jsx(C.ThumbnailWrapper,{...l})}},w=$(wn.postAuthor,{[wn["postAuthor--hasBadge"]]:(l==null?void 0:l.thumbnailType)==="badge",[wn["postAuthor--hasFeedItemCategory"]]:n,[wn["postAuthor--hasThreeLines"]]:f>36&&n},t),{children:k,...x}=e||{},{children:T,...E}=i||{};return h.jsxs("div",{className:w,children:[h.jsx(C.Button,{...l,className:wn.postAuthor__thumbnail,children:l&&g()}),h.jsxs("div",{ref:u,className:wn.postAuthor__text,children:[i&&h.jsx(C.Button,{...E,children:h.jsx(C.Typography,{type:"body-semibold",className:wn.postAuthor__groupName,children:T})}),h.jsx(C.Button,{...x,children:h.jsx(C.Typography,{type:"body-semibold",className:i?wn.postAuthor__authorAlt:wn.postAuthor__author,children:k})}),h.jsx(C.Typography,{type:"detail-regular",className:wn.postAuthor__metadata,children:r}),s&&h.jsx(S2e,{...s,className:wn.postAuthor__rating})]}),o&&h.jsx(C.IconButton,{size:"large",icon:"more_dots",ariaLabel:"Mehr",onClick:a,className:wn.postAuthor__icon}),n&&h.jsx(C.FeedItemCategory,{text:n,type:"closedPost",className:wn.postAuthor__feedItemCategory})]})},C2e="_actions_927th_146",E2e="_button_927th_152",x4={actions:C2e,button:E2e},T2e=({author:e,body:t,id:n,images:i,subject:r})=>{const a=Kn.useTrack(),s=xt(),o=()=>{s(`/messages/${e.associated_gid.replace("gid://nebenan/User/","")}`,{embedPost:{body:t,id:n,images:i,subject:r}}),a("click",{click_name:"contact_seller",section:"marketplace_detail_page"})};return h.jsx("div",{className:x4.actions,children:h.jsx(C.ButtonPrimary,{"data-testid":"contact-seller-button",className:x4.button,text:"Verkäufer kontaktieren",onClick:o})})},M2e="_actions_1904y_146",A2e={actions:M2e},P2e="_modalFooter_gw3ar_146",z2e={modalFooter:P2e},F2e=({handleClose:e,id:t,isFree:n,open:i})=>{const[r,a]=b.useState(!1),{trackEngagementEvent:s}=JE.useEngagement(),o=xt(),l=Rw.useQueryClient();function c(){Ie.deleteNewsFeed({id:t}).then(u=>{a(!0),n?s("MARKETPLACE_item_delete_free",{}):s("MARKETPLACE_item_delete_sale",{}),l.invalidateQueries({exact:!1,queryKey:["marketplace-feed"]}),l.invalidateQueries({exact:!1,queryKey:["own-marketplace-feed"]}),o("/feed")}).catch(u=>{console.error(u)})}return h.jsxs(h.Fragment,{children:[h.jsx(C.Snackbar,{leftIconLarge:"checkmark_circle",onClose:()=>a(!1),isOpen:r,textLabel:"Beitrag gelöscht"}),h.jsx(S1,{handleClose:e,open:i,title:"Bist du sicher, dass du diesen Beitrag löschen möchtest?",content:h.jsx(C.Typography,{type:"body-regular",children:'Bitte beachte, dass mit Klick auf "Löschen" alle Inhalte des Beitrags unwiderruflich gelöscht werden.'}),footer:h.jsx(C.ButtonPrimary,{className:z2e.modalFooter,color:"highlight",text:"Löschen",onClick:c})})]})},j2e=({id:e,isFree:t})=>{const[n,i]=b.useState(!1),r=()=>{i(!n)};return h.jsxs(h.Fragment,{children:[h.jsx(F2e,{open:n,handleClose:r,id:e,isFree:t}),h.jsx(C.ButtonSecondary,{size:"small",color:"green",text:"Löschen",onClick:r})]})},L2e="_button_vwj88_147",I2e={button:L2e},R2e=({id:e})=>{const t=xt();return h.jsx(C.ButtonTertiary,{className:I2e.button,size:"small",onClick:()=>t(`/feed/${e}/edit`),color:"greyStrong",text:"Beitrag bearbeiten","data-testid":"edit-button"})},N2e=({handleReserve:e,id:t,isReserved:n})=>{const i=Rw.useQueryClient(),r=async()=>{await Ie.updateFeedItem({hood_message:{outcome:n?soe:ooe},id:t}).then(a=>{e&&e()}),i.invalidateQueries({exact:!1,queryKey:["marketplace-feed"]}),i.invalidateQueries({exact:!1,queryKey:["own-marketplace-feed"]})};return h.jsx(C.ButtonPrimary,{size:"small",onClick:()=>void r(),"data-testid":`reserve-button-${n?"activate":"reserve"}`,text:n?"Aktivieren":"Reservieren"})},D2e=({handleReserve:e,id:t,isFree:n,isReserved:i})=>h.jsxs("div",{className:A2e.actions,children:[h.jsx(N2e,{handleReserve:e,id:t,isReserved:i}),h.jsx(j2e,{id:t,isFree:n}),h.jsx(R2e,{id:t})]}),B2e=({author:e,body:t,className:n,handleReserve:i,id:r,images:a,isFree:s,isMine:o,isReserved:l,subject:c})=>h.jsxs("div",{className:n,children:[o&&h.jsx(D2e,{handleReserve:i,id:r,isFree:s,isReserved:l}),!o&&h.jsx(T2e,{author:e,id:r,body:t,images:a,subject:c})]}),O2e="_root_1xflp_146",H2e="_card_1xflp_151",_2e="_card__body_1xflp_154",W2e="_card__header_1xflp_160",V2e="_card__content_1xflp_169",G2e="_galleryContainer_1xflp_173",U2e="_imageGallery_1xflp_183",q2e="_remainingAds_1xflp_206",K2e="_relatedSections_1xflp_212",Ri={root:O2e,card:H2e,card__body:_2e,card__header:W2e,card__content:V2e,galleryContainer:G2e,imageGallery:U2e,remainingAds:q2e,relatedSections:K2e},Z2e="_root_sl92n_146",J2e="_root__primary_sl92n_149",Q2e="_embeds_sl92n_156",Y2e="_modalBody_sl92n_163",X2e="_modalFooter_sl92n_172",$2e="_copyButton_sl92n_177",eve="_divider_sl92n_181",tve="_top_sl92n_191",nve="_top__price_sl92n_195",ive="_top__actions_sl92n_200",rve="_title_sl92n_206",ave="_bottom_sl92n_210",sve="_bottom__category_sl92n_217",ove="_bottom__timestamp_sl92n_222",lve="_actions_sl92n_226",bt={root:Z2e,root__primary:J2e,embeds:Q2e,modalBody:Y2e,modalFooter:X2e,copyButton:$2e,divider:eve,top:tve,top__price:nve,top__actions:ive,title:rve,bottom:ave,bottom__category:sve,bottom__timestamp:ove,actions:lve},cve=({bookmarked:e,chargebeeProviderConfig:t,disablePremiumFeature:n,feedItem:i,isAuthenticated:r=!1,isMine:a=!1})=>{var P,F,I,A,j,L,O,N;const[s,o]=b.useState(!1),[l,c]=b.useState(!1),[u,f]=b.useState(((P=i.marketplace_details)==null?void 0:P.outcome)==="item_reserved"),[d,m]=C.useCopyToClipboard(),p=Kn.useTrack(),v=`${window.location.origin}/feed/${i.id}`,g=i.content_type==="marketplace_free",w=()=>{p("react",{reaction_type:"share",section:"marketplace_detail_page"}),o(!0)},k=()=>o(!1),x=()=>m(v),T=()=>{f(!u)},E=()=>{c(!0),o(!1)};b.useEffect(()=>{d&&E()},[d]);const M=()=>h.jsxs("div",{className:bt.modalBody,children:[h.jsx(C.Typography,{type:"body-regular",className:bt.modalBody__text,children:h.jsx(C.Markdown,{text:`Dieser Beitrag ist öffentlich und kann auch von Personen angesehen werden, die nicht bei nebenan.de registriert sind.
|
|
913
|
-
Namen und Kommentare auf den Beitrag sind nicht öffentlich sichtbar.`})}),h.jsx("div",{className:bt.copyButton,children:h.jsx(C.CopyLinkButton,{link:v,onClick:E})})]}),z=()=>{var D;(D=i.author_details)!=null&&D.profile_url&&(window.location.href=i.author_details.profile_url,p("click",{click_name:"post_author_profile",section:"marketplace_detail_page"}))};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Ri.galleryContainer,children:h.jsx("div",{className:Ri.imageGallery,children:h.jsx(oC,{images:(i.images||[]).map(D=>typeof D=="string"?D:(D==null?void 0:D.url)||""),reserved:u,stickerSlot:h.jsx(h.Fragment,{})})})}),h.jsxs("div",{className:Ri.card__content,children:[!n&&h.jsx(o2e,{chargebeeProviderConfig:t,postId:`${i.id}`,isMine:a,featureAddons:(i==null?void 0:i.feature_addons)||[]}),h.jsxs("div",{className:bt.root,children:[h.jsx(C.Snackbar,{leftIconLarge:"checkmark_circle",isOpen:l,textLabel:"Link kopiert",onClose:()=>c(!1)}),h.jsx(S1,{title:"Teile diesen öffentlichen Beitrag",handleClose:k,open:s,content:M(),footer:h.jsx("div",{className:bt.modalFooter,children:h.jsx(C.ButtonPrimary,{text:"Link kopieren",onClick:x})})}),h.jsxs("div",{className:bt.root__primary,children:[(i.content_type==="marketplace_free"||i.content_type==="marketplace_sell"&&((F=i.marketplace_details)==null?void 0:F.price_in_cents)!==null)&&h.jsxs("div",{className:bt.top,children:[h.jsx(C.Typography,{type:"h3",className:bt.top__price,children:EM((I=i.marketplace_details)==null?void 0:I.price_in_cents)}),h.jsxs("div",{className:bt.top__actions,children:[!a&&r&&h.jsx(zp,{id:i.id,bookmarked:e}),h.jsx(C.IconButton,{onClick:w,icon:"share_arrow_outline",size:"medium",ariaLabelledBy:"share"})]})]}),h.jsxs("div",{className:bt.top,children:[h.jsx(C.Typography,{type:"h3",className:bt.title,children:i.subject}),i.content_type==="marketplace_sell"&&((A=i.marketplace_details)==null?void 0:A.price_in_cents)===null&&h.jsxs("div",{className:bt.top__actions,children:[!a&&r&&h.jsx(zp,{id:i.id,bookmarked:e}),h.jsx(C.IconButton,{onClick:w,icon:"share_arrow_outline",size:"medium",ariaLabelledBy:"share"})]})]}),h.jsxs("div",{className:bt.bottom,children:[h.jsx(C.Typography,{type:"body-regular",className:bt.bottom__category,"data-testid":"marketplace-body-category",children:((L=(j=i.marketplace_details)==null?void 0:j.category)==null?void 0:L.title)||"Sonstiges"}),h.jsx(C.Typography,{type:"detail-medium",className:bt.bottom__timestamp,children:i.created_at?new Date(i.created_at).toLocaleDateString("de-DE"):""})]})]}),i.author_details&&h.jsx(B2e,{className:bt.actions,handleReserve:T,isReserved:u,author:i.author_details,images:i.images,body:i.body,isFree:g,isMine:a,id:i.id,subject:i.subject}),h.jsx(C.BodyText,{type:"post",bodyText:i.body}),!!((O=i.embeds)!=null&&O.length)&&h.jsx("div",{className:bt.embeds,children:(N=i.embeds)==null?void 0:N.map((D,R)=>h.jsx(Gp,{onClick:()=>window.open(D.cta_url||""),image:{alt:D.title||"",src:D.image_url||""},description:D.description||"",headline:D.title||"",url:D.cta_url||""},R))}),i.author_details&&!a&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:bt.divider,children:h.jsx(C.Divider,{})}),h.jsx(lC,{className:bt.author,author:{children:i.author_details.name,href:i.author_details.profile_url||"#",onClick:z},metadata:i.author_details.hood_title,thumbnail:{badgeIcons:i.author_details.ben?["is_super_neighbour"]:i.author_details.supporter?["is_supporter"]:[],children:h.jsx(C.UserAvatar,{size:"48",alt:i.author_details.name,userImageSrc:i.author_details.picture_url||"",userId:parseInt(i.author_details.associated_gid)||0}),onClick:z,thumbnailType:"badge"}})]})]})]})]})},S4=new Map,uve=async e=>{if(!e)return!1;const t=S4.get(e);if(t!==void 0)return t;const n=(async()=>{try{const i=await He.API.getApi().GET("/api/core/v3/profile",{});if(!i.data)return!1;const r=i.data.id,a=SM(e);return a?a===r:!1}catch(i){return console.error("Error checking author:",i),!1}})();return S4.set(e,n),n},dve="_root_1bugj_146",fve={root:dve},hve=({isAuthenticated:e=!1,section:t})=>{const[n,i]=b.useState([]),{more_cta_text:r,more_cta_url:a,section_headline:s,section_identifier:o}=t,l=`/feed/${a.split("/").pop()}`;return b.useEffect(()=>{if(!e||!t.posts.length)return;const c=t.posts.map(u=>u.id).filter(Boolean);He.API.getApi().GET("/api/core/v3/interactions",{params:{query:{format:"json",post_ids:c.join(",")}}}).then(u=>{if(u.data){const f=u.data.filter(d=>d.bookmark).map(d=>d.hood_message_id);i(f)}}).catch(u=>{console.error("Failed to fetch bookmark status:",u)})},[e,t.posts]),h.jsx(iC,{className:fve.root,category:s,categorySlug:o,categoryLink:l,linkLabel:r,items:t.posts.map(c=>({bookmarked:n.includes(c.id),id:c.id,image:coe(c),price:hoe(c),reserved:!1,reservedText:"Reserviert",timeStamp:c.created_at,title:c.subject}))})};class mve extends b.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{error:t,hasError:!0}}componentDidCatch(t,n){console.error("MarketplaceDetailPage Error:",t,n)}render(){return this.state.hasError?h.jsx(C.EmptyState,{stickerProps:{color:"green",icon:"pin"},size:"large",primaryText:"Etwas ist schiefgelaufen",secondaryText:"Bitte versuche es später erneut oder kontaktiere unseren Support."}):this.props.children}}async function pve({ads:e=[],bookmarked:t,config:n,disablePremiumFeature:i,feedItem:r,isAuthenticated:a=!1,relatedSections:s=[],renderAdSlot:o}){var u;const l=(r==null?void 0:r.level_of_detail)==="not_in_reach",c=a?await uve((u=r==null?void 0:r.author_details)==null?void 0:u.associated_gid):!1;return h.jsx(mve,{children:h.jsxs("div",{className:Ri.root,children:[h.jsx(C.Card,{className:Ri.card,responsive:!0,withoutPadding:!0,children:h.jsxs(C.CardBody,{className:Ri.card__body,withoutPadding:!0,children:[h.jsx(Fge,{className:Ri.card__header,id:r.id,isAuthenticated:a,isMine:c}),l?h.jsx(C.EmptyState,{className:Ri.emptyState,stickerProps:{color:"green",icon:"pin"},size:"large",primaryText:"Dieses Angebot ist außerhalb deiner Nachbarschaft.",secondaryText:"Nutze nebenan.de, um Angebote in deiner direkten Nachbarschaft zu finden."}):h.jsx(cve,{feedItem:r,isAuthenticated:a,bookmarked:t,isMine:c,chargebeeProviderConfig:n.chargebee,disablePremiumFeature:i})]})}),a&&s.length>0&&h.jsxs("div",{className:Ri.relatedSections,children:[s.map((f,d)=>h.jsxs(b.Fragment,{children:[h.jsx(hve,{section:f,isAuthenticated:a}),e&&e[d]&&o&&h.jsx("div",{"data-testid":`marketplace-ad-${d}`,children:o(e[d])})]},`${f.section_identifier}-${d}`)),e&&e.length>s.length&&o&&h.jsx("div",{className:Ri.remainingAds,children:e.slice(s.length).map((f,d)=>h.jsx("div",{children:o(f)},`remaining-ad-${d}`))})]}),e&&e.length>0&&s.length===0&&o&&h.jsx("div",{"data-testid":"marketplace-ads",children:e.map((f,d)=>h.jsx("div",{children:o(f)},`ad-${d}`))}),h.jsx(Ige,{})]})})}const gve=({children:e,navigate:t})=>h.jsx(Uw.Provider,{value:{navigate:t},children:e}),vve="_skeletonGrid_1idld_154",bve="_skeletonCard_1idld_168",wve="_skeletonImageContainer_1idld_176",yve="_skeletonContent_1idld_185",kve="_skeletonPrice_1idld_189",xve="_skeletonTitle_1idld_200",Sve="_skeletonTimestamp_1idld_210",Cve="_shimmer_1idld_219",ai={skeletonGrid:vve,skeletonCard:bve,skeletonImageContainer:wve,skeletonContent:yve,skeletonPrice:kve,skeletonTitle:xve,skeletonTimestamp:Sve,shimmer:Cve},Eve=()=>h.jsxs("div",{className:ai.skeletonCard,children:[h.jsx("div",{className:ai.skeletonImageContainer,children:h.jsx("div",{className:ai.shimmer})}),h.jsxs("div",{className:ai.skeletonContent,children:[h.jsx("div",{className:ai.skeletonPrice,children:h.jsx("div",{className:ai.shimmer})}),h.jsx("div",{className:ai.skeletonTitle,children:h.jsx("div",{className:ai.shimmer})}),h.jsx("div",{className:ai.skeletonTimestamp,children:h.jsx("div",{className:ai.shimmer})})]})]});function Tve({count:e=6}){return h.jsx("div",{className:ai.skeletonGrid,children:Array.from({length:e}).map((t,n)=>h.jsx(Eve,{},`marketplace-skeleton-${n}`))})}function cC({ads:e=[],initialFeedItems:t,onLoadMore:n}){const[i,r]=b.useState(()=>t),[a,s]=b.useState(!0),o=b.useCallback(async()=>{try{const l=i[i.length-1],c=await n(l.content_updated_timestamp);c.hood_messages.length===0?s(!1):r(u=>[...u,...c.hood_messages])}catch(l){console.error("Error loading more feed items:",l)}},[i,n]);return h.jsx(Kp,{dataLength:i.length,next:o,hasMore:a,loader:h.jsx(Tve,{count:6}),endMessage:h.jsx("div",{style:{color:"#666",fontSize:"14px",padding:"60px 20px",textAlign:"center"},children:h.jsx("p",{style:{margin:0},children:"You've reached the end"})}),scrollThreshold:.8,style:{overflow:"visible"},children:h.jsx(nC,{feedItems:i,feedType:"marketplace",viewMode:"grid",ads:e})})}const uC=b.createContext(void 0),dC=({children:e,highlightVariant:t})=>h.jsx(uC.Provider,{value:{highlightVariant:t},children:e}),Mve=()=>{const e=b.useContext(uC);return e||{highlightVariant:null}},Ave="_root_mgcag_146",Pve="_filterSection_mgcag_151",zve="_filterContainer_mgcag_157",Fve="_filterTitle_mgcag_168",jve="_filterControls_mgcag_181",Lve="_filterButton_mgcag_198",Ive="_feedSection_mgcag_227",Pi={root:Ave,filterSection:Pve,filterContainer:zve,filterTitle:Fve,filterControls:jve,filterButton:Lve,feedSection:Ive};function Rve({ads:e,highlightVariant:t=null,initialFeedItems:n,onLoadMore:i}){return h.jsx(dC,{highlightVariant:t,children:h.jsxs("div",{className:Pi.root,children:[h.jsx("div",{className:Pi.filterSection,children:h.jsxs("div",{className:Pi.filterContainer,children:[h.jsx("h2",{className:Pi.filterTitle,children:"Marketplace"}),h.jsxs("div",{className:Pi.filterControls,children:[h.jsx("button",{className:Pi.filterButton,children:"All Categories"}),h.jsx("button",{className:Pi.filterButton,children:"Price Range"}),h.jsx("button",{className:Pi.filterButton,children:"Location"}),h.jsx("button",{className:Pi.filterButton,children:"Sort By"})]})]})}),h.jsx("div",{className:Pi.feedSection,children:h.jsx(cC,{initialFeedItems:n,ads:e,onLoadMore:i})})]})})}const Nve="_react-datepicker_1t4mq_116",Dve="_react-datepicker__day-names_1t4mq_119",Bve="_react-datepicker__week_1t4mq_123",Ove="_react-datepicker__day--outside-month_1t4mq_130",Hve="_react-datepicker__time-container_1t4mq_139",_ve="_react-datepicker__time_1t4mq_139",Wve="_react-datepicker__time-box_1t4mq_142",Vve="_root_1t4mq_146",Gve="_root--positive_1t4mq_158",Uve="_root--negative_1t4mq_161",qve="_root--active_1t4mq_164",f0={"react-datepicker":"_react-datepicker_1t4mq_116",reactDatepicker:Nve,"react-datepicker__day-names":"_react-datepicker__day-names_1t4mq_119",reactDatepickerDayNames:Dve,"react-datepicker__week":"_react-datepicker__week_1t4mq_123",reactDatepickerWeek:Bve,"react-datepicker__day--outside-month":"_react-datepicker__day--outside-month_1t4mq_130",reactDatepickerDayOutsideMonth:Ove,"react-datepicker__time-container":"_react-datepicker__time-container_1t4mq_139",reactDatepickerTimeContainer:Hve,"react-datepicker__time":"_react-datepicker__time_1t4mq_139",reactDatepickerTime:_ve,"react-datepicker__time-box":"_react-datepicker__time-box_1t4mq_142",reactDatepickerTimeBox:Wve,root:Vve,"root--positive":"_root--positive_1t4mq_158",rootPositive:Gve,"root--negative":"_root--negative_1t4mq_161",rootNegative:Uve,"root--active":"_root--active_1t4mq_164",rootActive:qve},Kve=(e,t)=>y.createElement("svg",{width:40,height:40,viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("circle",{cx:20,cy:20,r:12.25,stroke:"currentColor",strokeWidth:1.5,fill:"white"}),y.createElement("circle",{cx:16.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("circle",{cx:23.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("path",{d:"M25 26C25 26 23 24 20 24C17 24 15 26 15 26",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",fill:"none"})),Zve=b.forwardRef(Kve),Jve=(e,t)=>y.createElement("svg",{width:40,height:40,viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("circle",{cx:20,cy:20,r:12.25,stroke:"currentColor",strokeWidth:1.5,fill:"white"}),y.createElement("circle",{cx:16.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("circle",{cx:23.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("path",{d:"M25 24C25 24 23 27 20 27C17 27 15 24 15 24",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",fill:"none"})),Qve=b.forwardRef(Jve),Fp=({ariaLabel:e,className:t,disabled:n,isActive:i,onClick:r,variant:a})=>h.jsx(C.Button,{ariaLabel:e,className:$(f0.root,t,f0[`root--${a}`],{[f0["root--active"]]:i}),disabled:n,onClick:r,selected:i,children:h.jsx("span",{children:a==="positive"?h.jsx(Qve,{}):h.jsx(Zve,{})})}),Yve="_root_1dg99_146",Xve="_buttons_1dg99_155",C4={root:Yve,buttons:Xve},$ve=({className:e,disabled:t,dismissLabel:n="Close feedback card",mode:i,onDismiss:r,onSelectMode:a,question:s})=>{const o=i==="negative",l=i==="positive";return h.jsxs("div",{className:$(e,C4.root),children:[h.jsx(C.Typography,{type:"detail-medium",as:"h4",children:s}),h.jsxs("div",{className:C4.buttons,children:[h.jsx(Fp,{isActive:o,onClick:()=>a("negative"),variant:"negative",disabled:t}),h.jsx(Fp,{isActive:l,onClick:()=>a("positive"),variant:"positive",disabled:t}),!!r&&h.jsx(C.IconButton,{icon:"cross",variant:"none",size:"small",onClick:r,ariaLabel:n})]})]})};function e3e(e){e.__scriptingEnabledHTMLContentHasBeenExecuted=!0}const t3e=`(${e3e.toString()})(document.currentScript);`,fC=b.forwardRef((e,t)=>{const n=b.useRef(null);return b.useImperativeHandle(t,()=>({get hasBeenExecuted(){const i=n.current;return i?!!i.__scriptingEnabledHTMLContentHasBeenExecuted:!1}})),h.jsx("script",{ref:n,dangerouslySetInnerHTML:{__html:t3e}})});fC.displayName="InnerHTMLScript";const n3e=(e,t)=>{const n=document.createRange().createContextualFragment(t);e.innerHTML="",e.appendChild(n)},i3e=({html:e,...t})=>{const n=b.useRef(null),i=b.useRef(null);return b.useEffect(()=>{const r=i.current,a=n.current;!r||!a||a.hasBeenExecuted||n3e(r,e)},[e]),h.jsxs(h.Fragment,{children:[h.jsx(fC,{ref:n}),h.jsx("div",{...t,ref:i,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}})]})},r3e="_imageGallery_1awa3_146",a3e="_imageGalleryImage_1awa3_152",s3e="_imageGalleryPill_1awa3_160",h0={imageGallery:r3e,imageGalleryImage:a3e,imageGalleryPill:s3e},o3e=({gallerySize:e,imageAlt:t,imageURL:n,onClick:i})=>{let r;if(e>1){const a=`+${e-1}`;r=h.jsx("div",{className:h0.imageGalleryPill,children:h.jsx(C.LabelPill,{label:a,shape:"tile",size:"medium"})})}return h.jsxs("div",{className:h0.imageGallery,onClick:i,children:[h.jsx(C.Image,{alt:t,src:n,className:h0.imageGalleryImage}),r]})},l3e=async(e,t)=>{try{await Ie.inviteFeedEvent({id:e,inviteeId:[t]})}catch(n){console.error("Error fetching invitees:",n)}},c3e=({id:e,invitees:t})=>{const[n,i]=b.useState(new Set),[r,a]=b.useState(!1),[s,o]=b.useState(""),l=({fullName:c,userId:u})=>{i(f=>new Set(f).add(u)),(async()=>await l3e(e,u))(),a(!1),o(`${c} wurde eingeladen!`),setTimeout(()=>{a(!0)},0)};return h.jsxs("ul",{children:[t.map(c=>h.jsx("li",{children:h.jsx(C.ListItem,{type:If.neighbour,data:{address:c.address,altText:c.altText,callToAction:{disabled:c.invited||n.has(c.userId),label:c.invited||n.has(c.userId)?"Eingeladen":"Einladen",onClick:()=>l(c),size:"small"},fullName:c.fullName,imageUrl:c.imageUrl,profileUrl:c.profileUrl,userId:c.userId}})},c.userId)),h.jsx(C.Snackbar,{isOpen:r,textLabel:s,leftIconSmall:"checkmark_circle",hideDuration:2e3,isNested:!0})]})},u3e=async(e,t,n)=>{try{return(await He.API.getApi().GET("/api/core/v3/event/posts/{post_id}/prospects",{params:{path:{post_id:e},query:{after:n,limit:"20",query:t}}})).data}catch(i){console.error("Error fetching invitees:",i)}},d3e=e=>!e||!e.length?[]:e.map(t=>({address:"",altText:`${t.name} profile image`,fullName:t.name,imageUrl:t.picture_url,profileUrl:`${t.profile_url}`,userId:Vw(t.gid)})),f3e=({postId:e})=>{const[t,n]=b.useState(!0),[i,r]=b.useState(""),[a,s]=b.useState([]),[o,l]=b.useState(null),[c,u]=b.useState(!1),[f,d]=b.useState(!1),m=b.useCallback(async(g,w=null,k=!1)=>{var x,T;d(!0);try{const E=await u3e(e,g,w),M=d3e(E==null?void 0:E.page);s(z=>k?M:[...z,...M]),l(((x=E==null?void 0:E.page_info)==null?void 0:x.end_cursor)||null),u(((T=E==null?void 0:E.page_info)==null?void 0:T.has_next_page)||!1)}catch(E){console.error("Failed to load invitees",E)}finally{d(!1)}},[e]);b.useEffect(()=>{m(i,null,!0)},[i,m]);const p=()=>{n(!1)},v=()=>{!c||f||m(i,o)};return h.jsx(Zp,{open:t,inputProps:{label:"Nachbarn einladen",size:"medium"},headerProps:{title:"Nachbarn einladen"},contentProps:{content:h.jsx(c3e,{id:e,invitees:a}),length:a.length,loadMore:v,loading:f},onDismiss:p,setQuery:r})},h3e="_container_foscf_146",m3e="_cardBody_foscf_159",p3e="_header_foscf_162",g3e="_center_foscf_166",v3e="_stickerWrapper_foscf_170",b3e="_avatarClusterWrapper_foscf_175",w3e="_inviteInfoWrapper_foscf_178",y3e="_communityInviteInfo_foscf_181",k3e="_actions_foscf_185",x3e="_buttonProfile_foscf_207",li={container:h3e,cardBody:m3e,header:p3e,center:g3e,stickerWrapper:v3e,avatarClusterWrapper:b3e,inviteInfoWrapper:w3e,communityInviteInfo:y3e,actions:k3e,buttonProfile:x3e},hC={"de-DE":{already_joined:"sind schon dabei. Lade weitere Nachbar:innen ein und bring mehr Leben in die Runde.",call_to_action_invite:"Lade deine Nachbar:innen ein und mach den ersten Schritt.",first_user_welcome:"Du bist eine:r der Ersten hier - das Miteinander beginnt mit dir!",invite_neighbors:"Lade deine Nachbar:innen ein und mach den ersten Schritt.",more_people_together:"Mehr Menschen, mehr Miteinander!",no_users_yet:"In deiner Nachbarschaft ist noch nicht viel los. Lade weitere Nachbar:innen ein und bring mehr Leben in die Runde.",print_invitation:"Einladung ausdrucken",share_invitation_link:"Einladungslink teilen"}},Uu=Re(hC),S3e=({onMoreClick:e,onProfileClick:t,users:n})=>n.length===0?h.jsxs("div",{className:li.communityInviteInfo,children:[h.jsx(C.Typography,{className:$(li.header,li.center),type:"h3",children:Uu.first_user_welcome}),h.jsx(C.Typography,{type:"body-regular",children:Uu.call_to_action_invite})]}):n.length<=3?h.jsx(C.Typography,{type:"body-regular",children:Uu.no_users_yet}):h.jsxs(C.Typography,{type:"body-regular",children:[n.slice(0,3).map((i,r)=>h.jsxs(C.Button,{className:li.buttonProfile,onClick:()=>t==null?void 0:t(i.id),children:[h.jsxs(C.Typography,{type:"body-text-link",children:[i.firstname," ",i.lastname.charAt(0),"."]}),r<2&&", "]},r))," ","und"," ",h.jsx(C.Button,{onClick:e,children:h.jsxs(C.Typography,{type:"body-text-link",children:[n.length-4," weitere"]})})," ",Uu.already_joined]}),m0=Re(hC),C3e=({onMoreClick:e,onPrintInvitationClick:t,onProfileClick:n,onShareInvitationClick:i,users:r})=>{const a=()=>r.length>0&&h.jsx(C.Typography,{className:li.header,type:"h3",children:m0.more_people_together}),s=()=>r.length===0?h.jsx("div",{className:li.stickerWrapper,children:h.jsx(C.Sticker,{icon:"invite_neighbour",color:"orange",size:"large"})}):h.jsx("div",{className:li.avatarClusterWrapper,children:h.jsx(C.UserAvatarCluster,{size:"large",onAvatarClick:n,onMoreClick:e,users:r})});return h.jsx(C.Card,{responsive:!0,className:li.container,withoutPadding:!0,children:h.jsxs(C.CardBody,{withoutPadding:!0,className:li.cardBody,children:[a(),s(),h.jsx("div",{className:li.inviteInfoWrapper,children:h.jsx(S3e,{users:r,onMoreClick:e,onProfileClick:n})}),h.jsxs("div",{className:li.actions,children:[h.jsx(C.ButtonTertiary,{onClick:t,color:"blue",rightIcon:h.jsx(C.Icon,{name:"paper_form"}),text:m0.print_invitation}),h.jsx(C.ButtonPrimary,{onClick:i,text:m0.share_invitation_link,rightIcon:h.jsx(C.Icon,{name:"link"})})]})]})})},E3e="_container_qsags_146",T3e="_circle_qsags_154",M3e="_logo_qsags_162",p0={container:E3e,circle:T3e,logo:M3e},A3e=(e,t)=>y.createElement("svg",{width:72,height:80,viewBox:"0 0 72 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.7997 17.7397L39.7431 1.45626C37.3242 0.0510383 34.3374 0.0510383 31.9184 1.45626L3.87632 17.7397C1.48151 19.136 0.00627151 21.6971 0 24.4692V55.5447C0.0040404 58.3136 1.48055 60.8715 3.87632 62.2598L15.5846 69.0614V50.9839L21.4279 54.3414C21.6617 54.4879 21.8054 54.7428 21.8097 55.0187V72.6783L31.8968 78.5576C34.3242 79.9506 37.3085 79.9506 39.7359 78.5576L49.823 72.6783V55.0187C49.8291 54.7396 49.9789 54.4834 50.2193 54.3414L56.0554 50.9839V69.0614L60.7315 66.3451L67.7708 62.2598C70.1649 60.8707 71.6389 58.3126 71.64 55.5447V24.4692C71.6426 21.7041 70.1817 19.144 67.7997 17.7397ZM33.4975 74.07L26.487 69.9991V55.0198C26.4907 53.076 25.4583 51.2775 23.7779 50.3005L15.0237 45.2569C14.1803 44.77 13.1412 44.7705 12.2982 45.2581C11.4552 45.7457 10.9368 46.6464 10.9384 47.6202V60.928L6.21913 58.2333C5.26735 57.6719 4.68151 56.6508 4.67725 55.5458V25.3926L33.4975 42.1227V74.07ZM6.98877 21.3007L33.4962 36.7267V5.93945L6.98877 21.3007ZM38.187 5.93945L64.6872 21.3007L38.187 36.7267V5.93945ZM65.451 58.2333C66.4104 57.6776 67.0029 56.6545 67.0073 55.5458V25.3926L38.187 42.1227V74.07L45.1759 69.9991V55.027C45.1841 53.0789 46.2267 51.2818 47.9138 50.3077L56.6824 45.2641C57.5253 44.7809 58.5619 44.7833 59.4025 45.2705C60.2432 45.7577 60.7606 46.6558 60.7605 47.6274V60.928L65.451 58.2333Z",fill:"#201649"})),P3e=b.forwardRef(A3e),mC=()=>h.jsxs("div",{className:p0.container,children:[h.jsx("div",{className:p0.circle}),h.jsx(P3e,{className:p0.logo})]}),z3e="_root_ribk6_146",F3e="_root__detailed_ribk6_163",qu={root:z3e,"root--active":"_root--active_ribk6_153",root__detailed:F3e},j3e={"de-DE":{headline:"Sicher kaufen",text:"Sei vorsichtig bei Zahlungen im Voraus",cta:"Mehr erfahren"}},g0=Re(j3e),L3e="https://hilfe.nebenan.de/hc/de/articles/32419983997842-Sicher-kaufen-bei-nebenan-de-5-praktische-Tipps",jp=({active:e=!1})=>{const[t,n]=b.useState(!0),i=$e(800),r=Ee.useSnowplowTrack(),a=()=>{r("click",{main:[new Ee.Click({name:"fraud_banner_more_info",value:"clicked"})]})},s=()=>{r("click",{main:[new Ee.Click({name:"fraud_banner_close",value:"clicked"})]}),n(!1)};return t?e?h.jsx(C.Notice,{className:$(qu.root,qu["root--active"]),detailedClassName:qu.root__detailed,icon:{name:"privacy_lock_closed"},size:"medium",headline:g0.headline,color:"pinkLight",dismissible:i!==void 0&&!i,cta:{color:"blue",href:L3e,onClick:a,target:"_blank",text:g0.cta},context:"warning",bodyText:g0.text,variant:"detailed",onDismiss:s}):h.jsx("div",{className:qu.root}):null},I3e="_react-datepicker_156pv_116",R3e="_react-datepicker__day-names_156pv_119",N3e="_react-datepicker__week_156pv_123",D3e="_react-datepicker__day--outside-month_156pv_130",B3e="_react-datepicker__time-container_156pv_139",O3e="_react-datepicker__time_156pv_139",H3e="_react-datepicker__time-box_156pv_142",_3e="_wrapper_156pv_146",W3e="_header_156pv_153",V3e="_navbar_156pv_161",G3e="_banner_156pv_166",U3e="_banner--withChristmasBanner_156pv_174",q3e="_banner--hidden_156pv_177",K3e="_christmasBanner_156pv_181",Z3e="_christmasBanner--active_156pv_189",J3e="_main_156pv_195",Q3e="_contentContainer_156pv_199",Y3e="_contentContainer__withBanner_156pv_205",X3e="_contentContainer__withBanner_156pv_205",$3e="_contentContainer__withChristmasBanner_156pv_208",e6e="_contentContainer__withChristmasBanner_156pv_208",t6e="_contentContainer__withTwoBanner_156pv_211",n6e="_contentContainer__withTwoBanner_156pv_211",i6e="_content_156pv_199",r6e="_mainContent_156pv_221",a6e="_mainContent__isFullWidth_156pv_225",s6e="_mainContent__isFullWidth_156pv_225",o6e="_sidebarRight_156pv_229",l6e="_adSlot_156pv_243",c6e="_adSlot__withBanner_156pv_252",u6e="_adSlot__withBanner_156pv_252",d6e="_adSlot__withChristmasBanner_156pv_255",f6e="_adSlot__withChristmasBanner_156pv_255",h6e="_adSlot__withTwoBanner_156pv_258",m6e="_adSlot__withTwoBanner_156pv_258",p6e="_adSlot--left_156pv_283",g6e="_adSlot--right_156pv_288",tt={"react-datepicker":"_react-datepicker_156pv_116",reactDatepicker:I3e,"react-datepicker__day-names":"_react-datepicker__day-names_156pv_119",reactDatepickerDayNames:R3e,"react-datepicker__week":"_react-datepicker__week_156pv_123",reactDatepickerWeek:N3e,"react-datepicker__day--outside-month":"_react-datepicker__day--outside-month_156pv_130",reactDatepickerDayOutsideMonth:D3e,"react-datepicker__time-container":"_react-datepicker__time-container_156pv_139",reactDatepickerTimeContainer:B3e,"react-datepicker__time":"_react-datepicker__time_156pv_139",reactDatepickerTime:O3e,"react-datepicker__time-box":"_react-datepicker__time-box_156pv_142",reactDatepickerTimeBox:H3e,wrapper:_3e,header:W3e,navbar:V3e,banner:G3e,"banner--withChristmasBanner":"_banner--withChristmasBanner_156pv_174",bannerWithChristmasBanner:U3e,"banner--hidden":"_banner--hidden_156pv_177",bannerHidden:q3e,christmasBanner:K3e,"christmasBanner--active":"_christmasBanner--active_156pv_189",christmasBannerActive:Z3e,main:J3e,contentContainer:Q3e,contentContainer__withBanner:Y3e,contentContainerWithBanner:X3e,contentContainer__withChristmasBanner:$3e,contentContainerWithChristmasBanner:e6e,contentContainer__withTwoBanner:t6e,contentContainerWithTwoBanner:n6e,content:i6e,mainContent:r6e,mainContent__isFullWidth:a6e,mainContentIsFullWidth:s6e,sidebarRight:o6e,adSlot:l6e,adSlot__withBanner:c6e,adSlotWithBanner:u6e,adSlot__withChristmasBanner:d6e,adSlotWithChristmasBanner:f6e,adSlot__withTwoBanner:h6e,adSlotWithTwoBanner:m6e,"adSlot--left":"_adSlot--left_156pv_283",adSlotLeft:p6e,"adSlot--right":"_adSlot--right_156pv_288",adSlotRight:g6e},E4=({banner:e,children:t,enableAdSlots:n,isMainFullWidth:i,leftAdSlot:r,navbar:a,right:s,rightAdSlot:o})=>{const{christmasBannerVariant:l,didRender:c,fraudBannerActive:u}=e,f=c&&!l&&!u,d=(l||u)&&!c,m=(l||u)&&c;return h.jsxs("div",{className:tt.wrapper,children:[n&&h.jsx("div",{className:$(tt.adSlot,tt["adSlot--left"],{[tt.adSlot__withBanner]:f,[tt.adSlot__withChristmasBanner]:d,[tt.adSlot__withTwoBanner]:m}),children:r}),h.jsxs("div",{className:$(tt.contentContainer,{[tt.contentContainer__withBanner]:f,[tt.contentContainer__withChristmasBanner]:d,[tt.contentContainer__withTwoBanner]:m}),children:[h.jsx("header",{className:tt.header,children:h.jsx("nav",{className:tt.navBar,children:a})}),(e.christmasBannerVariant||e.fraudBannerActive)&&h.jsx("div",{className:$(tt.christmasBanner,tt["christmasBanner--active"]),children:u?h.jsx(jp,{active:!0}):h.jsx(Zd,{active:!0})}),h.jsxs("div",{className:$(tt.content),children:[h.jsx("main",{"data-content-width":!0,className:$(tt.mainContent,{[tt.mainContent__isFullWidth]:i}),children:t}),s&&h.jsx("aside",{className:tt.sidebarRight,children:s})]})]}),n&&h.jsx("div",{className:$(tt.adSlot,tt["adSlot--right"],{[tt.adSlot__withBanner]:f,[tt.adSlot__withChristmasBanner]:d,[tt.adSlot__withTwoBanner]:m}),children:o}),(e.christmasBannerVariant||e.fraudBannerActive)&&h.jsx("div",{className:tt.christmasBanner,children:u?h.jsx(jp,{}):h.jsx(Zd,{})}),e.adSlot&&h.jsx("div",{className:$(tt.banner,{[tt["banner--withChristmasBanner"]]:e.christmasBannerVariant||e.fraudBannerActive,[tt["banner--hidden"]]:!e.didRender}),children:e.adSlot})]})};var pC={exports:{}};(()=>{var e={d:(s,o)=>{for(var l in o)e.o(o,l)&&!e.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:o[l]})},o:(s,o)=>Object.prototype.hasOwnProperty.call(s,o),r:s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>a});const n=b;function i(s,o){return function(l){if(Array.isArray(l))return l}(s)||function(l,c){var u=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(u!=null){var f,d,m=[],p=!0,v=!1;try{for(u=u.call(l);!(p=(f=u.next()).done)&&(m.push(f.value),!c||m.length!==c);p=!0);}catch(g){v=!0,d=g}finally{try{p||u.return==null||u.return()}finally{if(v)throw d}}return m}}(s,o)||function(l,c){if(l){if(typeof l=="string")return r(l,c);var u=Object.prototype.toString.call(l).slice(8,-1);return u==="Object"&&l.constructor&&(u=l.constructor.name),u==="Map"||u==="Set"?Array.from(l):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?r(l,c):void 0}}(s,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
913
|
+
Namen und Kommentare auf den Beitrag sind nicht öffentlich sichtbar.`})}),h.jsx("div",{className:bt.copyButton,children:h.jsx(C.CopyLinkButton,{link:v,onClick:E})})]}),z=()=>{var D;(D=i.author_details)!=null&&D.profile_url&&(window.location.href=i.author_details.profile_url,p("click",{click_name:"post_author_profile",section:"marketplace_detail_page"}))};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Ri.galleryContainer,children:h.jsx("div",{className:Ri.imageGallery,children:h.jsx(oC,{images:(i.images||[]).map(D=>typeof D=="string"?D:(D==null?void 0:D.url)||""),reserved:u,stickerSlot:h.jsx(h.Fragment,{})})})}),h.jsxs("div",{className:Ri.card__content,children:[!n&&h.jsx(o2e,{chargebeeProviderConfig:t,postId:`${i.id}`,isMine:a,featureAddons:(i==null?void 0:i.feature_addons)||[]}),h.jsxs("div",{className:bt.root,children:[h.jsx(C.Snackbar,{leftIconLarge:"checkmark_circle",isOpen:l,textLabel:"Link kopiert",onClose:()=>c(!1)}),h.jsx(S1,{title:"Teile diesen öffentlichen Beitrag",handleClose:k,open:s,content:M(),footer:h.jsx("div",{className:bt.modalFooter,children:h.jsx(C.ButtonPrimary,{text:"Link kopieren",onClick:x})})}),h.jsxs("div",{className:bt.root__primary,children:[(i.content_type==="marketplace_free"||i.content_type==="marketplace_sell"&&((F=i.marketplace_details)==null?void 0:F.price_in_cents)!==null)&&h.jsxs("div",{className:bt.top,children:[h.jsx(C.Typography,{type:"h3",className:bt.top__price,children:EM((I=i.marketplace_details)==null?void 0:I.price_in_cents)}),h.jsxs("div",{className:bt.top__actions,children:[!a&&r&&h.jsx(zp,{id:i.id,bookmarked:e}),h.jsx(C.IconButton,{onClick:w,icon:"share_arrow_outline",size:"medium",ariaLabelledBy:"share"})]})]}),h.jsxs("div",{className:bt.top,children:[h.jsx(C.Typography,{type:"h3",className:bt.title,children:i.subject}),i.content_type==="marketplace_sell"&&((A=i.marketplace_details)==null?void 0:A.price_in_cents)===null&&h.jsxs("div",{className:bt.top__actions,children:[!a&&r&&h.jsx(zp,{id:i.id,bookmarked:e}),h.jsx(C.IconButton,{onClick:w,icon:"share_arrow_outline",size:"medium",ariaLabelledBy:"share"})]})]}),h.jsxs("div",{className:bt.bottom,children:[h.jsx(C.Typography,{type:"body-regular",className:bt.bottom__category,"data-testid":"marketplace-body-category",children:((L=(j=i.marketplace_details)==null?void 0:j.category)==null?void 0:L.title)||"Sonstiges"}),h.jsx(C.Typography,{type:"detail-medium",className:bt.bottom__timestamp,children:i.created_at?new Date(i.created_at).toLocaleDateString("de-DE"):""})]})]}),i.author_details&&h.jsx(B2e,{className:bt.actions,handleReserve:T,isReserved:u,author:i.author_details,images:i.images,body:i.body,isFree:g,isMine:a,id:i.id,subject:i.subject}),h.jsx(C.BodyText,{type:"post",bodyText:i.body}),!!((O=i.embeds)!=null&&O.length)&&h.jsx("div",{className:bt.embeds,children:(N=i.embeds)==null?void 0:N.map((D,R)=>h.jsx(Gp,{onClick:()=>window.open(D.cta_url||""),image:{alt:D.title||"",src:D.image_url||""},description:D.description||"",headline:D.title||"",url:D.cta_url||""},R))}),i.author_details&&!a&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:bt.divider,children:h.jsx(C.Divider,{})}),h.jsx(lC,{className:bt.author,author:{children:i.author_details.name,href:i.author_details.profile_url||"#",onClick:z},metadata:i.author_details.hood_title,thumbnail:{badgeIcons:i.author_details.ben?["is_super_neighbour"]:i.author_details.supporter?["is_supporter"]:[],children:h.jsx(C.UserAvatar,{size:"48",alt:i.author_details.name,userImageSrc:i.author_details.picture_url||"",userId:parseInt(i.author_details.associated_gid)||0}),onClick:z,thumbnailType:"badge"}})]})]})]})]})},S4=new Map,uve=async e=>{if(!e)return!1;const t=S4.get(e);if(t!==void 0)return t;const n=(async()=>{try{const i=await He.API.getApi().GET("/api/core/v3/profile",{});if(!i.data)return!1;const r=i.data.id,a=SM(e);return a?a===r:!1}catch(i){return console.error("Error checking author:",i),!1}})();return S4.set(e,n),n},dve="_root_1bugj_146",fve={root:dve},hve=({isAuthenticated:e=!1,section:t})=>{const[n,i]=b.useState([]),{more_cta_text:r,more_cta_url:a,section_headline:s,section_identifier:o}=t,l=`/feed/${a.split("/").pop()}`;return b.useEffect(()=>{if(!e||!t.posts.length)return;const c=t.posts.map(u=>u.id).filter(Boolean);He.API.getApi().GET("/api/core/v3/interactions",{params:{query:{format:"json",post_ids:c.join(",")}}}).then(u=>{if(u.data){const f=u.data.filter(d=>d.bookmark).map(d=>d.hood_message_id);i(f)}}).catch(u=>{console.error("Failed to fetch bookmark status:",u)})},[e,t.posts]),h.jsx(iC,{className:fve.root,category:s,categorySlug:o,categoryLink:l,linkLabel:r,items:t.posts.map(c=>({bookmarked:n.includes(c.id),id:c.id,image:coe(c),price:hoe(c),reserved:!1,reservedText:"Reserviert",timeStamp:c.created_at,title:c.subject}))})};class mve extends b.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{error:t,hasError:!0}}componentDidCatch(t,n){console.error("MarketplaceDetailPage Error:",t,n)}render(){return this.state.hasError?h.jsx(C.EmptyState,{stickerProps:{color:"green",icon:"pin"},size:"large",primaryText:"Etwas ist schiefgelaufen",secondaryText:"Bitte versuche es später erneut oder kontaktiere unseren Support."}):this.props.children}}async function pve({ads:e=[],bookmarked:t,config:n,disablePremiumFeature:i,feedItem:r,isAuthenticated:a=!1,relatedSections:s=[],renderAdSlot:o}){var u;const l=(r==null?void 0:r.level_of_detail)==="not_in_reach",c=a?await uve((u=r==null?void 0:r.author_details)==null?void 0:u.associated_gid):!1;return h.jsx(mve,{children:h.jsxs("div",{className:Ri.root,children:[h.jsx(C.Card,{className:Ri.card,responsive:!0,withoutPadding:!0,children:h.jsxs(C.CardBody,{className:Ri.card__body,withoutPadding:!0,children:[h.jsx(Fge,{className:Ri.card__header,id:r.id,isAuthenticated:a,isMine:c}),l?h.jsx(C.EmptyState,{className:Ri.emptyState,stickerProps:{color:"green",icon:"pin"},size:"large",primaryText:"Dieses Angebot ist außerhalb deiner Nachbarschaft.",secondaryText:"Nutze nebenan.de, um Angebote in deiner direkten Nachbarschaft zu finden."}):h.jsx(cve,{feedItem:r,isAuthenticated:a,bookmarked:t,isMine:c,chargebeeProviderConfig:n.chargebee,disablePremiumFeature:i})]})}),a&&s.length>0&&h.jsxs("div",{className:Ri.relatedSections,children:[s.map((f,d)=>h.jsxs(b.Fragment,{children:[h.jsx(hve,{section:f,isAuthenticated:a}),e&&e[d]&&o&&h.jsx("div",{"data-testid":`marketplace-ad-${d}`,children:o(e[d])})]},`${f.section_identifier}-${d}`)),e&&e.length>s.length&&o&&h.jsx("div",{className:Ri.remainingAds,children:e.slice(s.length).map((f,d)=>h.jsx("div",{children:o(f)},`remaining-ad-${d}`))})]}),e&&e.length>0&&s.length===0&&o&&h.jsx("div",{"data-testid":"marketplace-ads",children:e.map((f,d)=>h.jsx("div",{children:o(f)},`ad-${d}`))}),h.jsx(Ige,{})]})})}const gve=({children:e,navigate:t})=>h.jsx(Uw.Provider,{value:{navigate:t},children:e}),vve="_skeletonGrid_1idld_154",bve="_skeletonCard_1idld_168",wve="_skeletonImageContainer_1idld_176",yve="_skeletonContent_1idld_185",kve="_skeletonPrice_1idld_189",xve="_skeletonTitle_1idld_200",Sve="_skeletonTimestamp_1idld_210",Cve="_shimmer_1idld_219",ai={skeletonGrid:vve,skeletonCard:bve,skeletonImageContainer:wve,skeletonContent:yve,skeletonPrice:kve,skeletonTitle:xve,skeletonTimestamp:Sve,shimmer:Cve},Eve=()=>h.jsxs("div",{className:ai.skeletonCard,children:[h.jsx("div",{className:ai.skeletonImageContainer,children:h.jsx("div",{className:ai.shimmer})}),h.jsxs("div",{className:ai.skeletonContent,children:[h.jsx("div",{className:ai.skeletonPrice,children:h.jsx("div",{className:ai.shimmer})}),h.jsx("div",{className:ai.skeletonTitle,children:h.jsx("div",{className:ai.shimmer})}),h.jsx("div",{className:ai.skeletonTimestamp,children:h.jsx("div",{className:ai.shimmer})})]})]});function Tve({count:e=6}){return h.jsx("div",{className:ai.skeletonGrid,children:Array.from({length:e}).map((t,n)=>h.jsx(Eve,{},`marketplace-skeleton-${n}`))})}function cC({ads:e=[],initialFeedItems:t,onLoadMore:n}){const[i,r]=b.useState(()=>t),[a,s]=b.useState(!0),o=b.useCallback(async()=>{try{const l=i[i.length-1],c=await n(l.content_updated_timestamp);c.hood_messages.length===0?s(!1):r(u=>[...u,...c.hood_messages])}catch(l){console.error("Error loading more feed items:",l)}},[i,n]);return h.jsx(Kp,{dataLength:i.length,next:o,hasMore:a,loader:h.jsx(Tve,{count:6}),endMessage:h.jsx("div",{style:{color:"#666",fontSize:"14px",padding:"60px 20px",textAlign:"center"},children:h.jsx("p",{style:{margin:0},children:"You've reached the end"})}),scrollThreshold:.8,style:{overflow:"visible"},children:h.jsx(nC,{feedItems:i,feedType:"marketplace",viewMode:"grid",ads:e})})}const uC=b.createContext(void 0),dC=({children:e,highlightVariant:t})=>h.jsx(uC.Provider,{value:{highlightVariant:t},children:e}),Mve=()=>{const e=b.useContext(uC);return e||{highlightVariant:null}},Ave="_root_mgcag_146",Pve="_filterSection_mgcag_151",zve="_filterContainer_mgcag_157",Fve="_filterTitle_mgcag_168",jve="_filterControls_mgcag_181",Lve="_filterButton_mgcag_198",Ive="_feedSection_mgcag_227",Pi={root:Ave,filterSection:Pve,filterContainer:zve,filterTitle:Fve,filterControls:jve,filterButton:Lve,feedSection:Ive};function Rve({ads:e,highlightVariant:t=null,initialFeedItems:n,onLoadMore:i}){return h.jsx(dC,{highlightVariant:t,children:h.jsxs("div",{className:Pi.root,children:[h.jsx("div",{className:Pi.filterSection,children:h.jsxs("div",{className:Pi.filterContainer,children:[h.jsx("h2",{className:Pi.filterTitle,children:"Marketplace"}),h.jsxs("div",{className:Pi.filterControls,children:[h.jsx("button",{className:Pi.filterButton,children:"All Categories"}),h.jsx("button",{className:Pi.filterButton,children:"Price Range"}),h.jsx("button",{className:Pi.filterButton,children:"Location"}),h.jsx("button",{className:Pi.filterButton,children:"Sort By"})]})]})}),h.jsx("div",{className:Pi.feedSection,children:h.jsx(cC,{initialFeedItems:n,ads:e,onLoadMore:i})})]})})}const Nve="_react-datepicker_1t4mq_116",Dve="_react-datepicker__day-names_1t4mq_119",Bve="_react-datepicker__week_1t4mq_123",Ove="_react-datepicker__day--outside-month_1t4mq_130",Hve="_react-datepicker__time-container_1t4mq_139",_ve="_react-datepicker__time_1t4mq_139",Wve="_react-datepicker__time-box_1t4mq_142",Vve="_root_1t4mq_146",Gve="_root--positive_1t4mq_158",Uve="_root--negative_1t4mq_161",qve="_root--active_1t4mq_164",f0={"react-datepicker":"_react-datepicker_1t4mq_116",reactDatepicker:Nve,"react-datepicker__day-names":"_react-datepicker__day-names_1t4mq_119",reactDatepickerDayNames:Dve,"react-datepicker__week":"_react-datepicker__week_1t4mq_123",reactDatepickerWeek:Bve,"react-datepicker__day--outside-month":"_react-datepicker__day--outside-month_1t4mq_130",reactDatepickerDayOutsideMonth:Ove,"react-datepicker__time-container":"_react-datepicker__time-container_1t4mq_139",reactDatepickerTimeContainer:Hve,"react-datepicker__time":"_react-datepicker__time_1t4mq_139",reactDatepickerTime:_ve,"react-datepicker__time-box":"_react-datepicker__time-box_1t4mq_142",reactDatepickerTimeBox:Wve,root:Vve,"root--positive":"_root--positive_1t4mq_158",rootPositive:Gve,"root--negative":"_root--negative_1t4mq_161",rootNegative:Uve,"root--active":"_root--active_1t4mq_164",rootActive:qve},Kve=(e,t)=>y.createElement("svg",{width:40,height:40,viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("circle",{cx:20,cy:20,r:12.25,stroke:"currentColor",strokeWidth:1.5,fill:"white"}),y.createElement("circle",{cx:16.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("circle",{cx:23.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("path",{d:"M25 26C25 26 23 24 20 24C17 24 15 26 15 26",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",fill:"none"})),Zve=b.forwardRef(Kve),Jve=(e,t)=>y.createElement("svg",{width:40,height:40,viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("circle",{cx:20,cy:20,r:12.25,stroke:"currentColor",strokeWidth:1.5,fill:"white"}),y.createElement("circle",{cx:16.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("circle",{cx:23.5,cy:17.5,r:1.5,fill:"currentColor"}),y.createElement("path",{d:"M25 24C25 24 23 27 20 27C17 27 15 24 15 24",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",fill:"none"})),Qve=b.forwardRef(Jve),Fp=({ariaLabel:e,className:t,disabled:n,isActive:i,onClick:r,variant:a})=>h.jsx(C.Button,{ariaLabel:e,className:$(f0.root,t,f0[`root--${a}`],{[f0["root--active"]]:i}),disabled:n,onClick:r,selected:i,children:h.jsx("span",{children:a==="positive"?h.jsx(Qve,{}):h.jsx(Zve,{})})}),Yve="_root_1dg99_146",Xve="_buttons_1dg99_155",C4={root:Yve,buttons:Xve},$ve=({className:e,disabled:t,dismissLabel:n="Close feedback card",mode:i,onDismiss:r,onSelectMode:a,question:s})=>{const o=i==="negative",l=i==="positive";return h.jsxs("div",{className:$(e,C4.root),children:[h.jsx(C.Typography,{type:"detail-medium",as:"h4",children:s}),h.jsxs("div",{className:C4.buttons,children:[h.jsx(Fp,{isActive:o,onClick:()=>a("negative"),variant:"negative",disabled:t}),h.jsx(Fp,{isActive:l,onClick:()=>a("positive"),variant:"positive",disabled:t}),!!r&&h.jsx(C.IconButton,{icon:"cross",variant:"none",size:"small",onClick:r,ariaLabel:n})]})]})};function e3e(e){e.__scriptingEnabledHTMLContentHasBeenExecuted=!0}const t3e=`(${e3e.toString()})(document.currentScript);`,fC=b.forwardRef((e,t)=>{const n=b.useRef(null);return b.useImperativeHandle(t,()=>({get hasBeenExecuted(){const i=n.current;return i?!!i.__scriptingEnabledHTMLContentHasBeenExecuted:!1}})),h.jsx("script",{ref:n,dangerouslySetInnerHTML:{__html:t3e}})});fC.displayName="InnerHTMLScript";const n3e=(e,t)=>{const n=document.createRange().createContextualFragment(t);e.innerHTML="",e.appendChild(n)},i3e=({html:e,...t})=>{const n=b.useRef(null),i=b.useRef(null);return b.useEffect(()=>{const r=i.current,a=n.current;!r||!a||a.hasBeenExecuted||n3e(r,e)},[e]),h.jsxs(h.Fragment,{children:[h.jsx(fC,{ref:n}),h.jsx("div",{...t,ref:i,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:e}})]})},r3e="_imageGallery_1awa3_146",a3e="_imageGalleryImage_1awa3_152",s3e="_imageGalleryPill_1awa3_160",h0={imageGallery:r3e,imageGalleryImage:a3e,imageGalleryPill:s3e},o3e=({gallerySize:e,imageAlt:t,imageURL:n,onClick:i})=>{let r;if(e>1){const a=`+${e-1}`;r=h.jsx("div",{className:h0.imageGalleryPill,children:h.jsx(C.LabelPill,{label:a,shape:"tile",size:"medium"})})}return h.jsxs("div",{className:h0.imageGallery,onClick:i,children:[h.jsx(C.Image,{alt:t,src:n,className:h0.imageGalleryImage}),r]})},l3e=async(e,t)=>{try{await Ie.inviteFeedEvent({id:e,inviteeId:[t]})}catch(n){console.error("Error fetching invitees:",n)}},c3e=({id:e,invitees:t})=>{const[n,i]=b.useState(new Set),[r,a]=b.useState(!1),[s,o]=b.useState(""),l=({fullName:c,userId:u})=>{i(f=>new Set(f).add(u)),(async()=>await l3e(e,u))(),a(!1),o(`${c} wurde eingeladen!`),setTimeout(()=>{a(!0)},0)};return h.jsxs("ul",{children:[t.map(c=>h.jsx("li",{children:h.jsx(C.ListItem,{type:If.neighbour,data:{address:c.address,altText:c.altText,callToAction:{disabled:c.invited||n.has(c.userId),label:c.invited||n.has(c.userId)?"Eingeladen":"Einladen",onClick:()=>l(c),size:"small"},fullName:c.fullName,imageUrl:c.imageUrl,profileUrl:c.profileUrl,userId:c.userId}})},c.userId)),h.jsx(C.Snackbar,{isOpen:r,textLabel:s,leftIconSmall:"checkmark_circle",hideDuration:2e3,isNested:!0})]})},u3e=async(e,t,n)=>{try{return(await He.API.getApi().GET("/api/core/v3/event/posts/{post_id}/prospects",{params:{path:{post_id:e},query:{after:n,limit:"20",query:t}}})).data}catch(i){console.error("Error fetching invitees:",i)}},d3e=e=>!e||!e.length?[]:e.map(t=>({address:"",altText:`${t.name} profile image`,fullName:t.name,imageUrl:t.picture_url,profileUrl:`${t.profile_url}`,userId:Vw(t.gid)})),f3e=({postId:e})=>{const[t,n]=b.useState(!0),[i,r]=b.useState(""),[a,s]=b.useState([]),[o,l]=b.useState(null),[c,u]=b.useState(!1),[f,d]=b.useState(!1),m=b.useCallback(async(g,w=null,k=!1)=>{var x,T;d(!0);try{const E=await u3e(e,g,w),M=d3e(E==null?void 0:E.page);s(z=>k?M:[...z,...M]),l(((x=E==null?void 0:E.page_info)==null?void 0:x.end_cursor)||null),u(((T=E==null?void 0:E.page_info)==null?void 0:T.has_next_page)||!1)}catch(E){console.error("Failed to load invitees",E)}finally{d(!1)}},[e]);b.useEffect(()=>{m(i,null,!0)},[i,m]);const p=()=>{n(!1)},v=()=>{!c||f||m(i,o)};return h.jsx(Zp,{open:t,inputProps:{label:"Nachbarn einladen",size:"medium"},headerProps:{title:"Nachbarn einladen"},contentProps:{content:h.jsx(c3e,{id:e,invitees:a}),length:a.length,loadMore:v,loading:f},onDismiss:p,setQuery:r})},h3e="_container_foscf_146",m3e="_cardBody_foscf_159",p3e="_header_foscf_162",g3e="_center_foscf_166",v3e="_stickerWrapper_foscf_170",b3e="_avatarClusterWrapper_foscf_175",w3e="_inviteInfoWrapper_foscf_178",y3e="_communityInviteInfo_foscf_181",k3e="_actions_foscf_185",x3e="_buttonProfile_foscf_207",li={container:h3e,cardBody:m3e,header:p3e,center:g3e,stickerWrapper:v3e,avatarClusterWrapper:b3e,inviteInfoWrapper:w3e,communityInviteInfo:y3e,actions:k3e,buttonProfile:x3e},hC={"de-DE":{already_joined:"sind schon dabei. Lade weitere Nachbar:innen ein und bring mehr Leben in die Runde.",call_to_action_invite:"Lade deine Nachbar:innen ein und mach den ersten Schritt.",first_user_welcome:"Du bist eine:r der Ersten hier - das Miteinander beginnt mit dir!",invite_neighbors:"Lade deine Nachbar:innen ein und mach den ersten Schritt.",more_people_together:"Mehr Menschen, mehr Miteinander!",no_users_yet:"In deiner Nachbarschaft ist noch nicht viel los. Lade weitere Nachbar:innen ein und bring mehr Leben in die Runde.",print_invitation:"Einladung ausdrucken",share_invitation_link:"Einladungslink teilen"}},Uu=Re(hC),S3e=({onMoreClick:e,onProfileClick:t,users:n})=>n.length===0?h.jsxs("div",{className:li.communityInviteInfo,children:[h.jsx(C.Typography,{className:$(li.header,li.center),type:"h3",children:Uu.first_user_welcome}),h.jsx(C.Typography,{type:"body-regular",children:Uu.call_to_action_invite})]}):n.length<=3?h.jsx(C.Typography,{type:"body-regular",children:Uu.no_users_yet}):h.jsxs(C.Typography,{type:"body-regular",children:[n.slice(0,3).map((i,r)=>h.jsxs(C.Button,{className:li.buttonProfile,onClick:()=>t==null?void 0:t(i.id),children:[h.jsxs(C.Typography,{type:"body-text-link",children:[i.firstname," ",i.lastname.charAt(0),"."]}),r<2&&", "]},r))," ","und"," ",h.jsx(C.Button,{onClick:e,children:h.jsxs(C.Typography,{type:"body-text-link",children:[n.length-4," weitere"]})})," ",Uu.already_joined]}),m0=Re(hC),C3e=({onMoreClick:e,onPrintInvitationClick:t,onProfileClick:n,onShareInvitationClick:i,users:r})=>{const a=()=>r.length>0&&h.jsx(C.Typography,{className:li.header,type:"h3",children:m0.more_people_together}),s=()=>r.length===0?h.jsx("div",{className:li.stickerWrapper,children:h.jsx(C.Sticker,{icon:"invite_neighbour",color:"orange",size:"large"})}):h.jsx("div",{className:li.avatarClusterWrapper,children:h.jsx(C.UserAvatarCluster,{size:"large",onAvatarClick:n,onMoreClick:e,users:r})});return h.jsx(C.Card,{responsive:!0,className:li.container,withoutPadding:!0,children:h.jsxs(C.CardBody,{withoutPadding:!0,className:li.cardBody,children:[a(),s(),h.jsx("div",{className:li.inviteInfoWrapper,children:h.jsx(S3e,{users:r,onMoreClick:e,onProfileClick:n})}),h.jsxs("div",{className:li.actions,children:[h.jsx(C.ButtonTertiary,{onClick:t,color:"blue",rightIcon:h.jsx(C.Icon,{name:"paper_form"}),text:m0.print_invitation}),h.jsx(C.ButtonPrimary,{onClick:i,text:m0.share_invitation_link,rightIcon:h.jsx(C.Icon,{name:"link"})})]})]})})},E3e="_container_qsags_146",T3e="_circle_qsags_154",M3e="_logo_qsags_162",p0={container:E3e,circle:T3e,logo:M3e},A3e=(e,t)=>y.createElement("svg",{width:72,height:80,viewBox:"0 0 72 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.7997 17.7397L39.7431 1.45626C37.3242 0.0510383 34.3374 0.0510383 31.9184 1.45626L3.87632 17.7397C1.48151 19.136 0.00627151 21.6971 0 24.4692V55.5447C0.0040404 58.3136 1.48055 60.8715 3.87632 62.2598L15.5846 69.0614V50.9839L21.4279 54.3414C21.6617 54.4879 21.8054 54.7428 21.8097 55.0187V72.6783L31.8968 78.5576C34.3242 79.9506 37.3085 79.9506 39.7359 78.5576L49.823 72.6783V55.0187C49.8291 54.7396 49.9789 54.4834 50.2193 54.3414L56.0554 50.9839V69.0614L60.7315 66.3451L67.7708 62.2598C70.1649 60.8707 71.6389 58.3126 71.64 55.5447V24.4692C71.6426 21.7041 70.1817 19.144 67.7997 17.7397ZM33.4975 74.07L26.487 69.9991V55.0198C26.4907 53.076 25.4583 51.2775 23.7779 50.3005L15.0237 45.2569C14.1803 44.77 13.1412 44.7705 12.2982 45.2581C11.4552 45.7457 10.9368 46.6464 10.9384 47.6202V60.928L6.21913 58.2333C5.26735 57.6719 4.68151 56.6508 4.67725 55.5458V25.3926L33.4975 42.1227V74.07ZM6.98877 21.3007L33.4962 36.7267V5.93945L6.98877 21.3007ZM38.187 5.93945L64.6872 21.3007L38.187 36.7267V5.93945ZM65.451 58.2333C66.4104 57.6776 67.0029 56.6545 67.0073 55.5458V25.3926L38.187 42.1227V74.07L45.1759 69.9991V55.027C45.1841 53.0789 46.2267 51.2818 47.9138 50.3077L56.6824 45.2641C57.5253 44.7809 58.5619 44.7833 59.4025 45.2705C60.2432 45.7577 60.7606 46.6558 60.7605 47.6274V60.928L65.451 58.2333Z",fill:"#201649"})),P3e=b.forwardRef(A3e),mC=()=>h.jsxs("div",{className:p0.container,children:[h.jsx("div",{className:p0.circle}),h.jsx(P3e,{className:p0.logo})]}),z3e="_root_8zegc_146",F3e="_root__detailed_8zegc_179",qu={root:z3e,"root--active":"_root--active_8zegc_153",root__detailed:F3e},j3e={"de-DE":{headline:"Sicher kaufen",text:"Sei vorsichtig bei Zahlungen im Voraus",cta:"Mehr erfahren"}},g0=Re(j3e),L3e="https://hilfe.nebenan.de/hc/de/articles/32419983997842-Sicher-kaufen-bei-nebenan-de-5-praktische-Tipps",jp=({active:e=!1})=>{const[t,n]=b.useState(!0),i=$e(800),r=Ee.useSnowplowTrack(),a=()=>{r("click",{main:[new Ee.Click({name:"fraud_banner_more_info",value:"clicked"})]})},s=()=>{r("click",{main:[new Ee.Click({name:"fraud_banner_close",value:"clicked"})]}),n(!1)};return t?e?h.jsx(C.Notice,{className:$(qu.root,qu["root--active"]),detailedClassName:qu.root__detailed,icon:{name:"privacy_lock_closed"},size:"medium",headline:g0.headline,color:"pinkLight",dismissible:i!==void 0&&!i,cta:{color:"blue",href:L3e,onClick:a,target:"_blank",text:g0.cta},context:"warning",bodyText:g0.text,variant:"detailed",onDismiss:s}):h.jsx("div",{className:qu.root}):null},I3e="_react-datepicker_156pv_116",R3e="_react-datepicker__day-names_156pv_119",N3e="_react-datepicker__week_156pv_123",D3e="_react-datepicker__day--outside-month_156pv_130",B3e="_react-datepicker__time-container_156pv_139",O3e="_react-datepicker__time_156pv_139",H3e="_react-datepicker__time-box_156pv_142",_3e="_wrapper_156pv_146",W3e="_header_156pv_153",V3e="_navbar_156pv_161",G3e="_banner_156pv_166",U3e="_banner--withChristmasBanner_156pv_174",q3e="_banner--hidden_156pv_177",K3e="_christmasBanner_156pv_181",Z3e="_christmasBanner--active_156pv_189",J3e="_main_156pv_195",Q3e="_contentContainer_156pv_199",Y3e="_contentContainer__withBanner_156pv_205",X3e="_contentContainer__withBanner_156pv_205",$3e="_contentContainer__withChristmasBanner_156pv_208",e6e="_contentContainer__withChristmasBanner_156pv_208",t6e="_contentContainer__withTwoBanner_156pv_211",n6e="_contentContainer__withTwoBanner_156pv_211",i6e="_content_156pv_199",r6e="_mainContent_156pv_221",a6e="_mainContent__isFullWidth_156pv_225",s6e="_mainContent__isFullWidth_156pv_225",o6e="_sidebarRight_156pv_229",l6e="_adSlot_156pv_243",c6e="_adSlot__withBanner_156pv_252",u6e="_adSlot__withBanner_156pv_252",d6e="_adSlot__withChristmasBanner_156pv_255",f6e="_adSlot__withChristmasBanner_156pv_255",h6e="_adSlot__withTwoBanner_156pv_258",m6e="_adSlot__withTwoBanner_156pv_258",p6e="_adSlot--left_156pv_283",g6e="_adSlot--right_156pv_288",tt={"react-datepicker":"_react-datepicker_156pv_116",reactDatepicker:I3e,"react-datepicker__day-names":"_react-datepicker__day-names_156pv_119",reactDatepickerDayNames:R3e,"react-datepicker__week":"_react-datepicker__week_156pv_123",reactDatepickerWeek:N3e,"react-datepicker__day--outside-month":"_react-datepicker__day--outside-month_156pv_130",reactDatepickerDayOutsideMonth:D3e,"react-datepicker__time-container":"_react-datepicker__time-container_156pv_139",reactDatepickerTimeContainer:B3e,"react-datepicker__time":"_react-datepicker__time_156pv_139",reactDatepickerTime:O3e,"react-datepicker__time-box":"_react-datepicker__time-box_156pv_142",reactDatepickerTimeBox:H3e,wrapper:_3e,header:W3e,navbar:V3e,banner:G3e,"banner--withChristmasBanner":"_banner--withChristmasBanner_156pv_174",bannerWithChristmasBanner:U3e,"banner--hidden":"_banner--hidden_156pv_177",bannerHidden:q3e,christmasBanner:K3e,"christmasBanner--active":"_christmasBanner--active_156pv_189",christmasBannerActive:Z3e,main:J3e,contentContainer:Q3e,contentContainer__withBanner:Y3e,contentContainerWithBanner:X3e,contentContainer__withChristmasBanner:$3e,contentContainerWithChristmasBanner:e6e,contentContainer__withTwoBanner:t6e,contentContainerWithTwoBanner:n6e,content:i6e,mainContent:r6e,mainContent__isFullWidth:a6e,mainContentIsFullWidth:s6e,sidebarRight:o6e,adSlot:l6e,adSlot__withBanner:c6e,adSlotWithBanner:u6e,adSlot__withChristmasBanner:d6e,adSlotWithChristmasBanner:f6e,adSlot__withTwoBanner:h6e,adSlotWithTwoBanner:m6e,"adSlot--left":"_adSlot--left_156pv_283",adSlotLeft:p6e,"adSlot--right":"_adSlot--right_156pv_288",adSlotRight:g6e},E4=({banner:e,children:t,enableAdSlots:n,isMainFullWidth:i,leftAdSlot:r,navbar:a,right:s,rightAdSlot:o})=>{const{christmasBannerVariant:l,didRender:c,fraudBannerActive:u}=e,f=c&&!l&&!u,d=(l||u)&&!c,m=(l||u)&&c;return h.jsxs("div",{className:tt.wrapper,children:[n&&h.jsx("div",{className:$(tt.adSlot,tt["adSlot--left"],{[tt.adSlot__withBanner]:f,[tt.adSlot__withChristmasBanner]:d,[tt.adSlot__withTwoBanner]:m}),children:r}),h.jsxs("div",{className:$(tt.contentContainer,{[tt.contentContainer__withBanner]:f,[tt.contentContainer__withChristmasBanner]:d,[tt.contentContainer__withTwoBanner]:m}),children:[h.jsx("header",{className:tt.header,children:h.jsx("nav",{className:tt.navBar,children:a})}),(e.christmasBannerVariant||e.fraudBannerActive)&&h.jsx("div",{className:$(tt.christmasBanner,tt["christmasBanner--active"]),children:u?h.jsx(jp,{active:!0}):h.jsx(Zd,{active:!0})}),h.jsxs("div",{className:$(tt.content),children:[h.jsx("main",{"data-content-width":!0,className:$(tt.mainContent,{[tt.mainContent__isFullWidth]:i}),children:t}),s&&h.jsx("aside",{className:tt.sidebarRight,children:s})]})]}),n&&h.jsx("div",{className:$(tt.adSlot,tt["adSlot--right"],{[tt.adSlot__withBanner]:f,[tt.adSlot__withChristmasBanner]:d,[tt.adSlot__withTwoBanner]:m}),children:o}),(e.christmasBannerVariant||e.fraudBannerActive)&&h.jsx("div",{className:tt.christmasBanner,children:u?h.jsx(jp,{}):h.jsx(Zd,{})}),e.adSlot&&h.jsx("div",{className:$(tt.banner,{[tt["banner--withChristmasBanner"]]:e.christmasBannerVariant||e.fraudBannerActive,[tt["banner--hidden"]]:!e.didRender}),children:e.adSlot})]})};var pC={exports:{}};(()=>{var e={d:(s,o)=>{for(var l in o)e.o(o,l)&&!e.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:o[l]})},o:(s,o)=>Object.prototype.hasOwnProperty.call(s,o),r:s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>a});const n=b;function i(s,o){return function(l){if(Array.isArray(l))return l}(s)||function(l,c){var u=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(u!=null){var f,d,m=[],p=!0,v=!1;try{for(u=u.call(l);!(p=(f=u.next()).done)&&(m.push(f.value),!c||m.length!==c);p=!0);}catch(g){v=!0,d=g}finally{try{p||u.return==null||u.return()}finally{if(v)throw d}}return m}}(s,o)||function(l,c){if(l){if(typeof l=="string")return r(l,c);var u=Object.prototype.toString.call(l).slice(8,-1);return u==="Object"&&l.constructor&&(u=l.constructor.name),u==="Map"||u==="Set"?Array.from(l):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?r(l,c):void 0}}(s,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
914
914
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function r(s,o){(o==null||o>s.length)&&(o=s.length);for(var l=0,c=new Array(o);l<o;l++)c[l]=s[l];return c}const a=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:300,o=arguments.length>1?arguments[1]:void 0,l=(0,n.useState)(o),c=i(l,2),u=c[0],f=c[1];return(0,n.useEffect)(function(){var d=function(){var m=window.screen.height-s>window.visualViewport.height;u!=m&&f(m)};return typeof visualViewport<"u"&&window.visualViewport.addEventListener("resize",d),function(){typeof visualViewport<"u"&&window.visualViewport.removeEventListener("resize",d)}},[]),u};pC.exports=t})();var v6e=pC.exports;const b6e=Fn(v6e),w6e="_mobileLayout_11idt_146",y6e="_mobileLayoutHeader_11idt_151",k6e="_header_11idt_158",x6e="_mobileLayoutMain_11idt_161",S6e="_mobileLayoutMainWithFooter_11idt_168",C6e="_mobileLayoutActionButton_11idt_171",E6e="_mobileLayoutFooter_11idt_179",T6e="_stickyHeader_11idt_189",M6e="_sticky_11idt_189",A6e="_adSlot_11idt_200",P6e="_hideAdSlot_11idt_210",ti={mobileLayout:w6e,mobileLayoutHeader:y6e,header:k6e,mobileLayoutMain:x6e,mobileLayoutMainWithFooter:S6e,mobileLayoutActionButton:C6e,mobileLayoutFooter:E6e,stickyHeader:T6e,sticky:M6e,adSlot:A6e,hideAdSlot:P6e},T4=50,z6e=100,F6e=e=>{const[t,n]=b.useState(!1),i=b.useRef(0),r=b.useRef(0);return b.useEffect(()=>{if(!e){n(!1);return}const a=()=>{const s=window.scrollY,o=s>i.current,l=s<i.current;if(s<T4){n(!1);return}o&&s>T4?(n(!0),r.current=0):l&&r.current===0&&(r.current=s),l&&r.current-s>=z6e&&(n(!1),r.current=0),i.current=s};return window.addEventListener("scroll",a),()=>{window.removeEventListener("scroll",a)}},[e]),t},Lp=({action:e,adSlot:t,adSlotEnabled:n=!1,banner:i,children:r,christmasBannerVariant:a,footer:s,fraudBannerActive:o,header:l,hideHeaderOnScroll:c=!0,showFooter:u=!0})=>{const f=b6e(),d=F6e(c),m=b.useRef(null),[p,v]=b.useState(0);return b.useEffect(()=>{if(!m.current||!n){v(0);return}const g=m.current,w=new ResizeObserver(k=>{const x=k[0];x&&x.contentRect&&v(x.contentRect.height+16)});return w.observe(g),()=>w.disconnect()},[n,t]),h.jsxs("section",{className:ti.mobileLayout,style:{"--anchor-ad-wrapper-height":`${p}px`},children:[h.jsxs("header",{className:$(ti.stickyHeader,ti.mobileLayoutHeader,{[ti.sticky]:d}),children:[h.jsx("div",{className:$(ti.header),children:l}),t&&h.jsx("div",{ref:m,className:$(ti.adSlot,{[ti.hideAdSlot]:!n}),children:t})]}),h.jsxs("main",{"data-content-width":!0,className:$(ti.mobileLayoutMain,{[ti.mobileLayoutMainWithFooter]:u}),tabIndex:0,children:[o?h.jsx(jp,{active:!0}):a?h.jsx(Zd,{variant:a,active:!0}):null,i,r]}),u&&h.jsxs(h.Fragment,{children:[e&&!f&&h.jsx("div",{className:ti.mobileLayoutActionButton,children:e}),h.jsx("footer",{className:ti.mobileLayoutFooter,children:s})]})]})},j6e="_loadingSpinnerContainer_to7w3_146",L6e="_mobileContainer_to7w3_153",I6e="_desktopContainer_to7w3_162",v0={loadingSpinnerContainer:j6e,mobileContainer:L6e,desktopContainer:I6e},R6e=({children:e,desktop:t,initialIsMobile:n,keepLoading:i,mobile:r})=>{const[a,s]=b.useState(n??null);return b.useEffect(()=>{const o=()=>{s(window.innerWidth<800)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),i?h.jsx("div",{className:v0.loadingSpinnerContainer,children:h.jsx(mC,{})}):a===null?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:v0.mobileContainer,children:r.withoutMobileLayout?h.jsx("main",{"data-content-width":!0,children:e}):h.jsx(Lp,{...r,children:e})}),h.jsx("div",{className:v0.desktopContainer,children:h.jsx(E4,{...t,children:e})})]}):a?r.withoutMobileLayout?h.jsx("main",{children:e},"mobile-main"):h.jsx(Lp,{...r,children:e},"mobile-layout"):h.jsx(E4,{...t,children:e},"desktop-layout")};var N6e=D6e;function D6e(e){if(e)throw e}/*!
|
|
915
915
|
* Determine if an object is a Buffer
|
|
916
916
|
*
|