@bigz-app/booking-widget 0.1.24 → 0.2.0

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.
@@ -629,6 +629,13 @@
629
629
  direction: ltr;
630
630
  isolation: isolate;
631
631
  }
632
+ .print-only {
633
+ display: none;
634
+ }
635
+ .print-hidden {
636
+ display: block;
637
+ }
638
+ @media print {
632
639
  `;
633
640
  // Inject CSS reset styles
634
641
  y$1(() => {
@@ -974,6 +981,26 @@
974
981
  organizationId: config.organizationId,
975
982
  };
976
983
  };
984
+ // Helper function to detect Stripe return parameters in URL
985
+ const detectStripeReturn = () => {
986
+ if (typeof window === "undefined") {
987
+ return null;
988
+ }
989
+ const urlParams = new URLSearchParams(window.location.search);
990
+ // Check for Stripe return parameters
991
+ const paymentIntent = urlParams.get("payment_intent");
992
+ const paymentIntentClientSecret = urlParams.get("payment_intent_client_secret");
993
+ const redirectStatus = urlParams.get("redirect_status");
994
+ if (paymentIntent && paymentIntentClientSecret && redirectStatus) {
995
+ return {
996
+ isStripeReturn: true,
997
+ paymentIntent,
998
+ paymentIntentClientSecret,
999
+ redirectStatus,
1000
+ };
1001
+ }
1002
+ return null;
1003
+ };
977
1004
 
978
1005
  var isCheckBoxInput = (element) => element.type === 'checkbox';
979
1006
 
@@ -6727,15 +6754,8 @@
6727
6754
 
6728
6755
  function n(){return n=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);}return e},n.apply(this,arguments)}const r=["children","options"],o=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,n)=>(e[n.toLowerCase()]=n,e),{class:"className",for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},c=["style","script","pre"],i=["src","href","data","formAction","srcDoc","action"],u=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,l=/mailto:/i,s=/\n{2,}$/,f=/^(\s*>[\s\S]*?)(?=\n\n|$)/,_=/^ *> ?/gm,d=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,p=/^ {2,}\n/,y=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,h=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,m=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,k=/^(?:\n *)*\n/,x=/\r\n?/g,v=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,q=/^\[\^([^\]]+)]/,b=/\f/g,S=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$=/^\s*?\[(x|\s)\]/,z=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,E=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,A=/^([^\n]+)\n *(=|-){3,} *\n/,R=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,B=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,L=/^<!--[\s\S]*?(?:-->)/,O=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,j=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,C=/^\{.*\}$/,I=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,T=/^<([^ >]+@[^ >]+)>/,M=/^<([^ >]+:\/[^ >]+)>/,w=/-([a-z])?/gi,D=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,F=/^[^\n]+(?: \n|\n{2,})/,P=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Z=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,N=/^\[([^\]]*)\] ?\[([^\]]*)\]/,G=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,U=/\t/g,V=/(^ *\||\| *$)/g,H=/^ *:-+: *$/,Q=/^ *:-+ *$/,W=/^ *-+: *$/,J="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",K=RegExp(`^([*_])\\1${J}\\1\\1(?!\\1)`),X=RegExp(`^([*_])${J}\\1(?!\\1)`),Y=RegExp(`^(==)${J}\\1`),ee=RegExp(`^(~~)${J}\\1`),ne=/^(:[a-zA-Z0-9-_]+:)/,re=/^\\([^0-9A-Za-z\s])/,te=/\\([^0-9A-Za-z\s])/g,oe=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,ae=/^\n+/,ce=/^([ \t]*)/,ie=/(?:^|\n)( *)$/,ue="(?:\\d+\\.)",le="(?:[*+-])";function se(e){return "( *)("+(1===e?ue:le)+") +"}const fe=se(1),_e=se(2);function de(e){return RegExp("^"+(1===e?fe:_e))}const pe=de(1),ye=de(2);function he(e){return RegExp("^"+(1===e?fe:_e)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ue:le)+" )[^\\n]*)*(\\n|$)","gm")}const ge=he(1),me=he(2);function ke(e){const n=1===e?ue:le;return RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}const xe=ke(1),ve=ke(2);function qe(e,n){const r=1===n,t=r?xe:ve,o=r?ge:me,a=r?pe:ye;return {t:e=>a.test(e),o:je(function(e,n){const r=ie.exec(n.prevCapture);return r&&(n.list||!n.inline&&!n.simple)?t.exec(e=r[1]+e):null}),i:1,u(e,n,t){const c=r?+e[2]:void 0,i=e[0].replace(s,"\n").match(o);let u=false;return {items:i.map(function(e,r){const o=a.exec(e)[0].length,c=RegExp("^ {1,"+o+"}","gm"),l=e.replace(c,"").replace(a,""),s=r===i.length-1,f=-1!==l.indexOf("\n\n")||s&&u;u=f;const _=t.inline,d=t.list;let p;t.list=true,f?(t.inline=false,p=$e(l)+"\n\n"):(t.inline=true,p=$e(l));const y=n(p,t);return t.inline=_,t.list=d,y}),ordered:r,start:c}},l:(n,r,t)=>e(n.ordered?"ol":"ul",{key:t.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,o){return e("li",{key:o},r(n,t))}))}}const be=RegExp("^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $e(e){let n=e.length;for(;n>0&&e[n-1]<=" ";)n--;return e.slice(0,n)}function ze(e,n){return e.startsWith(n)}function Ee(e,n,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(ze(e,r[n]))return true;return false}return r(e,n)}function Ae(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Re(e){return W.test(e)?"right":H.test(e)?"center":Q.test(e)?"left":null}function Be(e,n,r,t){const o=r.inTable;r.inTable=true;let a=[[]],c="";function i(){if(!c)return;const e=a[a.length-1];e.push.apply(e,n(c,r)),c="";}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,n,r)=>{"|"===e.trim()&&(i(),t)?0!==n&&n!==r.length-1&&a.push([]):c+=e;}),i(),r.inTable=o,a}function Le(e,n,r){r.inline=true;const t=e[2]?e[2].replace(V,"").split("|").map(Re):[],o=e[3]?function(e,n,r){return e.trim().split("\n").map(function(e){return Be(e,n,r,true)})}(e[3],n,r):[],a=Be(e[1],n,r,!!o.length);return r.inline=false,o.length?{align:t,cells:o,header:a,type:"25"}:{children:a,type:"21"}}function Oe(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function je(e){return e.inline=1,e}function Ce(e){return je(function(n,r){return r.inline?e.exec(n):null})}function Ie(e){return je(function(n,r){return r.inline||r.simple?e.exec(n):null})}function Te(e){return function(n,r){return r.inline||r.simple?null:e.exec(n)}}function Me(e){return je(function(n){return e.exec(n)})}const we=/(javascript|vbscript|data(?!:image)):/i;function De(e){try{const n=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(we.test(n))return null}catch(e){return null}return e}function Fe(e){return e?e.replace(te,"$1"):e}function Pe(e,n,r){const t=r.inline||false,o=r.simple||false;r.inline=true,r.simple=true;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ze(e,n,r){const t=r.inline||false,o=r.simple||false;r.inline=false,r.simple=true;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ne(e,n,r){const t=r.inline||false;r.inline=false;const o=e(n,r);return r.inline=t,o}const Ge=(e,n,r)=>({children:Pe(n,e[2],r)});function Ue(){return {}}function Ve(){return null}function He(...e){return e.filter(Boolean).join(" ")}function Qe(e,n,r){let t=e;const o=n.split(".");for(;o.length&&(t=t[o[0]],void 0!==t);)o.shift();return t||r}function We(r="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?n({},a,t.namedCodesToUnicode):a;const s=t.slugify||Ae,V=t.sanitizer||De,H=t.createElement||_$2,Q=[f,h,g,t.enforceAtxHeadings?E:z,A,D,xe,ve],W=[...Q,F,R,L,j];function J(e,r,...o){const a=Qe(t.overrides,e+".props",{});return H(function(e,n){const r=Qe(n,e);return r?"function"==typeof r||"object"==typeof r&&"render"in r?r:Qe(n,e+".component",e):e}(e,t.overrides),n({},r,a,{className:He(null==r?void 0:r.className,a.className)||void 0}),...o)}function te(e){e=e.replace(S,"");let n=false;t.forceInline?n=true:t.forceBlock||(n=false===G.test(e));const r=_e(fe(n?e:$e(e).replace(ae,"")+"\n\n",{inline:n}));for(;"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===t.wrapper)return r;const o=t.wrapper||(n?"span":"div");let a;if(r.length>1||t.forceWrapper)a=r;else {if(1===r.length)return a=r[0],"string"==typeof a?J("span",{key:"outer"},a):a;a=null;}return H(o,{key:"outer"},a)}function ie(e,n){if(!n||!n.trim())return null;const r=n.match(u);return r?r.reduce(function(n,r){const t=r.indexOf("=");if(-1!==t){const a=function(e){return -1!==e.indexOf("-")&&null===e.match(O)&&(e=e.replace(w,function(e,n){return n.toUpperCase()})),e}(r.slice(0,t)).trim(),c=function(e){const n=e[0];return ('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(t+1).trim()),u=o[a]||a;if("ref"===u)return n;const l=n[u]=function(e,n,r,t){return "style"===n?function(e){const n=[];let r="",t=false,o=false,a="";if(!e)return n;for(let c=0;c<e.length;c++){const i=e[c];if('"'!==i&&"'"!==i||t||(o?i===a&&(o=false,a=""):(o=true,a=i)),"("===i&&r.endsWith("url")?t=true:")"===i&&t&&(t=false),";"!==i||o||t)r+=i;else {const e=r.trim();if(e){const r=e.indexOf(":");if(r>0){const t=e.slice(0,r).trim(),o=e.slice(r+1).trim();n.push([t,o]);}}r="";}}const c=r.trim();if(c){const e=c.indexOf(":");if(e>0){const r=c.slice(0,e).trim(),t=c.slice(e+1).trim();n.push([r,t]);}}return n}(r).reduce(function(n,[r,o]){return n[r.replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t(o,e,r),n},{}):-1!==i.indexOf(n)?t(Fe(r),e,n):(r.match(C)&&(r=Fe(r.slice(1,r.length-1))),"true"===r||"false"!==r&&r)}(e,a,c,V);"string"==typeof l&&(R.test(l)||j.test(l))&&(n[u]=te(l.trim()));}else "style"!==r&&(n[o[r]||r]=true);return n},{}):null}const ue=[],le={},se={0:{t:[">"],o:Te(f),i:1,u(e,n,r){const[,t,o]=e[0].replace(_,"").match(d);return {alert:t,children:n(o,r)}},l(e,n,r){const t={key:r.key};return e.alert&&(t.className="markdown-alert-"+s(e.alert.toLowerCase(),Ae),e.children.unshift({attrs:{},children:[{type:"27",text:e.alert}],noInnerParse:true,type:"11",tag:"header"})),J("blockquote",t,n(e.children,r))}},1:{o:Me(p),i:1,u:Ue,l:(e,n,r)=>J("br",{key:r.key})},2:{t:e=>{const n=e[0];return "-"===n||"*"===n||"_"===n},o:Te(y),i:1,u:Ue,l:(e,n,r)=>J("hr",{key:r.key})},3:{t:[" "],o:Te(g),i:0,u:e=>({lang:void 0,text:Fe($e(e[0].replace(/^ {4}/gm,"")))}),l:(e,r,t)=>J("pre",{key:t.key},J("code",n({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))},4:{t:["```","~~~"],o:Te(h),i:0,u:e=>({attrs:ie("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{t:["`"],o:Ie(m),i:3,u:e=>({text:Fe(e[2])}),l:(e,n,r)=>J("code",{key:r.key},e.text)},6:{t:["[^"],o:Te(v),i:0,u:e=>(ue.push({footnote:e[2],identifier:e[1]}),{}),l:Ve},7:{t:["[^"],o:Ce(q),i:1,u:e=>({target:"#"+s(e[1],Ae),text:e[1]}),l:(e,n,r)=>J("a",{key:r.key,href:V(e.target,"a","href")},J("sup",{key:r.key},e.text))},8:{t:["[ ]","[x]"],o:Ce($),i:1,u:e=>({completed:"x"===e[1].toLowerCase()}),l:(e,n,r)=>J("input",{checked:e.completed,key:r.key,readOnly:true,type:"checkbox"})},9:{t:["#"],o:Te(t.enforceAtxHeadings?E:z),i:1,u:(e,n,r)=>({children:Pe(n,e[2],r),id:s(e[2],Ae),level:e[1].length}),l:(e,n,r)=>J("h"+e.level,{id:e.id,key:r.key},n(e.children,r))},10:{o:Te(A),i:0,u:(e,n,r)=>({children:Pe(n,e[1],r),level:"="===e[2]?1:2,type:"9"})},11:{t:["<"],o:Me(R),i:1,u(e,n,r){const[,t]=e[3].match(ce),o=RegExp("^"+t,"gm"),a=e[3].replace(o,""),i=(u=a,W.some(e=>e.test(u))?Ne:Pe);var u;const l=e[1].toLowerCase(),s=-1!==c.indexOf(l),f=(s?l:e[1]).trim(),_={attrs:ie(f,e[2]),noInnerParse:s,tag:f};if(r.inAnchor=r.inAnchor||"a"===l,s)_.text=e[3];else {const e=r.inHTML;r.inHTML=true,_.children=i(n,a,r),r.inHTML=e;}return r.inAnchor=false,_},l:(e,r,t)=>J(e.tag,n({key:t.key},e.attrs),e.text||(e.children?r(e.children,t):""))},13:{t:["<"],o:Me(j),i:1,u(e){const n=e[1].trim();return {attrs:ie(n,e[2]||""),tag:n}},l:(e,r,t)=>J(e.tag,n({},e.attrs,{key:t.key}))},12:{t:["\x3c!--"],o:Me(L),i:1,u:()=>({}),l:Ve},14:{t:["!["],o:Ie(Se),i:1,u:e=>({alt:Fe(e[1]),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>J("img",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:V(e.target,"img","src")})},15:{t:["["],o:Ce(be),i:3,u:(e,n,r)=>({children:Ze(n,e[1],r),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>J("a",{key:r.key,href:V(e.target,"a","href"),title:e.title},n(e.children,r))},16:{t:["<"],o:Ce(M),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],type:"15"})},17:{t:(e,n)=>!n.inAnchor&&!t.disableAutoLink&&(ze(e,"http://")||ze(e,"https://")),o:Ce(I),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},18:{t:["<"],o:Ce(T),i:0,u(e){let n=e[1],r=e[1];return l.test(r)||(r="mailto:"+r),{children:[{text:n.replace("mailto:",""),type:"27"}],target:r,type:"15"}}},20:qe(J,1),33:qe(J,2),19:{o:Te(k),i:3,u:Ue,l:()=>"\n"},21:{o:je(function(e,n){if(n.inline||n.simple||n.inHTML&&-1===e.indexOf("\n\n")&&-1===n.prevCapture.indexOf("\n\n"))return null;let r="";e.split("\n").every(e=>(e+="\n",!Q.some(n=>n.test(e))&&(r+=e,!!e.trim())));const t=$e(r);return ""===t?null:[r,,t]}),i:3,u:Ge,l:(e,n,r)=>J("p",{key:r.key},n(e.children,r))},22:{t:["["],o:Ce(P),i:0,u:e=>(le[e[1]]={target:e[2],title:e[4]},{}),l:Ve},23:{t:["!["],o:Ie(Z),i:0,u:e=>({alt:e[1]?Fe(e[1]):void 0,ref:e[2]}),l:(e,n,r)=>le[e.ref]?J("img",{key:r.key,alt:e.alt,src:V(le[e.ref].target,"img","src"),title:le[e.ref].title}):null},24:{t:e=>"["===e[0]&&-1===e.indexOf("]("),o:Ce(N),i:0,u:(e,n,r)=>({children:n(e[1],r),fallbackChildren:e[0],ref:e[2]}),l:(e,n,r)=>le[e.ref]?J("a",{key:r.key,href:V(le[e.ref].target,"a","href"),title:le[e.ref].title},n(e.children,r)):J("span",{key:r.key},e.fallbackChildren)},25:{t:["|"],o:Te(D),i:1,u:Le,l(e,n,r){const t=e;return J("table",{key:r.key},J("thead",null,J("tr",null,t.header.map(function(e,o){return J("th",{key:o,style:Oe(t,o)},n(e,r))}))),J("tbody",null,t.cells.map(function(e,o){return J("tr",{key:o},e.map(function(e,o){return J("td",{key:o,style:Oe(t,o)},n(e,r))}))})))}},27:{o:je(function(e,n){let r;return ze(e,":")&&(r=ne.exec(e)),r||oe.exec(e)}),i:4,u(e){const n=e[0];return {text:-1===n.indexOf("&")?n:n.replace(B,(e,n)=>t.namedCodesToUnicode[n]||e)}},l:e=>e.text},28:{t:["**","__"],o:Ie(K),i:2,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>J("strong",{key:r.key},n(e.children,r))},29:{t:e=>{const n=e[0];return ("*"===n||"_"===n)&&e[1]!==n},o:Ie(X),i:3,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>J("em",{key:r.key},n(e.children,r))},30:{t:["\\"],o:Ie(re),i:1,u:e=>({text:e[1],type:"27"})},31:{t:["=="],o:Ie(Y),i:3,u:Ge,l:(e,n,r)=>J("mark",{key:r.key},n(e.children,r))},32:{t:["~~"],o:Ie(ee),i:3,u:Ge,l:(e,n,r)=>J("del",{key:r.key},n(e.children,r))}};true===t.disableParsingRawHTML&&(delete se[11],delete se[13]);const fe=function(e){var n=Object.keys(e);function r(t,o){var a=[];if(o.prevCapture=o.prevCapture||"",t.trim())for(;t;)for(var c=0;c<n.length;){var i=n[c],u=e[i];if(!u.t||Ee(t,o,u.t)){var l=u.o(t,o);if(l&&l[0]){t=t.substring(l[0].length);var s=u.u(l,r,o);o.prevCapture+=l[0],s.type||(s.type=i),a.push(s);break}c++;}else c++;}return o.prevCapture="",a}return n.sort(function(n,r){return e[n].i-e[r].i||(n<r?-1:1)}),function(e,n){return r(function(e){return e.replace(x,"\n").replace(b,"").replace(U," ")}(e),n)}}(se),_e=(de=function(e,n){return function(r,t,o){const a=e[r.type].l;return n?n(()=>a(r,t,o),r,t,o):a(r,t,o)}}(se,t.renderRule),function e(n,r={}){if(Array.isArray(n)){const t=r.key,o=[];let a=false;for(let t=0;t<n.length;t++){r.key=t;const c=e(n[t],r),i="string"==typeof c;i&&a?o[o.length-1]+=c:null!==c&&o.push(c),a=i;}return r.key=t,o}return de(n,e,r)});var de;const pe=te(r);return ue.length?J("div",null,pe,J("footer",{key:"footer"},ue.map(function(e){return J("div",{id:s(e.identifier,Ae),key:e.identifier},e.identifier,_e(fe(e.footnote,{inline:true})))}))):pe}var Markdown = n=>{let{children:t="",options:o}=n,a=function(e,n){if(null==e)return {};var r,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)n.indexOf(r=a[t])>=0||(o[r]=e[r]);return o}(n,r);return _n(We(t,o),a)};
