1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["vite-assets/NewProgressiveBlurControls-BDjzJZS9.js","vite-assets/jsx-runtime-Cx0BB4qO.js","vite-assets/react-IDFlRUvQ.js"])))=>i.map(i=>d[i]); 2import{i as e,t}from"./jsx-runtime-Cx0BB4qO.js";import{t as n}from"./react-IDFlRUvQ.js";import{St as r,xt as i}from"./index-CbG_h2ed.js";import{t as a}from"./utils-Bp3k4iMt.js";var o=e(n()),s=r(),c=t(),l=(0,o.lazy)(()=>i(()=>import(`./NewProgressiveBlurControls-BDjzJZS9.js`).then(e=>({default:e.NewProgressiveBlurPanel})),__vite__mapDeps([0,1,2]))),u={subtle:{maxBlur:12,layers:10,curve:1.6,tintOpacity:.1},medium:{maxBlur:20,layers:12,curve:1.7,tintOpacity:.16},strong:{maxBlur:48,layers:18,curve:2,tintOpacity:.3},ios:{maxBlur:28,layers:14,curve:1.8,tintOpacity:.24}};function d({className:e,height:t=`35%`,width:n=`35%`,position:r=`bottom`,direction:i,intensity:a=`ios`,maxBlur:d,layers:v,endAt:y=100,tint:b=!0,tintColor:x=`255 255 255`,tintOpacity:C,dissolve:T=.4,zIndex:E=20,minSliceStep:D=3,toUnit:O=f,sliceRadius:k,debug:A=!1,debugLabel:j=`iOS Progress Blur`,debugPlacement:M=`bottom-left`}){let[N,P]=(0,o.useState)(null),F=(0,o.useSyncExternalStore)(p,m,h),I=r===`left`||r===`right`||r===`both-x`,L=u[N?.intensity??a],R={maxBlur:N?.maxBlur??d??L.maxBlur,layers:N?.layers??v??L.layers,curve:L.curve,tintOpacity:N?.tintOpacity??C??L.tintOpacity,size:N?.height??(I?n:t),direction:N?.direction??i,showGuide:N?.showGuide??!1},z=(0,o.useMemo)(()=>S({position:r,direction:R.direction,height:I?t:R.size,width:I?R.size:n,maxBlur:R.maxBlur,layers:R.layers,curve:R.curve,endAt:y,tint:b,tintColor:x,tintOpacity:R.tintOpacity,dissolve:T,minSliceStep:D,toUnit:O}),[r,R.direction,R.size,I,t,n,R.maxBlur,R.layers,R.curve,y,b,x,R.tintOpacity,T,D,O]);return(0,c.jsxs)(c.Fragment,{children:[z.map(t=>(0,c.jsx)(w,{band:t,className:e,zIndex:E,showGuide:R.showGuide,toUnit:O,sliceRadius:k},t.edge)),A&&F&&(0,s.createPortal)((0,c.jsx)(o.Suspense,{fallback:null,children:(0,c.jsx)(l,{label:j,placement:M,values:N??{direction:R.direction??_[g[r][0]],intensity:a,maxBlur:R.maxBlur,layers:R.layers,tintOpacity:R.tintOpacity,height:R.size,showGuide:R.showGuide},onChange:P})}),document.body)]})}var f=e=>`${e}px`,p=()=>()=>{},m=()=>!0,h=()=>!1,g={top:[`top`],bottom:[`bottom`],left:[`left`],right:[`right`],"both-y":[`top`,`bottom`],"both-x":[`left`,`right`]},_={top:`to-top`,bottom:`to-bottom`,left:`to-left`,right:`to-right`},v=[`to-top`,`to-bottom`],y=(e,t,n)=>Math.min(n,Math.max(t,e)),b=e=>Math.round(e*100)/100,x=e=>Math.round(e*1e3)/1e3;function S(e){let t=g[e.position],n=t.length===2;return t.map(t=>{let r=_[t];return!n&&e.direction&&v.includes(e.direction)===(t===`top`||t===`bottom`)&&(r=e.direction),C(t,r,e)})}function C(e,t,n){let r=e===`left`||e===`right`,i=t.replace(`-`,` `),a=t===`to-bottom`?`top`:t===`to-top`?`bottom`:t===`to-right`?`left`:`right`,o=a===`top`?`bottom`:a===`bottom`?`top`:a===`left`?`right`:`left`,s=r?[`top`,`bottom`]:[`left`,`right`],c=r?{top:0,bottom:0,[e]:0,width:n.width}:{left:0,right:0,[e]:0,height:n.height},l=Math.max(0,n.maxBlur),u=Math.max(1,Math.floor(n.layers)),d=l>0&&n.minSliceStep>0?Math.max(1,Math.min(u,Math.ceil(l/n.minSliceStep))):u,f=y(n.endAt,0,100),p;if(n.tint&&n.tintOpacity>0){let e=y(n.tintOpacity,0,1),t=Math.max(.75,n.curve*.45),r=[0,.2,.4,.6,.8,1].map(r=>`rgb(${n.tintColor} / ${x(e*r**t)}) ${b(r*f)}%`);f<100&&r.push(`rgb(${n.tintColor} / ${x(e)}) 100%`),p={background:`linear-gradient(${i}, ${r.join(`, `)})`}}let m;if(n.dissolve>0){let e=y(n.dissolve,0,1);m={background:`linear-gradient(${i}, rgb(${n.tintColor} / ${x(e*.1)}) 0%, rgb(${n.tintColor} / ${x(e)}) 100%)`}}let h={background:`linear-gradient(${i}, rgb(${n.tintColor} / 0) 0%, rgb(${n.tintColor} / ${x(Math.min(.5,y(n.tintOpacity,0,1)*3))}) ${b(Math.max(f,1))}%)`},g=e===`top`?`bottom`:e===`bottom`?`top`:e===`left`?`right`:`left`;return{edge:e,wrapperStyle:c,axis:i,crispSide:a,farSide:o,cross:s,horizontal:r,B:l,L:d,end:f,tintStyle:p,dissolveStyle:m,fallbackStyle:h,guideStyle:r?{top:0,bottom:0,[g]:0,borderLeft:`1px dashed rgba(43,92,71,0.55)`,opacity:.7}:{left:0,right:0,[g]:0,borderTop:`1px dashed rgba(43,92,71,0.55)`,opacity:.7}}}function w({band:e,className:t,zIndex:n,showGuide:r,toUnit:i,sliceRadius:s}){let l=(0,o.useRef)(null),u=i===f,[d,p]=(0,o.useState)(null);(0,o.useEffect)(()=>{let t=l.current;if(!t||!u)return;let n=()=>{let n=e.horizontal?t.clientWidth:t.clientHeight;p(e=>{let t=n>0?Math.round(n):null;return e===t?e:t})};n();let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},[e.horizontal,u]);let m=(0,o.useMemo)(()=>T(e,i,u?d:null),[e,i,u,d]);return(0,c.jsxs)(`div`,{ref:l,className:a(`pointer-events-none absolute overflow-hidden`,t),style:{...e.wrapperStyle,zIndex:n},"aria-hidden":`true`,children:[(0,c.jsxs)(`div`,{className:`absolute inset-0 hidden supports-blur:block`,children:[m.map((e,t)=>(0,c.jsx)(`div`,{className:`absolute`,style:s?{...e,borderRadius:s}:e},t)),e.tintStyle&&(0,c.jsx)(`div`,{className:`absolute inset-0`,style:e.tintStyle}),e.dissolveStyle&&(0,c.jsx)(`div`,{className:`absolute inset-0`,style:e.dissolveStyle})]}),(0,c.jsx)(`div`,{className:`absolute inset-0 supports-blur:hidden`,style:e.fallbackStyle}),r&&(0,c.jsx)(`div`,{className:`absolute`,style:e.guideStyle})]})}function T(e,t,n){let{axis:r,crispSide:i,farSide:a,cross:o,B:s,L:c,end:l}=e,u=[];for(let e=0;e<c;e++){let d=b(s*(e+1)/c);if(d<=0)continue;let f=t(d),p=l<=0?0:b(l*((e+1)/(c+1)*.9)),m=0;if(n&&n>0&&l>0){let e=(4*d+2)/n*100;m=Math.max(0,b(p-e)),m<2&&(m=0)}let h=m>0?b((p-m)/(100-m)*100):p,g=b(m>0?(l-m)/(100-m)*100:l),_=l<=0?`linear-gradient(${r}, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 100%)`:`linear-gradient(${r}, rgba(0,0,0,0) 0%, rgba(0,0,0,0) ${h}%, rgba(0,0,0,1) ${g}%, rgba(0,0,0,1) 100%)`,v=m>0?{[i]:`${m}%`,[a]:0,[o[0]]:0,[o[1]]:0}:{inset:0};u.push({...v,zIndex:1+e,backdropFilter:`blur(${f})`,WebkitBackdropFilter:`blur(${f})`,maskImage:_,WebkitMaskImage:_})}let d=b(s);if(d>0){let e=t(d),n=l<=0?`linear-gradient(${r}, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 100%)`:`linear-gradient(${r}, rgba(0,0,0,0) 0%, rgba(0,0,0,1) ${b(l)}%, rgba(0,0,0,1) 100%)`;u.push({inset:0,zIndex:1+c,backdropFilter:`blur(${e})`,WebkitBackdropFilter:`blur(${e})`,maskImage:n,WebkitMaskImage:n})}return u}export{d as t};
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.