PageSourceSearch

https://quietplace.xyz/sw.js

js quietplace.xyz collected 2026-09-29 09:54:33 UTC 30,281 bytes, 25 lines download raw bytes

1var ae=Object.create;var A=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var le=Object.getOwnPropertyNames;var ue=Object.getPrototypeOf,de=Object.prototype.hasOwnProperty;var he=(e,t)=>()=>(e&&(t=e(e=0)),t);var fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B=(e,t)=>{for(var n in t)A(e,n,{get:t[n],enumerable:!0})},pe=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of le(t))!de.call(e,o)&&o!==n&&A(e,o,{get:()=>t[o],enumerable:!(i=ce(t,o))||i.enumerable});return e};var me=(e,t,n)=>(n=e!=null?ae(ue(e)):{},pe(t||!e||!e.__esModule?A(n,"default",{value:e,enumerable:!0}):n,e));var c=he(()=>{});var H=fe((Ke,U)=>{"use strict";c();var ge=Object.prototype.hasOwnProperty,y="~";function k(){}Object.create&&(k.prototype=Object.create(null),new k().__proto__||(y=!1));function be(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function Q(e,t,n,i,o){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new be(n,i||e,o),r=y?y+t:t;return e._events[r]?e._events[r].fn?e._events[r]=[e._events[r],s]:e._events[r].push(s):(e._events[r]=s,e._eventsCount++),e}function E(e,t){--e._eventsCount===0?e._events=new k:delete e._events[t]}function m(){this._events=new k,this._eventsCount=0}m.prototype.eventNames=function(){var t=[],n,i;if(this._eventsCount===0)return t;for(i in n=this._events)ge.call(n,i)&&t.push(y?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};m.prototype.listeners=function(t){var n=y?y+t:t,i=this._events[n];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,r=new Array(s);o<s;o++)r[o]=i[o].fn;return r};m.prototype.listenerCount=function(t){var n=y?y+t:t,i=this._events[n];return i?i.fn?1:i.length:0};m.prototype.emit=function(t,n,i,o,s,r){var l=y?y+t:t;if(!this._events[l])return!1;var a=this._events[l],u=arguments.length,h,d;if(a.fn){switch(a.once&&this.removeListener(t,a.fn,void 0,!0),u){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,n),!0;case 3:return a.fn.call(a.context,n,i),!0;case 4:return a.fn.call(a.context,n,i,o),!0;case 5:return a.fn.call(a.context,n,i,o,s),!0;case 6:return a.fn.call(a.context,n,i,o,s,r),!0}for(d=1,h=new Array(u-1);d<u;d++)h[d-1]=arguments[d];a.fn.apply(a.context,h)}else{var v=a.length,C;for(d=0;d<v;d++)switch(a[d].once&&this.removeListener(t,a[d].fn,void 0,!0),u){case 1:a[d].fn.call(a[d].context);break;case 2:a[d].fn.call(a[d].context,n);break;case 3:a[d].fn.call(a[d].context,n,i);break;case 4:a[d].fn.call(a[d].context,n,i,o);break;default:if(!h)for(C=1,h=new Array(u-1);C<u;C++)h[C-1]=arguments[C];a[d].fn.apply(a[d].context,h)}}return!0};m.prototype.on=function(t,n,i){return Q(this,t,n,i,!1)};m.prototype.once=function(t,n,i){return Q(this,t,n,i,!0)};m.prototype.removeListener=function(t,n,i,o){var s=y?y+t:t;if(!this._events[s])return this;if(!n)return E(this,s),this;var r=this._events[s];if(r.fn)r.fn===n&&(!o||r.once)&&(!i||r.context===i)&&E(this,s);else{for(var l=0,a=[],u=r.length;l<u;l++)(r[l].fn!==n||o&&!r[l].once||i&&r[l].context!==i)&&a.push(r[l]);a.length?this._events[s]=a.length===1?a[0]:a:E(this,s)}return this};m.prototype.removeAllListeners=function(t){var n;return t?(n=y?y+t:t,this._events[n]&&E(this,n)):(this._events=new k,this._eventsCount=0),this};m.prototype.off=m.prototype.removeListener;m.prototype.addListener=m.prototype.on;m.prefixed=y;m.EventEmitter=m;typeof U<"u"&&(U.exports=m)});c();c();function M(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function ye(e,t){let n,i=()=>{if(n)return n;let o=indexedDB.open(e);return o.onupgradeneeded=()=>o.result.createObjectStore(t),n=M(o),n.then(s=>{s.onclose=()=>n=void 0},()=>{}),n};return(o,s)=>i().then(r=>s(r.transaction(t,o).objectStore(t)))}var I;function z(){return I||(I=ye("keyval-store","keyval")),I}function T(e,t=z()){return t("readonly",n=>M(n.get(e)))}function V(e,t,n=z()){return n("readwrite",i=>(i.put(t,e),M(i.transaction)))}c();c();c();var J=me(H(),1);c();
vendor: 4,022 bytes, line 1
1var j=function(e,t){return j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},j(e,t)};function Y(e,t){j(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function we(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function ve(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),o,s=[],r;try{for(;(t===void 0||t-- >0)&&!(o=i.next()).done;)s.push(o.value)}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s}function _e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ve(arguments[t]));return e}var Z=function(){function e(t,n){this.target=n,this.type=t}return e}(),Te=function(e){Y(t,e);function t(n,i){var o=e.call(this,"error",i)||this;return o.message=n.message,o.error=n,o}return t}(Z),xe=function(e){Y(t,e);function t(n,i,o){n===void 0&&(n=1e3),i===void 0&&(i="");var s=e.call(this,"close",o)||this;return s.wasClean=!0,s.code=n,s.reason=i,s}return t}(Z);var Ce=function(){if(typeof WebSocket<"u")return WebSocket},ke=function(e){return typeof e<"u"&&!!e&&e.CLOSING===2},_={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Be=function(){function e(t,n,i){var o=this;i===void 0&&(i={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){o._debug("open event");var r=o._options.minUptime,l=r===void 0?_.minUptime:r;clearTimeout(o._connectTimeout),o._uptimeTimeout=setTimeout(function(){return o._acceptOpen()},l),o._ws.binaryType=o._binaryType,o._messageQueue.forEach(function(a){return o._ws.send(a)}),o._messageQueue=[],o.onopen&&o.onopen(s),o._listeners.open.forEach(function(a){return o._callEventListener(s,a)})},this._handleMessage=function(s){o._debug("message event"),o.onmessage&&o.onmessage(s),o._listeners.message.forEach(function(r){return o._callEventListener(s,r)})},this._handleError=function(s){o._debug("error event",s.message),o._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),o.onerror&&o.onerror(s),o._debug("exec error listeners"),o._listeners.error.forEach(function(r){return o._callEventListener(s,r)}),o._connect()},this._handleClose=function(s){o._debug("close event"),o._clearTimeouts(),o._shouldReconnect&&o._connect(),o.onclose&&o.onclose(s),o._listeners.close.forEach(function(r){return o._callEventListener(s,r)})},this._url=t,this._protocols=n,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(e,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CONNECTING",{get:function(){return e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OPEN",{get:function(){return e.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSING",{get:function(){return e.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CLOSED",{get:function(){return e.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)}
1,enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bufferedAmount",{get:function(){var t=this._messageQueue.reduce(function(n,i){return typeof i=="string"?n+=i.length:i instanceof Blob?n+=i.size:n+=i.byteLength,n},0);return t+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),e.prototype.close=function(t,n){if(t===void 0&&(t=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,n)},e.prototype.reconnect=function(t,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,n),this._connect())},e.prototype.send=function(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{var n=this._options.maxEnqueuedMessages,i=n===void 0?_.maxEnqueuedMessages:n;this._messageQueue.length<i&&(this._debug("enqueue",t),this._messageQueue.push(t))}},e.prototype.addEventListener=function(t,n){this._listeners[t]&&this._listeners[t].push(n)},e.prototype.dispatchEvent=function(t){var n,i,o=this._listeners[t.type];if(o)try{for(var s=we(o),r=s.next();!r.done;r=s.next()){var l=r.value;this._callEventListener(t,l)}}catch(a){n={error:a}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return!0},e.prototype.removeEventListener=function(t,n){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(function(i){return i!==n}))},e.prototype._debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._options.debug&&console.log.apply(console,_e(["RWS>"],t))},e.prototype._getNextDelay=function(){var t=this._options,n=t.reconnectionDelayGrowFactor,i=n===void 0?_.reconnectionDelayGrowFactor:n,o=t.minReconnectionDelay,s=o===void 0?_.minReconnectionDelay:o,r=t.maxReconnectionDelay,l=r===void 0?_.maxReconnectionDelay:r,a=0;return this._retryCount>0&&(a=s*Math.pow(i,this._retryCount-1),a>l&&(a=l)),this._debug("next delay",a),a},e.prototype._wait=function(){var t=this;return new Promise(function(n){setTimeout(n,t._getNextDelay())})},e.prototype._getNextUrl=function(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){var n=t();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")},e.prototype._connect=function(){var t=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var n=this._options,i=n.maxRetries,o=i===void 0?_.maxRetries:i,s=n.connectionTimeout,r=s===void 0?_.connectionTimeout:s,l=n.WebSocket,a=l===void 0?Ce():l;if(this._retryCount>=o){this._debug("max retries reached",this._retryCount,">=",o);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!ke(a))throw Error("No valid WebSocket class provided");this._wait().then(function(){return t._getNextUrl(t._url)}).then(function(u){t._closeCalled||(t._debug("connect",{url:u,protocols:t._protocols}),t._ws=t._protocols?new a(u,t._protocols):new a(u),t._ws.binaryType=t._binaryType,t._connectLock=!1,t._addListeners(),t._connectTimeout=setTimeout(function(){return t._handleTimeout()},r))})}},e.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new Te(Error("TIMEOUT"),this))},e.prototype._disconnect=function(t,n){if(t===void 0&&(t=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,n),this._handleClose(new xe(t,n,this))}catch{}}},e.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},e.prototype._callEventListener=function(t,n){"handleEvent"in n?n.handleEvent(t):n(t)},e.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},e.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},e.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},e}();c();var R={};B(R,{APIClient:()=>D,isAPIError:()=>Ee});c();c();c();var S={"drive/files/create":"multipart/form-data"};var X=Symbol();function Ee(e){return e[X]===!0}var D=class{origin;credential;fetch;constructor(t){this.origin=t.origin.replace(/\/$/,""),this.credential=t.credential,this.fetch=t.fetch??((...n)=>fetch(...n))}assertIsRecord(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}assertSpecialEpReqType(t){return t in S}request(t,n={},i){return new Promise((o,s)=>{let r="application/json";this.assertSpecialEpReqType(t)&&S[t]!=null&&(r=S[t]);let l="{}";if(r==="application/json")l=JSON.stringify({...this.assertIsRecord(n)?n:{},i:i!==void 0?i:this.credential});else if(r==="multipart/form-data"){l=new FormData;let a=i!==void 0?i:this.credential;if(a!=null&&l.append("i",a),this.assertIsRecord(n))for(let u in n){let h=n[u];h!=null&&(h instanceof File||h instanceof Blob?l.append(u,h):typeof h=="object"?l.append(u,JSON.stringify(h)):l.append(u,h))}}this.fetch(`${this.origin}/api/${t}`,{method:"POST",body:l,headers:r==="multipart/form-data"?{}:{"Content-Type":r},credentials:"omit",cache:"no-cache"}).then(async a=>{let u=a.status===204?null:await a.json();a.status===200||a.status===204?o(u):s({[X]:!0,...u.error})}).catch(s)})}};c();c();c();var P={};B(P,{parse:()=>Se,toString:()=>Re});c();function Se(e){let t=e;
1t.startsWith("@")&&(t=t.substring(1));let n=t.split("@",2);return{username:n[0],host:n[1]||null}}function Re(e){return e.host==null?e.username:`${e.username}@${e.host}`}c();c();c();c();function te(e){let t=Array.from(e).map(n=>n.codePointAt(0)?.toString(16)).filter(n=>n!==void 0);return t.includes("200d")||(t=t.filter(n=>n!=="fe0f")),t=t.filter(n=>n.length!==0),t.join("-")}c();c();async function L(e){let t=await T("accounts");if(!t){console.log("Accounts are not recorded");return}return t.find(n=>n.id===e)}c();function ne(e,t){let n=new URL(e,origin);return n.searchParams.set("loginId",t),n.toString()}var q=new R.APIClient({origin,fetch:(...e)=>fetch(...e)});async function x(e,t,n){let i;if(!(t&&(i=await L(t),!i)))return q.request(e,n,i?.token)}var $=new Map;function N(e){return $.get(e)?Promise.resolve():($.set(e,!0),new Promise(t=>{setTimeout(()=>{$.set(e,!1),x("notifications/mark-all-as-read",e).then(t,t)},1e3)}))}function K(e,t){return b("push",`/@${e}`,t,{acct:e})}function F(e,t){return b("push",`/notes/${e}`,t,{noteId:e})}function ie(e,t){return b("push",`/timeline/antenna/${e}`,t,{antennaId:e})}function oe(e,t){return e.toRoomId!=null?b("push",`/chat/room/${e.toRoomId}`,t,{body:e}):b("push",`/chat/user/${e.toUserId}`,t,{body:e})}async function se(e,t){let n="/share",i=new URLSearchParams;return e.initialText&&i.set("text",e.initialText),e.reply&&i.set("replyId",e.reply.id),e.renote&&i.set("renoteId",e.renote.id),b("post",`${n}?${i}`,t,{options:e})}async function b(e,t,n,i={}){let o=await Ne();return o?(o.postMessage({type:"order",...i,order:e,loginId:n,url:t}),o):globalThis.clients.openWindow(n?ne(t,n):t)}async function Ne(){return(await globalThis.clients.matchAll({type:"window"})).find(t=>!new URL(t.url).searchParams.has("zen"))??null}c();c();var O=class{constructor(t,n=!1){this.locale=t;this.devMode=n||!0,this.t=this.t.bind(this)}tsxCache;devMode;get ts(){if(this.devMode){class t{get(i,o){let s=i[o];if(typeof s=="object")return new Proxy(s,new t);if(typeof s=="string"){let r=Array.from(s.matchAll(/\{(\w+)\}/g),([,l])=>l);return r.length&&console.error(`Missing locale parameters: ${r.join(", ")} at ${String(o)}`),s}return console.error(`Unexpected locale key: ${String(o)}`),new Proxy({},new t)}}return new Proxy(this.locale,new t)}return this.locale}get tsx(){if(this.devMode){if(this.tsxCache)return this.tsxCache;class n{get(o,s){let r=o[s];if(typeof r=="object")return new Proxy(r,new n);if(typeof r=="string"){let l=[],a=[],u=0;for(;~u;){let h=r.indexOf("{",u);if(!~h){l.push(r.slice(u));break}l.push(r.slice(u,h));let d=r.indexOf("}",h);a.push(r.slice(h+1,d)),u=d+1}return a.length?h=>{let d=l[0];for(let v=0;v<a.length;v++)Object.hasOwn(h,a[v])||console.error(`Missing locale parameters: ${a[v]} at ${String(s)}`),d+=h[a[v]]+l[v+1];return d}:(console.error(`Unexpected locale key: ${String(s)}`),()=>r)}return console.error(`Unexpected locale key: ${String(s)}`),new Proxy(()=>s,new n)}}return this.tsxCache=new Proxy(this.locale,new n)}if(this.tsxCache)return this.tsxCache;function t(n){let i={};for(let o in n){if(!Object.hasOwn(n,o))continue;let s=n[o];if(typeof s=="object")i[o]=t(s);else if(typeof s=="string"){let r=[],l=[],a=0;for(;~a;){let u=s.indexOf("{",a);if(!~u){r.push(s.slice(a));break}r.push(s.slice(a,u));let h=s.indexOf("}",u);l.push(s.slice(u+1,h)),a=h+1}if(!l.length)continue;i[o]=u=>{let h=r[0];for(let d=0;d<l.length;d++)h+=u[l[d]]+r[d+1];return h}}}return i}return this.tsxCache=t(this.locale)}t(t,n){let i=this.locale;for(let o of t.split("."))if(i=i[o],this.devMode&&typeof i>"u")return console.error(`Unexpected locale key: ${t}`),t;if(n){if(this.devMode){let o=Array.from(i.matchAll(/\{(\w+)\}/g),([,s])=>s).filter(s=>!Object.hasOwn(n,s));o.length&&console.error(`Missing locale parameters: ${o.join(", ")} at ${t}`)}for(let[o,s]of Object.entries(n)){let r=`{${o}}`;this.devMode&&(i.includes(r)||console.error(`Unexpected locale parameter: ${o} at ${t}`)),i=i.replace(r,s.toString())}}return i}};var W=class{cacheName="mk-cache-2025.7.0";lang=T("lang").then(async t=>t||"en-US");setLang(t){return this.lang=Promise.resolve(t),V("lang",t),this.fetchLocale()}i18n=null;fetchLocale(){return this.i18n=this._fetch()}async _fetch(){let t=`/assets/locales/${await this.lang}.2025.7.0.json`,n=await caches.match(t);if(!n){n=await fetch(t);let i=n.clone();if(!i.clone().ok)throw new Error("locale fetching error");caches.open(this.cacheName).then(o=>o.put(t,i))}return new O(await n.json())}},w=new W;c();function g(e){return e.name===""?e.username:e.name??e.username}var Ae=async e=>{for(let t of(await Promise.all(e.map(n=>globalThis.registration.getNotifications({tag:n})))).flat())t.close()},p=e=>`/static-assets/tabler-badges/${e}.png`;async function re(e){let t=await Ie(e);return t?globalThis.registration.showNotification(...t):(console.error("Could not compose notification",e),G())}async function Ie(e){let t=await(w.i18n??w.fetchLocale());switch(e.type){case"notification":switch(e.body.type){case"follow":{let n=await L(e.userId);if(!n)return null;let i=await q.request("users/show",{userId:e.body.userId},n.token);return[t.ts._notification.youWereFollowed,{body:g(e.body.user),icon:e.body.user.avatarUrl??void 0,badge:p("user-plus"),data:e,actions:i.isFollowing?[]:[{action:"follow",title:t.ts._notification._actions.followBack}]}]}case"mention":return[t.tsx._notification.youGotMention({name:g(e.body.user)}),{body:e.body.note.text??"",icon:e.body.user.avatarUrl??void 0,badge:p("at"),data:e,actions:[{action:"reply",title:t.ts._notification._actions.reply}]}];case"reply":return[t.tsx._notification.youGotReply({name:g(e.body.user)}),{body:e.body.note.text??"",icon:e.body.user.avatarUrl??void 0,badge:p("arrow-back-up"),data:e,actions:[{action:"reply",title:t.ts._notification._actions.reply}]}];case"renote":return[t.tsx._notification.youRenoted({name:g(e.body.user)}),{body:e.body.note.text??"",icon:e.body.user.avatarUrl??void 0,badge:p("repeat"),data:e,actions:[{action:"showUser",title:g(e.body.user)}]}];case"quote":return[t.tsx._notification.youGotQuote({name:g(e.body.user)}),{body:e.body.note.text??"",icon:e.body.user.avatarUrl??void 0,badge:p("quote"),data:e,actions:[{action:"reply",title:t.ts._notification._actions.reply},...e.body.note.visibility==="public"||e.body.note.visibility==="home"?[{action:"renote",title:t.ts._notification._actions.renote}]:[]]}];case"note":return[t.ts._notification.newNote+": "+g(e.body.user),{body:e.body.note.text??"",icon:e.body.user.avatarUrl??void 0,data:e}];case"reaction":{let n=e.body.reaction,i;
1if(n.startsWith(":")){let s=n.substring(1,n.length-1),r=new URL(`/emoji/${s}.webp`,origin);r.searchParams.set("badge","1"),i=r.href,n=s.split("@")[0]}else i=`/twemoji-badge/${te(n)}.png`;await fetch(i).then(s=>s.status!==200).catch(()=>!0)&&(i=p("plus"));let o=`reaction:${e.body.note.id}`;return[`${n} ${g(e.body.user)}`,{body:e.body.note.text??"",icon:e.body.user.avatarUrl??void 0,tag:o,badge:i,data:e,actions:[{action:"showUser",title:g(e.body.user)}]}]}case"receiveFollowRequest":return[t.ts._notification.youReceivedFollowRequest,{body:g(e.body.user),icon:e.body.user.avatarUrl??void 0,badge:p("user-plus"),data:e,actions:[{action:"accept",title:t.ts.accept},{action:"reject",title:t.ts.reject}]}];case"followRequestAccepted":return[t.ts._notification.yourFollowRequestAccepted,{body:g(e.body.user),icon:e.body.user.avatarUrl??void 0,badge:p("circle-check"),data:e}];case"achievementEarned":return[t.ts._notification.achievementEarned,{body:t.ts._achievements._types[`_${e.body.achievement}`].title,badge:p("medal"),data:e,tag:`achievement:${e.body.achievement}`}];case"login":return[t.ts._notification.login,{badge:p("login-2"),data:e}];case"exportCompleted":{let n={antenna:t.ts.antennas,blocking:t.ts.blockedUsers,clip:t.ts.clips,customEmoji:t.ts.customEmojis,favorite:t.ts.favorites,following:t.ts.following,muting:t.ts.mutedUsers,note:t.ts.notes,userList:t.ts.lists};return[t.tsx._notification.exportOfXCompleted({x:n[e.body.exportedEntity]}),{badge:p("circle-check"),data:e}]}case"pollEnded":return[t.ts._notification.pollEnded,{body:e.body.note.text??"",badge:p("chart-arrows"),data:e}];case"app":return[e.body.header??e.body.body,{body:e.body.header?e.body.body:"",icon:e.body.icon??void 0,data:e}];case"test":return[t.ts._notification.testNotification,{body:t.ts._notification.notificationWillBeDisplayedLikeThis,badge:p("bell"),data:e}];default:return null}case"unreadAntennaNote":return[t.tsx._notification.unreadAntennaNote({name:e.body.antenna.name}),{body:`${g(e.body.note.user)}: ${e.body.note.text??""}`,icon:e.body.note.user.avatarUrl??void 0,badge:p("antenna"),tag:`antenna:${e.body.antenna.id}`,data:e,renotify:!0}];case"newChatMessage":return e.body.toRoom!=null?[`${e.body.toRoom.name}: ${g(e.body.fromUser)}: ${e.body.text}`,{icon:e.body.fromUser.avatarUrl??void 0,badge:p("messages"),tag:`chat:room:${e.body.toRoomId}`,data:e,renotify:!0}]:[`${g(e.body.fromUser)}: ${e.body.text}`,{icon:e.body.fromUser.avatarUrl??void 0,badge:p("messages"),tag:`chat:user:${e.body.fromUserId}`,data:e,renotify:!0}];default:return null}}async function G(){return new Promise(async e=>{let t=await(w.i18n??w.fetchLocale());await globalThis.registration.showNotification(new URL(origin).host,{body:"Misskey v2025.7.0",silent:!0,badge:p("null"),tag:"read_notification",actions:[{action:"markAllAsRead",title:t.ts.markAllAsRead},{action:"settings",title:t.ts.notificationSettings}],data:{}}),setTimeout(async()=>{try{await Ae(["user_visible_auto_notification"])}finally{e()}},1e3)})}globalThis.addEventListener("install",()=>{});globalThis.addEventListener("activate",e=>{e.waitUntil(caches.keys().then(t=>Promise.all(t.filter(n=>n!==w.cacheName).map(n=>caches.delete(n)))).then(()=>globalThis.clients.claim()))});async function Me(){let e=await(w.i18n??w.fetchLocale()),t={title:e.ts?._offlineScreen.title??"Offline - Could not connect to server",header:e.ts?._offlineScreen.header??"Could not connect to server",reload:e.ts?.reload??"Reload"};return`<!DOCTYPE html><html lang="ja"><head><meta charset="UTF-8"><meta content="width=device-width,initial-scale=1"name="viewport"><title>${t.title}</title><style>body{background-color:#0c1210;color:#dee7e4;font-family:Hiragino Maru Gothic Pro,BIZ UDGothic,Roboto,HelveticaNeue,Arial,sans-serif;line-height:1.35;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;margin:0;padding:24px;box-sizing:border-box}.icon{max-width:120px;width:100%;height:auto;margin-bottom:20px;}.message{text-align:center;font-size:20px;font-weight:700;margin-bottom:20px}.version{text-align:center;font-size:90%;margin-bottom:20px}button{padding:7px 14px;min-width:100px;font-weight:700;font-family:Hiragino Maru Gothic Pro,BIZ UDGothic,Roboto,HelveticaNeue,Arial,sans-serif;line-height:1.35;border-radius:99rem;
1background-color:#b4e900;color:#192320;border:none;cursor:pointer;-webkit-tap-highlight-color:transparent}button:hover{background-color:#c6ff03}</style></head><body><svg class="icon"fill="none"height="24"stroke="currentColor"stroke-linecap="round"stroke-linejoin="round"stroke-width="2"viewBox="0 0 24 24"width="24"xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z"fill="none"stroke="none"/><path d="M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62"/><path d="M3 3l18 18"/></svg><div class="message">${t.header}</div><div class="version">v2025.7.0</div><button onclick="reloadPage()">${t.reload}</button><script>function reloadPage(){location.reload(!0)}<\/script></body></html>`}globalThis.addEventListener("fetch",e=>{let t=!1;(e.request.headers.get("sec-fetch-dest")==="document"||e.request.headers.get("accept")?.includes("/html")||e.request.url.endsWith("/"))&&(t=!0),t&&e.respondWith(fetch(e.request).catch(async()=>{let n=await Me();return new Response(n,{status:200,headers:{"content-type":"text/html"}})}))});globalThis.addEventListener("push",e=>{e.waitUntil(globalThis.clients.matchAll({includeUncontrolled:!0,type:"window"}).then(async()=>{let t=e.data?.json();switch(t.type){case"notification":case"unreadAntennaNote":case"newChatMessage":if(Date.now()-t.dateTime>1e3*60*60*24)break;return re(t);case"readAllNotifications":await globalThis.registration.getNotifications().then(n=>n.forEach(i=>i.tag!=="read_notification"&&i.close()));break}await G()}))});globalThis.addEventListener("notificationclick",e=>{e.waitUntil((async()=>{let{action:t,notification:n}=e,i=n.data??{},{userId:o}=i,s=null;switch(i.type){case"notification":switch(t){case"follow":"userId"in i.body&&await x("following/create",o,{userId:i.body.userId});break;case"showUser":"user"in i.body&&(s=await K(P.toString(i.body.user),o));break;case"reply":"note"in i.body&&(s=await se({reply:i.body.note},o));break;case"renote":"note"in i.body&&await x("notes/create",o,{renoteId:i.body.note.id});break;case"accept":switch(i.body.type){case"receiveFollowRequest":await x("following/requests/accept",o,{userId:i.body.userId});break}break;case"reject":switch(i.body.type){case"receiveFollowRequest":await x("following/requests/reject",o,{userId:i.body.userId});break}break;case"showFollowRequests":s=await b("push","/my/follow-requests",o);break;default:switch(i.body.type){case"receiveFollowRequest":s=await b("push","/my/follow-requests",o);break;case"reaction":s=await F(i.body.note.id,o);break;default:"note"in i.body?s=await F(i.body.note.id,o):"user"in i.body&&(s=await K(P.toString(i.body.user),o));break}}break;case"unreadAntennaNote":s=await ie(i.body.antenna.id,o);break;case"newChatMessage":s=await oe(i.body,o);break;default:switch(t){case"markAllAsRead":await globalThis.registration.getNotifications().then(r=>r.forEach(l=>l.tag!=="read_notification"&&l.close())),await T("accounts").then(r=>Promise.all((r??[]).map(async l=>{await N(l.id)})));break;case"settings":s=await b("push","/settings/notifications",o);break}}s&&s.focus(),i.type==="notification"&&await N(o),n.close()})())});globalThis.addEventListener("notificationclose",e=>{let t=e.notification.data;e.waitUntil((async()=>{t.type==="notification"&&await N(t.userId)})())});globalThis.addEventListener("message",e=>{e.waitUntil((async()=>{switch(e.data){case"clear":await caches.keys().then(t=>Promise.all(t.map(n=>caches.delete(n))));return}typeof e.data=="object"&&Object.prototype.toString.call(e.data).slice(8,-1).toLowerCase()==="object"&&e.data.msg==="initialize"&&w.setLang(e.data.lang)})())});
2/*! Bundled license information:
3
4reconnecting-websocket/dist/reconnecting-websocket-mjs.js:
5  (*! *****************************************************************************
6  Copyright (c) Microsoft Corporation. All rights reserved.
7  Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use
8  this file except in compliance with the License. You may obtain a copy of the
9  License at http://www.apache.org/licenses/LICENSE-2.0
10  
11  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
12  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
13  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
14  MERCHANTABLITY OR NON-INFRINGEMENT.
15  
16  See the Apache Version 2.0 License for specific language governing permissions
17  and limitations under the License.
18  ***************************************************************************** *)
19  (*!
20   * Reconnecting WebSocket
21   * by Pedro Ladaria <[email protected]>
22   * https://github.com/pladaria/reconnecting-websocket
23   * License MIT
24   *)
25*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.