PageSourceSearch

https://www.diy.org/_next/static/chunks/4240-7e16b1ee3d7a9334.js

js diy.org collected 2026-10-01 10:35:00 UTC 30,801 bytes, 46 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09f3b-a464-7432-91f3-c8d6435d4c77")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4240],{5231:(e,t,r)=>{r.d(t,{A:()=>d,m:()=>s});var a=r(95155),n=r(12115),l=r(15239),o=r(82548),i=r(88851);let s=e=>{let{imageUrl:t,imageAlt:r="yeti icon",headerText:s,title:d,children:c,width:u=400,maxHeight:p=480,onClose:h,draggable:m=!0,noBottomPadding:g=!1,autoPosition:x=!0,closeOnClickOutside:b=!1,showCustomScrollbar:f=!0,containerStyle:v,className:y,baseTransform:w,onInteract:k,zIndex:C,panelStackId:j,managedStack:$=!1}=e,P=(0,i.u9)(),N=null==P?void 0:P.registerPanel,E=null==P?void 0:P.unregisterPanel,M=null==P?void 0:P.bringToFront,S=null==P?void 0:P.getPanelZIndex,I=(0,n.useRef)(null),[D,R]=(0,n.useState)({x:0,y:0}),[L,z]=(0,n.useState)(!1),W=(0,n.useRef)(null),T=(0,n.useRef)(null),q=(0,n.useRef)(null),[H,V]=(0,n.useState)(!1),[A,O]=(0,n.useState)(0),[U,B]=(0,n.useState)(0),Y=(0,n.useRef)(!1),X=(0,n.useRef)(null),F=(0,n.useId)().replace(/:/g,"-"),K=$&&!!P&&!!j;(0,n.useEffect)(()=>{if(K&&j&&N)return N(j),()=>{E&&E(j)}},[K,j,N,E]);let Z=K&&S&&j?S(j):void 0,_=void 0!==C?C:Z??void 0;(0,n.useEffect)(()=>{if(!b||!h)return;let e=e=>{var t;if(I.current&&I.current.contains(e.target))return;let r=e.target;null!=(t=r.closest)&&t.call(r,"[data-toolbar-control]")||h()};return document.addEventListener("pointerdown",e,!0),()=>{document.removeEventListener("pointerdown",e,!0)}},[b,h]);let G=(0,n.useCallback)(()=>{let e=T.current;if(!e||!f)return;let{scrollHeight:t,clientHeight:r,scrollTop:a}=e,n=t>r;if(V(e=>e===n?e:n),n){O(e=>20===e?e:20);let e=t-r,n=Math.round((e>0?a/e:0)*(r-20)*100)/100;B(e=>e===n?e:n);return}O(e=>0===e?e:0),B(e=>0===e?e:0)},[f]);(0,n.useEffect)(()=>{if(!f)return;let e=T.current;if(!e)return;let t=q.current;G();let r=()=>{Y.current||G()};e.addEventListener("scroll",r);let a=new ResizeObserver(()=>{G()});return a.observe(e),t&&a.observe(t),()=>{e.removeEventListener("scroll",r),a.disconnect()}},[f,G]);let J=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=T.current;t&&(Y.current=!0,X.current={y:e.clientY,scrollTop:t.scrollTop},e.target.setPointerCapture(e.pointerId))},[]),Q=(0,n.useCallback)(e=>{if(!Y.current||!X.current)return;let t=T.current;if(!t)return;let{scrollHeight:r,clientHeight:a}=t,n=a-A,l=e.clientY-X.current.y;t.scrollTop=X.current.scrollTop+l/n*(r-a),G()},[A,G]),ee=(0,n.useCallback)(e=>{Y.current&&(Y.current=!1,X.current=null,e.target.releasePointerCapture(e.pointerId))},[]),et=(0,n.useCallback)(e=>{m&&(e.preventDefault(),z(!0),W.current={x:e.clientX,y:e.clientY,offsetX:D.x,offsetY:D.y},e.target.setPointerCapture(e.pointerId))},[m,D]),er=(0,n.useCallback)(e=>{if(!L||!W.current||!I.current)return;let t=e.clientX-W.current.x,r=e.clientY-W.current.y,a=W.current.offsetX+t,n=W.current.offsetY+r;if(x){let e=I.current,t=e.offsetParent;if(t){let r=e.offsetHeight,l=e.offsetWidth,o=t.offsetHeight,i=t.offsetWidth,s=(o-r)/2;a=Math.max(-(i-l-32),Math.min(0,a)),n=Math.max(-(s-16),Math.min(o-r-16-s,n))}}R({x:a,y:n})},[L,x]),ea=(0,n.useCallback)(e=>{L&&(z(!1),W.current=null,e.target.releasePointerCapture(e.pointerId))},[L]),en=x?`translate(${D.x}px, calc(-50% + ${D.y}px))`:`translate(${D.x}px, ${D.y}px)`,el=w?`${w} ${en}`:en,eo=(0,n.useCallback)(()=>{K&&M&&j&&M(j),null==k||k()},[M,K,k,j]);return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{ref:I,"data-canvas-panel":!0,className:`${x?"absolute":"relative"} z-[100] ${y??""}`,style:{...void 0!==_?{zIndex:_}:null,...x?{right:16,top:"50%",maxWidth:"calc(100% - 32px)"}:{},transform:el},onPointerDown:eo,children:(0,a.jsxs)("div",{className:"dialog-animate-in flex flex-col rounded-2xl border-2 border-primary-light bg-white text-primary-xx-dark shadow-lg",style:{width:"number"==typeof u?`${u}px`:u,...x?{maxWidth:"100%"}:{},maxHeight:p,paddingTop:12,paddingBottom:16*!g,...v},children:[m||h?(0,a.jsxs)("div",{className:`relative inset-x-0 top-0 h-5 flex-shrink-0 mx-4 ${m?L?"cursor-grabbing":"cursor-grab":""}`,style:{touchAction:"none"},onPointerDown:et,onPointerMove:er,onPointerUp:ea,onPointerCancel:ea,children:[m&&(0,a.jsx)("div",{className:"absolute left-1/2 top-2 pointer-events-none",style:{width:36,height:5,borderRadius:"5px",backgroundColor:"var(--color-primary-neutral)",transform:"translateX(-50%)"}}),h&&(0,a.jsx)("button",{type:"button",onClick:h,onPointerDown:e=>e.stopPropagation(),className:"absolute top-0 right-0 rounded-full transition-opacity duration-200 hover:opacity-70 cursor-pointer z-10 bg-transparent border-none","aria-label":"Close panel",children:(0,a.jsx)(o.A,{width:20,height:20})})]}):null,(0,a.jsxs)("div",{className:"relative z-[1] flex-1 min-h-0 mt-1 flex flex-col",children:[f&&(0,a.jsx)("style",{children:`.scrollbar-hide-${F}::-webkit-scrollbar { display: none; }`}),(0,a.jsxs)("div",{ref:T,className:`flex-1 min-h-0 overflow-y-auto ${f?`scrollbar-hide-${F}`:""}`,style:f?{scrollbarWidth:"none",msOverflowStyle:"none"}:void 0,children:[d&&(0,a.jsx)("div",{className:"font-bold text-primary-xx-dark px-4",style:{fontSize:"18px"},children:d}
1),!d&&(t||s)&&(0,a.jsxs)("div",{className:"flex gap-2 items-center px-4 pointer-events-none",children:[t&&(0,a.jsx)(l.default,{src:t,alt:r,width:50,height:50}),s&&(0,a.jsx)("div",{className:"text-sub font-bold",children:s})]}),(0,a.jsx)("div",{ref:q,className:d||t||s?"mt-3":"",children:c})]}),f&&H&&(0,a.jsx)("div",{className:"absolute right-1.5 top-0 bottom-0 w-1 pointer-events-none",style:{zIndex:10},children:(0,a.jsx)("div",{className:"absolute w-full rounded-full pointer-events-auto cursor-pointer",style:{height:A,top:U,backgroundColor:"var(--color-primary-neutral)",touchAction:"none"},onPointerDown:J,onPointerMove:Q,onPointerUp:ee,onPointerCancel:ee})})]})]})})})},d=s},21626:(e,t,r)=>{r.d(t,{Ct:()=>l,D9:()=>x,E2:()=>u,HW:()=>c,Jg:()=>h,Jx:()=>m,Ob:()=>p,PP:()=>n,PW:()=>o,RV:()=>g,WW:()=>s,dX:()=>a,qE:()=>d,uu:()=>i});let a=["var(--color-primary-black)","var(--color-primary-red)","#16a34a","#2563eb"],n="conic-gradient(var(--color-primary-red), #f97316, #facc15, #4ade80, #2563eb, #a855f7, var(--color-primary-red))",l=256,o=140,i=32,s=12,d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),r)},c=e=>{let t=e.replace("#","").trim();return/^[0-9A-Fa-f]{3}$/.test(t)?`#${t.split("").map(e=>e+e).join("").toUpperCase()}`:/^[0-9A-Fa-f]{6}$/.test(t)?`#${t.toUpperCase()}`:"var(--color-primary-black)"},u=e=>{let t=parseInt(c(e).slice(1),16);return{r:t>>16&255,g:t>>8&255,b:255&t}},p=e=>{let{r:t,g:r,b:a}=e;return`#${[t,r,a].map(e=>e.toString(16).padStart(2,"0")).join("").toUpperCase()}`},h=e=>{let{r:t,g:r,b:a}=e,n=t/255,l=r/255,o=a/255,i=Math.max(n,l,o),s=i-Math.min(n,l,o),d=0;return 0!==s&&(d=(i===n?(l-o)/s%6:i===l?(o-n)/s+2:(n-l)/s+4)*60)<0&&(d+=360),{h:d,s:0===i?0:s/i,v:i,a:1}},m=e=>{let{h:t,s:r,v:a}=e,n=a*r,l=n*(1-Math.abs(t/60%2-1)),o=a-n,i=0,s=0,d=0;return t>=0&&t<60?(i=n,s=l):t>=60&&t<120?(i=l,s=n):t>=120&&t<180?(s=n,d=l):t>=180&&t<240?(s=l,d=n):t>=240&&t<300?(i=l,d=n):(i=n,d=l),{r:Math.round((i+o)*255),g:Math.round((s+o)*255),b:Math.round((d+o)*255)}},g=e=>h(u(e)),x=e=>p(m(e))},22357:(e,t,r)=>{r.d(t,{f:()=>n});var a=r(95155);r(12115);let n=e=>{let{icon:t,onClick:r,onPointerDown:n,ariaLabel:l,variant:o="neutral",className:i="",style:s,disabled:d=!1}=e;return(0,a.jsx)("button",{type:"button",onClick:r,onPointerDown:n,"aria-label":l,disabled:d,className:`pointer-events-auto flex h-9 w-9 items-center justify-center rounded-full touch-none transition-colors duration-150 disabled:cursor-not-allowed ${"handle"===o?"disabled:opacity-100":"disabled:opacity-50"} ${{delete:"bg-white text-red-500 hover:bg-red-50",rotate:"bg-white text-primary-purple hover:bg-primary-xx-light",neutral:"bg-white text-primary-xx-dark hover:bg-primary-xx-light",muted:"bg-primary-xx-light text-primary-xx-dark hover:bg-primary-x-light",handle:"bg-white text-primary-purple border-2 border-primary-purple hover:bg-primary-xx-light"}[o]} ${i}`,style:{boxShadow:"handle"===o||"muted"===o?"none":"0 0 16px rgba(0,0,0,0.1)",cursor:d?"not-allowed":"rotate"===o||"handle"===o?"grab":"pointer",...s},children:(0,a.jsx)("function"==typeof t?t:()=>null,{className:"h-5 w-5"})})}},32817:(e,t,r)=>{r.d(t,{i:()=>n});let a=new Map;function n(e){if(!e||!e.includes("var("))return e;let t=a.get(e);if(t)return t;let r=document.createElement("div");r.style.color=e,document.body.appendChild(r);let n=window.getComputedStyle(r).color;document.body.removeChild(r);let l=n||e;return a.set(e,l),l}},39206:(e,t,r)=>{r.d(t,{Ez:()=>p,zi:()=>h});var a=r(95155),n=r(12115),l=r(47650),o=r(74e3),i=r(86567),s=r(21626),d=r(47138);let c=e=>{let t=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:,\s*[\d.]+)?\s*\)$/i);if(!t){let t=(0,s.HW)(e);return t.startsWith("#")?t:"#000000"}let[r,a,n]=t.slice(1,4).map(e=>Number(e));return`#${[r,a,n].map(e=>e.toString(16).padStart(2,"0")).join("").toUpperCase()}`},u=e=>{if(!e)return"#000000";if(e.includes("var(")){if("undefined"==typeof document||!document.body)return"#000000";let t=document.createElement("div");t.style.color=e,document.body.appendChild(t);let r=window.getComputedStyle(t).color;return document.body.removeChild(t),c(r)}if(e.startsWith("rgb"))return c(e);let t=(0,s.HW)(e);return t.startsWith("#")?t:"#000000"},p=e=>{let{isOpen:t,width:r,title:c,placement:p="anchored",color:h,opacity:m=1,recentColors:g=[],recentColorsLimit:x=4,style:b,closeOnClickOutside:f=!0,onColorChange:v,onOpacityChange:y,onClose:w}
1=e,k=(0,n.useRef)(null),[C,j]=(0,n.useState)(()=>{let e=u(h),t=(0,s.RV)(e);return t.a=(0,s.qE)(m),t}),[$,P]=(0,n.useState)(()=>u(h)),[N,E]=(0,n.useState)(()=>u(h).replace("#","")),M=(0,n.useRef)(C);(0,n.useEffect)(()=>{M.current=C},[C]),(0,n.useEffect)(()=>{if(!t)return;let e=u(h),r=(0,s.RV)(e);r.a=(0,s.qE)(m),j(r),P(e),E(e.replace("#",""))},[t,h,m]);let S=(0,n.useCallback)(e=>{let t={...M.current,...e};j(t);let r=(0,s.D9)(t);P(r),E(r.replace("#","")),v(r),void 0!==e.a&&y&&y((0,s.qE)(t.a))},[v,y]),I=(0,n.useCallback)((e,t)=>{if(!k.current)return;let r=k.current.getBoundingClientRect();S({s:(0,s.qE)((e-r.left)/r.width),v:1-(0,s.qE)((t-r.top)/r.height)})},[S]),D=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),I(e.clientX,e.clientY)},[I]),R=(0,n.useCallback)(e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&(e.stopPropagation(),I(e.clientX,e.clientY))},[I]),L=(0,n.useCallback)(e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),e.stopPropagation()},[]),z=(0,n.useCallback)(e=>{let t=e.replace(/[^0-9A-Fa-f]/g,"").slice(0,6).toUpperCase();if(E(t),3===t.length||6===t.length){let e=(0,s.HW)(`#${t}`),r=(0,s.RV)(e);r.a=C.a,j(r),P(e),E(e.replace("#","")),v(e)}},[C.a,v]),W=(0,n.useCallback)(async()=>{let e=window.EyeDropper;if(e)try{let t=new e,r=await t.open(),a=(0,s.HW)(r.sRGBHex),n=(0,s.RV)(a);n.a=C.a,j(n),P(a),E(a.replace("#","")),v(a)}catch{}},[C.a,v]),T=(0,n.useMemo)(()=>(0,s.D9)({...C,s:1,v:1,a:1}),[C]),q=(0,n.useMemo)(()=>({left:`${100*C.s}%`,top:`${(1-C.v)*100}%`}),[C]),H=Math.round(100*(0,s.qE)(C.a)),V=Math.max(0,x),A=(0,n.useMemo)(()=>g.slice(0,V),[g,V]);if(!t)return null;let O=(0,a.jsx)(o.m,{width:r,onClose:w,closeOnClickOutside:f,autoPosition:"right-side"===p,noBottomPadding:!0,title:c,children:(0,a.jsxs)("div",{className:"px-4 pb-4",children:[(0,a.jsx)("div",{ref:k,className:"relative h-40 w-full cursor-crosshair overflow-hidden rounded-xl",style:{backgroundImage:`linear-gradient(0deg,var(--color-primary-black),transparent),linear-gradient(90deg,var(--color-primary-white),${T})`},onPointerDown:D,onPointerMove:R,onPointerUp:L,onPointerLeave:L,children:(0,a.jsx)("div",{className:"pointer-events-none absolute -translate-x-1/2 -translate-y-1/2 rounded-full",style:{...q,width:9,height:9,border:"3px solid white",background:"transparent",boxShadow:"0 0 4px rgba(0, 0, 0, 0.3)"}})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(i.DK,{min:0,max:360,value:Math.round(C.h),onChange:e=>S({h:e}),style:{backgroundImage:i.Ip}})}),y?(0,a.jsx)("div",{style:{marginTop:2},children:(0,a.jsx)(i.DK,{min:0,max:100,value:H,onChange:e=>S({a:e/100}),style:(0,i.Vo)($)})}):null,(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button","aria-label":"Eyedropper tool",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-primary-x-light bg-white cursor-pointer",onClick:W,"data-toolbar-control":"true",children:(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"h-6 w-6 text-primary-xx-dark",children:(0,a.jsx)("path",{d:"M10.8216 7.3453L16.6549 13.1786M3.73828 20.262C3.73828 20.262 7.48828 19.8453 9.57161 17.762L19.5716 7.76197C20.4921 6.8415 20.4921 5.34911 19.5716 4.42864C18.6511 3.50816 17.1588 3.50816 16.2383 4.42864L6.23828 14.4286C4.15495 16.512 3.73828 20.262 3.73828 20.262Z",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,a.jsx)("div",{className:"h-8 w-8 shrink-0 rounded-lg border-2 border-primary-x-light overflow-hidden",style:d.Dz,children:(0,a.jsx)("div",{className:"w-full h-full",style:{backgroundColor:$,opacity:(0,s.qE)(C.a)}})}),(0,a.jsxs)("div",{className:"flex h-8 min-w-0 flex-1 items-center gap-2 rounded-lg border border-primary-x-light bg-white px-3",children:[(0,a.jsx)("span",{className:"text-medium font-semibold text-primary-x-dark",children:"#"}),(0,a.jsx)("input",{type:"text",value:N,onChange:e=>z(e.target.value),className:"w-full min-w-0 bg-transparent text-medium font-semibold uppercase tracking-wide text-primary-xx-dark outline-none","data-toolbar-control":"true"})]})]}),A.length?(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-1",children:A.map((e,t)=>{let r=u(e),n=$.toLowerCase()===r.toLowerCase();return(0,a.jsx)("button",{type:"button","aria-label":`Select color ${e}`,onClick:()=>{let e=(0,s.RV)(r);e.a=C.a,j(e),P(r),E(r.replace("#","")),v(r)},className:`h-8 w-8 rounded-lg border-2 cursor-pointer transition-all ${n?"border-primary-purple ring-2 ring-primary-purple":"border-primary-xx-light hover:border-primary-light"}`,style:{backgroundColor:e},"data-toolbar-control":"true"},`${e}-${t}`)})}):null]})});if("right-side"===p){let e=(0,a.jsx)("div",{className:"fixed inset-0 z-[100003] pointer-events-none","data-toolbar-control":"true",children:(0,a.jsx)("div",{className:"pointer-events-auto",onPointerDown:e=>e.stopPropagation(),onPointerMove:e=>e.stopPropagation(),onPointerUp:e=>e.stopPropagation(),children:O})});return"undefined"==typeof document?null:(0,l.createPortal)(e,document.body)}return(0,a.jsx)("div",{className:"absolute z-[100003]",style:b,onPointerDown:e=>e.stopPropagation(),onPointerMove:e=>e.stopPropagation(),onPointerUp:e=>e.stopPropagation(),"data-toolbar-control":"true",children:O})},h=e=>
1{let{color:t,opacity:r=1,recentColors:l=[],recentColorsLimit:o=4,onColorChange:c,onOpacityChange:p}=e,h=(0,n.useRef)(null),[m,g]=(0,n.useState)(()=>{let e=u(t),a=(0,s.RV)(e);return a.a=(0,s.qE)(r),a}),[x,b]=(0,n.useState)(()=>u(t)),[f,v]=(0,n.useState)(()=>u(t).replace("#","")),y=(0,n.useRef)(m);(0,n.useEffect)(()=>{y.current=m},[m]),(0,n.useEffect)(()=>{let e=u(t),a=(0,s.RV)(e);a.a=(0,s.qE)(r),g(a),b(e),v(e.replace("#",""))},[t,r]);let w=(0,n.useCallback)(e=>{let t={...y.current,...e};g(t);let r=(0,s.D9)(t);b(r),v(r.replace("#","")),c(r),void 0!==e.a&&p&&p((0,s.qE)(t.a))},[c,p]),k=(0,n.useCallback)((e,t)=>{if(!h.current)return;let r=h.current.getBoundingClientRect();w({s:(0,s.qE)((e-r.left)/r.width),v:1-(0,s.qE)((t-r.top)/r.height)})},[w]),C=(0,n.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),k(e.clientX,e.clientY)},[k]),j=(0,n.useCallback)(e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&(e.stopPropagation(),k(e.clientX,e.clientY))},[k]),$=(0,n.useCallback)(e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),e.stopPropagation()},[]),P=(0,n.useCallback)(e=>{let t=e.replace(/[^0-9A-Fa-f]/g,"").slice(0,6).toUpperCase();if(v(t),3===t.length||6===t.length){let e=(0,s.HW)(`#${t}`),r=(0,s.RV)(e);r.a=m.a,g(r),b(e),v(e.replace("#","")),c(e)}},[m.a,c]),N=(0,n.useCallback)(async()=>{let e=window.EyeDropper;if(e)try{let t=new e,r=await t.open(),a=(0,s.HW)(r.sRGBHex),n=(0,s.RV)(a);n.a=m.a,g(n),b(a),v(a.replace("#","")),c(a)}catch{}},[m.a,c]),E=(0,n.useMemo)(()=>(0,s.D9)({...m,s:1,v:1,a:1}),[m]),M=(0,n.useMemo)(()=>({left:`${100*m.s}%`,top:`${(1-m.v)*100}%`}),[m]),S=Math.round(100*(0,s.qE)(m.a)),I=Math.max(0,o),D=(0,n.useMemo)(()=>l.slice(0,I),[l,I]);return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{ref:h,className:"relative h-40 w-full cursor-crosshair overflow-hidden rounded-xl",style:{backgroundImage:`linear-gradient(0deg,var(--color-primary-black),transparent),linear-gradient(90deg,var(--color-primary-white),${E})`},onPointerDown:C,onPointerMove:j,onPointerUp:$,onPointerLeave:$,children:(0,a.jsx)("div",{className:"pointer-events-none absolute -translate-x-1/2 -translate-y-1/2 rounded-full",style:{...M,width:9,height:9,border:"3px solid white",background:"transparent",boxShadow:"0 0 4px rgba(0, 0, 0, 0.3)"}})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(i.DK,{min:0,max:360,value:Math.round(m.h),onChange:e=>w({h:e}),style:{backgroundImage:i.Ip}})}),p?(0,a.jsx)("div",{style:{marginTop:2},children:(0,a.jsx)(i.DK,{min:0,max:100,value:S,onChange:e=>w({a:e/100}),style:(0,i.Vo)(x)})}):null,(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button","aria-label":"Eyedropper tool",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-primary-x-light bg-white cursor-pointer",onClick:N,"data-toolbar-control":"true",children:(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"h-6 w-6 text-primary-xx-dark",children:(0,a.jsx)("path",{d:"M10.8216 7.3453L16.6549 13.1786M3.73828 20.262C3.73828 20.262 7.48828 19.8453 9.57161 17.762L19.5716 7.76197C20.4921 6.8415 20.4921 5.34911 19.5716 4.42864C18.6511 3.50816 17.1588 3.50816 16.2383 4.42864L6.23828 14.4286C4.15495 16.512 3.73828 20.262 3.73828 20.262Z",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,a.jsx)("div",{className:"h-8 w-8 shrink-0 rounded-lg border-2 border-primary-x-light overflow-hidden",style:d.Dz,children:(0,a.jsx)("div",{className:"w-full h-full",style:{backgroundColor:x,opacity:(0,s.qE)(m.a)}})}),(0,a.jsxs)("div",{className:"flex h-8 min-w-0 flex-1 items-center gap-2 rounded-lg border border-primary-x-light bg-white px-3",children:[(0,a.jsx)("span",{className:"text-medium font-semibold text-primary-x-dark",children:"#"}),(0,a.jsx)("input",{type:"text",value:f,onChange:e=>P(e.target.value),className:"w-full min-w-0 bg-transparent text-medium font-semibold uppercase tracking-wide text-primary-xx-dark outline-none","data-toolbar-control":"true"})]})]}),D.length?(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-1",children:D.map((e,t)=>{let r=u(e),n=x.toLowerCase()===r.toLowerCase();return(0,a.jsx)("button",{type:"button","aria-label":`Select color ${e}`,onClick:()=>{let e=(0,s.RV)(r);e.a=m.a,g(e),b(r),v(r.replace("#","")),c(r)},className:`h-8 w-8 rounded-lg border-2 cursor-pointer transition-all ${n?"border-primary-purple ring-2 ring-primary-purple":"border-primary-xx-light hover:border-primary-light"}`,style:{backgroundColor:e},"data-toolbar-control":"true"},`${e}-${t}`)})}):null]})}},47138:(e,t,r)=>{r.d(t,{Dz:()=>g,IB:()=>p,Zd:()=>m,bY:()=>y,bl:()=>h,et:()=>v,kR:()=>d,qe:()=>f});var a=r(95155),n=r(12115);r(15239);var l=r(47650),o=r(81207),i=r(32817);let s="z-[100004] flex h-[30px] items-center justify-center whitespace-nowrap rounded-lg border-2 border-primary-x-light bg-white px-3 text-xs font-bold text-primary-x-dark pointer-events-none",d=e=>{let{tooltip:t,className:r="",usePortal:o=!1,portalContainer:i,hideTooltip:d=!1,children:c}
1=e,[u,p]=(0,n.useState)(!1),h=(0,n.useRef)(null),[m,g]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!u||!o)return;let e=()=>{let e=h.current;if(!e)return;let t=e.getBoundingClientRect(),r=t.left+t.width/2,a=t.top-8-30;g({left:Math.min(window.innerWidth-8,Math.max(8,r)),top:Math.max(8,a)})};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[u,o]);let x="undefined"!=typeof document,b=x?i??document.body:null,f=o&&u&&x&&b&&m?(0,l.createPortal)((0,a.jsx)("div",{className:`fixed -translate-x-1/2 ${s}`,style:{left:m.left,top:m.top},children:t}),b):null;return(0,a.jsxs)("div",{ref:h,className:`relative overflow-visible ${r}`,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[!u||o||d?null:(0,a.jsx)("div",{className:`absolute left-1/2 -translate-x-1/2 ${s}`,style:{bottom:"calc(100% + 8px)"},children:t}),!d&&f,c]})},c={toolbar:{active:"bg-primary-purple text-white",inactive:"bg-white text-neutral-600 hover:bg-neutral-50"},panel:{active:"bg-primary-purple text-white",inactive:"bg-primary-xx-light text-neutral-600 hover:bg-primary-x-light"}},u=e=>{let{label:t,onClick:r,isActive:n=!1,children:l,ariaLabel:o,variant:i="toolbar",className:s="",disabled:u=!1,textLabel:p,size:h="default",tooltipUsePortal:m=!1,tooltipPortalContainer:g=null,hideTooltip:x=!1}=e,b=c[i],f=n&&!u,v=!!p,y=v?"border-2 border-[#EDEDED]":"border-0",w={height:"large"===h?"h-[42px]":"h-8",width:v?"w-auto":"large"===h?"w-[42px]":"w-8",padding:v?"large"===h?"px-[14px] py-[10px]":"px-2 py-1":"",gap:v?"large"===h?"gap-[6px]":"gap-[4px]":"",textStyle:"large"===h?"text-sub font-bold":"text-small font-bold"};return(0,a.jsx)(d,{tooltip:t,usePortal:m,portalContainer:g,hideTooltip:x,children:(0,a.jsxs)("button",{type:"button",onClick:r,"aria-pressed":f,"aria-label":o??t,"aria-disabled":u,disabled:u,className:`flex ${w.height} ${w.width} ${w.padding} ${w.gap} items-center justify-center rounded-lg
2          transition-colors duration-150 ${u?"cursor-not-allowed opacity-40 pointer-events-none":"cursor-pointer"}
3          ${f?b.active:b.inactive} ${y} ${s}`,children:[l,v&&(0,a.jsx)("span",{className:w.textStyle,children:p})]})})},p=e=>(0,a.jsx)(u,{...e,variant:"toolbar"}),h=e=>(0,a.jsx)(u,{...e,variant:"panel"}),m=e=>{let{popoutIcon:t,popoutOffset:r=18,popoutTop:n=5,popoutClassName:l="",className:o="",isActive:i=!1,disabled:s=!1,children:d,...c}=e,u=i&&!s,h=`relative h-full w-8 shrink-0 overflow-visible ${s?"":"group"}`,m={top:n,"--popout-offset":`-${r}px`};return(0,a.jsxs)("div",{className:h,children:[(0,a.jsx)(p,{...c,className:`${o} bg-transparent hover:bg-transparent`,isActive:!1,disabled:s,children:d}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 overflow-visible",style:{clipPath:"inset(-200px 0 0 0)"},children:(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 z-10",style:m,children:(0,a.jsx)("div",{className:`transition-transform duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.275)] ${u?"translate-y-[var(--popout-offset)]":"translate-y-0"} ${s?"":"group-hover:translate-y-[var(--popout-offset)]"} ${l}`,children:t})})})]})},g={backgroundImage:"linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px",backgroundColor:"var(--color-primary-white)"},x=e=>(e=>{let t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/);return t?{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}:null})(e)??(e=>{let t=e.replace("#","");if(3!==t.length&&6!==t.length)return null;let r=parseInt(3===t.length?t.split("").map(e=>e+e).join(""):t,16);return Number.isNaN(r)?null:{r:r>>16&255,g:r>>8&255,b:255&r}})(e),b=(e,t,r)=>{let a=r&&e.includes("var(")?(0,i.i)(e):e,n=a.toUpperCase(),l=a.startsWith("rgb")?(e=>{let t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/);if(!t)return e;let r=parseInt(t[1],10),a=parseInt(t[2],10),n=parseInt(t[3],10),l=e=>{let t=e.toString(16);return 1===t.length?"0"+t:t};return`#${l(r)}${l(a)}${l(n)}`.toUpperCase()})(a):n,o=x(a)??x(e);if(!o)return{displayHex:l,swatchStyle:{backgroundColor:e}};let s=`rgb(${o.r}, ${o.g}, ${o.b})`,d=`rgba(${o.r}, ${o.g}, ${o.b}, ${t})`;return{displayHex:l,swatchStyle:{backgroundImage:`linear-gradient(to right, ${s} 0, ${s} 50%, ${d} 50%, ${d} 100%), ${g.backgroundImage}`,backgroundSize:`100% 100%, ${g.backgroundSize}`,backgroundPosition:`0 0, ${g.backgroundPosition}`,backgroundRepeat:"no-repeat, repeat, repeat, repeat, repeat",backgroundColor:g.backgroundColor}}},f=e=>{let{hex:t,isActive:r,onClick:l,opacity:o=1,tooltip:i,tooltipUsePortal:s=!1,tooltipPortalContainer:c=null}
3=e,[u,p]=(0,n.useState)(()=>b(t,o,!1));return(0,n.useEffect)(()=>{let e=t.includes("var(");p(b(t,o,e))},[t,o]),(0,a.jsx)(d,{tooltip:i??(0,a.jsx)("span",{className:"uppercase",children:u.displayHex}),usePortal:s,portalContainer:c,className:"flex items-center",children:(0,a.jsx)("button",{type:"button","aria-label":`Select color ${t}`,onClick:l,className:`h-8 w-8 rounded-lg border-2 cursor-pointer overflow-hidden
4          ${r?"border-primary-purple":"border-primary-xx-light"}`,children:(0,a.jsx)("div",{className:"h-full w-full",style:u.swatchStyle})})})},v=e=>{let{onClick:t,backgroundImage:r}=e;return(0,a.jsx)(d,{tooltip:"Picker",className:"flex items-center",children:(0,a.jsx)("button",{type:"button","aria-label":"Open custom color picker",onClick:t,className:"h-8 w-8 rounded-lg border-2 border-primary-x-light cursor-pointer",style:{backgroundImage:r}})})},y=e=>{let{onClick:t}=e;return(0,a.jsx)(d,{tooltip:"No fill",className:"flex items-center",children:(0,a.jsx)("button",{type:"button","aria-label":"Clear fill color",onClick:t,className:"h-8 w-8 rounded-lg bg-primary-xx-light flex items-center justify-center cursor-pointer hover:bg-primary-x-light transition-colors",children:(0,a.jsx)(o.A,{width:20,height:20})})})}},65339:(e,t,r)=>{r.d(t,{f:()=>a.f});var a=r(22357)},74e3:(e,t,r)=>{r.d(t,{A:()=>a.A,m:()=>a.m});var a=r(5231)},81207:(e,t,r)=>{r.d(t,{A:()=>o});var a,n=r(12115);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let o=e=>n.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},e),a||(a=n.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"m7.188 12.813 5.625-5.626M10 17.5a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z",opacity:.9})))},86567:(e,t,r)=>{r.d(t,{DK:()=>i,Ip:()=>s,Vo:()=>d});var a=r(95155),n=r(12115);let l=`
5  input[type="range"].color-picker-slider-v2 {
6    -webkit-appearance: none !important;
7    appearance: none !important;
8    cursor: pointer !important;
9    height: 10px !important;
10    border-radius: 9999px !important;
11  }
12  input[type="range"].color-picker-slider-v2::-webkit-slider-runnable-track {
13    height: 10px !important;
14    border-radius: 9999px !important;
15    background: inherit !important;
16  }
17  input[type="range"].color-picker-slider-v2::-webkit-slider-thumb {
18    -webkit-appearance: none !important;
19    appearance: none !important;
20    width: 12px !important;
21    height: 12px !important;
22    border-radius: 50% !important;
23    border: 3px solid var(--color-primary-white) !important;
24    background-color: transparent !important;
25    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) !important;
26    cursor: pointer !important;
27    margin-top: -1px !important;
28    box-sizing: border-box !important;
29  }
30  input[type="range"].color-picker-slider-v2::-moz-range-track {
31    height: 10px !important;
32    border-radius: 9999px !important;
33    background: inherit !important;
34  }
35  input[type="range"].color-picker-slider-v2::-moz-range-thumb {
36    width: 12px !important;
37    height: 12px !important;
38    border-radius: 50% !important;
39    border: 3px solid var(--color-primary-white) !important;
40    background-color: transparent !important;
41    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1) !important;
42    cursor: pointer !important;
43    box-sizing: border-box !important;
44  }
45`,o=!1,i=e=>{let{min:t,max:r,value:i,onChange:s,style:d,className:c=""}=e;return(0,n.useEffect)(()=>{!function(){if("undefined"==typeof document||o)return;if(document.getElementById("color-picker-slider-styles-v2")){o=!0;return}let e=document.createElement("style");e.id="color-picker-slider-styles-v2",e.innerHTML=l,document.head.appendChild(e),o=!0}()},[]),(0,a.jsx)("input",{type:"range",min:t,max:r,value:i,onChange:e=>s(Number(e.target.value)),className:`color-picker-slider-v2 h-2.5 w-full rounded-full ${c}`,style:d})},s="linear-gradient(90deg,var(--color-primary-red) 0%,#ffff00 16%,#00ff00 33%,#00ffff 50%,#0000ff 66%,#ff00ff 83%,var(--color-primary-red) 100%)",d=e=>({backgroundImage:`linear-gradient(90deg, transparent 0%, ${e} 100%), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)`,backgroundSize:"100% 100%, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 4px 4px"})},88851:(e,t,r)=>{r.d(t,{Iu:()=>o,u9:()=>i});var a=r(95155),n=r(12115);let l=(0,n.createContext)(null),o=e=>{let{children:t}
45=e,[r,o]=(0,n.useState)([]),i=(0,n.useCallback)(e=>{o(t=>t.includes(e)?t:[...t,e])},[]),s=(0,n.useCallback)(e=>{o(t=>t.filter(t=>t!==e))},[]),d=(0,n.useCallback)(e=>{o(t=>{let r=t.indexOf(e);if(-1===r)return[...t,e];if(r===t.length-1)return t;let a=[...t];return a.splice(r,1),a.push(e),a})},[]),c=(0,n.useCallback)(e=>{let t=r.indexOf(e);return -1===t?110:110+t},[r]),u=(0,n.useMemo)(()=>({registerPanel:i,unregisterPanel:s,bringToFront:d,getPanelZIndex:c}),[d,c,i,s]);return(0,a.jsx)(l.Provider,{value:u,children:t})},i=()=>(0,n.useContext)(l)},93849:(e,t,r)=>{r.d(t,{A:()=>o});var a,n=r(12115);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let o=e=>n.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),a||(a=n.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:2.182},n.createElement("path",{d:"M12 16.91V7.092M7.09 12h9.818"}))))}}]);
46//# chunkId=01a09f3b-a464-7432-91f3-c8d6435d4c77

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.