6729
6756
 
6730
- // Helper function to preprocess markdown for underline support
6731
- const preprocessMarkdown$1 = (markdown) => {
6732
- // Convert double underscores to HTML underline tags for React Markdown
6733
- return markdown.replace(/__([^_]+)__/g, "<u>$1</u>");
6734
- };
6735
- const IconCheck$1 = ({ size = 16, color = "#10b981" }) => (u$2("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: u$2("polyline", { points: "20 6 9 17 4 12" }) }));
6736
- const IconWave$1 = ({ size = 20, color = "#0ea5e9" }) => (u$2("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [u$2("path", { d: "M2 18c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), u$2("path", { d: "M2 12c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), u$2("path", { d: "M2 6c2-2 6-2 8 0s6 2 8 0 6-2 8 0" })] }));
6737
6757
  // Portal component that renders dialog at document body level
6738
- function DialogPortal({ children, isOpen }) {
6758
+ function DialogPortal({ children, isOpen, zIndex = 999999, }) {
6739
6759
  const [portalRoot, setPortalRoot] = Rn.useState(null);
6740
6760
  Rn.useEffect(() => {
6741
6761
  if (!isOpen) {
@@ -6767,9 +6787,12 @@
6767
6787
  "--bw-border-radius-small",
6768
6788
  "--bw-spacing",
6769
6789
  "--bw-spacing-large",
6790
+ "--bw-spacing-small",
6770
6791
  "--bw-font-family",
6771
6792
  "--bw-font-size",
6772
6793
  "--bw-font-size-large",
6794
+ "--bw-font-size-small",
6795
+ "--bw-font-size-xl",
6773
6796
  "--bw-shadow-lg",
6774
6797
  "--bw-shadow-md",
6775
6798
  "--bw-highlight-muted",
@@ -6797,7 +6820,7 @@
6797
6820
  left: 0;
6798
6821
  width: 100%;
6799
6822
  height: 100%;
6800
- z-index: 999999;
6823
+ z-index: ${zIndex};
6801
6824
  pointer-events: none;
6802
6825
  ${cssProperties}
6803
6826
  `;
@@ -6818,7 +6841,7 @@
6818
6841
  }
6819
6842
  document.body.style.overflow = "";
6820
6843
  };
6821
- }, [isOpen]);
6844
+ }, [isOpen, zIndex]);
6822
6845
  if (!isOpen || !portalRoot)
6823
6846
  return null;
6824
6847
  return $$1(u$2("div", { style: {
@@ -6827,7 +6850,8 @@
6827
6850
  height: "100%",
6828
6851
  }, children: children }), portalRoot);
6829
6852
  }
6830
- function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect, }) {
6853
+ // Shared dialog wrapper component
6854
+ function DialogWrapper({ isOpen, onClose, children, maxWidth = "700px", className, zIndex = 999999, }) {
6831
6855
  // Get fallback styles from the widget container for cases where CSS variables aren't available
6832
6856
  const [fallbackStyles, setFallbackStyles] = Rn.useState({});
6833
6857
  Rn.useEffect(() => {
@@ -6864,15 +6888,10 @@
6864
6888
  return () => {
6865
6889
  document.removeEventListener("keydown", handleEscape);
6866
6890
  };
6867
- }, [isOpen]);
6868
- if (!isOpen || !eventType)
6891
+ }, [isOpen, onClose]);
6892
+ if (!isOpen)
6869
6893
  return null;
6870
- const isAvailable = eventType.hasAvailableInstances;
6871
- const handleBookingClick = () => {
6872
- onEventTypeSelect(eventType);
6873
- onClose();
6874
- };
6875
- return (u$2(DialogPortal, { isOpen: isOpen, children: u$2("div", { style: fallbackStyles, children: u$2("div", { style: {
6894
+ return (u$2(DialogPortal, { isOpen: isOpen, zIndex: zIndex, children: u$2("div", { style: fallbackStyles, className: className, children: u$2("div", { style: {
6876
6895
  position: "fixed",
6877
6896
  top: 0,
6878
6897
  left: 0,
@@ -6885,11 +6904,11 @@
6885
6904
  alignItems: "center",
6886
6905
  justifyContent: "center",
6887
6906
  padding: "var(--bw-spacing)",
6888
- zIndex: 999999,
6907
+ zIndex: zIndex,
6889
6908
  }, onClick: onClose, children: u$2("div", { style: {
6890
6909
  backgroundColor: "var(--bw-surface-color)",
6891
6910
  borderRadius: "var(--bw-border-radius)",
6892
- maxWidth: "700px",
6911
+ maxWidth,
6893
6912
  width: "100%",
6894
6913
  maxHeight: "90vh",
6895
6914
  overflow: "auto",
@@ -6917,181 +6936,199 @@
6917
6936
  e.currentTarget.style.backgroundColor = "var(--bw-border-color)";
6918
6937
  }, onMouseLeave: (e) => {
6919
6938
  e.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
6920
- }, children: "\u00D7" }), u$2("div", { style: { padding: "var(--bw-spacing-large)" }, children: [u$2("div", { style: {
6921
- marginBottom: "24px",
6922
- padding: "16px",
6923
- backgroundColor: "var(--bw-background-color)",
6924
- borderRadius: "var(--bw-border-radius)",
6925
- border: `1px solid var(--bw-border-color)`,
6926
- }, children: [u$2("div", { children: [u$2("div", { style: {
6927
- fontSize: "14px",
6928
- fontWeight: "600",
6929
- color: "var(--bw-highlight-color)",
6930
- marginBottom: "8px",
6931
- fontFamily: "var(--bw-font-family)",
6932
- }, children: eventType.category.name }), u$2("h2", { style: {
6933
- fontSize: "28px",
6934
- fontWeight: "700",
6935
- color: "var(--bw-text-color)",
6936
- marginBottom: "16px",
6937
- lineHeight: "1.3",
6938
- fontFamily: "var(--bw-font-family)",
6939
- margin: "0 0 16px 0",
6940
- }, children: eventType.name })] }), eventType.highlights && eventType.highlights.length > 0 && (u$2("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: u$2("div", { style: { marginBottom: "24px" }, children: u$2("ul", { style: {
6941
- listStyle: "none",
6942
- padding: "0",
6943
- margin: "0",
6944
- display: "flex",
6945
- flexDirection: "column",
6946
- gap: "3px",
6947
- }, children: eventType.highlights
6948
- .filter((highlight) => highlight.trim())
6949
- .map((highlight, index) => (u$2("li", { style: {
6950
- display: "flex",
6951
- alignItems: "flex-start",
6952
- gap: "10px",
6953
- fontFamily: "var(--bw-font-family)",
6954
- fontSize: "16px",
6955
- lineHeight: "1.6",
6956
- color: "var(--bw-text-color)",
6957
- }, children: [u$2("div", { style: { marginTop: "4px", flexShrink: 0 }, children: u$2(IconCheck$1, { size: 16, color: "var(--bw-success-color)" }) }), u$2("span", { children: highlight.trim() })] }, index))) }) }) }))] }), eventType.description && (u$2("div", { style: {
6958
- marginBottom: "24px",
6959
- color: "var(--bw-text-muted)",
6960
- fontSize: "16px",
6961
- lineHeight: "1.6",
6939
+ }, children: "\u00D7" }), children] }) }) }) }));
6940
+ }
6941
+
6942
+ // Helper function to preprocess markdown for underline support
6943
+ const preprocessMarkdown$1 = (markdown) => {
6944
+ // Convert double underscores to HTML underline tags for React Markdown
6945
+ return markdown.replace(/__([^_]+)__/g, "<u>$1</u>");
6946
+ };
6947
+ const IconCheck$1 = ({ size = 16, color = "#10b981" }) => (u$2("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: u$2("polyline", { points: "20 6 9 17 4 12" }) }));
6948
+ const IconWave$1 = ({ size = 20, color = "#0ea5e9" }) => (u$2("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [u$2("path", { d: "M2 18c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), u$2("path", { d: "M2 12c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), u$2("path", { d: "M2 6c2-2 6-2 8 0s6 2 8 0 6-2 8 0" })] }));
6949
+ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect, }) {
6950
+ if (!isOpen || !eventType)
6951
+ return null;
6952
+ const isAvailable = eventType.hasAvailableInstances;
6953
+ const handleBookingClick = () => {
6954
+ onEventTypeSelect(eventType);
6955
+ onClose();
6956
+ };
6957
+ return (u$2(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: u$2("div", { style: { padding: "var(--bw-spacing-large)" }, children: [u$2("div", { style: {
6958
+ marginBottom: "24px",
6959
+ padding: "16px",
6960
+ backgroundColor: "var(--bw-background-color)",
6961
+ borderRadius: "var(--bw-border-radius)",
6962
+ border: `1px solid var(--bw-border-color)`,
6963
+ }, children: [u$2("div", { children: [u$2("div", { style: {
6964
+ fontSize: "14px",
6965
+ fontWeight: "600",
6966
+ color: "var(--bw-highlight-color)",
6967
+ marginBottom: "8px",
6968
+ fontFamily: "var(--bw-font-family)",
6969
+ }, children: eventType.category.name }), u$2("h2", { style: {
6970
+ fontSize: "28px",
6971
+ fontWeight: "700",
6972
+ color: "var(--bw-text-color)",
6973
+ marginBottom: "16px",
6974
+ lineHeight: "1.3",
6962
6975
  fontFamily: "var(--bw-font-family)",
6963
- padding: "0px 20px",
6964
- }, children: [u$2("style", { dangerouslySetInnerHTML: {
6965
- __html: `
6966
- .bw-markdown-content p {
6967
- margin: 0 0 12px 0 !important;
6968
- color: var(--bw-text-muted) !important;
6969
- font-family: var(--bw-font-family) !important;
6970
- line-height: 1.6 !important;
6971
- }
6972
- .bw-markdown-content p:last-child {
6973
- margin-bottom: 0 !important;
6974
- }
6975
- .bw-markdown-content h2 {
6976
- font-size: 20px !important;
6977
- font-weight: 700 !important;
6978
- color: var(--bw-text-color) !important;
6979
- margin: 20px 0 8px 0 !important;
6980
- line-height: 1.3 !important;
6981
- display: block !important;
6982
- }
6983
- .bw-markdown-content h3 {
6984
- font-size: 18px !important;
6985
- font-weight: 600 !important;
6986
- color: var(--bw-text-color) !important;
6987
- margin: 16px 0 8px 0 !important;
6988
- line-height: 1.3 !important;
6989
- display: block !important;
6990
- }
6991
- .bw-markdown-content strong {
6992
- font-weight: 700 !important;
6993
- color: var(--bw-text-color) !important;
6994
- }
6995
- .bw-markdown-content em {
6996
- font-style: italic !important;
6997
- }
6998
- .bw-markdown-content u {
6999
- text-decoration: underline !important;
7000
- }
7001
- .bw-markdown-content ul {
7002
- margin: 12px 0 !important;
7003
- padding-left: 24px !important;
7004
- list-style-type: disc !important;
7005
- display: block !important;
7006
- }
7007
- .bw-markdown-content ol {
7008
- margin: 12px 0 !important;
7009
- padding-left: 24px !important;
7010
- list-style-type: decimal !important;
7011
- display: block !important;
7012
- }
7013
- .bw-markdown-content li {
7014
- margin-bottom: 4px !important;
7015
- display: list-item !important;
7016
- color: var(--bw-text-muted) !important;
7017
- font-family: var(--bw-font-family) !important;
7018
- line-height: 1.6 !important;
7019
- }
7020
- .bw-markdown-content blockquote {
7021
- margin: 12px 0 !important;
7022
- padding-left: 16px !important;
7023
- border-left: 3px solid var(--bw-border-color) !important;
7024
- font-style: italic !important;
7025
- color: var(--bw-text-muted) !important;
7026
- display: block !important;
7027
- }
7028
- .bw-markdown-content a {
7029
- color: var(--bw-highlight-color) !important;
7030
- text-decoration: underline !important;
7031
- }
7032
- .bw-markdown-content a:hover {
7033
- text-decoration: none !important;
7034
- }
7035
- `,
7036
- } }), u$2("div", { className: "bw-markdown-content", children: Markdown({ children: preprocessMarkdown$1(eventType.description) }) })] })), u$2("div", { style: {
6976
+ margin: "0 0 16px 0",
6977
+ }, children: eventType.name })] }), eventType.highlights && eventType.highlights.length > 0 && (u$2("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: u$2("div", { style: { marginBottom: "24px" }, children: u$2("ul", { style: {
6978
+ listStyle: "none",
6979
+ padding: "0",
6980
+ margin: "0",
7037
6981
  display: "flex",
7038
- justifyContent: "space-between",
7039
- alignItems: "center",
7040
- marginTop: "32px",
7041
- padding: "20px",
7042
- backgroundColor: "var(--bw-background-color)",
7043
- borderRadius: "var(--bw-border-radius)",
7044
- border: `1px solid var(--bw-border-color)`,
7045
- }, children: [u$2("div", { children: [u$2("div", { className: "bw-event-type-price", style: {
7046
- fontWeight: "700",
7047
- color: "var(--bw-text-color)",
7048
- fontFamily: "var(--bw-font-family)",
7049
- textAlign: "left",
7050
- }, children: eventType.groupedDurations && u$2("span", { children: eventType.groupedDurations }) }), u$2("div", { className: "bw-event-type-price", style: {
7051
- fontSize: "clamp(1.72rem, 4vw, 32px)",
7052
- fontWeight: "700",
7053
- color: "var(--bw-text-color)",
7054
- fontFamily: "var(--bw-font-family)",
7055
- textAlign: "right",
7056
- }, children: u$2("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (u$2("button", { onClick: handleBookingClick, style: {
7057
- backgroundColor: "var(--bw-highlight-color)",
7058
- color: "white",
7059
- padding: "14px 28px",
7060
- border: "none",
7061
- borderRadius: "var(--bw-border-radius)",
7062
- fontSize: "16px",
7063
- fontWeight: "600",
7064
- fontFamily: "var(--bw-font-family)",
7065
- display: "flex",
7066
- alignItems: "center",
7067
- gap: "8px",
7068
- cursor: "pointer",
7069
- transition: "all 0.2s ease",
7070
- }, onMouseEnter: (e) => {
7071
- e.currentTarget.style.opacity = "0.9";
7072
- e.currentTarget.style.transform = "translateY(-1px)";
7073
- }, onMouseLeave: (e) => {
7074
- e.currentTarget.style.opacity = "1";
7075
- e.currentTarget.style.transform = "translateY(0)";
7076
- }, children: [u$2(IconWave$1, { size: 20, color: "white" }), "Jetzt buchen"] }))] })] }), !isAvailable && (u$2("div", { style: {
7077
- position: "absolute",
7078
- inset: 0,
7079
- backgroundColor: "rgba(0, 0, 0, 0.3)",
7080
- backdropFilter: "blur(2px)",
6982
+ flexDirection: "column",
6983
+ gap: "3px",
6984
+ }, children: eventType.highlights
6985
+ .filter((highlight) => highlight.trim())
6986
+ .map((highlight, index) => (u$2("li", { style: {
6987
+ display: "flex",
6988
+ alignItems: "flex-start",
6989
+ gap: "10px",
6990
+ fontFamily: "var(--bw-font-family)",
6991
+ fontSize: "16px",
6992
+ lineHeight: "1.6",
6993
+ color: "var(--bw-text-color)",
6994
+ }, children: [u$2("div", { style: { marginTop: "4px", flexShrink: 0 }, children: u$2(IconCheck$1, { size: 16, color: "var(--bw-success-color)" }) }), u$2("span", { children: highlight.trim() })] }, index))) }) }) }))] }), eventType.description && (u$2("div", { style: {
6995
+ marginBottom: "24px",
6996
+ color: "var(--bw-text-muted)",
6997
+ fontSize: "16px",
6998
+ lineHeight: "1.6",
6999
+ fontFamily: "var(--bw-font-family)",
7000
+ padding: "0px 20px",
7001
+ }, children: [u$2("style", { dangerouslySetInnerHTML: {
7002
+ __html: `
7003
+ .bw-markdown-content p {
7004
+ margin: 0 0 12px 0 !important;
7005
+ color: var(--bw-text-muted) !important;
7006
+ font-family: var(--bw-font-family) !important;
7007
+ line-height: 1.6 !important;
7008
+ }
7009
+ .bw-markdown-content p:last-child {
7010
+ margin-bottom: 0 !important;
7011
+ }
7012
+ .bw-markdown-content h2 {
7013
+ font-size: 20px !important;
7014
+ font-weight: 700 !important;
7015
+ color: var(--bw-text-color) !important;
7016
+ margin: 20px 0 8px 0 !important;
7017
+ line-height: 1.3 !important;
7018
+ display: block !important;
7019
+ }
7020
+ .bw-markdown-content h3 {
7021
+ font-size: 18px !important;
7022
+ font-weight: 600 !important;
7023
+ color: var(--bw-text-color) !important;
7024
+ margin: 16px 0 8px 0 !important;
7025
+ line-height: 1.3 !important;
7026
+ display: block !important;
7027
+ }
7028
+ .bw-markdown-content strong {
7029
+ font-weight: 700 !important;
7030
+ color: var(--bw-text-color) !important;
7031
+ }
7032
+ .bw-markdown-content em {
7033
+ font-style: italic !important;
7034
+ }
7035
+ .bw-markdown-content u {
7036
+ text-decoration: underline !important;
7037
+ }
7038
+ .bw-markdown-content ul {
7039
+ margin: 12px 0 !important;
7040
+ padding-left: 24px !important;
7041
+ list-style-type: disc !important;
7042
+ display: block !important;
7043
+ }
7044
+ .bw-markdown-content ol {
7045
+ margin: 12px 0 !important;
7046
+ padding-left: 24px !important;
7047
+ list-style-type: decimal !important;
7048
+ display: block !important;
7049
+ }
7050
+ .bw-markdown-content li {
7051
+ margin-bottom: 4px !important;
7052
+ display: list-item !important;
7053
+ color: var(--bw-text-muted) !important;
7054
+ font-family: var(--bw-font-family) !important;
7055
+ line-height: 1.6 !important;
7056
+ }
7057
+ .bw-markdown-content blockquote {
7058
+ margin: 12px 0 !important;
7059
+ padding-left: 16px !important;
7060
+ border-left: 3px solid var(--bw-border-color) !important;
7061
+ font-style: italic !important;
7062
+ color: var(--bw-text-muted) !important;
7063
+ display: block !important;
7064
+ }
7065
+ .bw-markdown-content a {
7066
+ color: var(--bw-highlight-color) !important;
7067
+ text-decoration: underline !important;
7068
+ }
7069
+ .bw-markdown-content a:hover {
7070
+ text-decoration: none !important;
7071
+ }
7072
+ `,
7073
+ } }), u$2("div", { className: "bw-markdown-content", children: Markdown({ children: preprocessMarkdown$1(eventType.description) }) })] })), u$2("div", { style: {
7074
+ display: "flex",
7075
+ justifyContent: "space-between",
7076
+ alignItems: "center",
7077
+ marginTop: "32px",
7078
+ padding: "20px",
7079
+ backgroundColor: "var(--bw-background-color)",
7080
+ borderRadius: "var(--bw-border-radius)",
7081
+ border: `1px solid var(--bw-border-color)`,
7082
+ }, children: [u$2("div", { children: [u$2("div", { className: "bw-event-type-price", style: {
7083
+ fontWeight: "700",
7084
+ color: "var(--bw-text-color)",
7085
+ fontFamily: "var(--bw-font-family)",
7086
+ textAlign: "left",
7087
+ }, children: eventType.groupedDurations && u$2("span", { children: eventType.groupedDurations }) }), u$2("div", { className: "bw-event-type-price", style: {
7088
+ fontSize: "clamp(1.72rem, 4vw, 32px)",
7089
+ fontWeight: "700",
7090
+ color: "var(--bw-text-color)",
7091
+ fontFamily: "var(--bw-font-family)",
7092
+ textAlign: "right",
7093
+ }, children: u$2("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (u$2("button", { onClick: handleBookingClick, style: {
7094
+ backgroundColor: "var(--bw-highlight-color)",
7095
+ color: "white",
7096
+ padding: "14px 28px",
7097
+ border: "none",
7098
+ borderRadius: "var(--bw-border-radius)",
7099
+ fontSize: "16px",
7100
+ fontWeight: "600",
7101
+ fontFamily: "var(--bw-font-family)",
7081
7102
  display: "flex",
7082
7103
  alignItems: "center",
7083
- justifyContent: "center",
7084
- borderRadius: "var(--bw-border-radius)",
7085
- }, children: u$2("div", { style: {
7086
- backgroundColor: "rgba(255, 255, 255, 0.9)",
7087
- padding: "16px 32px",
7088
- borderRadius: "var(--bw-border-radius)",
7089
- color: "var(--bw-text-color)",
7090
- fontWeight: "600",
7091
- fontSize: "18px",
7092
- fontFamily: "var(--bw-font-family)",
7093
- boxShadow: "var(--bw-shadow-md)",
7094
- }, children: "Ausgebucht" }) }))] }) }) }) }));
7104
+ gap: "8px",
7105
+ cursor: "pointer",
7106
+ transition: "all 0.2s ease",
7107
+ }, onMouseEnter: (e) => {
7108
+ e.currentTarget.style.opacity = "0.9";
7109
+ e.currentTarget.style.transform = "translateY(-1px)";
7110
+ }, onMouseLeave: (e) => {
7111
+ e.currentTarget.style.opacity = "1";
7112
+ e.currentTarget.style.transform = "translateY(0)";
7113
+ }, children: [u$2(IconWave$1, { size: 20, color: "white" }), "Jetzt buchen"] }))] }), !isAvailable && (u$2("div", { style: {
7114
+ position: "absolute",
7115
+ inset: 0,
7116
+ backgroundColor: "rgba(0, 0, 0, 0.3)",
7117
+ backdropFilter: "blur(2px)",
7118
+ display: "flex",
7119
+ alignItems: "center",
7120
+ justifyContent: "center",
7121
+ borderRadius: "var(--bw-border-radius)",
7122
+ }, children: u$2("div", { style: {
7123
+ backgroundColor: "rgba(255, 255, 255, 0.9)",
7124
+ padding: "16px 32px",
7125
+ borderRadius: "var(--bw-border-radius)",
7126
+ color: "var(--bw-text-color)",
7127
+ fontWeight: "600",
7128
+ fontSize: "18px",
7129
+ fontFamily: "var(--bw-font-family)",
7130
+ boxShadow: "var(--bw-shadow-md)",
7131
+ }, children: "Ausgebucht" }) }))] }) }));
7095
7132
  }
7096
7133
 
7097
7134
  // Carousel navigation icons
@@ -7143,7 +7180,7 @@
7143
7180
  if (images.length === 0) {
7144
7181
  return u$2(EventImagePlaceholder, {});
7145
7182
  }
7146
- return (u$2("div", { style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" }, children: [u$2("div", { style: {
7183
+ return (u$2("div", { style: { position: "relative", width: "100%", height: "100%", overflow: "hidden", borderRadius: "inherit" }, children: [u$2("div", { style: {
7147
7184
  display: "flex",
7148
7185
  width: `${images.length * 100}%`,
7149
7186
  height: "100%",
@@ -7155,6 +7192,7 @@
7155
7192
  flexShrink: 0,
7156
7193
  overflow: "hidden",
7157
7194
  position: "relative",
7195
+ borderRadius: "inherit"
7158
7196
  }, children: u$2("img", { src: image, alt: `${eventName} - Bild ${index + 1}`, style: {
7159
7197
  width: "100%",
7160
7198
  height: "100%",
@@ -7163,6 +7201,7 @@
7163
7201
  position: "absolute",
7164
7202
  top: 0,
7165
7203
  left: 0,
7204
+ borderRadius: "inherit"
7166
7205
  } }) }, index))) }), images.length > 1 && (u$2(k$3, { children: [u$2("button", { onClick: prevImage, disabled: isTransitioning, style: {
7167
7206
  position: "absolute",
7168
7207
  left: "12px",
@@ -7639,6 +7678,7 @@
7639
7678
  backgroundColor: "var(--bw-surface-color)",
7640
7679
  border: `1px solid var(--bw-border-color)`,
7641
7680
  borderRadius: "var(--bw-border-radius)",
7681
+ overflow: "hidden",
7642
7682
  transition: "all 0.3s ease",
7643
7683
  cursor: isAvailable ? "pointer" : "not-allowed",
7644
7684
  opacity: isAvailable ? 1 : 0.6,
@@ -9170,7 +9210,7 @@
9170
9210
  borderRadius: "50%",
9171
9211
  } }) }));
9172
9212
  // Inner component that uses the Stripe hooks
9173
- function PaymentFormInner({ config, eventDetails, formData, totalAmount, discountCode, onSuccess, onError, systemConfig, clientSecret, }) {
9213
+ function PaymentFormInner({ config, eventDetails, formData, totalAmount, discountCode, onSuccess, onError, }) {
9174
9214
  const stripe = reactStripe_umdExports.useStripe();
9175
9215
  const elements = reactStripe_umdExports.useElements();
9176
9216
  const [isLoading, setIsLoading] = d$1(false);
@@ -9196,26 +9236,12 @@
9196
9236
  return;
9197
9237
  }
9198
9238
  // First, confirm the payment with Stripe
9239
+ // Build return URL for Stripe redirect
9240
+ const baseUrl = window !== undefined ? window.location.href : `${config.bookingSystemUrl}/booking-success`;
9241
+ const returnUrl = new URL(baseUrl);
9199
9242
  const confirmParams = {
9200
- return_url: "https://bigz.surfschule-zingst.de/booking/success",
9243
+ return_url: returnUrl.toString(),
9201
9244
  };
9202
- // Ensure return_url is properly formatted and doesn't contain fragment identifiers
9203
- try {
9204
- const url = new URL(confirmParams.return_url);
9205
- // Remove any fragment identifiers that might cause issues
9206
- url.hash = "";
9207
- confirmParams.return_url = url.toString();
9208
- }
9209
- catch (e) {
9210
- console.warn("[PAYMENT_FORM] Invalid return_url, using fallback:", confirmParams.return_url);
9211
- // Fallback to current origin if URL parsing fails
9212
- confirmParams.return_url = window.location.origin + window.location.pathname;
9213
- }
9214
- console.log("[PAYMENT_FORM] Confirming payment with params:", {
9215
- paymentIntentId: clientSecret.split("_secret_")[0],
9216
- return_url: confirmParams.return_url,
9217
- redirect: "if_required",
9218
- });
9219
9245
  const { error, paymentIntent } = await stripe.confirmPayment({
9220
9246
  elements,
9221
9247
  confirmParams,
@@ -9233,91 +9259,15 @@
9233
9259
  setPaymentError(error.message || "Zahlungsfehler");
9234
9260
  }
9235
9261
  else {
9236
- setPaymentError("Ein unerwarteter Fehler ist aufgetreten.");
9262
+ setPaymentError("Ein unerwarteter Fehler ist aufgetreten. Bitte versuche es nochmal.");
9237
9263
  }
9238
9264
  return;
9239
9265
  }
9240
9266
  // Payment succeeded, now create the booking
9241
9267
  if (paymentIntent && paymentIntent.status === "succeeded") {
9242
- // Check if we have system configuration
9243
- if (!systemConfig) {
9244
- throw new Error("System-Konfiguration nicht verfügbar. Bitte lade die Seite neu.");
9245
- }
9246
- // Determine which endpoint to use based on system mode
9247
- const isConnectMode = systemConfig.systemMode === "connect";
9248
- const endpoint = isConnectMode
9249
- ? "/booking/create-from-payment"
9250
- : "/booking-proxy/create-booking";
9251
- // Calculate if this is a deposit payment
9252
- const fullAmount = eventDetails.price * formData.participants.filter((p) => p.name.trim()).length;
9253
- const isDepositPayment = eventDetails.deposit > 0;
9254
- // Build request body based on mode
9255
- const requestData = {
9256
- // Payment info
9257
- paymentIntentId: paymentIntent.id,
9258
- paymentMethod: "card",
9259
- paymentStatus: isDepositPayment ? "deposit_paid" : "paid",
9260
- totalAmount,
9261
- depositAmount: isDepositPayment ? totalAmount : undefined,
9262
- fullAmount: fullAmount,
9263
- // Customer info
9264
- customerEmail: formData.customerEmail,
9265
- customerName: formData.customerName,
9266
- customerPhone: formData.customerPhone,
9267
- // Booking info
9268
- participants: formData.participants.filter((p) => p.name.trim()),
9269
- eventInstanceId: config.eventInstanceId || eventDetails.id,
9270
- organizationId: config.organizationId, // Ensure organization ID is always included
9271
- discountCode: discountCode?.code,
9272
- notes: "",
9273
- };
9274
- // Add mode-specific fields
9275
- if (isConnectMode) {
9276
- Object.assign(requestData, {
9277
- source: "connect",
9278
- stripeAccountType: "connect",
9279
- });
9280
- }
9281
- else {
9282
- // ApiKey mode - include required proxy fields
9283
- Object.assign(requestData, {
9284
- bookingSystemApiUrl: config.apiBaseUrl,
9285
- // apiKey would be added here if required
9286
- });
9287
- }
9288
- console.log(`[PAYMENT_FORM] Attempting booking creation via ${endpoint}`, {
9289
- mode: isConnectMode ? "connect" : "apikey",
9290
- paymentIntentId: paymentIntent.id,
9291
- eventInstanceId: requestData.eventInstanceId,
9292
- organizationId: requestData.organizationId,
9293
- participantCount: requestData.participants.length,
9294
- });
9295
- const bookingResponse = await fetch(getApiUrl(config.apiBaseUrl, endpoint), {
9296
- method: "POST",
9297
- headers: createApiHeaders(config),
9298
- body: JSON.stringify(createRequestBody(config, requestData)),
9299
- });
9300
- const bookingData = await bookingResponse.json();
9301
- if (!bookingResponse.ok) {
9302
- console.error(`[PAYMENT_FORM] Booking creation failed:`, {
9303
- status: bookingResponse.status,
9304
- error: bookingData.error,
9305
- details: bookingData.details,
9306
- paymentIntentId: paymentIntent.id,
9307
- });
9308
- throw new Error(bookingData.error || "Fehler beim Erstellen der Buchung");
9309
- }
9310
- console.log(`[PAYMENT_FORM] Booking created successfully:`, {
9311
- bookingId: bookingData.booking?.id,
9312
- orderId: bookingData.order?.id,
9313
- paymentIntentId: paymentIntent.id,
9314
- });
9315
9268
  // Booking created successfully
9316
9269
  onSuccess({
9317
- booking: bookingData.booking,
9318
- payment: "succeeded",
9319
9270
  paymentIntent: paymentIntent,
9320
- formData: formData,
9321
9271
  });
9322
9272
  }
9323
9273
  else {
@@ -9420,11 +9370,6 @@
9420
9370
  setIsCreatingPaymentIntent(true);
9421
9371
  setPaymentError(null);
9422
9372
  try {
9423
- // Determine endpoint based on system mode
9424
- const isConnectMode = systemConfig.systemMode === "connect";
9425
- const endpoint = isConnectMode
9426
- ? "/booking/create-payment-intent"
9427
- : "/booking-proxy/create-payment-intent";
9428
9373
  // Build request data with validation
9429
9374
  const requestData = {
9430
9375
  eventInstanceId: config.eventInstanceId || eventDetails.id,
@@ -9433,7 +9378,10 @@
9433
9378
  currency: "eur",
9434
9379
  participants: formData.participants.filter((p) => p.name?.trim()),
9435
9380
  discountCode: discountCode?.code,
9381
+ customerName: formData.customerName?.trim(),
9436
9382
  customerEmail: formData.customerEmail?.trim(),
9383
+ customerPhone: formData.customerPhone?.trim(),
9384
+ comment: formData.comment?.trim(),
9437
9385
  };
9438
9386
  // Validate required fields
9439
9387
  if (!requestData.eventInstanceId) {
@@ -9451,34 +9399,13 @@
9451
9399
  if (!requestData.customerEmail) {
9452
9400
  throw new Error("Customer email is required");
9453
9401
  }
9454
- console.log("[PAYMENT_FORM] Creating payment intent:", {
9455
- endpoint,
9456
- mode: isConnectMode ? "connect" : "apikey",
9457
- amount: requestData.amount,
9458
- currency: requestData.currency,
9459
- participantCount: requestData.participants.length,
9460
- organizationId: requestData.organizationId,
9461
- eventInstanceId: requestData.eventInstanceId,
9462
- });
9463
- // Add mode-specific fields
9464
- if (!isConnectMode) {
9465
- // ApiKey mode needs additional fields
9466
- Object.assign(requestData, {
9467
- bookingSystemApiUrl: config.apiBaseUrl,
9468
- // apiKey would be added here if required
9469
- });
9470
- }
9471
- const response = await fetch(getApiUrl(config.apiBaseUrl, endpoint), {
9402
+ const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-payment-intent"), {
9472
9403
  method: "POST",
9473
9404
  headers: createApiHeaders(config),
9474
9405
  body: JSON.stringify(createRequestBody(config, requestData)),
9475
9406
  });
9476
9407
  const data = await response.json();
9477
9408
  if (response.ok) {
9478
- console.log("[PAYMENT_FORM] Payment intent created successfully:", {
9479
- hasClientSecret: !!data.clientSecret,
9480
- clientSecretPrefix: `${data.clientSecret?.substring(0, 20)}...`,
9481
- });
9482
9409
  setClientSecret(data.clientSecret);
9483
9410
  }
9484
9411
  else {
@@ -9634,6 +9561,7 @@
9634
9561
  position: "absolute",
9635
9562
  inset: 0,
9636
9563
  backgroundColor: "rgba(0, 0, 0, 0.5)",
9564
+ backdropFilter: "blur(10px)",
9637
9565
  opacity: isAnimating ? 1 : 0,
9638
9566
  transition: "opacity 0.25s ease-out",
9639
9567
  }, onClick: onClose }), u$2("div", { style: {
@@ -9980,11 +9908,11 @@
9980
9908
  display: "flex",
9981
9909
  alignItems: "center",
9982
9910
  gap: "4px",
9983
- }, children: [u$2(IconMoney, { size: 20, color: "var(--bw-highlight-color)" }), " Preis:"] }), u$2("span", { style: {
9911
+ }, children: [u$2(IconCalendar, { size: 20, color: "var(--bw-highlight-color)" }), " Uhrzeit:"] }), u$2("span", { style: {
9984
9912
  color: "var(--bw-text-color)",
9985
9913
  fontWeight: "500",
9986
9914
  fontFamily: "var(--bw-font-family)",
9987
- }, children: [formatCurrency(eventDetails.price), " pro Person"] })] }), u$2("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [u$2("span", { style: {
9915
+ }, children: formatTime(eventDetails.startTime, "Europe/Berlin", "de") })] }), u$2("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [u$2("span", { style: {
9988
9916
  color: "var(--bw-text-muted)",
9989
9917
  fontFamily: "var(--bw-font-family)",
9990
9918
  display: "flex",
@@ -9994,7 +9922,17 @@
9994
9922
  color: "var(--bw-text-color)",
9995
9923
  fontWeight: "500",
9996
9924
  fontFamily: "var(--bw-font-family)",
9997
- }, children: [eventDetails.durationDays, " Tag", eventDetails.durationDays > 1 ? "e" : ""] })] })] })] }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [u$2("form", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [u$2("div", { style: {
9925
+ }, children: [eventDetails.durationDays, " Tag", eventDetails.durationDays > 1 ? "e" : ""] })] }), u$2("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [u$2("span", { style: {
9926
+ color: "var(--bw-text-muted)",
9927
+ fontFamily: "var(--bw-font-family)",
9928
+ display: "flex",
9929
+ alignItems: "center",
9930
+ gap: "4px",
9931
+ }, children: [u$2(IconMoney, { size: 20, color: "var(--bw-highlight-color)" }), " Preis:"] }), u$2("span", { style: {
9932
+ color: "var(--bw-text-color)",
9933
+ fontWeight: "500",
9934
+ fontFamily: "var(--bw-font-family)",
9935
+ }, children: [formatCurrency(eventDetails.price), " pro Person"] })] })] })] }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [u$2("form", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [u$2("div", { style: {
9998
9936
  backgroundColor: "var(--bw-surface-color)",
9999
9937
  border: `1px solid var(--bw-border-color)`,
10000
9938
  backdropFilter: "blur(4px)",
@@ -10151,9 +10089,10 @@
10151
10089
  height: "20px",
10152
10090
  border: "1px solid var(--bw-border-color)",
10153
10091
  accentColor: "var(--bw-highlight-color)",
10154
- backgroundColor: form.getValues("acceptTerms") === true
10155
- ? "var(--bw-highlight-color)"
10156
- : "var(--bw-surface-color)",
10092
+ cursor: "pointer",
10093
+ appearance: "checkbox",
10094
+ WebkitAppearance: "checkbox",
10095
+ MozAppearance: "checkbox",
10157
10096
  } }), u$2("label", { htmlFor: "acceptTerms", style: {
10158
10097
  fontSize: "var(--bw-font-size)",
10159
10098
  color: "var(--bw-text-muted)",
@@ -10163,7 +10102,7 @@
10163
10102
  }, children: ["Ich akzeptiere die", " ", u$2("a", { href: eventDetails.agbUrl || "/terms", style: {
10164
10103
  color: "var(--bw-highlight-color)",
10165
10104
  textDecoration: "none",
10166
- }, target: "_blank", rel: "noopener noreferrer", children: "Allgemeinen Gesch\u00E4ftsbedingungen" }), "*"] })] }), form.formState.errors.acceptTerms && (u$2("p", { style: {
10105
+ }, target: "_blank", rel: "noopener noreferrer", children: "AGBs" }), "*"] })] }), form.formState.errors.acceptTerms && (u$2("p", { style: {
10167
10106
  color: "var(--bw-error-color)",
10168
10107
  fontSize: "var(--bw-font-size)",
10169
10108
  marginTop: "8px",
@@ -10316,6 +10255,341 @@
10316
10255
  ` })] }) }));
10317
10256
  }
10318
10257
 
10258
+ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId, }) => {
10259
+ const [bookingData, setBookingData] = d$1(null);
10260
+ const [eventDetails, setEventDetails] = d$1(null);
10261
+ const [formData, setFormData] = d$1(null);
10262
+ const [isLoading, setIsLoading] = d$1(false);
10263
+ const [paymentStatus, setPaymentStatus] = d$1(null);
10264
+ const fetchBookingData = async (intentId) => {
10265
+ const targetPaymentIntentId = paymentIntentId;
10266
+ // If we have payment intent ID, fetch from API
10267
+ if (targetPaymentIntentId) {
10268
+ setIsLoading(true);
10269
+ try {
10270
+ const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/get-booking-by-payment-intent"), {
10271
+ method: "POST",
10272
+ headers: createApiHeaders(config),
10273
+ body: JSON.stringify(createRequestBody(config, {
10274
+ paymentIntentId: targetPaymentIntentId,
10275
+ })),
10276
+ });
10277
+ const data = await response.json();
10278
+ if (response.ok) {
10279
+ setBookingData({
10280
+ booking: data.booking,
10281
+ order: data.order,
10282
+ payments: data.payments,
10283
+ orderItems: data.orderItems,
10284
+ stripePaymentIntent: data.stripePaymentIntent,
10285
+ });
10286
+ setEventDetails({
10287
+ id: data.booking.eventInstance.id,
10288
+ name: data.booking.eventInstance.eventType.name,
10289
+ description: data.booking.eventInstance.eventType.description,
10290
+ startTime: data.booking.eventInstance.startTime,
10291
+ endTime: data.booking.eventInstance.endTime,
10292
+ price: data.order.total / data.booking.participantCount,
10293
+ });
10294
+ setFormData({
10295
+ customerEmail: data.booking.customerEmail,
10296
+ customerName: data.booking.customerName,
10297
+ customerPhone: data.booking.customerPhone,
10298
+ participants: data.booking.participants || [],
10299
+ });
10300
+ // Set payment status from Stripe data or order status
10301
+ setPaymentStatus(data.stripePaymentIntent?.status || data.order.status);
10302
+ }
10303
+ else {
10304
+ onError?.(data.error || "Fehler beim Abrufen der Buchungsdaten");
10305
+ }
10306
+ }
10307
+ catch (err) {
10308
+ console.error("[BookingSuccessModal] Error fetching booking data:", err);
10309
+ onError?.("Ein Fehler ist bei der Verarbeitung aufgetreten.");
10310
+ }
10311
+ finally {
10312
+ setIsLoading(false);
10313
+ }
10314
+ return;
10315
+ }
10316
+ };
10317
+ y$1(() => {
10318
+ if (isOpen) {
10319
+ fetchBookingData();
10320
+ }
10321
+ }, [isOpen, paymentIntentId, config, onError]);
10322
+ if (!isOpen)
10323
+ return null;
10324
+ // Show loading state while fetching data
10325
+ if (isLoading || !bookingData) {
10326
+ return (u$2(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: u$2("div", { style: {
10327
+ padding: "var(--bw-spacing-large)",
10328
+ textAlign: "center",
10329
+ minHeight: "200px",
10330
+ display: "flex",
10331
+ alignItems: "center",
10332
+ justifyContent: "center",
10333
+ }, children: u$2("div", { style: {
10334
+ color: "var(--bw-text-muted)",
10335
+ fontFamily: "var(--bw-font-family)",
10336
+ fontSize: "var(--bw-font-size-large)",
10337
+ }, children: "Buchungsdaten werden geladen..." }) }) }));
10338
+ }
10339
+ const booking = bookingData.booking;
10340
+ new Date(eventDetails.startTime);
10341
+ new Date(eventDetails.endTime);
10342
+ const handlePrint = () => {
10343
+ window.print();
10344
+ };
10345
+ const formatTime12 = (dateString) => {
10346
+ return formatTime(dateString, "Europe/Berlin", "de");
10347
+ };
10348
+ const formatDate12 = (dateString) => {
10349
+ return formatEventDate(dateString);
10350
+ };
10351
+ return (u$2(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: u$2("div", { style: {
10352
+ fontFamily: "var(--bw-font-family)",
10353
+ padding: "var(--bw-spacing-large)",
10354
+ maxWidth: "100%",
10355
+ }, children: [u$2("div", { className: "flex justify-between items-center print-hidden", style: {
10356
+ marginBottom: "var(--bw-spacing-large)",
10357
+ display: "flex",
10358
+ alignItems: "center",
10359
+ justifyContent: "space-between",
10360
+ }, children: [u$2("h1", { className: "font-bold text-3xl flex items-center gap-2", style: {
10361
+ color: "var(--bw-text-color)",
10362
+ fontFamily: "var(--bw-font-family)",
10363
+ marginBottom: "var(--bw-spacing-large)",
10364
+ display: "flex",
10365
+ alignItems: "center",
10366
+ gap: "var(--bw-spacing-small)",
10367
+ }, children: [u$2("div", { style: {
10368
+ width: "32px",
10369
+ height: "32px",
10370
+ backgroundColor: "var(--bw-highlight-color, #10B981)",
10371
+ borderRadius: "50%",
10372
+ display: "flex",
10373
+ alignItems: "center",
10374
+ justifyContent: "center",
10375
+ color: "white",
10376
+ }, children: "\u2713" }), u$2("p", { style: {
10377
+ fontSize: "var(--bw-font-size-large)",
10378
+ fontWeight: "600",
10379
+ color: "var(--bw-highlight-color)",
10380
+ margin: "0px 10px",
10381
+ }, children: "Buchung erfolgreich erstellt!" })] }), u$2("button", { onClick: handlePrint, style: {
10382
+ backgroundColor: "transparent",
10383
+ border: `1px solid var(--bw-border-color)`,
10384
+ color: "var(--bw-text-color)",
10385
+ padding: "8px 16px",
10386
+ borderRadius: "var(--bw-border-radius)",
10387
+ cursor: "pointer",
10388
+ fontFamily: "var(--bw-font-family)",
10389
+ fontSize: "var(--bw-font-size-small)",
10390
+ }, children: "Drucken" })] }), u$2("div", { className: "print-only print-booking-header", children: [u$2("h1", { children: "Buchungsbest\u00E4tigung" }), u$2("div", { className: "subtitle", children: "Vielen Dank f\u00FCr deine Buchung! Hier sind deine Buchungsdetails." })] }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [u$2("div", { className: "print-booking-card", style: {
10391
+ backgroundColor: "var(--bw-surface-color)",
10392
+ border: `1px solid var(--bw-border-color)`,
10393
+ borderRadius: "var(--bw-border-radius)",
10394
+ padding: "var(--bw-spacing)",
10395
+ marginBottom: "var(--bw-spacing-large)",
10396
+ }, children: [u$2("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: u$2("h3", { style: {
10397
+ fontSize: "var(--bw-font-size-large)",
10398
+ fontWeight: "600",
10399
+ color: "var(--bw-text-color)",
10400
+ margin: "0",
10401
+ fontFamily: "var(--bw-font-family)",
10402
+ }, children: "Buchungsdetails" }) }), u$2("div", { className: "print-only", children: u$2("div", { className: "print-section-title", children: "Buchungsdetails" }) }), u$2("div", { className: "space-y-4 print-only:space-y-2 print-only:p-0", children: [u$2("div", { className: "gap-4 grid grid-cols-2 print-detail-grid", style: {
10403
+ display: "grid",
10404
+ gridTemplateColumns: "1fr 1fr",
10405
+ gap: "var(--bw-spacing)",
10406
+ }, children: [u$2("div", { className: "print-detail-item", style: { marginBottom: "span 2" }, children: [u$2("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10407
+ color: "var(--bw-text-muted)",
10408
+ fontSize: "var(--bw-font-size-small)",
10409
+ fontFamily: "var(--bw-font-family)",
10410
+ }, children: "Buchungs-ID" }), u$2("p", { className: "font-semibold print-detail-value", style: {
10411
+ fontWeight: "600",
10412
+ color: "var(--bw-text-color)",
10413
+ fontFamily: "var(--bw-font-family)",
10414
+ fontSize: "var(--bw-font-size-medium)",
10415
+ margin: "0px 0px 6px 0",
10416
+ }, children: booking.bookingHash })] }), u$2("div", { className: "print-detail-item", children: [u$2("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10417
+ color: "var(--bw-text-muted)",
10418
+ fontSize: "var(--bw-font-size-small)",
10419
+ fontFamily: "var(--bw-font-family)",
10420
+ }, children: "Bezahl-Status" }), u$2("div", { children: [u$2("span", { className: "print-hidden", style: {
10421
+ backgroundColor: "var(--bw-success-color, #10B981)",
10422
+ color: "white",
10423
+ padding: "2px 8px",
10424
+ borderRadius: "var(--bw-border-radius-small)",
10425
+ fontSize: "var(--bw-font-size-small)",
10426
+ fontFamily: "var(--bw-font-family)",
10427
+ width: "fit-content",
10428
+ }, children: paymentStatus === "succeeded"
10429
+ ? "erfolgreich"
10430
+ : paymentStatus === "canceled" || paymentStatus === "failed"
10431
+ ? "fehlgeschlagen"
10432
+ : "in Bearbeitung" }), u$2("span", { className: "print-only print-status-badge print-status-paid", children: "Bezahlt" })] })] })] }), u$2("div", { className: "print-detail-item print-only:col-span-2", children: [u$2("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10433
+ color: "var(--bw-text-muted)",
10434
+ fontSize: "var(--bw-font-size-small)",
10435
+ fontFamily: "var(--bw-font-family)",
10436
+ }, children: "Event" }), u$2("p", { className: "font-semibold print-detail-value", style: {
10437
+ fontWeight: "600",
10438
+ color: "var(--bw-text-color)",
10439
+ fontFamily: "var(--bw-font-family)",
10440
+ fontSize: "var(--bw-font-size-large)",
10441
+ margin: "0 0 6px 0",
10442
+ }, children: eventDetails.name })] }), u$2("div", { className: "gap-4 grid grid-cols-2 print-detail-grid", style: {
10443
+ display: "grid",
10444
+ gridTemplateColumns: "1fr 1fr",
10445
+ gap: "var(--bw-spacing)",
10446
+ }, children: [u$2("div", { className: "print-detail-item", children: [u$2("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10447
+ color: "var(--bw-text-muted)",
10448
+ fontSize: "var(--bw-font-size-small)",
10449
+ fontFamily: "var(--bw-font-family)",
10450
+ }, children: "Datum" }), u$2("p", { className: "print-detail-value", style: {
10451
+ fontWeight: "600",
10452
+ color: "var(--bw-text-color)",
10453
+ fontFamily: "var(--bw-font-family)",
10454
+ fontSize: "var(--bw-font-size-large)",
10455
+ margin: "0 0 6px 0",
10456
+ }, children: formatDate12(eventDetails.startTime) })] }), u$2("div", { className: "print-detail-item", children: [u$2("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10457
+ color: "var(--bw-text-muted)",
10458
+ fontSize: "var(--bw-font-size-small)",
10459
+ fontFamily: "var(--bw-font-family)",
10460
+ }, children: "Zeit" }), u$2("p", { className: "print-detail-value", style: {
10461
+ fontWeight: "600",
10462
+ color: "var(--bw-text-color)",
10463
+ fontFamily: "var(--bw-font-family)",
10464
+ fontSize: "var(--bw-font-size-large)",
10465
+ margin: "0 0 6px 0",
10466
+ }, children: [formatTime12(eventDetails.startTime), " - ", formatTime12(eventDetails.endTime)] })] })] })] })] }), formData.participants && formData.participants.length > 0 && (u$2("div", { className: "print-booking-card", style: {
10467
+ border: `1px solid var(--bw-border-color)`,
10468
+ borderRadius: "var(--bw-border-radius)",
10469
+ padding: "var(--bw-spacing)",
10470
+ marginBottom: "var(--bw-spacing-large)",
10471
+ }, children: [u$2("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: u$2("h3", { style: {
10472
+ fontSize: "var(--bw-font-size-large)",
10473
+ fontWeight: "600",
10474
+ color: "var(--bw-text-color)",
10475
+ margin: "0",
10476
+ fontFamily: "var(--bw-font-family)",
10477
+ }, children: ["Teilnehmer (", formData.participants.length, ")"] }) }), u$2("div", { className: "print-only", children: u$2("div", { className: "print-section-title", children: ["Teilnehmer (", formData.participants.length, ")"] }) }), u$2("div", { className: "print-only:p-0", children: u$2("div", { className: "space-y-3 print-only:space-y-1", style: {
10478
+ display: "flex",
10479
+ flexDirection: "column",
10480
+ gap: "var(--bw-spacing-small)",
10481
+ }, children: formData.participants
10482
+ .filter((p) => p.name.trim())
10483
+ .map((participant, index) => (u$2("div", { className: "flex justify-between items-center bg-muted p-3 rounded-lg print-participant", style: {
10484
+ display: "flex",
10485
+ justifyContent: "space-between",
10486
+ alignItems: "center",
10487
+ backgroundColor: "var(--bw-surface-color, #f9fafb)",
10488
+ padding: "var(--bw-spacing-small)",
10489
+ borderRadius: "var(--bw-border-radius-small)",
10490
+ }, children: u$2("div", { className: "print-participant-info", children: [u$2("div", { className: "print-participant-name", style: {
10491
+ color: "var(--bw-text-color)",
10492
+ fontFamily: "var(--bw-font-family)",
10493
+ }, children: participant.name }), participant.age && (u$2("div", { className: "text-muted-foreground text-sm print-participant-age", style: {
10494
+ color: "var(--bw-text-muted)",
10495
+ fontSize: "var(--bw-font-size-small)",
10496
+ fontFamily: "var(--bw-font-family)",
10497
+ }, children: [participant.age, " Jahre"] }))] }) }, index))) }) })] })), u$2("div", { className: "print-booking-card", style: {
10498
+ backgroundColor: "var(--bw-surface-color)",
10499
+ border: `1px solid var(--bw-border-color)`,
10500
+ borderRadius: "var(--bw-border-radius)",
10501
+ padding: "var(--bw-spacing)",
10502
+ marginBottom: "var(--bw-spacing-large)",
10503
+ }, children: [u$2("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: u$2("h3", { style: {
10504
+ fontSize: "var(--bw-font-size-large)",
10505
+ fontWeight: "600",
10506
+ color: "var(--bw-text-color)",
10507
+ margin: "0",
10508
+ fontFamily: "var(--bw-font-family)",
10509
+ }, children: "Zahlungs\u00FCbersicht" }) }), u$2("div", { className: "print-only", children: u$2("div", { className: "print-section-title", children: "Zahlungs\u00FCbersicht" }) }), u$2("div", { className: "space-y-2 print-only:p-0 print-only:space-y-1", children: [u$2("div", { className: "print-payment-summary print-only", children: [u$2("div", { className: "print-payment-row", children: [u$2("span", { children: "Gesamtbetrag" }), u$2("span", { children: formatCurrency(booking.total) })] }), u$2("div", { className: "print-payment-row", children: [u$2("span", { children: "Bezahlt" }), u$2("span", { children: formatCurrency(booking.total) })] })] }), u$2("div", { className: "print-hidden space-y-2", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: "Gesamtbetrag" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(booking.total) })] }), u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: "Bezahlt" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(booking.total) })] })] })] })] }), u$2("div", { className: "print-booking-card", style: {
10510
+ backgroundColor: "var(--bw-surface-color)",
10511
+ border: `1px solid var(--bw-border-color)`,
10512
+ borderRadius: "var(--bw-border-radius)",
10513
+ padding: "var(--bw-spacing)",
10514
+ marginBottom: "var(--bw-spacing-large)",
10515
+ }, children: [u$2("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: u$2("h3", { style: {
10516
+ fontSize: "var(--bw-font-size-large)",
10517
+ fontWeight: "600",
10518
+ color: "var(--bw-text-color)",
10519
+ margin: "0",
10520
+ fontFamily: "var(--bw-font-family)",
10521
+ }, children: "Kontaktdaten" }) }), u$2("div", { className: "print-only", children: u$2("div", { className: "print-section-title", children: "Kontaktdaten" }) }), u$2("div", { className: "space-y-2 print-only:p-0 print-only:space-y-1", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Name:" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerName })] }), u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "E-Mail:" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerEmail })] }), formData.customerPhone && (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Telefon:" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerPhone })] }))] })] }), u$2("div", { className: "print-booking-card", style: {
10522
+ backgroundColor: "var(--bw-surface-color)",
10523
+ border: `1px solid var(--bw-border-color)`,
10524
+ borderRadius: "var(--bw-border-radius)",
10525
+ padding: "var(--bw-spacing)",
10526
+ marginBottom: "var(--bw-spacing-large)",
10527
+ textAlign: "center",
10528
+ }, children: u$2("p", { style: {
10529
+ color: "var(--bw-text-muted)",
10530
+ margin: 0,
10531
+ fontFamily: "var(--bw-font-family)",
10532
+ fontSize: "var(--bw-font-size-small)",
10533
+ textAlign: "center",
10534
+ }, children: ["Eine Best\u00E4tigungs-E-Mail wird in K\u00FCrze an ", formData.customerEmail, " gesendet."] }) }), paymentStatus && paymentStatus !== "succeeded" && (u$2("div", { style: {
10535
+ backgroundColor: "var(--bw-warning-bg, #FEF3C7)",
10536
+ border: "1px solid var(--bw-warning-border, #F59E0B)",
10537
+ borderRadius: "var(--bw-border-radius)",
10538
+ padding: "var(--bw-spacing)",
10539
+ marginBottom: "var(--bw-spacing-large)",
10540
+ textAlign: "center",
10541
+ }, children: [u$2("p", { style: {
10542
+ color: "var(--bw-warning-text, #92400E)",
10543
+ margin: "0 0 var(--bw-spacing) 0",
10544
+ fontFamily: "var(--bw-font-family)",
10545
+ fontWeight: "600",
10546
+ }, children: "Zahlung wird noch verarbeitet" }), u$2("p", { style: {
10547
+ color: "var(--bw-warning-text, #92400E)",
10548
+ margin: "0 0 var(--bw-spacing) 0",
10549
+ fontFamily: "var(--bw-font-family)",
10550
+ fontSize: "var(--bw-font-size-small)",
10551
+ }, children: ["Status: ", paymentStatus] }), u$2("button", { onClick: () => fetchBookingData(), disabled: isLoading, style: {
10552
+ backgroundColor: "var(--bw-warning-text, #92400E)",
10553
+ color: "white",
10554
+ padding: "8px 16px",
10555
+ border: "none",
10556
+ borderRadius: "var(--bw-border-radius)",
10557
+ fontSize: "var(--bw-font-size-small)",
10558
+ fontWeight: "600",
10559
+ cursor: isLoading ? "not-allowed" : "pointer",
10560
+ fontFamily: "var(--bw-font-family)",
10561
+ opacity: isLoading ? 0.6 : 1,
10562
+ transition: "all 0.2s ease",
10563
+ }, children: isLoading ? "Aktualisiere..." : "Status aktualisieren" })] })), u$2("div", { style: {
10564
+ textAlign: "center",
10565
+ marginTop: "var(--bw-spacing-large)",
10566
+ paddingTop: "var(--bw-spacing)",
10567
+ borderTop: `1px solid var(--bw-border-color)`,
10568
+ }, children: u$2("button", { onClick: onClose, style: {
10569
+ backgroundColor: "var(--bw-highlight-color)",
10570
+ color: "white",
10571
+ padding: "12px 32px",
10572
+ border: "none",
10573
+ borderRadius: "var(--bw-border-radius)",
10574
+ fontSize: "var(--bw-font-size)",
10575
+ fontWeight: "600",
10576
+ cursor: "pointer",
10577
+ fontFamily: "var(--bw-font-family)",
10578
+ transition: "all 0.2s ease",
10579
+ }, onMouseEnter: (e) => {
10580
+ e.currentTarget.style.opacity = "0.9";
10581
+ }, onMouseLeave: (e) => {
10582
+ e.currentTarget.style.opacity = "1";
10583
+ }, children: "Schlie\u00DFen" }) }), u$2("div", { className: "print-only print-footer", children: [u$2("p", { children: ["Diese Buchungsbest\u00E4tigung wurde am", " ", new Date().toLocaleString("de-DE", {
10584
+ day: "2-digit",
10585
+ month: "2-digit",
10586
+ year: "numeric",
10587
+ hour: "2-digit",
10588
+ minute: "2-digit",
10589
+ timeZone: "Europe/Berlin",
10590
+ }), " ", "erstellt."] }), u$2("p", { children: "Bei Fragen zu deiner Buchung kontaktiere uns gerne." })] })] })] }) }));
10591
+ };
10592
+
10319
10593
  const months = [
10320
10594
  "Januar",
10321
10595
  "Februar",
@@ -11393,198 +11667,6 @@
11393
11667
  }
