1"use strict"; 2!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._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5ce52c72-22ba-5cb6-9f0f-8ea2127e78fa")}catch(e){}}(); 3(self.webpackChunkclient=self.webpackChunkclient||[]).push([["1672"],{95259(e,a,s){s.d(a,{Sticker:()=>w});var r=s(42062),i=s(6801),t=s(78675),n=s(66691),o=s(91994),c=s(15526),l=s(28138),u=s(15654),m=s(36580),d=s(50846),h=s(30495),v=s(79942),g=s(38020),p=s(64998);class b extends d.Q{constructor(e){super("dialogs.stickers.animations-resources-availability",e,e=>{var a=h.jI.shared().augment("X-Client"),s=h.jI.shared().augment("X-Client-Version"),r=h.jI.shared().augment("X-Client-Instance");return(0,g.ff)({protocol:"https",host:h.jI.shared().getBaseHost().replace("//","")},e,{method:"HEAD",headers:Object.assign({authorization:p.a.shared().getAAF(),"user-agent":h.jI.shared().augment("user-agent"),"x-facility":h.jI.shared().augment("x-facility")},a?{"X-Client":a}:void 0,s?{"X-Client-Version":s}:void 0,r?{"X-Client-Instance":r}:void 0)}).pipe((0,v.vV)(e=>({data:{available:200===e.status},ttl:Number.MAX_SAFE_INTEGER})))})}}b.shared=(0,c.G)(e=>new b(e));var f=s(10621);class I{constructor(e){this.availableCache={},this.userId=e}available(e){return this.availableCache[e]||(this.availableCache[e]=b.shared(this.userId).data(e).pipe((0,l.T)(e=>e.available),(0,u.F)(f.L),(0,m.t)({refCount:!0,bufferSize:1}))),this.availableCache[e].toSingle()}}I.shared=(0,c.G)(e=>new I(e));var j=s(39971),C=s(99027),S=s(60144),M=s(31085);let k=(0,r.memo)(e=>{var{imageSrc:a,animationSrc:s,className:r,onError:i}=e;return s?(0,M.jsxs)("video",{className:r,autoPlay:!0,playsInline:!0,loop:!0,muted:!0,poster:a,onError:i,children:[(0,M.jsx)("source",{src:s+".mp4",type:'video/mp4; codecs="hvc1"'}),(0,M.jsx)("source",{src:s+".webm",type:'video/webm; codecs="vp9"'}),(0,M.jsx)("img",{className:r,src:a})]}):(0,M.jsx)(S.$,{src:a,className:r,onError:i})});var x=s(13866),E=["userId","basename","imageSrc","animationSrc","messageId","messageTimestamp","stickerInMetaIsMissing"],T=(0,r.memo)(e=>{var{userId:a,basename:s,imageSrc:i,animationSrc:t,messageId:n,messageTimestamp:o,stickerInMetaIsMissing:c}=e,l=function(e,a){if(null==e)return{};var s={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(a.includes(r))continue;s[r]=e[r]}return s}(e,E),u=(0,r.useRef)(!1);(0,r.useEffect)(()=>{a&&c&&!u.current&&n&&(x.S.shared(a).logMessageStickerMetaMissing({basename:s,messageId:n,messageTimestamp:o}),u.current=!0)},[a,s,n,o,c]);var m=(0,r.useCallback)(e=>{var r=e.currentTarget;a&&n&&(r instanceof HTMLImageElement&&r.complete&&0===r.naturalWidth||r instanceof HTMLVideoElement&&r.error)&&x.S.shared(a).logMessageStickerLoadFailed({basename:s,src:t||i,messageId:n,messageTimestamp:o})},[a,s,i,t,n,o]);return(0,M.jsx)(k,Object.assign({},l,{imageSrc:i,animationSrc:t,onError:m}))}),w=(0,r.memo)(e=>{var{image:a,className:s,animation:c,basename:l,fallbackSrc:u,messageId:m,messageTimestamp:d}=e,h=(0,o.w)(),g=(0,n.GG)(()=>{if(!h||u)return j.v.just(void 0);if(a||c)return j.v.just({image:a,animation:c});var e=(0,C.bO)(l),s=(0,C.ZC)(l);return I.shared(h).available(s+".mp4").pipe((0,v.vV)(a=>a?{image:e,animation:s}:{image:e,animation:void 0}))},[h,l,a,c,u]),p=(0,r.useMemo)(()=>u||(0,i.o)((null==g?void 0:g.image)||(0,C.bO)(l),t.T.shared().sharding),[g,l,u]),b=(0,r.useMemo)(()=>null!=g&&g.animation?(0,i.o)(g.animation,t.T.shared().sharding):void 0,[g]),f=!a&&!c;return(0,M.jsx)(T,{imageSrc:p,animationSrc:b,className:s,userId:h,basename:l,stickerInMetaIsMissing:f,messageId:m,messageTimestamp:d})})}}]); 4//# sourceMappingURL=sourcemaps/e43250cdd1603024.js.map 5//# debugId=5ce52c72-22ba-5cb6-9f0f-8ea2127e78fa
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.