1import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{_ as t,a as n,c as r,d as i,f as a,g as o,h as s,n as c,o as l,r as u,s as d,t as f,x as p,y as m}from"./vendor-r3f-R-OQjR81.js";var h=e(p(),1);function g(e){let t=Math.abs(e),n=Math.sign(e),r,i,a,o,s;if(t<=1)r=n*2.7*t,i=1.3-1.7*t,a=1.26-.38*t,o=.05-.07*t,s=-n*.46*t;else{let e=t-1;r=n*(2.7+2*e),i=-.4-1.6*e,a=Math.max(.88-.28*e,.16),o=-.02-.06*e,s=-n*Math.min(.46+.1*e,.62)}return{x:r,y:o,z:i,scale:a,rotY:s}}function _(e,t){let n=t/2;return((e+n)%t+t)%t-n}var v=m(),y=2.5,b=1.62,x=.18,S=.2,C=.025;function w(e,t,n){let r=new o,i=-e/2,a=-t/2;return r.moveTo(i+n,a),r.lineTo(i+e-n,a),r.quadraticCurveTo(i+e,a,i+e,a+n),r.lineTo(i+e,a+t-n),r.quadraticCurveTo(i+e,a+t,i+e-n,a+t),r.lineTo(i+n,a+t),r.quadraticCurveTo(i,a+t,i,a+t-n),r.lineTo(i,a+n),r.quadraticCurveTo(i,a,i+n,a),r}function T(e,n,r){let i=new t(w(e,n,r),16);i.computeBoundingBox();let a=i.boundingBox,o=a.max.x-a.min.x,s=a.max.y-a.min.y,c=i.attributes.position,l=i.attributes.uv;for(let e=0;e<c.count;e++)l.setXY(e,(c.getX(e)-a.min.x)/o,(c.getY(e)-a.min.y)/s);return l.needsUpdate=!0,i}var E=new a(w(y,b,S),{depth:x,bevelEnabled:!0,bevelThickness:C,bevelSize:C,bevelSegments:3,curveSegments:24});E.translate(0,0,-.18/2),E.computeBoundingBox();var D=T(y,b,S),O=(E.boundingBox?.max.z??x/2)+.008;function k({k:e,count:t,va:n,face:r,onPick:i,url:a}){let o=(0,h.useRef)(null),s=(0,h.useRef)(null),c=(0,h.useRef)(99);d(()=>{let r=_(e-n.current,t);c.current=r;let i=o.current,a=s.current;if(!i||!a)return;let l=Math.abs(r)<2.8;if(i.visible=l,!l)return;let u=g(r);i.position.set(u.x,u.y,u.z),i.scale.setScalar(u.scale),a.rotation.y=u.rotY});let l=e=>{e.stopPropagation();let t=c.current;Math.abs(t)<.5?a&&window.open(a,`_blank`,`noopener,noreferrer`):i(Math.round(t))},f=e=>{document.body.style.cursor=e?`pointer`:``};return(0,v.jsx)(`group`,{ref:o,children:(0,v.jsx)(u,{speed:.9,rotationIntensity:.05,floatIntensity:.1,floatingRange:[-.025,.025],children:(0,v.jsxs)(`group`,{ref:s,onClick:l,onPointerOver:e=>{e.stopPropagation(),f(!0)},onPointerOut:()=>f(!1),children:[(0,v.jsx)(`mesh`,{geometry:D,position:[0,0,O],children:(0,v.jsx)(`meshBasicMaterial`,{map:r,toneMapped:!1})}),(0,v.jsx)(`mesh`,{geometry:E,children:(0,v.jsx)(`meshPhysicalMaterial`,{transparent:!0,opacity:.38,roughness:.05,metalness:0,reflectivity:.6,clearcoat:1,clearcoatRoughness:.06,color:`#eaf3ff`,envMapIntensity:1.8})})]})})})}var A=1536,j=996;A/j;var M=`#00e5ff`,N={ro:{cloud:`NOR DE PUNCTE`,ortho:`ORTO`},en:{cloud:`POINT CLOUD`,ortho:`ORTHOPHOTO`}};function P(e,t,n,r){let i=t.split(` `),a=[],o=``;for(let t=0;t<i.length;t++){let s=o?`${o} ${i[t]}`:i[t];if(e.measureText(s).width>n&&o){if(a.push(o),o=i[t],a.length===r-1){o=i.slice(t).join(` `);break}}else o=s}return o&&a.push(o),a.slice(0,r)}function F(e,t,n,r,i,a){let o=Math.min(a,i/2,r/2);e.beginPath(),e.moveTo(t+o,n),e.arcTo(t+r,n,t+r,n+i,o),e.arcTo(t+r,n+i,t,n+i,o),e.arcTo(t,n+i,t,n,o),e.arcTo(t,n,t+r,n,o),e.closePath()}function I(e,t,n){let r=document.createElement(`canvas`);r.width=A,r.height=j;let a=r.getContext(`2d`);if(a.fillStyle=`#05080d`,a.fillRect(0,0,A,j),t){let e=(t.width||A)/(t.height||j),n=A/j,r,i,o,s;e>n?(i=j,r=j*e,o=(A-r)/2,s=0):(r=A,i=A/e,o=0,s=(j-i)/2),a.imageSmoothingQuality=`high`,a.drawImage(t,o,s,r,i)}let o=a.createLinearGradient(0,j*.56,0,j);o.addColorStop(0,`rgba(3,7,11,0)`),o.addColorStop(1,`rgba(3,7,11,0.86)`),a.fillStyle=o,a.fillRect(0,j*.56,A,j*.44);let c=j-62,l=e.viewerKind===`3D`?N[n].cloud:N[n].ortho;a.font=`600 26px 'Space Grotesk', system-ui, sans-serif`;let u=Math.ceil(a.measureText(l).width)+40;a.font=`600 68px 'Space Grotesk', system-ui, sans-serif`,a.textBaseline=`alphabetic`;let d=P(a,e.title,A-148-u-36,2),f=68*1.1,p=c-50-(d.length-1)*f,m=p-68;a.fillStyle=M,a.fillRect(54,m,5,c-m),a.fillStyle=`#f3f9ff`;for(let e of d)a.fillText(e,74,p),p+=f;let h=A-54-u;F(a,h,890,u,50,50/2),a.fillStyle=`rgba(3,7,11,0.5)`,a.fill(),a.lineWidth=2,a.strokeStyle=`rgba(0,229,255,0.55)`,F(a,h,890,u,50,50/2),a.stroke(),a.font=`600 26px 'Space Grotesk', system-ui, sans-serif`,a.fillStyle=M,a.textBaseline=`middle`,a.fillText(l,h+20,917),a.textBaseline=`alphabetic`;let g=new i(r);
1return g.colorSpace=s,g.anisotropy=16,g.needsUpdate=!0,g}var L=Math.min(typeof window<`u`&&window.devicePixelRatio||1,1.5);function R({cards:e,virtual:t,onPick:i,onReady:a,lang:o}){let s=e.length,l=e.map(e=>e.preview).join(`|`),u=n((0,h.useMemo)(()=>e.map(e=>e.preview),[l])),p=Array.isArray(u)?u:[u],[m,g]=(0,h.useState)(!1);(0,h.useEffect)(()=>{let e=!0;return(document.fonts?.ready??Promise.resolve()).then(()=>{e&&g(!0)}),()=>{e=!1}},[]);let _=(0,h.useMemo)(()=>e.map((e,t)=>I(e,p[t]?.image??null,o)),[u,m,l,o]);(0,h.useEffect)(()=>()=>{_.forEach(e=>e.dispose())},[_]),(0,h.useEffect)(()=>{if(!a)return;let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>a())});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[a]);let y=(0,h.useRef)(t),{scene:b}=r();d((e,n)=>{let r=Math.min(1,n*8);y.current+=(t-y.current)*r,Math.abs(t-y.current)<5e-4&&(y.current=t),b.environmentRotation.y=Math.sin(e.clock.elapsedTime*.32)*.85});let x=s*Math.ceil(7/s);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`color`,{attach:`background`,args:[`#000000`]}),Array.from({length:x},(t,n)=>(0,v.jsx)(k,{k:n,count:x,va:y,face:_[n%s],url:e[n%s].externalUrl,onPick:i},n)),(0,v.jsxs)(c,{resolution:256,frames:1,children:[(0,v.jsx)(f,{form:`rect`,intensity:1.3,position:[0,5,3],scale:[12,1.4,1],color:`#dfeaff`}),(0,v.jsx)(f,{form:`rect`,intensity:5.6,position:[0,4.4,3.6],scale:[3,1.1,1],color:`#ffffff`}),(0,v.jsx)(f,{form:`rect`,intensity:.7,position:[-6,1.5,3],scale:[1.4,7,1],color:`#eaf2ff`}),(0,v.jsx)(f,{form:`rect`,intensity:.7,position:[6,1.5,3],scale:[1.4,7,1],color:`#eaf2ff`})]}),(0,v.jsx)(`ambientLight`,{intensity:.4}),(0,v.jsx)(`directionalLight`,{position:[2,4,6],intensity:.5,color:`#eef6ff`})]})}function z(e){let t=(0,h.useRef)(null),[n,r]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{let e=t.current;if(!e||!(`IntersectionObserver`in window)){r(!0);return}let n=new IntersectionObserver(([e])=>r(e.isIntersecting),{threshold:.04});return n.observe(e),()=>n.disconnect()},[]),(0,v.jsx)(`div`,{ref:t,className:`glass-host`,"aria-hidden":`true`,children:(0,v.jsx)(l,{className:`glass-canvas`,flat:!0,frameloop:n?`always`:`demand`,dpr:[1,L],gl:{antialias:!0,alpha:!1,powerPreference:`high-performance`},camera:{position:[0,.2,6.2],fov:38},children:(0,v.jsx)(h.Suspense,{fallback:null,children:(0,v.jsx)(R,{...e})})})})}export{z as default};
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.