11394
11668
 
11395
11669
  // Predefined themes & Style Provider have been moved to ../styles/StyleProvider.tsx
11396
- // Success Modal Component
11397
- const BookingSuccessModal = ({ isOpen, onClose, bookingData, eventDetails, formData, config, }) => {
11398
- if (!isOpen || !bookingData)
11399
- return null;
11400
- const booking = bookingData.booking;
11401
- return (u$2("div", { style: {
11402
- position: "fixed",
11403
- top: 0,
11404
- left: 0,
11405
- right: 0,
11406
- bottom: 0,
11407
- backgroundColor: "rgba(0, 0, 0, 0.5)",
11408
- zIndex: 10000,
11409
- display: "flex",
11410
- alignItems: "center",
11411
- justifyContent: "center",
11412
- padding: "var(--bw-spacing)",
11413
- }, children: u$2("div", { style: {
11414
- backgroundColor: "var(--bw-background-color)",
11415
- borderRadius: "var(--bw-border-radius)",
11416
- padding: "var(--bw-spacing-large)",
11417
- maxWidth: "500px",
11418
- width: "100%",
11419
- maxHeight: "90vh",
11420
- overflow: "auto",
11421
- position: "relative",
11422
- border: `1px solid var(--bw-border-color)`,
11423
- boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
11424
- }, children: [u$2("button", { onClick: onClose, style: {
11425
- position: "absolute",
11426
- top: "var(--bw-spacing)",
11427
- right: "var(--bw-spacing)",
11428
- background: "none",
11429
- border: "none",
11430
- fontSize: "24px",
11431
- cursor: "pointer",
11432
- color: "var(--bw-text-muted)",
11433
- width: "32px",
11434
- height: "32px",
11435
- display: "flex",
11436
- alignItems: "center",
11437
- justifyContent: "center",
11438
- borderRadius: "var(--bw-border-radius-small)",
11439
- }, children: "\u00D7" }), u$2("div", { style: {
11440
- textAlign: "center",
11441
- marginBottom: "var(--bw-spacing-large)",
11442
- }, children: [u$2("div", { style: {
11443
- width: "64px",
11444
- height: "64px",
11445
- backgroundColor: "var(--bw-success-color, #10B981)",
11446
- borderRadius: "50%",
11447
- margin: "0 auto var(--bw-spacing)",
11448
- display: "flex",
11449
- alignItems: "center",
11450
- justifyContent: "center",
11451
- fontSize: "32px",
11452
- color: "white",
11453
- }, children: "\u2713" }), u$2("h2", { style: {
11454
- fontSize: "var(--bw-font-size-xl)",
11455
- fontWeight: "700",
11456
- color: "var(--bw-text-color)",
11457
- margin: "0 0 var(--bw-spacing-small) 0",
11458
- fontFamily: "var(--bw-font-family)",
11459
- }, children: "Buchung erfolgreich!" }), u$2("p", { style: {
11460
- color: "var(--bw-text-muted)",
11461
- fontFamily: "var(--bw-font-family)",
11462
- margin: 0,
11463
- }, children: "Deine Buchung wurde erfolgreich abgeschlossen." })] }), u$2("div", { style: {
11464
- backgroundColor: "var(--bw-surface-color)",
11465
- border: `1px solid var(--bw-border-color)`,
11466
- borderRadius: "var(--bw-border-radius)",
11467
- padding: "var(--bw-spacing)",
11468
- marginBottom: "var(--bw-spacing-large)",
11469
- }, children: [u$2("h3", { style: {
11470
- fontSize: "var(--bw-font-size-large)",
11471
- fontWeight: "600",
11472
- color: "var(--bw-text-color)",
11473
- margin: "0 0 var(--bw-spacing) 0",
11474
- fontFamily: "var(--bw-font-family)",
11475
- }, children: "Buchungsdetails" }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing)" }, children: [booking.bookingHash && (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Buchungs-ID:" }), u$2("span", { style: {
11476
- color: "var(--bw-text-color)",
11477
- fontWeight: "500",
11478
- fontFamily: "monospace",
11479
- fontSize: "var(--bw-font-size-small)",
11480
- backgroundColor: "var(--bw-background-color)",
11481
- padding: "4px 8px",
11482
- borderRadius: "var(--bw-border-radius-small)",
11483
- }, children: booking.bookingHash })] })), u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Event:" }), u$2("span", { style: {
11484
- color: "var(--bw-text-color)",
11485
- fontWeight: "500",
11486
- fontFamily: "var(--bw-font-family)",
11487
- textAlign: "right",
11488
- maxWidth: "60%",
11489
- }, children: eventDetails.name })] }), u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Datum:" }), u$2("span", { style: {
11490
- color: "var(--bw-text-color)",
11491
- fontWeight: "500",
11492
- fontFamily: "var(--bw-font-family)",
11493
- textAlign: "right",
11494
- maxWidth: "60%",
11495
- }, children: formatDate(eventDetails.startTime) })] }), u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Teilnehmer:" }), u$2("span", { style: {
11496
- color: "var(--bw-text-color)",
11497
- fontWeight: "500",
11498
- fontFamily: "var(--bw-font-family)",
11499
- }, children: booking.participantCount })] }), u$2("div", { style: {
11500
- display: "flex",
11501
- justifyContent: "space-between",
11502
- alignItems: "center",
11503
- borderTop: `1px solid var(--bw-border-color)`,
11504
- paddingTop: "var(--bw-spacing)",
11505
- marginTop: "var(--bw-spacing)",
11506
- }, children: [u$2("span", { style: {
11507
- color: "var(--bw-text-color)",
11508
- fontWeight: "600",
11509
- fontFamily: "var(--bw-font-family)",
11510
- }, children: "Gesamtbetrag:" }), u$2("span", { style: {
11511
- color: "var(--bw-text-color)",
11512
- fontWeight: "600",
11513
- fontSize: "var(--bw-font-size-large)",
11514
- fontFamily: "var(--bw-font-family)",
11515
- }, children: formatCurrency(booking.total) })] })] })] }), formData.participants && formData.participants.length > 0 && (u$2("div", { style: {
11516
- backgroundColor: "var(--bw-surface-color)",
11517
- border: `1px solid var(--bw-border-color)`,
11518
- borderRadius: "var(--bw-border-radius)",
11519
- padding: "var(--bw-spacing)",
11520
- marginBottom: "var(--bw-spacing-large)",
11521
- }, children: [u$2("h3", { style: {
11522
- fontSize: "var(--bw-font-size-large)",
11523
- fontWeight: "600",
11524
- color: "var(--bw-text-color)",
11525
- margin: "0 0 var(--bw-spacing) 0",
11526
- fontFamily: "var(--bw-font-family)",
11527
- }, children: "Teilnehmer" }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: formData.participants
11528
- .filter((p) => p.name.trim())
11529
- .map((participant, index) => (u$2("div", { style: {
11530
- display: "flex",
11531
- justifyContent: "space-between",
11532
- alignItems: "center",
11533
- padding: "var(--bw-spacing-small)",
11534
- backgroundColor: "var(--bw-background-color)",
11535
- borderRadius: "var(--bw-border-radius-small)",
11536
- }, children: [u$2("span", { style: {
11537
- color: "var(--bw-text-color)",
11538
- fontFamily: "var(--bw-font-family)",
11539
- }, children: participant.name }), participant.age && (u$2("span", { style: {
11540
- color: "var(--bw-text-muted)",
11541
- fontSize: "var(--bw-font-size-small)",
11542
- fontFamily: "var(--bw-font-family)",
11543
- }, children: [participant.age, " Jahre"] }))] }, index))) })] })), u$2("div", { style: {
11544
- backgroundColor: "var(--bw-surface-color)",
11545
- border: `1px solid var(--bw-border-color)`,
11546
- borderRadius: "var(--bw-border-radius)",
11547
- padding: "var(--bw-spacing)",
11548
- marginBottom: "var(--bw-spacing-large)",
11549
- }, children: [u$2("h3", { style: {
11550
- fontSize: "var(--bw-font-size-large)",
11551
- fontWeight: "600",
11552
- color: "var(--bw-text-color)",
11553
- margin: "0 0 var(--bw-spacing) 0",
11554
- fontFamily: "var(--bw-font-family)",
11555
- }, children: "Kontaktdaten" }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Name:" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerName })] }), u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "E-Mail:" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerEmail })] }), formData.customerPhone && (u$2("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Telefon:" }), u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerPhone })] }))] })] }), u$2("div", { style: {
11556
- backgroundColor: "var(--bw-surface-muted-bg, rgba(59, 130, 246, 0.05))",
11557
- border: `1px solid var(--bw-border-color)`,
11558
- borderRadius: "var(--bw-border-radius)",
11559
- padding: "var(--bw-spacing)",
11560
- marginBottom: "var(--bw-spacing-large)",
11561
- textAlign: "center",
11562
- }, children: [u$2("div", { style: {
11563
- color: "var(--bw-highlight-color)",
11564
- fontSize: "24px",
11565
- marginBottom: "var(--bw-spacing-small)",
11566
- }, children: "\uD83D\uDCE7" }), u$2("p", { style: {
11567
- color: "var(--bw-text-muted)",
11568
- margin: 0,
11569
- fontFamily: "var(--bw-font-family)",
11570
- fontSize: "var(--bw-font-size-small)",
11571
- }, children: ["Eine Best\u00E4tigungs-E-Mail wird in K\u00FCrze an ", formData.customerEmail, " gesendet."] })] }), u$2("div", { style: { textAlign: "center" }, children: u$2("button", { onClick: onClose, style: {
11572
- backgroundColor: "var(--bw-highlight-color)",
11573
- color: "white",
11574
- padding: "12px 32px",
11575
- border: "none",
11576
- borderRadius: "var(--bw-border-radius)",
11577
- fontSize: "var(--bw-font-size)",
11578
- fontWeight: "600",
11579
- cursor: "pointer",
11580
- fontFamily: "var(--bw-font-family)",
11581
- transition: "all 0.2s ease",
11582
- }, onMouseEnter: (e) => {
11583
- e.currentTarget.style.opacity = "0.9";
11584
- }, onMouseLeave: (e) => {
11585
- e.currentTarget.style.opacity = "1";
11586
- }, children: "Schlie\u00DFen" }) })] }) }));
11587
- };
11588
11670
  // Main widget component
