dsh-mobile 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["useState","createElement"],"sources":["../src/client-messages.ts","../src/frp-template.ts","../src/task-notify.ts","../src/native-mobile.ts","../src/local-admin-host.ts","../src/client.ts"],"sourcesContent":["export type MobileControlLocale = 'it' | 'en' | 'zh'\n\nexport const MOBILE_CONTROL_MESSAGES = {\n en: {\n mobileAccess: 'Mobile access', collapseMobileAccess: 'Collapse Mobile access', downloadAndroid: 'Download latest Android app', downloadAndroidVersion: 'Download latest Android app · v{version}', downloadAndroidAria: 'Download the latest Android app from GitHub Releases', downloadAndroidVersionAria: 'Download Android app v{version} from GitHub Releases', updatePlugin: 'Update plugin', updatePluginAria: 'Update DSH Mobile to v{version}', updatingPlugin: 'Updating…', pluginUpdatedRestart: 'Updated to v{version}. Restart DSH to apply it.', pluginUpdateFailed: 'Update failed: {error}', updateTo: 'Update to v{version}', updateNotice: 'Restart DSH after installing. Existing apps and paired devices need no re-pairing; unsure about the desktop version? Check the README compatibility table.', updateNotesEmpty: 'No release notes fetched — updating is still fine; full details on the GitHub Release page.', updateNow: 'Update now', updateLater: 'Not now',\n lan: 'Local network', remote: 'Remote', lanAccess: 'Local network access', remoteAccess: 'Remote access', browserAccess: 'Browser access', remoteAddress: 'Remote address', loadingStatus: 'Loading status…', loadingRemoteStatus: 'Loading remote status…',\n generateCopyKey: 'Generate and copy key', copyPairLink: 'Copy pairing link', managePairedDevices: 'Manage paired devices', clearAllDevices: 'Clear all devices', pairingQr: 'Pairing QR code',\n remoteIntro: 'Choose the remote channel that suits you. Switching or disabling remote access does not affect the local network.', httpFrameWarning: 'HTTP pages may be embedded for compatibility, but their contents are unencrypted and can be altered. Use HTTPS for sensitive work.', chooseProvider: 'Choose connection method', currentProvider: 'Current connection', remoteStateOff: 'Off', remoteStateConnecting: 'Connecting', remoteStateAttention: 'Needs attention', providerInfoAria: 'View remote connection security and network information', providerGroupAria: 'Remote connection method', providerSafeTitle: 'You remain protected', providerSafeText: 'Only paired devices can access DSH. cpolar is installed on demand and can be removed completely; Tailscale may be slow or unavailable on mainland China networks, where cpolar is recommended.',\n builtIn: 'Built in', mainlandPreferred: 'Preferred in mainland China', tailscaleDescription: 'Wider coverage; mainland China networks may be unstable. The first connection requires login and Funnel authorization.', cpolarDescription: 'Installs the official component on demand and is suitable for mainland China networks.',\n prepareCpolar: 'Prepare cpolar', checkingComponent: 'Checking component…', installOfficial: 'Install official component', cpolarAccountNote: 'Sign in to the cpolar website and copy the Authtoken. The token is stored only in the plugin private directory and is never shown on the page or in logs.', registerCpolar: 'Register with cpolar', openDashboard: 'Open dashboard to get token', tokenPlaceholder: 'Paste cpolar Authtoken', saveConnect: 'Save and connect', saving: 'Saving…', componentDetails: 'Component source and cleanup', componentDetailsText: 'Downloaded from the official cpolar website and verified at a fixed version only after you choose Install. It does not add a system service, startup item, registry entry, or PATH entry.', pluginPrivateDirectory: 'Plugin private directory', officialDownload: 'Official download page', terms: 'Terms of service', purgeCpolar: 'Completely remove cpolar component and configuration', tailscaleHelp: 'How to use Tailscale', tailscaleHelpText: 'The runtime component is included with the plugin. The first connection opens the official Tailscale login and Funnel authorization pages; the plugin never accesses your account password.',\n funnelGuideAria: 'Steps to enable Tailscale Funnel', funnelGuideTitle: 'Remote access setup · Step 2', funnelGuideSummary: 'Tailscale login is complete. Funnel must still be allowed for this computer; the official page also enables HTTPS.', funnelStep1: 'Open the official Tailscale authorization page for this node.', funnelStep2: 'Confirm Funnel; you do not need to sign in to DSH again.', funnelStep3: 'Return to DSH; the plugin checks and connects automatically.', funnelGuideNote: 'Requires an Owner, Admin, or Network admin account.', continueFunnel: 'Continue Funnel authorization', retryNow: 'Done, retry now',\n enableRemote: 'Enable remote access', disableRemote: 'Disable remote access', continueLogin: 'Continue login', reconnect: 'Reconnect', generateRemoteQr: 'Generate remote pairing QR code', copyRemoteLink: 'Copy remote pairing link', manageRemoteDevices: 'Manage remote devices', resetRemoteLogin: 'Sign out and clear remote login', resetRemoteDevices: 'Disable and clear remote devices',\n lanOn: 'Local network access is on.', lanOff: 'Local network access is off.', enableLan: 'Enable local network access', disableLan: 'Disable local network access', extensionsLoaded: 'Extensions: {loaded} loaded', extensionsFailed: 'Extensions: {loaded} loaded, {failed} failed',\n keyGenerationFailed: 'Could not generate a pairing key.', keyCopied: 'Pairing key copied. Paste it into the Android app.', linkCopied: 'Pairing link copied. Send it to the phone and paste it into the app or open it in a browser.', copySecret: 'Copy {kind}: {value}', pairingKey: 'pairing key', pairingLink: 'pairing link', noDevices: 'No paired devices.', noRemoteDevices: 'No remote paired devices.', device: 'Device', expires: 'Expires {time}', revoke: 'Revoke', confirmResetDevices: 'Remove all paired devices? Connected devices will be disconnected immediately.',\n ready: 'Ready', installed: 'Installed', installWithSize: 'Install official component · {size} MB', cpolarUnsupported: 'Only Windows x64 is currently supported. You can still use the built-in Tailscale Funnel.', cpolarNotInstalled: 'Not installed. A fixed version is downloaded from the official cpolar website only after you click the button below.', cpolarNeedsToken: 'Official component {version} is verified. Save the account token to continue.', cpolarReady: 'Official component {version} and the local account configuration are ready. Free temporary addresses may change after DSH or cpolar restarts; if the app cannot connect, scan the current remote QR code again.',\n remoteOff: 'Remote access is disabled. Local network access is unaffected.', remoteUnavailableCpolar: 'cpolar is not installed or its local account is not configured.', remoteUnavailableTailscale: 'This computer is missing the Funnel runtime component. Reinstall the complete plugin package.', remoteStartingCpolar: 'Connecting to a cpolar node…', remoteStartingTailscale: 'Starting the secure Tailscale channel…', remoteNeedsLogin: 'Complete a one-time Tailscale login in the browser. The plugin never reads your password.', remoteConnectingCpolar: 'Public address allocated; starting the DSH authentication gateway…', remoteConnectingTailscale: 'Login complete; creating the public HTTPS address…', remoteReady: 'Remote access is ready. Only paired devices can access DSH.', remoteError: 'The remote connection was not established. Reconnect; local network access still works.',\n funnelPermission: 'Login is complete. Authorize Funnel to establish the remote connection automatically.', funnelHttps: 'Login is complete. Authorize Funnel; the official page also enables HTTPS.', funnelStart: 'Login is complete. Finish the initial Tailscale Funnel authorization.', tailscaleDnsMissing: 'Tailscale has not provided a remote address. Reconnect and confirm login is complete.', gatewayStartFailed: 'The remote gateway failed to start. Reconnect; local network access is unaffected.', controlChannelFailed: 'The remote component connection was interrupted. Reconnect.', cpolarMissing: 'The official cpolar component is not installed. Complete the preparation steps above.', cpolarInvalid: 'cpolar component verification failed. Remove it completely and reinstall.', cpolarConfigMissing: 'No cpolar account token is saved. Complete the preparation steps above.', cpolarConfigInvalid: 'The local cpolar configuration is invalid. Save the account token again.', cpolarPortUnavailable: 'Could not allocate a local remote-gateway port. Try again.', cpolarLaunchFailed: 'The cpolar client failed to start.', cpolarTimeout: 'Timed out connecting to a cpolar node. Reconnect.', cpolarStopped: 'The cpolar connection stopped.', cpolarExited: 'The cpolar connection exited unexpectedly. Reconnect.', cpolarOutputInvalid: 'cpolar returned an unrecognized status.', cpolarOriginInvalid: 'The public address returned by cpolar failed validation.', setupOpened: 'The official Tailscale page is open. Return to DSH after enabling Funnel; reconnection is automatic.',\n switchProviderConfirm: 'Switching connection method first disables the current remote channel. Local network access and paired devices are unaffected. Continue?', switchingCpolar: 'Switching to cpolar…', switchingTailscale: 'Switching to Tailscale Funnel…', installConfirm: 'Download and verify a fixed version from the official cpolar website (about 7.3 MB) and extract it only to the DSH Mobile private directory? No system service, PATH/registry entry, or startup item is added.', downloading: 'Downloading and verifying…', installingCpolar: 'Installing the official cpolar component. Keep DSH running until it completes.', installFailed: 'Component installation failed: {error}', invalidToken: 'Paste the complete Authtoken from the cpolar dashboard.', configuredConnecting: 'Account configuration saved; connecting through cpolar…', configureFailed: 'Configuration failed: {error}', purgeConfirm: 'Completely remove the cpolar component, token configuration, and runtime logs from the DSH Mobile private directory? Local network access, DSH data, and other system programs are unaffected.', purging: 'Stopping the channel and removing cpolar files managed by DSH Mobile…', purgeFailed: 'Cleanup failed: {error}', reconnectingCpolar: 'Reconnecting to a cpolar node…', reconnectingTailscale: 'Checking Tailscale settings and reconnecting…', remoteQrReady: 'Remote pairing QR code generated. Scan it from “Remote access” in the app.', resetCpolarConfirm: 'Disable the cpolar remote channel and remove all remote paired devices? Your cpolar account and other tunnels are unchanged.', resetTailscaleConfirm: 'Sign out of Tailscale on this computer and remove all remote paired devices? Local network configuration is unchanged.', requestFailed: 'Request failed: {error}', wsPathsTitle: 'Third-party WebSocket paths', wsPathsIntro: 'When an installed plugin cannot connect (say a sidebar terminal or a live panel), it is usually because its connection paths have not been approved yet. Everything that needs your attention is listed below — one click on “Allow” fixes it.', wsPathsPlaceholder: '/sidebar/ws/terminal', wsPathsAdd: 'Allow path', wsPathsRemove: 'Remove', wsPathsEmpty: 'Nothing to configure right now. If a plugin cannot connect later, one-click options appear here.', wsPathsInvalid: 'Enter an exact path starting with / (no query string).', wsPathsDetected: 'A plugin connection was blocked — press Allow to let it through', wsPathsAllow: 'Allow', wsPathsAllowAll: 'Allow all', wsPathsGroupMeta: '{n} paths · blocked {m} times', wsPathsNewBlocked: 'New blocked third-party connections — open diagnostics to review', wsPathsAdvancedToggle: 'Add paths manually (advanced)', wsPathsAnnounce: '{n} plugin connections waiting to be approved', wsPathsAdvancedHint: 'Manual entries are rarely necessary: use the buttons above. Only fill this in when you know the exact path.',\n },\n it: {\n mobileAccess: 'Accesso mobile', collapseMobileAccess: 'Riduci Accesso mobile', downloadAndroid: 'Scarica l’ultima app Android', downloadAndroidVersion: 'Scarica l’ultima app Android · v{version}', downloadAndroidAria: 'Scarica l’ultima app Android da GitHub Releases', downloadAndroidVersionAria: 'Scarica l’app Android v{version} da GitHub Releases', updatePlugin: 'Aggiorna plugin', updatePluginAria: 'Aggiorna DSH Mobile alla v{version}', updatingPlugin: 'Aggiornamento…', pluginUpdatedRestart: 'Aggiornato alla v{version}. Riavvia DSH per applicarlo.', pluginUpdateFailed: 'Aggiornamento non riuscito: {error}', updateTo: 'Aggiorna alla v{version}', updateNotice: 'Riavvia DSH dopo l’installazione. Le app esistenti e i dispositivi già associati non richiedono ri-associazione; in caso di dubbi sulla versione desktop, consulta la tabella di compatibilità nel README.', updateNotesEmpty: 'Note di rilascio non recuperate — l’aggiornamento resta possibile; dettagli nella pagina Release su GitHub.', updateNow: 'Aggiorna ora', updateLater: 'Non ora',\n lan: 'Rete locale', remote: 'Remoto', lanAccess: 'Accesso rete locale', remoteAccess: 'Accesso remoto', browserAccess: 'Accesso browser', remoteAddress: 'Indirizzo remoto', loadingStatus: 'Lettura stato…', loadingRemoteStatus: 'Lettura stato remoto…',\n generateCopyKey: 'Genera e copia chiave', copyPairLink: 'Copia link di abbinamento', managePairedDevices: 'Gestisci dispositivi abbinati', clearAllDevices: 'Rimuovi tutti i dispositivi', pairingQr: 'Codice QR di abbinamento', remoteIntro: 'Scegli il canale remoto più adatto. Cambiare o disattivare l’accesso remoto non influisce sulla rete locale.', httpFrameWarning: 'Le pagine HTTP possono essere incorporate per compatibilità, ma i contenuti non sono cifrati e possono essere alterati. Usa HTTPS per le attività sensibili.', chooseProvider: 'Scegli metodo di connessione', currentProvider: 'Connessione attuale', remoteStateOff: 'Disattivata', remoteStateConnecting: 'Connessione', remoteStateAttention: 'Da controllare', providerInfoAria: 'Informazioni su sicurezza e rete della connessione remota', providerGroupAria: 'Metodo di connessione remota', providerSafeTitle: 'La protezione resta attiva', providerSafeText: 'Solo i dispositivi abbinati possono accedere a DSH. cpolar viene installato su richiesta e può essere rimosso completamente; Tailscale può essere lento o non disponibile nelle reti della Cina continentale, dove è consigliato cpolar.',\n builtIn: 'Integrato', mainlandPreferred: 'Preferito in Cina continentale', tailscaleDescription: 'Copertura più ampia; le reti della Cina continentale possono essere instabili. Il primo collegamento richiede accesso e autorizzazione Funnel.', cpolarDescription: 'Installa su richiesta il componente ufficiale, adatto alle reti della Cina continentale.', prepareCpolar: 'Prepara cpolar', checkingComponent: 'Controllo componente…', installOfficial: 'Installa componente ufficiale', cpolarAccountNote: 'Accedi al sito cpolar e copia l’Authtoken. Il token resta solo nella directory privata del plugin e non viene mostrato nella pagina o nei log.', registerCpolar: 'Registrati su cpolar', openDashboard: 'Apri la dashboard per il token', tokenPlaceholder: 'Incolla Authtoken cpolar', saveConnect: 'Salva e connetti', saving: 'Salvataggio…', componentDetails: 'Origine e rimozione del componente', componentDetailsText: 'Viene scaricato dal sito ufficiale cpolar e verificato a una versione fissa solo dopo aver scelto Installa. Non aggiunge servizi di sistema, avvio automatico, voci di registro o PATH.', pluginPrivateDirectory: 'Directory privata del plugin', officialDownload: 'Pagina download ufficiale', terms: 'Termini di servizio', purgeCpolar: 'Rimuovi completamente componente e configurazione cpolar', tailscaleHelp: 'Guida a Tailscale', tailscaleHelpText: 'Il componente runtime è incluso nel plugin. Il primo collegamento apre le pagine ufficiali di accesso Tailscale e autorizzazione Funnel; il plugin non accede mai alla password.', funnelGuideAria: 'Passaggi per abilitare Tailscale Funnel', funnelGuideTitle: 'Configurazione accesso remoto · Passaggio 2', funnelGuideSummary: 'L’accesso Tailscale è completato. Devi ancora consentire Funnel per questo computer; la pagina ufficiale abilita anche HTTPS.', funnelStep1: 'Apri la pagina ufficiale di autorizzazione Tailscale per questo nodo.', funnelStep2: 'Conferma Funnel; non serve accedere di nuovo a DSH.', funnelStep3: 'Torna in DSH; il plugin controlla e si connette automaticamente.', funnelGuideNote: 'Richiede un account Owner, Admin o Network admin.', continueFunnel: 'Continua autorizzazione Funnel', retryNow: 'Fatto, riprova ora', enableRemote: 'Attiva accesso remoto', disableRemote: 'Disattiva accesso remoto', continueLogin: 'Continua accesso', reconnect: 'Riconnetti', generateRemoteQr: 'Genera QR di abbinamento remoto', copyRemoteLink: 'Copia link di abbinamento remoto', manageRemoteDevices: 'Gestisci dispositivi remoti', resetRemoteLogin: 'Esci e rimuovi accesso remoto', resetRemoteDevices: 'Disattiva e rimuovi dispositivi remoti',\n lanOn: 'Accesso dalla rete locale attivo.', lanOff: 'Accesso dalla rete locale disattivato.', enableLan: 'Attiva accesso rete locale', disableLan: 'Disattiva accesso rete locale', extensionsLoaded: 'Estensioni: {loaded} caricate', extensionsFailed: 'Estensioni: {loaded} caricate, {failed} non riuscite', keyGenerationFailed: 'Impossibile generare la chiave di abbinamento.', keyCopied: 'Chiave di abbinamento copiata. Incollala nell’app Android.', linkCopied: 'Link di abbinamento copiato. Invialo al telefono e incollalo nell’app oppure aprilo nel browser.', copySecret: 'Copia {kind}: {value}', pairingKey: 'chiave di abbinamento', pairingLink: 'link di abbinamento', noDevices: 'Nessun dispositivo abbinato.', noRemoteDevices: 'Nessun dispositivo remoto abbinato.', device: 'Dispositivo', expires: 'Scade {time}', revoke: 'Revoca', confirmResetDevices: 'Rimuovere tutti i dispositivi abbinati? I dispositivi connessi verranno disconnessi subito.', ready: 'Pronto', installed: 'Installato', installWithSize: 'Installa componente ufficiale · {size} MB', cpolarUnsupported: 'Attualmente è supportato solo Windows x64. Puoi comunque usare Tailscale Funnel integrato.', cpolarNotInstalled: 'Non installato. Una versione fissa viene scaricata dal sito ufficiale cpolar solo dopo aver premuto il pulsante.', cpolarNeedsToken: 'Componente ufficiale {version} verificato. Salva il token account per continuare.', cpolarReady: 'Componente ufficiale {version} e configurazione account locale pronti. Gli indirizzi temporanei gratuiti possono cambiare dopo il riavvio di DSH o cpolar; se l’app non si connette, scansiona di nuovo il QR remoto corrente.',\n remoteOff: 'Accesso remoto disattivato. La rete locale non è interessata.', remoteUnavailableCpolar: 'cpolar non è installato o l’account locale non è configurato.', remoteUnavailableTailscale: 'Su questo computer manca il componente runtime Funnel. Reinstalla il pacchetto completo del plugin.', remoteStartingCpolar: 'Connessione a un nodo cpolar…', remoteStartingTailscale: 'Avvio del canale sicuro Tailscale…', remoteNeedsLogin: 'Completa una volta l’accesso Tailscale nel browser. Il plugin non legge mai la password.', remoteConnectingCpolar: 'Indirizzo pubblico assegnato; avvio del gateway di autenticazione DSH…', remoteConnectingTailscale: 'Accesso completato; creazione dell’indirizzo HTTPS pubblico…', remoteReady: 'Accesso remoto pronto. Solo i dispositivi abbinati possono accedere a DSH.', remoteError: 'Connessione remota non stabilita. Riconnettiti; la rete locale continua a funzionare.', funnelPermission: 'Accesso completato. Autorizza Funnel per stabilire automaticamente la connessione remota.', funnelHttps: 'Accesso completato. Autorizza Funnel; la pagina ufficiale abilita anche HTTPS.', funnelStart: 'Accesso completato. Termina la prima autorizzazione Tailscale Funnel.', tailscaleDnsMissing: 'Tailscale non ha fornito un indirizzo remoto. Riconnettiti e verifica di aver completato l’accesso.', gatewayStartFailed: 'Avvio del gateway remoto non riuscito. Riconnettiti; la rete locale non è interessata.', controlChannelFailed: 'Connessione al componente remoto interrotta. Riconnettiti.', cpolarMissing: 'Il componente ufficiale cpolar non è installato. Completa i passaggi sopra.', cpolarInvalid: 'Verifica del componente cpolar non riuscita. Rimuovilo completamente e reinstallalo.', cpolarConfigMissing: 'Nessun token account cpolar salvato. Completa i passaggi sopra.', cpolarConfigInvalid: 'Configurazione locale cpolar non valida. Salva nuovamente il token.', cpolarPortUnavailable: 'Impossibile assegnare una porta locale al gateway remoto. Riprova.', cpolarLaunchFailed: 'Avvio del client cpolar non riuscito.', cpolarTimeout: 'Connessione al nodo cpolar scaduta. Riconnettiti.', cpolarStopped: 'Connessione cpolar arrestata.', cpolarExited: 'Connessione cpolar terminata inaspettatamente. Riconnettiti.', cpolarOutputInvalid: 'cpolar ha restituito uno stato non riconosciuto.', cpolarOriginInvalid: 'L’indirizzo pubblico restituito da cpolar non ha superato la verifica.', setupOpened: 'La pagina ufficiale Tailscale è aperta. Torna in DSH dopo aver abilitato Funnel; la riconnessione è automatica.',\n switchProviderConfirm: 'Il cambio di metodo disattiva prima il canale remoto corrente. Rete locale e dispositivi abbinati non sono interessati. Continuare?', switchingCpolar: 'Passaggio a cpolar…', switchingTailscale: 'Passaggio a Tailscale Funnel…', installConfirm: 'Scaricare e verificare una versione fissa dal sito ufficiale cpolar (circa 7,3 MB), estraendola solo nella directory privata DSH Mobile? Non vengono aggiunti servizi, PATH/registro o avvio automatico.', downloading: 'Download e verifica…', installingCpolar: 'Installazione del componente ufficiale cpolar. Mantieni DSH in esecuzione fino al termine.', installFailed: 'Installazione componente non riuscita: {error}', invalidToken: 'Incolla l’Authtoken completo dalla dashboard cpolar.', configuredConnecting: 'Configurazione account salvata; connessione tramite cpolar…', configureFailed: 'Configurazione non riuscita: {error}', purgeConfirm: 'Rimuovere completamente componente cpolar, configurazione token e log runtime dalla directory privata DSH Mobile? Rete locale, dati DSH e altri programmi non sono interessati.', purging: 'Arresto del canale e rimozione dei file cpolar gestiti da DSH Mobile…', purgeFailed: 'Pulizia non riuscita: {error}', reconnectingCpolar: 'Riconnessione a un nodo cpolar…', reconnectingTailscale: 'Controllo impostazioni Tailscale e riconnessione…', remoteQrReady: 'QR di abbinamento remoto generato. Scansionalo da “Accesso remoto” nell’app.', resetCpolarConfirm: 'Disattivare il canale remoto cpolar e rimuovere tutti i dispositivi remoti? Account cpolar e altri tunnel restano invariati.', resetTailscaleConfirm: 'Uscire da Tailscale su questo computer e rimuovere tutti i dispositivi remoti? La configurazione della rete locale resta invariata.', requestFailed: 'Richiesta non riuscita: {error}', wsPathsTitle: 'Percorsi WebSocket di terze parti', wsPathsIntro: 'Quando un plugin installato non riesce a connettersi (per esempio un terminale laterale o un pannello live), di solito è perché i suoi percorsi di connessione non sono ancora stati approvati. Tutto ciò che richiede attenzione è elencato qui sotto: un clic su “Consenti” risolve.', wsPathsPlaceholder: '/sidebar/ws/terminal', wsPathsAdd: 'Consenti percorso', wsPathsRemove: 'Rimuovi', wsPathsEmpty: 'Non serve configurare nulla per ora. Se in seguito un plugin non riesce a connettersi, qui compariranno opzioni con un clic.', wsPathsInvalid: 'Inserisci un percorso esatto che inizi con / (senza query).', wsPathsDetected: 'Una connessione di un plugin è stata bloccata — premi Consenti per lasciarla passare', wsPathsAllow: 'Consenti', wsPathsAllowAll: 'Consenti tutti', wsPathsGroupMeta: '{n} percorsi · bloccati {m} volte', wsPathsNewBlocked: 'Nuove connessioni di terze parti bloccate — apri la diagnostica', wsPathsAdvancedToggle: 'Aggiungi percorsi manualmente (avanzato)', wsPathsAnnounce: '{n} connessioni di plugin in attesa di approvazione', wsPathsAdvancedHint: 'Le voci manuali servono raramente: usa i pulsanti qui sopra. Compila solo se conosci il percorso esatto.'\n },\n zh: {} as Record<string, string>,\n} satisfies Record<MobileControlLocale, Record<string, string>>\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n mobileAccess: '移动访问', collapseMobileAccess: '收起移动访问', downloadAndroid: '下载最新 Android App', downloadAndroidVersion: '下载最新 Android App · v{version}', downloadAndroidAria: '从 GitHub Releases 下载最新版 Android App', downloadAndroidVersionAria: '从 GitHub Releases 下载 Android App v{version}', updatePlugin: '更新插件', updatePluginAria: '将 DSH Mobile 更新至 v{version}', updatingPlugin: '正在更新…', pluginUpdatedRestart: '插件已更新至 v{version},重启 DSH 后生效。', pluginUpdateFailed: '更新失败:{error}', updateTo: '更新到 v{version}', updateNotice: '安装后需重启 DSH。现有 App 与已配对设备无需重新配对;电脑端版本不确定时,先对照 README 兼容表。', updateNotesEmpty: '未取到最新版更新说明,仍可继续更新;详情见 GitHub Release 页。', updateNow: '立即更新', updateLater: '暂不', lan: '局域网', remote: '远程', lanAccess: '局域网访问', remoteAccess: '远程访问', browserAccess: '浏览器访问', remoteAddress: '远程地址', loadingStatus: '正在读取状态…', loadingRemoteStatus: '正在读取远程状态…',\n generateCopyKey: '生成并复制密钥', copyPairLink: '复制配对链接', managePairedDevices: '管理配对设备', clearAllDevices: '清除所有设备', pairingQr: '配对二维码', remoteIntro: '选择更适合你的远程通道。切换或关闭远程访问不会影响局域网。', httpFrameWarning: '为兼容性允许嵌入 HTTP 页面,但内容未加密,可能被篡改;处理敏感内容请使用 HTTPS。', chooseProvider: '选择连接方式', currentProvider: '当前连接', remoteStateOff: '未启用', remoteStateConnecting: '连接中', remoteStateAttention: '需处理', providerInfoAria: '查看远程连接安全与网络说明', providerGroupAria: '远程连接方式', providerSafeTitle: '你始终可以放心', providerSafeText: '只有已配对设备能进入 DSH。cpolar 按需安装并可彻底清理;Tailscale 在中国大陆网络下可能连接缓慢、中断或无法使用,国内网络建议优先尝试 cpolar。', builtIn: '内置', mainlandPreferred: '国内网络优先', tailscaleDescription: '覆盖更广;中国大陆网络可能不稳定,首次需登录并允许 Funnel。', cpolarDescription: '按需安装官方组件,适合国内网络环境。',\n prepareCpolar: '准备 cpolar', checkingComponent: '正在检查组件…', installOfficial: '安装官方组件', cpolarAccountNote: '登录 cpolar 官网后复制 Authtoken。令牌只保存在本机插件私有目录,不会显示在页面或日志中。', registerCpolar: '注册 cpolar', openDashboard: '打开控制台获取令牌', tokenPlaceholder: '粘贴 cpolar Authtoken', saveConnect: '保存并连接', saving: '正在保存…', componentDetails: '组件来源与清理说明', componentDetailsText: '仅在你点击安装后从 cpolar 官网下载并校验固定版本。不会写入系统服务、开机启动、注册表或 PATH。', pluginPrivateDirectory: '插件私有目录', officialDownload: '官方下载安装页', terms: '服务条款', purgeCpolar: '彻底移除 cpolar 组件与配置', tailscaleHelp: 'Tailscale 使用说明', tailscaleHelpText: '运行组件已随插件提供。首次连接会打开 Tailscale 官方登录和 Funnel 授权页;插件不会接触你的账号密码。', funnelGuideAria: 'Tailscale Funnel 启用步骤', funnelGuideTitle: '远程访问设置 · 第 2 步', funnelGuideSummary: 'Tailscale 登录已完成。还需为这台电脑允许 Funnel,官方页面会同时启用 HTTPS。', funnelStep1: '打开当前节点的 Tailscale 官方授权页。', funnelStep2: '确认启用 Funnel;无需再次登录 DSH。', funnelStep3: '返回 DSH,插件会自动检查并建立连接。', funnelGuideNote: '需要使用 Owner、Admin 或 Network admin 账号。', continueFunnel: '继续完成 Funnel 授权', retryNow: '已完成,立即重试',\n enableRemote: '启用远程访问', disableRemote: '关闭远程访问', continueLogin: '继续登录', reconnect: '重新连接', generateRemoteQr: '生成远程配对二维码', copyRemoteLink: '复制远程配对链接', manageRemoteDevices: '管理远程设备', resetRemoteLogin: '退出并清除远程登录', resetRemoteDevices: '关闭并清除远程设备', lanOn: '局域网访问已开启。', lanOff: '局域网访问已关闭。', enableLan: '开启局域网访问', disableLan: '关闭局域网访问', extensionsLoaded: '扩展:{loaded} 个已加载', extensionsFailed: '扩展:{loaded} 个已加载,{failed} 个加载失败', keyGenerationFailed: '无法生成配对密钥。', keyCopied: '配对密钥已复制,请粘贴到 Android App。', linkCopied: '配对链接已复制,发给手机后 App 粘贴或浏览器打开即可配对。', copySecret: '请复制{kind}:{value}', pairingKey: '配对密钥', pairingLink: '配对链接', noDevices: '暂无配对设备。', noRemoteDevices: '暂无远程配对设备。', device: '设备', expires: '到期 {time}', revoke: '撤销', confirmResetDevices: '确定要移除所有配对设备吗?此操作会立即终止已连接设备。', ready: '已就绪', installed: '已安装', installWithSize: '安装官方组件 · {size} MB',\n cpolarUnsupported: '当前仅支持 Windows x64。你仍可选择内置的 Tailscale Funnel。', cpolarNotInstalled: '尚未安装。只有点击下方按钮后,才会从 cpolar 官网下载固定版本。', cpolarNeedsToken: '官方组件 {version} 已校验,下一步只需保存账号令牌。', cpolarReady: '官方组件 {version} 与本机账号配置已就绪。免费临时地址可能在 DSH 或 cpolar 重启后变化;App 无法连接时,请重新扫描当前远程二维码。', remoteOff: '远程访问未启用。局域网访问不受影响。', remoteUnavailableCpolar: 'cpolar 尚未安装或未完成本机账号配置。', remoteUnavailableTailscale: '当前电脑缺少 Funnel 运行组件,请重新安装完整插件包。', remoteStartingCpolar: '正在连接 cpolar 国内节点…', remoteStartingTailscale: '正在启动 Tailscale 安全通道…', remoteNeedsLogin: '需要在浏览器完成一次 Tailscale 登录。插件不会读取你的密码。', remoteConnectingCpolar: '公网地址已分配,正在启动 DSH 认证网关…', remoteConnectingTailscale: '登录完成,正在建立公开 HTTPS 地址…', remoteReady: '远程访问已就绪。只有已配对设备可以进入 DSH。', remoteError: '远程连接未建立。可重新连接,局域网访问仍可正常使用。',\n funnelPermission: '登录已完成。请继续授权 Funnel,完成后会自动建立远程连接。', funnelHttps: '登录已完成。请继续授权 Funnel,官方页面会同时启用 HTTPS。', funnelStart: '登录已完成。请继续完成 Tailscale Funnel 的首次授权。', tailscaleDnsMissing: 'Tailscale 暂未提供远程地址。请重新连接并确认已完成登录。', gatewayStartFailed: '远程网关启动失败。请重新连接,局域网访问不受影响。', controlChannelFailed: '远程组件连接中断。请重新连接。', cpolarMissing: 'cpolar 官方组件尚未安装。请先完成上方准备步骤。', cpolarInvalid: 'cpolar 组件校验失败。请彻底移除后重新安装。', cpolarConfigMissing: 'cpolar 尚未保存账号令牌。请先完成上方准备步骤。', cpolarConfigInvalid: 'cpolar 本机配置无效。请重新保存账号令牌。', cpolarPortUnavailable: '无法分配本机远程网关端口,请重试。', cpolarLaunchFailed: 'cpolar 客户端未能启动。', cpolarTimeout: '连接 cpolar 国内节点超时,请重新连接。', cpolarStopped: 'cpolar 连接已停止。', cpolarExited: 'cpolar 连接意外退出,请重新连接。', cpolarOutputInvalid: 'cpolar 返回了无法识别的状态。', cpolarOriginInvalid: 'cpolar 返回的公网地址未通过校验。', setupOpened: 'Tailscale 官方页面已打开。完成启用后返回 DSH,这里会自动重新连接。',\n switchProviderConfirm: '切换连接方式会先关闭当前远程通道。局域网和配对设备不会受影响,是否继续?', switchingCpolar: '正在切换到 cpolar…', switchingTailscale: '正在切换到 Tailscale Funnel…', installConfirm: '将从 cpolar 官方网站下载并校验固定版本(约 7.3 MB),仅解压到 DSH Mobile 私有目录。不会安装系统服务、写入 PATH/注册表或设置开机启动。是否继续?', downloading: '正在下载并校验…', installingCpolar: '正在安装 cpolar 官方组件。完成前请保持 DSH 运行。', installFailed: '组件安装失败:{error}', invalidToken: '请粘贴 cpolar 控制台提供的完整 Authtoken。', configuredConnecting: '账号配置已保存,正在建立 cpolar 远程通道…', configureFailed: '配置失败:{error}', purgeConfirm: '彻底移除 DSH Mobile 私有目录中的 cpolar 组件、令牌配置和运行日志?不会影响局域网、DSH 数据或系统中的其他程序。', purging: '正在关闭通道并清理 DSH Mobile 管理的 cpolar 文件…', purgeFailed: '清理失败:{error}', reconnectingCpolar: '正在重新连接 cpolar 国内节点…', reconnectingTailscale: '正在确认 Tailscale 设置并重新连接…', remoteQrReady: '远程配对二维码已生成。请在 App 的“远程访问”中扫描。', resetCpolarConfirm: '关闭 cpolar 远程通道并移除所有远程配对设备?不会修改你的 cpolar 账号或其他隧道。', resetTailscaleConfirm: '退出电脑上的 Tailscale 登录并移除所有远程配对设备?局域网配置不会改变。', requestFailed: '请求失败:{error}', wsPathsTitle: '第三方 WebSocket 路径', wsPathsIntro: '插件(如侧边栏终端、实时面板)连不上时,通常是它的连接路径还没放行。下面列出需要处理的项,点「允许」即可。', wsPathsPlaceholder: '/sidebar/ws/terminal', wsPathsAdd: '允许该路径', wsPathsRemove: '移除', wsPathsEmpty: '目前无需任何设置。以后有插件连不上,会在这里出现可一键放行的选项。', wsPathsInvalid: '请输入以 / 开头的确切路径(不带 query)。', wsPathsDetected: '有插件连接被拦截——点「允许」放行', wsPathsAllow: '允许', wsPathsAllowAll: '全部允许', wsPathsGroupMeta: '{n} 条路径 · 共拦截 {m} 次', wsPathsNewBlocked: '发现被拦截的第三方连接,去诊断页查看', wsPathsAdvancedToggle: '手动添加路径(高级)', wsPathsAnnounce: '{n} 条插件连接等待放行', wsPathsAdvancedHint: '通常不需要手动填写:用上方按钮即可。只有当你确切知道所需路径时才填。'\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n lanSetupTitle: 'Finish local network setup', lanSetupIntro: 'Choose the network shared by this computer and your phone. DSH Mobile creates private certificates only after you confirm.', lanSetupNetwork: 'Computer network', lanSetupChooseNetwork: 'Choose a network', lanSetupRecommended: 'Recommended', lanSetupNoNetworks: 'No private Wi-Fi or Ethernet address was found. Connect this computer to the local network, then scan again.', lanSetupRefresh: 'Scan again', lanSetupFirewallNote: 'Windows may request administrator approval for two inbound rules limited to the local subnet.', lanSetupConfigure: 'Configure local network', lanSetupConfiguring: 'Creating private certificates and local network rules…', lanSetupRequired: 'Local network setup has not been completed. Choose a network above to continue.', lanSetupRestart: 'Setup complete for {origin}. Restart DSH once to start local network access.', lanSetupFailed: 'Setup was not completed. Confirm the network selection and approve the Windows prompt, then try again.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n lanSetupTitle: 'Completa la configurazione della rete locale', lanSetupIntro: 'Scegli la rete condivisa da questo computer e dal telefono. DSH Mobile crea certificati privati solo dopo la conferma.', lanSetupNetwork: 'Rete del computer', lanSetupChooseNetwork: 'Scegli una rete', lanSetupRecommended: 'Consigliata', lanSetupNoNetworks: 'Nessun indirizzo Wi-Fi o Ethernet privato trovato. Collega il computer alla rete locale e ripeti la ricerca.', lanSetupRefresh: 'Cerca di nuovo', lanSetupFirewallNote: 'Windows può richiedere l’approvazione amministratore per due regole in ingresso limitate alla sottorete locale.', lanSetupConfigure: 'Configura rete locale', lanSetupConfiguring: 'Creazione dei certificati privati e delle regole di rete locale…', lanSetupRequired: 'La configurazione della rete locale non è completa. Scegli una rete qui sopra per continuare.', lanSetupRestart: 'Configurazione completata per {origin}. Riavvia DSH una volta per attivare l’accesso locale.', lanSetupFailed: 'Configurazione non completata. Controlla la rete e approva la richiesta di Windows, quindi riprova.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n lanSetupTitle: '完成局域网配置', lanSetupIntro: '选择电脑与手机共同使用的网络。确认后才会生成私有证书,不会在安装时自动开放端口。', lanSetupNetwork: '电脑当前网络', lanSetupChooseNetwork: '请选择网络', lanSetupRecommended: '推荐', lanSetupNoNetworks: '未找到可用的私有 Wi-Fi 或以太网地址。请先让电脑接入局域网,然后重新扫描。', lanSetupRefresh: '重新扫描', lanSetupFirewallNote: 'Windows 可能请求管理员授权,仅创建两条限本地子网访问的入站规则。', lanSetupConfigure: '完成配置', lanSetupConfiguring: '正在生成私有证书并配置局域网规则…', lanSetupRequired: '尚未完成局域网配置,请选择上方网络继续。', lanSetupRestart: '已为 {origin} 完成配置。请重启一次 DSH,局域网访问会自动开启。', lanSetupFailed: '配置未完成。请确认网卡选择并允许 Windows 授权提示,然后重试。',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n selfHostedConnections: 'Self-hosted connection', advanced: 'Advanced', frpName: 'Self-hosted FRP', frpDescription: 'A restricted FRP channel for this DSH gateway only. You manage the VPS and public domain.',\n prepareFrp: 'Configure self-hosted FRP', frpStep1Title: '1 · Connection details', frpStep1Text: 'Enter the VPS address, frps control port, shared token, and public HTTPS origin.', frpServerAddress: 'VPS address', frpServerAddressPlaceholder: 'frp.example.com', frpServerPort: 'frps port', frpToken: 'Shared token', frpTokenPlaceholder: 'At least 16 characters', frpPublicOrigin: 'Public HTTPS origin', frpPublicOriginPlaceholder: 'https://dsh.example.com',\n frpStep2Title: '2 · Prepare the VPS', frpStep2Text: 'Copy the restricted frps and Caddy template, then apply it on your VPS.', copyServerTemplate: 'Copy server template', templateCopied: 'Server template copied. Save frps.toml and the Caddy snippet on the VPS, then add the import line to the Caddyfile.', templateCopyFailed: 'Could not copy the template. Check the four fields above.', vpsDeployText: 'Use an existing OpenSSH key or agent. The VPS must be Ubuntu/Debian with systemd; existing Caddy site configuration is never overwritten.', vpsDeployChangesTitle: 'Automatic deployment will change the following on the VPS (manual template changes nothing by itself):', vpsDeployChangePackages: 'Install Caddy from its official APT repository, plus a Python venv and Certbot for public-IPv4 certificates.', vpsDeployChangeServices: 'Create the dsh-mobile system user (only if missing, otherwise kept), the frps config and service, the Caddy snippet plus one import line, and a daily certificate-renewal timer.', vpsDeployChangeFirewall: 'Open the FRP control port, 80/tcp, and 443/tcp in UFW when it is active; other firewalls are left for you to adjust.', vpsDeployChangeManual: 'Manual deployment applies the same steps by hand from the copied template; automatic deployment runs them over SSH after you confirm the host keys.', vpsSshUser: 'SSH user', vpsSshPort: 'SSH port', vpsSshKey: 'Private key path (optional)', vpsSshKeyPlaceholder: 'Uses ssh-agent or ~/.ssh/config when empty', vpsDeploy: 'Deploy frps + Caddy', vpsDeploying: 'Deploying to the VPS. Keep DSH running…', vpsDeploySuccess: 'VPS deployment completed. Start FRP connection to verify the public endpoint.', vpsDeployFailed: 'VPS deployment failed: {error}', vpsDeployNotReady: 'Save the FRP settings before deploying the VPS.', vpsHostKeyFetching: 'Reading the VPS host keys…', vpsHostKeyFailed: 'Could not read the VPS host keys: {error}', vpsDeployConfirmWithKeys: 'Deploy DSH Mobile frps and Caddy to this VPS? Only DSH Mobile service/config files and firewall rules will be created. Existing non-empty Caddy configuration will stop the deployment.\\n\\nThe server presents these host keys. Confirm they match the VPS console before continuing:\\n{fingerprints}', vpsCopyUninstall: 'Copy VPS uninstall script', vpsUninstallScriptCopied: 'Uninstall script copied. Review it before running with root on the VPS.', vpsUninstallScriptFailed: 'Could not build the uninstall script: {error}', vpsUninstall: 'Remove DSH Mobile from the VPS', vpsUninstallConfirmWithKeys: 'Remove all DSH Mobile services, configs, certificates, and owned firewall rules from this VPS? Your own Caddy content and unrelated rules are kept.\\n\\nThe server presents these host keys. Confirm they match the VPS console before continuing:\\n{fingerprints}', vpsUninstalling: 'Removing DSH Mobile from the VPS. Keep DSH running…', vpsUninstallSuccess: 'VPS cleanup completed. The local FRP settings are unchanged.', vpsUninstallFailed: 'VPS cleanup failed: {error}',\n frpStep3Title: '3 · Prepare this computer', frpStep3Text: 'Download and verify the pinned official frpc client only when requested.', installFrpc: 'Install official frpc', frpInstallConfirm: 'Download and verify official frpc 0.70.1 (about {size} MB), extracting only frpc to the DSH Mobile private directory? No service, PATH entry, or startup item is added.', installingFrp: 'Installing the official frpc component. Keep DSH running until it completes.', frpNotInstalled: 'frpc is not installed. Nothing is downloaded until you click Install.', frpUnsupported: 'This desktop platform is not supported by the managed frpc installer.', frpComponentReady: 'Official frpc {version} is verified.',\n frpStep4Title: '4 · Verify and connect', frpStep4Text: 'The plugin starts only its DSH HTTP vhost and verifies the public endpoint belongs to this computer.', frpAppRequirement: 'Custom remote domains require Android app 0.3.3 or later; local network, cpolar, and Tailscale remain compatible with older supported apps.', frpSaveConnect: 'Save and verify connection', frpSavingConnecting: 'Saving the private settings and verifying the complete FRP path…', frpConfigurationReady: 'Server settings are saved. The token remains only in the plugin private directory.', frpConfigurationMissing: 'Complete all fields, copy the VPS template, then save and connect.', frpInputInvalid: 'Check the VPS address, port, HTTPS origin, and token.',\n frpComponentDetails: 'FRP source and complete cleanup', frpComponentDetailsText: 'The pinned client is downloaded from the official fatedier/frp release. DSH Mobile never installs a service or accepts arbitrary FRP configuration.', frpOfficialRelease: 'Official FRP release', purgeFrp: 'Remove FRP component and private configuration', purgeFrpConfirm: 'Stop FRP and remove frpc, the shared token, generated configuration, staging files, and logs owned by DSH Mobile? The VPS is unchanged.', purgingFrp: 'Stopping FRP and removing files managed by DSH Mobile…',\n switchingFrp: 'Switching to self-hosted FRP…', reconnectingFrp: 'Verifying and reconnecting self-hosted FRP…', resetFrpConfirm: 'Disable self-hosted FRP and remove all remote paired devices? The saved VPS settings and server are unchanged.', remoteUnavailableFrp: 'frpc is not installed or the private server settings are incomplete.', remoteStartingFrp: 'Checking the VPS and preparing the restricted FRP channel…', remoteConnectingFrp: 'frpc is running; verifying the public HTTPS endpoint…', frpMissing: 'Install the official frpc component first.', frpInvalid: 'frpc verification failed. Remove it completely and reinstall.', frpConfigMissing: 'Save the self-hosted FRP connection details first.', frpConfigVerifyFailed: 'frpc rejected the generated configuration. Check the server details and token.', frpVhostPublic: 'The VPS plaintext HTTP vhost is publicly reachable. Bind it to 127.0.0.1 and let Caddy provide HTTPS.', frpVhostProbeFailed: 'The VPS address could not be checked. Confirm DNS and retry.', frpLaunchFailed: 'frpc failed to start.', frpTimeout: 'The public endpoint did not become ready. Check frps, Caddy, DNS, and firewall.', frpDiscoveryMismatch: 'The public domain points to another DSH computer. Check the Caddy and frps mappings.', frpDiscoveryInvalid: 'The public domain did not return a valid DSH Mobile discovery response.', frpStopped: 'The FRP connection stopped.', frpExited: 'frpc exited unexpectedly. Check the VPS configuration and reconnect.',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n selfHostedConnections: 'Connessione autogestita', advanced: 'Avanzato', frpName: 'FRP autogestito', frpDescription: 'Canale FRP limitato al solo gateway DSH. VPS e dominio pubblico restano sotto il tuo controllo.',\n prepareFrp: 'Configura FRP autogestito', frpStep1Title: '1 · Dati di connessione', frpStep1Text: 'Inserisci indirizzo VPS, porta di controllo frps, token condiviso e origine HTTPS pubblica.', frpServerAddress: 'Indirizzo VPS', frpServerAddressPlaceholder: 'frp.example.com', frpServerPort: 'Porta frps', frpToken: 'Token condiviso', frpTokenPlaceholder: 'Almeno 16 caratteri', frpPublicOrigin: 'Origine HTTPS pubblica', frpPublicOriginPlaceholder: 'https://dsh.example.com',\n frpStep2Title: '2 · Prepara il VPS', frpStep2Text: 'Copia il modello limitato per frps e Caddy e applicalo sul VPS.', copyServerTemplate: 'Copia modello server', templateCopied: 'Modello server copiato. Salva frps.toml e lo snippet Caddy sul VPS, poi aggiungi la riga import al Caddyfile.', templateCopyFailed: 'Impossibile copiare il modello. Controlla i quattro campi sopra.', vpsDeployText: 'Usa una chiave OpenSSH o un agent esistente. Il VPS deve essere Ubuntu/Debian con systemd; una configurazione Caddy non vuota non viene sovrascritta.', vpsDeployChangesTitle: 'Il deploy automatico modifica quanto segue sul VPS (il modello manuale da solo non cambia nulla):', vpsDeployChangePackages: 'Installa Caddy dal repository APT ufficiale, più un venv Python e Certbot per i certificati IPv4 pubblici.', vpsDeployChangeServices: 'Crea l’utente di sistema dsh-mobile (solo se assente, altrimenti mantenuto), la configurazione e il servizio frps, lo snippet Caddy più una riga import, e un timer giornaliero di rinnovo certificati.', vpsDeployChangeFirewall: 'Apre la porta di controllo FRP, 80/tcp e 443/tcp in UFW quando attivo; gli altri firewall restano a tuo carico.', vpsDeployChangeManual: 'Il deploy manuale applica gli stessi passi a mano dal modello copiato; quello automatico li esegue via SSH dopo la conferma delle chiavi host.', vpsSshUser: 'Utente SSH', vpsSshPort: 'Porta SSH', vpsSshKey: 'Percorso chiave privata (opzionale)', vpsSshKeyPlaceholder: 'Usa ssh-agent o ~/.ssh/config se vuoto', vpsDeploy: 'Installa frps + Caddy', vpsDeploying: 'Deploy sul VPS in corso. Mantieni DSH attivo…', vpsDeploySuccess: 'Deploy VPS completato. Avvia FRP per verificare l’endpoint pubblico.', vpsDeployFailed: 'Deploy VPS fallito: {error}', vpsDeployNotReady: 'Salva le impostazioni FRP prima del deploy VPS.', vpsHostKeyFetching: 'Lettura delle chiavi host del VPS…', vpsHostKeyFailed: 'Impossibile leggere le chiavi host del VPS: {error}', vpsDeployConfirmWithKeys: 'Installare frps e Caddy DSH Mobile su questo VPS? Verranno creati solo file di servizio/configurazione e regole firewall DSH Mobile. Una configurazione Caddy esistente non vuota interromperà il deploy.\\n\\nIl server presenta queste chiavi host. Verifica che corrispondano alla console del VPS prima di continuare:\\n{fingerprints}', vpsCopyUninstall: 'Copia script di disinstallazione VPS', vpsUninstallScriptCopied: 'Script di disinstallazione copiato. Controllalo prima di eseguirlo come root sul VPS.', vpsUninstallScriptFailed: 'Impossibile creare lo script di disinstallazione: {error}', vpsUninstall: 'Rimuovi DSH Mobile dal VPS', vpsUninstallConfirmWithKeys: 'Rimuovere tutti i servizi, le configurazioni, i certificati e le regole firewall di DSH Mobile da questo VPS? I tuoi contenuti Caddy e le altre regole restano invariati.\\n\\nIl server presenta queste chiavi host. Verifica che corrispondano alla console del VPS prima di continuare:\\n{fingerprints}', vpsUninstalling: 'Rimozione di DSH Mobile dal VPS. Mantieni DSH attivo…', vpsUninstallSuccess: 'Pulizia VPS completata. Le impostazioni FRP locali restano invariate.', vpsUninstallFailed: 'Pulizia VPS fallita: {error}',\n frpStep3Title: '3 · Prepara questo computer', frpStep3Text: 'Scarica e verifica il client frpc ufficiale fissato solo su richiesta.', installFrpc: 'Installa frpc ufficiale', frpInstallConfirm: 'Scaricare e verificare frpc ufficiale 0.70.1 (circa {size} MB), estraendo solo frpc nella directory privata DSH Mobile? Non vengono aggiunti servizi, PATH o avvio automatico.', installingFrp: 'Installazione del componente frpc ufficiale. Mantieni DSH in esecuzione.', frpNotInstalled: 'frpc non è installato. Non viene scaricato nulla finché non scegli Installa.', frpUnsupported: 'Questa piattaforma desktop non è supportata dal programma di installazione gestito.', frpComponentReady: 'frpc ufficiale {version} verificato.',\n frpStep4Title: '4 · Verifica e connetti', frpStep4Text: 'Il plugin avvia solo il vhost HTTP DSH e verifica che l’endpoint pubblico appartenga a questo computer.', frpAppRequirement: 'I domini remoti personalizzati richiedono l’app Android 0.3.3 o successiva; rete locale, cpolar e Tailscale restano compatibili con le app precedenti supportate.', frpSaveConnect: 'Salva e verifica connessione', frpSavingConnecting: 'Salvataggio privato e verifica del percorso FRP completo…', frpConfigurationReady: 'Impostazioni server salvate. Il token resta solo nella directory privata del plugin.', frpConfigurationMissing: 'Completa i campi, copia il modello VPS, quindi salva e connetti.', frpInputInvalid: 'Controlla indirizzo VPS, porta, origine HTTPS e token.',\n frpComponentDetails: 'Origine FRP e rimozione completa', frpComponentDetailsText: 'Il client fissato viene scaricato dalla release ufficiale fatedier/frp. DSH Mobile non installa servizi e non accetta configurazioni FRP arbitrarie.', frpOfficialRelease: 'Release FRP ufficiale', purgeFrp: 'Rimuovi componente FRP e configurazione privata', purgeFrpConfirm: 'Arrestare FRP e rimuovere frpc, token, configurazione, file temporanei e log gestiti da DSH Mobile? Il VPS non viene modificato.', purgingFrp: 'Arresto FRP e rimozione dei file gestiti da DSH Mobile…',\n switchingFrp: 'Passaggio a FRP autogestito…', reconnectingFrp: 'Verifica e riconnessione FRP autogestito…', resetFrpConfirm: 'Disattivare FRP autogestito e rimuovere tutti i dispositivi remoti? Impostazioni VPS e server restano invariati.', remoteUnavailableFrp: 'frpc non è installato o le impostazioni private sono incomplete.', remoteStartingFrp: 'Controllo VPS e preparazione del canale FRP limitato…', remoteConnectingFrp: 'frpc è in esecuzione; verifica dell’endpoint HTTPS pubblico…', frpMissing: 'Installa prima il componente frpc ufficiale.', frpInvalid: 'Verifica frpc non riuscita. Rimuovilo e reinstallalo.', frpConfigMissing: 'Salva prima i dati della connessione FRP.', frpConfigVerifyFailed: 'frpc ha rifiutato la configurazione generata. Controlla server e token.', frpVhostPublic: 'Il vhost HTTP in chiaro è raggiungibile pubblicamente. Limitalo a 127.0.0.1 e usa Caddy per HTTPS.', frpVhostProbeFailed: 'Impossibile controllare il VPS. Verifica il DNS e riprova.', frpLaunchFailed: 'Avvio di frpc non riuscito.', frpTimeout: 'Endpoint pubblico non pronto. Controlla frps, Caddy, DNS e firewall.', frpDiscoveryMismatch: 'Il dominio pubblico punta a un altro computer DSH. Controlla Caddy e frps.', frpDiscoveryInvalid: 'Il dominio pubblico non ha restituito una risposta DSH Mobile valida.', frpStopped: 'Connessione FRP arrestata.', frpExited: 'frpc è terminato inaspettatamente. Controlla il VPS e riconnettiti.',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n selfHostedConnections: '自建连接', advanced: '高级', frpName: '自建 FRP', frpDescription: '只为当前 DSH 网关建立单用途 FRP 通道,VPS 和公开入口由你掌控。',\n prepareFrp: '配置自建 FRP', frpStep1Title: '1 · 连接信息', frpStep1Text: '填写中转服务器地址、frps 控制端口、共享 Token 和手机访问地址。没有域名时,可直接使用公网 IPv4。', frpServerAddress: '中转服务器地址', frpServerAddressPlaceholder: '203.0.113.10', frpServerPort: 'frps 控制端口', frpToken: '共享 Token', frpTokenPlaceholder: '已保存时可留空;新建至少 16 个字符', frpPublicOrigin: '手机访问地址(HTTPS)', frpPublicOriginPlaceholder: 'https://203.0.113.10',\n frpStep2Title: '2 · 部署中转服务器', frpStep2Text: '推荐通过 SSH 一键部署。需要手动操作时,也可以复制受限的 frps 与 Caddy 配置模板。', copyServerTemplate: '复制手动部署模板', templateCopied: '服务器模板已复制,请在 VPS 上保存 frps.toml 和 Caddy 片段,并在 Caddyfile 里加一行 import。', templateCopyFailed: '无法复制模板,请检查上方连接信息。', vpsDeployText: '填写 SSH 登录信息。服务器需为带 systemd 的 Ubuntu/Debian;不会覆盖已有的 Caddy 站点配置。', vpsDeployChangesTitle: '自动部署会在 VPS 上做这些改动(只复制手动模板不会改变任何东西):', vpsDeployChangePackages: '从官方 APT 源安装 Caddy,并安装 Python venv 与 Certbot(公网 IP 证书用)。', vpsDeployChangeServices: '创建 dsh-mobile 系统用户(如已存在则复用,卸载时保留)、frps 配置与服务、Caddy 片段加一行 import,以及每天自动续证书的定时器。', vpsDeployChangeFirewall: 'UFW 开启时放行 FRP 控制端口、80/tcp 和 443/tcp;其他防火墙需要你自己放行。', vpsDeployChangeManual: '手动部署是照着复制的模板一步步自己操作;自动部署是在你确认主机指纹后通过 SSH 执行同样的步骤。', vpsSshUser: 'SSH 用户', vpsSshPort: 'SSH 端口', vpsSshKey: '私钥文件路径(可选)', vpsSshKeyPlaceholder: '留空则使用 ssh-agent 或 SSH 配置', vpsDeploy: '一键部署 frps + Caddy', vpsDeploying: '正在部署中转服务器,请保持 DSH 运行…', vpsDeploySuccess: '中转服务器部署完成,请继续完成本机组件安装和连接验证。', vpsDeployFailed: 'VPS 部署失败:{error}', vpsDeployNotReady: '请先填写完整的连接信息。', vpsHostKeyFetching: '正在读取中转服务器的主机指纹…', vpsHostKeyFailed: '读取中转服务器主机指纹失败:{error}', vpsDeployConfirmWithKeys: '要在这台 VPS 上部署 DSH Mobile 的 frps 和 Caddy 吗?只会创建 DSH Mobile 自己的服务、配置和防火墙规则;如果已有非空 Caddy 配置,部署会停止并保留原配置。\\n\\n服务器当前的主机指纹如下,请先到 VPS 控制台核对一致后再继续:\\n{fingerprints}', vpsCopyUninstall: '复制 VPS 卸载脚本', vpsUninstallScriptCopied: '卸载脚本已复制,请审阅后再以 root 身份在 VPS 上执行。', vpsUninstallScriptFailed: '生成卸载脚本失败:{error}', vpsUninstall: '清理 VPS 上的 DSH Mobile', vpsUninstallConfirmWithKeys: '要删除这台 VPS 上的 DSH Mobile 服务、配置、证书和专属防火墙规则吗?你自己的 Caddy 内容和其他规则会保留。\\n\\n服务器当前的主机指纹如下,请先到 VPS 控制台核对一致后再继续:\\n{fingerprints}', vpsUninstalling: '正在清理 VPS 上的 DSH Mobile,请保持 DSH 运行…', vpsUninstallSuccess: 'VPS 清理完成,本机 FRP 设置保持不变。', vpsUninstallFailed: 'VPS 清理失败:{error}',\n frpStep3Title: '3 · 安装本机组件', frpStep3Text: '下载并校验固定版本的官方 frpc,只安装到 DSH Mobile 私有目录。', installFrpc: '安装官方 frpc', frpInstallConfirm: '从 FRP 官方 Release 下载并校验 frpc 0.70.1(约 {size} MB),只提取 frpc 到 DSH Mobile 私有目录?不会安装服务、写入 PATH 或设置开机启动。', installingFrp: '正在安装官方 frpc,完成前请保持 DSH 运行。', frpNotInstalled: 'frpc 尚未安装;点击下方按钮后才会开始下载。', frpUnsupported: '当前桌面平台暂不支持托管安装 frpc。', frpComponentReady: '官方 frpc {version} 已安装并通过校验。',\n frpStep4Title: '4 · 启用并验证', frpStep4Text: '保存配置、启动受限的 FRP 通道,并确认手机访问地址确实连接到这台电脑。', frpAppRequirement: '通过自定义域名或公网 IP 连接,需要 Android App 0.3.3 或更高版本。局域网、cpolar 和 Tailscale 不受影响。', frpSaveConnect: '保存配置并验证连接', frpSavingConnecting: '正在保存私有配置并验证完整 FRP 链路…', frpConfigurationReady: '连接配置已安全保存', frpConfigurationMissing: '请按顺序完成连接信息、服务器部署和本机组件安装。', frpInputInvalid: '请检查服务器地址、控制端口、手机访问地址和共享 Token。',\n frpComponentDetails: 'FRP 来源与彻底清理', frpComponentDetailsText: '固定版本客户端来自 fatedier/frp 官方 Release。DSH Mobile 不安装系统服务,也不接受任意 FRP 配置。', frpOfficialRelease: 'FRP 官方 Release', purgeFrp: '彻底移除 FRP 组件与私有配置', purgeFrpConfirm: '关闭 FRP 并移除 DSH Mobile 管理的 frpc、共享 Token、生成配置、临时文件和日志?不会修改 VPS。', purgingFrp: '正在关闭 FRP 并清理 DSH Mobile 管理的文件…',\n switchingFrp: '正在切换到自建 FRP…', reconnectingFrp: '正在验证并重新连接自建 FRP…', resetFrpConfirm: '关闭自建 FRP 并移除所有远程配对设备?已保存的 VPS 配置和服务器不会改变。', remoteUnavailableFrp: 'frpc 尚未安装或私有服务器配置不完整。', remoteStartingFrp: '正在检查 VPS 并准备受限 FRP 通道…', remoteConnectingFrp: 'frpc 已启动,正在验证公网 HTTPS 端点…', frpMissing: '请先安装官方 frpc。', frpInvalid: 'frpc 校验失败,请彻底清理后重新安装。', frpConfigMissing: '请先保存自建 FRP 连接信息。', frpConfigVerifyFailed: 'frpc 拒绝了生成的配置,请检查服务器信息和 Token。', frpVhostPublic: 'VPS 明文 HTTP vhost 可被公网访问。请将其限制到 127.0.0.1,并由 Caddy 提供 HTTPS。', frpVhostProbeFailed: '无法检查 VPS 地址,请确认 DNS 后重试。', frpLaunchFailed: 'frpc 未能启动。', frpTimeout: '公网端点未能就绪,请检查 frps、Caddy、DNS 和防火墙。', frpDiscoveryMismatch: '公开域名连接到了另一台 DSH 电脑,请检查 Caddy 与 frps 映射。', frpDiscoveryInvalid: '公开域名没有返回有效的 DSH Mobile 发现信息。', frpStopped: 'FRP 连接已停止。', frpExited: 'frpc 意外退出,请检查 VPS 配置后重新连接。',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n requestTimeout: 'The operation timed out. Confirm that DSH is still running, then try again.',\n diagnostics: 'Diagnostics', openDiagnostics: 'Open connection diagnostics', back: 'Back', backToMobile: 'Back to Mobile access', connectionDiagnostics: 'Connection diagnostics',\n diagnosticsIntro: 'Check versions, gateway, network adapter, firewall, and remote channel. The report is automatically redacted and never reads conversations or credentials.',\n diagnosticsNotRun: 'Not checked yet', diagnosticsStartHint: 'Select the button below to begin.', diagnosticsIdleMeta: 'Waiting to run · connection status only', diagnosticsStart: 'Start check', diagnosticsCopy: 'Copy redacted report', diagnosticsAdvanced: 'Advanced diagnostic details',\n diagnosticsComplete: 'Check complete', diagnosticsAttention: 'Some items need attention', diagnosticsProblem: 'Connection problems found', diagnosticsCompleteFallback: 'The check is complete.',\n diagnosticStatusOk: 'OK', diagnosticStatusWarning: 'Attention', diagnosticStatusError: 'Problem', diagnosticStatusInfo: 'Info', diagnosticItems: '{count} items', diagnosticCheck: 'Check', diagnosticAction: 'Suggested action',\n diagnosticNeedsAction: 'Needs action', diagnosticDetails: 'Check details', diagnosticOther: 'Other checks', diagnosticNoBlockers: '{count} checks · no blocking issues found', diagnosticNeedsCount: '{count} checks · {issues} need attention',\n diagnosticsChecking: 'Checking…', diagnosticsCheckingTitle: 'Checking connection', diagnosticsCheckingText: 'This usually takes a few seconds. The remote channel performs a real reachability test.', diagnosticsRunningMeta: 'Running · keep DSH online',\n diagnosticsIncomplete: 'Check not completed', diagnosticsReadFailed: 'Could not read diagnostics: {error}', diagnosticsUnavailable: 'Diagnostics service unavailable · try again later', diagnosticsRetry: 'Check again', diagnosticsCopied: 'Redacted report copied. You can paste it directly into an issue.', diagnosticsCopyManual: 'Clipboard access was denied. Details are expanded for manual copying.',\n diagnosticLabelVersions: 'Version compatibility', diagnosticLabelNetwork: 'Local network adapter', diagnosticLabelLan: 'Local network gateway', diagnosticLabelFirewall: 'Windows Firewall', diagnosticLabelRemote: 'Remote channel', diagnosticLabelPhone: 'Phone network',\n funnelTimeout: 'The Tailscale component timed out while starting. Check the network, then reconnect.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n requestTimeout: 'Operazione scaduta. Verifica che DSH sia ancora in esecuzione e riprova.',\n diagnostics: 'Diagnostica', openDiagnostics: 'Apri diagnostica connessione', back: 'Indietro', backToMobile: 'Torna ad Accesso mobile', connectionDiagnostics: 'Diagnostica connessione',\n diagnosticsIntro: 'Controlla versioni, gateway, scheda di rete, firewall e canale remoto. Il report viene anonimizzato automaticamente e non legge conversazioni o credenziali.',\n diagnosticsNotRun: 'Controllo non eseguito', diagnosticsStartHint: 'Premi il pulsante sotto per iniziare.', diagnosticsIdleMeta: 'In attesa · solo stato connessione', diagnosticsStart: 'Avvia controllo', diagnosticsCopy: 'Copia report anonimizzato', diagnosticsAdvanced: 'Dettagli diagnostici avanzati',\n diagnosticsComplete: 'Controllo completato', diagnosticsAttention: 'Alcuni elementi richiedono attenzione', diagnosticsProblem: 'Rilevati problemi di connessione', diagnosticsCompleteFallback: 'Controllo completato.',\n diagnosticStatusOk: 'OK', diagnosticStatusWarning: 'Attenzione', diagnosticStatusError: 'Problema', diagnosticStatusInfo: 'Informazione', diagnosticItems: '{count} elementi', diagnosticCheck: 'Controllo', diagnosticAction: 'Suggerimento',\n diagnosticNeedsAction: 'Da risolvere', diagnosticDetails: 'Dettagli controllo', diagnosticOther: 'Altri controlli', diagnosticNoBlockers: '{count} controlli · nessun problema bloccante', diagnosticNeedsCount: '{count} controlli · {issues} richiedono attenzione',\n diagnosticsChecking: 'Controllo…', diagnosticsCheckingTitle: 'Controllo connessione', diagnosticsCheckingText: 'Di solito richiede pochi secondi. Il canale remoto esegue un test reale di raggiungibilità.', diagnosticsRunningMeta: 'In esecuzione · mantieni DSH online',\n diagnosticsIncomplete: 'Controllo non completato', diagnosticsReadFailed: 'Impossibile leggere la diagnostica: {error}', diagnosticsUnavailable: 'Servizio diagnostico non disponibile · riprova più tardi', diagnosticsRetry: 'Ripeti controllo', diagnosticsCopied: 'Report anonimizzato copiato. Puoi incollarlo direttamente in una issue.', diagnosticsCopyManual: 'Il browser ha negato la copia. I dettagli sono stati aperti per la copia manuale.',\n diagnosticLabelVersions: 'Compatibilità versioni', diagnosticLabelNetwork: 'Scheda rete locale', diagnosticLabelLan: 'Gateway rete locale', diagnosticLabelFirewall: 'Windows Firewall', diagnosticLabelRemote: 'Canale remoto', diagnosticLabelPhone: 'Rete telefono',\n funnelTimeout: 'Avvio del componente Tailscale scaduto. Controlla la rete e riconnettiti.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n requestTimeout: '操作超时,请确认 DSH 仍在运行后重试。',\n diagnostics: '诊断', openDiagnostics: '打开连接诊断', back: '返回', backToMobile: '返回移动访问', connectionDiagnostics: '连接诊断',\n diagnosticsIntro: '检查版本、网关、网卡、防火墙和远程通道。报告自动脱敏,不读取对话或凭据。', diagnosticsNotRun: '尚未检查', diagnosticsStartHint: '点击下方按钮开始。', diagnosticsIdleMeta: '等待运行 · 仅收集连接状态', diagnosticsStart: '开始检查', diagnosticsCopy: '复制脱敏报告', diagnosticsAdvanced: '高级诊断详情',\n diagnosticsComplete: '检查完成', diagnosticsAttention: '有项目需要留意', diagnosticsProblem: '发现连接问题', diagnosticsCompleteFallback: '检查已完成。', diagnosticStatusOk: '正常', diagnosticStatusWarning: '注意', diagnosticStatusError: '问题', diagnosticStatusInfo: '说明', diagnosticItems: '{count} 项', diagnosticCheck: '检查项', diagnosticAction: '建议', diagnosticNeedsAction: '需要处理', diagnosticDetails: '检查详情', diagnosticOther: '其他检查', diagnosticNoBlockers: '{count} 项检查 · 未发现阻断问题', diagnosticNeedsCount: '{count} 项检查 · {issues} 项需要处理',\n diagnosticsChecking: '正在检查…', diagnosticsCheckingTitle: '正在检查连接', diagnosticsCheckingText: '通常几秒内完成。远程通道会执行一次真实可达性测试。', diagnosticsRunningMeta: '正在运行 · 请保持 DSH 在线', diagnosticsIncomplete: '检查未完成', diagnosticsReadFailed: '无法读取诊断结果:{error}', diagnosticsUnavailable: '诊断服务暂不可用 · 请稍后重试', diagnosticsRetry: '重新检查', diagnosticsCopied: '脱敏报告已复制,可直接粘贴到 Issue。', diagnosticsCopyManual: '浏览器未允许复制,已展开详情,请手动复制。',\n diagnosticLabelVersions: '版本兼容', diagnosticLabelNetwork: '局域网网卡', diagnosticLabelLan: '局域网网关', diagnosticLabelFirewall: 'Windows 防火墙', diagnosticLabelRemote: '远程通道', diagnosticLabelPhone: '手机网络', funnelTimeout: 'Tailscale 组件启动超时,请检查网络后重新连接。',\n})\n\nexport const LOCALIZED_DIAGNOSTIC_COPY = {\n en: {\n versions: 'Installed plugin, DSH, and minimum Android app versions are shown.',\n networkOk: 'The configured local network adapter is available.', networkError: 'The saved local network adapter is unavailable.', networkInfo: 'A fixed local network configuration is in use.', networkAction: 'Run dsh-mobile setup again.',\n lanOk: 'The local gateway is listening and pairing is available.', lanInfo: 'Local network access is currently off.', lanAction: 'Enable local network access when the phone must connect directly.',\n firewallOk: 'Local TCP and discovery firewall rules are enabled.', firewallWarning: 'The complete local network firewall rules were not found.', firewallInfo: 'The system did not allow the plugin to read firewall status.', firewallAction: 'Run dsh-mobile setup as administrator and check the firewall rules.',\n remoteOk: 'The remote public address passed the reachability check.', remoteWarning: 'The remote channel needs attention or is still connecting.', remoteError: 'The remote connection is not currently reachable.', remoteInfo: 'Remote access is currently off.', remoteAction: 'Return to Remote access, follow the provider guidance, and reconnect.',\n phone: 'The computer cannot determine whether the router isolates the phone.', phoneAction: 'Confirm the phone and computer use the same network, then disable guest-network or AP isolation.',\n reportTitle: 'DSH Mobile diagnostic report', generated: 'Generated',\n },\n it: {\n versions: 'Sono indicate le versioni installate di plugin e DSH e la versione minima dell’app Android.',\n networkOk: 'La scheda di rete locale configurata è disponibile.', networkError: 'La scheda di rete locale salvata non è disponibile.', networkInfo: 'È in uso una configurazione di rete locale fissa.', networkAction: 'Esegui di nuovo dsh-mobile setup.',\n lanOk: 'Il gateway locale è in ascolto e l’abbinamento è disponibile.', lanInfo: 'L’accesso dalla rete locale è disattivato.', lanAction: 'Attiva l’accesso locale quando il telefono deve collegarsi direttamente.',\n firewallOk: 'Le regole firewall TCP locale e di rilevamento sono attive.', firewallWarning: 'Le regole firewall complete per la rete locale non sono state trovate.', firewallInfo: 'Il sistema non ha consentito al plugin di leggere lo stato del firewall.', firewallAction: 'Esegui dsh-mobile setup come amministratore e controlla le regole firewall.',\n remoteOk: 'L’indirizzo pubblico remoto ha superato il test di raggiungibilità.', remoteWarning: 'Il canale remoto richiede attenzione o è ancora in connessione.', remoteError: 'La connessione remota non è al momento raggiungibile.', remoteInfo: 'L’accesso remoto è disattivato.', remoteAction: 'Torna ad Accesso remoto, segui le indicazioni del provider e riconnettiti.',\n phone: 'Il computer non può stabilire se il router isola il telefono.', phoneAction: 'Verifica che telefono e computer usino la stessa rete, poi disattiva rete ospiti o isolamento AP.',\n reportTitle: 'Report diagnostico DSH Mobile', generated: 'Generato',\n },\n zh: {\n versions: '已显示插件、DSH 和 Android App 最低版本。',\n networkOk: '已配置的局域网网卡可用。', networkError: '已保存的局域网网卡不可用。', networkInfo: '当前使用固定局域网配置。', networkAction: '重新运行 dsh-mobile setup。',\n lanOk: '局域网网关正在监听,配对入口可用。', lanInfo: '局域网访问当前未开启。', lanAction: '需要手机直连时开启局域网访问。',\n firewallOk: '局域网 TCP 与发现防火墙规则已启用。', firewallWarning: '未找到完整的局域网防火墙规则。', firewallInfo: '系统未允许插件读取防火墙状态。', firewallAction: '以管理员身份运行 dsh-mobile setup 并检查防火墙规则。',\n remoteOk: '远程公网地址已通过可达性检查。', remoteWarning: '远程通道需要处理或仍在连接。', remoteError: '远程连接当前不可达。', remoteInfo: '远程访问当前未开启。', remoteAction: '返回远程访问,按提供方提示操作并重新连接。',\n phone: '电脑无法判断路由器是否隔离了手机。', phoneAction: '确认手机与电脑使用同一网络,并关闭访客网络或 AP 隔离。',\n reportTitle: 'DSH Mobile 诊断报告', generated: '生成时间',\n },\n} satisfies Record<MobileControlLocale, {\n versions: string\n networkOk: string\n networkError: string\n networkInfo: string\n networkAction: string\n lanOk: string\n lanInfo: string\n lanAction: string\n firewallOk: string\n firewallWarning: string\n firewallInfo: string\n firewallAction: string\n remoteOk: string\n remoteWarning: string\n remoteError: string\n remoteInfo: string\n remoteAction: string\n phone: string\n phoneAction: string\n reportTitle: string\n generated: string\n}>\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n selfHostedDescription: \"Use your own VPS or HTTPS reverse proxy without a public tunnel service.\",\n originName: \"Own reverse proxy\",\n originDescription: \"You manage HTTPS. DSH Mobile provides a private, authenticated HTTP backend; no tunnel component is installed.\",\n prepareOrigin: \"Connect your HTTPS reverse proxy\",\n originPublicOrigin: \"Public HTTPS address\",\n originListenHost: \"Private listen IPv4\",\n originListenPort: \"HTTP backend port\",\n originAllowedCidrs: \"Allowed proxy source CIDRs\",\n originHelp: \"Same computer: use 127.0.0.1. For a proxy on another LAN device, use this computer’s private IPv4 and allow only the proxy’s direct source IPv4/32. Separate CIDRs with spaces or commas.\",\n originWarning: \"Keep this HTTP backend private. Never expose or port-forward it to the Internet. Your proxy must terminate HTTPS and preserve the external Host, including its port, and WebSocket upgrades.\",\n originSaveStart: \"Save and start backend\",\n originBackendSaved: \"Saved HTTP backend (not running)\",\n originBackendListening: \"Listening HTTP backend\",\n originCopyBackend: \"Copy backend address\",\n originBackendCopied: \"HTTP backend address copied.\",\n originPurge: \"Clear proxy settings\",\n originPurgeConfirm: \"Stop this private HTTP backend and delete only its reverse-proxy settings? Paired remote devices, LAN access, and other providers are kept.\",\n originPurged: \"The backend is stopped and its proxy settings are cleared. Paired devices are kept.\",\n originSaving: \"Saving settings and starting the private backend…\",\n originPurging: \"Stopping the backend and clearing its settings…\",\n originBackendReady: \"Backend listening\",\n originReady: \"The private HTTP backend is listening. Public HTTPS, its certificate, and WebSocket connectivity have NOT been verified. Test the public address from your phone before relying on it.\",\n originUnavailable: \"Configure the public HTTPS address and private backend first.\",\n originStarting: \"Starting the private HTTP backend…\",\n switchingOrigin: \"Switching to your own reverse proxy…\",\n reconnectingOrigin: \"Restarting the private HTTP backend…\",\n resetOriginConfirm: \"Stop this backend and reset remote pairing? All paired remote devices must pair again. Reverse-proxy settings and LAN devices are kept.\",\n originPublicOriginInvalid: \"Enter a public HTTPS origin only, such as https://phone.example.com:8815; no path, query, credentials, or private address.\",\n originListenHostInvalid: \"Use an explicit loopback or private IPv4 address on this computer, not 0.0.0.0 or a public address.\",\n originListenPortInvalid: \"Use a whole-number port from 1024 to 65535; lower ports need privileges the plugin does not have.\",\n originListenPortReserved: \"Port 3443 belongs to the LAN gateway and port 3080 to DSH itself, so both are always taken. Choose another port, such as 3444 or 3445.\",\n originAllowedCidrsInvalid: \"Allow 1–16 valid loopback/private IPv4 CIDRs with no host bits. For a LAN listener, include the actual proxy source IPv4/32; public ranges are not accepted.\",\n originSettingsInvalid: \"The reverse-proxy settings are invalid. Check the four fields and save again.\",\n originConfigMissing: \"Save the reverse-proxy settings before starting the backend.\",\n originConfigInvalid: \"The saved settings are invalid. Correct and save them again, or clear only these settings.\",\n originPortInUse: \"The backend port is already in use. Stop the conflicting listener or choose another port. Note that 3443, 3080, and a port already used by a cloudflared tunnel are never free.\",\n originAddressUnavailable: \"The listen address is not available on this computer. Choose its current private IPv4.\",\n originStartFailed: \"The private backend could not start. Check its address, port, permissions, and local logs.\",\n originConfigTargetInvalid: \"The saved proxy settings file is not a regular file. Remove it and save the settings again.\",\n originControllerUnavailable: \"The reverse-proxy provider is not available in this session. Restart DSH and try again.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n selfHostedDescription: \"Usa il tuo VPS o reverse proxy HTTPS senza un servizio di tunnel pubblico.\",\n originName: \"Reverse proxy proprio\",\n originDescription: \"Gestisci tu HTTPS. DSH Mobile offre un backend HTTP privato con autenticazione; non installa componenti tunnel.\",\n prepareOrigin: \"Collega il tuo reverse proxy HTTPS\",\n originPublicOrigin: \"Indirizzo HTTPS pubblico\",\n originListenHost: \"IPv4 privato di ascolto\",\n originListenPort: \"Porta backend HTTP\",\n originAllowedCidrs: \"CIDR sorgente del proxy consentiti\",\n originHelp: \"Stesso computer: usa 127.0.0.1. Per un proxy su un altro dispositivo LAN, usa l’IPv4 privato di questo computer e consenti solo l’IPv4 sorgente diretta del proxy con /32. Separa i CIDR con spazi o virgole.\",\n originWarning: \"Mantieni privato il backend HTTP. Non esporlo né inoltrarne la porta su Internet. Il proxy deve terminare HTTPS e conservare l’Host esterno, inclusa la porta, e gli upgrade WebSocket.\",\n originSaveStart: \"Salva e avvia backend\",\n originBackendSaved: \"Backend HTTP salvato (non attivo)\",\n originBackendListening: \"Backend HTTP in ascolto\",\n originCopyBackend: \"Copia indirizzo backend\",\n originBackendCopied: \"Indirizzo backend HTTP copiato.\",\n originPurge: \"Cancella impostazioni proxy\",\n originPurgeConfirm: \"Fermare questo backend HTTP privato ed eliminare solo le sue impostazioni reverse proxy? Dispositivi remoti abbinati, accesso LAN e altri provider vengono conservati.\",\n originPurged: \"Backend fermato e impostazioni proxy cancellate. I dispositivi abbinati sono conservati.\",\n originSaving: \"Salvataggio impostazioni e avvio del backend privato…\",\n originPurging: \"Arresto del backend e cancellazione impostazioni…\",\n originBackendReady: \"Backend in ascolto\",\n originReady: \"Il backend HTTP privato è in ascolto. HTTPS pubblico, certificato e connettività WebSocket NON sono stati verificati. Prova l’indirizzo pubblico dal telefono prima di usarlo.\",\n originUnavailable: \"Configura prima l’indirizzo HTTPS pubblico e il backend privato.\",\n originStarting: \"Avvio del backend HTTP privato…\",\n switchingOrigin: \"Passaggio al reverse proxy proprio…\",\n reconnectingOrigin: \"Riavvio del backend HTTP privato…\",\n resetOriginConfirm: \"Fermare il backend e reimpostare gli abbinamenti remoti? Tutti i dispositivi remoti dovranno essere abbinati di nuovo. Le impostazioni proxy e i dispositivi LAN vengono conservati.\",\n originPublicOriginInvalid: \"Inserisci solo un’origine HTTPS pubblica, ad esempio https://phone.example.com:8815, senza percorso, query, credenziali o indirizzo privato.\",\n originListenHostInvalid: \"Usa un IPv4 loopback o privato esplicito di questo computer, non 0.0.0.0 né un indirizzo pubblico.\",\n originListenPortInvalid: \"Usa una porta intera da 1024 a 65535; le porte più basse richiedono privilegi che il plugin non ha.\",\n originListenPortReserved: \"La porta 3443 appartiene al gateway LAN e la 3080 a DSH stesso, quindi sono sempre occupate. Scegli un’altra porta, ad esempio 3444 o 3445.\",\n originAllowedCidrsInvalid: \"Consenti 1–16 CIDR IPv4 loopback/privati validi senza bit host. Per l’ascolto LAN includi l’IPv4 sorgente reale del proxy con /32; le reti pubbliche non sono ammesse.\",\n originSettingsInvalid: \"Impostazioni reverse proxy non valide. Controlla i quattro campi e salva di nuovo.\",\n originConfigMissing: \"Salva le impostazioni reverse proxy prima di avviare il backend.\",\n originConfigInvalid: \"Impostazioni salvate non valide. Correggile e salvale di nuovo, oppure cancella solo queste impostazioni.\",\n originPortInUse: \"La porta backend è già occupata. Ferma il processo in conflitto o scegli un’altra porta. 3443, 3080 e una porta già usata da un tunnel cloudflared non sono mai libere.\",\n originAddressUnavailable: \"L’indirizzo di ascolto non è disponibile su questo computer. Scegli il suo IPv4 privato attuale.\",\n originStartFailed: \"Impossibile avviare il backend privato. Controlla indirizzo, porta, permessi e log locali.\",\n originConfigTargetInvalid: \"Il file delle impostazioni proxy salvato non è un file regolare. Rimuovilo e salva di nuovo le impostazioni.\",\n originControllerUnavailable: \"Il provider reverse proxy non è disponibile in questa sessione. Riavvia DSH e riprova.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n selfHostedDescription: \"使用自己的 VPS 或 HTTPS 反向代理,不依赖公共隧道服务。\",\n originName: \"自有反向代理\",\n originDescription: \"HTTPS 由你管理,插件提供带认证的私有 HTTP 后端,无需安装隧道组件。\",\n prepareOrigin: \"接入自有 HTTPS 反向代理\",\n originPublicOrigin: \"公网 HTTPS 地址\",\n originListenHost: \"私有监听 IPv4\",\n originListenPort: \"HTTP 后端端口\",\n originAllowedCidrs: \"允许的代理来源 CIDR\",\n originHelp: \"代理与 DSH 同机时用 127.0.0.1;代理在另一台局域网设备上时,填写本机私有 IPv4,并只允许代理实际直连来源 IPv4/32。多个 CIDR 用空格或逗号分隔。\",\n originWarning: \"HTTP 后端必须留在私网,绝不能直接暴露公网或做公网端口映射。反向代理负责 HTTPS,并须保留外部 Host(含端口)及 WebSocket 升级。\",\n originSaveStart: \"保存并启动后端\",\n originBackendSaved: \"已保存的 HTTP 后端(未运行)\",\n originBackendListening: \"正在监听的 HTTP 后端\",\n originCopyBackend: \"复制后端地址\",\n originBackendCopied: \"已复制 HTTP 后端地址。\",\n originPurge: \"清除代理配置\",\n originPurgeConfirm: \"停止此私有 HTTP 后端,并且只删除它的反向代理配置?已配对的远程设备、局域网访问和其他提供方均保留。\",\n originPurged: \"已停止后端并清除代理配置,已配对设备仍保留。\",\n originSaving: \"正在保存配置并启动私有后端…\",\n originPurging: \"正在停止后端并清除配置…\",\n originBackendReady: \"后端已监听\",\n originReady: \"私有 HTTP 后端已监听,但尚未验证公网 HTTPS、证书及 WebSocket 连通性。请先用手机测试公网地址,不代表公网连接已成功。\",\n originUnavailable: \"请先配置公网 HTTPS 地址和私有后端。\",\n originStarting: \"正在启动私有 HTTP 后端…\",\n switchingOrigin: \"正在切换到自有反向代理…\",\n reconnectingOrigin: \"正在重启私有 HTTP 后端…\",\n resetOriginConfirm: \"停止此后端并重置远程配对?所有已配对的远程设备都需要重新配对;反向代理配置和局域网设备保留。\",\n originPublicOriginInvalid: \"只填写公网 HTTPS 源地址,例如 https://phone.example.com:8815;不能含路径、查询参数、账号密码或私有地址。\",\n originListenHostInvalid: \"填写本机明确的回环或私有 IPv4,不能使用 0.0.0.0 或公网地址。\",\n originListenPortInvalid: \"端口必须是 1024–65535 的整数;更低的端口需要插件没有的特权。\",\n originListenPortReserved: \"3443 属于局域网网关、3080 属于 DSH 自身,两者始终被占用。请换一个端口,例如 3444 或 3445。\",\n originAllowedCidrsInvalid: \"填写 1–16 个规范的回环/私有 IPv4 CIDR,不能有主机位;局域网监听时须包含代理实际来源 IPv4/32,不接受公网网段。\",\n originSettingsInvalid: \"反向代理配置无效,请检查四个字段后重新保存。\",\n originConfigMissing: \"请先保存反向代理配置,再启动后端。\",\n originConfigInvalid: \"已保存的配置无效,请修正并重新保存,或仅清除这项配置。\",\n originPortInUse: \"后端端口已被占用,请停止冲突进程或改用其他端口。3443、3080 以及已被 cloudflared 隧道占用的端口永远不会空闲。\",\n originAddressUnavailable: \"本机没有这个监听地址,请选择当前本机的私有 IPv4。\",\n originStartFailed: \"私有后端启动失败,请检查地址、端口、权限和本地日志。\",\n originConfigTargetInvalid: \"已保存的代理配置文件不是普通文件。请移除后重新保存设置。\",\n originControllerUnavailable: \"当前会话里反向代理提供方不可用。请重启 DSH 后重试。\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n cloudflaredBadge: \"Account optional\",\n cloudflaredDescription: \"Installs the official cloudflared client on demand. A quick tunnel needs no account and gives a temporary public address; a named tunnel uses a Cloudflare account token and keeps one hostname that survives restarts.\",\n prepareCloudflared: \"Prepare cloudflared\",\n cloudflaredUnsupported: \"Only Windows x64 is currently supported. You can still use the built-in Tailscale Funnel.\",\n cloudflaredNotInstalled: \"Not installed. A fixed version is downloaded from the official cloudflared release page only after you click the button below.\",\n cloudflaredReady: \"Official component {version} is ready.\",\n cloudflaredQuickNote: \"Quick tunnel: no Cloudflare account is needed, but Cloudflare positions quick tunnels for testing — the address is random, rate-limited, and carries no uptime guarantee. Do not rely on one for access that must stay reachable.\",\n cloudflaredNamedNote: \"Named tunnel: the hostname above stays the same across restarts and Cloudflare routes it to the local forward port. The connector token is stored only in the DSH Mobile private directory, is handed to cloudflared through its environment rather than the command line, and is never shown again once saved.\",\n cloudflaredComponentNote: \"Downloaded from the official cloudflared release page and verified at a fixed version only after you choose Install. The client is started with automatic updates disabled. It does not add a system service, startup item, registry entry, or PATH entry.\",\n installConfirmCloudflared: \"Download and verify cloudflared {size} from the official release page and store it only in the DSH Mobile private directory? No system service, PATH/registry entry, or startup item is added.\",\n installingCloudflared: \"Installing the official cloudflared component. Keep DSH running until it completes.\",\n purgeCloudflared: \"Completely remove the cloudflared component\",\n purgeCloudflaredConfirm: \"Completely remove the cloudflared component and its runtime logs from the DSH Mobile private directory? Local network access, DSH data, and other system programs are unaffected.\",\n purgingCloudflared: \"Stopping the channel and removing cloudflared files managed by DSH Mobile…\",\n switchingCloudflared: \"Switching to cloudflared…\",\n reconnectingCloudflared: \"Reconnecting cloudflared…\",\n remoteUnavailableCloudflared: \"cloudflared is not installed.\",\n remoteStartingCloudflared: \"Starting the cloudflared connector…\",\n remoteConnectingCloudflared: \"Starting the DSH authentication gateway…\",\n resetCloudflaredConfirm: \"Disable the cloudflared remote channel and remove all remote paired devices? The installed component and the local network configuration are unchanged.\",\n cloudflaredMissing: \"The official cloudflared component is not installed. Complete the preparation steps above.\",\n cloudflaredInvalid: \"cloudflared component verification failed. Remove it completely and reinstall.\",\n cloudflaredPortUnavailable: \"Could not allocate a local remote-gateway port. Try again.\",\n cloudflaredLaunchFailed: \"The cloudflared client failed to start.\",\n cloudflaredTimeout: \"Timed out waiting for the tunnel to become reachable. Reconnect.\",\n cloudflaredStopped: \"The cloudflared connection stopped.\",\n cloudflaredExited: \"The cloudflared connection exited unexpectedly. Reconnect.\",\n cloudflaredOutputInvalid: \"cloudflared returned an unrecognized status.\",\n cloudflaredOriginInvalid: \"The public address returned by cloudflared failed validation.\",\n cloudflaredComponentUnsupported: \"This build cannot run the cloudflared component.\",\n cloudflaredDownloadHashMismatch: \"The downloaded cloudflared failed its SHA-256 verification. Retry the install.\",\n cloudflaredDownloadSizeMismatch: \"The downloaded cloudflared is not the pinned size. Retry the install.\",\n cloudflaredDownloadRedirectMissing: \"The download page stopped redirecting to the release asset. Retry later, or install from the official page manually.\",\n cloudflaredDownloadRedirectInvalid: \"The download redirect did not point at a GitHub release asset, so it was refused.\",\n cloudflaredDownloadRedirectRejected: \"The download redirect was refused by policy. Retry later, or install from the official page manually.\",\n cloudflaredExecutableHashMismatch: \"The installed cloudflared no longer matches the verified build. Remove it completely and install again.\",\n cloudflaredPortReservationFailed: \"Could not reserve a local port for the tunnel. Try again.\",\n cloudflaredTunnelTargetInvalid: \"The saved tunnel configuration is not a regular file. Remove it and save the settings again.\",\n cloudflaredTunnelSaving: \"Saving the tunnel settings and reconnecting cloudflared…\",\n cloudflaredTunnelForgetting: \"Removing the saved tunnel token…\",\n cloudflaredTunnelTitle: \"Tunnel type\",\n cloudflaredTunnelQuick: \"Quick\",\n cloudflaredTunnelNamed: \"Named\",\n cloudflaredTunnelQuickHint: \"No account: cloudflared allocates a random address on every start.\",\n cloudflaredTunnelNamedHint: \"Uses a Cloudflare account token and keeps one address that survives restarts.\",\n cloudflaredTunnelHostname: \"Public hostname\",\n cloudflaredTunnelHostnamePlaceholder: \"dsh.example.com\",\n cloudflaredTunnelPort: \"Local forward port\",\n cloudflaredTunnelToken: \"Connector token\",\n cloudflaredTunnelTokenPlaceholder: \"Paste the tunnel token from the Cloudflare dashboard\",\n cloudflaredTunnelTokenSaved: \"A token is saved. Leave blank to keep it.\",\n cloudflaredTunnelSave: \"Save and connect\",\n cloudflaredTunnelSaveQuick: \"Switch to a quick tunnel\",\n cloudflaredTunnelConfigured: \"Named tunnel configured: {hostname} reaches this computer on 127.0.0.1:{port}.\",\n cloudflaredTunnelMissing: \"No named tunnel configured yet.\",\n cloudflaredTunnelHint: \"In the Cloudflare dashboard create a tunnel, then set its public hostname to http://127.0.0.1:{port}. The token is stored only in the DSH Mobile private directory and is never shown again after saving.\",\n cloudflaredTunnelForget: \"Remove the saved token\",\n cloudflaredTunnelForgetConfirm: \"Remove the saved tunnel token, stop the cloudflared channel, and go back to a quick tunnel? Nothing reconnects on its own: switch the channel back on afterwards. The tunnel still exists in your Cloudflare account, and its public hostname is unchanged.\",\n cloudflaredTunnelInvalid: \"The saved named-tunnel configuration is unreadable; the provider is using a quick tunnel. Save the settings again.\",\n cloudflaredTunnelPortUnavailable: \"The configured local forward port is unavailable. Cloudflare routes the public hostname to that exact port, so free it or choose another one.\",\n cloudflaredTunnelHostnameInvalid: \"Enter a public hostname under a domain on this Cloudflare account, for example dsh.example.com.\",\n cloudflaredTunnelPortInvalid: \"Enter a forward port between 1024 and 65535.\",\n cloudflaredTunnelPortReserved: \"Port 3443 is reserved for the DSH Mobile LAN gateway and is always occupied. Choose another port, such as 3444 or 3445.\",\n cloudflaredTunnelTokenInvalid: \"That does not look like a tunnel token. Copy the whole token from the Cloudflare dashboard.\",\n cloudflaredTunnelSettingsInvalid: \"The tunnel settings were rejected.\",\n cloudflaredTunnelConfigMissing: \"Enter the token, hostname, and port to use a named tunnel.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n cloudflaredBadge: \"Account facoltativo\",\n cloudflaredDescription: \"Installa su richiesta il client cloudflared ufficiale. Il tunnel rapido non richiede account e fornisce un indirizzo pubblico temporaneo; il tunnel con nome usa il token di un account Cloudflare e mantiene un hostname stabile tra i riavvii.\",\n prepareCloudflared: \"Prepara cloudflared\",\n cloudflaredUnsupported: \"Attualmente è supportato solo Windows x64. Puoi comunque usare Tailscale Funnel integrato.\",\n cloudflaredNotInstalled: \"Non installato. Una versione fissa viene scaricata dalla pagina ufficiale di cloudflared solo dopo aver premuto il pulsante.\",\n cloudflaredReady: \"Componente ufficiale {version} pronto.\",\n cloudflaredQuickNote: \"Tunnel rapido: non serve un account Cloudflare, ma Cloudflare li considera pensati per i test — l’indirizzo è casuale, soggetto a limiti di frequenza e senza garanzia di disponibilità. Non usarlo per un accesso che deve restare raggiungibile.\",\n cloudflaredNamedNote: \"Tunnel con nome: l’hostname qui sopra resta lo stesso tra i riavvii e Cloudflare lo instrada verso la porta di inoltro locale. Il token del connettore è salvato solo nella directory privata DSH Mobile, viene passato a cloudflared tramite l’ambiente e non tramite la riga di comando, e dopo il salvataggio non viene più mostrato.\",\n cloudflaredComponentNote: \"Viene scaricato dalla pagina ufficiale di cloudflared e verificato a una versione fissa solo dopo aver scelto Installa. Il client viene avviato con gli aggiornamenti automatici disattivati. Non aggiunge servizi di sistema, avvio automatico, voci di registro o PATH.\",\n installConfirmCloudflared: \"Scaricare e verificare cloudflared {size} dalla pagina ufficiale e salvarlo solo nella directory privata DSH Mobile? Non vengono aggiunti servizi, PATH/registro o avvio automatico.\",\n installingCloudflared: \"Installazione del componente cloudflared ufficiale. Mantieni DSH in esecuzione fino al termine.\",\n purgeCloudflared: \"Rimuovi completamente il componente cloudflared\",\n purgeCloudflaredConfirm: \"Rimuovere completamente il componente cloudflared e i log runtime dalla directory privata DSH Mobile? Rete locale, dati DSH e altri programmi non sono interessati.\",\n purgingCloudflared: \"Arresto del canale e rimozione dei file cloudflared gestiti da DSH Mobile…\",\n switchingCloudflared: \"Passaggio a cloudflared…\",\n reconnectingCloudflared: \"Riconnessione di cloudflared…\",\n remoteUnavailableCloudflared: \"cloudflared non è installato.\",\n remoteStartingCloudflared: \"Avvio del connettore cloudflared…\",\n remoteConnectingCloudflared: \"Avvio del gateway di autenticazione DSH…\",\n resetCloudflaredConfirm: \"Disattivare il canale remoto cloudflared e rimuovere tutti i dispositivi remoti? Il componente installato e la configurazione della rete locale restano invariati.\",\n cloudflaredMissing: \"Il componente cloudflared ufficiale non è installato. Completa i passaggi sopra.\",\n cloudflaredInvalid: \"Verifica del componente cloudflared non riuscita. Rimuovilo completamente e reinstallalo.\",\n cloudflaredPortUnavailable: \"Impossibile assegnare una porta locale al gateway remoto. Riprova.\",\n cloudflaredLaunchFailed: \"Il client cloudflared non è stato avviato.\",\n cloudflaredTimeout: \"Timeout in attesa che il tunnel diventi raggiungibile. Riconnettiti.\",\n cloudflaredStopped: \"La connessione cloudflared è stata arrestata.\",\n cloudflaredExited: \"La connessione cloudflared è terminata in modo imprevisto. Riconnettiti.\",\n cloudflaredOutputInvalid: \"cloudflared ha restituito uno stato non riconosciuto.\",\n cloudflaredOriginInvalid: \"L’indirizzo pubblico restituito da cloudflared non ha superato la verifica.\",\n cloudflaredComponentUnsupported: \"Questa build non può eseguire il componente cloudflared.\",\n cloudflaredDownloadHashMismatch: \"Il cloudflared scaricato non ha superato la verifica SHA-256. Riprova l’installazione.\",\n cloudflaredDownloadSizeMismatch: \"Il cloudflared scaricato non ha la dimensione prevista. Riprova l’installazione.\",\n cloudflaredDownloadRedirectMissing: \"La pagina di download non reindirizza più all’asset della release. Riprova più tardi o installa manualmente dalla pagina ufficiale.\",\n cloudflaredDownloadRedirectInvalid: \"Il reindirizzamento di download non puntava a un asset di release GitHub ed è stato rifiutato.\",\n cloudflaredDownloadRedirectRejected: \"Il reindirizzamento di download è stato rifiutato dalle regole. Riprova più tardi o installa manualmente dalla pagina ufficiale.\",\n cloudflaredExecutableHashMismatch: \"Il cloudflared installato non corrisponde più alla build verificata. Rimuovilo completamente e reinstalla.\",\n cloudflaredPortReservationFailed: \"Impossibile riservare una porta locale per il tunnel. Riprova.\",\n cloudflaredTunnelTargetInvalid: \"La configurazione salvata del tunnel non è un file regolare. Rimuovila e salva di nuovo le impostazioni.\",\n cloudflaredTunnelSaving: \"Salvataggio delle impostazioni e riconnessione di cloudflared…\",\n cloudflaredTunnelForgetting: \"Rimozione del token del tunnel salvato…\",\n cloudflaredTunnelTitle: \"Tipo di tunnel\",\n cloudflaredTunnelQuick: \"Rapido\",\n cloudflaredTunnelNamed: \"Con nome\",\n cloudflaredTunnelQuickHint: \"Senza account: cloudflared assegna un indirizzo casuale a ogni avvio.\",\n cloudflaredTunnelNamedHint: \"Usa il token di un account Cloudflare e mantiene un indirizzo stabile tra i riavvii.\",\n cloudflaredTunnelHostname: \"Hostname pubblico\",\n cloudflaredTunnelHostnamePlaceholder: \"dsh.example.com\",\n cloudflaredTunnelPort: \"Porta di inoltro locale\",\n cloudflaredTunnelToken: \"Token del connettore\",\n cloudflaredTunnelTokenPlaceholder: \"Incolla il token del tunnel dalla dashboard Cloudflare\",\n cloudflaredTunnelTokenSaved: \"Un token è salvato. Lascia vuoto per mantenerlo.\",\n cloudflaredTunnelSave: \"Salva e connetti\",\n cloudflaredTunnelSaveQuick: \"Passa a un tunnel rapido\",\n cloudflaredTunnelConfigured: \"Tunnel con nome configurato: {hostname} raggiunge questo computer su 127.0.0.1:{port}.\",\n cloudflaredTunnelMissing: \"Nessun tunnel con nome configurato.\",\n cloudflaredTunnelHint: \"Nella dashboard Cloudflare crea un tunnel e imposta il suo hostname pubblico su http://127.0.0.1:{port}. Il token è salvato solo nella directory privata DSH Mobile e non viene più mostrato dopo il salvataggio.\",\n cloudflaredTunnelForget: \"Rimuovi il token salvato\",\n cloudflaredTunnelForgetConfirm: \"Rimuovere il token salvato, arrestare il canale cloudflared e tornare a un tunnel rapido? Nulla si riconnette da solo: riattiva il canale in seguito. Il tunnel resta nel tuo account Cloudflare e il suo hostname pubblico non cambia.\",\n cloudflaredTunnelInvalid: \"La configurazione salvata del tunnel con nome non è leggibile; il provider usa un tunnel rapido. Salva di nuovo le impostazioni.\",\n cloudflaredTunnelPortUnavailable: \"La porta di inoltro locale configurata non è disponibile. Cloudflare instrada l’hostname pubblico esattamente su quella porta: liberala o scegline un’altra.\",\n cloudflaredTunnelHostnameInvalid: \"Inserisci un hostname pubblico sotto un dominio di questo account Cloudflare, ad esempio dsh.example.com.\",\n cloudflaredTunnelPortInvalid: \"Inserisci una porta di inoltro tra 1024 e 65535.\",\n cloudflaredTunnelPortReserved: \"La porta 3443 è riservata al gateway LAN di DSH Mobile ed è sempre occupata. Scegli un’altra porta, ad esempio 3444 o 3445.\",\n cloudflaredTunnelTokenInvalid: \"Non sembra un token di tunnel. Copia il token completo dalla dashboard Cloudflare.\",\n cloudflaredTunnelSettingsInvalid: \"Le impostazioni del tunnel sono state rifiutate.\",\n cloudflaredTunnelConfigMissing: \"Inserisci token, hostname e porta per usare un tunnel con nome.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n cloudflaredBadge: \"账号可选\",\n cloudflaredDescription: \"按需安装官方 cloudflared 客户端。快速隧道无需账号,提供临时公网地址;命名隧道使用 Cloudflare 账号令牌,地址固定、重启不变。\",\n prepareCloudflared: \"准备 cloudflared\",\n cloudflaredUnsupported: \"当前仅支持 Windows x64。你仍可选择内置的 Tailscale Funnel。\",\n cloudflaredNotInstalled: \"尚未安装。只有点击下方按钮后,才会从 cloudflared 官方发布页下载固定版本。\",\n cloudflaredReady: \"官方组件 {version} 已就绪。\",\n cloudflaredQuickNote: \"快速隧道:无需 Cloudflare 账号,但官方定位是测试用途 —— 地址随机、有限流、无可用性保证。请勿用于必须长期可达的访问。\",\n cloudflaredNamedNote: \"命名隧道:上面的公网域名重启后不变,由 Cloudflare 转发到本机转发端口。连接器令牌只保存在 DSH Mobile 私有目录,经环境变量而非命令行传给 cloudflared,保存后不再显示。\",\n cloudflaredComponentNote: \"仅在你点击安装后从 cloudflared 官方发布页下载并校验固定版本,且启动时关闭自动更新。不会写入系统服务、开机启动、注册表或 PATH。\",\n installConfirmCloudflared: \"将从 cloudflared 官方发布页下载并校验固定版本({size}),仅保存到 DSH Mobile 私有目录。不会安装系统服务、写入 PATH/注册表或设置开机启动。是否继续?\",\n installingCloudflared: \"正在安装 cloudflared 官方组件。完成前请保持 DSH 运行。\",\n purgeCloudflared: \"彻底移除 cloudflared 组件\",\n purgeCloudflaredConfirm: \"彻底移除 DSH Mobile 私有目录中的 cloudflared 组件和运行日志?不会影响局域网、DSH 数据或系统中的其他程序。\",\n purgingCloudflared: \"正在关闭通道并清理 DSH Mobile 管理的 cloudflared 文件…\",\n switchingCloudflared: \"正在切换到 cloudflared…\",\n reconnectingCloudflared: \"正在重连 cloudflared…\",\n remoteUnavailableCloudflared: \"cloudflared 尚未安装。\",\n remoteStartingCloudflared: \"正在启动 cloudflared 连接器…\",\n remoteConnectingCloudflared: \"正在启动 DSH 认证网关…\",\n resetCloudflaredConfirm: \"关闭 cloudflared 远程通道并移除所有远程配对设备?已安装组件与局域网配置保持不变。\",\n cloudflaredMissing: \"cloudflared 官方组件尚未安装。请先完成上方准备步骤。\",\n cloudflaredInvalid: \"cloudflared 组件校验失败。请彻底移除后重新安装。\",\n cloudflaredPortUnavailable: \"无法分配本机远程网关端口,请重试。\",\n cloudflaredLaunchFailed: \"cloudflared 客户端未能启动。\",\n cloudflaredTimeout: \"等待隧道可用超时,请重新连接。\",\n cloudflaredStopped: \"cloudflared 连接已停止。\",\n cloudflaredExited: \"cloudflared 连接意外退出,请重新连接。\",\n cloudflaredOutputInvalid: \"cloudflared 返回了无法识别的状态。\",\n cloudflaredOriginInvalid: \"cloudflared 返回的公网地址未通过校验。\",\n cloudflaredComponentUnsupported: \"当前构建无法运行 cloudflared 组件。\",\n cloudflaredDownloadHashMismatch: \"下载的 cloudflared 未通过 SHA-256 校验。请重新安装。\",\n cloudflaredDownloadSizeMismatch: \"下载的 cloudflared 体积与固定版本不符。请重新安装。\",\n cloudflaredDownloadRedirectMissing: \"下载页不再跳转到发布资源。请稍后重试,或按官方页面手动安装。\",\n cloudflaredDownloadRedirectInvalid: \"下载跳转的目标不是 GitHub 发布资源,已被拒绝。\",\n cloudflaredDownloadRedirectRejected: \"下载跳转未通过校验规则。请稍后重试,或按官方页面手动安装。\",\n cloudflaredExecutableHashMismatch: \"已安装的 cloudflared 与校验过的版本不一致。请彻底移除后重新安装。\",\n cloudflaredPortReservationFailed: \"无法为隧道预留本机端口,请重试。\",\n cloudflaredTunnelTargetInvalid: \"已保存的隧道配置不是普通文件。请移除后重新保存设置。\",\n cloudflaredTunnelSaving: \"正在保存隧道设置并重新连接 cloudflared…\",\n cloudflaredTunnelForgetting: \"正在移除已保存的隧道令牌…\",\n cloudflaredTunnelTitle: \"隧道类型\",\n cloudflaredTunnelQuick: \"快速隧道\",\n cloudflaredTunnelNamed: \"命名隧道\",\n cloudflaredTunnelQuickHint: \"无需账号:每次启动由 cloudflared 随机分配地址。\",\n cloudflaredTunnelNamedHint: \"使用 Cloudflare 账号令牌,地址固定,重启后仍然有效。\",\n cloudflaredTunnelHostname: \"公网域名\",\n cloudflaredTunnelHostnamePlaceholder: \"dsh.example.com\",\n cloudflaredTunnelPort: \"本机转发端口\",\n cloudflaredTunnelToken: \"连接器令牌\",\n cloudflaredTunnelTokenPlaceholder: \"粘贴 Cloudflare 控制台里的隧道令牌\",\n cloudflaredTunnelTokenSaved: \"已保存令牌,留空表示不更改。\",\n cloudflaredTunnelSave: \"保存并连接\",\n cloudflaredTunnelSaveQuick: \"切换到快速隧道\",\n cloudflaredTunnelConfigured: \"命名隧道已配置:{hostname} 将转发到本机 127.0.0.1:{port}。\",\n cloudflaredTunnelMissing: \"尚未配置命名隧道。\",\n cloudflaredTunnelHint: \"先在 Cloudflare 控制台创建隧道,并把它的公开主机名指向 http://127.0.0.1:{port}。令牌只保存在 DSH Mobile 私有目录,保存后不会再显示。\",\n cloudflaredTunnelForget: \"移除已保存的令牌\",\n cloudflaredTunnelForgetConfirm: \"移除已保存的隧道令牌、停止 cloudflared 通道并改回快速隧道?不会自动重连,之后需要手动重新打开开关。Cloudflare 账号里的隧道本身仍在,公开主机名也不会改变。\",\n cloudflaredTunnelInvalid: \"已保存的命名隧道配置无法读取,当前按快速隧道运行。请重新保存设置。\",\n cloudflaredTunnelPortUnavailable: \"配置的本机转发端口不可用。Cloudflare 把公开主机名固定转发到该端口,请释放它或换一个端口。\",\n cloudflaredTunnelHostnameInvalid: \"请填写本 Cloudflare 账号下某个域名的公开主机名,例如 dsh.example.com。\",\n cloudflaredTunnelPortInvalid: \"请填写 1024 到 65535 之间的转发端口。\",\n cloudflaredTunnelPortReserved: \"3443 已留给 DSH Mobile 局域网网关,且始终被占用。请换一个端口,例如 3444 或 3445。\",\n cloudflaredTunnelTokenInvalid: \"这不像是一个隧道令牌。请从 Cloudflare 控制台完整复制令牌。\",\n cloudflaredTunnelSettingsInvalid: \"隧道设置未通过校验。\",\n cloudflaredTunnelConfigMissing: \"使用命名隧道需要同时填写令牌、公网域名和端口。\",\n})\n\nexport const DIAGNOSTIC_REASON_MESSAGES = {\n en: {\n 'lan-setup-required': ['Local network setup has not been completed.', 'Return to Local network and choose a network to finish setup.'],\n 'versions-current': ['Installed plugin, DSH, and minimum Android app versions are shown.', ''],\n 'network-unavailable': ['The saved local network adapter is unavailable.', 'Run dsh-mobile setup again.'],\n 'network-interface': ['Using network interface {interfaceName}.', ''],\n 'network-fixed': ['A fixed local network configuration is in use.', ''],\n 'lan-ready': ['The local gateway is listening at {endpointSuffix}; pairing is available.', ''],\n 'lan-off': ['Local network access is currently off.', 'Enable local network access when the phone must connect directly.'],\n 'firewall-ready': ['Local TCP and discovery firewall rules are enabled.', ''],\n 'firewall-missing': ['The complete local network firewall rules were not found.', 'Run dsh-mobile setup as administrator and check the firewall rules.'],\n 'firewall-unknown': ['The system did not allow the plugin to read firewall status.', 'If the phone cannot find this computer, run setup as administrator.'],\n 'remote-off': ['Remote access through {provider} is currently off.', ''],\n 'remote-origin-ready': ['The private HTTP backend is listening; public HTTPS is not verified.', 'Verify your reverse proxy, public certificate, external Host including port, and WebSocket access from your phone. Keep the HTTP backend private.'],\n 'remote-ready': ['{provider} endpoint {endpointSuffix} is reachable in about {latencyMs} ms.', ''],\n 'remote-rate-limited': ['{provider} endpoint {endpointSuffix} is reachable, but this check observed rate limiting.', 'Try again later; older sessions load on demand to reduce traffic.'],\n 'remote-fake-ip': ['The Tailscale address is intercepted by the current VPN or DNS proxy, so TLS was not established.', 'Switch VPN node or proxy mode; if it still fails, use cpolar.'],\n 'remote-unreachable': ['{provider} reports ready, but endpoint {endpointSuffix} is not reachable.', 'Reconnect, then check the provider status if it still fails.'],\n 'remote-needs-login': ['Tailscale is waiting for login to finish.', 'Return to Remote access and continue login.'],\n 'remote-connecting': ['The {provider} remote channel is still connecting.', 'Wait briefly, then check again.'],\n 'remote-controller-error': ['The {provider} controller reported {controllerCode}.', 'Return to Remote access and reconnect.'],\n 'phone-network-unknown': ['The computer cannot determine whether the router isolates the phone.', 'Confirm the phone and computer use the same network, then disable guest-network or AP isolation.'],\n },\n it: {\n 'lan-setup-required': ['La configurazione della rete locale non è completa.', 'Torna a Rete locale e scegli una rete per completare la configurazione.'],\n 'versions-current': ['Sono indicate le versioni installate di plugin e DSH e la versione minima dell’app Android.', ''],\n 'network-unavailable': ['La scheda di rete locale salvata non è disponibile.', 'Esegui di nuovo dsh-mobile setup.'],\n 'network-interface': ['È in uso l’interfaccia di rete {interfaceName}.', ''],\n 'network-fixed': ['È in uso una configurazione di rete locale fissa.', ''],\n 'lan-ready': ['Il gateway locale è in ascolto su {endpointSuffix}; l’abbinamento è disponibile.', ''],\n 'lan-off': ['L’accesso dalla rete locale è disattivato.', 'Attiva l’accesso locale quando il telefono deve collegarsi direttamente.'],\n 'firewall-ready': ['Le regole firewall TCP locale e di rilevamento sono attive.', ''],\n 'firewall-missing': ['Le regole firewall complete per la rete locale non sono state trovate.', 'Esegui dsh-mobile setup come amministratore e controlla le regole firewall.'],\n 'firewall-unknown': ['Il sistema non ha consentito al plugin di leggere lo stato del firewall.', 'Se il telefono non trova il computer, esegui setup come amministratore.'],\n 'remote-off': ['L’accesso remoto tramite {provider} è disattivato.', ''],\n 'remote-origin-ready': ['Il backend HTTP privato è in ascolto; HTTPS pubblico non è verificato.', 'Verifica dal telefono reverse proxy, certificato pubblico, Host esterno inclusa la porta e accesso WebSocket. Mantieni privato il backend HTTP.'],\n 'remote-ready': ['L’endpoint {provider} {endpointSuffix} è raggiungibile in circa {latencyMs} ms.', ''],\n 'remote-rate-limited': ['L’endpoint {provider} {endpointSuffix} è raggiungibile, ma il controllo ha rilevato una limitazione temporanea.', 'Riprova più tardi; le sessioni precedenti vengono caricate su richiesta per ridurre il traffico.'],\n 'remote-fake-ip': ['L’indirizzo Tailscale è intercettato dalla VPN o dal proxy DNS corrente e TLS non è stato stabilito.', 'Cambia nodo VPN o modalità proxy; se il problema continua, usa cpolar.'],\n 'remote-unreachable': ['{provider} risulta pronto, ma l’endpoint {endpointSuffix} non è raggiungibile.', 'Riconnettiti; se il problema continua, controlla lo stato del provider.'],\n 'remote-needs-login': ['Tailscale attende il completamento dell’accesso.', 'Torna ad Accesso remoto e continua l’accesso.'],\n 'remote-connecting': ['Il canale remoto {provider} è ancora in connessione.', 'Attendi qualche istante e ripeti il controllo.'],\n 'remote-controller-error': ['Il controller {provider} ha segnalato {controllerCode}.', 'Torna ad Accesso remoto e riconnettiti.'],\n 'phone-network-unknown': ['Il computer non può stabilire se il router isola il telefono.', 'Verifica che telefono e computer usino la stessa rete, poi disattiva rete ospiti o isolamento AP.'],\n },\n zh: {\n 'lan-setup-required': ['尚未完成局域网初始化。', '返回局域网页选择网卡并完成配置。'],\n 'versions-current': ['已显示插件、DSH 和 Android App 最低版本。', ''],\n 'network-unavailable': ['已保存的局域网网卡当前不可用。', '重新运行 dsh-mobile setup。'],\n 'network-interface': ['正在使用网卡 {interfaceName}。', ''],\n 'network-fixed': ['当前使用固定局域网配置。', ''],\n 'lan-ready': ['局域网网关正在监听 {endpointSuffix},配对入口可用。', ''],\n 'lan-off': ['局域网访问当前未开启。', '手机需要直连时开启局域网访问。'],\n 'firewall-ready': ['局域网 TCP 与发现防火墙规则已启用。', ''],\n 'firewall-missing': ['未找到完整的局域网防火墙规则。', '以管理员身份运行 dsh-mobile setup 并检查防火墙规则。'],\n 'firewall-unknown': ['系统未允许插件读取防火墙状态。', '若手机找不到电脑,请以管理员身份运行 setup。'],\n 'remote-off': ['{provider} 远程访问当前未启用。', ''],\n 'remote-origin-ready': ['私有 HTTP 后端已监听;尚未验证公网 HTTPS。', '请用手机核对反向代理、公网证书、含端口的外部 Host 及 WebSocket 访问。HTTP 后端必须留在私网。'],\n 'remote-ready': ['{provider} 端点 {endpointSuffix} 可达,往返约 {latencyMs} ms。', ''],\n 'remote-rate-limited': ['{provider} 端点 {endpointSuffix} 可达,但本次检查观察到服务限流。', '稍后重试;旧会话会按需加载以减少流量。'],\n 'remote-fake-ip': ['Tailscale 地址被当前 VPN 或 DNS 代理接管,TLS 链路未建立。', '切换 VPN 节点或代理模式;仍失败时改用 cpolar。'],\n 'remote-unreachable': ['{provider} 显示已就绪,但端点 {endpointSuffix} 暂不可达。', '点击重新连接;仍失败时检查提供方状态。'],\n 'remote-needs-login': ['Tailscale 正在等待完成登录。', '返回远程访问并继续登录。'],\n 'remote-connecting': ['{provider} 远程通道仍在连接。', '等待片刻后重新检查。'],\n 'remote-controller-error': ['{provider} 控制器报告 {controllerCode}。', '返回远程访问并重新连接。'],\n 'phone-network-unknown': ['电脑无法判断路由器是否隔离了手机。', '确认手机与电脑使用同一网络,并关闭访客网络或 AP 隔离。'],\n },\n} as const\n","/** Loopback-only HTTP vhost port used between Caddy and frps. */\nexport const FRP_VHOST_HTTP_PORT = 7080\n\n/** Caddy snippet owned entirely by DSH Mobile; the main Caddyfile only imports it. */\nexport const FRP_CADDY_SNIPPET_PATH = '/etc/caddy/dsh-mobile-dsh.caddy'\n\n/** First line of the owned snippet; also the legacy whole-file marker. */\nexport const FRP_CADDY_SNIPPET_MARKER = '# Managed by DSH Mobile - snippet, safe to delete'\n\n/** Exact line the main Caddyfile must contain (uncommented) for the site to load. */\nexport const FRP_CADDY_IMPORT_LINE = `import ${FRP_CADDY_SNIPPET_PATH}`\n\n/** Directory holding the public-IPv4 certificates installed by certbot. */\nexport const FRP_CADDY_IP_CERT_DIR = '/var/lib/caddy/dsh-mobile-certs'\n\nfunction publicIpv4Address(value: string): boolean {\n const parts = value.split('.')\n return parts.length === 4 && parts.every(part => /^(?:0|[1-9][0-9]{0,2})$/u.test(part)\n && Number(part) <= 255)\n}\n\nfunction publicDnsHostname(value: string): boolean {\n return value.length <= 253 && value.includes('.') && !/^[0-9.]+$/u.test(value)\n && !value.includes(':') && value.split('.').every(label => label.length >= 1 && label.length <= 63\n && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/u.test(label))\n}\n\nfunction parsePublicOrigin(publicOrigin: string): string {\n let url: URL\n try { url = new URL(publicOrigin) } catch { throw new Error('frp_template_input_invalid') }\n if (url.protocol !== 'https:' || url.port !== '' || url.pathname !== '/' || url.search !== '' || url.hash !== ''\n || url.username !== '' || url.password !== '' || (!publicIpv4Address(url.hostname) && !publicDnsHostname(url.hostname))) {\n throw new Error('frp_template_input_invalid')\n }\n return url.hostname\n}\n\n/** Build the Caddy site for one public host (without markers or import wiring). */\nexport function createCaddySite(publicHost: string, certDir: string = FRP_CADDY_IP_CERT_DIR): string {\n if (publicIpv4Address(publicHost)) {\n return [\n '{',\n ` default_sni ${publicHost}`,\n '}',\n '',\n `http://${publicHost} {`,\n ` redir https://${publicHost}{uri} permanent`,\n '}',\n '',\n `https://${publicHost} {`,\n ` tls ${certDir}/fullchain.pem ${certDir}/privkey.pem`,\n ` reverse_proxy 127.0.0.1:${String(FRP_VHOST_HTTP_PORT)}`,\n '}',\n '',\n ].join('\\n')\n }\n if (!publicDnsHostname(publicHost)) throw new Error('frp_template_input_invalid')\n return [\n `${publicHost} {`,\n ` reverse_proxy 127.0.0.1:${String(FRP_VHOST_HTTP_PORT)}`,\n '}',\n '',\n ].join('\\n')\n}\n\n/** Manual certbot steps for a public-IPv4 origin (Caddy cannot issue IP certificates itself). */\nfunction manualIpCertificateGuide(publicHost: string): string {\n return [\n '# Public-IPv4 manual HTTPS: Caddy cannot issue IP certificates by itself.',\n '# On the VPS (Ubuntu/Debian, port 80 reachable from the internet), run once as root:',\n '# apt-get install -y python3-venv',\n '# python3 -m venv /opt/dsh-mobile/certbot-venv',\n \"# /opt/dsh-mobile/certbot-venv/bin/pip install 'certbot==5.8.0'\",\n '# systemctl stop caddy || true',\n `# /opt/dsh-mobile/certbot-venv/bin/certbot certonly --standalone --preferred-profile shortlived --ip-address ${publicHost} --agree-tos --register-unsafely-without-email --non-interactive --keep-until-expiring`,\n '# install -d -m 0750 -o caddy -g caddy /var/lib/caddy/dsh-mobile-certs',\n `# install -m 0640 -o caddy -g caddy /etc/letsencrypt/live/${publicHost}/fullchain.pem /var/lib/caddy/dsh-mobile-certs/fullchain.pem`,\n `# install -m 0640 -o caddy -g caddy /etc/letsencrypt/live/${publicHost}/privkey.pem /var/lib/caddy/dsh-mobile-certs/privkey.pem`,\n '# systemctl start caddy',\n '# The site below already references those paths. Certificates last about 6 days: re-run certonly before expiry.',\n '#',\n ].join('\\n')\n}\n\n/** Build the only supported frps config and Caddy snippet from validated user inputs. */\nexport function createRestrictedFrpServerTemplate(serverPort: number, token: string, publicOrigin: string): string {\n if (!Number.isSafeInteger(serverPort) || serverPort < 1 || serverPort > 65_535\n || token.length < 16 || token.length > 512 || /[\\s\\u0000-\\u001f\\u007f]/u.test(token)) {\n throw new Error('frp_template_input_invalid')\n }\n const publicHost = parsePublicOrigin(publicOrigin)\n const lines = [\n '# frps.toml — save as /etc/dsh-mobile/frps.toml, then start the frps service.',\n `bindPort = ${String(serverPort)}`,\n 'proxyBindAddr = \"127.0.0.1\"',\n `vhostHTTPPort = ${String(FRP_VHOST_HTTP_PORT)}`,\n 'auth.method = \"token\"',\n `auth.token = ${JSON.stringify(token)}`,\n '',\n `# Caddy — save the site below as ${FRP_CADDY_SNIPPET_PATH},`,\n '# then make sure your Caddyfile contains exactly this line at the TOP of the file',\n '# (create the file with just this line if needed; globals must precede sites):',\n `# ${FRP_CADDY_IMPORT_LINE}`,\n '# finally run: caddy validate --config /etc/caddy/Caddyfile && systemctl reload caddy',\n '# Uninstall later removes only this snippet file and the import line; your own Caddy content is kept.',\n `${FRP_CADDY_SNIPPET_MARKER}`,\n createCaddySite(publicHost).trimEnd(),\n '',\n ]\n if (publicIpv4Address(publicHost)) lines.push(manualIpCertificateGuide(publicHost), '')\n return lines.join('\\n')\n}\n","/** Task-completion notifications for the Android shell.\n *\n * The page cannot know a run \"finished\" from any single event, so completion\n * is defined conservatively: assistant activity was observed, then the\n * conversation stayed quiet for a bounded period with no pending input\n * question, while the page was hidden. Question cards, which unambiguously\n * wait for the user, notify immediately instead of waiting out the quiet\n * period. Everything here is pure except the clearly-marked DOM adapters so\n * the decision logic stays unit-testable under node.\n */\n\n/** How long the conversation must stay quiet before a run counts as done. */\nexport const TASK_NOTIFY_QUIET_MS = 90_000\n\n/**\n * Grace after a busy-to-idle transition before announcing completion.\n * Absorbs composer flicker between steps while still feeling immediate.\n */\nexport const TASK_NOTIFY_GRACE_MS = 10_000\n\n/**\n * Minimum continuous busy time for an instant announcement. A run that held\n * the composer this long is no flicker: announce at once instead of waiting\n * out the grace period.\n */\nexport const TASK_NOTIFY_MIN_BUSY_MS = 20_000\n\n/** Maximum quiet period worth waiting through before giving up on a run. */\nexport const TASK_NOTIFY_STALE_MS = 30 * 60_000\n\n/** Wire bounds mirrored by the Android notification policy. */\nexport const TASK_NOTIFY_LIMITS = Object.freeze({\n title: 80,\n body: 200,\n tag: 64,\n} as const)\n\nexport type TaskNotifyKind = 'done' | 'question'\n\nexport interface TaskNotifyTexts {\n readonly doneTitle: string\n readonly doneBody: string\n readonly questionTitle: string\n readonly questionBody: string\n}\n\nexport interface TaskNotifySnapshot {\n /** Result of document.hidden at evaluation time. */\n readonly pageHidden: boolean\n /** Whether a question or plan-review card currently waits for input. */\n readonly pendingQuestion: boolean\n /** Stable key of the waiting card, when the DOM exposes one. */\n readonly questionKey: string | undefined\n /** Best-effort session label for the notification body. */\n readonly sessionLabel: string\n /** Current composer busy flag; drives the completion transition. */\n readonly composerBusy: boolean\n}\n\nexport interface TaskNotifyEvent {\n readonly kind: TaskNotifyKind\n readonly title: string\n readonly body: string\n readonly tag: string\n}\n\nexport interface TaskNotifyOptions {\n readonly quietMs?: number\n readonly graceMs?: number\n readonly minBusyMs?: number\n readonly now?: () => number\n readonly format: (kind: TaskNotifyKind, sessionLabel: string) => { title: string; body: string }\n}\n\nconst MAX_SEEN_QUESTION_KEYS = 20\n\nfunction sanitizeTagFragment(value: string): string {\n return value.toLowerCase().replaceAll(/[^a-z0-9-]+/gu, '-').replaceAll(/^-+|-+$/gu, '').slice(0, TASK_NOTIFY_LIMITS.tag)\n}\n\n/** Stable per-turn tag so concurrent sessions keep separate notifications. */\nexport function taskCompletionTag(sessionId: string, turn: number): string {\n const suffix = sanitizeTagFragment(`${sessionId}-${String(turn)}`) || 'task'\n return `dsh-task-done-${suffix}`.slice(0, TASK_NOTIFY_LIMITS.tag)\n}\n\n/** Decide whether the current snapshot deserves a system notification. */\nexport class TaskNotifyTracker {\n private lastActivityAt: number | undefined\n private notifiedDoneAt: number | undefined\n private wasBusy = false\n private busySince: number | undefined\n private idleAnchoredAt: number | undefined\n private readonly seenQuestionKeys = new Set<string>()\n private readonly quietMs: number\n private readonly graceMs: number\n private readonly minBusyMs: number\n private readonly now: () => number\n private readonly format: (kind: TaskNotifyKind, sessionLabel: string) => { title: string; body: string }\n\n constructor(options: TaskNotifyOptions) {\n this.quietMs = options.quietMs ?? TASK_NOTIFY_QUIET_MS\n this.graceMs = options.graceMs ?? TASK_NOTIFY_GRACE_MS\n this.minBusyMs = options.minBusyMs ?? TASK_NOTIFY_MIN_BUSY_MS\n this.now = options.now ?? Date.now\n this.format = options.format\n }\n\n /** Record assistant-side activity; re-arms completion after a notification. */\n markActivity(): void {\n const now = this.now()\n this.lastActivityAt = now\n if (this.notifiedDoneAt !== undefined && this.notifiedDoneAt <= now) this.notifiedDoneAt = undefined\n }\n\n /**\n * Milliseconds until a pending completion anchor fires, or undefined when\n * no anchor exists. Lets the watcher schedule one exact timer instead of\n * waiting for the next coarse poll tick.\n */\n pendingAnchorDelayMs(): number | undefined {\n if (this.idleAnchoredAt === undefined) return undefined\n return Math.max(0, this.graceMs - (this.now() - this.idleAnchoredAt))\n }\n\n evaluate(snapshot: TaskNotifySnapshot): TaskNotifyEvent | undefined {\n const now = this.now()\n if (!this.wasBusy && snapshot.composerBusy) this.busySince = now\n if (this.wasBusy && !snapshot.composerBusy) {\n // The run just ended. A run that held the composer long enough is no\n // flicker: announce at once when hidden, unless a question card (which\n // has its own immediate path below) is already waiting.\n const busyFor = this.busySince === undefined ? 0 : now - this.busySince\n this.busySince = undefined\n if (snapshot.pageHidden && !snapshot.pendingQuestion && busyFor >= this.minBusyMs) {\n this.idleAnchoredAt = undefined\n this.notifiedDoneAt = now\n return this.event('done', snapshot.sessionLabel, undefined)\n }\n this.idleAnchoredAt = snapshot.pageHidden ? now : undefined\n if (!snapshot.pageHidden) this.notifiedDoneAt = now\n }\n this.wasBusy = snapshot.composerBusy\n if (snapshot.composerBusy) {\n this.idleAnchoredAt = undefined\n } else if (this.idleAnchoredAt !== undefined && !snapshot.pageHidden) {\n // Came back before the grace elapsed: treat the ending as seen.\n this.idleAnchoredAt = undefined\n this.notifiedDoneAt = now\n }\n if (!snapshot.pageHidden) {\n if (snapshot.pendingQuestion && snapshot.questionKey !== undefined) this.rememberQuestionKey(snapshot.questionKey)\n return undefined\n }\n if (snapshot.pendingQuestion) {\n if (snapshot.questionKey === undefined || this.seenQuestionKeys.has(snapshot.questionKey)) return undefined\n this.rememberQuestionKey(snapshot.questionKey)\n return this.event('question', snapshot.sessionLabel, snapshot.questionKey)\n }\n // Completion: the anchored transition announces fast; the quiet period\n // remains as the fallback for activity without a busy signal.\n if (this.idleAnchoredAt !== undefined) {\n if (now - this.idleAnchoredAt < this.graceMs) return undefined\n this.idleAnchoredAt = undefined\n this.notifiedDoneAt = now\n return this.event('done', snapshot.sessionLabel, undefined)\n }\n if (this.lastActivityAt === undefined) return undefined\n if (now - this.lastActivityAt < this.quietMs) return undefined\n if (now - this.lastActivityAt > TASK_NOTIFY_STALE_MS) {\n // Activity too old to attribute: drop it instead of announcing a stale run.\n this.lastActivityAt = undefined\n return undefined\n }\n if (this.notifiedDoneAt !== undefined && this.notifiedDoneAt >= this.lastActivityAt) return undefined\n this.notifiedDoneAt = now\n return this.event('done', snapshot.sessionLabel, undefined)\n }\n\n private rememberQuestionKey(key: string): void {\n this.seenQuestionKeys.add(key)\n if (this.seenQuestionKeys.size > MAX_SEEN_QUESTION_KEYS) {\n const oldest = this.seenQuestionKeys.values().next()\n if (!oldest.done) this.seenQuestionKeys.delete(oldest.value)\n }\n }\n\n private event(kind: TaskNotifyKind, sessionLabel: string, questionKey: string | undefined): TaskNotifyEvent {\n const text = this.format(kind, sessionLabel)\n const tag = kind === 'question' && questionKey !== undefined\n ? `dsh-task-question-${sanitizeTagFragment(questionKey) || 'pending'}`\n : 'dsh-task-done'\n return Object.freeze({ kind, title: text.title, body: text.body, tag })\n }\n}\n\ninterface ComposerProbe {\n getAttribute?: (name: string) => string | null\n querySelector?: (selectors: string) => {\n disabled?: boolean\n readOnly?: boolean\n getAttribute?: (name: string) => string | null\n } | null\n}\n\n/**\n * Mirror of the composer busy signal used for media actions: the run is busy\n * while the composer is aria-busy, disabled, read-only, or non-interactive.\n */\nexport function readComposerBusyState(root: ParentNode): boolean {\n if (typeof root.querySelector !== 'function') return false\n const card = root.querySelector('[data-composer-card]') as ComposerProbe | null\n if (card === null || typeof card.getAttribute !== 'function' || typeof card.querySelector !== 'function') return false\n if (card.getAttribute('aria-busy') === 'true') return true\n const field = card.querySelector('textarea,input,[contenteditable=\"true\"],[contenteditable=\"plaintext-only\"]')\n if (field === null) return false\n return field.disabled === true || field.readOnly === true || field.getAttribute?.('aria-disabled') === 'true'\n}\n\n/**\n * Best-effort session label for the notification body, bounded for the wire.\n * Callers accept that titles may name the active session on the lock screen.\n */\nexport function readSessionLabel(title: unknown): string {\n if (typeof title !== 'string') return ''\n return title.normalize('NFC').replace(/[\\u0000-\\u001f\\u007f]+/gu, ' ').trim().slice(0, 80)\n}\n\n/** Whether the document currently shows a card that waits for user input. */\nexport function hasPendingInputQuestion(root: ParentNode): boolean { if (typeof root.querySelector !== 'function') return false\n return root.querySelector('[data-question-key],[data-plan-review-key]') !== null\n}\n\n/** Stable key of the waiting input card, when the DOM exposes one. */\nexport function pendingInputQuestionKey(root: ParentNode): string | undefined {\n if (typeof root.querySelector !== 'function') return undefined\n const card = root.querySelector('[data-question-key],[data-plan-review-key]') as {\n getAttribute?: (name: string) => string | null\n } | null\n const getAttribute = card?.getAttribute\n if (typeof getAttribute !== 'function') return undefined\n const key = getAttribute.call(card, 'data-question-key') ?? getAttribute.call(card, 'data-plan-review-key')\n if (key === null || key === '') return undefined\n return key\n}\n\n/** Observe assistant-side conversation mutations; returns a disposer. */\nexport function observeTaskActivity(\n target: Node,\n onActivity: () => void,\n observe: typeof MutationObserver | undefined = typeof MutationObserver === 'function' ? MutationObserver : undefined,\n): () => void {\n if (observe === undefined) return () => undefined\n const observer = new observe(() => { onActivity() })\n try {\n observer.observe(target, { childList: true, characterData: true, subtree: true })\n } catch {\n return () => undefined\n }\n return () => { observer.disconnect() }\n}\n\nexport interface TaskWatcherLabels {\n readonly label: (kind: TaskNotifyKind, sessionLabel: string) => { title: string; body: string }\n /** Legacy DOM-only completion inference. Current gateways provide exact Host events. */\n readonly completionFallback?: boolean\n}\n\ninterface NativeBridgeHandle {\n capabilities(): Promise<readonly string[]>\n invoke(action: string, input?: unknown): Promise<unknown>\n}\n\nfunction readNativeBridge(): NativeBridgeHandle | undefined {\n if (typeof window === 'undefined') return undefined\n const bridge = (window as unknown as { __DSH_MOBILE_NATIVE__?: NativeBridgeHandle }).__DSH_MOBILE_NATIVE__\n if (bridge === undefined || typeof bridge.capabilities !== 'function' || typeof bridge.invoke !== 'function') return undefined\n return bridge\n}\n\nexport interface TaskNotifyWireEvent {\n readonly kind: TaskNotifyKind\n readonly title: string\n readonly body: string\n readonly tag: string\n}\n\n/** Parse a `task-notify` SSE payload; rejects anything malformed or empty. */\nexport function parseTaskNotifyPayload(value: unknown): { readonly sessionId: string; readonly turn: number } | undefined {\n let record: Record<string, unknown> | undefined\n if (typeof value === 'string') {\n try {\n const parsed: unknown = JSON.parse(value)\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) return undefined\n record = parsed as Record<string, unknown>\n } catch {\n return undefined\n }\n } else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {\n record = value as Record<string, unknown>\n } else return undefined\n if (typeof record.sessionId !== 'string' || record.sessionId.trim() === '') return undefined\n const turn = typeof record.turn === 'number' && Number.isSafeInteger(record.turn) && record.turn >= 0 ? record.turn : 0\n return Object.freeze({ sessionId: record.sessionId.slice(0, 128), turn })\n}\n\n/** Parse the small authenticated event used when the Host revokes this device. */\nexport function isDeviceRevokedPayload(value: unknown): boolean {\n let record: Record<string, unknown> | undefined\n if (typeof value === 'string') {\n try {\n const parsed: unknown = JSON.parse(value)\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) return false\n record = parsed as Record<string, unknown>\n } catch {\n return false\n }\n } else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {\n record = value as Record<string, unknown>\n } else return false\n return record.reason === 'device_revoked'\n}\n\n/** Tell the Android shell to transition the active record to the revoked state. */\nexport function fireDeviceRevoked(): boolean {\n const bridge = readNativeBridge()\n if (bridge === undefined) return false\n void bridge.invoke('device.revoked', {}).catch(() => undefined)\n return true\n}\n\n/**\n * Deliver one notification through the native bridge when available.\n * Returns false when there is no bridge (desktop browsers keep their own\n * UI) so callers can fall back; a denial flips the module sticky flag via\n * onDenied for the session-lifetime nag guard.\n */\nexport function fireTaskNotifyEvent(\n event: TaskNotifyWireEvent,\n onDenied?: () => void,\n): boolean {\n const bridge = readNativeBridge()\n if (bridge === undefined) return false\n void Promise.resolve()\n .then(() => bridge.capabilities())\n .then(capabilities => {\n if (!capabilities.includes('notification.notify')) return\n return bridge.invoke('notification.notify', { title: event.title, body: event.body, tag: event.tag })\n })\n .then(\n () => undefined,\n (error: unknown) => {\n const code = typeof error === 'object' && error !== null && 'code' in error ? String(error.code) : ''\n // A denial is sticky for this page load: never nag for permission.\n if ((code === 'permission_denied' || code === 'denied') && onDenied !== undefined) onDenied()\n },\n )\n return true\n}\n\n/**\n * Watch the rendered conversation for finished runs and waiting questions,\n * notifying through the native bridge while the page is hidden. Returns a\n * disposer. Silent when no native bridge exists (desktop browsers keep their\n * own UI) or after the user denies the permission.\n */\nexport function installTaskCompletionWatcher(options: TaskWatcherLabels): () => void {\n if (typeof document === 'undefined' || typeof window === 'undefined') return () => undefined\n const tracker = new TaskNotifyTracker({ format: options.label })\n const completionFallback = options.completionFallback ?? true\n let notifyBlocked = false\n let timer = 0\n let anchorTimer = 0\n\n const fire = (event: TaskNotifyEvent): void => {\n if (notifyBlocked) return\n if (!fireTaskNotifyEvent(event, () => { notifyBlocked = true })) return\n }\n const evaluateNow = (): void => {\n const busy = completionFallback && readComposerBusyState(document)\n const event = tracker.evaluate({\n pageHidden: document.hidden,\n pendingQuestion: hasPendingInputQuestion(document),\n questionKey: pendingInputQuestionKey(document),\n sessionLabel: readSessionLabel(document.title),\n composerBusy: busy,\n })\n if (event !== undefined) fire(event)\n scheduleAnchorTimer()\n }\n // The interval is only a backstop: an anchor schedules its own exact shot\n // so completion announces ~grace after the run ends instead of waiting out\n // the next coarse tick with no further mutations to wake it.\n const scheduleAnchorTimer = (): void => {\n const delay = tracker.pendingAnchorDelayMs()\n if (delay === undefined) {\n if (anchorTimer !== 0) {\n window.clearTimeout(anchorTimer)\n anchorTimer = 0\n }\n return\n }\n if (anchorTimer !== 0) return\n anchorTimer = window.setTimeout(() => {\n anchorTimer = 0\n evaluateNow()\n }, delay)\n }\n const disposeObservation = observeTaskActivity(document.documentElement, () => {\n if (completionFallback) tracker.markActivity()\n evaluateNow()\n })\n const onVisibility = (): void => { evaluateNow() }\n document.addEventListener('visibilitychange', onVisibility)\n if (typeof window.setInterval === 'function') {\n timer = window.setInterval(evaluateNow, 15_000)\n }\n evaluateNow()\n return () => {\n disposeObservation()\n document.removeEventListener('visibilitychange', onVisibility)\n if (timer !== 0) window.clearInterval(timer)\n if (anchorTimer !== 0) window.clearTimeout(anchorTimer)\n }\n}\n","/**\n * Viewport below which the injected chrome becomes an overlay drawer: the\n * sidebar slides in as a sheet, the right panel as a drawer, and the scrim dims\n * the page behind them. The stylesheet and the scrim's visibility both read\n * this query, so a wider viewport never grows drawer chrome whose rules cannot\n * style it.\n */\nimport { installTaskCompletionWatcher, type TaskNotifyKind } from './task-notify.js'\n\nexport const NATIVE_MOBILE_OVERLAY_QUERY = '(max-width:720px)'\n\n/** Mobile feature and compatibility rules applied to DSH React surfaces. */\nexport const NATIVE_MOBILE_STYLES = `\n/* The surface appends chrome to <body> on every non-loopback page load, but\n every rule that gives that chrome a box lives inside the overlay query\n below. Outside the query the scrim kept the UA button box: an empty,\n nameless button in normal flow at the document's bottom-left, whose click\n still collapsed the sidebar. Keep the neutral state explicitly invisible —\n the query restores the fixed scrim, and its more specific [hidden] rule\n keeps winning there. */\n .dsh-native-mobile-backdrop,.dsh-mobile-branch-toast,.dsh-mobile-media-toast { display:none; }\n .dsh-mobile-settings_row { display:flex; align-items:center; gap:8px; padding:16px 0; border-bottom:0.5px solid var(--dsw-alias-border-l2); }\n .dsh-mobile-settings_rowText { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; padding-right:48px; }\n .dsh-mobile-settings_title { color:var(--dsw-alias-label-primary); font-size:14px; font-weight:400; line-height:22px; }\n .dsh-mobile-settings_desc { color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:400; line-height:18px; }\n .dsh-mobile-settings_selector { display:inline-flex; align-items:center; justify-content:center; min-width:max-content; height:36px; padding:0 14px; border:0; border-radius:18px; background:var(--dsw-alias-bg-module-platform); color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; line-height:22px; cursor:pointer; }\n .dsh-mobile-settings_selector:hover:not(:disabled) { background:var(--dsw-alias-interactive-bg-hover); }\n .dsh-mobile-settings_selector:disabled { cursor:wait; opacity:.55; }\n@media ${NATIVE_MOBILE_OVERLAY_QUERY} {\n html.dsh-native-mobile-active,html.dsh-native-mobile-active body { width:100%; height:100%; overflow:hidden; }\n html.dsh-native-mobile-active { --dsh-mobile-motion-duration:200ms; --dsh-mobile-motion-ease:cubic-bezier(.22,1,.36,1); }\n html.dsh-native-mobile-active :is(a,button,[role=\"button\"],[role=\"tab\"],[tabindex]) { -webkit-tap-highlight-color:transparent; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [role=\"treeitem\"] { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }\n html.dsh-native-mobile-active[data-dsh-mobile-input=\"touch\"] :is(a,button,[role=\"button\"],[role=\"tab\"],[tabindex]):focus { outline:none !important; }\n html.dsh-native-mobile-active [role=\"tooltip\"] { display:none !important; }\n /* Touch has no persistent hover affordance: keep workspace rows neutral after a tap. */\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] { --dsw-alias-interactive-bg-hover:transparent !important; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [role=\"treeitem\"]:is(:hover,:active,:focus,[aria-selected=\"true\"]),\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_sessionRow\"][class*=\"_selected\"],\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_searchResultRow\"][class*=\"_selected\"] { background:transparent !important; outline:0 !important; box-shadow:none !important; }\n /* Sidebar row menus are hover-only on desktop. Touch has no hover, so keep\n the ellipsis action visible and give it a reliable hit target. */\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_rowActions\"] { display:inline-flex !important; align-items:center !important; gap:8px !important; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_sessionRow\"] [class*=\"_time\"] { display:none !important; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_rowActions\"] button { box-sizing:border-box !important; width:32px !important; min-width:32px !important; height:32px !important; min-height:32px !important; }\n [data-dsh-mobile-frame] { grid-template-columns:0 minmax(0,1fr) 0 !important; width:100% !important; height:100dvh !important; overflow:hidden !important; }\n [data-dsh-mobile-center] { grid-column:2 !important; width:100vw !important; min-width:0 !important; }\n [data-dsh-mobile-center] > * { min-width:0 !important; }\n [data-dsh-mobile-header] { box-sizing:border-box !important; width:calc(100% - 16px) !important; margin:0 8px !important; min-width:0; padding-top:max(4px,env(safe-area-inset-top)) !important; padding-right:8px !important; padding-left:42px !important; }\n [data-dsh-mobile-header] [class*=\"_titleRow\"] { box-sizing:border-box !important; display:flex !important; align-items:center !important; min-width:0; min-height:32px !important; height:32px !important; gap:6px !important; padding:0 6px !important; }\n [data-dsh-mobile-header] [class*=\"_titleCluster\"] { min-width:0; }\n [data-dsh-mobile-header] [class*=\"_crumbs\"] { min-width:0; overflow:hidden; }\n [data-dsh-mobile-header] [class*=\"_crumb\"] { max-width:46vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n [data-dsh-mobile-header] [class*=\"_headerActions\"] { min-width:0; overflow-x:auto; scrollbar-width:none; }\n [data-dsh-mobile-header] [class*=\"_headerActions\"]::-webkit-scrollbar { display:none; }\n [data-dsh-mobile-header] [class*=\"_headerUtilities\"] { gap:2px !important; }\n [data-dsh-mobile-header] [class*=\"_sessionLogButton\"] { width:40px; min-width:40px; padding:0 !important; overflow:hidden; color:transparent; font-size:0 !important; }\n [data-dsh-mobile-header] [class*=\"_sessionLogButton\"] > * { display:none !important; }\n [data-dsh-mobile-header] [class*=\"_sessionLogButton\"]::after { color:var(--dsw-alias-label-primary, #171a21); content:\"Log\"; font-size:11px; font-weight:600; }\n html[data-dsh-mobile-language=\"zh\"] [data-dsh-mobile-header] [class*=\"_sessionLogButton\"]::after { content:\"日志\"; }\n [data-dsh-mobile-header] [class*=\"_tabs\"] { box-sizing:border-box !important; width:max-content !important; max-width:calc(100% - 58px) !important; min-height:28px !important; height:28px !important; margin-top:0 !important; padding-left:6px !important; padding-right:6px !important; overflow-x:auto; scrollbar-width:none; }\n [data-dsh-mobile-header] [class*=\"_tab\"] { padding-bottom:5px !important; }\n [data-dsh-mobile-header] [class*=\"_tabs\"]::-webkit-scrollbar { display:none; }\n [data-dsh-mobile-sidebar] { position:fixed !important; z-index:240 !important; inset:0 auto 0 0 !important; width:0 !important; overflow:visible !important; }\n [data-dsh-mobile-sidebar-root] { position:fixed !important; z-index:241 !important; inset:max(env(safe-area-inset-top),0px) auto 0 0 !important; height:auto !important; transition:width 180ms var(--dsh-mobile-motion-ease),box-shadow 180ms ease !important; }\n [data-dsh-mobile-sidebar][data-open=\"true\"] [data-dsh-mobile-sidebar-root] { width:min(88vw,340px) !important; padding-top:0 !important; box-shadow:18px 0 46px rgb(15 23 42 / 18%); }\n [data-dsh-mobile-sidebar][data-open=\"true\"] [data-dsh-mobile-sidebar-root] [class*=\"_logoRow\"] { height:52px !important; padding:4px 0 4px 4px !important; margin-bottom:4px !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] { width:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; overflow:visible !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] > :not(:has([data-dsh-mobile-toggle])) { display:none !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] > :has([data-dsh-mobile-toggle]) { position:fixed !important; z-index:244 !important; top:env(safe-area-inset-top) !important; left:0 !important; box-sizing:border-box !important; width:50px !important; height:52px !important; padding:4px !important; border:0 !important; background:transparent !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] > :has([data-dsh-mobile-toggle]) > :not([data-dsh-mobile-toggle]) { display:none !important; }\n /* The stock settings shell is mounted under the collapsed sidebar. Let\n its fixed overlay escape the zero-width drawer while it is open. */\n [data-dsh-mobile-sidebar]:has([data-dsh-mobile-settings]) { width:100vw !important; inset:0 !important; }\n [data-dsh-mobile-sidebar]:has([data-dsh-mobile-settings]) > * { width:100vw !important; overflow:visible !important; }\n [data-dsh-mobile-toggle] { width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-toggle] > svg[class*=\"_railFish\"] { transform:translateY(-4px) !important; }\n .dsh-native-mobile-backdrop { display:block; position:fixed; z-index:235; inset:env(safe-area-inset-top) 0 0; border:0; background:rgb(15 23 42 / 32%); }\n .dsh-native-mobile-backdrop:not([hidden]) { animation:dsh-mobile-fade-in var(--dsh-mobile-motion-duration) ease-out; }\n .dsh-native-mobile-backdrop[hidden] { display:none; }\n [data-dsh-mobile-details] { position:fixed !important; z-index:250 !important; inset:0 0 0 auto !important; width:min(94vw,460px) !important; max-width:none !important; transform:translateX(100%); transition:transform var(--dsh-mobile-motion-duration) var(--dsh-mobile-motion-ease); background:var(--dsw-alias-bg-layer-1, #fff); box-shadow:-18px 0 46px rgb(15 23 42 / 18%); }\n [data-dsh-mobile-details][data-open=\"true\"] { transform:translateX(0); }\n [data-dsh-mobile-handle] { display:none !important; }\n [data-dsh-mobile-settings] { flex-direction:column !important; width:100vw !important; height:100dvh !important; max-width:none !important; border-radius:0 !important; animation:dsh-mobile-panel-in var(--dsh-mobile-motion-duration) var(--dsh-mobile-motion-ease); }\n [data-dsh-mobile-settings-nav] { flex:none !important; width:100% !important; padding:max(14px,env(safe-area-inset-top)) 12px 8px !important; gap:10px !important; border-bottom:1px solid var(--dsw-alias-border-l2,#e8ebef); }\n [data-dsh-mobile-settings-nav] [class*=\"_navTitle\"] { padding:0 8px !important; font-size:18px !important; line-height:28px !important; }\n [data-dsh-mobile-settings-list] { flex-direction:row !important; gap:4px !important; overflow-x:auto !important; scrollbar-width:none; }\n [data-dsh-mobile-settings-list]::-webkit-scrollbar { display:none; }\n [data-dsh-mobile-settings-list] [class*=\"_navCell\"] { flex:0 0 auto !important; min-width:max-content !important; height:44px !important; padding:10px 12px !important; }\n [data-dsh-mobile-settings-list] [aria-current=\"true\"] { border-color:transparent !important; outline:0 !important; box-shadow:none !important; }\n [data-dsh-mobile-settings-content] { flex:1 1 auto !important; width:100% !important; min-height:0 !important; }\n [data-dsh-mobile-settings-header] { height:48px !important; min-height:48px !important; padding:10px 12px 6px !important; }\n [data-dsh-mobile-settings-header] [class*=\"_close\"] { width:36px !important; height:36px !important; }\n [data-dsh-mobile-settings-options] { box-sizing:border-box !important; width:100% !important; padding:4px 16px max(24px,env(safe-area-inset-bottom)) !important; overflow-x:hidden !important; }\n [data-dsh-mobile-settings-options] > * { width:100% !important; min-width:0 !important; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] > [class*=\"_row\"] { flex-direction:column !important; align-items:stretch !important; gap:12px !important; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] [class*=\"_rowText\"] { width:100% !important; padding-right:0 !important; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] [class*=\"_selector\"] { box-sizing:border-box !important; align-self:flex-start !important; justify-content:space-between !important; min-width:0 !important; min-height:44px !important; max-width:100% !important; }\n [data-dsh-mobile-settings-options] :is(input,select,textarea,button) { max-width:100%; }\n [data-dsh-mobile-settings-options] :is(input,select,textarea) { box-sizing:border-box; width:100%; min-width:0; }\n [data-dsh-mobile-settings-options] [class*=\"_head\"] { min-width:0; flex-wrap:wrap; }\n /* Provider names may shrink, but their edit/delete actions remain horizontal\n and retain a full touch target on narrow screens. */\n [data-dsh-mobile-settings-options] [class*=\"_rowHead\"]:has(> [class*=\"_rowIdentity\"]) { flex-wrap:nowrap !important; align-items:center !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowIdentity\"] { flex:1 1 auto !important; min-width:0 !important; overflow:hidden !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowName\"] { min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowActions\"] { flex:0 0 auto !important; flex-wrap:nowrap !important; width:max-content !important; min-width:max-content !important; max-width:none !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowActions\"] button { flex:none !important; width:auto !important; min-width:44px !important; max-width:none !important; min-height:44px !important; padding-inline:10px !important; white-space:nowrap !important; word-break:keep-all !important; writing-mode:horizontal-tb !important; }\n [data-dsh-mobile-settings-content][data-dsh-mobile-view-transition=\"true\"],\n [data-dsh-mobile-view][data-dsh-mobile-view-transition=\"true\"] { animation:dsh-mobile-view-in var(--dsh-mobile-motion-duration) var(--dsh-mobile-motion-ease); }\n [data-dsh-mobile-center] textarea { font-size:16px !important; }\n /* Markdown tables use content-sized columns. Small tables fill the phone;\n wider tables keep readable cells and scroll inside their own region. */\n [data-dsh-mobile-table-scroll] { box-sizing:border-box; width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }\n [data-dsh-mobile-table-scroll] table { display:table !important; width:max-content !important; min-width:100% !important; max-width:none !important; table-layout:auto !important; }\n [data-dsh-mobile-table-scroll] :is(th,td) { box-sizing:border-box; min-width:8ch; max-width:32ch; overflow-wrap:anywhere; word-break:break-word; vertical-align:top; }\n [data-dsh-mobile-center] pre { max-width:100%; overflow-x:auto; }\n [data-dsh-mobile-center] :is(img,video,canvas,svg) { max-width:100%; }\n [data-dsh-mobile-message-scroll] { box-sizing:border-box !important; width:100% !important; padding:8px 10px 20px !important; }\n [data-dsh-mobile-history-loader] { position:relative !important; min-height:1px !important; }\n [data-dsh-mobile-history-loader] button:not(:disabled) { position:absolute !important; width:1px !important; height:1px !important; margin:-1px !important; padding:0 !important; clip-path:inset(50%) !important; opacity:0 !important; overflow:hidden !important; pointer-events:none !important; }\n [data-dsh-mobile-history-loader] button:disabled { min-height:28px !important; padding:4px 12px !important; }\n [data-dsh-mobile-message-column] { box-sizing:border-box !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; gap:10px !important; }\n [data-dsh-mobile-message-column] > * { width:100% !important; max-width:100% !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] { box-sizing:border-box !important; display:grid !important; grid-template-columns:16px minmax(0,1fr) !important; grid-auto-rows:auto !important; align-items:center !important; column-gap:6px !important; width:100% !important; height:auto !important; min-height:40px !important; padding:4px 0 !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > [class*=\"_leading\"] { grid-column:1 !important; grid-row:1 !important; margin-right:0 !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > [class*=\"_title\"] { grid-column:2 !important; grid-row:1 !important; min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > :is([class*=\"_sep\"],[class*=\"_separator\"]) { display:none !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > :is([class*=\"_summary\"],[class*=\"_fileLink\"]) { grid-column:2 !important; grid-row:2 !important; width:100% !important; min-width:0 !important; max-width:100% !important; overflow:hidden !important; line-height:19px !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > [class*=\"_summarySuffix\"] { grid-column:2 !important; grid-row:3 !important; margin-left:0 !important; }\n [data-dsh-mobile-message-column] [data-context-fields] > * { display:grid !important; grid-template-columns:minmax(72px,30%) minmax(0,1fr) !important; gap:4px 10px !important; }\n [data-dsh-mobile-message-column] [class*=\"_ioSection\"] { grid-template-columns:1fr !important; row-gap:4px !important; }\n [data-dsh-mobile-message-column] [class*=\"_body\"] { max-width:100% !important; overflow-wrap:anywhere; }\n /* Keep folded and expanded reasoning visually separate from the reply. */\n [data-dsh-mobile-message-column] [class*=\"_body\"] > div:has(> [data-variant=\"think\"]) { margin-bottom:12px !important; }\n [data-dsh-mobile-center] [data-composer-card] ~ [class*=\"_root\"],\n [data-dsh-mobile-center] [data-composer-card] ~ * [class*=\"_root\"] { box-sizing:border-box !important; width:100% !important; max-width:100% !important; margin-bottom:-6px !important; padding:3px 4px 0 !important; font-size:11px !important; line-height:18px !important; white-space:normal !important; overflow:visible !important; text-overflow:clip !important; }\n [data-dsh-mobile-center] [data-composer-card] ~ [class*=\"_root\"] [class*=\"_sep\"],\n [data-dsh-mobile-center] [data-composer-card] ~ * [class*=\"_root\"] [class*=\"_sep\"] { margin:0 6px !important; }\n /* Composer dock stats strip (turns/steps/tokens) reads small on phones. */\n [data-dsh-mobile-center] [data-slot=\"conversation.composer.dock\"] [class*=\"_root\"] { font-size:10px !important; line-height:16px !important; }\n /* Message runtime details are inline on desktop. Give the clock/runtime\n label its own wrapping row on narrow screens so TTFT and throughput do\n not push the action buttons or clip at the viewport edge. */\n [data-dsh-mobile-center] [class*=\"_actions\"]:has(> [class*=\"_timeStart\"]),\n [data-dsh-mobile-center] [class*=\"_actions\"]:has(> [class*=\"_timeEnd\"]) { box-sizing:border-box !important; width:100% !important; flex-wrap:wrap !important; justify-content:flex-end !important; height:auto !important; min-height:28px !important; row-gap:2px !important; }\n [data-dsh-mobile-center] [class*=\"_timeStart\"],\n [data-dsh-mobile-center] [class*=\"_timeEnd\"] { box-sizing:border-box !important; flex:1 1 100% !important; order:2 !important; min-width:0 !important; max-width:100% !important; padding:0 !important; line-height:20px !important; text-align:center !important; white-space:normal !important; overflow-wrap:anywhere !important; }\n [data-dsh-mobile-center] [class*=\"_timeStart\"] { box-sizing:border-box !important; flex:1 1 100% !important; order:2 !important; min-width:0 !important; max-width:100% !important; padding:0 !important; line-height:20px !important; text-align:center !important; white-space:normal !important; overflow-wrap:anywhere !important; }\n [data-dsh-mobile-center] [class*=\"_timeStart\"] [class*=\"_runTimeDot\"],\n [data-dsh-mobile-center] [class*=\"_timeEnd\"] [class*=\"_runTimeDot\"] { margin:0 6px !important; }\n /* Keep the context meter's legend rows as readable label/value pairs.\n Generic mobile flex rules can otherwise place the rows side by side and\n break Chinese labels in the middle of a word. */\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"],\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] { width:min(264px,calc(100vw - 32px)) !important; min-width:0 !important; max-width:calc(100vw - 32px) !important; }\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"] [class*=\"_rows\"],\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] [class*=\"_rows\"] { display:block !important; }\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"] [class*=\"_rows\"] > [class*=\"_row\"],\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] [class*=\"_rows\"] > [class*=\"_row\"] { display:flex !important; align-items:center !important; justify-content:space-between !important; width:100% !important; min-width:0 !important; white-space:nowrap !important; }\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"] :is(dt,dd),\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] :is(dt,dd) { white-space:nowrap !important; word-break:keep-all !important; }\n .dsh-mobile-branch-toast,.dsh-mobile-media-toast { display:block; position:fixed; z-index:330; top:max(12px,env(safe-area-inset-top)); left:50%; max-width:calc(100vw - 32px); box-sizing:border-box; padding:7px 14px; border:1px solid rgb(15 23 42 / 10%); border-radius:999px; background:rgb(15 23 42 / 92%); color:#fff; font-size:13px; line-height:20px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; opacity:0; pointer-events:none; transform:translate(-50%,-8px); transition:opacity 160ms ease,transform 160ms ease; }\n .dsh-mobile-branch-toast[data-visible=\"true\"],.dsh-mobile-media-toast[data-visible=\"true\"] { opacity:1; transform:translate(-50%,0); }\n /* Fallback only: when the native Add group has no item to clone, keep the\n camera action on the same row metrics and tokens as the native menu. */\n .dsh-mobile-media-action { box-sizing:border-box; display:flex; align-items:center; justify-content:flex-start; gap:8px; width:100%; min-width:0; min-height:40px; padding:8px 10px; border:0; border-radius:10px; background:transparent; color:var(--dsw-alias-label-primary,inherit); cursor:pointer; font:inherit; font-size:14px; line-height:22px; text-align:left; touch-action:manipulation; }\n .dsh-mobile-media-action:active { opacity:.72; }\n .dsh-mobile-media-action:focus-visible { outline:2px solid var(--dsw-alias-state-business-primary,#4c82f7); outline-offset:1px; }\n .dsh-mobile-media-action:disabled { cursor:default; opacity:.38; }\n .dsh-mobile-media-action svg { flex:none; width:16px; height:16px; color:var(--dsw-alias-label-tertiary,currentColor); }\n .dsh-mobile-media-action span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n [data-dsh-mobile-center] [class*=\"_composer\"] { padding-left:8px !important; padding-right:8px !important; padding-bottom:max(8px,env(safe-area-inset-bottom)) !important; }\n /* The desktop composer intentionally wraps whole toolbar groups. On a phone,\n dynamic model and status labels made that row alternate between one and\n two lines. Keep two stable columns and let only the model label shrink. */\n [data-dsh-mobile-composer-row] { display:grid !important; grid-template-columns:max-content minmax(0,1fr) !important; align-items:center !important; gap:4px 8px !important; }\n [data-dsh-mobile-composer-tools] { display:flex !important; flex-wrap:nowrap !important; width:max-content !important; min-width:0 !important; max-width:max-content !important; gap:6px !important; }\n [data-dsh-mobile-composer-trailing] { display:flex !important; flex-wrap:nowrap !important; width:100% !important; min-width:0 !important; max-width:100% !important; gap:6px !important; margin-left:0 !important; justify-content:flex-end !important; }\n [data-dsh-mobile-composer-model] { flex:1 1 0 !important; width:auto !important; min-width:0 !important; max-width:none !important; }\n [data-dsh-mobile-composer-model-trigger] { box-sizing:border-box !important; width:100% !important; max-width:100% !important; min-width:0 !important; padding-left:6px !important; padding-right:4px !important; }\n [data-dsh-mobile-composer-model-label] { flex:1 1 auto !important; max-width:none !important; min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-center] [class*=\"_root\"]:has(> [class*=\"_card\"] textarea) { box-sizing:border-box !important; width:100% !important; padding:0 0 8px !important; }\n [data-dsh-mobile-center] [class*=\"_root\"]:has(> [class*=\"_card\"] textarea) > [class=\"\"]:last-child { display:none !important; }\n}\n@keyframes dsh-mobile-fade-in { from { opacity:0; } }\n@keyframes dsh-mobile-panel-in { from { opacity:.72; transform:translateY(6px); } }\n@keyframes dsh-mobile-view-in { from { opacity:.58; transform:translateY(5px); } }\n@media (max-width:420px) {\n [data-dsh-mobile-header] [class*=\"_headerActions\"] { max-width:42vw; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] [class*=\"_selector\"] { align-self:stretch !important; width:100% !important; }\n [data-dsh-mobile-message-column] [data-context-fields] > * { grid-template-columns:1fr !important; }\n}\n@media (prefers-reduced-motion:reduce) {\n [data-dsh-mobile-sidebar-root],[data-dsh-mobile-details] { transition:none !important; }\n .dsh-native-mobile-backdrop:not([hidden]),[data-dsh-mobile-settings],\n [data-dsh-mobile-settings-content][data-dsh-mobile-view-transition=\"true\"],\n [data-dsh-mobile-view][data-dsh-mobile-view-transition=\"true\"] { animation:none !important; }\n}\n`\n\nfunction classToken(element: Element, suffix: string): boolean {\n return Array.from(element.classList).some(value => value.endsWith(suffix))\n}\n\nfunction firstByClassSuffix(root: ParentNode, suffix: string): HTMLElement | undefined {\n return Array.from(root.querySelectorAll<HTMLElement>('[class]')).find(element => classToken(element, suffix))\n}\n\n/** Find the stock DSH application frame without mistaking a feature card for the shell. */\nexport function resolveNativeMobileFrame(root: ParentNode, dedicatedCenter: HTMLElement | undefined): HTMLElement | undefined {\n if (dedicatedCenter !== undefined) return undefined\n return Array.from(root.querySelectorAll<HTMLElement>('[class]')).find(candidate => {\n return classToken(candidate, '_frame')\n && firstByClassSuffix(candidate, '_sidebarCol') !== undefined\n && firstByClassSuffix(candidate, '_centerCol') !== undefined\n })\n}\n\n/** Mark every mounted settings dialog so its mobile layout does not depend on the conversation shell. */\nexport function markNativeMobileSettings(root: ParentNode): number {\n let marked = 0\n for (const dialog of root.querySelectorAll<HTMLElement>('[role=\"dialog\"]')) {\n const children = Array.from(dialog.children) as HTMLElement[]\n const nav = children.find(child => classToken(child, '_nav'))\n const content = children.find(child => classToken(child, '_content'))\n if (nav === undefined || content === undefined) continue\n dialog.dataset.dshMobileSettings = 'true'\n nav.dataset.dshMobileSettingsNav = 'true'\n content.dataset.dshMobileSettingsContent = 'true'\n firstByClassSuffix(nav, '_navList')?.setAttribute('data-dsh-mobile-settings-list', 'true')\n firstByClassSuffix(content, '_header')?.setAttribute('data-dsh-mobile-settings-header', 'true')\n firstByClassSuffix(content, '_options')?.setAttribute('data-dsh-mobile-settings-options', 'true')\n marked += 1\n }\n return marked\n}\n\nconst AUTO_HISTORY_THRESHOLD_PX = 64\n\nexport type NativeMobileLanguage = 'it' | 'en' | 'zh'\n\ninterface FileDropTarget { dispatchEvent(event: Event): boolean }\n\nfunction controlledFileDragEvent(type: 'dragover' | 'drop', files: readonly File[], initialDropEffect: DataTransfer['dropEffect']): DragEvent {\n const event = new Event(type, { bubbles: true, cancelable: true }) as DragEvent\n const dataTransfer = {\n dropEffect: initialDropEffect,\n effectAllowed: 'copy',\n files: Object.freeze([...files]),\n types: Object.freeze(['Files']),\n } as unknown as DataTransfer\n Object.defineProperty(event, 'dataTransfer', { value: dataTransfer })\n return event\n}\n\n/** Ask the official document dragover listener whether the current composer accepts files. */\nexport function preflightComposerImageDrop(target: FileDropTarget, files: readonly File[]): boolean {\n if (files.length === 0) return false\n const event = controlledFileDragEvent('dragover', files, 'none')\n target.dispatchEvent(event)\n return event.dataTransfer?.dropEffect === 'copy'\n}\n\n/** Dispatch a real drop only after a fresh official-listener preflight; the result is not an attachment ACK. */\nexport function dispatchComposerImageDrop(target: FileDropTarget, files: readonly File[]): boolean {\n if (!preflightComposerImageDrop(target, files)) return false\n target.dispatchEvent(controlledFileDragEvent('drop', files, 'copy'))\n return true\n}\n\n/** Apply the resolved locale independently from the document's possibly different lang attribute. */\nexport function applyNativeMobileLanguageMarker(root: Pick<HTMLElement, 'dataset'>, language: NativeMobileLanguage): () => void {\n const previous = root.dataset.dshMobileLanguage\n root.dataset.dshMobileLanguage = language\n return () => {\n if (root.dataset.dshMobileLanguage !== language) return\n if (previous === undefined) delete root.dataset.dshMobileLanguage\n else root.dataset.dshMobileLanguage = previous\n }\n}\n\n/** Resolve the supported language used by native-mobile controls. */\nexport function resolveNativeMobileLanguage(\n documentLanguage: string,\n browserLanguages: readonly string[],\n): NativeMobileLanguage {\n return [documentLanguage, ...browserLanguages]\n .map(value => value.trim().toLowerCase().split(/[-_]/u)[0])\n .find((value): value is NativeMobileLanguage => value === 'it' || value === 'en' || value === 'zh') ?? 'en'\n}\n\n/** Whether a user-driven scroll moved upward into the automatic history-loading zone. */\nexport function shouldAutoLoadEarlier(previousTop: number, currentTop: number): boolean {\n return currentTop <= AUTO_HISTORY_THRESHOLD_PX && currentTop < previousTop - 0.5\n}\n\n/**\n * Whether the overlay scrim belongs on screen. The scrim exists for the\n * slide-in drawer only — it dims the page and catches the tap that closes the\n * drawer — so it is shown while that drawer is open *and* the overlay query is\n * in force. `hidden` carries the whole decision rather than the width rules\n * alone: the attribute still hides the element when the injected stylesheet\n * never lands (a CSP without inline styles, a shell that drops the <style>\n * node), where the element would otherwise fall back to the UA button box.\n */\nexport function drawerScrimVisible(sidebarCollapsed: boolean, overlayActive: boolean): boolean {\n return !sidebarCollapsed && overlayActive\n}\n\ninterface ComposerMediaOrigin {\n readonly generation: number\n readonly href: string\n readonly composer: object | null\n readonly sessionRoot: object | null\n readonly sessionId: string | null\n}\n\n/** Check that an asynchronous picker result still belongs to its originating session and composer. */\nexport function isComposerMediaOriginCurrent(\n origin: ComposerMediaOrigin,\n current: ComposerMediaOrigin & { readonly disposed: boolean; readonly composerConnected: boolean },\n): boolean {\n return !current.disposed\n && origin.generation === current.generation\n && origin.href === current.href\n && origin.composer !== null\n && current.composerConnected\n && origin.composer === current.composer\n && origin.sessionRoot !== null\n && origin.sessionRoot === current.sessionRoot\n && origin.sessionId !== null\n && origin.sessionId === current.sessionId\n}\n\n/** Add mobile semantics without replacing feature trees. */\nexport function installNativeMobileSurface(): () => void {\n document.documentElement.classList.add('dsh-native-mobile-active')\n const browserLanguages = navigator.languages.length > 0 ? navigator.languages : [navigator.language]\n const language = resolveNativeMobileLanguage(document.documentElement.lang, browserLanguages)\n const restoreLanguageMarker = applyNativeMobileLanguageMarker(document.documentElement, language)\n const label = (italian: string, english: string, chinese: string): string => language === 'it' ? italian : language === 'zh' ? chinese : english\n const mediaIcon = (): SVGSVGElement => {\n const namespace = 'http://www.w3.org/2000/svg'\n const icon = document.createElementNS(namespace, 'svg')\n icon.setAttribute('viewBox', '0 0 16 16')\n icon.setAttribute('fill', 'none')\n icon.setAttribute('aria-hidden', 'true')\n const body = document.createElementNS(namespace, 'path')\n body.setAttribute('d', 'M5.15 3.2 6.05 2h3.9l.9 1.2h1.45c1.05 0 1.9.85 1.9 1.9v6c0 1.05-.85 1.9-1.9 1.9H3.7a1.9 1.9 0 0 1-1.9-1.9v-6c0-1.05.85-1.9 1.9-1.9h1.45Zm-1.45 1.3a.6.6 0 0 0-.6.6v6c0 .33.27.6.6.6h8.6a.6.6 0 0 0 .6-.6v-6a.6.6 0 0 0-.6-.6h-2.1l-.9-1.2H6.7l-.9 1.2H3.7Z')\n body.setAttribute('fill', 'currentColor')\n const lens = document.createElementNS(namespace, 'circle')\n lens.setAttribute('cx', '8')\n lens.setAttribute('cy', '8.1')\n lens.setAttribute('r', '2.15')\n lens.setAttribute('stroke', 'currentColor')\n lens.setAttribute('stroke-width', '1.3')\n icon.append(body, lens)\n return icon\n }\n const createMediaAction = (text: string): HTMLButtonElement => {\n const button = document.createElement('button')\n button.type = 'button'\n button.className = 'dsh-mobile-media-action'\n button.lang = language\n button.dataset.dshMobileMediaAction = 'camera'\n const icon = document.createElement('span')\n icon.append(mediaIcon())\n button.append(icon)\n const caption = document.createElement('span')\n caption.textContent = text\n button.append(caption)\n return button\n }\n const setInputMode = (mode: 'keyboard' | 'touch'): void => {\n document.documentElement.dataset.dshMobileInput = mode\n }\n const onPointerDown = (event: PointerEvent): void => {\n if (event.pointerType === 'touch' || event.pointerType === 'pen') setInputMode('touch')\n }\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.key === 'Tab' || event.key.startsWith('Arrow')) setInputMode('keyboard')\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n document.addEventListener('keydown', onKeyDown, true)\n // The scrim is drawer chrome: it belongs on screen only while the overlay\n // query matches. A resize crosses that breakpoint without touching the DOM\n // the observer below watches, so the query wakes the same sync pass itself.\n const overlayQuery = window.matchMedia(NATIVE_MOBILE_OVERLAY_QUERY)\n const backdrop = document.createElement('button')\n backdrop.type = 'button'\n backdrop.className = 'dsh-native-mobile-backdrop'\n backdrop.lang = language\n backdrop.hidden = true\n backdrop.setAttribute('aria-label', label('Chiudi navigazione area di lavoro', 'Close workspace navigation', '关闭工作区导航'))\n document.body.append(backdrop)\n const branchToast = document.createElement('div')\n branchToast.className = 'dsh-mobile-branch-toast'\n branchToast.lang = language\n branchToast.setAttribute('role', 'status')\n branchToast.setAttribute('aria-live', 'polite')\n document.body.append(branchToast)\n const mediaToast = document.createElement('div')\n mediaToast.className = 'dsh-mobile-media-toast'\n mediaToast.lang = language\n mediaToast.setAttribute('role', 'status')\n mediaToast.setAttribute('aria-live', 'polite')\n document.body.append(mediaToast)\n const cameraButton = createMediaAction(label('Scatta foto', 'Take photo', '拍照'))\n cameraButton.disabled = true\n let branchToastTimer = 0\n let mediaToastTimer = 0\n const showMediaToast = (message: string): void => {\n mediaToast.textContent = message\n mediaToast.dataset.visible = 'true'\n if (mediaToastTimer !== 0) window.clearTimeout(mediaToastTimer)\n mediaToastTimer = window.setTimeout(() => {\n mediaToast.removeAttribute('data-visible')\n mediaToastTimer = 0\n }, 2200)\n }\n let mediaRequestGeneration = 0\n let disposed = false\n let boundComposer: Element | null = null\n let boundSessionRoot: Element | null = null\n let boundSessionId: string | null = null\n const preflightFile = new File([], 'dsh-mobile-preflight.png', { type: 'image/png' })\n const canAcceptComposerDrop = (): boolean => preflightComposerImageDrop(document, [preflightFile])\n const mediaPickerAbortController = new AbortController()\n const browserPickerCleanups = new Set<() => void>()\n const sessionTokens = new WeakMap<Element, string>()\n let nextSessionToken = 0\n type MediaRequestContext = ComposerMediaOrigin & { readonly composer: Element | null; readonly sessionRoot: Element | null }\n const currentSessionOrigin = (): { readonly sessionRoot: Element | null; readonly sessionId: string | null } => {\n const dedicatedRoot = boundComposer?.closest('[data-dsh-mobile-session]') ?? null\n const dedicatedId = dedicatedRoot?.getAttribute('data-dsh-mobile-session')\n if (dedicatedRoot !== null && typeof dedicatedId === 'string' && dedicatedId !== '') {\n return { sessionRoot: dedicatedRoot, sessionId: dedicatedId }\n }\n const selectedRow = document.querySelector<Element>('[role=\"treeitem\"][aria-selected=\"true\"]')\n if (selectedRow === null) return { sessionRoot: null, sessionId: null }\n let token = sessionTokens.get(selectedRow)\n if (token === undefined) { token = `stock-${String(++nextSessionToken)}`; sessionTokens.set(selectedRow, token) }\n const identity = selectedRow.getAttribute('data-session-id')\n ?? selectedRow.getAttribute('aria-label')\n ?? selectedRow.textContent?.trim()\n ?? ''\n return { sessionRoot: selectedRow, sessionId: `${token}:${identity}` }\n }\n const mediaRequestContext = (): MediaRequestContext => {\n const session = currentSessionOrigin()\n return {\n generation: ++mediaRequestGeneration,\n href: window.location.href,\n composer: boundComposer,\n ...session,\n }\n }\n const mediaRequestIsCurrent = (context: MediaRequestContext): boolean => {\n const session = currentSessionOrigin()\n const composer = boundComposer\n return isComposerMediaOriginCurrent(context, {\n generation: mediaRequestGeneration,\n href: window.location.href,\n composer,\n sessionRoot: session.sessionRoot,\n sessionId: session.sessionId,\n disposed,\n composerConnected: context.composer?.isConnected === true,\n })\n }\n const deliverImages = (files: readonly File[], context: ReturnType<typeof mediaRequestContext>): void => {\n if (files.length === 0 || !mediaRequestIsCurrent(context)) return\n dispatchComposerImageDrop(document, files)\n }\n const launchBrowserCamera = (context: ReturnType<typeof mediaRequestContext>): void => {\n const input = document.createElement('input')\n input.type = 'file'\n input.accept = 'image/*'\n input.capture = 'environment'\n input.hidden = true\n const signal = mediaPickerAbortController.signal\n let cleanupTimer = 0\n let watchdogTimer = 0\n let cleaned = false\n const scheduleCleanup = (): void => {\n if (!cleaned && cleanupTimer === 0) cleanupTimer = window.setTimeout(cleanup, 1000)\n }\n const onVisibilityChange = (): void => {\n if (document.visibilityState === 'visible') scheduleCleanup()\n }\n const onChange = (): void => {\n if (cleaned) return\n const files = input.files === null ? [] : [...input.files]\n cleanup()\n deliverImages(files, context)\n }\n const cleanup = (): void => {\n if (cleaned) return\n cleaned = true\n if (cleanupTimer !== 0) window.clearTimeout(cleanupTimer)\n if (watchdogTimer !== 0) window.clearTimeout(watchdogTimer)\n cleanupTimer = 0\n watchdogTimer = 0\n input.removeEventListener('change', onChange)\n input.removeEventListener('cancel', cleanup)\n window.removeEventListener('focus', scheduleCleanup)\n document.removeEventListener('visibilitychange', onVisibilityChange)\n signal.removeEventListener('abort', cleanup)\n browserPickerCleanups.delete(cleanup)\n input.remove()\n }\n input.addEventListener('change', onChange)\n input.addEventListener('cancel', cleanup)\n window.addEventListener('focus', scheduleCleanup)\n document.addEventListener('visibilitychange', onVisibilityChange)\n signal.addEventListener('abort', cleanup, { once: true })\n watchdogTimer = window.setTimeout(cleanup, 300_000)\n browserPickerCleanups.add(cleanup)\n if (signal.aborted) { cleanup(); return }\n try {\n document.body.append(input)\n input.click()\n } catch {\n cleanup()\n if (mediaRequestIsCurrent(context)) showMediaToast(label('Impossibile aprire la fotocamera', 'Could not open the camera', '无法打开相机'))\n }\n }\n const dismissCommandMenu = (): void => {\n const trigger = boundComposer?.querySelector<HTMLButtonElement>('button[aria-haspopup=\"listbox\"][aria-expanded=\"true\"]')\n trigger?.click()\n }\n const addGroupLabel = label('Aggiungi', 'Add', '添加')\n const placeCameraAction = (commandMenu: HTMLElement): boolean => {\n const sectionTitle = Array.from(commandMenu.querySelectorAll<HTMLElement>('[role=\"listbox\"] [role=\"presentation\"]'))\n .find(candidate => !candidate.hasAttribute('data-source') && candidate.textContent?.trim() === addGroupLabel)\n if (sectionTitle === undefined) {\n cameraButton.remove()\n return false\n }\n\n // Reuse the current DSH option classes so this injected action follows the\n // native menu's spacing, colors, and dark-mode states instead of creating a\n // second mobile-only visual language.\n cameraButton.className = 'dsh-mobile-media-action'\n const nativeItem = (() => {\n let sibling = sectionTitle.nextElementSibling\n while (sibling instanceof HTMLElement && sibling.getAttribute('role') !== 'presentation') {\n if (sibling.matches('button[role=\"option\"]:not([aria-selected=\"true\"])')) return sibling\n sibling = sibling.nextElementSibling\n }\n return undefined\n })()\n if (nativeItem !== undefined) {\n cameraButton.className = nativeItem.className\n const cameraIcon = cameraButton.firstElementChild\n const cameraLabel = cameraButton.lastElementChild\n const nativeIcon = firstByClassSuffix(nativeItem, '_itemIcon')\n const nativeLabel = firstByClassSuffix(nativeItem, '_itemName')\n if (cameraIcon instanceof HTMLElement && nativeIcon !== undefined) cameraIcon.className = nativeIcon.className\n if (cameraLabel instanceof HTMLElement && nativeLabel !== undefined) cameraLabel.className = nativeLabel.className\n }\n cameraButton.setAttribute('role', 'option')\n cameraButton.setAttribute('aria-selected', 'false')\n cameraButton.setAttribute('aria-label', label('Scatta foto', 'Take photo', '拍照'))\n\n let lastItem: Element = sectionTitle\n let sibling = sectionTitle.nextElementSibling\n while (sibling instanceof HTMLElement && sibling.getAttribute('role') !== 'presentation') {\n if (sibling !== cameraButton) lastItem = sibling\n sibling = sibling.nextElementSibling\n }\n if (cameraButton.parentElement !== sectionTitle.parentElement || cameraButton.previousElementSibling !== lastItem) {\n lastItem.after(cameraButton)\n }\n return true\n }\n const setCameraActionDisabled = (disabled: boolean, title: string): void => {\n if (cameraButton.disabled !== disabled) cameraButton.disabled = disabled\n if (cameraButton.title !== title) cameraButton.title = title\n }\n const quietMediaPointer = (event: PointerEvent): void => {\n event.preventDefault()\n event.stopPropagation()\n const active = document.activeElement\n if (active instanceof HTMLElement && (active.matches('input,textarea') || active.isContentEditable)) active.blur()\n }\n const takePhoto = (): void => {\n if (!canAcceptComposerDrop()) {\n setCameraActionDisabled(true, label('Allegati immagine non disponibili', 'Image attachments are unavailable', '图片附件不可用'))\n dismissCommandMenu()\n return\n }\n const context = mediaRequestContext()\n dismissCommandMenu()\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge === undefined) {\n launchBrowserCamera(context)\n return\n }\n void Promise.resolve().then(() => bridge.invoke('camera.capture', {})).then(value => {\n if (!mediaRequestIsCurrent(context)) return\n if (value instanceof File) deliverImages([value], context)\n else showMediaToast(label('La foto scattata non è utilizzabile', 'The captured photo is unavailable', '所拍照片不可用'))\n }).catch((error: unknown) => {\n if (!mediaRequestIsCurrent(context)) return\n const code = typeof error === 'object' && error !== null && 'code' in error ? String(error.code) : ''\n if (code === 'cancelled') return\n showMediaToast(code === 'payload_too_large'\n ? label('La foto supera il limite di 8 MiB', 'The photo exceeds the 8 MiB limit', '照片超过 8 MiB 限制')\n : label('Impossibile aggiungere la foto', 'Could not attach the photo', '无法附加照片'))\n })\n }\n cameraButton.addEventListener('pointerdown', quietMediaPointer)\n cameraButton.addEventListener('click', takePhoto)\n const showBranchToast = (): void => {\n const header = document.querySelector<HTMLElement>('[data-dsh-mobile-header]')\n const title = header === null ? undefined : header.querySelector<HTMLElement>('[class*=\"_crumbCurrent\"]')?.textContent?.trim()\n const prefix = label('Ramo corrente', 'Current branch', '当前分支')\n branchToast.textContent = title === undefined ? prefix : `${prefix}: ${title}`\n branchToast.dataset.visible = 'true'\n if (branchToastTimer !== 0) window.clearTimeout(branchToastTimer)\n branchToastTimer = window.setTimeout(() => {\n branchToast.removeAttribute('data-visible')\n branchToastTimer = 0\n }, 1600)\n }\n const onBranchClick = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const branch = event.target.closest<HTMLButtonElement>('button[aria-label*=\"分支\"],button[aria-label*=\"Branch\"],button[aria-label*=\"branch\"],button[aria-label*=\"Ramo\"],button[aria-label*=\"ramo\"]')\n if (branch === null || branch.hasAttribute('disabled') || branch.getAttribute('aria-disabled') === 'true') return\n window.setTimeout(showBranchToast, 80)\n }\n document.addEventListener('click', onBranchClick, true)\n let frame: HTMLElement | undefined\n let sidebar: HTMLElement | undefined\n let sidebarRoot: HTMLElement | undefined\n let toggle: HTMLButtonElement | undefined\n let viewArea: HTMLElement | undefined\n let scheduled = 0\n let transitionFrame = 0\n let transitionRestartFrame = 0\n let transitionTimer = 0\n let transitionTarget: HTMLElement | undefined\n let historyScroller: HTMLElement | undefined\n let historyPreviousTop = 0\n const historyLoadButton = (): HTMLButtonElement | undefined => {\n const loader = historyScroller === undefined ? undefined : firstByClassSuffix(historyScroller, '_older')\n return loader?.querySelector<HTMLButtonElement>('button') ?? undefined\n }\n const onHistoryScroll = (): void => {\n if (historyScroller === undefined) return\n const currentTop = Math.max(0, historyScroller.scrollTop)\n const shouldLoad = shouldAutoLoadEarlier(historyPreviousTop, currentTop)\n historyPreviousTop = currentTop\n if (!shouldLoad) return\n const button = historyLoadButton()\n if (button === undefined || button.disabled || button.getAttribute('aria-disabled') === 'true') return\n button.click()\n }\n const bindHistoryScroller = (next: HTMLElement | undefined): void => {\n if (historyScroller === next) return\n historyScroller?.removeEventListener('scroll', onHistoryScroll)\n historyScroller = next\n historyPreviousTop = next?.scrollTop ?? 0\n historyScroller?.addEventListener('scroll', onHistoryScroll, { passive: true })\n }\n const animateNavigation = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const trigger = event.target.closest<HTMLElement>('button,a,[role=\"tab\"],[aria-selected]')\n if (trigger === null || trigger.hasAttribute('disabled') || trigger.getAttribute('aria-disabled') === 'true') return\n if (trigger.getAttribute('aria-selected') === 'true' || trigger.getAttribute('aria-current') === 'true') return\n const settingsNavigation = trigger.closest('[data-dsh-mobile-settings-list]') !== null\n const conversationNavigation = trigger.matches('[role=\"tab\"]')\n const sidebarNavigation = trigger.closest('[data-dsh-mobile-sidebar-root]') !== null\n && trigger.closest('[data-dsh-mobile-toggle]') === null\n if (!settingsNavigation && !conversationNavigation && !sidebarNavigation) return\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return\n if (transitionFrame !== 0) cancelAnimationFrame(transitionFrame)\n if (transitionRestartFrame !== 0) cancelAnimationFrame(transitionRestartFrame)\n transitionFrame = requestAnimationFrame(() => {\n transitionFrame = 0\n const target = settingsNavigation\n ? document.querySelector<HTMLElement>('[data-dsh-mobile-settings-content]')\n : viewArea\n if (target === null || target === undefined) return\n transitionTarget?.removeAttribute('data-dsh-mobile-view-transition')\n target.removeAttribute('data-dsh-mobile-view-transition')\n transitionRestartFrame = requestAnimationFrame(() => {\n transitionRestartFrame = 0\n transitionTarget = target\n target.dataset.dshMobileViewTransition = 'true'\n if (transitionTimer !== 0) clearTimeout(transitionTimer)\n transitionTimer = window.setTimeout(() => {\n target.removeAttribute('data-dsh-mobile-view-transition')\n if (transitionTarget === target) transitionTarget = undefined\n transitionTimer = 0\n }, 240)\n })\n })\n }\n document.addEventListener('click', animateNavigation)\n const syncMediaBinding = (composer: Element | null): void => {\n const previousComposer = boundComposer\n boundComposer = composer\n const session = currentSessionOrigin()\n if (composer === previousComposer && session.sessionRoot === boundSessionRoot && session.sessionId === boundSessionId) return\n boundSessionRoot = session.sessionRoot\n boundSessionId = session.sessionId\n mediaRequestGeneration += 1\n }\n\n const sync = (): void => {\n scheduled = 0\n const dedicatedCenter = document.querySelector<HTMLElement>('.dshm-main') ?? undefined\n const nextFrame = resolveNativeMobileFrame(document, dedicatedCenter)\n if (frame !== nextFrame) frame?.removeAttribute('data-dsh-mobile-frame')\n frame = nextFrame\n if (frame !== undefined) frame.dataset.dshMobileFrame = 'true'\n sidebar = frame === undefined\n ? document.querySelector<HTMLElement>('.dshm-drawer') ?? undefined\n : firstByClassSuffix(frame, '_sidebarCol')\n const center = frame === undefined ? dedicatedCenter : firstByClassSuffix(frame, '_centerCol')\n const details = frame === undefined ? undefined : firstByClassSuffix(frame, '_detailsCol')\n const handle = frame === undefined ? undefined : firstByClassSuffix(frame, '_handle')\n markNativeMobileSettings(document)\n if (center === undefined) {\n bindHistoryScroller(undefined)\n syncMediaBinding(null)\n setCameraActionDisabled(true, label('Apri prima una sessione', 'Open a session first', '请先打开会话'))\n cameraButton.remove()\n return\n }\n if (center !== undefined) {\n center.dataset.dshMobileCenter = 'true'\n center.querySelector<HTMLElement>('header')?.setAttribute('data-dsh-mobile-header', 'true')\n viewArea = firstByClassSuffix(center, '_viewArea')\n if (viewArea !== undefined) viewArea.dataset.dshMobileView = 'true'\n const conversation = center.querySelector<HTMLElement>('[data-conversation-scroll]')\n bindHistoryScroller(conversation ?? undefined)\n const historyLoader = conversation === null ? undefined : firstByClassSuffix(conversation, '_older')\n if (historyLoader !== undefined) {\n historyLoader.dataset.dshMobileHistoryLoader = 'true'\n historyLoader.setAttribute('aria-live', 'polite')\n const button = historyLoader.querySelector<HTMLButtonElement>('button')\n if (button !== null) {\n button.tabIndex = -1\n if (button.disabled) button.removeAttribute('aria-hidden')\n else button.setAttribute('aria-hidden', 'true')\n }\n }\n const messageColumn = conversation === null ? undefined : firstByClassSuffix(conversation, '_column')\n const messageScroll = messageColumn?.parentElement\n if (messageColumn !== undefined && messageScroll !== null && messageScroll !== undefined && classToken(messageScroll, '_scroll')) {\n messageColumn.dataset.dshMobileMessageColumn = 'true'\n messageScroll.dataset.dshMobileMessageScroll = 'true'\n }\n for (const table of center.querySelectorAll<HTMLTableElement>('table')) {\n const parent = table.parentElement\n if (parent?.dataset.dshMobileTableScroll === 'true') continue\n const wrapper = document.createElement('div')\n wrapper.dataset.dshMobileTableScroll = 'true'\n table.before(wrapper)\n wrapper.append(table)\n }\n const composerCard = center.querySelector<HTMLElement>('[data-composer-card]')\n const composerRow = composerCard?.querySelector<HTMLElement>(':scope > [data-input-scroll]')?.nextElementSibling\n if (!(composerRow instanceof HTMLElement)) {\n syncMediaBinding(null)\n setCameraActionDisabled(true, label('Apri prima una sessione', 'Open a session first', '请先打开会话'))\n cameraButton.remove()\n }\n if (composerRow instanceof HTMLElement) {\n composerRow.dataset.dshMobileComposerRow = 'true'\n const groups = Array.from(composerRow.children).filter((child): child is HTMLElement => child instanceof HTMLElement)\n const composerTools = groups[0]\n const composerTrailing = groups.at(-1)\n if (composerTools !== undefined) {\n composerTools.dataset.dshMobileComposerTools = 'true'\n syncMediaBinding(composerCard ?? null)\n const composerInput = composerCard?.querySelector<HTMLTextAreaElement>('textarea')\n const composerEditor = composerCard?.querySelector<HTMLElement>('[contenteditable=\"true\"],[contenteditable=\"plaintext-only\"]')\n const composerBusy = composerCard?.getAttribute('aria-busy') === 'true'\n || composerInput?.disabled === true\n || composerInput?.readOnly === true\n || composerEditor?.getAttribute('aria-disabled') === 'true'\n const attachmentBlocked = !canAcceptComposerDrop()\n const mediaDisabled = conversation === null || currentSessionOrigin().sessionId === null || composerBusy || attachmentBlocked\n const mediaTitle = composerBusy\n ? label('Attendi il completamento della risposta', 'Wait for the response to finish', '请等待回复完成')\n : attachmentBlocked\n ? label('Allegati immagine non disponibili', 'Image attachments are unavailable', '图片附件不可用')\n : mediaDisabled\n ? label('Apri prima una sessione', 'Open a session first', '请先打开会话')\n : label('Scatta una foto e allegala', 'Take a photo and attach it', '拍照并附加到当前消息')\n setCameraActionDisabled(mediaDisabled, mediaTitle)\n const commandMenu = composerCard?.querySelector<HTMLElement>('[data-trigger-menu]') ?? null\n if (commandMenu !== null) placeCameraAction(commandMenu)\n else cameraButton.remove()\n }\n if (composerTrailing !== undefined && composerTrailing !== composerTools) {\n composerTrailing.dataset.dshMobileComposerTrailing = 'true'\n const modelTrigger = composerTrailing.querySelector<HTMLButtonElement>('button[aria-label^=\"选择模型\"],button[aria-label^=\"Select model\"],button[aria-label^=\"Seleziona modello\"]')\n if (modelTrigger !== null) {\n modelTrigger.dataset.dshMobileComposerModelTrigger = 'true'\n modelTrigger.parentElement?.setAttribute('data-dsh-mobile-composer-model', 'true')\n modelTrigger.querySelector<HTMLElement>('[class*=\"_triggerLabel\"]')?.setAttribute('data-dsh-mobile-composer-model-label', 'true')\n }\n }\n }\n }\n if (handle !== undefined) handle.dataset.dshMobileHandle = 'true'\n if (details !== undefined) {\n details.dataset.dshMobileDetails = 'true'\n const lastColumn = frame?.style.gridTemplateColumns.trim().split(/\\s+/).at(-1)\n details.dataset.open = String(lastColumn !== undefined && lastColumn !== '0px' && lastColumn !== '0')\n }\n if (sidebar === undefined) return\n sidebar.dataset.dshMobileSidebar = 'true'\n toggle = firstByClassSuffix(sidebar, '_toggle') as HTMLButtonElement | undefined\n let candidate = toggle?.parentElement\n while (candidate !== undefined && candidate !== null && candidate !== sidebar && !classToken(candidate, '_root')) candidate = candidate.parentElement\n sidebarRoot = candidate !== sidebar && candidate !== null ? candidate : undefined\n if (sidebarRoot === undefined) return\n sidebarRoot.dataset.dshMobileSidebarRoot = 'true'\n for (const brand of sidebarRoot.querySelectorAll<HTMLElement>('[class*=\"_fallbackBrandName\"]')) {\n if (brand.textContent?.trim() === 'DSH Local Build') brand.textContent = 'DeepSeek Harness'\n }\n if (toggle !== undefined) toggle.dataset.dshMobileToggle = 'true'\n const collapsed = classToken(sidebarRoot, '_collapsed')\n sidebar.dataset.open = String(!collapsed)\n backdrop.hidden = !drawerScrimVisible(collapsed, overlayQuery.matches)\n }\n const schedule = (): void => { if (scheduled === 0) scheduled = requestAnimationFrame(sync) }\n const observer = new MutationObserver(schedule)\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'style', 'disabled', 'readonly', 'aria-busy', 'aria-selected', 'data-dsh-mobile-session'] })\n overlayQuery.addEventListener('change', schedule)\n backdrop.addEventListener('click', () => { if (sidebar?.dataset.open === 'true') toggle?.click() })\n sync()\n const disposeTaskWatcher = installTaskCompletionWatcher({\n // Current gateways announce exact root turn completion. The DOM watcher\n // remains only for explicit pending-input cards, avoiding false completion\n // reminders from unrelated page mutations.\n completionFallback: false,\n label: (kind: TaskNotifyKind, sessionLabel: string) => kind === 'done'\n ? {\n title: label('Attività completata', 'Task finished', '任务已完成'),\n body: sessionLabel === ''\n ? label('Il tuo task DSH è terminato', 'Your DSH task finished', '你的 DSH 任务已完成')\n : label(`Il tuo task DSH è terminato: ${sessionLabel}`, `Your DSH task finished: ${sessionLabel}`, `你的 DSH 任务已完成:${sessionLabel}`),\n }\n : {\n title: label('È richiesto un input', 'Input needed', '需要你确认'),\n body: label('DSH attende una tua scelta', 'DSH waits for your choice', 'DSH 等待你的选择'),\n },\n })\n return () => {\n disposed = true\n disposeTaskWatcher()\n mediaRequestGeneration += 1\n mediaPickerAbortController.abort()\n restoreLanguageMarker()\n for (const cleanup of [...browserPickerCleanups]) cleanup()\n observer.disconnect()\n overlayQuery.removeEventListener('change', schedule)\n document.removeEventListener('click', onBranchClick, true)\n cameraButton.removeEventListener('pointerdown', quietMediaPointer)\n cameraButton.removeEventListener('click', takePhoto)\n if (branchToastTimer !== 0) window.clearTimeout(branchToastTimer)\n if (mediaToastTimer !== 0) window.clearTimeout(mediaToastTimer)\n branchToast.remove()\n mediaToast.remove()\n cameraButton.remove()\n if (scheduled !== 0) cancelAnimationFrame(scheduled)\n if (transitionFrame !== 0) cancelAnimationFrame(transitionFrame)\n if (transitionRestartFrame !== 0) cancelAnimationFrame(transitionRestartFrame)\n if (transitionTimer !== 0) clearTimeout(transitionTimer)\n transitionTarget?.removeAttribute('data-dsh-mobile-view-transition')\n historyScroller?.removeEventListener('scroll', onHistoryScroll)\n document.removeEventListener('pointerdown', onPointerDown, true)\n document.removeEventListener('keydown', onKeyDown, true)\n document.removeEventListener('click', animateNavigation)\n backdrop.remove()\n document.documentElement.classList.remove('dsh-native-mobile-active')\n delete document.documentElement.dataset.dshMobileInput\n }\n}\n","/** Browser-safe desktop-admin Host checks. Do not import Node APIs here. */\n\nfunction unwrapBrackets(hostname: string): string {\n return hostname.startsWith('[') && hostname.endsWith(']') ? hostname.slice(1, -1) : hostname\n}\n\nfunction parseIpv4(hostname: string): readonly [number, number, number, number] | undefined {\n const parts = hostname.split('.')\n if (parts.length !== 4) return undefined\n const octets: number[] = []\n for (const part of parts) {\n if (!/^(?:0|[1-9]\\d{0,2})$/u.test(part)) return undefined\n const value = Number(part)\n if (value > 255) return undefined\n octets.push(value)\n }\n return octets as [number, number, number, number]\n}\n\nfunction isLoopbackIpv4(octets: readonly [number, number, number, number]): boolean {\n return octets[0] === 127\n}\n\nfunction isPrivateIpv4(octets: readonly [number, number, number, number]): boolean {\n return octets[0] === 10\n || (octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31)\n || (octets[0] === 192 && octets[1] === 168)\n}\n\nfunction isLinkLocalIpv4(octets: readonly [number, number, number, number]): boolean {\n return octets[0] === 169 && octets[1] === 254\n}\n\n/**\n * Hostnames that may appear on the DSH desktop admin surface.\n * Loopback, RFC1918, and IPv4 link-local are accepted. Public IPs,\n * CGNAT, and arbitrary DNS names stay rejected so DNS rebinding\n * cannot reach `/api/mobile-access`.\n */\nexport function isLocalAdminHostname(hostname: string): boolean {\n const host = unwrapBrackets(hostname).trim().toLowerCase()\n if (host === 'localhost' || host === '::1') return true\n const octets = parseIpv4(host)\n if (octets === undefined) return false\n return isLoopbackIpv4(octets) || isPrivateIpv4(octets) || isLinkLocalIpv4(octets)\n}\n\n/**\n * Whether the current browser document should mount the desktop Mobile access\n * control. Dedicated Mobile HTTPS (the phone surface) stays native even when\n * the Host is a private LAN address.\n */\nexport function isDesktopAdminSurface(\n hostname: string,\n search = '',\n frontend?: string,\n): boolean {\n const query = search.startsWith('?') ? search.slice(1) : search\n return isLocalAdminHostname(hostname)\n && frontend !== 'dedicated'\n && !new URLSearchParams(query).has('dsh-mobile-preview')\n}\n","import { createElement, useEffect, useState } from 'react'\nimport {\n DIAGNOSTIC_REASON_MESSAGES,\n LOCALIZED_DIAGNOSTIC_COPY,\n MOBILE_CONTROL_MESSAGES,\n type MobileControlLocale,\n} from './client-messages.js'\nimport { createRestrictedFrpServerTemplate } from './frp-template.js'\nimport { installNativeMobileSurface, NATIVE_MOBILE_STYLES, resolveNativeMobileLanguage } from './native-mobile.js'\nimport { isDesktopAdminSurface } from './local-admin-host.js'\nimport { fireDeviceRevoked, fireTaskNotifyEvent, isDeviceRevokedPayload, parseTaskNotifyPayload, taskCompletionTag } from './task-notify.js'\n\nexport { DIAGNOSTIC_REASON_MESSAGES, LOCALIZED_DIAGNOSTIC_COPY, MOBILE_CONTROL_MESSAGES } from './client-messages.js'\nexport type { MobileControlLocale } from './client-messages.js'\n\n/**\n * Remote provider names the control UI knows about.\n *\n * This mirrors the server-side union in `src/remote.ts`, which cannot be imported\n * here because it pulls in Node-only modules. An unrecognized value from the\n * host falls back to the built-in provider, so a missing name would silently\n * render another provider's wording instead of failing loudly.\n */\nexport type MobileRemoteProvider = 'tailscale' | 'cpolar' | 'cloudflared' | 'frp' | 'origin'\n\n/** Map a host-reported provider onto the UI union, defaulting to the built-in one. */\nexport function parseMobileRemoteProvider(value: unknown): MobileRemoteProvider {\n return value === 'cpolar' || value === 'cloudflared' || value === 'frp' || value === 'origin'\n ? value\n : 'tailscale'\n}\n\ninterface ClientContext {\n effect(effect: () => void | (() => void), label?: string): void\n get(name: 'connection'): MobileConnectionHandle\n slots: {\n inject(key: string, callback: () => (() => void)): () => void\n register<Props>(options: { name: string; id: string; order?: number; label?: string }, component: (props: Props) => unknown): () => void\n }\n}\n\ninterface MobileConnectionHandle {\n isLoopback: boolean\n}\n\ninterface MobileExtensionContext {\n readonly document: Document\n readonly request: (path: string, init?: RequestInit) => Promise<Response>\n readonly root: HTMLElement\n readonly window: Window\n}\n\ntype MobileExtensionMount = (context: MobileExtensionContext) => void | (() => void)\ntype MobileSurfacePlacement = 'page' | 'sidebar-action' | 'header-action' | 'composer-dock' | 'settings-section' | 'overlay'\ninterface MobileSurface {\n readonly id: string\n readonly placement: MobileSurfacePlacement\n readonly label: string\n mount(container: HTMLElement): void | (() => void)\n}\ninterface MobileClientApi {\n readonly host: {\n invoke(action: string, input: unknown): Promise<unknown>\n fetch(path: string, init?: RequestInit): Promise<Response>\n assetUrl(path: string): string\n }\n readonly ui: {\n registerSurface(surface: MobileSurface): () => void\n open(surfaceId: string): void\n close(surfaceId: string): void\n toast(message: string): void\n }\n readonly native: {\n capabilities(): Promise<readonly string[]>\n invoke(action: string, input?: unknown): Promise<unknown>\n }\n readonly signal: AbortSignal\n readonly document: Document\n readonly window: Window\n}\ninterface MobileClientDefinition {\n readonly apiVersion: 1\n readonly id: string\n activate(api: MobileClientApi): void | (() => void) | Promise<void | (() => void)>\n}\n\ndeclare global {\n interface Window {\n dshMobile?: {\n register(mount: MobileExtensionMount): void\n define(definition: MobileClientDefinition): void\n }\n __DSH_MOBILE_FRONTEND__?: 'dedicated'\n __DSH_MOBILE_NATIVE__?: {\n capabilities(): Promise<readonly string[]> | readonly string[]\n invoke(action: string, input?: unknown): Promise<unknown>\n }\n }\n}\n\nconst queuedDefinitions: MobileClientDefinition[] = []\nlet queuedLegacyMount: MobileExtensionMount | undefined\nif (typeof window !== 'undefined' && window.dshMobile === undefined) {\n window.dshMobile = {\n register: mount => { queuedLegacyMount = mount },\n define: definition => { queuedDefinitions.push(definition) },\n }\n}\n\nexport function selectMobileControlLocale(documentLanguage = '', navigatorLanguages: readonly string[] = []): MobileControlLocale {\n for (const value of [documentLanguage, ...navigatorLanguages]) {\n const language = value.trim().toLowerCase().split(/[-_]/u)[0]\n if (language === 'it' || language === 'en' || language === 'zh') return language\n }\n return 'en'\n}\n\nexport function selectedMobileControlLocale(): MobileControlLocale {\n return selectMobileControlLocale(document.documentElement.lang, navigator.languages?.length ? navigator.languages : [navigator.language])\n}\n\n/** Remount one plugin-owned surface when DSH changes the document language. */\nexport function installDshLanguageBoundSurface(install: () => () => void): () => void {\n let locale = selectedMobileControlLocale()\n let dispose = install()\n const observer = new MutationObserver(() => {\n const next = selectedMobileControlLocale()\n if (next === locale) return\n dispose()\n locale = next\n dispose = install()\n })\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] })\n return () => {\n observer.disconnect()\n dispose()\n }\n}\n\nfunction controlTranslator(locale = selectedMobileControlLocale()): (key: string, values?: Readonly<Record<string, string | number>>) => string {\n const messages = MOBILE_CONTROL_MESSAGES as Record<MobileControlLocale, Record<string, string>>\n return (key, values = {}) => {\n const template = messages[locale][key] ?? messages.en[key] ?? key\n return template.replace(/\\{(\\w+)\\}/gu, (_match: string, name: string) => String(values[name] ?? `{${name}}`))\n }\n}\n\nexport function normalizeDiagnosticOverall(value: unknown): 'ok' | 'attention' | 'error' {\n return value === 'ok' ? 'ok' : value === 'attention' ? 'attention' : 'error'\n}\n\nexport function normalizeDiagnosticStatus(value: unknown): 'ok' | 'warning' | 'error' | 'info' {\n return value === 'ok' || value === 'warning' || value === 'error' || value === 'info' ? value : 'error'\n}\n\nexport function diagnosticOverallForChecks(value: unknown, statuses: readonly unknown[]): 'ok' | 'attention' | 'error' {\n const normalized = statuses.map(normalizeDiagnosticStatus)\n const payloadOverall = normalizeDiagnosticOverall(value)\n if (payloadOverall === 'error' || normalized.includes('error')) return 'error'\n if (payloadOverall === 'attention' || normalized.includes('warning')) return 'attention'\n return 'ok'\n}\n\nexport function validateDiagnosticChecks(value: unknown): { readonly entries: readonly Record<string, unknown>[]; readonly malformed: boolean } {\n if (!Array.isArray(value)) return { entries: [], malformed: true }\n const entries: Record<string, unknown>[] = []\n let malformed = false\n for (const candidate of value) {\n if (typeof candidate !== 'object' || candidate === null || Array.isArray(candidate)) { malformed = true; continue }\n entries.push(candidate as Record<string, unknown>)\n }\n return { entries, malformed }\n}\n\nexport function diagnosticEntriesForRender(data: Readonly<Record<string, unknown>>): readonly Record<string, unknown>[] {\n const overallKnown = data.overall === 'ok' || data.overall === 'attention' || data.overall === 'error'\n const validated = validateDiagnosticChecks(data.checks)\n const statusesKnown = validated.entries.every(entry => entry.status === 'ok' || entry.status === 'warning' || entry.status === 'error' || entry.status === 'info')\n if (!overallKnown || validated.malformed || validated.entries.length === 0 || !statusesKnown) {\n throw new TypeError('diagnostics envelope is unavailable')\n }\n return validated.entries\n}\n\nexport function renderDiagnosticPayloadSafely(\n data: Record<string, unknown>,\n render: (data: Record<string, unknown>) => void,\n onFailure: (error: unknown) => void,\n): void {\n try { render(data) } catch (error) { onFailure(error) }\n}\n\nexport function diagnosticServerCopy(entry: Readonly<Record<string, unknown>>): { readonly label: string; readonly detail: string; readonly action: string } {\n return {\n label: typeof entry.label === 'string' ? entry.label : '',\n detail: typeof entry.detail === 'string' ? entry.detail : '',\n action: typeof entry.action === 'string' ? entry.action : '',\n }\n}\n\n/**\n * Match DSH's client-side privilege hint to the authenticated mobile gateway.\n * The gateway authenticates the paired device and forwards allowed requests to\n * DSH's loopback listener, so settings RPCs receive the same Host-side checks\n * as the desktop page even though the phone's visible URL is a LAN address.\n */\nexport function trustAuthenticatedGatewayConnection(connection: MobileConnectionHandle): () => void {\n const previous = connection.isLoopback\n connection.isLoopback = true\n return () => { connection.isLoopback = previous }\n}\n\nfunction element<K extends keyof HTMLElementTagNameMap>(tag: K, className?: string): HTMLElementTagNameMap[K] {\n const node = document.createElement(tag)\n if (className !== undefined) node.className = className\n return node\n}\n\ninterface MobileSwitchComputerCopy {\n readonly title: string\n readonly description: string\n readonly action: string\n readonly busy: string\n readonly retry: string\n readonly error: string\n}\n\nfunction mobileSwitchComputerCopy(locale: MobileControlLocale): MobileSwitchComputerCopy {\n if (locale === 'zh') return {\n title: '切换电脑',\n description: '返回已配对设备列表,选择要打开的电脑。',\n action: '切换电脑',\n busy: '正在切换…',\n retry: '重试',\n error: '切换失败,请重试。',\n }\n if (locale === 'it') return {\n title: 'Cambia computer',\n description: 'Torna all’elenco dei computer associati e scegli quale aprire.',\n action: 'Cambia computer',\n busy: 'Cambio in corso…',\n retry: 'Riprova',\n error: 'Cambio non riuscito. Riprova.',\n }\n return {\n title: 'Switch computer',\n description: 'Return to the paired-device list and choose a computer to open.',\n action: 'Switch computer',\n busy: 'Switching…',\n retry: 'Retry',\n error: 'Could not switch computers. Try again.',\n }\n}\n\n/** Render the native-app-only action in DSH's General settings row style. */\nfunction MobileSwitchComputerRow(): unknown {\n const [nativeReady, setNativeReady] = useState(false)\n const [state, setState] = useState<'idle' | 'busy' | 'error'>('idle')\n useEffect(() => {\n let disposed = false\n const checkNativeAction = (): void => {\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge === undefined) {\n setNativeReady(false)\n return\n }\n void Promise.resolve().then(() => bridge.capabilities()).then(capabilities => {\n if (!disposed) setNativeReady(capabilities.includes('mobile.switch-computer'))\n }, () => {\n if (!disposed) setNativeReady(false)\n })\n }\n checkNativeAction()\n window.addEventListener('dsh-mobile-native-ready', checkNativeAction)\n return () => {\n disposed = true\n window.removeEventListener('dsh-mobile-native-ready', checkNativeAction)\n }\n }, [])\n if (!nativeReady) return null\n const locale = selectedMobileControlLocale()\n const copy = mobileSwitchComputerCopy(locale)\n const invoke = (): void => {\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge === undefined || state === 'busy') return\n setState('busy')\n // The native action normally replaces this WebView immediately; only a\n // rejected request needs to remain visible in the settings row.\n void bridge.invoke('mobile.switch-computer', {}).catch(() => { setState('error') })\n }\n return createElement('div', { className: 'dsh-mobile-settings_row', lang: locale },\n createElement('div', { className: 'dsh-mobile-settings_rowText' },\n createElement('div', { className: 'dsh-mobile-settings_title' }, copy.title),\n createElement('div', { className: 'dsh-mobile-settings_desc', 'aria-live': 'polite' }, state === 'error' ? copy.error : copy.description),\n ),\n createElement('button', {\n type: 'button',\n className: 'dsh-mobile-settings_selector',\n disabled: state === 'busy',\n 'aria-busy': state === 'busy' ? 'true' : undefined,\n onClick: invoke,\n }, state === 'busy' ? copy.busy : state === 'error' ? copy.retry : copy.action),\n )\n}\n\nconst CONTROL_REQUEST_TIMEOUT_MS = 15_000\nconst LONG_CONTROL_REQUEST_TIMEOUT_MS = 210_000\nconst GITHUB_RELEASES_URL = 'https://github.com/saya-ch/dsh-mobile/releases'\nconst CONTROL_PANEL_ID = 'dsh-mobile-control-panel'\n\nexport interface ClientReleaseInfo {\n readonly updateAvailable: boolean\n readonly latestVersion?: string\n readonly androidVersion?: string\n readonly androidDownloadUrl: string\n /** Trimmed release notes body for the preview card (best effort). */\n readonly releaseNotes?: string\n}\n\nfunction releaseVersion(value: unknown): string | undefined {\n return typeof value === 'string'\n && /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/u.test(value)\n ? value\n : undefined\n}\n\n/** Reduce the loopback release response to trusted text and download metadata. */\nexport function clientReleaseInfo(data: Readonly<Record<string, unknown>>): ClientReleaseInfo {\n const latestVersion = releaseVersion(data.latestVersion)\n const androidVersion = releaseVersion(data.androidVersion)\n const expectedAndroidDownloadUrl = androidVersion === undefined\n ? undefined\n : `${GITHUB_RELEASES_URL}/download/v${androidVersion}/dsh-mobile-android-v${androidVersion}.apk`\n const androidDownloadUrl = expectedAndroidDownloadUrl !== undefined && data.androidDownloadUrl === expectedAndroidDownloadUrl\n ? expectedAndroidDownloadUrl\n : GITHUB_RELEASES_URL\n return {\n updateAvailable: data.updateAvailable === true && latestVersion !== undefined,\n ...(latestVersion === undefined ? {} : { latestVersion }),\n ...(androidVersion === undefined ? {} : { androidVersion }),\n androidDownloadUrl,\n ...(typeof data.releaseNotes === 'string' && data.releaseNotes !== '' ? { releaseNotes: data.releaseNotes.slice(0, 4000) } : {}),\n }\n}\n\nasync function requestJson(\n path: string,\n init?: RequestInit,\n timeoutMs = CONTROL_REQUEST_TIMEOUT_MS,\n): Promise<Record<string, unknown>> {\n const controller = new AbortController()\n const upstreamSignal = init?.signal\n const abortFromUpstream = (): void => { controller.abort(upstreamSignal?.reason) }\n if (upstreamSignal?.aborted === true) abortFromUpstream()\n else upstreamSignal?.addEventListener('abort', abortFromUpstream, { once: true })\n const timer = window.setTimeout(() => { controller.abort() }, timeoutMs)\n try {\n const response = await fetch(path, {\n ...init,\n signal: controller.signal,\n headers: { 'content-type': 'application/json', ...init?.headers },\n })\n const body = await response.json() as Record<string, unknown>\n if (!response.ok) throw new Error(typeof body.error === 'string' ? body.error : `HTTP ${String(response.status)}`)\n return body\n } catch (error) {\n if (controller.signal.aborted && upstreamSignal?.aborted !== true) {\n throw new Error(controlTranslator()('requestTimeout'))\n }\n throw error\n } finally {\n clearTimeout(timer)\n upstreamSignal?.removeEventListener('abort', abortFromUpstream)\n }\n}\n\nfunction officialFunnelSetupUrl(value: unknown): string {\n if (typeof value !== 'string' || value.length > 2048) return ''\n let url: URL\n try { url = new URL(value) } catch { return '' }\n const normalized = url.toString().replace(/\\/$/u, '')\n if (normalized === 'https://tailscale.com/s/no-funnel' || normalized === 'https://tailscale.com/s/https') return normalized\n if (url.protocol !== 'https:' || url.hostname !== 'login.tailscale.com' || url.port !== ''\n || url.username !== '' || url.password !== '') return ''\n return url.toString()\n}\n\n/** Build the copy-only restricted VPS template without sending the token to the host API. */\nexport function createFrpServerTemplateForClipboard(serverPort: number, token: string, publicOrigin: string): string {\n return createRestrictedFrpServerTemplate(serverPort, token, publicOrigin)\n}\n\nconst ORIGIN_ERROR_MESSAGE_KEYS: Readonly<Record<string, string>> = {\n origin_public_origin_invalid: 'originPublicOriginInvalid',\n origin_listen_host_invalid: 'originListenHostInvalid',\n origin_listen_port_invalid: 'originListenPortInvalid',\n origin_listen_port_reserved: 'originListenPortReserved',\n origin_allowed_cidrs_invalid: 'originAllowedCidrsInvalid',\n origin_settings_invalid: 'originSettingsInvalid',\n origin_config_missing: 'originConfigMissing',\n origin_config_invalid: 'originConfigInvalid',\n origin_config_target_invalid: 'originConfigTargetInvalid',\n origin_controller_unavailable: 'originControllerUnavailable',\n origin_listen_port_in_use: 'originPortInUse',\n origin_listen_address_unavailable: 'originAddressUnavailable',\n origin_gateway_start_failed: 'originStartFailed',\n}\n\nfunction installControl(): { remove: () => void; toggle: () => void; isOpen: () => boolean } {\n /**\n * Provider failure codes to message keys.\n *\n * Kept as keys rather than translated text so the same table can serve both the\n * status repaint and a failed request: a server rejection carries its code in\n * `error.message`, and showing that raw would print `Error: cloudflared_...` in\n * every language while the translated sentence sat unreachable.\n */\n const REMOTE_ERROR_MESSAGE_KEYS: Readonly<Record<string, string>> = {\n funnel_permission_required: 'funnelPermission',\n funnel_https_required: 'funnelHttps',\n funnel_start_failed: 'funnelStart',\n funnel_start_timeout: 'funnelTimeout',\n tailscale_dns_missing: 'tailscaleDnsMissing',\n gateway_start_failed: 'gatewayStartFailed',\n control_channel_failed: 'controlChannelFailed',\n cpolar_component_missing: 'cpolarMissing',\n cpolar_component_invalid: 'cpolarInvalid',\n cpolar_config_missing: 'cpolarConfigMissing',\n cpolar_config_invalid: 'cpolarConfigInvalid',\n cpolar_port_unavailable: 'cpolarPortUnavailable',\n cpolar_launch_failed: 'cpolarLaunchFailed',\n cpolar_start_timeout: 'cpolarTimeout',\n cpolar_stopped: 'cpolarStopped',\n cpolar_exited: 'cpolarExited',\n cpolar_invalid_output: 'cpolarOutputInvalid',\n cpolar_invalid_origin: 'cpolarOriginInvalid',\n cloudflared_component_missing: 'cloudflaredMissing',\n cloudflared_component_invalid: 'cloudflaredInvalid',\n cloudflared_port_unavailable: 'cloudflaredPortUnavailable',\n cloudflared_launch_failed: 'cloudflaredLaunchFailed',\n cloudflared_start_timeout: 'cloudflaredTimeout',\n cloudflared_stopped: 'cloudflaredStopped',\n cloudflared_exited: 'cloudflaredExited',\n cloudflared_invalid_output: 'cloudflaredOutputInvalid',\n cloudflared_invalid_origin: 'cloudflaredOriginInvalid',\n cloudflared_tunnel_port_unavailable: 'cloudflaredTunnelPortUnavailable',\n cloudflared_tunnel_hostname_invalid: 'cloudflaredTunnelHostnameInvalid',\n cloudflared_tunnel_port_invalid: 'cloudflaredTunnelPortInvalid',\n cloudflared_tunnel_port_reserved: 'cloudflaredTunnelPortReserved',\n cloudflared_tunnel_token_invalid: 'cloudflaredTunnelTokenInvalid',\n cloudflared_tunnel_settings_invalid: 'cloudflaredTunnelSettingsInvalid',\n cloudflared_tunnel_config_missing: 'cloudflaredTunnelConfigMissing',\n cloudflared_tunnel_config_invalid: 'cloudflaredTunnelInvalid',\n cloudflared_tunnel_target_invalid: 'cloudflaredTunnelTargetInvalid',\n cloudflared_component_unsupported: 'cloudflaredComponentUnsupported',\n cloudflared_download_hash_mismatch: 'cloudflaredDownloadHashMismatch',\n cloudflared_download_size_mismatch: 'cloudflaredDownloadSizeMismatch',\n cloudflared_executable_hash_mismatch: 'cloudflaredExecutableHashMismatch',\n cloudflared_download_redirect_missing: 'cloudflaredDownloadRedirectMissing',\n cloudflared_download_redirect_invalid: 'cloudflaredDownloadRedirectInvalid',\n cloudflared_download_redirect_rejected: 'cloudflaredDownloadRedirectRejected',\n cloudflared_port_reservation_failed: 'cloudflaredPortReservationFailed',\n frp_component_missing: 'frpMissing',\n frp_component_invalid: 'frpInvalid',\n frp_config_missing: 'frpConfigMissing',\n frp_config_verify_failed: 'frpConfigVerifyFailed',\n frp_vhost_publicly_reachable: 'frpVhostPublic',\n frp_vhost_probe_failed: 'frpVhostProbeFailed',\n frp_launch_failed: 'frpLaunchFailed',\n frp_start_timeout: 'frpTimeout',\n frp_discovery_mismatch: 'frpDiscoveryMismatch',\n frp_discovery_invalid: 'frpDiscoveryInvalid',\n frp_stopped: 'frpStopped',\n frp_exited: 'frpExited',\n ...ORIGIN_ERROR_MESSAGE_KEYS,\n }\n\n /** The table above, translated, for the status repaint. */\n const translatedRemoteErrors = (): Record<string, string> =>\n Object.fromEntries(Object.entries(REMOTE_ERROR_MESSAGE_KEYS).map(([code, key]) => [code, t(key)]))\n\n /**\n * Text for a failed control request.\n *\n * A rejection carries its code in `error.message`, so a known code renders its\n * translated sentence; only an unrecognized one falls back to the generic message,\n * and it shows the bare message rather than a stringified Error.\n */\n const remoteFailureTextFor = (error: unknown, fallbackKey: string): string => {\n const message = error instanceof Error ? error.message : String(error)\n const key = REMOTE_ERROR_MESSAGE_KEYS[message]\n return key === undefined ? t(fallbackKey, { error: message }) : t(key)\n }\n const locale = selectedMobileControlLocale()\n const localeTag = locale === 'it' ? 'it-IT' : locale === 'zh' ? 'zh-CN' : 'en-US'\n const t = controlTranslator(locale)\n const lifecycle = new AbortController()\n const controlRequestJson = (path: string, init?: RequestInit, timeoutMs?: number): Promise<Record<string, unknown>> => requestJson(path, { ...init, signal: lifecycle.signal }, timeoutMs)\n const root = element('div', 'dsh-mobile-control'); root.lang = locale\n const panel = element('section', 'dsh-mobile-control__panel'); panel.id = CONTROL_PANEL_ID; panel.hidden = true; panel.lang = locale\n panel.setAttribute('aria-label', t('mobileAccess'))\n const header = element('header', 'dsh-mobile-control__header')\n const title = element('h2'); title.textContent = t('mobileAccess')\n const headerActions = element('div', 'dsh-mobile-control__header-actions')\n const updatePlugin = element('button', 'dsh-mobile-control__update-plugin'); updatePlugin.type = 'button'; updatePlugin.textContent = t('updatePlugin'); updatePlugin.hidden = true\n // Preview card shown before applying an update: what’s new + notices, then confirm.\n const updateCard = element('div', 'dsh-mobile-control__update-card'); updateCard.hidden = true\n const updateCardTitle = element('div', 'dsh-mobile-control__update-card-title')\n const updateCardNotes = element('pre', 'dsh-mobile-control__update-notes'); updateCardNotes.setAttribute('tabindex', '0')\n const updateCardNotice = element('p', 'dsh-mobile-control__update-notice'); updateCardNotice.textContent = t('updateNotice')\n const updateActions = element('div', 'dsh-mobile-control__update-actions')\n const updateNow = element('button', 'dsh-mobile-control__primary'); updateNow.type = 'button'; updateNow.textContent = t('updateNow')\n const updateLater = element('button', 'dsh-mobile-control__secondary'); updateLater.type = 'button'; updateLater.textContent = t('updateLater')\n updateActions.append(updateLater, updateNow); updateCard.append(updateCardTitle, updateCardNotes, updateCardNotice, updateActions)\n const diagnosticsEntry = element('button', 'dsh-mobile-control__diagnostic-entry'); diagnosticsEntry.type = 'button'; diagnosticsEntry.textContent = t('diagnostics'); diagnosticsEntry.setAttribute('aria-label', t('openDiagnostics')); diagnosticsEntry.setAttribute('aria-pressed', 'false')\n const close = element('button', 'dsh-mobile-control__close'); close.type = 'button'; close.textContent = '×'; close.setAttribute('aria-label', t('collapseMobileAccess'))\n headerActions.append(updatePlugin, diagnosticsEntry, close)\n const releaseNotice = element('p', 'dsh-mobile-control__release-notice'); releaseNotice.hidden = true; releaseNotice.setAttribute('role', 'status'); releaseNotice.setAttribute('aria-live', 'polite')\n const appDownload = element('a', 'dsh-mobile-control__app-download'); appDownload.href = GITHUB_RELEASES_URL; appDownload.target = '_blank'; appDownload.rel = 'noopener noreferrer'; appDownload.textContent = t('downloadAndroid'); appDownload.setAttribute('aria-label', t('downloadAndroidAria'))\n const switcher = element('div', 'dsh-mobile-control__switcher')\n const lanTab = element('button', 'dsh-mobile-control__tab is-active'); lanTab.type = 'button'; lanTab.textContent = t('lan')\n const remoteTab = element('button', 'dsh-mobile-control__tab'); remoteTab.type = 'button'; remoteTab.textContent = t('remote')\n lanTab.setAttribute('aria-pressed', 'true'); remoteTab.setAttribute('aria-pressed', 'false'); switcher.append(lanTab, remoteTab)\n const lanView = element('div', 'dsh-mobile-control__view')\n const lanSetup = element('section', 'dsh-mobile-control__lan-setup'); lanSetup.hidden = true\n const lanSetupTitle = element('h3', 'dsh-mobile-control__section-title'); lanSetupTitle.textContent = t('lanSetupTitle')\n const lanSetupIntro = element('p', 'dsh-mobile-control__intro'); lanSetupIntro.textContent = t('lanSetupIntro')\n const lanSetupForm = element('div', 'dsh-mobile-control__lan-setup-form')\n const lanSetupLabel = element('label', 'dsh-mobile-control__field'); lanSetupLabel.textContent = t('lanSetupNetwork')\n const lanSetupSelect = element('select'); lanSetupSelect.setAttribute('aria-label', t('lanSetupNetwork'))\n const lanSetupNote = element('p', 'dsh-mobile-control__component-note'); lanSetupNote.textContent = t('lanSetupFirewallNote')\n const lanSetupActions = element('div', 'dsh-mobile-control__lan-setup-actions')\n const lanSetupRefresh = element('button', 'dsh-mobile-control__secondary'); lanSetupRefresh.type = 'button'; lanSetupRefresh.textContent = t('lanSetupRefresh')\n const lanSetupConfigure = element('button', 'dsh-mobile-control__primary'); lanSetupConfigure.type = 'button'; lanSetupConfigure.textContent = t('lanSetupConfigure')\n const lanSetupStatus = element('p', 'dsh-mobile-control__status'); lanSetupStatus.setAttribute('role', 'status'); lanSetupStatus.setAttribute('aria-live', 'polite')\n lanSetupLabel.append(lanSetupSelect); lanSetupActions.append(lanSetupRefresh, lanSetupConfigure); lanSetupForm.append(lanSetupLabel, lanSetupNote, lanSetupActions); lanSetup.append(lanSetupTitle, lanSetupIntro, lanSetupForm, lanSetupStatus)\n const access = element('div', 'dsh-mobile-control__access'); access.hidden = true\n const accessLabel = element('span', 'dsh-mobile-control__access-label'); accessLabel.textContent = t('browserAccess')\n const accessLink = element('a', 'dsh-mobile-control__access-link'); accessLink.target = '_blank'; accessLink.rel = 'noreferrer'\n access.append(accessLabel, accessLink)\n const qrBox = element('div', 'dsh-mobile-control__qr'); qrBox.hidden = true\n const status = element('p', 'dsh-mobile-control__status'); status.textContent = t('loadingStatus')\n const extensionStatus = element('p', 'dsh-mobile-control__extensions'); extensionStatus.hidden = true\n const actions = element('div', 'dsh-mobile-control__actions')\n const toggle = element('button', 'dsh-mobile-control__secondary'); toggle.type = 'button'\n const pair = element('button', 'dsh-mobile-control__primary'); pair.type = 'button'; pair.textContent = t('generateCopyKey')\n const linkPair = element('button', 'dsh-mobile-control__secondary'); linkPair.type = 'button'; linkPair.textContent = t('copyPairLink')\n const manageRow = element('div', 'dsh-mobile-control__manage-row')\n const manageDevices = element('button', 'dsh-mobile-control__manage'); manageDevices.type = 'button'; manageDevices.textContent = t('managePairedDevices')\n const resetAll = element('button', 'dsh-mobile-control__manage'); resetAll.type = 'button'; resetAll.textContent = t('clearAllDevices')\n manageRow.append(manageDevices, resetAll)\n const devicePanel = element('div', 'dsh-mobile-control__devices'); devicePanel.hidden = true\n const remoteView = element('div', 'dsh-mobile-control__view is-remote'); remoteView.hidden = true\n const remoteIntro = element('p', 'dsh-mobile-control__intro'); remoteIntro.textContent = t('remoteIntro')\n const httpFrameWarning = element('p', 'dsh-mobile-control__http-frame-warning'); httpFrameWarning.textContent = t('httpFrameWarning'); httpFrameWarning.hidden = location.protocol !== 'https:'; httpFrameWarning.setAttribute('role', 'note')\n const providerSection = element('section', 'dsh-mobile-control__provider-section')\n const providerHeading = element('h3', 'dsh-mobile-control__section-title'); providerHeading.textContent = t('chooseProvider')\n const providerInfo = element('div', 'dsh-mobile-control__provider-info')\n const providerInfoButton = element('button', 'dsh-mobile-control__provider-info-button'); providerInfoButton.type = 'button'; providerInfoButton.setAttribute('aria-label', t('providerInfoAria')); providerInfoButton.setAttribute('aria-expanded', 'false'); providerInfoButton.setAttribute('aria-controls', 'dsh-mobile-provider-info'); providerInfoButton.setAttribute('aria-describedby', 'dsh-mobile-provider-info')\n const providerInfoGlyph = element('span', 'dsh-mobile-control__provider-info-glyph'); providerInfoGlyph.textContent = 'i'; providerInfoGlyph.setAttribute('aria-hidden', 'true')\n const providerInfoPopover = element('div', 'dsh-mobile-control__provider-info-popover'); providerInfoPopover.id = 'dsh-mobile-provider-info'; providerInfoPopover.setAttribute('role', 'tooltip'); providerInfoPopover.hidden = true\n const providerInfoTitle = element('strong'); providerInfoTitle.textContent = t('providerSafeTitle')\n const providerInfoText = element('span'); providerInfoText.textContent = t('providerSafeText')\n providerInfoButton.append(providerInfoGlyph); providerInfoPopover.append(providerInfoTitle, providerInfoText); providerInfo.append(providerInfoButton, providerInfoPopover)\n const providerChoices = element('div', 'dsh-mobile-control__provider-choices'); providerChoices.setAttribute('role', 'radiogroup'); providerChoices.setAttribute('aria-label', t('providerGroupAria'))\n const tailscaleChoice = element('button', 'dsh-mobile-control__provider'); tailscaleChoice.type = 'button'; tailscaleChoice.setAttribute('role', 'radio'); tailscaleChoice.setAttribute('aria-checked', 'true')\n const tailscaleChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const tailscaleChoiceName = element('strong'); tailscaleChoiceName.textContent = 'Tailscale Funnel'\n const tailscaleChoiceBadge = element('span', 'dsh-mobile-control__provider-badge'); tailscaleChoiceBadge.textContent = t('builtIn')\n const tailscaleChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); tailscaleChoiceDescription.textContent = t('tailscaleDescription')\n tailscaleChoiceTop.append(tailscaleChoiceName, tailscaleChoiceBadge); tailscaleChoice.append(tailscaleChoiceTop, tailscaleChoiceDescription)\n const cpolarChoice = element('button', 'dsh-mobile-control__provider'); cpolarChoice.type = 'button'; cpolarChoice.setAttribute('role', 'radio'); cpolarChoice.setAttribute('aria-checked', 'false')\n const cpolarChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const cpolarChoiceName = element('strong'); cpolarChoiceName.textContent = 'cpolar'\n const cpolarChoiceBadge = element('span', 'dsh-mobile-control__provider-badge is-cpolar'); cpolarChoiceBadge.textContent = t('mainlandPreferred')\n const cpolarChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); cpolarChoiceDescription.textContent = t('cpolarDescription')\n cpolarChoiceTop.append(cpolarChoiceName, cpolarChoiceBadge); cpolarChoice.append(cpolarChoiceTop, cpolarChoiceDescription)\n const cloudflaredChoice = element('button', 'dsh-mobile-control__provider'); cloudflaredChoice.type = 'button'; cloudflaredChoice.setAttribute('role', 'radio'); cloudflaredChoice.setAttribute('aria-checked', 'false')\n const cloudflaredChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const cloudflaredChoiceName = element('strong'); cloudflaredChoiceName.textContent = 'cloudflared'\n const cloudflaredChoiceBadge = element('span', 'dsh-mobile-control__provider-badge'); cloudflaredChoiceBadge.textContent = t('cloudflaredBadge')\n const cloudflaredChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); cloudflaredChoiceDescription.textContent = t('cloudflaredDescription')\n cloudflaredChoiceTop.append(cloudflaredChoiceName, cloudflaredChoiceBadge); cloudflaredChoice.append(cloudflaredChoiceTop, cloudflaredChoiceDescription)\n providerChoices.append(cpolarChoice, cloudflaredChoice, tailscaleChoice)\n // ARIA radios normally move focus and selection together, but choosing a provider switches\n // the remote channel behind a confirmation. The arrow keys therefore move focus only, Enter\n // or Space performs the guarded selection, and the group keeps a single tab stop.\n const providerCardOrder = [cpolarChoice, cloudflaredChoice, tailscaleChoice]\n providerChoices.addEventListener('keydown', event => {\n const step = event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 1\n : event.key === 'ArrowLeft' || event.key === 'ArrowUp' ? -1 : 0\n const jump = event.key === 'Home' ? 0 : event.key === 'End' ? providerCardOrder.length - 1 : undefined\n if (step === 0 && jump === undefined) return\n const current = providerCardOrder.indexOf(document.activeElement as HTMLButtonElement)\n if (current < 0) return\n const next = jump ?? (current + step + providerCardOrder.length) % providerCardOrder.length\n event.preventDefault()\n providerCardOrder[next]?.focus()\n })\n const cpolarSetup = element('section', 'dsh-mobile-control__cpolar-setup'); cpolarSetup.hidden = true\n const cpolarSetupTitle = element('h3', 'dsh-mobile-control__section-title'); cpolarSetupTitle.textContent = t('prepareCpolar')\n const cpolarComponentStatus = element('p', 'dsh-mobile-control__component-status'); cpolarComponentStatus.textContent = t('checkingComponent')\n const cpolarInstall = element('button', 'dsh-mobile-control__primary'); cpolarInstall.type = 'button'; cpolarInstall.textContent = t('installOfficial')\n const cpolarAccount = element('div', 'dsh-mobile-control__cpolar-account'); cpolarAccount.hidden = true\n const cpolarAccountText = element('p', 'dsh-mobile-control__component-note'); cpolarAccountText.textContent = t('cpolarAccountNote')\n const cpolarAccountLinks = element('div', 'dsh-mobile-control__link-row')\n const cpolarSignup = element('a', 'dsh-mobile-control__text-link'); cpolarSignup.href = 'https://dashboard.cpolar.com/signup'; cpolarSignup.target = '_blank'; cpolarSignup.rel = 'noopener noreferrer'; cpolarSignup.textContent = t('registerCpolar')\n const cpolarDashboard = element('a', 'dsh-mobile-control__text-link'); cpolarDashboard.href = 'https://dashboard.cpolar.com/auth'; cpolarDashboard.target = '_blank'; cpolarDashboard.rel = 'noopener noreferrer'; cpolarDashboard.textContent = t('openDashboard')\n cpolarAccountLinks.append(cpolarSignup, cpolarDashboard)\n const cpolarTokenLabel = element('label', 'dsh-mobile-control__token-label'); cpolarTokenLabel.textContent = 'Authtoken'\n const cpolarToken = element('input', 'dsh-mobile-control__token'); cpolarToken.type = 'password'; cpolarToken.autocomplete = 'off'; cpolarToken.spellcheck = false; cpolarToken.placeholder = t('tokenPlaceholder'); cpolarTokenLabel.append(cpolarToken)\n const cpolarConfigure = element('button', 'dsh-mobile-control__primary dsh-mobile-control__cpolar-connect'); cpolarConfigure.type = 'button'; cpolarConfigure.textContent = t('saveConnect')\n cpolarAccount.append(cpolarAccountText, cpolarAccountLinks, cpolarTokenLabel, cpolarConfigure)\n const cpolarDetails = element('details', 'dsh-mobile-control__details')\n const cpolarDetailsSummary = element('summary'); cpolarDetailsSummary.textContent = t('componentDetails')\n const cpolarDetailsBody = element('div', 'dsh-mobile-control__details-body')\n const cpolarDetailsText = element('p'); cpolarDetailsText.textContent = t('componentDetailsText')\n const cpolarStorage = element('code', 'dsh-mobile-control__storage'); cpolarStorage.textContent = t('pluginPrivateDirectory')\n const cpolarOfficial = element('a', 'dsh-mobile-control__text-link'); cpolarOfficial.href = 'https://www.cpolar.com/download'; cpolarOfficial.target = '_blank'; cpolarOfficial.rel = 'noopener noreferrer'; cpolarOfficial.textContent = t('officialDownload')\n const cpolarTerms = element('a', 'dsh-mobile-control__text-link'); cpolarTerms.href = 'https://www.cpolar.com/tos'; cpolarTerms.target = '_blank'; cpolarTerms.rel = 'noopener noreferrer'; cpolarTerms.textContent = t('terms')\n const cpolarPurge = element('button', 'dsh-mobile-control__danger'); cpolarPurge.type = 'button'; cpolarPurge.textContent = t('purgeCpolar')\n cpolarDetailsBody.append(cpolarDetailsText, cpolarStorage, cpolarOfficial, cpolarTerms, cpolarPurge); cpolarDetails.append(cpolarDetailsSummary, cpolarDetailsBody)\n cpolarSetup.append(cpolarSetupTitle, cpolarComponentStatus, cpolarInstall, cpolarAccount, cpolarDetails)\n // Share the managed-component setup layout: a quick tunnel has no account\n // section, so only the install action, the temporary-address warning, and the\n // component source/cleanup disclosure remain.\n const cloudflaredSetup = element('section', 'dsh-mobile-control__cpolar-setup dsh-mobile-control__cloudflared-setup'); cloudflaredSetup.hidden = true\n const cloudflaredSetupTitle = element('h3', 'dsh-mobile-control__section-title'); cloudflaredSetupTitle.textContent = t('prepareCloudflared')\n // Tunnel type comes first: it decides whether an account token is needed at all,\n // while the component below is required either way.\n const cloudflaredTunnelTitle = element('h3', 'dsh-mobile-control__section-title'); cloudflaredTunnelTitle.textContent = t('cloudflaredTunnelTitle')\n const cloudflaredMode = element('div', 'dsh-mobile-control__switcher')\n const cloudflaredModeQuick = element('button', 'dsh-mobile-control__tab is-active'); cloudflaredModeQuick.type = 'button'; cloudflaredModeQuick.textContent = t('cloudflaredTunnelQuick')\n const cloudflaredModeNamed = element('button', 'dsh-mobile-control__tab'); cloudflaredModeNamed.type = 'button'; cloudflaredModeNamed.textContent = t('cloudflaredTunnelNamed')\n cloudflaredMode.append(cloudflaredModeQuick, cloudflaredModeNamed)\n const cloudflaredModeHint = element('p', 'dsh-mobile-control__component-status'); cloudflaredModeHint.textContent = t('cloudflaredTunnelQuickHint')\n const cloudflaredTunnel = element('div', 'dsh-mobile-control__tunnel'); cloudflaredTunnel.hidden = true\n const cloudflaredTunnelFields = element('div', 'dsh-mobile-control__frp-fields')\n const cloudflaredHostnameLabel = element('label', 'dsh-mobile-control__field'); cloudflaredHostnameLabel.textContent = t('cloudflaredTunnelHostname')\n const cloudflaredHostname = element('input'); cloudflaredHostname.type = 'text'; cloudflaredHostname.autocomplete = 'off'; cloudflaredHostname.spellcheck = false; cloudflaredHostname.placeholder = t('cloudflaredTunnelHostnamePlaceholder')\n const cloudflaredPortLabel = element('label', 'dsh-mobile-control__field'); cloudflaredPortLabel.textContent = t('cloudflaredTunnelPort')\n const cloudflaredPort = element('input'); cloudflaredPort.type = 'number'; cloudflaredPort.inputMode = 'numeric'; cloudflaredPort.min = '1024'; cloudflaredPort.max = '65535'; cloudflaredPort.value = '3444'\n const cloudflaredTokenLabel = element('label', 'dsh-mobile-control__field'); cloudflaredTokenLabel.textContent = t('cloudflaredTunnelToken')\n const cloudflaredToken = element('input'); cloudflaredToken.type = 'password'; cloudflaredToken.autocomplete = 'off'; cloudflaredToken.spellcheck = false; cloudflaredToken.placeholder = t('cloudflaredTunnelTokenPlaceholder')\n cloudflaredHostnameLabel.append(cloudflaredHostname); cloudflaredPortLabel.append(cloudflaredPort); cloudflaredTokenLabel.append(cloudflaredToken)\n cloudflaredTunnelFields.append(cloudflaredHostnameLabel, cloudflaredPortLabel, cloudflaredTokenLabel)\n const cloudflaredTunnelStatus = element('p', 'dsh-mobile-control__component-status'); cloudflaredTunnelStatus.textContent = t('cloudflaredTunnelMissing')\n const cloudflaredTunnelHint = element('p', 'dsh-mobile-control__component-status'); cloudflaredTunnelHint.textContent = t('cloudflaredTunnelHint', { port: '3444' })\n const cloudflaredTunnelSave = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); cloudflaredTunnelSave.type = 'button'; cloudflaredTunnelSave.textContent = t('cloudflaredTunnelSave')\n /** The button commits the shown mode, so quick mode must not promise to save settings. */\n const cloudflaredSaveLabel = (): string => (cloudflaredModeDraft ?? cloudflaredTunnelMode) === 'named'\n ? t('cloudflaredTunnelSave') : t('cloudflaredTunnelSaveQuick')\n const cloudflaredTunnelForget = element('button', 'dsh-mobile-control__danger dsh-mobile-control__frp-action'); cloudflaredTunnelForget.type = 'button'; cloudflaredTunnelForget.textContent = t('cloudflaredTunnelForget'); cloudflaredTunnelForget.hidden = true\n // Only the named-tunnel inputs live in this container. Save and Forget stay\n // outside it: Save is also how a quick tunnel is committed, so hiding the\n // container must never take the only way to submit the form with it.\n cloudflaredTunnel.append(cloudflaredTunnelFields, cloudflaredTunnelStatus, cloudflaredTunnelHint)\n const cloudflaredComponentStatus = element('p', 'dsh-mobile-control__component-status'); cloudflaredComponentStatus.textContent = t('checkingComponent')\n const cloudflaredInstall = element('button', 'dsh-mobile-control__primary'); cloudflaredInstall.type = 'button'; cloudflaredInstall.textContent = t('installOfficial')\n const cloudflaredNote = element('p', 'dsh-mobile-control__origin-warning'); cloudflaredNote.textContent = t('cloudflaredQuickNote')\n const cloudflaredDetails = element('details', 'dsh-mobile-control__details')\n const cloudflaredDetailsSummary = element('summary'); cloudflaredDetailsSummary.textContent = t('componentDetails')\n const cloudflaredDetailsBody = element('div', 'dsh-mobile-control__details-body')\n const cloudflaredDetailsText = element('p'); cloudflaredDetailsText.textContent = t('cloudflaredComponentNote')\n const cloudflaredStorage = element('code', 'dsh-mobile-control__storage'); cloudflaredStorage.textContent = t('pluginPrivateDirectory')\n const cloudflaredOfficial = element('a', 'dsh-mobile-control__text-link'); cloudflaredOfficial.href = 'https://github.com/cloudflare/cloudflared/releases'; cloudflaredOfficial.target = '_blank'; cloudflaredOfficial.rel = 'noopener noreferrer'; cloudflaredOfficial.textContent = t('officialDownload')\n const cloudflaredTerms = element('a', 'dsh-mobile-control__text-link'); cloudflaredTerms.href = 'https://www.cloudflare.com/website-terms/'; cloudflaredTerms.target = '_blank'; cloudflaredTerms.rel = 'noopener noreferrer'; cloudflaredTerms.textContent = t('terms')\n const cloudflaredPurge = element('button', 'dsh-mobile-control__danger'); cloudflaredPurge.type = 'button'; cloudflaredPurge.textContent = t('purgeCloudflared')\n cloudflaredDetailsBody.append(cloudflaredDetailsText, cloudflaredStorage, cloudflaredOfficial, cloudflaredTerms, cloudflaredPurge); cloudflaredDetails.append(cloudflaredDetailsSummary, cloudflaredDetailsBody)\n cloudflaredSetup.append(cloudflaredSetupTitle, cloudflaredTunnelTitle, cloudflaredMode, cloudflaredModeHint, cloudflaredTunnel, cloudflaredTunnelSave, cloudflaredTunnelForget, cloudflaredComponentStatus, cloudflaredInstall, cloudflaredNote, cloudflaredDetails)\n const selfHosted = element('details', 'dsh-mobile-control__self-hosted')\n const selfHostedSummary = element('summary', 'dsh-mobile-control__self-hosted-summary')\n const selfHostedSummaryText = element('span')\n const selfHostedSummaryTitle = element('strong'); selfHostedSummaryTitle.textContent = t('selfHostedConnections')\n const selfHostedSummaryDescription = element('span'); selfHostedSummaryDescription.textContent = t('selfHostedDescription')\n const selfHostedBadge = element('span', 'dsh-mobile-control__provider-badge is-frp'); selfHostedBadge.textContent = t('advanced')\n selfHostedSummaryText.append(selfHostedSummaryTitle, selfHostedSummaryDescription); selfHostedSummary.append(selfHostedSummaryText, selfHostedBadge)\n const selfHostedBody = element('div', 'dsh-mobile-control__self-hosted-body')\n const frpChoice = element('button', 'dsh-mobile-control__provider is-frp'); frpChoice.type = 'button'; frpChoice.setAttribute('aria-pressed', 'false')\n const frpChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const frpChoiceName = element('strong'); frpChoiceName.textContent = t('frpName')\n const frpChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); frpChoiceDescription.textContent = t('frpDescription')\n frpChoiceTop.append(frpChoiceName); frpChoice.append(frpChoiceTop, frpChoiceDescription)\n const originChoice = element('button', 'dsh-mobile-control__provider is-origin'); originChoice.type = 'button'; originChoice.setAttribute('aria-pressed', 'false')\n const originChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const originChoiceName = element('strong'); originChoiceName.textContent = t('originName')\n const originChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); originChoiceDescription.textContent = t('originDescription')\n originChoiceTop.append(originChoiceName); originChoice.append(originChoiceTop, originChoiceDescription)\n selfHostedBody.append(frpChoice, originChoice); selfHosted.append(selfHostedSummary, selfHostedBody)\n providerSection.append(providerHeading, providerInfo, providerChoices, selfHosted)\n const frpSetup = element('section', 'dsh-mobile-control__frp-setup'); frpSetup.hidden = true\n const frpSetupTitle = element('h3', 'dsh-mobile-control__section-title'); frpSetupTitle.textContent = t('prepareFrp')\n const frpStep1 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep1Title = element('strong'); frpStep1Title.textContent = t('frpStep1Title')\n const frpStep1Text = element('p'); frpStep1Text.textContent = t('frpStep1Text')\n const frpFields = element('div', 'dsh-mobile-control__frp-fields')\n const frpServerLabel = element('label', 'dsh-mobile-control__field'); frpServerLabel.textContent = t('frpServerAddress')\n const frpServer = element('input'); frpServer.type = 'text'; frpServer.autocomplete = 'off'; frpServer.spellcheck = false; frpServer.placeholder = t('frpServerAddressPlaceholder')\n const frpPortLabel = element('label', 'dsh-mobile-control__field'); frpPortLabel.textContent = t('frpServerPort')\n const frpPort = element('input'); frpPort.type = 'number'; frpPort.inputMode = 'numeric'; frpPort.min = '1'; frpPort.max = '65535'; frpPort.value = '7000'\n const frpTokenLabel = element('label', 'dsh-mobile-control__field'); frpTokenLabel.textContent = t('frpToken')\n const frpToken = element('input'); frpToken.type = 'password'; frpToken.autocomplete = 'off'; frpToken.spellcheck = false; frpToken.placeholder = t('frpTokenPlaceholder')\n const frpOriginLabel = element('label', 'dsh-mobile-control__field'); frpOriginLabel.textContent = t('frpPublicOrigin')\n const frpOrigin = element('input'); frpOrigin.type = 'url'; frpOrigin.autocomplete = 'off'; frpOrigin.spellcheck = false; frpOrigin.placeholder = t('frpPublicOriginPlaceholder')\n frpServerLabel.append(frpServer); frpPortLabel.append(frpPort); frpTokenLabel.append(frpToken); frpOriginLabel.append(frpOrigin)\n frpFields.append(frpServerLabel, frpPortLabel, frpTokenLabel, frpOriginLabel); frpStep1.append(frpStep1Title, frpStep1Text, frpFields)\n const frpStep2 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep2Title = element('strong'); frpStep2Title.textContent = t('frpStep2Title')\n const frpStep2Text = element('p'); frpStep2Text.textContent = t('frpStep2Text')\n const frpCopyTemplate = element('button', 'dsh-mobile-control__secondary dsh-mobile-control__frp-action'); frpCopyTemplate.type = 'button'; frpCopyTemplate.textContent = t('copyServerTemplate')\n const vpsDeployText = element('p'); vpsDeployText.textContent = t('vpsDeployText')\n const vpsChangesTitle = element('p'); vpsChangesTitle.textContent = t('vpsDeployChangesTitle')\n const vpsChanges = element('ul', 'dsh-mobile-control__frp-changes')\n for (const key of ['vpsDeployChangePackages', 'vpsDeployChangeServices', 'vpsDeployChangeFirewall', 'vpsDeployChangeManual'] as const) {\n const item = element('li'); item.textContent = t(key); vpsChanges.append(item)\n }\n const vpsDeployFields = element('div', 'dsh-mobile-control__frp-fields')\n const vpsSshUserLabel = element('label', 'dsh-mobile-control__field'); vpsSshUserLabel.textContent = t('vpsSshUser')\n const vpsSshUser = element('input'); vpsSshUser.type = 'text'; vpsSshUser.autocomplete = 'username'; vpsSshUser.value = 'ubuntu'; vpsSshUser.spellcheck = false\n const vpsSshPortLabel = element('label', 'dsh-mobile-control__field'); vpsSshPortLabel.textContent = t('vpsSshPort')\n const vpsSshPort = element('input'); vpsSshPort.type = 'number'; vpsSshPort.inputMode = 'numeric'; vpsSshPort.min = '1'; vpsSshPort.max = '65535'; vpsSshPort.value = '22'\n const vpsSshKeyLabel = element('label', 'dsh-mobile-control__field'); vpsSshKeyLabel.textContent = t('vpsSshKey')\n const vpsSshKey = element('input'); vpsSshKey.type = 'text'; vpsSshKey.autocomplete = 'off'; vpsSshKey.spellcheck = false; vpsSshKey.placeholder = t('vpsSshKeyPlaceholder')\n vpsSshUserLabel.append(vpsSshUser); vpsSshPortLabel.append(vpsSshPort); vpsSshKeyLabel.append(vpsSshKey)\n vpsDeployFields.append(vpsSshUserLabel, vpsSshPortLabel, vpsSshKeyLabel)\n const vpsDeploy = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); vpsDeploy.type = 'button'; vpsDeploy.textContent = t('vpsDeploy')\n const vpsDeployStatus = element('p', 'dsh-mobile-control__component-status'); vpsDeployStatus.textContent = ''\n const vpsCopyUninstall = element('button', 'dsh-mobile-control__secondary dsh-mobile-control__frp-action'); vpsCopyUninstall.type = 'button'; vpsCopyUninstall.textContent = t('vpsCopyUninstall')\n const vpsUninstall = element('button', 'dsh-mobile-control__danger dsh-mobile-control__frp-action'); vpsUninstall.type = 'button'; vpsUninstall.textContent = t('vpsUninstall')\n frpStep2.append(frpStep2Title, frpStep2Text, frpCopyTemplate, vpsDeployText, vpsChangesTitle, vpsChanges, vpsDeployFields, vpsDeploy, vpsDeployStatus, vpsCopyUninstall, vpsUninstall)\n const frpStep3 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep3Title = element('strong'); frpStep3Title.textContent = t('frpStep3Title')\n const frpStep3Text = element('p'); frpStep3Text.textContent = t('frpStep3Text')\n const frpComponentStatus = element('p', 'dsh-mobile-control__component-status'); frpComponentStatus.textContent = t('checkingComponent')\n const frpInstall = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); frpInstall.type = 'button'; frpInstall.textContent = t('installFrpc')\n frpStep3.append(frpStep3Title, frpStep3Text, frpComponentStatus, frpInstall)\n const frpStep4 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep4Title = element('strong'); frpStep4Title.textContent = t('frpStep4Title')\n const frpStep4Text = element('p'); frpStep4Text.textContent = t('frpStep4Text')\n const frpAppRequirement = element('p', 'dsh-mobile-control__frp-requirement'); frpAppRequirement.textContent = t('frpAppRequirement')\n const frpConfigurationStatus = element('p', 'dsh-mobile-control__component-status'); frpConfigurationStatus.textContent = t('frpConfigurationMissing')\n const frpConfigure = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); frpConfigure.type = 'button'; frpConfigure.textContent = t('frpSaveConnect')\n frpStep4.append(frpStep4Title, frpStep4Text, frpAppRequirement, frpConfigurationStatus, frpConfigure)\n const frpDetails = element('details', 'dsh-mobile-control__details')\n const frpDetailsSummary = element('summary'); frpDetailsSummary.textContent = t('frpComponentDetails')\n const frpDetailsBody = element('div', 'dsh-mobile-control__details-body')\n const frpDetailsText = element('p'); frpDetailsText.textContent = t('frpComponentDetailsText')\n const frpStorage = element('code', 'dsh-mobile-control__storage'); frpStorage.textContent = t('pluginPrivateDirectory')\n const frpOfficial = element('a', 'dsh-mobile-control__text-link'); frpOfficial.href = 'https://github.com/fatedier/frp/releases/tag/v0.70.1'; frpOfficial.target = '_blank'; frpOfficial.rel = 'noopener noreferrer'; frpOfficial.textContent = t('frpOfficialRelease')\n const frpPurge = element('button', 'dsh-mobile-control__danger'); frpPurge.type = 'button'; frpPurge.textContent = t('purgeFrp')\n frpDetailsBody.append(frpDetailsText, frpStorage, frpOfficial, frpPurge); frpDetails.append(frpDetailsSummary, frpDetailsBody)\n const frpOverview = element('section', 'dsh-mobile-control__frp-overview'); frpOverview.hidden = true\n const frpOverviewMark = element('span', 'dsh-mobile-control__frp-overview-mark'); frpOverviewMark.textContent = '✓'\n const frpOverviewBody = element('div', 'dsh-mobile-control__frp-overview-body')\n const frpOverviewTitle = element('strong'); frpOverviewTitle.textContent = t('frpConfigurationReady')\n const frpOverviewEndpoint = element('span'); frpOverviewEndpoint.textContent = ''\n frpOverviewBody.append(frpOverviewTitle, frpOverviewEndpoint); frpOverview.append(frpOverviewMark, frpOverviewBody)\n const frpConnectionGroup = element('details', 'dsh-mobile-control__frp-group')\n const frpConnectionSummary = element('summary'); frpConnectionSummary.textContent = t('frpStep1Title')\n frpConnectionGroup.append(frpConnectionSummary, frpStep1)\n const frpVpsGroup = element('details', 'dsh-mobile-control__frp-group')\n const frpVpsSummary = element('summary'); frpVpsSummary.textContent = t('frpStep2Title')\n frpVpsGroup.append(frpVpsSummary, frpStep2)\n const frpComponentGroup = element('details', 'dsh-mobile-control__frp-group')\n const frpComponentSummary = element('summary'); frpComponentSummary.textContent = t('frpStep3Title')\n frpComponentGroup.append(frpComponentSummary, frpStep3)\n const frpVerifyGroup = element('details', 'dsh-mobile-control__frp-group'); frpVerifyGroup.open = true\n const frpVerifySummary = element('summary'); frpVerifySummary.textContent = t('frpStep4Title')\n frpVerifyGroup.append(frpVerifySummary, frpStep4)\n frpSetup.append(frpSetupTitle, frpOverview, frpConnectionGroup, frpVpsGroup, frpComponentGroup, frpVerifyGroup, frpDetails)\n const originSetup = element('section', 'dsh-mobile-control__origin-setup'); originSetup.hidden = true\n const originSetupTitle = element('h3', 'dsh-mobile-control__section-title'); originSetupTitle.textContent = t('prepareOrigin')\n const originHelp = element('p', 'dsh-mobile-control__component-note'); originHelp.id = 'dsh-mobile-origin-help'; originHelp.textContent = t('originHelp')\n const originWarning = element('p', 'dsh-mobile-control__origin-warning'); originWarning.textContent = t('originWarning')\n const originFields = element('div', 'dsh-mobile-control__origin-fields')\n const originPublicLabel = element('label', 'dsh-mobile-control__field'); originPublicLabel.textContent = t('originPublicOrigin')\n const originPublic = element('input'); originPublic.type = 'url'; originPublic.placeholder = 'https://phone.example.com:8815'; originPublic.maxLength = 512\n const originHostLabel = element('label', 'dsh-mobile-control__field'); originHostLabel.textContent = t('originListenHost')\n const originHost = element('input'); originHost.type = 'text'; originHost.value = '127.0.0.1'; originHost.maxLength = 15\n const originPortLabel = element('label', 'dsh-mobile-control__field'); originPortLabel.textContent = t('originListenPort')\n const originPort = element('input'); originPort.type = 'number'; originPort.inputMode = 'numeric'; originPort.min = '1024'; originPort.max = '65535'; originPort.step = '1'; originPort.value = '3444'\n const originCidrsLabel = element('label', 'dsh-mobile-control__field'); originCidrsLabel.textContent = t('originAllowedCidrs')\n const originCidrs = element('input'); originCidrs.type = 'text'; originCidrs.value = '127.0.0.0/8'; originCidrs.maxLength = 1040\n for (const input of [originPublic, originHost, originPort, originCidrs]) {\n input.required = true; input.autocomplete = 'off'; input.spellcheck = false\n input.setAttribute('aria-describedby', 'dsh-mobile-origin-help dsh-mobile-origin-feedback')\n }\n originPublicLabel.append(originPublic); originHostLabel.append(originHost); originPortLabel.append(originPort); originCidrsLabel.append(originCidrs)\n originFields.append(originPublicLabel, originHostLabel, originPortLabel, originCidrsLabel)\n const originFeedback = element('p', 'dsh-mobile-control__origin-feedback'); originFeedback.id = 'dsh-mobile-origin-feedback'; originFeedback.setAttribute('role', 'status'); originFeedback.setAttribute('aria-live', 'polite'); originFeedback.hidden = true\n const originConfigure = element('button', 'dsh-mobile-control__primary'); originConfigure.type = 'button'; originConfigure.textContent = t('originSaveStart')\n const originPurge = element('button', 'dsh-mobile-control__danger'); originPurge.type = 'button'; originPurge.textContent = t('originPurge'); originPurge.hidden = true\n const originFormActions = element('div', 'dsh-mobile-control__actions'); originFormActions.append(originConfigure, originPurge)\n const originBackend = element('div', 'dsh-mobile-control__origin-backend'); originBackend.hidden = true\n const originBackendLabel = element('span', 'dsh-mobile-control__access-label')\n const originBackendAddress = element('code', 'dsh-mobile-control__storage')\n const originCopyBackend = element('button', 'dsh-mobile-control__secondary'); originCopyBackend.type = 'button'; originCopyBackend.textContent = t('originCopyBackend')\n originBackend.append(originBackendLabel, originBackendAddress, originCopyBackend)\n originSetup.append(originSetupTitle, originHelp, originWarning, originFields, originFeedback, originFormActions, originBackend)\n const tailscaleInfo = element('details', 'dsh-mobile-control__details')\n const tailscaleInfoSummary = element('summary'); tailscaleInfoSummary.textContent = t('tailscaleHelp')\n const tailscaleInfoBody = element('div', 'dsh-mobile-control__details-body')\n const tailscaleInfoText = element('p'); tailscaleInfoText.textContent = t('tailscaleHelpText')\n tailscaleInfoBody.append(tailscaleInfoText); tailscaleInfo.append(tailscaleInfoSummary, tailscaleInfoBody)\n const providerSetupHeader = element('div', 'dsh-mobile-control__stage-header')\n const providerSetupHeading = element('h3', 'dsh-mobile-control__section-title'); providerSetupHeading.textContent = t('currentProvider')\n const providerSetupName = element('span', 'dsh-mobile-control__stage-value'); providerSetupName.textContent = 'Tailscale Funnel'\n const remoteStateBadge = element('span', 'dsh-mobile-control__state-badge'); remoteStateBadge.textContent = t('remoteStateOff')\n const providerSetupMeta = element('div', 'dsh-mobile-control__stage-meta'); providerSetupMeta.append(providerSetupName, remoteStateBadge)\n providerSetupHeader.append(providerSetupHeading, providerSetupMeta)\n const providerSetupBody = element('div', 'dsh-mobile-control__provider-setup-body')\n providerSetupBody.append(cpolarSetup, cloudflaredSetup, frpSetup, originSetup, tailscaleInfo)\n const remoteAccess = element('div', 'dsh-mobile-control__access'); remoteAccess.hidden = true\n const remoteAccessLabel = element('span', 'dsh-mobile-control__access-label'); remoteAccessLabel.textContent = t('remoteAddress')\n const remoteAccessLink = element('a', 'dsh-mobile-control__access-link'); remoteAccessLink.target = '_blank'; remoteAccessLink.rel = 'noreferrer'; remoteAccess.append(remoteAccessLabel, remoteAccessLink)\n const remoteQr = element('div', 'dsh-mobile-control__qr'); remoteQr.hidden = true\n const remoteStatus = element('p', 'dsh-mobile-control__status'); remoteStatus.textContent = t('loadingRemoteStatus'); remoteStatus.setAttribute('aria-live', 'polite')\n const remoteGuide = element('section', 'dsh-mobile-control__guide'); remoteGuide.hidden = true; remoteGuide.setAttribute('aria-label', t('funnelGuideAria'))\n const remoteGuideTitle = element('h3', 'dsh-mobile-control__guide-title'); remoteGuideTitle.textContent = t('funnelGuideTitle')\n const remoteGuideSummary = element('p', 'dsh-mobile-control__guide-summary'); remoteGuideSummary.textContent = t('funnelGuideSummary')\n const remoteGuideSteps = element('ol', 'dsh-mobile-control__guide-steps')\n for (const text of [t('funnelStep1'), t('funnelStep2'), t('funnelStep3')]) {\n const item = element('li'); item.textContent = text; remoteGuideSteps.append(item)\n }\n const remoteGuideNote = element('p', 'dsh-mobile-control__guide-note'); remoteGuideNote.textContent = t('funnelGuideNote')\n const remoteGuideActions = element('div', 'dsh-mobile-control__guide-actions')\n const remoteSetup = element('button', 'dsh-mobile-control__primary'); remoteSetup.type = 'button'; remoteSetup.textContent = t('continueFunnel')\n const remoteSetupRetry = element('button', 'dsh-mobile-control__secondary'); remoteSetupRetry.type = 'button'; remoteSetupRetry.textContent = t('retryNow')\n remoteGuideActions.append(remoteSetup, remoteSetupRetry); remoteGuide.append(remoteGuideTitle, remoteGuideSummary, remoteGuideSteps, remoteGuideNote, remoteGuideActions)\n const remoteActions = element('div', 'dsh-mobile-control__actions')\n const remoteToggle = element('button', 'dsh-mobile-control__primary'); remoteToggle.type = 'button'; remoteToggle.textContent = t('enableRemote')\n const remoteLogin = element('button', 'dsh-mobile-control__primary'); remoteLogin.type = 'button'; remoteLogin.textContent = t('continueLogin'); remoteLogin.hidden = true\n const remoteReconnect = element('button', 'dsh-mobile-control__secondary'); remoteReconnect.type = 'button'; remoteReconnect.textContent = t('reconnect'); remoteReconnect.hidden = true\n const remotePair = element('button', 'dsh-mobile-control__secondary'); remotePair.type = 'button'; remotePair.textContent = t('generateRemoteQr'); remotePair.disabled = true\n const remoteCopyLink = element('button', 'dsh-mobile-control__secondary'); remoteCopyLink.type = 'button'; remoteCopyLink.textContent = t('copyRemoteLink'); remoteCopyLink.disabled = true\n const remotePairLink = element('p', 'dsh-mobile-control__status'); remotePairLink.hidden = true\n let activeRemotePairUrl = ''\n let activeRemotePairExpiresAt = 0\n remoteActions.append(remoteToggle, remoteLogin, remoteReconnect, remotePair, remoteCopyLink)\n const remoteManageRow = element('div', 'dsh-mobile-control__manage-row')\n const remoteDevices = element('button', 'dsh-mobile-control__manage'); remoteDevices.type = 'button'; remoteDevices.textContent = t('manageRemoteDevices'); remoteDevices.disabled = true\n const remoteReset = element('button', 'dsh-mobile-control__manage'); remoteReset.type = 'button'; remoteReset.textContent = t('resetRemoteLogin')\n remoteManageRow.append(remoteDevices, remoteReset)\n const remoteDevicePanel = element('div', 'dsh-mobile-control__devices'); remoteDevicePanel.hidden = true\n const wsPathsSection = element('section', 'dsh-mobile-control__ws-paths')\n const wsPathsTitle = element('h3', 'dsh-mobile-control__section-title'); wsPathsTitle.textContent = t('wsPathsTitle')\n const wsPathsIntro = element('p', 'dsh-mobile-control__intro'); wsPathsIntro.textContent = t('wsPathsIntro')\n const wsPathsDetected = element('div', 'dsh-mobile-control__ws-paths-detected'); wsPathsDetected.hidden = true\n const wsPathsDetectedTitle = element('p', 'dsh-mobile-control__ws-paths-detected-title'); wsPathsDetectedTitle.textContent = t('wsPathsDetected')\n const wsPathsDetectedList = element('ul', 'dsh-mobile-control__ws-paths-list')\n wsPathsDetected.append(wsPathsDetectedTitle, wsPathsDetectedList)\n const wsPathsList = element('ul', 'dsh-mobile-control__ws-paths-list')\n const wsPathsAdvanced = element('details', 'dsh-mobile-control__ws-paths-advanced')\n const wsPathsAdvancedSummary = element('summary'); wsPathsAdvancedSummary.textContent = t('wsPathsAdvancedToggle')\n const wsPathsAdvancedHint = element('p', 'dsh-mobile-control__intro'); wsPathsAdvancedHint.textContent = t('wsPathsAdvancedHint')\n const wsPathsRow = element('div', 'dsh-mobile-control__ws-paths-row')\n const wsPathsInput = element('input', 'dsh-mobile-control__ws-paths-input'); wsPathsInput.type = 'text'; wsPathsInput.placeholder = t('wsPathsPlaceholder'); wsPathsInput.setAttribute('aria-label', t('wsPathsTitle'))\n const wsPathsAdd = element('button', 'dsh-mobile-control__primary'); wsPathsAdd.type = 'button'; wsPathsAdd.textContent = t('wsPathsAdd')\n const wsPathsStatus = element('p', 'dsh-mobile-control__status'); wsPathsStatus.hidden = true; wsPathsStatus.setAttribute('aria-live', 'polite')\n wsPathsRow.append(wsPathsInput, wsPathsAdd)\n wsPathsAdvanced.append(wsPathsAdvancedSummary, wsPathsAdvancedHint, wsPathsRow, wsPathsStatus)\n wsPathsSection.append(wsPathsTitle, wsPathsIntro, wsPathsDetected, wsPathsList, wsPathsAdvanced)\n let wsPathsCurrent: string[] = []\n let wsPathsBlocked: { readonly path: string; readonly attempts: number }[] = []\n let wsPathsLoaded = false\n const renderWsPaths = (paths: readonly string[]): void => {\n wsPathsCurrent = [...paths]\n wsPathsList.replaceChildren()\n if (paths.length === 0) {\n const empty = element('li', 'dsh-mobile-control__ws-paths-empty'); empty.textContent = t('wsPathsEmpty'); wsPathsList.append(empty)\n }\n for (const path of paths) {\n const item = element('li', 'dsh-mobile-control__ws-paths-item')\n const label = element('code'); label.textContent = path\n const remove = element('button', 'dsh-mobile-control__ws-paths-remove'); remove.type = 'button'; remove.textContent = t('wsPathsRemove'); remove.setAttribute('aria-label', `${t('wsPathsRemove')}: ${path}`)\n remove.addEventListener('click', () => { void saveWsPaths(wsPathsCurrent.filter(entry => entry !== path)) })\n item.append(label, remove)\n wsPathsList.append(item)\n }\n }\n const wsGroupOf = (path: string): string => {\n const slash = path.lastIndexOf('/')\n return slash > 0 ? path.slice(0, slash) : '/'\n }\n let wsPathsSeenAttempts = 0\n let wsDotAnnounced = 0\n const wsDotStatus = element('p', 'dsh-mobile-control__ws-sr-status')\n wsDotStatus.setAttribute('role', 'status'); wsDotStatus.setAttribute('aria-atomic', 'true')\n const wsBlockedTotal = (blocked: readonly { readonly attempts: number }[]): number =>\n blocked.reduce((sum, entry) => sum + entry.attempts, 0)\n const renderWsDot = (): void => {\n for (const stale of document.querySelectorAll('.dsh-mobile-control__ws-dot')) stale.remove()\n if (!wsDotStatus.isConnected) root.append(wsDotStatus)\n const pending = wsPathsBlocked.filter(entry => !wsPathsCurrent.includes(entry.path))\n const pendingCount = pending.length\n if (pendingCount === 0 || wsBlockedTotal(wsPathsBlocked) <= wsPathsSeenAttempts) {\n if (pendingCount === 0 && wsDotAnnounced !== 0) { wsDotAnnounced = 0; wsDotStatus.textContent = '' }\n return\n }\n if (wsDotAnnounced !== pendingCount) {\n wsDotAnnounced = pendingCount\n wsDotStatus.textContent = t('wsPathsAnnounce', { n: String(pendingCount) })\n }\n for (const trigger of document.querySelectorAll('.dsh-mobile-control__trigger, .dsh-mobile-control__diagnostic-entry')) {\n const dot = element('span', 'dsh-mobile-control__ws-dot'); dot.textContent = String(pendingCount); dot.title = t('wsPathsNewBlocked'); dot.setAttribute('aria-hidden', 'true')\n dot.addEventListener('click', event => { event.stopPropagation(); setOpen(true); selectView('diagnostics') })\n trigger.append(dot)\n }\n }\n const renderWsBlocked = (blocked: readonly { readonly path: string; readonly attempts: number }[]): void => {\n wsPathsDetectedList.replaceChildren()\n const pending = blocked.filter(entry => !wsPathsCurrent.includes(entry.path))\n wsPathsDetected.hidden = pending.length === 0\n const groups = new Map<string, { readonly path: string; readonly attempts: number }[]>()\n for (const entry of pending) {\n const group = wsGroupOf(entry.path)\n const list = groups.get(group)\n if (list) list.push(entry); else groups.set(group, [entry])\n }\n for (const [group, entries] of groups) {\n const groupItem = element('li', 'dsh-mobile-control__ws-paths-group')\n const groupHead = element('div', 'dsh-mobile-control__ws-paths-group-head')\n const groupLabel = element('code'); groupLabel.textContent = `${group}/*`\n const groupCount = element('span', 'dsh-mobile-control__ws-count')\n groupCount.textContent = t('wsPathsGroupMeta', { n: entries.length, m: entries.reduce((sum, entry) => sum + entry.attempts, 0) })\n groupHead.append(groupLabel, groupCount)\n if (entries.length > 1) {\n const allowAll = element('button', 'dsh-mobile-control__primary'); allowAll.type = 'button'; allowAll.textContent = t('wsPathsAllowAll')\n allowAll.addEventListener('click', () => { saveWsPaths([...wsPathsCurrent, ...entries.map(entry => entry.path)]) })\n groupHead.append(allowAll)\n }\n groupItem.append(groupHead)\n for (const entry of entries) {\n const item = element('div', 'dsh-mobile-control__ws-paths-item is-child')\n const label = element('code'); label.textContent = `${entry.path} ×${String(entry.attempts)}`\n const allow = element('button', 'dsh-mobile-control__primary'); allow.type = 'button'; allow.textContent = t('wsPathsAllow'); allow.setAttribute('aria-label', `${t('wsPathsAllow')}: ${entry.path}`)\n allow.addEventListener('click', () => { saveWsPaths([...wsPathsCurrent, entry.path]) })\n item.append(label, allow)\n groupItem.append(item)\n }\n wsPathsDetectedList.append(groupItem)\n }\n renderWsDot()\n }\n const loadWsPaths = (): void => {\n void controlRequestJson('/api/mobile-access/remote/websocket-paths').then(data => {\n wsPathsLoaded = true\n wsPathsStatus.hidden = true\n renderWsPaths(Array.isArray(data.paths) ? data.paths.filter((entry): entry is string => typeof entry === 'string') : [])\n void controlRequestJson('/api/mobile-access/remote/websocket-paths/blocked').then(blocked => {\n const entries = Array.isArray(blocked.blocked) ? blocked.blocked : []\n wsPathsBlocked = entries.filter((entry): entry is { path: string; attempts: number } =>\n typeof entry === 'object' && entry !== null\n && typeof (entry as { path?: unknown }).path === 'string'\n && typeof (entry as { attempts?: unknown }).attempts === 'number')\n renderWsBlocked(wsPathsBlocked)\n }, () => { /* approved list already rendered; detected list stays hidden */ })\n }, error => {\n wsPathsStatus.hidden = false\n wsPathsStatus.textContent = t('requestFailed', { error: String(error) })\n })\n }\n const saveWsPaths = (paths: readonly string[]): void => {\n wsPathsStatus.hidden = true\n void controlRequestJson('/api/mobile-access/remote/websocket-paths', { method: 'POST', body: JSON.stringify({ paths }) }).then(data => {\n wsPathsLoaded = true\n renderWsPaths(Array.isArray(data.paths) ? data.paths.filter((entry): entry is string => typeof entry === 'string') : [])\n renderWsBlocked(wsPathsBlocked)\n }, error => {\n wsPathsStatus.hidden = false\n wsPathsStatus.textContent = t('requestFailed', { error: String(error) })\n })\n }\n wsPathsAdd.addEventListener('click', () => {\n const value = wsPathsInput.value.trim()\n if (value === '') {\n wsPathsStatus.hidden = false\n wsPathsStatus.textContent = t('wsPathsInvalid')\n return\n }\n wsPathsInput.value = ''\n saveWsPaths([...wsPathsCurrent, value])\n })\n const remoteWorkspace = element('section', 'dsh-mobile-control__remote-workspace')\n remoteWorkspace.append(providerSetupHeader, remoteStatus, remoteAccess, remoteGuide, providerSetupBody, remoteActions, remoteQr, remotePairLink, remoteManageRow, remoteDevicePanel)\n const diagnosticsView = element('div', 'dsh-mobile-control__view is-diagnostics'); diagnosticsView.hidden = true\n const diagnosticsIntro = element('p', 'dsh-mobile-control__intro'); diagnosticsIntro.textContent = t('diagnosticsIntro')\n const diagnosticsSummary = element('section', 'dsh-mobile-control__diagnostic-summary is-idle'); diagnosticsSummary.setAttribute('aria-live', 'polite')\n const diagnosticsSummaryMain = element('div', 'dsh-mobile-control__diagnostic-summary-main')\n const diagnosticsSummaryIcon = element('span', 'dsh-mobile-control__diagnostic-summary-icon'); diagnosticsSummaryIcon.setAttribute('aria-hidden', 'true')\n const diagnosticsSummaryBody = element('div', 'dsh-mobile-control__diagnostic-summary-body')\n const diagnosticsSummaryTitle = element('strong'); diagnosticsSummaryTitle.textContent = t('diagnosticsNotRun')\n const diagnosticsSummaryText = element('span'); diagnosticsSummaryText.textContent = t('diagnosticsStartHint')\n const diagnosticsSummaryMeta = element('span', 'dsh-mobile-control__diagnostic-summary-meta'); diagnosticsSummaryMeta.textContent = t('diagnosticsIdleMeta')\n diagnosticsSummaryBody.append(diagnosticsSummaryTitle, diagnosticsSummaryText)\n diagnosticsSummaryMain.append(diagnosticsSummaryIcon, diagnosticsSummaryBody)\n diagnosticsSummary.append(diagnosticsSummaryMain, diagnosticsSummaryMeta)\n const diagnosticsToolbar = element('div', 'dsh-mobile-control__diagnostic-toolbar')\n const diagnosticsRun = element('button', 'dsh-mobile-control__primary dsh-mobile-control__diagnostic-run'); diagnosticsRun.type = 'button'; diagnosticsRun.textContent = t('diagnosticsStart')\n const diagnosticsCopy = element('button', 'dsh-mobile-control__secondary dsh-mobile-control__diagnostic-copy'); diagnosticsCopy.type = 'button'; diagnosticsCopy.textContent = t('diagnosticsCopy'); diagnosticsCopy.disabled = true; diagnosticsCopy.hidden = true\n diagnosticsToolbar.append(diagnosticsRun, diagnosticsCopy)\n const diagnosticsFeedback = element('p', 'dsh-mobile-control__diagnostic-feedback'); diagnosticsFeedback.hidden = true; diagnosticsFeedback.setAttribute('role', 'status'); diagnosticsFeedback.setAttribute('aria-live', 'polite')\n const diagnosticsChecks = element('div', 'dsh-mobile-control__diagnostic-checks'); diagnosticsChecks.hidden = true\n const diagnosticsDetails = element('details', 'dsh-mobile-control__details dsh-mobile-control__diagnostic-details'); diagnosticsDetails.hidden = true\n const diagnosticsDetailsSummary = element('summary'); diagnosticsDetailsSummary.textContent = t('diagnosticsAdvanced')\n const diagnosticsReport = element('pre', 'dsh-mobile-control__diagnostic-report')\n diagnosticsDetails.append(diagnosticsDetailsSummary, diagnosticsReport)\n header.append(title, headerActions); actions.append(toggle, pair, linkPair)\n lanView.append(lanSetup, access, qrBox, status, extensionStatus, actions, manageRow, devicePanel)\n remoteView.append(remoteIntro, httpFrameWarning, providerSection, remoteWorkspace)\n diagnosticsView.append(diagnosticsIntro, diagnosticsSummary, diagnosticsToolbar, diagnosticsFeedback, diagnosticsChecks, wsPathsSection, diagnosticsDetails)\n panel.append(header, releaseNotice, updateCard, appDownload, switcher, lanView, remoteView, diagnosticsView); root.append(panel); document.body.append(root)\n let running = false\n let origin = ''\n let lanConfigured = true\n let lanRestartRequired = false\n let lanSetupLoaded = false\n let remoteRunning = false\n let remoteReady = false\n let remoteProvider: MobileRemoteProvider = 'tailscale'\n let remoteLoginUrl = ''\n let remoteSetupUrl = ''\n let remoteSetupPending = false\n let remoteSetupOpenedAt = 0\n let remoteReconnectBusy = false\n let remoteProviderBusy = false\n // A failed control action stores its message here so the repaint that loadRemote() runs in the\n // action's finally cannot replace it before the user reads it. The repaint that would have\n // erased it consumes the value instead, so it never lingers over a later state.\n let remoteFailureText: string | undefined\n let cpolarInstalled = false\n let cpolarConfigured = false\n let cloudflaredInstalled = false\n let cloudflaredDownloadSize = ''\n let cloudflaredTunnelMode: 'quick' | 'named' = 'quick'\n let cloudflaredModeDraft: 'quick' | 'named' | null = null\n let cloudflaredTunnelConfigured = false\n let configuredCloudflaredHostname = ''\n let configuredCloudflaredPort = 3444\n // Once the user types in a field, polls must stop writing to it, or a stale\n // value the user is mid-edit would be silently replaced by the saved one.\n let cloudflaredHostnameDirty = false\n let cloudflaredPortDirty = false\n let originConfigured = false\n let originFormDirty = false\n let originFormBusy = false\n let remoteSnapshotEpoch = 0\n let latestRemoteState: Record<string, unknown> = {}\n let frpInstalled = false\n let frpConfigured = false\n let frpLayoutInitialized = false\n let frpDownloadSize = '14.0'\n let configuredFrpServer = ''\n let configuredFrpPort = 7000\n let configuredFrpOrigin = ''\n let providerInfoPinned = false\n let providerInfoHovered = false\n let previousAccessView: 'lan' | 'remote' = 'lan'\n let diagnosticsBusy = false\n let copiedDiagnosticReport = ''\n let pluginUpdateAvailable = false\n let pluginLatestVersion = ''\n let pluginReleaseNotes = ''\n let updateInFlight = false\n const renderRelease = (data: Record<string, unknown>): void => {\n const release = clientReleaseInfo(data)\n pluginUpdateAvailable = release.updateAvailable\n pluginLatestVersion = release.latestVersion ?? ''\n pluginReleaseNotes = release.releaseNotes ?? ''\n updatePlugin.hidden = !pluginUpdateAvailable || !diagnosticsView.hidden || !updateCard.hidden\n updatePlugin.textContent = t('updatePlugin')\n if (pluginLatestVersion !== '') updatePlugin.setAttribute('aria-label', t('updatePluginAria', { version: pluginLatestVersion }))\n if (release.androidVersion !== undefined) {\n appDownload.textContent = t('downloadAndroidVersion', { version: release.androidVersion })\n appDownload.setAttribute('aria-label', t('downloadAndroidVersionAria', { version: release.androidVersion }))\n }\n appDownload.href = release.androidDownloadUrl\n }\n const syncProviderInfo = (): void => {\n const open = providerInfoPinned || providerInfoHovered || providerInfo.contains(document.activeElement)\n providerInfoPopover.hidden = !open\n providerInfoButton.setAttribute('aria-expanded', String(open))\n }\n providerInfo.addEventListener('pointerenter', () => { providerInfoHovered = true; syncProviderInfo() })\n providerInfo.addEventListener('pointerleave', () => { providerInfoHovered = false; syncProviderInfo() })\n providerInfo.addEventListener('focusin', syncProviderInfo)\n providerInfo.addEventListener('focusout', () => { window.setTimeout(syncProviderInfo, 0) })\n providerInfoButton.addEventListener('click', () => { providerInfoPinned = !providerInfoPinned; syncProviderInfo() })\n providerInfoButton.addEventListener('keydown', event => {\n if (event.key !== 'Escape') return\n providerInfoPinned = false\n providerInfoHovered = false\n providerInfoPopover.hidden = true\n providerInfoButton.setAttribute('aria-expanded', 'false')\n })\n const selectView = (view: 'lan' | 'remote' | 'diagnostics'): void => {\n if (view !== 'diagnostics') previousAccessView = view\n lanView.hidden = view !== 'lan'\n remoteView.hidden = view !== 'remote'\n diagnosticsView.hidden = view !== 'diagnostics'\n lanTab.classList.toggle('is-active', view === 'lan')\n remoteTab.classList.toggle('is-active', view === 'remote')\n lanTab.setAttribute('aria-pressed', String(view === 'lan'))\n remoteTab.setAttribute('aria-pressed', String(view === 'remote'))\n diagnosticsEntry.setAttribute('aria-pressed', String(view === 'diagnostics'))\n diagnosticsEntry.textContent = view === 'diagnostics' ? t('back') : t('diagnostics')\n diagnosticsEntry.setAttribute('aria-label', view === 'diagnostics' ? t('backToMobile') : t('openDiagnostics'))\n if (view === 'diagnostics') {\n wsPathsSeenAttempts = wsBlockedTotal(wsPathsBlocked)\n renderWsDot()\n if (!wsPathsLoaded) loadWsPaths()\n }\n updatePlugin.hidden = view === 'diagnostics' || !pluginUpdateAvailable\n appDownload.hidden = view === 'diagnostics'\n switcher.hidden = view === 'diagnostics'\n title.textContent = view === 'lan' ? t('lanAccess') : view === 'remote' ? t('remoteAccess') : t('connectionDiagnostics')\n }\n lanTab.addEventListener('click', () => { selectView('lan') })\n remoteTab.addEventListener('click', () => { selectView('remote'); loadRemote() })\n const setOpen = (open: boolean): void => {\n panel.hidden = !open\n for (const trigger of document.querySelectorAll('.dsh-mobile-control__trigger')) trigger.setAttribute('aria-expanded', String(open))\n }\n const render = (data: Record<string, unknown>): void => {\n lanConfigured = data.configured !== false\n lanRestartRequired = data.restartRequired === true\n running = data.running === true\n origin = running && typeof data.origin === 'string' ? data.origin : ''\n lanSetup.hidden = lanConfigured && !lanRestartRequired\n lanSetupForm.hidden = lanRestartRequired\n lanSetupIntro.hidden = lanRestartRequired\n status.hidden = !lanConfigured || lanRestartRequired\n if (!lanConfigured && !lanSetupLoaded) loadLanSetup()\n if (lanRestartRequired) {\n const pendingOrigin = typeof data.pendingOrigin === 'string' ? data.pendingOrigin : ''\n lanSetupStatus.textContent = t('lanSetupRestart', { origin: pendingOrigin })\n } else if (!lanConfigured && lanSetupStatus.textContent === '') {\n lanSetupStatus.textContent = t('lanSetupRequired')\n }\n access.hidden = origin === ''\n accessLink.href = origin\n accessLink.textContent = origin\n accessLink.title = origin\n status.classList.toggle('is-running', running)\n status.textContent = !lanConfigured ? t('lanSetupRequired') : lanRestartRequired ? t('lanSetupRestart', { origin: typeof data.pendingOrigin === 'string' ? data.pendingOrigin : '' }) : running ? t('lanOn') : t('lanOff')\n const extensionData = data.extensions\n if (extensionData !== null && typeof extensionData === 'object') {\n const loaded = typeof (extensionData as { loaded?: unknown }).loaded === 'number' ? (extensionData as { loaded: number }).loaded : 0\n const failed = typeof (extensionData as { failed?: unknown }).failed === 'number' ? (extensionData as { failed: number }).failed : 0\n extensionStatus.hidden = false\n extensionStatus.textContent = failed === 0 ? t('extensionsLoaded', { loaded }) : t('extensionsFailed', { loaded, failed })\n } else extensionStatus.hidden = true\n if (!running) qrBox.hidden = true\n toggle.textContent = running ? t('disableLan') : t('enableLan')\n actions.hidden = !lanConfigured || lanRestartRequired\n manageRow.hidden = !lanConfigured || lanRestartRequired\n pair.disabled = !running\n linkPair.disabled = !running\n manageDevices.disabled = !running\n resetAll.disabled = !running\n }\n const renderLanSetup = (data: Record<string, unknown>): void => {\n if (data.restartRequired === true || data.configured === true) {\n render(data)\n return\n }\n const networks = Array.isArray(data.networks) ? data.networks.filter((entry): entry is Record<string, unknown> => typeof entry === 'object' && entry !== null) : []\n lanSetupSelect.replaceChildren()\n const hasRecommended = networks.some(network => network.recommended === true)\n if (!hasRecommended && networks.length > 1) {\n const placeholder = element('option'); placeholder.value = ''; placeholder.textContent = t('lanSetupChooseNetwork'); placeholder.disabled = true; placeholder.selected = true\n lanSetupSelect.append(placeholder)\n }\n for (const network of networks) {\n if (typeof network.address !== 'string' || typeof network.name !== 'string') continue\n const option = element('option'); option.value = network.address\n option.textContent = `${network.name} · ${network.address}${network.recommended === true ? ` · ${t('lanSetupRecommended')}` : ''}`\n option.selected = network.recommended === true || (!hasRecommended && networks.length === 1)\n lanSetupSelect.append(option)\n }\n const available = networks.some(network => typeof network.address === 'string' && typeof network.name === 'string')\n lanSetupConfigure.disabled = lanSetupSelect.value === ''\n lanSetupStatus.textContent = available ? t('lanSetupRequired') : t('lanSetupNoNetworks')\n lanSetupNote.hidden = data.windowsFirewall !== true\n }\n lanSetupSelect.addEventListener('change', () => { lanSetupConfigure.disabled = lanSetupSelect.value === '' })\n const loadLanSetup = (): void => {\n lanSetupLoaded = true\n lanSetupRefresh.disabled = true\n void controlRequestJson('/api/mobile-access/lan/setup').then(renderLanSetup, () => {\n lanSetupStatus.textContent = t('lanSetupFailed')\n }).finally(() => { lanSetupRefresh.disabled = false })\n }\n lanSetupRefresh.addEventListener('click', () => { loadLanSetup() })\n lanSetupConfigure.addEventListener('click', () => {\n if (lanSetupSelect.value === '') return\n lanSetupConfigure.disabled = true\n lanSetupRefresh.disabled = true\n lanSetupConfigure.textContent = t('lanSetupConfiguring')\n lanSetupStatus.textContent = t('lanSetupConfiguring')\n void controlRequestJson('/api/mobile-access/lan/setup', {\n method: 'POST',\n body: JSON.stringify({ confirm: true, address: lanSetupSelect.value, configureFirewall: true }),\n }, LONG_CONTROL_REQUEST_TIMEOUT_MS).then(renderLanSetup, () => {\n lanSetupStatus.textContent = t('lanSetupFailed')\n }).finally(() => {\n lanSetupConfigure.textContent = t('lanSetupConfigure')\n lanSetupRefresh.disabled = false\n lanSetupConfigure.disabled = lanRestartRequired || lanSetupSelect.options.length === 0\n })\n })\n const showQr = (svg: string, target: HTMLDivElement = qrBox): void => {\n target.replaceChildren()\n if (svg === '') { target.hidden = true; return }\n const image = element('img')\n image.alt = t('pairingQr')\n image.width = 176\n image.height = 176\n image.src = `data:image/svg+xml;base64,${btoa(svg)}`\n target.hidden = false\n target.append(image)\n }\n const openPairing = (target: 'key' | 'link'): void => {\n void controlRequestJson('/api/mobile-access/lan/pairing/open', { method: 'POST', body: '{}' }).then(async data => {\n const value = target === 'key'\n ? (typeof data.appKey === 'string' ? data.appKey : '')\n : (typeof data.pairUrl === 'string' ? data.pairUrl : '')\n showQr(typeof data.qrSvg === 'string' ? data.qrSvg : '')\n if (value === '') { status.textContent = t('keyGenerationFailed'); return }\n try {\n await navigator.clipboard.writeText(value)\n status.textContent = target === 'key'\n ? t('keyCopied')\n : t('linkCopied')\n } catch {\n status.textContent = t('copySecret', { kind: target === 'key' ? t('pairingKey') : t('pairingLink'), value })\n status.classList.add('is-key')\n }\n }, error => { status.textContent = t('requestFailed', { error: String(error) }) }).finally(() => {\n pair.disabled = !running\n linkPair.disabled = !running\n })\n }\n toggle.addEventListener('click', () => { toggle.disabled = true; void controlRequestJson('/api/mobile-access/lan/control', { method: 'POST', body: JSON.stringify({ running: !running }) }).then(render, error => { status.textContent = t('requestFailed', { error: String(error) }) }).finally(() => { toggle.disabled = false }) })\n const formatTime = (ms: unknown): string => typeof ms === 'number' ? new Date(ms).toLocaleString(localeTag) : ''\n const formatMegabytes = (bytes: number): string => new Intl.NumberFormat(localeTag, { minimumFractionDigits: 1, maximumFractionDigits: 1 }).format(bytes / 1024 / 1024)\n const renderDevices = (data: Record<string, unknown>): void => {\n const devices = Array.isArray(data.devices) ? data.devices as Record<string, unknown>[] : []\n devicePanel.replaceChildren()\n if (devices.length === 0) {\n const empty = element('p', 'dsh-mobile-control__device-empty'); empty.textContent = t('noDevices')\n devicePanel.append(empty)\n return\n }\n for (const device of devices) {\n const row = element('div', 'dsh-mobile-control__device')\n const label = element('span', 'dsh-mobile-control__device-label')\n label.textContent = typeof device.label === 'string' ? device.label : t('device')\n const meta = element('span', 'dsh-mobile-control__device-meta'); meta.textContent = t('expires', { time: formatTime(device.expiresAt) })\n const revoke = element('button', 'dsh-mobile-control__device-revoke'); revoke.type = 'button'; revoke.textContent = t('revoke')\n const id = typeof device.id === 'string' ? device.id : ''\n revoke.addEventListener('click', () => {\n void controlRequestJson('/api/mobile-access/lan/devices/revoke', { method: 'POST', body: JSON.stringify({ deviceId: id }) })\n .then(loadDevices, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n })\n row.append(label, meta, revoke)\n devicePanel.append(row)\n }\n }\n const loadDevices = (): void => {\n void controlRequestJson('/api/mobile-access/lan/devices').then(renderDevices, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n }\n manageDevices.addEventListener('click', () => {\n const show = devicePanel.hidden\n devicePanel.hidden = !show\n if (show) loadDevices()\n })\n resetAll.addEventListener('click', () => {\n if (!window.confirm(t('confirmResetDevices'))) return\n void controlRequestJson('/api/mobile-access/lan/devices/reset', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(loadDevices, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n })\n const renderRemote = (data: Record<string, unknown>): void => {\n latestRemoteState = data\n remoteRunning = data.running === true\n remoteProvider = parseMobileRemoteProvider(data.provider)\n const cpolar = remoteProvider === 'cpolar'\n const cloudflared = remoteProvider === 'cloudflared'\n const frp = remoteProvider === 'frp'\n const origin = remoteProvider === 'origin'\n const tailscale = remoteProvider === 'tailscale'\n tailscaleChoice.classList.toggle('is-selected', tailscale)\n cpolarChoice.classList.toggle('is-selected', cpolar)\n cloudflaredChoice.classList.toggle('is-selected', cloudflared)\n frpChoice.classList.toggle('is-selected', frp)\n originChoice.classList.toggle('is-selected', origin)\n tailscaleChoice.setAttribute('aria-checked', String(tailscale))\n cpolarChoice.setAttribute('aria-checked', String(cpolar))\n cloudflaredChoice.setAttribute('aria-checked', String(cloudflared))\n // One tab stop for the group: only the checked card is reachable with Tab.\n tailscaleChoice.tabIndex = tailscale ? 0 : -1\n cpolarChoice.tabIndex = cpolar ? 0 : -1\n cloudflaredChoice.tabIndex = cloudflared ? 0 : -1\n frpChoice.setAttribute('aria-pressed', String(frp))\n originChoice.setAttribute('aria-pressed', String(origin))\n providerSetupName.textContent = cpolar ? 'cpolar' : cloudflared ? 'cloudflared' : frp ? t('frpName') : origin ? t('originName') : 'Tailscale Funnel'\n tailscaleChoice.disabled = remoteProviderBusy\n cpolarChoice.disabled = remoteProviderBusy\n cloudflaredChoice.disabled = remoteProviderBusy\n frpChoice.disabled = remoteProviderBusy\n originChoice.disabled = remoteProviderBusy\n cpolarSetup.hidden = !cpolar\n cloudflaredSetup.hidden = !cloudflared\n frpSetup.hidden = !frp\n originSetup.hidden = !origin\n if (frp || origin) selfHosted.open = true\n tailscaleInfo.hidden = !tailscale\n remoteReset.textContent = tailscale ? t('resetRemoteLogin') : t('resetRemoteDevices')\n const providers = data.providers !== null && typeof data.providers === 'object' ? data.providers as Record<string, unknown> : {}\n const cpolarProvider = providers.cpolar !== null && typeof providers.cpolar === 'object' ? providers.cpolar as Record<string, unknown> : {}\n const component = cpolarProvider.component !== null && typeof cpolarProvider.component === 'object'\n ? cpolarProvider.component as Record<string, unknown>\n : {}\n cpolarInstalled = component.installed === true\n cpolarConfigured = component.configured === true\n cpolarChoiceBadge.textContent = cpolarConfigured ? t('ready') : cpolarInstalled ? t('installed') : t('mainlandPreferred')\n const cpolarSupported = component.supported !== false\n const componentVersion = typeof component.version === 'string' ? component.version : ''\n const componentDownloadBytes = typeof component.downloadBytes === 'number' ? component.downloadBytes : 0\n const componentStorage = typeof component.storagePath === 'string' ? component.storagePath : `DSH Mobile ${t('pluginPrivateDirectory')}`\n cpolarStorage.textContent = componentStorage\n cpolarStorage.title = componentStorage\n cpolarInstall.hidden = cpolarInstalled || !cpolarSupported\n cpolarInstall.textContent = componentDownloadBytes > 0\n ? t('installWithSize', { size: formatMegabytes(componentDownloadBytes) })\n : t('installOfficial')\n cpolarInstall.disabled = remoteProviderBusy\n cpolarAccount.hidden = !cpolarInstalled || cpolarConfigured\n cpolarConfigure.disabled = remoteProviderBusy\n cpolarPurge.hidden = !cpolarInstalled && !cpolarConfigured\n cpolarComponentStatus.textContent = !cpolarSupported\n ? t('cpolarUnsupported')\n : !cpolarInstalled\n ? t('cpolarNotInstalled')\n : !cpolarConfigured\n ? t('cpolarNeedsToken', { version: componentVersion })\n : t('cpolarReady', { version: componentVersion })\n const cloudflaredProvider = providers.cloudflared !== null && typeof providers.cloudflared === 'object' ? providers.cloudflared as Record<string, unknown> : {}\n const cloudflaredComponent = cloudflaredProvider.component !== null && typeof cloudflaredProvider.component === 'object'\n ? cloudflaredProvider.component as Record<string, unknown>\n : {}\n cloudflaredInstalled = cloudflaredComponent.installed === true\n const cloudflaredSupported = cloudflaredComponent.supported !== false\n const cloudflaredComponentError = typeof cloudflaredComponent.errorCode === 'string' ? cloudflaredComponent.errorCode : ''\n const cloudflaredVersion = typeof cloudflaredComponent.version === 'string' ? cloudflaredComponent.version : ''\n const cloudflaredDownloadBytes = typeof cloudflaredComponent.downloadBytes === 'number' ? cloudflaredComponent.downloadBytes : 0\n if (cloudflaredDownloadBytes > 0) cloudflaredDownloadSize = formatMegabytes(cloudflaredDownloadBytes)\n const cloudflaredStoragePath = typeof cloudflaredComponent.storagePath === 'string'\n ? cloudflaredComponent.storagePath\n : `DSH Mobile ${t('pluginPrivateDirectory')}`\n cloudflaredStorage.textContent = cloudflaredStoragePath\n cloudflaredStorage.title = cloudflaredStoragePath\n cloudflaredChoiceBadge.textContent = cloudflaredInstalled ? t('ready') : t('cloudflaredBadge')\n // A quick tunnel needs no account, so installation is the only precondition.\n cloudflaredInstall.hidden = cloudflaredInstalled || !cloudflaredSupported\n cloudflaredInstall.textContent = cloudflaredDownloadBytes > 0\n ? t('installWithSize', { size: formatMegabytes(cloudflaredDownloadBytes) })\n : t('installOfficial')\n cloudflaredInstall.disabled = remoteProviderBusy\n cloudflaredPurge.hidden = !cloudflaredInstalled\n cloudflaredComponentStatus.textContent = !cloudflaredSupported\n ? t('cloudflaredUnsupported')\n : !cloudflaredInstalled\n // A component that exists but failed verification must not be reported as\n // absent: that sends the user to reinstall something already installed.\n ? (cloudflaredComponentError === 'cloudflared_component_invalid' ? t('cloudflaredInvalid') : t('cloudflaredNotInstalled'))\n : t('cloudflaredReady', { version: cloudflaredVersion })\n const cloudflaredTunnelConfiguration = cloudflaredProvider.configuration !== null\n && typeof cloudflaredProvider.configuration === 'object'\n ? cloudflaredProvider.configuration as Record<string, unknown>\n : {}\n cloudflaredTunnelMode = cloudflaredTunnelConfiguration.mode === 'named' ? 'named' : 'quick'\n cloudflaredTunnelConfigured = cloudflaredTunnelConfiguration.configured === true\n configuredCloudflaredHostname = typeof cloudflaredTunnelConfiguration.hostname === 'string' ? cloudflaredTunnelConfiguration.hostname : ''\n configuredCloudflaredPort = typeof cloudflaredTunnelConfiguration.port === 'number' ? cloudflaredTunnelConfiguration.port : 3444\n const cloudflaredTunnelError = typeof cloudflaredTunnelConfiguration.errorCode === 'string' ? cloudflaredTunnelConfiguration.errorCode : ''\n // A staged choice survives polls until the saved configuration agrees with it.\n if (cloudflaredModeDraft !== null && cloudflaredModeDraft === cloudflaredTunnelMode) cloudflaredModeDraft = null\n const cloudflaredShownMode = cloudflaredModeDraft ?? cloudflaredTunnelMode\n cloudflaredModeQuick.classList.toggle('is-active', cloudflaredShownMode === 'quick')\n cloudflaredModeNamed.classList.toggle('is-active', cloudflaredShownMode === 'named')\n cloudflaredModeQuick.setAttribute('aria-pressed', String(cloudflaredShownMode === 'quick'))\n cloudflaredModeNamed.setAttribute('aria-pressed', String(cloudflaredShownMode === 'named'))\n cloudflaredModeQuick.disabled = remoteProviderBusy\n cloudflaredModeNamed.disabled = remoteProviderBusy\n cloudflaredModeHint.textContent = cloudflaredShownMode === 'named' ? t('cloudflaredTunnelNamedHint') : t('cloudflaredTunnelQuickHint')\n // The component note describes whichever tunnel is about to run, so a\n // quick-tunnel warning never sits next to named-tunnel settings.\n cloudflaredNote.textContent = cloudflaredShownMode === 'named' ? t('cloudflaredNamedNote') : t('cloudflaredQuickNote')\n cloudflaredTunnel.hidden = cloudflaredShownMode !== 'named'\n cloudflaredTunnelSave.textContent = cloudflaredSaveLabel()\n // Untouched fields always mirror the saved configuration, so a field can never\n // keep showing a value that is no longer in effect.\n if (!cloudflaredHostnameDirty) cloudflaredHostname.value = configuredCloudflaredHostname\n if (!cloudflaredPortDirty) cloudflaredPort.value = String(configuredCloudflaredPort)\n cloudflaredToken.placeholder = cloudflaredTunnelConfigured ? t('cloudflaredTunnelTokenSaved') : t('cloudflaredTunnelTokenPlaceholder')\n // The hint must describe the port Cloudflare will actually be pointed at, which\n // is the one in the field, not the last saved value.\n const cloudflaredFieldPort = String(cloudflaredPort.value ?? '').trim()\n cloudflaredTunnelHint.textContent = t('cloudflaredTunnelHint', {\n port: cloudflaredFieldPort === '' ? String(configuredCloudflaredPort) : cloudflaredFieldPort,\n })\n cloudflaredTunnelStatus.textContent = cloudflaredTunnelError !== ''\n ? t('cloudflaredTunnelInvalid')\n : cloudflaredTunnelConfigured\n ? t('cloudflaredTunnelConfigured', { hostname: configuredCloudflaredHostname, port: String(configuredCloudflaredPort) })\n : t('cloudflaredTunnelMissing')\n cloudflaredTunnelSave.disabled = remoteProviderBusy || !cloudflaredInstalled\n cloudflaredTunnelForget.hidden = !cloudflaredTunnelConfigured\n const frpProvider = providers.frp !== null && typeof providers.frp === 'object' ? providers.frp as Record<string, unknown> : {}\n const frpComponent = frpProvider.component !== null && typeof frpProvider.component === 'object'\n ? frpProvider.component as Record<string, unknown>\n : {}\n const frpConfiguration = frpProvider.configuration !== null && typeof frpProvider.configuration === 'object'\n ? frpProvider.configuration as Record<string, unknown>\n : {}\n frpInstalled = frpComponent.installed === true\n frpConfigured = frpConfiguration.configured === true\n const frpSupported = frpComponent.supported !== false\n const frpVersion = typeof frpComponent.version === 'string' ? frpComponent.version : ''\n const frpDownloadBytes = typeof frpComponent.downloadBytes === 'number' ? frpComponent.downloadBytes : 0\n if (frpDownloadBytes > 0) frpDownloadSize = formatMegabytes(frpDownloadBytes)\n const frpStoragePath = typeof frpComponent.storagePath === 'string' ? frpComponent.storagePath : `DSH Mobile ${t('pluginPrivateDirectory')}`\n configuredFrpServer = typeof frpConfiguration.serverAddress === 'string' ? frpConfiguration.serverAddress : ''\n configuredFrpPort = typeof frpConfiguration.serverPort === 'number' ? frpConfiguration.serverPort : 7000\n configuredFrpOrigin = typeof frpConfiguration.publicOrigin === 'string' ? frpConfiguration.publicOrigin : ''\n if (frpServer.value === '' && configuredFrpServer !== '') frpServer.value = configuredFrpServer\n if ((frpPort.value === '' || frpPort.value === '7000') && configuredFrpPort !== 7000) frpPort.value = String(configuredFrpPort)\n if (frpOrigin.value === '' && configuredFrpOrigin !== '') frpOrigin.value = configuredFrpOrigin\n frpStorage.textContent = frpStoragePath\n frpStorage.title = frpStoragePath\n frpInstall.hidden = frpInstalled || !frpSupported\n frpInstall.textContent = frpDownloadBytes > 0\n ? t('installWithSize', { size: formatMegabytes(frpDownloadBytes) })\n : t('installFrpc')\n frpInstall.disabled = remoteProviderBusy\n frpConfigure.disabled = remoteProviderBusy || !frpInstalled\n vpsDeploy.disabled = remoteProviderBusy || !validVpsDeploymentForm()\n vpsCopyUninstall.disabled = vpsDeploy.disabled\n vpsUninstall.disabled = vpsDeploy.disabled\n frpPurge.hidden = !frpInstalled && !frpConfigured\n frpComponentStatus.textContent = !frpSupported\n ? t('frpUnsupported')\n : frpInstalled ? t('frpComponentReady', { version: frpVersion }) : t('frpNotInstalled')\n frpConfigurationStatus.textContent = frpConfigured ? t('frpConfigurationReady') : t('frpConfigurationMissing')\n frpOverview.hidden = !frpConfigured\n frpOverviewEndpoint.textContent = configuredFrpOrigin === ''\n ? configuredFrpServer\n : `${configuredFrpOrigin} · ${configuredFrpServer}:${String(configuredFrpPort)}`\n frpToken.placeholder = frpConfigured\n ? (locale === 'zh' ? '已安全保存;留空保持不变' : locale === 'it' ? 'Salvato; lascia vuoto per mantenerlo' : 'Saved securely; leave blank to keep it')\n : t('frpTokenPlaceholder')\n vpsDeploy.textContent = frpConfigured\n ? (locale === 'zh' ? '修复或重新部署 VPS' : locale === 'it' ? 'Ripara o ridistribuisci VPS' : 'Repair or redeploy VPS')\n : t('vpsDeploy')\n frpConnectionSummary.textContent = `${frpConfigured ? '✓ ' : ''}${t('frpStep1Title')}`\n frpComponentSummary.textContent = `${frpInstalled ? '✓ ' : ''}${t('frpStep3Title')}`\n if (!frpLayoutInitialized) {\n frpConnectionGroup.open = !frpConfigured\n frpComponentGroup.open = !frpInstalled\n frpVpsGroup.open = !frpConfigured\n frpLayoutInitialized = true\n }\n const originProvider = providers.origin !== null && typeof providers.origin === 'object' ? providers.origin as Record<string, unknown> : {}\n const originConfiguration = originProvider.configuration !== null && typeof originProvider.configuration === 'object'\n ? originProvider.configuration as Record<string, unknown> : {}\n originConfigured = originConfiguration.configured === true\n if (!originFormDirty && !originFormBusy) {\n originPublic.value = typeof originConfiguration.publicOrigin === 'string' ? originConfiguration.publicOrigin : ''\n originHost.value = typeof originConfiguration.listenHost === 'string' ? originConfiguration.listenHost : '127.0.0.1'\n originPort.value = typeof originConfiguration.listenPort === 'number' ? String(originConfiguration.listenPort) : '3444'\n originCidrs.value = Array.isArray(originConfiguration.allowedCidrs) ? originConfiguration.allowedCidrs.filter(value => typeof value === 'string').join(', ') : '127.0.0.0/8'\n }\n originSetup.setAttribute('aria-busy', String(originFormBusy))\n originConfigure.setAttribute('aria-busy', String(originFormBusy))\n originConfigure.textContent = originFormBusy ? t('saving') : t('originSaveStart')\n for (const input of [originPublic, originHost, originPort, originCidrs]) input.disabled = remoteProviderBusy\n originConfigure.disabled = remoteProviderBusy\n originPurge.disabled = remoteProviderBusy\n originPurge.hidden = !originConfigured && originConfiguration.errorCode !== 'origin_config_invalid' && originProvider.running !== true\n const originListening = origin && originProvider.state === 'ready' && originProvider.running === true\n const backendOrigin = originListening && typeof data.backendOrigin === 'string' ? data.backendOrigin\n : typeof originConfiguration.backendOrigin === 'string' ? originConfiguration.backendOrigin : ''\n originBackend.hidden = backendOrigin === ''\n originBackendLabel.textContent = originListening ? t('originBackendListening') : t('originBackendSaved')\n originBackendAddress.textContent = backendOrigin\n originCopyBackend.disabled = remoteProviderBusy || backendOrigin === ''\n selfHostedBadge.textContent = origin\n ? originListening ? t('originBackendReady') : t('advanced')\n : frpConfigured && frpInstalled ? t('ready') : t('advanced')\n const state = typeof data.state === 'string' ? data.state : 'error'\n const errorCode = typeof data.errorCode === 'string' ? data.errorCode : ''\n const remoteOrigin = typeof data.origin === 'string' ? data.origin : ''\n remoteLoginUrl = typeof data.loginUrl === 'string' ? data.loginUrl : ''\n const candidateSetupUrl = tailscale ? officialFunnelSetupUrl(data.setupUrl) : ''\n const fallbackSetupUrls: Record<string, string> = {\n funnel_permission_required: 'https://tailscale.com/s/no-funnel',\n funnel_https_required: 'https://tailscale.com/s/https',\n funnel_start_failed: 'https://tailscale.com/s/no-funnel',\n }\n remoteSetupUrl = candidateSetupUrl !== '' ? candidateSetupUrl : (fallbackSetupUrls[errorCode] ?? '')\n const needsFunnelSetup = state === 'error' && remoteSetupUrl !== ''\n remoteReady = remoteRunning && state === 'ready' && remoteOrigin !== ''\n remoteStateBadge.classList.toggle('is-ready', remoteReady)\n remoteStateBadge.classList.toggle('is-busy', state === 'starting' || state === 'connecting' || state === 'needs-login')\n remoteStateBadge.classList.toggle('is-attention', state === 'error' || state === 'unavailable')\n remoteStateBadge.textContent = remoteReady\n ? origin ? t('originBackendReady') : t('ready')\n : state === 'starting' || state === 'connecting' || state === 'needs-login'\n ? t('remoteStateConnecting')\n : state === 'error' || state === 'unavailable'\n ? t('remoteStateAttention')\n : t('remoteStateOff')\n remoteAccess.hidden = !remoteReady\n remoteAccessLink.href = remoteOrigin\n remoteAccessLink.textContent = remoteOrigin\n remoteAccessLink.title = remoteOrigin\n remoteStatus.classList.toggle('is-running', remoteReady)\n const labels: Record<string, string> = {\n off: t('remoteOff'),\n unavailable: cpolar ? t('remoteUnavailableCpolar')\n : cloudflared ? t('remoteUnavailableCloudflared')\n : frp ? t('remoteUnavailableFrp') : origin ? t('originUnavailable') : t('remoteUnavailableTailscale'),\n starting: cpolar ? t('remoteStartingCpolar')\n : cloudflared ? t('remoteStartingCloudflared')\n : frp ? t('remoteStartingFrp') : origin ? t('originStarting') : t('remoteStartingTailscale'),\n 'needs-login': t('remoteNeedsLogin'),\n connecting: cpolar ? t('remoteConnectingCpolar')\n : cloudflared ? t('remoteConnectingCloudflared')\n : frp ? t('remoteConnectingFrp') : t('remoteConnectingTailscale'),\n ready: origin ? t('originReady') : t('remoteReady'),\n error: t('remoteError'),\n }\n const errorLabels: Record<string, string> = translatedRemoteErrors()\n remoteStatus.textContent = remoteSetupPending && needsFunnelSetup\n ? t('setupOpened')\n : (state === 'error' ? (errorLabels[errorCode] ?? labels.error!) : (labels[state] ?? labels.error!))\n // Keep a just-failed action's message for this one repaint, then release it.\n if (remoteFailureText !== undefined) {\n remoteStatus.textContent = remoteFailureText\n remoteFailureText = undefined\n }\n remoteGuide.hidden = !needsFunnelSetup\n remoteSetup.disabled = remoteSetupUrl === '' || remoteReconnectBusy\n remoteSetupRetry.disabled = remoteReconnectBusy\n remoteToggle.textContent = remoteRunning ? t('disableRemote') : t('enableRemote')\n const providerPrepared = cpolar ? cpolarInstalled && cpolarConfigured\n : cloudflared ? cloudflaredInstalled\n : frp ? frpInstalled && frpConfigured : origin ? originConfigured : true\n remoteToggle.disabled = remoteProviderBusy || (!providerPrepared && !(origin && remoteRunning))\n remoteLogin.hidden = !tailscale || state !== 'needs-login' || remoteLoginUrl === ''\n remoteReconnect.hidden = needsFunnelSetup || (state !== 'error' && state !== 'unavailable')\n || !providerPrepared\n remoteActions.hidden = !providerPrepared && !(origin && remoteRunning)\n remotePair.disabled = !remoteReady || originFormBusy\n remoteCopyLink.disabled = !remoteReady || originFormBusy\n remoteDevices.disabled = !remoteReady || originFormBusy\n if (origin) { remoteReconnect.disabled = remoteProviderBusy || remoteReconnectBusy; remoteReset.disabled = remoteProviderBusy }\n else remoteReset.disabled = false\n if (!remoteReady) {\n remoteQr.hidden = true\n remotePairLink.hidden = true\n activeRemotePairUrl = ''\n activeRemotePairExpiresAt = 0\n }\n if (!needsFunnelSetup) remoteSetupPending = false\n }\n let remoteLoadInFlight = false\n const loadRemote = (): void => {\n if (remoteLoadInFlight || originFormBusy) return\n const epoch = remoteSnapshotEpoch\n remoteLoadInFlight = true\n void controlRequestJson('/api/mobile-access/remote/control')\n .then(data => { if (epoch === remoteSnapshotEpoch) renderRemote(data) }, error => {\n if (epoch === remoteSnapshotEpoch) remoteStatus.textContent = t('requestFailed', { error: String(error) })\n })\n .finally(() => { remoteLoadInFlight = false })\n }\n const chooseRemoteProvider = (provider: MobileRemoteProvider): void => {\n if (remoteProviderBusy || provider === remoteProvider) return\n if (remoteRunning && !window.confirm(t('switchProviderConfirm'))) return\n remoteProviderBusy = true\n tailscaleChoice.disabled = true\n cpolarChoice.disabled = true\n cloudflaredChoice.disabled = true\n frpChoice.disabled = true\n originChoice.disabled = true\n remoteStatus.textContent = provider === 'cpolar' ? t('switchingCpolar')\n : provider === 'cloudflared' ? t('switchingCloudflared')\n : provider === 'frp' ? t('switchingFrp') : provider === 'origin' ? t('switchingOrigin') : t('switchingTailscale')\n void controlRequestJson('/api/mobile-access/remote/provider', { method: 'POST', body: JSON.stringify({ provider }) })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n }\n tailscaleChoice.addEventListener('click', () => { chooseRemoteProvider('tailscale') })\n cpolarChoice.addEventListener('click', () => { chooseRemoteProvider('cpolar') })\n cloudflaredChoice.addEventListener('click', () => { chooseRemoteProvider('cloudflared') })\n frpChoice.addEventListener('click', () => { chooseRemoteProvider('frp') })\n originChoice.addEventListener('click', () => { chooseRemoteProvider('origin') })\n cloudflaredInstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const accepted = window.confirm(t('installConfirmCloudflared', { size: cloudflaredDownloadSize }))\n if (!accepted) return\n remoteProviderBusy = true\n cloudflaredInstall.disabled = true\n cloudflaredInstall.textContent = t('downloading')\n remoteStatus.textContent = t('installingCloudflared')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/component/install', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'installFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n cloudflaredPurge.addEventListener('click', () => {\n if (remoteProviderBusy) return\n if (!window.confirm(t('purgeCloudflaredConfirm'))) return\n remoteProviderBusy = true\n cloudflaredPurge.disabled = true\n remoteStatus.textContent = t('purgingCloudflared')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/component/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = t('purgeFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cloudflaredPurge.disabled = false; loadRemote() })\n })\n // Tunnel type is staged locally and only reaches the provider through Save, so\n // clicking between the two never silently discards a saved token.\n const showCloudflaredMode = (mode: 'quick' | 'named'): void => {\n cloudflaredModeDraft = mode\n cloudflaredModeQuick.classList.toggle('is-active', mode === 'quick')\n cloudflaredModeNamed.classList.toggle('is-active', mode === 'named')\n cloudflaredModeQuick.setAttribute('aria-pressed', String(mode === 'quick'))\n cloudflaredModeNamed.setAttribute('aria-pressed', String(mode === 'named'))\n cloudflaredModeHint.textContent = mode === 'named' ? t('cloudflaredTunnelNamedHint') : t('cloudflaredTunnelQuickHint')\n // The component note follows the same choice immediately. Waiting for the next poll\n // would leave a quick-tunnel warning sitting beside named-tunnel settings.\n cloudflaredNote.textContent = mode === 'named' ? t('cloudflaredNamedNote') : t('cloudflaredQuickNote')\n cloudflaredTunnel.hidden = mode !== 'named'\n cloudflaredTunnelSave.textContent = cloudflaredSaveLabel()\n }\n cloudflaredModeQuick.addEventListener('click', () => { if (!remoteProviderBusy) showCloudflaredMode('quick') })\n cloudflaredModeNamed.addEventListener('click', () => { if (!remoteProviderBusy) showCloudflaredMode('named') })\n cloudflaredHostname.addEventListener('input', () => { cloudflaredHostnameDirty = true })\n cloudflaredPort.addEventListener('input', () => { cloudflaredPortDirty = true })\n cloudflaredTunnelSave.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const mode = cloudflaredModeDraft ?? cloudflaredTunnelMode\n const hostname = String(cloudflaredHostname.value ?? '').trim()\n const portValue = String(cloudflaredPort.value ?? '').trim()\n const port = Number(portValue)\n const token = String(cloudflaredToken.value ?? '')\n // The provider re-validates everything; these checks only keep an obviously\n // incomplete form from costing a round trip.\n if (mode === 'named') {\n if (hostname === '') { remoteStatus.textContent = t('cloudflaredTunnelHostnameInvalid'); return }\n if (portValue === '' || !Number.isSafeInteger(port) || port < 1024 || port > 65535) {\n remoteStatus.textContent = t('cloudflaredTunnelPortInvalid')\n return\n }\n // The LAN gateway owns 3443 for as long as DSH runs, so this is not a\n // transient conflict worth a round trip.\n if (port === 3443) { remoteStatus.textContent = t('cloudflaredTunnelPortReserved'); return }\n if (token === '' && !cloudflaredTunnelConfigured) { remoteStatus.textContent = t('cloudflaredTunnelConfigMissing'); return }\n if (token !== '' && (token.length < 32 || !/^[A-Za-z0-9_=+/-]+$/u.test(token))) {\n remoteStatus.textContent = t('cloudflaredTunnelTokenInvalid')\n return\n }\n }\n remoteProviderBusy = true\n cloudflaredTunnelSave.disabled = true\n cloudflaredTunnelSave.textContent = t('saving')\n remoteStatus.textContent = mode === 'named' ? t('cloudflaredTunnelSaving') : t('switchingCloudflared')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/tunnel', {\n method: 'POST',\n body: JSON.stringify(mode === 'named' ? { mode, hostname, port, token } : { mode: 'quick' }),\n })\n .then(data => {\n // The token is write-only: never keep a copy in the DOM after saving.\n cloudflaredToken.value = ''\n cloudflaredModeDraft = null\n // The saved values are now authoritative, so let the next poll restore them.\n cloudflaredHostnameDirty = false\n cloudflaredPortDirty = false\n remoteFailureText = ''\n renderRemote(data)\n }, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => {\n remoteProviderBusy = false\n cloudflaredTunnelSave.disabled = false\n cloudflaredTunnelSave.textContent = cloudflaredSaveLabel()\n loadRemote()\n })\n })\n cloudflaredTunnelForget.addEventListener('click', () => {\n if (remoteProviderBusy) return\n if (!window.confirm(t('cloudflaredTunnelForgetConfirm'))) return\n remoteProviderBusy = true\n cloudflaredTunnelForget.disabled = true\n remoteStatus.textContent = t('cloudflaredTunnelForgetting')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/tunnel/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(data => {\n cloudflaredToken.value = ''\n cloudflaredHostname.value = ''\n cloudflaredPort.value = '3444'\n cloudflaredModeDraft = null\n cloudflaredHostnameDirty = false\n cloudflaredPortDirty = false\n remoteFailureText = ''\n renderRemote(data)\n }, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cloudflaredTunnelForget.disabled = false; loadRemote() })\n })\n cpolarInstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const accepted = window.confirm(t('installConfirm'))\n if (!accepted) return\n remoteProviderBusy = true\n cpolarInstall.disabled = true\n cpolarInstall.textContent = t('downloading')\n remoteStatus.textContent = t('installingCpolar')\n void controlRequestJson('/api/mobile-access/remote/cpolar/component/install', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'installFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n cpolarConfigure.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const authtoken = cpolarToken.value.trim()\n if (authtoken.length < 20 || /\\s/u.test(authtoken)) {\n remoteStatus.textContent = t('invalidToken')\n cpolarToken.focus()\n return\n }\n remoteProviderBusy = true\n cpolarConfigure.disabled = true\n cpolarConfigure.setAttribute('aria-busy', 'true')\n cpolarConfigure.textContent = t('saving')\n void controlRequestJson('/api/mobile-access/remote/cpolar/configure', { method: 'POST', body: JSON.stringify({ authtoken }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(() => {\n cpolarToken.value = ''\n remoteStatus.textContent = t('configuredConnecting')\n return controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: true }) })\n })\n .then(renderRemote, error => { remoteFailureText = t('configureFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cpolarConfigure.setAttribute('aria-busy', 'false'); cpolarConfigure.textContent = t('saveConnect'); loadRemote() })\n })\n cpolarPurge.addEventListener('click', () => {\n if (remoteProviderBusy) return\n if (!window.confirm(t('purgeConfirm'))) return\n remoteProviderBusy = true\n cpolarPurge.disabled = true\n remoteStatus.textContent = t('purging')\n void controlRequestJson('/api/mobile-access/remote/cpolar/component/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = t('purgeFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cpolarPurge.disabled = false; loadRemote() })\n })\n const validFrpServer = (value: string): boolean => value === value.trim() && value.length > 0 && value.length <= 253\n && !/[\\s\\u0000-\\u001f\\u007f/\\\\@?#]/u.test(value)\n const frpForm = (): { readonly serverAddress: string; readonly serverPort: number; readonly token: string; readonly publicOrigin: string } => ({\n serverAddress: String(frpServer.value ?? '').trim(),\n serverPort: Number(frpPort.value),\n token: String(frpToken.value ?? ''),\n publicOrigin: String(frpOrigin.value ?? '').trim(),\n })\n const validFrpForm = (form: ReturnType<typeof frpForm>): boolean => {\n if (!validFrpServer(form.serverAddress)) return false\n try {\n createFrpServerTemplateForClipboard(form.serverPort, form.token, form.publicOrigin)\n return true\n } catch { return false }\n }\n frpCopyTemplate.addEventListener('click', () => {\n const form = frpForm()\n if (!validFrpForm(form)) {\n remoteStatus.textContent = t('frpInputInvalid')\n return\n }\n void navigator.clipboard.writeText(createFrpServerTemplateForClipboard(form.serverPort, form.token, form.publicOrigin))\n .then(() => { remoteStatus.textContent = t('templateCopied') }, () => { remoteStatus.textContent = t('templateCopyFailed') })\n })\n const validVpsSshUser = (value: string): boolean => /^[a-z_][a-z0-9_.-]*[$]?$/iu.test(value) && value.length <= 64\n const validVpsSshKey = (value: string): boolean => value === '' || (/^[a-zA-Z]:[\\\\/]/u.test(value) || value.startsWith('/'))\n const vpsFormStorageKey = 'dsh-mobile.frp-vps-form.v1'\n try {\n const saved = JSON.parse(localStorage.getItem(vpsFormStorageKey) ?? '{}') as Record<string, unknown>\n if (typeof saved.sshUser === 'string' && validVpsSshUser(saved.sshUser)) vpsSshUser.value = saved.sshUser\n if (typeof saved.sshPort === 'number' && Number.isSafeInteger(saved.sshPort) && saved.sshPort >= 1 && saved.sshPort <= 65_535) vpsSshPort.value = String(saved.sshPort)\n if (typeof saved.sshKeyPath === 'string' && validVpsSshKey(saved.sshKeyPath)) vpsSshKey.value = saved.sshKeyPath\n } catch { /* Browser storage is an optional convenience only. */ }\n const saveVpsForm = (): void => {\n try {\n localStorage.setItem(vpsFormStorageKey, JSON.stringify({\n sshUser: String(vpsSshUser.value ?? '').trim(),\n sshPort: Number(vpsSshPort.value),\n sshKeyPath: String(vpsSshKey.value ?? '').trim(),\n }))\n } catch { /* Private browsing or a full quota must not block deployment. */ }\n }\n const validVpsDeploymentForm = (): boolean => {\n const sshPort = Number(vpsSshPort.value)\n return validVpsFrpForm()\n && validVpsSshUser(String(vpsSshUser.value ?? '').trim())\n && Number.isSafeInteger(sshPort) && sshPort >= 1 && sshPort <= 65_535\n && validVpsSshKey(String(vpsSshKey.value ?? '').trim())\n }\n /**\n * VPS actions accept blank connection fields when a configuration is already\n * saved; blanks keep their saved values (\"已保存时可留空\"). The token itself\n * is never readable here, so a blank token is merged server-side while the\n * remaining fields still pass the regular template check.\n */\n const vpsEffectiveForm = (): ReturnType<typeof frpForm> => {\n const form = frpForm()\n if (!frpConfigured) return form\n return {\n serverAddress: form.serverAddress === '' ? configuredFrpServer : form.serverAddress,\n serverPort: Number.isSafeInteger(form.serverPort) && form.serverPort >= 1 ? form.serverPort : configuredFrpPort,\n token: form.token,\n publicOrigin: form.publicOrigin === '' ? configuredFrpOrigin : form.publicOrigin,\n }\n }\n const validVpsFrpForm = (): boolean => {\n const form = vpsEffectiveForm()\n const token = form.token === '' && frpConfigured ? '0123456789abcdef' : form.token\n return validFrpForm({ ...form, token })\n }\n const refreshVpsDeployButton = (): void => {\n const disabled = remoteProviderBusy || !validVpsDeploymentForm()\n vpsDeploy.disabled = disabled\n vpsCopyUninstall.disabled = disabled\n vpsUninstall.disabled = disabled\n }\n for (const input of [frpServer, frpPort, frpToken, frpOrigin, vpsSshUser, vpsSshPort, vpsSshKey]) {\n input.addEventListener('input', refreshVpsDeployButton)\n }\n for (const input of [vpsSshUser, vpsSshPort, vpsSshKey]) input.addEventListener('input', saveVpsForm)\n const vpsCertName = (origin: string): string | undefined => {\n try {\n const host = new URL(origin).hostname\n return /^\\d{1,3}(?:\\.\\d{1,3}){3}$/u.test(host) ? host : undefined\n } catch { return undefined }\n }\n const requestVpsHostKeys = (serverAddress: string, sshUser: string, sshPort: number, sshKeyPath: string): Promise<ReadonlyArray<{ readonly display: string; readonly fingerprint: string }>> => {\n const keyPayload: Record<string, unknown> = { serverAddress, sshUser, sshPort }\n if (sshKeyPath !== '') keyPayload.sshKeyPath = sshKeyPath\n return controlRequestJson('/api/mobile-access/remote/frp/vps/host-keys', { method: 'POST', body: JSON.stringify(keyPayload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(keys => {\n const hostKeys = Array.isArray(keys.vpsHostKeys) ? keys.vpsHostKeys as Array<Record<string, unknown>> : []\n const confirmed = hostKeys\n .filter(key => typeof key.fingerprint === 'string' && typeof key.keyType === 'string')\n .map(key => ({ display: `${String(key.keyType)} ${String(key.fingerprint)}`, fingerprint: String(key.fingerprint) }))\n if (confirmed.length === 0) throw new Error(String(t('vpsHostKeyFailed', { error: 'empty' })))\n return confirmed\n })\n }\n vpsDeploy.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const form = vpsEffectiveForm()\n if (!validVpsFrpForm()) {\n vpsDeployStatus.textContent = t('vpsDeployNotReady')\n return\n }\n const sshUser = vpsSshUser.value.trim()\n const sshPort = Number(vpsSshPort.value)\n const sshKeyPath = vpsSshKey.value.trim()\n saveVpsForm()\n if (!validVpsSshUser(sshUser) || !Number.isSafeInteger(sshPort) || sshPort < 1 || sshPort > 65535 || !validVpsSshKey(sshKeyPath)) {\n vpsDeployStatus.textContent = t('vpsDeployFailed', { error: t('vpsSshKey') })\n return\n }\n remoteProviderBusy = true\n vpsDeploy.disabled = true\n vpsCopyUninstall.disabled = true\n vpsUninstall.disabled = true\n vpsDeployStatus.textContent = t('vpsHostKeyFetching')\n remoteStatus.textContent = t('vpsHostKeyFetching')\n void requestVpsHostKeys(form.serverAddress, sshUser, sshPort, sshKeyPath)\n .then(hostKeys => {\n const display = hostKeys.map(key => key.display).join('\\n')\n if (!window.confirm(t('vpsDeployConfirmWithKeys', { fingerprints: display }))) {\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n return\n }\n vpsDeployStatus.textContent = t('vpsDeploying')\n remoteStatus.textContent = t('vpsDeploying')\n const payload: Record<string, unknown> = {\n confirm: true,\n ...form,\n sshUser,\n sshPort,\n hostFingerprints: hostKeys.map(key => key.fingerprint),\n }\n if (sshKeyPath !== '') payload.sshKeyPath = sshKeyPath\n return controlRequestJson('/api/mobile-access/remote/frp/vps/deploy', { method: 'POST', body: JSON.stringify(payload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(data => {\n const deployment = data.vpsDeployment !== null && typeof data.vpsDeployment === 'object' ? data.vpsDeployment as Record<string, unknown> : {}\n vpsDeployStatus.textContent = deployment.deployed === true ? t('vpsDeploySuccess') : t('vpsDeployFailed', { error: t('vpsDeployFailed', { error: 'unknown result' }) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n renderRemote(data)\n }, error => {\n vpsDeployStatus.textContent = t('vpsDeployFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n }, error => {\n vpsDeployStatus.textContent = t('vpsHostKeyFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n })\n })\n const readVpsSshForm = (): { sshUser: string; sshPort: number; sshKeyPath: string } | undefined => {\n const sshUser = vpsSshUser.value.trim()\n const sshPort = Number(vpsSshPort.value)\n const sshKeyPath = vpsSshKey.value.trim()\n saveVpsForm()\n if (!validVpsSshUser(sshUser) || !Number.isSafeInteger(sshPort) || sshPort < 1 || sshPort > 65535 || !validVpsSshKey(sshKeyPath)) {\n vpsDeployStatus.textContent = t('vpsDeployFailed', { error: t('vpsSshKey') })\n return undefined\n }\n return { sshUser, sshPort, sshKeyPath }\n }\n vpsCopyUninstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const form = vpsEffectiveForm()\n if (!validVpsFrpForm()) {\n vpsDeployStatus.textContent = t('vpsDeployNotReady')\n return\n }\n remoteProviderBusy = true\n refreshVpsDeployButton()\n const scriptPayload: Record<string, unknown> = { serverPort: form.serverPort }\n const certName = vpsCertName(form.publicOrigin)\n if (certName !== undefined) scriptPayload.certName = certName\n void controlRequestJson('/api/mobile-access/remote/frp/vps/uninstall-script', { method: 'POST', body: JSON.stringify(scriptPayload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(data => {\n const script = typeof data.vpsUninstallScript === 'string' ? data.vpsUninstallScript : ''\n if (script === '') throw new Error('empty script')\n return navigator.clipboard.writeText(script)\n })\n .then(() => { vpsDeployStatus.textContent = t('vpsUninstallScriptCopied') }, error => {\n vpsDeployStatus.textContent = t('vpsUninstallScriptFailed', { error: String(error) })\n })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n vpsUninstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const form = vpsEffectiveForm()\n if (!validVpsFrpForm()) {\n vpsDeployStatus.textContent = t('vpsDeployNotReady')\n return\n }\n const ssh = readVpsSshForm()\n if (ssh === undefined) return\n remoteProviderBusy = true\n refreshVpsDeployButton()\n vpsDeployStatus.textContent = t('vpsHostKeyFetching')\n remoteStatus.textContent = t('vpsHostKeyFetching')\n void requestVpsHostKeys(form.serverAddress, ssh.sshUser, ssh.sshPort, ssh.sshKeyPath)\n .then(hostKeys => {\n if (!window.confirm(t('vpsUninstallConfirmWithKeys', { fingerprints: hostKeys.map(key => key.display).join('\\n') }))) {\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n return\n }\n vpsDeployStatus.textContent = t('vpsUninstalling')\n remoteStatus.textContent = t('vpsUninstalling')\n const payload: Record<string, unknown> = {\n confirm: true,\n serverAddress: form.serverAddress,\n serverPort: form.serverPort,\n sshUser: ssh.sshUser,\n sshPort: ssh.sshPort,\n hostFingerprints: hostKeys.map(key => key.fingerprint),\n }\n if (ssh.sshKeyPath !== '') payload.sshKeyPath = ssh.sshKeyPath\n const certName = vpsCertName(form.publicOrigin)\n if (certName !== undefined) payload.certName = certName\n return controlRequestJson('/api/mobile-access/remote/frp/vps/uninstall', { method: 'POST', body: JSON.stringify(payload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(data => {\n const removal = data.vpsUninstall !== null && typeof data.vpsUninstall === 'object' ? data.vpsUninstall as Record<string, unknown> : {}\n vpsDeployStatus.textContent = removal.removed === true ? t('vpsUninstallSuccess') : t('vpsUninstallFailed', { error: t('vpsUninstallFailed', { error: 'unknown result' }) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n renderRemote(data)\n }, error => {\n vpsDeployStatus.textContent = t('vpsUninstallFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n }, error => {\n vpsDeployStatus.textContent = t('vpsHostKeyFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n })\n })\n frpInstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const accepted = window.confirm(t('frpInstallConfirm', { size: frpDownloadSize }))\n if (!accepted) return\n remoteProviderBusy = true\n frpInstall.disabled = true\n frpInstall.textContent = t('downloading')\n remoteStatus.textContent = t('installingFrp')\n void controlRequestJson('/api/mobile-access/remote/frp/component/install', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'installFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n frpConfigure.addEventListener('click', () => {\n if (remoteProviderBusy || !frpInstalled) return\n const form = frpForm()\n const unchanged = frpConfigured && form.token === '' && form.serverAddress === configuredFrpServer\n && form.serverPort === configuredFrpPort && form.publicOrigin === configuredFrpOrigin\n if (!unchanged && !validFrpForm(form)) {\n remoteStatus.textContent = t('frpInputInvalid')\n return\n }\n remoteProviderBusy = true\n frpConfigure.disabled = true\n frpConfigure.setAttribute('aria-busy', 'true')\n frpConfigure.textContent = t('saving')\n const configure = unchanged\n ? Promise.resolve<Record<string, unknown>>({})\n : controlRequestJson('/api/mobile-access/remote/frp/configure', { method: 'POST', body: JSON.stringify(form) })\n void configure.then(() => {\n frpToken.value = ''\n remoteStatus.textContent = t('frpSavingConnecting')\n return controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: true }) })\n }).then(renderRemote, error => { remoteFailureText = t('configureFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => {\n remoteProviderBusy = false\n frpConfigure.setAttribute('aria-busy', 'false')\n frpConfigure.textContent = t('frpSaveConnect')\n loadRemote()\n })\n })\n frpPurge.addEventListener('click', () => {\n if (remoteProviderBusy || !window.confirm(t('purgeFrpConfirm'))) return\n remoteProviderBusy = true\n frpPurge.disabled = true\n remoteStatus.textContent = t('purgingFrp')\n void controlRequestJson('/api/mobile-access/remote/frp/component/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = t('purgeFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; frpPurge.disabled = false; loadRemote() })\n })\n const clearOriginValidation = (): void => {\n for (const input of [originPublic, originHost, originPort, originCidrs]) input.removeAttribute('aria-invalid')\n }\n const showOriginFeedback = (message: string, error = false): void => {\n originFeedback.textContent = message\n originFeedback.hidden = false\n originFeedback.classList.toggle('is-error', error)\n }\n const showOriginError = (error: unknown): void => {\n const code = error instanceof Error ? error.message : String(error)\n const key = ORIGIN_ERROR_MESSAGE_KEYS[code]\n const fields: Record<string, HTMLInputElement> = {\n origin_public_origin_invalid: originPublic, origin_listen_host_invalid: originHost,\n origin_listen_address_unavailable: originHost, origin_listen_port_invalid: originPort,\n origin_listen_port_reserved: originPort, origin_listen_port_in_use: originPort,\n origin_allowed_cidrs_invalid: originCidrs,\n }\n clearOriginValidation()\n const input = fields[code]\n input?.setAttribute('aria-invalid', 'true')\n showOriginFeedback(key === undefined ? t('configureFailed', { error: String(error) }) : t(key), true)\n }\n const setOriginFormBusy = (busy: boolean): void => {\n originFormBusy = busy\n remoteProviderBusy = busy\n remoteSnapshotEpoch += 1\n renderRemote(latestRemoteState)\n }\n for (const input of [originPublic, originHost, originPort, originCidrs]) {\n input.addEventListener('input', () => {\n originFormDirty = true\n clearOriginValidation()\n originFeedback.hidden = true\n })\n }\n originConfigure.addEventListener('click', () => {\n if (remoteProviderBusy || remoteProvider !== 'origin') return\n clearOriginValidation()\n for (const input of [originPublic, originHost, originPort, originCidrs]) {\n if (!input.reportValidity()) return\n }\n const form = {\n publicOrigin: originPublic.value.trim(), listenHost: originHost.value.trim(),\n listenPort: Number(originPort.value), allowedCidrs: originCidrs.value.trim().split(/[\\s,]+/u).filter(Boolean),\n }\n setOriginFormBusy(true)\n showOriginFeedback(t('originSaving'))\n void controlRequestJson('/api/mobile-access/remote/origin/configure', { method: 'POST', body: JSON.stringify(form) })\n .then(() => controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: true }) }))\n .then(data => {\n originFormDirty = false\n renderRemote(data)\n if (data.state === 'error') showOriginError(new Error(typeof data.errorCode === 'string' ? data.errorCode : 'origin_gateway_start_failed'))\n else originFeedback.hidden = true\n }, showOriginError)\n .finally(() => {\n setOriginFormBusy(false)\n const invalidInput = [originPublic, originHost, originPort, originCidrs].find(input => input.getAttribute('aria-invalid') === 'true')\n invalidInput?.focus()\n loadRemote()\n })\n })\n originPurge.addEventListener('click', () => {\n if (remoteProviderBusy || !window.confirm(t('originPurgeConfirm'))) return\n setOriginFormBusy(true)\n showOriginFeedback(t('originPurging'))\n void controlRequestJson('/api/mobile-access/remote/origin/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(data => {\n originFormDirty = false\n clearOriginValidation()\n renderRemote(data)\n showOriginFeedback(t('originPurged'))\n }, showOriginError)\n .finally(() => { setOriginFormBusy(false); loadRemote() })\n })\n originCopyBackend.addEventListener('click', () => {\n const address = originBackendAddress.textContent ?? ''\n if (address === '' || remoteProviderBusy) return\n void Promise.resolve().then(() => navigator.clipboard.writeText(address))\n .then(() => { showOriginFeedback(t('originBackendCopied')) }, error => { showOriginFeedback(t('requestFailed', { error: String(error) }), true) })\n })\n remoteToggle.addEventListener('click', () => {\n remoteToggle.disabled = true\n void controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: !remoteRunning }) })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(loadRemote)\n })\n remoteLogin.addEventListener('click', () => {\n if (remoteLoginUrl !== '') window.open(remoteLoginUrl, '_blank', 'noopener,noreferrer')\n })\n const reconnectRemote = (): void => {\n if (remoteReconnectBusy) return\n remoteReconnectBusy = true\n remoteReconnect.disabled = true\n remoteSetup.disabled = true\n remoteSetupRetry.disabled = true\n remoteStatus.textContent = remoteProvider === 'cpolar' ? t('reconnectingCpolar')\n : remoteProvider === 'cloudflared' ? t('reconnectingCloudflared')\n : remoteProvider === 'frp' ? t('reconnectingFrp') : remoteProvider === 'origin' ? t('reconnectingOrigin') : t('reconnectingTailscale')\n void controlRequestJson('/api/mobile-access/remote/reconnect', { method: 'POST', body: '{}' })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => {\n remoteReconnectBusy = false\n remoteReconnect.disabled = false\n remoteSetup.disabled = remoteSetupUrl === ''\n remoteSetupRetry.disabled = false\n })\n }\n remoteReconnect.addEventListener('click', reconnectRemote)\n remoteSetupRetry.addEventListener('click', () => { remoteSetupPending = false; reconnectRemote() })\n remoteSetup.addEventListener('click', () => {\n if (remoteSetupUrl === '') return\n remoteSetupPending = true\n remoteSetupOpenedAt = Date.now()\n remoteStatus.textContent = t('setupOpened')\n window.open(remoteSetupUrl, '_blank', 'noopener,noreferrer')\n })\n const retryAfterSetup = (): void => {\n if (!remoteSetupPending || document.visibilityState === 'hidden' || Date.now() - remoteSetupOpenedAt < 800) return\n remoteSetupPending = false\n reconnectRemote()\n }\n window.addEventListener('focus', retryAfterSetup)\n document.addEventListener('visibilitychange', retryAfterSetup)\n const copyRemotePairUrl = async (): Promise<void> => {\n try {\n await navigator.clipboard.writeText(activeRemotePairUrl)\n remoteStatus.textContent = t('linkCopied')\n } catch {\n remoteStatus.textContent = t('remoteQrReady')\n }\n }\n const openRemotePairing = (): Promise<void> => controlRequestJson('/api/mobile-access/remote/pairing/open', { method: 'POST', body: '{}' }).then(async data => {\n const pairUrl = typeof data.pairUrl === 'string' ? data.pairUrl : ''\n const expiresAt = typeof data.expiresAt === 'number' && Number.isFinite(data.expiresAt) ? data.expiresAt : 0\n showQr(typeof data.qrSvg === 'string' ? data.qrSvg : '', remoteQr)\n if (pairUrl === '') { remoteStatus.textContent = t('keyGenerationFailed'); return }\n // QR and copy actions share the same one-time pairing window. Re-copying\n // cannot invalidate a QR that the phone may already be scanning.\n activeRemotePairUrl = pairUrl\n activeRemotePairExpiresAt = expiresAt\n remotePairLink.textContent = pairUrl\n remotePairLink.classList.add('is-key')\n remotePairLink.hidden = false\n await copyRemotePairUrl()\n })\n remotePair.addEventListener('click', () => {\n remotePair.disabled = true\n void openRemotePairing()\n .catch(error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remotePair.disabled = !remoteReady })\n })\n remoteCopyLink.addEventListener('click', () => {\n remoteCopyLink.disabled = true\n const operation = activeRemotePairUrl !== '' && activeRemotePairExpiresAt > Date.now()\n ? copyRemotePairUrl()\n : openRemotePairing()\n void operation\n .catch(error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteCopyLink.disabled = !remoteReady })\n })\n const renderRemoteDevices = (data: Record<string, unknown>): void => {\n const devices = Array.isArray(data.devices) ? data.devices as Record<string, unknown>[] : []\n remoteDevicePanel.replaceChildren()\n if (devices.length === 0) {\n const empty = element('p', 'dsh-mobile-control__device-empty'); empty.textContent = t('noRemoteDevices'); remoteDevicePanel.append(empty); return\n }\n for (const device of devices) {\n const row = element('div', 'dsh-mobile-control__device')\n const label = element('span', 'dsh-mobile-control__device-label'); label.textContent = typeof device.label === 'string' ? device.label : t('device')\n const meta = element('span', 'dsh-mobile-control__device-meta'); meta.textContent = t('expires', { time: formatTime(device.expiresAt) })\n const revoke = element('button', 'dsh-mobile-control__device-revoke'); revoke.type = 'button'; revoke.textContent = t('revoke')\n const id = typeof device.id === 'string' ? device.id : ''\n revoke.addEventListener('click', () => {\n void controlRequestJson('/api/mobile-access/remote/devices/revoke', { method: 'POST', body: JSON.stringify({ deviceId: id }) })\n .then(loadRemoteDevices, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n })\n row.append(label, meta, revoke); remoteDevicePanel.append(row)\n }\n }\n const loadRemoteDevices = (): void => {\n void controlRequestJson('/api/mobile-access/remote/devices').then(renderRemoteDevices, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n }\n remoteDevices.addEventListener('click', () => {\n const show = remoteDevicePanel.hidden\n remoteDevicePanel.hidden = !show\n if (show) loadRemoteDevices()\n })\n remoteReset.addEventListener('click', () => {\n const prompt = remoteProvider === 'cpolar'\n ? t('resetCpolarConfirm')\n : remoteProvider === 'cloudflared' ? t('resetCloudflaredConfirm')\n : remoteProvider === 'frp' ? t('resetFrpConfirm') : remoteProvider === 'origin' ? t('resetOriginConfirm') : t('resetTailscaleConfirm')\n if (!window.confirm(prompt)) return\n void controlRequestJson('/api/mobile-access/remote/reset', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n })\n const renderDiagnostics = (data: Record<string, unknown>): void => {\n const entries = [...diagnosticEntriesForRender(data)]\n const overall = diagnosticOverallForChecks(data.overall, entries.map(entry => entry.status))\n diagnosticsSummary.className = `dsh-mobile-control__diagnostic-summary is-${overall}`\n diagnosticsSummaryTitle.textContent = overall === 'ok' ? t('diagnosticsComplete') : overall === 'attention' ? t('diagnosticsAttention') : t('diagnosticsProblem')\n diagnosticsSummaryText.textContent = locale === 'zh' && data.overall === overall && typeof data.summary === 'string' ? data.summary : t('diagnosticsCompleteFallback')\n diagnosticsChecks.replaceChildren()\n const statusLabels: Record<string, string> = { ok: t('diagnosticStatusOk'), warning: t('diagnosticStatusWarning'), error: t('diagnosticStatusError'), info: t('diagnosticStatusInfo') }\n const diagnosticLabelKeys: Record<string, string> = {\n versions: 'diagnosticLabelVersions', network: 'diagnosticLabelNetwork', lan: 'diagnosticLabelLan',\n firewall: 'diagnosticLabelFirewall', remote: 'diagnosticLabelRemote', 'phone-network': 'diagnosticLabelPhone',\n }\n const statusOf = (entry: Record<string, unknown>): 'ok' | 'warning' | 'error' | 'info' => normalizeDiagnosticStatus(entry.status)\n const localizedEntryCopy = (entry: Record<string, unknown>): { readonly detail: string; readonly action: string } => {\n const serverCopy = diagnosticServerCopy(entry)\n const reason = typeof entry.reason === 'string' ? entry.reason : ''\n const catalog = DIAGNOSTIC_REASON_MESSAGES[locale] as Readonly<Record<string, readonly [string, string]>>\n const templates = catalog[reason]\n if (templates === undefined) return serverCopy\n const facts = entry.facts !== null && typeof entry.facts === 'object' ? entry.facts as Record<string, unknown> : {}\n // Diagnostics read as sentences, so an internal provider id or a raw controller\n // code belongs in the report, not in the prose: it renders as\n // \"Remote access through origin is currently off.\" or \"reported gateway_start_failed\".\n const providerNames: Record<string, string> = {\n tailscale: 'Tailscale Funnel', cpolar: 'cpolar', cloudflared: 'cloudflared',\n frp: t('frpName'), origin: t('originName'),\n }\n const providerId = typeof facts.provider === 'string' ? facts.provider : ''\n const controllerKey = typeof facts.controllerCode === 'string' ? REMOTE_ERROR_MESSAGE_KEYS[facts.controllerCode] : undefined\n const values: Record<string, string> = {\n provider: providerNames[providerId] ?? '',\n latencyMs: typeof facts.latencyMs === 'number' && Number.isFinite(facts.latencyMs) ? new Intl.NumberFormat(localeTag).format(facts.latencyMs) : '',\n interfaceName: typeof facts.interfaceName === 'string' ? facts.interfaceName : '',\n endpointSuffix: typeof facts.endpointSuffix === 'string' ? facts.endpointSuffix : '',\n // A translated sentence when the code is known, otherwise nothing rather than\n // an identifier no user can act on.\n controllerCode: controllerKey === undefined ? '' : t(controllerKey),\n }\n const interpolate = (template: string): string => template.replace(/\\{(\\w+)\\}/gu, (_match, key: string) => values[key] ?? '')\n let detail = interpolate(templates[0])\n let action = interpolate(templates[1])\n if (reason === 'versions-current') {\n const versions = data.versions !== null && typeof data.versions === 'object' ? data.versions as Record<string, unknown> : {}\n if ([versions.plugin, versions.dsh, versions.minimumAndroidApp].every(value => typeof value === 'string')) {\n detail += ` plugin ${String(versions.plugin)}, DSH ${String(versions.dsh)}, Android ${String(versions.minimumAndroidApp)}.`\n }\n }\n if (reason === 'remote-controller-error') {\n const controllerActionKeys: Readonly<Record<string, string>> = {\n ...ORIGIN_ERROR_MESSAGE_KEYS,\n component_missing: 'remoteUnavailableTailscale', funnel_permission_required: 'funnelPermission', funnel_https_required: 'funnelHttps', funnel_start_failed: 'funnelStart', funnel_start_timeout: 'funnelTimeout', tailscale_dns_missing: 'tailscaleDnsMissing',\n sidecar_launch_failed: 'remoteUnavailableTailscale', sidecar_stopped: 'controlChannelFailed', sidecar_exited: 'controlChannelFailed', control_channel_failed: 'controlChannelFailed',\n cpolar_component_missing: 'cpolarMissing', cpolar_component_invalid: 'cpolarInvalid', cpolar_config_missing: 'cpolarConfigMissing', cpolar_config_invalid: 'cpolarConfigInvalid', cpolar_start_timeout: 'cpolarTimeout', cpolar_stopped: 'cpolarStopped', cpolar_exited: 'cpolarExited',\n cloudflared_component_missing: 'cloudflaredMissing', cloudflared_component_invalid: 'cloudflaredInvalid', cloudflared_component_unsupported: 'cloudflaredComponentUnsupported', cloudflared_port_unavailable: 'cloudflaredPortUnavailable', cloudflared_port_reservation_failed: 'cloudflaredPortReservationFailed', cloudflared_launch_failed: 'cloudflaredLaunchFailed', cloudflared_start_timeout: 'cloudflaredTimeout', cloudflared_stopped: 'cloudflaredStopped', cloudflared_exited: 'cloudflaredExited', cloudflared_invalid_origin: 'cloudflaredOriginInvalid', cloudflared_tunnel_port_unavailable: 'cloudflaredTunnelPortUnavailable', cloudflared_tunnel_config_invalid: 'cloudflaredTunnelInvalid', cloudflared_tunnel_target_invalid: 'cloudflaredTunnelTargetInvalid', cloudflared_download_hash_mismatch: 'cloudflaredDownloadHashMismatch', cloudflared_download_size_mismatch: 'cloudflaredDownloadSizeMismatch', cloudflared_executable_hash_mismatch: 'cloudflaredExecutableHashMismatch',\n frp_component_missing: 'frpMissing', frp_component_invalid: 'frpInvalid', frp_config_missing: 'frpConfigMissing', frp_config_verify_failed: 'frpConfigVerifyFailed', frp_vhost_publicly_reachable: 'frpVhostPublic', frp_vhost_probe_failed: 'frpVhostProbeFailed', frp_launch_failed: 'frpLaunchFailed', frp_start_timeout: 'frpTimeout', frp_discovery_mismatch: 'frpDiscoveryMismatch', frp_discovery_invalid: 'frpDiscoveryInvalid', frp_stopped: 'frpStopped', frp_exited: 'frpExited', gateway_start_failed: 'gatewayStartFailed',\n }\n const actionKey = controllerActionKeys[values.controllerCode ?? '']\n if (actionKey !== undefined) action = t(actionKey)\n }\n return { detail, action }\n }\n const appendGroup = (label: string, groupEntries: Record<string, unknown>[]): void => {\n if (groupEntries.length === 0) return\n const group = element('section', 'dsh-mobile-control__diagnostic-group')\n const groupHeader = element('header', 'dsh-mobile-control__diagnostic-group-header')\n const groupTitle = element('h3'); groupTitle.textContent = label\n const groupCount = element('span'); groupCount.textContent = t('diagnosticItems', { count: groupEntries.length })\n const list = element('div', 'dsh-mobile-control__diagnostic-list'); list.setAttribute('role', 'list')\n groupHeader.append(groupTitle, groupCount)\n for (const entry of groupEntries) {\n const state = statusOf(entry)\n const row = element('section', `dsh-mobile-control__diagnostic-check is-${state}`); row.setAttribute('role', 'listitem')\n const marker = element('span', 'dsh-mobile-control__diagnostic-marker'); marker.setAttribute('aria-hidden', 'true')\n const rowBody = element('div', 'dsh-mobile-control__diagnostic-check-body')\n const rowHeader = element('div', 'dsh-mobile-control__diagnostic-check-header')\n const labelKey = typeof entry.id === 'string' ? diagnosticLabelKeys[entry.id] : undefined\n const rowTitle = element('strong'); rowTitle.textContent = locale !== 'zh' && labelKey !== undefined ? t(labelKey) : typeof entry.label === 'string' ? entry.label : t('diagnosticCheck')\n const badge = element('span', 'dsh-mobile-control__diagnostic-badge'); badge.textContent = statusLabels[state]!\n const localizedCopy = localizedEntryCopy(entry)\n const detail = element('p'); detail.textContent = localizedCopy.detail\n rowHeader.append(rowTitle, badge); rowBody.append(rowHeader, detail)\n if (localizedCopy.action !== '') {\n const action = element('p', 'dsh-mobile-control__diagnostic-action')\n const actionLabel = element('span'); actionLabel.textContent = t('diagnosticAction')\n action.append(actionLabel, document.createTextNode(localizedCopy.action)); rowBody.append(action)\n }\n row.append(marker, rowBody); list.append(row)\n }\n group.append(groupHeader, list); diagnosticsChecks.append(group)\n }\n const issues = entries.filter(entry => statusOf(entry) === 'error' || statusOf(entry) === 'warning')\n const otherChecks = entries.filter(entry => statusOf(entry) !== 'error' && statusOf(entry) !== 'warning')\n appendGroup(t('diagnosticNeedsAction'), issues)\n appendGroup(issues.length === 0 ? t('diagnosticDetails') : t('diagnosticOther'), otherChecks)\n diagnosticsSummaryMeta.textContent = issues.length === 0\n ? t('diagnosticNoBlockers', { count: entries.length })\n : t('diagnosticNeedsCount', { count: entries.length, issues: issues.length })\n diagnosticsChecks.hidden = entries.length === 0\n const reportCopy = LOCALIZED_DIAGNOSTIC_COPY[locale]\n const generatedAt = typeof data.generatedAt === 'number' ? new Date(data.generatedAt).toLocaleString(localeTag) : new Date().toLocaleString(localeTag)\n const lines = entries.map(entry => {\n const state = statusOf(entry)\n const labelKey = typeof entry.id === 'string' ? diagnosticLabelKeys[entry.id] : undefined\n const label = labelKey === undefined && typeof entry.label === 'string' ? entry.label : labelKey === undefined ? t('diagnosticCheck') : t(labelKey)\n const localizedCopy = localizedEntryCopy(entry)\n return `[${statusLabels[state]!}] ${label}: ${localizedCopy.detail}${localizedCopy.action === '' ? '' : ` ${localizedCopy.action}`}`\n })\n copiedDiagnosticReport = [reportCopy.reportTitle, `${reportCopy.generated}: ${generatedAt}`, ...lines].join('\\n')\n diagnosticsReport.textContent = copiedDiagnosticReport\n diagnosticsDetails.hidden = copiedDiagnosticReport === ''\n diagnosticsCopy.disabled = copiedDiagnosticReport === ''\n diagnosticsCopy.hidden = copiedDiagnosticReport === ''\n diagnosticsToolbar.classList.toggle('has-report', copiedDiagnosticReport !== '')\n }\n const showDiagnosticsFailure = (error: unknown): void => {\n diagnosticsSummary.className = 'dsh-mobile-control__diagnostic-summary is-error'\n diagnosticsSummaryTitle.textContent = t('diagnosticsIncomplete')\n diagnosticsSummaryText.textContent = t('diagnosticsReadFailed', { error: String(error) })\n diagnosticsSummaryMeta.textContent = t('diagnosticsUnavailable')\n diagnosticsChecks.replaceChildren()\n diagnosticsChecks.hidden = true\n copiedDiagnosticReport = ''\n diagnosticsReport.textContent = ''\n diagnosticsDetails.hidden = true\n diagnosticsCopy.disabled = true\n diagnosticsCopy.hidden = true\n diagnosticsToolbar.classList.remove('has-report')\n }\n const loadDiagnostics = (): void => {\n if (diagnosticsBusy) return\n diagnosticsBusy = true\n diagnosticsRun.disabled = true\n diagnosticsRun.setAttribute('aria-busy', 'true')\n diagnosticsRun.textContent = t('diagnosticsChecking')\n diagnosticsSummary.className = 'dsh-mobile-control__diagnostic-summary is-running'\n diagnosticsSummaryTitle.textContent = t('diagnosticsCheckingTitle')\n diagnosticsSummaryText.textContent = t('diagnosticsCheckingText')\n diagnosticsSummaryMeta.textContent = t('diagnosticsRunningMeta')\n diagnosticsFeedback.hidden = true\n diagnosticsChecks.classList.add('is-refreshing')\n diagnosticsChecks.setAttribute('aria-busy', 'true')\n void controlRequestJson('/api/mobile-access/diagnostics').then(\n data => { renderDiagnosticPayloadSafely(data, renderDiagnostics, showDiagnosticsFailure) },\n showDiagnosticsFailure,\n ).finally(() => {\n diagnosticsBusy = false\n diagnosticsRun.disabled = false\n diagnosticsRun.setAttribute('aria-busy', 'false')\n diagnosticsRun.textContent = t('diagnosticsRetry')\n diagnosticsChecks.classList.remove('is-refreshing')\n diagnosticsChecks.setAttribute('aria-busy', 'false')\n })\n }\n diagnosticsEntry.addEventListener('click', () => {\n if (!diagnosticsView.hidden) { selectView(previousAccessView); return }\n selectView('diagnostics'); loadDiagnostics()\n })\n diagnosticsRun.addEventListener('click', loadDiagnostics)\n const closeUpdateCard = (): void => {\n updateCard.hidden = true\n if (pluginUpdateAvailable && pluginLatestVersion !== '') updatePlugin.hidden = !diagnosticsView.hidden\n }\n const runPluginUpdate = (): void => {\n if (!pluginUpdateAvailable || pluginLatestVersion === '' || updateInFlight) return\n updateInFlight = true\n updateNow.disabled = true\n updateLater.disabled = true\n updateCardTitle.textContent = t('updatingPlugin')\n releaseNotice.hidden = true\n releaseNotice.classList.remove('is-error')\n void controlRequestJson('/api/mobile-access/release/update', { method: 'POST', body: '{}' }, LONG_CONTROL_REQUEST_TIMEOUT_MS).then(data => {\n const installedVersion = releaseVersion(data.installedVersion) ?? pluginLatestVersion\n pluginUpdateAvailable = false\n updateCard.hidden = true\n updatePlugin.hidden = true\n releaseNotice.textContent = t('pluginUpdatedRestart', { version: installedVersion })\n releaseNotice.hidden = false\n }, error => {\n updateCard.hidden = true\n updatePlugin.hidden = false\n releaseNotice.textContent = t('pluginUpdateFailed', { error: String(error) })\n releaseNotice.classList.add('is-error')\n releaseNotice.hidden = false\n }).finally(() => {\n updateInFlight = false\n updateNow.disabled = false\n updateLater.disabled = false\n })\n }\n updatePlugin.addEventListener('click', () => {\n if (!pluginUpdateAvailable || pluginLatestVersion === '' || updateInFlight) return\n updatePlugin.hidden = true\n updateCardTitle.textContent = t('updateTo', { version: pluginLatestVersion })\n updateCardNotes.textContent = pluginReleaseNotes === '' ? t('updateNotesEmpty') : pluginReleaseNotes\n updateCardNotes.hidden = pluginReleaseNotes === ''\n updateCard.hidden = false\n })\n updateNow.addEventListener('click', runPluginUpdate)\n updateLater.addEventListener('click', closeUpdateCard)\n diagnosticsCopy.addEventListener('click', () => {\n if (copiedDiagnosticReport === '') return\n void navigator.clipboard.writeText(copiedDiagnosticReport).then(() => {\n diagnosticsFeedback.textContent = t('diagnosticsCopied')\n diagnosticsFeedback.hidden = false\n }, () => {\n diagnosticsDetails.open = true\n diagnosticsFeedback.textContent = t('diagnosticsCopyManual')\n diagnosticsFeedback.hidden = false\n })\n })\n pair.addEventListener('click', () => { pair.disabled = true; openPairing('key') })\n linkPair.addEventListener('click', () => { linkPair.disabled = true; openPairing('link') })\n close.addEventListener('click', () => { setOpen(false) })\n const dismiss = (event: PointerEvent): void => {\n if (panel.hidden || !(event.target instanceof Node)) return\n if (!providerInfo.contains(event.target)) {\n providerInfoPinned = false\n providerInfoHovered = false\n syncProviderInfo()\n }\n if (!panel.contains(event.target) && !document.querySelector('.dsh-mobile-control__trigger')?.contains(event.target)) setOpen(false)\n }\n document.addEventListener('pointerdown', dismiss)\n void controlRequestJson('/api/mobile-access/release').then(renderRelease, () => {})\n void controlRequestJson('/api/mobile-access/lan/control').then(render, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n loadRemote()\n const remotePoll = window.setInterval(() => { if (!panel.hidden && !remoteView.hidden) loadRemote() }, 1_500)\n const pollWsBlocked = (): void => {\n void controlRequestJson('/api/mobile-access/remote/websocket-paths/blocked').then(blocked => {\n const raw = Array.isArray(blocked.blocked) ? blocked.blocked : []\n wsPathsBlocked = raw.filter((entry): entry is { path: string; attempts: number } =>\n typeof entry === 'object' && entry !== null\n && typeof (entry as { path?: unknown }).path === 'string'\n && typeof (entry as { attempts?: unknown }).attempts === 'number')\n renderWsDot()\n if (!diagnosticsView.hidden) renderWsBlocked(wsPathsBlocked)\n }, () => { /* gateway unreachable; dot keeps its last state */ })\n }\n const wsBlockedPoll = window.setInterval(pollWsBlocked, 20_000)\n return { remove: () => { lifecycle.abort(); window.clearInterval(remotePoll); window.clearInterval(wsBlockedPoll); window.removeEventListener('focus', retryAfterSetup); document.removeEventListener('visibilitychange', retryAfterSetup); document.removeEventListener('pointerdown', dismiss); root.remove() }, toggle: () => { setOpen(panel.hidden !== false) }, isOpen: () => !panel.hidden }\n}\n\nfunction mobileRequest(path: string, init: RequestInit = {}): Promise<Response> {\n const target = new URL(path, location.href)\n if (target.origin !== location.origin) throw new TypeError('mobile extension requests must stay on the DSH origin')\n const headers = new Headers(init.headers)\n const method = (init.method ?? 'GET').toUpperCase()\n if (method !== 'GET' && method !== 'HEAD') {\n const csrf = document.cookie.split(';').map(value => value.trim()).find(value => value.startsWith('dsh_ma_csrf='))?.slice(12)\n if (csrf !== undefined) headers.set('x-dsh-mobile-csrf', csrf)\n }\n return fetch(target, { ...init, headers, credentials: 'same-origin', cache: 'no-store', redirect: 'error' })\n}\n\nexport interface CombinedClientSignal {\n readonly signal: AbortSignal\n readonly cleanup: () => void\n}\n\n/** Combine extension and caller abort lifetimes and expose deterministic listener cleanup. */\nexport function combineClientSignalLifetime(first: AbortSignal, second: AbortSignal): CombinedClientSignal {\n if (first.aborted || second.aborted) {\n const aborted = new AbortController()\n aborted.abort(first.aborted ? first.reason : second.reason)\n return { signal: aborted.signal, cleanup: () => undefined }\n }\n const controller = new AbortController()\n const cleanup = (): void => {\n first.removeEventListener('abort', abortFirst)\n second.removeEventListener('abort', abortSecond)\n }\n const abortFirst = (): void => { cleanup(); controller.abort(first.reason) }\n const abortSecond = (): void => { cleanup(); controller.abort(second.reason) }\n first.addEventListener('abort', abortFirst, { once: true })\n second.addEventListener('abort', abortSecond, { once: true })\n return { signal: controller.signal, cleanup }\n}\n\n/** Combine extension and caller abort lifetimes on WebViews without AbortSignal.any. */\nexport function combineClientSignals(first: AbortSignal, second: AbortSignal): AbortSignal {\n return combineClientSignalLifetime(first, second).signal\n}\n\n/** Keep a combined request lifetime until a streamed response is consumed or cancelled. */\nexport function bindClientResponseLifetime(response: Response, cleanup: () => void): Response {\n if (response.body === null) {\n cleanup()\n return response\n }\n const reader = response.body.getReader()\n let released = false\n const release = (): void => {\n if (released) return\n released = true\n cleanup()\n }\n const body = new ReadableStream<Uint8Array>({\n async pull(controller) {\n try {\n const result = await reader.read()\n if (result.done) {\n release()\n controller.close()\n } else controller.enqueue(result.value)\n } catch (error) {\n release()\n controller.error(error)\n }\n },\n async cancel(reason) {\n try { await reader.cancel(reason) } finally { release() }\n },\n })\n try {\n const retained = new Response(body, { headers: response.headers, status: response.status, statusText: response.statusText })\n Object.defineProperties(retained, {\n redirected: { configurable: true, value: response.redirected },\n type: { configurable: true, value: response.type },\n url: { configurable: true, value: response.url },\n })\n return retained\n } catch (error) {\n void reader.cancel(error)\n release()\n throw error\n }\n}\n\n/** Dispose an old UI when its replacement Host generation cannot be activated. */\nexport function failClosedExtensionGenerationReplacement(\n hasActive: boolean,\n activeGeneration: string | undefined,\n replacementGeneration: string | undefined,\n dispose: () => void,\n): boolean {\n if (!hasActive || activeGeneration === replacementGeneration) return false\n dispose()\n return true\n}\n\n/** Resolve one SDK route and prove its normalized path remains in the current extension namespace. */\nexport function extensionRouteUrl(id: string, path: string, baseUrl: string): URL {\n const rawPathname = path.split(/[?#]/u, 1)[0] ?? ''\n if (!/^[a-z][a-z0-9-]{0,63}$/u.test(id) || !path.startsWith('/') || path.startsWith('//')\n || rawPathname.includes('\\\\') || rawPathname.includes('\\0') || /%(?:2f|5c)/iu.test(rawPathname)) {\n throw new TypeError('extension routes must be relative')\n }\n const origin = new URL(baseUrl).origin\n const prefix = `/mobile-access/extensions/${id}/routes`\n let target: URL\n try { target = new URL(`${prefix}${path}`, origin) } catch { throw new TypeError('extension routes must be relative') }\n let decodedPathname: string\n try { decodedPathname = decodeURIComponent(target.pathname) } catch { throw new TypeError('extension routes must be relative') }\n if (target.origin !== origin || target.hash !== '' || decodedPathname.includes('\\\\')\n || decodedPathname !== prefix && !decodedPathname.startsWith(`${prefix}/`)) {\n throw new TypeError('extension routes must be relative')\n }\n const relative = decodedPathname.slice(prefix.length)\n if (relative.split('/').some(part => part === '.' || part === '..')) throw new TypeError('extension routes must be relative')\n return target\n}\n\n/** Resolve one generation-pinned static asset URL in the current extension namespace. */\nexport function extensionAssetUrl(id: string, generation: string | undefined, path: string, baseUrl: string): URL {\n if (!/^[a-z][a-z0-9-]{0,63}$/u.test(id) || generation !== undefined && !/^[a-f\\d]{64}$/u.test(generation)) {\n throw new TypeError('extension asset path is invalid')\n }\n const normalized = path.replaceAll('\\\\', '/')\n if (normalized.length === 0 || normalized.startsWith('/') || normalized.split('/').some(part => part === '' || part === '.' || part === '..')) {\n throw new TypeError('extension asset path is invalid')\n }\n const target = new URL(`/mobile-access/extensions/${id}/assets/${normalized.split('/').map(encodeURIComponent).join('/')}`, new URL(baseUrl).origin)\n if (generation !== undefined) target.searchParams.set('generation', generation)\n return target\n}\n\n/** Add the immutable Host generation selected for one activated mobile UI. */\nexport function extensionGenerationHeaders(generation: string | undefined, headers?: HeadersInit): Headers {\n const result = new Headers(headers)\n if (generation !== undefined) result.set('x-dsh-mobile-extension-generation', generation)\n return result\n}\n\n/** Build the JSON request used by a mobile extension to invoke a Host action. */\nexport function extensionActionRequestInit(generation: string | undefined, input: unknown, signal: AbortSignal): RequestInit {\n return {\n method: 'POST',\n headers: extensionGenerationHeaders(generation, { 'content-type': 'application/json' }),\n body: JSON.stringify(input ?? {}),\n signal,\n }\n}\n\nexport function registerUniqueDisposable<T extends { readonly dispose: () => void }>(\n entries: Map<string, T>,\n claimedIds: Set<string>,\n id: string,\n mount: () => T,\n): () => void {\n if (claimedIds.has(id)) throw new Error(`duplicate lifecycle id: ${id}`)\n claimedIds.add(id)\n let mounted: T\n try { mounted = mount() } catch (error) { claimedIds.delete(id); throw error }\n let disposed = false\n const dispose = (): void => {\n if (disposed) return\n disposed = true\n mounted.dispose()\n }\n const entry = { ...mounted, dispose } as T\n entries.set(id, entry)\n return () => {\n if (entries.get(id) === entry) { entries.delete(id); claimedIds.delete(id) }\n dispose()\n }\n}\n\n/** Dispose resources omitted by a successfully fetched authoritative manifest. */\nexport function reconcileRemovedExtensions(currentIds: Iterable<string>, seen: ReadonlySet<string>, dispose: (id: string) => void): void {\n for (const id of new Set(currentIds)) if (!seen.has(id)) dispose(id)\n}\n\n/** Reconcile managed resources against one validated authoritative id set. */\nexport function publishAuthoritativeExtensionIds(\n authoritativeIds: Set<string>,\n seen: ReadonlySet<string>,\n managedIdSources: readonly Iterable<string>[],\n dispose: (id: string) => void,\n): void {\n const current = new Set(authoritativeIds)\n for (const source of managedIdSources) for (const id of source) current.add(id)\n reconcileRemovedExtensions(current, seen, dispose)\n authoritativeIds.clear()\n for (const id of seen) authoritativeIds.add(id)\n}\n\ninterface MobileExtensionManifestEntry {\n readonly id: string\n readonly generation?: string\n readonly scriptUrl?: string\n readonly styleUrl?: string\n readonly assetsUrl?: string\n}\ninterface MobileExtensionManifest {\n readonly extensions: readonly MobileExtensionManifestEntry[]\n readonly legacy: { readonly scriptRevision: string; readonly styleRevision: string }\n}\n\nfunction validManifestResourceUrl(value: unknown): value is string {\n return typeof value === 'string' && value.startsWith('/') && !value.startsWith('//') && !value.includes('://')\n && !value.split('/').some(part => part === '..' || part === '.')\n}\n\n/** Validate the manifest before treating it as authoritative state. */\nexport function parseMobileExtensionManifest(payload: unknown): MobileExtensionManifest | undefined {\n if (typeof payload !== 'object' || payload === null) return undefined\n const candidate = payload as { protocol?: unknown; extensions?: unknown; legacy?: unknown }\n if (candidate.protocol !== 1 || !Array.isArray(candidate.extensions) || typeof candidate.legacy !== 'object' || candidate.legacy === null) return undefined\n const legacy = candidate.legacy as { scriptRevision?: unknown; styleRevision?: unknown }\n if (typeof legacy.scriptRevision !== 'string' || typeof legacy.styleRevision !== 'string') return undefined\n const ids = new Set<string>()\n const extensions: MobileExtensionManifestEntry[] = []\n for (const value of candidate.extensions) {\n if (typeof value !== 'object' || value === null) return undefined\n const entry = value as { id?: unknown; generation?: unknown; scriptUrl?: unknown; styleUrl?: unknown; assetsUrl?: unknown }\n if (typeof entry.id !== 'string' || !/^[a-z][a-z0-9-]{0,63}$/u.test(entry.id) || ids.has(entry.id)) return undefined\n if (entry.generation !== undefined && (typeof entry.generation !== 'string' || !/^[a-f\\d]{64}$/u.test(entry.generation))) return undefined\n if (entry.scriptUrl !== undefined && !validManifestResourceUrl(entry.scriptUrl)) return undefined\n if (entry.styleUrl !== undefined && !validManifestResourceUrl(entry.styleUrl)) return undefined\n if (entry.assetsUrl !== undefined && !validManifestResourceUrl(entry.assetsUrl)) return undefined\n ids.add(entry.id)\n extensions.push({\n id: entry.id,\n ...(entry.generation === undefined ? {} : { generation: entry.generation }),\n ...(entry.scriptUrl === undefined ? {} : { scriptUrl: entry.scriptUrl }),\n ...(entry.styleUrl === undefined ? {} : { styleUrl: entry.styleUrl }),\n ...(entry.assetsUrl === undefined ? {} : { assetsUrl: entry.assetsUrl }),\n })\n }\n return { extensions, legacy: { scriptRevision: legacy.scriptRevision, styleRevision: legacy.styleRevision } }\n}\n\n/** A missing manifest is authoritative before optional legacy resources finish refreshing. */\nexport async function handleMissingExtensionManifest(\n clearManifestResources: () => void,\n refreshLegacyResources: () => Promise<readonly boolean[]>,\n signal: AbortSignal,\n): Promise<boolean> {\n clearManifestResources()\n const results = await refreshLegacyResources()\n return !signal.aborted && results.every(Boolean)\n}\n\ninterface LifecycleSchedulerRuntime {\n readonly document: Pick<Document, 'visibilityState' | 'addEventListener' | 'removeEventListener'>\n readonly window: Pick<Window, 'addEventListener' | 'removeEventListener' | 'setTimeout' | 'clearTimeout'>\n}\n\nexport interface LifecycleRefreshController {\n (): void\n refresh(): void\n}\n\nfunction refreshAborted(signal: AbortSignal): boolean { return signal.aborted }\n\n/** Run one coalesced refresh cycle, slowing down when the page is hidden. */\nexport function startLifecycleRefreshScheduler(\n refresh: (signal: AbortSignal) => void | Promise<void>,\n options: { readonly visibleIntervalMs?: number; readonly hiddenIntervalMs?: number; readonly cycleTimeoutMs?: number } = {},\n runtime: LifecycleSchedulerRuntime = { document, window },\n): LifecycleRefreshController {\n const visibleIntervalMs = options.visibleIntervalMs ?? 45_000\n const hiddenIntervalMs = options.hiddenIntervalMs ?? 300_000\n const cycleTimeoutMs = options.cycleTimeoutMs ?? 30_000\n let timer: number | undefined\n let cycleTimer: number | undefined\n let running = false\n let queued = false\n let disposed = false\n let controller: AbortController | undefined\n const clearTimer = (): void => {\n if (timer === undefined) return\n runtime.window.clearTimeout(timer)\n timer = undefined\n }\n const clearCycleTimer = (): void => {\n if (cycleTimer === undefined) return\n runtime.window.clearTimeout(cycleTimer)\n cycleTimer = undefined\n }\n const schedule = (): void => {\n if (disposed) return\n clearTimer()\n const delay = runtime.document.visibilityState === 'hidden' ? hiddenIntervalMs : visibleIntervalMs\n timer = runtime.window.setTimeout(run, delay)\n }\n const run = (): void => {\n if (disposed) return\n clearTimer()\n if (running) { queued = true; return }\n running = true\n const current = new AbortController()\n controller = current\n const refreshPromise = Promise.resolve().then(() => refresh(current.signal))\n const timeoutPromise = new Promise<void>(resolve => {\n cycleTimer = runtime.window.setTimeout(() => {\n cycleTimer = undefined\n current.abort(new DOMException('mobile extension refresh timed out', 'TimeoutError'))\n resolve()\n }, cycleTimeoutMs)\n })\n void Promise.race([refreshPromise, timeoutPromise]).catch(() => { /* Keep the last good resources during reconnects. */ }).finally(() => {\n clearCycleTimer()\n if (controller === current) controller = undefined\n running = false\n if (disposed) return\n if (queued) { queued = false; run() } else schedule()\n })\n void refreshPromise.catch(() => { /* A timed-out refresh may reject after the scheduler has moved on. */ })\n }\n const onVisibilityChange = (): void => {\n if (runtime.document.visibilityState === 'hidden') schedule()\n else run()\n }\n runtime.document.addEventListener('visibilitychange', onVisibilityChange)\n runtime.window.addEventListener('focus', run)\n runtime.window.addEventListener('online', run)\n run()\n const stop = (): void => {\n disposed = true\n queued = false\n controller?.abort()\n controller = undefined\n clearCycleTimer()\n clearTimer()\n runtime.document.removeEventListener('visibilitychange', onVisibilityChange)\n runtime.window.removeEventListener('focus', run)\n runtime.window.removeEventListener('online', run)\n }\n return Object.assign(stop, { refresh: run })\n}\n\ninterface ExtensionEventRuntime {\n readonly window: Pick<Window, 'addEventListener' | 'removeEventListener' | 'setTimeout' | 'clearTimeout'>\n readonly create: (url: string) => Pick<EventSource, 'close' | 'onopen' | 'onerror' | 'addEventListener'>\n}\n\n/** Maintain one authenticated same-origin extension event stream with bounded reconnect backoff. */\nexport function startExtensionChangeStream(\n changed: () => void,\n runtime: ExtensionEventRuntime = {\n window,\n create: url => new EventSource(url, { withCredentials: true }),\n },\n onTaskEvent?: (payload: unknown) => void,\n onDeviceRevoked?: () => void,\n): () => void {\n let source: ReturnType<ExtensionEventRuntime['create']> | undefined\n let timer: number | undefined\n let disposed = false\n let retryMs = 1_000\n const clearTimer = (): void => {\n if (timer === undefined) return\n runtime.window.clearTimeout(timer)\n timer = undefined\n }\n const connect = (): void => {\n if (disposed || source !== undefined) return\n clearTimer()\n const next = runtime.create('/mobile-access/extensions/events')\n source = next\n next.onopen = () => { retryMs = 1_000 }\n next.addEventListener('extensions-changed', changed)\n if (onTaskEvent !== undefined) {\n next.addEventListener('task-notify', (message: Event) => {\n const data = (message as MessageEvent).data\n onTaskEvent(data)\n })\n }\n if (onDeviceRevoked !== undefined) {\n next.addEventListener('device-revoked', (message: Event) => {\n const data = (message as MessageEvent).data\n if (isDeviceRevokedPayload(data)) onDeviceRevoked()\n })\n }\n next.onerror = () => {\n if (source !== next) return\n next.close()\n source = undefined\n if (disposed) return\n const delay = retryMs\n retryMs = Math.min(30_000, retryMs * 2)\n timer = runtime.window.setTimeout(connect, delay)\n }\n }\n const reconnectNow = (): void => {\n if (disposed) return\n source?.close()\n source = undefined\n retryMs = 1_000\n connect()\n }\n runtime.window.addEventListener('online', reconnectNow)\n connect()\n return () => {\n disposed = true\n clearTimer()\n source?.close()\n source = undefined\n runtime.window.removeEventListener('online', reconnectNow)\n }\n}\n\nexport interface ActivationWork<T> {\n readonly result: Promise<T>\n readonly cancel: () => void\n readonly commit?: (value: T) => void\n readonly dispose: (value: T) => void\n}\n\ninterface PendingActivation<T> {\n readonly key: object\n readonly generation: number\n readonly controller: AbortController\n readonly cancel: () => void\n readonly completion: Promise<boolean>\n}\n\n/** Keep at most one activation in flight per id and commit only its latest generation. */\nexport class PerIdActivationLifecycle<T> {\n private readonly active = new Map<string, { readonly value: T; readonly dispose: () => void }>()\n private readonly pending = new Map<string, PendingActivation<T>>()\n private readonly generations = new Map<string, number>()\n private disposed = false\n\n hasActive(id: string): boolean { return this.active.has(id) }\n getActive(id: string): T | undefined { return this.active.get(id)?.value }\n pendingCount(): number { return this.pending.size }\n\n async activate(\n id: string,\n key: object,\n cycleSignal: AbortSignal | undefined,\n create: (controller: AbortController, generation: number) => ActivationWork<T>,\n ): Promise<boolean> {\n if (this.disposed || cycleSignal?.aborted === true) return false\n const existing = this.pending.get(id)\n if (existing !== undefined) {\n if (existing.key === key && !existing.controller.signal.aborted) return this.waitFor(existing, cycleSignal)\n existing.cancel()\n }\n const generation = (this.generations.get(id) ?? 0) + 1\n this.generations.set(id, generation)\n const controller = new AbortController()\n let work: ActivationWork<T>\n try { work = create(controller, generation) } catch {\n controller.abort(new DOMException('mobile extension activation failed to start', 'AbortError'))\n return false\n }\n let cancelled = false\n let pending = {} as PendingActivation<T>\n const cancel = (): void => {\n if (cancelled) return\n cancelled = true\n if (this.pending.get(id) === pending) this.pending.delete(id)\n if (this.generations.get(id) === generation) this.generations.set(id, generation + 1)\n controller.abort(new DOMException('mobile extension activation cancelled', 'AbortError'))\n work.cancel()\n }\n const completion = Promise.resolve(work.result).then(value => {\n const current = this.pending.get(id)\n const canCommit = !this.disposed && current === pending && current.generation === this.generations.get(id)\n && !controller.signal.aborted\n if (!canCommit) {\n try { work.dispose(value) } catch { /* A stale extension disposer must not break lifecycle cleanup. */ }\n return false\n }\n try { work.commit?.(value) } catch {\n try { work.dispose(value) } catch { /* Keep the previous active extension intact. */ }\n return false\n }\n const previous = this.active.get(id)\n let valueDisposed = false\n const dispose = (): void => {\n if (valueDisposed) return\n valueDisposed = true\n controller.abort(new DOMException('mobile extension deactivated', 'AbortError'))\n try { work.dispose(value) } catch { /* Disposers are isolated per extension. */ }\n }\n this.active.set(id, { value, dispose })\n previous?.dispose()\n return true\n }, () => {\n cancel()\n return false\n }).finally(() => {\n if (this.pending.get(id) === pending) this.pending.delete(id)\n })\n Object.assign(pending, { key, generation, controller, cancel, completion })\n this.pending.set(id, pending)\n return this.waitFor(pending, cycleSignal)\n }\n\n remove(id: string): void {\n this.generations.set(id, (this.generations.get(id) ?? 0) + 1)\n this.active.get(id)?.dispose()\n this.active.delete(id)\n this.pending.get(id)?.cancel()\n }\n\n dispose(): void {\n if (this.disposed) return\n this.disposed = true\n for (const current of this.active.values()) current.dispose()\n this.active.clear()\n for (const current of this.pending.values()) current.cancel()\n }\n\n private waitFor(pending: PendingActivation<T>, signal: AbortSignal | undefined): Promise<boolean> {\n if (signal === undefined) return pending.completion\n if (signal.aborted) { pending.cancel(); return Promise.resolve(false) }\n return new Promise<boolean>(resolve => {\n let settled = false\n const finish = (value: boolean): void => {\n if (settled) return\n settled = true\n signal.removeEventListener('abort', onAbort)\n resolve(value)\n }\n const onAbort = (): void => { pending.cancel(); finish(false) }\n signal.addEventListener('abort', onAbort, { once: true })\n void pending.completion.then(finish)\n })\n }\n}\n\nfunction installCustomAssets(): () => void {\n const legacyStyle = element('style'); legacyStyle.dataset.plugin = 'dsh-mobile-custom'; document.head.append(legacyStyle)\n const legacyCssState = { etag: '', modified: '' }\n const previous = window.dshMobile\n let legacyMount: MobileExtensionMount | undefined = queuedLegacyMount\n let legacySource = ''\n let legacyRoot: HTMLElement | undefined\n let legacyDispose: (() => void) | undefined\n const definitions = new Map<string, MobileClientDefinition>()\n type ExtensionSurfaceEntry = { readonly dispose: () => void; readonly container: HTMLElement; readonly host: () => HTMLElement }\n type ActiveExtension = { readonly controller: AbortController; readonly surfaces: Map<string, ExtensionSurfaceEntry>; readonly cleanup?: () => void }\n const activations = new PerIdActivationLifecycle<ActiveExtension>()\n const styleNodes = new Map<string, HTMLStyleElement>()\n const styleEtags = new Map<string, string>()\n const scriptDigests = new Map<string, string>()\n const activeHostGenerations = new Map<string, string | undefined>()\n const activationKeys = new Map<string, { readonly definition: MobileClientDefinition; readonly generation?: string }>()\n const manifestExtensionIds = new Set<string>()\n const managedDefinitionIds = new Set<string>()\n let manifestEtag = ''\n let disposed = false\n let expectedDefinitionId: string | undefined\n const SURFACE_HOST_STYLES: Readonly<Record<string, string>> = {\n 'sidebar-action': 'position:fixed;z-index:1100;top:calc(env(safe-area-inset-top) + 8px);left:8px;display:flex;flex-direction:column;gap:6px;pointer-events:none',\n 'header-action': 'position:fixed;z-index:1100;top:calc(env(safe-area-inset-top) + 8px);right:8px;display:flex;flex-direction:column;gap:6px;pointer-events:none',\n 'composer-dock': 'position:fixed;z-index:1100;bottom:calc(env(safe-area-inset-bottom) + 8px);left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:6px;pointer-events:none',\n 'settings-section': 'position:fixed;z-index:1100;inset:auto 8px calc(env(safe-area-inset-bottom) + 72px) 8px;max-height:40vh;overflow:auto;pointer-events:none',\n }\n const surfaceHost = (placement: string): HTMLElement | undefined => {\n const existing = document.querySelector<HTMLElement>(`[data-dsh-mobile-surface-host=\"${placement}\"]`)\n if (existing !== null) return existing\n const style = SURFACE_HOST_STYLES[placement]\n if (style === undefined) return undefined\n const host = element('div'); host.dataset.dshMobileSurfaceHost = placement; host.style.cssText = style\n document.body.append(host); return host\n }\n const shellLayer = (): HTMLElement => {\n const existing = document.querySelector<HTMLElement>('[data-dsh-mobile-extension-layer]')\n if (existing !== null) return existing\n const layer = element('div'); layer.dataset.dshMobileExtensionLayer = 'true'; layer.style.cssText = 'position:fixed;inset:0;z-index:1200;pointer-events:none;overflow:hidden'\n document.body.append(layer); return layer\n }\n const toast = (message: string): void => {\n const node = element('div'); node.textContent = message; node.style.cssText = 'position:absolute;top:16px;left:50%;transform:translateX(-50%);padding:9px 14px;border-radius:999px;background:#1f2937;color:white;font:14px system-ui;pointer-events:auto;box-shadow:0 8px 24px #0003'\n shellLayer().append(node); window.setTimeout(() => node.remove(), 2600)\n }\n const materializeNativeFile = (value: unknown): unknown => {\n if (typeof value !== 'object' || value === null || !('base64' in value) || !('name' in value)) return value\n const candidate = value as { base64?: unknown; name?: unknown; type?: unknown }\n if (typeof candidate.base64 !== 'string' || typeof candidate.name !== 'string') return value\n try {\n const encoded = atob(candidate.base64)\n const bytes = Uint8Array.from(encoded, character => character.charCodeAt(0))\n return new File([bytes], candidate.name, { type: typeof candidate.type === 'string' ? candidate.type : 'application/octet-stream' })\n } catch {\n return value\n }\n }\n const invokeNative = async (action: string, input: unknown, signal: AbortSignal): Promise<unknown> => {\n const abortReason = (): unknown => signal.reason ?? new DOMException('mobile extension disposed', 'AbortError')\n if (signal.aborted) throw abortReason()\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge !== undefined) {\n return new Promise<unknown>((resolve, reject) => {\n let settled = false\n const finish = (callback: () => void): void => { if (settled) return; settled = true; signal.removeEventListener('abort', onAbort); callback() }\n const onAbort = (): void => { finish(() => { reject(abortReason()) }) }\n signal.addEventListener('abort', onAbort, { once: true })\n void Promise.resolve().then(() => bridge.invoke(action, input)).then(\n value => { finish(() => { resolve(materializeNativeFile(value)) }) },\n error => { finish(() => { reject(error) }) },\n )\n })\n }\n if (action === 'share' && typeof navigator.share === 'function') { await navigator.share((input ?? {}) as ShareData); return { ok: true } }\n if (action === 'clipboard.read' && navigator.clipboard !== undefined) return { text: await navigator.clipboard.readText() }\n if (action === 'clipboard.write' && navigator.clipboard !== undefined) { await navigator.clipboard.writeText(typeof input === 'object' && input !== null && 'text' in input ? String((input as { text: unknown }).text) : ''); return { ok: true } }\n if (action === 'files.pick' || action === 'camera.capture') {\n const inputElement = element('input')\n inputElement.type = 'file'\n inputElement.accept = action === 'camera.capture' ? 'image/*' : '*/*'\n if (action === 'camera.capture') inputElement.capture = 'environment'\n inputElement.hidden = true\n return new Promise<File | undefined>((resolve, reject) => {\n let settled = false\n let cleaned = false\n let cleanupTimer = 0\n let watchdogTimer = 0\n const cleanup = (): void => {\n if (cleaned) return\n cleaned = true\n if (cleanupTimer !== 0) window.clearTimeout(cleanupTimer)\n if (watchdogTimer !== 0) window.clearTimeout(watchdogTimer)\n window.removeEventListener('focus', scheduleCancel)\n document.removeEventListener('visibilitychange', onVisibilityChange)\n signal.removeEventListener('abort', onAbort)\n inputElement.removeEventListener('change', onChange)\n inputElement.removeEventListener('cancel', onCancel)\n inputElement.remove()\n }\n const finish = (callback: () => void): void => { if (settled) return; settled = true; cleanup(); callback() }\n const onChange = (): void => { const file = inputElement.files?.[0]; finish(() => { resolve(file) }) }\n const onCancel = (): void => { finish(() => { resolve(undefined) }) }\n const onAbort = (): void => { finish(() => { reject(abortReason()) }) }\n const scheduleCancel = (): void => { if (!settled && cleanupTimer === 0) cleanupTimer = window.setTimeout(onCancel, 1000) }\n const onVisibilityChange = (): void => { if (document.visibilityState === 'visible') scheduleCancel() }\n inputElement.addEventListener('change', onChange, { once: true })\n inputElement.addEventListener('cancel', onCancel, { once: true })\n window.addEventListener('focus', scheduleCancel)\n document.addEventListener('visibilitychange', onVisibilityChange)\n signal.addEventListener('abort', onAbort, { once: true })\n watchdogTimer = window.setTimeout(onCancel, 300_000)\n try {\n document.body.append(inputElement)\n inputElement.click()\n } catch (error) {\n finish(() => { reject(error) })\n }\n })\n }\n throw new Error('native capability is unavailable')\n }\n const makeApi = (id: string, hostGeneration: string | undefined, controller: AbortController, surfaces: Map<string, ExtensionSurfaceEntry>, surfaceIds: Set<string>): MobileClientApi => {\n const ensureCurrent = (): void => { if (controller.signal.aborted) throw controller.signal.reason }\n const requestSignal = (signal?: AbortSignal | null): CombinedClientSignal => signal === undefined || signal === null\n ? { signal: controller.signal, cleanup: () => undefined }\n : combineClientSignalLifetime(controller.signal, signal)\n const mountSurface = (surface: MobileSurface): (() => void) => {\n ensureCurrent()\n if (!/^[a-z][a-z0-9-]{0,63}$/u.test(surface.id) || surface.label.length > 120) throw new Error('invalid mobile surface')\n return registerUniqueDisposable(surfaces, surfaceIds, surface.id, () => {\n const container = element('section'); container.dataset.dshMobileSurface = surface.id; container.hidden = surface.placement === 'page' || surface.placement === 'overlay'; container.style.cssText = surface.placement === 'page' || surface.placement === 'overlay' ? 'position:absolute;inset:0;overflow:auto;background:var(--dsw-alias-bg-layer-1,#fff);padding:16px;pointer-events:auto' : 'pointer-events:auto'\n const host = (): HTMLElement => surface.placement === 'page' || surface.placement === 'overlay' ? shellLayer() : surfaceHost(surface.placement) ?? shellLayer()\n const mounted = surface.mount(container)\n const dispose = (): void => { try { if (typeof mounted === 'function') mounted() } finally { container.remove() } }\n return { dispose, container, host }\n })\n }\n return {\n host: {\n invoke: (action: string, input: unknown) => {\n ensureCurrent()\n return mobileRequest(`/mobile-access/extensions/${encodeURIComponent(id)}/actions/${encodeURIComponent(action)}`, extensionActionRequestInit(hostGeneration, input, controller.signal)).then(async response => { const value = await response.json() as unknown; if (!response.ok) throw new Error(typeof value === 'object' && value !== null && 'error' in value ? String((value as { error: unknown }).error) : `HTTP ${String(response.status)}`); return value })\n },\n fetch: (path: string, init?: RequestInit) => {\n ensureCurrent()\n const target = extensionRouteUrl(id, path, location.href)\n const headers = extensionGenerationHeaders(hostGeneration, init?.headers)\n const lifetime = requestSignal(init?.signal)\n return mobileRequest(target.href, { ...init, headers, signal: lifetime.signal }).then(\n response => bindClientResponseLifetime(response, lifetime.cleanup),\n error => { lifetime.cleanup(); throw error },\n )\n },\n assetUrl: path => { ensureCurrent(); return extensionAssetUrl(id, hostGeneration, path, location.href).href },\n },\n ui: {\n registerSurface: mountSurface,\n open: surfaceId => { ensureCurrent(); const entry = surfaces.get(surfaceId); if (entry !== undefined) entry.container.hidden = false },\n close: surfaceId => { ensureCurrent(); const entry = surfaces.get(surfaceId); if (entry !== undefined) entry.container.hidden = true },\n toast: message => { ensureCurrent(); toast(message) },\n },\n native: {\n capabilities: async () => { ensureCurrent(); const bridge = window.__DSH_MOBILE_NATIVE__; return bridge === undefined ? ['files.pick', 'camera.capture', 'share', 'clipboard.read', 'clipboard.write'] : bridge.capabilities() },\n invoke: (action, input) => invokeNative(action, input, controller.signal),\n },\n signal: controller.signal, document, window,\n }\n }\n const activateDefinition = (definition: MobileClientDefinition, cycleSignal?: AbortSignal, commitGeneration?: () => void, hostGeneration?: string): Promise<boolean> => {\n const previousKey = activationKeys.get(definition.id)\n const key = previousKey?.definition === definition && previousKey.generation === hostGeneration\n ? previousKey\n : { definition, ...(hostGeneration === undefined ? {} : { generation: hostGeneration }) }\n activationKeys.set(definition.id, key)\n return activations.activate(\n definition.id,\n key,\n cycleSignal,\n controller => {\n const surfaces = new Map<string, ExtensionSurfaceEntry>()\n const surfaceIds = new Set<string>()\n let pendingDisposed = false\n const disposePending = (): void => {\n if (pendingDisposed) return\n pendingDisposed = true\n for (const surface of surfaces.values()) {\n try { surface.dispose() } catch { /* Dispose every staged surface independently. */ }\n }\n surfaces.clear()\n surfaceIds.clear()\n }\n const result = Promise.resolve().then(() => definition.activate(makeApi(definition.id, hostGeneration, controller, surfaces, surfaceIds))).then(cleanup => ({\n controller,\n surfaces,\n ...(typeof cleanup === 'function' ? { cleanup } : {}),\n }))\n return {\n result,\n cancel: disposePending,\n commit: value => {\n if (definitions.get(definition.id) !== definition || controller.signal.aborted) throw new Error('stale mobile extension activation')\n for (const surface of value.surfaces.values()) surface.host().append(surface.container)\n activeHostGenerations.set(definition.id, hostGeneration)\n commitGeneration?.()\n },\n dispose: value => {\n controller.abort(new DOMException('mobile extension disposed', 'AbortError'))\n try { value.cleanup?.() } finally { disposePending() }\n },\n }\n },\n )\n }\n const define = (definition: MobileClientDefinition): void => {\n if (disposed || definition.apiVersion !== 1 || !/^[a-z][a-z0-9-]{0,63}$/u.test(definition.id) || typeof definition.activate !== 'function') return\n if (expectedDefinitionId !== undefined && definition.id !== expectedDefinitionId) return\n definitions.set(definition.id, definition)\n if (started && expectedDefinitionId === undefined) void activateDefinition(definition)\n }\n let started = false\n window.dshMobile = Object.freeze({ register: mount => { legacyMount = mount }, define })\n for (const definition of queuedDefinitions.splice(0)) define(definition)\n let legacyJsEtag = ''\n let legacyJsModified = ''\n const refreshLegacy = async (signal: AbortSignal): Promise<boolean> => {\n const previousMount = legacyMount\n let pendingRoot: HTMLElement | undefined\n try {\n const headers: Record<string, string> = {}\n if (legacyJsEtag !== '') headers['if-none-match'] = legacyJsEtag\n if (legacyJsModified !== '') headers['if-modified-since'] = legacyJsModified\n const response = await fetch('/mobile-access/custom.js', { credentials: 'same-origin', cache: 'no-store', headers, signal })\n if (response.status === 304) return true\n if (!response.ok) return false\n const nextEtag = response.headers.get('etag') ?? ''\n const nextModified = response.headers.get('last-modified') ?? ''\n const next = await response.text()\n if (refreshAborted(signal)) return false\n if (next === legacySource) { legacyJsEtag = nextEtag; legacyJsModified = nextModified; return true }\n legacyMount = undefined\n const script = element('script'); script.textContent = `${next}\\n//# sourceURL=dsh-mobile-custom.js`; document.head.append(script); script.remove()\n if (refreshAborted(signal)) { legacyMount = previousMount; return false }\n const mount = legacyMount as MobileExtensionMount | undefined\n if (mount === undefined) {\n legacyDispose?.(); legacyDispose = undefined\n legacyRoot?.remove(); legacyRoot = undefined\n legacySource = next; legacyJsEtag = nextEtag; legacyJsModified = nextModified\n return true\n }\n const nextRoot = element('div'); pendingRoot = nextRoot; nextRoot.dataset.dshMobileExtension = 'true'; document.body.append(nextRoot)\n const nextDispose = mount({ document, request: mobileRequest, root: nextRoot, window })\n if (refreshAborted(signal)) { if (typeof nextDispose === 'function') nextDispose(); pendingRoot.remove(); pendingRoot = undefined; legacyMount = previousMount; return false }\n legacyDispose?.(); legacyRoot?.remove(); legacyRoot = nextRoot; pendingRoot = undefined; legacyDispose = typeof nextDispose === 'function' ? nextDispose : undefined; legacySource = next\n legacyJsEtag = nextEtag; legacyJsModified = nextModified\n return true\n } catch { pendingRoot?.remove(); legacyMount = previousMount; return false }\n }\n let legacyScriptRevision = ''\n let legacyStyleRevision = ''\n const disposeManifestExtension = (id: string): void => {\n activations.remove(id)\n styleNodes.get(id)?.remove(); styleNodes.delete(id); styleEtags.delete(id); scriptDigests.delete(id); activeHostGenerations.delete(id); activationKeys.delete(id)\n if (managedDefinitionIds.delete(id)) definitions.delete(id)\n }\n const managedManifestIdSources = (): readonly Iterable<string>[] => [styleNodes.keys(), styleEtags.keys(), scriptDigests.keys(), managedDefinitionIds]\n const clearManifestExtensions = (): void => {\n publishAuthoritativeExtensionIds(manifestExtensionIds, new Set(), managedManifestIdSources(), disposeManifestExtension)\n manifestEtag = ''\n }\n const refreshExtensions = async (signal: AbortSignal): Promise<boolean> => {\n try {\n const headers: Record<string, string> = {}\n if (manifestEtag !== '') headers['if-none-match'] = manifestEtag\n const response = await fetch('/mobile-access/extensions/manifest', { credentials: 'same-origin', cache: 'no-store', headers, signal })\n if (response.status === 404) {\n legacyScriptRevision = ''\n legacyStyleRevision = ''\n return handleMissingExtensionManifest(\n clearManifestExtensions,\n () => Promise.all([refreshLegacy(signal), refreshCssLegacy(legacyStyle, signal, legacyCssState)]),\n signal,\n )\n }\n if (response.status === 304) return true\n if (!response.ok) return false\n const nextManifestEtag = response.headers.get('etag') ?? ''\n const payload = parseMobileExtensionManifest(await response.json())\n if (refreshAborted(signal) || payload === undefined) return false\n const entries = payload.extensions\n const seen = new Set(entries.map(entry => entry.id))\n const scriptRevision = payload.legacy.scriptRevision\n const styleRevision = payload.legacy.styleRevision\n let refreshComplete = true\n if (scriptRevision === '' || scriptRevision !== legacyScriptRevision) {\n if (await refreshLegacy(signal)) legacyScriptRevision = scriptRevision\n else refreshComplete = false\n }\n if (styleRevision === '' || styleRevision !== legacyStyleRevision) {\n if (await refreshCssLegacy(legacyStyle, signal, legacyCssState)) legacyStyleRevision = styleRevision\n else refreshComplete = false\n }\n const commitStyle = (id: string, change: 'retain' | 'remove' | 'replace', css?: string, etag?: string): void => {\n if (change === 'retain') return\n const oldStyle = styleNodes.get(id)\n if (change === 'remove') {\n oldStyle?.remove()\n styleNodes.delete(id)\n styleEtags.delete(id)\n return\n }\n if (oldStyle?.textContent !== css) {\n const node = element('style'); node.dataset.dshMobileExtensionStyle = id; node.textContent = css ?? ''; document.head.append(node); styleNodes.set(id, node); oldStyle?.remove()\n }\n if (etag !== undefined && etag !== '') styleEtags.set(id, etag)\n }\n for (const entry of entries) {\n const hadActiveGeneration = activations.hasActive(entry.id)\n const previousHostGeneration = activeHostGenerations.get(entry.id)\n let previousDefinition: MobileClientDefinition | undefined\n let evaluatedDefinition = false\n try {\n let styleChange: 'retain' | 'remove' | 'replace' = entry.styleUrl === undefined ? 'remove' : 'retain'\n let pendingCss: string | undefined\n let pendingStyleEtag: string | undefined\n const cssUrl = typeof entry.styleUrl === 'string' ? entry.styleUrl : undefined\n if (cssUrl !== undefined) {\n const cssHeaders: Record<string, string> = {}\n const storedEtag = styleEtags.get(entry.id)\n if (storedEtag !== undefined) cssHeaders['if-none-match'] = storedEtag\n const cssResponse = await fetch(cssUrl, { credentials: 'same-origin', cache: 'no-store', headers: cssHeaders, signal })\n if (cssResponse.status !== 304) {\n if (!cssResponse.ok) throw new Error('mobile extension style failed to load')\n pendingStyleEtag = cssResponse.headers.get('etag') ?? undefined\n pendingCss = await cssResponse.text()\n styleChange = 'replace'\n if (refreshAborted(signal)) return false\n }\n }\n\n const scriptUrl = typeof entry.scriptUrl === 'string' ? entry.scriptUrl : undefined\n if (scriptUrl === undefined) {\n if (refreshAborted(signal)) return false\n commitStyle(entry.id, styleChange, pendingCss, pendingStyleEtag)\n activations.remove(entry.id)\n activeHostGenerations.delete(entry.id)\n scriptDigests.delete(entry.id)\n if (managedDefinitionIds.delete(entry.id)) definitions.delete(entry.id)\n } else {\n const scriptHeaders: Record<string, string> = {}\n const storedDigest = scriptDigests.get(entry.id)\n if (storedDigest !== undefined) scriptHeaders['if-none-match'] = storedDigest\n const scriptResponse = await fetch(scriptUrl, { credentials: 'same-origin', cache: 'no-store', headers: scriptHeaders, signal })\n let nextDigest: string | undefined\n if (scriptResponse.status !== 304) {\n if (!scriptResponse.ok) throw new Error('mobile extension script failed to load')\n const source = await scriptResponse.text()\n if (refreshAborted(signal)) return false\n const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(source))\n if (refreshAborted(signal)) return false\n const key = [...new Uint8Array(digest)].map(value => value.toString(16).padStart(2, '0')).join('')\n if (scriptDigests.get(entry.id) !== key) {\n previousDefinition = definitions.get(entry.id)\n try {\n expectedDefinitionId = entry.id\n try {\n const script = element('script'); script.textContent = `${source}\\n//# sourceURL=dsh-mobile-extension-${entry.id}.js`; document.head.append(script); script.remove()\n } finally { expectedDefinitionId = undefined }\n const nextDefinition = definitions.get(entry.id)\n if (nextDefinition === undefined || nextDefinition === previousDefinition) throw new Error('mobile extension did not define its manifest id')\n evaluatedDefinition = true\n nextDigest = key\n } catch (error) {\n if (previousDefinition === undefined) definitions.delete(entry.id)\n else definitions.set(entry.id, previousDefinition)\n throw error\n }\n }\n }\n const definition = definitions.get(entry.id)\n const commitGeneration = (): void => { commitStyle(entry.id, styleChange, pendingCss, pendingStyleEtag) }\n if (definition === undefined) throw new Error('mobile extension definition is unavailable')\n if (evaluatedDefinition || !activations.hasActive(entry.id) || activeHostGenerations.get(entry.id) !== entry.generation) {\n if (!await activateDefinition(definition, signal, commitGeneration, entry.generation)) throw new Error('mobile extension activation failed')\n } else {\n if (refreshAborted(signal)) return false\n commitGeneration()\n }\n managedDefinitionIds.add(entry.id)\n if (nextDigest !== undefined) scriptDigests.set(entry.id, nextDigest)\n }\n } catch {\n if (evaluatedDefinition) {\n if (previousDefinition === undefined) definitions.delete(entry.id)\n else definitions.set(entry.id, previousDefinition)\n }\n failClosedExtensionGenerationReplacement(\n hadActiveGeneration,\n previousHostGeneration,\n entry.generation,\n () => { disposeManifestExtension(entry.id) },\n )\n refreshComplete = false\n }\n }\n if (refreshAborted(signal)) return false\n if (refreshComplete) {\n publishAuthoritativeExtensionIds(manifestExtensionIds, seen, managedManifestIdSources(), disposeManifestExtension)\n manifestEtag = nextManifestEtag\n } else manifestEtag = ''\n return refreshComplete\n } catch { return false }\n }\n started = true\n for (const definition of definitions.values()) void activateDefinition(definition)\n const stopRefresh = startLifecycleRefreshScheduler(async signal => {\n await refreshExtensions(signal)\n })\n const stopEvents = startExtensionChangeStream(\n () => { stopRefresh.refresh() },\n undefined,\n payload => {\n // Host-pushed task completion: exact, no guessing. Each completed turn\n // keeps its own notification, and generic text avoids attributing a\n // background task to whichever session happens to be open on the phone.\n if (document.hidden !== true) return\n const parsed = parseTaskNotifyPayload(payload)\n if (parsed === undefined) return\n const language = resolveNativeMobileLanguage(\n document.documentElement.lang,\n navigator.languages.length > 0 ? [...navigator.languages] : [navigator.language],\n )\n const label = (italian: string, english: string, chinese: string): string =>\n language === 'it' ? italian : language === 'zh' ? chinese : english\n fireTaskNotifyEvent({\n kind: 'done',\n title: label('Attività completata', 'Task finished', '任务已完成'),\n body: label('Il tuo task DSH è terminato', 'Your DSH task finished', '你的 DSH 任务已完成'),\n tag: taskCompletionTag(parsed.sessionId, parsed.turn),\n })\n },\n () => { fireDeviceRevoked() },\n )\n return () => { disposed = true; stopEvents(); stopRefresh(); started = false; legacyDispose?.(); legacyDispose = undefined; legacyRoot?.remove(); legacyRoot = undefined; legacyStyle.remove(); activations.dispose(); for (const node of styleNodes.values()) node.remove(); styleNodes.clear(); const layer = document.querySelector('[data-dsh-mobile-extension-layer]'); layer?.remove(); for (const host of document.querySelectorAll('[data-dsh-mobile-surface-host]')) host.remove(); if (previous === undefined) delete window.dshMobile; else window.dshMobile = previous }\n}\n\ninterface LegacyCssState { etag: string; modified: string }\nasync function refreshCssLegacy(style: HTMLStyleElement, signal: AbortSignal, state: LegacyCssState): Promise<boolean> {\n try {\n const headers: Record<string, string> = {}\n if (state.etag !== '') headers['if-none-match'] = state.etag\n if (state.modified !== '') headers['if-modified-since'] = state.modified\n let response = await fetch('/mobile-access/custom.css', { credentials: 'same-origin', cache: 'no-store', headers, signal })\n if (response.status === 304 && style.textContent === '') {\n state.etag = ''\n state.modified = ''\n response = await fetch('/mobile-access/custom.css', { credentials: 'same-origin', cache: 'no-store', signal })\n }\n if (response.status === 304) return true\n if (response.ok) {\n const nextEtag = response.headers.get('etag') ?? ''\n const nextModified = response.headers.get('last-modified') ?? ''\n const css = await response.text()\n if (refreshAborted(signal)) return false\n style.textContent = css\n state.etag = nextEtag\n state.modified = nextModified\n return true\n }\n return false\n } catch { return false }\n}\n\n/** Theme-aware desktop Mobile Access panel styles. */\nexport const CONTROL_STYLES = `\n.dsh-mobile-control{position:fixed;z-index:1000;left:16px;bottom:112px;font:14px/1.45 system-ui;color:var(--dsw-alias-label-primary,#16181d)}\n.dsh-mobile-control__panel{box-sizing:border-box;width:min(380px,calc(100vw - 32px));max-height:calc(100vh - 140px);overflow-y:auto;padding:16px;border:1px solid var(--dsw-alias-border-l2,#e1e5eb);border-radius:18px;background:var(--dsw-alias-bg-layer-2,#fff);box-shadow:0 18px 50px rgb(15 23 42 / 18%)}\n.dsh-mobile-control__header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.dsh-mobile-control__panel h2{margin:0;font-size:17px;line-height:24px}.dsh-mobile-control__header-actions{display:flex;align-items:center;gap:2px}.dsh-mobile-control__update-plugin,.dsh-mobile-control__diagnostic-entry,.dsh-mobile-control__close{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:inherit;cursor:pointer}.dsh-mobile-control__update-plugin,.dsh-mobile-control__diagnostic-entry{padding:0 8px;color:var(--dsw-alias-label-primary-bluish,#2563eb);font:650 12px/1 system-ui;white-space:nowrap}.dsh-mobile-control__update-plugin[hidden]{display:none}.dsh-mobile-control__update-plugin:disabled{cursor:wait;opacity:.55}.dsh-mobile-control__close{font-size:24px;line-height:1}.dsh-mobile-control__update-plugin:hover:not(:disabled),.dsh-mobile-control__diagnostic-entry:hover,.dsh-mobile-control__close:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f3f6)}\n.dsh-mobile-control__release-notice{margin:-2px 0 10px;padding:8px 10px;border-radius:9px;background:var(--dsw-alias-bg-layer-1,#eff6ff);color:var(--dsw-alias-label-primary,#1d4ed8);font-size:11px;line-height:1.45}.dsh-mobile-control__release-notice.is-error{color:var(--dsw-alias-label-primary,#dc2626);border-left:3px solid var(--dsw-alias-state-error-primary,#dc2626)}.dsh-mobile-control__release-notice[hidden]{display:none}.dsh-mobile-control__update-card{margin:0 0 10px;padding:11px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:12px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__update-card[hidden]{display:none}.dsh-mobile-control__update-card-title{margin:0 0 7px;color:var(--dsw-alias-label-primary,#16181d);font:650 13px/1.4 system-ui}.dsh-mobile-control__update-notes{display:block;box-sizing:border-box;max-height:150px;overflow-y:auto;margin:0 0 8px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2,#e1e5eb);border-radius:9px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary,#475569);white-space:pre-wrap;word-break:break-word;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.dsh-mobile-control__update-notes[hidden]{display:none}.dsh-mobile-control__update-notice{margin:0 0 9px;padding:7px 9px;border-radius:8px;background:var(--dsw-alias-state-warn-tertiary,#fff4d6);color:var(--dsw-alias-state-warn-label,#92400e);font-size:11px;line-height:1.5}.dsh-mobile-control__update-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.dsh-mobile-control__update-actions .dsh-mobile-control__primary,.dsh-mobile-control__update-actions .dsh-mobile-control__secondary{min-height:36px;padding:0 12px}.dsh-mobile-control__app-download{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-height:44px;margin:0 0 10px;padding:8px 11px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-1,#f7f8fa);color:var(--dsw-alias-label-primary,#16181d);font:600 12px/1.3 system-ui;text-decoration:none}.dsh-mobile-control__app-download[hidden]{display:none}.dsh-mobile-control__app-download::after{color:var(--dsw-alias-label-primary-bluish,#2563eb);font-size:14px;content:\"↗\"}.dsh-mobile-control__app-download:hover{border-color:#9fb9e8;background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-2,#f5f8ff));color:var(--dsw-alias-label-primary,#1d4ed8)}\n.dsh-mobile-control__switcher{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;margin:0 0 14px;padding:4px;border-radius:12px;background:var(--dsw-alias-bg-layer-1,#f3f5f8)}.dsh-mobile-control__switcher[hidden]{display:none}.dsh-mobile-control__tab{min-height:36px;border:0;border-radius:9px;background:transparent;color:var(--dsw-alias-label-secondary,#606873);font:600 13px/1 system-ui;cursor:pointer}.dsh-mobile-control__tab.is-active{background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);box-shadow:0 1px 3px rgb(15 23 42 / 10%)}.dsh-mobile-control__view[hidden]{display:none}.dsh-mobile-control__intro{margin:0 0 12px;color:var(--dsw-alias-label-secondary,#606873);font-size:12px;line-height:1.55}.dsh-mobile-control__http-frame-warning{box-sizing:border-box;margin:-4px 0 12px;padding:8px 10px;border:1px solid #d6a83f;border-radius:9px;background:var(--dsw-alias-bg-layer-1,#fff7df);color:var(--dsw-alias-label-primary,#694b00);font-size:11px;line-height:1.5;overflow-wrap:anywhere}.dsh-mobile-control__http-frame-warning[hidden]{display:none}.dsh-mobile-control__view.is-remote .dsh-mobile-control__actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dsh-mobile-control__view.is-remote .dsh-mobile-control__actions button[hidden]{display:none}\n.dsh-mobile-control__provider-section{position:relative;margin:0 0 14px}.dsh-mobile-control__section-title{margin:0 0 8px;color:var(--dsw-alias-label-primary,#16181d);font:650 13px/1.4 system-ui}.dsh-mobile-control__provider-section>.dsh-mobile-control__section-title{padding-right:42px}.dsh-mobile-control__provider-choices{display:grid;grid-template-columns:1fr;gap:8px}.dsh-mobile-control__provider{display:flex;min-width:0;flex-direction:column;gap:6px;min-height:94px;padding:10px 11px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color 160ms ease,background-color 160ms ease,box-shadow 160ms ease}.dsh-mobile-control__provider:hover{border-color:#6f96db;background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-1,#f8fbff))}.dsh-mobile-control__provider.is-selected{border-color:var(--dsw-alias-label-primary-bluish,#2563eb);background:var(--dsw-alias-interactive-bg-active,var(--dsw-alias-bg-layer-1,#f5f8ff));box-shadow:0 0 0 1px var(--dsw-alias-label-primary-bluish,#2563eb) inset}.dsh-mobile-control__provider:disabled{cursor:wait;opacity:.62}.dsh-mobile-control__provider-top{display:flex;min-width:0;align-items:flex-start;justify-content:space-between;gap:5px}.dsh-mobile-control__provider-top strong{min-width:0;font-size:12px;line-height:1.3}.dsh-mobile-control__provider-badge{flex:none;padding:2px 5px;border-radius:999px;background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary,#1d4ed8);font:650 11px/1.25 system-ui}.dsh-mobile-control__provider-badge.is-cpolar{background:var(--dsw-alias-state-success-tertiary,#eaf8f2);color:var(--dsw-alias-label-primary,#087454)}.dsh-mobile-control__provider-description{color:var(--dsw-alias-label-secondary,#606873);font-size:12px;line-height:1.45}.dsh-mobile-control__provider-info{position:absolute;z-index:5;top:-13px;right:-8px}.dsh-mobile-control__provider-info-button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--dsw-alias-label-secondary,#475569);cursor:pointer;touch-action:manipulation}.dsh-mobile-control__provider-info-button:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f5f9);color:var(--dsw-alias-label-primary-bluish,#2563eb)}.dsh-mobile-control__provider-info-glyph{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:1.5px solid currentColor;border-radius:50%;font:700 12px/1 system-ui}.dsh-mobile-control__provider-info-popover{position:absolute;z-index:6;top:38px;right:4px;box-sizing:border-box;width:min(292px,calc(100vw - 72px));padding:10px 12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:12px;background:var(--dsw-alias-bg-layer-2,#fff);box-shadow:0 10px 28px rgb(15 23 42 / 16%)}.dsh-mobile-control__provider-info-popover[hidden]{display:none}.dsh-mobile-control__provider-info-popover strong,.dsh-mobile-control__provider-info-popover span{display:block}.dsh-mobile-control__provider-info-popover strong{margin-bottom:3px;font-size:12px}.dsh-mobile-control__provider-info-popover span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.55}\n.dsh-mobile-control__self-hosted{margin:8px 0 0;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:12px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__self-hosted-summary{display:flex;box-sizing:border-box;min-height:48px;align-items:center;justify-content:space-between;gap:10px;padding:8px 11px;cursor:pointer;list-style-position:inside}.dsh-mobile-control__self-hosted-summary>span:first-child{display:flex;min-width:0;flex-direction:column;gap:1px}.dsh-mobile-control__self-hosted-summary strong{font-size:11px}.dsh-mobile-control__self-hosted-summary span span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.35}.dsh-mobile-control__provider-badge.is-frp{background:var(--dsw-alias-bg-layer-1,#eef0f3);color:var(--dsw-alias-label-secondary,#475569)}.dsh-mobile-control__self-hosted-body{padding:0 8px 8px}.dsh-mobile-control__provider.is-frp{width:100%;min-height:64px;background:var(--dsw-alias-bg-layer-2,#fff)}\n/* The cloudflared setup section deliberately reuses this card, so\n .dsh-mobile-control__cloudflared-setup is a DOM hook for targeting rather than a\n style rule of its own. */\n.dsh-mobile-control__cpolar-setup{margin:0 0 12px;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__cpolar-setup[hidden],.dsh-mobile-control__cpolar-account[hidden],.dsh-mobile-control__details[hidden],.dsh-mobile-control__view.is-remote .dsh-mobile-control__actions[hidden],.dsh-mobile-control__danger[hidden]{display:none}.dsh-mobile-control__component-status,.dsh-mobile-control__component-note{margin:0 0 10px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.55}.dsh-mobile-control__cpolar-setup>.dsh-mobile-control__primary{width:100%;min-height:44px;padding:9px 12px;border-radius:10px;font:600 12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__cpolar-account{margin-top:10px}.dsh-mobile-control__link-row{display:flex;flex-wrap:wrap;gap:6px 12px;margin:0 0 10px}.dsh-mobile-control__text-link{color:var(--dsw-alias-label-primary-bluish,#2563eb);font-size:11px;text-decoration:none}.dsh-mobile-control__text-link:hover{text-decoration:underline}.dsh-mobile-control__token-label{display:flex;flex-direction:column;gap:5px;margin:0 0 8px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px}.dsh-mobile-control__token{box-sizing:border-box;width:100%;min-height:44px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-3,var(--dsw-alias-bg-layer-2,#fff));color:var(--dsw-alias-label-primary,#16181d);font:16px/1.4 system-ui}.dsh-mobile-control__cpolar-connect{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:44px;padding:10px 14px;border-radius:12px;font:650 13px/1.2 system-ui;cursor:pointer;transition:background-color 160ms ease,border-color 160ms ease,opacity 160ms ease}.dsh-mobile-control__cpolar-connect:hover:not(:disabled){border-color:#1d4ed8;background:#1d4ed8}.dsh-mobile-control__cpolar-connect:active:not(:disabled){border-color:#1e40af;background:#1e40af}.dsh-mobile-control__cpolar-connect:disabled{cursor:wait;opacity:.55}.dsh-mobile-control__details{margin:10px 0 0;border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb);padding-top:9px}.dsh-mobile-control__details>summary{min-height:36px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:30px;cursor:pointer}.dsh-mobile-control__details-body{display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px;padding:4px 0}.dsh-mobile-control__details-body p{flex:1 0 100%;margin:0;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__storage{display:block;flex:1 0 100%;max-width:100%;overflow:hidden;padding:7px 8px;border-radius:8px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-secondary,#475569);font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__danger{flex:1 0 100%;min-height:44px;margin-top:3px;padding:7px 10px;border:1px solid var(--dsw-alias-state-error-primary,#dc2626);border-radius:9px;background:transparent;color:var(--dsw-alias-label-primary,#dc2626);font:12px/1.3 system-ui;cursor:pointer}\n.dsh-mobile-control__danger:hover:not(:disabled),.dsh-mobile-control__device-revoke:hover{background:var(--dsw-alias-interactive-bg-hover-danger,rgb(220 38 38 / 8%))}\n.dsh-mobile-control__frp-setup{margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__frp-setup[hidden]{display:none}.dsh-mobile-control__frp-step{padding:11px 0}.dsh-mobile-control__frp-step + .dsh-mobile-control__frp-step{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__frp-step>strong{display:block;margin-bottom:3px;font-size:12px;line-height:1.4}.dsh-mobile-control__frp-step>p{margin:0 0 9px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__frp-changes{margin:0 0 9px;padding:0;list-style:none;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__frp-changes li{position:relative;margin:0;padding-left:12px}.dsh-mobile-control__frp-changes li+li{margin-top:5px}.dsh-mobile-control__frp-changes li::before{content:\"•\";position:absolute;left:2px;color:var(--dsw-alias-label-tertiary,#98a1ad)}.dsh-mobile-control__frp-step>.dsh-mobile-control__frp-requirement{padding:8px 9px;border-radius:9px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-primary,#384152);font-size:11px}.dsh-mobile-control__frp-fields{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:8px}.dsh-mobile-control__field{display:flex;min-width:0;flex-direction:column;gap:5px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px}.dsh-mobile-control__field:nth-child(3),.dsh-mobile-control__field:nth-child(4){grid-column:1/-1}.dsh-mobile-control__field input{box-sizing:border-box;width:100%;min-height:44px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);font:16px/1.4 system-ui}.dsh-mobile-control__frp-action{box-sizing:border-box;width:100%;min-height:44px;padding:9px 12px;border-radius:10px;font:650 12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__frp-action:disabled{cursor:not-allowed;opacity:.5}.dsh-mobile-control__remote-workspace{margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:15px;background:var(--dsw-alias-bg-layer-1,#f7f8fa)}.dsh-mobile-control__stage-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.dsh-mobile-control__stage-header .dsh-mobile-control__section-title{margin:0}.dsh-mobile-control__stage-meta{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:5px}.dsh-mobile-control__stage-value{max-width:115px;overflow:hidden;color:var(--dsw-alias-label-primary,#16181d);font:650 11px/1.3 system-ui;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__state-badge{flex:none;padding:3px 7px;border-radius:999px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary,#606873);font:650 11px/1.25 system-ui}.dsh-mobile-control__state-badge.is-ready{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsw-alias-label-primary,#087454)}.dsh-mobile-control__state-badge.is-busy{background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary,#1d4ed8)}.dsh-mobile-control__state-badge.is-attention{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsw-alias-label-primary,#935100)}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__status{box-sizing:border-box;margin:0 0 10px;padding:9px 10px;border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);font-size:11px;line-height:1.45}.dsh-mobile-control__provider-setup-body{margin:0 0 10px}.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__cpolar-setup{margin:0}.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__cpolar-setup>.dsh-mobile-control__section-title,.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__frp-setup>.dsh-mobile-control__section-title{display:none}.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__details{margin:0;padding:9px 10px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__actions{margin-top:2px}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__qr{margin:10px 0 0}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__manage-row{margin-top:10px;padding-top:10px;border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}\n.dsh-mobile-control__frp-overview{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:10px;margin:0 0 10px;padding:10px;border:1px solid var(--dsw-alias-state-success-primary,#a9dfc9);border-radius:11px;background:var(--dsw-alias-state-success-tertiary,#edf9f4)}.dsh-mobile-control__frp-overview[hidden]{display:none}.dsh-mobile-control__frp-overview-mark{display:grid;width:32px;height:32px;place-items:center;border-radius:50%;background:#087454;color:#fff;font:700 15px/1 system-ui}.dsh-mobile-control__frp-overview-body{display:flex;min-width:0;flex-direction:column;gap:2px}.dsh-mobile-control__frp-overview-body strong{color:var(--dsw-alias-label-primary,#075d46);font-size:12px;line-height:1.35}.dsh-mobile-control__frp-overview-body span{overflow:hidden;color:var(--dsw-alias-label-secondary,#357061);font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__frp-group{margin:8px 0 0;overflow:hidden;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__frp-group>summary{box-sizing:border-box;min-height:44px;padding:12px 34px 10px 12px;color:var(--dsw-alias-label-primary,#16181d);font:650 12px/1.4 system-ui;cursor:pointer}.dsh-mobile-control__frp-group[open]>summary{border-bottom:1px solid var(--dsw-alias-border-l2,#e1e5eb);background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__frp-group>.dsh-mobile-control__frp-step{padding:12px}.dsh-mobile-control__frp-group>.dsh-mobile-control__frp-step>strong:first-child{display:none}.dsh-mobile-control__frp-group .dsh-mobile-control__frp-step{border-top:0}.dsh-mobile-control__frp-setup>.dsh-mobile-control__frp-step{margin-bottom:8px;padding:10px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__tunnel{margin:0 0 10px}.dsh-mobile-control__tunnel[hidden]{display:none}\n.dsh-mobile-control__lan-setup{box-sizing:border-box;margin:0 0 12px;padding:14px;border:1px solid #6f96db;border-radius:15px;background:var(--dsw-alias-bg-layer-1,#f5f8ff)}.dsh-mobile-control__lan-setup[hidden],.dsh-mobile-control__lan-setup-form[hidden]{display:none}.dsh-mobile-control__lan-setup>.dsh-mobile-control__section-title{margin-bottom:5px}.dsh-mobile-control__lan-setup>.dsh-mobile-control__intro{margin-bottom:12px}.dsh-mobile-control__lan-setup-form{display:grid;gap:9px}.dsh-mobile-control__lan-setup .dsh-mobile-control__field select{box-sizing:border-box;width:100%;min-height:44px;padding:9px 32px 9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);font:14px/1.4 system-ui}.dsh-mobile-control__lan-setup .dsh-mobile-control__component-note{margin:0}.dsh-mobile-control__lan-setup-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:8px}.dsh-mobile-control__lan-setup-actions button{box-sizing:border-box;min-width:0;min-height:44px;padding:9px 10px;border-radius:10px;font:650 12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__lan-setup-actions button:disabled{cursor:wait;opacity:.55}.dsh-mobile-control__lan-setup>.dsh-mobile-control__status{margin:10px 0 0;line-height:1.5}.dsh-mobile-control__lan-setup>.dsh-mobile-control__status:empty{display:none}\n.dsh-mobile-control__access{display:flex;align-items:baseline;gap:6px;min-width:0;margin:0 0 12px}.dsh-mobile-control__access[hidden]{display:none}.dsh-mobile-control__access-label{flex:none;color:var(--dsw-alias-label-secondary,#606873);white-space:nowrap}.dsh-mobile-control__access-label::after{content:\":\"}.dsh-mobile-control__access-link{min-width:0;overflow:hidden;color:var(--dsw-alias-label-primary-bluish,#2563eb);text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__access-link:hover{text-decoration:underline}.dsh-mobile-control__qr{display:flex;justify-content:center;margin:0 0 12px}.dsh-mobile-control__qr[hidden]{display:none}.dsh-mobile-control__qr img{border-radius:12px;background:#fff;padding:8px}\n.dsh-mobile-control__status{margin:0 0 14px;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary,#606873)}.dsh-mobile-control__status::before{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:var(--dsw-alias-label-tertiary,#98a1ad);content:\"\"}.dsh-mobile-control__status.is-running::before{background:var(--dsw-alias-state-success-primary,#16a36a)}.dsh-mobile-control__status.is-key{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;word-break:break-all}\n.dsh-mobile-control__guide{margin:0 0 14px;padding:12px;border:1px solid #6f96db;border-radius:12px;background:var(--dsw-alias-bg-layer-1,#eff6ff)}.dsh-mobile-control__guide[hidden]{display:none}.dsh-mobile-control__guide-title{margin:0;color:var(--dsw-alias-label-primary,#172554);font:650 13px/1.45 system-ui}.dsh-mobile-control__guide-summary,.dsh-mobile-control__guide-note{margin:4px 0 0;color:var(--dsw-alias-label-secondary,#475569);font-size:12px;line-height:1.5}.dsh-mobile-control__guide-steps{margin:8px 0 0;padding-left:20px;color:var(--dsw-alias-label-primary,#1e293b);font-size:12px;line-height:1.6}.dsh-mobile-control__guide-note{color:var(--dsw-alias-label-secondary,#64748b)}.dsh-mobile-control__guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.dsh-mobile-control__guide-actions button{min-width:0;min-height:44px;padding:8px;border-radius:10px;font:12px/1.25 system-ui;cursor:pointer}.dsh-mobile-control__guide-actions button:disabled{cursor:not-allowed;opacity:.45}\n.dsh-mobile-control__extensions{margin:0 0 12px;color:var(--dsw-alias-label-secondary,#606873);font-size:12px}\n.dsh-mobile-control__view.is-diagnostics{--dsh-diagnostic-ok:var(--dsw-alias-state-success-primary,#087454);--dsh-diagnostic-warning:var(--dsw-alias-state-warn-primary,#a35b00);--dsh-diagnostic-error:var(--dsw-alias-state-error-primary,#c62828);--dsh-diagnostic-info:var(--dsw-alias-label-secondary,#526071)}.dsh-mobile-control__diagnostic-summary{box-sizing:border-box;margin:0;padding:13px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:16px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__diagnostic-summary-main{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:11px}.dsh-mobile-control__diagnostic-summary-icon{position:relative;display:block;width:36px;height:36px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#e8edf3);color:var(--dsh-diagnostic-info)}.dsh-mobile-control__diagnostic-summary-icon::before,.dsh-mobile-control__diagnostic-summary-icon::after{position:absolute;content:\"\"}.dsh-mobile-control__diagnostic-summary-body{display:flex;min-width:0;flex-direction:column;gap:2px}.dsh-mobile-control__diagnostic-summary-body strong{font-size:13px;line-height:1.35}.dsh-mobile-control__diagnostic-summary-body span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__diagnostic-summary-meta{display:block;margin-top:11px;padding-top:9px;border-top:1px solid var(--dsw-alias-border-l2,#dbe1e8);color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.45}.dsh-mobile-control__diagnostic-summary.is-ok .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsh-diagnostic-ok)}.dsh-mobile-control__diagnostic-summary.is-ok .dsh-mobile-control__diagnostic-summary-icon::before{top:10px;left:10px;width:13px;height:7px;border-bottom:2px solid currentColor;border-left:2px solid currentColor;transform:rotate(-45deg)}.dsh-mobile-control__diagnostic-summary.is-attention .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsh-diagnostic-warning)}.dsh-mobile-control__diagnostic-summary.is-error .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-error-secondary,#fdecec);color:var(--dsh-diagnostic-error)}.dsh-mobile-control__diagnostic-summary.is-attention .dsh-mobile-control__diagnostic-summary-icon::before,.dsh-mobile-control__diagnostic-summary.is-error .dsh-mobile-control__diagnostic-summary-icon::before{top:8px;left:17px;width:2px;height:13px;border-radius:2px;background:currentColor}.dsh-mobile-control__diagnostic-summary.is-attention .dsh-mobile-control__diagnostic-summary-icon::after,.dsh-mobile-control__diagnostic-summary.is-error .dsh-mobile-control__diagnostic-summary-icon::after{bottom:8px;left:17px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-summary.is-running .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary-bluish,#2563eb)}.dsh-mobile-control__diagnostic-summary.is-running .dsh-mobile-control__diagnostic-summary-icon::before{inset:9px;border:2px solid rgb(37 99 235 / 24%);border-top-color:currentColor;border-radius:50%;animation:dsh-diagnostic-spin .8s linear infinite}\n.dsh-mobile-control__diagnostic-summary.is-idle .dsh-mobile-control__diagnostic-summary-icon::before{top:8px;left:17px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-summary.is-idle .dsh-mobile-control__diagnostic-summary-icon::after{top:13px;left:17px;width:2px;height:11px;border-radius:2px;background:currentColor}\n.dsh-mobile-control__diagnostic-toolbar{display:grid;grid-template-columns:1fr;gap:8px;margin-top:10px}.dsh-mobile-control__diagnostic-toolbar.has-report{grid-template-columns:1fr 1fr}.dsh-mobile-control__diagnostic-run,.dsh-mobile-control__diagnostic-copy{box-sizing:border-box;width:100%;min-height:44px;padding:9px 10px;border-radius:11px;font:650 12px/1.3 system-ui;cursor:pointer;touch-action:manipulation}.dsh-mobile-control__diagnostic-copy[hidden]{display:none}.dsh-mobile-control__diagnostic-run:disabled{cursor:wait;opacity:.58}.dsh-mobile-control__diagnostic-feedback{margin:8px 0 0;padding:8px 10px;border-radius:9px;background:var(--dsw-alias-state-business-tertiary,#eff6ff);color:var(--dsw-alias-label-primary,#1d4ed8);font-size:11px;line-height:1.45}.dsh-mobile-control__diagnostic-feedback[hidden]{display:none}\n.dsh-mobile-control__diagnostic-checks{display:grid;gap:12px;margin-top:12px;animation:dsh-diagnostic-reveal 160ms ease-out both}.dsh-mobile-control__diagnostic-checks[hidden]{display:none}.dsh-mobile-control__diagnostic-group{overflow:hidden;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__diagnostic-group-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-bottom:1px solid var(--dsw-alias-border-l2,#e1e5eb);background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__diagnostic-group-header h3{margin:0;font:650 11px/1.4 system-ui}.dsh-mobile-control__diagnostic-group-header span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px}.dsh-mobile-control__diagnostic-list{display:flex;flex-direction:column}.dsh-mobile-control__diagnostic-check{display:grid;grid-template-columns:26px minmax(0,1fr);gap:9px;padding:11px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__diagnostic-check + .dsh-mobile-control__diagnostic-check{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__diagnostic-marker{position:relative;width:26px;height:26px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#edf1f5);color:var(--dsh-diagnostic-info)}.dsh-mobile-control__diagnostic-marker::before,.dsh-mobile-control__diagnostic-marker::after{position:absolute;content:\"\"}.dsh-mobile-control__diagnostic-check.is-ok .dsh-mobile-control__diagnostic-marker{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsh-diagnostic-ok)}.dsh-mobile-control__diagnostic-check.is-ok .dsh-mobile-control__diagnostic-marker::before{top:7px;left:7px;width:9px;height:5px;border-bottom:1.8px solid currentColor;border-left:1.8px solid currentColor;transform:rotate(-45deg)}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-marker{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsh-diagnostic-warning)}.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-marker{background:var(--dsw-alias-state-error-secondary,#fdecec);color:var(--dsh-diagnostic-error)}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-marker::before,.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-marker::before{top:6px;left:12px;width:2px;height:9px;border-radius:2px;background:currentColor}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-marker::after,.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-marker::after{bottom:6px;left:12px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-check.is-info .dsh-mobile-control__diagnostic-marker::before{top:6px;left:12px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-check.is-info .dsh-mobile-control__diagnostic-marker::after{top:10px;left:12px;width:2px;height:9px;border-radius:2px;background:currentColor}.dsh-mobile-control__diagnostic-check-body{min-width:0}.dsh-mobile-control__diagnostic-check-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.dsh-mobile-control__diagnostic-check-header strong{min-width:0;font-size:12px;line-height:1.4}.dsh-mobile-control__diagnostic-badge{flex:none;padding:2px 6px;border-radius:999px;background:var(--dsw-alias-bg-layer-1,#edf1f5);color:var(--dsh-diagnostic-info);font:650 11px/1.3 system-ui}.dsh-mobile-control__diagnostic-check.is-ok .dsh-mobile-control__diagnostic-badge{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsh-diagnostic-ok)}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-badge{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsh-diagnostic-warning)}.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-badge{background:var(--dsw-alias-state-error-secondary,#fdecec);color:var(--dsh-diagnostic-error)}.dsh-mobile-control__diagnostic-check p{margin:4px 0 0;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5;overflow-wrap:anywhere}.dsh-mobile-control__diagnostic-check .dsh-mobile-control__diagnostic-action{margin-top:7px;padding:7px 8px;border-radius:8px;background:var(--dsw-alias-bg-layer-1,#f8fafc);color:var(--dsw-alias-label-primary,#16181d)}.dsh-mobile-control__diagnostic-action span{display:inline-block;margin-right:6px;color:var(--dsw-alias-label-primary-bluish,#2563eb);font-weight:700}.dsh-mobile-control__diagnostic-details{margin-top:12px}.dsh-mobile-control__diagnostic-details[hidden]{display:none}.dsh-mobile-control__diagnostic-details>summary{box-sizing:border-box;min-height:44px;line-height:44px}.dsh-mobile-control__diagnostic-report{box-sizing:border-box;max-height:220px;margin:4px 0 0;overflow:auto;padding:10px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:10px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-secondary,#606873);font:11px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}\n.dsh-mobile-control__diagnostic-checks{transition:opacity 150ms ease}.dsh-mobile-control__diagnostic-checks.is-refreshing{opacity:.52}\n@keyframes dsh-diagnostic-spin{to{transform:rotate(360deg)}}@keyframes dsh-diagnostic-reveal{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}\n.dsh-mobile-control__actions{display:flex;flex-wrap:nowrap;gap:6px}.dsh-mobile-control__actions[hidden],.dsh-mobile-control__manage-row[hidden]{display:none}.dsh-mobile-control__actions button{flex:1 1 0;min-width:0;min-height:44px;padding:8px 4px;border-radius:10px;font:12px/1.2 system-ui;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dsh-mobile-control__secondary{border:1px solid var(--dsw-alias-border-l3,#cfd5dd);background:transparent;color:inherit}.dsh-mobile-control__primary{border:1px solid #2563eb;background:#2563eb;color:#fff}.dsh-mobile-control__actions button:disabled{cursor:not-allowed;opacity:.45}\n.dsh-mobile-control button:focus-visible,.dsh-mobile-control a:focus-visible,.dsh-mobile-control input:focus-visible,.dsh-mobile-control select:focus-visible,.dsh-mobile-control summary:focus-visible{outline:3px solid rgb(37 99 235 / 28%);outline-offset:2px}\n/* 42px matches the DSH sidebar footer row; it is not one of the panel target tiers. */\n.dsh-mobile-control__trigger{box-sizing:border-box;flex:1 1 auto;display:flex;align-items:center;gap:8px;width:100%;height:42px;margin:4px 0;padding:0 10px 0 8px;border:0;border-radius:12px;background:transparent;color:var(--dsw-alias-label-primary,#16181d);font-family:inherit;font-size:14px;line-height:22px;cursor:pointer;overflow:hidden}.dsh-mobile-control__trigger:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f3f6)}.dsh-mobile-control__trigger:active,.dsh-mobile-control__trigger[aria-expanded=\"true\"]{background:var(--dsw-alias-interactive-bg-active,#e8ebf0)}.dsh-mobile-control__trigger:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px}.dsh-mobile-control__trigger.is-rail{flex:0 0 auto;width:36px;height:36px;margin:8px 0 10px;padding:0;justify-content:center;gap:0;border-radius:50%}.dsh-mobile-control__trigger-icon{display:block;flex:none}.dsh-mobile-control__trigger-label{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n.dsh-mobile-control__manage-row{display:flex;justify-content:space-between;gap:8px;margin-top:10px}.dsh-mobile-control__manage{flex:1 1 0;min-width:0;min-height:36px;padding:6px 8px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:transparent;color:inherit;font:12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__devices{margin-top:10px;border:1px solid var(--dsw-alias-border-l2,#e1e5eb);border-radius:10px;padding:8px;max-height:220px;overflow-y:auto}.dsh-mobile-control__device-empty{color:var(--dsw-alias-label-secondary,#606873);font-size:12px;margin:0}.dsh-mobile-control__device{display:flex;align-items:center;gap:8px;padding:6px 2px}.dsh-mobile-control__device + .dsh-mobile-control__device{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__device-label{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.dsh-mobile-control__device-meta{flex:none;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;white-space:nowrap}.dsh-mobile-control__device-revoke{flex:none;min-height:36px;padding:4px 8px;border:1px solid var(--dsw-alias-state-error-primary,#dc2626);border-radius:8px;background:transparent;color:var(--dsw-alias-label-primary,#dc2626);font:12px/1.2 system-ui;cursor:pointer}.dsh-mobile-control__ws-paths{margin:10px 0 0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__ws-paths-list{margin:0 0 8px;padding:0;list-style:none}.dsh-mobile-control__ws-paths-empty{color:var(--dsw-alias-label-secondary,#606873);font-size:12px}.dsh-mobile-control__ws-paths-item{display:flex;align-items:center;gap:8px;padding:6px 0}.dsh-mobile-control__ws-paths-item + .dsh-mobile-control__ws-paths-item{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__ws-paths-item code{flex:1 1 0;min-width:0;overflow:hidden;font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__ws-paths-remove{flex:none;min-height:36px;padding:4px 8px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:8px;background:transparent;color:inherit;font:12px/1.2 system-ui;cursor:pointer}.dsh-mobile-control__trigger,.dsh-mobile-control__diagnostic-entry{position:relative}.dsh-mobile-control__ws-dot{position:absolute;top:2px;right:2px;z-index:1;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--dsw-alias-state-error-primary,#dc2626);color:#fff;font:650 11px/16px system-ui;text-align:center;cursor:pointer}.dsh-mobile-control__ws-dot::after{content:'';position:absolute;inset:-5px}.dsh-mobile-control__ws-sr-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.dsh-mobile-control__ws-paths-row{display:flex;gap:8px}.dsh-mobile-control__ws-paths-row .dsh-mobile-control__primary{width:auto;flex:none;padding:9px 14px;border-radius:10px}.dsh-mobile-control__ws-paths-group{padding:6px 0}.dsh-mobile-control__ws-paths-group + .dsh-mobile-control__ws-paths-group{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__ws-paths-group-head{display:flex;align-items:center;gap:8px}.dsh-mobile-control__ws-count{flex:none;padding:1px 7px;border-radius:999px;background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary,#1d4ed8);font:650 11px/1.6 system-ui}.dsh-mobile-control__ws-paths-item.is-child{padding-left:12px}.dsh-mobile-control__ws-paths-group-head .dsh-mobile-control__primary,.dsh-mobile-control__ws-paths-item .dsh-mobile-control__primary{width:auto;flex:none;min-height:36px;padding:6px 12px;border-radius:10px}.dsh-mobile-control__ws-paths-row input{flex:1 1 0;min-width:0;box-sizing:border-box;min-height:44px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);font:16px/1.4 system-ui}.dsh-mobile-control__ws-paths-row button{flex:none}.dsh-mobile-control__ws-paths-detected-title{margin:0 0 2px;font:600 12px/1.4 system-ui}.dsh-mobile-control__ws-paths-advanced{margin-top:8px}.dsh-mobile-control__ws-paths-advanced summary{cursor:pointer;color:var(--dsw-alias-label-secondary,#606873);font:12px/1.4 system-ui;user-select:none}.dsh-mobile-control__ws-paths-advanced summary:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px;border-radius:4px}.dsh-mobile-control__ws-paths-advanced[open] summary{margin-bottom:6px}.dsh-mobile-control__ws-paths-advanced .dsh-mobile-control__status{margin:6px 0 0}\n@media (max-width:359px){.dsh-mobile-control__provider{min-height:68px}}@media (prefers-reduced-motion:reduce){.dsh-mobile-control__provider,.dsh-mobile-control__cpolar-connect{transition:none}.dsh-mobile-control__diagnostic-summary.is-running .dsh-mobile-control__diagnostic-summary-icon::before,.dsh-mobile-control__diagnostic-checks{animation:none}}\n\n.dsh-mobile-control__origin-setup{margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__origin-setup[hidden],.dsh-mobile-control__origin-backend[hidden],.dsh-mobile-control__origin-feedback[hidden]{display:none}.dsh-mobile-control__origin-fields{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:12px}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field{font-size:12px}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(1),.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(4){grid-column:1/-1}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(2){grid-column:1}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(3){grid-column:2}.dsh-mobile-control__origin-warning{margin:12px 0;padding:10px 12px;border-left:3px solid var(--dsw-alias-state-warn-primary,#a56810);border-radius:4px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-primary,#384152);font-size:12px;line-height:1.6}.dsh-mobile-control__origin-feedback{font-size:12px;line-height:1.6;overflow-wrap:anywhere}.dsh-mobile-control__origin-feedback.is-error{color:var(--dsw-alias-state-error-primary,#bc3030)}.dsh-mobile-control__origin-fields input[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary,#bc3030)}.dsh-mobile-control__origin-backend{display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#dbe1e8)}.dsh-mobile-control__origin-backend button{align-self:flex-start;min-height:44px}.dsh-mobile-control__self-hosted-body .is-origin{margin-top:8px}\n`\n\n/** Mount the desktop control or mobile feature enhancements. */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => {\n if (window.__DSH_MOBILE_FRONTEND__ !== 'dedicated') return\n return trustAuthenticatedGatewayConnection(ctx.get('connection'))\n }, 'dsh-mobile: authenticated gateway client trust')\n\n ctx.effect(() => {\n const desktopAdmin = isDesktopAdminSurface(location.hostname, location.search, window.__DSH_MOBILE_FRONTEND__)\n const style = element('style'); style.dataset.plugin = 'dsh-mobile'; style.textContent = desktopAdmin\n ? CONTROL_STYLES\n : NATIVE_MOBILE_STYLES\n document.head.append(style)\n if (!desktopAdmin) {\n const removeSettingsAction = ctx.slots.inject('settings.general.item', () => ctx.slots.register({\n name: 'settings.general.item',\n id: 'dsh-mobile-switch-computer',\n order: 100,\n }, MobileSwitchComputerRow))\n const removeCustom = installCustomAssets()\n const removeSurface = installDshLanguageBoundSurface(installNativeMobileSurface)\n return () => { removeSettingsAction(); removeCustom(); removeSurface(); style.remove() }\n }\n const removeControl = installDshLanguageBoundSurface(() => {\n const control = installControl()\n const triggerLocale = selectedMobileControlLocale()\n const t = controlTranslator(triggerLocale)\n const disposeSlot = ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register<{ wide: boolean }>({ name: 'sidebar.footer.action', id: 'dsh-mobile' }, ({ wide }) => createElement('button', {\n 'aria-expanded': control.isOpen(),\n 'aria-controls': CONTROL_PANEL_ID,\n 'aria-label': t('mobileAccess'),\n className: `dsh-mobile-control__trigger${wide ? '' : ' is-rail'}`,\n lang: triggerLocale,\n type: 'button',\n title: t('mobileAccess'),\n onClick: control.toggle,\n }, createElement('svg', {\n 'aria-hidden': true,\n className: 'dsh-mobile-control__trigger-icon',\n focusable: false,\n width: wide ? 16 : 18,\n height: wide ? 16 : 18,\n viewBox: '0 0 16 16',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.5,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n }, createElement('rect', { x: 4, y: 1, width: 8, height: 14, rx: 2 }), createElement('path', { d: 'M7 12h2' })), wide ? createElement('span', { className: 'dsh-mobile-control__trigger-label' }, t('mobileAccess')) : undefined)))\n return () => { disposeSlot(); control.remove() }\n })\n return () => { removeControl(); style.remove() }\n }, 'dsh-mobile: stock mobile adaptation and local control')\n}\n\n/** Client services required by the mobile adaptation. */\nexport const inject: readonly string[] = ['slots']\n"],"mappings":";;;;;;;;EAEA,MAAa,0BAA0B;GACrC,IAAI;IACF,cAAc;IAAiB,sBAAsB;IAA0B,iBAAiB;IAA+B,wBAAwB;IAA4C,qBAAqB;IAAwD,4BAA4B;IAAwD,cAAc;IAAiB,kBAAkB;IAAmC,gBAAgB;IAAa,sBAAsB;IAAmD,oBAAoB;IAA0B,UAAU;IAAwB,cAAc;IAA8J,kBAAkB;IAA+F,WAAW;IAAc,aAAa;IACj7B,KAAK;IAAiB,QAAQ;IAAU,WAAW;IAAwB,cAAc;IAAiB,eAAe;IAAkB,eAAe;IAAkB,eAAe;IAAmB,qBAAqB;IACnO,iBAAiB;IAAyB,cAAc;IAAqB,qBAAqB;IAAyB,iBAAiB;IAAqB,WAAW;IAC5K,aAAa;IAAqH,kBAAkB;IAAsI,gBAAgB;IAA4B,iBAAiB;IAAsB,gBAAgB;IAAO,uBAAuB;IAAc,sBAAsB;IAAmB,kBAAkB;IAA2D,mBAAmB;IAA4B,mB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AAM,OAAO,+BAA+B,IAAI,MAAM,SAA4B;MAAE,MAAM;MAAyB,IAAI;KAAa,IAAI,EAAE,YAAA,GAAWA,MAAAA,cAAAA,CAAc,UAAU;MACnM,iBAAiB,QAAQ,OAAO;MAChC,iBAAiB;MACjB,cAAc,EAAE,cAAc;MAC9B,WAAW,8BAA8B,OAAO,KAAK;MACrD,MAAM;MACN,MAAM;MACN,OAAO,EAAE,cAAc;MACvB,SAAS,QAAQ;KACnB,IAAA,GAAGA,MAAAA,cAAAA,CAAc,OAAO;MACtB,eAAe;MACf,WAAW;MACX,WAAW;MACX,OAAO,OAAO,KAAK;MACnB,QAAQ,OAAO,KAAK;MACpB,SAAS;MACT,MAAM;MACN,QAAQ;MACR,aAAa;MACb,eAAe;MACf,gBAAgB;KAClB,IAAA,GAAGA,MAAAA,cAAAA,CAAc,QAAQ;MAAE,GAAG;MAAG,GAAG;MAAG,OAAO;MAAG,QAAQ;MAAI,IAAI;KAAE,CAAC,IAAA,GAAGA,MAAAA,cAAAA,CAAc,QAAQ,EAAE,GAAG,UAAU,CAAC,CAAC,GAAG,QAAA,GAAOA,MAAAA,cAAAA,CAAc,QAAQ,EAAE,WAAW,oCAAoC,GAAG,EAAE,cAAc,CAAC,IAAI,KAAA,CAAS,CAAC,CAAC;KAClO,aAAa;MAAE,YAAY;MAAG,QAAQ,OAAO;KAAE;IACjD,CAAC;IACD,aAAa;KAAE,cAAc;KAAG,MAAM,OAAO;IAAE;GACjD,GAAG,uDAAuD;EAC5D;;EAGA,MAAa,SAA4B,CAAC,OAAO"}
1
+ {"version":3,"file":"client.js","names":["useState","createElement"],"sources":["../src/client-messages.ts","../src/frp-template.ts","../src/task-notify.ts","../src/native-mobile.ts","../src/local-admin-host.ts","../src/client.ts"],"sourcesContent":["export type MobileControlLocale = 'it' | 'en' | 'zh'\n\nexport const MOBILE_CONTROL_MESSAGES = {\n en: {\n mobileAccess: 'Mobile access', collapseMobileAccess: 'Collapse Mobile access', downloadAndroid: 'Download latest Android app', downloadAndroidVersion: 'Download latest Android app · v{version}', downloadAndroidAria: 'Download the latest Android app from GitHub Releases', downloadAndroidVersionAria: 'Download Android app v{version} from GitHub Releases', updatePlugin: 'Update plugin', updatePluginAria: 'Update DSH Mobile to v{version}', updatingPlugin: 'Updating…', pluginUpdatedRestart: 'Updated to v{version}. Restart DSH to apply it.', pluginUpdateFailed: 'Update failed: {error}', updateTo: 'Update to v{version}', updateNotice: 'Restart DSH after installing. Existing apps and paired devices need no re-pairing; unsure about the desktop version? Check the README compatibility table.', updateNotesEmpty: 'No release notes fetched — updating is still fine; full details on the GitHub Release page.', updateNow: 'Update now', updateLater: 'Not now',\n lan: 'Local network', remote: 'Remote', lanAccess: 'Local network access', remoteAccess: 'Remote access', browserAccess: 'Browser access', remoteAddress: 'Remote address', loadingStatus: 'Loading status…', loadingRemoteStatus: 'Loading remote status…',\n generateCopyKey: 'Generate and copy key', copyPairLink: 'Copy pairing link', managePairedDevices: 'Manage paired devices', clearAllDevices: 'Clear all devices', pairingQr: 'Pairing QR code',\n remoteIntro: 'Choose the remote channel that suits you. Switching or disabling remote access does not affect the local network.', httpFrameWarning: 'HTTP pages may be embedded for compatibility, but their contents are unencrypted and can be altered. Use HTTPS for sensitive work.', chooseProvider: 'Choose connection method', currentProvider: 'Current connection', remoteStateOff: 'Off', remoteStateConnecting: 'Connecting', remoteStateAttention: 'Needs attention', providerInfoAria: 'View remote connection security and network information', providerGroupAria: 'Remote connection method', providerSafeTitle: 'You remain protected', providerSafeText: 'Only paired devices can access DSH. cpolar is installed on demand and can be removed completely; Tailscale may be slow or unavailable on mainland China networks, where cpolar is recommended.',\n builtIn: 'Built in', mainlandPreferred: 'Preferred in mainland China', tailscaleDescription: 'Wider coverage; mainland China networks may be unstable. The first connection requires login and Funnel authorization.', cpolarDescription: 'Installs the official component on demand and is suitable for mainland China networks.',\n prepareCpolar: 'Prepare cpolar', checkingComponent: 'Checking component…', installOfficial: 'Install official component', cpolarAccountNote: 'Sign in to the cpolar website and copy the Authtoken. The token is stored only in the plugin private directory and is never shown on the page or in logs.', registerCpolar: 'Register with cpolar', openDashboard: 'Open dashboard to get token', tokenPlaceholder: 'Paste cpolar Authtoken', saveConnect: 'Save and connect', saving: 'Saving…', componentDetails: 'Component source and cleanup', componentDetailsText: 'Downloaded from the official cpolar website and verified at a fixed version only after you choose Install. It does not add a system service, startup item, registry entry, or PATH entry.', pluginPrivateDirectory: 'Plugin private directory', officialDownload: 'Official download page', terms: 'Terms of service', purgeCpolar: 'Completely remove cpolar component and configuration', tailscaleHelp: 'How to use Tailscale', tailscaleHelpText: 'The runtime component is included with the plugin. The first connection opens the official Tailscale login and Funnel authorization pages; the plugin never accesses your account password.',\n funnelGuideAria: 'Steps to enable Tailscale Funnel', funnelGuideTitle: 'Remote access setup · Step 2', funnelGuideSummary: 'Tailscale login is complete. Funnel must still be allowed for this computer; the official page also enables HTTPS.', funnelStep1: 'Open the official Tailscale authorization page for this node.', funnelStep2: 'Confirm Funnel; you do not need to sign in to DSH again.', funnelStep3: 'Return to DSH; the plugin checks and connects automatically.', funnelGuideNote: 'Requires an Owner, Admin, or Network admin account.', continueFunnel: 'Continue Funnel authorization', retryNow: 'Done, retry now',\n enableRemote: 'Enable remote access', disableRemote: 'Disable remote access', continueLogin: 'Continue login', reconnect: 'Reconnect', generateRemoteQr: 'Generate remote pairing QR code', copyRemoteLink: 'Copy remote pairing link', manageRemoteDevices: 'Manage remote devices', resetRemoteLogin: 'Sign out and clear remote login', resetRemoteDevices: 'Disable and clear remote devices',\n lanOn: 'Local network access is on.', lanOff: 'Local network access is off.', enableLan: 'Enable local network access', disableLan: 'Disable local network access', extensionsLoaded: 'Extensions: {loaded} loaded', extensionsFailed: 'Extensions: {loaded} loaded, {failed} failed',\n keyGenerationFailed: 'Could not generate a pairing key.', keyCopied: 'Pairing key copied. Paste it into the Android app.', linkCopied: 'Pairing link copied. Send it to the phone and paste it into the app or open it in a browser.', copySecret: 'Copy {kind}: {value}', pairingKey: 'pairing key', pairingLink: 'pairing link', noDevices: 'No paired devices.', noRemoteDevices: 'No remote paired devices.', device: 'Device', expires: 'Expires {time}', revoke: 'Revoke', confirmResetDevices: 'Remove all paired devices? Connected devices will be disconnected immediately.',\n ready: 'Ready', installed: 'Installed', installWithSize: 'Install official component · {size} MB', cpolarUnsupported: 'Windows x64 and Linux x64/arm64 are currently supported.', cpolarNotInstalled: 'Not installed. A fixed version is downloaded from the official cpolar website only after you click the button below.', cpolarNeedsToken: 'Official component {version} is verified. Save the account token to continue.', cpolarReady: 'Official component {version} and the local account configuration are ready. Free temporary addresses may change after DSH or cpolar restarts; if the app cannot connect, scan the current remote QR code again.',\n remoteOff: 'Remote access is disabled. Local network access is unaffected.', remoteUnavailableCpolar: 'cpolar is not installed or its local account is not configured.', remoteUnavailableTailscale: 'This computer is missing the Funnel runtime component. Reinstall the complete plugin package.', remoteStartingCpolar: 'Connecting to a cpolar node…', remoteStartingTailscale: 'Starting the secure Tailscale channel…', remoteNeedsLogin: 'Complete a one-time Tailscale login in the browser. The plugin never reads your password.', remoteConnectingCpolar: 'Public address allocated; starting the DSH authentication gateway…', remoteConnectingTailscale: 'Login complete; creating the public HTTPS address…', remoteReady: 'Remote access is ready. Only paired devices can access DSH.', remoteError: 'The remote connection was not established. Reconnect; local network access still works.',\n funnelPermission: 'Login is complete. Authorize Funnel to establish the remote connection automatically.', funnelHttps: 'Login is complete. Authorize Funnel; the official page also enables HTTPS.', funnelStart: 'Login is complete. Finish the initial Tailscale Funnel authorization.', tailscaleDnsMissing: 'Tailscale has not provided a remote address. Reconnect and confirm login is complete.', gatewayStartFailed: 'The remote gateway failed to start. Reconnect; local network access is unaffected.', controlChannelFailed: 'The remote component connection was interrupted. Reconnect.', cpolarMissing: 'The official cpolar component is not installed. Complete the preparation steps above.', cpolarInvalid: 'cpolar component verification failed. Remove it completely and reinstall.', cpolarConfigMissing: 'No cpolar account token is saved. Complete the preparation steps above.', cpolarConfigInvalid: 'The local cpolar configuration is invalid. Save the account token again.', cpolarPortUnavailable: 'Could not allocate a local remote-gateway port. Try again.', cpolarLaunchFailed: 'The cpolar client failed to start.', cpolarTimeout: 'Timed out connecting to a cpolar node. Reconnect.', cpolarStopped: 'The cpolar connection stopped.', cpolarExited: 'The cpolar connection exited unexpectedly. Reconnect.', cpolarOutputInvalid: 'cpolar returned an unrecognized status.', cpolarOriginInvalid: 'The public address returned by cpolar failed validation.', setupOpened: 'The official Tailscale page is open. Return to DSH after enabling Funnel; reconnection is automatic.',\n switchProviderConfirm: 'Switching connection method first disables the current remote channel. Local network access and paired devices are unaffected. Continue?', switchingCpolar: 'Switching to cpolar…', switchingTailscale: 'Switching to Tailscale Funnel…', installConfirm: 'Download and verify a fixed version from the official cpolar website (about 7.3 MB) and extract it only to the DSH Mobile private directory? No system service, PATH/registry entry, or startup item is added.', downloading: 'Downloading and verifying…', installingCpolar: 'Installing the official cpolar component. Keep DSH running until it completes.', installFailed: 'Component installation failed: {error}', invalidToken: 'Paste the complete Authtoken from the cpolar dashboard.', configuredConnecting: 'Account configuration saved; connecting through cpolar…', configureFailed: 'Configuration failed: {error}', purgeConfirm: 'Completely remove the cpolar component, token configuration, and runtime logs from the DSH Mobile private directory? Local network access, DSH data, and other system programs are unaffected.', purging: 'Stopping the channel and removing cpolar files managed by DSH Mobile…', purgeFailed: 'Cleanup failed: {error}', reconnectingCpolar: 'Reconnecting to a cpolar node…', reconnectingTailscale: 'Checking Tailscale settings and reconnecting…', remoteQrReady: 'Remote pairing QR code generated. Scan it from “Remote access” in the app.', resetCpolarConfirm: 'Disable the cpolar remote channel and remove all remote paired devices? Your cpolar account and other tunnels are unchanged.', resetTailscaleConfirm: 'Sign out of Tailscale on this computer and remove all remote paired devices? Local network configuration is unchanged.', requestFailed: 'Request failed: {error}', wsPathsTitle: 'Third-party WebSocket paths', wsPathsIntro: 'When an installed plugin cannot connect (say a sidebar terminal or a live panel), it is usually because its connection paths have not been approved yet. Everything that needs your attention is listed below — one click on “Allow” fixes it.', wsPathsPlaceholder: '/sidebar/ws/terminal', wsPathsAdd: 'Allow path', wsPathsRemove: 'Remove', wsPathsEmpty: 'Nothing to configure right now. If a plugin cannot connect later, one-click options appear here.', wsPathsInvalid: 'Enter an exact path starting with / (no query string).', wsPathsDetected: 'A plugin connection was blocked — press Allow to let it through', wsPathsAllow: 'Allow', wsPathsAllowAll: 'Allow all', wsPathsGroupMeta: '{n} paths · blocked {m} times', wsPathsNewBlocked: 'New blocked third-party connections — open diagnostics to review', wsPathsAdvancedToggle: 'Add paths manually (advanced)', wsPathsAnnounce: '{n} plugin connections waiting to be approved', wsPathsAdvancedHint: 'Manual entries are rarely necessary: use the buttons above. Only fill this in when you know the exact path.',\n },\n it: {\n mobileAccess: 'Accesso mobile', collapseMobileAccess: 'Riduci Accesso mobile', downloadAndroid: 'Scarica l’ultima app Android', downloadAndroidVersion: 'Scarica l’ultima app Android · v{version}', downloadAndroidAria: 'Scarica l’ultima app Android da GitHub Releases', downloadAndroidVersionAria: 'Scarica l’app Android v{version} da GitHub Releases', updatePlugin: 'Aggiorna plugin', updatePluginAria: 'Aggiorna DSH Mobile alla v{version}', updatingPlugin: 'Aggiornamento…', pluginUpdatedRestart: 'Aggiornato alla v{version}. Riavvia DSH per applicarlo.', pluginUpdateFailed: 'Aggiornamento non riuscito: {error}', updateTo: 'Aggiorna alla v{version}', updateNotice: 'Riavvia DSH dopo l’installazione. Le app esistenti e i dispositivi già associati non richiedono ri-associazione; in caso di dubbi sulla versione desktop, consulta la tabella di compatibilità nel README.', updateNotesEmpty: 'Note di rilascio non recuperate — l’aggiornamento resta possibile; dettagli nella pagina Release su GitHub.', updateNow: 'Aggiorna ora', updateLater: 'Non ora',\n lan: 'Rete locale', remote: 'Remoto', lanAccess: 'Accesso rete locale', remoteAccess: 'Accesso remoto', browserAccess: 'Accesso browser', remoteAddress: 'Indirizzo remoto', loadingStatus: 'Lettura stato…', loadingRemoteStatus: 'Lettura stato remoto…',\n generateCopyKey: 'Genera e copia chiave', copyPairLink: 'Copia link di abbinamento', managePairedDevices: 'Gestisci dispositivi abbinati', clearAllDevices: 'Rimuovi tutti i dispositivi', pairingQr: 'Codice QR di abbinamento', remoteIntro: 'Scegli il canale remoto più adatto. Cambiare o disattivare l’accesso remoto non influisce sulla rete locale.', httpFrameWarning: 'Le pagine HTTP possono essere incorporate per compatibilità, ma i contenuti non sono cifrati e possono essere alterati. Usa HTTPS per le attività sensibili.', chooseProvider: 'Scegli metodo di connessione', currentProvider: 'Connessione attuale', remoteStateOff: 'Disattivata', remoteStateConnecting: 'Connessione', remoteStateAttention: 'Da controllare', providerInfoAria: 'Informazioni su sicurezza e rete della connessione remota', providerGroupAria: 'Metodo di connessione remota', providerSafeTitle: 'La protezione resta attiva', providerSafeText: 'Solo i dispositivi abbinati possono accedere a DSH. cpolar viene installato su richiesta e può essere rimosso completamente; Tailscale può essere lento o non disponibile nelle reti della Cina continentale, dove è consigliato cpolar.',\n builtIn: 'Integrato', mainlandPreferred: 'Preferito in Cina continentale', tailscaleDescription: 'Copertura più ampia; le reti della Cina continentale possono essere instabili. Il primo collegamento richiede accesso e autorizzazione Funnel.', cpolarDescription: 'Installa su richiesta il componente ufficiale, adatto alle reti della Cina continentale.', prepareCpolar: 'Prepara cpolar', checkingComponent: 'Controllo componente…', installOfficial: 'Installa componente ufficiale', cpolarAccountNote: 'Accedi al sito cpolar e copia l’Authtoken. Il token resta solo nella directory privata del plugin e non viene mostrato nella pagina o nei log.', registerCpolar: 'Registrati su cpolar', openDashboard: 'Apri la dashboard per il token', tokenPlaceholder: 'Incolla Authtoken cpolar', saveConnect: 'Salva e connetti', saving: 'Salvataggio…', componentDetails: 'Origine e rimozione del componente', componentDetailsText: 'Viene scaricato dal sito ufficiale cpolar e verificato a una versione fissa solo dopo aver scelto Installa. Non aggiunge servizi di sistema, avvio automatico, voci di registro o PATH.', pluginPrivateDirectory: 'Directory privata del plugin', officialDownload: 'Pagina download ufficiale', terms: 'Termini di servizio', purgeCpolar: 'Rimuovi completamente componente e configurazione cpolar', tailscaleHelp: 'Guida a Tailscale', tailscaleHelpText: 'Il componente runtime è incluso nel plugin. Il primo collegamento apre le pagine ufficiali di accesso Tailscale e autorizzazione Funnel; il plugin non accede mai alla password.', funnelGuideAria: 'Passaggi per abilitare Tailscale Funnel', funnelGuideTitle: 'Configurazione accesso remoto · Passaggio 2', funnelGuideSummary: 'L’accesso Tailscale è completato. Devi ancora consentire Funnel per questo computer; la pagina ufficiale abilita anche HTTPS.', funnelStep1: 'Apri la pagina ufficiale di autorizzazione Tailscale per questo nodo.', funnelStep2: 'Conferma Funnel; non serve accedere di nuovo a DSH.', funnelStep3: 'Torna in DSH; il plugin controlla e si connette automaticamente.', funnelGuideNote: 'Richiede un account Owner, Admin o Network admin.', continueFunnel: 'Continua autorizzazione Funnel', retryNow: 'Fatto, riprova ora', enableRemote: 'Attiva accesso remoto', disableRemote: 'Disattiva accesso remoto', continueLogin: 'Continua accesso', reconnect: 'Riconnetti', generateRemoteQr: 'Genera QR di abbinamento remoto', copyRemoteLink: 'Copia link di abbinamento remoto', manageRemoteDevices: 'Gestisci dispositivi remoti', resetRemoteLogin: 'Esci e rimuovi accesso remoto', resetRemoteDevices: 'Disattiva e rimuovi dispositivi remoti',\n lanOn: 'Accesso dalla rete locale attivo.', lanOff: 'Accesso dalla rete locale disattivato.', enableLan: 'Attiva accesso rete locale', disableLan: 'Disattiva accesso rete locale', extensionsLoaded: 'Estensioni: {loaded} caricate', extensionsFailed: 'Estensioni: {loaded} caricate, {failed} non riuscite', keyGenerationFailed: 'Impossibile generare la chiave di abbinamento.', keyCopied: 'Chiave di abbinamento copiata. Incollala nell’app Android.', linkCopied: 'Link di abbinamento copiato. Invialo al telefono e incollalo nell’app oppure aprilo nel browser.', copySecret: 'Copia {kind}: {value}', pairingKey: 'chiave di abbinamento', pairingLink: 'link di abbinamento', noDevices: 'Nessun dispositivo abbinato.', noRemoteDevices: 'Nessun dispositivo remoto abbinato.', device: 'Dispositivo', expires: 'Scade {time}', revoke: 'Revoca', confirmResetDevices: 'Rimuovere tutti i dispositivi abbinati? I dispositivi connessi verranno disconnessi subito.', ready: 'Pronto', installed: 'Installato', installWithSize: 'Installa componente ufficiale · {size} MB', cpolarUnsupported: 'Attualmente sono supportati Windows x64 e Linux x64/arm64.', cpolarNotInstalled: 'Non installato. Una versione fissa viene scaricata dal sito ufficiale cpolar solo dopo aver premuto il pulsante.', cpolarNeedsToken: 'Componente ufficiale {version} verificato. Salva il token account per continuare.', cpolarReady: 'Componente ufficiale {version} e configurazione account locale pronti. Gli indirizzi temporanei gratuiti possono cambiare dopo il riavvio di DSH o cpolar; se l’app non si connette, scansiona di nuovo il QR remoto corrente.',\n remoteOff: 'Accesso remoto disattivato. La rete locale non è interessata.', remoteUnavailableCpolar: 'cpolar non è installato o l’account locale non è configurato.', remoteUnavailableTailscale: 'Su questo computer manca il componente runtime Funnel. Reinstalla il pacchetto completo del plugin.', remoteStartingCpolar: 'Connessione a un nodo cpolar…', remoteStartingTailscale: 'Avvio del canale sicuro Tailscale…', remoteNeedsLogin: 'Completa una volta l’accesso Tailscale nel browser. Il plugin non legge mai la password.', remoteConnectingCpolar: 'Indirizzo pubblico assegnato; avvio del gateway di autenticazione DSH…', remoteConnectingTailscale: 'Accesso completato; creazione dell’indirizzo HTTPS pubblico…', remoteReady: 'Accesso remoto pronto. Solo i dispositivi abbinati possono accedere a DSH.', remoteError: 'Connessione remota non stabilita. Riconnettiti; la rete locale continua a funzionare.', funnelPermission: 'Accesso completato. Autorizza Funnel per stabilire automaticamente la connessione remota.', funnelHttps: 'Accesso completato. Autorizza Funnel; la pagina ufficiale abilita anche HTTPS.', funnelStart: 'Accesso completato. Termina la prima autorizzazione Tailscale Funnel.', tailscaleDnsMissing: 'Tailscale non ha fornito un indirizzo remoto. Riconnettiti e verifica di aver completato l’accesso.', gatewayStartFailed: 'Avvio del gateway remoto non riuscito. Riconnettiti; la rete locale non è interessata.', controlChannelFailed: 'Connessione al componente remoto interrotta. Riconnettiti.', cpolarMissing: 'Il componente ufficiale cpolar non è installato. Completa i passaggi sopra.', cpolarInvalid: 'Verifica del componente cpolar non riuscita. Rimuovilo completamente e reinstallalo.', cpolarConfigMissing: 'Nessun token account cpolar salvato. Completa i passaggi sopra.', cpolarConfigInvalid: 'Configurazione locale cpolar non valida. Salva nuovamente il token.', cpolarPortUnavailable: 'Impossibile assegnare una porta locale al gateway remoto. Riprova.', cpolarLaunchFailed: 'Avvio del client cpolar non riuscito.', cpolarTimeout: 'Connessione al nodo cpolar scaduta. Riconnettiti.', cpolarStopped: 'Connessione cpolar arrestata.', cpolarExited: 'Connessione cpolar terminata inaspettatamente. Riconnettiti.', cpolarOutputInvalid: 'cpolar ha restituito uno stato non riconosciuto.', cpolarOriginInvalid: 'L’indirizzo pubblico restituito da cpolar non ha superato la verifica.', setupOpened: 'La pagina ufficiale Tailscale è aperta. Torna in DSH dopo aver abilitato Funnel; la riconnessione è automatica.',\n switchProviderConfirm: 'Il cambio di metodo disattiva prima il canale remoto corrente. Rete locale e dispositivi abbinati non sono interessati. Continuare?', switchingCpolar: 'Passaggio a cpolar…', switchingTailscale: 'Passaggio a Tailscale Funnel…', installConfirm: 'Scaricare e verificare una versione fissa dal sito ufficiale cpolar (circa 7,3 MB), estraendola solo nella directory privata DSH Mobile? Non vengono aggiunti servizi, PATH/registro o avvio automatico.', downloading: 'Download e verifica…', installingCpolar: 'Installazione del componente ufficiale cpolar. Mantieni DSH in esecuzione fino al termine.', installFailed: 'Installazione componente non riuscita: {error}', invalidToken: 'Incolla l’Authtoken completo dalla dashboard cpolar.', configuredConnecting: 'Configurazione account salvata; connessione tramite cpolar…', configureFailed: 'Configurazione non riuscita: {error}', purgeConfirm: 'Rimuovere completamente componente cpolar, configurazione token e log runtime dalla directory privata DSH Mobile? Rete locale, dati DSH e altri programmi non sono interessati.', purging: 'Arresto del canale e rimozione dei file cpolar gestiti da DSH Mobile…', purgeFailed: 'Pulizia non riuscita: {error}', reconnectingCpolar: 'Riconnessione a un nodo cpolar…', reconnectingTailscale: 'Controllo impostazioni Tailscale e riconnessione…', remoteQrReady: 'QR di abbinamento remoto generato. Scansionalo da “Accesso remoto” nell’app.', resetCpolarConfirm: 'Disattivare il canale remoto cpolar e rimuovere tutti i dispositivi remoti? Account cpolar e altri tunnel restano invariati.', resetTailscaleConfirm: 'Uscire da Tailscale su questo computer e rimuovere tutti i dispositivi remoti? La configurazione della rete locale resta invariata.', requestFailed: 'Richiesta non riuscita: {error}', wsPathsTitle: 'Percorsi WebSocket di terze parti', wsPathsIntro: 'Quando un plugin installato non riesce a connettersi (per esempio un terminale laterale o un pannello live), di solito è perché i suoi percorsi di connessione non sono ancora stati approvati. Tutto ciò che richiede attenzione è elencato qui sotto: un clic su “Consenti” risolve.', wsPathsPlaceholder: '/sidebar/ws/terminal', wsPathsAdd: 'Consenti percorso', wsPathsRemove: 'Rimuovi', wsPathsEmpty: 'Non serve configurare nulla per ora. Se in seguito un plugin non riesce a connettersi, qui compariranno opzioni con un clic.', wsPathsInvalid: 'Inserisci un percorso esatto che inizi con / (senza query).', wsPathsDetected: 'Una connessione di un plugin è stata bloccata — premi Consenti per lasciarla passare', wsPathsAllow: 'Consenti', wsPathsAllowAll: 'Consenti tutti', wsPathsGroupMeta: '{n} percorsi · bloccati {m} volte', wsPathsNewBlocked: 'Nuove connessioni di terze parti bloccate — apri la diagnostica', wsPathsAdvancedToggle: 'Aggiungi percorsi manualmente (avanzato)', wsPathsAnnounce: '{n} connessioni di plugin in attesa di approvazione', wsPathsAdvancedHint: 'Le voci manuali servono raramente: usa i pulsanti qui sopra. Compila solo se conosci il percorso esatto.'\n },\n zh: {} as Record<string, string>,\n} satisfies Record<MobileControlLocale, Record<string, string>>\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n mobileAccess: '移动访问', collapseMobileAccess: '收起移动访问', downloadAndroid: '下载最新 Android App', downloadAndroidVersion: '下载最新 Android App · v{version}', downloadAndroidAria: '从 GitHub Releases 下载最新版 Android App', downloadAndroidVersionAria: '从 GitHub Releases 下载 Android App v{version}', updatePlugin: '更新插件', updatePluginAria: '将 DSH Mobile 更新至 v{version}', updatingPlugin: '正在更新…', pluginUpdatedRestart: '插件已更新至 v{version},重启 DSH 后生效。', pluginUpdateFailed: '更新失败:{error}', updateTo: '更新到 v{version}', updateNotice: '安装后需重启 DSH。现有 App 与已配对设备无需重新配对;电脑端版本不确定时,先对照 README 兼容表。', updateNotesEmpty: '未取到最新版更新说明,仍可继续更新;详情见 GitHub Release 页。', updateNow: '立即更新', updateLater: '暂不', lan: '局域网', remote: '远程', lanAccess: '局域网访问', remoteAccess: '远程访问', browserAccess: '浏览器访问', remoteAddress: '远程地址', loadingStatus: '正在读取状态…', loadingRemoteStatus: '正在读取远程状态…',\n generateCopyKey: '生成并复制密钥', copyPairLink: '复制配对链接', managePairedDevices: '管理配对设备', clearAllDevices: '清除所有设备', pairingQr: '配对二维码', remoteIntro: '选择更适合你的远程通道。切换或关闭远程访问不会影响局域网。', httpFrameWarning: '为兼容性允许嵌入 HTTP 页面,但内容未加密,可能被篡改;处理敏感内容请使用 HTTPS。', chooseProvider: '选择连接方式', currentProvider: '当前连接', remoteStateOff: '未启用', remoteStateConnecting: '连接中', remoteStateAttention: '需处理', providerInfoAria: '查看远程连接安全与网络说明', providerGroupAria: '远程连接方式', providerSafeTitle: '你始终可以放心', providerSafeText: '只有已配对设备能进入 DSH。cpolar 按需安装并可彻底清理;Tailscale 在中国大陆网络下可能连接缓慢、中断或无法使用,国内网络建议优先尝试 cpolar。', builtIn: '内置', mainlandPreferred: '国内网络优先', tailscaleDescription: '覆盖更广;中国大陆网络可能不稳定,首次需登录并允许 Funnel。', cpolarDescription: '按需安装官方组件,适合国内网络环境。',\n prepareCpolar: '准备 cpolar', checkingComponent: '正在检查组件…', installOfficial: '安装官方组件', cpolarAccountNote: '登录 cpolar 官网后复制 Authtoken。令牌只保存在本机插件私有目录,不会显示在页面或日志中。', registerCpolar: '注册 cpolar', openDashboard: '打开控制台获取令牌', tokenPlaceholder: '粘贴 cpolar Authtoken', saveConnect: '保存并连接', saving: '正在保存…', componentDetails: '组件来源与清理说明', componentDetailsText: '仅在你点击安装后从 cpolar 官网下载并校验固定版本。不会写入系统服务、开机启动、注册表或 PATH。', pluginPrivateDirectory: '插件私有目录', officialDownload: '官方下载安装页', terms: '服务条款', purgeCpolar: '彻底移除 cpolar 组件与配置', tailscaleHelp: 'Tailscale 使用说明', tailscaleHelpText: '运行组件已随插件提供。首次连接会打开 Tailscale 官方登录和 Funnel 授权页;插件不会接触你的账号密码。', funnelGuideAria: 'Tailscale Funnel 启用步骤', funnelGuideTitle: '远程访问设置 · 第 2 步', funnelGuideSummary: 'Tailscale 登录已完成。还需为这台电脑允许 Funnel,官方页面会同时启用 HTTPS。', funnelStep1: '打开当前节点的 Tailscale 官方授权页。', funnelStep2: '确认启用 Funnel;无需再次登录 DSH。', funnelStep3: '返回 DSH,插件会自动检查并建立连接。', funnelGuideNote: '需要使用 Owner、Admin 或 Network admin 账号。', continueFunnel: '继续完成 Funnel 授权', retryNow: '已完成,立即重试',\n enableRemote: '启用远程访问', disableRemote: '关闭远程访问', continueLogin: '继续登录', reconnect: '重新连接', generateRemoteQr: '生成远程配对二维码', copyRemoteLink: '复制远程配对链接', manageRemoteDevices: '管理远程设备', resetRemoteLogin: '退出并清除远程登录', resetRemoteDevices: '关闭并清除远程设备', lanOn: '局域网访问已开启。', lanOff: '局域网访问已关闭。', enableLan: '开启局域网访问', disableLan: '关闭局域网访问', extensionsLoaded: '扩展:{loaded} 个已加载', extensionsFailed: '扩展:{loaded} 个已加载,{failed} 个加载失败', keyGenerationFailed: '无法生成配对密钥。', keyCopied: '配对密钥已复制,请粘贴到 Android App。', linkCopied: '配对链接已复制,发给手机后 App 粘贴或浏览器打开即可配对。', copySecret: '请复制{kind}:{value}', pairingKey: '配对密钥', pairingLink: '配对链接', noDevices: '暂无配对设备。', noRemoteDevices: '暂无远程配对设备。', device: '设备', expires: '到期 {time}', revoke: '撤销', confirmResetDevices: '确定要移除所有配对设备吗?此操作会立即终止已连接设备。', ready: '已就绪', installed: '已安装', installWithSize: '安装官方组件 · {size} MB',\n cpolarUnsupported: '当前支持 Windows x64 与 Linux x64/arm64。', cpolarNotInstalled: '尚未安装。只有点击下方按钮后,才会从 cpolar 官网下载固定版本。', cpolarNeedsToken: '官方组件 {version} 已校验,下一步只需保存账号令牌。', cpolarReady: '官方组件 {version} 与本机账号配置已就绪。免费临时地址可能在 DSH 或 cpolar 重启后变化;App 无法连接时,请重新扫描当前远程二维码。', remoteOff: '远程访问未启用。局域网访问不受影响。', remoteUnavailableCpolar: 'cpolar 尚未安装或未完成本机账号配置。', remoteUnavailableTailscale: '当前电脑缺少 Funnel 运行组件,请重新安装完整插件包。', remoteStartingCpolar: '正在连接 cpolar 国内节点…', remoteStartingTailscale: '正在启动 Tailscale 安全通道…', remoteNeedsLogin: '需要在浏览器完成一次 Tailscale 登录。插件不会读取你的密码。', remoteConnectingCpolar: '公网地址已分配,正在启动 DSH 认证网关…', remoteConnectingTailscale: '登录完成,正在建立公开 HTTPS 地址…', remoteReady: '远程访问已就绪。只有已配对设备可以进入 DSH。', remoteError: '远程连接未建立。可重新连接,局域网访问仍可正常使用。',\n funnelPermission: '登录已完成。请继续授权 Funnel,完成后会自动建立远程连接。', funnelHttps: '登录已完成。请继续授权 Funnel,官方页面会同时启用 HTTPS。', funnelStart: '登录已完成。请继续完成 Tailscale Funnel 的首次授权。', tailscaleDnsMissing: 'Tailscale 暂未提供远程地址。请重新连接并确认已完成登录。', gatewayStartFailed: '远程网关启动失败。请重新连接,局域网访问不受影响。', controlChannelFailed: '远程组件连接中断。请重新连接。', cpolarMissing: 'cpolar 官方组件尚未安装。请先完成上方准备步骤。', cpolarInvalid: 'cpolar 组件校验失败。请彻底移除后重新安装。', cpolarConfigMissing: 'cpolar 尚未保存账号令牌。请先完成上方准备步骤。', cpolarConfigInvalid: 'cpolar 本机配置无效。请重新保存账号令牌。', cpolarPortUnavailable: '无法分配本机远程网关端口,请重试。', cpolarLaunchFailed: 'cpolar 客户端未能启动。', cpolarTimeout: '连接 cpolar 国内节点超时,请重新连接。', cpolarStopped: 'cpolar 连接已停止。', cpolarExited: 'cpolar 连接意外退出,请重新连接。', cpolarOutputInvalid: 'cpolar 返回了无法识别的状态。', cpolarOriginInvalid: 'cpolar 返回的公网地址未通过校验。', setupOpened: 'Tailscale 官方页面已打开。完成启用后返回 DSH,这里会自动重新连接。',\n switchProviderConfirm: '切换连接方式会先关闭当前远程通道。局域网和配对设备不会受影响,是否继续?', switchingCpolar: '正在切换到 cpolar…', switchingTailscale: '正在切换到 Tailscale Funnel…', installConfirm: '将从 cpolar 官方网站下载并校验固定版本(约 7.3 MB),仅解压到 DSH Mobile 私有目录。不会安装系统服务、写入 PATH/注册表或设置开机启动。是否继续?', downloading: '正在下载并校验…', installingCpolar: '正在安装 cpolar 官方组件。完成前请保持 DSH 运行。', installFailed: '组件安装失败:{error}', invalidToken: '请粘贴 cpolar 控制台提供的完整 Authtoken。', configuredConnecting: '账号配置已保存,正在建立 cpolar 远程通道…', configureFailed: '配置失败:{error}', purgeConfirm: '彻底移除 DSH Mobile 私有目录中的 cpolar 组件、令牌配置和运行日志?不会影响局域网、DSH 数据或系统中的其他程序。', purging: '正在关闭通道并清理 DSH Mobile 管理的 cpolar 文件…', purgeFailed: '清理失败:{error}', reconnectingCpolar: '正在重新连接 cpolar 国内节点…', reconnectingTailscale: '正在确认 Tailscale 设置并重新连接…', remoteQrReady: '远程配对二维码已生成。请在 App 的“远程访问”中扫描。', resetCpolarConfirm: '关闭 cpolar 远程通道并移除所有远程配对设备?不会修改你的 cpolar 账号或其他隧道。', resetTailscaleConfirm: '退出电脑上的 Tailscale 登录并移除所有远程配对设备?局域网配置不会改变。', requestFailed: '请求失败:{error}', wsPathsTitle: '第三方 WebSocket 路径', wsPathsIntro: '插件(如侧边栏终端、实时面板)连不上时,通常是它的连接路径还没放行。下面列出需要处理的项,点「允许」即可。', wsPathsPlaceholder: '/sidebar/ws/terminal', wsPathsAdd: '允许该路径', wsPathsRemove: '移除', wsPathsEmpty: '目前无需任何设置。以后有插件连不上,会在这里出现可一键放行的选项。', wsPathsInvalid: '请输入以 / 开头的确切路径(不带 query)。', wsPathsDetected: '有插件连接被拦截——点「允许」放行', wsPathsAllow: '允许', wsPathsAllowAll: '全部允许', wsPathsGroupMeta: '{n} 条路径 · 共拦截 {m} 次', wsPathsNewBlocked: '发现被拦截的第三方连接,去诊断页查看', wsPathsAdvancedToggle: '手动添加路径(高级)', wsPathsAnnounce: '{n} 条插件连接等待放行', wsPathsAdvancedHint: '通常不需要手动填写:用上方按钮即可。只有当你确切知道所需路径时才填。'\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n lanSetupTitle: 'Finish local network setup', lanSetupIntro: 'Choose the network shared by this computer and your phone. DSH Mobile creates private certificates only after you confirm.', lanSetupNetwork: 'Computer network', lanSetupChooseNetwork: 'Choose a network', lanSetupRecommended: 'Recommended', lanSetupNoNetworks: 'No private Wi-Fi or Ethernet address was found. Connect this computer to the local network, then scan again.', lanSetupRefresh: 'Scan again', lanSetupFirewallNote: 'Windows may request administrator approval for two inbound rules limited to the local subnet.', lanSetupConfigure: 'Configure local network', lanSetupConfiguring: 'Creating private certificates and local network rules…', lanSetupRequired: 'Local network setup has not been completed. Choose a network above to continue.', lanSetupRestart: 'Setup complete for {origin}. Restart DSH once to start local network access.', lanSetupFailed: 'Setup was not completed. Confirm the network selection and approve the Windows prompt, then try again.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n lanSetupTitle: 'Completa la configurazione della rete locale', lanSetupIntro: 'Scegli la rete condivisa da questo computer e dal telefono. DSH Mobile crea certificati privati solo dopo la conferma.', lanSetupNetwork: 'Rete del computer', lanSetupChooseNetwork: 'Scegli una rete', lanSetupRecommended: 'Consigliata', lanSetupNoNetworks: 'Nessun indirizzo Wi-Fi o Ethernet privato trovato. Collega il computer alla rete locale e ripeti la ricerca.', lanSetupRefresh: 'Cerca di nuovo', lanSetupFirewallNote: 'Windows può richiedere l’approvazione amministratore per due regole in ingresso limitate alla sottorete locale.', lanSetupConfigure: 'Configura rete locale', lanSetupConfiguring: 'Creazione dei certificati privati e delle regole di rete locale…', lanSetupRequired: 'La configurazione della rete locale non è completa. Scegli una rete qui sopra per continuare.', lanSetupRestart: 'Configurazione completata per {origin}. Riavvia DSH una volta per attivare l’accesso locale.', lanSetupFailed: 'Configurazione non completata. Controlla la rete e approva la richiesta di Windows, quindi riprova.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n lanSetupTitle: '完成局域网配置', lanSetupIntro: '选择电脑与手机共同使用的网络。确认后才会生成私有证书,不会在安装时自动开放端口。', lanSetupNetwork: '电脑当前网络', lanSetupChooseNetwork: '请选择网络', lanSetupRecommended: '推荐', lanSetupNoNetworks: '未找到可用的私有 Wi-Fi 或以太网地址。请先让电脑接入局域网,然后重新扫描。', lanSetupRefresh: '重新扫描', lanSetupFirewallNote: 'Windows 可能请求管理员授权,仅创建两条限本地子网访问的入站规则。', lanSetupConfigure: '完成配置', lanSetupConfiguring: '正在生成私有证书并配置局域网规则…', lanSetupRequired: '尚未完成局域网配置,请选择上方网络继续。', lanSetupRestart: '已为 {origin} 完成配置。请重启一次 DSH,局域网访问会自动开启。', lanSetupFailed: '配置未完成。请确认网卡选择并允许 Windows 授权提示,然后重试。',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n selfHostedConnections: 'Self-hosted connection', advanced: 'Advanced', frpName: 'Self-hosted FRP', frpDescription: 'A restricted FRP channel for this DSH gateway only. You manage the VPS and public domain.',\n prepareFrp: 'Configure self-hosted FRP', frpStep1Title: '1 · Connection details', frpStep1Text: 'Enter the VPS address, frps control port, shared token, and public HTTPS origin.', frpServerAddress: 'VPS address', frpServerAddressPlaceholder: 'frp.example.com', frpServerPort: 'frps port', frpToken: 'Shared token', frpTokenPlaceholder: 'At least 16 characters', frpPublicOrigin: 'Public HTTPS origin', frpPublicOriginPlaceholder: 'https://dsh.example.com',\n frpStep2Title: '2 · Prepare the VPS', frpStep2Text: 'Copy the restricted frps and Caddy template, then apply it on your VPS.', copyServerTemplate: 'Copy server template', templateCopied: 'Server template copied. Save frps.toml and the Caddy snippet on the VPS, then add the import line to the Caddyfile.', templateCopyFailed: 'Could not copy the template. Check the four fields above.', vpsDeployText: 'Use an existing OpenSSH key or agent. The VPS must be Ubuntu/Debian with systemd; existing Caddy site configuration is never overwritten.', vpsDeployChangesTitle: 'Automatic deployment will change the following on the VPS (manual template changes nothing by itself):', vpsDeployChangePackages: 'Install Caddy from its official APT repository, plus a Python venv and Certbot for public-IPv4 certificates.', vpsDeployChangeServices: 'Create the dsh-mobile system user (only if missing, otherwise kept), the frps config and service, the Caddy snippet plus one import line, and a daily certificate-renewal timer.', vpsDeployChangeFirewall: 'Open the FRP control port, 80/tcp, and 443/tcp in UFW when it is active; other firewalls are left for you to adjust.', vpsDeployChangeManual: 'Manual deployment applies the same steps by hand from the copied template; automatic deployment runs them over SSH after you confirm the host keys.', vpsSshUser: 'SSH user', vpsSshPort: 'SSH port', vpsSshKey: 'Private key path (optional)', vpsSshKeyPlaceholder: 'Uses ssh-agent or ~/.ssh/config when empty', vpsDeploy: 'Deploy frps + Caddy', vpsDeploying: 'Deploying to the VPS. Keep DSH running…', vpsDeploySuccess: 'VPS deployment completed. Start FRP connection to verify the public endpoint.', vpsDeployFailed: 'VPS deployment failed: {error}', vpsDeployNotReady: 'Save the FRP settings before deploying the VPS.', vpsHostKeyFetching: 'Reading the VPS host keys…', vpsHostKeyFailed: 'Could not read the VPS host keys: {error}', vpsDeployConfirmWithKeys: 'Deploy DSH Mobile frps and Caddy to this VPS? Only DSH Mobile service/config files and firewall rules will be created. Existing non-empty Caddy configuration will stop the deployment.\\n\\nThe server presents these host keys. Confirm they match the VPS console before continuing:\\n{fingerprints}', vpsCopyUninstall: 'Copy VPS uninstall script', vpsUninstallScriptCopied: 'Uninstall script copied. Review it before running with root on the VPS.', vpsUninstallScriptFailed: 'Could not build the uninstall script: {error}', vpsUninstall: 'Remove DSH Mobile from the VPS', vpsUninstallConfirmWithKeys: 'Remove all DSH Mobile services, configs, certificates, and owned firewall rules from this VPS? Your own Caddy content and unrelated rules are kept.\\n\\nThe server presents these host keys. Confirm they match the VPS console before continuing:\\n{fingerprints}', vpsUninstalling: 'Removing DSH Mobile from the VPS. Keep DSH running…', vpsUninstallSuccess: 'VPS cleanup completed. The local FRP settings are unchanged.', vpsUninstallFailed: 'VPS cleanup failed: {error}',\n frpStep3Title: '3 · Prepare this computer', frpStep3Text: 'Download and verify the pinned official frpc client only when requested.', installFrpc: 'Install official frpc', frpInstallConfirm: 'Download and verify official frpc 0.70.1 (about {size} MB), extracting only frpc to the DSH Mobile private directory? No service, PATH entry, or startup item is added.', installingFrp: 'Installing the official frpc component. Keep DSH running until it completes.', frpNotInstalled: 'frpc is not installed. Nothing is downloaded until you click Install.', frpUnsupported: 'This desktop platform is not supported by the managed frpc installer.', frpComponentReady: 'Official frpc {version} is verified.',\n frpStep4Title: '4 · Verify and connect', frpStep4Text: 'The plugin starts only its DSH HTTP vhost and verifies the public endpoint belongs to this computer.', frpAppRequirement: 'Custom remote domains require Android app 0.3.3 or later; local network, cpolar, and Tailscale remain compatible with older supported apps.', frpSaveConnect: 'Save and verify connection', frpSavingConnecting: 'Saving the private settings and verifying the complete FRP path…', frpConfigurationReady: 'Server settings are saved. The token remains only in the plugin private directory.', frpConfigurationMissing: 'Complete all fields, copy the VPS template, then save and connect.', frpInputInvalid: 'Check the VPS address, port, HTTPS origin, and token.',\n frpComponentDetails: 'FRP source and complete cleanup', frpComponentDetailsText: 'The pinned client is downloaded from the official fatedier/frp release. DSH Mobile never installs a service or accepts arbitrary FRP configuration.', frpOfficialRelease: 'Official FRP release', purgeFrp: 'Remove FRP component and private configuration', purgeFrpConfirm: 'Stop FRP and remove frpc, the shared token, generated configuration, staging files, and logs owned by DSH Mobile? The VPS is unchanged.', purgingFrp: 'Stopping FRP and removing files managed by DSH Mobile…',\n switchingFrp: 'Switching to self-hosted FRP…', reconnectingFrp: 'Verifying and reconnecting self-hosted FRP…', resetFrpConfirm: 'Disable self-hosted FRP and remove all remote paired devices? The saved VPS settings and server are unchanged.', remoteUnavailableFrp: 'frpc is not installed or the private server settings are incomplete.', remoteStartingFrp: 'Checking the VPS and preparing the restricted FRP channel…', remoteConnectingFrp: 'frpc is running; verifying the public HTTPS endpoint…', frpMissing: 'Install the official frpc component first.', frpInvalid: 'frpc verification failed. Remove it completely and reinstall.', frpConfigMissing: 'Save the self-hosted FRP connection details first.', frpConfigVerifyFailed: 'frpc rejected the generated configuration. Check the server details and token.', frpVhostPublic: 'The VPS plaintext HTTP vhost is publicly reachable. Bind it to 127.0.0.1 and let Caddy provide HTTPS.', frpVhostProbeFailed: 'The VPS address could not be checked. Confirm DNS and retry.', frpLaunchFailed: 'frpc failed to start.', frpTimeout: 'The public endpoint did not become ready. Check frps, Caddy, DNS, and firewall.', frpDiscoveryMismatch: 'The public domain points to another DSH computer. Check the Caddy and frps mappings.', frpDiscoveryInvalid: 'The public domain did not return a valid DSH Mobile discovery response.', frpStopped: 'The FRP connection stopped.', frpExited: 'frpc exited unexpectedly. Check the VPS configuration and reconnect.',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n selfHostedConnections: 'Connessione autogestita', advanced: 'Avanzato', frpName: 'FRP autogestito', frpDescription: 'Canale FRP limitato al solo gateway DSH. VPS e dominio pubblico restano sotto il tuo controllo.',\n prepareFrp: 'Configura FRP autogestito', frpStep1Title: '1 · Dati di connessione', frpStep1Text: 'Inserisci indirizzo VPS, porta di controllo frps, token condiviso e origine HTTPS pubblica.', frpServerAddress: 'Indirizzo VPS', frpServerAddressPlaceholder: 'frp.example.com', frpServerPort: 'Porta frps', frpToken: 'Token condiviso', frpTokenPlaceholder: 'Almeno 16 caratteri', frpPublicOrigin: 'Origine HTTPS pubblica', frpPublicOriginPlaceholder: 'https://dsh.example.com',\n frpStep2Title: '2 · Prepara il VPS', frpStep2Text: 'Copia il modello limitato per frps e Caddy e applicalo sul VPS.', copyServerTemplate: 'Copia modello server', templateCopied: 'Modello server copiato. Salva frps.toml e lo snippet Caddy sul VPS, poi aggiungi la riga import al Caddyfile.', templateCopyFailed: 'Impossibile copiare il modello. Controlla i quattro campi sopra.', vpsDeployText: 'Usa una chiave OpenSSH o un agent esistente. Il VPS deve essere Ubuntu/Debian con systemd; una configurazione Caddy non vuota non viene sovrascritta.', vpsDeployChangesTitle: 'Il deploy automatico modifica quanto segue sul VPS (il modello manuale da solo non cambia nulla):', vpsDeployChangePackages: 'Installa Caddy dal repository APT ufficiale, più un venv Python e Certbot per i certificati IPv4 pubblici.', vpsDeployChangeServices: 'Crea l’utente di sistema dsh-mobile (solo se assente, altrimenti mantenuto), la configurazione e il servizio frps, lo snippet Caddy più una riga import, e un timer giornaliero di rinnovo certificati.', vpsDeployChangeFirewall: 'Apre la porta di controllo FRP, 80/tcp e 443/tcp in UFW quando attivo; gli altri firewall restano a tuo carico.', vpsDeployChangeManual: 'Il deploy manuale applica gli stessi passi a mano dal modello copiato; quello automatico li esegue via SSH dopo la conferma delle chiavi host.', vpsSshUser: 'Utente SSH', vpsSshPort: 'Porta SSH', vpsSshKey: 'Percorso chiave privata (opzionale)', vpsSshKeyPlaceholder: 'Usa ssh-agent o ~/.ssh/config se vuoto', vpsDeploy: 'Installa frps + Caddy', vpsDeploying: 'Deploy sul VPS in corso. Mantieni DSH attivo…', vpsDeploySuccess: 'Deploy VPS completato. Avvia FRP per verificare l’endpoint pubblico.', vpsDeployFailed: 'Deploy VPS fallito: {error}', vpsDeployNotReady: 'Salva le impostazioni FRP prima del deploy VPS.', vpsHostKeyFetching: 'Lettura delle chiavi host del VPS…', vpsHostKeyFailed: 'Impossibile leggere le chiavi host del VPS: {error}', vpsDeployConfirmWithKeys: 'Installare frps e Caddy DSH Mobile su questo VPS? Verranno creati solo file di servizio/configurazione e regole firewall DSH Mobile. Una configurazione Caddy esistente non vuota interromperà il deploy.\\n\\nIl server presenta queste chiavi host. Verifica che corrispondano alla console del VPS prima di continuare:\\n{fingerprints}', vpsCopyUninstall: 'Copia script di disinstallazione VPS', vpsUninstallScriptCopied: 'Script di disinstallazione copiato. Controllalo prima di eseguirlo come root sul VPS.', vpsUninstallScriptFailed: 'Impossibile creare lo script di disinstallazione: {error}', vpsUninstall: 'Rimuovi DSH Mobile dal VPS', vpsUninstallConfirmWithKeys: 'Rimuovere tutti i servizi, le configurazioni, i certificati e le regole firewall di DSH Mobile da questo VPS? I tuoi contenuti Caddy e le altre regole restano invariati.\\n\\nIl server presenta queste chiavi host. Verifica che corrispondano alla console del VPS prima di continuare:\\n{fingerprints}', vpsUninstalling: 'Rimozione di DSH Mobile dal VPS. Mantieni DSH attivo…', vpsUninstallSuccess: 'Pulizia VPS completata. Le impostazioni FRP locali restano invariate.', vpsUninstallFailed: 'Pulizia VPS fallita: {error}',\n frpStep3Title: '3 · Prepara questo computer', frpStep3Text: 'Scarica e verifica il client frpc ufficiale fissato solo su richiesta.', installFrpc: 'Installa frpc ufficiale', frpInstallConfirm: 'Scaricare e verificare frpc ufficiale 0.70.1 (circa {size} MB), estraendo solo frpc nella directory privata DSH Mobile? Non vengono aggiunti servizi, PATH o avvio automatico.', installingFrp: 'Installazione del componente frpc ufficiale. Mantieni DSH in esecuzione.', frpNotInstalled: 'frpc non è installato. Non viene scaricato nulla finché non scegli Installa.', frpUnsupported: 'Questa piattaforma desktop non è supportata dal programma di installazione gestito.', frpComponentReady: 'frpc ufficiale {version} verificato.',\n frpStep4Title: '4 · Verifica e connetti', frpStep4Text: 'Il plugin avvia solo il vhost HTTP DSH e verifica che l’endpoint pubblico appartenga a questo computer.', frpAppRequirement: 'I domini remoti personalizzati richiedono l’app Android 0.3.3 o successiva; rete locale, cpolar e Tailscale restano compatibili con le app precedenti supportate.', frpSaveConnect: 'Salva e verifica connessione', frpSavingConnecting: 'Salvataggio privato e verifica del percorso FRP completo…', frpConfigurationReady: 'Impostazioni server salvate. Il token resta solo nella directory privata del plugin.', frpConfigurationMissing: 'Completa i campi, copia il modello VPS, quindi salva e connetti.', frpInputInvalid: 'Controlla indirizzo VPS, porta, origine HTTPS e token.',\n frpComponentDetails: 'Origine FRP e rimozione completa', frpComponentDetailsText: 'Il client fissato viene scaricato dalla release ufficiale fatedier/frp. DSH Mobile non installa servizi e non accetta configurazioni FRP arbitrarie.', frpOfficialRelease: 'Release FRP ufficiale', purgeFrp: 'Rimuovi componente FRP e configurazione privata', purgeFrpConfirm: 'Arrestare FRP e rimuovere frpc, token, configurazione, file temporanei e log gestiti da DSH Mobile? Il VPS non viene modificato.', purgingFrp: 'Arresto FRP e rimozione dei file gestiti da DSH Mobile…',\n switchingFrp: 'Passaggio a FRP autogestito…', reconnectingFrp: 'Verifica e riconnessione FRP autogestito…', resetFrpConfirm: 'Disattivare FRP autogestito e rimuovere tutti i dispositivi remoti? Impostazioni VPS e server restano invariati.', remoteUnavailableFrp: 'frpc non è installato o le impostazioni private sono incomplete.', remoteStartingFrp: 'Controllo VPS e preparazione del canale FRP limitato…', remoteConnectingFrp: 'frpc è in esecuzione; verifica dell’endpoint HTTPS pubblico…', frpMissing: 'Installa prima il componente frpc ufficiale.', frpInvalid: 'Verifica frpc non riuscita. Rimuovilo e reinstallalo.', frpConfigMissing: 'Salva prima i dati della connessione FRP.', frpConfigVerifyFailed: 'frpc ha rifiutato la configurazione generata. Controlla server e token.', frpVhostPublic: 'Il vhost HTTP in chiaro è raggiungibile pubblicamente. Limitalo a 127.0.0.1 e usa Caddy per HTTPS.', frpVhostProbeFailed: 'Impossibile controllare il VPS. Verifica il DNS e riprova.', frpLaunchFailed: 'Avvio di frpc non riuscito.', frpTimeout: 'Endpoint pubblico non pronto. Controlla frps, Caddy, DNS e firewall.', frpDiscoveryMismatch: 'Il dominio pubblico punta a un altro computer DSH. Controlla Caddy e frps.', frpDiscoveryInvalid: 'Il dominio pubblico non ha restituito una risposta DSH Mobile valida.', frpStopped: 'Connessione FRP arrestata.', frpExited: 'frpc è terminato inaspettatamente. Controlla il VPS e riconnettiti.',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n selfHostedConnections: '自建连接', advanced: '高级', frpName: '自建 FRP', frpDescription: '只为当前 DSH 网关建立单用途 FRP 通道,VPS 和公开入口由你掌控。',\n prepareFrp: '配置自建 FRP', frpStep1Title: '1 · 连接信息', frpStep1Text: '填写中转服务器地址、frps 控制端口、共享 Token 和手机访问地址。没有域名时,可直接使用公网 IPv4。', frpServerAddress: '中转服务器地址', frpServerAddressPlaceholder: '203.0.113.10', frpServerPort: 'frps 控制端口', frpToken: '共享 Token', frpTokenPlaceholder: '已保存时可留空;新建至少 16 个字符', frpPublicOrigin: '手机访问地址(HTTPS)', frpPublicOriginPlaceholder: 'https://203.0.113.10',\n frpStep2Title: '2 · 部署中转服务器', frpStep2Text: '推荐通过 SSH 一键部署。需要手动操作时,也可以复制受限的 frps 与 Caddy 配置模板。', copyServerTemplate: '复制手动部署模板', templateCopied: '服务器模板已复制,请在 VPS 上保存 frps.toml 和 Caddy 片段,并在 Caddyfile 里加一行 import。', templateCopyFailed: '无法复制模板,请检查上方连接信息。', vpsDeployText: '填写 SSH 登录信息。服务器需为带 systemd 的 Ubuntu/Debian;不会覆盖已有的 Caddy 站点配置。', vpsDeployChangesTitle: '自动部署会在 VPS 上做这些改动(只复制手动模板不会改变任何东西):', vpsDeployChangePackages: '从官方 APT 源安装 Caddy,并安装 Python venv 与 Certbot(公网 IP 证书用)。', vpsDeployChangeServices: '创建 dsh-mobile 系统用户(如已存在则复用,卸载时保留)、frps 配置与服务、Caddy 片段加一行 import,以及每天自动续证书的定时器。', vpsDeployChangeFirewall: 'UFW 开启时放行 FRP 控制端口、80/tcp 和 443/tcp;其他防火墙需要你自己放行。', vpsDeployChangeManual: '手动部署是照着复制的模板一步步自己操作;自动部署是在你确认主机指纹后通过 SSH 执行同样的步骤。', vpsSshUser: 'SSH 用户', vpsSshPort: 'SSH 端口', vpsSshKey: '私钥文件路径(可选)', vpsSshKeyPlaceholder: '留空则使用 ssh-agent 或 SSH 配置', vpsDeploy: '一键部署 frps + Caddy', vpsDeploying: '正在部署中转服务器,请保持 DSH 运行…', vpsDeploySuccess: '中转服务器部署完成,请继续完成本机组件安装和连接验证。', vpsDeployFailed: 'VPS 部署失败:{error}', vpsDeployNotReady: '请先填写完整的连接信息。', vpsHostKeyFetching: '正在读取中转服务器的主机指纹…', vpsHostKeyFailed: '读取中转服务器主机指纹失败:{error}', vpsDeployConfirmWithKeys: '要在这台 VPS 上部署 DSH Mobile 的 frps 和 Caddy 吗?只会创建 DSH Mobile 自己的服务、配置和防火墙规则;如果已有非空 Caddy 配置,部署会停止并保留原配置。\\n\\n服务器当前的主机指纹如下,请先到 VPS 控制台核对一致后再继续:\\n{fingerprints}', vpsCopyUninstall: '复制 VPS 卸载脚本', vpsUninstallScriptCopied: '卸载脚本已复制,请审阅后再以 root 身份在 VPS 上执行。', vpsUninstallScriptFailed: '生成卸载脚本失败:{error}', vpsUninstall: '清理 VPS 上的 DSH Mobile', vpsUninstallConfirmWithKeys: '要删除这台 VPS 上的 DSH Mobile 服务、配置、证书和专属防火墙规则吗?你自己的 Caddy 内容和其他规则会保留。\\n\\n服务器当前的主机指纹如下,请先到 VPS 控制台核对一致后再继续:\\n{fingerprints}', vpsUninstalling: '正在清理 VPS 上的 DSH Mobile,请保持 DSH 运行…', vpsUninstallSuccess: 'VPS 清理完成,本机 FRP 设置保持不变。', vpsUninstallFailed: 'VPS 清理失败:{error}',\n frpStep3Title: '3 · 安装本机组件', frpStep3Text: '下载并校验固定版本的官方 frpc,只安装到 DSH Mobile 私有目录。', installFrpc: '安装官方 frpc', frpInstallConfirm: '从 FRP 官方 Release 下载并校验 frpc 0.70.1(约 {size} MB),只提取 frpc 到 DSH Mobile 私有目录?不会安装服务、写入 PATH 或设置开机启动。', installingFrp: '正在安装官方 frpc,完成前请保持 DSH 运行。', frpNotInstalled: 'frpc 尚未安装;点击下方按钮后才会开始下载。', frpUnsupported: '当前桌面平台暂不支持托管安装 frpc。', frpComponentReady: '官方 frpc {version} 已安装并通过校验。',\n frpStep4Title: '4 · 启用并验证', frpStep4Text: '保存配置、启动受限的 FRP 通道,并确认手机访问地址确实连接到这台电脑。', frpAppRequirement: '通过自定义域名或公网 IP 连接,需要 Android App 0.3.3 或更高版本。局域网、cpolar 和 Tailscale 不受影响。', frpSaveConnect: '保存配置并验证连接', frpSavingConnecting: '正在保存私有配置并验证完整 FRP 链路…', frpConfigurationReady: '连接配置已安全保存', frpConfigurationMissing: '请按顺序完成连接信息、服务器部署和本机组件安装。', frpInputInvalid: '请检查服务器地址、控制端口、手机访问地址和共享 Token。',\n frpComponentDetails: 'FRP 来源与彻底清理', frpComponentDetailsText: '固定版本客户端来自 fatedier/frp 官方 Release。DSH Mobile 不安装系统服务,也不接受任意 FRP 配置。', frpOfficialRelease: 'FRP 官方 Release', purgeFrp: '彻底移除 FRP 组件与私有配置', purgeFrpConfirm: '关闭 FRP 并移除 DSH Mobile 管理的 frpc、共享 Token、生成配置、临时文件和日志?不会修改 VPS。', purgingFrp: '正在关闭 FRP 并清理 DSH Mobile 管理的文件…',\n switchingFrp: '正在切换到自建 FRP…', reconnectingFrp: '正在验证并重新连接自建 FRP…', resetFrpConfirm: '关闭自建 FRP 并移除所有远程配对设备?已保存的 VPS 配置和服务器不会改变。', remoteUnavailableFrp: 'frpc 尚未安装或私有服务器配置不完整。', remoteStartingFrp: '正在检查 VPS 并准备受限 FRP 通道…', remoteConnectingFrp: 'frpc 已启动,正在验证公网 HTTPS 端点…', frpMissing: '请先安装官方 frpc。', frpInvalid: 'frpc 校验失败,请彻底清理后重新安装。', frpConfigMissing: '请先保存自建 FRP 连接信息。', frpConfigVerifyFailed: 'frpc 拒绝了生成的配置,请检查服务器信息和 Token。', frpVhostPublic: 'VPS 明文 HTTP vhost 可被公网访问。请将其限制到 127.0.0.1,并由 Caddy 提供 HTTPS。', frpVhostProbeFailed: '无法检查 VPS 地址,请确认 DNS 后重试。', frpLaunchFailed: 'frpc 未能启动。', frpTimeout: '公网端点未能就绪,请检查 frps、Caddy、DNS 和防火墙。', frpDiscoveryMismatch: '公开域名连接到了另一台 DSH 电脑,请检查 Caddy 与 frps 映射。', frpDiscoveryInvalid: '公开域名没有返回有效的 DSH Mobile 发现信息。', frpStopped: 'FRP 连接已停止。', frpExited: 'frpc 意外退出,请检查 VPS 配置后重新连接。',\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n requestTimeout: 'The operation timed out. Confirm that DSH is still running, then try again.',\n diagnostics: 'Diagnostics', openDiagnostics: 'Open connection diagnostics', back: 'Back', backToMobile: 'Back to Mobile access', connectionDiagnostics: 'Connection diagnostics',\n diagnosticsIntro: 'Check versions, gateway, network adapter, firewall, and remote channel. The report is automatically redacted and never reads conversations or credentials.',\n diagnosticsNotRun: 'Not checked yet', diagnosticsStartHint: 'Select the button below to begin.', diagnosticsIdleMeta: 'Waiting to run · connection status only', diagnosticsStart: 'Start check', diagnosticsCopy: 'Copy redacted report', diagnosticsAdvanced: 'Advanced diagnostic details',\n diagnosticsComplete: 'Check complete', diagnosticsAttention: 'Some items need attention', diagnosticsProblem: 'Connection problems found', diagnosticsCompleteFallback: 'The check is complete.',\n diagnosticStatusOk: 'OK', diagnosticStatusWarning: 'Attention', diagnosticStatusError: 'Problem', diagnosticStatusInfo: 'Info', diagnosticItems: '{count} items', diagnosticCheck: 'Check', diagnosticAction: 'Suggested action',\n diagnosticNeedsAction: 'Needs action', diagnosticDetails: 'Check details', diagnosticOther: 'Other checks', diagnosticNoBlockers: '{count} checks · no blocking issues found', diagnosticNeedsCount: '{count} checks · {issues} need attention',\n diagnosticsChecking: 'Checking…', diagnosticsCheckingTitle: 'Checking connection', diagnosticsCheckingText: 'This usually takes a few seconds. The remote channel performs a real reachability test.', diagnosticsRunningMeta: 'Running · keep DSH online',\n diagnosticsIncomplete: 'Check not completed', diagnosticsReadFailed: 'Could not read diagnostics: {error}', diagnosticsUnavailable: 'Diagnostics service unavailable · try again later', diagnosticsRetry: 'Check again', diagnosticsCopied: 'Redacted report copied. You can paste it directly into an issue.', diagnosticsCopyManual: 'Clipboard access was denied. Details are expanded for manual copying.',\n diagnosticLabelVersions: 'Version compatibility', diagnosticLabelNetwork: 'Local network adapter', diagnosticLabelLan: 'Local network gateway', diagnosticLabelFirewall: 'Windows Firewall', diagnosticLabelRemote: 'Remote channel', diagnosticLabelPhone: 'Phone network',\n funnelTimeout: 'The Tailscale component timed out while starting. Check the network, then reconnect.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n requestTimeout: 'Operazione scaduta. Verifica che DSH sia ancora in esecuzione e riprova.',\n diagnostics: 'Diagnostica', openDiagnostics: 'Apri diagnostica connessione', back: 'Indietro', backToMobile: 'Torna ad Accesso mobile', connectionDiagnostics: 'Diagnostica connessione',\n diagnosticsIntro: 'Controlla versioni, gateway, scheda di rete, firewall e canale remoto. Il report viene anonimizzato automaticamente e non legge conversazioni o credenziali.',\n diagnosticsNotRun: 'Controllo non eseguito', diagnosticsStartHint: 'Premi il pulsante sotto per iniziare.', diagnosticsIdleMeta: 'In attesa · solo stato connessione', diagnosticsStart: 'Avvia controllo', diagnosticsCopy: 'Copia report anonimizzato', diagnosticsAdvanced: 'Dettagli diagnostici avanzati',\n diagnosticsComplete: 'Controllo completato', diagnosticsAttention: 'Alcuni elementi richiedono attenzione', diagnosticsProblem: 'Rilevati problemi di connessione', diagnosticsCompleteFallback: 'Controllo completato.',\n diagnosticStatusOk: 'OK', diagnosticStatusWarning: 'Attenzione', diagnosticStatusError: 'Problema', diagnosticStatusInfo: 'Informazione', diagnosticItems: '{count} elementi', diagnosticCheck: 'Controllo', diagnosticAction: 'Suggerimento',\n diagnosticNeedsAction: 'Da risolvere', diagnosticDetails: 'Dettagli controllo', diagnosticOther: 'Altri controlli', diagnosticNoBlockers: '{count} controlli · nessun problema bloccante', diagnosticNeedsCount: '{count} controlli · {issues} richiedono attenzione',\n diagnosticsChecking: 'Controllo…', diagnosticsCheckingTitle: 'Controllo connessione', diagnosticsCheckingText: 'Di solito richiede pochi secondi. Il canale remoto esegue un test reale di raggiungibilità.', diagnosticsRunningMeta: 'In esecuzione · mantieni DSH online',\n diagnosticsIncomplete: 'Controllo non completato', diagnosticsReadFailed: 'Impossibile leggere la diagnostica: {error}', diagnosticsUnavailable: 'Servizio diagnostico non disponibile · riprova più tardi', diagnosticsRetry: 'Ripeti controllo', diagnosticsCopied: 'Report anonimizzato copiato. Puoi incollarlo direttamente in una issue.', diagnosticsCopyManual: 'Il browser ha negato la copia. I dettagli sono stati aperti per la copia manuale.',\n diagnosticLabelVersions: 'Compatibilità versioni', diagnosticLabelNetwork: 'Scheda rete locale', diagnosticLabelLan: 'Gateway rete locale', diagnosticLabelFirewall: 'Windows Firewall', diagnosticLabelRemote: 'Canale remoto', diagnosticLabelPhone: 'Rete telefono',\n funnelTimeout: 'Avvio del componente Tailscale scaduto. Controlla la rete e riconnettiti.',\n})\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n requestTimeout: '操作超时,请确认 DSH 仍在运行后重试。',\n diagnostics: '诊断', openDiagnostics: '打开连接诊断', back: '返回', backToMobile: '返回移动访问', connectionDiagnostics: '连接诊断',\n diagnosticsIntro: '检查版本、网关、网卡、防火墙和远程通道。报告自动脱敏,不读取对话或凭据。', diagnosticsNotRun: '尚未检查', diagnosticsStartHint: '点击下方按钮开始。', diagnosticsIdleMeta: '等待运行 · 仅收集连接状态', diagnosticsStart: '开始检查', diagnosticsCopy: '复制脱敏报告', diagnosticsAdvanced: '高级诊断详情',\n diagnosticsComplete: '检查完成', diagnosticsAttention: '有项目需要留意', diagnosticsProblem: '发现连接问题', diagnosticsCompleteFallback: '检查已完成。', diagnosticStatusOk: '正常', diagnosticStatusWarning: '注意', diagnosticStatusError: '问题', diagnosticStatusInfo: '说明', diagnosticItems: '{count} 项', diagnosticCheck: '检查项', diagnosticAction: '建议', diagnosticNeedsAction: '需要处理', diagnosticDetails: '检查详情', diagnosticOther: '其他检查', diagnosticNoBlockers: '{count} 项检查 · 未发现阻断问题', diagnosticNeedsCount: '{count} 项检查 · {issues} 项需要处理',\n diagnosticsChecking: '正在检查…', diagnosticsCheckingTitle: '正在检查连接', diagnosticsCheckingText: '通常几秒内完成。远程通道会执行一次真实可达性测试。', diagnosticsRunningMeta: '正在运行 · 请保持 DSH 在线', diagnosticsIncomplete: '检查未完成', diagnosticsReadFailed: '无法读取诊断结果:{error}', diagnosticsUnavailable: '诊断服务暂不可用 · 请稍后重试', diagnosticsRetry: '重新检查', diagnosticsCopied: '脱敏报告已复制,可直接粘贴到 Issue。', diagnosticsCopyManual: '浏览器未允许复制,已展开详情,请手动复制。',\n diagnosticLabelVersions: '版本兼容', diagnosticLabelNetwork: '局域网网卡', diagnosticLabelLan: '局域网网关', diagnosticLabelFirewall: 'Windows 防火墙', diagnosticLabelRemote: '远程通道', diagnosticLabelPhone: '手机网络', funnelTimeout: 'Tailscale 组件启动超时,请检查网络后重新连接。',\n})\n\nexport const LOCALIZED_DIAGNOSTIC_COPY = {\n en: {\n versions: 'Installed plugin, DSH, and minimum Android app versions are shown.',\n networkOk: 'The configured local network adapter is available.', networkError: 'The saved local network adapter is unavailable.', networkInfo: 'A fixed local network configuration is in use.', networkAction: 'Run dsh-mobile setup again.',\n lanOk: 'The local gateway is listening and pairing is available.', lanInfo: 'Local network access is currently off.', lanAction: 'Enable local network access when the phone must connect directly.',\n firewallOk: 'Local TCP and discovery firewall rules are enabled.', firewallWarning: 'The complete local network firewall rules were not found.', firewallInfo: 'The system did not allow the plugin to read firewall status.', firewallAction: 'Run dsh-mobile setup as administrator and check the firewall rules.',\n remoteOk: 'The remote public address passed the reachability check.', remoteWarning: 'The remote channel needs attention or is still connecting.', remoteError: 'The remote connection is not currently reachable.', remoteInfo: 'Remote access is currently off.', remoteAction: 'Return to Remote access, follow the provider guidance, and reconnect.',\n phone: 'The computer cannot determine whether the router isolates the phone.', phoneAction: 'Confirm the phone and computer use the same network, then disable guest-network or AP isolation.',\n reportTitle: 'DSH Mobile diagnostic report', generated: 'Generated',\n },\n it: {\n versions: 'Sono indicate le versioni installate di plugin e DSH e la versione minima dell’app Android.',\n networkOk: 'La scheda di rete locale configurata è disponibile.', networkError: 'La scheda di rete locale salvata non è disponibile.', networkInfo: 'È in uso una configurazione di rete locale fissa.', networkAction: 'Esegui di nuovo dsh-mobile setup.',\n lanOk: 'Il gateway locale è in ascolto e l’abbinamento è disponibile.', lanInfo: 'L’accesso dalla rete locale è disattivato.', lanAction: 'Attiva l’accesso locale quando il telefono deve collegarsi direttamente.',\n firewallOk: 'Le regole firewall TCP locale e di rilevamento sono attive.', firewallWarning: 'Le regole firewall complete per la rete locale non sono state trovate.', firewallInfo: 'Il sistema non ha consentito al plugin di leggere lo stato del firewall.', firewallAction: 'Esegui dsh-mobile setup come amministratore e controlla le regole firewall.',\n remoteOk: 'L’indirizzo pubblico remoto ha superato il test di raggiungibilità.', remoteWarning: 'Il canale remoto richiede attenzione o è ancora in connessione.', remoteError: 'La connessione remota non è al momento raggiungibile.', remoteInfo: 'L’accesso remoto è disattivato.', remoteAction: 'Torna ad Accesso remoto, segui le indicazioni del provider e riconnettiti.',\n phone: 'Il computer non può stabilire se il router isola il telefono.', phoneAction: 'Verifica che telefono e computer usino la stessa rete, poi disattiva rete ospiti o isolamento AP.',\n reportTitle: 'Report diagnostico DSH Mobile', generated: 'Generato',\n },\n zh: {\n versions: '已显示插件、DSH 和 Android App 最低版本。',\n networkOk: '已配置的局域网网卡可用。', networkError: '已保存的局域网网卡不可用。', networkInfo: '当前使用固定局域网配置。', networkAction: '重新运行 dsh-mobile setup。',\n lanOk: '局域网网关正在监听,配对入口可用。', lanInfo: '局域网访问当前未开启。', lanAction: '需要手机直连时开启局域网访问。',\n firewallOk: '局域网 TCP 与发现防火墙规则已启用。', firewallWarning: '未找到完整的局域网防火墙规则。', firewallInfo: '系统未允许插件读取防火墙状态。', firewallAction: '以管理员身份运行 dsh-mobile setup 并检查防火墙规则。',\n remoteOk: '远程公网地址已通过可达性检查。', remoteWarning: '远程通道需要处理或仍在连接。', remoteError: '远程连接当前不可达。', remoteInfo: '远程访问当前未开启。', remoteAction: '返回远程访问,按提供方提示操作并重新连接。',\n phone: '电脑无法判断路由器是否隔离了手机。', phoneAction: '确认手机与电脑使用同一网络,并关闭访客网络或 AP 隔离。',\n reportTitle: 'DSH Mobile 诊断报告', generated: '生成时间',\n },\n} satisfies Record<MobileControlLocale, {\n versions: string\n networkOk: string\n networkError: string\n networkInfo: string\n networkAction: string\n lanOk: string\n lanInfo: string\n lanAction: string\n firewallOk: string\n firewallWarning: string\n firewallInfo: string\n firewallAction: string\n remoteOk: string\n remoteWarning: string\n remoteError: string\n remoteInfo: string\n remoteAction: string\n phone: string\n phoneAction: string\n reportTitle: string\n generated: string\n}>\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n selfHostedDescription: \"Use your own VPS or HTTPS reverse proxy without a public tunnel service.\",\n originName: \"Own reverse proxy\",\n originDescription: \"You manage HTTPS. DSH Mobile provides a private, authenticated HTTP backend; no tunnel component is installed.\",\n prepareOrigin: \"Connect your HTTPS reverse proxy\",\n originPublicOrigin: \"Public HTTPS address\",\n originListenHost: \"Private listen IPv4\",\n originListenPort: \"HTTP backend port\",\n originAllowedCidrs: \"Allowed proxy source CIDRs\",\n originHelp: \"Same computer: use 127.0.0.1. For a proxy on another LAN device, use this computer’s private IPv4 and allow only the proxy’s direct source IPv4/32. Separate CIDRs with spaces or commas.\",\n originWarning: \"Keep this HTTP backend private. Never expose or port-forward it to the Internet. Your proxy must terminate HTTPS and preserve the external Host, including its port, and WebSocket upgrades.\",\n originSaveStart: \"Save and start backend\",\n originBackendSaved: \"Saved HTTP backend (not running)\",\n originBackendListening: \"Listening HTTP backend\",\n originCopyBackend: \"Copy backend address\",\n originBackendCopied: \"HTTP backend address copied.\",\n originPurge: \"Clear proxy settings\",\n originPurgeConfirm: \"Stop this private HTTP backend and delete only its reverse-proxy settings? Paired remote devices, LAN access, and other providers are kept.\",\n originPurged: \"The backend is stopped and its proxy settings are cleared. Paired devices are kept.\",\n originSaving: \"Saving settings and starting the private backend…\",\n originPurging: \"Stopping the backend and clearing its settings…\",\n originBackendReady: \"Backend listening\",\n originReady: \"The private HTTP backend is listening. Public HTTPS, its certificate, and WebSocket connectivity have NOT been verified. Test the public address from your phone before relying on it.\",\n originUnavailable: \"Configure the public HTTPS address and private backend first.\",\n originStarting: \"Starting the private HTTP backend…\",\n switchingOrigin: \"Switching to your own reverse proxy…\",\n reconnectingOrigin: \"Restarting the private HTTP backend…\",\n resetOriginConfirm: \"Stop this backend and reset remote pairing? All paired remote devices must pair again. Reverse-proxy settings and LAN devices are kept.\",\n originPublicOriginInvalid: \"Enter a public HTTPS origin only, such as https://phone.example.com:8815; no path, query, credentials, or private address.\",\n originListenHostInvalid: \"Use an explicit loopback or private IPv4 address on this computer, not 0.0.0.0 or a public address.\",\n originListenPortInvalid: \"Use a whole-number port from 1024 to 65535; lower ports need privileges the plugin does not have.\",\n originListenPortReserved: \"Port 3443 belongs to the LAN gateway and port 3080 to DSH itself, so both are always taken. Choose another port, such as 3444 or 3445.\",\n originAllowedCidrsInvalid: \"Allow 1–16 valid loopback/private IPv4 CIDRs with no host bits. For a LAN listener, include the actual proxy source IPv4/32; public ranges are not accepted.\",\n originSettingsInvalid: \"The reverse-proxy settings are invalid. Check the four fields and save again.\",\n originConfigMissing: \"Save the reverse-proxy settings before starting the backend.\",\n originConfigInvalid: \"The saved settings are invalid. Correct and save them again, or clear only these settings.\",\n originPortInUse: \"The backend port is already in use. Stop the conflicting listener or choose another port. Note that 3443, 3080, and a port already used by a cloudflared tunnel are never free.\",\n originAddressUnavailable: \"The listen address is not available on this computer. Choose its current private IPv4.\",\n originStartFailed: \"The private backend could not start. Check its address, port, permissions, and local logs.\",\n originConfigTargetInvalid: \"The saved proxy settings file is not a regular file. Remove it and save the settings again.\",\n originControllerUnavailable: \"The reverse-proxy provider is not available in this session. Restart DSH and try again.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n selfHostedDescription: \"Usa il tuo VPS o reverse proxy HTTPS senza un servizio di tunnel pubblico.\",\n originName: \"Reverse proxy proprio\",\n originDescription: \"Gestisci tu HTTPS. DSH Mobile offre un backend HTTP privato con autenticazione; non installa componenti tunnel.\",\n prepareOrigin: \"Collega il tuo reverse proxy HTTPS\",\n originPublicOrigin: \"Indirizzo HTTPS pubblico\",\n originListenHost: \"IPv4 privato di ascolto\",\n originListenPort: \"Porta backend HTTP\",\n originAllowedCidrs: \"CIDR sorgente del proxy consentiti\",\n originHelp: \"Stesso computer: usa 127.0.0.1. Per un proxy su un altro dispositivo LAN, usa l’IPv4 privato di questo computer e consenti solo l’IPv4 sorgente diretta del proxy con /32. Separa i CIDR con spazi o virgole.\",\n originWarning: \"Mantieni privato il backend HTTP. Non esporlo né inoltrarne la porta su Internet. Il proxy deve terminare HTTPS e conservare l’Host esterno, inclusa la porta, e gli upgrade WebSocket.\",\n originSaveStart: \"Salva e avvia backend\",\n originBackendSaved: \"Backend HTTP salvato (non attivo)\",\n originBackendListening: \"Backend HTTP in ascolto\",\n originCopyBackend: \"Copia indirizzo backend\",\n originBackendCopied: \"Indirizzo backend HTTP copiato.\",\n originPurge: \"Cancella impostazioni proxy\",\n originPurgeConfirm: \"Fermare questo backend HTTP privato ed eliminare solo le sue impostazioni reverse proxy? Dispositivi remoti abbinati, accesso LAN e altri provider vengono conservati.\",\n originPurged: \"Backend fermato e impostazioni proxy cancellate. I dispositivi abbinati sono conservati.\",\n originSaving: \"Salvataggio impostazioni e avvio del backend privato…\",\n originPurging: \"Arresto del backend e cancellazione impostazioni…\",\n originBackendReady: \"Backend in ascolto\",\n originReady: \"Il backend HTTP privato è in ascolto. HTTPS pubblico, certificato e connettività WebSocket NON sono stati verificati. Prova l’indirizzo pubblico dal telefono prima di usarlo.\",\n originUnavailable: \"Configura prima l’indirizzo HTTPS pubblico e il backend privato.\",\n originStarting: \"Avvio del backend HTTP privato…\",\n switchingOrigin: \"Passaggio al reverse proxy proprio…\",\n reconnectingOrigin: \"Riavvio del backend HTTP privato…\",\n resetOriginConfirm: \"Fermare il backend e reimpostare gli abbinamenti remoti? Tutti i dispositivi remoti dovranno essere abbinati di nuovo. Le impostazioni proxy e i dispositivi LAN vengono conservati.\",\n originPublicOriginInvalid: \"Inserisci solo un’origine HTTPS pubblica, ad esempio https://phone.example.com:8815, senza percorso, query, credenziali o indirizzo privato.\",\n originListenHostInvalid: \"Usa un IPv4 loopback o privato esplicito di questo computer, non 0.0.0.0 né un indirizzo pubblico.\",\n originListenPortInvalid: \"Usa una porta intera da 1024 a 65535; le porte più basse richiedono privilegi che il plugin non ha.\",\n originListenPortReserved: \"La porta 3443 appartiene al gateway LAN e la 3080 a DSH stesso, quindi sono sempre occupate. Scegli un’altra porta, ad esempio 3444 o 3445.\",\n originAllowedCidrsInvalid: \"Consenti 1–16 CIDR IPv4 loopback/privati validi senza bit host. Per l’ascolto LAN includi l’IPv4 sorgente reale del proxy con /32; le reti pubbliche non sono ammesse.\",\n originSettingsInvalid: \"Impostazioni reverse proxy non valide. Controlla i quattro campi e salva di nuovo.\",\n originConfigMissing: \"Salva le impostazioni reverse proxy prima di avviare il backend.\",\n originConfigInvalid: \"Impostazioni salvate non valide. Correggile e salvale di nuovo, oppure cancella solo queste impostazioni.\",\n originPortInUse: \"La porta backend è già occupata. Ferma il processo in conflitto o scegli un’altra porta. 3443, 3080 e una porta già usata da un tunnel cloudflared non sono mai libere.\",\n originAddressUnavailable: \"L’indirizzo di ascolto non è disponibile su questo computer. Scegli il suo IPv4 privato attuale.\",\n originStartFailed: \"Impossibile avviare il backend privato. Controlla indirizzo, porta, permessi e log locali.\",\n originConfigTargetInvalid: \"Il file delle impostazioni proxy salvato non è un file regolare. Rimuovilo e salva di nuovo le impostazioni.\",\n originControllerUnavailable: \"Il provider reverse proxy non è disponibile in questa sessione. Riavvia DSH e riprova.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n selfHostedDescription: \"使用自己的 VPS 或 HTTPS 反向代理,不依赖公共隧道服务。\",\n originName: \"自有反向代理\",\n originDescription: \"HTTPS 由你管理,插件提供带认证的私有 HTTP 后端,无需安装隧道组件。\",\n prepareOrigin: \"接入自有 HTTPS 反向代理\",\n originPublicOrigin: \"公网 HTTPS 地址\",\n originListenHost: \"私有监听 IPv4\",\n originListenPort: \"HTTP 后端端口\",\n originAllowedCidrs: \"允许的代理来源 CIDR\",\n originHelp: \"代理与 DSH 同机时用 127.0.0.1;代理在另一台局域网设备上时,填写本机私有 IPv4,并只允许代理实际直连来源 IPv4/32。多个 CIDR 用空格或逗号分隔。\",\n originWarning: \"HTTP 后端必须留在私网,绝不能直接暴露公网或做公网端口映射。反向代理负责 HTTPS,并须保留外部 Host(含端口)及 WebSocket 升级。\",\n originSaveStart: \"保存并启动后端\",\n originBackendSaved: \"已保存的 HTTP 后端(未运行)\",\n originBackendListening: \"正在监听的 HTTP 后端\",\n originCopyBackend: \"复制后端地址\",\n originBackendCopied: \"已复制 HTTP 后端地址。\",\n originPurge: \"清除代理配置\",\n originPurgeConfirm: \"停止此私有 HTTP 后端,并且只删除它的反向代理配置?已配对的远程设备、局域网访问和其他提供方均保留。\",\n originPurged: \"已停止后端并清除代理配置,已配对设备仍保留。\",\n originSaving: \"正在保存配置并启动私有后端…\",\n originPurging: \"正在停止后端并清除配置…\",\n originBackendReady: \"后端已监听\",\n originReady: \"私有 HTTP 后端已监听,但尚未验证公网 HTTPS、证书及 WebSocket 连通性。请先用手机测试公网地址,不代表公网连接已成功。\",\n originUnavailable: \"请先配置公网 HTTPS 地址和私有后端。\",\n originStarting: \"正在启动私有 HTTP 后端…\",\n switchingOrigin: \"正在切换到自有反向代理…\",\n reconnectingOrigin: \"正在重启私有 HTTP 后端…\",\n resetOriginConfirm: \"停止此后端并重置远程配对?所有已配对的远程设备都需要重新配对;反向代理配置和局域网设备保留。\",\n originPublicOriginInvalid: \"只填写公网 HTTPS 源地址,例如 https://phone.example.com:8815;不能含路径、查询参数、账号密码或私有地址。\",\n originListenHostInvalid: \"填写本机明确的回环或私有 IPv4,不能使用 0.0.0.0 或公网地址。\",\n originListenPortInvalid: \"端口必须是 1024–65535 的整数;更低的端口需要插件没有的特权。\",\n originListenPortReserved: \"3443 属于局域网网关、3080 属于 DSH 自身,两者始终被占用。请换一个端口,例如 3444 或 3445。\",\n originAllowedCidrsInvalid: \"填写 1–16 个规范的回环/私有 IPv4 CIDR,不能有主机位;局域网监听时须包含代理实际来源 IPv4/32,不接受公网网段。\",\n originSettingsInvalid: \"反向代理配置无效,请检查四个字段后重新保存。\",\n originConfigMissing: \"请先保存反向代理配置,再启动后端。\",\n originConfigInvalid: \"已保存的配置无效,请修正并重新保存,或仅清除这项配置。\",\n originPortInUse: \"后端端口已被占用,请停止冲突进程或改用其他端口。3443、3080 以及已被 cloudflared 隧道占用的端口永远不会空闲。\",\n originAddressUnavailable: \"本机没有这个监听地址,请选择当前本机的私有 IPv4。\",\n originStartFailed: \"私有后端启动失败,请检查地址、端口、权限和本地日志。\",\n originConfigTargetInvalid: \"已保存的代理配置文件不是普通文件。请移除后重新保存设置。\",\n originControllerUnavailable: \"当前会话里反向代理提供方不可用。请重启 DSH 后重试。\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.en, {\n cloudflaredBadge: \"Account optional\",\n cloudflaredDescription: \"Installs the official cloudflared client on demand. A quick tunnel needs no account and gives a temporary public address; a named tunnel uses a Cloudflare account token and keeps one hostname that survives restarts.\",\n prepareCloudflared: \"Prepare cloudflared\",\n cloudflaredUnsupported: \"Windows x64 and Linux x64/arm64 are currently supported.\",\n cloudflaredNotInstalled: \"Not installed. A fixed version is downloaded from the official cloudflared release page only after you click the button below.\",\n cloudflaredReady: \"Official component {version} is ready.\",\n cloudflaredQuickNote: \"Quick tunnel: no Cloudflare account is needed, but Cloudflare positions quick tunnels for testing — the address is random, rate-limited, and carries no uptime guarantee. Do not rely on one for access that must stay reachable.\",\n cloudflaredNamedNote: \"Named tunnel: the hostname above stays the same across restarts and Cloudflare routes it to the local forward port. The connector token is stored only in the DSH Mobile private directory, is handed to cloudflared through its environment rather than the command line, and is never shown again once saved.\",\n cloudflaredComponentNote: \"Downloaded from the official cloudflared release page and verified at a fixed version only after you choose Install. The client is started with automatic updates disabled. It does not add a system service, startup item, registry entry, or PATH entry.\",\n installConfirmCloudflared: \"Download and verify cloudflared {size} from the official release page and store it only in the DSH Mobile private directory? No system service, PATH/registry entry, or startup item is added.\",\n installingCloudflared: \"Installing the official cloudflared component. Keep DSH running until it completes.\",\n purgeCloudflared: \"Completely remove the cloudflared component\",\n purgeCloudflaredConfirm: \"Completely remove the cloudflared component and its runtime logs from the DSH Mobile private directory? Local network access, DSH data, and other system programs are unaffected.\",\n purgingCloudflared: \"Stopping the channel and removing cloudflared files managed by DSH Mobile…\",\n switchingCloudflared: \"Switching to cloudflared…\",\n reconnectingCloudflared: \"Reconnecting cloudflared…\",\n remoteUnavailableCloudflared: \"cloudflared is not installed.\",\n remoteStartingCloudflared: \"Starting the cloudflared connector…\",\n remoteConnectingCloudflared: \"Starting the DSH authentication gateway…\",\n resetCloudflaredConfirm: \"Disable the cloudflared remote channel and remove all remote paired devices? The installed component and the local network configuration are unchanged.\",\n cloudflaredMissing: \"The official cloudflared component is not installed. Complete the preparation steps above.\",\n cloudflaredInvalid: \"cloudflared component verification failed. Remove it completely and reinstall.\",\n cloudflaredPortUnavailable: \"Could not allocate a local remote-gateway port. Try again.\",\n cloudflaredLaunchFailed: \"The cloudflared client failed to start.\",\n cloudflaredTimeout: \"Timed out waiting for the tunnel to become reachable. Reconnect.\",\n cloudflaredStopped: \"The cloudflared connection stopped.\",\n cloudflaredExited: \"The cloudflared connection exited unexpectedly. Reconnect.\",\n cloudflaredOutputInvalid: \"cloudflared returned an unrecognized status.\",\n cloudflaredOriginInvalid: \"The public address returned by cloudflared failed validation.\",\n cloudflaredComponentUnsupported: \"This build cannot run the cloudflared component.\",\n cloudflaredDownloadHashMismatch: \"The downloaded cloudflared failed its SHA-256 verification. Retry the install.\",\n cloudflaredDownloadSizeMismatch: \"The downloaded cloudflared is not the pinned size. Retry the install.\",\n cloudflaredDownloadRedirectMissing: \"The download page stopped redirecting to the release asset. Retry later, or install from the official page manually.\",\n cloudflaredDownloadRedirectInvalid: \"The download redirect did not point at a GitHub release asset, so it was refused.\",\n cloudflaredDownloadRedirectRejected: \"The download redirect was refused by policy. Retry later, or install from the official page manually.\",\n cloudflaredExecutableHashMismatch: \"The installed cloudflared no longer matches the verified build. Remove it completely and install again.\",\n cloudflaredPortReservationFailed: \"Could not reserve a local port for the tunnel. Try again.\",\n cloudflaredTunnelTargetInvalid: \"The saved tunnel configuration is not a regular file. Remove it and save the settings again.\",\n cloudflaredTunnelSaving: \"Saving the tunnel settings and reconnecting cloudflared…\",\n cloudflaredTunnelForgetting: \"Removing the saved tunnel token…\",\n cloudflaredTunnelTitle: \"Tunnel type\",\n cloudflaredTunnelQuick: \"Quick\",\n cloudflaredTunnelNamed: \"Named\",\n cloudflaredTunnelQuickHint: \"No account: cloudflared allocates a random address on every start.\",\n cloudflaredTunnelNamedHint: \"Uses a Cloudflare account token and keeps one address that survives restarts.\",\n cloudflaredTunnelHostname: \"Public hostname\",\n cloudflaredTunnelHostnamePlaceholder: \"dsh.example.com\",\n cloudflaredTunnelPort: \"Local forward port\",\n cloudflaredTunnelToken: \"Connector token\",\n cloudflaredTunnelTokenPlaceholder: \"Paste the tunnel token from the Cloudflare dashboard\",\n cloudflaredTunnelTokenSaved: \"A token is saved. Leave blank to keep it.\",\n cloudflaredTunnelSave: \"Save and connect\",\n cloudflaredTunnelSaveQuick: \"Switch to a quick tunnel\",\n cloudflaredTunnelConfigured: \"Named tunnel configured: {hostname} reaches this computer on 127.0.0.1:{port}.\",\n cloudflaredTunnelMissing: \"No named tunnel configured yet.\",\n cloudflaredTunnelHint: \"In the Cloudflare dashboard create a tunnel, then set its public hostname to http://127.0.0.1:{port}. The token is stored only in the DSH Mobile private directory and is never shown again after saving.\",\n cloudflaredTunnelForget: \"Remove the saved token\",\n cloudflaredTunnelForgetConfirm: \"Remove the saved tunnel token, stop the cloudflared channel, and go back to a quick tunnel? Nothing reconnects on its own: switch the channel back on afterwards. The tunnel still exists in your Cloudflare account, and its public hostname is unchanged.\",\n cloudflaredTunnelInvalid: \"The saved named-tunnel configuration is unreadable; the provider is using a quick tunnel. Save the settings again.\",\n cloudflaredTunnelPortUnavailable: \"The configured local forward port is unavailable. Cloudflare routes the public hostname to that exact port, so free it or choose another one.\",\n cloudflaredTunnelHostnameInvalid: \"Enter a public hostname under a domain on this Cloudflare account, for example dsh.example.com.\",\n cloudflaredTunnelPortInvalid: \"Enter a forward port between 1024 and 65535.\",\n cloudflaredTunnelPortReserved: \"Port 3443 is reserved for the DSH Mobile LAN gateway and is always occupied. Choose another port, such as 3444 or 3445.\",\n cloudflaredTunnelTokenInvalid: \"That does not look like a tunnel token. Copy the whole token from the Cloudflare dashboard.\",\n cloudflaredTunnelSettingsInvalid: \"The tunnel settings were rejected.\",\n cloudflaredTunnelConfigMissing: \"Enter the token, hostname, and port to use a named tunnel.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.it, {\n cloudflaredBadge: \"Account facoltativo\",\n cloudflaredDescription: \"Installa su richiesta il client cloudflared ufficiale. Il tunnel rapido non richiede account e fornisce un indirizzo pubblico temporaneo; il tunnel con nome usa il token di un account Cloudflare e mantiene un hostname stabile tra i riavvii.\",\n prepareCloudflared: \"Prepara cloudflared\",\n cloudflaredUnsupported: \"Attualmente sono supportati Windows x64 e Linux x64/arm64.\",\n cloudflaredNotInstalled: \"Non installato. Una versione fissa viene scaricata dalla pagina ufficiale di cloudflared solo dopo aver premuto il pulsante.\",\n cloudflaredReady: \"Componente ufficiale {version} pronto.\",\n cloudflaredQuickNote: \"Tunnel rapido: non serve un account Cloudflare, ma Cloudflare li considera pensati per i test — l’indirizzo è casuale, soggetto a limiti di frequenza e senza garanzia di disponibilità. Non usarlo per un accesso che deve restare raggiungibile.\",\n cloudflaredNamedNote: \"Tunnel con nome: l’hostname qui sopra resta lo stesso tra i riavvii e Cloudflare lo instrada verso la porta di inoltro locale. Il token del connettore è salvato solo nella directory privata DSH Mobile, viene passato a cloudflared tramite l’ambiente e non tramite la riga di comando, e dopo il salvataggio non viene più mostrato.\",\n cloudflaredComponentNote: \"Viene scaricato dalla pagina ufficiale di cloudflared e verificato a una versione fissa solo dopo aver scelto Installa. Il client viene avviato con gli aggiornamenti automatici disattivati. Non aggiunge servizi di sistema, avvio automatico, voci di registro o PATH.\",\n installConfirmCloudflared: \"Scaricare e verificare cloudflared {size} dalla pagina ufficiale e salvarlo solo nella directory privata DSH Mobile? Non vengono aggiunti servizi, PATH/registro o avvio automatico.\",\n installingCloudflared: \"Installazione del componente cloudflared ufficiale. Mantieni DSH in esecuzione fino al termine.\",\n purgeCloudflared: \"Rimuovi completamente il componente cloudflared\",\n purgeCloudflaredConfirm: \"Rimuovere completamente il componente cloudflared e i log runtime dalla directory privata DSH Mobile? Rete locale, dati DSH e altri programmi non sono interessati.\",\n purgingCloudflared: \"Arresto del canale e rimozione dei file cloudflared gestiti da DSH Mobile…\",\n switchingCloudflared: \"Passaggio a cloudflared…\",\n reconnectingCloudflared: \"Riconnessione di cloudflared…\",\n remoteUnavailableCloudflared: \"cloudflared non è installato.\",\n remoteStartingCloudflared: \"Avvio del connettore cloudflared…\",\n remoteConnectingCloudflared: \"Avvio del gateway di autenticazione DSH…\",\n resetCloudflaredConfirm: \"Disattivare il canale remoto cloudflared e rimuovere tutti i dispositivi remoti? Il componente installato e la configurazione della rete locale restano invariati.\",\n cloudflaredMissing: \"Il componente cloudflared ufficiale non è installato. Completa i passaggi sopra.\",\n cloudflaredInvalid: \"Verifica del componente cloudflared non riuscita. Rimuovilo completamente e reinstallalo.\",\n cloudflaredPortUnavailable: \"Impossibile assegnare una porta locale al gateway remoto. Riprova.\",\n cloudflaredLaunchFailed: \"Il client cloudflared non è stato avviato.\",\n cloudflaredTimeout: \"Timeout in attesa che il tunnel diventi raggiungibile. Riconnettiti.\",\n cloudflaredStopped: \"La connessione cloudflared è stata arrestata.\",\n cloudflaredExited: \"La connessione cloudflared è terminata in modo imprevisto. Riconnettiti.\",\n cloudflaredOutputInvalid: \"cloudflared ha restituito uno stato non riconosciuto.\",\n cloudflaredOriginInvalid: \"L’indirizzo pubblico restituito da cloudflared non ha superato la verifica.\",\n cloudflaredComponentUnsupported: \"Questa build non può eseguire il componente cloudflared.\",\n cloudflaredDownloadHashMismatch: \"Il cloudflared scaricato non ha superato la verifica SHA-256. Riprova l’installazione.\",\n cloudflaredDownloadSizeMismatch: \"Il cloudflared scaricato non ha la dimensione prevista. Riprova l’installazione.\",\n cloudflaredDownloadRedirectMissing: \"La pagina di download non reindirizza più all’asset della release. Riprova più tardi o installa manualmente dalla pagina ufficiale.\",\n cloudflaredDownloadRedirectInvalid: \"Il reindirizzamento di download non puntava a un asset di release GitHub ed è stato rifiutato.\",\n cloudflaredDownloadRedirectRejected: \"Il reindirizzamento di download è stato rifiutato dalle regole. Riprova più tardi o installa manualmente dalla pagina ufficiale.\",\n cloudflaredExecutableHashMismatch: \"Il cloudflared installato non corrisponde più alla build verificata. Rimuovilo completamente e reinstalla.\",\n cloudflaredPortReservationFailed: \"Impossibile riservare una porta locale per il tunnel. Riprova.\",\n cloudflaredTunnelTargetInvalid: \"La configurazione salvata del tunnel non è un file regolare. Rimuovila e salva di nuovo le impostazioni.\",\n cloudflaredTunnelSaving: \"Salvataggio delle impostazioni e riconnessione di cloudflared…\",\n cloudflaredTunnelForgetting: \"Rimozione del token del tunnel salvato…\",\n cloudflaredTunnelTitle: \"Tipo di tunnel\",\n cloudflaredTunnelQuick: \"Rapido\",\n cloudflaredTunnelNamed: \"Con nome\",\n cloudflaredTunnelQuickHint: \"Senza account: cloudflared assegna un indirizzo casuale a ogni avvio.\",\n cloudflaredTunnelNamedHint: \"Usa il token di un account Cloudflare e mantiene un indirizzo stabile tra i riavvii.\",\n cloudflaredTunnelHostname: \"Hostname pubblico\",\n cloudflaredTunnelHostnamePlaceholder: \"dsh.example.com\",\n cloudflaredTunnelPort: \"Porta di inoltro locale\",\n cloudflaredTunnelToken: \"Token del connettore\",\n cloudflaredTunnelTokenPlaceholder: \"Incolla il token del tunnel dalla dashboard Cloudflare\",\n cloudflaredTunnelTokenSaved: \"Un token è salvato. Lascia vuoto per mantenerlo.\",\n cloudflaredTunnelSave: \"Salva e connetti\",\n cloudflaredTunnelSaveQuick: \"Passa a un tunnel rapido\",\n cloudflaredTunnelConfigured: \"Tunnel con nome configurato: {hostname} raggiunge questo computer su 127.0.0.1:{port}.\",\n cloudflaredTunnelMissing: \"Nessun tunnel con nome configurato.\",\n cloudflaredTunnelHint: \"Nella dashboard Cloudflare crea un tunnel e imposta il suo hostname pubblico su http://127.0.0.1:{port}. Il token è salvato solo nella directory privata DSH Mobile e non viene più mostrato dopo il salvataggio.\",\n cloudflaredTunnelForget: \"Rimuovi il token salvato\",\n cloudflaredTunnelForgetConfirm: \"Rimuovere il token salvato, arrestare il canale cloudflared e tornare a un tunnel rapido? Nulla si riconnette da solo: riattiva il canale in seguito. Il tunnel resta nel tuo account Cloudflare e il suo hostname pubblico non cambia.\",\n cloudflaredTunnelInvalid: \"La configurazione salvata del tunnel con nome non è leggibile; il provider usa un tunnel rapido. Salva di nuovo le impostazioni.\",\n cloudflaredTunnelPortUnavailable: \"La porta di inoltro locale configurata non è disponibile. Cloudflare instrada l’hostname pubblico esattamente su quella porta: liberala o scegline un’altra.\",\n cloudflaredTunnelHostnameInvalid: \"Inserisci un hostname pubblico sotto un dominio di questo account Cloudflare, ad esempio dsh.example.com.\",\n cloudflaredTunnelPortInvalid: \"Inserisci una porta di inoltro tra 1024 e 65535.\",\n cloudflaredTunnelPortReserved: \"La porta 3443 è riservata al gateway LAN di DSH Mobile ed è sempre occupata. Scegli un’altra porta, ad esempio 3444 o 3445.\",\n cloudflaredTunnelTokenInvalid: \"Non sembra un token di tunnel. Copia il token completo dalla dashboard Cloudflare.\",\n cloudflaredTunnelSettingsInvalid: \"Le impostazioni del tunnel sono state rifiutate.\",\n cloudflaredTunnelConfigMissing: \"Inserisci token, hostname e porta per usare un tunnel con nome.\",\n})\n\nObject.assign(MOBILE_CONTROL_MESSAGES.zh, {\n cloudflaredBadge: \"账号可选\",\n cloudflaredDescription: \"按需安装官方 cloudflared 客户端。快速隧道无需账号,提供临时公网地址;命名隧道使用 Cloudflare 账号令牌,地址固定、重启不变。\",\n prepareCloudflared: \"准备 cloudflared\",\n cloudflaredUnsupported: \"当前支持 Windows x64 与 Linux x64/arm64。\",\n cloudflaredNotInstalled: \"尚未安装。只有点击下方按钮后,才会从 cloudflared 官方发布页下载固定版本。\",\n cloudflaredReady: \"官方组件 {version} 已就绪。\",\n cloudflaredQuickNote: \"快速隧道:无需 Cloudflare 账号,但官方定位是测试用途 —— 地址随机、有限流、无可用性保证。请勿用于必须长期可达的访问。\",\n cloudflaredNamedNote: \"命名隧道:上面的公网域名重启后不变,由 Cloudflare 转发到本机转发端口。连接器令牌只保存在 DSH Mobile 私有目录,经环境变量而非命令行传给 cloudflared,保存后不再显示。\",\n cloudflaredComponentNote: \"仅在你点击安装后从 cloudflared 官方发布页下载并校验固定版本,且启动时关闭自动更新。不会写入系统服务、开机启动、注册表或 PATH。\",\n installConfirmCloudflared: \"将从 cloudflared 官方发布页下载并校验固定版本({size}),仅保存到 DSH Mobile 私有目录。不会安装系统服务、写入 PATH/注册表或设置开机启动。是否继续?\",\n installingCloudflared: \"正在安装 cloudflared 官方组件。完成前请保持 DSH 运行。\",\n purgeCloudflared: \"彻底移除 cloudflared 组件\",\n purgeCloudflaredConfirm: \"彻底移除 DSH Mobile 私有目录中的 cloudflared 组件和运行日志?不会影响局域网、DSH 数据或系统中的其他程序。\",\n purgingCloudflared: \"正在关闭通道并清理 DSH Mobile 管理的 cloudflared 文件…\",\n switchingCloudflared: \"正在切换到 cloudflared…\",\n reconnectingCloudflared: \"正在重连 cloudflared…\",\n remoteUnavailableCloudflared: \"cloudflared 尚未安装。\",\n remoteStartingCloudflared: \"正在启动 cloudflared 连接器…\",\n remoteConnectingCloudflared: \"正在启动 DSH 认证网关…\",\n resetCloudflaredConfirm: \"关闭 cloudflared 远程通道并移除所有远程配对设备?已安装组件与局域网配置保持不变。\",\n cloudflaredMissing: \"cloudflared 官方组件尚未安装。请先完成上方准备步骤。\",\n cloudflaredInvalid: \"cloudflared 组件校验失败。请彻底移除后重新安装。\",\n cloudflaredPortUnavailable: \"无法分配本机远程网关端口,请重试。\",\n cloudflaredLaunchFailed: \"cloudflared 客户端未能启动。\",\n cloudflaredTimeout: \"等待隧道可用超时,请重新连接。\",\n cloudflaredStopped: \"cloudflared 连接已停止。\",\n cloudflaredExited: \"cloudflared 连接意外退出,请重新连接。\",\n cloudflaredOutputInvalid: \"cloudflared 返回了无法识别的状态。\",\n cloudflaredOriginInvalid: \"cloudflared 返回的公网地址未通过校验。\",\n cloudflaredComponentUnsupported: \"当前构建无法运行 cloudflared 组件。\",\n cloudflaredDownloadHashMismatch: \"下载的 cloudflared 未通过 SHA-256 校验。请重新安装。\",\n cloudflaredDownloadSizeMismatch: \"下载的 cloudflared 体积与固定版本不符。请重新安装。\",\n cloudflaredDownloadRedirectMissing: \"下载页不再跳转到发布资源。请稍后重试,或按官方页面手动安装。\",\n cloudflaredDownloadRedirectInvalid: \"下载跳转的目标不是 GitHub 发布资源,已被拒绝。\",\n cloudflaredDownloadRedirectRejected: \"下载跳转未通过校验规则。请稍后重试,或按官方页面手动安装。\",\n cloudflaredExecutableHashMismatch: \"已安装的 cloudflared 与校验过的版本不一致。请彻底移除后重新安装。\",\n cloudflaredPortReservationFailed: \"无法为隧道预留本机端口,请重试。\",\n cloudflaredTunnelTargetInvalid: \"已保存的隧道配置不是普通文件。请移除后重新保存设置。\",\n cloudflaredTunnelSaving: \"正在保存隧道设置并重新连接 cloudflared…\",\n cloudflaredTunnelForgetting: \"正在移除已保存的隧道令牌…\",\n cloudflaredTunnelTitle: \"隧道类型\",\n cloudflaredTunnelQuick: \"快速隧道\",\n cloudflaredTunnelNamed: \"命名隧道\",\n cloudflaredTunnelQuickHint: \"无需账号:每次启动由 cloudflared 随机分配地址。\",\n cloudflaredTunnelNamedHint: \"使用 Cloudflare 账号令牌,地址固定,重启后仍然有效。\",\n cloudflaredTunnelHostname: \"公网域名\",\n cloudflaredTunnelHostnamePlaceholder: \"dsh.example.com\",\n cloudflaredTunnelPort: \"本机转发端口\",\n cloudflaredTunnelToken: \"连接器令牌\",\n cloudflaredTunnelTokenPlaceholder: \"粘贴 Cloudflare 控制台里的隧道令牌\",\n cloudflaredTunnelTokenSaved: \"已保存令牌,留空表示不更改。\",\n cloudflaredTunnelSave: \"保存并连接\",\n cloudflaredTunnelSaveQuick: \"切换到快速隧道\",\n cloudflaredTunnelConfigured: \"命名隧道已配置:{hostname} 将转发到本机 127.0.0.1:{port}。\",\n cloudflaredTunnelMissing: \"尚未配置命名隧道。\",\n cloudflaredTunnelHint: \"先在 Cloudflare 控制台创建隧道,并把它的公开主机名指向 http://127.0.0.1:{port}。令牌只保存在 DSH Mobile 私有目录,保存后不会再显示。\",\n cloudflaredTunnelForget: \"移除已保存的令牌\",\n cloudflaredTunnelForgetConfirm: \"移除已保存的隧道令牌、停止 cloudflared 通道并改回快速隧道?不会自动重连,之后需要手动重新打开开关。Cloudflare 账号里的隧道本身仍在,公开主机名也不会改变。\",\n cloudflaredTunnelInvalid: \"已保存的命名隧道配置无法读取,当前按快速隧道运行。请重新保存设置。\",\n cloudflaredTunnelPortUnavailable: \"配置的本机转发端口不可用。Cloudflare 把公开主机名固定转发到该端口,请释放它或换一个端口。\",\n cloudflaredTunnelHostnameInvalid: \"请填写本 Cloudflare 账号下某个域名的公开主机名,例如 dsh.example.com。\",\n cloudflaredTunnelPortInvalid: \"请填写 1024 到 65535 之间的转发端口。\",\n cloudflaredTunnelPortReserved: \"3443 已留给 DSH Mobile 局域网网关,且始终被占用。请换一个端口,例如 3444 或 3445。\",\n cloudflaredTunnelTokenInvalid: \"这不像是一个隧道令牌。请从 Cloudflare 控制台完整复制令牌。\",\n cloudflaredTunnelSettingsInvalid: \"隧道设置未通过校验。\",\n cloudflaredTunnelConfigMissing: \"使用命名隧道需要同时填写令牌、公网域名和端口。\",\n})\n\nexport const DIAGNOSTIC_REASON_MESSAGES = {\n en: {\n 'lan-setup-required': ['Local network setup has not been completed.', 'Return to Local network and choose a network to finish setup.'],\n 'versions-current': ['Installed plugin, DSH, and minimum Android app versions are shown.', ''],\n 'network-unavailable': ['The saved local network adapter is unavailable.', 'Run dsh-mobile setup again.'],\n 'network-interface': ['Using network interface {interfaceName}.', ''],\n 'network-fixed': ['A fixed local network configuration is in use.', ''],\n 'lan-ready': ['The local gateway is listening at {endpointSuffix}; pairing is available.', ''],\n 'lan-off': ['Local network access is currently off.', 'Enable local network access when the phone must connect directly.'],\n 'firewall-ready': ['Local TCP and discovery firewall rules are enabled.', ''],\n 'firewall-missing': ['The complete local network firewall rules were not found.', 'Run dsh-mobile setup as administrator and check the firewall rules.'],\n 'firewall-unknown': ['The system did not allow the plugin to read firewall status.', 'If the phone cannot find this computer, run setup as administrator.'],\n 'remote-off': ['Remote access through {provider} is currently off.', ''],\n 'remote-origin-ready': ['The private HTTP backend is listening; public HTTPS is not verified.', 'Verify your reverse proxy, public certificate, external Host including port, and WebSocket access from your phone. Keep the HTTP backend private.'],\n 'remote-ready': ['{provider} endpoint {endpointSuffix} is reachable in about {latencyMs} ms.', ''],\n 'remote-rate-limited': ['{provider} endpoint {endpointSuffix} is reachable, but this check observed rate limiting.', 'Try again later; older sessions load on demand to reduce traffic.'],\n 'remote-fake-ip': ['The Tailscale address is intercepted by the current VPN or DNS proxy, so TLS was not established.', 'Switch VPN node or proxy mode; if it still fails, use cpolar.'],\n 'remote-unreachable': ['{provider} reports ready, but endpoint {endpointSuffix} is not reachable.', 'Reconnect, then check the provider status if it still fails.'],\n 'remote-needs-login': ['Tailscale is waiting for login to finish.', 'Return to Remote access and continue login.'],\n 'remote-connecting': ['The {provider} remote channel is still connecting.', 'Wait briefly, then check again.'],\n 'remote-controller-error': ['The {provider} controller reported {controllerCode}.', 'Return to Remote access and reconnect.'],\n 'phone-network-unknown': ['The computer cannot determine whether the router isolates the phone.', 'Confirm the phone and computer use the same network, then disable guest-network or AP isolation.'],\n },\n it: {\n 'lan-setup-required': ['La configurazione della rete locale non è completa.', 'Torna a Rete locale e scegli una rete per completare la configurazione.'],\n 'versions-current': ['Sono indicate le versioni installate di plugin e DSH e la versione minima dell’app Android.', ''],\n 'network-unavailable': ['La scheda di rete locale salvata non è disponibile.', 'Esegui di nuovo dsh-mobile setup.'],\n 'network-interface': ['È in uso l’interfaccia di rete {interfaceName}.', ''],\n 'network-fixed': ['È in uso una configurazione di rete locale fissa.', ''],\n 'lan-ready': ['Il gateway locale è in ascolto su {endpointSuffix}; l’abbinamento è disponibile.', ''],\n 'lan-off': ['L’accesso dalla rete locale è disattivato.', 'Attiva l’accesso locale quando il telefono deve collegarsi direttamente.'],\n 'firewall-ready': ['Le regole firewall TCP locale e di rilevamento sono attive.', ''],\n 'firewall-missing': ['Le regole firewall complete per la rete locale non sono state trovate.', 'Esegui dsh-mobile setup come amministratore e controlla le regole firewall.'],\n 'firewall-unknown': ['Il sistema non ha consentito al plugin di leggere lo stato del firewall.', 'Se il telefono non trova il computer, esegui setup come amministratore.'],\n 'remote-off': ['L’accesso remoto tramite {provider} è disattivato.', ''],\n 'remote-origin-ready': ['Il backend HTTP privato è in ascolto; HTTPS pubblico non è verificato.', 'Verifica dal telefono reverse proxy, certificato pubblico, Host esterno inclusa la porta e accesso WebSocket. Mantieni privato il backend HTTP.'],\n 'remote-ready': ['L’endpoint {provider} {endpointSuffix} è raggiungibile in circa {latencyMs} ms.', ''],\n 'remote-rate-limited': ['L’endpoint {provider} {endpointSuffix} è raggiungibile, ma il controllo ha rilevato una limitazione temporanea.', 'Riprova più tardi; le sessioni precedenti vengono caricate su richiesta per ridurre il traffico.'],\n 'remote-fake-ip': ['L’indirizzo Tailscale è intercettato dalla VPN o dal proxy DNS corrente e TLS non è stato stabilito.', 'Cambia nodo VPN o modalità proxy; se il problema continua, usa cpolar.'],\n 'remote-unreachable': ['{provider} risulta pronto, ma l’endpoint {endpointSuffix} non è raggiungibile.', 'Riconnettiti; se il problema continua, controlla lo stato del provider.'],\n 'remote-needs-login': ['Tailscale attende il completamento dell’accesso.', 'Torna ad Accesso remoto e continua l’accesso.'],\n 'remote-connecting': ['Il canale remoto {provider} è ancora in connessione.', 'Attendi qualche istante e ripeti il controllo.'],\n 'remote-controller-error': ['Il controller {provider} ha segnalato {controllerCode}.', 'Torna ad Accesso remoto e riconnettiti.'],\n 'phone-network-unknown': ['Il computer non può stabilire se il router isola il telefono.', 'Verifica che telefono e computer usino la stessa rete, poi disattiva rete ospiti o isolamento AP.'],\n },\n zh: {\n 'lan-setup-required': ['尚未完成局域网初始化。', '返回局域网页选择网卡并完成配置。'],\n 'versions-current': ['已显示插件、DSH 和 Android App 最低版本。', ''],\n 'network-unavailable': ['已保存的局域网网卡当前不可用。', '重新运行 dsh-mobile setup。'],\n 'network-interface': ['正在使用网卡 {interfaceName}。', ''],\n 'network-fixed': ['当前使用固定局域网配置。', ''],\n 'lan-ready': ['局域网网关正在监听 {endpointSuffix},配对入口可用。', ''],\n 'lan-off': ['局域网访问当前未开启。', '手机需要直连时开启局域网访问。'],\n 'firewall-ready': ['局域网 TCP 与发现防火墙规则已启用。', ''],\n 'firewall-missing': ['未找到完整的局域网防火墙规则。', '以管理员身份运行 dsh-mobile setup 并检查防火墙规则。'],\n 'firewall-unknown': ['系统未允许插件读取防火墙状态。', '若手机找不到电脑,请以管理员身份运行 setup。'],\n 'remote-off': ['{provider} 远程访问当前未启用。', ''],\n 'remote-origin-ready': ['私有 HTTP 后端已监听;尚未验证公网 HTTPS。', '请用手机核对反向代理、公网证书、含端口的外部 Host 及 WebSocket 访问。HTTP 后端必须留在私网。'],\n 'remote-ready': ['{provider} 端点 {endpointSuffix} 可达,往返约 {latencyMs} ms。', ''],\n 'remote-rate-limited': ['{provider} 端点 {endpointSuffix} 可达,但本次检查观察到服务限流。', '稍后重试;旧会话会按需加载以减少流量。'],\n 'remote-fake-ip': ['Tailscale 地址被当前 VPN 或 DNS 代理接管,TLS 链路未建立。', '切换 VPN 节点或代理模式;仍失败时改用 cpolar。'],\n 'remote-unreachable': ['{provider} 显示已就绪,但端点 {endpointSuffix} 暂不可达。', '点击重新连接;仍失败时检查提供方状态。'],\n 'remote-needs-login': ['Tailscale 正在等待完成登录。', '返回远程访问并继续登录。'],\n 'remote-connecting': ['{provider} 远程通道仍在连接。', '等待片刻后重新检查。'],\n 'remote-controller-error': ['{provider} 控制器报告 {controllerCode}。', '返回远程访问并重新连接。'],\n 'phone-network-unknown': ['电脑无法判断路由器是否隔离了手机。', '确认手机与电脑使用同一网络,并关闭访客网络或 AP 隔离。'],\n },\n} as const\n","/** Loopback-only HTTP vhost port used between Caddy and frps. */\nexport const FRP_VHOST_HTTP_PORT = 7080\n\n/** Caddy snippet owned entirely by DSH Mobile; the main Caddyfile only imports it. */\nexport const FRP_CADDY_SNIPPET_PATH = '/etc/caddy/dsh-mobile-dsh.caddy'\n\n/** First line of the owned snippet; also the legacy whole-file marker. */\nexport const FRP_CADDY_SNIPPET_MARKER = '# Managed by DSH Mobile - snippet, safe to delete'\n\n/** Exact line the main Caddyfile must contain (uncommented) for the site to load. */\nexport const FRP_CADDY_IMPORT_LINE = `import ${FRP_CADDY_SNIPPET_PATH}`\n\n/** Directory holding the public-IPv4 certificates installed by certbot. */\nexport const FRP_CADDY_IP_CERT_DIR = '/var/lib/caddy/dsh-mobile-certs'\n\nfunction publicIpv4Address(value: string): boolean {\n const parts = value.split('.')\n return parts.length === 4 && parts.every(part => /^(?:0|[1-9][0-9]{0,2})$/u.test(part)\n && Number(part) <= 255)\n}\n\nfunction publicDnsHostname(value: string): boolean {\n return value.length <= 253 && value.includes('.') && !/^[0-9.]+$/u.test(value)\n && !value.includes(':') && value.split('.').every(label => label.length >= 1 && label.length <= 63\n && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/u.test(label))\n}\n\nfunction parsePublicOrigin(publicOrigin: string): string {\n let url: URL\n try { url = new URL(publicOrigin) } catch { throw new Error('frp_template_input_invalid') }\n if (url.protocol !== 'https:' || url.port !== '' || url.pathname !== '/' || url.search !== '' || url.hash !== ''\n || url.username !== '' || url.password !== '' || (!publicIpv4Address(url.hostname) && !publicDnsHostname(url.hostname))) {\n throw new Error('frp_template_input_invalid')\n }\n return url.hostname\n}\n\n/** Build the Caddy site for one public host (without markers or import wiring). */\nexport function createCaddySite(publicHost: string, certDir: string = FRP_CADDY_IP_CERT_DIR): string {\n if (publicIpv4Address(publicHost)) {\n return [\n '{',\n ` default_sni ${publicHost}`,\n '}',\n '',\n `http://${publicHost} {`,\n ` redir https://${publicHost}{uri} permanent`,\n '}',\n '',\n `https://${publicHost} {`,\n ` tls ${certDir}/fullchain.pem ${certDir}/privkey.pem`,\n ` reverse_proxy 127.0.0.1:${String(FRP_VHOST_HTTP_PORT)}`,\n '}',\n '',\n ].join('\\n')\n }\n if (!publicDnsHostname(publicHost)) throw new Error('frp_template_input_invalid')\n return [\n `${publicHost} {`,\n ` reverse_proxy 127.0.0.1:${String(FRP_VHOST_HTTP_PORT)}`,\n '}',\n '',\n ].join('\\n')\n}\n\n/** Manual certbot steps for a public-IPv4 origin (Caddy cannot issue IP certificates itself). */\nfunction manualIpCertificateGuide(publicHost: string): string {\n return [\n '# Public-IPv4 manual HTTPS: Caddy cannot issue IP certificates by itself.',\n '# On the VPS (Ubuntu/Debian, port 80 reachable from the internet), run once as root:',\n '# apt-get install -y python3-venv',\n '# python3 -m venv /opt/dsh-mobile/certbot-venv',\n \"# /opt/dsh-mobile/certbot-venv/bin/pip install 'certbot==5.8.0'\",\n '# systemctl stop caddy || true',\n `# /opt/dsh-mobile/certbot-venv/bin/certbot certonly --standalone --preferred-profile shortlived --ip-address ${publicHost} --agree-tos --register-unsafely-without-email --non-interactive --keep-until-expiring`,\n '# install -d -m 0750 -o caddy -g caddy /var/lib/caddy/dsh-mobile-certs',\n `# install -m 0640 -o caddy -g caddy /etc/letsencrypt/live/${publicHost}/fullchain.pem /var/lib/caddy/dsh-mobile-certs/fullchain.pem`,\n `# install -m 0640 -o caddy -g caddy /etc/letsencrypt/live/${publicHost}/privkey.pem /var/lib/caddy/dsh-mobile-certs/privkey.pem`,\n '# systemctl start caddy',\n '# The site below already references those paths. Certificates last about 6 days: re-run certonly before expiry.',\n '#',\n ].join('\\n')\n}\n\n/** Build the only supported frps config and Caddy snippet from validated user inputs. */\nexport function createRestrictedFrpServerTemplate(serverPort: number, token: string, publicOrigin: string): string {\n if (!Number.isSafeInteger(serverPort) || serverPort < 1 || serverPort > 65_535\n || token.length < 16 || token.length > 512 || /[\\s\\u0000-\\u001f\\u007f]/u.test(token)) {\n throw new Error('frp_template_input_invalid')\n }\n const publicHost = parsePublicOrigin(publicOrigin)\n const lines = [\n '# frps.toml — save as /etc/dsh-mobile/frps.toml, then start the frps service.',\n `bindPort = ${String(serverPort)}`,\n 'proxyBindAddr = \"127.0.0.1\"',\n `vhostHTTPPort = ${String(FRP_VHOST_HTTP_PORT)}`,\n 'auth.method = \"token\"',\n `auth.token = ${JSON.stringify(token)}`,\n '',\n `# Caddy — save the site below as ${FRP_CADDY_SNIPPET_PATH},`,\n '# then make sure your Caddyfile contains exactly this line at the TOP of the file',\n '# (create the file with just this line if needed; globals must precede sites):',\n `# ${FRP_CADDY_IMPORT_LINE}`,\n '# finally run: caddy validate --config /etc/caddy/Caddyfile && systemctl reload caddy',\n '# Uninstall later removes only this snippet file and the import line; your own Caddy content is kept.',\n `${FRP_CADDY_SNIPPET_MARKER}`,\n createCaddySite(publicHost).trimEnd(),\n '',\n ]\n if (publicIpv4Address(publicHost)) lines.push(manualIpCertificateGuide(publicHost), '')\n return lines.join('\\n')\n}\n","/** Task-completion notifications for the Android shell.\n *\n * The page cannot know a run \"finished\" from any single event, so completion\n * is defined conservatively: assistant activity was observed, then the\n * conversation stayed quiet for a bounded period with no pending input\n * question, while the page was hidden. Question cards, which unambiguously\n * wait for the user, notify immediately instead of waiting out the quiet\n * period. Everything here is pure except the clearly-marked DOM adapters so\n * the decision logic stays unit-testable under node.\n */\n\n/** How long the conversation must stay quiet before a run counts as done. */\nexport const TASK_NOTIFY_QUIET_MS = 90_000\n\n/**\n * Grace after a busy-to-idle transition before announcing completion.\n * Absorbs composer flicker between steps while still feeling immediate.\n */\nexport const TASK_NOTIFY_GRACE_MS = 10_000\n\n/**\n * Minimum continuous busy time for an instant announcement. A run that held\n * the composer this long is no flicker: announce at once instead of waiting\n * out the grace period.\n */\nexport const TASK_NOTIFY_MIN_BUSY_MS = 20_000\n\n/** Maximum quiet period worth waiting through before giving up on a run. */\nexport const TASK_NOTIFY_STALE_MS = 30 * 60_000\n\n/** Wire bounds mirrored by the Android notification policy. */\nexport const TASK_NOTIFY_LIMITS = Object.freeze({\n title: 80,\n body: 200,\n tag: 64,\n} as const)\n\nexport type TaskNotifyKind = 'done' | 'question'\n\nexport interface TaskNotifyTexts {\n readonly doneTitle: string\n readonly doneBody: string\n readonly questionTitle: string\n readonly questionBody: string\n}\n\nexport interface TaskNotifySnapshot {\n /** Result of document.hidden at evaluation time. */\n readonly pageHidden: boolean\n /** Whether a question or plan-review card currently waits for input. */\n readonly pendingQuestion: boolean\n /** Stable key of the waiting card, when the DOM exposes one. */\n readonly questionKey: string | undefined\n /** Best-effort session label for the notification body. */\n readonly sessionLabel: string\n /** Current composer busy flag; drives the completion transition. */\n readonly composerBusy: boolean\n}\n\nexport interface TaskNotifyEvent {\n readonly kind: TaskNotifyKind\n readonly title: string\n readonly body: string\n readonly tag: string\n}\n\nexport interface TaskNotifyOptions {\n readonly quietMs?: number\n readonly graceMs?: number\n readonly minBusyMs?: number\n readonly now?: () => number\n readonly format: (kind: TaskNotifyKind, sessionLabel: string) => { title: string; body: string }\n}\n\nconst MAX_SEEN_QUESTION_KEYS = 20\n\nfunction sanitizeTagFragment(value: string): string {\n return value.toLowerCase().replaceAll(/[^a-z0-9-]+/gu, '-').replaceAll(/^-+|-+$/gu, '').slice(0, TASK_NOTIFY_LIMITS.tag)\n}\n\n/** Stable per-turn tag so concurrent sessions keep separate notifications. */\nexport function taskCompletionTag(sessionId: string, turn: number): string {\n const suffix = sanitizeTagFragment(`${sessionId}-${String(turn)}`) || 'task'\n return `dsh-task-done-${suffix}`.slice(0, TASK_NOTIFY_LIMITS.tag)\n}\n\n/** Decide whether the current snapshot deserves a system notification. */\nexport class TaskNotifyTracker {\n private lastActivityAt: number | undefined\n private notifiedDoneAt: number | undefined\n private wasBusy = false\n private busySince: number | undefined\n private idleAnchoredAt: number | undefined\n private readonly seenQuestionKeys = new Set<string>()\n private readonly quietMs: number\n private readonly graceMs: number\n private readonly minBusyMs: number\n private readonly now: () => number\n private readonly format: (kind: TaskNotifyKind, sessionLabel: string) => { title: string; body: string }\n\n constructor(options: TaskNotifyOptions) {\n this.quietMs = options.quietMs ?? TASK_NOTIFY_QUIET_MS\n this.graceMs = options.graceMs ?? TASK_NOTIFY_GRACE_MS\n this.minBusyMs = options.minBusyMs ?? TASK_NOTIFY_MIN_BUSY_MS\n this.now = options.now ?? Date.now\n this.format = options.format\n }\n\n /** Record assistant-side activity; re-arms completion after a notification. */\n markActivity(): void {\n const now = this.now()\n this.lastActivityAt = now\n if (this.notifiedDoneAt !== undefined && this.notifiedDoneAt <= now) this.notifiedDoneAt = undefined\n }\n\n /**\n * Milliseconds until a pending completion anchor fires, or undefined when\n * no anchor exists. Lets the watcher schedule one exact timer instead of\n * waiting for the next coarse poll tick.\n */\n pendingAnchorDelayMs(): number | undefined {\n if (this.idleAnchoredAt === undefined) return undefined\n return Math.max(0, this.graceMs - (this.now() - this.idleAnchoredAt))\n }\n\n evaluate(snapshot: TaskNotifySnapshot): TaskNotifyEvent | undefined {\n const now = this.now()\n if (!this.wasBusy && snapshot.composerBusy) this.busySince = now\n if (this.wasBusy && !snapshot.composerBusy) {\n // The run just ended. A run that held the composer long enough is no\n // flicker: announce at once when hidden, unless a question card (which\n // has its own immediate path below) is already waiting.\n const busyFor = this.busySince === undefined ? 0 : now - this.busySince\n this.busySince = undefined\n if (snapshot.pageHidden && !snapshot.pendingQuestion && busyFor >= this.minBusyMs) {\n this.idleAnchoredAt = undefined\n this.notifiedDoneAt = now\n return this.event('done', snapshot.sessionLabel, undefined)\n }\n this.idleAnchoredAt = snapshot.pageHidden ? now : undefined\n if (!snapshot.pageHidden) this.notifiedDoneAt = now\n }\n this.wasBusy = snapshot.composerBusy\n if (snapshot.composerBusy) {\n this.idleAnchoredAt = undefined\n } else if (this.idleAnchoredAt !== undefined && !snapshot.pageHidden) {\n // Came back before the grace elapsed: treat the ending as seen.\n this.idleAnchoredAt = undefined\n this.notifiedDoneAt = now\n }\n if (!snapshot.pageHidden) {\n if (snapshot.pendingQuestion && snapshot.questionKey !== undefined) this.rememberQuestionKey(snapshot.questionKey)\n return undefined\n }\n if (snapshot.pendingQuestion) {\n if (snapshot.questionKey === undefined || this.seenQuestionKeys.has(snapshot.questionKey)) return undefined\n this.rememberQuestionKey(snapshot.questionKey)\n return this.event('question', snapshot.sessionLabel, snapshot.questionKey)\n }\n // Completion: the anchored transition announces fast; the quiet period\n // remains as the fallback for activity without a busy signal.\n if (this.idleAnchoredAt !== undefined) {\n if (now - this.idleAnchoredAt < this.graceMs) return undefined\n this.idleAnchoredAt = undefined\n this.notifiedDoneAt = now\n return this.event('done', snapshot.sessionLabel, undefined)\n }\n if (this.lastActivityAt === undefined) return undefined\n if (now - this.lastActivityAt < this.quietMs) return undefined\n if (now - this.lastActivityAt > TASK_NOTIFY_STALE_MS) {\n // Activity too old to attribute: drop it instead of announcing a stale run.\n this.lastActivityAt = undefined\n return undefined\n }\n if (this.notifiedDoneAt !== undefined && this.notifiedDoneAt >= this.lastActivityAt) return undefined\n this.notifiedDoneAt = now\n return this.event('done', snapshot.sessionLabel, undefined)\n }\n\n private rememberQuestionKey(key: string): void {\n this.seenQuestionKeys.add(key)\n if (this.seenQuestionKeys.size > MAX_SEEN_QUESTION_KEYS) {\n const oldest = this.seenQuestionKeys.values().next()\n if (!oldest.done) this.seenQuestionKeys.delete(oldest.value)\n }\n }\n\n private event(kind: TaskNotifyKind, sessionLabel: string, questionKey: string | undefined): TaskNotifyEvent {\n const text = this.format(kind, sessionLabel)\n const tag = kind === 'question' && questionKey !== undefined\n ? `dsh-task-question-${sanitizeTagFragment(questionKey) || 'pending'}`\n : 'dsh-task-done'\n return Object.freeze({ kind, title: text.title, body: text.body, tag })\n }\n}\n\ninterface ComposerProbe {\n getAttribute?: (name: string) => string | null\n querySelector?: (selectors: string) => {\n disabled?: boolean\n readOnly?: boolean\n getAttribute?: (name: string) => string | null\n } | null\n}\n\n/**\n * Mirror of the composer busy signal used for media actions: the run is busy\n * while the composer is aria-busy, disabled, read-only, or non-interactive.\n */\nexport function readComposerBusyState(root: ParentNode): boolean {\n if (typeof root.querySelector !== 'function') return false\n const card = root.querySelector('[data-composer-card]') as ComposerProbe | null\n if (card === null || typeof card.getAttribute !== 'function' || typeof card.querySelector !== 'function') return false\n if (card.getAttribute('aria-busy') === 'true') return true\n const field = card.querySelector('textarea,input,[contenteditable=\"true\"],[contenteditable=\"plaintext-only\"]')\n if (field === null) return false\n return field.disabled === true || field.readOnly === true || field.getAttribute?.('aria-disabled') === 'true'\n}\n\n/**\n * Best-effort session label for the notification body, bounded for the wire.\n * Callers accept that titles may name the active session on the lock screen.\n */\nexport function readSessionLabel(title: unknown): string {\n if (typeof title !== 'string') return ''\n return title.normalize('NFC').replace(/[\\u0000-\\u001f\\u007f]+/gu, ' ').trim().slice(0, 80)\n}\n\n/** Whether the document currently shows a card that waits for user input. */\nexport function hasPendingInputQuestion(root: ParentNode): boolean { if (typeof root.querySelector !== 'function') return false\n return root.querySelector('[data-question-key],[data-plan-review-key]') !== null\n}\n\n/** Stable key of the waiting input card, when the DOM exposes one. */\nexport function pendingInputQuestionKey(root: ParentNode): string | undefined {\n if (typeof root.querySelector !== 'function') return undefined\n const card = root.querySelector('[data-question-key],[data-plan-review-key]') as {\n getAttribute?: (name: string) => string | null\n } | null\n const getAttribute = card?.getAttribute\n if (typeof getAttribute !== 'function') return undefined\n const key = getAttribute.call(card, 'data-question-key') ?? getAttribute.call(card, 'data-plan-review-key')\n if (key === null || key === '') return undefined\n return key\n}\n\n/** Observe assistant-side conversation mutations; returns a disposer. */\nexport function observeTaskActivity(\n target: Node,\n onActivity: () => void,\n observe: typeof MutationObserver | undefined = typeof MutationObserver === 'function' ? MutationObserver : undefined,\n): () => void {\n if (observe === undefined) return () => undefined\n const observer = new observe(() => { onActivity() })\n try {\n observer.observe(target, { childList: true, characterData: true, subtree: true })\n } catch {\n return () => undefined\n }\n return () => { observer.disconnect() }\n}\n\nexport interface TaskWatcherLabels {\n readonly label: (kind: TaskNotifyKind, sessionLabel: string) => { title: string; body: string }\n /** Legacy DOM-only completion inference. Current gateways provide exact Host events. */\n readonly completionFallback?: boolean\n}\n\ninterface NativeBridgeHandle {\n capabilities(): Promise<readonly string[]>\n invoke(action: string, input?: unknown): Promise<unknown>\n}\n\nfunction readNativeBridge(): NativeBridgeHandle | undefined {\n if (typeof window === 'undefined') return undefined\n const bridge = (window as unknown as { __DSH_MOBILE_NATIVE__?: NativeBridgeHandle }).__DSH_MOBILE_NATIVE__\n if (bridge === undefined || typeof bridge.capabilities !== 'function' || typeof bridge.invoke !== 'function') return undefined\n return bridge\n}\n\nexport interface TaskNotifyWireEvent {\n readonly kind: TaskNotifyKind\n readonly title: string\n readonly body: string\n readonly tag: string\n}\n\n/** Parse a `task-notify` SSE payload; rejects anything malformed or empty. */\nexport function parseTaskNotifyPayload(value: unknown): { readonly sessionId: string; readonly turn: number } | undefined {\n let record: Record<string, unknown> | undefined\n if (typeof value === 'string') {\n try {\n const parsed: unknown = JSON.parse(value)\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) return undefined\n record = parsed as Record<string, unknown>\n } catch {\n return undefined\n }\n } else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {\n record = value as Record<string, unknown>\n } else return undefined\n if (typeof record.sessionId !== 'string' || record.sessionId.trim() === '') return undefined\n const turn = typeof record.turn === 'number' && Number.isSafeInteger(record.turn) && record.turn >= 0 ? record.turn : 0\n return Object.freeze({ sessionId: record.sessionId.slice(0, 128), turn })\n}\n\n/** Parse the small authenticated event used when the Host revokes this device. */\nexport function isDeviceRevokedPayload(value: unknown): boolean {\n let record: Record<string, unknown> | undefined\n if (typeof value === 'string') {\n try {\n const parsed: unknown = JSON.parse(value)\n if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) return false\n record = parsed as Record<string, unknown>\n } catch {\n return false\n }\n } else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {\n record = value as Record<string, unknown>\n } else return false\n return record.reason === 'device_revoked'\n}\n\n/** Tell the Android shell to transition the active record to the revoked state. */\nexport function fireDeviceRevoked(): boolean {\n const bridge = readNativeBridge()\n if (bridge === undefined) return false\n void bridge.invoke('device.revoked', {}).catch(() => undefined)\n return true\n}\n\n/**\n * Deliver one notification through the native bridge when available.\n * Returns false when there is no bridge (desktop browsers keep their own\n * UI) so callers can fall back; a denial flips the module sticky flag via\n * onDenied for the session-lifetime nag guard.\n */\nexport function fireTaskNotifyEvent(\n event: TaskNotifyWireEvent,\n onDenied?: () => void,\n): boolean {\n const bridge = readNativeBridge()\n if (bridge === undefined) return false\n void Promise.resolve()\n .then(() => bridge.capabilities())\n .then(capabilities => {\n if (!capabilities.includes('notification.notify')) return\n return bridge.invoke('notification.notify', { title: event.title, body: event.body, tag: event.tag })\n })\n .then(\n () => undefined,\n (error: unknown) => {\n const code = typeof error === 'object' && error !== null && 'code' in error ? String(error.code) : ''\n // A denial is sticky for this page load: never nag for permission.\n if ((code === 'permission_denied' || code === 'denied') && onDenied !== undefined) onDenied()\n },\n )\n return true\n}\n\n/**\n * Watch the rendered conversation for finished runs and waiting questions,\n * notifying through the native bridge while the page is hidden. Returns a\n * disposer. Silent when no native bridge exists (desktop browsers keep their\n * own UI) or after the user denies the permission.\n */\nexport function installTaskCompletionWatcher(options: TaskWatcherLabels): () => void {\n if (typeof document === 'undefined' || typeof window === 'undefined') return () => undefined\n const tracker = new TaskNotifyTracker({ format: options.label })\n const completionFallback = options.completionFallback ?? true\n let notifyBlocked = false\n let timer = 0\n let anchorTimer = 0\n\n const fire = (event: TaskNotifyEvent): void => {\n if (notifyBlocked) return\n if (!fireTaskNotifyEvent(event, () => { notifyBlocked = true })) return\n }\n const evaluateNow = (): void => {\n const busy = completionFallback && readComposerBusyState(document)\n const event = tracker.evaluate({\n pageHidden: document.hidden,\n pendingQuestion: hasPendingInputQuestion(document),\n questionKey: pendingInputQuestionKey(document),\n sessionLabel: readSessionLabel(document.title),\n composerBusy: busy,\n })\n if (event !== undefined) fire(event)\n scheduleAnchorTimer()\n }\n // The interval is only a backstop: an anchor schedules its own exact shot\n // so completion announces ~grace after the run ends instead of waiting out\n // the next coarse tick with no further mutations to wake it.\n const scheduleAnchorTimer = (): void => {\n const delay = tracker.pendingAnchorDelayMs()\n if (delay === undefined) {\n if (anchorTimer !== 0) {\n window.clearTimeout(anchorTimer)\n anchorTimer = 0\n }\n return\n }\n if (anchorTimer !== 0) return\n anchorTimer = window.setTimeout(() => {\n anchorTimer = 0\n evaluateNow()\n }, delay)\n }\n const disposeObservation = observeTaskActivity(document.documentElement, () => {\n if (completionFallback) tracker.markActivity()\n evaluateNow()\n })\n const onVisibility = (): void => { evaluateNow() }\n document.addEventListener('visibilitychange', onVisibility)\n if (typeof window.setInterval === 'function') {\n timer = window.setInterval(evaluateNow, 15_000)\n }\n evaluateNow()\n return () => {\n disposeObservation()\n document.removeEventListener('visibilitychange', onVisibility)\n if (timer !== 0) window.clearInterval(timer)\n if (anchorTimer !== 0) window.clearTimeout(anchorTimer)\n }\n}\n","/**\n * Viewport below which the injected chrome becomes an overlay drawer: the\n * sidebar slides in as a sheet, the right panel as a drawer, and the scrim dims\n * the page behind them. The stylesheet and the scrim's visibility both read\n * this query, so a wider viewport never grows drawer chrome whose rules cannot\n * style it.\n */\nimport { installTaskCompletionWatcher, type TaskNotifyKind } from './task-notify.js'\n\nexport const NATIVE_MOBILE_OVERLAY_QUERY = '(max-width:720px)'\n\n/** Mobile feature and compatibility rules applied to DSH React surfaces. */\nexport const NATIVE_MOBILE_STYLES = `\n/* The surface appends chrome to <body> on every non-loopback page load, but\n every rule that gives that chrome a box lives inside the overlay query\n below. Outside the query the scrim kept the UA button box: an empty,\n nameless button in normal flow at the document's bottom-left, whose click\n still collapsed the sidebar. Keep the neutral state explicitly invisible —\n the query restores the fixed scrim, and its more specific [hidden] rule\n keeps winning there. */\n .dsh-native-mobile-backdrop,.dsh-mobile-branch-toast,.dsh-mobile-media-toast { display:none; }\n .dsh-mobile-settings_row { display:flex; align-items:center; gap:8px; padding:16px 0; border-bottom:0.5px solid var(--dsw-alias-border-l2); }\n .dsh-mobile-settings_rowText { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; padding-right:48px; }\n .dsh-mobile-settings_title { color:var(--dsw-alias-label-primary); font-size:14px; font-weight:400; line-height:22px; }\n .dsh-mobile-settings_desc { color:var(--dsw-alias-label-tertiary); font-size:12px; font-weight:400; line-height:18px; }\n .dsh-mobile-settings_selector { display:inline-flex; align-items:center; justify-content:center; min-width:max-content; height:36px; padding:0 14px; border:0; border-radius:18px; background:var(--dsw-alias-bg-module-platform); color:var(--dsw-alias-label-primary); font:inherit; font-size:14px; line-height:22px; cursor:pointer; }\n .dsh-mobile-settings_selector:hover:not(:disabled) { background:var(--dsw-alias-interactive-bg-hover); }\n .dsh-mobile-settings_selector:disabled { cursor:wait; opacity:.55; }\n@media ${NATIVE_MOBILE_OVERLAY_QUERY} {\n html.dsh-native-mobile-active,html.dsh-native-mobile-active body { width:100%; height:100%; overflow:hidden; }\n html.dsh-native-mobile-active { --dsh-mobile-motion-duration:200ms; --dsh-mobile-motion-ease:cubic-bezier(.22,1,.36,1); }\n html.dsh-native-mobile-active :is(a,button,[role=\"button\"],[role=\"tab\"],[tabindex]) { -webkit-tap-highlight-color:transparent; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [role=\"treeitem\"] { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }\n html.dsh-native-mobile-active[data-dsh-mobile-input=\"touch\"] :is(a,button,[role=\"button\"],[role=\"tab\"],[tabindex]):focus { outline:none !important; }\n html.dsh-native-mobile-active [role=\"tooltip\"] { display:none !important; }\n /* Touch has no persistent hover affordance: keep workspace rows neutral after a tap. */\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] { --dsw-alias-interactive-bg-hover:transparent !important; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [role=\"treeitem\"]:is(:hover,:active,:focus,[aria-selected=\"true\"]),\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_sessionRow\"][class*=\"_selected\"],\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_searchResultRow\"][class*=\"_selected\"] { background:transparent !important; outline:0 !important; box-shadow:none !important; }\n /* Sidebar row menus are hover-only on desktop. Touch has no hover, so keep\n the ellipsis action visible and give it a reliable hit target. */\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_rowActions\"] { display:inline-flex !important; align-items:center !important; gap:8px !important; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_sessionRow\"] [class*=\"_time\"] { display:none !important; }\n html.dsh-native-mobile-active [data-dsh-mobile-sidebar] [class*=\"_rowActions\"] button { box-sizing:border-box !important; width:32px !important; min-width:32px !important; height:32px !important; min-height:32px !important; }\n [data-dsh-mobile-frame] { grid-template-columns:0 minmax(0,1fr) 0 !important; width:100% !important; height:100dvh !important; overflow:hidden !important; }\n [data-dsh-mobile-center] { grid-column:2 !important; width:100vw !important; min-width:0 !important; }\n [data-dsh-mobile-center] > * { min-width:0 !important; }\n [data-dsh-mobile-header] { box-sizing:border-box !important; width:calc(100% - 16px) !important; margin:0 8px !important; min-width:0; padding-top:max(4px,env(safe-area-inset-top)) !important; padding-right:8px !important; padding-left:42px !important; }\n [data-dsh-mobile-header] [class*=\"_titleRow\"] { box-sizing:border-box !important; display:flex !important; align-items:center !important; min-width:0; min-height:32px !important; height:32px !important; gap:6px !important; padding:0 6px !important; }\n [data-dsh-mobile-header] [class*=\"_titleCluster\"] { min-width:0; }\n [data-dsh-mobile-header] [class*=\"_crumbs\"] { min-width:0; overflow:hidden; }\n [data-dsh-mobile-header] [class*=\"_crumb\"] { max-width:46vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n [data-dsh-mobile-header] [class*=\"_headerActions\"] { min-width:0; overflow-x:auto; scrollbar-width:none; }\n [data-dsh-mobile-header] [class*=\"_headerActions\"]::-webkit-scrollbar { display:none; }\n [data-dsh-mobile-header] [class*=\"_headerUtilities\"] { gap:2px !important; }\n [data-dsh-mobile-header] [class*=\"_sessionLogButton\"] { width:40px; min-width:40px; padding:0 !important; overflow:hidden; color:transparent; font-size:0 !important; }\n [data-dsh-mobile-header] [class*=\"_sessionLogButton\"] > * { display:none !important; }\n [data-dsh-mobile-header] [class*=\"_sessionLogButton\"]::after { color:var(--dsw-alias-label-primary, #171a21); content:\"Log\"; font-size:11px; font-weight:600; }\n html[data-dsh-mobile-language=\"zh\"] [data-dsh-mobile-header] [class*=\"_sessionLogButton\"]::after { content:\"日志\"; }\n [data-dsh-mobile-header] [class*=\"_tabs\"] { box-sizing:border-box !important; width:max-content !important; max-width:calc(100% - 58px) !important; min-height:28px !important; height:28px !important; margin-top:0 !important; padding-left:6px !important; padding-right:6px !important; overflow-x:auto; scrollbar-width:none; }\n [data-dsh-mobile-header] [class*=\"_tab\"] { padding-bottom:5px !important; }\n [data-dsh-mobile-header] [class*=\"_tabs\"]::-webkit-scrollbar { display:none; }\n [data-dsh-mobile-sidebar] { position:fixed !important; z-index:240 !important; inset:0 auto 0 0 !important; width:0 !important; overflow:visible !important; }\n [data-dsh-mobile-sidebar-root] { position:fixed !important; z-index:241 !important; inset:max(env(safe-area-inset-top),0px) auto 0 0 !important; height:auto !important; transition:width 180ms var(--dsh-mobile-motion-ease),box-shadow 180ms ease !important; }\n [data-dsh-mobile-sidebar][data-open=\"true\"] [data-dsh-mobile-sidebar-root] { width:min(88vw,340px) !important; padding-top:0 !important; box-shadow:18px 0 46px rgb(15 23 42 / 18%); }\n [data-dsh-mobile-sidebar][data-open=\"true\"] [data-dsh-mobile-sidebar-root] [class*=\"_logoRow\"] { height:52px !important; padding:4px 0 4px 4px !important; margin-bottom:4px !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] { width:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; overflow:visible !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] > :not(:has([data-dsh-mobile-toggle])) { display:none !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] > :has([data-dsh-mobile-toggle]) { position:fixed !important; z-index:244 !important; top:env(safe-area-inset-top) !important; left:0 !important; box-sizing:border-box !important; width:50px !important; height:52px !important; padding:4px !important; border:0 !important; background:transparent !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-sidebar-root] > :has([data-dsh-mobile-toggle]) > :not([data-dsh-mobile-toggle]) { display:none !important; }\n /* The stock settings shell is mounted under the collapsed sidebar. Let\n its fixed overlay escape the zero-width drawer while it is open. */\n [data-dsh-mobile-sidebar]:has([data-dsh-mobile-settings]) { width:100vw !important; inset:0 !important; }\n [data-dsh-mobile-sidebar]:has([data-dsh-mobile-settings]) > * { width:100vw !important; overflow:visible !important; }\n [data-dsh-mobile-toggle] { width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important; }\n [data-dsh-mobile-sidebar][data-open=\"false\"] [data-dsh-mobile-toggle] > svg[class*=\"_railFish\"] { transform:translateY(-4px) !important; }\n .dsh-native-mobile-backdrop { display:block; position:fixed; z-index:235; inset:env(safe-area-inset-top) 0 0; border:0; background:rgb(15 23 42 / 32%); }\n .dsh-native-mobile-backdrop:not([hidden]) { animation:dsh-mobile-fade-in var(--dsh-mobile-motion-duration) ease-out; }\n .dsh-native-mobile-backdrop[hidden] { display:none; }\n [data-dsh-mobile-details] { position:fixed !important; z-index:250 !important; inset:0 0 0 auto !important; width:min(94vw,460px) !important; max-width:none !important; transform:translateX(100%); transition:transform var(--dsh-mobile-motion-duration) var(--dsh-mobile-motion-ease); background:var(--dsw-alias-bg-layer-1, #fff); box-shadow:-18px 0 46px rgb(15 23 42 / 18%); }\n [data-dsh-mobile-details][data-open=\"true\"] { transform:translateX(0); }\n [data-dsh-mobile-handle] { display:none !important; }\n [data-dsh-mobile-settings] { flex-direction:column !important; width:100vw !important; height:100dvh !important; max-width:none !important; border-radius:0 !important; animation:dsh-mobile-panel-in var(--dsh-mobile-motion-duration) var(--dsh-mobile-motion-ease); }\n [data-dsh-mobile-settings-nav] { flex:none !important; width:100% !important; padding:max(14px,env(safe-area-inset-top)) 12px 8px !important; gap:10px !important; border-bottom:1px solid var(--dsw-alias-border-l2,#e8ebef); }\n [data-dsh-mobile-settings-nav] [class*=\"_navTitle\"] { padding:0 8px !important; font-size:18px !important; line-height:28px !important; }\n [data-dsh-mobile-settings-list] { flex-direction:row !important; gap:4px !important; overflow-x:auto !important; scrollbar-width:none; }\n [data-dsh-mobile-settings-list]::-webkit-scrollbar { display:none; }\n [data-dsh-mobile-settings-list] [class*=\"_navCell\"] { flex:0 0 auto !important; min-width:max-content !important; height:44px !important; padding:10px 12px !important; }\n [data-dsh-mobile-settings-list] [aria-current=\"true\"] { border-color:transparent !important; outline:0 !important; box-shadow:none !important; }\n [data-dsh-mobile-settings-content] { flex:1 1 auto !important; width:100% !important; min-height:0 !important; }\n [data-dsh-mobile-settings-header] { height:48px !important; min-height:48px !important; padding:10px 12px 6px !important; }\n [data-dsh-mobile-settings-header] [class*=\"_close\"] { width:36px !important; height:36px !important; }\n [data-dsh-mobile-settings-options] { box-sizing:border-box !important; width:100% !important; padding:4px 16px max(24px,env(safe-area-inset-bottom)) !important; overflow-x:hidden !important; }\n [data-dsh-mobile-settings-options] > * { width:100% !important; min-width:0 !important; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] > [class*=\"_row\"] { flex-direction:column !important; align-items:stretch !important; gap:12px !important; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] [class*=\"_rowText\"] { width:100% !important; padding-right:0 !important; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] [class*=\"_selector\"] { box-sizing:border-box !important; align-self:flex-start !important; justify-content:space-between !important; min-width:0 !important; min-height:44px !important; max-width:100% !important; }\n [data-dsh-mobile-settings-options] :is(input,select,textarea,button) { max-width:100%; }\n [data-dsh-mobile-settings-options] :is(input,select,textarea) { box-sizing:border-box; width:100%; min-width:0; }\n [data-dsh-mobile-settings-options] [class*=\"_head\"] { min-width:0; flex-wrap:wrap; }\n /* Provider names may shrink, but their edit/delete actions remain horizontal\n and retain a full touch target on narrow screens. */\n [data-dsh-mobile-settings-options] [class*=\"_rowHead\"]:has(> [class*=\"_rowIdentity\"]) { flex-wrap:nowrap !important; align-items:center !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowIdentity\"] { flex:1 1 auto !important; min-width:0 !important; overflow:hidden !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowName\"] { min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowActions\"] { flex:0 0 auto !important; flex-wrap:nowrap !important; width:max-content !important; min-width:max-content !important; max-width:none !important; }\n [data-dsh-mobile-settings-options] [class*=\"_rowActions\"] button { flex:none !important; width:auto !important; min-width:44px !important; max-width:none !important; min-height:44px !important; padding-inline:10px !important; white-space:nowrap !important; word-break:keep-all !important; writing-mode:horizontal-tb !important; }\n [data-dsh-mobile-settings-content][data-dsh-mobile-view-transition=\"true\"],\n [data-dsh-mobile-view][data-dsh-mobile-view-transition=\"true\"] { animation:dsh-mobile-view-in var(--dsh-mobile-motion-duration) var(--dsh-mobile-motion-ease); }\n [data-dsh-mobile-center] textarea { font-size:16px !important; }\n /* Markdown tables use content-sized columns. Small tables fill the phone;\n wider tables keep readable cells and scroll inside their own region. */\n [data-dsh-mobile-table-scroll] { box-sizing:border-box; width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }\n [data-dsh-mobile-table-scroll] table { display:table !important; width:max-content !important; min-width:100% !important; max-width:none !important; table-layout:auto !important; }\n [data-dsh-mobile-table-scroll] :is(th,td) { box-sizing:border-box; min-width:8ch; max-width:32ch; overflow-wrap:anywhere; word-break:break-word; vertical-align:top; }\n [data-dsh-mobile-center] pre { max-width:100%; overflow-x:auto; }\n [data-dsh-mobile-center] :is(img,video,canvas,svg) { max-width:100%; }\n [data-dsh-mobile-message-scroll] { box-sizing:border-box !important; width:100% !important; padding:8px 10px 20px !important; }\n [data-dsh-mobile-history-loader] { position:relative !important; min-height:1px !important; }\n [data-dsh-mobile-history-loader] button:not(:disabled) { position:absolute !important; width:1px !important; height:1px !important; margin:-1px !important; padding:0 !important; clip-path:inset(50%) !important; opacity:0 !important; overflow:hidden !important; pointer-events:none !important; }\n [data-dsh-mobile-history-loader] button:disabled { min-height:28px !important; padding:4px 12px !important; }\n [data-dsh-mobile-message-column] { box-sizing:border-box !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; gap:10px !important; }\n [data-dsh-mobile-message-column] > * { width:100% !important; max-width:100% !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] { box-sizing:border-box !important; display:grid !important; grid-template-columns:16px minmax(0,1fr) !important; grid-auto-rows:auto !important; align-items:center !important; column-gap:6px !important; width:100% !important; height:auto !important; min-height:40px !important; padding:4px 0 !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > [class*=\"_leading\"] { grid-column:1 !important; grid-row:1 !important; margin-right:0 !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > [class*=\"_title\"] { grid-column:2 !important; grid-row:1 !important; min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > :is([class*=\"_sep\"],[class*=\"_separator\"]) { display:none !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > :is([class*=\"_summary\"],[class*=\"_fileLink\"]) { grid-column:2 !important; grid-row:2 !important; width:100% !important; min-width:0 !important; max-width:100% !important; overflow:hidden !important; line-height:19px !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-message-column] [data-disclosure-row] > [class*=\"_summarySuffix\"] { grid-column:2 !important; grid-row:3 !important; margin-left:0 !important; }\n [data-dsh-mobile-message-column] [data-context-fields] > * { display:grid !important; grid-template-columns:minmax(72px,30%) minmax(0,1fr) !important; gap:4px 10px !important; }\n [data-dsh-mobile-message-column] [class*=\"_ioSection\"] { grid-template-columns:1fr !important; row-gap:4px !important; }\n [data-dsh-mobile-message-column] [class*=\"_body\"] { max-width:100% !important; overflow-wrap:anywhere; }\n /* Keep folded and expanded reasoning visually separate from the reply. */\n [data-dsh-mobile-message-column] [class*=\"_body\"] > div:has(> [data-variant=\"think\"]) { margin-bottom:12px !important; }\n [data-dsh-mobile-center] [data-composer-card] ~ [class*=\"_root\"],\n [data-dsh-mobile-center] [data-composer-card] ~ * [class*=\"_root\"] { box-sizing:border-box !important; width:100% !important; max-width:100% !important; margin-bottom:-6px !important; padding:3px 4px 0 !important; font-size:11px !important; line-height:18px !important; white-space:normal !important; overflow:visible !important; text-overflow:clip !important; }\n [data-dsh-mobile-center] [data-composer-card] ~ [class*=\"_root\"] [class*=\"_sep\"],\n [data-dsh-mobile-center] [data-composer-card] ~ * [class*=\"_root\"] [class*=\"_sep\"] { margin:0 6px !important; }\n /* Composer dock stats strip (turns/steps/tokens) reads small on phones. */\n [data-dsh-mobile-center] [data-slot=\"conversation.composer.dock\"] [class*=\"_root\"] { font-size:10px !important; line-height:16px !important; }\n /* Message runtime details are inline on desktop. Give the clock/runtime\n label its own wrapping row on narrow screens so TTFT and throughput do\n not push the action buttons or clip at the viewport edge. */\n [data-dsh-mobile-center] [class*=\"_actions\"]:has(> [class*=\"_timeStart\"]),\n [data-dsh-mobile-center] [class*=\"_actions\"]:has(> [class*=\"_timeEnd\"]) { box-sizing:border-box !important; width:100% !important; flex-wrap:wrap !important; justify-content:flex-end !important; height:auto !important; min-height:28px !important; row-gap:2px !important; }\n [data-dsh-mobile-center] [class*=\"_timeStart\"],\n [data-dsh-mobile-center] [class*=\"_timeEnd\"] { box-sizing:border-box !important; flex:1 1 100% !important; order:2 !important; min-width:0 !important; max-width:100% !important; padding:0 !important; line-height:20px !important; text-align:center !important; white-space:normal !important; overflow-wrap:anywhere !important; }\n [data-dsh-mobile-center] [class*=\"_timeStart\"] { box-sizing:border-box !important; flex:1 1 100% !important; order:2 !important; min-width:0 !important; max-width:100% !important; padding:0 !important; line-height:20px !important; text-align:center !important; white-space:normal !important; overflow-wrap:anywhere !important; }\n [data-dsh-mobile-center] [class*=\"_timeStart\"] [class*=\"_runTimeDot\"],\n [data-dsh-mobile-center] [class*=\"_timeEnd\"] [class*=\"_runTimeDot\"] { margin:0 6px !important; }\n /* Keep the context meter's legend rows as readable label/value pairs.\n Generic mobile flex rules can otherwise place the rows side by side and\n break Chinese labels in the middle of a word. */\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"],\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] { width:min(264px,calc(100vw - 32px)) !important; min-width:0 !important; max-width:calc(100vw - 32px) !important; }\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"] [class*=\"_rows\"],\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] [class*=\"_rows\"] { display:block !important; }\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"] [class*=\"_rows\"] > [class*=\"_row\"],\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] [class*=\"_rows\"] > [class*=\"_row\"] { display:flex !important; align-items:center !important; justify-content:space-between !important; width:100% !important; min-width:0 !important; white-space:nowrap !important; }\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"上下文\"] :is(dt,dd),\n [data-dsh-mobile-center] [role=\"dialog\"][aria-label*=\"Context\"] :is(dt,dd) { white-space:nowrap !important; word-break:keep-all !important; }\n .dsh-mobile-branch-toast,.dsh-mobile-media-toast { display:block; position:fixed; z-index:330; top:max(12px,env(safe-area-inset-top)); left:50%; max-width:calc(100vw - 32px); box-sizing:border-box; padding:7px 14px; border:1px solid rgb(15 23 42 / 10%); border-radius:999px; background:rgb(15 23 42 / 92%); color:#fff; font-size:13px; line-height:20px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; opacity:0; pointer-events:none; transform:translate(-50%,-8px); transition:opacity 160ms ease,transform 160ms ease; }\n .dsh-mobile-branch-toast[data-visible=\"true\"],.dsh-mobile-media-toast[data-visible=\"true\"] { opacity:1; transform:translate(-50%,0); }\n /* Fallback only: when the native Add group has no item to clone, keep the\n camera action on the same row metrics and tokens as the native menu. */\n .dsh-mobile-media-action { box-sizing:border-box; display:flex; align-items:center; justify-content:flex-start; gap:8px; width:100%; min-width:0; min-height:40px; padding:8px 10px; border:0; border-radius:10px; background:transparent; color:var(--dsw-alias-label-primary,inherit); cursor:pointer; font:inherit; font-size:14px; line-height:22px; text-align:left; touch-action:manipulation; }\n .dsh-mobile-media-action:active { opacity:.72; }\n .dsh-mobile-media-action:focus-visible { outline:2px solid var(--dsw-alias-state-business-primary,#4c82f7); outline-offset:1px; }\n .dsh-mobile-media-action:disabled { cursor:default; opacity:.38; }\n .dsh-mobile-media-action svg { flex:none; width:16px; height:16px; color:var(--dsw-alias-label-tertiary,currentColor); }\n .dsh-mobile-media-action span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n [data-dsh-mobile-center] [class*=\"_composer\"] { padding-left:8px !important; padding-right:8px !important; padding-bottom:max(8px,env(safe-area-inset-bottom)) !important; }\n /* The desktop composer intentionally wraps whole toolbar groups. On a phone,\n dynamic model and status labels made that row alternate between one and\n two lines. Keep two stable columns and let only the model label shrink. */\n [data-dsh-mobile-composer-row] { display:grid !important; grid-template-columns:max-content minmax(0,1fr) !important; align-items:center !important; gap:4px 8px !important; }\n [data-dsh-mobile-composer-tools] { display:flex !important; flex-wrap:nowrap !important; width:max-content !important; min-width:0 !important; max-width:max-content !important; gap:6px !important; }\n [data-dsh-mobile-composer-trailing] { display:flex !important; flex-wrap:nowrap !important; width:100% !important; min-width:0 !important; max-width:100% !important; gap:6px !important; margin-left:0 !important; justify-content:flex-end !important; }\n [data-dsh-mobile-composer-model] { flex:1 1 0 !important; width:auto !important; min-width:0 !important; max-width:none !important; }\n [data-dsh-mobile-composer-model-trigger] { box-sizing:border-box !important; width:100% !important; max-width:100% !important; min-width:0 !important; padding-left:6px !important; padding-right:4px !important; }\n [data-dsh-mobile-composer-model-label] { flex:1 1 auto !important; max-width:none !important; min-width:0 !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }\n [data-dsh-mobile-center] [class*=\"_root\"]:has(> [class*=\"_card\"] textarea) { box-sizing:border-box !important; width:100% !important; padding:0 0 8px !important; }\n [data-dsh-mobile-center] [class*=\"_root\"]:has(> [class*=\"_card\"] textarea) > [class=\"\"]:last-child { display:none !important; }\n}\n@keyframes dsh-mobile-fade-in { from { opacity:0; } }\n@keyframes dsh-mobile-panel-in { from { opacity:.72; transform:translateY(6px); } }\n@keyframes dsh-mobile-view-in { from { opacity:.58; transform:translateY(5px); } }\n@media (max-width:420px) {\n [data-dsh-mobile-header] [class*=\"_headerActions\"] { max-width:42vw; }\n [data-dsh-mobile-settings-options] [data-slot=\"settings.general.item\"] [class*=\"_selector\"] { align-self:stretch !important; width:100% !important; }\n [data-dsh-mobile-message-column] [data-context-fields] > * { grid-template-columns:1fr !important; }\n}\n@media (prefers-reduced-motion:reduce) {\n [data-dsh-mobile-sidebar-root],[data-dsh-mobile-details] { transition:none !important; }\n .dsh-native-mobile-backdrop:not([hidden]),[data-dsh-mobile-settings],\n [data-dsh-mobile-settings-content][data-dsh-mobile-view-transition=\"true\"],\n [data-dsh-mobile-view][data-dsh-mobile-view-transition=\"true\"] { animation:none !important; }\n}\n`\n\nfunction classToken(element: Element, suffix: string): boolean {\n return Array.from(element.classList).some(value => value.endsWith(suffix))\n}\n\nfunction firstByClassSuffix(root: ParentNode, suffix: string): HTMLElement | undefined {\n return Array.from(root.querySelectorAll<HTMLElement>('[class]')).find(element => classToken(element, suffix))\n}\n\n/** Find the stock DSH application frame without mistaking a feature card for the shell. */\nexport function resolveNativeMobileFrame(root: ParentNode, dedicatedCenter: HTMLElement | undefined): HTMLElement | undefined {\n if (dedicatedCenter !== undefined) return undefined\n return Array.from(root.querySelectorAll<HTMLElement>('[class]')).find(candidate => {\n return classToken(candidate, '_frame')\n && firstByClassSuffix(candidate, '_sidebarCol') !== undefined\n && firstByClassSuffix(candidate, '_centerCol') !== undefined\n })\n}\n\n/** Mark every mounted settings dialog so its mobile layout does not depend on the conversation shell. */\nexport function markNativeMobileSettings(root: ParentNode): number {\n let marked = 0\n for (const dialog of root.querySelectorAll<HTMLElement>('[role=\"dialog\"]')) {\n const children = Array.from(dialog.children) as HTMLElement[]\n const nav = children.find(child => classToken(child, '_nav'))\n const content = children.find(child => classToken(child, '_content'))\n if (nav === undefined || content === undefined) continue\n dialog.dataset.dshMobileSettings = 'true'\n nav.dataset.dshMobileSettingsNav = 'true'\n content.dataset.dshMobileSettingsContent = 'true'\n firstByClassSuffix(nav, '_navList')?.setAttribute('data-dsh-mobile-settings-list', 'true')\n firstByClassSuffix(content, '_header')?.setAttribute('data-dsh-mobile-settings-header', 'true')\n firstByClassSuffix(content, '_options')?.setAttribute('data-dsh-mobile-settings-options', 'true')\n marked += 1\n }\n return marked\n}\n\nconst AUTO_HISTORY_THRESHOLD_PX = 64\n\nexport type NativeMobileLanguage = 'it' | 'en' | 'zh'\n\ninterface FileDropTarget { dispatchEvent(event: Event): boolean }\n\nfunction controlledFileDragEvent(type: 'dragover' | 'drop', files: readonly File[], initialDropEffect: DataTransfer['dropEffect']): DragEvent {\n const event = new Event(type, { bubbles: true, cancelable: true }) as DragEvent\n const dataTransfer = {\n dropEffect: initialDropEffect,\n effectAllowed: 'copy',\n files: Object.freeze([...files]),\n types: Object.freeze(['Files']),\n } as unknown as DataTransfer\n Object.defineProperty(event, 'dataTransfer', { value: dataTransfer })\n return event\n}\n\n/** Ask the official document dragover listener whether the current composer accepts files. */\nexport function preflightComposerImageDrop(target: FileDropTarget, files: readonly File[]): boolean {\n if (files.length === 0) return false\n const event = controlledFileDragEvent('dragover', files, 'none')\n target.dispatchEvent(event)\n return event.dataTransfer?.dropEffect === 'copy'\n}\n\n/** Dispatch a real drop only after a fresh official-listener preflight; the result is not an attachment ACK. */\nexport function dispatchComposerImageDrop(target: FileDropTarget, files: readonly File[]): boolean {\n if (!preflightComposerImageDrop(target, files)) return false\n target.dispatchEvent(controlledFileDragEvent('drop', files, 'copy'))\n return true\n}\n\n/** Apply the resolved locale independently from the document's possibly different lang attribute. */\nexport function applyNativeMobileLanguageMarker(root: Pick<HTMLElement, 'dataset'>, language: NativeMobileLanguage): () => void {\n const previous = root.dataset.dshMobileLanguage\n root.dataset.dshMobileLanguage = language\n return () => {\n if (root.dataset.dshMobileLanguage !== language) return\n if (previous === undefined) delete root.dataset.dshMobileLanguage\n else root.dataset.dshMobileLanguage = previous\n }\n}\n\n/** Resolve the supported language used by native-mobile controls. */\nexport function resolveNativeMobileLanguage(\n documentLanguage: string,\n browserLanguages: readonly string[],\n): NativeMobileLanguage {\n return [documentLanguage, ...browserLanguages]\n .map(value => value.trim().toLowerCase().split(/[-_]/u)[0])\n .find((value): value is NativeMobileLanguage => value === 'it' || value === 'en' || value === 'zh') ?? 'en'\n}\n\n/** Whether a user-driven scroll moved upward into the automatic history-loading zone. */\nexport function shouldAutoLoadEarlier(previousTop: number, currentTop: number): boolean {\n return currentTop <= AUTO_HISTORY_THRESHOLD_PX && currentTop < previousTop - 0.5\n}\n\n/**\n * Whether the overlay scrim belongs on screen. The scrim exists for the\n * slide-in drawer only — it dims the page and catches the tap that closes the\n * drawer — so it is shown while that drawer is open *and* the overlay query is\n * in force. `hidden` carries the whole decision rather than the width rules\n * alone: the attribute still hides the element when the injected stylesheet\n * never lands (a CSP without inline styles, a shell that drops the <style>\n * node), where the element would otherwise fall back to the UA button box.\n */\nexport function drawerScrimVisible(sidebarCollapsed: boolean, overlayActive: boolean): boolean {\n return !sidebarCollapsed && overlayActive\n}\n\ninterface ComposerMediaOrigin {\n readonly generation: number\n readonly href: string\n readonly composer: object | null\n readonly sessionRoot: object | null\n readonly sessionId: string | null\n}\n\n/** Check that an asynchronous picker result still belongs to its originating session and composer. */\nexport function isComposerMediaOriginCurrent(\n origin: ComposerMediaOrigin,\n current: ComposerMediaOrigin & { readonly disposed: boolean; readonly composerConnected: boolean },\n): boolean {\n return !current.disposed\n && origin.generation === current.generation\n && origin.href === current.href\n && origin.composer !== null\n && current.composerConnected\n && origin.composer === current.composer\n && origin.sessionRoot !== null\n && origin.sessionRoot === current.sessionRoot\n && origin.sessionId !== null\n && origin.sessionId === current.sessionId\n}\n\n/** Add mobile semantics without replacing feature trees. */\nexport function installNativeMobileSurface(): () => void {\n document.documentElement.classList.add('dsh-native-mobile-active')\n const browserLanguages = navigator.languages.length > 0 ? navigator.languages : [navigator.language]\n const language = resolveNativeMobileLanguage(document.documentElement.lang, browserLanguages)\n const restoreLanguageMarker = applyNativeMobileLanguageMarker(document.documentElement, language)\n const label = (italian: string, english: string, chinese: string): string => language === 'it' ? italian : language === 'zh' ? chinese : english\n const mediaIcon = (): SVGSVGElement => {\n const namespace = 'http://www.w3.org/2000/svg'\n const icon = document.createElementNS(namespace, 'svg')\n icon.setAttribute('viewBox', '0 0 16 16')\n icon.setAttribute('fill', 'none')\n icon.setAttribute('aria-hidden', 'true')\n const body = document.createElementNS(namespace, 'path')\n body.setAttribute('d', 'M5.15 3.2 6.05 2h3.9l.9 1.2h1.45c1.05 0 1.9.85 1.9 1.9v6c0 1.05-.85 1.9-1.9 1.9H3.7a1.9 1.9 0 0 1-1.9-1.9v-6c0-1.05.85-1.9 1.9-1.9h1.45Zm-1.45 1.3a.6.6 0 0 0-.6.6v6c0 .33.27.6.6.6h8.6a.6.6 0 0 0 .6-.6v-6a.6.6 0 0 0-.6-.6h-2.1l-.9-1.2H6.7l-.9 1.2H3.7Z')\n body.setAttribute('fill', 'currentColor')\n const lens = document.createElementNS(namespace, 'circle')\n lens.setAttribute('cx', '8')\n lens.setAttribute('cy', '8.1')\n lens.setAttribute('r', '2.15')\n lens.setAttribute('stroke', 'currentColor')\n lens.setAttribute('stroke-width', '1.3')\n icon.append(body, lens)\n return icon\n }\n const createMediaAction = (text: string): HTMLButtonElement => {\n const button = document.createElement('button')\n button.type = 'button'\n button.className = 'dsh-mobile-media-action'\n button.lang = language\n button.dataset.dshMobileMediaAction = 'camera'\n const icon = document.createElement('span')\n icon.append(mediaIcon())\n button.append(icon)\n const caption = document.createElement('span')\n caption.textContent = text\n button.append(caption)\n return button\n }\n const setInputMode = (mode: 'keyboard' | 'touch'): void => {\n document.documentElement.dataset.dshMobileInput = mode\n }\n const onPointerDown = (event: PointerEvent): void => {\n if (event.pointerType === 'touch' || event.pointerType === 'pen') setInputMode('touch')\n }\n const onKeyDown = (event: KeyboardEvent): void => {\n if (event.key === 'Tab' || event.key.startsWith('Arrow')) setInputMode('keyboard')\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n document.addEventListener('keydown', onKeyDown, true)\n // The scrim is drawer chrome: it belongs on screen only while the overlay\n // query matches. A resize crosses that breakpoint without touching the DOM\n // the observer below watches, so the query wakes the same sync pass itself.\n const overlayQuery = window.matchMedia(NATIVE_MOBILE_OVERLAY_QUERY)\n const backdrop = document.createElement('button')\n backdrop.type = 'button'\n backdrop.className = 'dsh-native-mobile-backdrop'\n backdrop.lang = language\n backdrop.hidden = true\n backdrop.setAttribute('aria-label', label('Chiudi navigazione area di lavoro', 'Close workspace navigation', '关闭工作区导航'))\n document.body.append(backdrop)\n const branchToast = document.createElement('div')\n branchToast.className = 'dsh-mobile-branch-toast'\n branchToast.lang = language\n branchToast.setAttribute('role', 'status')\n branchToast.setAttribute('aria-live', 'polite')\n document.body.append(branchToast)\n const mediaToast = document.createElement('div')\n mediaToast.className = 'dsh-mobile-media-toast'\n mediaToast.lang = language\n mediaToast.setAttribute('role', 'status')\n mediaToast.setAttribute('aria-live', 'polite')\n document.body.append(mediaToast)\n const cameraButton = createMediaAction(label('Scatta foto', 'Take photo', '拍照'))\n cameraButton.disabled = true\n let branchToastTimer = 0\n let mediaToastTimer = 0\n const showMediaToast = (message: string): void => {\n mediaToast.textContent = message\n mediaToast.dataset.visible = 'true'\n if (mediaToastTimer !== 0) window.clearTimeout(mediaToastTimer)\n mediaToastTimer = window.setTimeout(() => {\n mediaToast.removeAttribute('data-visible')\n mediaToastTimer = 0\n }, 2200)\n }\n let mediaRequestGeneration = 0\n let disposed = false\n let boundComposer: Element | null = null\n let boundSessionRoot: Element | null = null\n let boundSessionId: string | null = null\n const preflightFile = new File([], 'dsh-mobile-preflight.png', { type: 'image/png' })\n const canAcceptComposerDrop = (): boolean => preflightComposerImageDrop(document, [preflightFile])\n const mediaPickerAbortController = new AbortController()\n const browserPickerCleanups = new Set<() => void>()\n const sessionTokens = new WeakMap<Element, string>()\n let nextSessionToken = 0\n type MediaRequestContext = ComposerMediaOrigin & { readonly composer: Element | null; readonly sessionRoot: Element | null }\n const currentSessionOrigin = (): { readonly sessionRoot: Element | null; readonly sessionId: string | null } => {\n const dedicatedRoot = boundComposer?.closest('[data-dsh-mobile-session]') ?? null\n const dedicatedId = dedicatedRoot?.getAttribute('data-dsh-mobile-session')\n if (dedicatedRoot !== null && typeof dedicatedId === 'string' && dedicatedId !== '') {\n return { sessionRoot: dedicatedRoot, sessionId: dedicatedId }\n }\n const selectedRow = document.querySelector<Element>('[role=\"treeitem\"][aria-selected=\"true\"]')\n if (selectedRow === null) return { sessionRoot: null, sessionId: null }\n let token = sessionTokens.get(selectedRow)\n if (token === undefined) { token = `stock-${String(++nextSessionToken)}`; sessionTokens.set(selectedRow, token) }\n const identity = selectedRow.getAttribute('data-session-id')\n ?? selectedRow.getAttribute('aria-label')\n ?? selectedRow.textContent?.trim()\n ?? ''\n return { sessionRoot: selectedRow, sessionId: `${token}:${identity}` }\n }\n const mediaRequestContext = (): MediaRequestContext => {\n const session = currentSessionOrigin()\n return {\n generation: ++mediaRequestGeneration,\n href: window.location.href,\n composer: boundComposer,\n ...session,\n }\n }\n const mediaRequestIsCurrent = (context: MediaRequestContext): boolean => {\n const session = currentSessionOrigin()\n const composer = boundComposer\n return isComposerMediaOriginCurrent(context, {\n generation: mediaRequestGeneration,\n href: window.location.href,\n composer,\n sessionRoot: session.sessionRoot,\n sessionId: session.sessionId,\n disposed,\n composerConnected: context.composer?.isConnected === true,\n })\n }\n const deliverImages = (files: readonly File[], context: ReturnType<typeof mediaRequestContext>): void => {\n if (files.length === 0 || !mediaRequestIsCurrent(context)) return\n dispatchComposerImageDrop(document, files)\n }\n const launchBrowserCamera = (context: ReturnType<typeof mediaRequestContext>): void => {\n const input = document.createElement('input')\n input.type = 'file'\n input.accept = 'image/*'\n input.capture = 'environment'\n input.hidden = true\n const signal = mediaPickerAbortController.signal\n let cleanupTimer = 0\n let watchdogTimer = 0\n let cleaned = false\n const scheduleCleanup = (): void => {\n if (!cleaned && cleanupTimer === 0) cleanupTimer = window.setTimeout(cleanup, 1000)\n }\n const onVisibilityChange = (): void => {\n if (document.visibilityState === 'visible') scheduleCleanup()\n }\n const onChange = (): void => {\n if (cleaned) return\n const files = input.files === null ? [] : [...input.files]\n cleanup()\n deliverImages(files, context)\n }\n const cleanup = (): void => {\n if (cleaned) return\n cleaned = true\n if (cleanupTimer !== 0) window.clearTimeout(cleanupTimer)\n if (watchdogTimer !== 0) window.clearTimeout(watchdogTimer)\n cleanupTimer = 0\n watchdogTimer = 0\n input.removeEventListener('change', onChange)\n input.removeEventListener('cancel', cleanup)\n window.removeEventListener('focus', scheduleCleanup)\n document.removeEventListener('visibilitychange', onVisibilityChange)\n signal.removeEventListener('abort', cleanup)\n browserPickerCleanups.delete(cleanup)\n input.remove()\n }\n input.addEventListener('change', onChange)\n input.addEventListener('cancel', cleanup)\n window.addEventListener('focus', scheduleCleanup)\n document.addEventListener('visibilitychange', onVisibilityChange)\n signal.addEventListener('abort', cleanup, { once: true })\n watchdogTimer = window.setTimeout(cleanup, 300_000)\n browserPickerCleanups.add(cleanup)\n if (signal.aborted) { cleanup(); return }\n try {\n document.body.append(input)\n input.click()\n } catch {\n cleanup()\n if (mediaRequestIsCurrent(context)) showMediaToast(label('Impossibile aprire la fotocamera', 'Could not open the camera', '无法打开相机'))\n }\n }\n const dismissCommandMenu = (): void => {\n const trigger = boundComposer?.querySelector<HTMLButtonElement>('button[aria-haspopup=\"listbox\"][aria-expanded=\"true\"]')\n trigger?.click()\n }\n const addGroupLabel = label('Aggiungi', 'Add', '添加')\n const placeCameraAction = (commandMenu: HTMLElement): boolean => {\n const sectionTitle = Array.from(commandMenu.querySelectorAll<HTMLElement>('[role=\"listbox\"] [role=\"presentation\"]'))\n .find(candidate => !candidate.hasAttribute('data-source') && candidate.textContent?.trim() === addGroupLabel)\n if (sectionTitle === undefined) {\n cameraButton.remove()\n return false\n }\n\n // Reuse the current DSH option classes so this injected action follows the\n // native menu's spacing, colors, and dark-mode states instead of creating a\n // second mobile-only visual language.\n cameraButton.className = 'dsh-mobile-media-action'\n const nativeItem = (() => {\n let sibling = sectionTitle.nextElementSibling\n while (sibling instanceof HTMLElement && sibling.getAttribute('role') !== 'presentation') {\n if (sibling.matches('button[role=\"option\"]:not([aria-selected=\"true\"])')) return sibling\n sibling = sibling.nextElementSibling\n }\n return undefined\n })()\n if (nativeItem !== undefined) {\n cameraButton.className = nativeItem.className\n const cameraIcon = cameraButton.firstElementChild\n const cameraLabel = cameraButton.lastElementChild\n const nativeIcon = firstByClassSuffix(nativeItem, '_itemIcon')\n const nativeLabel = firstByClassSuffix(nativeItem, '_itemName')\n if (cameraIcon instanceof HTMLElement && nativeIcon !== undefined) cameraIcon.className = nativeIcon.className\n if (cameraLabel instanceof HTMLElement && nativeLabel !== undefined) cameraLabel.className = nativeLabel.className\n }\n cameraButton.setAttribute('role', 'option')\n cameraButton.setAttribute('aria-selected', 'false')\n cameraButton.setAttribute('aria-label', label('Scatta foto', 'Take photo', '拍照'))\n\n let lastItem: Element = sectionTitle\n let sibling = sectionTitle.nextElementSibling\n while (sibling instanceof HTMLElement && sibling.getAttribute('role') !== 'presentation') {\n if (sibling !== cameraButton) lastItem = sibling\n sibling = sibling.nextElementSibling\n }\n if (cameraButton.parentElement !== sectionTitle.parentElement || cameraButton.previousElementSibling !== lastItem) {\n lastItem.after(cameraButton)\n }\n return true\n }\n const setCameraActionDisabled = (disabled: boolean, title: string): void => {\n if (cameraButton.disabled !== disabled) cameraButton.disabled = disabled\n if (cameraButton.title !== title) cameraButton.title = title\n }\n const quietMediaPointer = (event: PointerEvent): void => {\n event.preventDefault()\n event.stopPropagation()\n const active = document.activeElement\n if (active instanceof HTMLElement && (active.matches('input,textarea') || active.isContentEditable)) active.blur()\n }\n const takePhoto = (): void => {\n if (!canAcceptComposerDrop()) {\n setCameraActionDisabled(true, label('Allegati immagine non disponibili', 'Image attachments are unavailable', '图片附件不可用'))\n dismissCommandMenu()\n return\n }\n const context = mediaRequestContext()\n dismissCommandMenu()\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge === undefined) {\n launchBrowserCamera(context)\n return\n }\n void Promise.resolve().then(() => bridge.invoke('camera.capture', {})).then(value => {\n if (!mediaRequestIsCurrent(context)) return\n if (value instanceof File) deliverImages([value], context)\n else showMediaToast(label('La foto scattata non è utilizzabile', 'The captured photo is unavailable', '所拍照片不可用'))\n }).catch((error: unknown) => {\n if (!mediaRequestIsCurrent(context)) return\n const code = typeof error === 'object' && error !== null && 'code' in error ? String(error.code) : ''\n if (code === 'cancelled') return\n showMediaToast(code === 'payload_too_large'\n ? label('La foto supera il limite di 8 MiB', 'The photo exceeds the 8 MiB limit', '照片超过 8 MiB 限制')\n : label('Impossibile aggiungere la foto', 'Could not attach the photo', '无法附加照片'))\n })\n }\n cameraButton.addEventListener('pointerdown', quietMediaPointer)\n cameraButton.addEventListener('click', takePhoto)\n const showBranchToast = (): void => {\n const header = document.querySelector<HTMLElement>('[data-dsh-mobile-header]')\n const title = header === null ? undefined : header.querySelector<HTMLElement>('[class*=\"_crumbCurrent\"]')?.textContent?.trim()\n const prefix = label('Ramo corrente', 'Current branch', '当前分支')\n branchToast.textContent = title === undefined ? prefix : `${prefix}: ${title}`\n branchToast.dataset.visible = 'true'\n if (branchToastTimer !== 0) window.clearTimeout(branchToastTimer)\n branchToastTimer = window.setTimeout(() => {\n branchToast.removeAttribute('data-visible')\n branchToastTimer = 0\n }, 1600)\n }\n const onBranchClick = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const branch = event.target.closest<HTMLButtonElement>('button[aria-label*=\"分支\"],button[aria-label*=\"Branch\"],button[aria-label*=\"branch\"],button[aria-label*=\"Ramo\"],button[aria-label*=\"ramo\"]')\n if (branch === null || branch.hasAttribute('disabled') || branch.getAttribute('aria-disabled') === 'true') return\n window.setTimeout(showBranchToast, 80)\n }\n document.addEventListener('click', onBranchClick, true)\n let frame: HTMLElement | undefined\n let sidebar: HTMLElement | undefined\n let sidebarRoot: HTMLElement | undefined\n let toggle: HTMLButtonElement | undefined\n let viewArea: HTMLElement | undefined\n let scheduled = 0\n let transitionFrame = 0\n let transitionRestartFrame = 0\n let transitionTimer = 0\n let transitionTarget: HTMLElement | undefined\n let historyScroller: HTMLElement | undefined\n let historyPreviousTop = 0\n const historyLoadButton = (): HTMLButtonElement | undefined => {\n const loader = historyScroller === undefined ? undefined : firstByClassSuffix(historyScroller, '_older')\n return loader?.querySelector<HTMLButtonElement>('button') ?? undefined\n }\n const onHistoryScroll = (): void => {\n if (historyScroller === undefined) return\n const currentTop = Math.max(0, historyScroller.scrollTop)\n const shouldLoad = shouldAutoLoadEarlier(historyPreviousTop, currentTop)\n historyPreviousTop = currentTop\n if (!shouldLoad) return\n const button = historyLoadButton()\n if (button === undefined || button.disabled || button.getAttribute('aria-disabled') === 'true') return\n button.click()\n }\n const bindHistoryScroller = (next: HTMLElement | undefined): void => {\n if (historyScroller === next) return\n historyScroller?.removeEventListener('scroll', onHistoryScroll)\n historyScroller = next\n historyPreviousTop = next?.scrollTop ?? 0\n historyScroller?.addEventListener('scroll', onHistoryScroll, { passive: true })\n }\n const animateNavigation = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const trigger = event.target.closest<HTMLElement>('button,a,[role=\"tab\"],[aria-selected]')\n if (trigger === null || trigger.hasAttribute('disabled') || trigger.getAttribute('aria-disabled') === 'true') return\n if (trigger.getAttribute('aria-selected') === 'true' || trigger.getAttribute('aria-current') === 'true') return\n const settingsNavigation = trigger.closest('[data-dsh-mobile-settings-list]') !== null\n const conversationNavigation = trigger.matches('[role=\"tab\"]')\n const sidebarNavigation = trigger.closest('[data-dsh-mobile-sidebar-root]') !== null\n && trigger.closest('[data-dsh-mobile-toggle]') === null\n if (!settingsNavigation && !conversationNavigation && !sidebarNavigation) return\n if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return\n if (transitionFrame !== 0) cancelAnimationFrame(transitionFrame)\n if (transitionRestartFrame !== 0) cancelAnimationFrame(transitionRestartFrame)\n transitionFrame = requestAnimationFrame(() => {\n transitionFrame = 0\n const target = settingsNavigation\n ? document.querySelector<HTMLElement>('[data-dsh-mobile-settings-content]')\n : viewArea\n if (target === null || target === undefined) return\n transitionTarget?.removeAttribute('data-dsh-mobile-view-transition')\n target.removeAttribute('data-dsh-mobile-view-transition')\n transitionRestartFrame = requestAnimationFrame(() => {\n transitionRestartFrame = 0\n transitionTarget = target\n target.dataset.dshMobileViewTransition = 'true'\n if (transitionTimer !== 0) clearTimeout(transitionTimer)\n transitionTimer = window.setTimeout(() => {\n target.removeAttribute('data-dsh-mobile-view-transition')\n if (transitionTarget === target) transitionTarget = undefined\n transitionTimer = 0\n }, 240)\n })\n })\n }\n document.addEventListener('click', animateNavigation)\n const syncMediaBinding = (composer: Element | null): void => {\n const previousComposer = boundComposer\n boundComposer = composer\n const session = currentSessionOrigin()\n if (composer === previousComposer && session.sessionRoot === boundSessionRoot && session.sessionId === boundSessionId) return\n boundSessionRoot = session.sessionRoot\n boundSessionId = session.sessionId\n mediaRequestGeneration += 1\n }\n\n const sync = (): void => {\n scheduled = 0\n const dedicatedCenter = document.querySelector<HTMLElement>('.dshm-main') ?? undefined\n const nextFrame = resolveNativeMobileFrame(document, dedicatedCenter)\n if (frame !== nextFrame) frame?.removeAttribute('data-dsh-mobile-frame')\n frame = nextFrame\n if (frame !== undefined) frame.dataset.dshMobileFrame = 'true'\n sidebar = frame === undefined\n ? document.querySelector<HTMLElement>('.dshm-drawer') ?? undefined\n : firstByClassSuffix(frame, '_sidebarCol')\n const center = frame === undefined ? dedicatedCenter : firstByClassSuffix(frame, '_centerCol')\n const details = frame === undefined ? undefined : firstByClassSuffix(frame, '_detailsCol')\n const handle = frame === undefined ? undefined : firstByClassSuffix(frame, '_handle')\n markNativeMobileSettings(document)\n if (center === undefined) {\n bindHistoryScroller(undefined)\n syncMediaBinding(null)\n setCameraActionDisabled(true, label('Apri prima una sessione', 'Open a session first', '请先打开会话'))\n cameraButton.remove()\n return\n }\n if (center !== undefined) {\n center.dataset.dshMobileCenter = 'true'\n center.querySelector<HTMLElement>('header')?.setAttribute('data-dsh-mobile-header', 'true')\n viewArea = firstByClassSuffix(center, '_viewArea')\n if (viewArea !== undefined) viewArea.dataset.dshMobileView = 'true'\n const conversation = center.querySelector<HTMLElement>('[data-conversation-scroll]')\n bindHistoryScroller(conversation ?? undefined)\n const historyLoader = conversation === null ? undefined : firstByClassSuffix(conversation, '_older')\n if (historyLoader !== undefined) {\n historyLoader.dataset.dshMobileHistoryLoader = 'true'\n historyLoader.setAttribute('aria-live', 'polite')\n const button = historyLoader.querySelector<HTMLButtonElement>('button')\n if (button !== null) {\n button.tabIndex = -1\n if (button.disabled) button.removeAttribute('aria-hidden')\n else button.setAttribute('aria-hidden', 'true')\n }\n }\n const messageColumn = conversation === null ? undefined : firstByClassSuffix(conversation, '_column')\n const messageScroll = messageColumn?.parentElement\n if (messageColumn !== undefined && messageScroll !== null && messageScroll !== undefined && classToken(messageScroll, '_scroll')) {\n messageColumn.dataset.dshMobileMessageColumn = 'true'\n messageScroll.dataset.dshMobileMessageScroll = 'true'\n }\n for (const table of center.querySelectorAll<HTMLTableElement>('table')) {\n const parent = table.parentElement\n if (parent?.dataset.dshMobileTableScroll === 'true') continue\n const wrapper = document.createElement('div')\n wrapper.dataset.dshMobileTableScroll = 'true'\n table.before(wrapper)\n wrapper.append(table)\n }\n const composerCard = center.querySelector<HTMLElement>('[data-composer-card]')\n const composerRow = composerCard?.querySelector<HTMLElement>(':scope > [data-input-scroll]')?.nextElementSibling\n if (!(composerRow instanceof HTMLElement)) {\n syncMediaBinding(null)\n setCameraActionDisabled(true, label('Apri prima una sessione', 'Open a session first', '请先打开会话'))\n cameraButton.remove()\n }\n if (composerRow instanceof HTMLElement) {\n composerRow.dataset.dshMobileComposerRow = 'true'\n const groups = Array.from(composerRow.children).filter((child): child is HTMLElement => child instanceof HTMLElement)\n const composerTools = groups[0]\n const composerTrailing = groups.at(-1)\n if (composerTools !== undefined) {\n composerTools.dataset.dshMobileComposerTools = 'true'\n syncMediaBinding(composerCard ?? null)\n const composerInput = composerCard?.querySelector<HTMLTextAreaElement>('textarea')\n const composerEditor = composerCard?.querySelector<HTMLElement>('[contenteditable=\"true\"],[contenteditable=\"plaintext-only\"]')\n const composerBusy = composerCard?.getAttribute('aria-busy') === 'true'\n || composerInput?.disabled === true\n || composerInput?.readOnly === true\n || composerEditor?.getAttribute('aria-disabled') === 'true'\n const attachmentBlocked = !canAcceptComposerDrop()\n const mediaDisabled = conversation === null || currentSessionOrigin().sessionId === null || composerBusy || attachmentBlocked\n const mediaTitle = composerBusy\n ? label('Attendi il completamento della risposta', 'Wait for the response to finish', '请等待回复完成')\n : attachmentBlocked\n ? label('Allegati immagine non disponibili', 'Image attachments are unavailable', '图片附件不可用')\n : mediaDisabled\n ? label('Apri prima una sessione', 'Open a session first', '请先打开会话')\n : label('Scatta una foto e allegala', 'Take a photo and attach it', '拍照并附加到当前消息')\n setCameraActionDisabled(mediaDisabled, mediaTitle)\n const commandMenu = composerCard?.querySelector<HTMLElement>('[data-trigger-menu]') ?? null\n if (commandMenu !== null) placeCameraAction(commandMenu)\n else cameraButton.remove()\n }\n if (composerTrailing !== undefined && composerTrailing !== composerTools) {\n composerTrailing.dataset.dshMobileComposerTrailing = 'true'\n const modelTrigger = composerTrailing.querySelector<HTMLButtonElement>('button[aria-label^=\"选择模型\"],button[aria-label^=\"Select model\"],button[aria-label^=\"Seleziona modello\"]')\n if (modelTrigger !== null) {\n modelTrigger.dataset.dshMobileComposerModelTrigger = 'true'\n modelTrigger.parentElement?.setAttribute('data-dsh-mobile-composer-model', 'true')\n modelTrigger.querySelector<HTMLElement>('[class*=\"_triggerLabel\"]')?.setAttribute('data-dsh-mobile-composer-model-label', 'true')\n }\n }\n }\n }\n if (handle !== undefined) handle.dataset.dshMobileHandle = 'true'\n if (details !== undefined) {\n details.dataset.dshMobileDetails = 'true'\n const lastColumn = frame?.style.gridTemplateColumns.trim().split(/\\s+/).at(-1)\n details.dataset.open = String(lastColumn !== undefined && lastColumn !== '0px' && lastColumn !== '0')\n }\n if (sidebar === undefined) return\n sidebar.dataset.dshMobileSidebar = 'true'\n toggle = firstByClassSuffix(sidebar, '_toggle') as HTMLButtonElement | undefined\n let candidate = toggle?.parentElement\n while (candidate !== undefined && candidate !== null && candidate !== sidebar && !classToken(candidate, '_root')) candidate = candidate.parentElement\n sidebarRoot = candidate !== sidebar && candidate !== null ? candidate : undefined\n if (sidebarRoot === undefined) return\n sidebarRoot.dataset.dshMobileSidebarRoot = 'true'\n for (const brand of sidebarRoot.querySelectorAll<HTMLElement>('[class*=\"_fallbackBrandName\"]')) {\n if (brand.textContent?.trim() === 'DSH Local Build') brand.textContent = 'DeepSeek Harness'\n }\n if (toggle !== undefined) toggle.dataset.dshMobileToggle = 'true'\n const collapsed = classToken(sidebarRoot, '_collapsed')\n sidebar.dataset.open = String(!collapsed)\n backdrop.hidden = !drawerScrimVisible(collapsed, overlayQuery.matches)\n }\n const schedule = (): void => { if (scheduled === 0) scheduled = requestAnimationFrame(sync) }\n const observer = new MutationObserver(schedule)\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'style', 'disabled', 'readonly', 'aria-busy', 'aria-selected', 'data-dsh-mobile-session'] })\n overlayQuery.addEventListener('change', schedule)\n backdrop.addEventListener('click', () => { if (sidebar?.dataset.open === 'true') toggle?.click() })\n sync()\n const disposeTaskWatcher = installTaskCompletionWatcher({\n // Current gateways announce exact root turn completion. The DOM watcher\n // remains only for explicit pending-input cards, avoiding false completion\n // reminders from unrelated page mutations.\n completionFallback: false,\n label: (kind: TaskNotifyKind, sessionLabel: string) => kind === 'done'\n ? {\n title: label('Attività completata', 'Task finished', '任务已完成'),\n body: sessionLabel === ''\n ? label('Il tuo task DSH è terminato', 'Your DSH task finished', '你的 DSH 任务已完成')\n : label(`Il tuo task DSH è terminato: ${sessionLabel}`, `Your DSH task finished: ${sessionLabel}`, `你的 DSH 任务已完成:${sessionLabel}`),\n }\n : {\n title: label('È richiesto un input', 'Input needed', '需要你确认'),\n body: label('DSH attende una tua scelta', 'DSH waits for your choice', 'DSH 等待你的选择'),\n },\n })\n return () => {\n disposed = true\n disposeTaskWatcher()\n mediaRequestGeneration += 1\n mediaPickerAbortController.abort()\n restoreLanguageMarker()\n for (const cleanup of [...browserPickerCleanups]) cleanup()\n observer.disconnect()\n overlayQuery.removeEventListener('change', schedule)\n document.removeEventListener('click', onBranchClick, true)\n cameraButton.removeEventListener('pointerdown', quietMediaPointer)\n cameraButton.removeEventListener('click', takePhoto)\n if (branchToastTimer !== 0) window.clearTimeout(branchToastTimer)\n if (mediaToastTimer !== 0) window.clearTimeout(mediaToastTimer)\n branchToast.remove()\n mediaToast.remove()\n cameraButton.remove()\n if (scheduled !== 0) cancelAnimationFrame(scheduled)\n if (transitionFrame !== 0) cancelAnimationFrame(transitionFrame)\n if (transitionRestartFrame !== 0) cancelAnimationFrame(transitionRestartFrame)\n if (transitionTimer !== 0) clearTimeout(transitionTimer)\n transitionTarget?.removeAttribute('data-dsh-mobile-view-transition')\n historyScroller?.removeEventListener('scroll', onHistoryScroll)\n document.removeEventListener('pointerdown', onPointerDown, true)\n document.removeEventListener('keydown', onKeyDown, true)\n document.removeEventListener('click', animateNavigation)\n backdrop.remove()\n document.documentElement.classList.remove('dsh-native-mobile-active')\n delete document.documentElement.dataset.dshMobileInput\n }\n}\n","/** Browser-safe desktop-admin Host checks. Do not import Node APIs here. */\n\nfunction unwrapBrackets(hostname: string): string {\n return hostname.startsWith('[') && hostname.endsWith(']') ? hostname.slice(1, -1) : hostname\n}\n\nfunction parseIpv4(hostname: string): readonly [number, number, number, number] | undefined {\n const parts = hostname.split('.')\n if (parts.length !== 4) return undefined\n const octets: number[] = []\n for (const part of parts) {\n if (!/^(?:0|[1-9]\\d{0,2})$/u.test(part)) return undefined\n const value = Number(part)\n if (value > 255) return undefined\n octets.push(value)\n }\n return octets as [number, number, number, number]\n}\n\nfunction isLoopbackIpv4(octets: readonly [number, number, number, number]): boolean {\n return octets[0] === 127\n}\n\nfunction isPrivateIpv4(octets: readonly [number, number, number, number]): boolean {\n return octets[0] === 10\n || (octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31)\n || (octets[0] === 192 && octets[1] === 168)\n}\n\nfunction isLinkLocalIpv4(octets: readonly [number, number, number, number]): boolean {\n return octets[0] === 169 && octets[1] === 254\n}\n\n/**\n * Hostnames that may appear on the DSH desktop admin surface.\n * Loopback, RFC1918, and IPv4 link-local are accepted. Public IPs,\n * CGNAT, and arbitrary DNS names stay rejected so DNS rebinding\n * cannot reach `/api/mobile-access`.\n */\nexport function isLocalAdminHostname(hostname: string): boolean {\n const host = unwrapBrackets(hostname).trim().toLowerCase()\n if (host === 'localhost' || host === '::1') return true\n const octets = parseIpv4(host)\n if (octets === undefined) return false\n return isLoopbackIpv4(octets) || isPrivateIpv4(octets) || isLinkLocalIpv4(octets)\n}\n\n/**\n * Whether the current browser document should mount the desktop Mobile access\n * control. Dedicated Mobile HTTPS (the phone surface) stays native even when\n * the Host is a private LAN address.\n */\nexport function isDesktopAdminSurface(\n hostname: string,\n search = '',\n frontend?: string,\n): boolean {\n const query = search.startsWith('?') ? search.slice(1) : search\n return isLocalAdminHostname(hostname)\n && frontend !== 'dedicated'\n && !new URLSearchParams(query).has('dsh-mobile-preview')\n}\n","import { createElement, useEffect, useState } from 'react'\nimport {\n DIAGNOSTIC_REASON_MESSAGES,\n LOCALIZED_DIAGNOSTIC_COPY,\n MOBILE_CONTROL_MESSAGES,\n type MobileControlLocale,\n} from './client-messages.js'\nimport { createRestrictedFrpServerTemplate } from './frp-template.js'\nimport { installNativeMobileSurface, NATIVE_MOBILE_STYLES, resolveNativeMobileLanguage } from './native-mobile.js'\nimport { isDesktopAdminSurface } from './local-admin-host.js'\nimport { fireDeviceRevoked, fireTaskNotifyEvent, isDeviceRevokedPayload, parseTaskNotifyPayload, taskCompletionTag } from './task-notify.js'\n\nexport { DIAGNOSTIC_REASON_MESSAGES, LOCALIZED_DIAGNOSTIC_COPY, MOBILE_CONTROL_MESSAGES } from './client-messages.js'\nexport type { MobileControlLocale } from './client-messages.js'\n\n/**\n * Remote provider names the control UI knows about.\n *\n * This mirrors the server-side union in `src/remote.ts`, which cannot be imported\n * here because it pulls in Node-only modules. An unrecognized value from the\n * host falls back to the built-in provider, so a missing name would silently\n * render another provider's wording instead of failing loudly.\n */\nexport type MobileRemoteProvider = 'tailscale' | 'cpolar' | 'cloudflared' | 'frp' | 'origin'\n\n/** Map a host-reported provider onto the UI union, defaulting to the built-in one. */\nexport function parseMobileRemoteProvider(value: unknown): MobileRemoteProvider {\n return value === 'cpolar' || value === 'cloudflared' || value === 'frp' || value === 'origin'\n ? value\n : 'tailscale'\n}\n\ninterface ClientContext {\n effect(effect: () => void | (() => void), label?: string): void\n get(name: 'connection'): MobileConnectionHandle\n slots: {\n inject(key: string, callback: () => (() => void)): () => void\n register<Props>(options: { name: string; id: string; order?: number; label?: string }, component: (props: Props) => unknown): () => void\n }\n}\n\ninterface MobileConnectionHandle {\n isLoopback: boolean\n}\n\ninterface MobileExtensionContext {\n readonly document: Document\n readonly request: (path: string, init?: RequestInit) => Promise<Response>\n readonly root: HTMLElement\n readonly window: Window\n}\n\ntype MobileExtensionMount = (context: MobileExtensionContext) => void | (() => void)\ntype MobileSurfacePlacement = 'page' | 'sidebar-action' | 'header-action' | 'composer-dock' | 'settings-section' | 'overlay'\ninterface MobileSurface {\n readonly id: string\n readonly placement: MobileSurfacePlacement\n readonly label: string\n mount(container: HTMLElement): void | (() => void)\n}\ninterface MobileClientApi {\n readonly host: {\n invoke(action: string, input: unknown): Promise<unknown>\n fetch(path: string, init?: RequestInit): Promise<Response>\n assetUrl(path: string): string\n }\n readonly ui: {\n registerSurface(surface: MobileSurface): () => void\n open(surfaceId: string): void\n close(surfaceId: string): void\n toast(message: string): void\n }\n readonly native: {\n capabilities(): Promise<readonly string[]>\n invoke(action: string, input?: unknown): Promise<unknown>\n }\n readonly signal: AbortSignal\n readonly document: Document\n readonly window: Window\n}\ninterface MobileClientDefinition {\n readonly apiVersion: 1\n readonly id: string\n activate(api: MobileClientApi): void | (() => void) | Promise<void | (() => void)>\n}\n\ndeclare global {\n interface Window {\n dshMobile?: {\n register(mount: MobileExtensionMount): void\n define(definition: MobileClientDefinition): void\n }\n __DSH_MOBILE_FRONTEND__?: 'dedicated'\n __DSH_MOBILE_NATIVE__?: {\n capabilities(): Promise<readonly string[]> | readonly string[]\n invoke(action: string, input?: unknown): Promise<unknown>\n }\n }\n}\n\nconst queuedDefinitions: MobileClientDefinition[] = []\nlet queuedLegacyMount: MobileExtensionMount | undefined\nif (typeof window !== 'undefined' && window.dshMobile === undefined) {\n window.dshMobile = {\n register: mount => { queuedLegacyMount = mount },\n define: definition => { queuedDefinitions.push(definition) },\n }\n}\n\nexport function selectMobileControlLocale(documentLanguage = '', navigatorLanguages: readonly string[] = []): MobileControlLocale {\n for (const value of [documentLanguage, ...navigatorLanguages]) {\n const language = value.trim().toLowerCase().split(/[-_]/u)[0]\n if (language === 'it' || language === 'en' || language === 'zh') return language\n }\n return 'en'\n}\n\nexport function selectedMobileControlLocale(): MobileControlLocale {\n return selectMobileControlLocale(document.documentElement.lang, navigator.languages?.length ? navigator.languages : [navigator.language])\n}\n\n/** Remount one plugin-owned surface when DSH changes the document language. */\nexport function installDshLanguageBoundSurface(install: () => () => void): () => void {\n let locale = selectedMobileControlLocale()\n let dispose = install()\n const observer = new MutationObserver(() => {\n const next = selectedMobileControlLocale()\n if (next === locale) return\n dispose()\n locale = next\n dispose = install()\n })\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] })\n return () => {\n observer.disconnect()\n dispose()\n }\n}\n\nfunction controlTranslator(locale = selectedMobileControlLocale()): (key: string, values?: Readonly<Record<string, string | number>>) => string {\n const messages = MOBILE_CONTROL_MESSAGES as Record<MobileControlLocale, Record<string, string>>\n return (key, values = {}) => {\n const template = messages[locale][key] ?? messages.en[key] ?? key\n return template.replace(/\\{(\\w+)\\}/gu, (_match: string, name: string) => String(values[name] ?? `{${name}}`))\n }\n}\n\nexport function normalizeDiagnosticOverall(value: unknown): 'ok' | 'attention' | 'error' {\n return value === 'ok' ? 'ok' : value === 'attention' ? 'attention' : 'error'\n}\n\nexport function normalizeDiagnosticStatus(value: unknown): 'ok' | 'warning' | 'error' | 'info' {\n return value === 'ok' || value === 'warning' || value === 'error' || value === 'info' ? value : 'error'\n}\n\nexport function diagnosticOverallForChecks(value: unknown, statuses: readonly unknown[]): 'ok' | 'attention' | 'error' {\n const normalized = statuses.map(normalizeDiagnosticStatus)\n const payloadOverall = normalizeDiagnosticOverall(value)\n if (payloadOverall === 'error' || normalized.includes('error')) return 'error'\n if (payloadOverall === 'attention' || normalized.includes('warning')) return 'attention'\n return 'ok'\n}\n\nexport function validateDiagnosticChecks(value: unknown): { readonly entries: readonly Record<string, unknown>[]; readonly malformed: boolean } {\n if (!Array.isArray(value)) return { entries: [], malformed: true }\n const entries: Record<string, unknown>[] = []\n let malformed = false\n for (const candidate of value) {\n if (typeof candidate !== 'object' || candidate === null || Array.isArray(candidate)) { malformed = true; continue }\n entries.push(candidate as Record<string, unknown>)\n }\n return { entries, malformed }\n}\n\nexport function diagnosticEntriesForRender(data: Readonly<Record<string, unknown>>): readonly Record<string, unknown>[] {\n const overallKnown = data.overall === 'ok' || data.overall === 'attention' || data.overall === 'error'\n const validated = validateDiagnosticChecks(data.checks)\n const statusesKnown = validated.entries.every(entry => entry.status === 'ok' || entry.status === 'warning' || entry.status === 'error' || entry.status === 'info')\n if (!overallKnown || validated.malformed || validated.entries.length === 0 || !statusesKnown) {\n throw new TypeError('diagnostics envelope is unavailable')\n }\n return validated.entries\n}\n\nexport function renderDiagnosticPayloadSafely(\n data: Record<string, unknown>,\n render: (data: Record<string, unknown>) => void,\n onFailure: (error: unknown) => void,\n): void {\n try { render(data) } catch (error) { onFailure(error) }\n}\n\nexport function diagnosticServerCopy(entry: Readonly<Record<string, unknown>>): { readonly label: string; readonly detail: string; readonly action: string } {\n return {\n label: typeof entry.label === 'string' ? entry.label : '',\n detail: typeof entry.detail === 'string' ? entry.detail : '',\n action: typeof entry.action === 'string' ? entry.action : '',\n }\n}\n\n/**\n * Match DSH's client-side privilege hint to the authenticated mobile gateway.\n * The gateway authenticates the paired device and forwards allowed requests to\n * DSH's loopback listener, so settings RPCs receive the same Host-side checks\n * as the desktop page even though the phone's visible URL is a LAN address.\n */\nexport function trustAuthenticatedGatewayConnection(connection: MobileConnectionHandle): () => void {\n const previous = connection.isLoopback\n connection.isLoopback = true\n return () => { connection.isLoopback = previous }\n}\n\nfunction element<K extends keyof HTMLElementTagNameMap>(tag: K, className?: string): HTMLElementTagNameMap[K] {\n const node = document.createElement(tag)\n if (className !== undefined) node.className = className\n return node\n}\n\ninterface MobileSwitchComputerCopy {\n readonly title: string\n readonly description: string\n readonly action: string\n readonly busy: string\n readonly retry: string\n readonly error: string\n}\n\nfunction mobileSwitchComputerCopy(locale: MobileControlLocale): MobileSwitchComputerCopy {\n if (locale === 'zh') return {\n title: '切换电脑',\n description: '返回已配对设备列表,选择要打开的电脑。',\n action: '切换电脑',\n busy: '正在切换…',\n retry: '重试',\n error: '切换失败,请重试。',\n }\n if (locale === 'it') return {\n title: 'Cambia computer',\n description: 'Torna all’elenco dei computer associati e scegli quale aprire.',\n action: 'Cambia computer',\n busy: 'Cambio in corso…',\n retry: 'Riprova',\n error: 'Cambio non riuscito. Riprova.',\n }\n return {\n title: 'Switch computer',\n description: 'Return to the paired-device list and choose a computer to open.',\n action: 'Switch computer',\n busy: 'Switching…',\n retry: 'Retry',\n error: 'Could not switch computers. Try again.',\n }\n}\n\n/** Render the native-app-only action in DSH's General settings row style. */\nfunction MobileSwitchComputerRow(): unknown {\n const [nativeReady, setNativeReady] = useState(false)\n const [state, setState] = useState<'idle' | 'busy' | 'error'>('idle')\n useEffect(() => {\n let disposed = false\n const checkNativeAction = (): void => {\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge === undefined) {\n setNativeReady(false)\n return\n }\n void Promise.resolve().then(() => bridge.capabilities()).then(capabilities => {\n if (!disposed) setNativeReady(capabilities.includes('mobile.switch-computer'))\n }, () => {\n if (!disposed) setNativeReady(false)\n })\n }\n checkNativeAction()\n window.addEventListener('dsh-mobile-native-ready', checkNativeAction)\n return () => {\n disposed = true\n window.removeEventListener('dsh-mobile-native-ready', checkNativeAction)\n }\n }, [])\n if (!nativeReady) return null\n const locale = selectedMobileControlLocale()\n const copy = mobileSwitchComputerCopy(locale)\n const invoke = (): void => {\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge === undefined || state === 'busy') return\n setState('busy')\n // The native action normally replaces this WebView immediately; only a\n // rejected request needs to remain visible in the settings row.\n void bridge.invoke('mobile.switch-computer', {}).catch(() => { setState('error') })\n }\n return createElement('div', { className: 'dsh-mobile-settings_row', lang: locale },\n createElement('div', { className: 'dsh-mobile-settings_rowText' },\n createElement('div', { className: 'dsh-mobile-settings_title' }, copy.title),\n createElement('div', { className: 'dsh-mobile-settings_desc', 'aria-live': 'polite' }, state === 'error' ? copy.error : copy.description),\n ),\n createElement('button', {\n type: 'button',\n className: 'dsh-mobile-settings_selector',\n disabled: state === 'busy',\n 'aria-busy': state === 'busy' ? 'true' : undefined,\n onClick: invoke,\n }, state === 'busy' ? copy.busy : state === 'error' ? copy.retry : copy.action),\n )\n}\n\nconst CONTROL_REQUEST_TIMEOUT_MS = 15_000\nconst LONG_CONTROL_REQUEST_TIMEOUT_MS = 210_000\nconst GITHUB_RELEASES_URL = 'https://github.com/saya-ch/dsh-mobile/releases'\nconst CONTROL_PANEL_ID = 'dsh-mobile-control-panel'\n\nexport interface ClientReleaseInfo {\n readonly updateAvailable: boolean\n readonly latestVersion?: string\n readonly androidVersion?: string\n readonly androidDownloadUrl: string\n /** Trimmed release notes body for the preview card (best effort). */\n readonly releaseNotes?: string\n}\n\nfunction releaseVersion(value: unknown): string | undefined {\n return typeof value === 'string'\n && /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/u.test(value)\n ? value\n : undefined\n}\n\n/** Reduce the loopback release response to trusted text and download metadata. */\nexport function clientReleaseInfo(data: Readonly<Record<string, unknown>>): ClientReleaseInfo {\n const latestVersion = releaseVersion(data.latestVersion)\n const androidVersion = releaseVersion(data.androidVersion)\n const expectedAndroidDownloadUrl = androidVersion === undefined\n ? undefined\n : `${GITHUB_RELEASES_URL}/download/v${androidVersion}/dsh-mobile-android-v${androidVersion}.apk`\n const androidDownloadUrl = expectedAndroidDownloadUrl !== undefined && data.androidDownloadUrl === expectedAndroidDownloadUrl\n ? expectedAndroidDownloadUrl\n : GITHUB_RELEASES_URL\n return {\n updateAvailable: data.updateAvailable === true && latestVersion !== undefined,\n ...(latestVersion === undefined ? {} : { latestVersion }),\n ...(androidVersion === undefined ? {} : { androidVersion }),\n androidDownloadUrl,\n ...(typeof data.releaseNotes === 'string' && data.releaseNotes !== '' ? { releaseNotes: data.releaseNotes.slice(0, 4000) } : {}),\n }\n}\n\nasync function requestJson(\n path: string,\n init?: RequestInit,\n timeoutMs = CONTROL_REQUEST_TIMEOUT_MS,\n): Promise<Record<string, unknown>> {\n const controller = new AbortController()\n const upstreamSignal = init?.signal\n const abortFromUpstream = (): void => { controller.abort(upstreamSignal?.reason) }\n if (upstreamSignal?.aborted === true) abortFromUpstream()\n else upstreamSignal?.addEventListener('abort', abortFromUpstream, { once: true })\n const timer = window.setTimeout(() => { controller.abort() }, timeoutMs)\n try {\n const response = await fetch(path, {\n ...init,\n signal: controller.signal,\n headers: { 'content-type': 'application/json', ...init?.headers },\n })\n const body = await response.json() as Record<string, unknown>\n if (!response.ok) throw new Error(typeof body.error === 'string' ? body.error : `HTTP ${String(response.status)}`)\n return body\n } catch (error) {\n if (controller.signal.aborted && upstreamSignal?.aborted !== true) {\n throw new Error(controlTranslator()('requestTimeout'))\n }\n throw error\n } finally {\n clearTimeout(timer)\n upstreamSignal?.removeEventListener('abort', abortFromUpstream)\n }\n}\n\nfunction officialFunnelSetupUrl(value: unknown): string {\n if (typeof value !== 'string' || value.length > 2048) return ''\n let url: URL\n try { url = new URL(value) } catch { return '' }\n const normalized = url.toString().replace(/\\/$/u, '')\n if (normalized === 'https://tailscale.com/s/no-funnel' || normalized === 'https://tailscale.com/s/https') return normalized\n if (url.protocol !== 'https:' || url.hostname !== 'login.tailscale.com' || url.port !== ''\n || url.username !== '' || url.password !== '') return ''\n return url.toString()\n}\n\n/** Build the copy-only restricted VPS template without sending the token to the host API. */\nexport function createFrpServerTemplateForClipboard(serverPort: number, token: string, publicOrigin: string): string {\n return createRestrictedFrpServerTemplate(serverPort, token, publicOrigin)\n}\n\nconst ORIGIN_ERROR_MESSAGE_KEYS: Readonly<Record<string, string>> = {\n origin_public_origin_invalid: 'originPublicOriginInvalid',\n origin_listen_host_invalid: 'originListenHostInvalid',\n origin_listen_port_invalid: 'originListenPortInvalid',\n origin_listen_port_reserved: 'originListenPortReserved',\n origin_allowed_cidrs_invalid: 'originAllowedCidrsInvalid',\n origin_settings_invalid: 'originSettingsInvalid',\n origin_config_missing: 'originConfigMissing',\n origin_config_invalid: 'originConfigInvalid',\n origin_config_target_invalid: 'originConfigTargetInvalid',\n origin_controller_unavailable: 'originControllerUnavailable',\n origin_listen_port_in_use: 'originPortInUse',\n origin_listen_address_unavailable: 'originAddressUnavailable',\n origin_gateway_start_failed: 'originStartFailed',\n}\n\nfunction installControl(): { remove: () => void; toggle: () => void; isOpen: () => boolean } {\n /**\n * Provider failure codes to message keys.\n *\n * Kept as keys rather than translated text so the same table can serve both the\n * status repaint and a failed request: a server rejection carries its code in\n * `error.message`, and showing that raw would print `Error: cloudflared_...` in\n * every language while the translated sentence sat unreachable.\n */\n const REMOTE_ERROR_MESSAGE_KEYS: Readonly<Record<string, string>> = {\n funnel_permission_required: 'funnelPermission',\n funnel_https_required: 'funnelHttps',\n funnel_start_failed: 'funnelStart',\n funnel_start_timeout: 'funnelTimeout',\n tailscale_dns_missing: 'tailscaleDnsMissing',\n gateway_start_failed: 'gatewayStartFailed',\n control_channel_failed: 'controlChannelFailed',\n cpolar_component_missing: 'cpolarMissing',\n cpolar_component_invalid: 'cpolarInvalid',\n cpolar_config_missing: 'cpolarConfigMissing',\n cpolar_config_invalid: 'cpolarConfigInvalid',\n cpolar_port_unavailable: 'cpolarPortUnavailable',\n cpolar_launch_failed: 'cpolarLaunchFailed',\n cpolar_start_timeout: 'cpolarTimeout',\n cpolar_stopped: 'cpolarStopped',\n cpolar_exited: 'cpolarExited',\n cpolar_invalid_output: 'cpolarOutputInvalid',\n cpolar_invalid_origin: 'cpolarOriginInvalid',\n cloudflared_component_missing: 'cloudflaredMissing',\n cloudflared_component_invalid: 'cloudflaredInvalid',\n cloudflared_port_unavailable: 'cloudflaredPortUnavailable',\n cloudflared_launch_failed: 'cloudflaredLaunchFailed',\n cloudflared_start_timeout: 'cloudflaredTimeout',\n cloudflared_stopped: 'cloudflaredStopped',\n cloudflared_exited: 'cloudflaredExited',\n cloudflared_invalid_output: 'cloudflaredOutputInvalid',\n cloudflared_invalid_origin: 'cloudflaredOriginInvalid',\n cloudflared_tunnel_port_unavailable: 'cloudflaredTunnelPortUnavailable',\n cloudflared_tunnel_hostname_invalid: 'cloudflaredTunnelHostnameInvalid',\n cloudflared_tunnel_port_invalid: 'cloudflaredTunnelPortInvalid',\n cloudflared_tunnel_port_reserved: 'cloudflaredTunnelPortReserved',\n cloudflared_tunnel_token_invalid: 'cloudflaredTunnelTokenInvalid',\n cloudflared_tunnel_settings_invalid: 'cloudflaredTunnelSettingsInvalid',\n cloudflared_tunnel_config_missing: 'cloudflaredTunnelConfigMissing',\n cloudflared_tunnel_config_invalid: 'cloudflaredTunnelInvalid',\n cloudflared_tunnel_target_invalid: 'cloudflaredTunnelTargetInvalid',\n cloudflared_component_unsupported: 'cloudflaredComponentUnsupported',\n cloudflared_download_hash_mismatch: 'cloudflaredDownloadHashMismatch',\n cloudflared_download_size_mismatch: 'cloudflaredDownloadSizeMismatch',\n cloudflared_executable_hash_mismatch: 'cloudflaredExecutableHashMismatch',\n cloudflared_download_redirect_missing: 'cloudflaredDownloadRedirectMissing',\n cloudflared_download_redirect_invalid: 'cloudflaredDownloadRedirectInvalid',\n cloudflared_download_redirect_rejected: 'cloudflaredDownloadRedirectRejected',\n cloudflared_port_reservation_failed: 'cloudflaredPortReservationFailed',\n frp_component_missing: 'frpMissing',\n frp_component_invalid: 'frpInvalid',\n frp_config_missing: 'frpConfigMissing',\n frp_config_verify_failed: 'frpConfigVerifyFailed',\n frp_vhost_publicly_reachable: 'frpVhostPublic',\n frp_vhost_probe_failed: 'frpVhostProbeFailed',\n frp_launch_failed: 'frpLaunchFailed',\n frp_start_timeout: 'frpTimeout',\n frp_discovery_mismatch: 'frpDiscoveryMismatch',\n frp_discovery_invalid: 'frpDiscoveryInvalid',\n frp_stopped: 'frpStopped',\n frp_exited: 'frpExited',\n ...ORIGIN_ERROR_MESSAGE_KEYS,\n }\n\n /** The table above, translated, for the status repaint. */\n const translatedRemoteErrors = (): Record<string, string> =>\n Object.fromEntries(Object.entries(REMOTE_ERROR_MESSAGE_KEYS).map(([code, key]) => [code, t(key)]))\n\n /**\n * Text for a failed control request.\n *\n * A rejection carries its code in `error.message`, so a known code renders its\n * translated sentence; only an unrecognized one falls back to the generic message,\n * and it shows the bare message rather than a stringified Error.\n */\n const remoteFailureTextFor = (error: unknown, fallbackKey: string): string => {\n const message = error instanceof Error ? error.message : String(error)\n const key = REMOTE_ERROR_MESSAGE_KEYS[message]\n return key === undefined ? t(fallbackKey, { error: message }) : t(key)\n }\n const locale = selectedMobileControlLocale()\n const localeTag = locale === 'it' ? 'it-IT' : locale === 'zh' ? 'zh-CN' : 'en-US'\n const t = controlTranslator(locale)\n const lifecycle = new AbortController()\n const controlRequestJson = (path: string, init?: RequestInit, timeoutMs?: number): Promise<Record<string, unknown>> => requestJson(path, { ...init, signal: lifecycle.signal }, timeoutMs)\n const root = element('div', 'dsh-mobile-control'); root.lang = locale\n const panel = element('section', 'dsh-mobile-control__panel'); panel.id = CONTROL_PANEL_ID; panel.hidden = true; panel.lang = locale\n panel.setAttribute('aria-label', t('mobileAccess'))\n const header = element('header', 'dsh-mobile-control__header')\n const title = element('h2'); title.textContent = t('mobileAccess')\n const headerActions = element('div', 'dsh-mobile-control__header-actions')\n const updatePlugin = element('button', 'dsh-mobile-control__update-plugin'); updatePlugin.type = 'button'; updatePlugin.textContent = t('updatePlugin'); updatePlugin.hidden = true\n // Preview card shown before applying an update: what’s new + notices, then confirm.\n const updateCard = element('div', 'dsh-mobile-control__update-card'); updateCard.hidden = true\n const updateCardTitle = element('div', 'dsh-mobile-control__update-card-title')\n const updateCardNotes = element('pre', 'dsh-mobile-control__update-notes'); updateCardNotes.setAttribute('tabindex', '0')\n const updateCardNotice = element('p', 'dsh-mobile-control__update-notice'); updateCardNotice.textContent = t('updateNotice')\n const updateActions = element('div', 'dsh-mobile-control__update-actions')\n const updateNow = element('button', 'dsh-mobile-control__primary'); updateNow.type = 'button'; updateNow.textContent = t('updateNow')\n const updateLater = element('button', 'dsh-mobile-control__secondary'); updateLater.type = 'button'; updateLater.textContent = t('updateLater')\n updateActions.append(updateLater, updateNow); updateCard.append(updateCardTitle, updateCardNotes, updateCardNotice, updateActions)\n const diagnosticsEntry = element('button', 'dsh-mobile-control__diagnostic-entry'); diagnosticsEntry.type = 'button'; diagnosticsEntry.textContent = t('diagnostics'); diagnosticsEntry.setAttribute('aria-label', t('openDiagnostics')); diagnosticsEntry.setAttribute('aria-pressed', 'false')\n const close = element('button', 'dsh-mobile-control__close'); close.type = 'button'; close.textContent = '×'; close.setAttribute('aria-label', t('collapseMobileAccess'))\n headerActions.append(updatePlugin, diagnosticsEntry, close)\n const releaseNotice = element('p', 'dsh-mobile-control__release-notice'); releaseNotice.hidden = true; releaseNotice.setAttribute('role', 'status'); releaseNotice.setAttribute('aria-live', 'polite')\n const appDownload = element('a', 'dsh-mobile-control__app-download'); appDownload.href = GITHUB_RELEASES_URL; appDownload.target = '_blank'; appDownload.rel = 'noopener noreferrer'; appDownload.textContent = t('downloadAndroid'); appDownload.setAttribute('aria-label', t('downloadAndroidAria'))\n const switcher = element('div', 'dsh-mobile-control__switcher')\n const lanTab = element('button', 'dsh-mobile-control__tab is-active'); lanTab.type = 'button'; lanTab.textContent = t('lan')\n const remoteTab = element('button', 'dsh-mobile-control__tab'); remoteTab.type = 'button'; remoteTab.textContent = t('remote')\n lanTab.setAttribute('aria-pressed', 'true'); remoteTab.setAttribute('aria-pressed', 'false'); switcher.append(lanTab, remoteTab)\n const lanView = element('div', 'dsh-mobile-control__view')\n const lanSetup = element('section', 'dsh-mobile-control__lan-setup'); lanSetup.hidden = true\n const lanSetupTitle = element('h3', 'dsh-mobile-control__section-title'); lanSetupTitle.textContent = t('lanSetupTitle')\n const lanSetupIntro = element('p', 'dsh-mobile-control__intro'); lanSetupIntro.textContent = t('lanSetupIntro')\n const lanSetupForm = element('div', 'dsh-mobile-control__lan-setup-form')\n const lanSetupLabel = element('label', 'dsh-mobile-control__field'); lanSetupLabel.textContent = t('lanSetupNetwork')\n const lanSetupSelect = element('select'); lanSetupSelect.setAttribute('aria-label', t('lanSetupNetwork'))\n const lanSetupNote = element('p', 'dsh-mobile-control__component-note'); lanSetupNote.textContent = t('lanSetupFirewallNote')\n const lanSetupActions = element('div', 'dsh-mobile-control__lan-setup-actions')\n const lanSetupRefresh = element('button', 'dsh-mobile-control__secondary'); lanSetupRefresh.type = 'button'; lanSetupRefresh.textContent = t('lanSetupRefresh')\n const lanSetupConfigure = element('button', 'dsh-mobile-control__primary'); lanSetupConfigure.type = 'button'; lanSetupConfigure.textContent = t('lanSetupConfigure')\n const lanSetupStatus = element('p', 'dsh-mobile-control__status'); lanSetupStatus.setAttribute('role', 'status'); lanSetupStatus.setAttribute('aria-live', 'polite')\n lanSetupLabel.append(lanSetupSelect); lanSetupActions.append(lanSetupRefresh, lanSetupConfigure); lanSetupForm.append(lanSetupLabel, lanSetupNote, lanSetupActions); lanSetup.append(lanSetupTitle, lanSetupIntro, lanSetupForm, lanSetupStatus)\n const access = element('div', 'dsh-mobile-control__access'); access.hidden = true\n const accessLabel = element('span', 'dsh-mobile-control__access-label'); accessLabel.textContent = t('browserAccess')\n const accessLink = element('a', 'dsh-mobile-control__access-link'); accessLink.target = '_blank'; accessLink.rel = 'noreferrer'\n access.append(accessLabel, accessLink)\n const qrBox = element('div', 'dsh-mobile-control__qr'); qrBox.hidden = true\n const status = element('p', 'dsh-mobile-control__status'); status.textContent = t('loadingStatus')\n const extensionStatus = element('p', 'dsh-mobile-control__extensions'); extensionStatus.hidden = true\n const actions = element('div', 'dsh-mobile-control__actions')\n const toggle = element('button', 'dsh-mobile-control__secondary'); toggle.type = 'button'\n const pair = element('button', 'dsh-mobile-control__primary'); pair.type = 'button'; pair.textContent = t('generateCopyKey')\n const linkPair = element('button', 'dsh-mobile-control__secondary'); linkPair.type = 'button'; linkPair.textContent = t('copyPairLink')\n const manageRow = element('div', 'dsh-mobile-control__manage-row')\n const manageDevices = element('button', 'dsh-mobile-control__manage'); manageDevices.type = 'button'; manageDevices.textContent = t('managePairedDevices')\n const resetAll = element('button', 'dsh-mobile-control__manage'); resetAll.type = 'button'; resetAll.textContent = t('clearAllDevices')\n manageRow.append(manageDevices, resetAll)\n const devicePanel = element('div', 'dsh-mobile-control__devices'); devicePanel.hidden = true\n const remoteView = element('div', 'dsh-mobile-control__view is-remote'); remoteView.hidden = true\n const remoteIntro = element('p', 'dsh-mobile-control__intro'); remoteIntro.textContent = t('remoteIntro')\n const httpFrameWarning = element('p', 'dsh-mobile-control__http-frame-warning'); httpFrameWarning.textContent = t('httpFrameWarning'); httpFrameWarning.hidden = location.protocol !== 'https:'; httpFrameWarning.setAttribute('role', 'note')\n const providerSection = element('section', 'dsh-mobile-control__provider-section')\n const providerHeading = element('h3', 'dsh-mobile-control__section-title'); providerHeading.textContent = t('chooseProvider')\n const providerInfo = element('div', 'dsh-mobile-control__provider-info')\n const providerInfoButton = element('button', 'dsh-mobile-control__provider-info-button'); providerInfoButton.type = 'button'; providerInfoButton.setAttribute('aria-label', t('providerInfoAria')); providerInfoButton.setAttribute('aria-expanded', 'false'); providerInfoButton.setAttribute('aria-controls', 'dsh-mobile-provider-info'); providerInfoButton.setAttribute('aria-describedby', 'dsh-mobile-provider-info')\n const providerInfoGlyph = element('span', 'dsh-mobile-control__provider-info-glyph'); providerInfoGlyph.textContent = 'i'; providerInfoGlyph.setAttribute('aria-hidden', 'true')\n const providerInfoPopover = element('div', 'dsh-mobile-control__provider-info-popover'); providerInfoPopover.id = 'dsh-mobile-provider-info'; providerInfoPopover.setAttribute('role', 'tooltip'); providerInfoPopover.hidden = true\n const providerInfoTitle = element('strong'); providerInfoTitle.textContent = t('providerSafeTitle')\n const providerInfoText = element('span'); providerInfoText.textContent = t('providerSafeText')\n providerInfoButton.append(providerInfoGlyph); providerInfoPopover.append(providerInfoTitle, providerInfoText); providerInfo.append(providerInfoButton, providerInfoPopover)\n const providerChoices = element('div', 'dsh-mobile-control__provider-choices'); providerChoices.setAttribute('role', 'radiogroup'); providerChoices.setAttribute('aria-label', t('providerGroupAria'))\n const tailscaleChoice = element('button', 'dsh-mobile-control__provider'); tailscaleChoice.type = 'button'; tailscaleChoice.setAttribute('role', 'radio'); tailscaleChoice.setAttribute('aria-checked', 'true')\n const tailscaleChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const tailscaleChoiceName = element('strong'); tailscaleChoiceName.textContent = 'Tailscale Funnel'\n const tailscaleChoiceBadge = element('span', 'dsh-mobile-control__provider-badge'); tailscaleChoiceBadge.textContent = t('builtIn')\n const tailscaleChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); tailscaleChoiceDescription.textContent = t('tailscaleDescription')\n tailscaleChoiceTop.append(tailscaleChoiceName, tailscaleChoiceBadge); tailscaleChoice.append(tailscaleChoiceTop, tailscaleChoiceDescription)\n const cpolarChoice = element('button', 'dsh-mobile-control__provider'); cpolarChoice.type = 'button'; cpolarChoice.setAttribute('role', 'radio'); cpolarChoice.setAttribute('aria-checked', 'false')\n const cpolarChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const cpolarChoiceName = element('strong'); cpolarChoiceName.textContent = 'cpolar'\n const cpolarChoiceBadge = element('span', 'dsh-mobile-control__provider-badge is-cpolar'); cpolarChoiceBadge.textContent = t('mainlandPreferred')\n const cpolarChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); cpolarChoiceDescription.textContent = t('cpolarDescription')\n cpolarChoiceTop.append(cpolarChoiceName, cpolarChoiceBadge); cpolarChoice.append(cpolarChoiceTop, cpolarChoiceDescription)\n const cloudflaredChoice = element('button', 'dsh-mobile-control__provider'); cloudflaredChoice.type = 'button'; cloudflaredChoice.setAttribute('role', 'radio'); cloudflaredChoice.setAttribute('aria-checked', 'false')\n const cloudflaredChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const cloudflaredChoiceName = element('strong'); cloudflaredChoiceName.textContent = 'cloudflared'\n const cloudflaredChoiceBadge = element('span', 'dsh-mobile-control__provider-badge'); cloudflaredChoiceBadge.textContent = t('cloudflaredBadge')\n const cloudflaredChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); cloudflaredChoiceDescription.textContent = t('cloudflaredDescription')\n cloudflaredChoiceTop.append(cloudflaredChoiceName, cloudflaredChoiceBadge); cloudflaredChoice.append(cloudflaredChoiceTop, cloudflaredChoiceDescription)\n providerChoices.append(cpolarChoice, cloudflaredChoice, tailscaleChoice)\n // ARIA radios normally move focus and selection together, but choosing a provider switches\n // the remote channel behind a confirmation. The arrow keys therefore move focus only, Enter\n // or Space performs the guarded selection, and the group keeps a single tab stop.\n const providerCardOrder = [cpolarChoice, cloudflaredChoice, tailscaleChoice]\n providerChoices.addEventListener('keydown', event => {\n const step = event.key === 'ArrowRight' || event.key === 'ArrowDown' ? 1\n : event.key === 'ArrowLeft' || event.key === 'ArrowUp' ? -1 : 0\n const jump = event.key === 'Home' ? 0 : event.key === 'End' ? providerCardOrder.length - 1 : undefined\n if (step === 0 && jump === undefined) return\n const current = providerCardOrder.indexOf(document.activeElement as HTMLButtonElement)\n if (current < 0) return\n const next = jump ?? (current + step + providerCardOrder.length) % providerCardOrder.length\n event.preventDefault()\n providerCardOrder[next]?.focus()\n })\n const cpolarSetup = element('section', 'dsh-mobile-control__cpolar-setup'); cpolarSetup.hidden = true\n const cpolarSetupTitle = element('h3', 'dsh-mobile-control__section-title'); cpolarSetupTitle.textContent = t('prepareCpolar')\n const cpolarComponentStatus = element('p', 'dsh-mobile-control__component-status'); cpolarComponentStatus.textContent = t('checkingComponent')\n const cpolarInstall = element('button', 'dsh-mobile-control__primary'); cpolarInstall.type = 'button'; cpolarInstall.textContent = t('installOfficial')\n const cpolarAccount = element('div', 'dsh-mobile-control__cpolar-account'); cpolarAccount.hidden = true\n const cpolarAccountText = element('p', 'dsh-mobile-control__component-note'); cpolarAccountText.textContent = t('cpolarAccountNote')\n const cpolarAccountLinks = element('div', 'dsh-mobile-control__link-row')\n const cpolarSignup = element('a', 'dsh-mobile-control__text-link'); cpolarSignup.href = 'https://dashboard.cpolar.com/signup'; cpolarSignup.target = '_blank'; cpolarSignup.rel = 'noopener noreferrer'; cpolarSignup.textContent = t('registerCpolar')\n const cpolarDashboard = element('a', 'dsh-mobile-control__text-link'); cpolarDashboard.href = 'https://dashboard.cpolar.com/auth'; cpolarDashboard.target = '_blank'; cpolarDashboard.rel = 'noopener noreferrer'; cpolarDashboard.textContent = t('openDashboard')\n cpolarAccountLinks.append(cpolarSignup, cpolarDashboard)\n const cpolarTokenLabel = element('label', 'dsh-mobile-control__token-label'); cpolarTokenLabel.textContent = 'Authtoken'\n const cpolarToken = element('input', 'dsh-mobile-control__token'); cpolarToken.type = 'password'; cpolarToken.autocomplete = 'off'; cpolarToken.spellcheck = false; cpolarToken.placeholder = t('tokenPlaceholder'); cpolarTokenLabel.append(cpolarToken)\n const cpolarConfigure = element('button', 'dsh-mobile-control__primary dsh-mobile-control__cpolar-connect'); cpolarConfigure.type = 'button'; cpolarConfigure.textContent = t('saveConnect')\n cpolarAccount.append(cpolarAccountText, cpolarAccountLinks, cpolarTokenLabel, cpolarConfigure)\n const cpolarDetails = element('details', 'dsh-mobile-control__details')\n const cpolarDetailsSummary = element('summary'); cpolarDetailsSummary.textContent = t('componentDetails')\n const cpolarDetailsBody = element('div', 'dsh-mobile-control__details-body')\n const cpolarDetailsText = element('p'); cpolarDetailsText.textContent = t('componentDetailsText')\n const cpolarStorage = element('code', 'dsh-mobile-control__storage'); cpolarStorage.textContent = t('pluginPrivateDirectory')\n const cpolarOfficial = element('a', 'dsh-mobile-control__text-link'); cpolarOfficial.href = 'https://www.cpolar.com/download'; cpolarOfficial.target = '_blank'; cpolarOfficial.rel = 'noopener noreferrer'; cpolarOfficial.textContent = t('officialDownload')\n const cpolarTerms = element('a', 'dsh-mobile-control__text-link'); cpolarTerms.href = 'https://www.cpolar.com/tos'; cpolarTerms.target = '_blank'; cpolarTerms.rel = 'noopener noreferrer'; cpolarTerms.textContent = t('terms')\n const cpolarPurge = element('button', 'dsh-mobile-control__danger'); cpolarPurge.type = 'button'; cpolarPurge.textContent = t('purgeCpolar')\n cpolarDetailsBody.append(cpolarDetailsText, cpolarStorage, cpolarOfficial, cpolarTerms, cpolarPurge); cpolarDetails.append(cpolarDetailsSummary, cpolarDetailsBody)\n cpolarSetup.append(cpolarSetupTitle, cpolarComponentStatus, cpolarInstall, cpolarAccount, cpolarDetails)\n // Share the managed-component setup layout: a quick tunnel has no account\n // section, so only the install action, the temporary-address warning, and the\n // component source/cleanup disclosure remain.\n const cloudflaredSetup = element('section', 'dsh-mobile-control__cpolar-setup dsh-mobile-control__cloudflared-setup'); cloudflaredSetup.hidden = true\n const cloudflaredSetupTitle = element('h3', 'dsh-mobile-control__section-title'); cloudflaredSetupTitle.textContent = t('prepareCloudflared')\n // Tunnel type comes first: it decides whether an account token is needed at all,\n // while the component below is required either way.\n const cloudflaredTunnelTitle = element('h3', 'dsh-mobile-control__section-title'); cloudflaredTunnelTitle.textContent = t('cloudflaredTunnelTitle')\n const cloudflaredMode = element('div', 'dsh-mobile-control__switcher')\n const cloudflaredModeQuick = element('button', 'dsh-mobile-control__tab is-active'); cloudflaredModeQuick.type = 'button'; cloudflaredModeQuick.textContent = t('cloudflaredTunnelQuick')\n const cloudflaredModeNamed = element('button', 'dsh-mobile-control__tab'); cloudflaredModeNamed.type = 'button'; cloudflaredModeNamed.textContent = t('cloudflaredTunnelNamed')\n cloudflaredMode.append(cloudflaredModeQuick, cloudflaredModeNamed)\n const cloudflaredModeHint = element('p', 'dsh-mobile-control__component-status'); cloudflaredModeHint.textContent = t('cloudflaredTunnelQuickHint')\n const cloudflaredTunnel = element('div', 'dsh-mobile-control__tunnel'); cloudflaredTunnel.hidden = true\n const cloudflaredTunnelFields = element('div', 'dsh-mobile-control__frp-fields')\n const cloudflaredHostnameLabel = element('label', 'dsh-mobile-control__field'); cloudflaredHostnameLabel.textContent = t('cloudflaredTunnelHostname')\n const cloudflaredHostname = element('input'); cloudflaredHostname.type = 'text'; cloudflaredHostname.autocomplete = 'off'; cloudflaredHostname.spellcheck = false; cloudflaredHostname.placeholder = t('cloudflaredTunnelHostnamePlaceholder')\n const cloudflaredPortLabel = element('label', 'dsh-mobile-control__field'); cloudflaredPortLabel.textContent = t('cloudflaredTunnelPort')\n const cloudflaredPort = element('input'); cloudflaredPort.type = 'number'; cloudflaredPort.inputMode = 'numeric'; cloudflaredPort.min = '1024'; cloudflaredPort.max = '65535'; cloudflaredPort.value = '3444'\n const cloudflaredTokenLabel = element('label', 'dsh-mobile-control__field'); cloudflaredTokenLabel.textContent = t('cloudflaredTunnelToken')\n const cloudflaredToken = element('input'); cloudflaredToken.type = 'password'; cloudflaredToken.autocomplete = 'off'; cloudflaredToken.spellcheck = false; cloudflaredToken.placeholder = t('cloudflaredTunnelTokenPlaceholder')\n cloudflaredHostnameLabel.append(cloudflaredHostname); cloudflaredPortLabel.append(cloudflaredPort); cloudflaredTokenLabel.append(cloudflaredToken)\n cloudflaredTunnelFields.append(cloudflaredHostnameLabel, cloudflaredPortLabel, cloudflaredTokenLabel)\n const cloudflaredTunnelStatus = element('p', 'dsh-mobile-control__component-status'); cloudflaredTunnelStatus.textContent = t('cloudflaredTunnelMissing')\n const cloudflaredTunnelHint = element('p', 'dsh-mobile-control__component-status'); cloudflaredTunnelHint.textContent = t('cloudflaredTunnelHint', { port: '3444' })\n const cloudflaredTunnelSave = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); cloudflaredTunnelSave.type = 'button'; cloudflaredTunnelSave.textContent = t('cloudflaredTunnelSave')\n /** The button commits the shown mode, so quick mode must not promise to save settings. */\n const cloudflaredSaveLabel = (): string => (cloudflaredModeDraft ?? cloudflaredTunnelMode) === 'named'\n ? t('cloudflaredTunnelSave') : t('cloudflaredTunnelSaveQuick')\n const cloudflaredTunnelForget = element('button', 'dsh-mobile-control__danger dsh-mobile-control__frp-action'); cloudflaredTunnelForget.type = 'button'; cloudflaredTunnelForget.textContent = t('cloudflaredTunnelForget'); cloudflaredTunnelForget.hidden = true\n // Only the named-tunnel inputs live in this container. Save and Forget stay\n // outside it: Save is also how a quick tunnel is committed, so hiding the\n // container must never take the only way to submit the form with it.\n cloudflaredTunnel.append(cloudflaredTunnelFields, cloudflaredTunnelStatus, cloudflaredTunnelHint)\n const cloudflaredComponentStatus = element('p', 'dsh-mobile-control__component-status'); cloudflaredComponentStatus.textContent = t('checkingComponent')\n const cloudflaredInstall = element('button', 'dsh-mobile-control__primary'); cloudflaredInstall.type = 'button'; cloudflaredInstall.textContent = t('installOfficial')\n const cloudflaredNote = element('p', 'dsh-mobile-control__origin-warning'); cloudflaredNote.textContent = t('cloudflaredQuickNote')\n const cloudflaredDetails = element('details', 'dsh-mobile-control__details')\n const cloudflaredDetailsSummary = element('summary'); cloudflaredDetailsSummary.textContent = t('componentDetails')\n const cloudflaredDetailsBody = element('div', 'dsh-mobile-control__details-body')\n const cloudflaredDetailsText = element('p'); cloudflaredDetailsText.textContent = t('cloudflaredComponentNote')\n const cloudflaredStorage = element('code', 'dsh-mobile-control__storage'); cloudflaredStorage.textContent = t('pluginPrivateDirectory')\n const cloudflaredOfficial = element('a', 'dsh-mobile-control__text-link'); cloudflaredOfficial.href = 'https://github.com/cloudflare/cloudflared/releases'; cloudflaredOfficial.target = '_blank'; cloudflaredOfficial.rel = 'noopener noreferrer'; cloudflaredOfficial.textContent = t('officialDownload')\n const cloudflaredTerms = element('a', 'dsh-mobile-control__text-link'); cloudflaredTerms.href = 'https://www.cloudflare.com/website-terms/'; cloudflaredTerms.target = '_blank'; cloudflaredTerms.rel = 'noopener noreferrer'; cloudflaredTerms.textContent = t('terms')\n const cloudflaredPurge = element('button', 'dsh-mobile-control__danger'); cloudflaredPurge.type = 'button'; cloudflaredPurge.textContent = t('purgeCloudflared')\n cloudflaredDetailsBody.append(cloudflaredDetailsText, cloudflaredStorage, cloudflaredOfficial, cloudflaredTerms, cloudflaredPurge); cloudflaredDetails.append(cloudflaredDetailsSummary, cloudflaredDetailsBody)\n cloudflaredSetup.append(cloudflaredSetupTitle, cloudflaredTunnelTitle, cloudflaredMode, cloudflaredModeHint, cloudflaredTunnel, cloudflaredTunnelSave, cloudflaredTunnelForget, cloudflaredComponentStatus, cloudflaredInstall, cloudflaredNote, cloudflaredDetails)\n const selfHosted = element('details', 'dsh-mobile-control__self-hosted')\n const selfHostedSummary = element('summary', 'dsh-mobile-control__self-hosted-summary')\n const selfHostedSummaryText = element('span')\n const selfHostedSummaryTitle = element('strong'); selfHostedSummaryTitle.textContent = t('selfHostedConnections')\n const selfHostedSummaryDescription = element('span'); selfHostedSummaryDescription.textContent = t('selfHostedDescription')\n const selfHostedBadge = element('span', 'dsh-mobile-control__provider-badge is-frp'); selfHostedBadge.textContent = t('advanced')\n selfHostedSummaryText.append(selfHostedSummaryTitle, selfHostedSummaryDescription); selfHostedSummary.append(selfHostedSummaryText, selfHostedBadge)\n const selfHostedBody = element('div', 'dsh-mobile-control__self-hosted-body')\n const frpChoice = element('button', 'dsh-mobile-control__provider is-frp'); frpChoice.type = 'button'; frpChoice.setAttribute('aria-pressed', 'false')\n const frpChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const frpChoiceName = element('strong'); frpChoiceName.textContent = t('frpName')\n const frpChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); frpChoiceDescription.textContent = t('frpDescription')\n frpChoiceTop.append(frpChoiceName); frpChoice.append(frpChoiceTop, frpChoiceDescription)\n const originChoice = element('button', 'dsh-mobile-control__provider is-origin'); originChoice.type = 'button'; originChoice.setAttribute('aria-pressed', 'false')\n const originChoiceTop = element('span', 'dsh-mobile-control__provider-top')\n const originChoiceName = element('strong'); originChoiceName.textContent = t('originName')\n const originChoiceDescription = element('span', 'dsh-mobile-control__provider-description'); originChoiceDescription.textContent = t('originDescription')\n originChoiceTop.append(originChoiceName); originChoice.append(originChoiceTop, originChoiceDescription)\n selfHostedBody.append(frpChoice, originChoice); selfHosted.append(selfHostedSummary, selfHostedBody)\n providerSection.append(providerHeading, providerInfo, providerChoices, selfHosted)\n const frpSetup = element('section', 'dsh-mobile-control__frp-setup'); frpSetup.hidden = true\n const frpSetupTitle = element('h3', 'dsh-mobile-control__section-title'); frpSetupTitle.textContent = t('prepareFrp')\n const frpStep1 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep1Title = element('strong'); frpStep1Title.textContent = t('frpStep1Title')\n const frpStep1Text = element('p'); frpStep1Text.textContent = t('frpStep1Text')\n const frpFields = element('div', 'dsh-mobile-control__frp-fields')\n const frpServerLabel = element('label', 'dsh-mobile-control__field'); frpServerLabel.textContent = t('frpServerAddress')\n const frpServer = element('input'); frpServer.type = 'text'; frpServer.autocomplete = 'off'; frpServer.spellcheck = false; frpServer.placeholder = t('frpServerAddressPlaceholder')\n const frpPortLabel = element('label', 'dsh-mobile-control__field'); frpPortLabel.textContent = t('frpServerPort')\n const frpPort = element('input'); frpPort.type = 'number'; frpPort.inputMode = 'numeric'; frpPort.min = '1'; frpPort.max = '65535'; frpPort.value = '7000'\n const frpTokenLabel = element('label', 'dsh-mobile-control__field'); frpTokenLabel.textContent = t('frpToken')\n const frpToken = element('input'); frpToken.type = 'password'; frpToken.autocomplete = 'off'; frpToken.spellcheck = false; frpToken.placeholder = t('frpTokenPlaceholder')\n const frpOriginLabel = element('label', 'dsh-mobile-control__field'); frpOriginLabel.textContent = t('frpPublicOrigin')\n const frpOrigin = element('input'); frpOrigin.type = 'url'; frpOrigin.autocomplete = 'off'; frpOrigin.spellcheck = false; frpOrigin.placeholder = t('frpPublicOriginPlaceholder')\n frpServerLabel.append(frpServer); frpPortLabel.append(frpPort); frpTokenLabel.append(frpToken); frpOriginLabel.append(frpOrigin)\n frpFields.append(frpServerLabel, frpPortLabel, frpTokenLabel, frpOriginLabel); frpStep1.append(frpStep1Title, frpStep1Text, frpFields)\n const frpStep2 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep2Title = element('strong'); frpStep2Title.textContent = t('frpStep2Title')\n const frpStep2Text = element('p'); frpStep2Text.textContent = t('frpStep2Text')\n const frpCopyTemplate = element('button', 'dsh-mobile-control__secondary dsh-mobile-control__frp-action'); frpCopyTemplate.type = 'button'; frpCopyTemplate.textContent = t('copyServerTemplate')\n const vpsDeployText = element('p'); vpsDeployText.textContent = t('vpsDeployText')\n const vpsChangesTitle = element('p'); vpsChangesTitle.textContent = t('vpsDeployChangesTitle')\n const vpsChanges = element('ul', 'dsh-mobile-control__frp-changes')\n for (const key of ['vpsDeployChangePackages', 'vpsDeployChangeServices', 'vpsDeployChangeFirewall', 'vpsDeployChangeManual'] as const) {\n const item = element('li'); item.textContent = t(key); vpsChanges.append(item)\n }\n const vpsDeployFields = element('div', 'dsh-mobile-control__frp-fields')\n const vpsSshUserLabel = element('label', 'dsh-mobile-control__field'); vpsSshUserLabel.textContent = t('vpsSshUser')\n const vpsSshUser = element('input'); vpsSshUser.type = 'text'; vpsSshUser.autocomplete = 'username'; vpsSshUser.value = 'ubuntu'; vpsSshUser.spellcheck = false\n const vpsSshPortLabel = element('label', 'dsh-mobile-control__field'); vpsSshPortLabel.textContent = t('vpsSshPort')\n const vpsSshPort = element('input'); vpsSshPort.type = 'number'; vpsSshPort.inputMode = 'numeric'; vpsSshPort.min = '1'; vpsSshPort.max = '65535'; vpsSshPort.value = '22'\n const vpsSshKeyLabel = element('label', 'dsh-mobile-control__field'); vpsSshKeyLabel.textContent = t('vpsSshKey')\n const vpsSshKey = element('input'); vpsSshKey.type = 'text'; vpsSshKey.autocomplete = 'off'; vpsSshKey.spellcheck = false; vpsSshKey.placeholder = t('vpsSshKeyPlaceholder')\n vpsSshUserLabel.append(vpsSshUser); vpsSshPortLabel.append(vpsSshPort); vpsSshKeyLabel.append(vpsSshKey)\n vpsDeployFields.append(vpsSshUserLabel, vpsSshPortLabel, vpsSshKeyLabel)\n const vpsDeploy = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); vpsDeploy.type = 'button'; vpsDeploy.textContent = t('vpsDeploy')\n const vpsDeployStatus = element('p', 'dsh-mobile-control__component-status'); vpsDeployStatus.textContent = ''\n const vpsCopyUninstall = element('button', 'dsh-mobile-control__secondary dsh-mobile-control__frp-action'); vpsCopyUninstall.type = 'button'; vpsCopyUninstall.textContent = t('vpsCopyUninstall')\n const vpsUninstall = element('button', 'dsh-mobile-control__danger dsh-mobile-control__frp-action'); vpsUninstall.type = 'button'; vpsUninstall.textContent = t('vpsUninstall')\n frpStep2.append(frpStep2Title, frpStep2Text, frpCopyTemplate, vpsDeployText, vpsChangesTitle, vpsChanges, vpsDeployFields, vpsDeploy, vpsDeployStatus, vpsCopyUninstall, vpsUninstall)\n const frpStep3 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep3Title = element('strong'); frpStep3Title.textContent = t('frpStep3Title')\n const frpStep3Text = element('p'); frpStep3Text.textContent = t('frpStep3Text')\n const frpComponentStatus = element('p', 'dsh-mobile-control__component-status'); frpComponentStatus.textContent = t('checkingComponent')\n const frpInstall = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); frpInstall.type = 'button'; frpInstall.textContent = t('installFrpc')\n frpStep3.append(frpStep3Title, frpStep3Text, frpComponentStatus, frpInstall)\n const frpStep4 = element('section', 'dsh-mobile-control__frp-step')\n const frpStep4Title = element('strong'); frpStep4Title.textContent = t('frpStep4Title')\n const frpStep4Text = element('p'); frpStep4Text.textContent = t('frpStep4Text')\n const frpAppRequirement = element('p', 'dsh-mobile-control__frp-requirement'); frpAppRequirement.textContent = t('frpAppRequirement')\n const frpConfigurationStatus = element('p', 'dsh-mobile-control__component-status'); frpConfigurationStatus.textContent = t('frpConfigurationMissing')\n const frpConfigure = element('button', 'dsh-mobile-control__primary dsh-mobile-control__frp-action'); frpConfigure.type = 'button'; frpConfigure.textContent = t('frpSaveConnect')\n frpStep4.append(frpStep4Title, frpStep4Text, frpAppRequirement, frpConfigurationStatus, frpConfigure)\n const frpDetails = element('details', 'dsh-mobile-control__details')\n const frpDetailsSummary = element('summary'); frpDetailsSummary.textContent = t('frpComponentDetails')\n const frpDetailsBody = element('div', 'dsh-mobile-control__details-body')\n const frpDetailsText = element('p'); frpDetailsText.textContent = t('frpComponentDetailsText')\n const frpStorage = element('code', 'dsh-mobile-control__storage'); frpStorage.textContent = t('pluginPrivateDirectory')\n const frpOfficial = element('a', 'dsh-mobile-control__text-link'); frpOfficial.href = 'https://github.com/fatedier/frp/releases/tag/v0.70.1'; frpOfficial.target = '_blank'; frpOfficial.rel = 'noopener noreferrer'; frpOfficial.textContent = t('frpOfficialRelease')\n const frpPurge = element('button', 'dsh-mobile-control__danger'); frpPurge.type = 'button'; frpPurge.textContent = t('purgeFrp')\n frpDetailsBody.append(frpDetailsText, frpStorage, frpOfficial, frpPurge); frpDetails.append(frpDetailsSummary, frpDetailsBody)\n const frpOverview = element('section', 'dsh-mobile-control__frp-overview'); frpOverview.hidden = true\n const frpOverviewMark = element('span', 'dsh-mobile-control__frp-overview-mark'); frpOverviewMark.textContent = '✓'\n const frpOverviewBody = element('div', 'dsh-mobile-control__frp-overview-body')\n const frpOverviewTitle = element('strong'); frpOverviewTitle.textContent = t('frpConfigurationReady')\n const frpOverviewEndpoint = element('span'); frpOverviewEndpoint.textContent = ''\n frpOverviewBody.append(frpOverviewTitle, frpOverviewEndpoint); frpOverview.append(frpOverviewMark, frpOverviewBody)\n const frpConnectionGroup = element('details', 'dsh-mobile-control__frp-group')\n const frpConnectionSummary = element('summary'); frpConnectionSummary.textContent = t('frpStep1Title')\n frpConnectionGroup.append(frpConnectionSummary, frpStep1)\n const frpVpsGroup = element('details', 'dsh-mobile-control__frp-group')\n const frpVpsSummary = element('summary'); frpVpsSummary.textContent = t('frpStep2Title')\n frpVpsGroup.append(frpVpsSummary, frpStep2)\n const frpComponentGroup = element('details', 'dsh-mobile-control__frp-group')\n const frpComponentSummary = element('summary'); frpComponentSummary.textContent = t('frpStep3Title')\n frpComponentGroup.append(frpComponentSummary, frpStep3)\n const frpVerifyGroup = element('details', 'dsh-mobile-control__frp-group'); frpVerifyGroup.open = true\n const frpVerifySummary = element('summary'); frpVerifySummary.textContent = t('frpStep4Title')\n frpVerifyGroup.append(frpVerifySummary, frpStep4)\n frpSetup.append(frpSetupTitle, frpOverview, frpConnectionGroup, frpVpsGroup, frpComponentGroup, frpVerifyGroup, frpDetails)\n const originSetup = element('section', 'dsh-mobile-control__origin-setup'); originSetup.hidden = true\n const originSetupTitle = element('h3', 'dsh-mobile-control__section-title'); originSetupTitle.textContent = t('prepareOrigin')\n const originHelp = element('p', 'dsh-mobile-control__component-note'); originHelp.id = 'dsh-mobile-origin-help'; originHelp.textContent = t('originHelp')\n const originWarning = element('p', 'dsh-mobile-control__origin-warning'); originWarning.textContent = t('originWarning')\n const originFields = element('div', 'dsh-mobile-control__origin-fields')\n const originPublicLabel = element('label', 'dsh-mobile-control__field'); originPublicLabel.textContent = t('originPublicOrigin')\n const originPublic = element('input'); originPublic.type = 'url'; originPublic.placeholder = 'https://phone.example.com:8815'; originPublic.maxLength = 512\n const originHostLabel = element('label', 'dsh-mobile-control__field'); originHostLabel.textContent = t('originListenHost')\n const originHost = element('input'); originHost.type = 'text'; originHost.value = '127.0.0.1'; originHost.maxLength = 15\n const originPortLabel = element('label', 'dsh-mobile-control__field'); originPortLabel.textContent = t('originListenPort')\n const originPort = element('input'); originPort.type = 'number'; originPort.inputMode = 'numeric'; originPort.min = '1024'; originPort.max = '65535'; originPort.step = '1'; originPort.value = '3444'\n const originCidrsLabel = element('label', 'dsh-mobile-control__field'); originCidrsLabel.textContent = t('originAllowedCidrs')\n const originCidrs = element('input'); originCidrs.type = 'text'; originCidrs.value = '127.0.0.0/8'; originCidrs.maxLength = 1040\n for (const input of [originPublic, originHost, originPort, originCidrs]) {\n input.required = true; input.autocomplete = 'off'; input.spellcheck = false\n input.setAttribute('aria-describedby', 'dsh-mobile-origin-help dsh-mobile-origin-feedback')\n }\n originPublicLabel.append(originPublic); originHostLabel.append(originHost); originPortLabel.append(originPort); originCidrsLabel.append(originCidrs)\n originFields.append(originPublicLabel, originHostLabel, originPortLabel, originCidrsLabel)\n const originFeedback = element('p', 'dsh-mobile-control__origin-feedback'); originFeedback.id = 'dsh-mobile-origin-feedback'; originFeedback.setAttribute('role', 'status'); originFeedback.setAttribute('aria-live', 'polite'); originFeedback.hidden = true\n const originConfigure = element('button', 'dsh-mobile-control__primary'); originConfigure.type = 'button'; originConfigure.textContent = t('originSaveStart')\n const originPurge = element('button', 'dsh-mobile-control__danger'); originPurge.type = 'button'; originPurge.textContent = t('originPurge'); originPurge.hidden = true\n const originFormActions = element('div', 'dsh-mobile-control__actions'); originFormActions.append(originConfigure, originPurge)\n const originBackend = element('div', 'dsh-mobile-control__origin-backend'); originBackend.hidden = true\n const originBackendLabel = element('span', 'dsh-mobile-control__access-label')\n const originBackendAddress = element('code', 'dsh-mobile-control__storage')\n const originCopyBackend = element('button', 'dsh-mobile-control__secondary'); originCopyBackend.type = 'button'; originCopyBackend.textContent = t('originCopyBackend')\n originBackend.append(originBackendLabel, originBackendAddress, originCopyBackend)\n originSetup.append(originSetupTitle, originHelp, originWarning, originFields, originFeedback, originFormActions, originBackend)\n const tailscaleInfo = element('details', 'dsh-mobile-control__details')\n const tailscaleInfoSummary = element('summary'); tailscaleInfoSummary.textContent = t('tailscaleHelp')\n const tailscaleInfoBody = element('div', 'dsh-mobile-control__details-body')\n const tailscaleInfoText = element('p'); tailscaleInfoText.textContent = t('tailscaleHelpText')\n tailscaleInfoBody.append(tailscaleInfoText); tailscaleInfo.append(tailscaleInfoSummary, tailscaleInfoBody)\n const providerSetupHeader = element('div', 'dsh-mobile-control__stage-header')\n const providerSetupHeading = element('h3', 'dsh-mobile-control__section-title'); providerSetupHeading.textContent = t('currentProvider')\n const providerSetupName = element('span', 'dsh-mobile-control__stage-value'); providerSetupName.textContent = 'Tailscale Funnel'\n const remoteStateBadge = element('span', 'dsh-mobile-control__state-badge'); remoteStateBadge.textContent = t('remoteStateOff')\n const providerSetupMeta = element('div', 'dsh-mobile-control__stage-meta'); providerSetupMeta.append(providerSetupName, remoteStateBadge)\n providerSetupHeader.append(providerSetupHeading, providerSetupMeta)\n const providerSetupBody = element('div', 'dsh-mobile-control__provider-setup-body')\n providerSetupBody.append(cpolarSetup, cloudflaredSetup, frpSetup, originSetup, tailscaleInfo)\n const remoteAccess = element('div', 'dsh-mobile-control__access'); remoteAccess.hidden = true\n const remoteAccessLabel = element('span', 'dsh-mobile-control__access-label'); remoteAccessLabel.textContent = t('remoteAddress')\n const remoteAccessLink = element('a', 'dsh-mobile-control__access-link'); remoteAccessLink.target = '_blank'; remoteAccessLink.rel = 'noreferrer'; remoteAccess.append(remoteAccessLabel, remoteAccessLink)\n const remoteQr = element('div', 'dsh-mobile-control__qr'); remoteQr.hidden = true\n const remoteStatus = element('p', 'dsh-mobile-control__status'); remoteStatus.textContent = t('loadingRemoteStatus'); remoteStatus.setAttribute('aria-live', 'polite')\n const remoteGuide = element('section', 'dsh-mobile-control__guide'); remoteGuide.hidden = true; remoteGuide.setAttribute('aria-label', t('funnelGuideAria'))\n const remoteGuideTitle = element('h3', 'dsh-mobile-control__guide-title'); remoteGuideTitle.textContent = t('funnelGuideTitle')\n const remoteGuideSummary = element('p', 'dsh-mobile-control__guide-summary'); remoteGuideSummary.textContent = t('funnelGuideSummary')\n const remoteGuideSteps = element('ol', 'dsh-mobile-control__guide-steps')\n for (const text of [t('funnelStep1'), t('funnelStep2'), t('funnelStep3')]) {\n const item = element('li'); item.textContent = text; remoteGuideSteps.append(item)\n }\n const remoteGuideNote = element('p', 'dsh-mobile-control__guide-note'); remoteGuideNote.textContent = t('funnelGuideNote')\n const remoteGuideActions = element('div', 'dsh-mobile-control__guide-actions')\n const remoteSetup = element('button', 'dsh-mobile-control__primary'); remoteSetup.type = 'button'; remoteSetup.textContent = t('continueFunnel')\n const remoteSetupRetry = element('button', 'dsh-mobile-control__secondary'); remoteSetupRetry.type = 'button'; remoteSetupRetry.textContent = t('retryNow')\n remoteGuideActions.append(remoteSetup, remoteSetupRetry); remoteGuide.append(remoteGuideTitle, remoteGuideSummary, remoteGuideSteps, remoteGuideNote, remoteGuideActions)\n const remoteActions = element('div', 'dsh-mobile-control__actions')\n const remoteToggle = element('button', 'dsh-mobile-control__primary'); remoteToggle.type = 'button'; remoteToggle.textContent = t('enableRemote')\n const remoteLogin = element('button', 'dsh-mobile-control__primary'); remoteLogin.type = 'button'; remoteLogin.textContent = t('continueLogin'); remoteLogin.hidden = true\n const remoteReconnect = element('button', 'dsh-mobile-control__secondary'); remoteReconnect.type = 'button'; remoteReconnect.textContent = t('reconnect'); remoteReconnect.hidden = true\n const remotePair = element('button', 'dsh-mobile-control__secondary'); remotePair.type = 'button'; remotePair.textContent = t('generateRemoteQr'); remotePair.disabled = true\n const remoteCopyLink = element('button', 'dsh-mobile-control__secondary'); remoteCopyLink.type = 'button'; remoteCopyLink.textContent = t('copyRemoteLink'); remoteCopyLink.disabled = true\n const remotePairLink = element('p', 'dsh-mobile-control__status'); remotePairLink.hidden = true\n let activeRemotePairUrl = ''\n let activeRemotePairExpiresAt = 0\n remoteActions.append(remoteToggle, remoteLogin, remoteReconnect, remotePair, remoteCopyLink)\n const remoteManageRow = element('div', 'dsh-mobile-control__manage-row')\n const remoteDevices = element('button', 'dsh-mobile-control__manage'); remoteDevices.type = 'button'; remoteDevices.textContent = t('manageRemoteDevices'); remoteDevices.disabled = true\n const remoteReset = element('button', 'dsh-mobile-control__manage'); remoteReset.type = 'button'; remoteReset.textContent = t('resetRemoteLogin')\n remoteManageRow.append(remoteDevices, remoteReset)\n const remoteDevicePanel = element('div', 'dsh-mobile-control__devices'); remoteDevicePanel.hidden = true\n const wsPathsSection = element('section', 'dsh-mobile-control__ws-paths')\n const wsPathsTitle = element('h3', 'dsh-mobile-control__section-title'); wsPathsTitle.textContent = t('wsPathsTitle')\n const wsPathsIntro = element('p', 'dsh-mobile-control__intro'); wsPathsIntro.textContent = t('wsPathsIntro')\n const wsPathsDetected = element('div', 'dsh-mobile-control__ws-paths-detected'); wsPathsDetected.hidden = true\n const wsPathsDetectedTitle = element('p', 'dsh-mobile-control__ws-paths-detected-title'); wsPathsDetectedTitle.textContent = t('wsPathsDetected')\n const wsPathsDetectedList = element('ul', 'dsh-mobile-control__ws-paths-list')\n wsPathsDetected.append(wsPathsDetectedTitle, wsPathsDetectedList)\n const wsPathsList = element('ul', 'dsh-mobile-control__ws-paths-list')\n const wsPathsAdvanced = element('details', 'dsh-mobile-control__ws-paths-advanced')\n const wsPathsAdvancedSummary = element('summary'); wsPathsAdvancedSummary.textContent = t('wsPathsAdvancedToggle')\n const wsPathsAdvancedHint = element('p', 'dsh-mobile-control__intro'); wsPathsAdvancedHint.textContent = t('wsPathsAdvancedHint')\n const wsPathsRow = element('div', 'dsh-mobile-control__ws-paths-row')\n const wsPathsInput = element('input', 'dsh-mobile-control__ws-paths-input'); wsPathsInput.type = 'text'; wsPathsInput.placeholder = t('wsPathsPlaceholder'); wsPathsInput.setAttribute('aria-label', t('wsPathsTitle'))\n const wsPathsAdd = element('button', 'dsh-mobile-control__primary'); wsPathsAdd.type = 'button'; wsPathsAdd.textContent = t('wsPathsAdd')\n const wsPathsStatus = element('p', 'dsh-mobile-control__status'); wsPathsStatus.hidden = true; wsPathsStatus.setAttribute('aria-live', 'polite')\n wsPathsRow.append(wsPathsInput, wsPathsAdd)\n wsPathsAdvanced.append(wsPathsAdvancedSummary, wsPathsAdvancedHint, wsPathsRow, wsPathsStatus)\n wsPathsSection.append(wsPathsTitle, wsPathsIntro, wsPathsDetected, wsPathsList, wsPathsAdvanced)\n let wsPathsCurrent: string[] = []\n let wsPathsBlocked: { readonly path: string; readonly attempts: number }[] = []\n let wsPathsLoaded = false\n const renderWsPaths = (paths: readonly string[]): void => {\n wsPathsCurrent = [...paths]\n wsPathsList.replaceChildren()\n if (paths.length === 0) {\n const empty = element('li', 'dsh-mobile-control__ws-paths-empty'); empty.textContent = t('wsPathsEmpty'); wsPathsList.append(empty)\n }\n for (const path of paths) {\n const item = element('li', 'dsh-mobile-control__ws-paths-item')\n const label = element('code'); label.textContent = path\n const remove = element('button', 'dsh-mobile-control__ws-paths-remove'); remove.type = 'button'; remove.textContent = t('wsPathsRemove'); remove.setAttribute('aria-label', `${t('wsPathsRemove')}: ${path}`)\n remove.addEventListener('click', () => { void saveWsPaths(wsPathsCurrent.filter(entry => entry !== path)) })\n item.append(label, remove)\n wsPathsList.append(item)\n }\n }\n const wsGroupOf = (path: string): string => {\n const slash = path.lastIndexOf('/')\n return slash > 0 ? path.slice(0, slash) : '/'\n }\n let wsPathsSeenAttempts = 0\n let wsDotAnnounced = 0\n const wsDotStatus = element('p', 'dsh-mobile-control__ws-sr-status')\n wsDotStatus.setAttribute('role', 'status'); wsDotStatus.setAttribute('aria-atomic', 'true')\n const wsBlockedTotal = (blocked: readonly { readonly attempts: number }[]): number =>\n blocked.reduce((sum, entry) => sum + entry.attempts, 0)\n const renderWsDot = (): void => {\n for (const stale of document.querySelectorAll('.dsh-mobile-control__ws-dot')) stale.remove()\n if (!wsDotStatus.isConnected) root.append(wsDotStatus)\n const pending = wsPathsBlocked.filter(entry => !wsPathsCurrent.includes(entry.path))\n const pendingCount = pending.length\n if (pendingCount === 0 || wsBlockedTotal(wsPathsBlocked) <= wsPathsSeenAttempts) {\n if (pendingCount === 0 && wsDotAnnounced !== 0) { wsDotAnnounced = 0; wsDotStatus.textContent = '' }\n return\n }\n if (wsDotAnnounced !== pendingCount) {\n wsDotAnnounced = pendingCount\n wsDotStatus.textContent = t('wsPathsAnnounce', { n: String(pendingCount) })\n }\n for (const trigger of document.querySelectorAll('.dsh-mobile-control__trigger, .dsh-mobile-control__diagnostic-entry')) {\n const dot = element('span', 'dsh-mobile-control__ws-dot'); dot.textContent = String(pendingCount); dot.title = t('wsPathsNewBlocked'); dot.setAttribute('aria-hidden', 'true')\n dot.addEventListener('click', event => { event.stopPropagation(); setOpen(true); selectView('diagnostics') })\n trigger.append(dot)\n }\n }\n const renderWsBlocked = (blocked: readonly { readonly path: string; readonly attempts: number }[]): void => {\n wsPathsDetectedList.replaceChildren()\n const pending = blocked.filter(entry => !wsPathsCurrent.includes(entry.path))\n wsPathsDetected.hidden = pending.length === 0\n const groups = new Map<string, { readonly path: string; readonly attempts: number }[]>()\n for (const entry of pending) {\n const group = wsGroupOf(entry.path)\n const list = groups.get(group)\n if (list) list.push(entry); else groups.set(group, [entry])\n }\n for (const [group, entries] of groups) {\n const groupItem = element('li', 'dsh-mobile-control__ws-paths-group')\n const groupHead = element('div', 'dsh-mobile-control__ws-paths-group-head')\n const groupLabel = element('code'); groupLabel.textContent = `${group}/*`\n const groupCount = element('span', 'dsh-mobile-control__ws-count')\n groupCount.textContent = t('wsPathsGroupMeta', { n: entries.length, m: entries.reduce((sum, entry) => sum + entry.attempts, 0) })\n groupHead.append(groupLabel, groupCount)\n if (entries.length > 1) {\n const allowAll = element('button', 'dsh-mobile-control__primary'); allowAll.type = 'button'; allowAll.textContent = t('wsPathsAllowAll')\n allowAll.addEventListener('click', () => { saveWsPaths([...wsPathsCurrent, ...entries.map(entry => entry.path)]) })\n groupHead.append(allowAll)\n }\n groupItem.append(groupHead)\n for (const entry of entries) {\n const item = element('div', 'dsh-mobile-control__ws-paths-item is-child')\n const label = element('code'); label.textContent = `${entry.path} ×${String(entry.attempts)}`\n const allow = element('button', 'dsh-mobile-control__primary'); allow.type = 'button'; allow.textContent = t('wsPathsAllow'); allow.setAttribute('aria-label', `${t('wsPathsAllow')}: ${entry.path}`)\n allow.addEventListener('click', () => { saveWsPaths([...wsPathsCurrent, entry.path]) })\n item.append(label, allow)\n groupItem.append(item)\n }\n wsPathsDetectedList.append(groupItem)\n }\n renderWsDot()\n }\n const loadWsPaths = (): void => {\n void controlRequestJson('/api/mobile-access/remote/websocket-paths').then(data => {\n wsPathsLoaded = true\n wsPathsStatus.hidden = true\n renderWsPaths(Array.isArray(data.paths) ? data.paths.filter((entry): entry is string => typeof entry === 'string') : [])\n void controlRequestJson('/api/mobile-access/remote/websocket-paths/blocked').then(blocked => {\n const entries = Array.isArray(blocked.blocked) ? blocked.blocked : []\n wsPathsBlocked = entries.filter((entry): entry is { path: string; attempts: number } =>\n typeof entry === 'object' && entry !== null\n && typeof (entry as { path?: unknown }).path === 'string'\n && typeof (entry as { attempts?: unknown }).attempts === 'number')\n renderWsBlocked(wsPathsBlocked)\n }, () => { /* approved list already rendered; detected list stays hidden */ })\n }, error => {\n wsPathsStatus.hidden = false\n wsPathsStatus.textContent = t('requestFailed', { error: String(error) })\n })\n }\n const saveWsPaths = (paths: readonly string[]): void => {\n wsPathsStatus.hidden = true\n void controlRequestJson('/api/mobile-access/remote/websocket-paths', { method: 'POST', body: JSON.stringify({ paths }) }).then(data => {\n wsPathsLoaded = true\n renderWsPaths(Array.isArray(data.paths) ? data.paths.filter((entry): entry is string => typeof entry === 'string') : [])\n renderWsBlocked(wsPathsBlocked)\n }, error => {\n wsPathsStatus.hidden = false\n wsPathsStatus.textContent = t('requestFailed', { error: String(error) })\n })\n }\n wsPathsAdd.addEventListener('click', () => {\n const value = wsPathsInput.value.trim()\n if (value === '') {\n wsPathsStatus.hidden = false\n wsPathsStatus.textContent = t('wsPathsInvalid')\n return\n }\n wsPathsInput.value = ''\n saveWsPaths([...wsPathsCurrent, value])\n })\n const remoteWorkspace = element('section', 'dsh-mobile-control__remote-workspace')\n remoteWorkspace.append(providerSetupHeader, remoteStatus, remoteAccess, remoteGuide, providerSetupBody, remoteActions, remoteQr, remotePairLink, remoteManageRow, remoteDevicePanel)\n const diagnosticsView = element('div', 'dsh-mobile-control__view is-diagnostics'); diagnosticsView.hidden = true\n const diagnosticsIntro = element('p', 'dsh-mobile-control__intro'); diagnosticsIntro.textContent = t('diagnosticsIntro')\n const diagnosticsSummary = element('section', 'dsh-mobile-control__diagnostic-summary is-idle'); diagnosticsSummary.setAttribute('aria-live', 'polite')\n const diagnosticsSummaryMain = element('div', 'dsh-mobile-control__diagnostic-summary-main')\n const diagnosticsSummaryIcon = element('span', 'dsh-mobile-control__diagnostic-summary-icon'); diagnosticsSummaryIcon.setAttribute('aria-hidden', 'true')\n const diagnosticsSummaryBody = element('div', 'dsh-mobile-control__diagnostic-summary-body')\n const diagnosticsSummaryTitle = element('strong'); diagnosticsSummaryTitle.textContent = t('diagnosticsNotRun')\n const diagnosticsSummaryText = element('span'); diagnosticsSummaryText.textContent = t('diagnosticsStartHint')\n const diagnosticsSummaryMeta = element('span', 'dsh-mobile-control__diagnostic-summary-meta'); diagnosticsSummaryMeta.textContent = t('diagnosticsIdleMeta')\n diagnosticsSummaryBody.append(diagnosticsSummaryTitle, diagnosticsSummaryText)\n diagnosticsSummaryMain.append(diagnosticsSummaryIcon, diagnosticsSummaryBody)\n diagnosticsSummary.append(diagnosticsSummaryMain, diagnosticsSummaryMeta)\n const diagnosticsToolbar = element('div', 'dsh-mobile-control__diagnostic-toolbar')\n const diagnosticsRun = element('button', 'dsh-mobile-control__primary dsh-mobile-control__diagnostic-run'); diagnosticsRun.type = 'button'; diagnosticsRun.textContent = t('diagnosticsStart')\n const diagnosticsCopy = element('button', 'dsh-mobile-control__secondary dsh-mobile-control__diagnostic-copy'); diagnosticsCopy.type = 'button'; diagnosticsCopy.textContent = t('diagnosticsCopy'); diagnosticsCopy.disabled = true; diagnosticsCopy.hidden = true\n diagnosticsToolbar.append(diagnosticsRun, diagnosticsCopy)\n const diagnosticsFeedback = element('p', 'dsh-mobile-control__diagnostic-feedback'); diagnosticsFeedback.hidden = true; diagnosticsFeedback.setAttribute('role', 'status'); diagnosticsFeedback.setAttribute('aria-live', 'polite')\n const diagnosticsChecks = element('div', 'dsh-mobile-control__diagnostic-checks'); diagnosticsChecks.hidden = true\n const diagnosticsDetails = element('details', 'dsh-mobile-control__details dsh-mobile-control__diagnostic-details'); diagnosticsDetails.hidden = true\n const diagnosticsDetailsSummary = element('summary'); diagnosticsDetailsSummary.textContent = t('diagnosticsAdvanced')\n const diagnosticsReport = element('pre', 'dsh-mobile-control__diagnostic-report')\n diagnosticsDetails.append(diagnosticsDetailsSummary, diagnosticsReport)\n header.append(title, headerActions); actions.append(toggle, pair, linkPair)\n lanView.append(lanSetup, access, qrBox, status, extensionStatus, actions, manageRow, devicePanel)\n remoteView.append(remoteIntro, httpFrameWarning, providerSection, remoteWorkspace)\n diagnosticsView.append(diagnosticsIntro, diagnosticsSummary, diagnosticsToolbar, diagnosticsFeedback, diagnosticsChecks, wsPathsSection, diagnosticsDetails)\n panel.append(header, releaseNotice, updateCard, appDownload, switcher, lanView, remoteView, diagnosticsView); root.append(panel); document.body.append(root)\n let running = false\n let origin = ''\n let lanConfigured = true\n let lanRestartRequired = false\n let lanSetupLoaded = false\n let remoteRunning = false\n let remoteReady = false\n let remoteProvider: MobileRemoteProvider = 'tailscale'\n let remoteLoginUrl = ''\n let remoteSetupUrl = ''\n let remoteSetupPending = false\n let remoteSetupOpenedAt = 0\n let remoteReconnectBusy = false\n let remoteProviderBusy = false\n // A failed control action stores its message here so the repaint that loadRemote() runs in the\n // action's finally cannot replace it before the user reads it. The repaint that would have\n // erased it consumes the value instead, so it never lingers over a later state.\n let remoteFailureText: string | undefined\n let cpolarInstalled = false\n let cpolarConfigured = false\n let cloudflaredInstalled = false\n let cloudflaredDownloadSize = ''\n let cloudflaredTunnelMode: 'quick' | 'named' = 'quick'\n let cloudflaredModeDraft: 'quick' | 'named' | null = null\n let cloudflaredTunnelConfigured = false\n let configuredCloudflaredHostname = ''\n let configuredCloudflaredPort = 3444\n // Once the user types in a field, polls must stop writing to it, or a stale\n // value the user is mid-edit would be silently replaced by the saved one.\n let cloudflaredHostnameDirty = false\n let cloudflaredPortDirty = false\n let originConfigured = false\n let originFormDirty = false\n let originFormBusy = false\n let remoteSnapshotEpoch = 0\n let latestRemoteState: Record<string, unknown> = {}\n let frpInstalled = false\n let frpConfigured = false\n let frpLayoutInitialized = false\n let frpDownloadSize = '14.0'\n let configuredFrpServer = ''\n let configuredFrpPort = 7000\n let configuredFrpOrigin = ''\n let providerInfoPinned = false\n let providerInfoHovered = false\n let previousAccessView: 'lan' | 'remote' = 'lan'\n let diagnosticsBusy = false\n let copiedDiagnosticReport = ''\n let pluginUpdateAvailable = false\n let pluginLatestVersion = ''\n let pluginReleaseNotes = ''\n let updateInFlight = false\n const renderRelease = (data: Record<string, unknown>): void => {\n const release = clientReleaseInfo(data)\n pluginUpdateAvailable = release.updateAvailable\n pluginLatestVersion = release.latestVersion ?? ''\n pluginReleaseNotes = release.releaseNotes ?? ''\n updatePlugin.hidden = !pluginUpdateAvailable || !diagnosticsView.hidden || !updateCard.hidden\n updatePlugin.textContent = t('updatePlugin')\n if (pluginLatestVersion !== '') updatePlugin.setAttribute('aria-label', t('updatePluginAria', { version: pluginLatestVersion }))\n if (release.androidVersion !== undefined) {\n appDownload.textContent = t('downloadAndroidVersion', { version: release.androidVersion })\n appDownload.setAttribute('aria-label', t('downloadAndroidVersionAria', { version: release.androidVersion }))\n }\n appDownload.href = release.androidDownloadUrl\n }\n const syncProviderInfo = (): void => {\n const open = providerInfoPinned || providerInfoHovered || providerInfo.contains(document.activeElement)\n providerInfoPopover.hidden = !open\n providerInfoButton.setAttribute('aria-expanded', String(open))\n }\n providerInfo.addEventListener('pointerenter', () => { providerInfoHovered = true; syncProviderInfo() })\n providerInfo.addEventListener('pointerleave', () => { providerInfoHovered = false; syncProviderInfo() })\n providerInfo.addEventListener('focusin', syncProviderInfo)\n providerInfo.addEventListener('focusout', () => { window.setTimeout(syncProviderInfo, 0) })\n providerInfoButton.addEventListener('click', () => { providerInfoPinned = !providerInfoPinned; syncProviderInfo() })\n providerInfoButton.addEventListener('keydown', event => {\n if (event.key !== 'Escape') return\n providerInfoPinned = false\n providerInfoHovered = false\n providerInfoPopover.hidden = true\n providerInfoButton.setAttribute('aria-expanded', 'false')\n })\n const selectView = (view: 'lan' | 'remote' | 'diagnostics'): void => {\n if (view !== 'diagnostics') previousAccessView = view\n lanView.hidden = view !== 'lan'\n remoteView.hidden = view !== 'remote'\n diagnosticsView.hidden = view !== 'diagnostics'\n lanTab.classList.toggle('is-active', view === 'lan')\n remoteTab.classList.toggle('is-active', view === 'remote')\n lanTab.setAttribute('aria-pressed', String(view === 'lan'))\n remoteTab.setAttribute('aria-pressed', String(view === 'remote'))\n diagnosticsEntry.setAttribute('aria-pressed', String(view === 'diagnostics'))\n diagnosticsEntry.textContent = view === 'diagnostics' ? t('back') : t('diagnostics')\n diagnosticsEntry.setAttribute('aria-label', view === 'diagnostics' ? t('backToMobile') : t('openDiagnostics'))\n if (view === 'diagnostics') {\n wsPathsSeenAttempts = wsBlockedTotal(wsPathsBlocked)\n renderWsDot()\n if (!wsPathsLoaded) loadWsPaths()\n }\n updatePlugin.hidden = view === 'diagnostics' || !pluginUpdateAvailable\n appDownload.hidden = view === 'diagnostics'\n switcher.hidden = view === 'diagnostics'\n title.textContent = view === 'lan' ? t('lanAccess') : view === 'remote' ? t('remoteAccess') : t('connectionDiagnostics')\n }\n lanTab.addEventListener('click', () => { selectView('lan') })\n remoteTab.addEventListener('click', () => { selectView('remote'); loadRemote() })\n const setOpen = (open: boolean): void => {\n panel.hidden = !open\n for (const trigger of document.querySelectorAll('.dsh-mobile-control__trigger')) trigger.setAttribute('aria-expanded', String(open))\n }\n const render = (data: Record<string, unknown>): void => {\n lanConfigured = data.configured !== false\n lanRestartRequired = data.restartRequired === true\n running = data.running === true\n origin = running && typeof data.origin === 'string' ? data.origin : ''\n lanSetup.hidden = lanConfigured && !lanRestartRequired\n lanSetupForm.hidden = lanRestartRequired\n lanSetupIntro.hidden = lanRestartRequired\n status.hidden = !lanConfigured || lanRestartRequired\n if (!lanConfigured && !lanSetupLoaded) loadLanSetup()\n if (lanRestartRequired) {\n const pendingOrigin = typeof data.pendingOrigin === 'string' ? data.pendingOrigin : ''\n lanSetupStatus.textContent = t('lanSetupRestart', { origin: pendingOrigin })\n } else if (!lanConfigured && lanSetupStatus.textContent === '') {\n lanSetupStatus.textContent = t('lanSetupRequired')\n }\n access.hidden = origin === ''\n accessLink.href = origin\n accessLink.textContent = origin\n accessLink.title = origin\n status.classList.toggle('is-running', running)\n status.textContent = !lanConfigured ? t('lanSetupRequired') : lanRestartRequired ? t('lanSetupRestart', { origin: typeof data.pendingOrigin === 'string' ? data.pendingOrigin : '' }) : running ? t('lanOn') : t('lanOff')\n const extensionData = data.extensions\n if (extensionData !== null && typeof extensionData === 'object') {\n const loaded = typeof (extensionData as { loaded?: unknown }).loaded === 'number' ? (extensionData as { loaded: number }).loaded : 0\n const failed = typeof (extensionData as { failed?: unknown }).failed === 'number' ? (extensionData as { failed: number }).failed : 0\n extensionStatus.hidden = false\n extensionStatus.textContent = failed === 0 ? t('extensionsLoaded', { loaded }) : t('extensionsFailed', { loaded, failed })\n } else extensionStatus.hidden = true\n if (!running) qrBox.hidden = true\n toggle.textContent = running ? t('disableLan') : t('enableLan')\n actions.hidden = !lanConfigured || lanRestartRequired\n manageRow.hidden = !lanConfigured || lanRestartRequired\n pair.disabled = !running\n linkPair.disabled = !running\n manageDevices.disabled = !running\n resetAll.disabled = !running\n }\n const renderLanSetup = (data: Record<string, unknown>): void => {\n if (data.restartRequired === true || data.configured === true) {\n render(data)\n return\n }\n const networks = Array.isArray(data.networks) ? data.networks.filter((entry): entry is Record<string, unknown> => typeof entry === 'object' && entry !== null) : []\n lanSetupSelect.replaceChildren()\n const hasRecommended = networks.some(network => network.recommended === true)\n if (!hasRecommended && networks.length > 1) {\n const placeholder = element('option'); placeholder.value = ''; placeholder.textContent = t('lanSetupChooseNetwork'); placeholder.disabled = true; placeholder.selected = true\n lanSetupSelect.append(placeholder)\n }\n for (const network of networks) {\n if (typeof network.address !== 'string' || typeof network.name !== 'string') continue\n const option = element('option'); option.value = network.address\n option.textContent = `${network.name} · ${network.address}${network.recommended === true ? ` · ${t('lanSetupRecommended')}` : ''}`\n option.selected = network.recommended === true || (!hasRecommended && networks.length === 1)\n lanSetupSelect.append(option)\n }\n const available = networks.some(network => typeof network.address === 'string' && typeof network.name === 'string')\n lanSetupConfigure.disabled = lanSetupSelect.value === ''\n lanSetupStatus.textContent = available ? t('lanSetupRequired') : t('lanSetupNoNetworks')\n lanSetupNote.hidden = data.windowsFirewall !== true\n }\n lanSetupSelect.addEventListener('change', () => { lanSetupConfigure.disabled = lanSetupSelect.value === '' })\n const loadLanSetup = (): void => {\n lanSetupLoaded = true\n lanSetupRefresh.disabled = true\n void controlRequestJson('/api/mobile-access/lan/setup').then(renderLanSetup, () => {\n lanSetupStatus.textContent = t('lanSetupFailed')\n }).finally(() => { lanSetupRefresh.disabled = false })\n }\n lanSetupRefresh.addEventListener('click', () => { loadLanSetup() })\n lanSetupConfigure.addEventListener('click', () => {\n if (lanSetupSelect.value === '') return\n lanSetupConfigure.disabled = true\n lanSetupRefresh.disabled = true\n lanSetupConfigure.textContent = t('lanSetupConfiguring')\n lanSetupStatus.textContent = t('lanSetupConfiguring')\n void controlRequestJson('/api/mobile-access/lan/setup', {\n method: 'POST',\n body: JSON.stringify({ confirm: true, address: lanSetupSelect.value, configureFirewall: true }),\n }, LONG_CONTROL_REQUEST_TIMEOUT_MS).then(renderLanSetup, () => {\n lanSetupStatus.textContent = t('lanSetupFailed')\n }).finally(() => {\n lanSetupConfigure.textContent = t('lanSetupConfigure')\n lanSetupRefresh.disabled = false\n lanSetupConfigure.disabled = lanRestartRequired || lanSetupSelect.options.length === 0\n })\n })\n const showQr = (svg: string, target: HTMLDivElement = qrBox): void => {\n target.replaceChildren()\n if (svg === '') { target.hidden = true; return }\n const image = element('img')\n image.alt = t('pairingQr')\n image.width = 176\n image.height = 176\n image.src = `data:image/svg+xml;base64,${btoa(svg)}`\n target.hidden = false\n target.append(image)\n }\n const openPairing = (target: 'key' | 'link'): void => {\n void controlRequestJson('/api/mobile-access/lan/pairing/open', { method: 'POST', body: '{}' }).then(async data => {\n const value = target === 'key'\n ? (typeof data.appKey === 'string' ? data.appKey : '')\n : (typeof data.pairUrl === 'string' ? data.pairUrl : '')\n showQr(typeof data.qrSvg === 'string' ? data.qrSvg : '')\n if (value === '') { status.textContent = t('keyGenerationFailed'); return }\n try {\n await navigator.clipboard.writeText(value)\n status.textContent = target === 'key'\n ? t('keyCopied')\n : t('linkCopied')\n } catch {\n status.textContent = t('copySecret', { kind: target === 'key' ? t('pairingKey') : t('pairingLink'), value })\n status.classList.add('is-key')\n }\n }, error => { status.textContent = t('requestFailed', { error: String(error) }) }).finally(() => {\n pair.disabled = !running\n linkPair.disabled = !running\n })\n }\n toggle.addEventListener('click', () => { toggle.disabled = true; void controlRequestJson('/api/mobile-access/lan/control', { method: 'POST', body: JSON.stringify({ running: !running }) }).then(render, error => { status.textContent = t('requestFailed', { error: String(error) }) }).finally(() => { toggle.disabled = false }) })\n const formatTime = (ms: unknown): string => typeof ms === 'number' ? new Date(ms).toLocaleString(localeTag) : ''\n const formatMegabytes = (bytes: number): string => new Intl.NumberFormat(localeTag, { minimumFractionDigits: 1, maximumFractionDigits: 1 }).format(bytes / 1024 / 1024)\n const renderDevices = (data: Record<string, unknown>): void => {\n const devices = Array.isArray(data.devices) ? data.devices as Record<string, unknown>[] : []\n devicePanel.replaceChildren()\n if (devices.length === 0) {\n const empty = element('p', 'dsh-mobile-control__device-empty'); empty.textContent = t('noDevices')\n devicePanel.append(empty)\n return\n }\n for (const device of devices) {\n const row = element('div', 'dsh-mobile-control__device')\n const label = element('span', 'dsh-mobile-control__device-label')\n label.textContent = typeof device.label === 'string' ? device.label : t('device')\n const meta = element('span', 'dsh-mobile-control__device-meta'); meta.textContent = t('expires', { time: formatTime(device.expiresAt) })\n const revoke = element('button', 'dsh-mobile-control__device-revoke'); revoke.type = 'button'; revoke.textContent = t('revoke')\n const id = typeof device.id === 'string' ? device.id : ''\n revoke.addEventListener('click', () => {\n void controlRequestJson('/api/mobile-access/lan/devices/revoke', { method: 'POST', body: JSON.stringify({ deviceId: id }) })\n .then(loadDevices, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n })\n row.append(label, meta, revoke)\n devicePanel.append(row)\n }\n }\n const loadDevices = (): void => {\n void controlRequestJson('/api/mobile-access/lan/devices').then(renderDevices, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n }\n manageDevices.addEventListener('click', () => {\n const show = devicePanel.hidden\n devicePanel.hidden = !show\n if (show) loadDevices()\n })\n resetAll.addEventListener('click', () => {\n if (!window.confirm(t('confirmResetDevices'))) return\n void controlRequestJson('/api/mobile-access/lan/devices/reset', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(loadDevices, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n })\n const renderRemote = (data: Record<string, unknown>): void => {\n latestRemoteState = data\n remoteRunning = data.running === true\n remoteProvider = parseMobileRemoteProvider(data.provider)\n const cpolar = remoteProvider === 'cpolar'\n const cloudflared = remoteProvider === 'cloudflared'\n const frp = remoteProvider === 'frp'\n const origin = remoteProvider === 'origin'\n const tailscale = remoteProvider === 'tailscale'\n tailscaleChoice.classList.toggle('is-selected', tailscale)\n cpolarChoice.classList.toggle('is-selected', cpolar)\n cloudflaredChoice.classList.toggle('is-selected', cloudflared)\n frpChoice.classList.toggle('is-selected', frp)\n originChoice.classList.toggle('is-selected', origin)\n tailscaleChoice.setAttribute('aria-checked', String(tailscale))\n cpolarChoice.setAttribute('aria-checked', String(cpolar))\n cloudflaredChoice.setAttribute('aria-checked', String(cloudflared))\n // One tab stop for the group: only the checked card is reachable with Tab.\n tailscaleChoice.tabIndex = tailscale ? 0 : -1\n cpolarChoice.tabIndex = cpolar ? 0 : -1\n cloudflaredChoice.tabIndex = cloudflared ? 0 : -1\n frpChoice.setAttribute('aria-pressed', String(frp))\n originChoice.setAttribute('aria-pressed', String(origin))\n providerSetupName.textContent = cpolar ? 'cpolar' : cloudflared ? 'cloudflared' : frp ? t('frpName') : origin ? t('originName') : 'Tailscale Funnel'\n tailscaleChoice.disabled = remoteProviderBusy\n cpolarChoice.disabled = remoteProviderBusy\n cloudflaredChoice.disabled = remoteProviderBusy\n frpChoice.disabled = remoteProviderBusy\n originChoice.disabled = remoteProviderBusy\n cpolarSetup.hidden = !cpolar\n cloudflaredSetup.hidden = !cloudflared\n frpSetup.hidden = !frp\n originSetup.hidden = !origin\n if (frp || origin) selfHosted.open = true\n tailscaleInfo.hidden = !tailscale\n remoteReset.textContent = tailscale ? t('resetRemoteLogin') : t('resetRemoteDevices')\n const providers = data.providers !== null && typeof data.providers === 'object' ? data.providers as Record<string, unknown> : {}\n const cpolarProvider = providers.cpolar !== null && typeof providers.cpolar === 'object' ? providers.cpolar as Record<string, unknown> : {}\n const component = cpolarProvider.component !== null && typeof cpolarProvider.component === 'object'\n ? cpolarProvider.component as Record<string, unknown>\n : {}\n cpolarInstalled = component.installed === true\n cpolarConfigured = component.configured === true\n cpolarChoiceBadge.textContent = cpolarConfigured ? t('ready') : cpolarInstalled ? t('installed') : t('mainlandPreferred')\n const cpolarSupported = component.supported !== false\n const componentVersion = typeof component.version === 'string' ? component.version : ''\n const componentDownloadBytes = typeof component.downloadBytes === 'number' ? component.downloadBytes : 0\n const componentStorage = typeof component.storagePath === 'string' ? component.storagePath : `DSH Mobile ${t('pluginPrivateDirectory')}`\n cpolarStorage.textContent = componentStorage\n cpolarStorage.title = componentStorage\n cpolarInstall.hidden = cpolarInstalled || !cpolarSupported\n cpolarInstall.textContent = componentDownloadBytes > 0\n ? t('installWithSize', { size: formatMegabytes(componentDownloadBytes) })\n : t('installOfficial')\n cpolarInstall.disabled = remoteProviderBusy\n cpolarAccount.hidden = !cpolarInstalled || cpolarConfigured\n cpolarConfigure.disabled = remoteProviderBusy\n cpolarPurge.hidden = !cpolarInstalled && !cpolarConfigured\n cpolarComponentStatus.textContent = !cpolarSupported\n ? t('cpolarUnsupported')\n : !cpolarInstalled\n ? t('cpolarNotInstalled')\n : !cpolarConfigured\n ? t('cpolarNeedsToken', { version: componentVersion })\n : t('cpolarReady', { version: componentVersion })\n const cloudflaredProvider = providers.cloudflared !== null && typeof providers.cloudflared === 'object' ? providers.cloudflared as Record<string, unknown> : {}\n const cloudflaredComponent = cloudflaredProvider.component !== null && typeof cloudflaredProvider.component === 'object'\n ? cloudflaredProvider.component as Record<string, unknown>\n : {}\n cloudflaredInstalled = cloudflaredComponent.installed === true\n const cloudflaredSupported = cloudflaredComponent.supported !== false\n const cloudflaredComponentError = typeof cloudflaredComponent.errorCode === 'string' ? cloudflaredComponent.errorCode : ''\n const cloudflaredVersion = typeof cloudflaredComponent.version === 'string' ? cloudflaredComponent.version : ''\n const cloudflaredDownloadBytes = typeof cloudflaredComponent.downloadBytes === 'number' ? cloudflaredComponent.downloadBytes : 0\n if (cloudflaredDownloadBytes > 0) cloudflaredDownloadSize = formatMegabytes(cloudflaredDownloadBytes)\n const cloudflaredStoragePath = typeof cloudflaredComponent.storagePath === 'string'\n ? cloudflaredComponent.storagePath\n : `DSH Mobile ${t('pluginPrivateDirectory')}`\n cloudflaredStorage.textContent = cloudflaredStoragePath\n cloudflaredStorage.title = cloudflaredStoragePath\n cloudflaredChoiceBadge.textContent = cloudflaredInstalled ? t('ready') : t('cloudflaredBadge')\n // A quick tunnel needs no account, so installation is the only precondition.\n cloudflaredInstall.hidden = cloudflaredInstalled || !cloudflaredSupported\n cloudflaredInstall.textContent = cloudflaredDownloadBytes > 0\n ? t('installWithSize', { size: formatMegabytes(cloudflaredDownloadBytes) })\n : t('installOfficial')\n cloudflaredInstall.disabled = remoteProviderBusy\n cloudflaredPurge.hidden = !cloudflaredInstalled\n cloudflaredComponentStatus.textContent = !cloudflaredSupported\n ? t('cloudflaredUnsupported')\n : !cloudflaredInstalled\n // A component that exists but failed verification must not be reported as\n // absent: that sends the user to reinstall something already installed.\n ? (cloudflaredComponentError === 'cloudflared_component_invalid' ? t('cloudflaredInvalid') : t('cloudflaredNotInstalled'))\n : t('cloudflaredReady', { version: cloudflaredVersion })\n const cloudflaredTunnelConfiguration = cloudflaredProvider.configuration !== null\n && typeof cloudflaredProvider.configuration === 'object'\n ? cloudflaredProvider.configuration as Record<string, unknown>\n : {}\n cloudflaredTunnelMode = cloudflaredTunnelConfiguration.mode === 'named' ? 'named' : 'quick'\n cloudflaredTunnelConfigured = cloudflaredTunnelConfiguration.configured === true\n configuredCloudflaredHostname = typeof cloudflaredTunnelConfiguration.hostname === 'string' ? cloudflaredTunnelConfiguration.hostname : ''\n configuredCloudflaredPort = typeof cloudflaredTunnelConfiguration.port === 'number' ? cloudflaredTunnelConfiguration.port : 3444\n const cloudflaredTunnelError = typeof cloudflaredTunnelConfiguration.errorCode === 'string' ? cloudflaredTunnelConfiguration.errorCode : ''\n // A staged choice survives polls until the saved configuration agrees with it.\n if (cloudflaredModeDraft !== null && cloudflaredModeDraft === cloudflaredTunnelMode) cloudflaredModeDraft = null\n const cloudflaredShownMode = cloudflaredModeDraft ?? cloudflaredTunnelMode\n cloudflaredModeQuick.classList.toggle('is-active', cloudflaredShownMode === 'quick')\n cloudflaredModeNamed.classList.toggle('is-active', cloudflaredShownMode === 'named')\n cloudflaredModeQuick.setAttribute('aria-pressed', String(cloudflaredShownMode === 'quick'))\n cloudflaredModeNamed.setAttribute('aria-pressed', String(cloudflaredShownMode === 'named'))\n cloudflaredModeQuick.disabled = remoteProviderBusy\n cloudflaredModeNamed.disabled = remoteProviderBusy\n cloudflaredModeHint.textContent = cloudflaredShownMode === 'named' ? t('cloudflaredTunnelNamedHint') : t('cloudflaredTunnelQuickHint')\n // The component note describes whichever tunnel is about to run, so a\n // quick-tunnel warning never sits next to named-tunnel settings.\n cloudflaredNote.textContent = cloudflaredShownMode === 'named' ? t('cloudflaredNamedNote') : t('cloudflaredQuickNote')\n cloudflaredTunnel.hidden = cloudflaredShownMode !== 'named'\n cloudflaredTunnelSave.textContent = cloudflaredSaveLabel()\n // Untouched fields always mirror the saved configuration, so a field can never\n // keep showing a value that is no longer in effect.\n if (!cloudflaredHostnameDirty) cloudflaredHostname.value = configuredCloudflaredHostname\n if (!cloudflaredPortDirty) cloudflaredPort.value = String(configuredCloudflaredPort)\n cloudflaredToken.placeholder = cloudflaredTunnelConfigured ? t('cloudflaredTunnelTokenSaved') : t('cloudflaredTunnelTokenPlaceholder')\n // The hint must describe the port Cloudflare will actually be pointed at, which\n // is the one in the field, not the last saved value.\n const cloudflaredFieldPort = String(cloudflaredPort.value ?? '').trim()\n cloudflaredTunnelHint.textContent = t('cloudflaredTunnelHint', {\n port: cloudflaredFieldPort === '' ? String(configuredCloudflaredPort) : cloudflaredFieldPort,\n })\n cloudflaredTunnelStatus.textContent = cloudflaredTunnelError !== ''\n ? t('cloudflaredTunnelInvalid')\n : cloudflaredTunnelConfigured\n ? t('cloudflaredTunnelConfigured', { hostname: configuredCloudflaredHostname, port: String(configuredCloudflaredPort) })\n : t('cloudflaredTunnelMissing')\n cloudflaredTunnelSave.disabled = remoteProviderBusy || !cloudflaredInstalled\n cloudflaredTunnelForget.hidden = !cloudflaredTunnelConfigured\n const frpProvider = providers.frp !== null && typeof providers.frp === 'object' ? providers.frp as Record<string, unknown> : {}\n const frpComponent = frpProvider.component !== null && typeof frpProvider.component === 'object'\n ? frpProvider.component as Record<string, unknown>\n : {}\n const frpConfiguration = frpProvider.configuration !== null && typeof frpProvider.configuration === 'object'\n ? frpProvider.configuration as Record<string, unknown>\n : {}\n frpInstalled = frpComponent.installed === true\n frpConfigured = frpConfiguration.configured === true\n const frpSupported = frpComponent.supported !== false\n const frpVersion = typeof frpComponent.version === 'string' ? frpComponent.version : ''\n const frpDownloadBytes = typeof frpComponent.downloadBytes === 'number' ? frpComponent.downloadBytes : 0\n if (frpDownloadBytes > 0) frpDownloadSize = formatMegabytes(frpDownloadBytes)\n const frpStoragePath = typeof frpComponent.storagePath === 'string' ? frpComponent.storagePath : `DSH Mobile ${t('pluginPrivateDirectory')}`\n configuredFrpServer = typeof frpConfiguration.serverAddress === 'string' ? frpConfiguration.serverAddress : ''\n configuredFrpPort = typeof frpConfiguration.serverPort === 'number' ? frpConfiguration.serverPort : 7000\n configuredFrpOrigin = typeof frpConfiguration.publicOrigin === 'string' ? frpConfiguration.publicOrigin : ''\n if (frpServer.value === '' && configuredFrpServer !== '') frpServer.value = configuredFrpServer\n if ((frpPort.value === '' || frpPort.value === '7000') && configuredFrpPort !== 7000) frpPort.value = String(configuredFrpPort)\n if (frpOrigin.value === '' && configuredFrpOrigin !== '') frpOrigin.value = configuredFrpOrigin\n frpStorage.textContent = frpStoragePath\n frpStorage.title = frpStoragePath\n frpInstall.hidden = frpInstalled || !frpSupported\n frpInstall.textContent = frpDownloadBytes > 0\n ? t('installWithSize', { size: formatMegabytes(frpDownloadBytes) })\n : t('installFrpc')\n frpInstall.disabled = remoteProviderBusy\n frpConfigure.disabled = remoteProviderBusy || !frpInstalled\n vpsDeploy.disabled = remoteProviderBusy || !validVpsDeploymentForm()\n vpsCopyUninstall.disabled = vpsDeploy.disabled\n vpsUninstall.disabled = vpsDeploy.disabled\n frpPurge.hidden = !frpInstalled && !frpConfigured\n frpComponentStatus.textContent = !frpSupported\n ? t('frpUnsupported')\n : frpInstalled ? t('frpComponentReady', { version: frpVersion }) : t('frpNotInstalled')\n frpConfigurationStatus.textContent = frpConfigured ? t('frpConfigurationReady') : t('frpConfigurationMissing')\n frpOverview.hidden = !frpConfigured\n frpOverviewEndpoint.textContent = configuredFrpOrigin === ''\n ? configuredFrpServer\n : `${configuredFrpOrigin} · ${configuredFrpServer}:${String(configuredFrpPort)}`\n frpToken.placeholder = frpConfigured\n ? (locale === 'zh' ? '已安全保存;留空保持不变' : locale === 'it' ? 'Salvato; lascia vuoto per mantenerlo' : 'Saved securely; leave blank to keep it')\n : t('frpTokenPlaceholder')\n vpsDeploy.textContent = frpConfigured\n ? (locale === 'zh' ? '修复或重新部署 VPS' : locale === 'it' ? 'Ripara o ridistribuisci VPS' : 'Repair or redeploy VPS')\n : t('vpsDeploy')\n frpConnectionSummary.textContent = `${frpConfigured ? '✓ ' : ''}${t('frpStep1Title')}`\n frpComponentSummary.textContent = `${frpInstalled ? '✓ ' : ''}${t('frpStep3Title')}`\n if (!frpLayoutInitialized) {\n frpConnectionGroup.open = !frpConfigured\n frpComponentGroup.open = !frpInstalled\n frpVpsGroup.open = !frpConfigured\n frpLayoutInitialized = true\n }\n const originProvider = providers.origin !== null && typeof providers.origin === 'object' ? providers.origin as Record<string, unknown> : {}\n const originConfiguration = originProvider.configuration !== null && typeof originProvider.configuration === 'object'\n ? originProvider.configuration as Record<string, unknown> : {}\n originConfigured = originConfiguration.configured === true\n if (!originFormDirty && !originFormBusy) {\n originPublic.value = typeof originConfiguration.publicOrigin === 'string' ? originConfiguration.publicOrigin : ''\n originHost.value = typeof originConfiguration.listenHost === 'string' ? originConfiguration.listenHost : '127.0.0.1'\n originPort.value = typeof originConfiguration.listenPort === 'number' ? String(originConfiguration.listenPort) : '3444'\n originCidrs.value = Array.isArray(originConfiguration.allowedCidrs) ? originConfiguration.allowedCidrs.filter(value => typeof value === 'string').join(', ') : '127.0.0.0/8'\n }\n originSetup.setAttribute('aria-busy', String(originFormBusy))\n originConfigure.setAttribute('aria-busy', String(originFormBusy))\n originConfigure.textContent = originFormBusy ? t('saving') : t('originSaveStart')\n for (const input of [originPublic, originHost, originPort, originCidrs]) input.disabled = remoteProviderBusy\n originConfigure.disabled = remoteProviderBusy\n originPurge.disabled = remoteProviderBusy\n originPurge.hidden = !originConfigured && originConfiguration.errorCode !== 'origin_config_invalid' && originProvider.running !== true\n const originListening = origin && originProvider.state === 'ready' && originProvider.running === true\n const backendOrigin = originListening && typeof data.backendOrigin === 'string' ? data.backendOrigin\n : typeof originConfiguration.backendOrigin === 'string' ? originConfiguration.backendOrigin : ''\n originBackend.hidden = backendOrigin === ''\n originBackendLabel.textContent = originListening ? t('originBackendListening') : t('originBackendSaved')\n originBackendAddress.textContent = backendOrigin\n originCopyBackend.disabled = remoteProviderBusy || backendOrigin === ''\n selfHostedBadge.textContent = origin\n ? originListening ? t('originBackendReady') : t('advanced')\n : frpConfigured && frpInstalled ? t('ready') : t('advanced')\n const state = typeof data.state === 'string' ? data.state : 'error'\n const errorCode = typeof data.errorCode === 'string' ? data.errorCode : ''\n const remoteOrigin = typeof data.origin === 'string' ? data.origin : ''\n remoteLoginUrl = typeof data.loginUrl === 'string' ? data.loginUrl : ''\n const candidateSetupUrl = tailscale ? officialFunnelSetupUrl(data.setupUrl) : ''\n const fallbackSetupUrls: Record<string, string> = {\n funnel_permission_required: 'https://tailscale.com/s/no-funnel',\n funnel_https_required: 'https://tailscale.com/s/https',\n funnel_start_failed: 'https://tailscale.com/s/no-funnel',\n }\n remoteSetupUrl = candidateSetupUrl !== '' ? candidateSetupUrl : (fallbackSetupUrls[errorCode] ?? '')\n const needsFunnelSetup = state === 'error' && remoteSetupUrl !== ''\n remoteReady = remoteRunning && state === 'ready' && remoteOrigin !== ''\n remoteStateBadge.classList.toggle('is-ready', remoteReady)\n remoteStateBadge.classList.toggle('is-busy', state === 'starting' || state === 'connecting' || state === 'needs-login')\n remoteStateBadge.classList.toggle('is-attention', state === 'error' || state === 'unavailable')\n remoteStateBadge.textContent = remoteReady\n ? origin ? t('originBackendReady') : t('ready')\n : state === 'starting' || state === 'connecting' || state === 'needs-login'\n ? t('remoteStateConnecting')\n : state === 'error' || state === 'unavailable'\n ? t('remoteStateAttention')\n : t('remoteStateOff')\n remoteAccess.hidden = !remoteReady\n remoteAccessLink.href = remoteOrigin\n remoteAccessLink.textContent = remoteOrigin\n remoteAccessLink.title = remoteOrigin\n remoteStatus.classList.toggle('is-running', remoteReady)\n const labels: Record<string, string> = {\n off: t('remoteOff'),\n unavailable: cpolar ? t('remoteUnavailableCpolar')\n : cloudflared ? t('remoteUnavailableCloudflared')\n : frp ? t('remoteUnavailableFrp') : origin ? t('originUnavailable') : t('remoteUnavailableTailscale'),\n starting: cpolar ? t('remoteStartingCpolar')\n : cloudflared ? t('remoteStartingCloudflared')\n : frp ? t('remoteStartingFrp') : origin ? t('originStarting') : t('remoteStartingTailscale'),\n 'needs-login': t('remoteNeedsLogin'),\n connecting: cpolar ? t('remoteConnectingCpolar')\n : cloudflared ? t('remoteConnectingCloudflared')\n : frp ? t('remoteConnectingFrp') : t('remoteConnectingTailscale'),\n ready: origin ? t('originReady') : t('remoteReady'),\n error: t('remoteError'),\n }\n const errorLabels: Record<string, string> = translatedRemoteErrors()\n remoteStatus.textContent = remoteSetupPending && needsFunnelSetup\n ? t('setupOpened')\n : (state === 'error' ? (errorLabels[errorCode] ?? labels.error!) : (labels[state] ?? labels.error!))\n // Keep a just-failed action's message for this one repaint, then release it.\n if (remoteFailureText !== undefined) {\n remoteStatus.textContent = remoteFailureText\n remoteFailureText = undefined\n }\n remoteGuide.hidden = !needsFunnelSetup\n remoteSetup.disabled = remoteSetupUrl === '' || remoteReconnectBusy\n remoteSetupRetry.disabled = remoteReconnectBusy\n remoteToggle.textContent = remoteRunning ? t('disableRemote') : t('enableRemote')\n const providerPrepared = cpolar ? cpolarInstalled && cpolarConfigured\n : cloudflared ? cloudflaredInstalled\n : frp ? frpInstalled && frpConfigured : origin ? originConfigured : true\n remoteToggle.disabled = remoteProviderBusy || (!providerPrepared && !(origin && remoteRunning))\n remoteLogin.hidden = !tailscale || state !== 'needs-login' || remoteLoginUrl === ''\n remoteReconnect.hidden = needsFunnelSetup || (state !== 'error' && state !== 'unavailable')\n || !providerPrepared\n remoteActions.hidden = !providerPrepared && !(origin && remoteRunning)\n remotePair.disabled = !remoteReady || originFormBusy\n remoteCopyLink.disabled = !remoteReady || originFormBusy\n remoteDevices.disabled = !remoteReady || originFormBusy\n if (origin) { remoteReconnect.disabled = remoteProviderBusy || remoteReconnectBusy; remoteReset.disabled = remoteProviderBusy }\n else remoteReset.disabled = false\n if (!remoteReady) {\n remoteQr.hidden = true\n remotePairLink.hidden = true\n activeRemotePairUrl = ''\n activeRemotePairExpiresAt = 0\n }\n if (!needsFunnelSetup) remoteSetupPending = false\n }\n let remoteLoadInFlight = false\n const loadRemote = (): void => {\n if (remoteLoadInFlight || originFormBusy) return\n const epoch = remoteSnapshotEpoch\n remoteLoadInFlight = true\n void controlRequestJson('/api/mobile-access/remote/control')\n .then(data => { if (epoch === remoteSnapshotEpoch) renderRemote(data) }, error => {\n if (epoch === remoteSnapshotEpoch) remoteStatus.textContent = t('requestFailed', { error: String(error) })\n })\n .finally(() => { remoteLoadInFlight = false })\n }\n const chooseRemoteProvider = (provider: MobileRemoteProvider): void => {\n if (remoteProviderBusy || provider === remoteProvider) return\n if (remoteRunning && !window.confirm(t('switchProviderConfirm'))) return\n remoteProviderBusy = true\n tailscaleChoice.disabled = true\n cpolarChoice.disabled = true\n cloudflaredChoice.disabled = true\n frpChoice.disabled = true\n originChoice.disabled = true\n remoteStatus.textContent = provider === 'cpolar' ? t('switchingCpolar')\n : provider === 'cloudflared' ? t('switchingCloudflared')\n : provider === 'frp' ? t('switchingFrp') : provider === 'origin' ? t('switchingOrigin') : t('switchingTailscale')\n void controlRequestJson('/api/mobile-access/remote/provider', { method: 'POST', body: JSON.stringify({ provider }) })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n }\n tailscaleChoice.addEventListener('click', () => { chooseRemoteProvider('tailscale') })\n cpolarChoice.addEventListener('click', () => { chooseRemoteProvider('cpolar') })\n cloudflaredChoice.addEventListener('click', () => { chooseRemoteProvider('cloudflared') })\n frpChoice.addEventListener('click', () => { chooseRemoteProvider('frp') })\n originChoice.addEventListener('click', () => { chooseRemoteProvider('origin') })\n cloudflaredInstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const accepted = window.confirm(t('installConfirmCloudflared', { size: cloudflaredDownloadSize }))\n if (!accepted) return\n remoteProviderBusy = true\n cloudflaredInstall.disabled = true\n cloudflaredInstall.textContent = t('downloading')\n remoteStatus.textContent = t('installingCloudflared')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/component/install', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'installFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n cloudflaredPurge.addEventListener('click', () => {\n if (remoteProviderBusy) return\n if (!window.confirm(t('purgeCloudflaredConfirm'))) return\n remoteProviderBusy = true\n cloudflaredPurge.disabled = true\n remoteStatus.textContent = t('purgingCloudflared')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/component/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = t('purgeFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cloudflaredPurge.disabled = false; loadRemote() })\n })\n // Tunnel type is staged locally and only reaches the provider through Save, so\n // clicking between the two never silently discards a saved token.\n const showCloudflaredMode = (mode: 'quick' | 'named'): void => {\n cloudflaredModeDraft = mode\n cloudflaredModeQuick.classList.toggle('is-active', mode === 'quick')\n cloudflaredModeNamed.classList.toggle('is-active', mode === 'named')\n cloudflaredModeQuick.setAttribute('aria-pressed', String(mode === 'quick'))\n cloudflaredModeNamed.setAttribute('aria-pressed', String(mode === 'named'))\n cloudflaredModeHint.textContent = mode === 'named' ? t('cloudflaredTunnelNamedHint') : t('cloudflaredTunnelQuickHint')\n // The component note follows the same choice immediately. Waiting for the next poll\n // would leave a quick-tunnel warning sitting beside named-tunnel settings.\n cloudflaredNote.textContent = mode === 'named' ? t('cloudflaredNamedNote') : t('cloudflaredQuickNote')\n cloudflaredTunnel.hidden = mode !== 'named'\n cloudflaredTunnelSave.textContent = cloudflaredSaveLabel()\n }\n cloudflaredModeQuick.addEventListener('click', () => { if (!remoteProviderBusy) showCloudflaredMode('quick') })\n cloudflaredModeNamed.addEventListener('click', () => { if (!remoteProviderBusy) showCloudflaredMode('named') })\n cloudflaredHostname.addEventListener('input', () => { cloudflaredHostnameDirty = true })\n cloudflaredPort.addEventListener('input', () => { cloudflaredPortDirty = true })\n cloudflaredTunnelSave.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const mode = cloudflaredModeDraft ?? cloudflaredTunnelMode\n const hostname = String(cloudflaredHostname.value ?? '').trim()\n const portValue = String(cloudflaredPort.value ?? '').trim()\n const port = Number(portValue)\n const token = String(cloudflaredToken.value ?? '')\n // The provider re-validates everything; these checks only keep an obviously\n // incomplete form from costing a round trip.\n if (mode === 'named') {\n if (hostname === '') { remoteStatus.textContent = t('cloudflaredTunnelHostnameInvalid'); return }\n if (portValue === '' || !Number.isSafeInteger(port) || port < 1024 || port > 65535) {\n remoteStatus.textContent = t('cloudflaredTunnelPortInvalid')\n return\n }\n // The LAN gateway owns 3443 for as long as DSH runs, so this is not a\n // transient conflict worth a round trip.\n if (port === 3443) { remoteStatus.textContent = t('cloudflaredTunnelPortReserved'); return }\n if (token === '' && !cloudflaredTunnelConfigured) { remoteStatus.textContent = t('cloudflaredTunnelConfigMissing'); return }\n if (token !== '' && (token.length < 32 || !/^[A-Za-z0-9_=+/-]+$/u.test(token))) {\n remoteStatus.textContent = t('cloudflaredTunnelTokenInvalid')\n return\n }\n }\n remoteProviderBusy = true\n cloudflaredTunnelSave.disabled = true\n cloudflaredTunnelSave.textContent = t('saving')\n remoteStatus.textContent = mode === 'named' ? t('cloudflaredTunnelSaving') : t('switchingCloudflared')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/tunnel', {\n method: 'POST',\n body: JSON.stringify(mode === 'named' ? { mode, hostname, port, token } : { mode: 'quick' }),\n })\n .then(data => {\n // The token is write-only: never keep a copy in the DOM after saving.\n cloudflaredToken.value = ''\n cloudflaredModeDraft = null\n // The saved values are now authoritative, so let the next poll restore them.\n cloudflaredHostnameDirty = false\n cloudflaredPortDirty = false\n remoteFailureText = ''\n renderRemote(data)\n }, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => {\n remoteProviderBusy = false\n cloudflaredTunnelSave.disabled = false\n cloudflaredTunnelSave.textContent = cloudflaredSaveLabel()\n loadRemote()\n })\n })\n cloudflaredTunnelForget.addEventListener('click', () => {\n if (remoteProviderBusy) return\n if (!window.confirm(t('cloudflaredTunnelForgetConfirm'))) return\n remoteProviderBusy = true\n cloudflaredTunnelForget.disabled = true\n remoteStatus.textContent = t('cloudflaredTunnelForgetting')\n void controlRequestJson('/api/mobile-access/remote/cloudflared/tunnel/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(data => {\n cloudflaredToken.value = ''\n cloudflaredHostname.value = ''\n cloudflaredPort.value = '3444'\n cloudflaredModeDraft = null\n cloudflaredHostnameDirty = false\n cloudflaredPortDirty = false\n remoteFailureText = ''\n renderRemote(data)\n }, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cloudflaredTunnelForget.disabled = false; loadRemote() })\n })\n cpolarInstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const accepted = window.confirm(t('installConfirm'))\n if (!accepted) return\n remoteProviderBusy = true\n cpolarInstall.disabled = true\n cpolarInstall.textContent = t('downloading')\n remoteStatus.textContent = t('installingCpolar')\n void controlRequestJson('/api/mobile-access/remote/cpolar/component/install', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'installFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n cpolarConfigure.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const authtoken = cpolarToken.value.trim()\n if (authtoken.length < 20 || /\\s/u.test(authtoken)) {\n remoteStatus.textContent = t('invalidToken')\n cpolarToken.focus()\n return\n }\n remoteProviderBusy = true\n cpolarConfigure.disabled = true\n cpolarConfigure.setAttribute('aria-busy', 'true')\n cpolarConfigure.textContent = t('saving')\n void controlRequestJson('/api/mobile-access/remote/cpolar/configure', { method: 'POST', body: JSON.stringify({ authtoken }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(() => {\n cpolarToken.value = ''\n remoteStatus.textContent = t('configuredConnecting')\n return controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: true }) })\n })\n .then(renderRemote, error => { remoteFailureText = t('configureFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cpolarConfigure.setAttribute('aria-busy', 'false'); cpolarConfigure.textContent = t('saveConnect'); loadRemote() })\n })\n cpolarPurge.addEventListener('click', () => {\n if (remoteProviderBusy) return\n if (!window.confirm(t('purgeConfirm'))) return\n remoteProviderBusy = true\n cpolarPurge.disabled = true\n remoteStatus.textContent = t('purging')\n void controlRequestJson('/api/mobile-access/remote/cpolar/component/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = t('purgeFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; cpolarPurge.disabled = false; loadRemote() })\n })\n const validFrpServer = (value: string): boolean => value === value.trim() && value.length > 0 && value.length <= 253\n && !/[\\s\\u0000-\\u001f\\u007f/\\\\@?#]/u.test(value)\n const frpForm = (): { readonly serverAddress: string; readonly serverPort: number; readonly token: string; readonly publicOrigin: string } => ({\n serverAddress: String(frpServer.value ?? '').trim(),\n serverPort: Number(frpPort.value),\n token: String(frpToken.value ?? ''),\n publicOrigin: String(frpOrigin.value ?? '').trim(),\n })\n const validFrpForm = (form: ReturnType<typeof frpForm>): boolean => {\n if (!validFrpServer(form.serverAddress)) return false\n try {\n createFrpServerTemplateForClipboard(form.serverPort, form.token, form.publicOrigin)\n return true\n } catch { return false }\n }\n frpCopyTemplate.addEventListener('click', () => {\n const form = frpForm()\n if (!validFrpForm(form)) {\n remoteStatus.textContent = t('frpInputInvalid')\n return\n }\n void navigator.clipboard.writeText(createFrpServerTemplateForClipboard(form.serverPort, form.token, form.publicOrigin))\n .then(() => { remoteStatus.textContent = t('templateCopied') }, () => { remoteStatus.textContent = t('templateCopyFailed') })\n })\n const validVpsSshUser = (value: string): boolean => /^[a-z_][a-z0-9_.-]*[$]?$/iu.test(value) && value.length <= 64\n const validVpsSshKey = (value: string): boolean => value === '' || (/^[a-zA-Z]:[\\\\/]/u.test(value) || value.startsWith('/'))\n const vpsFormStorageKey = 'dsh-mobile.frp-vps-form.v1'\n try {\n const saved = JSON.parse(localStorage.getItem(vpsFormStorageKey) ?? '{}') as Record<string, unknown>\n if (typeof saved.sshUser === 'string' && validVpsSshUser(saved.sshUser)) vpsSshUser.value = saved.sshUser\n if (typeof saved.sshPort === 'number' && Number.isSafeInteger(saved.sshPort) && saved.sshPort >= 1 && saved.sshPort <= 65_535) vpsSshPort.value = String(saved.sshPort)\n if (typeof saved.sshKeyPath === 'string' && validVpsSshKey(saved.sshKeyPath)) vpsSshKey.value = saved.sshKeyPath\n } catch { /* Browser storage is an optional convenience only. */ }\n const saveVpsForm = (): void => {\n try {\n localStorage.setItem(vpsFormStorageKey, JSON.stringify({\n sshUser: String(vpsSshUser.value ?? '').trim(),\n sshPort: Number(vpsSshPort.value),\n sshKeyPath: String(vpsSshKey.value ?? '').trim(),\n }))\n } catch { /* Private browsing or a full quota must not block deployment. */ }\n }\n const validVpsDeploymentForm = (): boolean => {\n const sshPort = Number(vpsSshPort.value)\n return validVpsFrpForm()\n && validVpsSshUser(String(vpsSshUser.value ?? '').trim())\n && Number.isSafeInteger(sshPort) && sshPort >= 1 && sshPort <= 65_535\n && validVpsSshKey(String(vpsSshKey.value ?? '').trim())\n }\n /**\n * VPS actions accept blank connection fields when a configuration is already\n * saved; blanks keep their saved values (\"已保存时可留空\"). The token itself\n * is never readable here, so a blank token is merged server-side while the\n * remaining fields still pass the regular template check.\n */\n const vpsEffectiveForm = (): ReturnType<typeof frpForm> => {\n const form = frpForm()\n if (!frpConfigured) return form\n return {\n serverAddress: form.serverAddress === '' ? configuredFrpServer : form.serverAddress,\n serverPort: Number.isSafeInteger(form.serverPort) && form.serverPort >= 1 ? form.serverPort : configuredFrpPort,\n token: form.token,\n publicOrigin: form.publicOrigin === '' ? configuredFrpOrigin : form.publicOrigin,\n }\n }\n const validVpsFrpForm = (): boolean => {\n const form = vpsEffectiveForm()\n const token = form.token === '' && frpConfigured ? '0123456789abcdef' : form.token\n return validFrpForm({ ...form, token })\n }\n const refreshVpsDeployButton = (): void => {\n const disabled = remoteProviderBusy || !validVpsDeploymentForm()\n vpsDeploy.disabled = disabled\n vpsCopyUninstall.disabled = disabled\n vpsUninstall.disabled = disabled\n }\n for (const input of [frpServer, frpPort, frpToken, frpOrigin, vpsSshUser, vpsSshPort, vpsSshKey]) {\n input.addEventListener('input', refreshVpsDeployButton)\n }\n for (const input of [vpsSshUser, vpsSshPort, vpsSshKey]) input.addEventListener('input', saveVpsForm)\n const vpsCertName = (origin: string): string | undefined => {\n try {\n const host = new URL(origin).hostname\n return /^\\d{1,3}(?:\\.\\d{1,3}){3}$/u.test(host) ? host : undefined\n } catch { return undefined }\n }\n const requestVpsHostKeys = (serverAddress: string, sshUser: string, sshPort: number, sshKeyPath: string): Promise<ReadonlyArray<{ readonly display: string; readonly fingerprint: string }>> => {\n const keyPayload: Record<string, unknown> = { serverAddress, sshUser, sshPort }\n if (sshKeyPath !== '') keyPayload.sshKeyPath = sshKeyPath\n return controlRequestJson('/api/mobile-access/remote/frp/vps/host-keys', { method: 'POST', body: JSON.stringify(keyPayload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(keys => {\n const hostKeys = Array.isArray(keys.vpsHostKeys) ? keys.vpsHostKeys as Array<Record<string, unknown>> : []\n const confirmed = hostKeys\n .filter(key => typeof key.fingerprint === 'string' && typeof key.keyType === 'string')\n .map(key => ({ display: `${String(key.keyType)} ${String(key.fingerprint)}`, fingerprint: String(key.fingerprint) }))\n if (confirmed.length === 0) throw new Error(String(t('vpsHostKeyFailed', { error: 'empty' })))\n return confirmed\n })\n }\n vpsDeploy.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const form = vpsEffectiveForm()\n if (!validVpsFrpForm()) {\n vpsDeployStatus.textContent = t('vpsDeployNotReady')\n return\n }\n const sshUser = vpsSshUser.value.trim()\n const sshPort = Number(vpsSshPort.value)\n const sshKeyPath = vpsSshKey.value.trim()\n saveVpsForm()\n if (!validVpsSshUser(sshUser) || !Number.isSafeInteger(sshPort) || sshPort < 1 || sshPort > 65535 || !validVpsSshKey(sshKeyPath)) {\n vpsDeployStatus.textContent = t('vpsDeployFailed', { error: t('vpsSshKey') })\n return\n }\n remoteProviderBusy = true\n vpsDeploy.disabled = true\n vpsCopyUninstall.disabled = true\n vpsUninstall.disabled = true\n vpsDeployStatus.textContent = t('vpsHostKeyFetching')\n remoteStatus.textContent = t('vpsHostKeyFetching')\n void requestVpsHostKeys(form.serverAddress, sshUser, sshPort, sshKeyPath)\n .then(hostKeys => {\n const display = hostKeys.map(key => key.display).join('\\n')\n if (!window.confirm(t('vpsDeployConfirmWithKeys', { fingerprints: display }))) {\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n return\n }\n vpsDeployStatus.textContent = t('vpsDeploying')\n remoteStatus.textContent = t('vpsDeploying')\n const payload: Record<string, unknown> = {\n confirm: true,\n ...form,\n sshUser,\n sshPort,\n hostFingerprints: hostKeys.map(key => key.fingerprint),\n }\n if (sshKeyPath !== '') payload.sshKeyPath = sshKeyPath\n return controlRequestJson('/api/mobile-access/remote/frp/vps/deploy', { method: 'POST', body: JSON.stringify(payload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(data => {\n const deployment = data.vpsDeployment !== null && typeof data.vpsDeployment === 'object' ? data.vpsDeployment as Record<string, unknown> : {}\n vpsDeployStatus.textContent = deployment.deployed === true ? t('vpsDeploySuccess') : t('vpsDeployFailed', { error: t('vpsDeployFailed', { error: 'unknown result' }) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n renderRemote(data)\n }, error => {\n vpsDeployStatus.textContent = t('vpsDeployFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n }, error => {\n vpsDeployStatus.textContent = t('vpsHostKeyFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n })\n })\n const readVpsSshForm = (): { sshUser: string; sshPort: number; sshKeyPath: string } | undefined => {\n const sshUser = vpsSshUser.value.trim()\n const sshPort = Number(vpsSshPort.value)\n const sshKeyPath = vpsSshKey.value.trim()\n saveVpsForm()\n if (!validVpsSshUser(sshUser) || !Number.isSafeInteger(sshPort) || sshPort < 1 || sshPort > 65535 || !validVpsSshKey(sshKeyPath)) {\n vpsDeployStatus.textContent = t('vpsDeployFailed', { error: t('vpsSshKey') })\n return undefined\n }\n return { sshUser, sshPort, sshKeyPath }\n }\n vpsCopyUninstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const form = vpsEffectiveForm()\n if (!validVpsFrpForm()) {\n vpsDeployStatus.textContent = t('vpsDeployNotReady')\n return\n }\n remoteProviderBusy = true\n refreshVpsDeployButton()\n const scriptPayload: Record<string, unknown> = { serverPort: form.serverPort }\n const certName = vpsCertName(form.publicOrigin)\n if (certName !== undefined) scriptPayload.certName = certName\n void controlRequestJson('/api/mobile-access/remote/frp/vps/uninstall-script', { method: 'POST', body: JSON.stringify(scriptPayload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(data => {\n const script = typeof data.vpsUninstallScript === 'string' ? data.vpsUninstallScript : ''\n if (script === '') throw new Error('empty script')\n return navigator.clipboard.writeText(script)\n })\n .then(() => { vpsDeployStatus.textContent = t('vpsUninstallScriptCopied') }, error => {\n vpsDeployStatus.textContent = t('vpsUninstallScriptFailed', { error: String(error) })\n })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n vpsUninstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const form = vpsEffectiveForm()\n if (!validVpsFrpForm()) {\n vpsDeployStatus.textContent = t('vpsDeployNotReady')\n return\n }\n const ssh = readVpsSshForm()\n if (ssh === undefined) return\n remoteProviderBusy = true\n refreshVpsDeployButton()\n vpsDeployStatus.textContent = t('vpsHostKeyFetching')\n remoteStatus.textContent = t('vpsHostKeyFetching')\n void requestVpsHostKeys(form.serverAddress, ssh.sshUser, ssh.sshPort, ssh.sshKeyPath)\n .then(hostKeys => {\n if (!window.confirm(t('vpsUninstallConfirmWithKeys', { fingerprints: hostKeys.map(key => key.display).join('\\n') }))) {\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n return\n }\n vpsDeployStatus.textContent = t('vpsUninstalling')\n remoteStatus.textContent = t('vpsUninstalling')\n const payload: Record<string, unknown> = {\n confirm: true,\n serverAddress: form.serverAddress,\n serverPort: form.serverPort,\n sshUser: ssh.sshUser,\n sshPort: ssh.sshPort,\n hostFingerprints: hostKeys.map(key => key.fingerprint),\n }\n if (ssh.sshKeyPath !== '') payload.sshKeyPath = ssh.sshKeyPath\n const certName = vpsCertName(form.publicOrigin)\n if (certName !== undefined) payload.certName = certName\n return controlRequestJson('/api/mobile-access/remote/frp/vps/uninstall', { method: 'POST', body: JSON.stringify(payload) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(data => {\n const removal = data.vpsUninstall !== null && typeof data.vpsUninstall === 'object' ? data.vpsUninstall as Record<string, unknown> : {}\n vpsDeployStatus.textContent = removal.removed === true ? t('vpsUninstallSuccess') : t('vpsUninstallFailed', { error: t('vpsUninstallFailed', { error: 'unknown result' }) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n renderRemote(data)\n }, error => {\n vpsDeployStatus.textContent = t('vpsUninstallFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n }, error => {\n vpsDeployStatus.textContent = t('vpsHostKeyFailed', { error: String(error) })\n remoteStatus.textContent = vpsDeployStatus.textContent\n remoteProviderBusy = false\n refreshVpsDeployButton()\n loadRemote()\n })\n })\n frpInstall.addEventListener('click', () => {\n if (remoteProviderBusy) return\n const accepted = window.confirm(t('frpInstallConfirm', { size: frpDownloadSize }))\n if (!accepted) return\n remoteProviderBusy = true\n frpInstall.disabled = true\n frpInstall.textContent = t('downloading')\n remoteStatus.textContent = t('installingFrp')\n void controlRequestJson('/api/mobile-access/remote/frp/component/install', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'installFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; loadRemote() })\n })\n frpConfigure.addEventListener('click', () => {\n if (remoteProviderBusy || !frpInstalled) return\n const form = frpForm()\n const unchanged = frpConfigured && form.token === '' && form.serverAddress === configuredFrpServer\n && form.serverPort === configuredFrpPort && form.publicOrigin === configuredFrpOrigin\n if (!unchanged && !validFrpForm(form)) {\n remoteStatus.textContent = t('frpInputInvalid')\n return\n }\n remoteProviderBusy = true\n frpConfigure.disabled = true\n frpConfigure.setAttribute('aria-busy', 'true')\n frpConfigure.textContent = t('saving')\n const configure = unchanged\n ? Promise.resolve<Record<string, unknown>>({})\n : controlRequestJson('/api/mobile-access/remote/frp/configure', { method: 'POST', body: JSON.stringify(form) })\n void configure.then(() => {\n frpToken.value = ''\n remoteStatus.textContent = t('frpSavingConnecting')\n return controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: true }) })\n }).then(renderRemote, error => { remoteFailureText = t('configureFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => {\n remoteProviderBusy = false\n frpConfigure.setAttribute('aria-busy', 'false')\n frpConfigure.textContent = t('frpSaveConnect')\n loadRemote()\n })\n })\n frpPurge.addEventListener('click', () => {\n if (remoteProviderBusy || !window.confirm(t('purgeFrpConfirm'))) return\n remoteProviderBusy = true\n frpPurge.disabled = true\n remoteStatus.textContent = t('purgingFrp')\n void controlRequestJson('/api/mobile-access/remote/frp/component/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) }, LONG_CONTROL_REQUEST_TIMEOUT_MS)\n .then(renderRemote, error => { remoteFailureText = t('purgeFailed', { error: String(error) }); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteProviderBusy = false; frpPurge.disabled = false; loadRemote() })\n })\n const clearOriginValidation = (): void => {\n for (const input of [originPublic, originHost, originPort, originCidrs]) input.removeAttribute('aria-invalid')\n }\n const showOriginFeedback = (message: string, error = false): void => {\n originFeedback.textContent = message\n originFeedback.hidden = false\n originFeedback.classList.toggle('is-error', error)\n }\n const showOriginError = (error: unknown): void => {\n const code = error instanceof Error ? error.message : String(error)\n const key = ORIGIN_ERROR_MESSAGE_KEYS[code]\n const fields: Record<string, HTMLInputElement> = {\n origin_public_origin_invalid: originPublic, origin_listen_host_invalid: originHost,\n origin_listen_address_unavailable: originHost, origin_listen_port_invalid: originPort,\n origin_listen_port_reserved: originPort, origin_listen_port_in_use: originPort,\n origin_allowed_cidrs_invalid: originCidrs,\n }\n clearOriginValidation()\n const input = fields[code]\n input?.setAttribute('aria-invalid', 'true')\n showOriginFeedback(key === undefined ? t('configureFailed', { error: String(error) }) : t(key), true)\n }\n const setOriginFormBusy = (busy: boolean): void => {\n originFormBusy = busy\n remoteProviderBusy = busy\n remoteSnapshotEpoch += 1\n renderRemote(latestRemoteState)\n }\n for (const input of [originPublic, originHost, originPort, originCidrs]) {\n input.addEventListener('input', () => {\n originFormDirty = true\n clearOriginValidation()\n originFeedback.hidden = true\n })\n }\n originConfigure.addEventListener('click', () => {\n if (remoteProviderBusy || remoteProvider !== 'origin') return\n clearOriginValidation()\n for (const input of [originPublic, originHost, originPort, originCidrs]) {\n if (!input.reportValidity()) return\n }\n const form = {\n publicOrigin: originPublic.value.trim(), listenHost: originHost.value.trim(),\n listenPort: Number(originPort.value), allowedCidrs: originCidrs.value.trim().split(/[\\s,]+/u).filter(Boolean),\n }\n setOriginFormBusy(true)\n showOriginFeedback(t('originSaving'))\n void controlRequestJson('/api/mobile-access/remote/origin/configure', { method: 'POST', body: JSON.stringify(form) })\n .then(() => controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: true }) }))\n .then(data => {\n originFormDirty = false\n renderRemote(data)\n if (data.state === 'error') showOriginError(new Error(typeof data.errorCode === 'string' ? data.errorCode : 'origin_gateway_start_failed'))\n else originFeedback.hidden = true\n }, showOriginError)\n .finally(() => {\n setOriginFormBusy(false)\n const invalidInput = [originPublic, originHost, originPort, originCidrs].find(input => input.getAttribute('aria-invalid') === 'true')\n invalidInput?.focus()\n loadRemote()\n })\n })\n originPurge.addEventListener('click', () => {\n if (remoteProviderBusy || !window.confirm(t('originPurgeConfirm'))) return\n setOriginFormBusy(true)\n showOriginFeedback(t('originPurging'))\n void controlRequestJson('/api/mobile-access/remote/origin/purge', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(data => {\n originFormDirty = false\n clearOriginValidation()\n renderRemote(data)\n showOriginFeedback(t('originPurged'))\n }, showOriginError)\n .finally(() => { setOriginFormBusy(false); loadRemote() })\n })\n originCopyBackend.addEventListener('click', () => {\n const address = originBackendAddress.textContent ?? ''\n if (address === '' || remoteProviderBusy) return\n void Promise.resolve().then(() => navigator.clipboard.writeText(address))\n .then(() => { showOriginFeedback(t('originBackendCopied')) }, error => { showOriginFeedback(t('requestFailed', { error: String(error) }), true) })\n })\n remoteToggle.addEventListener('click', () => {\n remoteToggle.disabled = true\n void controlRequestJson('/api/mobile-access/remote/control', { method: 'POST', body: JSON.stringify({ running: !remoteRunning }) })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(loadRemote)\n })\n remoteLogin.addEventListener('click', () => {\n if (remoteLoginUrl !== '') window.open(remoteLoginUrl, '_blank', 'noopener,noreferrer')\n })\n const reconnectRemote = (): void => {\n if (remoteReconnectBusy) return\n remoteReconnectBusy = true\n remoteReconnect.disabled = true\n remoteSetup.disabled = true\n remoteSetupRetry.disabled = true\n remoteStatus.textContent = remoteProvider === 'cpolar' ? t('reconnectingCpolar')\n : remoteProvider === 'cloudflared' ? t('reconnectingCloudflared')\n : remoteProvider === 'frp' ? t('reconnectingFrp') : remoteProvider === 'origin' ? t('reconnectingOrigin') : t('reconnectingTailscale')\n void controlRequestJson('/api/mobile-access/remote/reconnect', { method: 'POST', body: '{}' })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => {\n remoteReconnectBusy = false\n remoteReconnect.disabled = false\n remoteSetup.disabled = remoteSetupUrl === ''\n remoteSetupRetry.disabled = false\n })\n }\n remoteReconnect.addEventListener('click', reconnectRemote)\n remoteSetupRetry.addEventListener('click', () => { remoteSetupPending = false; reconnectRemote() })\n remoteSetup.addEventListener('click', () => {\n if (remoteSetupUrl === '') return\n remoteSetupPending = true\n remoteSetupOpenedAt = Date.now()\n remoteStatus.textContent = t('setupOpened')\n window.open(remoteSetupUrl, '_blank', 'noopener,noreferrer')\n })\n const retryAfterSetup = (): void => {\n if (!remoteSetupPending || document.visibilityState === 'hidden' || Date.now() - remoteSetupOpenedAt < 800) return\n remoteSetupPending = false\n reconnectRemote()\n }\n window.addEventListener('focus', retryAfterSetup)\n document.addEventListener('visibilitychange', retryAfterSetup)\n const copyRemotePairUrl = async (): Promise<void> => {\n try {\n await navigator.clipboard.writeText(activeRemotePairUrl)\n remoteStatus.textContent = t('linkCopied')\n } catch {\n remoteStatus.textContent = t('remoteQrReady')\n }\n }\n const openRemotePairing = (): Promise<void> => controlRequestJson('/api/mobile-access/remote/pairing/open', { method: 'POST', body: '{}' }).then(async data => {\n const pairUrl = typeof data.pairUrl === 'string' ? data.pairUrl : ''\n const expiresAt = typeof data.expiresAt === 'number' && Number.isFinite(data.expiresAt) ? data.expiresAt : 0\n showQr(typeof data.qrSvg === 'string' ? data.qrSvg : '', remoteQr)\n if (pairUrl === '') { remoteStatus.textContent = t('keyGenerationFailed'); return }\n // QR and copy actions share the same one-time pairing window. Re-copying\n // cannot invalidate a QR that the phone may already be scanning.\n activeRemotePairUrl = pairUrl\n activeRemotePairExpiresAt = expiresAt\n remotePairLink.textContent = pairUrl\n remotePairLink.classList.add('is-key')\n remotePairLink.hidden = false\n await copyRemotePairUrl()\n })\n remotePair.addEventListener('click', () => {\n remotePair.disabled = true\n void openRemotePairing()\n .catch(error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remotePair.disabled = !remoteReady })\n })\n remoteCopyLink.addEventListener('click', () => {\n remoteCopyLink.disabled = true\n const operation = activeRemotePairUrl !== '' && activeRemotePairExpiresAt > Date.now()\n ? copyRemotePairUrl()\n : openRemotePairing()\n void operation\n .catch(error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n .finally(() => { remoteCopyLink.disabled = !remoteReady })\n })\n const renderRemoteDevices = (data: Record<string, unknown>): void => {\n const devices = Array.isArray(data.devices) ? data.devices as Record<string, unknown>[] : []\n remoteDevicePanel.replaceChildren()\n if (devices.length === 0) {\n const empty = element('p', 'dsh-mobile-control__device-empty'); empty.textContent = t('noRemoteDevices'); remoteDevicePanel.append(empty); return\n }\n for (const device of devices) {\n const row = element('div', 'dsh-mobile-control__device')\n const label = element('span', 'dsh-mobile-control__device-label'); label.textContent = typeof device.label === 'string' ? device.label : t('device')\n const meta = element('span', 'dsh-mobile-control__device-meta'); meta.textContent = t('expires', { time: formatTime(device.expiresAt) })\n const revoke = element('button', 'dsh-mobile-control__device-revoke'); revoke.type = 'button'; revoke.textContent = t('revoke')\n const id = typeof device.id === 'string' ? device.id : ''\n revoke.addEventListener('click', () => {\n void controlRequestJson('/api/mobile-access/remote/devices/revoke', { method: 'POST', body: JSON.stringify({ deviceId: id }) })\n .then(loadRemoteDevices, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n })\n row.append(label, meta, revoke); remoteDevicePanel.append(row)\n }\n }\n const loadRemoteDevices = (): void => {\n void controlRequestJson('/api/mobile-access/remote/devices').then(renderRemoteDevices, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n }\n remoteDevices.addEventListener('click', () => {\n const show = remoteDevicePanel.hidden\n remoteDevicePanel.hidden = !show\n if (show) loadRemoteDevices()\n })\n remoteReset.addEventListener('click', () => {\n const prompt = remoteProvider === 'cpolar'\n ? t('resetCpolarConfirm')\n : remoteProvider === 'cloudflared' ? t('resetCloudflaredConfirm')\n : remoteProvider === 'frp' ? t('resetFrpConfirm') : remoteProvider === 'origin' ? t('resetOriginConfirm') : t('resetTailscaleConfirm')\n if (!window.confirm(prompt)) return\n void controlRequestJson('/api/mobile-access/remote/reset', { method: 'POST', body: JSON.stringify({ confirm: true }) })\n .then(renderRemote, error => { remoteFailureText = remoteFailureTextFor(error, 'requestFailed'); remoteStatus.textContent = remoteFailureText })\n })\n const renderDiagnostics = (data: Record<string, unknown>): void => {\n const entries = [...diagnosticEntriesForRender(data)]\n const overall = diagnosticOverallForChecks(data.overall, entries.map(entry => entry.status))\n diagnosticsSummary.className = `dsh-mobile-control__diagnostic-summary is-${overall}`\n diagnosticsSummaryTitle.textContent = overall === 'ok' ? t('diagnosticsComplete') : overall === 'attention' ? t('diagnosticsAttention') : t('diagnosticsProblem')\n diagnosticsSummaryText.textContent = locale === 'zh' && data.overall === overall && typeof data.summary === 'string' ? data.summary : t('diagnosticsCompleteFallback')\n diagnosticsChecks.replaceChildren()\n const statusLabels: Record<string, string> = { ok: t('diagnosticStatusOk'), warning: t('diagnosticStatusWarning'), error: t('diagnosticStatusError'), info: t('diagnosticStatusInfo') }\n const diagnosticLabelKeys: Record<string, string> = {\n versions: 'diagnosticLabelVersions', network: 'diagnosticLabelNetwork', lan: 'diagnosticLabelLan',\n firewall: 'diagnosticLabelFirewall', remote: 'diagnosticLabelRemote', 'phone-network': 'diagnosticLabelPhone',\n }\n const statusOf = (entry: Record<string, unknown>): 'ok' | 'warning' | 'error' | 'info' => normalizeDiagnosticStatus(entry.status)\n const localizedEntryCopy = (entry: Record<string, unknown>): { readonly detail: string; readonly action: string } => {\n const serverCopy = diagnosticServerCopy(entry)\n const reason = typeof entry.reason === 'string' ? entry.reason : ''\n const catalog = DIAGNOSTIC_REASON_MESSAGES[locale] as Readonly<Record<string, readonly [string, string]>>\n const templates = catalog[reason]\n if (templates === undefined) return serverCopy\n const facts = entry.facts !== null && typeof entry.facts === 'object' ? entry.facts as Record<string, unknown> : {}\n // Diagnostics read as sentences, so an internal provider id or a raw controller\n // code belongs in the report, not in the prose: it renders as\n // \"Remote access through origin is currently off.\" or \"reported gateway_start_failed\".\n const providerNames: Record<string, string> = {\n tailscale: 'Tailscale Funnel', cpolar: 'cpolar', cloudflared: 'cloudflared',\n frp: t('frpName'), origin: t('originName'),\n }\n const providerId = typeof facts.provider === 'string' ? facts.provider : ''\n const controllerKey = typeof facts.controllerCode === 'string' ? REMOTE_ERROR_MESSAGE_KEYS[facts.controllerCode] : undefined\n const values: Record<string, string> = {\n provider: providerNames[providerId] ?? '',\n latencyMs: typeof facts.latencyMs === 'number' && Number.isFinite(facts.latencyMs) ? new Intl.NumberFormat(localeTag).format(facts.latencyMs) : '',\n interfaceName: typeof facts.interfaceName === 'string' ? facts.interfaceName : '',\n endpointSuffix: typeof facts.endpointSuffix === 'string' ? facts.endpointSuffix : '',\n // A translated sentence when the code is known, otherwise nothing rather than\n // an identifier no user can act on.\n controllerCode: controllerKey === undefined ? '' : t(controllerKey),\n }\n const interpolate = (template: string): string => template.replace(/\\{(\\w+)\\}/gu, (_match, key: string) => values[key] ?? '')\n let detail = interpolate(templates[0])\n let action = interpolate(templates[1])\n if (reason === 'versions-current') {\n const versions = data.versions !== null && typeof data.versions === 'object' ? data.versions as Record<string, unknown> : {}\n if ([versions.plugin, versions.dsh, versions.minimumAndroidApp].every(value => typeof value === 'string')) {\n detail += ` plugin ${String(versions.plugin)}, DSH ${String(versions.dsh)}, Android ${String(versions.minimumAndroidApp)}.`\n }\n }\n if (reason === 'remote-controller-error') {\n const controllerActionKeys: Readonly<Record<string, string>> = {\n ...ORIGIN_ERROR_MESSAGE_KEYS,\n component_missing: 'remoteUnavailableTailscale', funnel_permission_required: 'funnelPermission', funnel_https_required: 'funnelHttps', funnel_start_failed: 'funnelStart', funnel_start_timeout: 'funnelTimeout', tailscale_dns_missing: 'tailscaleDnsMissing',\n sidecar_launch_failed: 'remoteUnavailableTailscale', sidecar_stopped: 'controlChannelFailed', sidecar_exited: 'controlChannelFailed', control_channel_failed: 'controlChannelFailed',\n cpolar_component_missing: 'cpolarMissing', cpolar_component_invalid: 'cpolarInvalid', cpolar_config_missing: 'cpolarConfigMissing', cpolar_config_invalid: 'cpolarConfigInvalid', cpolar_start_timeout: 'cpolarTimeout', cpolar_stopped: 'cpolarStopped', cpolar_exited: 'cpolarExited',\n cloudflared_component_missing: 'cloudflaredMissing', cloudflared_component_invalid: 'cloudflaredInvalid', cloudflared_component_unsupported: 'cloudflaredComponentUnsupported', cloudflared_port_unavailable: 'cloudflaredPortUnavailable', cloudflared_port_reservation_failed: 'cloudflaredPortReservationFailed', cloudflared_launch_failed: 'cloudflaredLaunchFailed', cloudflared_start_timeout: 'cloudflaredTimeout', cloudflared_stopped: 'cloudflaredStopped', cloudflared_exited: 'cloudflaredExited', cloudflared_invalid_origin: 'cloudflaredOriginInvalid', cloudflared_tunnel_port_unavailable: 'cloudflaredTunnelPortUnavailable', cloudflared_tunnel_config_invalid: 'cloudflaredTunnelInvalid', cloudflared_tunnel_target_invalid: 'cloudflaredTunnelTargetInvalid', cloudflared_download_hash_mismatch: 'cloudflaredDownloadHashMismatch', cloudflared_download_size_mismatch: 'cloudflaredDownloadSizeMismatch', cloudflared_executable_hash_mismatch: 'cloudflaredExecutableHashMismatch',\n frp_component_missing: 'frpMissing', frp_component_invalid: 'frpInvalid', frp_config_missing: 'frpConfigMissing', frp_config_verify_failed: 'frpConfigVerifyFailed', frp_vhost_publicly_reachable: 'frpVhostPublic', frp_vhost_probe_failed: 'frpVhostProbeFailed', frp_launch_failed: 'frpLaunchFailed', frp_start_timeout: 'frpTimeout', frp_discovery_mismatch: 'frpDiscoveryMismatch', frp_discovery_invalid: 'frpDiscoveryInvalid', frp_stopped: 'frpStopped', frp_exited: 'frpExited', gateway_start_failed: 'gatewayStartFailed',\n }\n const actionKey = controllerActionKeys[values.controllerCode ?? '']\n if (actionKey !== undefined) action = t(actionKey)\n }\n return { detail, action }\n }\n const appendGroup = (label: string, groupEntries: Record<string, unknown>[]): void => {\n if (groupEntries.length === 0) return\n const group = element('section', 'dsh-mobile-control__diagnostic-group')\n const groupHeader = element('header', 'dsh-mobile-control__diagnostic-group-header')\n const groupTitle = element('h3'); groupTitle.textContent = label\n const groupCount = element('span'); groupCount.textContent = t('diagnosticItems', { count: groupEntries.length })\n const list = element('div', 'dsh-mobile-control__diagnostic-list'); list.setAttribute('role', 'list')\n groupHeader.append(groupTitle, groupCount)\n for (const entry of groupEntries) {\n const state = statusOf(entry)\n const row = element('section', `dsh-mobile-control__diagnostic-check is-${state}`); row.setAttribute('role', 'listitem')\n const marker = element('span', 'dsh-mobile-control__diagnostic-marker'); marker.setAttribute('aria-hidden', 'true')\n const rowBody = element('div', 'dsh-mobile-control__diagnostic-check-body')\n const rowHeader = element('div', 'dsh-mobile-control__diagnostic-check-header')\n const labelKey = typeof entry.id === 'string' ? diagnosticLabelKeys[entry.id] : undefined\n const rowTitle = element('strong'); rowTitle.textContent = locale !== 'zh' && labelKey !== undefined ? t(labelKey) : typeof entry.label === 'string' ? entry.label : t('diagnosticCheck')\n const badge = element('span', 'dsh-mobile-control__diagnostic-badge'); badge.textContent = statusLabels[state]!\n const localizedCopy = localizedEntryCopy(entry)\n const detail = element('p'); detail.textContent = localizedCopy.detail\n rowHeader.append(rowTitle, badge); rowBody.append(rowHeader, detail)\n if (localizedCopy.action !== '') {\n const action = element('p', 'dsh-mobile-control__diagnostic-action')\n const actionLabel = element('span'); actionLabel.textContent = t('diagnosticAction')\n action.append(actionLabel, document.createTextNode(localizedCopy.action)); rowBody.append(action)\n }\n row.append(marker, rowBody); list.append(row)\n }\n group.append(groupHeader, list); diagnosticsChecks.append(group)\n }\n const issues = entries.filter(entry => statusOf(entry) === 'error' || statusOf(entry) === 'warning')\n const otherChecks = entries.filter(entry => statusOf(entry) !== 'error' && statusOf(entry) !== 'warning')\n appendGroup(t('diagnosticNeedsAction'), issues)\n appendGroup(issues.length === 0 ? t('diagnosticDetails') : t('diagnosticOther'), otherChecks)\n diagnosticsSummaryMeta.textContent = issues.length === 0\n ? t('diagnosticNoBlockers', { count: entries.length })\n : t('diagnosticNeedsCount', { count: entries.length, issues: issues.length })\n diagnosticsChecks.hidden = entries.length === 0\n const reportCopy = LOCALIZED_DIAGNOSTIC_COPY[locale]\n const generatedAt = typeof data.generatedAt === 'number' ? new Date(data.generatedAt).toLocaleString(localeTag) : new Date().toLocaleString(localeTag)\n const lines = entries.map(entry => {\n const state = statusOf(entry)\n const labelKey = typeof entry.id === 'string' ? diagnosticLabelKeys[entry.id] : undefined\n const label = labelKey === undefined && typeof entry.label === 'string' ? entry.label : labelKey === undefined ? t('diagnosticCheck') : t(labelKey)\n const localizedCopy = localizedEntryCopy(entry)\n return `[${statusLabels[state]!}] ${label}: ${localizedCopy.detail}${localizedCopy.action === '' ? '' : ` ${localizedCopy.action}`}`\n })\n copiedDiagnosticReport = [reportCopy.reportTitle, `${reportCopy.generated}: ${generatedAt}`, ...lines].join('\\n')\n diagnosticsReport.textContent = copiedDiagnosticReport\n diagnosticsDetails.hidden = copiedDiagnosticReport === ''\n diagnosticsCopy.disabled = copiedDiagnosticReport === ''\n diagnosticsCopy.hidden = copiedDiagnosticReport === ''\n diagnosticsToolbar.classList.toggle('has-report', copiedDiagnosticReport !== '')\n }\n const showDiagnosticsFailure = (error: unknown): void => {\n diagnosticsSummary.className = 'dsh-mobile-control__diagnostic-summary is-error'\n diagnosticsSummaryTitle.textContent = t('diagnosticsIncomplete')\n diagnosticsSummaryText.textContent = t('diagnosticsReadFailed', { error: String(error) })\n diagnosticsSummaryMeta.textContent = t('diagnosticsUnavailable')\n diagnosticsChecks.replaceChildren()\n diagnosticsChecks.hidden = true\n copiedDiagnosticReport = ''\n diagnosticsReport.textContent = ''\n diagnosticsDetails.hidden = true\n diagnosticsCopy.disabled = true\n diagnosticsCopy.hidden = true\n diagnosticsToolbar.classList.remove('has-report')\n }\n const loadDiagnostics = (): void => {\n if (diagnosticsBusy) return\n diagnosticsBusy = true\n diagnosticsRun.disabled = true\n diagnosticsRun.setAttribute('aria-busy', 'true')\n diagnosticsRun.textContent = t('diagnosticsChecking')\n diagnosticsSummary.className = 'dsh-mobile-control__diagnostic-summary is-running'\n diagnosticsSummaryTitle.textContent = t('diagnosticsCheckingTitle')\n diagnosticsSummaryText.textContent = t('diagnosticsCheckingText')\n diagnosticsSummaryMeta.textContent = t('diagnosticsRunningMeta')\n diagnosticsFeedback.hidden = true\n diagnosticsChecks.classList.add('is-refreshing')\n diagnosticsChecks.setAttribute('aria-busy', 'true')\n void controlRequestJson('/api/mobile-access/diagnostics').then(\n data => { renderDiagnosticPayloadSafely(data, renderDiagnostics, showDiagnosticsFailure) },\n showDiagnosticsFailure,\n ).finally(() => {\n diagnosticsBusy = false\n diagnosticsRun.disabled = false\n diagnosticsRun.setAttribute('aria-busy', 'false')\n diagnosticsRun.textContent = t('diagnosticsRetry')\n diagnosticsChecks.classList.remove('is-refreshing')\n diagnosticsChecks.setAttribute('aria-busy', 'false')\n })\n }\n diagnosticsEntry.addEventListener('click', () => {\n if (!diagnosticsView.hidden) { selectView(previousAccessView); return }\n selectView('diagnostics'); loadDiagnostics()\n })\n diagnosticsRun.addEventListener('click', loadDiagnostics)\n const closeUpdateCard = (): void => {\n updateCard.hidden = true\n if (pluginUpdateAvailable && pluginLatestVersion !== '') updatePlugin.hidden = !diagnosticsView.hidden\n }\n const runPluginUpdate = (): void => {\n if (!pluginUpdateAvailable || pluginLatestVersion === '' || updateInFlight) return\n updateInFlight = true\n updateNow.disabled = true\n updateLater.disabled = true\n updateCardTitle.textContent = t('updatingPlugin')\n releaseNotice.hidden = true\n releaseNotice.classList.remove('is-error')\n void controlRequestJson('/api/mobile-access/release/update', { method: 'POST', body: '{}' }, LONG_CONTROL_REQUEST_TIMEOUT_MS).then(data => {\n const installedVersion = releaseVersion(data.installedVersion) ?? pluginLatestVersion\n pluginUpdateAvailable = false\n updateCard.hidden = true\n updatePlugin.hidden = true\n releaseNotice.textContent = t('pluginUpdatedRestart', { version: installedVersion })\n releaseNotice.hidden = false\n }, error => {\n updateCard.hidden = true\n updatePlugin.hidden = false\n releaseNotice.textContent = t('pluginUpdateFailed', { error: String(error) })\n releaseNotice.classList.add('is-error')\n releaseNotice.hidden = false\n }).finally(() => {\n updateInFlight = false\n updateNow.disabled = false\n updateLater.disabled = false\n })\n }\n updatePlugin.addEventListener('click', () => {\n if (!pluginUpdateAvailable || pluginLatestVersion === '' || updateInFlight) return\n updatePlugin.hidden = true\n updateCardTitle.textContent = t('updateTo', { version: pluginLatestVersion })\n updateCardNotes.textContent = pluginReleaseNotes === '' ? t('updateNotesEmpty') : pluginReleaseNotes\n updateCardNotes.hidden = pluginReleaseNotes === ''\n updateCard.hidden = false\n })\n updateNow.addEventListener('click', runPluginUpdate)\n updateLater.addEventListener('click', closeUpdateCard)\n diagnosticsCopy.addEventListener('click', () => {\n if (copiedDiagnosticReport === '') return\n void navigator.clipboard.writeText(copiedDiagnosticReport).then(() => {\n diagnosticsFeedback.textContent = t('diagnosticsCopied')\n diagnosticsFeedback.hidden = false\n }, () => {\n diagnosticsDetails.open = true\n diagnosticsFeedback.textContent = t('diagnosticsCopyManual')\n diagnosticsFeedback.hidden = false\n })\n })\n pair.addEventListener('click', () => { pair.disabled = true; openPairing('key') })\n linkPair.addEventListener('click', () => { linkPair.disabled = true; openPairing('link') })\n close.addEventListener('click', () => { setOpen(false) })\n const dismiss = (event: PointerEvent): void => {\n if (panel.hidden || !(event.target instanceof Node)) return\n if (!providerInfo.contains(event.target)) {\n providerInfoPinned = false\n providerInfoHovered = false\n syncProviderInfo()\n }\n if (!panel.contains(event.target) && !document.querySelector('.dsh-mobile-control__trigger')?.contains(event.target)) setOpen(false)\n }\n document.addEventListener('pointerdown', dismiss)\n void controlRequestJson('/api/mobile-access/release').then(renderRelease, () => {})\n void controlRequestJson('/api/mobile-access/lan/control').then(render, error => { status.textContent = t('requestFailed', { error: String(error) }) })\n loadRemote()\n const remotePoll = window.setInterval(() => { if (!panel.hidden && !remoteView.hidden) loadRemote() }, 1_500)\n const pollWsBlocked = (): void => {\n void controlRequestJson('/api/mobile-access/remote/websocket-paths/blocked').then(blocked => {\n const raw = Array.isArray(blocked.blocked) ? blocked.blocked : []\n wsPathsBlocked = raw.filter((entry): entry is { path: string; attempts: number } =>\n typeof entry === 'object' && entry !== null\n && typeof (entry as { path?: unknown }).path === 'string'\n && typeof (entry as { attempts?: unknown }).attempts === 'number')\n renderWsDot()\n if (!diagnosticsView.hidden) renderWsBlocked(wsPathsBlocked)\n }, () => { /* gateway unreachable; dot keeps its last state */ })\n }\n const wsBlockedPoll = window.setInterval(pollWsBlocked, 20_000)\n return { remove: () => { lifecycle.abort(); window.clearInterval(remotePoll); window.clearInterval(wsBlockedPoll); window.removeEventListener('focus', retryAfterSetup); document.removeEventListener('visibilitychange', retryAfterSetup); document.removeEventListener('pointerdown', dismiss); root.remove() }, toggle: () => { setOpen(panel.hidden !== false) }, isOpen: () => !panel.hidden }\n}\n\nfunction mobileRequest(path: string, init: RequestInit = {}): Promise<Response> {\n const target = new URL(path, location.href)\n if (target.origin !== location.origin) throw new TypeError('mobile extension requests must stay on the DSH origin')\n const headers = new Headers(init.headers)\n const method = (init.method ?? 'GET').toUpperCase()\n if (method !== 'GET' && method !== 'HEAD') {\n const csrf = document.cookie.split(';').map(value => value.trim()).find(value => value.startsWith('dsh_ma_csrf='))?.slice(12)\n if (csrf !== undefined) headers.set('x-dsh-mobile-csrf', csrf)\n }\n return fetch(target, { ...init, headers, credentials: 'same-origin', cache: 'no-store', redirect: 'error' })\n}\n\nexport interface CombinedClientSignal {\n readonly signal: AbortSignal\n readonly cleanup: () => void\n}\n\n/** Combine extension and caller abort lifetimes and expose deterministic listener cleanup. */\nexport function combineClientSignalLifetime(first: AbortSignal, second: AbortSignal): CombinedClientSignal {\n if (first.aborted || second.aborted) {\n const aborted = new AbortController()\n aborted.abort(first.aborted ? first.reason : second.reason)\n return { signal: aborted.signal, cleanup: () => undefined }\n }\n const controller = new AbortController()\n const cleanup = (): void => {\n first.removeEventListener('abort', abortFirst)\n second.removeEventListener('abort', abortSecond)\n }\n const abortFirst = (): void => { cleanup(); controller.abort(first.reason) }\n const abortSecond = (): void => { cleanup(); controller.abort(second.reason) }\n first.addEventListener('abort', abortFirst, { once: true })\n second.addEventListener('abort', abortSecond, { once: true })\n return { signal: controller.signal, cleanup }\n}\n\n/** Combine extension and caller abort lifetimes on WebViews without AbortSignal.any. */\nexport function combineClientSignals(first: AbortSignal, second: AbortSignal): AbortSignal {\n return combineClientSignalLifetime(first, second).signal\n}\n\n/** Keep a combined request lifetime until a streamed response is consumed or cancelled. */\nexport function bindClientResponseLifetime(response: Response, cleanup: () => void): Response {\n if (response.body === null) {\n cleanup()\n return response\n }\n const reader = response.body.getReader()\n let released = false\n const release = (): void => {\n if (released) return\n released = true\n cleanup()\n }\n const body = new ReadableStream<Uint8Array>({\n async pull(controller) {\n try {\n const result = await reader.read()\n if (result.done) {\n release()\n controller.close()\n } else controller.enqueue(result.value)\n } catch (error) {\n release()\n controller.error(error)\n }\n },\n async cancel(reason) {\n try { await reader.cancel(reason) } finally { release() }\n },\n })\n try {\n const retained = new Response(body, { headers: response.headers, status: response.status, statusText: response.statusText })\n Object.defineProperties(retained, {\n redirected: { configurable: true, value: response.redirected },\n type: { configurable: true, value: response.type },\n url: { configurable: true, value: response.url },\n })\n return retained\n } catch (error) {\n void reader.cancel(error)\n release()\n throw error\n }\n}\n\n/** Dispose an old UI when its replacement Host generation cannot be activated. */\nexport function failClosedExtensionGenerationReplacement(\n hasActive: boolean,\n activeGeneration: string | undefined,\n replacementGeneration: string | undefined,\n dispose: () => void,\n): boolean {\n if (!hasActive || activeGeneration === replacementGeneration) return false\n dispose()\n return true\n}\n\n/** Resolve one SDK route and prove its normalized path remains in the current extension namespace. */\nexport function extensionRouteUrl(id: string, path: string, baseUrl: string): URL {\n const rawPathname = path.split(/[?#]/u, 1)[0] ?? ''\n if (!/^[a-z][a-z0-9-]{0,63}$/u.test(id) || !path.startsWith('/') || path.startsWith('//')\n || rawPathname.includes('\\\\') || rawPathname.includes('\\0') || /%(?:2f|5c)/iu.test(rawPathname)) {\n throw new TypeError('extension routes must be relative')\n }\n const origin = new URL(baseUrl).origin\n const prefix = `/mobile-access/extensions/${id}/routes`\n let target: URL\n try { target = new URL(`${prefix}${path}`, origin) } catch { throw new TypeError('extension routes must be relative') }\n let decodedPathname: string\n try { decodedPathname = decodeURIComponent(target.pathname) } catch { throw new TypeError('extension routes must be relative') }\n if (target.origin !== origin || target.hash !== '' || decodedPathname.includes('\\\\')\n || decodedPathname !== prefix && !decodedPathname.startsWith(`${prefix}/`)) {\n throw new TypeError('extension routes must be relative')\n }\n const relative = decodedPathname.slice(prefix.length)\n if (relative.split('/').some(part => part === '.' || part === '..')) throw new TypeError('extension routes must be relative')\n return target\n}\n\n/** Resolve one generation-pinned static asset URL in the current extension namespace. */\nexport function extensionAssetUrl(id: string, generation: string | undefined, path: string, baseUrl: string): URL {\n if (!/^[a-z][a-z0-9-]{0,63}$/u.test(id) || generation !== undefined && !/^[a-f\\d]{64}$/u.test(generation)) {\n throw new TypeError('extension asset path is invalid')\n }\n const normalized = path.replaceAll('\\\\', '/')\n if (normalized.length === 0 || normalized.startsWith('/') || normalized.split('/').some(part => part === '' || part === '.' || part === '..')) {\n throw new TypeError('extension asset path is invalid')\n }\n const target = new URL(`/mobile-access/extensions/${id}/assets/${normalized.split('/').map(encodeURIComponent).join('/')}`, new URL(baseUrl).origin)\n if (generation !== undefined) target.searchParams.set('generation', generation)\n return target\n}\n\n/** Add the immutable Host generation selected for one activated mobile UI. */\nexport function extensionGenerationHeaders(generation: string | undefined, headers?: HeadersInit): Headers {\n const result = new Headers(headers)\n if (generation !== undefined) result.set('x-dsh-mobile-extension-generation', generation)\n return result\n}\n\n/** Build the JSON request used by a mobile extension to invoke a Host action. */\nexport function extensionActionRequestInit(generation: string | undefined, input: unknown, signal: AbortSignal): RequestInit {\n return {\n method: 'POST',\n headers: extensionGenerationHeaders(generation, { 'content-type': 'application/json' }),\n body: JSON.stringify(input ?? {}),\n signal,\n }\n}\n\nexport function registerUniqueDisposable<T extends { readonly dispose: () => void }>(\n entries: Map<string, T>,\n claimedIds: Set<string>,\n id: string,\n mount: () => T,\n): () => void {\n if (claimedIds.has(id)) throw new Error(`duplicate lifecycle id: ${id}`)\n claimedIds.add(id)\n let mounted: T\n try { mounted = mount() } catch (error) { claimedIds.delete(id); throw error }\n let disposed = false\n const dispose = (): void => {\n if (disposed) return\n disposed = true\n mounted.dispose()\n }\n const entry = { ...mounted, dispose } as T\n entries.set(id, entry)\n return () => {\n if (entries.get(id) === entry) { entries.delete(id); claimedIds.delete(id) }\n dispose()\n }\n}\n\n/** Dispose resources omitted by a successfully fetched authoritative manifest. */\nexport function reconcileRemovedExtensions(currentIds: Iterable<string>, seen: ReadonlySet<string>, dispose: (id: string) => void): void {\n for (const id of new Set(currentIds)) if (!seen.has(id)) dispose(id)\n}\n\n/** Reconcile managed resources against one validated authoritative id set. */\nexport function publishAuthoritativeExtensionIds(\n authoritativeIds: Set<string>,\n seen: ReadonlySet<string>,\n managedIdSources: readonly Iterable<string>[],\n dispose: (id: string) => void,\n): void {\n const current = new Set(authoritativeIds)\n for (const source of managedIdSources) for (const id of source) current.add(id)\n reconcileRemovedExtensions(current, seen, dispose)\n authoritativeIds.clear()\n for (const id of seen) authoritativeIds.add(id)\n}\n\ninterface MobileExtensionManifestEntry {\n readonly id: string\n readonly generation?: string\n readonly scriptUrl?: string\n readonly styleUrl?: string\n readonly assetsUrl?: string\n}\ninterface MobileExtensionManifest {\n readonly extensions: readonly MobileExtensionManifestEntry[]\n readonly legacy: { readonly scriptRevision: string; readonly styleRevision: string }\n}\n\nfunction validManifestResourceUrl(value: unknown): value is string {\n return typeof value === 'string' && value.startsWith('/') && !value.startsWith('//') && !value.includes('://')\n && !value.split('/').some(part => part === '..' || part === '.')\n}\n\n/** Validate the manifest before treating it as authoritative state. */\nexport function parseMobileExtensionManifest(payload: unknown): MobileExtensionManifest | undefined {\n if (typeof payload !== 'object' || payload === null) return undefined\n const candidate = payload as { protocol?: unknown; extensions?: unknown; legacy?: unknown }\n if (candidate.protocol !== 1 || !Array.isArray(candidate.extensions) || typeof candidate.legacy !== 'object' || candidate.legacy === null) return undefined\n const legacy = candidate.legacy as { scriptRevision?: unknown; styleRevision?: unknown }\n if (typeof legacy.scriptRevision !== 'string' || typeof legacy.styleRevision !== 'string') return undefined\n const ids = new Set<string>()\n const extensions: MobileExtensionManifestEntry[] = []\n for (const value of candidate.extensions) {\n if (typeof value !== 'object' || value === null) return undefined\n const entry = value as { id?: unknown; generation?: unknown; scriptUrl?: unknown; styleUrl?: unknown; assetsUrl?: unknown }\n if (typeof entry.id !== 'string' || !/^[a-z][a-z0-9-]{0,63}$/u.test(entry.id) || ids.has(entry.id)) return undefined\n if (entry.generation !== undefined && (typeof entry.generation !== 'string' || !/^[a-f\\d]{64}$/u.test(entry.generation))) return undefined\n if (entry.scriptUrl !== undefined && !validManifestResourceUrl(entry.scriptUrl)) return undefined\n if (entry.styleUrl !== undefined && !validManifestResourceUrl(entry.styleUrl)) return undefined\n if (entry.assetsUrl !== undefined && !validManifestResourceUrl(entry.assetsUrl)) return undefined\n ids.add(entry.id)\n extensions.push({\n id: entry.id,\n ...(entry.generation === undefined ? {} : { generation: entry.generation }),\n ...(entry.scriptUrl === undefined ? {} : { scriptUrl: entry.scriptUrl }),\n ...(entry.styleUrl === undefined ? {} : { styleUrl: entry.styleUrl }),\n ...(entry.assetsUrl === undefined ? {} : { assetsUrl: entry.assetsUrl }),\n })\n }\n return { extensions, legacy: { scriptRevision: legacy.scriptRevision, styleRevision: legacy.styleRevision } }\n}\n\n/** A missing manifest is authoritative before optional legacy resources finish refreshing. */\nexport async function handleMissingExtensionManifest(\n clearManifestResources: () => void,\n refreshLegacyResources: () => Promise<readonly boolean[]>,\n signal: AbortSignal,\n): Promise<boolean> {\n clearManifestResources()\n const results = await refreshLegacyResources()\n return !signal.aborted && results.every(Boolean)\n}\n\ninterface LifecycleSchedulerRuntime {\n readonly document: Pick<Document, 'visibilityState' | 'addEventListener' | 'removeEventListener'>\n readonly window: Pick<Window, 'addEventListener' | 'removeEventListener' | 'setTimeout' | 'clearTimeout'>\n}\n\nexport interface LifecycleRefreshController {\n (): void\n refresh(): void\n}\n\nfunction refreshAborted(signal: AbortSignal): boolean { return signal.aborted }\n\n/** Run one coalesced refresh cycle, slowing down when the page is hidden. */\nexport function startLifecycleRefreshScheduler(\n refresh: (signal: AbortSignal) => void | Promise<void>,\n options: { readonly visibleIntervalMs?: number; readonly hiddenIntervalMs?: number; readonly cycleTimeoutMs?: number } = {},\n runtime: LifecycleSchedulerRuntime = { document, window },\n): LifecycleRefreshController {\n const visibleIntervalMs = options.visibleIntervalMs ?? 45_000\n const hiddenIntervalMs = options.hiddenIntervalMs ?? 300_000\n const cycleTimeoutMs = options.cycleTimeoutMs ?? 30_000\n let timer: number | undefined\n let cycleTimer: number | undefined\n let running = false\n let queued = false\n let disposed = false\n let controller: AbortController | undefined\n const clearTimer = (): void => {\n if (timer === undefined) return\n runtime.window.clearTimeout(timer)\n timer = undefined\n }\n const clearCycleTimer = (): void => {\n if (cycleTimer === undefined) return\n runtime.window.clearTimeout(cycleTimer)\n cycleTimer = undefined\n }\n const schedule = (): void => {\n if (disposed) return\n clearTimer()\n const delay = runtime.document.visibilityState === 'hidden' ? hiddenIntervalMs : visibleIntervalMs\n timer = runtime.window.setTimeout(run, delay)\n }\n const run = (): void => {\n if (disposed) return\n clearTimer()\n if (running) { queued = true; return }\n running = true\n const current = new AbortController()\n controller = current\n const refreshPromise = Promise.resolve().then(() => refresh(current.signal))\n const timeoutPromise = new Promise<void>(resolve => {\n cycleTimer = runtime.window.setTimeout(() => {\n cycleTimer = undefined\n current.abort(new DOMException('mobile extension refresh timed out', 'TimeoutError'))\n resolve()\n }, cycleTimeoutMs)\n })\n void Promise.race([refreshPromise, timeoutPromise]).catch(() => { /* Keep the last good resources during reconnects. */ }).finally(() => {\n clearCycleTimer()\n if (controller === current) controller = undefined\n running = false\n if (disposed) return\n if (queued) { queued = false; run() } else schedule()\n })\n void refreshPromise.catch(() => { /* A timed-out refresh may reject after the scheduler has moved on. */ })\n }\n const onVisibilityChange = (): void => {\n if (runtime.document.visibilityState === 'hidden') schedule()\n else run()\n }\n runtime.document.addEventListener('visibilitychange', onVisibilityChange)\n runtime.window.addEventListener('focus', run)\n runtime.window.addEventListener('online', run)\n run()\n const stop = (): void => {\n disposed = true\n queued = false\n controller?.abort()\n controller = undefined\n clearCycleTimer()\n clearTimer()\n runtime.document.removeEventListener('visibilitychange', onVisibilityChange)\n runtime.window.removeEventListener('focus', run)\n runtime.window.removeEventListener('online', run)\n }\n return Object.assign(stop, { refresh: run })\n}\n\ninterface ExtensionEventRuntime {\n readonly window: Pick<Window, 'addEventListener' | 'removeEventListener' | 'setTimeout' | 'clearTimeout'>\n readonly create: (url: string) => Pick<EventSource, 'close' | 'onopen' | 'onerror' | 'addEventListener'>\n}\n\n/** Maintain one authenticated same-origin extension event stream with bounded reconnect backoff. */\nexport function startExtensionChangeStream(\n changed: () => void,\n runtime: ExtensionEventRuntime = {\n window,\n create: url => new EventSource(url, { withCredentials: true }),\n },\n onTaskEvent?: (payload: unknown) => void,\n onDeviceRevoked?: () => void,\n): () => void {\n let source: ReturnType<ExtensionEventRuntime['create']> | undefined\n let timer: number | undefined\n let disposed = false\n let retryMs = 1_000\n const clearTimer = (): void => {\n if (timer === undefined) return\n runtime.window.clearTimeout(timer)\n timer = undefined\n }\n const connect = (): void => {\n if (disposed || source !== undefined) return\n clearTimer()\n const next = runtime.create('/mobile-access/extensions/events')\n source = next\n next.onopen = () => { retryMs = 1_000 }\n next.addEventListener('extensions-changed', changed)\n if (onTaskEvent !== undefined) {\n next.addEventListener('task-notify', (message: Event) => {\n const data = (message as MessageEvent).data\n onTaskEvent(data)\n })\n }\n if (onDeviceRevoked !== undefined) {\n next.addEventListener('device-revoked', (message: Event) => {\n const data = (message as MessageEvent).data\n if (isDeviceRevokedPayload(data)) onDeviceRevoked()\n })\n }\n next.onerror = () => {\n if (source !== next) return\n next.close()\n source = undefined\n if (disposed) return\n const delay = retryMs\n retryMs = Math.min(30_000, retryMs * 2)\n timer = runtime.window.setTimeout(connect, delay)\n }\n }\n const reconnectNow = (): void => {\n if (disposed) return\n source?.close()\n source = undefined\n retryMs = 1_000\n connect()\n }\n runtime.window.addEventListener('online', reconnectNow)\n connect()\n return () => {\n disposed = true\n clearTimer()\n source?.close()\n source = undefined\n runtime.window.removeEventListener('online', reconnectNow)\n }\n}\n\nexport interface ActivationWork<T> {\n readonly result: Promise<T>\n readonly cancel: () => void\n readonly commit?: (value: T) => void\n readonly dispose: (value: T) => void\n}\n\ninterface PendingActivation<T> {\n readonly key: object\n readonly generation: number\n readonly controller: AbortController\n readonly cancel: () => void\n readonly completion: Promise<boolean>\n}\n\n/** Keep at most one activation in flight per id and commit only its latest generation. */\nexport class PerIdActivationLifecycle<T> {\n private readonly active = new Map<string, { readonly value: T; readonly dispose: () => void }>()\n private readonly pending = new Map<string, PendingActivation<T>>()\n private readonly generations = new Map<string, number>()\n private disposed = false\n\n hasActive(id: string): boolean { return this.active.has(id) }\n getActive(id: string): T | undefined { return this.active.get(id)?.value }\n pendingCount(): number { return this.pending.size }\n\n async activate(\n id: string,\n key: object,\n cycleSignal: AbortSignal | undefined,\n create: (controller: AbortController, generation: number) => ActivationWork<T>,\n ): Promise<boolean> {\n if (this.disposed || cycleSignal?.aborted === true) return false\n const existing = this.pending.get(id)\n if (existing !== undefined) {\n if (existing.key === key && !existing.controller.signal.aborted) return this.waitFor(existing, cycleSignal)\n existing.cancel()\n }\n const generation = (this.generations.get(id) ?? 0) + 1\n this.generations.set(id, generation)\n const controller = new AbortController()\n let work: ActivationWork<T>\n try { work = create(controller, generation) } catch {\n controller.abort(new DOMException('mobile extension activation failed to start', 'AbortError'))\n return false\n }\n let cancelled = false\n let pending = {} as PendingActivation<T>\n const cancel = (): void => {\n if (cancelled) return\n cancelled = true\n if (this.pending.get(id) === pending) this.pending.delete(id)\n if (this.generations.get(id) === generation) this.generations.set(id, generation + 1)\n controller.abort(new DOMException('mobile extension activation cancelled', 'AbortError'))\n work.cancel()\n }\n const completion = Promise.resolve(work.result).then(value => {\n const current = this.pending.get(id)\n const canCommit = !this.disposed && current === pending && current.generation === this.generations.get(id)\n && !controller.signal.aborted\n if (!canCommit) {\n try { work.dispose(value) } catch { /* A stale extension disposer must not break lifecycle cleanup. */ }\n return false\n }\n try { work.commit?.(value) } catch {\n try { work.dispose(value) } catch { /* Keep the previous active extension intact. */ }\n return false\n }\n const previous = this.active.get(id)\n let valueDisposed = false\n const dispose = (): void => {\n if (valueDisposed) return\n valueDisposed = true\n controller.abort(new DOMException('mobile extension deactivated', 'AbortError'))\n try { work.dispose(value) } catch { /* Disposers are isolated per extension. */ }\n }\n this.active.set(id, { value, dispose })\n previous?.dispose()\n return true\n }, () => {\n cancel()\n return false\n }).finally(() => {\n if (this.pending.get(id) === pending) this.pending.delete(id)\n })\n Object.assign(pending, { key, generation, controller, cancel, completion })\n this.pending.set(id, pending)\n return this.waitFor(pending, cycleSignal)\n }\n\n remove(id: string): void {\n this.generations.set(id, (this.generations.get(id) ?? 0) + 1)\n this.active.get(id)?.dispose()\n this.active.delete(id)\n this.pending.get(id)?.cancel()\n }\n\n dispose(): void {\n if (this.disposed) return\n this.disposed = true\n for (const current of this.active.values()) current.dispose()\n this.active.clear()\n for (const current of this.pending.values()) current.cancel()\n }\n\n private waitFor(pending: PendingActivation<T>, signal: AbortSignal | undefined): Promise<boolean> {\n if (signal === undefined) return pending.completion\n if (signal.aborted) { pending.cancel(); return Promise.resolve(false) }\n return new Promise<boolean>(resolve => {\n let settled = false\n const finish = (value: boolean): void => {\n if (settled) return\n settled = true\n signal.removeEventListener('abort', onAbort)\n resolve(value)\n }\n const onAbort = (): void => { pending.cancel(); finish(false) }\n signal.addEventListener('abort', onAbort, { once: true })\n void pending.completion.then(finish)\n })\n }\n}\n\nfunction installCustomAssets(): () => void {\n const legacyStyle = element('style'); legacyStyle.dataset.plugin = 'dsh-mobile-custom'; document.head.append(legacyStyle)\n const legacyCssState = { etag: '', modified: '' }\n const previous = window.dshMobile\n let legacyMount: MobileExtensionMount | undefined = queuedLegacyMount\n let legacySource = ''\n let legacyRoot: HTMLElement | undefined\n let legacyDispose: (() => void) | undefined\n const definitions = new Map<string, MobileClientDefinition>()\n type ExtensionSurfaceEntry = { readonly dispose: () => void; readonly container: HTMLElement; readonly host: () => HTMLElement }\n type ActiveExtension = { readonly controller: AbortController; readonly surfaces: Map<string, ExtensionSurfaceEntry>; readonly cleanup?: () => void }\n const activations = new PerIdActivationLifecycle<ActiveExtension>()\n const styleNodes = new Map<string, HTMLStyleElement>()\n const styleEtags = new Map<string, string>()\n const scriptDigests = new Map<string, string>()\n const activeHostGenerations = new Map<string, string | undefined>()\n const activationKeys = new Map<string, { readonly definition: MobileClientDefinition; readonly generation?: string }>()\n const manifestExtensionIds = new Set<string>()\n const managedDefinitionIds = new Set<string>()\n let manifestEtag = ''\n let disposed = false\n let expectedDefinitionId: string | undefined\n const SURFACE_HOST_STYLES: Readonly<Record<string, string>> = {\n 'sidebar-action': 'position:fixed;z-index:1100;top:calc(env(safe-area-inset-top) + 8px);left:8px;display:flex;flex-direction:column;gap:6px;pointer-events:none',\n 'header-action': 'position:fixed;z-index:1100;top:calc(env(safe-area-inset-top) + 8px);right:8px;display:flex;flex-direction:column;gap:6px;pointer-events:none',\n 'composer-dock': 'position:fixed;z-index:1100;bottom:calc(env(safe-area-inset-bottom) + 8px);left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:6px;pointer-events:none',\n 'settings-section': 'position:fixed;z-index:1100;inset:auto 8px calc(env(safe-area-inset-bottom) + 72px) 8px;max-height:40vh;overflow:auto;pointer-events:none',\n }\n const surfaceHost = (placement: string): HTMLElement | undefined => {\n const existing = document.querySelector<HTMLElement>(`[data-dsh-mobile-surface-host=\"${placement}\"]`)\n if (existing !== null) return existing\n const style = SURFACE_HOST_STYLES[placement]\n if (style === undefined) return undefined\n const host = element('div'); host.dataset.dshMobileSurfaceHost = placement; host.style.cssText = style\n document.body.append(host); return host\n }\n const shellLayer = (): HTMLElement => {\n const existing = document.querySelector<HTMLElement>('[data-dsh-mobile-extension-layer]')\n if (existing !== null) return existing\n const layer = element('div'); layer.dataset.dshMobileExtensionLayer = 'true'; layer.style.cssText = 'position:fixed;inset:0;z-index:1200;pointer-events:none;overflow:hidden'\n document.body.append(layer); return layer\n }\n const toast = (message: string): void => {\n const node = element('div'); node.textContent = message; node.style.cssText = 'position:absolute;top:16px;left:50%;transform:translateX(-50%);padding:9px 14px;border-radius:999px;background:#1f2937;color:white;font:14px system-ui;pointer-events:auto;box-shadow:0 8px 24px #0003'\n shellLayer().append(node); window.setTimeout(() => node.remove(), 2600)\n }\n const materializeNativeFile = (value: unknown): unknown => {\n if (typeof value !== 'object' || value === null || !('base64' in value) || !('name' in value)) return value\n const candidate = value as { base64?: unknown; name?: unknown; type?: unknown }\n if (typeof candidate.base64 !== 'string' || typeof candidate.name !== 'string') return value\n try {\n const encoded = atob(candidate.base64)\n const bytes = Uint8Array.from(encoded, character => character.charCodeAt(0))\n return new File([bytes], candidate.name, { type: typeof candidate.type === 'string' ? candidate.type : 'application/octet-stream' })\n } catch {\n return value\n }\n }\n const invokeNative = async (action: string, input: unknown, signal: AbortSignal): Promise<unknown> => {\n const abortReason = (): unknown => signal.reason ?? new DOMException('mobile extension disposed', 'AbortError')\n if (signal.aborted) throw abortReason()\n const bridge = window.__DSH_MOBILE_NATIVE__\n if (bridge !== undefined) {\n return new Promise<unknown>((resolve, reject) => {\n let settled = false\n const finish = (callback: () => void): void => { if (settled) return; settled = true; signal.removeEventListener('abort', onAbort); callback() }\n const onAbort = (): void => { finish(() => { reject(abortReason()) }) }\n signal.addEventListener('abort', onAbort, { once: true })\n void Promise.resolve().then(() => bridge.invoke(action, input)).then(\n value => { finish(() => { resolve(materializeNativeFile(value)) }) },\n error => { finish(() => { reject(error) }) },\n )\n })\n }\n if (action === 'share' && typeof navigator.share === 'function') { await navigator.share((input ?? {}) as ShareData); return { ok: true } }\n if (action === 'clipboard.read' && navigator.clipboard !== undefined) return { text: await navigator.clipboard.readText() }\n if (action === 'clipboard.write' && navigator.clipboard !== undefined) { await navigator.clipboard.writeText(typeof input === 'object' && input !== null && 'text' in input ? String((input as { text: unknown }).text) : ''); return { ok: true } }\n if (action === 'files.pick' || action === 'camera.capture') {\n const inputElement = element('input')\n inputElement.type = 'file'\n inputElement.accept = action === 'camera.capture' ? 'image/*' : '*/*'\n if (action === 'camera.capture') inputElement.capture = 'environment'\n inputElement.hidden = true\n return new Promise<File | undefined>((resolve, reject) => {\n let settled = false\n let cleaned = false\n let cleanupTimer = 0\n let watchdogTimer = 0\n const cleanup = (): void => {\n if (cleaned) return\n cleaned = true\n if (cleanupTimer !== 0) window.clearTimeout(cleanupTimer)\n if (watchdogTimer !== 0) window.clearTimeout(watchdogTimer)\n window.removeEventListener('focus', scheduleCancel)\n document.removeEventListener('visibilitychange', onVisibilityChange)\n signal.removeEventListener('abort', onAbort)\n inputElement.removeEventListener('change', onChange)\n inputElement.removeEventListener('cancel', onCancel)\n inputElement.remove()\n }\n const finish = (callback: () => void): void => { if (settled) return; settled = true; cleanup(); callback() }\n const onChange = (): void => { const file = inputElement.files?.[0]; finish(() => { resolve(file) }) }\n const onCancel = (): void => { finish(() => { resolve(undefined) }) }\n const onAbort = (): void => { finish(() => { reject(abortReason()) }) }\n const scheduleCancel = (): void => { if (!settled && cleanupTimer === 0) cleanupTimer = window.setTimeout(onCancel, 1000) }\n const onVisibilityChange = (): void => { if (document.visibilityState === 'visible') scheduleCancel() }\n inputElement.addEventListener('change', onChange, { once: true })\n inputElement.addEventListener('cancel', onCancel, { once: true })\n window.addEventListener('focus', scheduleCancel)\n document.addEventListener('visibilitychange', onVisibilityChange)\n signal.addEventListener('abort', onAbort, { once: true })\n watchdogTimer = window.setTimeout(onCancel, 300_000)\n try {\n document.body.append(inputElement)\n inputElement.click()\n } catch (error) {\n finish(() => { reject(error) })\n }\n })\n }\n throw new Error('native capability is unavailable')\n }\n const makeApi = (id: string, hostGeneration: string | undefined, controller: AbortController, surfaces: Map<string, ExtensionSurfaceEntry>, surfaceIds: Set<string>): MobileClientApi => {\n const ensureCurrent = (): void => { if (controller.signal.aborted) throw controller.signal.reason }\n const requestSignal = (signal?: AbortSignal | null): CombinedClientSignal => signal === undefined || signal === null\n ? { signal: controller.signal, cleanup: () => undefined }\n : combineClientSignalLifetime(controller.signal, signal)\n const mountSurface = (surface: MobileSurface): (() => void) => {\n ensureCurrent()\n if (!/^[a-z][a-z0-9-]{0,63}$/u.test(surface.id) || surface.label.length > 120) throw new Error('invalid mobile surface')\n return registerUniqueDisposable(surfaces, surfaceIds, surface.id, () => {\n const container = element('section'); container.dataset.dshMobileSurface = surface.id; container.hidden = surface.placement === 'page' || surface.placement === 'overlay'; container.style.cssText = surface.placement === 'page' || surface.placement === 'overlay' ? 'position:absolute;inset:0;overflow:auto;background:var(--dsw-alias-bg-layer-1,#fff);padding:16px;pointer-events:auto' : 'pointer-events:auto'\n const host = (): HTMLElement => surface.placement === 'page' || surface.placement === 'overlay' ? shellLayer() : surfaceHost(surface.placement) ?? shellLayer()\n const mounted = surface.mount(container)\n const dispose = (): void => { try { if (typeof mounted === 'function') mounted() } finally { container.remove() } }\n return { dispose, container, host }\n })\n }\n return {\n host: {\n invoke: (action: string, input: unknown) => {\n ensureCurrent()\n return mobileRequest(`/mobile-access/extensions/${encodeURIComponent(id)}/actions/${encodeURIComponent(action)}`, extensionActionRequestInit(hostGeneration, input, controller.signal)).then(async response => { const value = await response.json() as unknown; if (!response.ok) throw new Error(typeof value === 'object' && value !== null && 'error' in value ? String((value as { error: unknown }).error) : `HTTP ${String(response.status)}`); return value })\n },\n fetch: (path: string, init?: RequestInit) => {\n ensureCurrent()\n const target = extensionRouteUrl(id, path, location.href)\n const headers = extensionGenerationHeaders(hostGeneration, init?.headers)\n const lifetime = requestSignal(init?.signal)\n return mobileRequest(target.href, { ...init, headers, signal: lifetime.signal }).then(\n response => bindClientResponseLifetime(response, lifetime.cleanup),\n error => { lifetime.cleanup(); throw error },\n )\n },\n assetUrl: path => { ensureCurrent(); return extensionAssetUrl(id, hostGeneration, path, location.href).href },\n },\n ui: {\n registerSurface: mountSurface,\n open: surfaceId => { ensureCurrent(); const entry = surfaces.get(surfaceId); if (entry !== undefined) entry.container.hidden = false },\n close: surfaceId => { ensureCurrent(); const entry = surfaces.get(surfaceId); if (entry !== undefined) entry.container.hidden = true },\n toast: message => { ensureCurrent(); toast(message) },\n },\n native: {\n capabilities: async () => { ensureCurrent(); const bridge = window.__DSH_MOBILE_NATIVE__; return bridge === undefined ? ['files.pick', 'camera.capture', 'share', 'clipboard.read', 'clipboard.write'] : bridge.capabilities() },\n invoke: (action, input) => invokeNative(action, input, controller.signal),\n },\n signal: controller.signal, document, window,\n }\n }\n const activateDefinition = (definition: MobileClientDefinition, cycleSignal?: AbortSignal, commitGeneration?: () => void, hostGeneration?: string): Promise<boolean> => {\n const previousKey = activationKeys.get(definition.id)\n const key = previousKey?.definition === definition && previousKey.generation === hostGeneration\n ? previousKey\n : { definition, ...(hostGeneration === undefined ? {} : { generation: hostGeneration }) }\n activationKeys.set(definition.id, key)\n return activations.activate(\n definition.id,\n key,\n cycleSignal,\n controller => {\n const surfaces = new Map<string, ExtensionSurfaceEntry>()\n const surfaceIds = new Set<string>()\n let pendingDisposed = false\n const disposePending = (): void => {\n if (pendingDisposed) return\n pendingDisposed = true\n for (const surface of surfaces.values()) {\n try { surface.dispose() } catch { /* Dispose every staged surface independently. */ }\n }\n surfaces.clear()\n surfaceIds.clear()\n }\n const result = Promise.resolve().then(() => definition.activate(makeApi(definition.id, hostGeneration, controller, surfaces, surfaceIds))).then(cleanup => ({\n controller,\n surfaces,\n ...(typeof cleanup === 'function' ? { cleanup } : {}),\n }))\n return {\n result,\n cancel: disposePending,\n commit: value => {\n if (definitions.get(definition.id) !== definition || controller.signal.aborted) throw new Error('stale mobile extension activation')\n for (const surface of value.surfaces.values()) surface.host().append(surface.container)\n activeHostGenerations.set(definition.id, hostGeneration)\n commitGeneration?.()\n },\n dispose: value => {\n controller.abort(new DOMException('mobile extension disposed', 'AbortError'))\n try { value.cleanup?.() } finally { disposePending() }\n },\n }\n },\n )\n }\n const define = (definition: MobileClientDefinition): void => {\n if (disposed || definition.apiVersion !== 1 || !/^[a-z][a-z0-9-]{0,63}$/u.test(definition.id) || typeof definition.activate !== 'function') return\n if (expectedDefinitionId !== undefined && definition.id !== expectedDefinitionId) return\n definitions.set(definition.id, definition)\n if (started && expectedDefinitionId === undefined) void activateDefinition(definition)\n }\n let started = false\n window.dshMobile = Object.freeze({ register: mount => { legacyMount = mount }, define })\n for (const definition of queuedDefinitions.splice(0)) define(definition)\n let legacyJsEtag = ''\n let legacyJsModified = ''\n const refreshLegacy = async (signal: AbortSignal): Promise<boolean> => {\n const previousMount = legacyMount\n let pendingRoot: HTMLElement | undefined\n try {\n const headers: Record<string, string> = {}\n if (legacyJsEtag !== '') headers['if-none-match'] = legacyJsEtag\n if (legacyJsModified !== '') headers['if-modified-since'] = legacyJsModified\n const response = await fetch('/mobile-access/custom.js', { credentials: 'same-origin', cache: 'no-store', headers, signal })\n if (response.status === 304) return true\n if (!response.ok) return false\n const nextEtag = response.headers.get('etag') ?? ''\n const nextModified = response.headers.get('last-modified') ?? ''\n const next = await response.text()\n if (refreshAborted(signal)) return false\n if (next === legacySource) { legacyJsEtag = nextEtag; legacyJsModified = nextModified; return true }\n legacyMount = undefined\n const script = element('script'); script.textContent = `${next}\\n//# sourceURL=dsh-mobile-custom.js`; document.head.append(script); script.remove()\n if (refreshAborted(signal)) { legacyMount = previousMount; return false }\n const mount = legacyMount as MobileExtensionMount | undefined\n if (mount === undefined) {\n legacyDispose?.(); legacyDispose = undefined\n legacyRoot?.remove(); legacyRoot = undefined\n legacySource = next; legacyJsEtag = nextEtag; legacyJsModified = nextModified\n return true\n }\n const nextRoot = element('div'); pendingRoot = nextRoot; nextRoot.dataset.dshMobileExtension = 'true'; document.body.append(nextRoot)\n const nextDispose = mount({ document, request: mobileRequest, root: nextRoot, window })\n if (refreshAborted(signal)) { if (typeof nextDispose === 'function') nextDispose(); pendingRoot.remove(); pendingRoot = undefined; legacyMount = previousMount; return false }\n legacyDispose?.(); legacyRoot?.remove(); legacyRoot = nextRoot; pendingRoot = undefined; legacyDispose = typeof nextDispose === 'function' ? nextDispose : undefined; legacySource = next\n legacyJsEtag = nextEtag; legacyJsModified = nextModified\n return true\n } catch { pendingRoot?.remove(); legacyMount = previousMount; return false }\n }\n let legacyScriptRevision = ''\n let legacyStyleRevision = ''\n const disposeManifestExtension = (id: string): void => {\n activations.remove(id)\n styleNodes.get(id)?.remove(); styleNodes.delete(id); styleEtags.delete(id); scriptDigests.delete(id); activeHostGenerations.delete(id); activationKeys.delete(id)\n if (managedDefinitionIds.delete(id)) definitions.delete(id)\n }\n const managedManifestIdSources = (): readonly Iterable<string>[] => [styleNodes.keys(), styleEtags.keys(), scriptDigests.keys(), managedDefinitionIds]\n const clearManifestExtensions = (): void => {\n publishAuthoritativeExtensionIds(manifestExtensionIds, new Set(), managedManifestIdSources(), disposeManifestExtension)\n manifestEtag = ''\n }\n const refreshExtensions = async (signal: AbortSignal): Promise<boolean> => {\n try {\n const headers: Record<string, string> = {}\n if (manifestEtag !== '') headers['if-none-match'] = manifestEtag\n const response = await fetch('/mobile-access/extensions/manifest', { credentials: 'same-origin', cache: 'no-store', headers, signal })\n if (response.status === 404) {\n legacyScriptRevision = ''\n legacyStyleRevision = ''\n return handleMissingExtensionManifest(\n clearManifestExtensions,\n () => Promise.all([refreshLegacy(signal), refreshCssLegacy(legacyStyle, signal, legacyCssState)]),\n signal,\n )\n }\n if (response.status === 304) return true\n if (!response.ok) return false\n const nextManifestEtag = response.headers.get('etag') ?? ''\n const payload = parseMobileExtensionManifest(await response.json())\n if (refreshAborted(signal) || payload === undefined) return false\n const entries = payload.extensions\n const seen = new Set(entries.map(entry => entry.id))\n const scriptRevision = payload.legacy.scriptRevision\n const styleRevision = payload.legacy.styleRevision\n let refreshComplete = true\n if (scriptRevision === '' || scriptRevision !== legacyScriptRevision) {\n if (await refreshLegacy(signal)) legacyScriptRevision = scriptRevision\n else refreshComplete = false\n }\n if (styleRevision === '' || styleRevision !== legacyStyleRevision) {\n if (await refreshCssLegacy(legacyStyle, signal, legacyCssState)) legacyStyleRevision = styleRevision\n else refreshComplete = false\n }\n const commitStyle = (id: string, change: 'retain' | 'remove' | 'replace', css?: string, etag?: string): void => {\n if (change === 'retain') return\n const oldStyle = styleNodes.get(id)\n if (change === 'remove') {\n oldStyle?.remove()\n styleNodes.delete(id)\n styleEtags.delete(id)\n return\n }\n if (oldStyle?.textContent !== css) {\n const node = element('style'); node.dataset.dshMobileExtensionStyle = id; node.textContent = css ?? ''; document.head.append(node); styleNodes.set(id, node); oldStyle?.remove()\n }\n if (etag !== undefined && etag !== '') styleEtags.set(id, etag)\n }\n for (const entry of entries) {\n const hadActiveGeneration = activations.hasActive(entry.id)\n const previousHostGeneration = activeHostGenerations.get(entry.id)\n let previousDefinition: MobileClientDefinition | undefined\n let evaluatedDefinition = false\n try {\n let styleChange: 'retain' | 'remove' | 'replace' = entry.styleUrl === undefined ? 'remove' : 'retain'\n let pendingCss: string | undefined\n let pendingStyleEtag: string | undefined\n const cssUrl = typeof entry.styleUrl === 'string' ? entry.styleUrl : undefined\n if (cssUrl !== undefined) {\n const cssHeaders: Record<string, string> = {}\n const storedEtag = styleEtags.get(entry.id)\n if (storedEtag !== undefined) cssHeaders['if-none-match'] = storedEtag\n const cssResponse = await fetch(cssUrl, { credentials: 'same-origin', cache: 'no-store', headers: cssHeaders, signal })\n if (cssResponse.status !== 304) {\n if (!cssResponse.ok) throw new Error('mobile extension style failed to load')\n pendingStyleEtag = cssResponse.headers.get('etag') ?? undefined\n pendingCss = await cssResponse.text()\n styleChange = 'replace'\n if (refreshAborted(signal)) return false\n }\n }\n\n const scriptUrl = typeof entry.scriptUrl === 'string' ? entry.scriptUrl : undefined\n if (scriptUrl === undefined) {\n if (refreshAborted(signal)) return false\n commitStyle(entry.id, styleChange, pendingCss, pendingStyleEtag)\n activations.remove(entry.id)\n activeHostGenerations.delete(entry.id)\n scriptDigests.delete(entry.id)\n if (managedDefinitionIds.delete(entry.id)) definitions.delete(entry.id)\n } else {\n const scriptHeaders: Record<string, string> = {}\n const storedDigest = scriptDigests.get(entry.id)\n if (storedDigest !== undefined) scriptHeaders['if-none-match'] = storedDigest\n const scriptResponse = await fetch(scriptUrl, { credentials: 'same-origin', cache: 'no-store', headers: scriptHeaders, signal })\n let nextDigest: string | undefined\n if (scriptResponse.status !== 304) {\n if (!scriptResponse.ok) throw new Error('mobile extension script failed to load')\n const source = await scriptResponse.text()\n if (refreshAborted(signal)) return false\n const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(source))\n if (refreshAborted(signal)) return false\n const key = [...new Uint8Array(digest)].map(value => value.toString(16).padStart(2, '0')).join('')\n if (scriptDigests.get(entry.id) !== key) {\n previousDefinition = definitions.get(entry.id)\n try {\n expectedDefinitionId = entry.id\n try {\n const script = element('script'); script.textContent = `${source}\\n//# sourceURL=dsh-mobile-extension-${entry.id}.js`; document.head.append(script); script.remove()\n } finally { expectedDefinitionId = undefined }\n const nextDefinition = definitions.get(entry.id)\n if (nextDefinition === undefined || nextDefinition === previousDefinition) throw new Error('mobile extension did not define its manifest id')\n evaluatedDefinition = true\n nextDigest = key\n } catch (error) {\n if (previousDefinition === undefined) definitions.delete(entry.id)\n else definitions.set(entry.id, previousDefinition)\n throw error\n }\n }\n }\n const definition = definitions.get(entry.id)\n const commitGeneration = (): void => { commitStyle(entry.id, styleChange, pendingCss, pendingStyleEtag) }\n if (definition === undefined) throw new Error('mobile extension definition is unavailable')\n if (evaluatedDefinition || !activations.hasActive(entry.id) || activeHostGenerations.get(entry.id) !== entry.generation) {\n if (!await activateDefinition(definition, signal, commitGeneration, entry.generation)) throw new Error('mobile extension activation failed')\n } else {\n if (refreshAborted(signal)) return false\n commitGeneration()\n }\n managedDefinitionIds.add(entry.id)\n if (nextDigest !== undefined) scriptDigests.set(entry.id, nextDigest)\n }\n } catch {\n if (evaluatedDefinition) {\n if (previousDefinition === undefined) definitions.delete(entry.id)\n else definitions.set(entry.id, previousDefinition)\n }\n failClosedExtensionGenerationReplacement(\n hadActiveGeneration,\n previousHostGeneration,\n entry.generation,\n () => { disposeManifestExtension(entry.id) },\n )\n refreshComplete = false\n }\n }\n if (refreshAborted(signal)) return false\n if (refreshComplete) {\n publishAuthoritativeExtensionIds(manifestExtensionIds, seen, managedManifestIdSources(), disposeManifestExtension)\n manifestEtag = nextManifestEtag\n } else manifestEtag = ''\n return refreshComplete\n } catch { return false }\n }\n started = true\n for (const definition of definitions.values()) void activateDefinition(definition)\n const stopRefresh = startLifecycleRefreshScheduler(async signal => {\n await refreshExtensions(signal)\n })\n const stopEvents = startExtensionChangeStream(\n () => { stopRefresh.refresh() },\n undefined,\n payload => {\n // Host-pushed task completion: exact, no guessing. Each completed turn\n // keeps its own notification, and generic text avoids attributing a\n // background task to whichever session happens to be open on the phone.\n if (document.hidden !== true) return\n const parsed = parseTaskNotifyPayload(payload)\n if (parsed === undefined) return\n const language = resolveNativeMobileLanguage(\n document.documentElement.lang,\n navigator.languages.length > 0 ? [...navigator.languages] : [navigator.language],\n )\n const label = (italian: string, english: string, chinese: string): string =>\n language === 'it' ? italian : language === 'zh' ? chinese : english\n fireTaskNotifyEvent({\n kind: 'done',\n title: label('Attività completata', 'Task finished', '任务已完成'),\n body: label('Il tuo task DSH è terminato', 'Your DSH task finished', '你的 DSH 任务已完成'),\n tag: taskCompletionTag(parsed.sessionId, parsed.turn),\n })\n },\n () => { fireDeviceRevoked() },\n )\n return () => { disposed = true; stopEvents(); stopRefresh(); started = false; legacyDispose?.(); legacyDispose = undefined; legacyRoot?.remove(); legacyRoot = undefined; legacyStyle.remove(); activations.dispose(); for (const node of styleNodes.values()) node.remove(); styleNodes.clear(); const layer = document.querySelector('[data-dsh-mobile-extension-layer]'); layer?.remove(); for (const host of document.querySelectorAll('[data-dsh-mobile-surface-host]')) host.remove(); if (previous === undefined) delete window.dshMobile; else window.dshMobile = previous }\n}\n\ninterface LegacyCssState { etag: string; modified: string }\nasync function refreshCssLegacy(style: HTMLStyleElement, signal: AbortSignal, state: LegacyCssState): Promise<boolean> {\n try {\n const headers: Record<string, string> = {}\n if (state.etag !== '') headers['if-none-match'] = state.etag\n if (state.modified !== '') headers['if-modified-since'] = state.modified\n let response = await fetch('/mobile-access/custom.css', { credentials: 'same-origin', cache: 'no-store', headers, signal })\n if (response.status === 304 && style.textContent === '') {\n state.etag = ''\n state.modified = ''\n response = await fetch('/mobile-access/custom.css', { credentials: 'same-origin', cache: 'no-store', signal })\n }\n if (response.status === 304) return true\n if (response.ok) {\n const nextEtag = response.headers.get('etag') ?? ''\n const nextModified = response.headers.get('last-modified') ?? ''\n const css = await response.text()\n if (refreshAborted(signal)) return false\n style.textContent = css\n state.etag = nextEtag\n state.modified = nextModified\n return true\n }\n return false\n } catch { return false }\n}\n\n/** Theme-aware desktop Mobile Access panel styles. */\nexport const CONTROL_STYLES = `\n.dsh-mobile-control{position:fixed;z-index:1000;left:16px;bottom:112px;font:14px/1.45 system-ui;color:var(--dsw-alias-label-primary,#16181d)}\n.dsh-mobile-control__panel{box-sizing:border-box;width:min(380px,calc(100vw - 32px));max-height:calc(100vh - 140px);overflow-y:auto;padding:16px;border:1px solid var(--dsw-alias-border-l2,#e1e5eb);border-radius:18px;background:var(--dsw-alias-bg-layer-2,#fff);box-shadow:0 18px 50px rgb(15 23 42 / 18%)}\n.dsh-mobile-control__header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.dsh-mobile-control__panel h2{margin:0;font-size:17px;line-height:24px}.dsh-mobile-control__header-actions{display:flex;align-items:center;gap:2px}.dsh-mobile-control__update-plugin,.dsh-mobile-control__diagnostic-entry,.dsh-mobile-control__close{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:inherit;cursor:pointer}.dsh-mobile-control__update-plugin,.dsh-mobile-control__diagnostic-entry{padding:0 8px;color:var(--dsw-alias-label-primary-bluish,#2563eb);font:650 12px/1 system-ui;white-space:nowrap}.dsh-mobile-control__update-plugin[hidden]{display:none}.dsh-mobile-control__update-plugin:disabled{cursor:wait;opacity:.55}.dsh-mobile-control__close{font-size:24px;line-height:1}.dsh-mobile-control__update-plugin:hover:not(:disabled),.dsh-mobile-control__diagnostic-entry:hover,.dsh-mobile-control__close:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f3f6)}\n.dsh-mobile-control__release-notice{margin:-2px 0 10px;padding:8px 10px;border-radius:9px;background:var(--dsw-alias-bg-layer-1,#eff6ff);color:var(--dsw-alias-label-primary,#1d4ed8);font-size:11px;line-height:1.45}.dsh-mobile-control__release-notice.is-error{color:var(--dsw-alias-label-primary,#dc2626);border-left:3px solid var(--dsw-alias-state-error-primary,#dc2626)}.dsh-mobile-control__release-notice[hidden]{display:none}.dsh-mobile-control__update-card{margin:0 0 10px;padding:11px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:12px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__update-card[hidden]{display:none}.dsh-mobile-control__update-card-title{margin:0 0 7px;color:var(--dsw-alias-label-primary,#16181d);font:650 13px/1.4 system-ui}.dsh-mobile-control__update-notes{display:block;box-sizing:border-box;max-height:150px;overflow-y:auto;margin:0 0 8px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2,#e1e5eb);border-radius:9px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary,#475569);white-space:pre-wrap;word-break:break-word;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.dsh-mobile-control__update-notes[hidden]{display:none}.dsh-mobile-control__update-notice{margin:0 0 9px;padding:7px 9px;border-radius:8px;background:var(--dsw-alias-state-warn-tertiary,#fff4d6);color:var(--dsw-alias-state-warn-label,#92400e);font-size:11px;line-height:1.5}.dsh-mobile-control__update-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.dsh-mobile-control__update-actions .dsh-mobile-control__primary,.dsh-mobile-control__update-actions .dsh-mobile-control__secondary{min-height:36px;padding:0 12px}.dsh-mobile-control__app-download{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-height:44px;margin:0 0 10px;padding:8px 11px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-1,#f7f8fa);color:var(--dsw-alias-label-primary,#16181d);font:600 12px/1.3 system-ui;text-decoration:none}.dsh-mobile-control__app-download[hidden]{display:none}.dsh-mobile-control__app-download::after{color:var(--dsw-alias-label-primary-bluish,#2563eb);font-size:14px;content:\"↗\"}.dsh-mobile-control__app-download:hover{border-color:#9fb9e8;background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-2,#f5f8ff));color:var(--dsw-alias-label-primary,#1d4ed8)}\n.dsh-mobile-control__switcher{display:grid;grid-template-columns:repeat(2,1fr);gap:4px;margin:0 0 14px;padding:4px;border-radius:12px;background:var(--dsw-alias-bg-layer-1,#f3f5f8)}.dsh-mobile-control__switcher[hidden]{display:none}.dsh-mobile-control__tab{min-height:36px;border:0;border-radius:9px;background:transparent;color:var(--dsw-alias-label-secondary,#606873);font:600 13px/1 system-ui;cursor:pointer}.dsh-mobile-control__tab.is-active{background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);box-shadow:0 1px 3px rgb(15 23 42 / 10%)}.dsh-mobile-control__view[hidden]{display:none}.dsh-mobile-control__intro{margin:0 0 12px;color:var(--dsw-alias-label-secondary,#606873);font-size:12px;line-height:1.55}.dsh-mobile-control__http-frame-warning{box-sizing:border-box;margin:-4px 0 12px;padding:8px 10px;border:1px solid #d6a83f;border-radius:9px;background:var(--dsw-alias-bg-layer-1,#fff7df);color:var(--dsw-alias-label-primary,#694b00);font-size:11px;line-height:1.5;overflow-wrap:anywhere}.dsh-mobile-control__http-frame-warning[hidden]{display:none}.dsh-mobile-control__view.is-remote .dsh-mobile-control__actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dsh-mobile-control__view.is-remote .dsh-mobile-control__actions button[hidden]{display:none}\n.dsh-mobile-control__provider-section{position:relative;margin:0 0 14px}.dsh-mobile-control__section-title{margin:0 0 8px;color:var(--dsw-alias-label-primary,#16181d);font:650 13px/1.4 system-ui}.dsh-mobile-control__provider-section>.dsh-mobile-control__section-title{padding-right:42px}.dsh-mobile-control__provider-choices{display:grid;grid-template-columns:1fr;gap:8px}.dsh-mobile-control__provider{display:flex;min-width:0;flex-direction:column;gap:6px;min-height:94px;padding:10px 11px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color 160ms ease,background-color 160ms ease,box-shadow 160ms ease}.dsh-mobile-control__provider:hover{border-color:#6f96db;background:var(--dsw-alias-interactive-bg-hover-solid,var(--dsw-alias-bg-layer-1,#f8fbff))}.dsh-mobile-control__provider.is-selected{border-color:var(--dsw-alias-label-primary-bluish,#2563eb);background:var(--dsw-alias-interactive-bg-active,var(--dsw-alias-bg-layer-1,#f5f8ff));box-shadow:0 0 0 1px var(--dsw-alias-label-primary-bluish,#2563eb) inset}.dsh-mobile-control__provider:disabled{cursor:wait;opacity:.62}.dsh-mobile-control__provider-top{display:flex;min-width:0;align-items:flex-start;justify-content:space-between;gap:5px}.dsh-mobile-control__provider-top strong{min-width:0;font-size:12px;line-height:1.3}.dsh-mobile-control__provider-badge{flex:none;padding:2px 5px;border-radius:999px;background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary,#1d4ed8);font:650 11px/1.25 system-ui}.dsh-mobile-control__provider-badge.is-cpolar{background:var(--dsw-alias-state-success-tertiary,#eaf8f2);color:var(--dsw-alias-label-primary,#087454)}.dsh-mobile-control__provider-description{color:var(--dsw-alias-label-secondary,#606873);font-size:12px;line-height:1.45}.dsh-mobile-control__provider-info{position:absolute;z-index:5;top:-13px;right:-8px}.dsh-mobile-control__provider-info-button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--dsw-alias-label-secondary,#475569);cursor:pointer;touch-action:manipulation}.dsh-mobile-control__provider-info-button:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f5f9);color:var(--dsw-alias-label-primary-bluish,#2563eb)}.dsh-mobile-control__provider-info-glyph{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:1.5px solid currentColor;border-radius:50%;font:700 12px/1 system-ui}.dsh-mobile-control__provider-info-popover{position:absolute;z-index:6;top:38px;right:4px;box-sizing:border-box;width:min(292px,calc(100vw - 72px));padding:10px 12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:12px;background:var(--dsw-alias-bg-layer-2,#fff);box-shadow:0 10px 28px rgb(15 23 42 / 16%)}.dsh-mobile-control__provider-info-popover[hidden]{display:none}.dsh-mobile-control__provider-info-popover strong,.dsh-mobile-control__provider-info-popover span{display:block}.dsh-mobile-control__provider-info-popover strong{margin-bottom:3px;font-size:12px}.dsh-mobile-control__provider-info-popover span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.55}\n.dsh-mobile-control__self-hosted{margin:8px 0 0;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:12px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__self-hosted-summary{display:flex;box-sizing:border-box;min-height:48px;align-items:center;justify-content:space-between;gap:10px;padding:8px 11px;cursor:pointer;list-style-position:inside}.dsh-mobile-control__self-hosted-summary>span:first-child{display:flex;min-width:0;flex-direction:column;gap:1px}.dsh-mobile-control__self-hosted-summary strong{font-size:11px}.dsh-mobile-control__self-hosted-summary span span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.35}.dsh-mobile-control__provider-badge.is-frp{background:var(--dsw-alias-bg-layer-1,#eef0f3);color:var(--dsw-alias-label-secondary,#475569)}.dsh-mobile-control__self-hosted-body{padding:0 8px 8px}.dsh-mobile-control__provider.is-frp{width:100%;min-height:64px;background:var(--dsw-alias-bg-layer-2,#fff)}\n/* The cloudflared setup section deliberately reuses this card, so\n .dsh-mobile-control__cloudflared-setup is a DOM hook for targeting rather than a\n style rule of its own. */\n.dsh-mobile-control__cpolar-setup{margin:0 0 12px;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__cpolar-setup[hidden],.dsh-mobile-control__cpolar-account[hidden],.dsh-mobile-control__details[hidden],.dsh-mobile-control__view.is-remote .dsh-mobile-control__actions[hidden],.dsh-mobile-control__danger[hidden]{display:none}.dsh-mobile-control__component-status,.dsh-mobile-control__component-note{margin:0 0 10px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.55}.dsh-mobile-control__cpolar-setup>.dsh-mobile-control__primary{width:100%;min-height:44px;padding:9px 12px;border-radius:10px;font:600 12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__cpolar-account{margin-top:10px}.dsh-mobile-control__link-row{display:flex;flex-wrap:wrap;gap:6px 12px;margin:0 0 10px}.dsh-mobile-control__text-link{color:var(--dsw-alias-label-primary-bluish,#2563eb);font-size:11px;text-decoration:none}.dsh-mobile-control__text-link:hover{text-decoration:underline}.dsh-mobile-control__token-label{display:flex;flex-direction:column;gap:5px;margin:0 0 8px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px}.dsh-mobile-control__token{box-sizing:border-box;width:100%;min-height:44px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-3,var(--dsw-alias-bg-layer-2,#fff));color:var(--dsw-alias-label-primary,#16181d);font:16px/1.4 system-ui}.dsh-mobile-control__cpolar-connect{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:44px;padding:10px 14px;border-radius:12px;font:650 13px/1.2 system-ui;cursor:pointer;transition:background-color 160ms ease,border-color 160ms ease,opacity 160ms ease}.dsh-mobile-control__cpolar-connect:hover:not(:disabled){border-color:#1d4ed8;background:#1d4ed8}.dsh-mobile-control__cpolar-connect:active:not(:disabled){border-color:#1e40af;background:#1e40af}.dsh-mobile-control__cpolar-connect:disabled{cursor:wait;opacity:.55}.dsh-mobile-control__details{margin:10px 0 0;border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb);padding-top:9px}.dsh-mobile-control__details>summary{min-height:36px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:30px;cursor:pointer}.dsh-mobile-control__details-body{display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px;padding:4px 0}.dsh-mobile-control__details-body p{flex:1 0 100%;margin:0;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__storage{display:block;flex:1 0 100%;max-width:100%;overflow:hidden;padding:7px 8px;border-radius:8px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-secondary,#475569);font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__danger{flex:1 0 100%;min-height:44px;margin-top:3px;padding:7px 10px;border:1px solid var(--dsw-alias-state-error-primary,#dc2626);border-radius:9px;background:transparent;color:var(--dsw-alias-label-primary,#dc2626);font:12px/1.3 system-ui;cursor:pointer}\n.dsh-mobile-control__danger:hover:not(:disabled),.dsh-mobile-control__device-revoke:hover{background:var(--dsw-alias-interactive-bg-hover-danger,rgb(220 38 38 / 8%))}\n.dsh-mobile-control__frp-setup{margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__frp-setup[hidden]{display:none}.dsh-mobile-control__frp-step{padding:11px 0}.dsh-mobile-control__frp-step + .dsh-mobile-control__frp-step{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__frp-step>strong{display:block;margin-bottom:3px;font-size:12px;line-height:1.4}.dsh-mobile-control__frp-step>p{margin:0 0 9px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__frp-changes{margin:0 0 9px;padding:0;list-style:none;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__frp-changes li{position:relative;margin:0;padding-left:12px}.dsh-mobile-control__frp-changes li+li{margin-top:5px}.dsh-mobile-control__frp-changes li::before{content:\"•\";position:absolute;left:2px;color:var(--dsw-alias-label-tertiary,#98a1ad)}.dsh-mobile-control__frp-step>.dsh-mobile-control__frp-requirement{padding:8px 9px;border-radius:9px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-primary,#384152);font-size:11px}.dsh-mobile-control__frp-fields{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:8px}.dsh-mobile-control__field{display:flex;min-width:0;flex-direction:column;gap:5px;color:var(--dsw-alias-label-secondary,#606873);font-size:11px}.dsh-mobile-control__field:nth-child(3),.dsh-mobile-control__field:nth-child(4){grid-column:1/-1}.dsh-mobile-control__field input{box-sizing:border-box;width:100%;min-height:44px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);font:16px/1.4 system-ui}.dsh-mobile-control__frp-action{box-sizing:border-box;width:100%;min-height:44px;padding:9px 12px;border-radius:10px;font:650 12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__frp-action:disabled{cursor:not-allowed;opacity:.5}.dsh-mobile-control__remote-workspace{margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:15px;background:var(--dsw-alias-bg-layer-1,#f7f8fa)}.dsh-mobile-control__stage-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.dsh-mobile-control__stage-header .dsh-mobile-control__section-title{margin:0}.dsh-mobile-control__stage-meta{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:5px}.dsh-mobile-control__stage-value{max-width:115px;overflow:hidden;color:var(--dsw-alias-label-primary,#16181d);font:650 11px/1.3 system-ui;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__state-badge{flex:none;padding:3px 7px;border-radius:999px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-secondary,#606873);font:650 11px/1.25 system-ui}.dsh-mobile-control__state-badge.is-ready{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsw-alias-label-primary,#087454)}.dsh-mobile-control__state-badge.is-busy{background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary,#1d4ed8)}.dsh-mobile-control__state-badge.is-attention{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsw-alias-label-primary,#935100)}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__status{box-sizing:border-box;margin:0 0 10px;padding:9px 10px;border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);font-size:11px;line-height:1.45}.dsh-mobile-control__provider-setup-body{margin:0 0 10px}.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__cpolar-setup{margin:0}.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__cpolar-setup>.dsh-mobile-control__section-title,.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__frp-setup>.dsh-mobile-control__section-title{display:none}.dsh-mobile-control__provider-setup-body>.dsh-mobile-control__details{margin:0;padding:9px 10px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__actions{margin-top:2px}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__qr{margin:10px 0 0}.dsh-mobile-control__remote-workspace>.dsh-mobile-control__manage-row{margin-top:10px;padding-top:10px;border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}\n.dsh-mobile-control__frp-overview{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:10px;margin:0 0 10px;padding:10px;border:1px solid var(--dsw-alias-state-success-primary,#a9dfc9);border-radius:11px;background:var(--dsw-alias-state-success-tertiary,#edf9f4)}.dsh-mobile-control__frp-overview[hidden]{display:none}.dsh-mobile-control__frp-overview-mark{display:grid;width:32px;height:32px;place-items:center;border-radius:50%;background:#087454;color:#fff;font:700 15px/1 system-ui}.dsh-mobile-control__frp-overview-body{display:flex;min-width:0;flex-direction:column;gap:2px}.dsh-mobile-control__frp-overview-body strong{color:var(--dsw-alias-label-primary,#075d46);font-size:12px;line-height:1.35}.dsh-mobile-control__frp-overview-body span{overflow:hidden;color:var(--dsw-alias-label-secondary,#357061);font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__frp-group{margin:8px 0 0;overflow:hidden;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__frp-group>summary{box-sizing:border-box;min-height:44px;padding:12px 34px 10px 12px;color:var(--dsw-alias-label-primary,#16181d);font:650 12px/1.4 system-ui;cursor:pointer}.dsh-mobile-control__frp-group[open]>summary{border-bottom:1px solid var(--dsw-alias-border-l2,#e1e5eb);background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__frp-group>.dsh-mobile-control__frp-step{padding:12px}.dsh-mobile-control__frp-group>.dsh-mobile-control__frp-step>strong:first-child{display:none}.dsh-mobile-control__frp-group .dsh-mobile-control__frp-step{border-top:0}.dsh-mobile-control__frp-setup>.dsh-mobile-control__frp-step{margin-bottom:8px;padding:10px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:11px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__tunnel{margin:0 0 10px}.dsh-mobile-control__tunnel[hidden]{display:none}\n.dsh-mobile-control__lan-setup{box-sizing:border-box;margin:0 0 12px;padding:14px;border:1px solid #6f96db;border-radius:15px;background:var(--dsw-alias-bg-layer-1,#f5f8ff)}.dsh-mobile-control__lan-setup[hidden],.dsh-mobile-control__lan-setup-form[hidden]{display:none}.dsh-mobile-control__lan-setup>.dsh-mobile-control__section-title{margin-bottom:5px}.dsh-mobile-control__lan-setup>.dsh-mobile-control__intro{margin-bottom:12px}.dsh-mobile-control__lan-setup-form{display:grid;gap:9px}.dsh-mobile-control__lan-setup .dsh-mobile-control__field select{box-sizing:border-box;width:100%;min-height:44px;padding:9px 32px 9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);font:14px/1.4 system-ui}.dsh-mobile-control__lan-setup .dsh-mobile-control__component-note{margin:0}.dsh-mobile-control__lan-setup-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:8px}.dsh-mobile-control__lan-setup-actions button{box-sizing:border-box;min-width:0;min-height:44px;padding:9px 10px;border-radius:10px;font:650 12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__lan-setup-actions button:disabled{cursor:wait;opacity:.55}.dsh-mobile-control__lan-setup>.dsh-mobile-control__status{margin:10px 0 0;line-height:1.5}.dsh-mobile-control__lan-setup>.dsh-mobile-control__status:empty{display:none}\n.dsh-mobile-control__access{display:flex;align-items:baseline;gap:6px;min-width:0;margin:0 0 12px}.dsh-mobile-control__access[hidden]{display:none}.dsh-mobile-control__access-label{flex:none;color:var(--dsw-alias-label-secondary,#606873);white-space:nowrap}.dsh-mobile-control__access-label::after{content:\":\"}.dsh-mobile-control__access-link{min-width:0;overflow:hidden;color:var(--dsw-alias-label-primary-bluish,#2563eb);text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__access-link:hover{text-decoration:underline}.dsh-mobile-control__qr{display:flex;justify-content:center;margin:0 0 12px}.dsh-mobile-control__qr[hidden]{display:none}.dsh-mobile-control__qr img{border-radius:12px;background:#fff;padding:8px}\n.dsh-mobile-control__status{margin:0 0 14px;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary,#606873)}.dsh-mobile-control__status::before{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:var(--dsw-alias-label-tertiary,#98a1ad);content:\"\"}.dsh-mobile-control__status.is-running::before{background:var(--dsw-alias-state-success-primary,#16a36a)}.dsh-mobile-control__status.is-key{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;word-break:break-all}\n.dsh-mobile-control__guide{margin:0 0 14px;padding:12px;border:1px solid #6f96db;border-radius:12px;background:var(--dsw-alias-bg-layer-1,#eff6ff)}.dsh-mobile-control__guide[hidden]{display:none}.dsh-mobile-control__guide-title{margin:0;color:var(--dsw-alias-label-primary,#172554);font:650 13px/1.45 system-ui}.dsh-mobile-control__guide-summary,.dsh-mobile-control__guide-note{margin:4px 0 0;color:var(--dsw-alias-label-secondary,#475569);font-size:12px;line-height:1.5}.dsh-mobile-control__guide-steps{margin:8px 0 0;padding-left:20px;color:var(--dsw-alias-label-primary,#1e293b);font-size:12px;line-height:1.6}.dsh-mobile-control__guide-note{color:var(--dsw-alias-label-secondary,#64748b)}.dsh-mobile-control__guide-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.dsh-mobile-control__guide-actions button{min-width:0;min-height:44px;padding:8px;border-radius:10px;font:12px/1.25 system-ui;cursor:pointer}.dsh-mobile-control__guide-actions button:disabled{cursor:not-allowed;opacity:.45}\n.dsh-mobile-control__extensions{margin:0 0 12px;color:var(--dsw-alias-label-secondary,#606873);font-size:12px}\n.dsh-mobile-control__view.is-diagnostics{--dsh-diagnostic-ok:var(--dsw-alias-state-success-primary,#087454);--dsh-diagnostic-warning:var(--dsw-alias-state-warn-primary,#a35b00);--dsh-diagnostic-error:var(--dsw-alias-state-error-primary,#c62828);--dsh-diagnostic-info:var(--dsw-alias-label-secondary,#526071)}.dsh-mobile-control__diagnostic-summary{box-sizing:border-box;margin:0;padding:13px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:16px;background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__diagnostic-summary-main{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:11px}.dsh-mobile-control__diagnostic-summary-icon{position:relative;display:block;width:36px;height:36px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#e8edf3);color:var(--dsh-diagnostic-info)}.dsh-mobile-control__diagnostic-summary-icon::before,.dsh-mobile-control__diagnostic-summary-icon::after{position:absolute;content:\"\"}.dsh-mobile-control__diagnostic-summary-body{display:flex;min-width:0;flex-direction:column;gap:2px}.dsh-mobile-control__diagnostic-summary-body strong{font-size:13px;line-height:1.35}.dsh-mobile-control__diagnostic-summary-body span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5}.dsh-mobile-control__diagnostic-summary-meta{display:block;margin-top:11px;padding-top:9px;border-top:1px solid var(--dsw-alias-border-l2,#dbe1e8);color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.45}.dsh-mobile-control__diagnostic-summary.is-ok .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsh-diagnostic-ok)}.dsh-mobile-control__diagnostic-summary.is-ok .dsh-mobile-control__diagnostic-summary-icon::before{top:10px;left:10px;width:13px;height:7px;border-bottom:2px solid currentColor;border-left:2px solid currentColor;transform:rotate(-45deg)}.dsh-mobile-control__diagnostic-summary.is-attention .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsh-diagnostic-warning)}.dsh-mobile-control__diagnostic-summary.is-error .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-error-secondary,#fdecec);color:var(--dsh-diagnostic-error)}.dsh-mobile-control__diagnostic-summary.is-attention .dsh-mobile-control__diagnostic-summary-icon::before,.dsh-mobile-control__diagnostic-summary.is-error .dsh-mobile-control__diagnostic-summary-icon::before{top:8px;left:17px;width:2px;height:13px;border-radius:2px;background:currentColor}.dsh-mobile-control__diagnostic-summary.is-attention .dsh-mobile-control__diagnostic-summary-icon::after,.dsh-mobile-control__diagnostic-summary.is-error .dsh-mobile-control__diagnostic-summary-icon::after{bottom:8px;left:17px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-summary.is-running .dsh-mobile-control__diagnostic-summary-icon{background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary-bluish,#2563eb)}.dsh-mobile-control__diagnostic-summary.is-running .dsh-mobile-control__diagnostic-summary-icon::before{inset:9px;border:2px solid rgb(37 99 235 / 24%);border-top-color:currentColor;border-radius:50%;animation:dsh-diagnostic-spin .8s linear infinite}\n.dsh-mobile-control__diagnostic-summary.is-idle .dsh-mobile-control__diagnostic-summary-icon::before{top:8px;left:17px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-summary.is-idle .dsh-mobile-control__diagnostic-summary-icon::after{top:13px;left:17px;width:2px;height:11px;border-radius:2px;background:currentColor}\n.dsh-mobile-control__diagnostic-toolbar{display:grid;grid-template-columns:1fr;gap:8px;margin-top:10px}.dsh-mobile-control__diagnostic-toolbar.has-report{grid-template-columns:1fr 1fr}.dsh-mobile-control__diagnostic-run,.dsh-mobile-control__diagnostic-copy{box-sizing:border-box;width:100%;min-height:44px;padding:9px 10px;border-radius:11px;font:650 12px/1.3 system-ui;cursor:pointer;touch-action:manipulation}.dsh-mobile-control__diagnostic-copy[hidden]{display:none}.dsh-mobile-control__diagnostic-run:disabled{cursor:wait;opacity:.58}.dsh-mobile-control__diagnostic-feedback{margin:8px 0 0;padding:8px 10px;border-radius:9px;background:var(--dsw-alias-state-business-tertiary,#eff6ff);color:var(--dsw-alias-label-primary,#1d4ed8);font-size:11px;line-height:1.45}.dsh-mobile-control__diagnostic-feedback[hidden]{display:none}\n.dsh-mobile-control__diagnostic-checks{display:grid;gap:12px;margin-top:12px;animation:dsh-diagnostic-reveal 160ms ease-out both}.dsh-mobile-control__diagnostic-checks[hidden]{display:none}.dsh-mobile-control__diagnostic-group{overflow:hidden;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__diagnostic-group-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-bottom:1px solid var(--dsw-alias-border-l2,#e1e5eb);background:var(--dsw-alias-bg-layer-1,#f8fafc)}.dsh-mobile-control__diagnostic-group-header h3{margin:0;font:650 11px/1.4 system-ui}.dsh-mobile-control__diagnostic-group-header span{color:var(--dsw-alias-label-secondary,#606873);font-size:11px}.dsh-mobile-control__diagnostic-list{display:flex;flex-direction:column}.dsh-mobile-control__diagnostic-check{display:grid;grid-template-columns:26px minmax(0,1fr);gap:9px;padding:11px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__diagnostic-check + .dsh-mobile-control__diagnostic-check{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__diagnostic-marker{position:relative;width:26px;height:26px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#edf1f5);color:var(--dsh-diagnostic-info)}.dsh-mobile-control__diagnostic-marker::before,.dsh-mobile-control__diagnostic-marker::after{position:absolute;content:\"\"}.dsh-mobile-control__diagnostic-check.is-ok .dsh-mobile-control__diagnostic-marker{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsh-diagnostic-ok)}.dsh-mobile-control__diagnostic-check.is-ok .dsh-mobile-control__diagnostic-marker::before{top:7px;left:7px;width:9px;height:5px;border-bottom:1.8px solid currentColor;border-left:1.8px solid currentColor;transform:rotate(-45deg)}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-marker{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsh-diagnostic-warning)}.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-marker{background:var(--dsw-alias-state-error-secondary,#fdecec);color:var(--dsh-diagnostic-error)}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-marker::before,.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-marker::before{top:6px;left:12px;width:2px;height:9px;border-radius:2px;background:currentColor}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-marker::after,.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-marker::after{bottom:6px;left:12px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-check.is-info .dsh-mobile-control__diagnostic-marker::before{top:6px;left:12px;width:2px;height:2px;border-radius:50%;background:currentColor}.dsh-mobile-control__diagnostic-check.is-info .dsh-mobile-control__diagnostic-marker::after{top:10px;left:12px;width:2px;height:9px;border-radius:2px;background:currentColor}.dsh-mobile-control__diagnostic-check-body{min-width:0}.dsh-mobile-control__diagnostic-check-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.dsh-mobile-control__diagnostic-check-header strong{min-width:0;font-size:12px;line-height:1.4}.dsh-mobile-control__diagnostic-badge{flex:none;padding:2px 6px;border-radius:999px;background:var(--dsw-alias-bg-layer-1,#edf1f5);color:var(--dsh-diagnostic-info);font:650 11px/1.3 system-ui}.dsh-mobile-control__diagnostic-check.is-ok .dsh-mobile-control__diagnostic-badge{background:var(--dsw-alias-state-success-tertiary,#e6f7f0);color:var(--dsh-diagnostic-ok)}.dsh-mobile-control__diagnostic-check.is-warning .dsh-mobile-control__diagnostic-badge{background:var(--dsw-alias-state-warn-tertiary,#fff4dc);color:var(--dsh-diagnostic-warning)}.dsh-mobile-control__diagnostic-check.is-error .dsh-mobile-control__diagnostic-badge{background:var(--dsw-alias-state-error-secondary,#fdecec);color:var(--dsh-diagnostic-error)}.dsh-mobile-control__diagnostic-check p{margin:4px 0 0;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;line-height:1.5;overflow-wrap:anywhere}.dsh-mobile-control__diagnostic-check .dsh-mobile-control__diagnostic-action{margin-top:7px;padding:7px 8px;border-radius:8px;background:var(--dsw-alias-bg-layer-1,#f8fafc);color:var(--dsw-alias-label-primary,#16181d)}.dsh-mobile-control__diagnostic-action span{display:inline-block;margin-right:6px;color:var(--dsw-alias-label-primary-bluish,#2563eb);font-weight:700}.dsh-mobile-control__diagnostic-details{margin-top:12px}.dsh-mobile-control__diagnostic-details[hidden]{display:none}.dsh-mobile-control__diagnostic-details>summary{box-sizing:border-box;min-height:44px;line-height:44px}.dsh-mobile-control__diagnostic-report{box-sizing:border-box;max-height:220px;margin:4px 0 0;overflow:auto;padding:10px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:10px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-secondary,#606873);font:11px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}\n.dsh-mobile-control__diagnostic-checks{transition:opacity 150ms ease}.dsh-mobile-control__diagnostic-checks.is-refreshing{opacity:.52}\n@keyframes dsh-diagnostic-spin{to{transform:rotate(360deg)}}@keyframes dsh-diagnostic-reveal{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}\n.dsh-mobile-control__actions{display:flex;flex-wrap:nowrap;gap:6px}.dsh-mobile-control__actions[hidden],.dsh-mobile-control__manage-row[hidden]{display:none}.dsh-mobile-control__actions button{flex:1 1 0;min-width:0;min-height:44px;padding:8px 4px;border-radius:10px;font:12px/1.2 system-ui;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dsh-mobile-control__secondary{border:1px solid var(--dsw-alias-border-l3,#cfd5dd);background:transparent;color:inherit}.dsh-mobile-control__primary{border:1px solid #2563eb;background:#2563eb;color:#fff}.dsh-mobile-control__actions button:disabled{cursor:not-allowed;opacity:.45}\n.dsh-mobile-control button:focus-visible,.dsh-mobile-control a:focus-visible,.dsh-mobile-control input:focus-visible,.dsh-mobile-control select:focus-visible,.dsh-mobile-control summary:focus-visible{outline:3px solid rgb(37 99 235 / 28%);outline-offset:2px}\n/* 42px matches the DSH sidebar footer row; it is not one of the panel target tiers. */\n.dsh-mobile-control__trigger{box-sizing:border-box;flex:1 1 auto;display:flex;align-items:center;gap:8px;width:100%;height:42px;margin:4px 0;padding:0 10px 0 8px;border:0;border-radius:12px;background:transparent;color:var(--dsw-alias-label-primary,#16181d);font-family:inherit;font-size:14px;line-height:22px;cursor:pointer;overflow:hidden}.dsh-mobile-control__trigger:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f3f6)}.dsh-mobile-control__trigger:active,.dsh-mobile-control__trigger[aria-expanded=\"true\"]{background:var(--dsw-alias-interactive-bg-active,#e8ebf0)}.dsh-mobile-control__trigger:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px}.dsh-mobile-control__trigger.is-rail{flex:0 0 auto;width:36px;height:36px;margin:8px 0 10px;padding:0;justify-content:center;gap:0;border-radius:50%}.dsh-mobile-control__trigger-icon{display:block;flex:none}.dsh-mobile-control__trigger-label{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n.dsh-mobile-control__manage-row{display:flex;justify-content:space-between;gap:8px;margin-top:10px}.dsh-mobile-control__manage{flex:1 1 0;min-width:0;min-height:36px;padding:6px 8px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:transparent;color:inherit;font:12px/1.3 system-ui;cursor:pointer}.dsh-mobile-control__devices{margin-top:10px;border:1px solid var(--dsw-alias-border-l2,#e1e5eb);border-radius:10px;padding:8px;max-height:220px;overflow-y:auto}.dsh-mobile-control__device-empty{color:var(--dsw-alias-label-secondary,#606873);font-size:12px;margin:0}.dsh-mobile-control__device{display:flex;align-items:center;gap:8px;padding:6px 2px}.dsh-mobile-control__device + .dsh-mobile-control__device{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__device-label{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.dsh-mobile-control__device-meta{flex:none;color:var(--dsw-alias-label-secondary,#606873);font-size:11px;white-space:nowrap}.dsh-mobile-control__device-revoke{flex:none;min-height:36px;padding:4px 8px;border:1px solid var(--dsw-alias-state-error-primary,#dc2626);border-radius:8px;background:transparent;color:var(--dsw-alias-label-primary,#dc2626);font:12px/1.2 system-ui;cursor:pointer}.dsh-mobile-control__ws-paths{margin:10px 0 0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__ws-paths-list{margin:0 0 8px;padding:0;list-style:none}.dsh-mobile-control__ws-paths-empty{color:var(--dsw-alias-label-secondary,#606873);font-size:12px}.dsh-mobile-control__ws-paths-item{display:flex;align-items:center;gap:8px;padding:6px 0}.dsh-mobile-control__ws-paths-item + .dsh-mobile-control__ws-paths-item{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__ws-paths-item code{flex:1 1 0;min-width:0;overflow:hidden;font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap}.dsh-mobile-control__ws-paths-remove{flex:none;min-height:36px;padding:4px 8px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:8px;background:transparent;color:inherit;font:12px/1.2 system-ui;cursor:pointer}.dsh-mobile-control__trigger,.dsh-mobile-control__diagnostic-entry{position:relative}.dsh-mobile-control__ws-dot{position:absolute;top:2px;right:2px;z-index:1;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--dsw-alias-state-error-primary,#dc2626);color:#fff;font:650 11px/16px system-ui;text-align:center;cursor:pointer}.dsh-mobile-control__ws-dot::after{content:'';position:absolute;inset:-5px}.dsh-mobile-control__ws-sr-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.dsh-mobile-control__ws-paths-row{display:flex;gap:8px}.dsh-mobile-control__ws-paths-row .dsh-mobile-control__primary{width:auto;flex:none;padding:9px 14px;border-radius:10px}.dsh-mobile-control__ws-paths-group{padding:6px 0}.dsh-mobile-control__ws-paths-group + .dsh-mobile-control__ws-paths-group{border-top:1px solid var(--dsw-alias-border-l2,#e1e5eb)}.dsh-mobile-control__ws-paths-group-head{display:flex;align-items:center;gap:8px}.dsh-mobile-control__ws-count{flex:none;padding:1px 7px;border-radius:999px;background:var(--dsw-alias-state-business-tertiary,#e8f0ff);color:var(--dsw-alias-label-primary,#1d4ed8);font:650 11px/1.6 system-ui}.dsh-mobile-control__ws-paths-item.is-child{padding-left:12px}.dsh-mobile-control__ws-paths-group-head .dsh-mobile-control__primary,.dsh-mobile-control__ws-paths-item .dsh-mobile-control__primary{width:auto;flex:none;min-height:36px;padding:6px 12px;border-radius:10px}.dsh-mobile-control__ws-paths-row input{flex:1 1 0;min-width:0;box-sizing:border-box;min-height:44px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l3,#cfd5dd);border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);color:var(--dsw-alias-label-primary,#16181d);font:16px/1.4 system-ui}.dsh-mobile-control__ws-paths-row button{flex:none}.dsh-mobile-control__ws-paths-detected-title{margin:0 0 2px;font:600 12px/1.4 system-ui}.dsh-mobile-control__ws-paths-advanced{margin-top:8px}.dsh-mobile-control__ws-paths-advanced summary{cursor:pointer;color:var(--dsw-alias-label-secondary,#606873);font:12px/1.4 system-ui;user-select:none}.dsh-mobile-control__ws-paths-advanced summary:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px;border-radius:4px}.dsh-mobile-control__ws-paths-advanced[open] summary{margin-bottom:6px}.dsh-mobile-control__ws-paths-advanced .dsh-mobile-control__status{margin:6px 0 0}\n@media (max-width:359px){.dsh-mobile-control__provider{min-height:68px}}@media (prefers-reduced-motion:reduce){.dsh-mobile-control__provider,.dsh-mobile-control__cpolar-connect{transition:none}.dsh-mobile-control__diagnostic-summary.is-running .dsh-mobile-control__diagnostic-summary-icon::before,.dsh-mobile-control__diagnostic-checks{animation:none}}\n\n.dsh-mobile-control__origin-setup{margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l2,#dbe1e8);border-radius:13px;background:var(--dsw-alias-bg-layer-2,#fff)}.dsh-mobile-control__origin-setup[hidden],.dsh-mobile-control__origin-backend[hidden],.dsh-mobile-control__origin-feedback[hidden]{display:none}.dsh-mobile-control__origin-fields{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:12px}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field{font-size:12px}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(1),.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(4){grid-column:1/-1}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(2){grid-column:1}.dsh-mobile-control__origin-fields>.dsh-mobile-control__field:nth-child(3){grid-column:2}.dsh-mobile-control__origin-warning{margin:12px 0;padding:10px 12px;border-left:3px solid var(--dsw-alias-state-warn-primary,#a56810);border-radius:4px;background:var(--dsw-alias-bg-layer-1,#f3f5f8);color:var(--dsw-alias-label-primary,#384152);font-size:12px;line-height:1.6}.dsh-mobile-control__origin-feedback{font-size:12px;line-height:1.6;overflow-wrap:anywhere}.dsh-mobile-control__origin-feedback.is-error{color:var(--dsw-alias-state-error-primary,#bc3030)}.dsh-mobile-control__origin-fields input[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary,#bc3030)}.dsh-mobile-control__origin-backend{display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#dbe1e8)}.dsh-mobile-control__origin-backend button{align-self:flex-start;min-height:44px}.dsh-mobile-control__self-hosted-body .is-origin{margin-top:8px}\n`\n\n/** Mount the desktop control or mobile feature enhancements. */\nexport function apply(ctx: ClientContext): void {\n ctx.effect(() => {\n if (window.__DSH_MOBILE_FRONTEND__ !== 'dedicated') return\n return trustAuthenticatedGatewayConnection(ctx.get('connection'))\n }, 'dsh-mobile: authenticated gateway client trust')\n\n ctx.effect(() => {\n const desktopAdmin = isDesktopAdminSurface(location.hostname, location.search, window.__DSH_MOBILE_FRONTEND__)\n const style = element('style'); style.dataset.plugin = 'dsh-mobile'; style.textContent = desktopAdmin\n ? CONTROL_STYLES\n : NATIVE_MOBILE_STYLES\n document.head.append(style)\n if (!desktopAdmin) {\n const removeSettingsAction = ctx.slots.inject('settings.general.item', () => ctx.slots.register({\n name: 'settings.general.item',\n id: 'dsh-mobile-switch-computer',\n order: 100,\n }, MobileSwitchComputerRow))\n const removeCustom = installCustomAssets()\n const removeSurface = installDshLanguageBoundSurface(installNativeMobileSurface)\n return () => { removeSettingsAction(); removeCustom(); removeSurface(); style.remove() }\n }\n const removeControl = installDshLanguageBoundSurface(() => {\n const control = installControl()\n const triggerLocale = selectedMobileControlLocale()\n const t = controlTranslator(triggerLocale)\n const disposeSlot = ctx.slots.inject('sidebar.footer.action', () => ctx.slots.register<{ wide: boolean }>({ name: 'sidebar.footer.action', id: 'dsh-mobile' }, ({ wide }) => createElement('button', {\n 'aria-expanded': control.isOpen(),\n 'aria-controls': CONTROL_PANEL_ID,\n 'aria-label': t('mobileAccess'),\n className: `dsh-mobile-control__trigger${wide ? '' : ' is-rail'}`,\n lang: triggerLocale,\n type: 'button',\n title: t('mobileAccess'),\n onClick: control.toggle,\n }, createElement('svg', {\n 'aria-hidden': true,\n className: 'dsh-mobile-control__trigger-icon',\n focusable: false,\n width: wide ? 16 : 18,\n height: wide ? 16 : 18,\n viewBox: '0 0 16 16',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 1.5,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n }, createElement('rect', { x: 4, y: 1, width: 8, height: 14, rx: 2 }), createElement('path', { d: 'M7 12h2' })), wide ? createElement('span', { className: 'dsh-mobile-control__trigger-label' }, t('mobileAccess')) : undefined)))\n return () => { disposeSlot(); control.remove() }\n })\n return () => { removeControl(); style.remove() }\n }, 'dsh-mobile: stock mobile adaptation and local control')\n}\n\n/** Client services required by the mobile adaptation. */\nexport const inject: readonly string[] = ['slots']\n"],"mappings":";;;;;;;;EAEA,MAAa,0BAA0B;GACrC,IAAI;IACF,cAAc;IAAiB,sBAAsB;IAA0B,iBAAiB;IAA+B,wBAAwB;IAA4C,qBAAqB;IAAwD,4BAA4B;IAAwD,cAAc;IAAiB,kBAAkB;IAAmC,gBAAgB;IAAa,sBAAsB;IAAmD,oBAAoB;IAA0B,UAAU;IAAwB,cAAc;IAA8J,kBAAkB;IAA+F,WAAW;IAAc,aAAa;IACj7B,KAAK;IAAiB,QAAQ;IAAU,WAAW;IAAwB,cAAc;IAAiB,eAAe;IAAkB,eAAe;IAAkB,eAAe;IAAmB,qBAAqB;IACnO,iBAAiB;IAAyB,cAAc;IAAqB,qBAAqB;IAAyB,iBAAiB;IAAqB,WAAW;IAC5K,aAAa;IAAqH,kBAAkB;IAAsI,gBAAgB;IAA4B,iBAAiB;IAAsB,gBAAgB;IAAO,uBAAuB;IAAc,sBAAsB;IAAmB,kBAAkB;IAA2D,mBAAmB;IAA4B,mBAAmB;IAAwB,kBAAkB;IAC3oB,SAAS;IAAY,mBAAmB;IAA+B,sBAAsB;IAA0H,mBAAmB;IAC1O,eAAe;IAAkB,mBAAmB;IAAuB,iBAAiB;IAA8B,mBAAmB;IAA6J,gBAAgB;IAAwB,eAAe;IAA+B,kBAAkB;IAA0B,aAAa;IAAoB,QAAQ;IAAW,kBAAkB;IAAgC,sBAAsB;IAA6L,wBAAwB;IAA4B,kBAAkB;IAA0B,OAAO;IAAoB,aAAa;IAAwD,eAAe;IAAwB,mBAAmB;IAC/9B,iBAAiB;IAAoC,kBAAkB;IAAgC,oBAAoB;IAAsH,aAAa;IAAiE,aAAa;IAA4D,aAAa;IAAgE,iBAAiB;IAAuD,gBAAgB;IAAiC,UAAU;IACxlB,cAAc;IAAw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