PageSourceSearch

https://app.cinevva.com/assets/chunks/EnvironmentPreview.7fYSPIHZ.js

js cinevva.com collected 2026-10-03 23:16:44 UTC 34,292 bytes, 5 lines download raw bytes

1import{g as Vt,r as Oe,c as $t,w as ut,o as Kt,f as qt,j as _e,h as Se,y as ee,k as Ye,a3 as ht,ak as Jt,z as pt,t as Ke,p as De,G as Qt,H as jt,a4 as en,q as tn}from"./framework.D4MCK8Cu.js";import{i as nn,p as on}from"./viewerTouch.DB1BhbEv.js";import{WebGLRenderer as rn}from"./three.module.CA98NPPL.js";import{d8 as ft,H as Re,ag as Fe,d9 as Ae,z as be,n as Le,J as xe,a6 as Pe,aj as We,fb as ln,P as sn,bZ as an,fn as mt,M as cn,a5 as un,c3 as hn}from"./three.core.C_6G_SMS.js";import{u as Xe}from"./fflate.module.DvP_coAD.js";import{OrbitControls as pn}from"./OrbitControls.BUh4aqa3.js";class mn extends ft{constructor(N){super(N),this.type=Re}parse(N){const U=function(_,C){switch(_){case 1:throw new Error("THREE.HDRLoader: Read Error: "+(C||""));case 2:throw new Error("THREE.HDRLoader: Write Error: "+(C||""));case 3:throw new Error("THREE.HDRLoader: Bad File Format: "+(C||""));default:case 4:throw new Error("THREE.HDRLoader: Memory Error: "+(C||""))}},we=`
2`,R=function(_,C,x){C=C||1024;let f=_.pos,I=-1,y=0,k="",A=String.fromCharCode.apply(null,new Uint16Array(_.subarray(f,f+128)));for(;0>(I=A.indexOf(we))&&y<C&&f<_.byteLength;)k+=A,y+=A.length,f+=128,A+=String.fromCharCode.apply(null,new Uint16Array(_.subarray(f,f+128)));return-1<I?(_.pos+=y+I+1,k+A.slice(0,I)):!1},Z=function(_){const C=/^#\?(\S+)/,x=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,g=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,f=/^\s*FORMAT=(\S+)\s*$/,I=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,y={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let k,A;for((_.pos>=_.byteLength||!(k=R(_)))&&U(1,"no header found"),(A=k.match(C))||U(3,"bad initial token"),y.valid|=1,y.programtype=A[1],y.string+=k+`
3`;k=R(_),k!==!1;){if(y.string+=k+`
4`,k.charAt(0)==="#"){y.comments+=k+`
5`;continue}if((A=k.match(x))&&(y.gamma=parseFloat(A[1])),(A=k.match(g))&&(y.exposure=parseFloat(A[1])),(A=k.match(f))&&(y.valid|=2,y.format=A[1]),(A=k.match(I))&&(y.valid|=4,y.height=parseInt(A[1],10),y.width=parseInt(A[2],10)),y.valid&2&&y.valid&4)break}return y.valid&2||U(3,"missing format specifier"),y.valid&4||U(3,"missing image size specifier"),y},fe=function(_,C,x){const g=C;if(g<8||g>32767||_[0]!==2||_[1]!==2||_[2]&128)return new Uint8Array(_);g!==(_[2]<<8|_[3])&&U(3,"wrong scanline width");const f=new Uint8Array(4*C*x);f.length||U(4,"unable to allocate buffer space");let I=0,y=0;const k=4*g,A=new Uint8Array(4),oe=new Uint8Array(k);let de=x;for(;de>0&&y<_.byteLength;){y+4>_.byteLength&&U(1),A[0]=_[y++],A[1]=_[y++],A[2]=_[y++],A[3]=_[y++],(A[0]!=2||A[1]!=2||(A[2]<<8|A[3])!=g)&&U(3,"bad rgbe scanline format");let se=0,F;for(;se<k&&y<_.byteLength;){F=_[y++];const X=F>128;if(X&&(F-=128),(F===0||se+F>k)&&U(3,"bad scanline data"),X){const ie=_[y++];for(let Te=0;Te<F;Te++)oe[se++]=ie}else oe.set(_.subarray(y,y+F),se),se+=F,y+=F}const Be=g;for(let X=0;X<Be;X++){let ie=0;f[I]=oe[X+ie],ie+=g,f[I+1]=oe[X+ie],ie+=g,f[I+2]=oe[X+ie],ie+=g,f[I+3]=oe[X+ie],I+=4}de--}return f},Ee=function(_,C,x,g){const f=_[C+3],I=Math.pow(2,f-128)/255;x[g+0]=_[C+0]*I,x[g+1]=_[C+1]*I,x[g+2]=_[C+2]*I,x[g+3]=1},O=function(_,C,x,g){const f=_[C+3],I=Math.pow(2,f-128)/255;x[g+0]=Ae.toHalfFloat(Math.min(_[C+0]*I,65504)),x[g+1]=Ae.toHalfFloat(Math.min(_[C+1]*I,65504)),x[g+2]=Ae.toHalfFloat(Math.min(_[C+2]*I,65504)),x[g+3]=Ae.toHalfFloat(1)},ce=new Uint8Array(N);ce.pos=0;const $=Z(ce),ge=$.width,le=$.height,te=fe(ce.subarray(ce.pos),ge,le);let Q,ue,ne;switch(this.type){case Fe:ne=te.length/4;const _=new Float32Array(ne*4);for(let x=0;x<ne;x++)Ee(te,x*4,_,x*4);Q=_,ue=Fe;break;case Re:ne=te.length/4;const C=new Uint16Array(ne*4);for(let x=0;x<ne;x++)O(te,x*4,C,x*4);Q=C,ue=Re;break;default:throw new Error("THREE.HDRLoader: Unsupported type: "+this.type)}return{width:ge,height:le,data:Q,header:$.string,gamma:$.gamma,exposure:$.exposure,type:ue}}setDataType(N){return this.type=N,this}load(N,K,B,Y){function q(U,J){switch(U.type){case Fe:case Re:U.colorSpace=be,U.minFilter=Le,U.magFilter=Le,U.generateMipmaps=!1,U.flipY=!0;break}K&&K(U,J)}return super.load(N,q,B,Y)}}class fn extends ft{constructor(N){super(N),this.type=Re,this.outputFormat=xe}parse(N){const C=Math.pow(2.7182818,2.2);function x(e,t){let n=0;for(let l=0;l<65536;++l)(l==0||e[l>>3]&1<<(l&7))&&(t[n++]=l);const r=n-1;for(;n<65536;)t[n++]=0;return r}function g(e){for(let t=0;t<16384;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}const f={l:0,c:0,lc:0};function I(e,t,n,r,l){for(;n<e;)t=t<<8|st(r,l),n+=8;n-=e,f.l=t>>n&(1<<e)-1,f.c=t,f.lc=n}const y=new Array(59);function k(e){for(let n=0;n<=58;++n)y[n]=0;for(let n=0;n<65537;++n)y[e[n]]+=1;let t=0;for(let n=58;n>0;--n){const r=t+y[n]>>1;y[n]=t,t=r}for(let n=0;n<65537;++n){const r=e[n];r>0&&(e[n]=r|y[r]++<<6)}}function A(e,t,n,r,l,c){const o=t;let u=0,i=0;for(;r<=l;r++){if(o.value-t.value>n)return!1;I(6,u,i,e,o);const s=f.l;if(u=f.c,i=f.lc,c[r]=s,s==63){if(o.value-t.value>n)throw new Error("Something wrong with hufUnpackEncTable");I(8,u,i,e,o);let a=f.l+6;if(u=f.c,i=f.lc,r+a>l+1)throw new Error("Something wrong with hufUnpackEncTable");for(;a--;)c[r++]=0;r--}else if(s>=59){let a=s-59+2;if(r+a>l+1)throw new Error("Something wrong with hufUnpackEncTable");for(;a--;)c[r++]=0;r--}}k(c)}function oe(e){return e&63}function de(e){return e>>6}function se(e,t,n,r){for(;t<=n;t++){const l=de(e[t]),c=oe(e[t]);if(l>>c)throw new Error("Invalid table entry");if(c>14){const o=r[l>>c-14];if(o.len)throw new Error("Invalid table entry");if(o.lit++,o.p){const u=o.p;o.p=new Array(o.lit);for(let i=0;i<o.lit-1;++i)o.p[i]=u[i]}else o.p=new Array(1);o.p[o.lit-1]=t}else if(c){let o=0;for(let u=1<<14-c;u>0;u--){const i=r[(l<<14-c)+o];if(i.len||i.p)throw new Error("Invalid table entry");i.len=c,i.lit=t,o++}}}return!0}const F={c:0,lc:0};function Be(e,t,n,r){e=e<<8|st(n,r),t+=8,F.c=e,F.lc=t}const X={c:0,lc:0};function ie(e,t,n,r,l,c,o,u,i){if(e==t){r<8&&(Be(n,r,l,c),n=F.c,r=F.lc),r-=8;let s=n>>r;if(s=new Uint8Array([s])[0],u.value+s>i)return!1;const a=o[u.value-1];for(;s-- >0;)o[u.value++]=a}else if(u.value<i)o[u.value++]=e;else return!1;X.c=n,X.lc=r}function Te(e){return e&65535}function qe(e){const t=Te(e);return t>32767?t-65536:t}const z={a:0,b:0};function ke(e,t){const n=qe(e),l=qe(t),c=n+(l&1)+(l>>1),o=c,u=c-l;z.a=o,z.b=u}function Ne(e,t){const n=Te(e),r=Te(t),l=n-(r>>1)&65535,c=r+l-32768&65535;z.a=c,z.b=l}function dt(e,t,n,r,l,c,o){const u=o<16384,i=n>l?l:n;let s=1,a,p;for(;s<=i;)s<<=1;for(s>>=1,a=s,s>>=1;s>=1;){p=0;const h=p+c*(l-a),d=c*s,v=c*a,m=r*s,E=r*a;let S,T,L,W;for(;p<=h;p+=v){let D=p;const b=p+r*(n-a);for(;D<=b;D+=E){const G=D+m,V=D+d,P=V+m;u?(ke(e[D+t],e[V+t]),S=z.a,L=z.b,ke(e[G+t],e[P+t]),T=z.a,W=z.b,ke(S,T),e[D+t]=z.a,e[G+t]=z.b,ke(L,W),e[V+t]=z.a,e[P+t]=z.b):(Ne(e[D+t],e[V+t]),S=z.a,L=z.b,Ne(e[G+t],e[P+t]),T=z.a,W=z.b,Ne(S,T),e[D+t]=z.a,e[G+t]=z.b,
5Ne(L,W),e[V+t]=z.a,e[P+t]=z.b)}if(n&s){const G=D+d;u?ke(e[D+t],e[G+t]):Ne(e[D+t],e[G+t]),S=z.a,e[G+t]=z.b,e[D+t]=S}}if(l&s){let D=p;const b=p+r*(n-a);for(;D<=b;D+=E){const G=D+m;u?ke(e[D+t],e[G+t]):Ne(e[D+t],e[G+t]),S=z.a,e[G+t]=z.b,e[D+t]=S}}a=s,s>>=1}return p}function wt(e,t,n,r,l,c,o,u,i){let s=0,a=0;const p=o,h=Math.trunc(r.value+(l+7)/8);for(;r.value<h;)for(Be(s,a,n,r),s=F.c,a=F.lc;a>=14;){const v=s>>a-14&16383,m=t[v];if(m.len)a-=m.len,ie(m.lit,c,s,a,n,r,u,i,p),s=X.c,a=X.lc;else{if(!m.p)throw new Error("hufDecode issues");let E;for(E=0;E<m.lit;E++){const S=oe(e[m.p[E]]);for(;a<S&&r.value<h;)Be(s,a,n,r),s=F.c,a=F.lc;if(a>=S&&de(e[m.p[E]])==(s>>a-S&(1<<S)-1)){a-=S,ie(m.p[E],c,s,a,n,r,u,i,p),s=X.c,a=X.lc;break}}if(E==m.lit)throw new Error("hufDecode issues")}}const d=8-l&7;for(s>>=d,a-=d;a>0;){const v=t[s<<14-a&16383];if(v.len)a-=v.len,ie(v.lit,c,s,a,n,r,u,i,p),s=X.c,a=X.lc;else throw new Error("hufDecode issues")}return!0}function Je(e,t,n,r,l,c){const o={value:0},u=n.value,i=pe(t,n),s=pe(t,n);n.value+=4;const a=pe(t,n);if(n.value+=4,i<0||i>=65537||s<0||s>=65537)throw new Error("Something wrong with HUF_ENCSIZE");const p=new Array(65537),h=new Array(16384);g(h);const d=r-(n.value-u);if(A(e,n,d,i,s,p),a>8*(r-(n.value-u)))throw new Error("Something wrong with hufUncompress");se(p,i,s,h),wt(p,h,e,n,a,s,c,l,o)}function Et(e,t,n){for(let r=0;r<n;++r)t[r]=e[t[r]]}function Qe(e){for(let t=1;t<e.length;t++){const n=e[t-1]+e[t]-128;e[t]=n}}function je(e,t){let n=0,r=Math.floor((e.length+1)/2),l=0;const c=e.length-1;for(;!(l>c||(t[l++]=e[n++],l>c));)t[l++]=e[r++]}function et(e){let t=e.byteLength;const n=new Array;let r=0;const l=new DataView(e);for(;t>0;){const c=l.getInt8(r++);if(c<0){const o=-c;t-=o+1;for(let u=0;u<o;u++)n.push(l.getUint8(r++))}else{const o=c;t-=2;const u=l.getUint8(r++);for(let i=0;i<o+1;i++)n.push(u)}}return n}function gt(e,t,n,r,l,c){let o=new DataView(c.buffer);const u=n[e.idx[0]].width,i=n[e.idx[0]].height,s=3,a=Math.floor(u/8),p=Math.ceil(u/8),h=Math.ceil(i/8),d=u-(p-1)*8,v=i-(h-1)*8,m={value:0},E=new Array(s),S=new Array(s),T=new Array(s),L=new Array(s),W=new Array(s);for(let b=0;b<s;++b)W[b]=t[e.idx[b]],E[b]=b<1?0:E[b-1]+p*h,S[b]=new Float32Array(64),T[b]=new Uint16Array(64),L[b]=new Uint16Array(p*64);for(let b=0;b<h;++b){let G=8;b==h-1&&(G=v);let V=8;for(let M=0;M<p;++M){M==p-1&&(V=d);for(let H=0;H<s;++H)T[H].fill(0),T[H][0]=l[E[H]++],tt(m,r,T[H]),nt(T[H],S[H]),ot(S[H]);yt(S);for(let H=0;H<s;++H)rt(S[H],L[H],M*64)}let P=0;for(let M=0;M<s;++M){const H=n[e.idx[M]].type;for(let ye=8*b;ye<8*b+G;++ye){P=W[M][ye];for(let Ze=0;Ze<a;++Ze){const ve=Ze*64+(ye&7)*8;o.setUint16(P+0*2*H,L[M][ve+0],!0),o.setUint16(P+1*2*H,L[M][ve+1],!0),o.setUint16(P+2*2*H,L[M][ve+2],!0),o.setUint16(P+3*2*H,L[M][ve+3],!0),o.setUint16(P+4*2*H,L[M][ve+4],
5!0),o.setUint16(P+5*2*H,L[M][ve+5],!0),o.setUint16(P+6*2*H,L[M][ve+6],!0),o.setUint16(P+7*2*H,L[M][ve+7],!0),P+=8*2*H}}if(a!=p)for(let ye=8*b;ye<8*b+G;++ye){const Ze=W[M][ye]+8*a*2*H,ve=a*64+(ye&7)*8;for(let Ge=0;Ge<V;++Ge)o.setUint16(Ze+Ge*2*H,L[M][ve+Ge],!0)}}}const D=new Uint16Array(u);o=new DataView(c.buffer);for(let b=0;b<s;++b){n[e.idx[b]].decoded=!0;const G=n[e.idx[b]].type;if(n[b].type==2)for(let V=0;V<i;++V){const P=W[b][V];for(let M=0;M<u;++M)D[M]=o.getUint16(P+M*2*G,!0);for(let M=0;M<u;++M)o.setFloat32(P+M*2*G,w(D[M]),!0)}}}function vt(e,t,n,r,l,c){const o=new DataView(c.buffer),u=n[e],i=u.width,s=u.height,a=Math.ceil(i/8),p=Math.ceil(s/8),h=Math.floor(i/8),d=i-(a-1)*8,v=s-(p-1)*8,m={value:0};let E=0;const S=new Float32Array(64),T=new Uint16Array(64),L=new Uint16Array(a*64);for(let W=0;W<p;++W){let D=8;W==p-1&&(D=v);for(let b=0;b<a;++b)T.fill(0),T[0]=l[E++],tt(m,r,T),nt(T,S),ot(S),rt(S,L,b*64);for(let b=8*W;b<8*W+D;++b){let G=t[e][b];for(let V=0;V<h;++V){const P=V*64+(b&7)*8;for(let M=0;M<8;++M)o.setUint16(G+M*2*u.type,L[P+M],!0);G+=8*2*u.type}if(a!=h){const V=h*64+(b&7)*8;for(let P=0;P<d;++P)o.setUint16(G+P*2*u.type,L[V+P],!0)}}}u.decoded=!0}function tt(e,t,n){let r,l=1;for(;l<64;)r=t[e.value],r==65280?l=64:r>>8==255?l+=r&255:(n[l]=r,l++),e.value++}function nt(e,t){t[0]=w(e[0]),t[1]=w(e[1]),t[2]=w(e[5]),t[3]=w(e[6]),t[4]=w(e[14]),t[5]=w(e[15]),t[6]=w(e[27]),t[7]=w(e[28]),t[8]=w(e[2]),t[9]=w(e[4]),t[10]=w(e[7]),t[11]=w(e[13]),t[12]=w(e[16]),t[13]=w(e[26]),t[14]=w(e[29]),t[15]=w(e[42]),t[16]=w(e[3]),t[17]=w(e[8]),t[18]=w(e[12]),t[19]=w(e[17]),t[20]=w(e[25]),t[21]=w(e[30]),t[22]=w(e[41]),t[23]=w(e[43]),t[24]=w(e[9]),t[25]=w(e[11]),t[26]=w(e[18]),t[27]=w(e[24]),t[28]=w(e[31]),t[29]=w(e[40]),t[30]=w(e[44]),t[31]=w(e[53]),t[32]=w(e[10]),t[33]=w(e[19]),t[34]=w(e[23]),t[35]=w(e[32]),t[36]=w(e[39]),t[37]=w(e[45]),t[38]=w(e[52]),t[39]=w(e[54]),t[40]=w(e[20]),t[41]=w(e[22]),t[42]=w(e[33]),t[43]=w(e[38]),t[44]=w(e[46]),t[45]=w(e[51]),t[46]=w(e[55]),t[47]=w(e[60]),t[48]=w(e[21]),t[49]=w(e[34]),t[50]=w(e[37]),t[51]=w(e[47]),t[52]=w(e[50]),t[53]=w(e[56]),t[54]=w(e[59]),t[55]=w(e[61]),t[56]=w(e[35]),t[57]=w(e[36]),t[58]=w(e[48]),t[59]=w(e[49]),t[60]=w(e[57]),t[61]=w(e[58]),t[62]=w(e[62]),t[63]=w(e[63])}function ot(e){const t=.5*Math.cos(.7853975),n=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),l=.5*Math.cos(3*3.14159/16),c=.5*Math.cos(5*3.14159/16),o=.5*Math.cos(3*3.14159/8),u=.5*Math.cos(7*3.14159/16),i=new Array(4),s=new Array(4),a=new Array(4),p=new Array(4);for(let h=0;h<8;++h){const d=h*8;i[0]=r*e[d+2],i[1]=o*e[d+2],i[2]=r*e[d+6],i[3]=o*e[d+6],s[0]=n*e[d+1]+l*e[d+3]+c*e[d+5]+u*e[d+7],s[1]=l*e[d+1]-u*e[d+3]-n*e[d+5]-c*e[d+7],s[2]=c*e[d+1]-n*e[d+3]+u*e[d+5]+l*e[d+7],s[3]=u*e[d+1]-c*e[d+3]+l*e[d+5]-n*e[d+7],a[0]=t*(e[d+0]+e[d+4]),a[3]=t*(e[d+0]-e[d+4]),a[1]=i[0]+i[3],a[2]=i[1]-i[2],p[0]=a[0]+a[1],p[1]=a[3]+a[2],p[2]=a[3]-a[2],p[3]=a[0]-a[1],e[d+0]=p[0]+s[0],e[d+1]=p[1]+s[1],e[d+2]=p[2]+s[2],e[d+3]=p[3]+s[3],e[d+4]=p[3]-s[3],e[d+5]=p[2]-s[2],e[d+6]=p[1]-s[1],e[d+7]=p[0]-s[0]}for(let h=0;h<8;++h)i[0]=r*e[16+h],i[1]=o*e[16+h],i[2]=r*e[48+h],i[3]=o*e[48+h],s[0]=n*e[8+h]+l*e[24+h]+c*e[40+h]+u*e[56+h],s[1]=l*e[8+h]-u*e[24+h]-n*e[40+h]-c*e[56+h],s[2]=c*e[8+h]-n*e[24+h]+u*e[40+h]+l*e[56+h],s[3]=u*e[8+h]-c*e[24+h]+l*e[40+h]-n*e[56+h],a[0]=t*(e[h]+e[32+h]),a[3]=t*(e[h]-e[32+h]),a[1]=i[0]+i[3],a[2]=i[1]-i[2],p[0]=a[0]+a[1],p[1]=a[3]+a[2],p[2]=a[3]-a[2],p[3]=a[0]-a[1],e[0+h]=p[0]+s[0],e[8+h]=p[1]+s[1],e[16+h]=p[2]+s[2],e[24+h]=p[3]+s[3],e[32+h]=p[3]-s[3],e[40+h]=p[2]-s[2],e[48+h]=p[1]-s[1],e[56+h]=p[0]-s[0]}function yt(e){for(let t=0;t<64;++t){const n=e[0][t],r=e[1][t],l=e[2][t];e[0][t]=n+1.5747*l,e[1][t]=n-.1873*r-.4682*l,e[2][t]=n+1.8556*r}}function rt(e,t,n){for(let r=0;r<64;++r)t[n+r]=Ae.toHalfFloat(_t(e[r]))}function _t(e){return e<=1?Math.sign(e)*Math.pow(Math.abs(e),2.2):Math.sign(e)*Math.pow(C,Math.abs(e)-1)}function Ve(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function St(e){const t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(et(t)),r=new Uint8Array(n.length);return Qe(n),je(n,r),new DataView(r.buffer)}function $e(e){const t=e.array.slice(e.offset.value,e.offset.value+e.size),n=Xe(t),r=new Uint8Array(n.length);return Qe(n),je(n,r),new DataView(r.buffer)}function bt(e){const t=e.viewer,n={value:e.offset.value},r=new Uint16Array(e.columns*e.lines*(e.inputChannels.length*e.type)),l=new Uint8Array(8192);let c=0;const o=new Array(e.inputChannels.length);for(let v=0,m=e.inputChannels.length;v<m;v++)o[v]={},o[v].start=c,o[v].end=o[v].start,o[v].nx=e.columns,o[v].ny=e.lines,o[v].size=e.type,c+=o[v].nx*o[v].ny*o[v].size;const u=He(t,n),i=He(t,n);if(i>=8192)throw new Error("Something is wrong with PIZ_COMPRESSION BITMAP_SIZE");if(u<=i)for(let v=0;v<i-u+1;v++)l[v+u]=Ie(t,n);const s=new Uint16Array(65536),a=x(l,s),p=pe(t,n);Je(e.array,t,n,p,r,c);for(let v=0;v<e.inputChannels.length;++v){const m=o[v];for(let E=0;E<o[v].size;++E)dt(r,m.start+E,m.nx,m.size,m.ny,m.nx*m.size,a)}Et(s,r,c);let h=0;const d=new Uint8Array(r.buffer.byteLength);for(let v=0;v<e.lines;v++)for(let m=0;m<e.inputChannels.length;m++){const E=o[m],S=E.nx*E.size,T=new Uint8Array(r.buffer,E.end*2,S*2);d.set(T,h),h+=S*2,E.end+=S}return new DataView(d.buffer)}function It(e){const t=e.array.slice(e.offset.value,e.offset.value+e.size),n=Xe(t),r=e.inputChannels.length*e.lines*e.columns*e.totalBytes,l=new ArrayBuffer(r),c=new DataView(l);let o=0,u=0;const i=new Array(4);for(let s=0;s<e.lines;s++)for(let a=0;a<e.inputChannels.length;a++){let p=0;switch(e.inputChannels[a].pixelType){case 1:i[0]=o,i[1]=i[0]+e.columns,o=i[1]+e.columns;for(let d=0;d<e.columns;++d){const v=n[i[0]++]<<8|n[i[1]++];p+=v,c.setUint16(u,p,!0),u+=2}break;case 2:i[0]=o,i[1]=i[0]+e.columns,i[2]=i[1]+e.columns,o=i[2]+e.columns;for(let d=0;d<e.columns;++d){const v=n[i[0]++]<<24|n[i[1]++]<<16|n[i[2]++]<<8;p+=v,c.setUint32(u,p,!0),u+=4}break}}return c}function lt(e){const t=e.viewer,n={value:e.offset.value},r=new Uint8Array(e.columns*e.lines*(e.inputChannels.length*e.type*2)),l={ver
5sion:ae(t,n),unknownUncompressedSize:ae(t,n),unknownCompressedSize:ae(t,n),acCompressedSize:ae(t,n),dcCompressedSize:ae(t,n),rleCompressedSize:ae(t,n),rleUncompressedSize:ae(t,n),rleRawSize:ae(t,n),totalAcUncompressedCount:ae(t,n),totalDcUncompressedCount:ae(t,n),acCompression:ae(t,n)};if(l.version<2)throw new Error("EXRLoader.parse: "+Me.compression+" version "+l.version+" is unsupported");const c=new Array;let o=He(t,n)-2;for(;o>0;){const m=ze(t.buffer,n),E=Ie(t,n),S=E>>2&3,T=(E>>4)-1,L=new Int8Array([T])[0],W=Ie(t,n);c.push({name:m,index:L,type:W,compression:S}),o-=m.length+3}const u=Me.channels,i=new Array(e.inputChannels.length);for(let m=0;m<e.inputChannels.length;++m){const E=i[m]={},S=u[m];E.name=S.name,E.compression=0,E.decoded=!1,E.type=S.pixelType,E.pLinear=S.pLinear,E.width=e.columns,E.height=e.lines}const s={idx:new Array(3)};for(let m=0;m<e.inputChannels.length;++m){const E=i[m];for(let S=0;S<c.length;++S){const T=c[S];E.name==T.name&&(E.compression=T.compression,T.index>=0&&(s.idx[T.index]=m),E.offset=m)}}let a,p,h;if(l.acCompressedSize>0)switch(l.acCompression){case 0:a=new Uint16Array(l.totalAcUncompressedCount),Je(e.array,t,n,l.acCompressedSize,a,l.totalAcUncompressedCount);break;case 1:const m=e.array.slice(n.value,n.value+l.totalAcUncompressedCount),E=Xe(m);a=new Uint16Array(E.buffer),n.value+=l.totalAcUncompressedCount;break}if(l.dcCompressedSize>0){const m={array:e.array,offset:n,size:l.dcCompressedSize};p=new Uint16Array($e(m).buffer),n.value+=l.dcCompressedSize}if(l.rleRawSize>0){const m=e.array.slice(n.value,n.value+l.rleCompressedSize),E=Xe(m);h=et(E.buffer),n.value+=l.rleCompressedSize}let d=0;const v=new Array(i.length);for(let m=0;m<v.length;++m)v[m]=new Array;for(let m=0;m<e.lines;++m)for(let E=0;E<i.length;++E)v[E].push(d),d+=i[E].width*e.type*2;s.idx[0]!==void 0&&i[s.idx[0]]&&gt(s,v,i,a,p,r);for(let m=0;m<i.length;++m){const E=i[m];if(!E.decoded)switch(E.compression){case 2:let S=0,T=0;for(let L=0;L<e.lines;++L){let W=v[m][S];for(let D=0;D<E.width;++D){for(let b=0;b<2*E.type;++b)r[W++]=h[T+b*E.width*E.height];T++}S++}break;case 1:vt(m,v,i,a,p,r);break;default:throw new Error("EXRLoader.parse: unsupported channel compression")}}return new DataView(r.buffer)}function ze(e,t){const n=new Uint8Array(e);let r=0;for(;n[t.value+r]!=0;)r+=1;const l=new TextDecoder().decode(n.slice(t.value,t.value+r));return t.value=t.value+r+1,l}function Ct(e,t,n){const r=new TextDecoder().decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}function Rt(e,t){const n=he(e,t),r=pe(e,t);return[n,r]}function At(e,t){const n=pe(e,t),r=pe(e,t);return[n,r]}function he(e,t){const n=e.getInt32(t.value,!0);return t.value=t.value+4,n}function pe(e,t){const n=e.getUint32(t.value,!0);return t.value=t.value+4,n}function st(e,t){const n=e[t.value];return t.value=t.value+1,n}function Ie(e,t){const n=e.getUint8(t.value);return t.value=t.value+1,n}const ae=function(e,t){let n;return"getBigInt64"in DataView.prototype?n=Number(e.getBigInt64(t.value,!0)):n=e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,n};function j(e,t){const n=e.getFloat32(t.value,!0);return t.value+=4,n}function Ut(e,t){return Ae.toHalfFloat(j(e,t))}function w(e){const t=(e&31744)>>10,n=e&1023;return(e>>15?-1:1)*(t?t===31?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):6103515625e-14*(n/1024))}function He(e,t){const n=e.getUint16(t.value,!0);return t.value+=2,n}function Mt(e,t){return w(He(e,t))}function xt(e,t,n,r){const l=n.value,c=[];for(;n.value<l+r-1;){const o=ze(t,n),u=he(e,n),i=Ie(e,n);n.value+=3;const s=he(e,n),a=he(e,n);c.push({name:o,pixelType:u,pLinear:i,xSampling:s,ySampling:a})}return n.value+=1,c}function Tt(e,t){const n=j(e,t),r=j(e,t),l=j(e,t),c=j(e,t),o=j(e,t),u=j(e,t),i=j(e,t),s=j(e,t);return{redX:n,redY:r,greenX:l,greenY:c,blueX:o,blueY:u,whiteX:i,whiteY:s}}function kt(e,t){const n=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],r=Ie(e,t);return n[r]}function Nt(e,t){const n=he(e,t),r=he(e,t),l=he(e,t),c=he(e,t);return{xMin:n,yMin:r,xMax:l,yMax:c}}function Ot(e,t){const n=["INCREASING_Y","DECREASING_Y","RANDOM_Y"],r=Ie(e,t);return n[r]}function Dt(e,t){const n=["ENVMAP_LATLONG","ENVMAP_CUBE"],r=Ie(e,t);return n[r]}function Ft(e,t){const n=["ONE_LEVEL","MIPMAP_LEVELS","RIPMAP_LEVELS"],r=["ROUND_DOWN","ROUND_UP"],l=pe(e,t),c=pe(e,t),o=Ie(e,t);return{xSize:l,ySize:c,levelMode:n[o&15],roundingMode:r[o>>4]}}function Lt(e,t){const n=j(e,t),r=j(e,t);return[n,r]}function Bt(e,t){const n=j(e,t),r=j(e,t),l=j(e,t);return[n,r,l]}function Ht(e,t,n,r,l){if(r==="string"||r==="stringvector"||r==="iccProfile")return Ct(t,n,l);
5if(r==="chlist")return xt(e,t,n,l);if(r==="chromaticities")return Tt(e,n);if(r==="compression")return kt(e,n);if(r==="box2i")return Nt(e,n);if(r==="envmap")return Dt(e,n);if(r==="tiledesc")return Ft(e,n);if(r==="lineOrder")return Ot(e,n);if(r==="float")return j(e,n);if(r==="v2f")return Lt(e,n);if(r==="v3f")return Bt(e,n);if(r==="int")return he(e,n);if(r==="rational")return Rt(e,n);if(r==="timecode")return At(e,n);if(r==="preview")return n.value+=l,"skipped";n.value+=l}function Zt(e,t){const n=Math.log2(e);return t=="ROUND_DOWN"?Math.floor(n):Math.ceil(n)}function Pt(e,t,n){let r=0;switch(e.levelMode){case"ONE_LEVEL":r=1;break;case"MIPMAP_LEVELS":r=Zt(Math.max(t,n),e.roundingMode)+1;break;case"RIPMAP_LEVELS":throw new Error("THREE.EXRLoader: RIPMAP_LEVELS tiles currently unsupported.")}return r}function it(e,t,n,r){const l=new Array(e);for(let c=0;c<e;c++){const o=1<<c;let u=t/o|0;r=="ROUND_UP"&&u*o<t&&(u+=1);const i=Math.max(u,1);l[c]=(i+n-1)/n|0}return l}function zt(){const e=this,t=e.offset,n={value:0};for(let r=0;r<e.tileCount;r++){const l=he(e.viewer,t),c=he(e.viewer,t);t.value+=8,e.size=pe(e.viewer,t);const o=l*e.blockWidth,u=c*e.blockHeight;e.columns=o+e.blockWidth>e.width?e.width-o:e.blockWidth,e.lines=u+e.blockHeight>e.height?e.height-u:e.blockHeight;const i=e.columns*e.totalBytes,a=e.size<e.lines*i?e.uncompress(e):Ve(e);t.value+=e.size;for(let p=0;p<e.lines;p++){const h=p*e.columns*e.totalBytes;for(let d=0;d<e.inputChannels.length;d++){const v=Me.channels[d].name,m=e.channelByteOffsets[v]*e.columns,E=e.decodeChannels[v];if(E===void 0)continue;n.value=h+m;const S=(e.height-(1+u+p))*e.outLineWidth;for(let T=0;T<e.columns;T++){const L=S+(T+o)*e.outputChannels+E;e.byteArray[L]=e.getter(a,n)}}}}}function Gt(){const e=this,t=e.offset,n={value:0};for(let r=0;r<e.height/e.blockHeight;r++){const l=he(e.viewer,t)-Me.dataWindow.yMin;e.size=pe(e.viewer,t),e.lines=l+e.blockHeight>e.height?e.height-l:e.blockHeight;const c=e.columns*e.totalBytes,u=e.size<e.lines*c?e.uncompress(e):Ve(e);t.value+=e.size;for(let i=0;i<e.blockHeight;i++){const s=r*e.blockHeight,a=i+e.scanOrder(s);if(a>=e.height)continue;const p=i*c,h=(e.height-1-a)*e.outLineWidth;for(let d=0;d<e.inputChannels.length;d++){const v=Me.channels[d].name,m=e.channelByteOffsets[v]*e.columns,E=e.decodeChannels[v];if(E!==void 0){n.value=p+m;for(let S=0;S<e.columns;S++){const T=h+S*e.outputChannels+E;e.byteArray[T]=e.getter(u,n)}}}}}}function Yt(e,t,n){const r={};if(e.getUint32(0,!0)!=20000630)throw new Error("THREE.EXRLoader: Provided file doesn't appear to be in OpenEXR format.");r.version=e.getUint8(4);const l=e.getUint8(5);r.spec={singleTile:!!(l&2),longName:!!(l&4),deepFormat:!!(l&8),multiPart:!!(l&16)},n.value=8;let c=!0;for(;c;){const o=ze(t,n);if(o==="")c=!1;else{const u=ze(t,n),i=pe(e,n),s=Ht(e,t,n,u,i);s===void 0?console.warn(`THREE.EXRLoader: Skipped unknown header attribute type '${u}'.`):r[o]=s}}if(l&-7)throw console.error("THREE.EXRHeader:",r),new Error("THREE.EXRLoader: Provided file is currently unsupported.");return r}function Wt(e,t,n,r,l,c){const o={size:0,viewer:t,array:n,offset:r,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,inputChannels:e.channels,channelByteOffsets:{},shouldExpand:!1,scanOrder:null,totalBytes:null,columns:null,lines:null,type:null,uncompress:null,getter:null,format:null,colorSpace:be};switch(e.compression){case"NO_COMPRESSION":o.blockHeight=1,o.uncompress=Ve;break;case"RLE_COMPRESSION":o.blockHeight=1,o.uncompress=St;break;case"ZIPS_COMPRESSION":o.blockHeight=1,o.uncompress=$e;break;case"ZIP_COMPRESSION":o.blockHeight=16,o.uncompress=$e;break;case"PIZ_COMPRESSION":o.blockHeight=32,o.uncompress=bt;break;case"PXR24_COMPRESSION":o.blockHeight=16,o.uncompress=It;break;case"DWAA_COMPRESSION":o.blockHeight=32,o.uncompress=lt;break;case"DWAB_COMPRESSION":o.blockHeight=256,o.uncompress=lt;break;default:throw new Error("EXRLoader.parse: "+e.compression+" is unsupported")}const u={};for(const h of e.channels)switch(h.name){case"Y":case"R":case"G":case"B":case"A":u[h.name]=!0,o.type=h.pixelType}let i=!1,s=!1;if(u.R&&u.G&&u.B)o.outputChannels=4;else if(u.Y)o.outputChannels=1;else throw new Error("EXRLoader.parse: file contains unsupported data channels.");switch(o.outputChannels){case 4:c==xe?(i=!u.A,o.format=xe,o.colorSpace
5=be,o.outputChannels=4,o.decodeChannels={R:0,G:1,B:2,A:3}):c==Pe?(o.format=Pe,o.colorSpace=be,o.outputChannels=2,o.decodeChannels={R:0,G:1}):c==We?(o.format=We,o.colorSpace=be,o.outputChannels=1,o.decodeChannels={R:0}):s=!0;break;case 1:c==xe?(i=!0,o.format=xe,o.colorSpace=be,o.outputChannels=4,o.shouldExpand=!0,o.decodeChannels={Y:0}):c==Pe?(o.format=Pe,o.colorSpace=be,o.outputChannels=2,o.shouldExpand=!0,o.decodeChannels={Y:0}):c==We?(o.format=We,o.colorSpace=be,o.outputChannels=1,o.decodeChannels={Y:0}):s=!0;break;default:s=!0}if(s)throw new Error("EXRLoader.parse: invalid output format for specified file.");if(o.type==1)switch(l){case Fe:o.getter=Mt;break;case Re:o.getter=He;break}else if(o.type==2)switch(l){case Fe:o.getter=j;break;case Re:o.getter=Ut}else throw new Error("EXRLoader.parse: unsupported pixelType "+o.type+" for "+e.compression+".");o.columns=o.width;const a=o.width*o.height*o.outputChannels;switch(l){case Fe:o.byteArray=new Float32Array(a),i&&o.byteArray.fill(1,0,a);break;case Re:o.byteArray=new Uint16Array(a),i&&o.byteArray.fill(15360,0,a);break;default:console.error("THREE.EXRLoader: unsupported type: ",l);break}let p=0;for(const h of e.channels)o.decodeChannels[h.name]!==void 0&&(o.channelByteOffsets[h.name]=p),p+=h.pixelType*2;if(o.totalBytes=p,o.outLineWidth=o.width*o.outputChannels,e.lineOrder==="INCREASING_Y"?o.scanOrder=h=>h:o.scanOrder=h=>o.height-1-h,e.spec.singleTile){o.blockHeight=e.tiles.ySize,o.blockWidth=e.tiles.xSize;const h=Pt(e.tiles,o.width,o.height),d=it(h,o.width,e.tiles.xSize,e.tiles.roundingMode),v=it(h,o.height,e.tiles.ySize,e.tiles.roundingMode);o.tileCount=d[0]*v[0];for(let m=0;m<h;m++)for(let E=0;E<v[m];E++)for(let S=0;S<d[m];S++)ae(t,r);o.decode=zt.bind(o)}else{o.blockWidth=o.width;const h=Math.ceil(o.height/o.blockHeight);for(let d=0;d<h;d++)ae(t,r);o.decode=Gt.bind(o)}return o}const at={value:0},ct=new DataView(N),Xt=new Uint8Array(N),Me=Yt(ct,N,at),Ce=Wt(Me,ct,Xt,at,this.type,this.outputFormat);if(Ce.decode(),Ce.shouldExpand){const e=Ce.byteArray;if(this.outputFormat==xe)for(let t=0;t<e.length;t+=4)e[t+2]=e[t+1]=e[t];else if(this.outputFormat==Pe)for(let t=0;t<e.length;t+=2)e[t+1]=e[t]}return{header:Me,width:Ce.width,height:Ce.height,data:Ce.byteArray,format:Ce.format,colorSpace:Ce.colorSpace,type:this.type}}setDataType(N){return this.type=N,this}setOutputFormat(N){return this.outputFormat=N,this}
5load(N,K,B,Y){function q(U,J){U.colorSpace=J.colorSpace,U.minFilter=Le,U.magFilter=Le,U.generateMipmaps=!1,U.flipY=!1,K&&K(U,J)}return super.load(N,q,B,Y)}}function dn(me,N,K=2048){const{width:B,height:Y,data:q}=me,U=Math.min(K,N.maxTextureSize),J=Math.min(K,N.maxTextureSize,N.maxCubemapSize);if(![B,Y,U,J].every(O=>Number.isInteger(O)&&O>0))throw new Error("Invalid environment texture dimensions or device limits");const Ue=Math.min(1,U/B,J/Y);if(Ue===1)return me;const re=Math.max(1,Math.floor(B*Ue)),we=Math.max(1,Math.floor(Y*Ue)),R=q.length/(B*Y);if(!Number.isInteger(R)||R<1||R>4)throw new Error("Invalid environment pixel data");const Z=q instanceof Uint16Array,fe=Z?new Uint16Array(re*we*R):new Float32Array(re*we*R),Ee=O=>Z?Ae.fromHalfFloat(q[O]):q[O];for(let O=0;O<we;O++){const ce=(O+.5)*Y/we-.5,$=Math.floor(ce),ge=Math.min(Y-1,$+1),le=ce-$;for(let te=0;te<re;te++){const Q=(te+.5)*B/re-.5,ue=Math.floor(Q),ne=Math.min(B-1,ue+1),_=Q-ue;for(let C=0;C<R;C++){const x=Ee(($*B+ue)*R+C)*(1-_)+Ee(($*B+ne)*R+C)*_,g=Ee((ge*B+ue)*R+C)*(1-_)+Ee((ge*B+ne)*R+C)*_,f=x*(1-le)+g*le;fe[(O*re+te)*R+C]=Z?Ae.toHalfFloat(f):f}}}return{...me,data:fe,width:re,height:we}}const wn={class:"environment-preview"},En={class:"environment-controls"},gn={class:"environment-resolution"},vn=["disabled"],yn={key:0,value:1024},_n=["value"],Sn={class:"environment-exposure"},bn=["disabled"],In={class:"environment-stage"},Cn=["aria-label"],Rn={key:0,class:"environment-status",role:"status"},An={key:1,class:"environment-fallback"},Un=["src","alt"],Mn={class:"environment-status",role:"status"},xn={key:2,class:"environment-hint"},Tn={class:"environment-view-controls",role:"group","aria-label":"Environment view"},kn=["disabled"],Nn=["disabled"],On=["disabled"],Dn=Vt({__name:"EnvironmentPreview",props:{url:{},format:{},name:{},fallbackUrl:{},assetId:{}},setup(me){const N=me,K=Oe(),B=Oe(!0),Y=Oe(!1),q=Oe(0),U=Oe(1024),J=Oe([]),Ue=$t(()=>J.value.find(g=>g.width===U.value));let re;async function we(){if(!N.assetId||!/^[A-Za-z0-9_-]+$/.test(N.assetId))return;re=new AbortController;const g=setTimeout(()=>re?.abort(),1e4);try{const f=await fetch(`https://api.polyhaven.com/files/${N.assetId}`,{signal:re.signal});if(!f.ok)return;const I=await f.json();if(le)return;J.value=Object.entries(I.hdri||{}).flatMap(([y,k])=>{const A=/^\d+k$/.test(y)?parseInt(y)*1024:0,oe=k?.hdr?.url?"hdr":"exr",de=k?.[oe]?.url;if(!A||A>8192||typeof de!="string")return[];try{if(new URL(de).protocol!=="https:")return[]}catch{return[]}return[{width:A,url:de,format:oe}]}).sort((y,k)=>y.width-k.width)}catch{}finally{clearTimeout(g)}}let R,Z,fe,Ee,O,ce,$,ge,le=!1,te=0;function Q(){!le&&R&&R.render(fe,Z)}function ue(){Z.position.set(0,0,.01),Z.fov=65,Z.updateProjectionMatrix(),q.value=0,O.target.set(0,0,0),O.update(),Q()}function ne(g){!Z||!O||(Z.fov=cn.clamp(Z.fov+g,30,100),Z.updateProjectionMatrix(),Q())}function _(g){g.preventDefault(),ne(Math.sign(g.deltaY)*4)}function C(g){if(!Z||!O||!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","+","=","-"].includes(g.key))return;if(g.preventDefault(),g.stopPropagation(),["+","=","-"].includes(g.key))return ne(g.key==="-"?5:-5);const f=new mt().setFromVector3(Z.position);g.key==="ArrowLeft"&&(f.theta+=.12),g.key==="ArrowRight"&&(f.theta-=.12),g.key==="ArrowUp"&&(f.phi-=.12),g.key==="ArrowDown"&&(f.phi+=.12),f.makeSafe(),Z.position.setFromSpherical(f),O.update(),Q()}async function x(){const g=++te;$?.abort(),$=new AbortController;const f=$,I=setTimeout(()=>f.abort(),3e4);B.value=!0,Y.value=!1;try{const y=Ue.value,k=y?.format||N.format,A=await fetch(y?.url||N.url,{signal:$.signal});if(!A.ok)throw new Error("Environment unavailable");const oe=await A.arrayBuffer();if(le||g!==te)return;const de=k==="exr"?new fn().parse(oe):new mn().parse(oe),se=dn(de,R.capabilities,U.value),F=new un(se.data,se.width,se.height,se.format??xe,se.type);F.colorSpace=be,F.mapping=hn,F.minFilter=Le,F.magFilter=Le,F.flipY=k!=="exr",F.needsUpdate=!0,ge?.dispose(),ge=F,fe.background=F,Q()}catch{!le&&g===te&&(Y.value=!0)}finally{clearTimeout(I),!le&&g===te&&(B.value=!1)}}return ut(U,()=>{R&&x()}),ut(q,g=>{R&&(R.toneMappingExposure=2**g,Q())}),Kt(()=>{try{fe=new ln,Z=new sn(65,1,.001,10),R=new rn({antialias:!0}),R.setPixelRatio(Math.min(window.devicePixelRatio,2)),R.toneMapping=an,K.value.appendChild(R.domElement),O=new pn(Z,R.domElement),O.enablePan=!1,O.enableZoom=!1,O.rotateSpeed=-.4,Ee=nn(R.domElement,{rotate:(g,f)=>{const I=Z.position.clone().sub(O.target),y=new mt().setFromVector3(I),k=2*Math.PI*O.rotateSpeed/Math.max(R.domElement.clientHeight,1);y.theta-=g*k,y.phi-=f*k,y.makeSafe(),Z.position.copy(O.target).add(I.setFromSpherical(y)),O.update(
5)},zoom:g=>{on(Z,g),Q()}}),O.addEventListener("change",Q),ue(),ce=new ResizeObserver(()=>{if(!K.value||!R)return;const{clientWidth:g,clientHeight:f}=K.value;!g||!f||(R.setSize(g,f),Z.aspect=g/f,Z.updateProjectionMatrix(),Q())}),ce.observe(K.value),x(),we()}catch{B.value=!1,Y.value=!0}}),qt(()=>{le=!0,$?.abort(),re?.abort(),ce?.disconnect(),Ee?.(),O?.dispose(),fe&&(fe.background=null),ge?.dispose(),R?.dispose(),R?.domElement.remove()}),(g,f)=>(_e(),Se("div",wn,[ee("div",En,[f[7]||(f[7]=ee("span",{class:"environment-title"},"360° environment",-1)),ee("label",gn,[f[4]||(f[4]=Ye("Resolution ",-1)),ht(ee("select",{"onUpdate:modelValue":f[0]||(f[0]=I=>U.value=I),"aria-label":"Environment resolution",disabled:!pt(R)||!J.value.length},[J.value.some(I=>I.width===1024)?De("",!0):(_e(),Se("option",yn,Ke(J.value.length?"Default":"Original"),1)),(_e(!0),Se(Qt,null,jt(J.value,I=>(_e(),Se("option",{key:I.width,value:I.width},Ke(I.width/1024)+"K",9,_n))),128))],8,vn),[[Jt,U.value,void 0,{number:!0}]])]),ee("label",Sn,[f[5]||(f[5]=Ye("Exposure ",-1)),ht(ee("input",{"onUpdate:modelValue":f[1]||(f[1]=I=>q.value=I),type:"range",min:"-3",max:"3",step:"0.1",disabled:B.value||Y.value,"aria-label":"Environment exposure"},null,8,bn),[[en,q.value,void 0,{number:!0}]]),f[6]||(f[6]=Ye()),ee("output",null,Ke(q.value.toFixed(1)),1)])]),ee("div",In,[ee("div",{ref_key:"host",ref:K,class:"environment-canvas",tabindex:"0","aria-label":`${me.name}: drag to look around, use arrow keys to turn and plus or minus to zoom`,onKeydown:C,onWheel:_},null,40,Cn),B.value?(_e(),Se("div",Rn,"Loading environment…")):De("",!0),Y.value?(_e(),Se("div",An,[me.fallbackUrl?(_e(),Se("img",{key:0,src:me.fallbackUrl,alt:me.name},null,8,Un)):De("",!0),ee("div",Mn,[f[8]||(f[8]=Ye("360° preview couldn’t load. ",-1)),pt(R)?(_e(),Se("button",{key:0,type:"button",onClick:x},"Retry")):De("",!0)])])):De("",!0),!B.value&&!Y.value?(_e(),Se("span",xn,[...f[9]||(f[9]=[ee("span",{class:"environment-hint-desktop"},"Drag to look around · Scroll or use + / − to zoom",-1),ee("span",{class:"environment-hint-touch"},"Drag to look around",-1)])])):De("",!0),ee("div",Tn,[ee("button",{type:"button",disabled:B.value||Y.value,"aria-label":"Zoom in",onClick:f[2]||(f[2]=I=>ne(-10))},"+",8,kn),ee("button",{type:"button",disabled:B.value||Y.value,"aria-label":"Zoom out",onClick:f[3]||(f[3]=I=>ne(10))},"−",8,Nn),ee("button",{type:"button",disabled:B.value||Y.value,onClick:ue},"Reset view",8,On)])])]))}}),zn=tn(Dn,[["__scopeId","data-v-d9d6f346"]]);export{zn 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.