11589
11671
  function UniversalBookingWidget({ config: baseConfig }) {
11590
11672
  // Apply URL parameter inference
@@ -11614,7 +11696,6 @@
11614
11696
  // Booking flow state
11615
11697
  const [eventDetails, setEventDetails] = d$1(null);
11616
11698
  const [stripePromise, setStripePromise] = d$1(null);
11617
- const [clientSecret, setClientSecret] = d$1(null);
11618
11699
  // SEPARATED LOADING STATES
11619
11700
  const [isLoading, setIsLoading] = d$1(true); // Only for initial widget load
11620
11701
  const [isLoadingEventInstances, setIsLoadingEventInstances] = d$1(false); // For loading event instances in sidebar
@@ -11622,7 +11703,7 @@
11622
11703
  const [isLoadingShowAll, setIsLoadingShowAll] = d$1(false); // For "show all events" operation
11623
11704
  const [error, setError] = d$1(null);
11624
11705
  const [isSuccess, setIsSuccess] = d$1(false);
11625
- const [successData, setSuccessData] = d$1(null);
11706
+ const [successPaymentIntentId, setSuccessPaymentIntentId] = d$1(null);
11626
11707
  const [systemConfig, setSystemConfig] = d$1(null);
11627
11708
  // PERFORMANCE OPTIMIZATION: Lazy component loading
11628
11709
  const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = d$1(false);
@@ -11669,6 +11750,29 @@
11669
11750
  initializeWidget();
11670
11751
  // eslint-disable-next-line react-hooks/exhaustive-deps
11671
11752
  }, [config]);
