diff --git a/VERSION b/VERSION
index ff8c29d1..8c32a43f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.36
\ No newline at end of file
+0.7.38
\ No newline at end of file
diff --git a/asset-manifest.json b/asset-manifest.json
index e561a472..6698385a 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,47 +1,47 @@
{
"files": {
"main.css": "/static/css/main.34b80300.css",
- "main.js": "/static/js/main.431eb47c.js",
+ "main.js": "/static/js/main.3e7ff73a.js",
"widget.css": "/static/css/widget.d13f8dd3.css",
- "widget.js": "/static/js/widget.86e24b83.js",
- "static/js/308.4d112326.chunk.js": "/static/js/308.4d112326.chunk.js",
- "static/js/549.5615531f.chunk.js": "/static/js/549.5615531f.chunk.js",
- "static/js/694.1e89ad69.chunk.js": "/static/js/694.1e89ad69.chunk.js",
- "static/js/487.93e50bd5.chunk.js": "/static/js/487.93e50bd5.chunk.js",
- "static/js/770.16942382.chunk.js": "/static/js/770.16942382.chunk.js",
- "static/js/88.75be6853.chunk.js": "/static/js/88.75be6853.chunk.js",
- "static/js/265.e5ddcab0.chunk.js": "/static/js/265.e5ddcab0.chunk.js",
- "static/js/875.63eefd4c.chunk.js": "/static/js/875.63eefd4c.chunk.js",
- "static/js/261.fa5e8388.chunk.js": "/static/js/261.fa5e8388.chunk.js",
- "static/js/625.a6bbf2f1.chunk.js": "/static/js/625.a6bbf2f1.chunk.js",
- "static/js/71.e08afaf4.chunk.js": "/static/js/71.e08afaf4.chunk.js",
- "static/js/879.c94b008c.chunk.js": "/static/js/879.c94b008c.chunk.js",
- "static/css/195.cdf1fe26.chunk.css": "/static/css/195.cdf1fe26.chunk.css",
- "static/js/195.1fc32614.chunk.js": "/static/js/195.1fc32614.chunk.js",
- "static/js/812.edacbb15.chunk.js": "/static/js/812.edacbb15.chunk.js",
- "static/js/566.551a69d5.chunk.js": "/static/js/566.551a69d5.chunk.js",
- "static/js/64.78198cfe.chunk.js": "/static/js/64.78198cfe.chunk.js",
- "static/js/200.3c6a21d4.chunk.js": "/static/js/200.3c6a21d4.chunk.js",
- "static/js/911.85085ca5.chunk.js": "/static/js/911.85085ca5.chunk.js",
- "static/js/29.0622ef4f.chunk.js": "/static/js/29.0622ef4f.chunk.js",
- "static/js/409.8aa153f9.chunk.js": "/static/js/409.8aa153f9.chunk.js",
- "static/js/973.7e1412c7.chunk.js": "/static/js/973.7e1412c7.chunk.js",
- "static/css/664.8a09720a.chunk.css": "/static/css/664.8a09720a.chunk.css",
- "static/js/664.79d15709.chunk.js": "/static/js/664.79d15709.chunk.js",
- "static/js/318.23e14e69.chunk.js": "/static/js/318.23e14e69.chunk.js",
- "static/css/446.319a0232.chunk.css": "/static/css/446.319a0232.chunk.css",
- "static/js/446.823a61cf.chunk.js": "/static/js/446.823a61cf.chunk.js",
- "static/js/610.3ea800a8.chunk.js": "/static/js/610.3ea800a8.chunk.js",
- "static/js/128.0e928812.chunk.js": "/static/js/128.0e928812.chunk.js",
- "static/js/227.4245e14f.chunk.js": "/static/js/227.4245e14f.chunk.js",
- "static/js/945.5f5a6e2c.chunk.js": "/static/js/945.5f5a6e2c.chunk.js",
- "static/js/919.23e2f4de.chunk.js": "/static/js/919.23e2f4de.chunk.js",
- "static/js/887.e8864056.chunk.js": "/static/js/887.e8864056.chunk.js",
- "static/js/757.2756e1f7.chunk.js": "/static/js/757.2756e1f7.chunk.js",
- "static/js/658.0a3095f3.chunk.js": "/static/js/658.0a3095f3.chunk.js",
- "static/js/400.6fec3118.chunk.js": "/static/js/400.6fec3118.chunk.js",
- "static/js/489.b843221e.chunk.js": "/static/js/489.b843221e.chunk.js",
- "static/js/691.0711a0bd.chunk.js": "/static/js/691.0711a0bd.chunk.js",
+ "widget.js": "/static/js/widget.74ae9888.js",
+ "static/js/626.ad7496d5.chunk.js": "/static/js/626.ad7496d5.chunk.js",
+ "static/js/318.d24e5430.chunk.js": "/static/js/318.d24e5430.chunk.js",
+ "static/js/579.5e44a553.chunk.js": "/static/js/579.5e44a553.chunk.js",
+ "static/js/736.53d56c25.chunk.js": "/static/js/736.53d56c25.chunk.js",
+ "static/js/151.bf929f2b.chunk.js": "/static/js/151.bf929f2b.chunk.js",
+ "static/js/647.e087a26e.chunk.js": "/static/js/647.e087a26e.chunk.js",
+ "static/js/854.78d2f1ea.chunk.js": "/static/js/854.78d2f1ea.chunk.js",
+ "static/js/447.b3255cd5.chunk.js": "/static/js/447.b3255cd5.chunk.js",
+ "static/js/630.206c9b00.chunk.js": "/static/js/630.206c9b00.chunk.js",
+ "static/js/242.61a999a5.chunk.js": "/static/js/242.61a999a5.chunk.js",
+ "static/js/814.0de69a67.chunk.js": "/static/js/814.0de69a67.chunk.js",
+ "static/js/966.97699b5a.chunk.js": "/static/js/966.97699b5a.chunk.js",
+ "static/css/280.cdf1fe26.chunk.css": "/static/css/280.cdf1fe26.chunk.css",
+ "static/js/280.f6448471.chunk.js": "/static/js/280.f6448471.chunk.js",
+ "static/js/158.6513a305.chunk.js": "/static/js/158.6513a305.chunk.js",
+ "static/js/88.90a67d64.chunk.js": "/static/js/88.90a67d64.chunk.js",
+ "static/js/243.2faf5ff2.chunk.js": "/static/js/243.2faf5ff2.chunk.js",
+ "static/js/55.a5e0e9c2.chunk.js": "/static/js/55.a5e0e9c2.chunk.js",
+ "static/js/374.dd54b63f.chunk.js": "/static/js/374.dd54b63f.chunk.js",
+ "static/js/489.c9435ae8.chunk.js": "/static/js/489.c9435ae8.chunk.js",
+ "static/js/659.47e45a1d.chunk.js": "/static/js/659.47e45a1d.chunk.js",
+ "static/js/973.ce6d6d9a.chunk.js": "/static/js/973.ce6d6d9a.chunk.js",
+ "static/css/835.8a09720a.chunk.css": "/static/css/835.8a09720a.chunk.css",
+ "static/js/835.152dad8b.chunk.js": "/static/js/835.152dad8b.chunk.js",
+ "static/js/698.f368ab03.chunk.js": "/static/js/698.f368ab03.chunk.js",
+ "static/css/773.319a0232.chunk.css": "/static/css/773.319a0232.chunk.css",
+ "static/js/773.8ed2cb74.chunk.js": "/static/js/773.8ed2cb74.chunk.js",
+ "static/js/249.659153d4.chunk.js": "/static/js/249.659153d4.chunk.js",
+ "static/js/261.2f1dd4d6.chunk.js": "/static/js/261.2f1dd4d6.chunk.js",
+ "static/js/909.faf0d2df.chunk.js": "/static/js/909.faf0d2df.chunk.js",
+ "static/js/723.30b4a823.chunk.js": "/static/js/723.30b4a823.chunk.js",
+ "static/js/163.fa03ace7.chunk.js": "/static/js/163.fa03ace7.chunk.js",
+ "static/js/549.c03ae970.chunk.js": "/static/js/549.c03ae970.chunk.js",
+ "static/js/833.1d74d276.chunk.js": "/static/js/833.1d74d276.chunk.js",
+ "static/js/446.b07a9000.chunk.js": "/static/js/446.b07a9000.chunk.js",
+ "static/js/194.3615133e.chunk.js": "/static/js/194.3615133e.chunk.js",
+ "static/js/348.c61af8f6.chunk.js": "/static/js/348.c61af8f6.chunk.js",
+ "static/js/985.d1066343.chunk.js": "/static/js/985.d1066343.chunk.js",
"static/media/index.cjs": "/static/media/index.c05687ef19f5bac24939.cjs",
"service-worker.js": "/service-worker.js",
"static/media/join.wav": "/static/media/join.32e45d691d059a55188a.wav",
@@ -60,6 +60,6 @@
},
"entrypoints": [
"static/css/main.34b80300.css",
- "static/js/main.431eb47c.js"
+ "static/js/main.3e7ff73a.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index 6580cf8d..acc4ed23 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
VoceChat WebAPP
\ No newline at end of file
+VoceChat WebAPP
\ No newline at end of file
diff --git a/locales/en/setting.json b/locales/en/setting.json
index 69dbb448..cc9dba5e 100644
--- a/locales/en/setting.json
+++ b/locales/en/setting.json
@@ -67,6 +67,12 @@
"enable": "Enable",
"disable": "Disable"
},
+ "admin_see_group_members": {
+ "title": "Only Admins Can See Group Members",
+ "desc": "If enabled, only admins can see group members.",
+ "enable": "Enable",
+ "disable": "Disable"
+ },
"guest_mode": {
"title": "Guest Mode",
"desc": "If enabled, visitors will see public channels on this server.",
diff --git a/service-worker.js b/service-worker.js
index 06aca0e8..79306dd4 100644
--- a/service-worker.js
+++ b/service-worker.js
@@ -1 +1 @@
-(()=>{"use strict";var e={142:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},558:()=>{try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},434:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},636:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},642:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s(142);const n=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class a extends Error{constructor(e,t){super(n(e,t)),this.name=e,this.details=t}}const r=new Set;const i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},c=e=>[i.prefix,e,i.suffix].filter((e=>e&&e.length>0)).join("-"),o=e=>e||c(i.precache),h=e=>e||c(i.runtime);function l(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let u;function d(e){e.then((()=>{}))}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function g(e){return new Promise((t=>setTimeout(t,e)))}function w(e,t){const s=t();return e.waitUntil(s),s}async function m(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new a("cross-origin-copy-response",{origin:s});const n=e.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(r):r,c=function(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(e){u=!1}u=!1}return u}()?n.body:await n.blob();return new Response(c,i)}const y=(e,t)=>t.some((t=>e instanceof t));let v,b;const R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,L=new WeakMap;let q={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||C.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function D(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(R.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return C.set(n,t.sort?t.sort():[t]),T(n)}}function U(e){return"function"===typeof e?D(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));x.set(e,t)}(e),y(e,v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e)}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&R.set(t,e)})).catch((()=>{})),L.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=U(e);return t!==e&&(E.set(e,t),L.set(t,e)),t}const k=e=>L.get(e);const N=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],K=new Map;function M(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(K.get(t))return K.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=I.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!N.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return K.set(t,r),r}q=(e=>({...e,get:(t,s,n)=>M(t,s)||e.get(t,s,n),has:(t,s)=>!!M(t,s)||e.has(t,s)}))(q);s(558);const P="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class O{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(P,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(P,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(P,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(P).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(P,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class W{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new O(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,d(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class j{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(642);function F(e){return"string"===typeof e?new Request(e):e}class H{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=F(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(i){if(i instanceof Error)throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:r,response:e});return e}catch(c){throw n&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:n.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=F(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=F(e);await g(0);const n=await this.getCacheKey(s,"write");if(!t)throw new a("cache-put-with-no-response",{url:p(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),d=u?await async function(e,t,s,n){const a=l(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===l(c.url,s))return e.match(c,n)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(f){if(f instanceof Error)throw"QuotaExceededError"===f.name&&await async function(){for(const e of r)await e()}(),f}for(const a of this.iterateCallbacks("cacheDidUpdate"))await a({cacheName:c,oldResponse:d,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=F(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=h(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new H(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new a("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(n=await a({error:r,event:s,request:t}),n)break;if(!n)throw r}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class $ extends V{constructor(e={}){e.cacheName=o(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push($.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new a("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new a("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==$.copyRedirectedCacheableResponsesPlugin&&(n===$.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push($.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}$.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},$.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await m(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new $({cacheName:o(e),plugins:[...t,new j({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"===typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=A(s),r="string"!==typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new a("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!==typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new a("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,r),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return w(e,(async()=>{const t=new B;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return w(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new a("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let Q;const J=()=>(Q||(Q=new G),Q);s(636);const z=e=>e&&"object"===typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class Y extends X{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class Z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return void 0;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let ee;const te=()=>(ee||(ee=new Z,ee.addFetchListener(),ee.addCacheListener()),ee);function se(e,t,s){let n;if("string"===typeof e){const a=new URL(e,location.href);0;n=new X((({url:e})=>e.href===a.href),t,s)}else if(e instanceof RegExp)n=new Y(e,t,s);else if("function"===typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new a("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return te().registerRoute(n),n}class ne extends X{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const ae={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var re;self.addEventListener("activate",(()=>self.clients.claim())),function(e){J().precache(e)}([{'revision':'fc9c3969a781c05222d7efebb6280f01','url':'/index.html'},{'revision':null,'url':'/static/css/195.cdf1fe26.chunk.css'},{'revision':null,'url':'/static/css/446.319a0232.chunk.css'},{'revision':null,'url':'/static/css/664.8a09720a.chunk.css'},{'revision':null,'url':'/static/css/main.34b80300.css'},{'revision':null,'url':'/static/css/widget.d13f8dd3.css'},{'revision':null,'url':'/static/js/128.0e928812.chunk.js'},{'revision':null,'url':'/static/js/195.1fc32614.chunk.js'},{'revision':null,'url':'/static/js/200.3c6a21d4.chunk.js'},{'revision':null,'url':'/static/js/227.4245e14f.chunk.js'},{'revision':null,'url':'/static/js/261.fa5e8388.chunk.js'},{'revision':null,'url':'/static/js/265.e5ddcab0.chunk.js'},{'revision':null,'url':'/static/js/29.0622ef4f.chunk.js'},{'revision':null,'url':'/static/js/308.4d112326.chunk.js'},{'revision':null,'url':'/static/js/318.23e14e69.chunk.js'},{'revision':null,'url':'/static/js/400.6fec3118.chunk.js'},{'revision':null,'url':'/static/js/409.8aa153f9.chunk.js'},{'revision':null,'url':'/static/js/446.823a61cf.chunk.js'},{'revision':null,'url':'/static/js/487.93e50bd5.chunk.js'},{'revision':null,'url':'/static/js/489.b843221e.chunk.js'},{'revision':null,'url':'/static/js/549.5615531f.chunk.js'},{'revision':null,'url':'/static/js/566.551a69d5.chunk.js'},{'revision':null,'url':'/static/js/610.3ea800a8.chunk.js'},{'revision':null,'url':'/static/js/625.a6bbf2f1.chunk.js'},{'revision':null,'url':'/static/js/64.78198cfe.chunk.js'},{'revision':null,'url':'/static/js/658.0a3095f3.chunk.js'},{'revision':null,'url':'/static/js/664.79d15709.chunk.js'},{'revision':null,'url':'/static/js/691.0711a0bd.chunk.js'},{'revision':null,'url':'/static/js/694.1e89ad69.chunk.js'},{'revision':null,'url':'/static/js/71.e08afaf4.chunk.js'},{'revision':null,'url':'/static/js/757.2756e1f7.chunk.js'},{'revision':null,'url':'/static/js/770.16942382.chunk.js'},{'revision':null,'url':'/static/js/812.edacbb15.chunk.js'},{'revision':null,'url':'/static/js/875.63eefd4c.chunk.js'},{'revision':null,'url':'/static/js/879.c94b008c.chunk.js'},{'revision':null,'url':'/static/js/88.75be6853.chunk.js'},{'revision':null,'url':'/static/js/887.e8864056.chunk.js'},{'revision':null,'url':'/static/js/911.85085ca5.chunk.js'},{'revision':null,'url':'/static/js/919.23e2f4de.chunk.js'},{'revision':null,'url':'/static/js/945.5f5a6e2c.chunk.js'},{'revision':null,'url':'/static/js/973.7e1412c7.chunk.js'},{'revision':null,'url':'/static/js/main.431eb47c.js'},{'revision':null,'url':'/static/js/widget.86e24b83.js'},{'revision':null,'url':'/static/media/edit.18de09b48249f213cf85.svg'},{'revision':null,'url':'/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs'},{'revision':null,'url':'/static/media/index.294a0edb7af7d19b781b.cjs'},{'revision':null,'url':'/static/media/index.40b335a788697b39d89d.cjs'},{'revision':null,'url':'/static/media/index.4a92f16a45a8dc264e40.cjs'},{'revision':null,'url':'/static/media/index.675293235c1d3a61a78f.cjs'},{'revision':null,'url':'/static/media/index.c05687ef19f5bac24939.cjs'},{'revision':null,'url':'/static/media/join.32e45d691d059a55188a.wav'},{'revision':null,'url':'/static/media/metamask.f04d5fb63394197766d0.svg'},{'revision':null,'url':'/static/media/more.d35b0228affb89f48593.svg'},{'revision':null,'url':'/static/media/msg.sound.2c23efd582318e940e57.wav'},{'revision':null,'url':'/static/media/picture.57a395fb7f41e8e3c5d1.svg'},{'revision':null,'url':'/static/media/play.ada446bc1d007eef6447.svg'},{'revision':null,'url':'/static/media/reaction.dfc99cbb32dd13e55782.svg'},{'revision':null,'url':'/static/media/reply.c7c79a9d5cee92f51ec5.svg'},{'revision':null,'url':'/static/media/upload.image.9f8c7fc90042d2ff4eb7.svg'},{'revision':'ad4e8f0acdf69c130188f17fd5602515','url':'/widget.html'}]),function(e){const t=J();se(new ne(t,e))}(re);const ie=new RegExp("/[^/?]+\\.[^/]+$");var ce;se((({request:e,url:t})=>{if("navigate"!==e.mode)return!1;const s=t.pathname;return!(s.startsWith("/_")||s.startsWith("/VERSION")||s.startsWith("/api")||s.startsWith("/locales/")||s.startsWith("/widget"))&&!s.match(ie)}),(ce="/index.html",J().createHandlerBoundToURL(ce))),se((({url:e})=>e.origin===self.location.origin&&e.pathname.endsWith(".png")),new class extends V{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ae)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(s);let n,r=await t.cacheMatch(e);if(r)0;else{0;try{r=await s}catch(i){i instanceof Error&&(n=i)}}if(!r)throw new a("no-response",{url:e.url,error:n});return r}}({cacheName:"images",plugins:[new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);d(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){r.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===h())throw new a("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new W(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50})]})),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))})();
\ No newline at end of file
+(()=>{"use strict";var e={851:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},603:()=>{try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},143:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},621:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},719:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s(851);const n=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class a extends Error{constructor(e,t){super(n(e,t)),this.name=e,this.details=t}}const r=new Set;const i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},c=e=>[i.prefix,e,i.suffix].filter((e=>e&&e.length>0)).join("-"),o=e=>e||c(i.precache),h=e=>e||c(i.runtime);function l(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let u;function d(e){e.then((()=>{}))}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function g(e){return new Promise((t=>setTimeout(t,e)))}function w(e,t){const s=t();return e.waitUntil(s),s}async function m(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new a("cross-origin-copy-response",{origin:s});const n=e.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(r):r,c=function(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(e){u=!1}u=!1}return u}()?n.body:await n.blob();return new Response(c,i)}const y=(e,t)=>t.some((t=>e instanceof t));let v,b;const R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,L=new WeakMap;let q={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||C.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function D(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(R.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return C.set(n,t.sort?t.sort():[t]),T(n)}}function U(e){return"function"===typeof e?D(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));x.set(e,t)}(e),y(e,v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e)}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&R.set(t,e)})).catch((()=>{})),L.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=U(e);return t!==e&&(E.set(e,t),L.set(t,e)),t}const k=e=>L.get(e);const N=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],K=new Map;function M(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(K.get(t))return K.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=I.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!N.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return K.set(t,r),r}q=(e=>({...e,get:(t,s,n)=>M(t,s)||e.get(t,s,n),has:(t,s)=>!!M(t,s)||e.has(t,s)}))(q);s(603);const P="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class O{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(P,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(P,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(P,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(P).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(P,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class W{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new O(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,d(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class j{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(719);function F(e){return"string"===typeof e?new Request(e):e}class H{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=F(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(i){if(i instanceof Error)throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:r,response:e});return e}catch(c){throw n&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:n.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=F(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=F(e);await g(0);const n=await this.getCacheKey(s,"write");if(!t)throw new a("cache-put-with-no-response",{url:p(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),d=u?await async function(e,t,s,n){const a=l(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===l(c.url,s))return e.match(c,n)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(f){if(f instanceof Error)throw"QuotaExceededError"===f.name&&await async function(){for(const e of r)await e()}(),f}for(const a of this.iterateCallbacks("cacheDidUpdate"))await a({cacheName:c,oldResponse:d,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=F(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=h(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new H(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new a("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(n=await a({error:r,event:s,request:t}),n)break;if(!n)throw r}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class $ extends V{constructor(e={}){e.cacheName=o(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push($.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new a("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new a("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==$.copyRedirectedCacheableResponsesPlugin&&(n===$.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push($.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}$.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},$.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await m(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new $({cacheName:o(e),plugins:[...t,new j({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"===typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=A(s),r="string"!==typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new a("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!==typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new a("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,r),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return w(e,(async()=>{const t=new B;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return w(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new a("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let Q;const J=()=>(Q||(Q=new G),Q);s(621);const z=e=>e&&"object"===typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class Y extends X{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class Z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return void 0;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let ee;const te=()=>(ee||(ee=new Z,ee.addFetchListener(),ee.addCacheListener()),ee);function se(e,t,s){let n;if("string"===typeof e){const a=new URL(e,location.href);0;n=new X((({url:e})=>e.href===a.href),t,s)}else if(e instanceof RegExp)n=new Y(e,t,s);else if("function"===typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new a("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return te().registerRoute(n),n}class ne extends X{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const ae={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var re;self.addEventListener("activate",(()=>self.clients.claim())),function(e){J().precache(e)}([{'revision':'57829b59758952b6066282d51bfd4f3f','url':'/index.html'},{'revision':null,'url':'/static/css/280.cdf1fe26.chunk.css'},{'revision':null,'url':'/static/css/773.319a0232.chunk.css'},{'revision':null,'url':'/static/css/835.8a09720a.chunk.css'},{'revision':null,'url':'/static/css/main.34b80300.css'},{'revision':null,'url':'/static/css/widget.d13f8dd3.css'},{'revision':null,'url':'/static/js/151.bf929f2b.chunk.js'},{'revision':null,'url':'/static/js/158.6513a305.chunk.js'},{'revision':null,'url':'/static/js/163.fa03ace7.chunk.js'},{'revision':null,'url':'/static/js/194.3615133e.chunk.js'},{'revision':null,'url':'/static/js/242.61a999a5.chunk.js'},{'revision':null,'url':'/static/js/243.2faf5ff2.chunk.js'},{'revision':null,'url':'/static/js/249.659153d4.chunk.js'},{'revision':null,'url':'/static/js/261.2f1dd4d6.chunk.js'},{'revision':null,'url':'/static/js/280.f6448471.chunk.js'},{'revision':null,'url':'/static/js/318.d24e5430.chunk.js'},{'revision':null,'url':'/static/js/348.c61af8f6.chunk.js'},{'revision':null,'url':'/static/js/374.dd54b63f.chunk.js'},{'revision':null,'url':'/static/js/446.b07a9000.chunk.js'},{'revision':null,'url':'/static/js/447.b3255cd5.chunk.js'},{'revision':null,'url':'/static/js/489.c9435ae8.chunk.js'},{'revision':null,'url':'/static/js/549.c03ae970.chunk.js'},{'revision':null,'url':'/static/js/55.a5e0e9c2.chunk.js'},{'revision':null,'url':'/static/js/579.5e44a553.chunk.js'},{'revision':null,'url':'/static/js/626.ad7496d5.chunk.js'},{'revision':null,'url':'/static/js/630.206c9b00.chunk.js'},{'revision':null,'url':'/static/js/647.e087a26e.chunk.js'},{'revision':null,'url':'/static/js/659.47e45a1d.chunk.js'},{'revision':null,'url':'/static/js/698.f368ab03.chunk.js'},{'revision':null,'url':'/static/js/723.30b4a823.chunk.js'},{'revision':null,'url':'/static/js/736.53d56c25.chunk.js'},{'revision':null,'url':'/static/js/773.8ed2cb74.chunk.js'},{'revision':null,'url':'/static/js/814.0de69a67.chunk.js'},{'revision':null,'url':'/static/js/833.1d74d276.chunk.js'},{'revision':null,'url':'/static/js/835.152dad8b.chunk.js'},{'revision':null,'url':'/static/js/854.78d2f1ea.chunk.js'},{'revision':null,'url':'/static/js/88.90a67d64.chunk.js'},{'revision':null,'url':'/static/js/909.faf0d2df.chunk.js'},{'revision':null,'url':'/static/js/966.97699b5a.chunk.js'},{'revision':null,'url':'/static/js/973.ce6d6d9a.chunk.js'},{'revision':null,'url':'/static/js/985.d1066343.chunk.js'},{'revision':null,'url':'/static/js/main.3e7ff73a.js'},{'revision':null,'url':'/static/js/widget.74ae9888.js'},{'revision':null,'url':'/static/media/edit.18de09b48249f213cf85.svg'},{'revision':null,'url':'/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs'},{'revision':null,'url':'/static/media/index.294a0edb7af7d19b781b.cjs'},{'revision':null,'url':'/static/media/index.40b335a788697b39d89d.cjs'},{'revision':null,'url':'/static/media/index.4a92f16a45a8dc264e40.cjs'},{'revision':null,'url':'/static/media/index.675293235c1d3a61a78f.cjs'},{'revision':null,'url':'/static/media/index.c05687ef19f5bac24939.cjs'},{'revision':null,'url':'/static/media/join.32e45d691d059a55188a.wav'},{'revision':null,'url':'/static/media/metamask.f04d5fb63394197766d0.svg'},{'revision':null,'url':'/static/media/more.d35b0228affb89f48593.svg'},{'revision':null,'url':'/static/media/msg.sound.2c23efd582318e940e57.wav'},{'revision':null,'url':'/static/media/picture.57a395fb7f41e8e3c5d1.svg'},{'revision':null,'url':'/static/media/play.ada446bc1d007eef6447.svg'},{'revision':null,'url':'/static/media/reaction.dfc99cbb32dd13e55782.svg'},{'revision':null,'url':'/static/media/reply.c7c79a9d5cee92f51ec5.svg'},{'revision':null,'url':'/static/media/upload.image.9f8c7fc90042d2ff4eb7.svg'},{'revision':'ed30c5f5b288d9690e9a0c8abdb83c42','url':'/widget.html'}]),function(e){const t=J();se(new ne(t,e))}(re);const ie=new RegExp("/[^/?]+\\.[^/]+$");var ce;se((({request:e,url:t})=>{if("navigate"!==e.mode)return!1;const s=t.pathname;return!(s.startsWith("/_")||s.startsWith("/VERSION")||s.startsWith("/api")||s.startsWith("/locales/")||s.startsWith("/widget"))&&!s.match(ie)}),(ce="/index.html",J().createHandlerBoundToURL(ce))),se((({url:e})=>e.origin===self.location.origin&&e.pathname.endsWith(".png")),new class extends V{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ae)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(s);let n,r=await t.cacheMatch(e);if(r)0;else{0;try{r=await s}catch(i){i instanceof Error&&(n=i)}}if(!r)throw new a("no-response",{url:e.url,error:n});return r}}({cacheName:"images",plugins:[new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);d(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){r.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===h())throw new a("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new W(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50})]})),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))})();
\ No newline at end of file
diff --git a/static/css/195.cdf1fe26.chunk.css b/static/css/280.cdf1fe26.chunk.css
similarity index 100%
rename from static/css/195.cdf1fe26.chunk.css
rename to static/css/280.cdf1fe26.chunk.css
diff --git a/static/css/446.319a0232.chunk.css b/static/css/773.319a0232.chunk.css
similarity index 100%
rename from static/css/446.319a0232.chunk.css
rename to static/css/773.319a0232.chunk.css
diff --git a/static/css/664.8a09720a.chunk.css b/static/css/835.8a09720a.chunk.css
similarity index 100%
rename from static/css/664.8a09720a.chunk.css
rename to static/css/835.8a09720a.chunk.css
diff --git a/static/js/128.0e928812.chunk.js b/static/js/128.0e928812.chunk.js
deleted file mode 100644
index fbbe1503..00000000
--- a/static/js/128.0e928812.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see 128.0e928812.chunk.js.LICENSE.txt */
-(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[128],{93674:(t,e,i)=>{var n,o;!function(s,r){"use strict";void 0===(o="function"===typeof(n=r)?n.call(e,i,e,t):n)||(t.exports=o)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i{var n,o;!function(s,r){n=[i(93674)],o=function(t){return function(t,e){"use strict";var i={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},n=Array.prototype.slice;i.makeArray=function(t){return Array.isArray(t)?t:null===t||void 0===t?[]:"object"==typeof t&&"number"==typeof t.length?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach((function(t){if(t instanceof HTMLElement)if(n){e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),s=0;s{var n,o;window,void 0===(o="function"===typeof(n=function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}function e(){}var i="undefined"==typeof console?e:function(t){console.error(t)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],o=n.length;function s(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e{var n,o,s;window,o=[i(71176),i(88168)],void 0===(s="function"===typeof(n=function(t,e){"use strict";var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t1&&i+t>this.cols?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft")?n.left:n.right,s=o+i.outerWidth,r=Math.floor(o/this.columnWidth);r=Math.max(0,r);var a=Math.floor(s/this.columnWidth);a-=s%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var h=(this._getOption("originTop")?n.top:n.bottom)+i.outerHeight,u=r;u<=a;u++)this.colYs[u]=Math.max(h,this.colYs[u])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i})?n.apply(e,o):n)||(t.exports=s)},7674:(t,e,i)=>{var n,o,s;window,o=[i(25022),i(88168)],void 0===(s="function"===typeof(n=function(t,e){"use strict";function i(t){for(var e in t)return!1;return!0}var n=document.documentElement.style,o="string"==typeof n.transition?"transition":"WebkitTransition",s="string"==typeof n.transform?"transform":"WebkitTransform",r={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[o],a={transform:s,transition:o,transitionDuration:o+"Duration",transitionProperty:o+"Property",transitionDelay:o+"Delay"};function h(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=h.prototype=Object.create(t.prototype);function l(t){return t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))}u.constructor=h,u._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},u.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.getSize=function(){this.size=e(this.element)},u.css=function(t){var e=this.element.style;for(var i in t)e[a[i]||i]=t[i]},u.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],s=parseFloat(n),r=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(s=s/100*a.width),-1!=o.indexOf("%")&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},u.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[o];e[s]=this.getXValue(a),e[r]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",l=n?"bottom":"top",c=this.position.y+t[h];e[u]=this.getYValue(c),e[l]="",this.css(e),this.emitEvent("layout",[this])},u.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},u.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},u._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!o||this.isTransitioning){var s=t-i,r=e-n,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},u.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},u.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},u.moveTo=u._transitionTo,u.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},u._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},u.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);t.from&&(this.css(t.from),this.element.offsetHeight),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var c="opacity,"+l(s);u.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:c,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(r,this,!1)}},u.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},u.onotransitionend=function(t){this.ontransitionend(t)};var d={"-webkit-transform":"transform"};u.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=d[t.propertyName]||t.propertyName;delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd&&(e.onEnd[n].call(this),delete e.onEnd[n]),this.emitEvent("transitionEnd",[this])}},u.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(r,this,!1),this.isTransitioning=!1},u._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return u.removeTransitionStyles=function(){this.css(f)},u.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},u.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},u.remove=function(){o&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",(function(){this.removeElem()})),this.hide()):this.removeElem()},u.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},u.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},u.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},u.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},u.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},u.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h})?n.apply(e,o):n)||(t.exports=s)},71176:(t,e,i)=>{var n,o;!function(s,r){"use strict";n=[i(25022),i(88168),i(64857),i(7674)],o=function(t,e,i,n){return function(t,e,i,n,o){var s=t.console,r=t.jQuery,a=function(){},h=0,u={};function l(t,e){var i=n.getQueryElement(t);if(i){this.element=i,r&&(this.$element=r(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++h;this.element.outlayerGUID=o,u[o]=this,this._create(),this._getOption("initLayout")&&this.layout()}else s&&s.error("Bad element for "+this.constructor.namespace+": "+(i||t))}l.namespace="outlayer",l.Item=o,l.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=l.prototype;function d(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}n.extend(c,e.prototype),c.option=function(t){n.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},l.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o{"use strict";i.d(e,{r:()=>s});var n=i(81084);const o="undefined"===typeof window?n.useEffect:n.useLayoutEffect;function s(t,e=!1){const i=e?o:n.useEffect,s=(0,n.useRef)(t);return i((()=>{s.current=t})),s}},69623:(t,e,i)=>{"use strict";i.d(e,{B:()=>r});var n=i(81084),o=i(46939);function s(t,e){const i=function(t){var e;if("undefined"===typeof localStorage)return null;const i=null!==(e=localStorage.getItem(t))&&void 0!==e?e:"null";try{return JSON.parse(i)}catch(n){console.error(n)}return i}(t);return null===i?"function"===typeof e?e():e:i}function r(t,e){const[i,r]=(0,n.useState)((()=>s(t,e))),a=(0,n.useRef)(!1),h=(0,n.useRef)(!1),u=(0,n.useMemo)((()=>`rooks-${t}-localstorage-update`),[t]);(0,n.useEffect)((()=>{a.current&&h.current||function(t,e){"undefined"===typeof localStorage||(void 0===e?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify(e)))}(t,i)}),[t,i]);const l=(0,n.useCallback)((e=>{var n;if(e.storageArea===localStorage&&e.key===t)try{a.current=!0;const t=JSON.parse(null!==(n=e.newValue)&&void 0!==n?n:"null");i!==t&&r(t)}catch(o){}}),[t,i]);(0,n.useEffect)((()=>"undefined"!==typeof window?(window.addEventListener("storage",l),()=>{window.removeEventListener("storage",l)}):(console.warn("useLocalstorageState: window is undefined."),()=>{})),[l]);const c=(0,n.useCallback)((t=>{try{h.current=!0;const{newValue:e}=t.detail;i!==e&&r(e)}catch(e){}}),[i]);(0,n.useEffect)((()=>"undefined"!==typeof document?(document.addEventListener(u,c),()=>{document.removeEventListener(u,c)}):(console.warn("[useLocalstorageState] document is undefined."),()=>{})),[u,c]);const d=(0,n.useCallback)((t=>{if("undefined"!==typeof document){const e=new CustomEvent(u,{detail:{newValue:t}});document.dispatchEvent(e)}else console.warn("[useLocalstorageState] document is undefined.")}),[u]),f=(0,o.r)(i,!0),m=(0,n.useCallback)((t=>{const e="function"===typeof t?t(f.current):t;a.current=!1,h.current=!1,r(e),d(e)}),[d,f]),p=(0,n.useCallback)((()=>{localStorage.removeItem(t)}),[t]);return[i,m,p]}},21069:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(81084),o=i(4417),s=i(99174),r="LineWobble-module_container__IkLcd";function a(t){let{size:e=80,color:i="black",lineWeight:s=5,speed:a=1.75}=t;return(0,o.A)("LineWobble","size",e,"number"),(0,o.A)("LineWobble","color",i,"string"),(0,o.A)("LineWobble","speed",a,"number"),(0,o.A)("LineWobble","lineWeight",s,"number"),n.createElement("div",{className:r,style:{"--uib-size":e+"px","--uib-color":i,"--uib-line-weight":s+"px","--uib-speed":a+"s"}})}(0,s.s)('.LineWobble-module_container__IkLcd{align-items:center;border-radius:calc(var(--uib-line-weight)/2);display:flex;height:var(--uib-line-weight);justify-content:center;overflow:hidden;position:relative;transform:translateZ(0);width:var(--uib-size)}.LineWobble-module_container__IkLcd:before{background-color:var(--uib-color);content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.LineWobble-module_container__IkLcd:after{animation:LineWobble-module_wobble__XpxDM var(--uib-speed) ease-in-out infinite;background-color:var(--uib-color);border-radius:calc(var(--uib-line-weight)/2);content:"";height:100%;transform:translateX(-95%);width:100%}@keyframes LineWobble-module_wobble__XpxDM{0%,to{transform:translateX(-95%)}50%{transform:translateX(95%)}}')}}]);
\ No newline at end of file
diff --git a/static/js/770.16942382.chunk.js b/static/js/151.bf929f2b.chunk.js
similarity index 87%
rename from static/js/770.16942382.chunk.js
rename to static/js/151.bf929f2b.chunk.js
index 8ec616a8..fd67bdfe 100644
--- a/static/js/770.16942382.chunk.js
+++ b/static/js/151.bf929f2b.chunk.js
@@ -1 +1 @@
-"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[770],{77660:(e,a,t)=>{t.d(a,{A:()=>i});var s,n=t(81084);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var a=1;an.createElement("svg",l({width:16,height:16,viewBox:"0 0 16 16",stroke:"black",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":a},t),e?n.createElement("title",{id:a},e):null,s||(s=n.createElement("path",{d:"M10 4L6 8L10 12",strokeOpacity:.8,strokeLinecap:"round",strokeLinejoin:"round"}))),i=(0,n.forwardRef)(r)},73050:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(99264);const n=({children:e,className:a="",...t})=>(0,s.jsx)("label",{className:`text-gray-800 dark:text-gray-100 text-sm font-semibold ${a}`,...t,children:e})},69770:(e,a,t)=>{t.r(a),t.d(a,{default:()=>b});var s=t(81084),n=t(71017),l=t(43307),r=t(45123),i=t(97282),o=t(13631),c=t(80724),d=t(71361),u=t(32642),m=t(87740),g=t(73050),h=t(77660),p=t(76644),x=t(99264);function f({email:e}){const a=(0,p.Zp)();return(0,x.jsx)(u.A,{className:"w-full ghost",onClick:()=>{a(`/send_magic_link/${e}`)},children:"Sign in with a Magic Link"})}function w(){const{t:e}=(0,l.Bd)("auth"),a=(0,p.Zp)();return(0,x.jsxs)("div",{className:"flex gap-1 mt-7 text-sm text-slate-500 dark:text-gray-100 justify-center",children:[(0,x.jsx)("span",{children:e("login.no_account")}),(0,x.jsx)("a",{className:"text-primary-400 cursor-pointer",onClick:()=>{a("/register")},children:e("sign_up")})]})}var y=t(98573),j=t(52205);const v={email:"",password:""};function b(){const{name:e,logo:a}=(0,c.GV)((e=>e.server),j.bN),{t:t}=(0,l.Bd)("auth"),{t:p}=(0,l.Bd)(),{data:b,isLoading:k}=(0,o.Q0)(),[N,{isSuccess:_,isLoading:A,error:E}]=(0,i._L)(),{data:S,isSuccess:L}=(0,o.T7)(),[C,O]=(0,s.useState)(!1),[R,P]=(0,s.useState)(v);(0,s.useEffect)((()=>{const e=new URLSearchParams(location.search),a=e.get("code"),t=e.get("state"),s=e.get("magic_token"),n=e.get("exists");if(a&&t&&N({code:a,state:t,type:"oidc"}),s&&"undefined"!==typeof n){"true"==n?N({magic_token:s,type:"magiclink"}):location.href=`/#/register/set_name/login?magic_token=${s}`}}),[]),(0,s.useEffect)((()=>{if(E)switch(E.status){case 401:case 404:n.Ay.error("Username or Password incorrect");break;case 410:n.Ay.error("No associated account found, please contact user admin for an invitation link to join.");break;case"PARSING_ERROR":break;default:n.Ay.error("Something Error")}else;}),[E]),(0,s.useEffect)((()=>{_&&n.Ay.success(p("tip.login"))}),[_]);const $=e=>{const{type:a}=e.target.dataset,{value:t}=e.target;if(!a)return;const s={...R,[a]:t};P(s)},{email:B,password:I}=R;if(!L)return null;const{magic_link:T,who_can_sign_up:q}=S,D=b&&T,G=D&&C||"InvitationOnly"==q,M=!D||C;return k?null:(0,x.jsx)("div",{className:"flex-center h-screen dark:bg-gray-700",children:(0,x.jsxs)("div",{className:"relative py-8 px-10 shadow-md rounded-xl",children:[C&&(0,x.jsx)(h.A,{role:"button",className:"absolute left-7 top-8 w-10 h-10 stroke-gray-300",onClick:()=>{O(!1)}}),(0,x.jsxs)("div",{className:"flex-center flex-col pb-6",children:[(0,x.jsx)("img",{src:a||`${r.Ay}/resource/organization/logo?t=${Date.now()}`,alt:"logo",className:"w-14 h-14 mb-3 md:mb-7 rounded-full"}),(0,x.jsx)("h2",{className:"font-semibold text-2xl text-gray-800 dark:text-white",children:t("login.title",{name:e})})]}),(0,x.jsxs)("form",{className:"flex flex-col gap-5 w-80 md:min-w-[360px]",autoComplete:"false",onSubmit:e=>{e.preventDefault();b&&(null===S||void 0===S?void 0:S.magic_link)&&!C?O(!0):N({...R,type:"password"})},children:[!C&&(0,x.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,x.jsx)(g.A,{children:"Email"}),(0,x.jsx)(m.A,{autoFocus:!0,className:"large",name:"email",value:B,type:"email",required:!0,placeholder:t("placeholder_email"),"data-type":"email",onChange:$})]}),(!D||C)&&(0,x.jsxs)("div",{className:"",children:[(0,x.jsx)(g.A,{children:"Password"}),(0,x.jsx)(m.A,{className:"large",type:"password",value:I,name:"password",required:!0,"data-type":"password",onChange:$,placeholder:t("placeholder_pwd")})]}),M?(0,x.jsx)(u.A,{type:"submit",disabled:A,children:A?"Signing":t("sign_in")}):(0,x.jsx)(u.A,{type:"submit",children:t("continue")})]}),(0,x.jsx)(d.A,{content:"OR"}),(0,x.jsxs)("div",{className:"socials flex flex-col gap-3",children:[C&&(0,x.jsx)(f,{email:R.email}),!G&&(0,x.jsx)(y.A,{})]}),"EveryOne"===q&&(0,x.jsx)(w,{})]})})}}}]);
\ No newline at end of file
+"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[151],{56541:(e,a,t)=>{t.d(a,{A:()=>i});var s,n=t(76697);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var a=1;an.createElement("svg",l({width:16,height:16,viewBox:"0 0 16 16",stroke:"black",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":a},t),e?n.createElement("title",{id:a},e):null,s||(s=n.createElement("path",{d:"M10 4L6 8L10 12",strokeOpacity:.8,strokeLinecap:"round",strokeLinejoin:"round"}))),i=(0,n.forwardRef)(r)},73707:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(44109);const n=({children:e,className:a="",...t})=>(0,s.jsx)("label",{className:`text-gray-800 dark:text-gray-100 text-sm font-semibold ${a}`,...t,children:e})},86151:(e,a,t)=>{t.r(a),t.d(a,{default:()=>b});var s=t(76697),n=t(49522),l=t(39265),r=t(53754),i=t(99593),o=t(64220),c=t(50595),d=t(88650),u=t(29833),m=t(77197),g=t(73707),h=t(56541),p=t(24892),x=t(44109);function f({email:e}){const a=(0,p.Zp)();return(0,x.jsx)(u.A,{className:"w-full ghost",onClick:()=>{a(`/send_magic_link/${e}`)},children:"Sign in with a Magic Link"})}function w(){const{t:e}=(0,l.Bd)("auth"),a=(0,p.Zp)();return(0,x.jsxs)("div",{className:"flex gap-1 mt-7 text-sm text-slate-500 dark:text-gray-100 justify-center",children:[(0,x.jsx)("span",{children:e("login.no_account")}),(0,x.jsx)("a",{className:"text-primary-400 cursor-pointer",onClick:()=>{a("/register")},children:e("sign_up")})]})}var y=t(87782),j=t(36506);const v={email:"",password:""};function b(){const{name:e,logo:a}=(0,c.GV)((e=>e.server),j.bN),{t:t}=(0,l.Bd)("auth"),{t:p}=(0,l.Bd)(),{data:b,isLoading:k}=(0,o.Q0)(),[N,{isSuccess:_,isLoading:A,error:E}]=(0,i._L)(),{data:S,isSuccess:L}=(0,o.T7)(),[C,O]=(0,s.useState)(!1),[R,P]=(0,s.useState)(v);(0,s.useEffect)((()=>{const e=new URLSearchParams(location.search),a=e.get("code"),t=e.get("state"),s=e.get("magic_token"),n=e.get("exists");if(a&&t&&N({code:a,state:t,type:"oidc"}),s&&"undefined"!==typeof n){"true"==n?N({magic_token:s,type:"magiclink"}):location.href=`/#/register/set_name/login?magic_token=${s}`}}),[]),(0,s.useEffect)((()=>{if(E)switch(E.status){case 401:case 404:n.Ay.error("Username or Password incorrect");break;case 410:n.Ay.error("No associated account found, please contact user admin for an invitation link to join.");break;case"PARSING_ERROR":break;default:n.Ay.error("Something Error")}else;}),[E]),(0,s.useEffect)((()=>{_&&n.Ay.success(p("tip.login"))}),[_]);const $=e=>{const{type:a}=e.target.dataset,{value:t}=e.target;if(!a)return;const s={...R,[a]:t};P(s)},{email:B,password:I}=R;if(!L)return null;const{magic_link:T,who_can_sign_up:q}=S,D=b&&T,G=D&&C||"InvitationOnly"==q,M=!D||C;return k?null:(0,x.jsx)("div",{className:"flex-center h-screen dark:bg-gray-700",children:(0,x.jsxs)("div",{className:"relative py-8 px-10 shadow-md rounded-xl",children:[C&&(0,x.jsx)(h.A,{role:"button",className:"absolute left-7 top-8 w-10 h-10 stroke-gray-300",onClick:()=>{O(!1)}}),(0,x.jsxs)("div",{className:"flex-center flex-col pb-6",children:[(0,x.jsx)("img",{src:a||`${r.Ay}/resource/organization/logo?t=${Date.now()}`,alt:"logo",className:"w-14 h-14 mb-3 md:mb-7 rounded-full"}),(0,x.jsx)("h2",{className:"font-semibold text-2xl text-gray-800 dark:text-white",children:t("login.title",{name:e})})]}),(0,x.jsxs)("form",{className:"flex flex-col gap-5 w-80 md:min-w-[360px]",autoComplete:"false",onSubmit:e=>{e.preventDefault();b&&(null===S||void 0===S?void 0:S.magic_link)&&!C?O(!0):N({...R,type:"password"})},children:[!C&&(0,x.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,x.jsx)(g.A,{children:"Email"}),(0,x.jsx)(m.A,{autoFocus:!0,className:"large",name:"email",value:B,type:"email",required:!0,placeholder:t("placeholder_email"),"data-type":"email",onChange:$})]}),(!D||C)&&(0,x.jsxs)("div",{className:"",children:[(0,x.jsx)(g.A,{children:"Password"}),(0,x.jsx)(m.A,{className:"large",type:"password",value:I,name:"password",required:!0,"data-type":"password",onChange:$,placeholder:t("placeholder_pwd")})]}),M?(0,x.jsx)(u.A,{type:"submit",disabled:A,children:A?"Signing":t("sign_in")}):(0,x.jsx)(u.A,{type:"submit",children:t("continue")})]}),(0,x.jsx)(d.A,{content:"OR"}),(0,x.jsxs)("div",{className:"socials flex flex-col gap-3",children:[C&&(0,x.jsx)(f,{email:R.email}),!G&&(0,x.jsx)(y.A,{})]}),"EveryOne"===q&&(0,x.jsx)(w,{})]})})}}}]);
\ No newline at end of file
diff --git a/static/js/158.6513a305.chunk.js b/static/js/158.6513a305.chunk.js
new file mode 100644
index 00000000..072f1c81
--- /dev/null
+++ b/static/js/158.6513a305.chunk.js
@@ -0,0 +1 @@
+"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[158],{95158:(e,t,s)=>{s.r(t),s.d(t,{default:()=>$});var l=s(76697),a=s(49555),r=s(95023),i=s.n(r),n=s(50595),c=s(93734),o=s(81325),d=s(39265),m=s(6133),x=s(52718),u=s(4534),p=s(71207),h=s(50793),f=s(51136),b=s(21049),g=s(44109);const j=({value:e="",updateSearchValue:t=null,embed:s=!1})=>{const{t:l}=(0,d.Bd)();return(0,g.jsxs)("div",{className:(0,a.A)("hidden md:block relative w-full py-1.5 px-4 shadow",s&&"py-2 shadow-none"),children:[(0,g.jsx)(b.A,{className:"absolute left-6 top-1/2 -translate-y-1/2"}),(0,g.jsx)("input",{value:e,onChange:e=>{t&&t(e.target.value)},className:"bg-black/5 dark:bg-black/20 rounded-full text-sm text-gray-500 py-2.5 pl-9",placeholder:`${l("action.search")}...`})]})},y=({select:e=0,updateFilter:t})=>{const{input:s,updateInput:l,channels:a}=(0,h.A)(),r=e=>{t({channel:e})};return(0,g.jsxs)("div",{className:"rounded-lg p-1 pt-0 bg-white dark:bg-gray-800 overflow-auto max-h-[400px] flex flex-col items-start relative drop-shadow",children:[(0,g.jsx)("div",{className:" bg-white dark:bg-gray-800 sticky top-0 z-10 w-full",children:(0,g.jsx)(j,{embed:!0,value:s,updateSearchValue:l})}),(0,g.jsxs)("ul",{className:"w-full flex flex-col gap-4 p-2",children:[(0,g.jsxs)("li",{className:"relative cursor-pointer flex items-center gap-2",onClick:r.bind(null,void 0),children:[(0,g.jsx)(p.A,{}),(0,g.jsx)("span",{className:"text-gray-500 dark:text-gray-100 font-semibold text-sm",children:"Any Channel"}),!e&&(0,g.jsx)(f.A,{className:"absolute right-0 top-1/2 -translate-y-1/2"})]}),a.map((({gid:t,is_public:s,name:l})=>(0,g.jsxs)("li",{className:"cursor-pointer flex items-center gap-2 justify-between",onClick:r.bind(null,t),children:[(0,g.jsx)(p.A,{personal:!s}),(0,g.jsx)("span",{className:"text-gray-500 dark:text-gray-100 font-semibold text-sm flex-1",children:l}),e==t&&(0,g.jsx)(f.A,{className:""})]},t)))]})]})},v={today:{title:"Today",duration:2222},in7d:{title:"Last 7 Days"},in30d:{title:"Last 30 Days"},in3m:{title:"Last 3 months"},in12m:{title:"Last 12 months"}},N=({select:e="",updateFilter:t})=>{const s=e=>{t({date:e})};return(0,g.jsx)("div",{className:"p-3 bg-white dark:bg-gray-800 min-w-[200px] overflow-auto rounded-lg flex flex-col items-start relative drop-shadow",children:(0,g.jsxs)("ul",{className:"w-full flex flex-col gap-4",children:[(0,g.jsxs)("li",{className:"relative cursor-pointer flex items-center gap-4 text-gray-500 dark:text-gray-300 font-semibold text-sm",onClick:s.bind(null,void 0),children:["Any Time",!e&&(0,g.jsx)(f.A,{className:"absolute right-0 top-1/2 -translate-y-1/2"})]}),Object.entries(v).map((([t,{title:l}])=>(0,g.jsxs)("li",{className:"relative cursor-pointer flex items-center gap-4 text-gray-500 dark:text-gray-300 font-semibold text-sm",onClick:s.bind(null,t),children:[l,e==t&&(0,g.jsx)(f.A,{className:"absolute right-0 -top-1/2 -translate-y-1/2"})]},l)))]})})};var w=s(73914),k=s(92577);const A=({select:e="",updateFilter:t})=>{const{input:s,updateInput:l,users:a}=(0,k.A)(),r=e=>{t({from:e})};return(0,g.jsxs)("div",{className:"rounded-lg p-1 pt-0 bg-white dark:bg-gray-800 overflow-auto max-h-[300px] flex flex-col items-start relative drop-shadow",children:[(0,g.jsx)("div",{className:"bg-white dark:bg-gray-800 sticky top-0 z-10 w-full",children:(0,g.jsx)(j,{embed:!0,value:s,updateSearchValue:l})}),(0,g.jsxs)("ul",{className:"w-full flex flex-col",children:[(0,g.jsxs)("li",{className:"relative cursor-pointer p-2.5 font-semibold text-sm text-gray-500",onClick:r.bind(null,void 0),children:["Anyone",!e&&(0,g.jsx)(f.A,{className:"absolute right-1.5 top-1/2 -translate-y-1/2"})]}),a.map((({uid:t})=>(0,g.jsxs)("li",{className:"relative flex items-center gap-2 justify-between cursor-pointer",onClick:r.bind(null,t),children:[(0,g.jsx)(w.A,{uid:t,interactive:!0}),e==t&&(0,g.jsx)(f.A,{className:""})]},t)))]})]})};var C=s(52631),F=s(48160),V=s(60235),_=s(54282),S=s(57451),I=s(50591),O=s(60312);const G={doc:{title:"Documents",icon:(0,g.jsx)(V.A,{className:"w-4 h-auto"})},pdf:{title:"PDFs",icon:(0,g.jsx)(S.A,{className:"w-4 h-auto"})},image:{title:"Images",icon:(0,g.jsx)(_.A,{className:"w-4 h-auto"})},audio:{title:"Audio",icon:(0,g.jsx)(C.A,{className:"w-4 h-auto"})},video:{title:"Videos",icon:(0,g.jsx)(O.A,{className:"w-4 h-auto"})},code:{title:"Code Snippets",icon:(0,g.jsx)(F.A,{className:"w-4 h-auto"})},unknown:{title:"Unknown Files",icon:(0,g.jsx)(I.A,{className:"w-4 h-auto"})}},L=({select:e="",updateFilter:t})=>{const s=e=>{t({type:e})};return(0,g.jsx)("div",{className:"p-3 bg-white dark:bg-gray-800 min-w-[180px] overflow-auto shadow-md rounded-lg flex flex-col items-start relative",children:(0,g.jsxs)("ul",{className:"w-full flex flex-col gap-4",children:[(0,g.jsxs)("li",{className:"relative cursor-pointer flex items-center gap-4 text-gray-500 dark:text-gray-300 font-semibold text-sm",onClick:s.bind(null,void 0),children:["Any Type",!e&&(0,g.jsx)(f.A,{className:"absolute right-0 top-1/2 -translate-y-1/2"})]}),Object.entries(G).map((([t,{title:l,icon:a}])=>(0,g.jsxs)("li",{className:"relative cursor-pointer flex items-center gap-2 text-sm text-gray-500 dark:text-gray-300 font-semibold",onClick:s.bind(null,t),children:[a," ",l,e==t&&(0,g.jsx)(f.A,{className:"absolute right-0 top-1/2 -translate-y-1/2"})]},l)))]})})};var T=s(36506);const M=e=>(0,a.A)("cursor-pointer flex items-center gap-1 md:gap-2 shadow rounded-lg p-1 md:py-2 md:px-3 text-xs text-gray-900 dark:text-gray-200",e?"text-white bg-primary-400":"border border-solid border-gray-300 dark:border-gray-400 ");function z({filter:e,updateFilter:t}){const{t:s}=(0,d.Bd)("file"),[a,r]=(0,l.useState)({channel:!1,date:!1,from:!1,type:!1}),i=e=>{r((t=>({...t,...e})))},c=e=>{t(e);let s=Object.keys(e)[0];i({[s]:!1})},o=(0,n.GV)((e=>e.users.byId),T.bN),p=(0,n.GV)((e=>e.channels.byId),T.bN),{from:h,channel:f,type:b,date:j}=e,{channel:w,date:k,type:C,from:F}=a;return(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)(m.Ay,{interactive:!0,onClickOutside:i.bind(null,{from:!1}),visible:F,placement:"bottom-start",content:(0,g.jsx)(A,{select:e.from,updateFilter:c}),children:(0,g.jsxs)("div",{className:M(h),onClick:i.bind(null,{from:!0}),children:[h&&(0,g.jsx)(x.A,{width:16,height:16,className:"rounded-full w-4 h-4",name:o[h].name,src:o[h].avatar}),(0,g.jsxs)("span",{className:"txt",children:[s("from")," ",h&&o[h].name]}),(0,g.jsx)(u.A,{className:"dark:stroke-gray-100"})]})}),(0,g.jsx)(m.Ay,{interactive:!0,onClickOutside:i.bind(null,{channel:!1}),visible:w,placement:"bottom-start",content:(0,g.jsx)(y,{select:e.channel,updateFilter:c}),children:(0,g.jsxs)("div",{className:M(f),onClick:i.bind(null,{channel:!0}),children:[(0,g.jsx)("span",{className:"txt",children:f?`In ${p[f].name}`:s("channel")}),(0,g.jsx)(u.A,{className:"dark:stroke-gray-100"})]})}),(0,g.jsx)(m.Ay,{interactive:!0,onClickOutside:i.bind(null,{type:!1}),visible:C,placement:"bottom-start",content:(0,g.jsx)(L,{select:e.type,updateFilter:c}),children:(0,g.jsxs)("div",{className:M(b),onClick:i.bind(null,{type:!0}),children:[(0,g.jsx)("span",{className:"txt",children:b?G[b].title:s("type")}),(0,g.jsx)(u.A,{className:"dark:stroke-gray-100"})]})}),(0,g.jsx)(m.Ay,{interactive:!0,onClickOutside:i.bind(null,{date:!1}),visible:k,placement:"bottom-start",content:(0,g.jsx)(N,{select:e.date,updateFilter:c}),children:(0,g.jsxs)("div",{className:M(j),onClick:i.bind(null,{date:!0}),children:[(0,g.jsx)("span",{className:"txt",children:j?v[j].title:s("date")}),(0,g.jsx)(u.A,{className:"dark:stroke-gray-100"})]})})]})}var D=s(22884),B=s(35279),E=s(61679);const R=e=>(0,a.A)("cursor-pointer p-2 box-border flex-center",e&&"border border-solid border-primary-400 shadow rounded-lg");function P({view:e="item"}){const t=(0,T.wA)(),s=s=>{const{view:l}=s.currentTarget.dataset;l!=e&&t((0,D.PU)("item"==e?"grid":"item"))},l="grid"==e;return(0,g.jsxs)("ul",{className:"hidden md:flex border border-solid dark:border-gray-400 shadow rounded-lg box-border",children:[(0,g.jsx)("li",{className:R(!l),"data-view":"item",onClick:s,children:(0,g.jsx)(E.A,{className:(l?"":"fill-primary-400")+" dark:fill-gray-400"})}),(0,g.jsx)("li",{className:R(l),"data-view":"grid",onClick:s,children:(0,g.jsx)(B.A,{className:(l?"fill-primary-400":"")+" dark:fill-gray-400"})})]})}let U;const $=function(){const{isExpired:e}=(0,o.A)(),t=(0,l.useRef)(),[s,r]=(0,l.useState)({}),d=(0,n.GV)((e=>e.ui.fileListView.view),T.bN),m=(0,n.GV)((e=>e.message),T.bN),x=(0,n.GV)((e=>e.fileMessage),T.bN),u=(0,n.GV)((e=>e.channelMessage),T.bN);return(0,l.useEffect)((()=>{if("grid"==d&&t){const e=t.current;if(!e)return;const s=e.getBoundingClientRect().width-32,l=Math.floor(s/368),a=s%368,r=Math.max(Math.floor(a/(l-1)),8);U=new(i())(e,{fitWidth:!0,gutter:r,itemSelector:".grid-box"})}else U&&U.destroy()}),[d,s]),(0,g.jsxs)("div",{className:"h-screen md:overflow-y-scroll flex flex-col items-start my-2 mr-6 rounded-2xl bg-white dark:bg-gray-700",children:[(0,g.jsx)(j,{value:s.name,updateSearchValue:e=>{r((t=>({...t,name:e})))}}),(0,g.jsxs)("div",{className:"flex justify-between w-full px-4 py-5",children:[(0,g.jsx)(z,{filter:s,updateFilter:e=>{r((t=>({...t,...e})))}}),(0,g.jsx)(P,{view:d})]}),(0,g.jsx)("div",{className:(0,a.A)("w-full h-full px-4 overflow-scroll flex","item"==d&&"gap-2 flex-col","grid"==d&&"flex-wrap"),ref:t,children:x.map((t=>{const l=m[t];if(!l)return null;const a=((e,t,s)=>{let l=!0;const{mid:a,from_uid:r,properties:i}=e,{name:n,from:c,channel:o}=t,d=i?i.name:"";if(c&&c!=r&&(l=!1),o&&-1==s[o].findIndex((e=>e==a))&&(l=!1),n){let e=["",...n.toLowerCase(),""].join(".*");new RegExp(e).test(d)||(l=!1)}return l})(l,s,u);if(!a)return null;const{mid:r,thumbnail:i,content:n,created_at:o,from_uid:x,properties:p}=l,{name:h,content_type:f,size:b}=null!==p&&void 0!==p?p:{};return e(i||n)?null:(0,g.jsx)("div",{className:"grid-box mb-2",children:(0,g.jsx)(c.A,{preview:"grid"==d,flex:"item"==d,file_type:f,content:i||n,created_at:o,from_uid:x,size:b,name:h},r)},r)}))})]})}}}]);
\ No newline at end of file
diff --git a/static/js/163.fa03ace7.chunk.js b/static/js/163.fa03ace7.chunk.js
new file mode 100644
index 00000000..5081ae7e
--- /dev/null
+++ b/static/js/163.fa03ace7.chunk.js
@@ -0,0 +1 @@
+"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[163],{77299:(e,t,r)=>{r.d(t,{A:()=>s});var a,l=r(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.createElement("svg",n({width:14,height:15,viewBox:"0 0 14 15",fill:"black",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},r),e?l.createElement("title",{id:t},e):null,a||(a=l.createElement("path",{d:"M7 6.7929L10.5355 3.25736C10.7308 3.0621 11.0474 3.0621 11.2426 3.25736C11.4379 3.45262 11.4379 3.76921 11.2426 3.96447L7.70711 7.5L11.2426 11.0355C11.4379 11.2308 11.4379 11.5474 11.2426 11.7426C11.0474 11.9379 10.7308 11.9379 10.5355 11.7426L7 8.20711L3.46447 11.7426C3.26921 11.9379 2.95262 11.9379 2.75736 11.7426C2.5621 11.5474 2.5621 11.2308 2.75736 11.0355L6.2929 7.5L2.75736 3.96447C2.5621 3.76921 2.5621 3.45262 2.75736 3.25736C2.95262 3.0621 3.26921 3.0621 3.46447 3.25736L7 6.7929Z",fillOpacity:.8}))),s=(0,l.forwardRef)(i)},74606:(e,t,r)=>{r.d(t,{A:()=>d});var a,l,n=r(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.createElement("svg",i({stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20",color:"#78787c",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",style:{color:"rgb(120, 120, 124)"},ref:s,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,a||(a=n.createElement("path",{fillRule:"evenodd",d:"M3.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z",clipRule:"evenodd"})),l||(l=n.createElement("path",{d:"M12.454 16.697L9.75 13.992a4 4 0 01-3.742-3.741L2.335 6.578A9.98 9.98 0 00.458 10c1.274 4.057 5.065 7 9.542 7 .847 0 1.669-.105 2.454-.303z"}))),d=(0,n.forwardRef)(s)},51506:(e,t,r)=>{r.d(t,{A:()=>d});var a,l,n=r(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.createElement("svg",i({stroke:"currentColor",fill:"currentColor",strokeWidth:0,viewBox:"0 0 20 20",color:"#78787c",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",style:{color:"rgb(120, 120, 124)"},ref:s,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,a||(a=n.createElement("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"})),l||(l=n.createElement("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"}))),d=(0,n.forwardRef)(s)},658:(e,t,r)=>{r.d(t,{A:()=>o});var a,l,n,i=r(76697);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.createElement("svg",s({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:d,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,a||(a=i.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z",fill:"url(#paint0_linear_14171_23293)"})),l||(l=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2431 5.96725C12.4162 5.86325 12.6357 5.87375 12.7982 5.99425C12.9602 6.11525 13.0342 6.32125 12.9857 6.51725L11.9857 10.5173C11.9297 10.7403 11.7297 10.8963 11.5002 10.8963H4.50018C4.27068 10.8963 4.07068 10.7397 4.01468 10.5173L3.01468 6.51725C2.96618 6.32125 3.04018 6.11525 3.20218 5.99425C3.36518 5.87425 3.58418 5.86375 3.75768 5.96725L5.84918 7.22225L7.58468 4.61875C7.59654 4.60096 7.61307 4.58921 7.62965 4.57743C7.63964 4.57033 7.64966 4.56321 7.65868 4.55475L7.17718 4.07275C7.08018 3.97575 7.08018 3.81625 7.17718 3.71925L7.82368 3.07275C7.92068 2.97575 8.08018 2.97575 8.17718 3.07275L8.82368 3.71925C8.92068 3.81625 8.92068 3.97575 8.82368 4.07275L8.34218 4.55475C8.3512 4.56338 8.3614 4.57062 8.37161 4.57787C8.38802 4.58951 8.40447 4.60119 8.41618 4.61875L10.1517 7.22225L12.2431 5.96725ZM4.00025 11.3962H12.0002V12.3963H4.00025V11.3962Z",fill:"#ECE9FE"})),n||(n=i.createElement("defs",null,i.createElement("linearGradient",{id:"paint0_linear_14171_23293",x1:0,y1:0,x2:16,y2:-1.66785e-9,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#7F56D9"}),i.createElement("stop",{offset:1,stopColor:"#9E77ED"}))))),o=(0,i.forwardRef)(d)},20198:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(76697),l=r(97142);const n=({id:e="root-modal",mask:t=!0,children:r})=>{const[n,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const r=document.getElementById(e);if(!r)return;t&&r.classList.add("mask");const a=document.createElement("div");return a.classList.add("wrapper"),r.appendChild(a),i(a),()=>{r.removeChild(a)}}),[e,t]),n?(0,l.createPortal)(r,n):null}},73914:(e,t,r)=>{r.d(t,{A:()=>_});var a,l,n,i=r(76697),s=r(24892),d=r(6133),o=r(49555),c=r(50595),u=r(30696);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.createElement("svg",h({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:s,"aria-labelledby":t},r),e?i.createElement("title",{id:t},e):null,a||(a=i.createElement("circle",{cx:8,cy:8,r:8,fill:"#155EEF"})),i.createElement("mask",{id:"mask0_19353_2918",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:12,height:12},l||(l=i.createElement("rect",{x:2,y:2,width:12,height:12,fill:"#D9D9D9"}))),n||(n=i.createElement("g",{mask:"url(#mask0_19353_2918)"},i.createElement("path",{d:"M4.5 12.5C4.35833 12.5 4.23958 12.4521 4.14375 12.3562C4.04792 12.2604 4 12.1417 4 12V10C4 9.725 4.09792 9.48958 4.29375 9.29375C4.48958 9.09792 4.725 9 5 9H11C11.275 9 11.5104 9.09792 11.7062 9.29375C11.9021 9.48958 12 9.725 12 10V12C12 12.1417 11.9521 12.2604 11.8562 12.3562C11.7604 12.4521 11.6417 12.5 11.5 12.5H4.5ZM6.5 8.5C5.80833 8.5 5.21875 8.25625 4.73125 7.76875C4.24375 7.28125 4 6.69167 4 6C4 5.30833 4.24375 4.71875 4.73125 4.23125C5.21875 3.74375 5.80833 3.5 6.5 3.5H9.5C10.1917 3.5 10.7812 3.74375 11.2687 4.23125C11.7562 4.71875 12 5.30833 12 6C12 6.69167 11.7562 7.28125 11.2687 7.76875C10.7812 8.25625 10.1917 8.5 9.5 8.5H6.5ZM5 11.5H11V10H5V11.5ZM6.5 7.5H9.5C9.91667 7.5 10.2708 7.35417 10.5625 7.0625C10.8542 6.77083 11 6.41667 11 6C11 5.58333 10.8542 5.22917 10.5625 4.9375C10.2708 4.64583 9.91667 4.5 9.5 4.5H6.5C6.08333 4.5 5.72917 4.64583 5.4375 4.9375C5.14583 5.22917 5 5.58333 5 6C5 6.41667 5.14583 6.77083 5.4375 7.0625C5.72917 7.35417 6.08333 7.5 6.5 7.5ZM6.5 6.5C6.64167 6.5 6.76042 6.45208 6.85625 6.35625C6.95208 6.26042 7 6.14167 7 6C7 5.85833 6.95208 5.73958 6.85625 5.64375C6.76042 5.54792 6.64167 5.5 6.5 5.5C6.35833 5.5 6.23958 5.54792 6.14375 5.64375C6.04792 5.73958 6 5.85833 6 6C6 6.14167 6.04792 6.26042 6.14375 6.35625C6.23958 6.45208 6.35833 6.5 6.5 6.5ZM9.5 6.5C9.64167 6.5 9.76042 6.45208 9.85625 6.35625C9.95208 6.26042 10 6.14167 10 6C10 5.85833 9.95208 5.73958 9.85625 5.64375C9.76042 5.54792 9.64167 5.5 9.5 5.5C9.35833 5.5 9.23958 5.54792 9.14375 5.64375C9.04792 5.73958 9 5.85833 9 6C9 6.14167 9.04792 6.26042 9.14375 6.35625C9.23958 6.45208 9.35833 6.5 9.5 6.5Z",fill:"white"})))),p=(0,i.forwardRef)(m);var g=r(658),v=r(52718),b=r(29410),x=r(39265),C=r(32812),f=r(8983),w=r(44109);const y=({enable:e=!1,uid:t,cid:r,visible:a,hide:l,children:n})=>{const{t:i}=(0,x.Bd)("member"),{t:s}=(0,x.Bd)("chat"),{blockThisContact:o,removeFromContact:c,copyEmail:u,canCopyEmail:h,startChat:m,canRemove:p,canRemoveFromContact:g,canBlock:v,canRemoveFromChannel:b,removeFromChannel:y,removeUser:j,isAdmin:k,canUpdateRole:E,updateRole:_}=(0,C.A)({uid:t,cid:r});return(0,w.jsx)(d.Ay,{disabled:!e,visible:a,followCursor:"initial",interactive:!0,placement:"right-start",popperOptions:{strategy:"fixed"},onClickOutside:l,content:(0,w.jsx)(f.A,{hideMenu:l,items:[{title:i("send_msg"),handler:m},h&&{title:i("copy_email"),handler:u},E&&{title:i("roles"),handler:_,subs:[{title:i("set_normal"),checked:!k,handler:_},{title:i("set_admin"),checked:k,handler:_}]},b&&{danger:!0,title:i("remove_from_channel"),handler:y},g&&{danger:!0,title:i("remove_from_contact"),handler:c},v&&{danger:!0,title:s("block"),handler:o},p&&{danger:!0,title:i("remove"),handler:j}].filter(Boolean)}),children:n},t)};var j=r(36506),k=r(81477);const E=({cid:e,uid:t,dm:r=!1,interactive:a=!0,popover:l=!1,compact:n=!1,avatarSize:i=32,enableContextMenu:h=!1,enableNavToSetting:m=!1,...x})=>{const C=(0,s.Zp)(),{visible:f,handleContextMenuEvent:E,hideContextMenu:_}=(0,u.A)(),N=(0,c.GV)((e=>e.users.byId[t]),j.bN),A=(0,c.GV)((e=>{var t;return null===(t=e.authData.user)||void 0===t?void 0:t.uid}),j.bN),M=(0,c.GV)((e=>e.server.show_user_online_status),j.bN),L=()=>{C(`/chat/dm/${t}`)};if(!N)return null;const O=N.online||N.uid==A,R=(0,o.A)("relative flex items-center justify-start gap-2 rounded-lg select-none",a&&"md:hover:bg-gray-500/10",n?"p-0":"p-2",m&&"cursor-pointer"),$=(0,o.A)("text-sm text-gray-500 max-w-[190px] truncate font-semibold dark:text-white"),V=!!N.widget_id,B="absolute -bottom-[2.5px] -right-[2.5px] border-content rounded-full border-[1px] border-white dark:border-gray-300",H=(0,o.A)(B,O?"bg-green-500":"bg-zinc-400",n?"w-[15px] h-[15px]":"w-3 h-3"),S=N.is_bot?(0,w.jsx)("div",{className:B,children:(0,w.jsx)(p,{className:n?"w-[15px] h-[15px]":"w-3 h-3"})}):M?(0,w.jsx)("div",{className:H}):null;return l?(0,w.jsx)(y,{cid:e,uid:t,enable:h,visible:f,hide:_,children:(0,w.jsx)(d.Ay,{inertia:!0,interactive:!0,placement:"left",trigger:"click",content:(0,w.jsx)(b.A,{uid:t,type:"card",cid:e}),children:(0,w.jsxs)("div",{className:R,onDoubleClick:r?L:void 0,onContextMenu:h?E:void 0,...x,children:[(0,w.jsxs)("div",{className:"cursor-pointer relative",style:{width:`${i}px`,height:`${i}px`},children:[(0,w.jsx)(v.A,{className:"w-full h-full rounded-full object-cover",width:i,height:i,src:N.avatar,name:N.name,alt:"avatar"}),S]}),!n&&(0,w.jsx)("span",{className:$,title:null===N||void 0===N?void 0:N.name,children:null===N||void 0===N?void 0:N.name}),!n&&N.is_admin&&!N.is_bot&&(0,w.jsx)(g.A,{})]})})}):(0,w.jsx)(y,{cid:e,uid:t,enable:h,visible:f,hide:_,children:(0,w.jsxs)("div",{className:R,onClick:m?()=>{C(`/setting/dm/${t}/overview?f=/chat/dm/${t}`)}:void 0,onDoubleClick:r?L:void 0,onContextMenu:h?E:void 0,...x,children:[(0,w.jsxs)("div",{className:"cursor-pointer relative",style:{width:`${i}px`,height:`${i}px`},children:[(0,w.jsx)(v.A,{className:(0,k.cn)("size-full rounded-full object-cover",V&&"ring-2 ring-orange-500"),title:N.widget_id,width:i,height:i,src:N.avatar,name:N.name,alt:"avatar"}),S]}),!n&&(0,w.jsx)("span",{className:$,title:null===N||void 0===N?void 0:N.name,children:null===N||void 0===N?void 0:N.name}),!n&&N.is_admin&&!N.is_bot&&(0,w.jsx)(g.A,{})]})})},_=(0,i.memo)(E,((e,t)=>e.uid==t.uid))},77090:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(44109);function l(e){const{className:t}=e;return(0,a.jsx)("input",{readOnly:!0,...e,type:"checkbox",className:`checkbox w-5 h-5 rounded-md border border-solid border-slate-300 checked:border-primary-400 disabled:opacity-40 ${t}`})}},77197:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(76697),l=r(49555),n=r(74606),i=r(51506),s=r(44109);const d=({type:e="text",prefix:t="",className:r="",...d})=>{const[o,c]=(0,a.useState)(e),u=r.includes("large"),h=r.includes("none"),m="password"==e,p=(0,l.A)("w-full text-sm text-gray-800 dark:text-gray-200 p-2 outline-none \n bg-inherit\n disabled:text-gray-500 disabled:bg-gray-100 \n dark:disabled:text-gray-500 \n dark:disabled:bg-gray-800/50\n dark:disabled:border-gray-600 \n placeholder:text-gray-400",u&&"py-3",h&&"!border-none bg-transparent shadow-none",m&&"pr-[30px]");return"password"==e?(0,s.jsxs)("div",{className:`w-full relative flex overflow-hidden rounded border border-solid border-gray-200 dark:border-gray-400 shadow-sm ${r}`,children:[(0,s.jsx)("input",{type:o,autoComplete:"password"==o?"current-password":"on",className:`${p} ${r}`,...d}),(0,s.jsx)("div",{className:"absolute top-1/2 right-2.5 -translate-y-1/2 cursor-pointer",onClick:()=>{c((e=>"password"==e?"text":"password"))},children:"password"==o?(0,s.jsx)(n.A,{className:"fill-gray-500"}):(0,s.jsx)(i.A,{className:"fill-gray-500"})})]}):t?(0,s.jsxs)("div",{className:`w-full relative flex overflow-hidden rounded border border-solid border-gray-200 dark:border-gray-400 shadow-sm bg-white dark:bg-gray-800 ${r}`,children:["string"===typeof t?(0,s.jsx)("span",{className:"px-4 py-2 text-sm text-gray-500 dark:text-gray-300 bg-gray-100 dark:bg-gray-800 shadow-[rgb(0_0_0_/_10%)_-1px_0px_0px_inset]",children:t}):(0,s.jsx)("span",{className:"flex-center p-2 bg-transparent",children:t}),(0,s.jsx)("input",{className:`${p} ${r}`,type:e,...d})]}):(0,s.jsx)("input",{type:o,className:`${p} rounded border border-solid border-gray-200 dark:border-gray-400 shadow-sm ${r}`,...d})}},64166:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(49555),l=r(44109);const n=({compact:e=!1,title:t="",description:r="",buttons:n,children:i,className:s})=>(0,l.jsxs)("div",{className:(0,a.A)("rounded-lg bg-white dark:bg-gray-900 drop-shadow",e?"p-4 md:min-w-[406px] text-left":"p-5 md:p-8 md:min-w-[440px] text-center",s),children:[t&&(0,l.jsx)("h3",{className:"text-xl text-gray-600 dark:text-white mb-4 font-semibold",children:t}),r&&(0,l.jsx)("p",{className:"text-sm text-gray-400 dark:text-gray-100 mb-2",children:r}),i,n&&(0,l.jsx)("div",{className:"pt-4 w-full flex justify-end gap-4 items-center",children:n})]})},30696:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(76697),l=r(6133),n=r(68883),i=r(8983),s=r(44109);function d(e="right-start"){const[t,r]=(0,a.useState)(!1),[d,o]=(0,a.useState)({x:0,y:0}),c=()=>{r(!1)};return{ContextMenu:({key:e,items:r,children:a})=>(0,s.jsx)(l.Ay,{visible:t,followCursor:"initial",interactive:!0,placement:"right-start",popperOptions:{strategy:"fixed"},onClickOutside:c,content:(0,s.jsx)(i.A,{hideMenu:c,items:r}),children:a},e),offset:d,visible:t,hideContextMenu:c,handleContextMenuEvent:t=>{(0,n.cJ)(),t.preventDefault();const{currentTarget:a,clientX:l,clientY:i}=t,{left:s,top:d,width:c,height:u}=a.getBoundingClientRect();let h,m;"right-start"==e?(h=l-(s+c),m=d+u-i):(h=l-s,m=d-i),o({x:h,y:m}),r(!0)}}}},92577:(e,t,r)=>{r.d(t,{A:()=>d});var a=r(76697),l=r(67636),n=r(50595),i=r(36506),s=r(81477);function d(){const[e,t]=(0,a.useState)(""),r=(0,n.GV)((e=>{var t;return null===(t=e.authData.user)||void 0===t?void 0:t.is_admin}),i.bN),d=(0,n.GV)((e=>Object.values(e.users.byId)),i.bN),o=(0,n.GV)((e=>e.server.contact_verification_enable),i.bN),[c,u]=(0,a.useState)([]),h=o&&!r?d.filter((e=>"added"==e.status)):d;(0,a.useEffect)((()=>{if(e){let t=["",(0,l.escapeRegExp)(e.toLowerCase()),""].join(".*"),r=new RegExp(t);u((0,s.g4)(h.filter((e=>!!e&&r.test(e.name.toLowerCase())))))}else u((0,s.g4)(h))}),[e,h.length]);return{input:e,users:c,uids:c.map((e=>e.uid)),updateInput:e=>{t(e)}}}}}]);
\ No newline at end of file
diff --git a/static/js/194.3615133e.chunk.js b/static/js/194.3615133e.chunk.js
new file mode 100644
index 00000000..2f654c01
--- /dev/null
+++ b/static/js/194.3615133e.chunk.js
@@ -0,0 +1 @@
+"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[194],{4534:(e,t,a)=>{a.d(t,{A:()=>s});var l,r=a(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",n({width:20,height:20,viewBox:"0 0 20 20",stroke:"#344054",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,l||(l=r.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",strokeWidth:1.67,strokeLinecap:"round",strokeLinejoin:"round"}))),s=(0,r.forwardRef)(i)},77830:(e,t,a)=>{a.d(t,{A:()=>s});var l,r=a(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",n({width:20,height:20,viewBox:"0 0 20 20",fill:"#616161",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,l||(l=r.createElement("path",{d:"M6.48667 11.6667L6.83667 8.33333H3.325V6.66667H7L7.43333 2.5H9.10833L8.66667 6.66667H11.9833L12.4167 2.5H14.0917L13.65 6.66667H16.625V8.33333H13.4667L13.1167 11.6667H16.6167V13.3333H12.9333L12.4917 17.5H10.8083L11.2417 13.3333H7.91667L7.475 17.5H5.8L6.23333 13.3333H3.25V11.6667H6.4H6.48667ZM8.1625 11.6667H11.4875L11.8375 8.33333H8.5125L8.1625 11.6667Z"}))),s=(0,r.forwardRef)(i)},34214:(e,t,a)=>{a.d(t,{A:()=>s});var l,r=a(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",n({width:20,height:20,viewBox:"0 0 20 20",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,l||(l=r.createElement("path",{d:"M6 4C6 2.89543 6.89543 2 8 2H14C15.1046 2 16 2.89543 16 4V14C16 15.1046 15.1046 16 14 16H8C6.89543 16 6 15.1046 6 14V4ZM4 6.00001C4 5.25973 4.4022 4.61339 5 4.26758V14.5C5 15.8807 6.11929 17 7.5 17H13.7324C13.3866 17.5978 12.7403 18 12 18H7.5C5.567 18 4 16.433 4 14.5V6.00001Z"}))),s=(0,r.forwardRef)(i)},35279:(e,t,a)=>{a.d(t,{A:()=>s});var l,r=a(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",n({width:16,height:16,viewBox:"0 0 16 16",fill:"#344054",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,l||(l=r.createElement("path",{d:"M3.5 2C2.67157 2 2 2.67157 2 3.5V5.5C2 6.32843 2.67157 7 3.5 7H5.5C6.32843 7 7 6.32843 7 5.5V3.5C7 2.67157 6.32843 2 5.5 2H3.5ZM10.5 2C9.67157 2 9 2.67157 9 3.5V5.5C9 6.32843 9.67157 7 10.5 7H12.5C13.3284 7 14 6.32843 14 5.5V3.5C14 2.67157 13.3284 2 12.5 2H10.5ZM3.5 9C2.67157 9 2 9.67157 2 10.5V12.5C2 13.3284 2.67157 14 3.5 14H5.5C6.32843 14 7 13.3284 7 12.5V10.5C7 9.67157 6.32843 9 5.5 9H3.5ZM10.5 9C9.67157 9 9 9.67157 9 10.5V12.5C9 13.3284 9.67157 14 10.5 14H12.5C13.3284 14 14 13.3284 14 12.5V10.5C14 9.67157 13.3284 9 12.5 9H10.5Z"}))),s=(0,r.forwardRef)(i)},61679:(e,t,a)=>{a.d(t,{A:()=>s});var l,r=a(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",n({width:16,height:16,viewBox:"0 0 16 16",fill:"#344054",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,l||(l=r.createElement("path",{d:"M2 3.75C2 3.33579 2.33579 3 2.75 3H10.25C10.6642 3 11 3.33579 11 3.75C11 4.16421 10.6642 4.5 10.25 4.5H2.75C2.33579 4.5 2 4.16421 2 3.75ZM2 11.75C2 11.3358 2.33579 11 2.75 11H9.25C9.66421 11 10 11.3358 10 11.75C10 12.1642 9.66421 12.5 9.25 12.5H2.75C2.33579 12.5 2 12.1642 2 11.75ZM2.75 7C2.33579 7 2 7.33579 2 7.75C2 8.16421 2.33579 8.5 2.75 8.5H13.25C13.6642 8.5 14 8.16421 14 7.75C14 7.33579 13.6642 7 13.25 7H2.75Z"}))),s=(0,r.forwardRef)(i)},658:(e,t,a)=>{a.d(t,{A:()=>o});var l,r,n,i=a(76697);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.createElement("svg",s({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:c,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,l||(l=i.createElement("path",{d:"M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z",fill:"url(#paint0_linear_14171_23293)"})),r||(r=i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2431 5.96725C12.4162 5.86325 12.6357 5.87375 12.7982 5.99425C12.9602 6.11525 13.0342 6.32125 12.9857 6.51725L11.9857 10.5173C11.9297 10.7403 11.7297 10.8963 11.5002 10.8963H4.50018C4.27068 10.8963 4.07068 10.7397 4.01468 10.5173L3.01468 6.51725C2.96618 6.32125 3.04018 6.11525 3.20218 5.99425C3.36518 5.87425 3.58418 5.86375 3.75768 5.96725L5.84918 7.22225L7.58468 4.61875C7.59654 4.60096 7.61307 4.58921 7.62965 4.57743C7.63964 4.57033 7.64966 4.56321 7.65868 4.55475L7.17718 4.07275C7.08018 3.97575 7.08018 3.81625 7.17718 3.71925L7.82368 3.07275C7.92068 2.97575 8.08018 2.97575 8.17718 3.07275L8.82368 3.71925C8.92068 3.81625 8.92068 3.97575 8.82368 4.07275L8.34218 4.55475C8.3512 4.56338 8.3614 4.57062 8.37161 4.57787C8.38802 4.58951 8.40447 4.60119 8.41618 4.61875L10.1517 7.22225L12.2431 5.96725ZM4.00025 11.3962H12.0002V12.3963H4.00025V11.3962Z",fill:"#ECE9FE"})),n||(n=i.createElement("defs",null,i.createElement("linearGradient",{id:"paint0_linear_14171_23293",x1:0,y1:0,x2:16,y2:-1.66785e-9,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"#7F56D9"}),i.createElement("stop",{offset:1,stopColor:"#9E77ED"}))))),o=(0,i.forwardRef)(c)},21049:(e,t,a)=>{a.d(t,{A:()=>s});var l,r=a(76697);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement("svg",n({width:24,height:24,viewBox:"0 0 24 24",fill:"#70707B",xmlns:"http://www.w3.org/2000/svg",ref:i,"aria-labelledby":t},a),e?r.createElement("title",{id:t},e):null,l||(l=r.createElement("path",{d:"M10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 11.7101 16.9276 13.2866 15.964 14.5483L20.7071 19.2929C21.0976 19.6834 21.0976 20.3166 20.7071 20.7071C20.3466 21.0676 19.7794 21.0953 19.3871 20.7903L19.2929 20.7071L14.5483 15.964C13.2866 16.9276 11.7101 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5ZM10 4.5C6.96243 4.5 4.5 6.96243 4.5 10C4.5 13.0376 6.96243 15.5 10 15.5C13.0376 15.5 15.5 13.0376 15.5 10C15.5 6.96243 13.0376 4.5 10 4.5Z"}))),s=(0,r.forwardRef)(i)},71207:(e,t,a)=>{a.d(t,{A:()=>u});var l,r,n=a(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.createElement("svg",i({width:20,height:20,viewBox:"0 0 20 20",fill:"#616161",xmlns:"http://www.w3.org/2000/svg",ref:s,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,l||(l=n.createElement("path",{d:"M6.83667 8.33333L6.48667 11.6667H6.4H3.25V13.3333H6.23333L5.8 17.5H7.475L7.91667 13.3333H11.2417L10.8083 17.5H12.4917L12.9333 13.3333H16.6167V11.6667H13.1167L13.2917 10H11.6625L11.4875 11.6667H8.1625L8.5125 8.33333H10.8334V6.66667H8.66667L9.10833 2.5H7.43333L7 6.66667H3.325V8.33333H6.83667Z"})),r||(r=n.createElement("path",{d:"M16.6875 4.16675V3.33341C16.6875 2.40008 15.875 1.66675 15 1.66675C14.125 1.66675 13.3333 2.40008 13.3333 3.33341V4.16675C12.8731 4.16675 12.5 4.53985 12.5 5.00008V7.50008C12.5 7.96031 12.8731 8.33341 13.3333 8.33341H15H16.6667C17.1269 8.33341 17.5 7.96031 17.5 7.50008V4.97925C17.5 4.53051 17.1362 4.16675 16.6875 4.16675ZM15.8333 4.16675H14.1667V3.33341C14.1667 2.85722 14.5556 2.50008 15 2.50008C15.4444 2.50008 15.8333 2.85722 15.8333 3.33341V4.16675Z"}))),c=(0,n.forwardRef)(s);var o=a(77830),d=a(44109);const u=({personal:e=!1,muted:t=!1,className:a=""})=>(0,d.jsx)("div",{className:`flex ${t?"!text-gray-400":""} ${a}`,children:e?(0,d.jsx)(c,{className:"dark:fill-gray-300"}):(0,d.jsx)(o.A,{className:"dark:fill-gray-300"})})},93734:(e,t,a)=>{a.d(t,{A:()=>C});var l=a(76697),r=a(49555),n=a(50595),i=a(81325),s=a(81477),c=a(44109);const o=({url:e})=>{const[t,a]=(0,l.useState)(!1);return e?(0,c.jsx)("div",{className:"flex-center h-full",children:t?(0,c.jsx)("div",{className:"p-[18px] text-gray-500",children:"Unable to play this audio"}):(0,c.jsx)("audio",{className:"w-full",controls:!0,src:e,onError:e=>{console.error("audio err",e),a(!0)}})}):null},d=({url:e})=>{const[t,a]=(0,l.useState)("");return(0,l.useEffect)((()=>{(async e=>{if(!e)return;const t=await fetch(e),l=await t.text();a(l)})(e)}),[e]),t?(0,c.jsx)("div",{className:"h-[218px] p-[15px] pb-0 bg-black text-white overflow-scroll whitespace-pre-wrap break-all leading-snug",children:t}):null},u=({url:e})=>{const[t,a]=(0,l.useState)("");return(0,l.useEffect)((()=>{(async e=>{if(!e)return;const t=await fetch(e),l=await t.text();a(l)})(e)}),[e]),t?(0,c.jsx)("div",{className:"bg-white h-[218px] p-[15px] pb-0 whitespace-pre-wrap break-all",children:t}):null};var h=a(91076),f=a(95184);const p=({url:e,alt:t})=>{const[a,{error:n,isSuccess:i}]=(0,f.eA)(),[s,o]=(0,l.useState)("loading");return(0,l.useEffect)((()=>{e&&a(e)}),[e]),(0,l.useEffect)((()=>{if(i&&e){const t=new Image;t.onload=()=>{o("loaded")},t.onerror=()=>{o("error")},t.src=e}if(n){const e=n.status;if(404===e)o(404)}}),[i,n,e]),(0,c.jsx)("div",{className:(0,r.A)("h-[218px] overflow-hidden flex-center","error"==s&&"bg-red-100 dark:bg-red-200/60"),children:"loaded"==s?(0,c.jsx)("img",{className:"w-full h-full object-cover",src:e,alt:t}):"loading"==s?(0,c.jsx)("span",{children:(0,c.jsx)(h.A,{color:"rgb(21,91,117)"})}):404==s?(0,c.jsx)("span",{className:"text-lg text-orange-500",children:"File not found, removed maybe"}):(0,c.jsx)("span",{className:"text-lg text-red-800",children:"Load image error"})})},m=({url:e})=>(0,c.jsx)("div",{className:"p-2 overflow-hidden",children:(0,c.jsx)("embed",{className:"w-full h-full",src:e,type:"application/pdf"})}),v=({url:e})=>(0,c.jsx)("div",{className:"h-[218px]",children:(0,c.jsx)("video",{className:"w-full h-full object-cover",controls:!0,src:e})});var g=a(36506),x=a(18811);const C=({preview:e,flex:t,file_type:a,name:h,size:f,created_at:C,from_uid:w,content:b})=>{const[j,y]=(0,l.useState)(!1),{isExpired:E,setExpired:H}=(0,i.A)(),L=(0,n.GV)((e=>e.users.byId[w]),g.bN),k=(0,s.I3)(a,h,"icon w-9 h-12"),N=E(b);if((0,l.useEffect)((()=>{!N&&b&&(async e=>{try{(await fetch(e)).status>=400&&y(!0)}catch(t){y(!0)}})(b)}),[b,N]),(0,l.useEffect)((()=>{j&&H(b)}),[j,b]),!b||N||j)return null;const _=(e=>{const{file_type:t,name:a="",content:l}=e;let r=null;const n={image:/^image/gi,audio:/^audio/gi,video:/^video/gi,code:/(json|javascript|java|rb|c|php|xml|css|html)$/gi,doc:/^text/gi,pdf:/\/pdf$/gi},i=a.split("."),s=t||i[i.length-1];switch(!0){case n.image.test(s):r=(0,c.jsx)(p,{url:l});break;case n.pdf.test(s):r=(0,c.jsx)(m,{url:l});break;case n.code.test(s):r=(0,c.jsx)(d,{url:l});break;case n.doc.test(s):r=(0,c.jsx)(u,{url:l});break;case n.audio.test(s):r=(0,c.jsx)(o,{url:l});break;case n.video.test(s):r=(0,c.jsx)(v,{url:l})}return r})({file_type:a,content:b,name:h}),V=e&&_&&!j&&!N;return(0,c.jsxs)("div",{className:(0,r.A)("rounded-md border border-solid border-gray-300 dark:border-gray-500 bg-gray-100 dark:bg-gray-900",t?"w-full":"w-72 md:w-[370px]",V?"relative overflow-hidden h-[281px]":"h-[66px] ",a.startsWith("audio")&&"h-[125px]"),children:[(0,c.jsxs)("div",{className:"w-full p-2 flex items-center justify-between gap-2",children:[k,(0,c.jsxs)("div",{className:"flex flex-col gap-1 w-full overflow-hidden",children:[(0,c.jsx)("span",{className:"font-semibold text-sm text-gray-800 dark:text-gray-200 truncate",children:h}),(0,c.jsxs)("em",{className:"text-xs text-gray-500 flex gap-4 not-italic",children:[(0,c.jsx)("span",{className:"size",children:(0,s.z3)(f)}),(0,c.jsx)("span",{className:"hidden md:block time",children:(0,s._T)(C)}),(0,c.jsxs)("span",{children:["by ",(0,c.jsx)("strong",{className:"font-bold",children:(null===L||void 0===L?void 0:L.name)||"Deleted User"})]})]})]}),(0,c.jsx)(x.A,{copyLink:b,downloadLink:`${b}&download=true`})]}),V&&(0,c.jsx)("div",{className:"h-[calc(100%_-_64px)] overflow-hidden",children:_})]})}},18811:(e,t,a)=>{a.d(t,{A:()=>u});var l,r=a(49844),n=a(76697);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"#fff",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,l||(l=n.createElement("path",{d:"M16.5303 11.7204L16.4462 11.6478C16.1526 11.4299 15.7359 11.4541 15.4697 11.7204L12.7503 14.4397L12.75 7.75003L12.7432 7.64826C12.6935 7.28218 12.3797 7.00003 12 7.00003L11.8982 7.00688C11.5322 7.05654 11.25 7.37033 11.25 7.75003L11.2503 14.4417L8.52961 11.7198L8.4455 11.6472C8.15193 11.4293 7.73527 11.4534 7.46895 11.7196C7.176 12.0124 7.17591 12.4873 7.46875 12.7803L11.4687 16.7818L11.5529 16.8544C11.8465 17.0724 12.2632 17.0482 12.5295 16.7819L16.5303 12.7811L16.6029 12.6969C16.8208 12.4033 16.7966 11.9867 16.5303 11.7204ZM6.25 3C4.45507 3 3 4.45507 3 6.25V17.75C3 19.5449 4.45507 21 6.25 21H17.75C19.5449 21 21 19.5449 21 17.75V6.25C21 4.45507 19.5449 3 17.75 3H6.25ZM4.5 6.25C4.5 5.2835 5.2835 4.5 6.25 4.5H17.75C18.7165 4.5 19.5 5.2835 19.5 6.25V17.75C19.5 18.7165 18.7165 19.5 17.75 19.5H6.25C5.2835 19.5 4.5 18.7165 4.5 17.75V6.25Z"}))),c=(0,n.forwardRef)(s);var o=a(34214),d=a(44109);const u=({copyLink:e,downloadLink:t})=>{const{copy:a,copied:l}=(0,r.A)();return(0,d.jsxs)("div",{className:"flex flex-col-reverse gap-1.5 items-center",children:[(0,d.jsx)("button",{className:"hidden md:block whitespace-nowrap",disabled:l,onClick:a.bind(null,e,!1),children:(0,d.jsx)(o.A,{className:"size-6 fill-gray-500 dark:fill-gray-400"})}),(0,d.jsx)("a",{className:"hidden md:block whitespace-nowrap",download:name,href:t,children:(0,d.jsx)(c,{className:"fill-gray-500 dark:fill-gray-400"})})]})}},73914:(e,t,a)=>{a.d(t,{A:()=>L});var l,r,n,i=a(76697),s=a(24892),c=a(6133),o=a(49555),d=a(50595),u=a(30696);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.createElement("svg",h({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:s,"aria-labelledby":t},a),e?i.createElement("title",{id:t},e):null,l||(l=i.createElement("circle",{cx:8,cy:8,r:8,fill:"#155EEF"})),i.createElement("mask",{id:"mask0_19353_2918",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:12,height:12},r||(r=i.createElement("rect",{x:2,y:2,width:12,height:12,fill:"#D9D9D9"}))),n||(n=i.createElement("g",{mask:"url(#mask0_19353_2918)"},i.createElement("path",{d:"M4.5 12.5C4.35833 12.5 4.23958 12.4521 4.14375 12.3562C4.04792 12.2604 4 12.1417 4 12V10C4 9.725 4.09792 9.48958 4.29375 9.29375C4.48958 9.09792 4.725 9 5 9H11C11.275 9 11.5104 9.09792 11.7062 9.29375C11.9021 9.48958 12 9.725 12 10V12C12 12.1417 11.9521 12.2604 11.8562 12.3562C11.7604 12.4521 11.6417 12.5 11.5 12.5H4.5ZM6.5 8.5C5.80833 8.5 5.21875 8.25625 4.73125 7.76875C4.24375 7.28125 4 6.69167 4 6C4 5.30833 4.24375 4.71875 4.73125 4.23125C5.21875 3.74375 5.80833 3.5 6.5 3.5H9.5C10.1917 3.5 10.7812 3.74375 11.2687 4.23125C11.7562 4.71875 12 5.30833 12 6C12 6.69167 11.7562 7.28125 11.2687 7.76875C10.7812 8.25625 10.1917 8.5 9.5 8.5H6.5ZM5 11.5H11V10H5V11.5ZM6.5 7.5H9.5C9.91667 7.5 10.2708 7.35417 10.5625 7.0625C10.8542 6.77083 11 6.41667 11 6C11 5.58333 10.8542 5.22917 10.5625 4.9375C10.2708 4.64583 9.91667 4.5 9.5 4.5H6.5C6.08333 4.5 5.72917 4.64583 5.4375 4.9375C5.14583 5.22917 5 5.58333 5 6C5 6.41667 5.14583 6.77083 5.4375 7.0625C5.72917 7.35417 6.08333 7.5 6.5 7.5ZM6.5 6.5C6.64167 6.5 6.76042 6.45208 6.85625 6.35625C6.95208 6.26042 7 6.14167 7 6C7 5.85833 6.95208 5.73958 6.85625 5.64375C6.76042 5.54792 6.64167 5.5 6.5 5.5C6.35833 5.5 6.23958 5.54792 6.14375 5.64375C6.04792 5.73958 6 5.85833 6 6C6 6.14167 6.04792 6.26042 6.14375 6.35625C6.23958 6.45208 6.35833 6.5 6.5 6.5ZM9.5 6.5C9.64167 6.5 9.76042 6.45208 9.85625 6.35625C9.95208 6.26042 10 6.14167 10 6C10 5.85833 9.95208 5.73958 9.85625 5.64375C9.76042 5.54792 9.64167 5.5 9.5 5.5C9.35833 5.5 9.23958 5.54792 9.14375 5.64375C9.04792 5.73958 9 5.85833 9 6C9 6.14167 9.04792 6.26042 9.14375 6.35625C9.23958 6.45208 9.35833 6.5 9.5 6.5Z",fill:"white"})))),p=(0,i.forwardRef)(f);var m=a(658),v=a(52718),g=a(29410),x=a(39265),C=a(32812),w=a(8983),b=a(44109);const j=({enable:e=!1,uid:t,cid:a,visible:l,hide:r,children:n})=>{const{t:i}=(0,x.Bd)("member"),{t:s}=(0,x.Bd)("chat"),{blockThisContact:o,removeFromContact:d,copyEmail:u,canCopyEmail:h,startChat:f,canRemove:p,canRemoveFromContact:m,canBlock:v,canRemoveFromChannel:g,removeFromChannel:j,removeUser:y,isAdmin:E,canUpdateRole:H,updateRole:L}=(0,C.A)({uid:t,cid:a});return(0,b.jsx)(c.Ay,{disabled:!e,visible:l,followCursor:"initial",interactive:!0,placement:"right-start",popperOptions:{strategy:"fixed"},onClickOutside:r,content:(0,b.jsx)(w.A,{hideMenu:r,items:[{title:i("send_msg"),handler:f},h&&{title:i("copy_email"),handler:u},H&&{title:i("roles"),handler:L,subs:[{title:i("set_normal"),checked:!E,handler:L},{title:i("set_admin"),checked:E,handler:L}]},g&&{danger:!0,title:i("remove_from_channel"),handler:j},m&&{danger:!0,title:i("remove_from_contact"),handler:d},v&&{danger:!0,title:s("block"),handler:o},p&&{danger:!0,title:i("remove"),handler:y}].filter(Boolean)}),children:n},t)};var y=a(36506),E=a(81477);const H=({cid:e,uid:t,dm:a=!1,interactive:l=!0,popover:r=!1,compact:n=!1,avatarSize:i=32,enableContextMenu:h=!1,enableNavToSetting:f=!1,...x})=>{const C=(0,s.Zp)(),{visible:w,handleContextMenuEvent:H,hideContextMenu:L}=(0,u.A)(),k=(0,d.GV)((e=>e.users.byId[t]),y.bN),N=(0,d.GV)((e=>{var t;return null===(t=e.authData.user)||void 0===t?void 0:t.uid}),y.bN),_=(0,d.GV)((e=>e.server.show_user_online_status),y.bN),V=()=>{C(`/chat/dm/${t}`)};if(!k)return null;const A=k.online||k.uid==N,M=(0,o.A)("relative flex items-center justify-start gap-2 rounded-lg select-none",l&&"md:hover:bg-gray-500/10",n?"p-0":"p-2",f&&"cursor-pointer"),O=(0,o.A)("text-sm text-gray-500 max-w-[190px] truncate font-semibold dark:text-white"),Z=!!k.widget_id,R="absolute -bottom-[2.5px] -right-[2.5px] border-content rounded-full border-[1px] border-white dark:border-gray-300",I=(0,o.A)(R,A?"bg-green-500":"bg-zinc-400",n?"w-[15px] h-[15px]":"w-3 h-3"),B=k.is_bot?(0,b.jsx)("div",{className:R,children:(0,b.jsx)(p,{className:n?"w-[15px] h-[15px]":"w-3 h-3"})}):_?(0,b.jsx)("div",{className:I}):null;return r?(0,b.jsx)(j,{cid:e,uid:t,enable:h,visible:w,hide:L,children:(0,b.jsx)(c.Ay,{inertia:!0,interactive:!0,placement:"left",trigger:"click",content:(0,b.jsx)(g.A,{uid:t,type:"card",cid:e}),children:(0,b.jsxs)("div",{className:M,onDoubleClick:a?V:void 0,onContextMenu:h?H:void 0,...x,children:[(0,b.jsxs)("div",{className:"cursor-pointer relative",style:{width:`${i}px`,height:`${i}px`},children:[(0,b.jsx)(v.A,{className:"w-full h-full rounded-full object-cover",width:i,height:i,src:k.avatar,name:k.name,alt:"avatar"}),B]}),!n&&(0,b.jsx)("span",{className:O,title:null===k||void 0===k?void 0:k.name,children:null===k||void 0===k?void 0:k.name}),!n&&k.is_admin&&!k.is_bot&&(0,b.jsx)(m.A,{})]})})}):(0,b.jsx)(j,{cid:e,uid:t,enable:h,visible:w,hide:L,children:(0,b.jsxs)("div",{className:M,onClick:f?()=>{C(`/setting/dm/${t}/overview?f=/chat/dm/${t}`)}:void 0,onDoubleClick:a?V:void 0,onContextMenu:h?H:void 0,...x,children:[(0,b.jsxs)("div",{className:"cursor-pointer relative",style:{width:`${i}px`,height:`${i}px`},children:[(0,b.jsx)(v.A,{className:(0,E.cn)("size-full rounded-full object-cover",Z&&"ring-2 ring-orange-500"),title:k.widget_id,width:i,height:i,src:k.avatar,name:k.name,alt:"avatar"}),B]}),!n&&(0,b.jsx)("span",{className:O,title:null===k||void 0===k?void 0:k.name,children:null===k||void 0===k?void 0:k.name}),!n&&k.is_admin&&!k.is_bot&&(0,b.jsx)(m.A,{})]})})},L=(0,i.memo)(H,((e,t)=>e.uid==t.uid))},30696:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(76697),r=a(6133),n=a(68883),i=a(8983),s=a(44109);function c(e="right-start"){const[t,a]=(0,l.useState)(!1),[c,o]=(0,l.useState)({x:0,y:0}),d=()=>{a(!1)};return{ContextMenu:({key:e,items:a,children:l})=>(0,s.jsx)(r.Ay,{visible:t,followCursor:"initial",interactive:!0,placement:"right-start",popperOptions:{strategy:"fixed"},onClickOutside:d,content:(0,s.jsx)(i.A,{hideMenu:d,items:a}),children:l},e),offset:c,visible:t,hideContextMenu:d,handleContextMenuEvent:t=>{(0,n.cJ)(),t.preventDefault();const{currentTarget:l,clientX:r,clientY:i}=t,{left:s,top:c,width:d,height:u}=l.getBoundingClientRect();let h,f;"right-start"==e?(h=r-(s+d),f=c+u-i):(h=r-s,f=c-i),o({x:h,y:f}),a(!0)}}}},81325:(e,t,a)=>{a.d(t,{A:()=>r});var l=a(60482);const r=()=>{const[e,t,a]=(0,l.B)("EXPIRED_FILES_MAP",{});return{setExpired:a=>{const l=new URL(a).searchParams.get("file_path");l&&!e[l]&&t((e=>({...e,[l]:Date.now()})))},isExpired:t=>{const a=new URL(t).searchParams.get("file_path");return!(!a||!e[a])},clearExpired:()=>{a()}}}},50793:(e,t,a)=>{a.d(t,{A:()=>i});var l=a(76697),r=a(50595),n=a(36506);function i(){const[e,t]=(0,l.useState)(""),a=(0,r.GV)((e=>Object.values(e.channels.byId)),n.bN),[i,s]=(0,l.useState)([]);(0,l.useEffect)((()=>{if(e){let t=["",...e.toLowerCase(),""].join(".*"),l=new RegExp(t);s(a.filter((e=>!!e&&l.test(e.name.toLowerCase()))))}else s(a)}),[e]);return{input:e,channels:i,updateInput:e=>{t(e)}}}},92577:(e,t,a)=>{a.d(t,{A:()=>c});var l=a(76697),r=a(67636),n=a(50595),i=a(36506),s=a(81477);function c(){const[e,t]=(0,l.useState)(""),a=(0,n.GV)((e=>{var t;return null===(t=e.authData.user)||void 0===t?void 0:t.is_admin}),i.bN),c=(0,n.GV)((e=>Object.values(e.users.byId)),i.bN),o=(0,n.GV)((e=>e.server.contact_verification_enable),i.bN),[d,u]=(0,l.useState)([]),h=o&&!a?c.filter((e=>"added"==e.status)):c;(0,l.useEffect)((()=>{if(e){let t=["",(0,r.escapeRegExp)(e.toLowerCase()),""].join(".*"),a=new RegExp(t);u((0,s.g4)(h.filter((e=>!!e&&a.test(e.name.toLowerCase())))))}else u((0,s.g4)(h))}),[e,h.length]);return{input:e,users:d,uids:d.map((e=>e.uid)),updateInput:e=>{t(e)}}}}}]);
\ No newline at end of file
diff --git a/static/js/195.1fc32614.chunk.js b/static/js/195.1fc32614.chunk.js
deleted file mode 100644
index 91ecc090..00000000
--- a/static/js/195.1fc32614.chunk.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[195],{63734:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:16,height:16,viewBox:"0 0 16 16",fill:"#6C737F",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M8.11904 0C3.91105 0 0.5 3.41105 0.5 7.61905C0.5 11.827 3.91105 15.2381 8.11904 15.2381C12.3271 15.2381 15.7381 11.827 15.7381 7.61905C15.7381 3.41105 12.3263 0 8.11904 0ZM11.7053 10.128L10.628 11.2053L8.11904 8.69714L5.61009 11.2053L4.53277 10.128L7.04095 7.61905L4.532 5.1101L5.60934 4.03353L8.11829 6.54248L10.6272 4.03353L11.7045 5.1101L9.19638 7.61905L11.7053 10.128Z"}))),c=(0,l.forwardRef)(r)},6691:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:20,height:20,viewBox:"0 0 20 20",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M6 4C6 2.89543 6.89543 2 8 2H14C15.1046 2 16 2.89543 16 4V14C16 15.1046 15.1046 16 14 16H8C6.89543 16 6 15.1046 6 14V4ZM4 6.00001C4 5.25973 4.4022 4.61339 5 4.26758V14.5C5 15.8807 6.11929 17 7.5 17H13.7324C13.3866 17.5978 12.7403 18 12 18H7.5C5.567 18 4 16.433 4 14.5V6.00001Z"}))),c=(0,l.forwardRef)(r)},71389:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M12 3.25C13.4346 3.25 14.6126 4.34848 14.7388 5.75019L19 5.75C19.4142 5.75 19.75 6.08579 19.75 6.5C19.75 6.8797 19.4678 7.19349 19.1018 7.24315L19 7.25H18.417L17.1499 18.2292C17.0335 19.2384 16.179 20 15.1631 20H8.83688C7.821 20 6.9665 19.2384 6.85006 18.2292L5.582 7.25H5C4.6203 7.25 4.30651 6.96785 4.25685 6.60177L4.25 6.5C4.25 6.1203 4.53215 5.80651 4.89823 5.75685L5 5.75L9.26119 5.75019C9.38741 4.34848 10.5654 3.25 12 3.25ZM10.5 9.5C10.2545 9.5 10.0504 9.65477 10.0081 9.85886L10 9.9375V16.0625L10.0081 16.1411C10.0504 16.3452 10.2545 16.5 10.5 16.5C10.7455 16.5 10.9496 16.3452 10.9919 16.1411L11 16.0625V9.9375L10.9919 9.85886C10.9496 9.65477 10.7455 9.5 10.5 9.5ZM13.5 9.5C13.2545 9.5 13.0504 9.65477 13.0081 9.85886L13 9.9375V16.0625L13.0081 16.1411C13.0504 16.3452 13.2545 16.5 13.5 16.5C13.7455 16.5 13.9496 16.3452 13.9919 16.1411L14 16.0625V9.9375L13.9919 9.85886C13.9496 9.65477 13.7455 9.5 13.5 9.5ZM12 4.75C11.3952 4.75 10.8908 5.17947 10.775 5.75005H13.225C13.1092 5.17947 12.6048 4.75 12 4.75Z",fill:"#D92D20"}))),c=(0,l.forwardRef)(r)},31872:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M13.7036 5.75927L18.2405 10.2962L9.33146 19.2052C9.08325 19.4534 8.77457 19.6325 8.43593 19.7249L3.84998 20.9756C3.34808 21.1124 2.88755 20.6519 3.02443 20.15L4.27515 15.5641C4.3675 15.2254 4.54664 14.9167 4.79484 14.6685L13.7036 5.75927ZM20.0604 3.93956C21.3132 5.19232 21.3132 7.22343 20.0604 8.47618L19.1907 9.34506L14.6538 4.80903L15.5238 3.93956C16.7766 2.68681 18.8077 2.68681 20.0604 3.93956Z"}))),c=(0,l.forwardRef)(r)},27820:(e,s,t)=>{t.d(s,{A:()=>m});var a=t(2497),l=(t(45347),t(95380)),i=t(80724),r=t(92316),c=t(52205),n=t(99264);const d=({uid:e,popover:s=!0,cid:t,textOnly:a=!1})=>{const d=(0,i.GV)((e=>e.users.byId),c.bN)[e];return d?a?(0,n.jsx)(n.Fragment,{children:`@${d.name}`}):s?(0,n.jsx)(l.Ay,{interactive:!0,placement:"top",trigger:"click",content:(0,n.jsx)(r.A,{uid:e,type:"card",cid:t}),children:(0,n.jsx)("span",{className:"px-0.5 text-primary-400 cursor-pointer",children:`@${d.name}`})}):(0,n.jsx)("span",{className:"px-0.5 text-primary-400",children:`@${d.name}`}):null};var o=t(81084),u=t(54697),x=t(13050);const j="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAA51BMVEUAAABGiMdGiMdGiMdOiMdHicdHh8dGh8dGiMdGiMZGh8dGh8dGh8dHiMdGh8dGiMdGh8dHiMdGh8dGiMdGichHisRHiMZEhsZGh8hHiMZHh8dHiMff8P5HiMdKisnc7v3a7PzU6PpYlM5UkcxNjMqHtN+/2vOaweWpy+qew+aNuOFgmdB/rtx8rdt4qtqmyunP5fjK4vey0u50p9hrodXC3PNlndNblc9QjsuWvuRwpNa82PGCsN3D3fSTvOJon9RhmtFdmNCgxefF3/W21O+v0O2QuuKEst6jx+iJteDV6vuszey31fCy8/ecAAAAHHRSTlMAMP34CD21kdnn5O/t0szAq31nUSAenQ83i4B6ZYuUjgAABgtJREFUWMPVWGlj2jAMHdBjPdaWbm13+JmEhPsqJdxnD2C0+/+/Z7FskaxQepAv0wcIWHmyJFuW36f/XnZ2zy+/HCXgS+Loy+X57s42aN9/nibwTBKnP79/DO1b8jNIXK8Fp993MPZckHxOfns3XOwsDjhpYJK3slIOhWhKmbVqEyDtAPGz2Pvg9gC3POrAyQshepgJX4po+J95B51RWQJ7b4e82o/DzVzngKrtQ9zDfVSAjy6G/pddBXK2byx+efU2vK8HkAtbzICcUDJARpBkMKfvHDAT9kLi4Otb1sk+0MoKMYJ8otdTHdxrwHt0UvSQl+gKMfSAy51Xc3sCWVDvMJ64wUQYmeBBP0wlfqupSpy8ku/YIdJZXzVLbxiPuww4wsA83cEltTYONuZm9wg9lQDrFhlGSbPHvpNI8+McJUtlyMPR7ga8BKoWrRClzoFzxFIc1M2TNcGMvqtIvIgYO8IgJchhmWWM36gEgFUORKCTKuMo9kI+DlBNkc4ERcFSwV0AWAihFzHR2lUcXqxdLyfwtJ813FqC5RbDALCJkmCx2sjrddXDybrVs4/2o1a4RT54DTIVAKYkyBTb1UN2G/tr9gc4bnmlyNJHS4Rkgj4/kmGOZ3xlz1wdoLDUq4WjNggDlsMRrS0DkMPB1YrDnhl8QDvkZIbt8JuZUADavHPE+LnTsbjk2FfQDSH0cBMGvEEj9KuL8jJb8X/Xzh62lr1/J4jtJTzFs2AlNyjsLHXevSxp1EO/7oIILHAW2iNx95oH5mlbBGKnOQmcpGfDc368lvFgvyRREVtLBb+WgJ/xsD3gDT4vz3OkU9sDphxwB/ATCxGBZJA0gKe4iQJwilNTtxLyMQrAR5nY0YUfLVpgei2WAVdFdAaVeg+o6uMJuKb6DU8lFGOhfyFL+aDl2oI+DM4xEKTUU0ptAE1a4GqFF4FbIQgYUxUnMlsAXGMcBX3yV+jnuSk0OUFKjlqfgEKiGQ/JNiw/gy6AGQGreDcB1Mk4IxFuFz90YaCcNLVTefhS9gMCahNs7VQf0A50AFvjP5Fx7cBEOzU1BeILhtRxkPGM6tZKBEHbtAT8VrYx8UOrIEq6qGFGxlvKQEqScdHEFwI8xLVR6ipjPV/pUUWgq/sGZFRA21XgXkVgYHLUUMblQs1iaMJfN3vlGLZRqigXi3PgQQH90WUenvK00gVqgj58eaC0luDlgZHSGVGpwDEBJpAySiU1hZuamtwY0tJW4aopFPrAXFShq5clAVsZr6upFo1xCwkGNErS8sdsUnL5tHN8jALQtKT/zy33JS0fY6rcTaMjemScANllVsqOUVIYjg+64IKLp6pKSAvSlqjyvkVOGac5O2ScXOaksFJBqqCrnpfWBberaRX0hT9smlpKcJmM5+jfjDBJ4WXDSg2gRko9GCu0fijoT/Rv1tRnwOtgQMM9Ns7LZg9TVuoAdVJy0eZeRKp/H2jYVa6TqNiRccv/j4zrhc1bj5UAx+RQn7i8jaVlhr2g4PtS18NknLceFwdWoqCPgaARLAJo8fAsaFEAh4cr3Kecc/liJRP0BYD7oG4CCzMcVOImG5+aYqLLFxdYW0QgNhI7fARMowB8wunykMpEe0h9hxPNMRqL/KBnSaIcSSsSfbMUfTvHEkMEEou+JV7ftJc3Ne1T8pFltL5pNyVnvN214sfqxSdn1EofufgcXm26mrU3XM2ya65mfbqarbk82qxYe+HyaElprU7QTmN//fV2bPEU33O9tTy63q7Kt8PQBXx91Aoor17AG3wBX0cRlEmnKdF/B0VwHHsPiVF/gcQoGRKjgcTuRprFs7X6fDPNMljSLMe7rxFBfeWQi7tNRFABbnMzEcRycQKZo0wjv0JVlUJUVd5QVRevkmk/4kSmdSHzK2SaEybTmmMm016n+5AJ0X3z53Rfl+i+DHDI++MNk5TzMCFp04Zwcc+E5HXRRXz/6h2UqQ9ZUZRpjUpYMaBMa4oyrUjE92IfI3VLtYDUbVq10gdIXc73L0M7y/HY0M5jaWjnXxcfJMaT64jxZGxr6v5YwcYTx5q6/9/lLwwJNCus1PtUAAAAAElFTkSuQmCC";function M({url:e=""}){const s=(0,c.wA)(),[t,a]=(0,o.useState)(""),[l,{isLoading:r}]=(0,u.Q5)(),d=(0,i.GV)((s=>s.footprint.og[e]),c.bN),[M,m]=(0,o.useState)(null);(0,o.useEffect)((()=>{if(d){var s;const e=(null===d||void 0===d?void 0:d.title)||(null===d||void 0===d?void 0:d.site_name)||"",t=(null===d||void 0===d?void 0:d.description)||"",l=(null===d||void 0===d||null===(s=d.images.find((e=>!!e.url)))||void 0===s?void 0:s.url)||"",i=(null===d||void 0===d?void 0:d.favicon_url)||j;a(i),m({title:e,description:t,ogImage:l})}else e&&l(e)}),[e,d]);if(r)return(0,n.jsx)("div",{className:"h-28"});if(!e||!M||!M.title)return null;const{title:g,description:N,ogImage:h}=M,p="flex items-center border border-solid border-gray-300 dark:border-gray-600 box-border rounded-md w-[80%] md:w-[380px]";return h?(0,n.jsxs)("a",{className:`${p} flex-col !items-start p-3`,href:e,target:"_blank",rel:"noreferrer",children:[(0,n.jsx)("h3",{className:"text-primary-500 w-full truncate",children:g}),(0,n.jsx)("p",{className:"text-xs text-gray-400 mb-2 w-full truncate",children:N}),(0,n.jsx)("div",{className:"w-full h-[180px]",children:(0,n.jsx)("img",{className:"w-full h-full object-cover",onError:()=>{s((0,x.M3)({key:e,value:{...d,images:[]}}))},src:h,alt:"og image"})})]}):(0,n.jsxs)("a",{className:`${p} gap-2 px-2 py-3`,href:e,target:"_blank",rel:"noreferrer",children:[t&&(0,n.jsx)("div",{className:"flex rounded",children:(0,n.jsx)("img",{className:"object-contain w-12 h-12",onError:()=>{a(j)},src:t,alt:"favicon"})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("h3",{className:"text-sm text-gray-900 dark:text-gray-100",children:g}),(0,n.jsx)("p",{className:"hidden md:block text-xs text-gray-500 w-[288px] truncate",children:N}),(0,n.jsx)("span",{className:"text-[10px] text-gray-500 w-[288px] truncate",children:e})]})]})}const m=({url:e=!0,mention:s=!0,mentionTextOnly:t=!1,mentionPopOver:l=!0,linkPreview:i=!0,text:r,cid:c})=>(0,n.jsx)(a.A,{options:{render:{email:({content:e,attributes:{href:s}})=>t?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)("a",{className:"text-primary-500",href:s,rel:"noreferrer",children:e}),url:({content:s,attributes:{href:t}})=>e&&s.startsWith("http")?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{className:"text-primary-500",target:"_blank",href:t,rel:"noreferrer",children:s}),i&&(0,n.jsx)(M,{url:t})]}):(0,n.jsx)(n.Fragment,{children:s}),mention:({content:e})=>{if(!s)return(0,n.jsx)(n.Fragment,{children:e});if(/@[0-9]+/.test(e)){const s=e.trim().slice(1);return(0,n.jsx)(d,{uid:+s,cid:c,popover:l,textOnly:t})}return(0,n.jsx)(n.Fragment,{children:e})}}},children:r})},61082:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(81084),l=t(13631);function i(){const[e,s]=(0,a.useState)(!1),[t,i]=(0,a.useState)(),{data:r}=(0,l.Hx)(void 0,{refetchOnMountOrArgChange:!0}),[c,{isSuccess:n}]=(0,l.Vi)();(0,a.useEffect)((()=>{r&&i(r)}),[r]),(0,a.useEffect)((()=>{s(!n&&JSON.stringify(r)!==JSON.stringify(t))}),[r,t,n]);return{config:t,changed:e,updateGithubAuthConfig:e=>{i((s=>s?{...s,...e}:e))},updateGithubAuthConfigToServer:async()=>{t&&await c(t)},isSuccess:n}}},55146:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(81084),l=t(13631);function i(){const[e,s]=(0,a.useState)(!1),[t,i]=(0,a.useState)(""),{data:r}=(0,l.LX)(void 0,{refetchOnMountOrArgChange:!0}),[c,{isSuccess:n}]=(0,l.pA)();(0,a.useEffect)((()=>{r&&i(r.client_id)}),[r]),(0,a.useEffect)((()=>{s(!n&&(null===r||void 0===r?void 0:r.client_id)!==t)}),[r,t,n]);return{config:r,changed:e,clientId:t,updateClientId:i,updateClientIdToServer:async()=>{t&&await c({client_id:t})},updateGoogleAuthConfig:c,isSuccess:n}}},85666:(e,s,t)=>{t.d(s,{A:()=>c});var a=t(81084),l=t(13631),i=t(80724),r=t(52205);const c=(e=!1)=>{var s;const t=(0,i.GV)((e=>e.users.ids.length),r.bN),c=(0,i.GV)((e=>e.server.upgraded),r.bN),n=(0,i.GV)((e=>e.authData.guest),r.bN),{data:d,refetch:o,isLoading:u}=(0,l.xI)(void 0,{refetchOnMountOrArgChange:e,skip:n}),[x,{isLoading:j,isSuccess:M}]=(0,l._8)(),[m,{isSuccess:g,isLoading:N,reset:h}]=(0,l.bb)();(0,a.useEffect)((()=>{g&&(o(),h())}),[g]);return{upgraded:c,reachLimit:t>=(null!==(s=null===d||void 0===d?void 0:d.user_limit)&&void 0!==s?s:Number.MAX_SAFE_INTEGER),license:d,checked:M,isLoading:u,checking:j,upserting:N,upserted:g,checkLicense:e=>{x(e)},upsertLicense:async e=>{const s=await x(e);return!(!("data"in s)||!s.data.sign)&&await m(e)}}}},2890:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>MyAccount});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(81084),react_hot_toast__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(71017),react_i18next__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(43307),_app_services_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(25303),_app_store__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(80724),_components_AvatarUploader__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(87965),_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(32642),_ProfileBasicEditModal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(97507),_RemoveAccountConfirmModal__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(5427),_UpdatePasswordModal__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(29690),react_redux__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(52205),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(99264);function MyAccount(){const{t:t}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.Bd)("member"),{t:ct}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.Bd)(),[passwordModal,setPasswordModal]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[editModal,setEditModal]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[removeConfirmVisible,setRemoveConfirmVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[uploadAvatar,{isSuccess:uploadSuccess}]=(0,_app_services_user__WEBPACK_IMPORTED_MODULE_3__.pl)(),EditModalInfo={name:{label:t("username"),title:t("change_name"),intro:t("change_name_desc")},email:{label:t("email"),title:t("change_email"),intro:t("change_email_desc")}},loginUser=(0,_app_store__WEBPACK_IMPORTED_MODULE_4__.GV)((e=>{var s;return e.users.byId[(null===(s=e.authData.user)||void 0===s?void 0:s.uid)||0]}),react_redux__WEBPACK_IMPORTED_MODULE_11__.bN);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{uploadSuccess&&react_hot_toast__WEBPACK_IMPORTED_MODULE_1__.Ay.success(ct("tip.update"))}),[uploadSuccess]);const handleBasicEdit=e=>{const{edit:s}=e.currentTarget.dataset;setEditModal(s)},closeBasicEditModal=()=>{setEditModal("")},togglePasswordModal=()=>{setPasswordModal((e=>!e))},toggleRemoveAccountModalVisible=()=>{setRemoveConfirmVisible((e=>!e))};if(!loginUser)return null;const{uid:uid,avatar:avatar,name:name,email:email}=loginUser;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col items-start gap-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"md:p-6 flex flex-col items-center w-full md:w-[512px] md:bg-gray-100 md:dark:bg-gray-800 md:rounded-2xl",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_AvatarUploader__WEBPACK_IMPORTED_MODULE_5__.A,{url:avatar,name:name,uploadImage:uploadAvatar}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"mt-2 mb-16 font-bold text-lg text-gray-800 dark:text-white",children:[name," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"font-normal text-gray-500",children:["#",uid]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("username")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"text-sm ",children:[name," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"text-gray-600 dark:text-gray-400",children:[" #",uid]})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{"data-edit":"name",onClick:handleBasicEdit,className:"",children:ct("action.edit")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("email")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-sm",children:email})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{"data-edit":"email",onClick:handleBasicEdit,children:ct("action.edit")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("password")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-sm",children:"*********"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{onClick:togglePasswordModal,children:ct("action.edit")})]})]}),1!=uid&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{className:"danger",onClick:toggleRemoveAccountModalVisible,children:t("delete_account")})]}),editModal&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_ProfileBasicEditModal__WEBPACK_IMPORTED_MODULE_7__.A,{type:"email"==editModal?"email":"text",valueKey:editModal,...EditModalInfo[editModal],value:eval(editModal),closeModal:closeBasicEditModal}),passwordModal&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_UpdatePasswordModal__WEBPACK_IMPORTED_MODULE_9__.A,{closeModal:togglePasswordModal}),removeConfirmVisible&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_RemoveAccountConfirmModal__WEBPACK_IMPORTED_MODULE_8__.A,{closeModal:toggleRemoveAccountModalVisible})]})}},97507:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(81084),l=t(71017),i=t(43307),r=t(25303),c=t(26521),n=t(32642),d=t(87740),o=t(55371),u=t(99264);const x=({label:e="Username",valueKey:s="name",value:t="",type:x="text",title:j="Change your username",intro:M="Enter a new username and your existing password.",closeModal:m})=>{const g=(0,a.useRef)(null),{t:N}=(0,i.Bd)(),[h,p]=(0,a.useState)(t),[_,{isLoading:D,isSuccess:y}]=(0,r.sU)();return(0,a.useEffect)((()=>{y&&(l.Ay.success(N("tip.update")),m())}),[y]),(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsx)(o.A,{title:j,description:M,buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{className:"cancel",onClick:m,children:N("action.cancel")}),(0,u.jsx)(n.A,{onClick:()=>{if(!g||!g.current)return;const e=g.current;e.checkValidity()?_({[s]:h}):e.reportValidity()},children:D?"Updating":N("action.done")})]}),children:(0,u.jsxs)("form",{ref:g,className:"flex flex-col gap-2 w-full",action:"/",children:[(0,u.jsx)("label",{htmlFor:s,className:"text-sm text-left text-gray-500",children:e}),(0,u.jsx)(d.A,{name:s,value:h,onChange:e=>{p(e.target.value)},type:x,required:!0})]})})})}},5427:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(81084),l=t(71017),i=t(43307),r=t(97282),c=t(26521),n=t(32642),d=t(55371),o=t(93335),u=t(99264);const x=({closeModal:e})=>{const{t:s}=(0,i.Bd)("member"),[t,{isLoading:x,isSuccess:j}]=(0,r.fe)(),{clearLocalData:M}=(0,o.A)();return(0,a.useEffect)((()=>{j&&M(!0)}),[j]),(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsx)(d.A,{title:s("remove_account"),description:s("remove_account_desc"),buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{onClick:e,children:s("action.cancel",{ns:"common"})}),(0,u.jsx)(n.A,{disabled:x,onClick:async()=>{try{await t()}catch(e){l.Ay.error("Remove Account Failed!")}},className:"danger",children:s("remove")})]})})})}},29690:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(81084),l=t(71017),i=t(43307),r=t(97282),c=t(26521),n=t(32642),d=t(87740),o=t(55371),u=t(99264);const x=({closeModal:e})=>{const{t:s}=(0,i.Bd)("member"),{t:t}=(0,i.Bd)(),{data:x}=(0,r.kU)(),[j,M]=(0,a.useState)({current:"",newPassword:"",confirmPassword:""}),[m,{isLoading:g,isSuccess:N}]=(0,r.zo)(),h=e=>{const{type:s}=e.target.dataset;M((t=>({...t,[s]:e.target.value})))};(0,a.useEffect)((()=>{N&&(l.Ay.success(t("tip.update")),e())}),[N]);const{current:p,newPassword:_,confirmPassword:D}=j,y=(null===x||void 0===x?void 0:x.password)&&!p||!_||!D||_!==D||g,w="my-4 w-full flex flex-col items-start gap-2",A="text-gray-400 font-semibold";return(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsxs)(o.A,{title:s("change_pwd"),description:s("change_pwd_desc"),buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{className:"cancel",onClick:e,children:s("action.cancel",{ns:"common"})}),(0,u.jsx)(n.A,{disabled:y,onClick:()=>{const{current:e,newPassword:s}=j;m({old_password:e,new_password:s})},children:g?"Updating":s("action.update",{ns:"common"})})]}),children:[(null===x||void 0===x?void 0:x.password)&&(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:A,htmlFor:"current",children:s("current_pwd")}),(0,u.jsx)(d.A,{type:"password",id:"current",name:"current",value:p,"data-type":"current",onChange:h})]}),(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:A,htmlFor:"newPassword",children:s("new_pwd")}),(0,u.jsx)(d.A,{type:"password",name:"newPassword",value:_,"data-type":"newPassword",onChange:h})]}),(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:A,htmlFor:"confirmPassword",children:s("confirm_new_pwd")}),(0,u.jsx)(d.A,{onBlur:()=>{const{newPassword:e,confirmPassword:s}=j;e!==s&&l.Ay.error("Not same with new password")},type:"password",name:"confirmPassword",value:D,"data-type":"confirmPassword",onChange:h})]})]})})}},89271:(e,s,t)=>{t.r(s),t.d(s,{default:()=>us});var a=t(81084),l=t(43307),i=t(80772),r=t(76644),c=t(212),n=t(71017),d=t(26521),o=t(32642),u=t(99765),x=t(55371),j=t(93335),M=t(99264);const m=({closeModal:e})=>{const{t:s}=(0,l.Bd)("auth"),{t:t}=(0,l.Bd)(),[i,r]=(0,a.useState)(!1),{logout:c,exited:m,exiting:g,clearLocalData:N}=(0,j.A)();return(0,a.useEffect)((()=>{m&&(i&&N(),n.Ay.success(t("tip.logout")))}),[m,i]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s("logout.title"),description:s("logout.desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:t("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{c()},className:"danger",children:g?"Logging out":t("action.logout")})]}),children:(0,M.jsxs)("div",{className:"text-sm text-gray-400 flex justify-end items-center",children:[(0,M.jsx)("label",{htmlFor:"clear_cb",className:"cursor-pointer text-orange-500 mr-3",children:s("logout.clear_local")}),(0,M.jsx)(u.A,{className:" cursor-pointer",name:"clear_cb",checked:i,onChange:e=>{r(e.target.checked)}})]})})})};var g=t(80724),N=t(71610),h=t(3632),p=t(32664),_=t.n(p),D=t(2589),y=t(52205),w=t(21444);const A=()=>{var e;const s=(0,g.GV)((e=>e.server.version),y.bN),[t,i]=(0,a.useState)(!1),{t:r}=(0,l.Bd)("setting",{keyPrefix:"version"}),c=null!==(e="1726269960")?e:0;return(0,M.jsxs)("ul",{className:"flex flex-col gap-2 dark:text-white",children:[(0,M.jsxs)("li",{children:[r("client_version"),": ","0.7.36"]}),(0,M.jsxs)("li",{children:[r("server_version"),": ",s]}),(0,M.jsxs)("li",{children:[r("build_time"),": ",c," ",(0,M.jsxs)("span",{className:"text-gray-700 dark:text-gray-300",children:["(",_()(1e3*c).fromNow(),")"]})]}),(0,M.jsx)("li",{children:(0,M.jsxs)(o.A,{disabled:t,onClick:()=>{i(!0),(0,D.h)(),setTimeout((()=>{(0,w.Mm)()}),2e3)},children:[" ",t?(0,M.jsx)(h.A,{size:18,color:"#fff"}):r("sync")]})})]})};var f=t(95380),v=t(30968),I=t(13631),b=t(87740),T=t(34334),L=t(4709);let k;function E(e="smtp"){const{t:s}=(0,l.Bd)(),[t,i]=(0,a.useState)(!1),[r,c]=(0,a.useState)(void 0),[d,{isSuccess:o,isLoading:u}]=(0,I.n6)(),[x,{isSuccess:j,isLoading:M}]=(0,I.q)(),[m,{isSuccess:g,isLoading:N}]=(0,I.u9)(),[h,{isSuccess:p,isLoading:_}]=(0,I.JW)(),{refetch:D,data:y}=(0,I.ud)(void 0,{skip:"agora"!==e}),{refetch:w,data:A}=(0,I.T7)(void 0,{skip:"login"!==e}),{refetch:f,data:v}=(0,I.Mu)(void 0,{skip:"smtp"!==e}),{refetch:b,data:T}=(0,I.rt)(void 0,{skip:"firebase"!==e}),E={login:d,smtp:x,agora:m,firebase:h}[e],O={smtp:f,agora:D,firebase:b,login:w}[e],C={login:o,smtp:j,agora:g,firebase:p}[e],z={login:u,smtp:M,agora:N,firebase:_}[e];return(0,a.useEffect)((()=>{C&&(n.Ay.success(s("tip.update")),O())}),[C]),(0,a.useEffect)((()=>{const e=v||T||A||y;e&&(k=e,c(e))}),[v,T,A,y]),(0,a.useEffect)((()=>{r&&0!=Object.keys(r).length&&((0,L.isEqual)(k,r)?i(!1):i(!0))}),[r]),{originalValues:k,updating:z,updated:C,reset:()=>{c(void 0)},changed:t,updateConfig:E,agoraConfig:y,values:r,setValues:c,toggleEnable:()=>{c((e=>e&&"enabled"in e?{...e,enabled:!e.enabled}:e))}}}function O(){const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),{updateConfig:t,values:i}=E("login"),{data:r}=(0,I.B)(),[c,{data:d,isSuccess:u,isLoading:x}]=(0,I.jJ)();(0,a.useEffect)((()=>{u&&((0,v.cJ)(),n.Ay.success(s("tip.update")))}),[u]);const j=null===i||void 0===i?void 0:i.third_party;return(0,M.jsxs)("div",{className:"max-w-[500px] flex flex-col gap-4 items-start",children:[(0,M.jsx)(T.A,{onClick:(e=>{t({...i,...e})}).bind(null,{third_party:!j}),checked:j}),(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsxs)("label",{htmlFor:"secret",className:"text-sm text-gray-500 dark:text-gray-100",children:[" ",e("third_app.key"),":"]}),(0,M.jsx)(b.A,{disabled:!j,type:"password",id:"secret",value:d||r})]}),(0,M.jsx)(f.Ay,{interactive:!0,placement:"right-start",trigger:"click",content:(0,M.jsxs)("div",{className:"p-3 rounded-lg border border-orange-400 border-solid flex flex-col gap-3 w-[250px] bg-white",children:[(0,M.jsx)("div",{className:"text-orange-500 text-xs",children:e("third_app.update_tip")}),(0,M.jsxs)("div",{className:"flex justify-end gap-3 w-full",children:[(0,M.jsx)(o.A,{onClick:()=>(0,v.cJ)(),className:"cancel mini",children:s("action.cancel")}),(0,M.jsx)(o.A,{disabled:x,className:"mini danger",onClick:()=>c(),children:s("action.yes")})]})]}),children:(0,M.jsxs)(o.A,{disabled:!j,children:[" ",e("third_app.update")]})}),(0,M.jsxs)("div",{className:"text-xs text-orange-400",children:[e("third_app.key_tip"),(0,M.jsxs)("a",{className:"text-primary-500 font-bold",href:"https://doc.voce.chat/login-with-other-account",target:"_blank",rel:"noopener noreferrer",children:["\ud83d\udd17 ",e("third_app.how_to")]})]})]})}var C=t(6691),z=t(58156);const S=`${location.origin}/api/swagger`,U=()=>{const e=(0,g.GV)((e=>e.authData.token),y.bN),{copy:s}=(0,z.A)(),{t:t}=(0,l.Bd)("setting");return(0,M.jsxs)("section",{className:"flex flex-col justify-start items-start gap-4",children:[(0,M.jsx)("div",{className:"font-semibold dark:text-white",children:t("api_doc.desc")}),(0,M.jsx)("div",{className:"flex flex-col gap-2 w-full",children:(0,M.jsxs)("h2",{className:"text-gray-700 dark:text-white text-lg font-semibold flex gap-1",children:[t("api_doc.access"),(0,M.jsx)("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"underline text-primary-600",children:S})]})}),(0,M.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,M.jsx)("h2",{className:"text-gray-700 dark:text-white text-lg font-semibold",children:t("api_doc.use_method")}),(0,M.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("h3",{className:"text-gray-700 dark:text-white ",children:t("api_doc.step_1")}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[50%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step1.png",alt:"step 1"})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsxs)("h3",{className:"text-gray-700 dark:text-white flex flex-col items-start gap-2",children:[t("api_doc.step_2")," ",(0,M.jsxs)("span",{className:"text-gray-400 dark:text-white text-xs",children:["(",t("api_doc.step_2_desc"),")"]})]}),(0,M.jsx)("div",{className:"flex flex-col border border-solid border-green-500 bg-green-100 rounded-md p-2 w-fit break-words text-sm relative",children:(0,M.jsxs)("p",{className:"break-all md:max-w-4xl font-bold",children:[e,(0,M.jsx)(C.A,{onClick:()=>{s(e)},className:"absolute right-2 bottom-2 cursor-pointer"})]})}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step2.jpg",alt:"step 2"})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("h3",{className:"text-gray-700 dark:text-white flex items-center gap-2",children:t("api_doc.last")}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step3.png",alt:"step 3"})]})]})]})]})};var P=t(25303),Y=t(87965),B=t(71389),Q=t(45774),R=t(3661);const G=({closeModal:e,uid:s})=>{const{copy:t}=(0,z.A)(),[i,{error:r,isSuccess:c,isLoading:u,data:j=""}]=(0,P.zr)(),m=(0,a.useRef)(null),{t:g}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:N}=(0,l.Bd)();(0,a.useEffect)((()=>{if(r)switch(r.status){case 406:n.oR.error("Invalid Webhook URL!");break;case 409:n.oR.error("Name Already Exists!")}}),[r]);return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:g("create_key_title"),description:g("create_key_desc"),buttons:c?(0,M.jsx)(o.A,{onClick:()=>{t(j),n.oR.success("API Key Copied!"),e()},children:g("key_copy_and_close")}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:N("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{var e;if(!m||!m.current)return;const t=m.current;t.checkValidity()?i({uid:s,name:(null===(e=t.querySelector("input"))||void 0===e?void 0:e.value)||""}):t.reportValidity()},children:u?"...":N("action.done")})]}),children:c?(0,M.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[(0,M.jsx)("div",{className:"border-green-600 bg-green-200/50 rounded border border-solid p-2 max-w-md w-full whitespace-pre-wrap break-all",children:j})," ",(0,M.jsxs)("div",{className:"text-red-400",children:["\u26a0\ufe0f ",g("create_key_warning")]})]}):(0,M.jsx)("form",{ref:m,className:"w-full flex flex-col gap-2 items-center",action:"/",children:(0,M.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"name",className:"text-sm text-gray-500",children:"Name"}),(0,M.jsx)(b.A,{name:"name",required:!0,placeholder:"Please input API Key name"})]})})})})},W=({closeModal:e,uid:s,kid:t})=>{const[i,{isSuccess:r,isLoading:c}]=(0,P.fM)(),{t:u}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{r&&(n.oR.success(j("tip.delete")),e())}),[r]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:`${u("delete_key_title")} ${name}`,description:u("delete_key_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:j("action.cancel")}),(0,M.jsx)(o.A,{className:"danger",onClick:()=>{i({uid:s,kid:t})},children:c?"Deleting":j("action.done")})]})})})},V="p-1 whitespace-nowrap text-xs text-gray-500 dark:text-gray-200 align-middle px-1",K=({uid:e})=>{const{t:s}=(0,l.Bd)("setting",{keyPrefix:"bot"}),[t,i]=(0,a.useState)(),[r,c]=(0,a.useState)(),{data:n,refetch:d}=(0,P.Xf)(e),o=e=>{e||d(),i(e)},u=e=>{e||d(),c(e)};if(!n)return null;const x=["w-20","w-[166px]","w-36","w-15","w-10"];return(0,M.jsxs)("div",{className:"flex flex-col gap-2 items-start",children:[(0,M.jsxs)("div",{className:"border-t border-solid border-b border-gray-100 dark:border-gray-500 py-2 w-full",children:[(0,M.jsxs)("table",{className:"min-w-full table-fixed font-mono",children:[(0,M.jsx)("thead",{children:(0,M.jsx)("tr",{children:[s("col_key_name"),s("col_key_value"),s("col_key_create_time"),s("col_key_last_used"),""].map(((e,s)=>(0,M.jsx)("th",{scope:"col",className:(0,Q.A)("text-xs text-gray-900 dark:text-gray-50 px-1 text-left pb-2",x[s]),children:e},e)))})}),(0,M.jsx)("tbody",{children:n.length>0?n.map((s=>{const{id:t,name:a,key:l,created_at:i,last_used:r}=s;return(0,M.jsxs)("tr",{className:"group",children:[(0,M.jsx)("td",{className:V,children:a}),(0,M.jsx)("td",{className:`${V} w-40`,children:`${l.slice(0,4)} ... ... ${l.slice(-6)}`}),(0,M.jsx)("td",{className:V,children:_()(i).format("YYYY-MM-DD HH:mm:ss")}),(0,M.jsx)("td",{className:V,children:r?_()(r).format("YYYY-MM-DD HH:mm:ss"):"Unused"}),(0,M.jsx)("td",{className:`${V} invisible group-hover:visible`,children:(0,M.jsx)("button",{onClick:u.bind(null,{kid:t,uid:e}),children:(0,M.jsx)(B.A,{})})})]},t)})):(0,M.jsx)("tr",{children:(0,M.jsx)("td",{colSpan:4,className:"text-center text-xs text-gray-400 py-2",children:s("no_api_key")})})})]}),(0,M.jsxs)("button",{onClick:o.bind(null,e),className:"text-green-600 text-xs py-0.5 flex items-center gap-1 m-auto my-2 bg-green-50 rounded-full px-2 ",children:[(0,M.jsx)(R.A,{className:"!w-4 !h-4 fill-green-600"})," ",s("add_api_key")]})]}),t&&(0,M.jsx)(G,{uid:t,closeModal:o.bind(null,void 0)}),r&&(0,M.jsx)(W,{uid:r.uid,kid:r.kid,closeModal:u.bind(null,void 0)})]})};var F=t(45123);const Z=({closeModal:e})=>{const[s,{isSuccess:t,isLoading:i,error:r}]=(0,P.i0)(),{t:c}=(0,l.Bd)("setting",{keyPrefix:"bot"}),[u,j]=(0,a.useState)({name:"",webhook_url:""}),{t:m}=(0,l.Bd)(),g=e=>{const{value:s}=e.target,{name:t=""}=e.target.dataset;j((e=>({...e,[t]:s})))};(0,a.useEffect)((()=>{if(r)switch(r.status){case 406:n.oR.error("Invalid Webhook URL!");break;case 409:n.oR.error("Name conflict with existed username, try the proposed name below."),j((e=>({...e,name:`${e.name}-bot`})))}}),[r]),(0,a.useEffect)((()=>{t&&(n.oR.success("Create Bot Successfully!"),e())}),[t]);const{name:N,webhook_url:h}=u;return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:c("create_title"),description:c("create_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:m("action.cancel")}),(0,M.jsx)(o.A,{disabled:!u.name,onClick:()=>{if(""===u.name.trim())return;const{name:e,webhook_url:t}=u,a=new URL(F.tx).hostname;s({is_bot:!0,is_admin:!1,gender:1,email:`bot_${(new Date).getTime()}@${a}`,password:"",name:e,webhook_url:""===t.trim()?void 0:t})},children:i?"Creating":m("action.done")})]}),children:(0,M.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,M.jsxs)("div",{className:"flex flex-col items-start gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"name",className:"text-sm text-gray-500",children:"Name"}),(0,M.jsx)(b.A,{onChange:g,value:N,"data-name":"name",placeholder:"Please input bot name"})]}),(0,M.jsxs)("div",{className:"flex flex-col items-start gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"webhook_url",className:"text-sm text-gray-500",children:"Webhook URL (Optional)"}),(0,M.jsx)(b.A,{onChange:g,value:h,"data-name":"webhook_url",type:"url",placeholder:"Please input webhook url"})]})]})})})},H=({closeModal:e,uid:s,name:t})=>{const[i,{isSuccess:r,isLoading:c}]=(0,P.Gv)(),{t:u}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{r&&(n.oR.success(j("tip.delete")),e())}),[r]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:`${u("delete_title")} ${t}`,description:u("delete_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e.bind(null),children:j("action.cancel")}),(0,M.jsx)(o.A,{className:"danger",onClick:()=>{i(s)},children:c?"Deleting":j("action.done")})]})})})};var J,X=t(93604),q=t(63734),$=t(31872);function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var s=1;sa.createElement("svg",ee({width:24,height:24,viewBox:"0 0 24 24",stroke:"#616161",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,J||(J=a.createElement("path",{d:"M17 21V13H7V21M7 3V8H15M19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H16L21 8V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),te=(0,a.forwardRef)(se),ae=({uid:e})=>{const s=(0,a.useRef)(null),[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),{data:c,isSuccess:d,refetch:o}=(0,P.pR)(e),[u,{isSuccess:x,isLoading:j}]=(0,P.H7)();(0,a.useEffect)((()=>{d&&c&&r(c.name||"")}),[c,d]),(0,a.useEffect)((()=>{x&&o()}),[x]);const m=async()=>{if(t&&s){const t=s.current;if(null===t||void 0===t||!t.checkValidity())return void(null===t||void 0===t||t.reportValidity());const a=new FormData(t).get("name"),l=await u({id:e,name:a});if("error"in l){if(409===l.error.status)n.oR.error("Conflict with existed username");return}}l((e=>!e))};return(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)("form",{action:"/",ref:s,onSubmit:e=>{e.preventDefault(),m()},children:(0,M.jsx)("input",{readOnly:!t,required:!0,autoFocus:!0,name:"name",defaultValue:i,className:(0,Q.A)("text-gray-900 dark:text-gray-100 w-auto",t?"ring-1 ring-gray-500 bg-gray-50 px-2 py-1 dark:bg-slate-900":"bg-transparent")})}),(0,M.jsx)("button",{type:"button",title:"edit name",disabled:j,onClick:m,children:j?(0,M.jsx)(X.A,{size:16}):t?(0,M.jsx)(te,{className:"stroke-gray-500 !w-5 !h-5"}):(0,M.jsx)($.A,{className:"fill-gray-500 !w-5 !h-5"})}),t&&!j&&(0,M.jsx)("button",{type:"button",disabled:j,onClick:()=>{l(!1);const e=s.current;if(e){e.querySelector("input").value=(null===c||void 0===c?void 0:c.name)||""}},children:(0,M.jsx)(q.A,{className:"!w-5 !h-5 fill-gray-500"})})]})},le=({uid:e})=>{const s=(0,a.useRef)(null),[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),{data:c,isSuccess:d,refetch:o}=(0,P.pR)(e),[u,{isSuccess:x,isLoading:j}]=(0,P.H7)();(0,a.useEffect)((()=>{d&&c&&r(c.webhook_url||"")}),[c,d]),(0,a.useEffect)((()=>{x&&o()}),[x]);const m=async()=>{if(t&&s){const t=s.current;if(null===t||void 0===t||!t.checkValidity())return void(null===t||void 0===t||t.reportValidity());const a=new FormData(t).get("webhook"),l=await u({id:e,webhook_url:a});if("error"in l){if(406===l.error.status)n.oR.error("Not Valid URL!");return}}l((e=>!e))};return(0,M.jsx)("div",{children:i||t||x?(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)("form",{action:"/",ref:s,onSubmit:e=>{e.preventDefault(),m()},children:(0,M.jsx)("input",{readOnly:!t,required:!0,autoFocus:!0,type:"url",name:"webhook",defaultValue:i,className:(0,Q.A)("text-sm text-gray-400 dark:text-gray-100 dark:bg-slate-900 px-2 py-1",t?"ring-1 ring-gray-500 bg-gray-50":"bg-transparent")})}),(0,M.jsx)("button",{type:"button",disabled:j,onClick:m,children:j?(0,M.jsx)(X.A,{size:16}):t?(0,M.jsx)(te,{className:"stroke-gray-500 !w-5 !h-5"}):(0,M.jsx)($.A,{className:"fill-gray-500 !w-5 !h-5"})}),t&&!j&&(0,M.jsx)("button",{type:"button",disabled:j,onClick:()=>{l(!1);const e=s.current;if(e){e.querySelector("input").value=(null===c||void 0===c?void 0:c.webhook_url)||""}},children:(0,M.jsx)(q.A,{className:"!w-5 !h-5 fill-gray-500"})})]}):(0,M.jsx)("button",{type:"button",className:"rounded-full bg-primary-50 text-green-600 text-xs py-0.5 px-2",onClick:()=>{l(!0)},children:"Set Webhook"})})},ie=({uid:e,webhook:s,closeModal:t})=>{const[i,r]=(0,a.useState)(s),[c,{isSuccess:u,isLoading:j}]=(0,P.H7)(),m=(0,a.useRef)(null),{t:g}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:N}=(0,l.Bd)();return(0,a.useEffect)((()=>{u&&(n.oR.success(N("tip.update")),t())}),[u]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:g("webhook_title"),description:g("webhook_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:t.bind(null,void 0),children:N("action.cancel")}),(0,M.jsx)(o.A,{disabled:!i,onClick:()=>{var s;if(!m||!m.current)return;const t=m.current;if(!t.checkValidity())return void t.reportValidity();const a=(null===(s=new FormData(t).get("webhook"))||void 0===s?void 0:s.toString())||"";c({id:e,webhook_url:a})},children:j?"Updating":N("action.done")})]}),children:(0,M.jsxs)("form",{ref:m,className:"w-full flex flex-col gap-2",action:"/",children:[(0,M.jsx)("label",{htmlFor:"webhook",className:"text-sm text-gray-500",children:"Webhook URL"}),(0,M.jsx)(b.A,{name:"webhook",value:i,onChange:e=>{r(e.target.value)},type:"url"})]})})})},re=({title:e,desc:s})=>(0,M.jsxs)("div",{className:"flex flex-col text-sm",children:[(0,M.jsx)("h2",{className:"font-semibold dark:text-white",children:e}),(0,M.jsx)("p",{className:"text-gray-400 text-xs",children:s})]}),ce="p-6 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100 align-top";function ne(){const[e,{isSuccess:s}]=(0,P.tt)(),[t,i]=(0,a.useState)(!1),[r,c]=(0,a.useState)(void 0),[d,u]=(0,a.useState)(void 0),x=(0,g.GV)((e=>Object.values(e.users.byId).filter((e=>!!e.is_bot))),y.bN),{t:j}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:m}=(0,l.Bd)(),N=()=>{i((e=>!e))},h=e=>{u(e)};return(0,a.useEffect)((()=>{s&&n.oR.success(m("tip.update"))}),[s]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex flex-col justify-start items-start gap-4",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-4 max-w-[634px] mb-4",children:[(0,M.jsx)(re,{title:j("bot_tip_title"),desc:j("bot_tip_desc")}),(0,M.jsx)(re,{title:j("webhook_tip_title"),desc:j("webhook_tip_desc")})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,M.jsxs)("h2",{className:"font-semibold flex gap-4 items-center dark:text-white",children:[j("manage"),(0,M.jsxs)("a",{href:"https://doc.voce.chat/bot/bot-and-webhook",target:"_blank",className:"text-sm text-blue-400 underline-offset-1 underline",rel:"noopener noreferrer",children:["\ud83d\udd17 ",j("how_to_use")]})]}),(0,M.jsx)("p",{className:"text-gray-400 text-xs",children:j("manage_desc")})]}),(0,M.jsx)("div",{className:"w-full md:w-fit overflow-auto md:overflow-hidden",children:(0,M.jsxs)("table",{className:"min-w-full table-auto",children:[(0,M.jsx)("thead",{className:"border-b dark:border-b-gray-500 bg-gray-50 dark:bg-gray-600",children:(0,M.jsx)("tr",{children:[j("col_avatar"),j("col_name"),j("col_api_key"),j("col_webhook"),j("col_opt")].map((e=>(0,M.jsx)("th",{scope:"col",className:"text-sm font-bold text-gray-900 dark:text-gray-100 px-6 py-4 text-left",children:e},e)))})}),(0,M.jsx)("tbody",{children:x.map((s=>{const{uid:t,name:a,avatar:l}=s;return(0,M.jsxs)("tr",{className:"bg-white dark:bg-gray-800 border-b dark:border-b-gray-500 transition duration-300 ease-in-out md:hover:bg-gray-100 dark:md:hover:bg-transparent",children:[(0,M.jsx)("td",{className:"px-4 py-2",children:(0,M.jsx)(Y.A,{size:60,uid:t,url:l,uploadImage:e,name:a})}),(0,M.jsxs)("td",{className:`${ce}`,children:[(0,M.jsx)(ae,{uid:t}),(0,M.jsxs)("div",{className:"text-xs text-gray-500",children:["#",t]})]}),(0,M.jsx)("td",{className:`${ce} py-2`,children:(0,M.jsx)(K,{uid:t})}),(0,M.jsx)("td",{className:ce,children:(0,M.jsx)(le,{uid:t})}),(0,M.jsx)("td",{className:ce,children:(0,M.jsx)("button",{type:"button",onClick:h.bind(null,{uid:t,name:a}),children:(0,M.jsx)(B.A,{className:"hover:opacity-80"})})})]},t)}))})]})}),(0,M.jsx)("div",{className:"flex gap-4",children:(0,M.jsx)(o.A,{onClick:N,className:"small",children:m("action.add")})})]}),t&&(0,M.jsx)(Z,{closeModal:N}),r&&(0,M.jsx)(ie,{closeModal:e=>{c(e)},...r}),d&&(0,M.jsx)(H,{closeModal:h,...d})]})}var de=t(90800),oe=t(73050),ue=t(216);const xe=({link:e,text:s})=>(0,M.jsxs)("div",{className:"tip",children:[(0,M.jsx)(ue.A,{className:"dark:fill-gray-300"}),(0,M.jsx)("a",{href:e,target:"_blank",className:"link",rel:"noreferrer",children:s})]});function je(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"agora"}),{changed:s,reset:t,values:a,setValues:i,toggleEnable:r,updateConfig:c}=E("agora"),n=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;i((e=>e?{...e,[t]:s}:e))};if(!a)return null;const{url:d,project_id:o,app_id:u,app_certificate:x,customer_id:j,customer_secret:m,enabled:g=!1}=a,N=d||"https://api.agora.io";return(0,M.jsxs)("div",{className:"setting-container",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsxs)("div",{className:"input row",children:[(0,M.jsxs)(oe.A,{className:"flex items-center gap-2",children:["Enable",(0,M.jsx)(xe,{link:"https://doc.voce.chat/setting/setting-agora",text:e("how_to")})]}),(0,M.jsx)(T.A,{onClick:r,checked:g})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"url",children:"Agora URL"}),(0,M.jsx)(b.A,{disabled:!g,"data-type":"url",onChange:n,value:N,name:"url",placeholder:"Agora URL"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"project_id",children:"Project ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"project_id",onChange:n,value:o,name:"project_id",placeholder:"Project ID"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"app_id",children:"App ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"app_id",onChange:n,value:u,name:"app_id",placeholder:"APP ID"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"app_certificate",children:"APP Certificate"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"app_certificate",onChange:n,value:x,name:"app_certificate",placeholder:"APP Certificate"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"customer_id",children:"Customer ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"customer_id",onChange:n,value:j,name:"customer_id",placeholder:"Customer ID for RESTful API"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"customer_secret",children:"Customer Secret"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"customer_secret",onChange:n,value:m,name:"customer_secret",placeholder:"Customer Secret for RESTful API"})]})]}),s&&(0,M.jsx)(de.A,{saveHandler:()=>{const e=a;e.url||(e.url="https://api.agora.io"),c(e)},resetHandler:t})]})}var Me=t(11433),me=t(49912);function ge(){const{values:e,setValues:s,updateConfig:t,changed:a,reset:i}=E("firebase"),{t:r}=(0,l.Bd)("setting"),c={disable:r("firebase.disable"),official:r("firebase.use_official"),custom:r("firebase.custom")};let n="";if(e){const{use_official:s,enabled:t=!1}=e;n=t?s?"official":"custom":"disable"}const d=e=>{const t=e.target.value,{type:a=""}=e.target.dataset;s((e=>e?{...e,[a]:t}:e))};if(!e)return null;const{token_url:o,project_id:u,private_key:x,client_email:j}=e;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full max-md:h-auto",children:[(0,M.jsx)(Me.A,{options:Object.values(c),values:Object.keys(c),value:n,onChange:t=>{let a=null;switch(t){case"custom":a={...e,enabled:!0,use_official:!1};break;case"official":a={...e,enabled:!0,use_official:!0};break;case"disable":a={...e,enabled:!1}}a&&s(a)}}),(0,M.jsxs)("fieldset",{className:"inputs",disabled:"custom"!==n,children:[(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"name",children:r("firebase.token_url")}),(0,M.jsx)(b.A,{"data-type":"token_url",onChange:d,value:o,name:"token_url",placeholder:r("firebase.token_url")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"project_id",children:r("firebase.project_id")}),(0,M.jsx)(b.A,{"data-type":"project_id",onChange:d,value:u,name:"project_id",placeholder:r("firebase.project_id")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"private_key",children:r("firebase.private_key")}),(0,M.jsx)(me.A,{rows:10,spellCheck:!1,"data-type":"private_key",onChange:d,value:x,name:"private_key",placeholder:r("firebase.private_key")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"client_email",children:r("firebase.client_email")}),(0,M.jsx)(b.A,{"data-type":"client_email",onChange:d,value:j,name:"client_email",placeholder:r("firebase.client_email")})]})]}),a&&(0,M.jsx)(de.A,{saveHandler:()=>{t(e)},resetHandler:()=>{i()}})]})}var Ne,he=t(61082),pe=t(55146),_e=t(96018);function De(){return De=Object.assign?Object.assign.bind():function(e){for(var s=1;sa.createElement("svg",De({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,Ne||(Ne=a.createElement("path",{d:"M8.00004 1.33301C4.32004 1.33301 1.33337 4.31967 1.33337 7.99967C1.33337 11.6797 4.32004 14.6663 8.00004 14.6663C11.68 14.6663 14.6667 11.6797 14.6667 7.99967C14.6667 4.31967 11.68 1.33301 8.00004 1.33301ZM11.3334 8.66634H4.66671V7.33301H11.3334V8.66634Z",fill:"#D0D5DD"}))),we=(0,a.forwardRef)(ye),Ae=JSON.parse('[{"title":"Google","value":"accounts.google.com","selected":false,"icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE1OTA1XzI0Njk1KSI+CjxwYXRoIGQ9Ik0yMy43NjYgMTIuMjc2M0MyMy43NjYgMTEuNDYwNSAyMy42OTk5IDEwLjY0MDQgMjMuNTU4OCA5LjgzNzg5SDEyLjI0VjE0LjQ1ODlIMTguNzIxN0MxOC40NTI4IDE1Ljk0OTIgMTcuNTg4NSAxNy4yNjc2IDE2LjMyMyAxOC4xMDU0VjIxLjEwMzdIMjAuMTlDMjIuNDYwOCAxOS4wMTM3IDIzLjc2NiAxNS45MjcyIDIzLjc2NiAxMi4yNzYzWiIgZmlsbD0iIzQyODVGNCIvPgo8cGF0aCBkPSJNMTIuMjQwMSAyNC4wMDEzQzE1LjQ3NjYgMjQuMDAxMyAxOC4yMDU5IDIyLjkzODcgMjAuMTk0NSAyMS4xMDQ0TDE2LjMyNzYgMTguMTA2QzE1LjI1MTcgMTguODM4IDEzLjg2MjcgMTkuMjUyNSAxMi4yNDQ1IDE5LjI1MjVDOS4xMTM4OCAxOS4yNTI1IDYuNDU5NDYgMTcuMTQwNCA1LjUwNzA1IDE0LjMwMDhIMS41MTY2VjE3LjM5MTdDMy41NTM3MSAyMS40NDM5IDcuNzAyOSAyNC4wMDEzIDEyLjI0MDEgMjQuMDAxM1oiIGZpbGw9IiMzNEE4NTMiLz4KPHBhdGggZD0iTTUuNTAyNTMgMTQuMzAwN0M0Ljk5OTg3IDEyLjgxMDMgNC45OTk4NyAxMS4xOTY1IDUuNTAyNTMgOS43MDYxOFY2LjYxNTIzSDEuNTE2NDlDLTAuMTg1NTEgMTAuMDA2IC0wLjE4NTUxIDE0LjAwMDkgMS41MTY0OSAxNy4zOTE2TDUuNTAyNTMgMTQuMzAwN1oiIGZpbGw9IiNGQkJDMDQiLz4KPHBhdGggZD0iTTEyLjI0MDEgNC43NDk2NkMxMy45NTA5IDQuNzIzMiAxNS42MDQ0IDUuMzY2OTcgMTYuODQzNCA2LjU0ODY3TDIwLjI2OTUgMy4xMjI2MkMxOC4xMDAxIDEuMDg1NSAxNS4yMjA4IC0wLjAzNDQ2NiAxMi4yNDAxIDAuMDAwODA4NjY2QzcuNzAyOSAwLjAwMDgwODY2NiAzLjU1MzcxIDIuNTU4MjIgMS41MTY2IDYuNjE0ODFMNS41MDI2NCA5LjcwNTc1QzYuNDUwNjQgNi44NjE3MyA5LjEwOTQ3IDQuNzQ5NjYgMTIuMjQwMSA0Ljc0OTY2WiIgZmlsbD0iI0VBNDMzNSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzE1OTA1XzI0Njk1Ij4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},{"title":"Facebook","value":"www.facebook.com","selected":false,"icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMiAxNkMzMiA3LjE2NDEzIDI0LjgzNTggMCAxNiAwQzcuMTY0MTMgMCAwIDcuMTY0MTMgMCAxNkMwIDIzLjk4NTMgNS44NTAxNiAzMC42MDQ5IDEzLjUwMDIgMzEuODA2N1YyMC42MjYxSDkuNDM2NjRWMTZIMTMuNTAwMlYxMi40NzQyQzEzLjUwMDIgOC40NjQ1NiAxNS44ODk4IDYuMjQ4MjkgMTkuNTQzOCA2LjI0ODI5QzIxLjI5NDMgNi4yNDgyOSAyMy4xMjU4IDYuNTYxMDIgMjMuMTI1OCA2LjU2MTAyVjEwLjQ5ODZIMjEuMTA3NUMxOS4xMjA4IDEwLjQ5ODYgMTguNDk5OCAxMS43MzE3IDE4LjQ5OTggMTIuOTk4NFYxNS45OTk5SDIyLjkzNjdMMjIuMjI4IDIwLjYyNkgxOC40OTk2VjMxLjgwNjRDMjYuMTQ5OCAzMC42MDcxIDMxLjk5OTggMjMuOTg3NiAzMS45OTk4IDE1Ljk5OTlMMzIgMTZaIiBmaWxsPSIjMTk3N0YzIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjIuMjI4IDIwLjYyNkwyMi45MzY5IDE1Ljk5OTlIMTguNDk5OVYxMi45OTg0QzE4LjQ5OTkgMTEuNzMzOSAxOS4xMTg2IDEwLjQ5ODcgMjEuMTA3NyAxMC40OTg3SDIzLjEyNlY2LjU2MTA1QzIzLjEyNiA2LjU2MTA1IDIxLjI5NDUgNi4yNDgyOSAxOS41NDM5IDYuMjQ4MjlDMTUuODg5OSA2LjI0ODI5IDEzLjUwMDQgOC40NjIzOCAxMy41MDA0IDEyLjQ3NDJWMTZIOS40MzY3N1YyMC42MjYxSDEzLjUwMDRWMzEuODA2N0MxNC4zMTQ5IDMxLjkzNDcgMTUuMTQ5NiAzMiAxNi4wMDAxIDMyQzE2Ljg1MDcgMzIgMTcuNjg1NCAzMS45MzI1IDE4LjQ5OTkgMzEuODA2N1YyMC42MjYxSDIyLjIyODJMMjIuMjI4IDIwLjYyNloiIGZpbGw9IiNGRUZFRkUiLz4KPC9zdmc+Cg=="},{"title":"Gitlab","value":"www.gitlab.com","selected":false,"icon":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODAgMzgwIj4KPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6I2UyNDMyOTt9LmNscy0ye2ZpbGw6I2ZjNmQyNjt9LmNscy0ze2ZpbGw6I2ZjYTMyNjt9PC9zdHlsZT4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJMT0dPIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0yODIuODMsMTcwLjczbC0uMjctLjY5LTI2LjE0LTY4LjIyYTYuODEsNi44MSwwLDAsMC0yLjY5LTMuMjQsNyw3LDAsMCwwLTgsLjQzLDcsNywwLDAsMC0yLjMyLDMuNTJsLTE3LjY1LDU0SDE1NC4yOWwtMTcuNjUtNTRBNi44Niw2Ljg2LDAsMCwwLDEzNC4zMiw5OWE3LDcsMCwwLDAtOC0uNDMsNi44Nyw2Ljg3LDAsMCwwLTIuNjksMy4yNEw5Ny40NCwxNzBsLS4yNi42OWE0OC41NCw0OC41NCwwLDAsMCwxNi4xLDU2LjFsLjA5LjA3LjI0LjE3LDM5LjgyLDI5LjgyLDE5LjcsMTQuOTEsMTIsOS4wNmE4LjA3LDguMDcsMCwwLDAsOS43NiwwbDEyLTkuMDYsMTkuNy0xNC45MSw0MC4wNi0zMCwuMS0uMDhBNDguNTYsNDguNTYsMCwwLDAsMjgyLjgzLDE3MC43M1oiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0yODIuODMsMTcwLjczbC0uMjctLjY5YTg4LjMsODguMywwLDAsMC0zNS4xNSwxNS44TDE5MCwyMjkuMjVjMTkuNTUsMTQuNzksMzYuNTcsMjcuNjQsMzYuNTcsMjcuNjRsNDAuMDYtMzAsLjEtLjA4QTQ4LjU2LDQ4LjU2LDAsMCwwLDI4Mi44MywxNzAuNzNaIi8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTUzLjQzLDI1Ni44OWwxOS43LDE0LjkxLDEyLDkuMDZhOC4wNyw4LjA3LDAsMCwwLDkuNzYsMGwxMi05LjA2LDE5LjctMTQuOTFTMjA5LjU1LDI0NCwxOTAsMjI5LjI1QzE3MC40NSwyNDQsMTUzLjQzLDI1Ni44OSwxNTMuNDMsMjU2Ljg5WiIvPjxwYXRoIGNsYXNzPSJjbHMtMiIgZD0iTTEzMi41OCwxODUuODRBODguMTksODguMTksMCwwLDAsOTcuNDQsMTcwbC0uMjYuNjlhNDguNTQsNDguNTQsMCwwLDAsMTYuMSw1Ni4xbC4wOS4wNy4yNC4xNywzOS44MiwyOS44MnMxNy0xMi44NSwzNi41Ny0yNy42NFoiLz48L2c+PC9zdmc+"},{"title":"Paypal","value":"www.paypal.com","selected":false,"icon":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI1NnB4IiBoZWlnaHQ9IjMwMnB4IiB2aWV3Qm94PSIwIDAgMjU2IDMwMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+Cgk8Zz4KCQk8cGF0aCBkPSJNMjE3LjE2ODQ3NiwyMy41MDcwMTQ2IEMyMDMuMjM0MDc3LDcuNjI0Nzk2NTEgMTc4LjA0NTYxMiwwLjgxNTc1MzMzOCAxNDUuODIzMzU1LDAuODE1NzUzMzM4IEw1Mi4zMDMwNjE5LDAuODE1NzUzMzM4IEM0NS43MTA0NDMxLDAuODE1NzUzMzM4IDQwLjEwODM4MTksNS42MTAzODUyIDM5LjA3NjIwNDIsMTIuMTExNDM5OSBMMC4xMzY0NjgzMDIsMjU5LjA3NjYwMSBDLTAuNjM3NjY0OTY4LDI2My45NDYxNDkgMy4xMzMxMTMyMiwyNjguMzU3ODc2IDguMDY5MjUzMzEsMjY4LjM1Nzg3NiBMNjUuODA0NjEyLDI2OC4zNTc4NzYgTDgwLjMwNTA0MzgsMTc2LjM4NTg0OSBMNzkuODU1NTQ3MSwxNzkuMjY1OTU4IEM4MC44ODc3MjQ4LDE3Mi43NjQ5MDMgODYuNDQ4MTY1OSwxNjcuOTcwMjcyIDkzLjAzMjQ2MDcsMTY3Ljk3MDI3MiBMMTIwLjQ2ODQxLDE2Ny45NzAyNzIgQzE3NC4zNjYzOTgsMTY3Ljk3MDI3MiAyMTYuNTY5MTQ3LDE0Ni4wNzgxMTYgMjI4Ljg5NzAxMiw4Mi43NDkwMTk3IEMyMjkuMjYzMjY4LDgwLjg3NjExNjcgMjI5LjU3OTU4MSw3OS4wNTMxNTc3IDIyOS44NTQyNzMsNzcuMjcxODE4OCBDMjI4LjI5NzY4Myw3Ni40NDc3NDE0IDIyOC4yOTc2ODMsNzYuNDQ3NzQxNCAyMjkuODU0MjczLDc3LjI3MTgxODggQzIzMy41MjUxNjMsNTMuODY0NjkyNCAyMjkuODI5MzAxLDM3LjkzMjUzMDIgMjE3LjE2ODQ3NiwyMy41MDcwMTQ2IiBmaWxsPSIjMjczNDZBIj48L3BhdGg+CgkJPHBhdGggZD0iTTEwMi4zOTY5NzYsNjguODM5NTkyOSBDMTAzLjkzNjkxOSw2OC4xMDcwNzk3IDEwNS42NTE2NjUsNjcuNjk5MjAzIDEwNy40NDk2NTIsNjcuNjk5MjAzIEwxODAuNzY3NTY1LDY3LjY5OTIwMyBDMTg5LjQ0OTUxMSw2Ny42OTkyMDMgMTk3LjU0ODc3Niw2OC4yNjUyMzYgMjA0Ljk0ODgyNCw2OS40NTU1Njk5IEMyMDcuMDcxNDQ4LDY5Ljc5Njg1NDUgMjA5LjEyNzQ3OSw3MC4xODgwODMxIDIxMS4xMjUyNDIsNzAuNjM3NTc5OSBDMjEzLjEyMzAwNiw3MS4wNzg3NTI2IDIxNS4wNjI1MDEsNzEuNTc4MTkzNCAyMTYuOTQzNzI4LDcyLjEyNzU3ODMgQzIxNy44ODQzNDEsNzIuNDAyMjcwOCAyMTguODA4MzA3LDcyLjY4NTI4NzIgMjE5LjcxNTYyNCw3Mi45ODQ5NTE3IEMyMjMuMzUzMjE4LDc0LjIwMDI1NzcgMjI2Ljc0MTA5Miw3NS42MTUzNCAyMjkuODU0MjczLDc3LjI3MTgxODggQzIzMy41MjUxNjMsNTMuODU2MzY4MyAyMjkuODI5MzAxLDM3LjkzMjUzMDIgMjE3LjE2ODQ3NiwyMy41MDcwMTQ2IEMyMDMuMjI1NzUzLDcuNjI0Nzk2NTEgMTc4LjA0NTYxMiwwLjgxNTc1MzMzOCAxNDUuODIzMzU1LDAuODE1NzUzMzM4IEw1Mi4yOTQ3Mzc5LDAuODE1NzUzMzM4IEM0NS43MTA0NDMxLDAuODE1NzUzMzM4IDQwLjEwODM4MTksNS42MTAzODUyIDM5LjA3NjIwNDIsMTIuMTExNDM5OSBMMC4xMzY0NjgzMDIsMjU5LjA2ODI3NyBDLTAuNjM3NjY0OTY4LDI2My45NDYxNDkgMy4xMzMxMTMyMiwyNjguMzQ5NTUyIDguMDYwOTI5MywyNjguMzQ5NTUyIEw2NS44MDQ2MTIsMjY4LjM0OTU1MiBMOTUuODg3NTk3NCw3Ny41Nzk4MDczIEM5Ni41MDM1NzQ0LDczLjY2NzUyMDggOTkuMDE3NDI2NSw3MC40NjI3NzU2IDEwMi4zOTY5NzYsNjguODM5NTkyOSBaIiBmaWxsPSIjMjczNDZBIj48L3BhdGg+CgkJPHBhdGggZD0iTTIyOC44OTcwMTIsODIuNzQ5MDE5NyBDMjE2LjU2OTE0NywxNDYuMDY5NzkyIDE3NC4zNjYzOTgsMTY3Ljk3MDI3MiAxMjAuNDY4NDEsMTY3Ljk3MDI3MiBMOTMuMDI0MTM2NywxNjcuOTcwMjcyIEM4Ni40Mzk4NDE5LDE2Ny45NzAyNzIgODAuODc5NDAwNywxNzIuNzY0OTAzIDc5Ljg1NTU0NzEsMTc5LjI2NTk1OCBMNjEuODE3NDA5NSwyOTMuNjIxMjU4IEM2MS4xNDMxNjQ0LDI5Ny44ODMxNTMgNjQuNDM5NDczOCwzMDEuNzQ1NDk1IDY4Ljc1MTMxMjksMzAxLjc0NTQ5NSBMMTE3LjQyMTgyMSwzMDEuNzQ1NDk1IEMxMjMuMTgyMDM4LDMwMS43NDU0OTUgMTI4LjA4NDg4MiwyOTcuNTUwMTkyIDEyOC45ODM4NzYsMjkxLjg2NDg5MSBMMTI5LjQ1ODM0NCwyODkuMzg0MzM1IEwxMzguNjMxNDA3LDIzMS4yNDk0MjMgTDEzOS4yMjI0MTIsMjI4LjAzNjM1NCBDMTQwLjEyMTQwNiwyMjIuMzUxMDUzIDE0NS4wMjQyNSwyMTguMTU1NzUgMTUwLjc4NDQ2NywyMTguMTU1NzUgTDE1OC4wNjc5NzksMjE4LjE1NTc1IEMyMDUuMjE1MTkzLDIxOC4xNTU3NSAyNDIuMTMyMTkzLDE5OS4wMDIxOTQgMjUyLjkyMDExNSwxNDMuNjA1ODg0IEMyNTcuNDIzNDA2LDEyMC40NTY4MDIgMjU1LjA5MjY4MywxMDEuMTI4NDQyIDI0My4xODEwMTksODcuNTUxOTc1NiBDMjM5LjU2ODM5Nyw4My40Mzk5MTI5IDIzNS4wODE3NTQsODAuMDQzNzE1MyAyMjkuODU0MjczLDc3LjI3MTgxODggQzIyOS41NzEyNTcsNzkuMDYxNDgxNyAyMjkuMjYzMjY4LDgwLjg3NjExNjcgMjI4Ljg5NzAxMiw4Mi43NDkwMTk3IEwyMjguODk3MDEyLDgyLjc0OTAxOTcgWiIgZmlsbD0iIzI3OTBDMyI+PC9wYXRoPgoJCTxwYXRoIGQ9Ik0yMTYuOTUyMDUyLDcyLjEyNzU3ODMgQzIxNS4wNzA4MjUsNzEuNTc4MTkzNCAyMTMuMTMxMzMsNzEuMDc4NzUyNiAyMTEuMTMzNTY2LDcwLjYzNzU3OTkgQzIwOS4xMzU4MDMsNzAuMTk2NDA3MSAyMDcuMDcxNDQ4LDY5LjgwNTE3ODUgMjA0Ljk1NzE0OCw2OS40NjM4OTM5IEMxOTcuNTQ4Nzc2LDY4LjI2NTIzNiAxODkuNDU3ODM1LDY3LjY5OTIwMyAxODAuNzY3NTY1LDY3LjY5OTIwMyBMMTA3LjQ1Nzk3Niw2Ny42OTkyMDMgQzEwNS42NTE2NjUsNjcuNjk5MjAzIDEwMy45MzY5MTksNjguMTA3MDc5NyAxMDIuNDA1Myw2OC44NDc5MTY5IEM5OS4wMTc0MjY1LDcwLjQ3MTA5OTYgOTYuNTExODk4NCw3My42Njc1MjA4IDk1Ljg5NTkyMTQsNzcuNTg4MTMxMyBMODAuMzEzMzY3OCwxNzYuMzg1ODQ5IEw3OS44NjM4NzExLDE3OS4yNjU5NTggQzgwLjg4NzcyNDgsMTcyLjc2NDkwMyA4Ni40NDgxNjU5LDE2Ny45NzAyNzIgOTMuMDMyNDYwNywxNjcuOTcwMjcyIEwxMjAuNDc2NzM0LDE2Ny45NzAyNzIgQzE3NC4zNzQ3MjIsMTY3Ljk3MDI3MiAyMTYuNTc3NDcxLDE0Ni4wNzgxMTYgMjI4LjkwNTMzNiw4Mi43NDkwMTk3IEMyMjkuMjcxNTkyLDgwLjg3NjExNjcgMjI5LjU3OTU4MSw3OS4wNjE0ODE3IDIyOS44NjI1OTcsNzcuMjcxODE4OCBDMjI2Ljc0MTA5Miw3NS42MjM2NjQgMjIzLjM2MTU0Miw3NC4yMDAyNTc3IDIxOS43MjM5NDgsNzIuOTkzMjc1NyBDMjE4LjgxNjYzMSw3Mi42OTM2MTEyIDIxNy44OTI2NjUsNzIuNDAyMjcwOCAyMTYuOTUyMDUyLDcyLjEyNzU3ODMiIGZpbGw9IiMxRjI2NEYiPjwvcGF0aD4KCTwvZz4KPC9zdmc+"},{"title":"SolidWeb","value":"solidweb.org","selected":false,"icon":"data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjM1MiIgaGVpZ2h0PSIzMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik04Ny45NzI5NiAyODIuMzUyN0wyNy4yNDEzMyAxNzcuMDIyMDdjLTUuNjIwNDEtOS43NTc2NS01LjYyMDQxLTIxLjc3OTA4IDAtMzEuNTM2NzRMODcuOTcyOTYgNDAuMjMyOGM1LjY0NjQzLTkuNzgzNjcgMTYuMDgwNjEtMTUuNzk0MzkgMjcuMzIxNDMtMTUuNzk0MzloMTIxLjM4NTJjMTEuMjY2ODQgMCAyMS43MjcwNCA2LjAxMDcyIDI3LjMyMTQzIDE1Ljc5NDRsNjAuNzU3NjUgMTA1LjMwNDU4YzUuNjIwNDEgOS43NTc2NiA1LjYyMDQxIDIxLjc3OTA5IDAgMzEuNTM2NzRsLTYwLjczMTYzIDEwNS4zMzA2MWMtNS42NDY0MyA5Ljc4MzY3LTE2LjA4MDYxIDE1Ljc5NDM5LTI3LjMyMTQzIDE1Ljc5NDM5SDExNS4zNzI0NWMtMTEuMzE4ODgtLjA1MjA0LTIxLjcyNzA0LTYuMDg4NzgtMjcuMzk5NS0xNS44NDY0M3oiIGZpbGw9IiNGRkYiLz4KICAgIDxwYXRoIGQ9Ik05My4xNTEwMiAyNzUuMTk3MDhsLTU3LjExNDgtOTkuMDU5N2MtNS4zMDgxNi05LjE4NTItNS4zMDgxNi0yMC41MDQwOCAwLTI5LjY2MzI2bDU3LjExNDgtOTkuMDg1NzJjNS4zMzQxOC05LjIxMTIyIDE1LjE0Mzg4LTE0Ljg1NzY1IDI1LjczNDE4LTE0Ljg1NzY1aDExNC4yMjk2YzEwLjU5MDMgMCAyMC40MjYwMiA1LjY0NjQzIDI1LjczNDE4IDE0Ljg1NzY1bDU3LjE2Njg0IDk5LjAzMzY4YzUuMzA4MTYgOS4xODUyIDUuMzA4MTYgMjAuNTA0MDggMCAyOS42NjMyNkwyNTguODc1IDI3NS4yMjMxYy01LjMzNDE4IDkuMjExMjItMTUuMTQzODggMTQuODU3NjUtMjUuNzM0MTggMTQuODU3NjVIMTE4LjkzNzI0Yy0xMC42NDIzNCAwLTIwLjQ1MjA0LTUuNjcyNDUtMjUuNzg2MjItMTQuODgzNjd6IiBmaWxsPSIjN0M0REZGIi8+CiAgICA8cGF0aCBkPSJNMTE4LjQ2ODg4IDE0Mi4yMzI4aDExNy41MzQxOGMxLjQ4MzE2IDAgMi42NTQwOC0xLjE5Njk1IDIuNjU0MDgtMi42NTQwOXYtMjIuMDM5MjhjMC0xNC42NDk1LTExLjg5MTMyLTI2LjU0MDg1LTI2LjU0MDgxLTI2LjU0MDg1aC03MC41NjczNWMtMjAuNTMwMS0uMDI2LTM3LjE1NzIyIDE2LjYwMTA1LTM3LjE1NzIyIDM3LjEzMTE1LS4wMjU5NCA3LjgzMjE0IDYuMjcxIDE0LjEwMzA2IDE0LjA3NzEyIDE0LjEwMzA2ek0xMjkuOTk1OTIgMjM5LjYwMTE2SDIwMC4yMjVjMjEuMjA2NjMgMCAzOC40MzIxNC0xNy4yMjU1MSAzOC40MzIxNC0zOC40MzIxNCAwLTcuMDc3NTUtNS43MjQ0OS0xMi44MjgwNi0xMi44MjgwNi0xMi44MjgwNkgxMDYuOTQxODRjLTEuNDU3MTUgMC0yLjU1MDA1IDEuMTcwOTEtMi41NTAwNSAyLjU1djIzLjA1NDA4Yy0uMDI1OTcgMTQuMTgxMTIgMTEuNDc1MDUgMjUuNjU2MTIgMjUuNjA0MTMgMjUuNjU2MTJ6IiBmaWxsPSIjRjdGN0Y3Ii8+CiAgICA8cGF0aCBkPSJNMTA5LjU5NTkyIDEzOS4zMTg1bDg3LjY2Mjc1IDg3LjY2Mjc2YzUuODAyNTUgNS44MDI1NSAxNS4xOTU5MiA1LjgwMjU1IDIwLjk5ODQ3IDBsMTUuMTk1OTItMTUuMTk1OTJjNS44MDI1NS01LjgwMjU1IDUuODAyNTUtMTUuMTk1OTEgMC0yMC45OTg0N2wtODcuNjM2NzMtODcuNjYyNzVjLTUuODAyNTUtNS44MDI1NS0xNS4xOTU5Mi01LjgwMjU1LTIwLjk5ODQ3IDBsLTE1LjE5NTkyIDE1LjE5NTkyYy01Ljg1NDYgNS44MDI1NS01Ljg1NDYgMTUuMjIxOTQtLjAyNjAyIDIwLjk5ODQ3eiIgZmlsbD0iI0Y3RjdGNyIvPgogICAgPHBhdGggZmlsbD0iIzQ0NCIgb3BhY2l0eT0iLjMiIGQ9Ik0xOTguNjg5OCAyMjguNDY0NDNsLTUxLjQ5NDQtNDAuMTIzNDdoMTEuMzk2OTV6TTE0NC4zNTkxOCAxMDEuNjY2OThsNDAuNTY1ODIgNDAuNTY1ODFoMTMuNzY0OHoiLz4KICA8L2c+Cjwvc3ZnPg==","underline":true},{"title":"Custom","value":"","selected":false}]'),fe=({issuers:e=[],onChange:s})=>{const{t:t}=(0,l.Bd)(),[i,r]=(0,a.useState)(null),[c,n]=(0,a.useState)(""),d=!c&&!(null!==i&&void 0!==i&&i.value)||!(null!==i&&void 0!==i&&i.title)||e.some((e=>e.domain===c));return(0,M.jsx)("div",{className:"py-4 w-full flex flex-col gap-4",children:(0,M.jsxs)("ul",{className:"flex flex-col gap-4",children:[e.map((({enable:t,favicon:a,domain:l})=>(0,M.jsxs)("li",{className:"flex items-center justify-between gap-10",children:[(0,M.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,M.jsx)(we,{className:"cursor-pointer",onClick:()=>{s(e.filter((e=>e.domain!==l)))}}),(0,M.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[Boolean(a)&&(0,M.jsx)("img",{src:a,alt:"logo",className:"w-8 h-8"}),(0,M.jsx)(b.A,{readOnly:!0,value:l,prefix:"https://",placeholder:"Issuer Domain",className:"w-[280px]"})]})]}),(0,M.jsx)("div",{className:"w-14 flex justify-end",children:(0,M.jsx)(T.A,{checked:t,onClick:()=>{s(e.map((e=>({...e,enable:e.domain===l?!t:e.enable}))))}})})]},l))),(0,M.jsxs)("li",{className:"flex items-center justify-between gap-10 cursor-pointer",children:[(0,M.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,M.jsx)(_e.A,{options:Ae.map((s=>({...s,selected:e.some((e=>e.domain===s.value))}))),current:i,updateSelect:r}),(0,M.jsx)("div",{className:"flex items-center justify-between gap-4",children:(0,M.jsx)(b.A,{onChange:e=>{n(e.target.value)},readOnly:!(null===i||void 0===i||!i.value),value:(null===i||void 0===i?void 0:i.value)||c,prefix:"https://",placeholder:"domain.com",className:"w-[280px]"})})]}),(0,M.jsx)("div",{className:"w-14 flex justify-end",children:(0,M.jsx)(o.A,{disabled:d,onClick:()=>{const t=Ae.find((e=>e.value===(null===i||void 0===i?void 0:i.value)));if(!t)return;const{icon:a,value:l}=t;s(e.concat({enable:!0,favicon:a||"",domain:l||c})),r(null),n("")},children:t("action.add")})})]})]})})};t(24555);const ve=({to:e,children:s})=>(0,M.jsx)("a",{href:e,className:"text-primary-500",target:"_blank",rel:"noreferrer",children:s});function Ie({link:e="#"}){return(0,M.jsx)(f.Ay,{delay:[0,500],interactive:!0,arrow:v.qO,placement:"bottom",content:(0,M.jsx)("div",{className:"py-2 px-3 bg-gray-800 text-xs text-white rounded-lg",children:(0,M.jsx)(l.x6,{ns:"setting",i18nKey:"login.more_details",children:(0,M.jsx)(ve,{to:e})})}),children:(0,M.jsx)(ue.A,{className:"icon"})})}function be(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"login"}),{t:s}=(0,l.Bd)(),{changed:t,clientId:a,updateClientId:i,updateClientIdToServer:r}=(0,pe.A)(),{config:c,changed:d,updateGithubAuthConfigToServer:o,updateGithubAuthConfig:u}=(0,he.A)(),{values:x,updateConfig:j,setValues:m,reset:g,changed:N}=E("login"),h=e=>{const{key:s}=e.target.dataset;s&&u({[s]:e.target.value})},p=e=>{m((s=>s?{...s,...e}:s))};if(!x)return null;const{google:_,magic_link:D,github:y,metamask:w,password:A,oidc:f=[]}=x,v=t||N||d;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full max-md:h-auto",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsx)("div",{className:"txt",children:(0,M.jsx)(oe.A,{children:e("password")})}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("password_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{password:!A}),checked:A})]})}),(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsx)("div",{className:"txt",children:(0,M.jsx)(oe.A,{children:e("magic_link")})}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("magic_link_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{magic_link:!D}),checked:D})]})}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("google")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-google"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("google_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{google:!_}),checked:_})]}),(0,M.jsx)("div",{className:"row",children:(0,M.jsx)(b.A,{disabled:!_,onChange:e=>{i(e.target.value)},placeholder:"Client ID",value:a})})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("github")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-github"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("github_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{github:!y}),checked:y})]}),(0,M.jsxs)("div",{className:"row inputs",children:[(0,M.jsx)(b.A,{disabled:!y,"data-key":"client_id",onChange:h,placeholder:"GitHub Client ID",value:null===c||void 0===c?void 0:c.client_id}),(0,M.jsx)(b.A,{disabled:!y,"data-key":"client_secret",onChange:h,placeholder:"GitHub Client Secret",value:null===c||void 0===c?void 0:c.client_secret})]})]}),(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("metamask")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-metamask"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("metamask_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{metamask:!w}),checked:w})]})}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)("div",{className:"row",children:(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("oidc")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-webid"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("oidc_desc")})]})}),(0,M.jsx)("div",{className:"row",children:(0,M.jsx)(fe,{issuers:f,onChange:e=>{m((s=>s?{...s,oidc:e}:s))}})})]})]}),v&&(0,M.jsx)(de.A,{saveHandler:async()=>{const{google:e}=x;N&&j(x),e&&t&&(await r(),N||n.Ay.success(s("tip.update"))),y&&d&&(await o(),N||n.Ay.success(s("tip.update")))},resetHandler:g})]})}function Te(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"smtp"}),[s,t]=(0,a.useState)(""),[i,{isSuccess:r,isError:c}]=(0,I.lg)(),{reset:d,updateConfig:u,values:x,originalValues:j,setValues:m,changed:g,toggleEnable:N}=E("smtp"),h=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;m((e=>e?{...e,[t]:s}:e))};if((0,a.useEffect)((()=>{r&&n.Ay.success("Send Test Email Successfully"),c&&n.Ay.error("Send Test Email Fail")}),[r,c]),!x)return null;const{host:p,port:_,from:D,username:y,password:w,enabled:A=!1}=x;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsxs)("div",{className:"input row",children:[(0,M.jsxs)(oe.A,{className:"flex items-center gap-2",children:[e("enable")," ",(0,M.jsx)(xe,{link:"https://doc.voce.chat/setting/smtp/smtp-gmail",text:e("how_to")})]}),(0,M.jsx)(T.A,{onClick:N,checked:A})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"host",children:e("host")}),(0,M.jsx)(b.A,{disabled:!A,"data-type":"host",onChange:h,value:p,name:"host",placeholder:"SMTP Host"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"port",children:e("port")}),(0,M.jsx)(b.A,{disabled:!A,type:"number","data-type":"port",onChange:h,value:_,name:"port",placeholder:"SMTP Port"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"from",children:e("from")}),(0,M.jsx)(b.A,{disabled:!A,"data-type":"from",onChange:h,value:D,name:"from",placeholder:"SMTP From"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"username",children:e("username")}),(0,M.jsx)(b.A,{disabled:!A,"data-type":"username",onChange:h,value:y,name:"username",placeholder:"SMTP Username"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"password",children:e("password")}),(0,M.jsx)(b.A,{type:"password",disabled:!A,"data-type":"password",onChange:h,value:w,name:"password",placeholder:"SMTP Password"})]})]}),(0,M.jsxs)("div",{className:"flex gap-4 whitespace-nowrap mt-6",children:[(0,M.jsx)(b.A,{type:"email",disabled:!j.enabled,onChange:e=>{const s=e.target.value;t(s)},value:s,name:"email",placeholder:"test@email.com"}),(0,M.jsx)(o.A,{disabled:!A||!s,onClick:()=>{i({to:s,subject:"test title",content:"test content"})},children:e("send_test_email")})]}),g&&(0,M.jsx)(de.A,{saveHandler:()=>{var e;u({...x,port:Number(null!==(e=null===x||void 0===x?void 0:x.port)&&void 0!==e?e:0)})},resetHandler:d})]})}var Le=t(63363);const ke=()=>{const e=(0,g.GV)((e=>{var s;return null!==(s=e.server.max_file_expiry_mode)&&void 0!==s?s:"Off"}),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"data.auto_delete_file"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,c]=(0,a.useState)(e),[u,{isSuccess:j,isLoading:m}]=(0,I.u3)();(0,a.useEffect)((()=>{j&&(i(),n.oR.success(t("tip.update")))}),[j]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("off"),s("day1"),s("day7"),s("day30"),s("day90"),s("day180")],values:["Off","Day1","Day7","Day30","Day90","Day180"],value:e,onChange:e=>{c(e)}})}),r!==e&&(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:"Are you sure?",description:"Off"==r?"":s("confirm_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:()=>{c(e)},children:t("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{u({max_file_expiry_mode:r})},className:"danger",children:m?"Updating":t("action.yes")})]})})})]})},Ee=({context:e,title:s,desc:t,closeModal:i})=>{const{t:r}=(0,l.Bd)(),[c,{isLoading:u,isSuccess:j}]=(0,I.J9)(),[m,{isLoading:g,isSuccess:N}]=(0,I.kw)(),h=j||N;(0,a.useEffect)((()=>{h&&(n.Ay.success("Clear success"),i())}),[h]);const p=g||u;return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s,description:t,buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:i,children:r("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{switch(e){case"chat":m();break;case"files":c()}},className:"danger",children:p?"Clearing":r("action.remove")})]})})})};var Oe=t(97780);function Ce(){const[e,s]=(0,a.useState)(null),{t:t}=(0,l.Bd)("setting"),i=e=>{s(e)},r={chat:t("data.clear_msgs.desc"),files:t("data.clear_files.desc")};return(0,M.jsxs)("div",{className:"relative w-full md:w-[512px] flex flex-col gap-6",children:[(0,M.jsx)(Oe.A,{version:"0.3.10",empty:!0,children:(0,M.jsx)(Le.A,{title:t("data.clear_msgs.title"),desc:t("data.clear_msgs.desc"),children:(0,M.jsx)(o.A,{onClick:i.bind(null,"chat"),className:"danger",children:t("data.clear_msgs.btn")})})}),(0,M.jsx)(Le.A,{title:t("data.clear_files.title"),desc:t("data.clear_files.desc"),children:(0,M.jsx)(o.A,{onClick:i.bind(null,"files"),className:"danger",children:t("data.clear_files.btn")})}),(0,M.jsx)(ke,{}),e&&(0,M.jsx)(Ee,{closeModal:i.bind(null,null),context:e,title:"Are you sure?",desc:r[e]})]})}var ze=t(85666),Se=t(53374);const Ue=e=>{const s=_()();let t=s;switch(e){case"year":t=s.add(100,"year");break;case"month":t=s.add(1,"month");break;case"quarter":t=s.add(3,"month")}return t.format("YYYY-MM-DD")},Pe=(0,F.JZ)(),Ye=({closeModal:e})=>{const{t:s}=(0,l.Bd)("setting"),{t:t}=(0,l.Bd)(),[i,{isLoading:r,isSuccess:c}]=(0,I.Bh)(),[u,j]=(0,a.useState)(location.hostname),[m,g]=(0,a.useState)(!1),[N,h]=(0,a.useState)(`${Pe[0].pid}|${Pe[0].limit}|${Pe[0].type}|${Pe[0].sub_dur||""}`),p=()=>{g((e=>!e))},_=N.includes("booking");return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s("license.renew"),description:s("license.renew_select"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{onClick:e,className:"ghost",children:t("action.cancel")}),_?(0,M.jsx)(o.A,{onClick:()=>{window.open("https://calendly.com/hansu","_blank")},children:"Booking a meeting!"}):(0,M.jsx)(f.Ay,{visible:m,interactive:!0,placement:"top-end",offset:[-50,-40],trigger:"click",content:(0,M.jsxs)("div",{className:"p-3 rounded-lg border border-solid border-gray-200 dark:border-gray-900 flex flex-col items-start gap-3 w-[430px] bg-white dark:bg-gray-800 shadow shadow-gray-200 dark:shadow-gray-900 drop-shadow-xl",children:[(0,M.jsx)("div",{className:"text-gray-500 text-sm",children:s("license.tip_domain")}),(0,M.jsx)(b.A,{value:u,onChange:e=>{j(e.target.value)}}),(0,M.jsxs)("div",{className:"flex justify-between items-center w-full mt-4",children:[(0,M.jsxs)("span",{className:"text-xs text-orange-500 text-left",children:[" ",s("license.tip_port")]}),(0,M.jsxs)("div",{className:"flex gap-3 whitespace-nowrap",children:[(0,M.jsx)(o.A,{className:"mini cancel",onClick:p,children:t("action.cancel")}),(0,M.jsx)(o.A,{className:"mini",disabled:r||c,onClick:async()=>{const e=`https://${u}`;if(!Se.t6(e))return void n.Ay.error("Invalid Host");if(""!==new URL(e).port||u.endsWith(":443"))return void n.Ay.error(s("license.tip_port"));const[t,a,l,r="month"]=N.split("|"),c={user_limit:Number(a),expire:Ue("subscription"==l?r:"year"),domain:u.startsWith("localhost")?"*":u},d=await i({type:l,priceId:t,metadata:c,cancel_url:location.href,success_url:`${location.origin}/#/cb/payment_success`});"error"in d?n.Ay.error("Payment link initialized failed!"):(d.data,location.href=d.data.session_url)},children:r?"Initialize Payment URL":c?"Redirecting":s("license.tip_confirm")})]})]})]}),children:(0,M.jsxs)("button",{onClick:p,className:"text-sm text-white bg-primary-400 break-keep shadow rounded-lg px-3.5 py-2.5 md:hover:bg-primary-500 active:bg-primary-500 disabled:bg-gray-300",children:[" ",s("license.renew")]})})]}),children:(0,M.jsx)(Me.A,{options:Pe.map((({title:e,desc:s,price:t})=>`${e} ${s?`[${s}]`:""}${t?`[${t}]`:""}`)),values:Pe.map((({pid:e,limit:s,type:t="payment",sub_dur:a="month"})=>`${e}|${s}|${t}|${a}`)),value:N,onChange:e=>{h(e)}})})})},Be=({closeModal:e,updateLicense:s,updating:t,updated:i})=>{const[r,c]=(0,a.useState)(""),{t:u}=(0,l.Bd)("setting"),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{i&&(n.Ay.success(j("tip.update")),e())}),[i]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{onClick:e,className:"ghost",children:j("action.cancel")}),(0,M.jsx)(o.A,{disabled:t||i||!r,onClick:async()=>{const e=await s(r);"boolean"!=typeof e||e||n.Ay.error("Check License Invalid!")},children:t?"Updating":i?"Update Successfully":u("license.update")})]}),children:(0,M.jsx)(me.A,{rows:18,placeholder:u("license.update_placeholder"),value:r,onChange:e=>{c(e.target.value)}})})})},Qe=({label:e,data:s,foldable:t=!1,...a})=>{const l=(0,Q.A)("font-bold w-full cursor-pointer dark:text-green-500",t?"truncate":"whitespace-pre-wrap break-all");return s?(0,M.jsxs)("div",{className:"whitespace-nowrap flex flex-col items-start justify-start text-lg",children:[(0,M.jsx)("span",{className:"text-sm text-green-500",children:e}),Array.isArray(s)?(0,M.jsx)("ul",{className:l,children:s.map((e=>(0,M.jsx)("li",{children:e},e)))}):(0,M.jsx)("span",{className:l,...a,children:s})]}):null};function Re(){var e;const{t:s,i18n:t}=(0,l.Bd)("setting"),{license:i,reachLimit:r,upsertLicense:c,upserting:n,upserted:d}=(0,ze.A)(!0),[u,x]=(0,a.useState)(!1),[j,m]=(0,a.useState)(!1),[g,N]=(0,a.useState)(!0),h=()=>{x((e=>!e))},p=()=>{m((e=>!e))};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"max-w-3xl flex flex-col justify-start items-start gap-4",children:[(0,M.jsxs)("div",{className:(0,Q.A)("relative w-full p-3 rounded border-solid border flex flex-col gap-4 shadow",r?"border-red-600 bg-red-200/50":"border-green-600 bg-green-100 dark:bg-green-900"),children:[(0,M.jsx)(Qe,{label:s("license.signed"),data:null!==i&&void 0!==i&&i.sign?"Yes":"Not Yet"}),(0,M.jsx)(Qe,{label:s("license.domain"),data:null===i||void 0===i?void 0:i.domains}),(0,M.jsx)(Qe,{label:s("license.user_limit"),data:(null!==(e=null===i||void 0===i?void 0:i.user_limit)&&void 0!==e?e:0)>=999999?"No Limit":null===i||void 0===i?void 0:i.user_limit}),(0,M.jsx)(Qe,{label:s("license.expire"),data:_()(null===i||void 0===i?void 0:i.expired_at).format("YYYY-MM-DD h:mm:ss A")}),(0,M.jsx)(Qe,{label:s("license.create"),data:_()(null===i||void 0===i?void 0:i.created_at).format("YYYY-MM-DD h:mm:ss A")}),(0,M.jsx)(Qe,{label:s("license.value"),data:null===i||void 0===i?void 0:i.base58,foldable:g,title:g?"Click to see full text":"Click to fold text",onClick:()=>{N((e=>!e))}})]}),(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)(o.A,{onClick:h,children:s("license.renew")}),(0,M.jsx)(o.A,{onClick:p,className:"ghost",children:s("license.update")})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-4 bg-primary-500 text-white rounded drop-shadow-xl p-5",children:[(0,M.jsxs)("h2",{className:"text-2xl font-bold",children:[s("license.tip.title")," \ud83c\udf81"]}),(0,M.jsxs)("p",{className:"flex flex-col",children:[(0,M.jsx)("span",{children:s("license.tip.user_test")}),(0,M.jsxs)("span",{children:[s("license.tip.contact"),t.language.startsWith("zh")?"Privoce":(0,M.jsx)("a",{className:"underline text-lg text-green-200",href:"https://calendly.com/hansu/han-meeting",target:"_blank",rel:"noopener noreferrer",children:"https://calendly.com/hansu/han-meeting"})]})]})]})]}),u&&(0,M.jsx)(Ye,{closeModal:h}),j&&(0,M.jsx)(Be,{updated:d,updating:n,updateLicense:c,closeModal:p})]})}var Ge=t(2890);const We=()=>{const e=(0,g.GV)((e=>{var s;return null!==(s=e.server.chat_layout_mode)&&void 0!==s?s:"Left"}),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.chat_layout"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("left"),s("self_right")],values:["Left","SelfRight"],value:e,onChange:e=>{r({chat_layout_mode:e})}})})},Ve=()=>{const e=(0,g.GV)((e=>!!e.server.contact_verification_enable),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.contact_verify"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("enable"),s("disable")],values:["true","false"],value:`${e}`,onChange:()=>{r({contact_verification_enable:!e})}})})},Ke=()=>{const[e,s]=(0,a.useState)(localStorage.theme||"auto"),{t:t}=(0,l.Bd)("setting");return(0,M.jsx)(Le.A,{title:t("overview.theme.title"),desc:t("overview.theme.desc"),children:(0,M.jsx)(Me.A,{options:[t("overview.theme.auto"),t("overview.theme.dark"),t("overview.theme.light")],values:["auto","dark","light"],value:e,onChange:e=>{(e=>{if(s(e),localStorage.theme=e,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),"auto"!==e)document.documentElement.classList.add(e);else{const e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.add(e?"dark":"light")}})(e)}})})},Fe=()=>{const{data:e,isSuccess:s}=(0,I.X)(),[t,i]=(0,a.useState)(location.origin),{t:r}=(0,l.Bd)("setting"),{t:c}=(0,l.Bd)(),[d,{isLoading:u,isSuccess:x}]=(0,I.PX)();return(0,a.useEffect)((()=>{x&&n.oR.success(c("tip.update"))}),[x]),(0,a.useEffect)((()=>{s&&e&&i(e)}),[s,e]),(0,M.jsx)(Le.A,{title:r("overview.url.title"),desc:r("overview.url.desc"),children:(0,M.jsxs)("div",{className:"flex items-center gap-4 mt-2",children:[(0,M.jsx)(b.A,{placeholder:"frontend url",value:t,onChange:e=>{i(e.target.value)}}),(0,M.jsxs)(o.A,{disabled:!t||u,className:"small",onClick:()=>{d(t)},children:[" ",c("action.update")]})]})})},Ze=["en","zh","jp","tr","pt","es"],He=()=>{const{t:e,i18n:s}=(0,l.Bd)("setting");return(0,M.jsx)(Le.A,{title:e("overview.lang.title"),desc:e("overview.lang.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.lang.en"),e("overview.lang.zh"),e("overview.lang.jp"),e("overview.lang.tr"),e("overview.lang.pt"),e("overview.lang.es")],values:Ze,value:s.language.split("-")[0],onChange:e=>{(e=>{s.changeLanguage(e)})(e)}})})},Je=()=>{const e=(0,g.GV)((e=>!!e.server.show_user_online_status),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.online_status"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le.A,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("enable"),s("disable")],values:["true","false"],value:`${e}`,onChange:()=>{r({show_user_online_status:!e})}})})};var Xe=t(859);const qe=()=>{const e=(0,y.wA)(),s=(0,g.GV)((e=>!!e.ui.msgSound),y.bN),{t:t}=(0,l.Bd)("setting",{keyPrefix:"overview.message_sound"});return(0,M.jsx)(Le.A,{title:t("title"),desc:t("desc"),children:(0,M.jsx)(Me.A,{options:[t("enable"),t("disable")],values:["true","false"],value:`${s}`,onChange:()=>{e((0,Xe.iy)(!s))}})})},$e=()=>{const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),t=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.is_admin}),y.bN),i=(0,g.GV)((e=>e.server),y.bN),[r,{isSuccess:c}]=(0,I.PZ)(),[d]=(0,I.NI)(),[o,u]=(0,a.useState)(!1),[x,j]=(0,a.useState)(i),m=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;j((e=>({...e,[t]:s})))};(0,a.useEffect)((()=>{i&&j(i)}),[i]),(0,a.useEffect)((()=>{c&&n.Ay.success(s("tip.update"))}),[c]),(0,a.useEffect)((()=>{if(i&&x){const{name:e,description:s}=x,{name:t,description:a}=i;u(t!==e||a!==s)}}),[i,x]);const{name:N,description:h,logo:p}=x;return x?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex gap-4",children:[(0,M.jsx)("div",{className:"w-24 h-24",children:(0,M.jsx)(Y.A,{disabled:!t,url:c?`${p}?t=${+new Date}`:p,name:N,uploadImage:r})}),t&&(0,M.jsx)("div",{className:"flex flex-col justify-between items-start",children:(0,M.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-100",children:e("overview.upload_desc")})})]}),(0,M.jsxs)("div",{className:"flex flex-col items-start gap-6 mb-3",children:[(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsx)(oe.A,{htmlFor:"name",children:e("overview.name")}),(0,M.jsx)(b.A,{disabled:!t,"data-type":"name",onChange:m,value:N,name:"name",id:"name",placeholder:"Server Name"})]}),(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsx)(oe.A,{htmlFor:"desc",children:e("overview.desc")}),(0,M.jsx)(me.A,{disabled:!t,"data-type":"description",onChange:m,value:null!==h&&void 0!==h?h:"",rows:4,name:"desc",id:"desc",placeholder:"Tell the world a bit about this server"})]})]}),o&&(0,M.jsx)(de.A,{saveHandler:()=>{const{name:e,description:s}=x;d({name:e,description:s})},resetHandler:()=>{j(i)}})]}):null},es=({})=>{const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),{refetch:t}=(0,I.Mv)(),i=(0,g.GV)((e=>{var s;return null!==(s=e.server.only_admin_can_create_group)&&void 0!==s&&s}),y.bN),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(t(),n.Ay.success(s("tip.update")))}),[c]);return(0,M.jsx)(Oe.A,{empty:!0,version:"0.3.50",children:(0,M.jsx)(Le.A,{title:e("overview.admin_create_group.title"),desc:e("overview.admin_create_group.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.admin_create_group.enable"),e("overview.admin_create_group.disable")],values:["true","false"],value:`${i}`,onChange:e=>{r({only_admin_can_create_group:"true"==e})}})})})};function ss(){const{t:e}=(0,l.Bd)("setting"),s=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.is_admin}),y.bN),{values:t,updateConfig:a}=E("login");if(!t)return null;const{who_can_sign_up:i,guest:r=!1}=t;return(0,M.jsxs)("div",{className:"relative w-full md:w-[512px] flex flex-col gap-6",children:[(0,M.jsx)($e,{}),s&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fe,{}),(0,M.jsx)("div",{className:"flex flex-col",children:(0,M.jsx)("h4",{className:"font-bold text-gray-700 dark:text-white",children:e("overview.title_feat")})}),(0,M.jsx)(Le.A,{title:e("overview.sign_up.title"),desc:e("overview.sign_up.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.sign_up.everyone"),e("overview.sign_up.invite")],values:["EveryOne","InvitationOnly"],value:i,onChange:e=>{var s;s=e,a({...t,who_can_sign_up:s})}})}),(0,M.jsx)(es,{}),(0,M.jsx)(Le.A,{title:e("overview.guest_mode.title"),desc:e("overview.guest_mode.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.guest_mode.enable"),e("overview.guest_mode.disable")],values:["true","false"],value:`${r}`,onChange:e=>{(e=>{const s="true"===e;a({...t,guest:s})})(e)}})}),(0,M.jsx)(Je,{}),(0,M.jsx)(We,{}),(0,M.jsx)(Ve,{})]}),(0,M.jsx)(He,{}),(0,M.jsx)(Ke,{}),(0,M.jsx)(qe,{})]})}var ts=t(63101),as=t(26375),ls=t(27820);const is=({paramKey:e,paramDefault:s,remarks:t})=>(0,M.jsxs)("tr",{className:"bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-50 border-b transition duration-300 ease-in-out md:hover:bg-gray-100 dark:md:hover:bg-gray-900",children:[(0,M.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:e}),(0,M.jsx)("td",{className:"text-sm font-light px-6 py-4 whitespace-nowrap",children:"theme-color"==e?(0,M.jsxs)("span",{style:{color:s},children:[" ",s]}):s}),(0,M.jsx)("td",{className:"text-sm font-light px-6 py-4",children:(0,M.jsx)(ls.A,{linkPreview:!1,text:t,mention:!1})})]});function rs(){const e=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.uid}),y.bN),s=`${location.origin}/widget.html?host=${e}`,{t:t}=(0,l.Bd)("setting",{keyPrefix:"widget"}),{t:a}=(0,l.Bd)("widget"),{t:i}=(0,l.Bd)(),{copied:r,copy:c}=(0,z.A)({enableToast:!1});return(0,M.jsxs)("div",{className:"flex flex-col justify-start items-start",children:[(0,M.jsx)("div",{className:"font-semibold dark:text-white",children:t("tip")}),(0,M.jsxs)("label",{htmlFor:"code",className:"font-semibold dark:text-white",children:[t("code"),":"]}),(0,M.jsx)(ts.A,{id:"code",language:"html",style:as.A,className:"rounded",children:`\x3c!-- ${t("code_comment")} --\x3e\n