"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-1acb1c"],{46263:(e,t,n)=>{function i(e,t=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let r,a=0,o=!1;function l(...c){if(o)return;let u=Date.now()-a;a=Date.now(),n?(n=!1,e.apply(this,c),s&&l.cancel()):(i&&u{a=Date.now(),e.apply(this,c),s&&l.cancel()},i?t-u:t))}return l.cancel=()=>{clearTimeout(r),o=!0},l}function s(e,t=0,{start:n=!1,middle:s=!1,once:r=!1}={}){return i(e,t,{start:n,middle:s,once:r})}n.d(t,{D:()=>s,P:()=>i})},28382:(e,t,n)=>{n.d(t,{Q:()=>s});var i="";function s(e){return e.split("\n").reduce(function(e,t){var n,s,d,p=function(e){var t=r.exec(e);if(!t)return null;var n=t[2]&&0===t[2].indexOf("native"),s=t[2]&&0===t[2].indexOf("eval"),o=a.exec(t[2]);return s&&null!=o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]),{file:n?null:t[2],methodName:t[1]||i,arguments:n?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||((n=o.exec(t))?{file:n[2],methodName:n[1]||i,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}:null)||function(e){var t=l.exec(e);if(!t)return null;var n=t[3]&&t[3].indexOf(" > eval")>-1,s=c.exec(t[3]);return n&&null!=s&&(t[3]=s[1],t[4]=s[2],t[5]=null),{file:t[3],methodName:t[1]||i,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||((s=h.exec(t))?{file:s[2],methodName:s[1]||i,arguments:[],lineNumber:+s[3],column:s[4]?+s[4]:null}:null)||((d=u.exec(t))?{file:d[3],methodName:d[1]||i,arguments:[],lineNumber:+d[4],column:d[5]?+d[5]:null}:null);return p&&e.push(p),e},[])}var r=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/\((\S*)(?::(\d+))(?::(\d+))\)/,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i,h=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i},27907:(e,t,n)=>{n.d(t,{a:()=>AliveSession});var i,s=n(81855),r=n(60835),a=n(16544),o=n(75658),l=n(80955),c=n(29871);!function(e){e.Deploy="Alive Redeploy",e.Reconnect="Alive Reconnect"}(i||(i={}));let AliveSession=class AliveSession{constructor(e,t,n,i,a=6e5){this.url=e,this.getUrl=t,this.inSharedWorker=n,this.notify=i,this.maxReconnectBackoff=a,this.subscriptions=new o.v,this.state="online",this.retrying=null,this.connectionCount=0,this.presence=new s.k2,this.presenceMetadata=new r.a,this.intentionallyDisconnected=!1,this.lastCameOnline=0,this.userId=function(e){let t=e.match(/\/u\/(\d+)\/ws/);return t?+t[1]:0}(e),this.presenceId=`${Math.round(2147483647*Math.random())}_${Math.round(Date.now()/1e3)}`,this.presenceKey=(0,s.Hw)(this.userId,this.presenceId),this.socket=this.connect()}subscribe(e){let t=this.subscriptions.add(...e);for(let n of(this.sendSubscribe(t),e)){let e=n.topic.name;(0,s.A)(e)&&this.notifyCachedPresence(n.subscriber,e)}}unsubscribe(e){let t=this.subscriptions.delete(...e);this.sendUnsubscribe(t)}unsubscribeAll(...e){let t=this.subscriptions.drain(...e);this.sendUnsubscribe(t);let n=this.presenceMetadata.removeSubscribers(e);this.sendPresenceMetadataUpdate(n)}requestPresence(e,t){for(let n of t)this.notifyCachedPresence(e,n)}notifyCachedPresence(e,t){let n=this.presence.getChannelItems(t);0!==n.length&&this.notifyPresenceChannel(t,n)}updatePresenceMetadata(e){let t=new Set;for(let n of e)this.presenceMetadata.setMetadata(n),t.add(n.channelName);this.sendPresenceMetadataUpdate(t)}sendPresenceMetadataUpdate(e){if(!e.size)return;let t=[];for(let n of e){let e=this.subscriptions.topic(n);e&&t.push(e)}this.sendSubscribe(t)}online(){var e;this.lastCameOnline=Date.now(),this.state="online",null===(e=this.retrying)||void 0===e||e.abort(),this.socket.open()}offline(){var e;this.state="offline",null===(e=this.retrying)||void 0===e||e.abort(),this.socket.close()}shutdown(){this.inSharedWorker&&self.close()}get reconnectWindow(){let e=Date.now()-this.lastCameOnline<6e4;return 0===this.connectionCount||this.intentionallyDisconnected||e?0:1e4}socketDidOpen(){this.intentionallyDisconnected=!1,this.connectionCount++,this.socket.url=this.getUrlWithPresenceId(),this.sendSubscribe(this.subscriptions.topics())}socketDidClose(e,t,n){(void 0!==this.redeployEarlyReconnectTimeout&&clearTimeout(this.redeployEarlyReconnectTimeout),"Alive Reconnect"===n)?this.intentionallyDisconnected=!0:"Alive Redeploy"===n&&(this.intentionallyDisconnected=!0,this.redeployEarlyReconnectTimeout=setTimeout(()=>{this.intentionallyDisconnected=!0,this.socket.close(1e3,"Alive Redeploy Early Client Reconnect")},6e4*(3+22*Math.random())))}socketDidFinish(){"offline"!==this.state&&this.reconnect()}socketDidReceiveMessage(e,t){let n=JSON.parse(t);switch(n.e){case"ack":this.handleAck(n);break;case"msg":this.handleMessage(n)}}handleAck(e){for(let t of this.subscriptions.topics())t.offset=e.off}handleMessage(e){let t=e.ch,n=this.subscriptions.topic(t);if(n){if(n.offset=e.off,"e"in e.data){let n=this.presence.handleMessage(t,e.data);this.notifyPresenceChannel(t,n);return}e.data.wait||(e.data.wait=0),this.notify(this.subscriptions.subscribers(t),{channel:t,type:"message",data:e.data})}}notifyPresenceChannel(e,t){var n,i;let s=new Map;for(let e of t){let{userId:t,metadata:n,presenceKey:i}=e,a=s.get(t)||{userId:t,isOwnUser:t===this.userId,metadata:[]};if(i!==this.presenceKey){for(let e of n){if(r.Z in e){!1!==a.isIdle&&(a.isIdle=!!e[r.Z]);continue}a.metadata.push(e)}s.set(t,a)}}for(let t of this.subscriptions.subscribers(e)){let r=this.userId,a=Array.from(s.values()).filter(e=>e.userId!==r),o=null!==(i=null===(n=s.get(this.userId))||void 0===n?void 0:n.metadata)&&void 0!==i?i:[],l=this.presenceMetadata.getChannelMetadata(e,{subscriber:t,markAllAsLocal:!this.inSharedWorker});this.notify([t],{channel:e,type:"presence",data:[{userId:r,isOwnUser:!0,metadata:[...o,...l]},...a]})}}async reconnect(){if(!this.retrying)try{this.retrying=new AbortController;let e=await (0,c.X)(this.getUrl,1/0,this.maxReconnectBackoff,this.retrying.signal);e?(this.url=e,this.socket=this.connect()):this.shutdown()}catch(e){if("AbortError"!==e.name)throw e}finally{this.retrying=null}}getUrlWithPresenceId(){let e=new URL(this.url,self.location.origin);return e.searchParams.set("shared",this.inSharedWorker.toString()),e.searchParams.set("p",`${this.presenceId}.${this.connectionCount}`),e.toString()}connect(){let e=new a.Oo(this.getUrlWithPresenceId(),this,{timeout:4e3,attempts:7});return e.open(),e}sendSubscribe(e){let t=Array.from(e);for(let e of(0,l.o)(t,25)){let t={};for(let n of e)(0,s.A)(n.name)?t[n.signed]=JSON.stringify(this.presenceMetadata.getChannelMetadata(n.name)):t[n.signed]=n.offset;this.socket.send(JSON.stringify({subscribe:t}))}}sendUnsubscribe(e){let t=Array.from(e,e=>e.signed);for(let e of(0,l.o)(t,25))this.socket.send(JSON.stringify({unsubscribe:e}));for(let t of e)(0,s.A)(t.name)&&this.presence.clearChannel(t.name)}}},29871:(e,t,n)=>{function i(e){return new Promise((t,n)=>{let i=Error("aborted");i.name="AbortError",e.aborted?n(i):e.addEventListener("abort",()=>n(i))})}async function s(e,t){let n;let s=new Promise(t=>{n=self.setTimeout(t,e)});if(!t)return s;try{await Promise.race([s,i(t)])}catch(e){throw self.clearTimeout(n),e}}async function r(e,t,n=1/0,r){let a=r?i(r):null;for(let i=0;ir})},21461:(e,t,n)=>{n.d(t,{A:()=>r.A,ZE:()=>s.Z,Zf:()=>o.Z,a2:()=>i.a,ah:()=>s.a,vk:()=>a.v});var i=n(27907),s=n(60835),r=n(81855),a=n(75658),o=n(72993)},80955:(e,t,n)=>{n.d(t,{o:()=>i});function*i(e,t){for(let n=0;n{n.d(t,{Z:()=>i,a:()=>PresenceMetadataSet});let i="_i";function s(e){return Object.assign(Object.assign({},e),{isLocal:!0})}let PresenceMetadataForChannel=class PresenceMetadataForChannel{constructor(){this.subscriberMetadata=new Map}setMetadata(e,t){this.subscriberMetadata.set(e,t)}removeSubscribers(e){let t=!1;for(let n of e)t=this.subscriberMetadata.delete(n)||t;return t}getMetadata(e){if(!e){let e;let t=[];for(let n of this.subscriberMetadata.values())for(let s of n)if(i in s){let t=!!s[i];e=void 0===e?t:t&&e}else t.push(s);return void 0!==e&&t.push({[i]:e?1:0}),t}let t=[],{subscriber:n,markAllAsLocal:r}=e;for(let[e,i]of this.subscriberMetadata){let a=r||e===n,o=a?i.map(s):i;t.push(...o)}return t}hasSubscribers(){return this.subscriberMetadata.size>0}};let PresenceMetadataSet=class PresenceMetadataSet{constructor(){this.metadataByChannel=new Map}setMetadata({subscriber:e,channelName:t,metadata:n}){let i=this.metadataByChannel.get(t);i||(i=new PresenceMetadataForChannel,this.metadataByChannel.set(t,i)),i.setMetadata(e,n)}removeSubscribers(e){let t=new Set;for(let[n,i]of this.metadataByChannel){let s=i.removeSubscribers(e);s&&t.add(n),i.hasSubscribers()||this.metadataByChannel.delete(n)}return t}getChannelMetadata(e,t){let n=this.metadataByChannel.get(e);return(null==n?void 0:n.getMetadata(t))||[]}}},81855:(e,t,n)=>{function i(e,t){return`${e}:${t}`}function s(e){let[t,n]=e.p.split(".");return{userId:e.u,presenceKey:i(e.u,t),connectionCount:Number(n),metadata:e.m||[]}}function r(e){return e.startsWith("presence-")}n.d(t,{A:()=>r,Hw:()=>i,k2:()=>AlivePresence});let PresenceChannel=class PresenceChannel{constructor(){this.presenceItems=new Map}shouldUsePresenceItem(e){let t=this.presenceItems.get(e.presenceKey);return!t||t.connectionCount<=e.connectionCount}addPresenceItem(e){this.shouldUsePresenceItem(e)&&this.presenceItems.set(e.presenceKey,e)}removePresenceItem(e){this.shouldUsePresenceItem(e)&&this.presenceItems.delete(e.presenceKey)}replacePresenceItems(e){for(let t of(this.presenceItems.clear(),e))this.addPresenceItem(t)}getPresenceItems(){return Array.from(this.presenceItems.values())}};let AlivePresence=class AlivePresence{constructor(){this.presenceChannels=new Map}getPresenceChannel(e){let t=this.presenceChannels.get(e)||new PresenceChannel;return this.presenceChannels.set(e,t),t}handleMessage(e,t){let n=this.getPresenceChannel(e);switch(t.e){case"pf":n.replacePresenceItems(t.d.map(s));break;case"pa":n.addPresenceItem(s(t.d));break;case"pr":n.removePresenceItem(s(t.d))}return this.getChannelItems(e)}getChannelItems(e){let t=this.getPresenceChannel(e);return t.getPresenceItems()}clearChannel(e){this.presenceChannels.delete(e)}}},75658:(e,t,n)=>{n.d(t,{v:()=>SubscriptionSet});var i=n(61268);let SubscriptionSet=class SubscriptionSet{constructor(){this.subscriptions=new i.Z,this.signatures=new Map}add(...e){let t=[];for(let{subscriber:n,topic:i}of e)this.subscriptions.has(i.name)||(t.push(i),this.signatures.set(i.name,i)),this.subscriptions.set(i.name,n);return t}delete(...e){let t=[];for(let{subscriber:n,topic:i}of e){let e=this.subscriptions.delete(i.name,n);e&&!this.subscriptions.has(i.name)&&(t.push(i),this.signatures.delete(i.name))}return t}drain(...e){let t=[];for(let n of e)for(let e of this.subscriptions.drain(n)){let n=this.signatures.get(e);this.signatures.delete(e),t.push(n)}return t}topics(){return this.signatures.values()}topic(e){return this.signatures.get(e)||null}subscribers(e){return this.subscriptions.get(e).values()}}},72993:(e,t,n)=>{n.d(t,{Z:()=>Topic});let Topic=class Topic{constructor(e,t){this.name=e,this.signed=t,this.offset=""}static parse(e){let[t,n]=e.split("--");if(!t||!n)return null;let i=JSON.parse(atob(t));return i.c&&i.t?new Topic(i.c,e):null}}},21630:(e,t,n)=>{n.d(t,{nn:()=>U,Gb:()=>N});var i={};n.r(i),n.d(i,{abortSignalTimeout:()=>l,apply:()=>h,isPolyfilled:()=>u,isSupported:()=>c});var s={};n.r(s),n.d(s,{ClipboardItem:()=>clipboarditem_ClipboardItem,apply:()=>b,isPolyfilled:()=>m,isSupported:()=>f});var r={};n.r(r),n.d(r,{apply:()=>v,checkVisibility:()=>y,isPolyfilled:()=>w,isSupported:()=>g});var a={};n.r(a),n.d(a,{apply:()=>P,clipboardRead:()=>C,clipboardWrite:()=>k,isPolyfilled:()=>M,isSupported:()=>S});var o={};function l(e){let t=new AbortController;return setTimeout(()=>t.abort(new DOMException("TimeoutError")),e),t.signal}function c(){return"abort"in AbortSignal&&"function"==typeof AbortSignal.timeout}function u(){return AbortSignal.timeout===l}function h(){c()||(AbortSignal.timeout=l)}n.r(o),n.d(o,{apply:()=>O,cancelIdleCallback:()=>T,isPolyfilled:()=>E,isSupported:()=>A,requestIdleCallback:()=>I});let d=new WeakMap,p=new WeakMap;let clipboarditem_ClipboardItem=class clipboarditem_ClipboardItem{constructor(e,t={}){if(0===Object.keys(e).length)throw TypeError("Empty dictionary argument");d.set(this,e),p.set(this,t.presentationStyle||"unspecified")}get presentationStyle(){return p.get(this)||"unspecified"}get types(){return Object.freeze(Object.keys(d.get(this)||{}))}async getType(e){let t=d.get(this);if(t&&e in t){let n=await t[e];return"string"==typeof n?new Blob([n],{type:e}):n}throw new DOMException("Failed to execute 'getType' on 'ClipboardItem': The type was not found","NotFoundError")}};function f(){try{return new globalThis.ClipboardItem({"text/plain":Promise.resolve("")}),!0}catch{return!1}}function m(){return globalThis.ClipboardItem===clipboarditem_ClipboardItem}function b(){f()||(globalThis.ClipboardItem=clipboarditem_ClipboardItem)}function y({checkOpacity:e=!1,checkVisibilityCSS:t=!1}={}){if(!this.isConnected)return!1;let n=getComputedStyle(this);if("contents"===n.getPropertyValue("display")||t&&"visible"!==n.getPropertyValue("visibility"))return!1;let i=this;for(;i;){let t=i===this?n:getComputedStyle(i);if("none"===t.getPropertyValue("display")||e&&"0"===t.getPropertyValue("opacity")||i!==this&&"hidden"===t.getPropertyValue("content-visibility"))return!1;i=!i.parentElement&&i.getRootNode() instanceof ShadowRoot?i.getRootNode().host:i.parentElement}return!0}function g(){return"checkVisibility"in Element.prototype&&"function"==typeof Element.prototype.checkVisibility}function w(){return Element.prototype.checkVisibility===y}function v(){g()||(Element.prototype.checkVisibility=y)}async function k(e){if(0===e.length)return;let t=e[0],n=await t.getType(t.types.includes("text/plain")?"text/plain":t.types[0]);return navigator.clipboard.writeText("string"==typeof n?n:await n.text())}async function C(){let e=navigator.clipboard.readText();return[new ClipboardItem({"text/plain":e})]}function S(){return"clipboard"in navigator&&"function"==typeof navigator.clipboard.read&&"function"==typeof navigator.clipboard.write}function M(){return"clipboard"in navigator&&(navigator.clipboard.write===k||navigator.clipboard.read===C)}function P(){"clipboard"in navigator&&!S()&&(navigator.clipboard.write=k,navigator.clipboard.read=C)}function I(e,t={}){let n=Date.now(),i=t.timeout||0,s=Object.defineProperty({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))},"didTimeout",{get:()=>Date.now()-n>i});return window.setTimeout(()=>{e(s)})}function T(e){clearTimeout(e)}function A(){return"function"==typeof globalThis.requestIdleCallback}function E(){return globalThis.requestIdleCallback===I&&globalThis.cancelIdleCallback===T}function O(){A()||(globalThis.requestIdleCallback=I,globalThis.cancelIdleCallback=T)}let D=!1;try{D=!1===document.body.matches(":modal")}catch{D=!1}let x="object"==typeof globalThis&&"fromEntries"in Object&&"flatMap"in Array.prototype&&"trimEnd"in String.prototype&&"allSettled"in Promise&&"matchAll"in String.prototype&&"replaceAll"in String.prototype&&"any"in Promise&&"at"in String.prototype&&"at"in Array.prototype&&"hasOwn"in Object&&"abort"in AbortSignal&&"function"==typeof queueMicrotask&&"function"==typeof HTMLDialogElement&&D&&"function"==typeof AggregateError&&"function"==typeof BroadcastChannel&&"randomUUID"in crypto&&"replaceChildren"in Element.prototype&&"requestSubmit"in HTMLFormElement.prototype&&!0,R={abortSignalTimeout:i,clipboardItem:s,elementCheckVisibility:r,navigatorClipboard:a,requestIdleCallback:o};function N(){return x&&Object.values(R).every(e=>e.isSupported())}function U(){for(let e of Object.values(R))e.apply()}},61268:(e,t,n)=>{n.d(t,{Z:()=>MultiMap});let MultiMap=class MultiMap{constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.set(t,n)}get(e){let t=this.map.get(e);return t||new Set}set(e,t){let n=this.map.get(e);return n||(n=new Set,this.map.set(e,n)),n.add(t),this}has(e){return this.map.has(e)}delete(e,t){let n=this.map.get(e);if(!n)return!1;if(!t)return this.map.delete(e);let i=n.delete(t);return n.size||this.map.delete(e),i}drain(e){let t=[];for(let n of this.keys())this.delete(n,e)&&!this.has(n)&&t.push(n);return t}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}[Symbol.iterator](){return this.entries()}clear(){this.map.clear()}get size(){return this.map.size}}},16544:(e,t,n)=>{async function i(e,t){let n;let i=new Promise((t,i)=>{n=self.setTimeout(()=>i(Error("timeout")),e)});if(!t)return i;try{await Promise.race([i,a(t)])}catch(e){throw self.clearTimeout(n),e}}async function s(e,t){let n;let i=new Promise(t=>{n=self.setTimeout(t,e)});if(!t)return i;try{await Promise.race([i,a(t)])}catch(e){throw self.clearTimeout(n),e}}async function r(e,t,n=1/0,i){let r=i?a(i):null;for(let a=0;a{let i=Error("aborted");i.name="AbortError",e.aborted?n(i):e.addEventListener("abort",()=>n(i))})}async function o(e,t,n){let s=new WebSocket(e),r=new Promise((e,t)=>{s.readyState===WebSocket.OPEN?e(s):(s.onerror=()=>{s.onerror=null,s.onopen=null,t(Error("connect failed"))},s.onopen=()=>{s.onerror=null,s.onopen=null,e(s)})});try{return await Promise.race([r,i(t,n)]),s}catch(e){throw l(r),e}}async function l(e){try{let t=await e;t.close()}catch(e){}}n.d(t,{Oo:()=>StableSocket});let StableSocket=class StableSocket{constructor(e,t,n){this.socket=null,this.opening=null,this.url=e,this.delegate=t,this.policy=n}async open(){if(this.opening||this.socket)return;this.opening=new AbortController;let e=Object.assign(Object.assign({},this.policy),{signal:this.opening.signal});try{var t;this.socket=await (t=this.url,r(()=>o(t,e.timeout,e.signal),e.attempts,e.maxDelay,e.signal))}catch(e){this.delegate.socketDidFinish(this);return}finally{this.opening=null}this.socket.onclose=e=>{var t;this.socket=null,this.delegate.socketDidClose(this,e.code,e.reason);let n=this.delegate.socketShouldRetry?!this.delegate.socketShouldRetry(this,e.code):(t=e.code)===c||t===u;n?this.delegate.socketDidFinish(this):setTimeout(()=>this.open(),Math.random()*(100+(this.delegate.reconnectWindow||50)-100)+100)},this.socket.onmessage=e=>{this.delegate.socketDidReceiveMessage(this,e.data)},this.delegate.socketDidOpen(this)}close(e,t){this.opening?(this.opening.abort(),this.opening=null):this.socket&&(this.socket.onclose=null,this.socket.close(e,t),this.socket=null,this.delegate.socketDidClose(this,e,t),this.delegate.socketDidFinish(this))}send(e){this.socket&&this.socket.send(e)}isOpen(){return!!this.socket}};let c=1008,u=1011}}]); //# sourceMappingURL=vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-1acb1c-55316df60ccb.js.map