11753
+ // Handle Stripe payment return
11754
+ y$1(() => {
11755
+ const handleStripeReturn = () => {
11756
+ const stripeReturn = detectStripeReturn();
11757
+ if (stripeReturn) {
11758
+ if (stripeReturn.redirectStatus === "succeeded") {
11759
+ // Store payment intent ID and show success modal
11760
+ setSuccessPaymentIntentId(stripeReturn.paymentIntent);
11761
+ setIsSuccess(true);
11762
+ }
11763
+ else if (stripeReturn.redirectStatus === "failed") {
11764
+ setError("Die Zahlung war nicht erfolgreich. Bitte versuche es erneut.");
11765
+ }
11766
+ else {
11767
+ setError("Die Zahlung konnte nicht abgeschlossen werden. Bitte versuche es erneut.");
11768
+ }
11769
+ }
11770
+ };
11771
+ // Only run on mount to avoid running multiple times
11772
+ if (!isLoading) {
11773
+ handleStripeReturn();
11774
+ }
11775
+ }, [isLoading]); // Only depend on isLoading to run after initial load
11672
11776
  // PERFORMANCE OPTIMIZATION: Lazy load components when needed
11673
11777
  y$1(() => {
11674
11778
  if (currentStep === "eventInstances" && !shouldRenderInstanceSelection) {
@@ -11911,7 +12015,7 @@
11911
12015
  };
11912
12016
  const handleBookingSuccess = (result) => {
11913
12017
  setIsSuccess(true);
11914
- setSuccessData(result);
12018
+ setSuccessPaymentIntentId(result.paymentIntent.id);
11915
12019
  config.onSuccess?.(result);
11916
12020
  };
11917
12021
  const handleBookingError = (errorMessage) => {
@@ -12075,16 +12179,6 @@
12075
12179
  fontFamily: "var(--bw-font-family)",
12076
12180
  }, children: "Falls das Problem weiterhin besteht, kontaktiere bitte den Support." })] }) }) }));
