1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70868,e=>{"use strict";e.i(247167);var t=e.i(843476),r=e.i(271645),n=e.i(618566);let i=["/widget","/embed","/track.js"],a=null;function s(){return a||(a=(function(e=4e3){return new Promise(t=>{let r=window.requestIdleCallback;r?r(()=>t(),{timeout:e}):setTimeout(t,1)})})().then(()=>e.A(604435)).then(({default:e})=>(e.init("phc_pfsy4My3xCjXmG5KyLWvi3Kwb5jv44w4qwcAM2g9SB4t",{api_host:"/ingest",ui_host:"https://us.posthog.com",person_profiles:"identified_only",capture_pageview:"history_change",capture_pageleave:!0,autocapture:!1,capture_performance:{web_vitals:!0,network_timing:!1},disable_session_recording:!0,disable_surveys:!0}),e.register({environment:"production"}),e)).catch(()=>null))}e.s(["PostHogIdentify",0,function({userId:e,email:t,name:n,workspaceId:i,workspaceName:a}){return(0,r.useEffect)(()=>{let r=!0;return s().then(s=>{s&&r&&(s.identify(e,{...t?{email:t}:{},...n?{name:n}:{}}),i&&s.group("workspace",i,a?{name:a}:void 0))}),()=>{r=!1}},[e,t,n,i,a]),null},"PostHogProvider",0,function({children:e}){let a=(0,n.usePathname)(),o=i.some(e=>a?.startsWith(e));return(0,r.useEffect)(()=>{o||s()},[o]),(0,t.jsx)(t.Fragment,{children:e})}])},973072,e=>{"use strict";var t=e.i(271645);e.s(["KeyboardViewportTracker",0,function(){return(0,t.useEffect)(()=>{let e=window.visualViewport,t=document.documentElement,r=()=>{let r=e?e.height:window.innerHeight;t.style.setProperty("--keyboard-viewport-height",`${Math.round(r)}px`)};if(r(),!e)return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r);e.addEventListener("resize",r),e.addEventListener("scroll",r);let n=()=>{window.setTimeout(r,50),window.setTimeout(r,250),window.setTimeout(r,500)};return document.addEventListener("focusout",n,!0),()=>{e.removeEventListener("resize",r),e.removeEventListener("scroll",r),document.removeEventListener("focusout",n,!0)}},[]),null}])},668175,e=>{"use strict";var t=e.i(271645);e.s(["NavScrollbars",0,function(){return(0,t.useEffect)(()=>{let e=document.documentElement;if(!e.classList.contains("is-windows"))return;let t=document.createElement("div");t.className="nav-hscroll",t.setAttribute("aria-hidden","true");let r=document.createElement("div");r.className="nav-hscroll-thumb",t.appendChild(r),document.body.appendChild(t);let n=null,i=0,a=null,s=6,o=()=>{i&&(cancelAnimationFrame(i),i=0)},l=()=>{a||(n=null,o(),t.classList.remove("is-visible"))},u=()=>{let e=n;if(!e||!e.isConnected)return l();let i=e.scrollWidth-e.clientWidth;if(i<=8)return l();let a=e.getBoundingClientRect();if(a.width<24||a.bottom<0||a.top>window.innerHeight)return l();let o=Math.min(a.bottom+s,window.innerHeight-2*s);t.style.width=`${Math.round(a.width)}px`,t.style.transform=`translate3d(${Math.round(a.left)}px, ${Math.round(o)}px, 0)`;let u=Math.max(24,Math.round(e.clientWidth/e.scrollWidth*a.width)),d=Math.max(0,a.width-u);r.style.width=`${u}px`,r.style.transform=`translateX(${Math.round(e.scrollLeft/i*d)}px)`},d=()=>{i=0,u(),n&&(i=requestAnimationFrame(d))},c=null,h=0,g=()=>{h=0;let r=c;if(c=null,!r||!r.isConnected)return;let a=(e=>{let t=e;for(;t&&t!==document.body;){if(t instanceof HTMLElement){let e=t.dataset.hscroll;if("none"===e||"custom"===e)return null;if(t.scrollWidth-t.clientWidth>8){let e=getComputedStyle(t),r=e.overflowX,n="none"===e.scrollbarWidth||t.classList.contains("scrollbar-none");if(("auto"===r||"scroll"===r)&&n)return t}}t=t.parentElement}return null})(r);a!==n&&(a?(n=a,s=.375*parseFloat(getComputedStyle(e).fontSize)||6,u(),n&&(t.classList.add("is-visible"),i||(i=requestAnimationFrame(d)))):l())},p=e=>{if("mouse"!==e.pointerType)return;let r=e.target;r instanceof Element&&!t.contains(r)&&(c=r,h||(h=requestAnimationFrame(g)))},f=()=>{let e=n;if(!e)return 1;let i=t.clientWidth-r.offsetWidth;return i<=0?1:(e.scrollWidth-e.clientWidth)/i},m=e=>{a&&(a=null,t.classList.remove("is-dragging"),t.releasePointerCapture(e.pointerId),t.matches(":hover")||n?.matches(":hover")||l())},b=e=>e.stopPropagation();return document.addEventListener("pointerover",p,!0),document.addEventListener("mouseleave",l),t.addEventListener("pointerdown",e=>{let i=n;if(!i||0!==e.button)return;e.preventDefault(),e.stopPropagation();let s=r.getBoundingClientRect();if(e.clientX<s.left||e.clientX>s.right){let r=t.getBoundingClientRect();i.scrollLeft=Math.max(0,(e.clientX-r.left-s.width/2)*f());return}t.setPointerCapture(e.pointerId),a={pointerX:e.clientX,scrollLeft:i.scrollLeft},t.classList.add("is-dragging")},!0),t.addEventListener("mousedown",b,!0),t.addEventListener("click",b,!0),t.addEventListener("pointermove",e=>{n&&a&&(n.scrollLeft=a.scrollLeft+(e.clientX-a.pointerX)*f())}),t.addEventListener("pointerup",m),t.addEventListener("pointercancel",m),()=>{document.removeEventListener("pointerover",p,!0),document.removeEventListener("mouseleave",l),o(),h&&cancelAnimationFrame(h),h=0,t.remove()}},[]),null}])},871301,e=>{"use strict";var t=e.i(585333);let r=!1;r=!0,window.addEventListener("error",e=>{let r=e.target;!r||r===window||(r.src||r.href||"").includes("/_next/static/")&&(0,t.reloadForStaleBuild)()},!0),window.addEventListener("unhandledrejection",e=>{(0,t.isStaleBuildError)(e.reason)&&(0,t.reloadForStaleBuild)()}),e.s(["StaleBuildGuard",0,function(){return null}])},501410,e=>{"use strict";var t=e.i(271645);e.s(["UaClassGuard",0,function(){return(0,t.useEffect)(()=>{let e=navigator.userAgent,t=/iPhone|iPad|iPod/.test(e),r=t||/Safari/.test(e)&&!/Chrome|Chromium|Edg\/|CriOS|FxiOS|EdgiOS|OPiOS|OPR\//.test(e),n=navigator.userAgentData?.platform,i=n?/win/i.test(n):/Win(dows|32|64)/i.test(e),a=()=>{let e=document.documentElement;t&&!e.classList.contains("is-ios")&&e.classList.add("is-ios"),r&&!e.classList.contains("is-safari")&&e.classList.add("is-safari"),i&&!e.classList.contains("is-windows")&&e.classList.add("is-windows")};a(),window.addEventListener("pageshow",a);let s=new MutationObserver(a);return s.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}
1),()=>{window.removeEventListener("pageshow",a),s.disconnect()}},[]),null}])},733115,e=>{"use strict";var t=e.i(271645),r=e.i(846696),n=e.i(609680);function i(e){if("function"!=typeof e)return e;try{return e()}catch{return}}e.s(["ToastCapture",0,function(){let{toasts:e}=(0,r.useSonner)();return(0,t.useEffect)(()=>{for(let t of e){let e="error"===t.type?"error":"string"==typeof t.className&&t.className.split(/\s+/).includes(n.RECALLABLE_CLASS)?"message":null;e&&(0,n.rememberToast)({key:String(t.id),kind:e,node:t.jsx,title:t.jsx?void 0:i(t.title),description:t.jsx?void 0:i(t.description),action:t.jsx?void 0:function(e){if(!e||"object"!=typeof e||!("onClick"in e)||"function"!=typeof e.onClick)return;let{label:t,onClick:r}=e;return{label:t,onClick:r}}(t.action)})}},[e]),null}])},274810,e=>{"use strict";var t=e.i(843476),r=e.i(618566),n=e.i(363178);function i({children:e}){return(0,t.jsx)(n.ThemeProvider,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:e})}var a=e.i(144123),s=e.i(70868);e.s(["RootProviders",0,function({children:e}){let n=(0,r.usePathname)();if(n?.startsWith("/widget"))return(0,t.jsx)(t.Fragment,{children:e});let o=n?.startsWith("/guide-demo")??!1,l=(0,t.jsx)(i,{children:(0,t.jsx)(a.AppThemeProvider,{children:e})});return o?l:(0,t.jsx)(s.PostHogProvider,{children:l})}],274810)},234581,e=>{"use strict";var t=e.i(271645),r=e.i(618566);e.s(["ScrollToTop",0,function(){let e=(0,r.usePathname)();return(0,t.useEffect)(()=>{window.scrollTo(0,0),document.querySelectorAll("[data-scroll-root]").forEach(e=>{e&&"scrollTo"in e&&e.scrollTo(0,0)})},[e]),null}])},160064,e=>{"use strict";var t=e.i(271645);e.s(["ScrollbarReveal",0,function(){return(0,t.useEffect)(()=>{let e=new WeakMap,t=t=>{let r=t.target instanceof Element?t.target:document.documentElement;r.hasAttribute("data-scrolling")||r.setAttribute("data-scrolling","");let n=e.get(r);n&&window.clearTimeout(n),e.set(r,window.setTimeout(()=>{r.removeAttribute("data-scrolling"),e.delete(r)},650))},r=document.createElement("div");r.style.cssText="position:absolute;top:-9999px;left:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden;pointer-events:none",document.body.appendChild(r);let n=()=>{let e=r.offsetWidth-r.clientWidth;document.documentElement.dataset.scrollbars=e>0?"classic":"overlay"};return n(),window.addEventListener("resize",n),document.addEventListener("visibilitychange",n),document.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",n),document.removeEventListener("visibilitychange",n),r.remove()}},[]),null}])},806014,e=>{"use strict";var t=e.i(271645),r=e.i(618566),n=e.i(363178);let i=["/share/"];function a(e){let t=document.querySelectorAll('meta[name="theme-color"]'),r=t[0];r||((r=document.createElement("meta")).name="theme-color",document.head.appendChild(r));for(let e=1;e<t.length;e+=1)t[e].remove();r.hasAttribute("media")&&r.removeAttribute("media"),r.content!==e&&(r.content=e)}e.s(["ThemeColorMeta",0,function(){let{resolvedTheme:e}=(0,n.useTheme)(),s=(0,r.usePathname)(),o=i.some(e=>s?.startsWith(e));return(0,t.useEffect)(()=>{if(!e)return;
1let t="dark"!==e||o?"#FFFFFF":"#0F0D0B";a(t);let r=new MutationObserver(e=>{e.some(e=>"attributes"===e.type?e.target.getAttribute?.("name")==="theme-color":[...e.addedNodes].some(e=>"META"===e.nodeName&&"theme-color"===e.getAttribute("name")))&&a(t)});return r.observe(document.head,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["content","media","name"]}),()=>r.disconnect()},[e,o]),null}])},231459,e=>{"use strict";var t=e.i(271645),r=e.i(939301);let n='[class*="corner-shape:squircle"],.squircle-safari-fallback,.squircle-field-fallback,.squircle-cap-fallback,.squircle-chip-fallback,.squircle-chip-fallback-destructive,.sidebar-chrome-btn,.booking-slot,.calendar-event-block,.calendar-event-chip,.attendee-card,[data-slot="button"]:not(.rounded-full),[data-variant][data-size]:not(.rounded-full),[data-slot="card"],[data-slot="input"],[data-slot="textarea"],[data-slot="select-trigger"],[data-slot="dialog-panel"],[data-slot="alert-dialog-panel"],.brief-hero-plate';e.s(["SafariSquircles",0,function(){return(0,t.useEffect)(()=>{if(!document.documentElement.classList.contains("is-safari")||"u">typeof CSS&&CSS.supports("corner-shape","squircle"))return;let e=new Map,t=t=>{let n;if(!(e.has(t)||(n="string"==typeof t.className?t.className:"",t.hasAttribute("data-sq-js")||n.includes("backdrop-blur")||n.includes("toast-glass")||n.includes("rounded-none")||n.includes("rounded-full")||n.includes("tc-painting")||n.includes("tc-artist-card")||0))){if(t.classList.contains("brief-hero-plate"))return void e.set(t,(0,r.applySquircle)(t,{keepMask:!0,radius:24}));e.set(t,(0,r.applySquircleSandwich)(t))}},i=e=>{e instanceof HTMLElement&&e.matches(n)&&t(e),e.querySelectorAll(n).forEach(t)};i(document.body);let a=[],s=0,o=0,l=0,u=()=>{o=0;let t=a;a=[],t.forEach(i);let r=Date.now();r-l>1e3&&(l=r,e.forEach((t,r)=>{r.isConnected||(t(),e.delete(r))}))},d=new MutationObserver(e=>{for(let t of e)t.addedNodes.forEach(e=>{1===e.nodeType&&a.push(e)});!a.length||s||o||(s=requestAnimationFrame(()=>{s=0,o=setTimeout(u,0)}))});return d.observe(document.body,{childList:!0,subtree:!0}),()=>{d.disconnect(),s&&cancelAnimationFrame(s),o&&clearTimeout(o),e.forEach(e=>e()),e.clear()}},[]),null}])},44423,e=>{"use strict";var t=e.i(271645),r=e.i(939301);let n=['[data-slot="button"].rounded-full',"[data-variant][data-size].rounded-full",'[data-slot="badge"].rounded-full',".entity-chip.rounded-full",".sq-capsule"].map(e=>e+':not([class*="rounded-none"]):not([class*="rounded-r-"]):not([class*="rounded-l-"]):not([class*="rounded-t-"]):not([class*="rounded-b-"])').join(",");e.s(["SmoothCapsulePills",0,function(){return(0,t.useEffect)(()=>{let e=new Map,t=t=>{e.has(t)||e.set(t,(0,r.applySmoothCapsule)(t))},i=e=>{e instanceof HTMLElement&&e.matches(n)&&t(e),e.querySelectorAll(n).forEach(t)};i(document.body);let a=[],s=0,o=0,l=()=>{s=0;let t=a;a=[],t.forEach(i);let r=Date.now();r-o>1e3&&(o=r,e.forEach((t,r)=>{r.isConnected||(t(),e.delete(r))}))},u=new MutationObserver(e=>{for(let t of e)t.addedNodes.forEach(e=>{1===e.nodeType&&a.push(e)});a.length&&!s&&(s=requestAnimationFrame(l))});return u.observe(document.body,{childList:!0,subtree:!0}),()=>{u.disconnect(),s&&cancelAnimationFrame(s),e.forEach(e=>e()),e.clear()}},[]),null}])},203484,e=>{"use strict";var t=e.i(843476),r=e.i(717521),r=r,n=e.i(476819),i=e.i(363178),a=e.i(271645),s=e.i(846696);function o(){let{toasts:e}=(0,s.useSonner)();return e.length<2?null:(0,t.jsx)("button",{type:"button",onClick:()=>s.toast.dismiss(),className:"toast-clear-pill fixed top-[21px] right-4 z-[1000000000] rounded-full border border-foreground
1/5 bg-foreground/[0.07] px-3 py-[6px] text-[10px] leading-none font-medium text-muted-foreground backdrop-blur-md transition-colors hover:bg-foreground/[0.13] hover:text-foreground dark:bg-foreground/[0.16] dark:hover:bg-foreground/25 max-[600px]:right-auto max-[600px]:left-1/2 max-[600px]:-translate-x-1/2",children:"Clear all"})}e.s(["Toaster",0,({...e})=>{let{theme:l="system"}=(0,i.useTheme)();return(0,a.useEffect)(()=>{let e=new MutationObserver(e=>{for(let t of e){if("data-swipe-out"!==t.attributeName)continue;let e=t.target;if("true"===e.getAttribute("data-swipe-out")&&"right"===e.getAttribute("data-swipe-direction"))return void s.toast.dismiss()}});return e.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["data-swipe-out"]}),()=>e.disconnect()},[]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{}),(0,t.jsx)(s.Toaster,{theme:l,className:"toaster group",duration:4e3,closeButton:!0,offset:{top:(0,n.designPx)(34)},mobileOffset:{top:(0,n.designPx)(30)},icons:{loading:(0,t.jsx)(r.default,{className:"size-4 animate-spin"})},toastOptions:{classNames:{actionButton:"toast-action-pill sq-capsule rounded-full"}},style:{"--width":(0,n.designPx)(356),"--normal-bg":"var(--popover)","--toast-close-button-start":"unset","--toast-close-button-end":(0,n.designPx)(8),"--toast-close-button-transform":"none","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":(0,n.designPx)(30)},...e})]})}],203484)},154466,e=>{"use strict";var t=e.i(271645),r=e.i(476819);e.s(["WheelScale",0,function(){return(0,t.useEffect)(()=>{if("on"!==document.documentElement.dataset.uiScale)return;let e=(0,r.currentUiScale)(),t=()=>{e=(0,r.currentUiScale)()},n=(e,t,r)=>{let n="y"===t?e.scrollTop:e.scrollLeft,i="y"===t?e.scrollHeight-e.clientHeight:e.scrollWidth-e.clientWidth;return!(i<=1)&&(r>0?n<i-1:n>0)},i=(e,t,r)=>{let i=e,a=document.scrollingElement??document.documentElement;for(;i;){if(i===document.body||i===document.documentElement)return n(a,t,r)?a:null;let e=getComputedStyle(i),s="y"===t?e.overflowY:e.overflowX;if(("auto"===s||"scroll"===s)&&n(i,t,r))return i;i=i.parentElement}return null},a=new Map,s=0,o=0,l=e=>{s=0;let t=o?Math.min(e-o,50):1e3/60;o=e;let r=1-Math.exp(-t/80);for(let[e,t]of a){let i=.5>Math.abs(t.y)?t.y:t.y*r,s=.5>Math.abs(t.x)?t.x:t.x*r;
1i&&!n(e,"y",i)&&(t.y=0),s&&!n(e,"x",s)&&(t.x=0),(t.y||t.x)&&(e.scrollBy({top:t.y?i:0,left:t.x?s:0,behavior:"instant"}),t.y-=t.y?i:0,t.x-=t.x?s:0),.5>Math.abs(t.y)&&.5>Math.abs(t.x)&&a.delete(e)}a.size?s=requestAnimationFrame(l):o=0},u=(e,t,r)=>{let n=a.get(e)??{x:0,y:0};n[t]+=r,a.set(e,n),s||(s=requestAnimationFrame(l))},d=t=>{if(e<=1.001||(()=>{try{return"off"===window.localStorage.getItem("ui-wheel-scale")}catch{return!1}})()||t.ctrlKey||t.defaultPrevented||0!==t.deltaMode)return;let r=t.target instanceof Element?t.target:document.body,n=(e-1)*.35;if(t.deltaY){let e=i(r,"y",t.deltaY);e&&u(e,"y",t.deltaY*n)}if(t.deltaX){let e=i(r,"x",t.deltaX);e&&u(e,"x",t.deltaX*n)}};return window.addEventListener("resize",t),document.addEventListener("wheel",d,{passive:!0}),()=>{window.removeEventListener("resize",t),document.removeEventListener("wheel",d),s&&cancelAnimationFrame(s)}},[]),null}])},144123,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n="nav-active-space",i="spaces-active-changed";function a(e){return`app-theme-customizer-v1::${e||"default"}`}function s(){try{return localStorage.getItem(n)||""}catch{return""}}let o={free:{id:"free",name:"Free",hueMin:0,hueMax:360,satMin:0,satMax:1,lightMin:0,lightMax:1,harmony:{twoStop:180,threeStop:[120,240]}},minimal:{id:"minimal",name:"Minimal",hueMin:0,hueMax:360,satMin:0,satMax:.25,lightMin:.02,lightMax:1,harmony:{twoStop:60,threeStop:[40,80]}},pastel:{id:"pastel",name:"Pastel",hueMin:0,hueMax:360,satMin:.2,satMax:.7,lightMin:.62,lightMax:.96,harmony:{twoStop:90,threeStop:[60,120]}},vibrant:{id:"vibrant",name:"Vibrant",hueMin:0,hueMax:360,satMin:.5,satMax:.95,lightMin:.3,lightMax:.78,harmony:{twoStop:180,threeStop:[120,240]}},earth:{id:"earth",name:"Earth",hueMin:350,hueMax:75,satMin:.12,satMax:.65,lightMin:.18,lightMax:.9,harmony:{twoStop:180,threeStop:[120,240]}},forest:{id:"forest",name:"Forest",hueMin:70,hueMax:180,satMin:.18,satMax:.65,lightMin:.2,lightMax:.85,harmony:{twoStop:180,threeStop:[120,240]}},ocean:{id:"ocean",name:"Ocean",hueMin:165,hueMax:260,satMin:.3,satMax:.8,lightMin:.22,lightMax:.92,harmony:{twoStop:180,threeStop:[120,240]}},sunset:{id:"sunset",name:"Sunset",hueMin:250,hueMax:40,satMin:.4,satMax:.95,lightMin:.32,lightMax:.88,harmony:{twoStop:180,threeStop:[120,240]}}};function l(){return`s-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`}let u={hue:35,sat:0,light:1,strength:1,noise:0,noiseType:0,gradient:null,gradientVersion:0,palette:"free"},d=(0,r.createContext)(null);function c(e){return Math.max(0,Math.min(1,e))}function h(e,t,r){let n=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*t,a=i*(1-Math.abs(n%2-1)),s=0,o=0,l=0;n<1?(s=i,o=a):n<2?(s=a,o=i):n<3?(o=i,l=a):n<4?(o=a,l=i):n<5?(s=a,l=i):(s=i,l=a);let u=r-i/2,d=e=>Math.round((e+u)*255).toString(16).padStart(2,"0");return`#${d(s)}${d(o)}${d(l)}`}let g={r:247/255,g:244/255,b:237/255},p={r:40/255,g:39/255,b:37/255};function f(e){return!!e&&"object"==typeof e&&"number"==typeof e.hue&&"number"==typeof e.sat&&"number"==typeof e.light&&"number"==typeof e.pos}function m(e){try{let t=localStorage.getItem(a(e));if(!t)return u;let r=JSON.parse(t),n="number"==typeof r.noiseType&&r.noiseType>=0&&r.noiseType<=4?r.noiseType:u.noiseType,i=null;if(r.gradient&&"object"==typeof r.gradient){let e=r.gradient;Array.isArray(e.stops)&&e.stops.length>=2&&e.stops.every(f)&&(i={stops:e.stops.map(e=>({hue:e.hue,sat:c(e.sat),light:c(e.light),pos:c(e.pos),palette:e.palette,id:e.id||l()})),angle:"number"==typeof e.angle?e.angle:135,activeIndex:"number"==typeof e.activeIndex?Math.max(0,Math.min(e.stops.length-1,e.activeIndex)):0})}return{hue:"number"==typeof r.hue?r.hue:u.hue,sat:"number"==typeof r.sat?c(r.sat):u.sat,light:"number"==typeof r.light?c(r.light):u.light,strength:"number"==typeof r.strength?c(r.strength):u.strength,noise:"number"==typeof r.noise?c(r.noise):u.noise,noiseType:n,gradient:i,gradientVersion:0,palette:"string"==typeof r.palette&&o[r.palette]?r.palette:"free"}}catch{return u}}function b(e,t,r,n){let i=n?{hue:e,sat:c(1.1*t+.05),light:.12+.2*c(r)}:{hue:e,sat:t,light:r};return h(i.hue,i.sat,i.light)}function y(e,t,r){let n=[...e.stops].sort((e,t)=>
1e.pos-t.pos).map(e=>{let n=b(e.hue,e.sat,e.light,r),i=`color-mix(in oklab, var(--sidebar-raw), ${n} ${(100*t).toFixed(2)}%)`;return`${i} ${(100*e.pos).toFixed(2)}%`});return`linear-gradient(${e.angle}deg, ${n.join(", ")})`}function v(e,t){let r=e.gradient||0!==e.sat||1!==e.light?e.strength:0;if(e.gradient)return y(e.gradient,r,t);let n=b(e.hue,e.sat,e.light,t);return`color-mix(in oklab, var(--sidebar-raw), ${n} ${(100*r).toFixed(2)}%)`}function w(e,t){let r=e.gradient||0!==e.sat||1!==e.light?e.strength:0,n=e.gradient?[...e.gradient.stops].sort((e,t)=>e.pos-t.pos)[0]:{hue:e.hue,sat:e.sat,light:e.light},i=b(n.hue,n.sat,n.light,t);return`color-mix(in oklab, var(--sidebar-raw), ${i} ${(100*r).toFixed(2)}%)`}function x(e,t){let r=!e.gradient&&0===e.sat&&1===e.light;return{tintHex:b(e.hue,e.sat,e.light,t),strength:r?0:e.strength}}function M(){return"u">typeof document&&document.documentElement.classList.contains("dark")}function E(e,t,r){let n;if("u"<typeof document)return;let i=t??document.documentElement,a=r??document.documentElement.classList.contains("dark"),s=b(e.hue,e.sat,e.light,a),o=e.gradient||0!==e.sat||1!==e.light?e.strength:0;i.style.setProperty("--app-tint",s),i.style.setProperty("--app-tint-strength",String(o)),i.style.setProperty("--app-noise",String(e.noise));let l=e.gradient?[...e.gradient.stops].sort((e,t)=>e.pos-t.pos)[0]:{hue:e.hue,sat:e.sat,light:e.light},u=b(l.hue,l.sat,l.light,a);i.style.setProperty("--sidebar",`color-mix(in oklab, var(--sidebar-raw), ${u} ${(100*o).toFixed(2)}%)`),i.style.setProperty("--app-chrome-bg",e.gradient?y(e.gradient,o,a):"var(--sidebar)"),i.dataset.noiseType=String(e.noiseType);let d=a?p:g,h=e.gradient?e.gradient.stops.map(e=>b(e.hue,e.sat,e.light,a)):[u],f=h.reduce((e,t)=>{var r;let n,i,a=function(e){let t=e.replace("#","").trim().match(/^([0-9a-f]{6})$/i);if(!t)return null;let r=parseInt(t[1],16);return{r:(r>>16&255)/255,g:(r>>8&255)/255,b:(255&r)/255}}(t)??d;return e+(n=c(o),r={r:d.r*(1-n)+a.r*n,g:d.g*(1-n)+a.g*n,b:d.b*(1-n)+a.b*n},.2126*(i=e=>
1e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))(r.r)+.7152*i(r.g)+.0722*i(r.b))},0)/h.length,m=c(e.noise);n=f<.4-.15*m?"dark":f<.74+.08*m?"mid":"light",i.dataset.sidebarTone=n,"dark"===n?(i.style.setProperty("--sidebar-fg","#f5f5f5"),i.style.setProperty("--sidebar-fg-muted","#9a9a9a"),i.style.setProperty("--sidebar-active-bg","rgba(255, 255, 255, 0.18)"),i.style.setProperty("--sidebar-hover-bg","rgba(255, 255, 255, 0.10)"),i.style.setProperty("--sidebar-border-tone","rgba(255, 255, 255, 0.16)"),i.style.setProperty("--sidebar-border-soft","rgba(255, 255, 255, 0.08)")):"mid"===n?(i.style.setProperty("--sidebar-fg","#0a0a0a"),i.style.setProperty("--sidebar-fg-muted","#525252"),i.style.setProperty("--sidebar-active-bg","rgba(0, 0, 0, 0.14)"),i.style.setProperty("--sidebar-hover-bg","rgba(0, 0, 0, 0.08)"),i.style.setProperty("--sidebar-border-tone","rgba(0, 0, 0, 0.16)"),i.style.setProperty("--sidebar-border-soft","rgba(0, 0, 0, 0.07)")):(i.style.setProperty("--sidebar-fg","#171717"),i.style.setProperty("--sidebar-fg-muted","#5a5a5a"),i.style.setProperty("--sidebar-active-bg","rgba(20, 20, 20, 0.10)"),i.style.setProperty("--sidebar-hover-bg","rgba(20, 20, 20, 0.06)"),i.style.setProperty("--sidebar-border-tone","rgba(20, 20, 20, 0.12)"),i.style.setProperty("--sidebar-border-soft","rgba(20, 20, 20, 0.06)"))}function S(e,t){return JSON.stringify({...e,gradientVersion:0})===JSON.stringify({...t,gradientVersion:0})}function L(e,t,r){let n=r?o[r]??o.free:o.free,i=r?Math.max(n.lightMin,.3):0,a=r?n.lightMax:1,s=a-i,l=.5*(s>1e-6?c((a-t)/s):0),u=n.hueMax>=n.hueMin?n.hueMax-n.hueMin:n.hueMax+360-n.hueMin,d=(((e%360+360)%360-n.hueMin)%360+360)%360;d>u&&(d=u);let h=(u>1e-6?d/u*360:0)*Math.PI/180;return{cx:.5+l*Math.cos(h),cy:.5+l*Math.sin(h)}}function k(e,t,r,n){let i=o[r]??o.free,a=e-.5,s=t-.5,l=Math.min(Math.hypot(a,s)/.5,1),u=180*Math.atan2(s,a)/Math.PI;u<0&&(u+=360);let d=i.hueMax>=i.hueMin?i.hueMax-i.hueMin:i.hueMax+360-i.hueMin,h=(i.hueMin+u/360*d)%360;h<0&&(h+=360);let g=Math.max(i.lightMin,.3),p=i.lightMax-l*(i.lightMax-g);return{hue:h,sat:c(Math.min(i.satMax,Math.max(i.satMin,n))),light:p}}function C(e,t,r,n,i){let a=L(e,t,n),s=a.cx-.5,o=a.cy-.5,l=Math.hypot(s,o);if(l<1e-6)return{hue:e,sat:r,light:t};let u=Math.atan2(o,s)+i*Math.PI/180;return k(.5+l*Math.cos(u),.5+l*Math.sin(u),n,r)}e.s(["AppThemeProvider",0,function({children:g,scopeId:p,targetRef
1:b,forceDark:y}){let[L,k]=(0,r.useState)(()=>p??s()),[T,P]=(0,r.useState)(()=>m(p??s())),A=(0,r.useRef)(new Set),F=(0,r.useRef)({}),j=(0,r.useRef)(null),I=(0,r.useRef)(null),_=(0,r.useRef)(null),$=(0,r.useRef)(0),q=(0,r.useRef)(L);q.current=L,(0,r.useEffect)(()=>{if(!("u">typeof document&&/(?:^|;\s*)sb-[^=;]*auth-token(?:\.\d+)?=/.test(document.cookie)))return;let t=!1,r=null;return(async()=>{try{let{createClient:n}=await e.A(90015);if(t)return;j.current=r=n()}catch{return}if(!r||t)return;let n=r,i=async e=>{let{data:t,error:r}=await n.from("profiles").select("theme_preferences").eq("id",e).single();if(r)return null;let i=t?.theme_preferences??{},a={};for(let[e,t]of Object.entries(i))a[e]=function(e){if(!e||"object"!=typeof e)return u;let t="number"==typeof e.noiseType&&e.noiseType>=0&&e.noiseType<=4?e.noiseType:u.noiseType,r=null;if(e.gradient&&"object"==typeof e.gradient){let t=e.gradient;Array.isArray(t.stops)&&t.stops.length>=2&&t.stops.every(f)&&(r={stops:t.stops.map(e=>({hue:e.hue,sat:c(e.sat),light:c(e.light),pos:c(e.pos),palette:e.palette&&o[e.palette]?e.palette:"free",id:e.id||l()})),angle:"number"==typeof t.angle?t.angle:135,activeIndex:"number"==typeof t.activeIndex?Math.max(0,Math.min(t.stops.length-1,t.activeIndex)):0})}return{hue:"number"==typeof e.hue?e.hue:u.hue,sat:"number"==typeof e.sat?c(e.sat):u.sat,light:"number"==typeof e.light?c(e.light):u.light,strength:"number"==typeof e.strength?c(e.strength):u.strength,noise:"number"==typeof e.noise?c(e.noise):u.noise,noiseType:t,gradient:r,gradientVersion:0,palette:"string"==typeof e.palette&&o[e.palette]?e.palette:"free"}}(t);return F.current=a,a},a=(e,t)=>{let r=p??(e||"default"),n=t[r];k(r);let i=n??m(e);P(e=>S(e,i)?e:i),A.current.add(r)},{data:d}=await n.auth.getUser(),h=d.user?.id;if(!h||t)return;I.current=h;let g=await i(h);if(t||!g)return;let b=p??(s()||"default");g[b]?a(b,g):A.current.add(b);let{error:y}=await n.from("user_spaces").select("id").limit(1);if(!t&&!y)try{_.current=n.channel(`user_spaces_theme_${h}`).on("postgres_changes",{event:"*",schema:"public",table:"user_spaces",filter:`user_id=eq.${h}`},e=>{let t=e.new,r=F.current;(async()=>{let e=await i(h);if(!e)return;let n=p??(t?.active_space_id||s()||"default"),o=n||"default",l=o!==(q.current||"default"),d=!S(r[o]??u,e[o]??u);(l||d)&&a(n,e)})()}).subscribe((e,t)=>{t&&console.warn("[use-app-theme] realtime subscribe error (non-fatal):",t)})}catch(e){console.warn("[use-app-theme] realtime setup error (non-fatal):",e),_.current=null}})(),()=>{t=!0,r&&_.current&&(r.removeChannel(_.current),_.current=null)}},[]),(0,r.useEffect)(()=>{if(p)return;let e=e=>{k(e);let t=F.current[e||"default"];P(t??m(e)),t&&A.current.add(e||"default")},t=t=>{e(t.detail?.id??s())},r=t=>{t.key===n&&e(t.newValue||"")};return window.addEventListener(i,t),window.addEventListener("storage",r),()=>{window.removeEventListener(i,t),window.removeEventListener("storage",r)}},[]);let O=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(E(T,b?.current,y),!L)return;let e=L||"default";try{localStorage.setItem(a(L),JSON.stringify(T))}catch{}if(!A.current.has(e))return;let t=F.current[e];t&&S(t,T)||(F.current[e]=T,O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{let e=j.current,t=I.current;if(!e||!t)return;let r={...F.current};e.from("profiles").update({theme_preferences:r}).eq("id",t).then(()=>{})},600))},[T,L,y]),(0,r.useEffect)(()=>{let e=new MutationObserver(()=>E(T,b?.current,y));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>e.disconnect()},[T]);let N=e=>0===e.strength?.5:e.strength,R=h(T.hue,T.sat,T.light),V=(0,r.useCallback)(e=>{let t=e||"default",r=M();return t===(L||"default")?v(T,r):v(F.current[t]??m(e),r)},[L,T]),W=(0,r.useCallback)(e=>{let t=e||"default",r=M();return t===(L||"default")?w(T,r):w(F.current[t]??m(e),r)},[L,T]),B=(0,r.useCallback)(e=>{let t=e||"default",r=M();return t===(L||"default")?x(T,r):x(F.current[t]??m(e),r)},[L,T]);function z(e,t,r,n){let i={...e,hue:t,sat:r,light:n};if(e.gradient){let a=e.gradient.stops.map((i,a)=>a===e.gradient.activeIndex?{...i,hue:t,sat:r,light:n}:i);i.gradient={...e.gradient,stops:a}}return i}
1let X={...T,tintHex:R,chromeBackground:"var(--app-chrome-bg, var(--sidebar))",buildSpaceChromeBg:V,buildSpaceSidebarColor:W,buildSpaceTint:B,setHue:(0,r.useCallback)(e=>P(t=>({...z(t,e,t.sat,t.light),strength:N(t)})),[]),setSat:(0,r.useCallback)(e=>P(t=>({...z(t,t.hue,c(e),t.light),strength:N(t)})),[]),setLight:(0,r.useCallback)(e=>P(t=>({...z(t,t.hue,t.sat,c(e)),strength:N(t)})),[]),setSatLight:(0,r.useCallback)((e,t)=>P(r=>({...z(r,r.hue,c(e),c(t)),strength:N(r)})),[]),setStrength:(0,r.useCallback)(e=>P(t=>({...t,strength:c(e)})),[]),setNoise:(0,r.useCallback)(e=>P(t=>({...t,noise:c(e)})),[]),setSwatch:(0,r.useCallback)((e,t,r,n)=>P(i=>{let a=n&&o[n]?n:"free",s=z(i,e,c(t),c(r));if(s.gradient){let e=s.gradient.stops.map((e,t)=>t===s.gradient.activeIndex?{...e,palette:a}:e);s.gradient={...s.gradient,stops:e}}return{...s,palette:a,strength:N(i)}}),[]),cycleNoiseType:(0,r.useCallback)(()=>P(e=>{if(0===e.noise){let t=$.current>0?$.current:.5;return{...e,noise:t,noiseType:0}}return e.noiseType>=4?($.current=e.noise,{...e,noise:0,noiseType:0}):{...e,noiseType:e.noiseType+1}}),[]),enableGradient:(0,r.useCallback)(()=>P(e=>{if(e.gradient)return e;let t=e.hue,r=1===e.light?.55:e.light,n=e.sat<.4?.55:e.sat,i=e.palette,a=C(t,r,n,i,o[i]?.harmony.twoStop??180);return{...e,hue:t,sat:n,light:r,gradient:{stops:[{hue:t,sat:n,light:r,pos:0,palette:i,id:l()},{hue:a.hue,sat:a.sat,light:a.light,pos:1,palette:i,id:l()}],angle:135,activeIndex:0},gradientVersion:e.gradientVersion+1,strength:N(e)}}),[]),disableGradient:(0,r.useCallback)(()=>P(e=>({...e,gradient:null,gradientVersion:e.gradientVersion+1})),[]),setActiveStop:(0,r.useCallback)(e=>P(t=>{if(!t.gradient)return t;let r=Math.max(0,Math.min(t.gradient.stops.length-1,e)),n=t.gradient.stops[r];return{...t,hue:n.hue,sat:n.sat,light:n.light,palette:n.palette??"free",gradient:{...t.gradient,activeIndex:r}}}),[]),addStop:(0,r.useCallback)(()=>P(e=>{if(!e.gradient){let t=e.hue,r=1===e.light?.55:e.light,n=e.sat<.4?.55:e.sat,i=e.palette,a=o[i]?.harmony.twoStop??180,s=C(t,r,n,i,a);return{...e,hue:t,sat:n,light:r,gradient:{stops:[{hue:t,sat:n,light:r,pos:0,palette:i,id:l()},{hue:s.hue,sat:s.sat,light:s.light,pos:1,palette:i,id:l()}],angle:135,activeIndex:0},gradientVersion:e.gradientVersion+1,strength:N(e)}}if(e.gradient.stops.length>=3)return e;let t=e.gradient.stops[0],r=t.palette??"free",[n,i]=o[r]?.harmony.threeStop??[120,240],a=C(t.hue,t.light,t.sat,r,n),s=C(t.hue,t.light,t.sat,r,i),u={...e.gradient.stops[1],hue:a.hue,sat:a.sat,light:a.light,pos:.5,palette:r},d={hue:s.hue,sat:s.sat,light:s.light,pos:1,palette:r,id:l()},c=[e.gradient.stops[0],u,d];return{...e,gradient:{...e.gradient,stops:c,activeIndex:2},gradientVersion:e.gradientVersion+1,hue:s.hue,sat:s.sat,light:s.light}}),[]),removeStop:(0,r.useCallback)(e=>P(t=>{if(!t.gradient)return t;if(t.gradient.stops.length<=2)return{...t,gradient:null,gradientVersion:t.gradientVersion+1};let r=t.gradient.stops.filter((t,r)=>r!==e);r.forEach((e,t)=>{e.pos=t/(r.length-1)});let n=Math.max(0,Math.min(r.length-1,t.gradient.activeIndex>=e?t.gradient.activeIndex-1:t.gradient.activeIndex)),i=r[n];return{...t,hue:i.hue,sat:i.sat,light:i.light,gradient:{...t.gradient,stops:r,activeIndex:n},gradientVersion:t.gradientVersion+1}}),[]),setStopPosition:(0,r.useCallback)((e,t)=>P(r=>{if(!r.gradient)return r;let n=r.gradient.stops.map((r,n)=>n===e?{...r,pos:c(t)}:r);return{...r,gradient:{...r.gradient,stops:n}}}),[]),setGradientAngle:(0,r.useCallback)(e=>P(t=>t.gradient?{...t,gradient:{...t.gradient,angle:(e%360+360)%360}}:t),[]),applyGradientPreset:(0,r.useCallback)((e,t)=>P(r=>{let n=e.map(e=>({hue:e.hue,sat:c(e.sat),light:c(e.light),pos:c(e.pos),palette:e.palette&&o[e.palette]?e.palette:"free",id:l()})),i=n[0];return{...r,hue:i.hue,sat:i.sat,light:i.light,palette:i.palette??"free",gradient:{stops:n,angle:(t%360+360)%360,activeIndex:0},gradientVersion:r.gradientVersion+1,strength:N(r)}}),[]),setAllStopsColor:(0,r.useCallback)(e=>P(t=>{if(!t.gradient){let r=e[0];return r?{...t,hue:r.hue,sat:c(r.sat),light:c(r.light)}:t}if(e.length!==t.gradient.stops.length)return t;let r=t.gradient.stops.map((t,r)=>({...t,hue:e[r].hue,sat:c(e[r].sat),light:c(e[r].light)})),n=r[t.gradient.activeIndex];return{...t,hue:n.hue,sat:n.sat,light:n.light,gradient:{...t.gradient,stops:r}}}),[]),setStopColor:(0,r.useCallback)((e,t,r,n)=>P(i=>{let a=c(r),s=c(n);if(!i.gradient)return{...i,hue:t,sat:a,light:s,strength:N(i)};if(e<0||e>=i.gradient.stops.length)return i;let o=i.gradient.stops.map((r,n)=>n===e?{...r,hue:t,sat:a,light:s}:r),l=e===i.gradient.activeIndex;return{...i,hue:l?t:i.hue,sat:l?a:i.sat,light:l?s:i.light,gradient:{...i.gradient,stops:o},strength:N(i)}}),[]),reset:(0,r.useCallback)(()=>P(u),[])};return(0,t.jsx)(d.Provider,{value:X,children:g})},"canvasToPaletteColor",0,k,"colorToCanvas",0,L,"useAppTheme",0,function(){let e=(0,r.useContext)(d);if(!e)throw Error("useAppTheme must be used within AppThemeProvider");return e}])},609680,e=>{"use strict";let t=[],r=new Set,n=[];function i(){for(let e of r)e()}
1e.s(["RECALLABLE_CLASS",0,"toast-recallable","clearRecall",0,function(){0!==t.length&&(t=[],i())},"forgetToast",0,function(e){t.some(t=>t.key===e)&&(t=t.filter(t=>t.key!==e),i())},"getRecallEntries",0,function(){return t},"getRecallEntriesServer",0,function(){return n},"rememberToast",0,function(e){let r=t.find(t=>t.key===e.key);if(r){if(r.kind===e.kind&&r.node===e.node&&r.title===e.title&&r.description===e.description&&r.action?.onClick===e.action?.onClick)return;t=t.map(t=>t.key===e.key?{...t,...e}:t)}else t=[{...e,at:Date.now()},...t].slice(0,20);i()},"subscribeRecall",0,function(e){return r.add(e),()=>{r.delete(e)}}])},585333,e=>{"use strict";let t="stale-build-reload-at",r="/api/internal/track",n=0,i=new Set;function a(e,{source:t,staleBuild:s}){try{if(n>=3)return;let a=e&&"object"==typeof e?e:{},o=("string"==typeof a.message?a.message:String(e??"")).slice(0,300),l="string"==typeof a.digest?a.digest.slice(0,64):null,u=`${t}|${l}|${o}`;if(i.has(u))return;i.add(u),n++;let d=window.location.pathname,c=JSON.stringify({event:"client_error",path:d,properties:{message:o,digest:l,pathname:d,stale_build:s,source:t}});if(navigator.sendBeacon?.(r,new Blob([c],{type:"application/json"})))return;fetch(r,{method:"POST",body:c,headers:{"Content-Type":"application/json"},keepalive:!0}).catch(()=>{})}catch{}}e.s(["isStaleBuildError",0,function(e){if(!e||"object"!=typeof e)return!1;if("ChunkLoadError"===e.name)return!0;let t="string"==typeof e.message?e.message:"";return/Loading (CSS )?chunk [\w-]+ failed/i.test(t)||/Failed to fetch dynamically imported module/i.test(t)||/Importing a module script failed/i.test(t)||/error loading dynamically imported module/i.test(t)},"reloadForStaleBuild",0,function(e,r="stale_build_reload"){try{let e=Number(sessionStorage.getItem(t)||0);if(Date.now()-e<3e4)return!1;sessionStorage.setItem(t,String(Date.now()))}catch{return!1}return a(e??Error("Reloading for a stale build"),{source:r,staleBuild:!0}),window.location.reload(),!0},"reportClientError",0,a])}]);
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.