1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{6654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=r(12115);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=s(e,n)),t&&(i.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14931:(e,t,r)=>{Promise.resolve().then(r.bind(r,62152)),Promise.resolve().then(r.t.bind(r,98830,23))},19946:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(12115);let i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:u,...p}=e;return(0,n.createElement)("svg",{ref:t,...a,width:i,height:i,stroke:r,strokeWidth:l?24*Number(o)/Number(i):o,className:s("lucide",c),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(p)&&{"aria-hidden":"true"},...p},[...u.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),l=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:l,...c}=r;return(0,n.createElement)(o,{ref:a,iconNode:t,className:s("lucide-".concat(i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...c})});return r.displayName=i(e),r}},31514:(e,t,r)=>{"use strict";r.d(t,{$s:()=>d,$y:()=>A,C8:()=>w,DX:()=>m,G:()=>u,LT:()=>x,RF:()=>g,Rb:()=>b,X_:()=>c,Xz:()=>k,Zq:()=>v,_G:()=>h,bp:()=>y,eE:()=>_,gu:()=>f,xN:()=>p});var n=r(98915),i=r(71906),s=r(39992),a=r(92972),o=r(26182),l=r(87358);let c=e=>(null==e?void 0:e.premiumId)||"anonymous",d=(e,t)=>{if((0,o.M)())return;if("true"===l.env.NEXT_PUBLIC_IS_DEVELOPMENT)return void console.log("\uD83D\uDD0D Analytics Event (Development Mode):",e,t);if(!(0,a.vP)())return void console.log("\uD83D\uDEAB Analytics event blocked - no user consent:",e);let r=(0,n.fz)();r&&(0,i.$s)(r,e,t),s.Ay.__loaded&&s.Ay.capture(e,t)},u=(e,t)=>{s.Ay.__loaded&&s.Ay.get_distinct_id()!==e&&("identified"===s.Ay.get_property("$user_state")&&s.Ay.reset(),s.Ay.identify(e,t))},p=()=>{s.Ay.__loaded&&s.Ay.reset()},m=(e,t,r,n)=>{d("widget_customization",{widget_id:e,customization_type:t,customization_value:r,user_id:n||"anonymous",timestamp:new Date().toISOString()})},g=(e,t,r,n)=>{d("widget_color_change",{widget_id:e,color_type:t,color_value:r,user_id:n,timestamp:new Date().toISOString()})},h=(e,t,r)=>{d("widget_preset_applied",{widget_id:e,preset_name:t,user_id:r,timestamp:new Date().toISOString()})},f=(e,t,r,n)=>{d("widget_business_connected",{widget_id:e,business_name:t,place_id:r,user_id:n,timestamp:new Date().toISOString()})},w=(e,t,r,n)=>{d("widget_modal_opened",{widget_id:e,widget_title:t,source:r,user_id:n,timestamp:new Date().toISOString()})},y=(e,t,r,n)=>{d("widget_modal_closed",{widget_id:e,closed_without_publishing:t,time_spent_seconds:r,user_id:n,timestamp:new Date().toISOString()})},x=(e,t,r,n)=>{d("publish_modal_opened",{widget_id:e,widget_type:t,has_business_connected:r,user_id:n,timestamp:new Date().toISOString()})},_=(e,t,r,n)=>{d("publish_modal_closed",{widget_id:e,closed_without_action:t,time_spent_seconds:r,user_id:n,timestamp:new Date().toISOString()})},v=(e,t,r,n)=>{d("widget_code_copied",{widget_id:e,framework:t,plan_type:r,user_id:n,timestamp:new Date().toISOString()})},k=(e,t,r)=>{d("widget_framework_selected",{widget_id:e,framework:t,user_id:r,timestamp:new Date().toISOString()})},b=(e,t,r,n)=>{d("premium_id_validation",{widget_id:e,validation_success:t,error_message:r||null,user_id:n,timestamp:new Date().toISOString()})},A=(e,t,r)=>{d("widget_mode_change",{widget_id:e,widget_mode:t,user_id:r,timestamp:new Date().toISOString()})}},49552:(e,t,r)=>{"use strict";r.d(t,{A:()=>
1o,V:()=>a});var n=r(95155),i=r(12115);let s=(0,i.createContext)({isLoaded:!1,executeRecaptcha:async()=>null});function a(){return(0,i.useContext)(s)}function o(e){let{children:t,siteKey:r,enabled:a=!0}=e,[o,l]=(0,i.useState)(!1),c=(0,i.useRef)(null),d=async()=>!!a&&!!r&&"your-recaptcha-site-key"!==r&&(window.grecaptcha?(await new Promise(e=>{window.grecaptcha.ready(()=>{l(!0),e()})}),!0):(c.current||(c.current=new Promise(e=>{let t=document.querySelector('script[data-revukit-recaptcha="true"]'),n=!1,i=null,s=t=>{n||(n=!0,i&&clearTimeout(i),t||(c.current=null),e(t))},a=()=>{if(!window.grecaptcha)return void s(!1);window.grecaptcha.ready(()=>{l(!0),s(!0)})},o=()=>{s(!1)};if(i=setTimeout(()=>{s(!1)},1e4),t){t.addEventListener("load",a,{once:!0}),t.addEventListener("error",o,{once:!0}),window.grecaptcha&&a();return}let d=document.createElement("script");d.src="https://www.google.com/recaptcha/api.js?render=".concat(r),d.async=!0,d.defer=!0,d.dataset.revukitRecaptcha="true",d.addEventListener("load",a,{once:!0}),d.addEventListener("error",o,{once:!0}),document.head.appendChild(d)})),c.current)),u=async e=>{if(!await d()||!window.grecaptcha||!r||"your-recaptcha-site-key"===r)return console.warn("reCAPTCHA not properly configured or disabled"),null;try{return await window.grecaptcha.execute(r,{action:e})}catch(e){return console.error("reCAPTCHA execution error:",e),null}};return(0,n.jsx)(s.Provider,{value:{isLoaded:o,executeRecaptcha:u},children:t})}},62152:(e,t,r)=>{"use strict";r.d(t,{AppProviders:()=>w});var n=r(95155),i=r(66553),s=r(12115),a=r(6874),o=r.n(a),l=r(19946);let c=(0,l.A)("cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]),d=(0,l.A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),u=(0,l.A)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);function p(e){let{initialAnalyticsConsent:t,onAcceptAll:r,onRejectAll:i,onSavePreferences:a}=e,[l,p]=(0,s.useState)(!1),[m,g]=(0,s.useState)(t);return(0,s.useEffect)(()=>{g(t)},[t]),(0,n.jsxs)("div",{className:"fixed inset-x-0 bottom-0 z-50 p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-black/5 backdrop-blur-[2px]"}),(0,n.jsx)("div",{className:"relative mx-auto w-full max-w-lg overflow-hidden rounded-2xl bg-white shadow-xl ring-1 ring-gray-200",children:(0,n.jsx)("div",{className:"p-6",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)(c,{className:"h-6 w-6 text-blue-600"})}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"mb-2 text-lg font-semibold text-gray-900",children:"We use cookies"}),(0,n.jsx)("p",{className:"mb-4 text-sm text-gray-600",children:"We use strictly necessary cookies to make our site work. We also ask permission for optional analytics cookies so we can improve the product."}),l&&(0,n.jsxs)("div",{className:"mb-4 space-y-3 rounded-lg bg-gray-50 p-4",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)(d,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-green-600"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Strictly necessary"}),(0,n.jsx)("p",{className:"text-xs text-gray-600",children:"Required for authentication, security, reCAPTCHA, and checkout/session integrity."})]}),(0,n.jsx)("span",{className:"rounded-full bg-gray-200 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-gray-700",children:"Always on"})]}),(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)(u,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-blue-600"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium text-gray-900",children:"Analytics"}),(0,n.jsx)("p",{className:"text-xs text-gray-600",children:"Optional measurement cookies for Firebase Analytics and PostHog."})]}),(0,n.jsx)("label",{className:"inline-flex cursor-pointer items-center",children:(0,n.jsx)("input",{type:"checkbox",className:"h-4 w-4 roun
1ded border-gray-300 text-blue-600 focus:ring-blue-500",checked:m,onChange:e=>g(e.target.checked)})})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,n.jsx)("button",{onClick:r,className:"flex-1 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Accept all"}),(0,n.jsx)("button",{onClick:i,className:"flex-1 rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Reject optional"})]}),l&&(0,n.jsx)("button",{onClick:()=>a({analytics:m}),className:"mt-2 w-full rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Save preferences"}),(0,n.jsx)("button",{onClick:()=>p(!l),className:"mt-3 text-xs text-blue-600 underline hover:text-blue-700",children:l?"Hide details":"Customize preferences"}),(0,n.jsxs)("p",{className:"mt-2 text-xs text-gray-500",children:["Read our"," ",(0,n.jsx)(o(),{href:"/cookie-policy",className:"underline hover:no-underline",children:"Cookie Policy"})," ","and"," ",(0,n.jsx)(o(),{href:"/privacy",className:"underline hover:no-underline",children:"Privacy Policy"}),". You can change your choice later via Cookie Preferences in the footer."]})]})]})})})]})}var m=r(92972);function g(e){let{children:t}=e,{isLoaded:r,hasConsented:i,consent:a,setConsent:o,setAnalyticsConsent:l}=function(){let[e,t]=(0,s.useState)(null),[r,n]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{t((0,m.HU)())};e(),n(!0);let r=r=>{var n;let i=null==(n=r.detail)?void 0:n.consent;return null===i?void t(null):i?void t(i):void e()},i=t=>{t.key&&t.key!==m.UN||e()};return window.addEventListener(m.Be,r),window.addEventListener("storage",i),()=>{window.removeEventListener(m.Be,r),window.removeEventListener("storage",i)}},[]);let i=(0,m.rp)(e);return{isLoaded:r,hasConsented:null!==i,consentStatus:i,consent:e,setConsent:e=>{null===e?(0,m.ge)():(0,m.F8)(e),t((0,m.HU)())},setAnalyticsConsent:e=>{(0,m.kJ)(e,"preferences"),t((0,m.HU)())},openPreferences:m.XM,resetConsent:()=>{(0,m.ge)(),t(null)}}}(),[c,d]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=()=>{d(!0)};return window.addEventListener(m.s6,e),()=>{window.removeEventListener(m.s6,e)}},[]),(0,n.jsxs)(n.Fragment,{children:[t,r&&(!i||c)&&(0,n.jsx)(p,{initialAnalyticsConsent:!!(null==a?void 0:a.preferences.analytics),onAcceptAll:()=>{o("accepted"),d(!1)},onRejectAll:()=>{o("rejected"),d(!1)},onSavePreferences:e=>{l(e.analytics),d(!1)}})]})}var h=r(49552),f=r(67655);function w(e){let{children:t}=e;return(0,n.jsx)(i.v,{children:(0,n.jsx)(f.y,{children:(0,n.jsx)(h.A,{siteKey:"6LfcP74rAAAAAMq9iHSxseFFy6MS_oCGfR3fo6sC",children:(0,n.jsx)(g,{children:t})})})})}r(66080)},66080:(e,t,r)=>{"use strict";r.d(t,{auth:()=>c,db:()=>d});var n=r(23915),i=r(45404),s=r(1834),a=r(77505),o=r(51139);let l=(0,n.Wp)({apiKey:"AIzaSyByk7ljvXUm1vEEPHInUfr4GAxYppupq-g",authDomain:"combikit-18153.firebaseapp.com",projectId:"combikit-18153",storageBucket:"combikit-18153.firebasestorage.app",messagingSenderId:"273078346416",appId:"1:273078346416:web:7189ca9b8dfdfef9301175",measurementId:"G-M4R6802EFV"}),c=(0,i.getAuth)(l),d=(0,s.aU)(l);(0,a.c7)(l),(0,o.Ay)(l,{provider:new o._u("6LfcP74rAAAAAMq9iHSxseFFy6MS_oCGfR3fo6sC"),isTokenAutoRefreshEnabled:!0}),Promise.resolve().then(r.bind(r,45404)).then(e=>{let{setPersistence:t,browserLocalPersistence:r}=e;t(c,r).catch(e=>{console.warn("Failed to set auth persistence:",e)})})},66553:(e,t,r)=>{"use strict";r.d(t,{J:()=>u,v:()=>d});var n=r(95155),i=r(12115),s=r(45404),a=r(66080),o=r(92972),l=r(31514);let c=(0,i.createContext)(void 0);function d(e){let{children:t}=e,[r,d]=(0,i.useState)(null),[u,p]=(0,i.useState)(!0);(0,i.useEffect)(()=>{let e=!0,t=async e=>{try{await fetch("/api/auth/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:e})})}catch(e){console.warn("Session refresh failed:",e)}},r=async()=>{try{let t=await fetch("/api/auth/me");if(t.ok){let r=await t.json();
1if(r.user&&e){let e={id:r.user.userId,email:r.user.email,premiumId:r.user.premiumId,planId:r.user.planId};d(e),p(!1);return}}e&&(d(null),p(!1))}catch(t){console.error("Error initializing user:",t),e&&(d(null),p(!1))}},n=(0,s.onAuthStateChanged)(a.auth,async e=>{if(e)try{let r=await e.getIdToken(!0);await t(r)}catch(e){console.warn("Failed to refresh session cookie:",e)}await r()});return()=>{e=!1,n()}},[]);let m=(0,i.useRef)(null);(0,i.useEffect)(()=>{var e;if(u)return;let t=null!=(e=null==r?void 0:r.premiumId)?e:null;if(m.current&&!t&&(0,l.xN)(),m.current=t,!t)return;let n=()=>(0,l.G)(t,{plan:null==r?void 0:r.planId});return n(),window.addEventListener(o.Be,n),()=>window.removeEventListener(o.Be,n)},[r,u]);let g=async(e,t)=>{if(!r)return!1;try{let r=await fetch("/api/user/widget-access?widgetId=".concat(e,"&widgetType=").concat(t));return(await r.json()).hasAccess}catch(e){return console.error("Error checking widget access:",e),!1}};return(0,n.jsx)(c.Provider,{value:{user:r,setUser:d,loading:u,checkUserAccess:g},children:t})}function u(){let e=(0,i.useContext)(c);if(void 0===e)throw Error("useUser must be used within a UserProvider");return e}},67655:(e,t,r)=>{"use strict";r.d(t,{y:()=>o,p:()=>l});var n=r(95155),i=r(12115),s=r(31514);let a=(0,i.createContext)(void 0);function o(e){let{children:t}=e,r={trackEvent:s.$s,trackPageView:(e,t)=>{(0,s.$s)("page_view",{page_title:e,page_location:t||window.location.href})},trackWidgetCreated:(e,t)=>{(0,s.$s)("widget_created",{business_name:e,widget_type:t})},trackWidgetPreview:e=>{(0,s.$s)("widget_preview",{widget_type:e})},trackBusinessConnected:e=>{(0,s.$s)("business_connected",{business_name:e})},trackDemoViewed:e=>{(0,s.$s)("demo_viewed",{demo_type:e})},trackSignUp:e=>{(0,s.$s)("sign_up",{method:e})},trackLogin:e=>{(0,s.$s)("login",{method:e})},trackPurchase:(e,t)=>{(0,s.$s)("purchase",{currency:"USD",value:t,plan:e})},trackTrialStarted:e=>{(0,s.$s)("trial_started",{plan:e})},trackWidgetCustomization:(e,t,r,n)=>{(0,s.DX)(e,t,r,n)},trackColorChange:(e,t,r,n)=>{(0,s.RF)(e,t,r,n)},trackPresetApplied:(e,t,r)=>{(0,s._G)(e,t,r)},trackBusinessConnection:(e,t,r,n)=>{(0,s.gu)(e,t,r,n)},trackWidgetModalOpened:(e,t,r,n)=>{(0,s.C8)(e,t,r,n)},trackWidgetModalClosed:(e,t,r,n)=>{(0,s.bp)(e,t,r,n)},trackPublishModalOpened:(e,t,r,n)=>{(0,s.LT)(e,t,r,n)},trackPublishModalClosed:(e,t,r,n)=>{(0,s.eE)(e,t,r,n)},trackCodeCopied:(e,t,r,n)=>{(0,s.Zq)(e,t,r,n)},trackFrameworkSelected:(e,t,r)=>{(0,s.Xz)(e,t,r)},trackPremiumIdValidation:(e,t,r,n)=>{(0,s.Rb)(e,t,r,n)},trackWidgetModeChange:(e,t,r)=>{(0,s.$y)(e,t,r)},trackWidgetPublished:(e,t)=>{(0,s.$s)("widget_published",{widget_id:e,user_id:t,timestamp:new Date().toISOString()})}};return(0,n.jsx)(a.Provider,{value:r,children:t})}function l(){let e=(0,i.useContext)(a);if(void 0===e)throw Error("useAnalyticsContext must be used within an AnalyticsProvider");return e}},98830:()=>{}},e=>{e.O(0,[2743,5583,8058,2301,6874,6326,9432,8441,5584,7358],()=>e(e.s=14931)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.