12077
12181
  }
12078
- // Success state
12079
- if (isSuccess) {
12080
- return (u$2(StyleProvider, { config: config, children: u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12081
- setIsSuccess(false);
12082
- setCurrentStep("eventTypes");
12083
- // Reset lazy loading flags
12084
- setShouldRenderInstanceSelection(false);
12085
- setShouldRenderBookingForm(false);
12086
- }, bookingData: successData, eventDetails: eventDetails, formData: successData.formData, config: config }) }));
12087
- }
12088
12182
  // Main view based on view mode
12089
12183
  if (viewMode === "next-events" && showingPreview) {
12090
12184
  // Next events preview mode
@@ -12100,17 +12194,47 @@
12100
12194
  setCurrentStep("eventTypes");
12101
12195
  setShowingPreview(true);
12102
12196
  setEventDetails(null);
12103
- }, systemConfig: systemConfig }))] }));
12197
+ }, systemConfig: systemConfig })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12198
+ setIsSuccess(false);
12199
+ setCurrentStep("eventTypes");
12200
+ setShowingPreview(true);
12201
+ // Reset state
12202
+ setSuccessPaymentIntentId(null);
12203
+ // Reset lazy loading flags
12204
+ setShouldRenderInstanceSelection(false);
12205
+ setShouldRenderBookingForm(false);
12206
+ // Clean up URL to remove Stripe parameters
12207
+ const url = new URL(window.location.href);
12208
+ url.searchParams.delete("payment_intent");
12209
+ url.searchParams.delete("payment_intent_client_secret");
12210
+ url.searchParams.delete("redirect_status");
12211
+ window.history.replaceState({}, "", url.toString());
12212
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }));
12104
12213
  }
