(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,643957,e=>{"use strict";let t=(0,e.i(456420).f)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["f",0,t])},689664,e=>{"use strict";var t=e.i(643957);e.s(["f",()=>t.f])},926894,e=>{"use strict";let t=(0,e.i(456420).f)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);e.s(["f",0,t],926894)},112793,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),n=e.i(689664),i=e.i(926894),l=e.i(456420);let s=(0,l.f)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),o=(0,l.f)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);var c=e.i(519455),u=e.i(311063),d=e.i(293995);let m={slack:"Slack",teams:"Microsoft Teams",imessage:"iMessage",email:"Email",linkedin:"LinkedIn",x:"X",facebook:"Facebook",reddit:"Reddit",copy_link:"Copied link",web_share:"Device share sheet",salesrep:"Sales outreach"};Object.keys(m);var h=e.i(975157);e.s(["ShareButton",0,function({url:e,title:l,surface:f,className:b}){let p=(0,a.usePathname)()??"/",y=(0,r.useId)(),x=(0,r.useRef)(null),v=(0,r.useRef)(null),g=(0,r.useRef)(null),w=(0,r.useRef)(null),[k,j]=(0,r.useState)(!1),[S,R]=(0,r.useState)(null),[A,C]=(0,r.useState)(!1),[N,$]=(0,r.useState)(""),_=()=>l??("u">typeof document?document.title:""),L=(0,r.useCallback)(e=>{$(e),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>$(""),2500)},[]),T=(0,r.useCallback)((e=!1)=>{j(!1),e&&v.current?.focus()},[]);(0,r.useEffect)(()=>{if(k)return g.current?.querySelector('[role="menuitem"]')?.focus(),document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)};function e(e){x.current&&!x.current.contains(e.target)&&T()}function t(e){"Escape"===e.key&&(e.preventDefault(),T(!0))}},[k,T]),(0,r.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]);let U=e=>(function({url:e,channel:t,campaign:r}){let a=new URL("string"==typeof e?e:e.href),n=(0,d.a)(a.search),i=new URLSearchParams(n.startsWith("?")?n.slice(1):n);return i.set("utm_source",t),i.set("utm_medium","share"),r&&i.set("utm_campaign",r),`${a.origin}${a.pathname}?${i.toString()}${a.hash}`})({url:S??window.location.href,channel:e}),E=e=>(0,u.p)(`share:${f}`,p,{channel:e}),z=async()=>{E("copy_link");let e=U("copy_link");try{if(!navigator.clipboard?.writeText)throw Error("clipboard unavailable");await navigator.clipboard.writeText(e),L("Link copied to clipboard")}catch{L("Could not copy — copy the address from the URL bar")}T(!0)},D=async()=>{E("web_share");try{await navigator.share({url:U("web_share"),title:_()})}catch{}T(!0)},I=[{channel:"linkedin",label:`Share on ${m.linkedin}`},{channel:"x",label:`Share on ${m.x}`},{channel:"email",label:"Share by email"}],q="flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm text-foreground hover:bg-muted focus-visible:bg-muted focus-visible:outline-none";return(0,t.jsxs)("div",{ref:x,className:(0,h.f)("relative",b),onBlur:e=>{let t=e.relatedTarget;t instanceof Node&&(e.currentTarget.contains(t)||T())},children:[(0,t.jsxs)(c.K,{ref:v,type:"button",variant:"outline",size:"sm","data-testid":"share-button","aria-haspopup":"menu","aria-expanded":k,"aria-controls":k?y:void 0,"aria-label":"Share this page",onClick:()=>{k?T():(R(e??window.location.href),C("u">typeof navigator&&"function"==typeof navigator.share),j(!0))},children:[(0,t.jsx)(o,{className:"mr-1.5 size-4","aria-hidden":!0}),"Share"]}),k?(0,t.jsxs)("div",{id:y,ref:g,role:"menu","aria-label":"Share this page",className:"absolute right-0 z-20 mt-2 w-56 rounded-xl border border-border bg-background p-1 shadow-xl",onKeyDown:e=>{let t=Array.from(g.current?.querySelectorAll('[role="menuitem"]')??[]);if(0===t.length)return;let r=t.findIndex(e=>e===document.activeElement),a=e=>t[(e+t.length)%t.length]?.focus();switch(e.key){case"ArrowDown":e.preventDefault(),a(r+1);break;case"ArrowUp":e.preventDefault(),a(r-1);break;case"Home":e.preventDefault(),a(0);break;case"End":e.preventDefault(),a(t.length-1)}},children:[(0,t.jsxs)("button",{type:"button",role:"menuitem",className:q,"data-share-channel":"copy_link",onClick:()=>void z(),children:[(0,t.jsx)(i.f,{className:"size-4","aria-hidden":!0}),"Copy link"]}),I.map(({channel:e,label:r})=>(0,t.jsxs)("a",{role:"menuitem",className:q,"data-share-channel":e,href:function({channel:e,url:t,title:r}){switch(e){case"linkedin":return`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(t)}`;case"x":return`https://x.com/intent/post?url=${encodeURIComponent(t)}&text=${encodeURIComponent(r)}`;case"email":return`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(`${r} ${t}`)}`}}({channel:e,url:U(e),title:_()}),..."email"===e?{}:{target:"_blank",rel:"noopener noreferrer"},onClick:()=>{E(e),T()},children:["email"===e?(0,t.jsx)(s,{className:"size-4","aria-hidden":!0}):(0,t.jsx)(o,{className:"size-4","aria-hidden":!0}),r]},e)),A?(0,t.jsxs)("button",{type:"button",role:"menuitem",className:q,"data-share-channel":"web_share",onClick:()=>void D(),children:[(0,t.jsx)(o,{className:"size-4","aria-hidden":!0}),"More options…"]}):null]}):null,(0,t.jsx)("span",{role:"status","aria-live":"polite",className:(0,h.f)(N?"absolute right-0 top-full mt-1 inline-flex items-center gap-1 whitespace-nowrap text-sm text-muted-foreground":"sr-only"),children:N?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.f,{className:"size-3","aria-hidden":!0}),N]}):null})]})}],112793)},854453,e=>{"use strict";var t=e.i(843476),r=e.i(522016),a=e.i(271645),n=e.i(117213);e.s(["CtaLink",0,function({describedBy:e,children:i,...l}){let s=(0,a.useRef)(null);return(0,n.f)(s,e),(0,t.jsx)(r.default,{ref:s,"aria-describedby":e,...l,children:i})}])},87791,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(975157);e.s(["ScrollRegion",0,function({as:e,label:n,labelledBy:i,className:l,children:s,...o}){let c=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let e=c.current;if(!e)return;let t={label:n,labelledBy:i},r=()=>{var r;return r=e.scrollWidth>e.clientWidth+1||e.scrollHeight>e.clientHeight+1,void(e.setAttribute("data-measured","true"),r?(e.setAttribute("tabindex","0"),e.setAttribute("role","region"),e.setAttribute("data-scrolls","true"),t.labelledBy?(e.setAttribute("aria-labelledby",t.labelledBy),e.removeAttribute("aria-label")):t.label&&(e.setAttribute("aria-label",t.label),e.removeAttribute("aria-labelledby"))):(e.removeAttribute("tabindex"),e.removeAttribute("role"),e.removeAttribute("data-scrolls"),e.removeAttribute("aria-label"),e.removeAttribute("aria-labelledby")))};if(r(),"u"a.disconnect()},[n,i]),(0,t.jsx)(e??"div",{ref:c,"data-slot":"scroll-region",className:(0,a.f)("overflow-x-auto",l),...o,children:s})}])},429592,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.s(["ConsentEmbed",0,function({url:e}){let a,[n,i]=(0,r.useState)(!1),l=(a=e.match(/(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/),a?.[1]??null);return l?n?(0,t.jsx)("div",{className:"my-8 aspect-video w-full overflow-hidden rounded-lg",children:(0,t.jsx)("iframe",{src:`https://www.youtube-nocookie.com/embed/${l}`,title:"YouTube video",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"h-full w-full"})}):(0,t.jsxs)("div",{className:"my-8 flex flex-col items-center justify-center rounded-lg border border-cbt-100 bg-cbt-50 p-8",children:[(0,t.jsx)("p",{className:"mb-4 text-sm text-muted-foreground",children:"This content is hosted by YouTube. Loading it may share data with Google."}),(0,t.jsx)("button",{onClick:()=>i(!0),className:"btn-gradient rounded-full px-6 py-2 text-sm font-semibold text-white",children:"Load embedded video"})]}):(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-cbt-600 underline hover:text-cbt-800",children:"Watch video"})}])},293995,e=>{"use strict";let t=new Set(["gclid","fbclid","msclkid","yclid","mc_cid","mc_eid","ref","referral","referrer","_hsenc","_hsmi","hsCtaTracking"]),r=["utm_"];function a(e){var a;let n;if(!e||!e.includes("?"))return e;let[i,l]=-1===(n=(a=e).indexOf("?"))?[a,void 0]:[a.slice(0,n),a.slice(n+1)];if(!l)return i;let s=new URLSearchParams(l),o=new URLSearchParams;for(let[e,a]of s.entries())!function(e){let a=e.toLowerCase();return!!t.has(a)||r.some(e=>a.startsWith(e))}(e)&&o.append(e,a);let c=o.toString();return c?`${i}?${c}`:i}let n=new Set(["www.cbtnuggets.com","cbtnuggets.com","newcbt.cbtnuggets.com"]);e.s(["G",0,function(e){let t=a(e);if(t.startsWith("/"))return t;try{let e=new URL(t);if(n.has(e.hostname))return`${e.pathname}${e.search}`}catch{}return t},"a",0,a])}]);