PageSourceSearch

https://www.leadingcampings.com/assets/js/raccoon-core-objects-dialog.bundle.js?v=f69d39b045adb413859d

js leadingcampings.com collected 2026-10-04 14:08:07 UTC 17,165 bytes, 1 lines download raw bytes

1(self.webpackChunkrqn_cms_leading_campings=self.webpackChunkrqn_cms_leading_campings||[]).push([[9058],{4453(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(4848),s=n(6540),a=n(4164),l=n(8670),o=n(2490),i=n(9619),c=n(5996),d=n.n(c),u=n(9165),f=n(164),m=n(7360);const p=({data:e,handleToast:t,handleToastClose:n,...s})=>(0,r.jsx)(f.P.div,{initial:{opacity:1,x:"105%"},animate:{opacity:1,x:["105%","-10%","0%"]},exit:{opacity:0,x:"100%"},transition:{duration:.5,delay:e.toastDelay},className:"fixed top-0 right-0 p-4 z-50 !z-dialog !z-modal",children:(0,r.jsxs)("div",{className:"px-5 py-3 bg-white rounded-lg shadow-lg !shadow-outer flex flex-col items-start justify-start gap-2 relative max-w-sm",children:[(0,r.jsx)("button",{className:"absolute top-0 right-0 size-10 flex items-center justify-center p-1",onClick:n,children:(0,r.jsx)(d(),{path:u.hyP,size:.8,className:"text-gray-500 hover:text-gray-700 transition-colors"})}),e.toastCustomContent?(0,r.jsx)(o.U,{node:s.node,name:"rqnToast",children:s.children}):(0,r.jsxs)("div",{className:"flex items-start justify-start gap-2",children:[(0,r.jsx)("div",{className:"w-10 flex items-start justify-start shrink-0",children:(0,r.jsx)(f.P.div,{initial:{y:0},animate:{x:[0,-5,0,5,0],rotate:[0,-10,10,-10,10,0]},transition:{ease:"linear",delay:3,duration:.4,repeat:1/0,repeatDelay:2},children:(0,r.jsx)(d(),{path:u.V$e,size:1.4,className:"text-brand-2"})})}),(0,r.jsxs)("div",{className:"flex flex-col items-start justify-center",children:[(0,r.jsx)("b",{className:"text-base font-bold",children:e.toastHeadline}),(0,r.jsx)("span",{className:"text-sm leading-normal",children:e.toastInfo})]})]}),e.toastButtonShow&&e.toastButtonOpenDialog&&(0,r.jsx)("button",{className:"text-gray-500 text-sm underline hover:no-underline pl-12",onClick:t,children:e.toastButtonLabel}),e.toastButtonShow&&!e.toastButtonOpenDialog&&(0,r.jsx)(m.N,{linkObj:e.toastButtonLink,className:"text-gray-500 text-sm underline hover:no-underline pl-12",children:e.toastButtonLabel})]})});var x=n(979);const h=({openCounter:e,isClosedManually:t,data:n,setIsOpen:s,handleReset:a})=>(0,r.jsx)(x.i,{children:(0,r.jsxs)("div",{className:"w-full flex flex-col items-center justify-between gap-2 py-4 font-normal",children:[(0,r.jsx)("div",{className:"flex items-center rqn-text-xl rqn-brand-2 font-bold mb-1",children:"rqnDialog"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsxs)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:[e,"x"]}),(0,r.jsx)("span",{className:"text-sm",children:"geöffnet"})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsx)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:t?"Ja":"Nein"}),(0,r.jsx)("span",{className:"text-sm",children:"manuell geschlossen"})]})]}),(0,r.jsx)("div",{className:"flex items-center rqn-text-xl rqn-brand-2 font-bold mb-1 mt-2",children:"Einstellungen"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsxs)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:[n.maxOpenCount,"x"]}),(0,r.jsx)("span",{className:"text-sm",children:"max. Öffnungen"})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsx)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:n.discardManually?"Ja":"Nein"}),(0,r.jsx)("span",{className:"text-sm",children:"Öffnen manuell verhindern"})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsxs)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:[n.autoOpenTime," Sek."]}),(0,r.jsx)("span",{className:"text-sm",children:"Auto Öffnungszeit"})]})]}),(0,r.jsx)("div",{className:"flex items-center rqn-text-xl rqn-brand-2 font-bold mb-1 mt-2",children:"Toast"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsx)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:n.showToast?"Ja":"Nein"}),(0,r.jsx)("span",{className:"text-sm",children:"Anzeige"})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-3 px-3 rounded-lg border border-solid rqn-border-brand-2 text-center",children:[(0,r.jsxs)("span",{className:"rqn-text-lg font-bold rqn-text-brand-2",children:[n.toastDelay," Sek."]}),(0,r.jsx)("span",{className:"text-sm",children:"Verzögerung"})]})]}),(0,r.jsxs)("button",{className:"flex items-center gap-2 mt-3 px-4 py-3 rqn-bg-brand-2 text-white font-bold rounded-lg hover:rqn-bg-green-500",onClick:()=>s(!0),children:[(0,r.jsx)(d(),{path:u.O_k,size:1})," Manuell öffnen"]}),(0,r.jsxs)("button",{className:"flex items-center gap-2 mt-3 px-4 py-3 rqn-bg-brand-2 text-white font-bold rounded-lg hover:rqn-bg-green-500",onClick:a,children:[(0,r.jsx)(d(),{path:u.wKl,size:1})," Zähler zurücksetzen"]})]})});var b=n(8063);const g=e=>
1{const t=e.node.cmsObjectData,[n,c]=(0,s.useState)(!1),[f,m]=(0,s.useState)(t.showToast),[x,g]=(0,s.useState)(!1),[y,j]=(0,s.useState)(0),[v,N]=(0,s.useState)(!0);(0,s.useEffect)(()=>{const e=localStorage.getItem("rqnDialog");let n={closedManually:!1,counter:0};if(e)try{const t=JSON.parse(e);t&&t.rqnDialog&&(n=t.rqnDialog)}catch(e){}else localStorage.setItem("rqnDialog",JSON.stringify({rqnDialog:n}));j(n.counter),g(n.closedManually);const r=0===t.maxOpenCount||n.counter>=t.maxOpenCount,s=n.closedManually&&t.discardManually;if(N(!r&&!s),!t.showToast&&!r&&!s){const e=setTimeout(()=>{q()},1e3*t.autoOpenTime);return()=>clearTimeout(e)}},[]),(0,s.useEffect)(()=>{localStorage.setItem("rqnDialog",JSON.stringify({rqnDialog:{closedManually:x,counter:y}}));const e=0===t.maxOpenCount||y>=t.maxOpenCount,n=x&&t.discardManually;N(!e&&!n)},[x,y,t.maxOpenCount,t.discardManually]);const q=()=>{v&&(c(!0),m(!1),j(e=>e+1),(0,b.A)("modal-open",{val:t.analyticsName||"rqnDialog"}))},w=()=>{c(!1),g(!0),(0,b.A)("modal-close",{val:t.analyticsName||"rqnDialog"})},O=(0,l.u)("rqnDialog.root",t,"relative z-50 !z-dialog !z-modal"),S=(0,a.A)((0,l.u)("rqnDialog.panel",t,"w-full max-w-screen-lg max-h-full overflow-y-auto space-y-4 bg-white p-4 md:p-6 lg:p-8 rounded-xl shadow-lg z-20 relative"),{[`!bg-${t.backgroundColor}`]:t.backgroundColor}),k=(0,l.u)("rqnDialog.backdrop",t,"absolute inset-0 bg-black/50 z-10"),C=(0,l.u)("rqnDialog.backdrop",t,"size-10 rounded-full absolute top-4 right-4 flex items-center justify-center  focus-visible:outline-2 focus-visible:outline-brand-2 focus-visible:outline-offset-4 focus-visible:bg-brand-2 focus-visible:text-white transition-all"),D=(0,a.A)((0,l.u)("rqnDialog.button",t,"flex items-center gap-2 mt-3 px-4 py-3 bg-brand-2 text-white font-bold rounded-lg hover:bg-brand-1 transition-all focus-visible:outline-2 focus-visible:outline-brand-2 focus-visible:outline-offset-4"),{"mx-auto":"center"==t.buttonPosition},{"ml-auto":"right"==t.buttonPosition});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h,{data:t,openCounter:y,isClosedManually:x,setIsOpen:c,handleReset:()=>{g(!1),j(0),N(!0),localStorage.setItem("rqnDialog",JSON.stringify({rqnDialog:{closedManually:!1,counter:0}}))}}),n&&(0,r.jsx)(i.lG,{static:!0,open:n,onClose:w,className:O,children:(0,r.jsxs)("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4 overflow-hidden",children:[(0,r.jsx)(i.Xi,{className:k}),(0,r.jsxs)(i.Lj,{className:S,children:[t.closeIcon&&(0,r.jsx)("button",{className:C,onClick:w,children:(0,r.jsx)(d(),{path:u.hyP,size:1})}),(0,r.jsx)(o.U,{node:e.node,name:"rqnDialog",children:e.children}),t.buttonShow&&(0,r.jsxs)("button",{className:D,onClick:w,children:[t.buttonIcon&&(0,r.jsx)(d(),{path:u.hyP,size:1}),t.buttonLabel]})]})]})}),f&&!x&&(0,r.jsx)(p,{data:t,handleToast:()=>{m(!1),c(!0)},handleToastClose:()=>{m(!1),g(!0),c(!1)},...e})]})}},8202(e,t,n){e.exports=new class{constructor(){}getMetaData(){return{name:"rqnDialog",label:"coreObj:dialog.label",category:"coreObj:objects.core"}}getDataSchema(){return{backgroundColor:{type:"String",default:""},autoOpenTime:{type:"Number",default:0},discardManually:{type:"Boolean",default:!1},analyticsName:{type:"String",default:""},maxOpenCount:{type:"Number",default:3},closeIcon:{type:"Boolean",default:!0},buttonShow:{type:"Boolean",default:!0},buttonPosition:{type:"String",default:"center"},buttonIcon:{type:"Boolean",default:!0},buttonLabel:{type:"String",default:"schließen"},showToast:{type:"Boolean",default:!1},toastDelay:{type:"Number",default:2},toastCustomContent:{type:"Boolean",default:!1},toastHeadline:{type:"String",default:"Wir machen Urlaub"},toastInfo:{type:"String",default:"Und sind in der Zeit vom 27.05.2025 bis 06.05.2026 nicht erreichbar."},toastButtonShow:{type:"Boolean",default:!0},toastButtonLabel:{type:"String",default:"Mehr erfahren"},toastButtonLink:{type:"Object",default:{}},toastButtonOpenDialog:{type:"Boolean",default:!1}}}getRenderComponent(){return n(4453)}}},6992(e,t,n){"use strict";n.d(t,{L:()=>a});var r=n(6540),s=n(2599);function a(){let[e]=(0,r.useState)(s.e);return(0,r.useEffect)(()=>()=>
1e.dispose(),[e]),e}},5015(e,t,n){"use strict";n.d(t,{_:()=>a});var r=n(6540),s=n(4424);let a=function(e){let t=(0,s.Y)(e);return r.useCallback((...e)=>t.current(...e),[t])}},6339(e,t,n){"use strict";n.d(t,{s:()=>a});var r=n(6540),s=n(9851);let a=(e,t)=>{s._.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)}},4424(e,t,n){"use strict";n.d(t,{Y:()=>a});var r=n(6540),s=n(6339);function a(e){let t=(0,r.useRef)(e);return(0,s.s)(()=>{t.current=e},[e]),t}},5451(e,t,n){"use strict";n.d(t,{_:()=>s});var r=n(6540);function s(e){return(0,r.useMemo)(()=>e,Object.values(e))}},8975(e,t,n){"use strict";n.d(t,{P:()=>o,a:()=>l});var r=n(6540),s=n(5015);let a=Symbol();function l(e,t=!0){return Object.assign(e,{[a]:t})}function o(...e){let t=(0,r.useRef)(e);(0,r.useEffect)(()=>{t.current=e},[e]);let n=(0,s._)(e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)});return e.every(e=>null==e||(null==e?void 0:e[a]))?void 0:n}},6421(e,t,n){"use strict";function r(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}n.d(t,{x:()=>r})},2599(e,t,n){"use strict";n.d(t,{e:()=>s});var r=n(2924);function s(){let e=[],t={addEventListener:(e,n,r,s)=>(e.addEventListener(n,r,s),t.add(()=>e.removeEventListener(n,r,s))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame:(...e)=>t.requestAnimationFrame(()=>t.requestAnimationFrame(...e)),setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return(0,r._)(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=s();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}},9851(e,t,n){"use strict";n.d(t,{_:()=>a});var r=Object.defineProperty,s=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let a=new class{constructor(){s(this,"current",this.detect()),s(this,"handoffState","pending"),s(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}}},5897(e,t,n){"use strict";function r(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,r),s}n.d(t,{Y:()=>r})},2924(e,t,n){"use strict";function r(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}n.d(t,{_:()=>r})},6206(e,t,n){"use strict";n.d(t,{Ac:()=>i,Ci:()=>d,FX:()=>x,mK:()=>c,oE:()=>h,v6:()=>p,zv:()=>j});var r,s,a=n(6540),l=n(6421),o=n(5897),i=((s=i||{})[s.None=0]="None",s[s.RenderStrategy=1]="RenderStrategy",s[s.Static=2]="Static",s),c=((r=c||{})[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r);function d(){let e=function(){let e=(0,a.useRef)([]),t=(0,a.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>null==e))return e.current=n,t}}();return(0,a.useCallback)(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:s,visible:a=!0,name:l,mergeRefs:i}){i=null!=i?i:f;let c=m(t,e);if(a)return u(c,n,r,l,i);let d=null!=s?s:0;if(2&d){let{static:e=!1,...t}=c;if(e)return u(t,n,r,l,i)}if(1&d){let{unmount:e=!0,...t}=c;return(0,o.Y)(e?0:1,{0:()=>null,1:()=>u({...t,hidden:!0,style:{display:"none"}},n,r,l,i)})}return u(c,n,r,l,i)}({mergeRefs:e,...t}),[e])}function u(e,t={},n,r,s){let{as:o=n,children:i,refName:c="ref",...d}=b(e,["unmount","static"]),u=void 0!==e.ref?{[c]:e.ref}:{},f="function"==typeof i?i(t):i;f=y(f),"className"in d&&d.className&&"function"==typeof d.className&&(d.className=d.className(t)),d["aria-labelledby"]&&d["aria-labelledby"]===d.id&&(d["aria-labelledby"]=void 0);let p={};if(t){let e=!1,n=[];for(let[r,s]of Object.entries(t))"boolean"==typeof s&&(e=!0),!0===s&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){p["data-headlessui-state"]=n.join(" ");for(let e of n)p[`data-${e}`]=""}}if(j(o)&&(Object.keys(h(d)).length>0||Object.keys(h(p)).length>0)){if(!(!(0,a.isValidElement)(f)||Array.isArray(f)&&f.length>1||function(e){return j(e.type)}(f))){let e=f.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>(0,l.x)(t(...e),d.className):(0,l.x)(t,d.className),r=n?{className:n}:{},o=m(f.props,h(b(d,["ref"])));for(let e in p)e in o&&delete p[e];return(0,a.cloneElement)(f,Object.assign({},o,p,u,{ref:s(g(f),u.ref)},r))}if(Object.keys(h(d)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(h(d)).concat(Object.keys(h(p))).map(e=>`  - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>`  - ${e}`).join("\n")].join("\n"))}return(0,a.createElement)(o,Object.assign({},b(d,["ref"]),!j(o)&&u,!j(o)&&p),f)}function f(...e){return e.every(e=>null==e)?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function m(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let s=n[e];for(let e of s){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function p(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)null==e||e(...t)}});return t}function x(e){var t;return Object.assign((0,a.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function h(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function b(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function g(e){return a.version.split(".")[0]>="19"?e.props.ref:e.ref}function y(e){if(null!=e&&e.$$typeof===Symbol.for("react.lazy")){let t=e._payload;if(null!=t&&"fulfilled"===t.status)return y(t.value)}return e}function j(e){return e===a.Fragment||e===Symbol.for("react.fragment")}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.