12105
12214
  if (viewMode === "next-events" && !showingPreview && currentStep === "eventInstances") {
12106
12215
  // Show all events for the single event type
12107
- return (u$2(StyleProvider, { config: config, children: shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
12108
- setShowingPreview(true);
12109
- setCurrentStep("eventTypes");
12110
- }, isOpen: currentStep === "eventInstances", onClose: () => {
12111
- setShowingPreview(true);
12112
- setCurrentStep("eventTypes");
12113
- }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })) }));
12216
+ return (u$2(StyleProvider, { config: config, children: [shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
12217
+ setShowingPreview(true);
12218
+ setCurrentStep("eventTypes");
12219
+ }, isOpen: currentStep === "eventInstances", onClose: () => {
12220
+ setShowingPreview(true);
12221
+ setCurrentStep("eventTypes");
12222
+ }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12223
+ setIsSuccess(false);
12224
+ setCurrentStep("eventTypes");
12225
+ setShowingPreview(true);
12226
+ // Reset state
12227
+ setSuccessPaymentIntentId(null);
12228
+ // Reset lazy loading flags
12229
+ setShouldRenderInstanceSelection(false);
12230
+ setShouldRenderBookingForm(false);
12231
+ // Clean up URL to remove Stripe parameters
12232
+ const url = new URL(window.location.href);
12233
+ url.searchParams.delete("payment_intent");
12234
+ url.searchParams.delete("payment_intent_client_secret");
12235
+ url.searchParams.delete("redirect_status");
12236
+ window.history.replaceState({}, "", url.toString());
12237
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }));
12114
12238
  }
