PageSourceSearch

https://cdn.forbes.ru/_nuxt/CbDlNXSx.js

js forbes.ru collected 2026-10-01 06:18:27 UTC 6,520 bytes, 1 lines download raw bytes

1import{_ as G}from"./Lmb05Apy.js";import{cq as Y,aV as J,aW as X,aY as K,aX as Q,br as P,by as E,b6 as Z,bu as ee,bw as h,c7 as O,bs as te,bt as V,b2 as ae,bM as re,bP as se,bA as le,bx as L,bv as oe,cr as ie,a$ as B,b9 as R,cs as ne,b1 as ue,bC as ce}from"./EBpBARSw.js";import{E as A}from"./DiN8x0mA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0451e928-972c-47d7-a70b-2da08a6c2b1b",e._sentryDebugIdIdentifier="sentry-dbid-0451e928-972c-47d7-a70b-2da08a6c2b1b")}catch{}})();const he=Y("imageHashStore",{state:()=>({images:{}})});var de=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],x=e=>{let t=0;for(let s=0;s<e.length;s++){let u=e[s],d=de.indexOf(u);t=t*83+d}return t},N=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},_=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(t*12.92*255+.5):Math.trunc((1.055*Math.pow(t,.4166666666666667)-.055)*255+.5)},fe=e=>e<0?-1:1,j=(e,t)=>fe(e)*Math.pow(Math.abs(e),t),H=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},T=e=>{if(!e||e.length<6)throw new H("The blurhash string must be at least 6 characters");let t=x(e[0]),s=Math.floor(t/9)+1,u=t%9+1;if(e.length!==4+2*u*s)throw new H(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*u*s}`)},ge=e=>{try{T(e)}catch(t){return{result:!1,errorReason:t.message}}return{result:!0}},me=e=>{let t=e>>16,s=e>>8&255,u=e&255;return[N(t),N(s),N(u)]},ve=(e,t)=>{let s=Math.floor(e/361),u=Math.floor(e/19)%19,d=e%19;return[j((s-9)/9,2)*t,j((u-9)/9,2)*t,j((d-9)/9,2)*t]},be=(e,t,s,u)=>{T(e),u=u|1;let d=x(e[0]),v=Math.floor(d/9)+1,o=d%9+1,g=(x(e[1])+1)/166,i=new Array(o*v);for(let a=0;a<i.length;a++)if(a===0){let c=x(e.substring(2,6));i[a]=me(c)}else{let c=x(e.substring(4+a*2,6+a*2));i[a]=ve(c,g*u)}let l=t*4,f=new Uint8ClampedArray(l*s);for(let a=0;a<s;a++)for(let c=0;c<t;c++){let $=0,y=0,w=0;for(let b=0;b<v;b++)for(let p=0;p<o;p++){let M=Math.cos(Math.PI*c*p/t)*Math.cos(Math.PI*a*b/s),I=i[p+b*o];$+=I[0]*M,y+=I[1]*M,w+=I[2]*M}let m=_($),k=_(y),C=_(w);f[4*c+0+a*l]=m,f[4*c+1+a*l]=k,f[4*c+2+a*l]=C,f[4*c+3+a*l]=255}return f},pe=be;const ye=["alt","height","itemprop","src","srcset","width"],we=["src"],Me=J({__name:"BaseImage",props:{alt:{default:"",type:String},blurFull:{type:Boolean},customRatio:{default:0,type:Number},image:{default:()=>({}),type:Object},isBlurhashEnabled:{default:!0,type:Boolean},isLazy:{default:!0,type:Boolean},preload:{default:()=>({}),type:Object},schema:{default:()=>({}),type:Object},shouldCrop:{default:!0,type:Boolean},cropMethod:{default:"cover",type:String},shouldUseWebp:{default:!0,type:Boolean},height:{default:void 0,type:Number},width:{default:void 0,type:Number},fetchPriority:{default:"auto",type:String},isVertical:{default:!1,type:Boolean}},setup(e){const t=e;let s;const{$imageFormatSupport:u}=X(),d=he(),v=ie(),o=B({blurhash:A,image:A,preloadImages:{1:"",2:"",3:""},srcset:""}),g=B(),i=B(),l=B(),f=B(!1),a=R(()=>{if(t.customRatio)return t.customRatio;const{width:r=1,height:n=1}=(t.image||{}).metadata||{};return n/r||1}),c=R(()=>{const{blurhash:r}=t.image;return typeof r=="string"&&r.length>5&&ge(r)}),$=R(()=>i.value===l.value),{height:y,width:w}=t.preload,m=!!(y&&w);m&&U();function k(){if(!m&&t.isBlurhashEnabled&&c.value){if(d.images[t.image.uri]){o.value.blurhash=d.images[t.image.uri];return}if(s||(s=document.createElement("canvas")),t.blurFull&&(i.value=g.value?.offsetHeight||0,l.value=g.value?.offsetWidth||0),!i.value||!l.value)return;s.height=i.value,s.width=l.value;const r=s.getContext("2d"),n=r.createImageData(l.value,i.value);n.data.set(pe(t.image.blurhash,l.value,i.value)),r.putImageData(n,0,0),s.toBlob(S=>{o.value.blurhash=d.images[t.image.uri]=URL.createObjectURL(S)},"image/jpeg")}}function C(){let r=t.image?.uri||"";if(t.shouldCrop){const n=t.cropMethod==="cover"?"/c":"";r=r.replace(/\/(files|forbes-static)\//gi,`/$1${n}/${l.value}x${i.value}/`)}if(t.shouldUseWebp&&u.webp&&(r=r.replace(/.(jpg|jpeg|png)$/,".webp")),o.value.image=r,m){for(const n of Object.keys(o.value.preloadImages))o.value.preloadImages[n]=r.replace(/\/(\d+)x(\d+)\//gi,(S,W,z)=>{const F=Number(W)*Number(n),q=Number(z)*Number(n);return`/${F}x${q}/`}),o.value.preloadImages[n]+=` ${n}x`;o.value.srcset=Object.values(o.value.preloadImages).join(","),ne({link:[{as:"image",href:o.value.image,imagesrcset:o.value.srcset,rel:"preload",fetchpriority:`${t.fetchPriority}`}]})}}function b(){f.value=!0}function p(){m||(i.value=Math.round(i.value),l.value=Math.round(l.value))}function M(){if(m)return;const r=navigator.connection?.saveData??!1;window.devicePixelRatio&&!r&&(i.value*=window.devicePixelRatio,l.value*=window.devicePixelRatio)}
1function I(){$.value&&(a.value<1?l.value=l.value/a.value:a.value>1&&(i.value=i.value/a.value))}function U(){i.value=y,l.value=w,C()}function D(){if(g.value){if(!m){const{offsetHeight:r,offsetWidth:n}=g.value;i.value=r,l.value=n}k(),I(),M(),p(),ue(()=>t.shouldCrop,()=>{f.value=!1,C()},{immediate:!0})}}return K(()=>{v.unobserve()}),Q(()=>{if(!(!t.image||!g.value)){if(m||!t.isLazy)return D();v.observe(g.value),v.onIntersect(()=>{v.unobserve(),D()})}}),(r,n)=>{const S=G;return P(),E("div",{ref_key:"rootEl",ref:g,class:oe({[r.$style.root]:!0,[r.$style.withBg]:e.isVertical}),style:O({...e.isVertical&&{"--background-image":`url(${h(o).image||""})`},"--aspect-ratio":`${h(a)>=10?h(a):h(a)*100}%`})},[e.image?(P(),E(Z,{key:0},[ee("img",{alt:typeof e.alt=="string"?e.alt:"",height:h(i),itemprop:e.schema.itemprop?e.schema.itemprop:null,src:h(o).image,srcset:h(o).srcset?h(o).srcset:null,style:O({opacity:e.fetchPriority==="high"||h(f)?1:0}),width:h(l),onLoad:b},null,44,ye),e.isLazy?(P(),te(S,{key:0},{default:V(()=>[ae(le,{name:"fade"},{default:V(()=>[re((P(),E("img",{key:h(o).blurhash+r.$viewport.breakpoint,alt:"Stub","aria-hidden":"true",src:h(o).blurhash},null,8,we)),[[se,!(e.fetchPriority==="high"||h(f))]])]),_:1})]),_:1})):L("",!0)],64)):L("",!0)],6)}}}),Ie="t6OMV",Be="ghT8n",xe="-fJax",$e={root:Ie,withBg:Be,fade:xe},Ce={$style:$e},Ee=ce(Me,[["__cssModules",Ce]]);export{Ee 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.