12115
12239
  if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
12116
12240
  // Button mode - show button that opens sidebar/booking directly
@@ -12140,7 +12264,22 @@
12140
12264
  setShouldRenderInstanceSelection(true);
12141
12265
  }
12142
12266
  }, children: config.buttonText ||
12143
- (isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen, onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig }))] }) }));
12267
+ (isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen, onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12268
+ setIsSuccess(false);
12269
+ setCurrentStep("eventTypes");
12270
+ setSidebarOpen(false);
12271
+ // Reset state
12272
+ setSuccessPaymentIntentId(null);
12273
+ // Reset lazy loading flags
12274
+ setShouldRenderInstanceSelection(false);
12275
+ setShouldRenderBookingForm(false);
12276
+ // Clean up URL to remove Stripe parameters
12277
+ const url = new URL(window.location.href);
12278
+ url.searchParams.delete("payment_intent");
12279
+ url.searchParams.delete("payment_intent_client_secret");
12280
+ url.searchParams.delete("redirect_status");
12281
+ window.history.replaceState({}, "", url.toString());
12282
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }) }));
12144
12283
  }
12145
12284
  // Cards mode (default) - show event type selection
12146
12285
  const cardsView = (u$2(EventTypeSelection, { eventTypes: eventTypes, onEventTypeSelect: handleEventTypeSelect, isLoading: isLoading, skeletonCount: getSkeletonCount() }));
@@ -12173,7 +12312,21 @@
12173
12312
  };
12174
12313
  };
12175
12314
  const backHandlers = getBackHandlers();
12176
- return (u$2(StyleProvider, { config: config, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig }))] }));
12315
+ return (u$2(StyleProvider, { config: config, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12316
+ setIsSuccess(false);
12317
+ setCurrentStep("eventTypes");
12318
+ // Reset state
12319
+ setSuccessPaymentIntentId(null);
12320
+ // Reset lazy loading flags
12321
+ setShouldRenderInstanceSelection(false);
12322
+ setShouldRenderBookingForm(false);
12323
+ // Clean up URL to remove Stripe parameters
12324
+ const url = new URL(window.location.href);
12325
+ url.searchParams.delete("payment_intent");
12326
+ url.searchParams.delete("payment_intent_client_secret");
12327
+ url.searchParams.delete("redirect_status");
12328
+ window.history.replaceState({}, "", url.toString());
12329
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }));
12177
12330
  }
12178
12331
 
12179
12332
  // Export init function for vanilla JS usage with Preact