From 9b3a047f03667f90dcb935810145445560dec865 Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Sun, 2 Aug 2026 23:03:41 +0100 Subject: [PATCH 1/3] feat(web): bidirectional message channel between page and background worker Adds free-form two-way messaging between the app and the background worker, complementing request/response task execution: - WorkerProtocol: new 'message' (page -> worker) and 'workerMessage' (worker -> page) wire types - WorkmanagerExecution: messageHandler + sendToPage hooks on the Flutter-free dispatcher side - WorkmanagerWebWorker runtime: routes messages and wires sendToPage for both the dedicated Web Worker (postMessage) and the Service Worker (clients.postMessage) - WorkmanagerWeb: sendMessageToWorker() + workerMessages stream, including the in-page fallback path The web example demonstrates the channel with a live worker chat and a simulated price-watch use case (watch/stop/check messages, live ticks, and background task checks). Rebuilt web/background.dart.js. --- example/README.md | 32 + example/lib/web/background_tasks.dart | 149 +- example/lib/web/web_demo_page.dart | 258 +- example/web/background.dart.js | 3636 +++++++++-------- workmanager_web/README.md | 46 +- workmanager_web/lib/execution.dart | 30 + workmanager_web/lib/src/worker_protocol.dart | 43 + .../lib/src/worker_runtime_web.dart | 55 + workmanager_web/lib/workmanager_web.dart | 57 +- workmanager_web/test/execution_test.dart | 20 + .../test/web_worker_integration_test.dart | 32 + .../test/worker_protocol_test.dart | 55 + 12 files changed, 2749 insertions(+), 1664 deletions(-) diff --git a/example/README.md b/example/README.md index d667478e..fe9c2fb4 100644 --- a/example/README.md +++ b/example/README.md @@ -61,3 +61,35 @@ The demo includes practical examples: ## Documentation For detailed guides and real-world use cases, visit: **[docs.page/fluttercommunity/flutter_workmanager →](https://docs.page/fluttercommunity/flutter_workmanager)** + +## Web Demo (experimental) + +Run `flutter run -d chrome` (or `flutter build web` and serve over HTTPS or +localhost) to get the web-only demo. It demonstrates the experimental +`workmanager_web` package: + +- **Background tasks in a Web Worker** — register one-off / periodic tasks + and watch them execute off the main thread (the UI stays responsive while + the task's CPU loop runs). +- **Worker chat** — a two-way `postMessage` conversation between the page and + the background worker (suggestions: watch a simulated BTC/ETH price, stop + the watch, or run an on-demand background check). Replies arrive on + `WorkmanagerWeb.workerMessages`; the same pattern applies to real data. +- **Service Worker execution** — install the PWA, trigger Periodic Background + Sync from DevTools, close the page, trigger it again and reopen: the task + ran inside the Service Worker (compiled Dart dispatcher) and the result is + replayed from IndexedDB into the event log. + +The background handler lives in `lib/web/background_tasks.dart` — a +Flutter-free file compiled with plain `dart compile js` into +`web/background.dart.js` (see `tool/build_web_background.sh`). Prices in the +demo are simulated so it works offline; swap `_simulatedPrice()` for a real +fetch to see the same pattern with live data. + +## Key Files + +- `lib/main.dart` - Main app with task scheduling UI +- `lib/web/` - Web-only demo (Flutter-free dispatcher, worker chat, PWA install glue) +- `lib/callback_dispatcher.dart` - Background task execution logic +- `ios/Runner/AppDelegate.swift` - iOS background task registration +- `ios/Runner/Info.plist` - iOS background modes configuration diff --git a/example/lib/web/background_tasks.dart b/example/lib/web/background_tasks.dart index 07d9adbf..dc366768 100644 --- a/example/lib/web/background_tasks.dart +++ b/example/lib/web/background_tasks.dart @@ -7,6 +7,8 @@ // `web/background.dart.js` and executed both by the in-page Web Worker and by // the Service Worker, neither of which can run the Flutter engine. +import 'dart:async'; + import 'package:workmanager_web/execution.dart'; /// Dispatcher used on the web: wired into the compiled worker bundle @@ -15,17 +17,139 @@ import 'package:workmanager_web/execution.dart'; @pragma('vm:entry-point') void webCallbackDispatcher() { WorkmanagerExecution.instance.executeTask(handleWebBackgroundTask); + WorkmanagerExecution.instance.messageHandler = handleWorkerMessage; +} + +// --------------------------------------------------------------------------- +// Use case: a tiny "price watch". +// +// The demo simulates a market feed so it stays self-contained (no network, no +// API key). The same shape applies to any real background work: +// +// * the page sends a message to the worker -> messageHandler runs in the +// Web Worker (off the main thread), +// * the worker pushes updates back -> sendToPage surfaces them on +// `WorkmanagerWeb.workerMessages`, +// * background tasks (also while the page is closed, via the Service Worker) +// run the same handler and their results are replayed into the event log. +// --------------------------------------------------------------------------- + +/// Base prices per ticker, in USD. Simulated. +const Map _basePrices = { + 'btc': 60000, + 'eth': 2500, + 'ada': 0.60, +}; + +Timer? _watchTimer; + +/// Handler for free-form messages sent by the page with +/// `WorkmanagerWeb().sendMessageToWorker(...)`. +/// +/// Messages: +/// * `{'op': 'watch', 'ticker': 'btc', 'threshold': 58000}` — start pushing +/// simulated prices every few seconds; stops itself when the price drops +/// below [threshold]. +/// * `{'op': 'stop'}` — stop the current watch. +void handleWorkerMessage(Object? payload) { + if (payload is! Map) { + return; + } + final op = payload['op']; + switch (op) { + case 'watch': + final ticker = (payload['ticker'] as String?)?.toLowerCase() ?? 'btc'; + final threshold = (payload['threshold'] as num?)?.toDouble(); + _watchTimer?.cancel(); + _post({ + 'kind': 'watching', + 'ticker': ticker, + 'threshold': threshold, + }); + _postTick(ticker, threshold); + _watchTimer = Timer.periodic( + const Duration(seconds: 3), + (_) => _postTick(ticker, threshold), + ); + case 'stop': + _watchTimer?.cancel(); + _watchTimer = null; + _post({'kind': 'stopped'}); + case 'check': + // One-off background check on demand (same logic as the task path). + final ticker = (payload['ticker'] as String?)?.toLowerCase() ?? 'btc'; + final threshold = (payload['threshold'] as num?)?.toDouble(); + _post({'kind': 'task-start', 'ticker': ticker}); + final price = _simulatedPrice(ticker); + final below = threshold != null && price < threshold; + _post({ + 'kind': 'task-done', + 'ticker': ticker, + 'price': price, + 'below': below, + }); + case 'text': + _post({'kind': 'echo', 'text': payload['text']}); + } +} + +void _postTick(String ticker, double? threshold) { + final price = _simulatedPrice(ticker); + final below = threshold != null && price < threshold; + _post({ + 'kind': below ? 'alert' : 'tick', + 'ticker': ticker, + 'price': price, + 'threshold': threshold, + }); + if (below) { + _watchTimer?.cancel(); + _watchTimer = null; + } +} + +/// Sends a free-form message back to the page (if a page is reachable). +void _post(Object? payload) { + WorkmanagerExecution.instance.sendToPage?.call(payload); +} + +/// Deterministic, time-varying simulated price: stable within a 30s bucket so +/// consecutive ticks change, but the demo never needs the network. +double _simulatedPrice(String ticker) { + final base = _basePrices[ticker] ?? 100.0; + final bucket = DateTime.now().millisecondsSinceEpoch ~/ 30000; + final hash = _hash('$ticker:$bucket'); + final wiggle = (hash % 1000) / 1000 * 0.10 - 0.05; // ±5% + return base * (1 + wiggle); +} + +int _hash(String input) { + var hash = 0; + for (final codeUnit in input.codeUnits) { + hash = (hash * 31 + codeUnit) & 0x7fffffff; + } + return hash; } /// Pure-Dart background task handler. /// -/// The result is recorded by the runtime: when the page is open it appears in -/// the status panel immediately; when the Service Worker ran the task while -/// the page was closed, it is replayed on the next page load. +/// With `inputData['ticker']` it behaves like a background "price check": +/// it pushes progress messages to the page while running and returns the +/// price + alert state as the task result. The result is recorded by the +/// runtime: when the page is open it appears in the status panel immediately; +/// when the Service Worker ran the task while the page was closed, it is +/// replayed on the next page load. Future handleWebBackgroundTask( String taskName, Map? inputData, ) async { + final input = inputData; + if (input != null && input['fail'] == true) { + return false; + } + final ticker = (input?['ticker'] as String?)?.toLowerCase() ?? 'btc'; + final threshold = (input?['threshold'] as num?)?.toDouble(); + // A small CPU loop so the Web Worker's parallel execution is observable: // the UI stays responsive while this runs off the main thread. // ignore: unused_local_variable @@ -33,6 +157,21 @@ Future handleWebBackgroundTask( for (var i = 0; i < 2000000; i++) { checksum += i; } - final input = inputData; - return input != null && input['fail'] == true ? false : true; + + _post({ + 'kind': 'task-start', + 'ticker': ticker, + 'threshold': threshold, + }); + final price = _simulatedPrice(ticker); + final below = threshold != null && price < threshold; + _post({ + 'kind': 'task-done', + 'ticker': ticker, + 'price': price, + 'below': below, + }); + // The task result itself stays a plain success/failure bool; the price + // detail is delivered via the chat messages above. + return true; } diff --git a/example/lib/web/web_demo_page.dart b/example/lib/web/web_demo_page.dart index ee862131..d36ab1b1 100644 --- a/example/lib/web/web_demo_page.dart +++ b/example/lib/web/web_demo_page.dart @@ -13,7 +13,8 @@ const String _periodicTask = 'dev.fluttercommunity.workmanagerExample.webPeriodic'; /// Web-only demo: registers tasks through [WorkmanagerWeb], shows a live -/// background-execution log and offers a PWA install button so Periodic +/// background-execution log and a two-way "worker chat" (page <-> background +/// worker via postMessage), and offers a PWA install button so Periodic /// Background Sync can be tested. class WebDemoApp extends StatelessWidget { const WebDemoApp({super.key}); @@ -36,6 +37,8 @@ class WebDemoPage extends StatefulWidget { class _WebDemoPageState extends State { final List _events = []; + final List<_ChatLine> _chat = <_ChatLine>[]; + final TextEditingController _messageController = TextEditingController(); bool _initializing = true; @override @@ -43,9 +46,16 @@ class _WebDemoPageState extends State { super.initState(); InstallGlue.listen(); WorkmanagerWeb().backgroundEvents.listen(_onEvent); + WorkmanagerWeb().workerMessages.listen(_onWorkerMessage); _initialize(); } + @override + void dispose() { + _messageController.dispose(); + super.dispose(); + } + Future _initialize() async { await WorkmanagerWeb().initialize( webCallbackDispatcher, @@ -63,11 +73,42 @@ class _WebDemoPageState extends State { setState(() => _events.insert(0, event)); } + void _onWorkerMessage(Object? payload) { + if (!mounted) { + return; + } + setState(() { + _chat.add(_ChatLine(text: _formatWorkerMessage(payload), fromWorker: true)); + }); + } + + /// Sends a structured message to the background worker (see + /// `handleWorkerMessage` in `background_tasks.dart`). + void _sendToWorker(Map message) { + setState(() { + _chat.add(_ChatLine(text: _formatSentMessage(message), fromWorker: false)); + }); + WorkmanagerWeb().sendMessageToWorker(message); + } + + void _sendFreeText(String text) { + final trimmed = text.trim(); + if (trimmed.isEmpty) { + return; + } + _messageController.clear(); + _sendToWorker({'op': 'text', 'text': trimmed}); + } + Future _registerOneOff() async { await WorkmanagerWeb().registerOneOffTask( _oneOffTask, _oneOffTask, - inputData: {'via': 'oneOff'}, + inputData: { + 'via': 'oneOff', + 'ticker': 'btc', + 'threshold': 58000, + }, initialDelay: const Duration(seconds: 5), ); } @@ -76,7 +117,11 @@ class _WebDemoPageState extends State { await WorkmanagerWeb().registerPeriodicTask( _periodicTask, _periodicTask, - inputData: {'via': 'periodic'}, + inputData: { + 'via': 'periodic', + 'ticker': 'eth', + 'threshold': 2400, + }, frequency: const Duration(minutes: 15), ); } @@ -84,7 +129,11 @@ class _WebDemoPageState extends State { Future _triggerNow() async { await WorkmanagerWeb().triggerTask( _oneOffTask, - inputData: {'via': 'manual trigger'}, + inputData: { + 'via': 'manual trigger', + 'ticker': 'btc', + 'threshold': 60000, + }, ); } @@ -109,9 +158,11 @@ class _WebDemoPageState extends State { Text( _initializing ? 'Initializing…' - : 'Ready. Open DevTools → Application → Service Workers ' - 'to trigger "periodicsync" / "Push" and watch this ' - 'panel. Install the PWA for real background sync.', + : 'Tasks run in a Web Worker (page open) or the Service ' + 'Worker (page closed, via Periodic Sync / Push) and ' + 'results are replayed from IndexedDB on load. The ' + 'chat below talks to the worker over postMessage. ' + 'Install the PWA for real background sync.', style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 8), @@ -147,6 +198,8 @@ class _WebDemoPageState extends State { ), ), const Divider(height: 1), + _buildChatPanel(context), + const Divider(height: 1), Expanded( child: _events.isEmpty ? const Center( @@ -168,6 +221,197 @@ class _WebDemoPageState extends State { ), ); } + + Widget _buildChatPanel(BuildContext context) { + final theme = Theme.of(context); + return Padding( + padding: const EdgeInsets.fromLTRB(12, 8, 12, 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + 'Worker chat — page ↔ background worker (postMessage)', + style: theme.textTheme.titleSmall, + ), + const SizedBox(height: 6), + Container( + height: 170, + decoration: BoxDecoration( + border: Border.all(color: theme.colorScheme.outlineVariant), + borderRadius: BorderRadius.circular(8), + ), + child: _chat.isEmpty + ? const Center( + child: Text( + 'Send a message or tap a suggestion below.\n' + 'The worker replies from a separate thread.', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 12), + ), + ) + : ListView.builder( + reverse: true, + padding: const EdgeInsets.all(6), + itemCount: _chat.length, + itemBuilder: (BuildContext context, int index) { + return _ChatBubble(line: _chat[index]); + }, + ), + ), + const SizedBox(height: 6), + Row( + children: [ + Expanded( + child: TextField( + controller: _messageController, + onSubmitted: _sendFreeText, + decoration: const InputDecoration( + isDense: true, + hintText: 'Type a message for the worker…', + border: OutlineInputBorder(), + ), + ), + ), + const SizedBox(width: 6), + IconButton.filled( + onPressed: _initializing + ? null + : () => _sendFreeText(_messageController.text), + icon: const Icon(Icons.send), + tooltip: 'Send to worker', + ), + ], + ), + const SizedBox(height: 6), + Wrap( + spacing: 6, + runSpacing: 6, + children: [ + ActionChip( + label: const Text('Watch BTC (<\$58k)'), + onPressed: _initializing + ? null + : () => _sendToWorker({ + 'op': 'watch', + 'ticker': 'btc', + 'threshold': 58000, + }), + ), + ActionChip( + label: const Text('Watch ETH (<\$2.5k)'), + onPressed: _initializing + ? null + : () => _sendToWorker({ + 'op': 'watch', + 'ticker': 'eth', + 'threshold': 2500, + }), + ), + ActionChip( + label: const Text('Stop watch'), + onPressed: _initializing + ? null + : () => _sendToWorker({'op': 'stop'}), + ), + ActionChip( + label: const Text('Background check (task)'), + onPressed: _initializing + ? null + : () => _sendToWorker({ + 'op': 'check', + 'ticker': 'ada', + }), + ), + ], + ), + ], + ), + ); + } + + String _formatSentMessage(Map message) { + final op = message['op']; + switch (op) { + case 'watch': + final threshold = (message['threshold'] as num?)?.toDouble(); + return '📨 watch ${message['ticker']}' + '${threshold == null ? '' : ' (< \$${threshold.toStringAsFixed(0)})'}'; + case 'stop': + return '📨 stop'; + case 'text': + return '📨 ${message['text']}'; + case 'check': + return '📨 background check ${message['ticker']}'; + default: + return '📨 $message'; + } + } + + String _formatWorkerMessage(Object? payload) { + if (payload is! Map) { + return '${payload ?? '(empty)'}'; + } + final kind = payload['kind']; + final ticker = payload['ticker'] as String?; + final price = (payload['price'] as num?)?.toDouble(); + final priceText = price == null ? '' : '\$${price.toStringAsFixed(2)}'; + switch (kind) { + case 'watching': + final threshold = (payload['threshold'] as num?)?.toDouble(); + return '👀 watching $ticker${threshold == null ? '' : ' · alert < \$${threshold.toStringAsFixed(0)}'}'; + case 'tick': + return '📈 $ticker $priceText'; + case 'alert': + final threshold = (payload['threshold'] as num?)?.toDouble(); + return '🚨 $ticker $priceText below ' + '\$${threshold?.toStringAsFixed(0) ?? '?'} — stopping'; + case 'stopped': + return '🛑 watch stopped'; + case 'echo': + return '↩︎ ${payload['text']}'; + case 'task-start': + return '▶ background check: $ticker…'; + case 'task-done': + final below = payload['below'] == true; + return '✅ $ticker $priceText${below ? ' · BELOW threshold' : ' · ok'}'; + default: + return '$payload'; + } + } +} + +class _ChatLine { + const _ChatLine({required this.text, required this.fromWorker}); + + final String text; + final bool fromWorker; +} + +class _ChatBubble extends StatelessWidget { + const _ChatBubble({required this.line}); + + final _ChatLine line; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + final color = line.fromWorker + ? theme.colorScheme.surfaceContainerHighest + : theme.colorScheme.primaryContainer; + return Align( + alignment: line.fromWorker ? Alignment.centerLeft : Alignment.centerRight, + child: Container( + margin: const EdgeInsets.symmetric(vertical: 2), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6), + constraints: const BoxConstraints(maxWidth: 280), + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(12), + ), + child: Text(line.text, style: const TextStyle(fontSize: 12)), + ), + ); + } } class _EventTile extends StatelessWidget { diff --git a/example/web/background.dart.js b/example/web/background.dart.js index ae8295e9..908b64df 100644 --- a/example/web/background.dart.js +++ b/example/web/background.dart.js @@ -22,18 +22,18 @@ a[c]=function(){if(a[b]===s){a[b]=d()}a[c]=function(){return this[b]} return a[b]}}function lazyFinal(a,b,c,d){var s=a a[b]=s a[c]=function(){if(a[b]===s){var r=d() -if(a[b]!==s){A.hW(b)}a[b]=r}var q=a[b] +if(a[b]!==s){A.iu(b)}a[b]=r}var q=a[b] a[c]=function(){return q} -return q}}function makeConstList(a,b){if(b!=null)A.H(a,b) +return q}}function makeConstList(a,b){if(b!=null)A.K(a,b) a.$flags=7 return a}function convertToFastObject(a){function t(){}t.prototype=a new t() return a}function convertAllToFastObject(a){for(var s=0;s4294967295)throw A.i(A.e1(a,0,4294967295,"length",null)) -return J.fb(new Array(a),b)}, -fa(a,b){return A.H(new Array(a),b.h("t<0>"))}, -fb(a,b){var s=A.H(a,b.h("t<0>")) +fD(a,b){if(a<0||a>4294967295)throw A.e(A.ev(a,0,4294967295,"length",null)) +return J.fF(new Array(a),b)}, +fE(a,b){if(a<0)throw A.e(A.ak("Length must be a non-negative integer: "+a,null)) +return A.K(new Array(a),b.h("x<0>"))}, +fF(a,b){var s=A.K(a,b.h("x<0>")) s.$flags=1 return s}, -ab(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.aD.prototype -return J.bu.prototype}if(typeof a=="string")return J.aF.prototype -if(a==null)return J.aE.prototype -if(typeof a=="boolean")return J.bt.prototype -if(Array.isArray(a))return J.t.prototype -if(typeof a!="object"){if(typeof a=="function")return J.K.prototype -if(typeof a=="symbol")return J.aI.prototype -if(typeof a=="bigint")return J.aG.prototype +af(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.aP.prototype +return J.bL.prototype}if(typeof a=="string")return J.an.prototype +if(a==null)return J.aQ.prototype +if(typeof a=="boolean")return J.bK.prototype +if(Array.isArray(a))return J.x.prototype +if(typeof a!="object"){if(typeof a=="function")return J.N.prototype +if(typeof a=="symbol")return J.aT.prototype +if(typeof a=="bigint")return J.aR.prototype return a}if(a instanceof A.d)return a -return J.dD(a)}, -eE(a){if(typeof a=="string")return J.aF.prototype +return J.e7(a)}, +f6(a){if(typeof a=="string")return J.an.prototype if(a==null)return a -if(Array.isArray(a))return J.t.prototype -if(typeof a!="object"){if(typeof a=="function")return J.K.prototype -if(typeof a=="symbol")return J.aI.prototype -if(typeof a=="bigint")return J.aG.prototype +if(Array.isArray(a))return J.x.prototype +if(typeof a!="object"){if(typeof a=="function")return J.N.prototype +if(typeof a=="symbol")return J.aT.prototype +if(typeof a=="bigint")return J.aR.prototype return a}if(a instanceof A.d)return a -return J.dD(a)}, -dC(a){if(a==null)return a -if(Array.isArray(a))return J.t.prototype -if(typeof a!="object"){if(typeof a=="function")return J.K.prototype -if(typeof a=="symbol")return J.aI.prototype -if(typeof a=="bigint")return J.aG.prototype +return J.e7(a)}, +cn(a){if(a==null)return a +if(Array.isArray(a))return J.x.prototype +if(typeof a!="object"){if(typeof a=="function")return J.N.prototype +if(typeof a=="symbol")return J.aT.prototype +if(typeof a=="bigint")return J.aR.prototype return a}if(a instanceof A.d)return a -return J.dD(a)}, -Z(a,b){if(a==null)return b==null +return J.e7(a)}, +P(a,b){if(a==null)return b==null if(typeof a!="object")return b!=null&&a===b -return J.ab(a).B(a,b)}, -eU(a,b){return J.dC(a).J(a,b)}, -M(a){return J.ab(a).gn(a)}, -eV(a){return J.dC(a).gp(a)}, -da(a){return J.eE(a).gk(a)}, -eW(a){return J.ab(a).gq(a)}, -dO(a,b,c){return J.dC(a).K(a,b,c)}, -ax(a){return J.ab(a).i(a)}, -br:function br(){}, -bt:function bt(){}, -aE:function aE(){}, -aH:function aH(){}, -U:function U(){}, -bH:function bH(){}, -aW:function aW(){}, -K:function K(){}, -aG:function aG(){}, -aI:function aI(){}, -t:function t(a){this.$ti=a}, -bs:function bs(){}, -ca:function ca(a){this.$ti=a}, -az:function az(a,b,c){var _=this +return J.af(a).C(a,b)}, +fo(a,b){return J.cn(a).K(a,b)}, +W(a){return J.af(a).gq(a)}, +dH(a){return J.cn(a).gp(a)}, +dI(a){return J.f6(a).gl(a)}, +fp(a){return J.af(a).gt(a)}, +eg(a,b,c){return J.cn(a).L(a,b,c)}, +aH(a){return J.af(a).i(a)}, +bI:function bI(){}, +bK:function bK(){}, +aQ:function aQ(){}, +aS:function aS(){}, +Y:function Y(){}, +c_:function c_(){}, +b6:function b6(){}, +N:function N(){}, +aR:function aR(){}, +aT:function aT(){}, +x:function x(a){this.$ti=a}, +bJ:function bJ(){}, +cx:function cx(a){this.$ti=a}, +aI:function aI(a,b,c){var _=this _.a=a _.b=b _.c=0 _.d=null _.$ti=c}, -bv:function bv(){}, -aD:function aD(){}, -bu:function bu(){}, -aF:function aF(){}},A={df:function df(){}, -eZ(a,b,c){if(t.O.b(a))return new A.aZ(a,b.h("@<0>").j(c).h("aZ<1,2>")) -return new A.a_(a,b.h("@<0>").j(c).h("a_<1,2>"))}, -W(a,b){a=a+b&536870911 +bM:function bM(){}, +aP:function aP(){}, +bL:function bL(){}, +an:function an(){}},A={dM:function dM(){}, +fs(a,b,c){if(t.O.b(a))return new A.ba(a,b.h("@<0>").k(c).h("ba<1,2>")) +return new A.a3(a,b.h("@<0>").k(c).h("a3<1,2>"))}, +a_(a,b){a=a+b&536870911 a=a+((a&524287)<<10)&536870911 return a^a>>>6}, -dm(a){a=a+((a&67108863)<<3)&536870911 +dU(a){a=a+((a&67108863)<<3)&536870911 a^=a>>>11 return a+((a&16383)<<15)&536870911}, -cX(a,b,c){return a}, -dG(a){var s,r -for(s=$.B.length,r=0;r").j(d).h("aB<1,2>")) -return new A.a4(a,b,c.h("@<0>").j(d).h("a4<1,2>"))}, -aj:function aj(){}, -aA:function aA(a,b){this.a=a +dQ(a,b,c,d){if(t.O.b(a))return new A.aN(a,b,c.h("@<0>").k(d).h("aN<1,2>")) +return new A.a7(a,b,c.h("@<0>").k(d).h("a7<1,2>"))}, +ar:function ar(){}, +aJ:function aJ(a,b){this.a=a this.$ti=b}, -a_:function a_(a,b){this.a=a +a3:function a3(a,b){this.a=a this.$ti=b}, -aZ:function aZ(a,b){this.a=a +ba:function ba(a,b){this.a=a this.$ti=b}, -a0:function a0(a,b){this.a=a +a4:function a4(a,b){this.a=a this.$ti=b}, -c3:function c3(a,b){this.a=a +cq:function cq(a,b){this.a=a this.b=b}, -c2:function c2(a){this.a=a}, -bx:function bx(a){this.a=a}, -cg:function cg(){}, +cp:function cp(a){this.a=a}, +bP:function bP(a){this.a=a}, +aK:function aK(a){this.a=a}, +cD:function cD(){}, c:function c(){}, -L:function L(){}, -a3:function a3(a,b,c){var _=this +O:function O(){}, +R:function R(a,b,c){var _=this _.a=a _.b=b _.c=0 _.d=null _.$ti=c}, -a4:function a4(a,b,c){this.a=a +a7:function a7(a,b,c){this.a=a this.b=b this.$ti=c}, -aB:function aB(a,b,c){this.a=a +aN:function aN(a,b,c){this.a=a this.b=b this.$ti=c}, -aN:function aN(a,b,c){var _=this +aY:function aY(a,b,c){var _=this _.a=null _.b=a _.c=b _.$ti=c}, -P:function P(a,b,c){this.a=a +S:function S(a,b,c){this.a=a this.b=b this.$ti=c}, -y:function y(){}, -eI(a){var s=v.mangledGlobalNames[a] +A:function A(){}, +b7:function b7(){}, +aq:function aq(){}, +fc(a){var s=v.mangledGlobalNames[a] if(s!=null)return s return"minified:"+a}, -ih(a,b){var s +iP(a,b){var s if(b!=null){s=b.x -if(s!=null)return s}return t.p.b(a)}, -n(a){var s +if(s!=null)return s}return t.E.b(a)}, +m(a){var s if(typeof a=="string")return a if(typeof a=="number"){if(a!==0)return""+a}else if(!0===a)return"true" else if(!1===a)return"false" else if(a==null)return"null" -s=J.ax(a) +s=J.aH(a) return s}, -bI(a){var s,r=$.dZ -if(r==null)r=$.dZ=Symbol("identityHashCode") +c0(a){var s,r=$.es +if(r==null)r=$.es=Symbol("identityHashCode") s=a[r] if(s==null){s=Math.random()*0x3fffffff|0 a[r]=s}return s}, -bJ(a){var s,r,q,p -if(a instanceof A.d)return A.A(A.au(a),null) -s=J.ab(a) -if(s===B.q||s===B.t||t.G.b(a)){r=B.h(a) +c1(a){var s,r,q,p +if(a instanceof A.d)return A.F(A.aE(a),null) +s=J.af(a) +if(s===B.t||s===B.w||t.cr.b(a)){r=B.h(a) if(r!=="Object"&&r!=="")return r q=a.constructor if(typeof q=="function"){p=q.name -if(typeof p=="string"&&p!=="Object"&&p!=="")return p}}return A.A(A.au(a),null)}, -e_(a){var s,r,q -if(a==null||typeof a=="number"||A.cS(a))return J.ax(a) +if(typeof p=="string"&&p!=="Object"&&p!=="")return p}}return A.F(A.aE(a),null)}, +et(a){var s,r,q +if(a==null||typeof a=="number"||A.dk(a))return J.aH(a) if(typeof a=="string")return JSON.stringify(a) -if(a instanceof A.T)return a.i(0) -if(a instanceof A.S)return a.a8(!0) -s=$.eT() -for(r=0;r<1;++r){q=s[r].aE(a) -if(q!=null)return q}return"Instance of '"+A.bJ(a)+"'"}, -ai(a){if(a.date===void 0)a.date=new Date(a.a) +if(a instanceof A.X)return a.i(0) +if(a instanceof A.V)return a.ag(!0) +s=$.fn() +for(r=0;r<1;++r){q=s[r].aV(a) +if(q!=null)return q}return"Instance of '"+A.c1(a)+"'"}, +E(a){if(a.date===void 0)a.date=new Date(a.a) return a.date}, -fn(a){var s=A.ai(a).getUTCFullYear()+0 -return s}, -fl(a){var s=A.ai(a).getUTCMonth()+1 -return s}, -fh(a){var s=A.ai(a).getUTCDate()+0 -return s}, -fi(a){var s=A.ai(a).getUTCHours()+0 -return s}, -fk(a){var s=A.ai(a).getUTCMinutes()+0 -return s}, -fm(a){var s=A.ai(a).getUTCSeconds()+0 -return s}, -fj(a){var s=A.ai(a).getUTCMilliseconds()+0 -return s}, -fg(a){var s=a.$thrownJsError +fQ(a){return a.c?A.E(a).getUTCFullYear()+0:A.E(a).getFullYear()+0}, +fO(a){return a.c?A.E(a).getUTCMonth()+1:A.E(a).getMonth()+1}, +fK(a){return a.c?A.E(a).getUTCDate()+0:A.E(a).getDate()+0}, +fL(a){return a.c?A.E(a).getUTCHours()+0:A.E(a).getHours()+0}, +fN(a){return a.c?A.E(a).getUTCMinutes()+0:A.E(a).getMinutes()+0}, +fP(a){return a.c?A.E(a).getUTCSeconds()+0:A.E(a).getSeconds()+0}, +fM(a){return a.c?A.E(a).getUTCMilliseconds()+0:A.E(a).getMilliseconds()+0}, +fJ(a){var s=a.$thrownJsError if(s==null)return null -return A.at(s)}, -e0(a,b){var s +return A.ag(s)}, +eu(a,b){var s if(a.$thrownJsError==null){s=new Error() -A.r(a,s) +A.w(a,s) a.$thrownJsError=s s.stack=b.i(0)}}, -x(a,b){if(a==null)J.da(a) -throw A.i(A.eD(a,b))}, -eD(a,b){var s,r="index" -if(!A.dw(b))return new A.N(!0,b,r,null) -s=J.da(a) -if(b<0||b>=s)return A.f7(b,s,a,r) -return new A.aT(null,null,!0,b,r,"Value not in range")}, -i(a){return A.r(a,new Error())}, -r(a,b){var s -if(a==null)a=new A.Q() +y(a,b){if(a==null)J.dI(a) +throw A.e(A.dt(a,b))}, +dt(a,b){var s,r="index" +if(!A.e2(b))return new A.Q(!0,b,r,null) +s=J.dI(a) +if(b<0||b>=s)return A.fB(b,s,a,r) +return new A.b3(null,null,!0,b,r,"Value not in range")}, +e(a){return A.w(a,new Error())}, +w(a,b){var s +if(a==null)a=new A.T() b.dartException=a -s=A.hX +s=A.iv if("defineProperty" in Object){Object.defineProperty(b,"message",{get:s}) b.name=""}else b.toString=s return b}, -hX(){return J.ax(this.dartException)}, -c1(a,b){throw A.r(a,b==null?new Error():b)}, -dK(a,b,c){var s +iv(){return J.aH(this.dartException)}, +co(a,b){throw A.w(a,b==null?new Error():b)}, +ec(a,b,c){var s if(b==null)b=0 if(c==null)c=0 s=Error() -A.c1(A.h0(a,b,c),s)}, -h0(a,b,c){var s,r,q,p,o,n,m,l,k +A.co(A.hw(a,b,c),s)}, +hw(a,b,c){var s,r,q,p,o,n,m,l,k if(typeof b=="string")s=b else{r="[]=;add;removeWhere;retainWhere;removeRange;setRange;setInt8;setInt16;setInt32;setUint8;setUint16;setUint32;setFloat32;setFloat64".split(";") q=r.length @@ -283,84 +280,84 @@ l="a " if((m&4)!==0)k="constant " else if((m&2)!==0){k="unmodifiable " l="an "}else k=(m&1)!==0?"fixed-length ":"" -return new A.aX("'"+s+"': Cannot "+o+" "+l+k+n)}, -dJ(a){throw A.i(A.af(a))}, -R(a){var s,r,q,p,o,n -a=A.hV(a.replace(String({}),"$receiver$")) +return new A.b8("'"+s+"': Cannot "+o+" "+l+k+n)}, +fb(a){throw A.e(A.am(a))}, +U(a){var s,r,q,p,o,n +a=A.it(a.replace(String({}),"$receiver$")) s=a.match(/\\\$[a-zA-Z]+\\\$/g) -if(s==null)s=A.H([],t.s) +if(s==null)s=A.K([],t.s) r=s.indexOf("\\$arguments\\$") q=s.indexOf("\\$argumentsExpr\\$") p=s.indexOf("\\$expr\\$") o=s.indexOf("\\$method\\$") n=s.indexOf("\\$receiver\\$") -return new A.ch(a.replace(new RegExp("\\\\\\$arguments\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$","g"),"((?:x|[^x])*)"),r,q,p,o,n)}, -ci(a){return function($expr$){var $argumentsExpr$="$arguments$" +return new A.cE(a.replace(new RegExp("\\\\\\$arguments\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$argumentsExpr\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$expr\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$method\\\\\\$","g"),"((?:x|[^x])*)").replace(new RegExp("\\\\\\$receiver\\\\\\$","g"),"((?:x|[^x])*)"),r,q,p,o,n)}, +cF(a){return function($expr$){var $argumentsExpr$="$arguments$" try{$expr$.$method$($argumentsExpr$)}catch(s){return s.message}}(a)}, -e5(a){return function($expr$){try{$expr$.$method$}catch(s){return s.message}}(a)}, -dg(a,b){var s=b==null,r=s?null:b.method -return new A.bw(a,r,s?null:b.receiver)}, -aw(a){var s -if(a==null)return new A.cf(a) -if(a instanceof A.aC){s=a.a -return A.Y(a,s==null?A.bf(s):s)}if(typeof a!=="object")return a -if("dartException" in a)return A.Y(a,a.dartException) -return A.hy(a)}, -Y(a,b){if(t.C.b(b))if(b.$thrownJsError==null)b.$thrownJsError=a +ez(a){return function($expr$){try{$expr$.$method$}catch(s){return s.message}}(a)}, +dN(a,b){var s=b==null,r=s?null:b.method +return new A.bO(a,r,s?null:b.receiver)}, +aj(a){var s +if(a==null)return new A.cC(a) +if(a instanceof A.aO){s=a.a +return A.a2(a,s==null?A.ay(s):s)}if(typeof a!=="object")return a +if("dartException" in a)return A.a2(a,a.dartException) +return A.i3(a)}, +a2(a,b){if(t.C.b(b))if(b.$thrownJsError==null)b.$thrownJsError=a return b}, -hy(a){var s,r,q,p,o,n,m,l,k,j,i,h,g +i3(a){var s,r,q,p,o,n,m,l,k,j,i,h,g if(!("message" in a))return a s=a.message if("number" in a&&typeof a.number=="number"){r=a.number q=r&65535 -if((B.e.ap(r,16)&8191)===10)switch(q){case 438:return A.Y(a,A.dg(A.n(s)+" (Error "+q+")",null)) -case 445:case 5007:A.n(s) -return A.Y(a,new A.aS())}}if(a instanceof TypeError){p=$.eJ() -o=$.eK() -n=$.eL() -m=$.eM() -l=$.eP() -k=$.eQ() -j=$.eO() -$.eN() -i=$.eS() -h=$.eR() +if((B.c.aE(r,16)&8191)===10)switch(q){case 438:return A.a2(a,A.dN(A.m(s)+" (Error "+q+")",null)) +case 445:case 5007:A.m(s) +return A.a2(a,new A.b2())}}if(a instanceof TypeError){p=$.fd() +o=$.fe() +n=$.ff() +m=$.fg() +l=$.fj() +k=$.fk() +j=$.fi() +$.fh() +i=$.fm() +h=$.fl() g=p.A(s) -if(g!=null)return A.Y(a,A.dg(A.ap(s),g)) +if(g!=null)return A.a2(a,A.dN(A.az(s),g)) else{g=o.A(s) if(g!=null){g.method="call" -return A.Y(a,A.dg(A.ap(s),g))}else if(n.A(s)!=null||m.A(s)!=null||l.A(s)!=null||k.A(s)!=null||j.A(s)!=null||m.A(s)!=null||i.A(s)!=null||h.A(s)!=null){A.ap(s) -return A.Y(a,new A.aS())}}return A.Y(a,new A.bQ(typeof s=="string"?s:""))}if(a instanceof RangeError){if(typeof s=="string"&&s.indexOf("call stack")!==-1)return new A.aV() +return A.a2(a,A.dN(A.az(s),g))}else if(n.A(s)!=null||m.A(s)!=null||l.A(s)!=null||k.A(s)!=null||j.A(s)!=null||m.A(s)!=null||i.A(s)!=null||h.A(s)!=null){A.az(s) +return A.a2(a,new A.b2())}}return A.a2(a,new A.c9(typeof s=="string"?s:""))}if(a instanceof RangeError){if(typeof s=="string"&&s.indexOf("call stack")!==-1)return new A.b5() s=function(b){try{return String(b)}catch(f){}return null}(a) -return A.Y(a,new A.N(!1,null,null,typeof s=="string"?s.replace(/^RangeError:\s*/,""):s))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof s=="string"&&s==="too much recursion")return new A.aV() +return A.a2(a,new A.Q(!1,null,null,typeof s=="string"?s.replace(/^RangeError:\s*/,""):s))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof s=="string"&&s==="too much recursion")return new A.b5() return a}, -at(a){var s -if(a instanceof A.aC)return a.b -if(a==null)return new A.b8(a) +ag(a){var s +if(a instanceof A.aO)return a.b +if(a==null)return new A.bm(a) s=a.$cachedTrace if(s!=null)return s -s=new A.b8(a) +s=new A.bm(a) if(typeof a==="object")a.$cachedTrace=s return s}, -d5(a){if(a==null)return J.M(a) -if(typeof a=="object")return A.bI(a) -return J.M(a)}, -hH(a,b){var s,r,q,p=a.length +dD(a){if(a==null)return J.W(a) +if(typeof a=="object")return A.c0(a) +return J.W(a)}, +id(a,b){var s,r,q,p=a.length for(s=0;s>>0!==a||a>=c)throw A.e(A.dt(b,a))}, +ao:function ao(){}, +b0:function b0(){}, +bQ:function bQ(){}, +ap:function ap(){}, +aZ:function aZ(){}, +b_:function b_(){}, +bR:function bR(){}, +bS:function bS(){}, +bT:function bT(){}, +bU:function bU(){}, +bV:function bV(){}, +bW:function bW(){}, +bX:function bX(){}, +b1:function b1(){}, +bY:function bY(){}, +bg:function bg(){}, +bh:function bh(){}, +bi:function bi(){}, +bj:function bj(){}, +dS(a,b){var s=b.c +return s==null?b.c=A.br(a,"M",[b.x]):s}, +ew(a){var s=a.w +if(s===6||s===7)return A.ew(a.x) return s===11||s===12}, -fo(a){return a.as}, -dB(a){return A.cL(v.typeUniverse,a,!1)}, -a8(a1,a2,a3,a4){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0=a2.w +fR(a){return a.as}, +dv(a){return A.dc(v.typeUniverse,a,!1)}, +ac(a1,a2,a3,a4){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0=a2.w switch(a0){case 5:case 1:case 2:case 3:case 4:return a2 case 6:s=a2.x -r=A.a8(a1,s,a3,a4) +r=A.ac(a1,s,a3,a4) if(r===s)return a2 -return A.ei(a1,r,!0) +return A.eN(a1,r,!0) case 7:s=a2.x -r=A.a8(a1,s,a3,a4) +r=A.ac(a1,s,a3,a4) if(r===s)return a2 -return A.eh(a1,r,!0) +return A.eM(a1,r,!0) case 8:q=a2.y -p=A.ar(a1,q,a3,a4) +p=A.aB(a1,q,a3,a4) if(p===q)return a2 -return A.bb(a1,a2.x,p) +return A.br(a1,a2.x,p) case 9:o=a2.x -n=A.a8(a1,o,a3,a4) +n=A.ac(a1,o,a3,a4) m=a2.y -l=A.ar(a1,m,a3,a4) +l=A.aB(a1,m,a3,a4) if(n===o&&l===m)return a2 -return A.dr(a1,n,l) +return A.dY(a1,n,l) case 10:k=a2.x j=a2.y -i=A.ar(a1,j,a3,a4) +i=A.aB(a1,j,a3,a4) if(i===j)return a2 -return A.ej(a1,k,i) +return A.eO(a1,k,i) case 11:h=a2.x -g=A.a8(a1,h,a3,a4) +g=A.ac(a1,h,a3,a4) f=a2.y -e=A.hv(a1,f,a3,a4) +e=A.i0(a1,f,a3,a4) if(g===h&&e===f)return a2 -return A.eg(a1,g,e) +return A.eL(a1,g,e) case 12:d=a2.y a4+=d.length -c=A.ar(a1,d,a3,a4) +c=A.aB(a1,d,a3,a4) o=a2.x -n=A.a8(a1,o,a3,a4) +n=A.ac(a1,o,a3,a4) if(c===d&&n===o)return a2 -return A.ds(a1,n,c,!0) +return A.dZ(a1,n,c,!0) case 13:b=a2.x if(b=p)return A.x(q,0) -s=A.bd(v.typeUniverse,A.dy(q[0]),"@<0>") -for(r=1;r=p)return A.y(q,0) +s=A.bt(v.typeUniverse,A.e4(q[0]),"@<0>") +for(r=1;r=0)p+=" "+r[q];++q}return p+"})"}, -er(a3,a4,a5){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1=", ",a2=null +eT(a3,a4,a5){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1=", ",a2=null if(a5!=null){s=a5.length -if(a4==null)a4=A.H([],t.s) +if(a4==null)a4=A.K([],t.s) else a2=a4.length r=a4.length for(q=s;q>0;--q)B.a.u(a4,"T"+(r+q)) for(p=t.X,o="<",n="",q=0;q=0))return A.x(a4,l) +if(!(l>=0))return A.y(a4,l) o=o+n+a4[l] k=a5[q] j=k.w -if(!(j===2||j===3||j===4||j===5||k===p))o+=" extends "+A.A(k,a4)}o+=">"}else o="" +if(!(j===2||j===3||j===4||j===5||k===p))o+=" extends "+A.F(k,a4)}o+=">"}else o="" p=a3.x i=a3.y h=i.a @@ -855,242 +865,242 @@ f=i.b e=f.length d=i.c c=d.length -b=A.A(p,a4) -for(a="",a0="",q=0;q0){a+=a0+"[" -for(a0="",q=0;q0){a+=a0+"{" for(a0="",q=0;q "+b}, -A(a,b){var s,r,q,p,o,n,m,l=a.w +F(a,b){var s,r,q,p,o,n,m,l=a.w if(l===5)return"erased" if(l===2)return"dynamic" if(l===3)return"void" if(l===1)return"Never" if(l===4)return"any" if(l===6){s=a.x -r=A.A(s,b) +r=A.F(s,b) q=s.w -return(q===11||q===12?"("+r+")":r)+"?"}if(l===7)return"FutureOr<"+A.A(a.x,b)+">" -if(l===8){p=A.hx(a.x) +return(q===11||q===12?"("+r+")":r)+"?"}if(l===7)return"FutureOr<"+A.F(a.x,b)+">" +if(l===8){p=A.i2(a.x) o=a.y -return o.length>0?p+("<"+A.ey(o,b)+">"):p}if(l===10)return A.hn(a,b) -if(l===11)return A.er(a,b,null) -if(l===12)return A.er(a.x,b,a.y) +return o.length>0?p+("<"+A.f1(o,b)+">"):p}if(l===10)return A.hU(a,b) +if(l===11)return A.eT(a,b,null) +if(l===12)return A.eT(a.x,b,a.y) if(l===13){n=a.x m=b.length n=m-1-n -if(!(n>=0&&n=0&&n0)p+="<"+A.ba(c)+">" +br(a,b,c){var s,r,q,p=b +if(c.length>0)p+="<"+A.bq(c)+">" s=a.eC.get(p) if(s!=null)return s -r=new A.F(null,null) +r=new A.J(null,null) r.w=8 r.x=b r.y=c if(c.length>0)r.c=c[0] r.as=p -q=A.X(a,r) +q=A.a0(a,r) a.eC.set(p,q) return q}, -dr(a,b,c){var s,r,q,p,o,n +dY(a,b,c){var s,r,q,p,o,n if(b.w===9){s=b.x r=b.y.concat(c)}else{r=c -s=b}q=s.as+(";<"+A.ba(r)+">") +s=b}q=s.as+(";<"+A.bq(r)+">") p=a.eC.get(q) if(p!=null)return p -o=new A.F(null,null) +o=new A.J(null,null) o.w=9 o.x=s o.y=r o.as=q -n=A.X(a,o) +n=A.a0(a,o) a.eC.set(q,n) return n}, -ej(a,b,c){var s,r,q="+"+(b+"("+A.ba(c)+")"),p=a.eC.get(q) +eO(a,b,c){var s,r,q="+"+(b+"("+A.bq(c)+")"),p=a.eC.get(q) if(p!=null)return p -s=new A.F(null,null) +s=new A.J(null,null) s.w=10 s.x=b s.y=c s.as=q -r=A.X(a,s) +r=A.a0(a,s) a.eC.set(q,r) return r}, -eg(a,b,c){var s,r,q,p,o,n=b.as,m=c.a,l=m.length,k=c.b,j=k.length,i=c.c,h=i.length,g="("+A.ba(m) +eL(a,b,c){var s,r,q,p,o,n=b.as,m=c.a,l=m.length,k=c.b,j=k.length,i=c.c,h=i.length,g="("+A.bq(m) if(j>0){s=l>0?",":"" -g+=s+"["+A.ba(k)+"]"}if(h>0){s=l>0?",":"" -g+=s+"{"+A.fH(i)+"}"}r=n+(g+")") +g+=s+"["+A.bq(k)+"]"}if(h>0){s=l>0?",":"" +g+=s+"{"+A.hc(i)+"}"}r=n+(g+")") q=a.eC.get(r) if(q!=null)return q -p=new A.F(null,null) +p=new A.J(null,null) p.w=11 p.x=b p.y=c p.as=r -o=A.X(a,p) +o=A.a0(a,p) a.eC.set(r,o) return o}, -ds(a,b,c,d){var s,r=b.as+("<"+A.ba(c)+">"),q=a.eC.get(r) +dZ(a,b,c,d){var s,r=b.as+("<"+A.bq(c)+">"),q=a.eC.get(r) if(q!=null)return q -s=A.fJ(a,b,c,r,d) +s=A.he(a,b,c,r,d) a.eC.set(r,s) return s}, -fJ(a,b,c,d,e){var s,r,q,p,o,n,m,l +he(a,b,c,d,e){var s,r,q,p,o,n,m,l if(e){s=c.length -r=A.cM(s) +r=A.dd(s) for(q=0,p=0;p0){n=A.a8(a,b,r,0) -m=A.ar(a,c,r,0) -return A.ds(a,n,m,c!==m)}}l=new A.F(null,null) +if(o.w===1){r[p]=o;++q}}if(q>0){n=A.ac(a,b,r,0) +m=A.aB(a,c,r,0) +return A.dZ(a,n,m,c!==m)}}l=new A.J(null,null) l.w=12 l.x=b l.y=c l.as=d -return A.X(a,l)}, -ec(a,b,c,d){return{u:a,e:b,r:c,s:[],p:0,n:d}}, -ee(a){var s,r,q,p,o,n,m,l=a.r,k=a.s +return A.a0(a,l)}, +eG(a,b,c,d){return{u:a,e:b,r:c,s:[],p:0,n:d}}, +eI(a){var s,r,q,p,o,n,m,l=a.r,k=a.s for(s=l.length,r=0;r=48&&q<=57)r=A.fB(r+1,q,l,k) -else if((((q|32)>>>0)-97&65535)<26||q===95||q===36||q===124)r=A.ed(a,r,l,k,!1) -else if(q===46)r=A.ed(a,r,l,k,!0) +if(q>=48&&q<=57)r=A.h5(r+1,q,l,k) +else if((((q|32)>>>0)-97&65535)<26||q===95||q===36||q===124)r=A.eH(a,r,l,k,!1) +else if(q===46)r=A.eH(a,r,l,k,!0) else{++r switch(q){case 44:break case 58:k.push(!1) break case 33:k.push(!0) break -case 59:k.push(A.a6(a.u,a.e,k.pop())) +case 59:k.push(A.a9(a.u,a.e,k.pop())) break -case 94:k.push(A.fL(a.u,k.pop())) +case 94:k.push(A.hg(a.u,k.pop())) break -case 35:k.push(A.bc(a.u,5,"#")) +case 35:k.push(A.bs(a.u,5,"#")) break -case 64:k.push(A.bc(a.u,2,"@")) +case 64:k.push(A.bs(a.u,2,"@")) break -case 126:k.push(A.bc(a.u,3,"~")) +case 126:k.push(A.bs(a.u,3,"~")) break case 60:k.push(a.p) a.p=k.length break -case 62:A.fD(a,k) +case 62:A.h7(a,k) break -case 38:A.fC(a,k) +case 38:A.h6(a,k) break case 63:p=a.u -k.push(A.ei(p,A.a6(p,a.e,k.pop()),a.n)) +k.push(A.eN(p,A.a9(p,a.e,k.pop()),a.n)) break case 47:p=a.u -k.push(A.eh(p,A.a6(p,a.e,k.pop()),a.n)) +k.push(A.eM(p,A.a9(p,a.e,k.pop()),a.n)) break case 40:k.push(-3) k.push(a.p) a.p=k.length break -case 41:A.fA(a,k) +case 41:A.h4(a,k) break case 91:k.push(a.p) a.p=k.length break case 93:o=k.splice(a.p) -A.ef(a.u,a.e,o) +A.eJ(a.u,a.e,o) a.p=k.pop() k.push(o) k.push(-1) @@ -1099,7 +1109,7 @@ case 123:k.push(a.p) a.p=k.length break case 125:o=k.splice(a.p) -A.fF(a.u,a.e,o) +A.h9(a.u,a.e,o) a.p=k.pop() k.push(o) k.push(-2) @@ -1112,13 +1122,13 @@ a.p=k.length r=n+1 break default:throw"Bad character "+q}}}m=k.pop() -return A.a6(a.u,a.e,m)}, -fB(a,b,c,d){var s,r,q=b-48 +return A.a9(a.u,a.e,m)}, +h5(a,b,c,d){var s,r,q=b-48 for(s=c.length;a=48&&r<=57))break q=q*10+(r-48)}d.push(q) return a}, -ed(a,b,c,d,e){var s,r,q,p,o,n,m=b+1 +eH(a,b,c,d,e){var s,r,q,p,o,n,m=b+1 for(s=c.length;m>>0)-97&65535)<26||r===95||r===36||r===124))q=r>=48&&r<=57 @@ -1127,55 +1137,55 @@ if(!q)break}}p=c.substring(b,m) if(e){s=a.u o=a.e if(o.w===9)o=o.x -n=A.fP(s,o.x)[p] -if(n==null)A.c1('No "'+p+'" in "'+A.fo(o)+'"') -d.push(A.bd(s,o,n))}else d.push(p) +n=A.hk(s,o.x)[p] +if(n==null)A.co('No "'+p+'" in "'+A.fR(o)+'"') +d.push(A.bt(s,o,n))}else d.push(p) return m}, -fD(a,b){var s,r=a.u,q=A.eb(a,b),p=b.pop() -if(typeof p=="string")b.push(A.bb(r,p,q)) -else{s=A.a6(r,a.e,p) -switch(s.w){case 11:b.push(A.ds(r,s,q,a.n)) +h7(a,b){var s,r=a.u,q=A.eF(a,b),p=b.pop() +if(typeof p=="string")b.push(A.br(r,p,q)) +else{s=A.a9(r,a.e,p) +switch(s.w){case 11:b.push(A.dZ(r,s,q,a.n)) break -default:b.push(A.dr(r,s,q)) +default:b.push(A.dY(r,s,q)) break}}}, -fA(a,b){var s,r,q,p=a.u,o=b.pop(),n=null,m=null +h4(a,b){var s,r,q,p=a.u,o=b.pop(),n=null,m=null if(typeof o=="number")switch(o){case-1:n=b.pop() break case-2:m=b.pop() break default:b.push(o) break}else b.push(o) -s=A.eb(a,b) +s=A.eF(a,b) o=b.pop() switch(o){case-3:o=b.pop() if(n==null)n=p.sEA if(m==null)m=p.sEA -r=A.a6(p,a.e,o) -q=new A.bX() +r=A.a9(p,a.e,o) +q=new A.cg() q.a=s q.b=n q.c=m -b.push(A.eg(p,r,q)) +b.push(A.eL(p,r,q)) return -case-4:b.push(A.ej(p,b.pop(),s)) +case-4:b.push(A.eO(p,b.pop(),s)) return -default:throw A.i(A.bk("Unexpected state under `()`: "+A.n(o)))}}, -fC(a,b){var s=b.pop() -if(0===s){b.push(A.bc(a.u,1,"0&")) -return}if(1===s){b.push(A.bc(a.u,4,"1&")) -return}throw A.i(A.bk("Unexpected extended operation "+A.n(s)))}, -eb(a,b){var s=b.splice(a.p) -A.ef(a.u,a.e,s) +default:throw A.e(A.bA("Unexpected state under `()`: "+A.m(o)))}}, +h6(a,b){var s=b.pop() +if(0===s){b.push(A.bs(a.u,1,"0&")) +return}if(1===s){b.push(A.bs(a.u,4,"1&")) +return}throw A.e(A.bA("Unexpected extended operation "+A.m(s)))}, +eF(a,b){var s=b.splice(a.p) +A.eJ(a.u,a.e,s) a.p=b.pop() return s}, -a6(a,b,c){if(typeof c=="string")return A.bb(a,c,a.sEA) +a9(a,b,c){if(typeof c=="string")return A.br(a,c,a.sEA) else if(typeof c=="number"){b.toString -return A.fE(a,b,c)}else return c}, -ef(a,b,c){var s,r=c.length -for(s=0;s0?new Array(q):v.typeUniverse.sEA -for(o=0;o0?new Array(a):v.typeUniverse.sEA}, -F:function F(a,b){var _=this +dd(a){return a>0?new Array(a):v.typeUniverse.sEA}, +J:function J(a,b){var _=this _.a=a _.b=b _.r=_.f=_.d=_.c=null _.w=0 _.as=_.Q=_.z=_.y=_.x=null}, -bX:function bX(){this.c=this.b=this.a=null}, -cK:function cK(a){this.a=a}, -bW:function bW(){}, -b9:function b9(a){this.a=a}, -fw(){var s,r,q -if(self.scheduleImmediate!=null)return A.hz() +cg:function cg(){this.c=this.b=this.a=null}, +db:function db(a){this.a=a}, +cf:function cf(){}, +bp:function bp(a){this.a=a}, +h0(){var s,r,q +if(self.scheduleImmediate!=null)return A.i4() if(self.MutationObserver!=null&&self.document!=null){s={} r=self.document.createElement("div") q=self.document.createElement("span") s.a=null -new self.MutationObserver(A.bi(new A.cr(s),1)).observe(r,{childList:true}) -return new A.cq(s,r,q)}else if(self.setImmediate!=null)return A.hA() -return A.hB()}, -fx(a){self.scheduleImmediate(A.bi(new A.cs(t.M.a(a)),0))}, -fy(a){self.setImmediate(A.bi(new A.ct(t.M.a(a)),0))}, -fz(a){t.M.a(a) -A.fG(0,a)}, -fG(a,b){var s=new A.cI() -s.ag(a,b) +new self.MutationObserver(A.aD(new A.cS(s),1)).observe(r,{childList:true}) +return new A.cR(s,r,q)}else if(self.setImmediate!=null)return A.i5() +return A.i6()}, +h1(a){self.scheduleImmediate(A.aD(new A.cT(t.M.a(a)),0))}, +h2(a){self.setImmediate(A.aD(new A.cU(t.M.a(a)),0))}, +h3(a){t.M.a(a) +A.ha(0,a)}, +ey(a,b){return A.hb(a.a/1000|0,b)}, +ha(a,b){var s=new A.bo(!0) +s.ap(a,b) return s}, -cT(a){return new A.bT(new A.q($.o,a.h("q<0>")),a.h("bT<0>"))}, -cP(a,b){a.$2(0,null) +hb(a,b){var s=new A.bo(!1) +s.aq(a,b) +return s}, +dl(a){return new A.cc(new A.v($.n,a.h("v<0>")),a.h("cc<0>"))}, +dh(a,b){a.$2(0,null) b.b=!0 return b.a}, -dt(a,b){A.fY(a,b)}, -cO(a,b){b.W(a)}, -cN(a,b){b.X(A.aw(a),A.at(a))}, -fY(a,b){var s,r,q=new A.cQ(b),p=new A.cR(b) -if(a instanceof A.q)a.a7(q,p,t.z) +e_(a,b){A.ht(a,b)}, +dg(a,b){b.a_(a)}, +df(a,b){b.a0(A.aj(a),A.ag(a))}, +ht(a,b){var s,r,q=new A.di(b),p=new A.dj(b) +if(a instanceof A.v)a.af(q,p,t.z) else{s=t.z -if(a instanceof A.q)a.ae(q,p,s) -else{r=new A.q($.o,t._) +if(a instanceof A.v)a.a3(q,p,s) +else{r=new A.v($.n,t._) r.a=8 r.c=a -r.a7(q,p,s)}}}, -cV(a){var s=function(b,c){return function(d,e){while(true){try{b(d,e) +r.af(q,p,s)}}}, +dp(a){var s=function(b,c){return function(d,e){while(true){try{b(d,e) break}catch(r){e=r d=c}}}}(a,1) -return $.o.ad(new A.cW(s),t.H,t.S,t.z)}, -db(a){var s +return $.n.ak(new A.dq(s),t.H,t.S,t.z)}, +eK(a,b,c){return 0}, +dJ(a){var s if(t.C.b(a)){s=a.gF() -if(s!=null)return s}return B.d}, -h8(a,b){if($.o===B.b)return null +if(s!=null)return s}return B.e}, +hF(a,b){if($.n===B.b)return null return null}, -h9(a,b){if($.o!==B.b)A.h8(a,b) +hG(a,b){if($.n!==B.b)A.hF(a,b) if(b==null)if(t.C.b(a)){b=a.gF() -if(b==null){A.e0(a,B.d) -b=B.d}}else b=B.d -else if(t.C.b(a))A.e0(a,b) -return new A.C(a,b)}, -dn(a,b,c){var s,r,q,p,o={},n=o.a=a +if(b==null){A.eu(a,B.e) +b=B.e}}else b=B.e +else if(t.C.b(a))A.eu(a,b) +return new A.H(a,b)}, +dV(a,b,c){var s,r,q,p,o={},n=o.a=a for(s=t._;r=n.a,(r&4)!==0;n=a){a=s.a(n.c) -o.a=a}if(n===b){s=A.fp() -b.N(new A.C(new A.N(!0,n,null,"Cannot complete a future with itself"),s)) +o.a=a}if(n===b){s=A.fS() +b.O(new A.H(new A.Q(!0,n,null,"Cannot complete a future with itself"),s)) return}q=b.a&1 s=n.a=r|q if((s&24)===0){p=t.F.a(b.c) b.a=b.a&1|4 b.c=n -n.a6(p) +n.ad(p) return}if(!c)if(b.c==null)n=(s&16)===0||q!==0 else n=!1 else n=!0 if(n){p=b.H() b.G(o.a) -A.ak(b,p) +A.as(b,p) return}b.a^=2 -A.c0(null,null,b.b,t.M.a(new A.cy(o,b)))}, -ak(a,b){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d={},c=d.a=a +A.cm(null,null,b.b,t.M.a(new A.cZ(o,b)))}, +as(a,b){var s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d={},c=d.a=a for(s=t.n,r=t.F;;){q={} p=c.a o=(p&16)===0 n=!o if(b==null){if(n&&(p&1)===0){m=s.a(c.c) -A.dx(m.a,m.b)}return}q.a=b +A.dm(m.a,m.b)}return}q.a=b l=b.a for(c=b;l!=null;c=l,l=k){c.a=null -A.ak(d.a,c) +A.as(d.a,c) q.a=l k=l.a}p=d.a j=p.c @@ -1386,17 +1401,17 @@ if(i){h=c.b.b if(n){p=p.b===h p=!(p||p)}else p=!1 if(p){s.a(j) -A.dx(j.a,j.b) -return}g=$.o -if(g!==h)$.o=h +A.dm(j.a,j.b) +return}g=$.n +if(g!==h)$.n=h else g=null c=c.c -if((c&15)===8)new A.cC(q,d,n).$0() -else if(o){if((c&1)!==0)new A.cB(q,j).$0()}else if((c&2)!==0)new A.cA(d,q).$0() -if(g!=null)$.o=g +if((c&15)===8)new A.d2(q,d,n).$0() +else if(o){if((c&1)!==0)new A.d1(q,j).$0()}else if((c&2)!==0)new A.d0(d,q).$0() +if(g!=null)$.n=g c=q.c -if(c instanceof A.q){p=q.a.$ti -p=p.h("J<2>").b(c)||!p.y[1].b(c)}else p=!1 +if(c instanceof A.v){p=q.a.$ti +p=p.h("M<2>").b(c)||!p.y[1].b(c)}else p=!1 if(p){f=q.a.b if((c.a&24)!==0){e=r.a(f.c) f.c=null @@ -1404,7 +1419,7 @@ b=f.I(e) f.a=c.a&30|f.a&1 f.c=c.c d.a=c -continue}else A.dn(c,f,!0) +continue}else A.dV(c,f,!0) return}}f=q.a.b e=r.a(f.c) f.c=null @@ -1417,374 +1432,475 @@ f.c=p}else{s.a(p) f.a=f.a&1|16 f.c=p}d.a=f c=f}}, -ho(a,b){var s -if(t.Q.b(a))return b.ad(a,t.z,t.K,t.l) +hV(a,b){var s +if(t.Q.b(a))return b.ak(a,t.z,t.K,t.l) s=t.v if(s.b(a))return s.a(a) -throw A.i(A.dP(a,"onError",u.c))}, -hm(){var s,r -for(s=$.aq;s!=null;s=$.aq){$.bh=null +throw A.e(A.eh(a,"onError",u.c))}, +hT(){var s,r +for(s=$.aA;s!=null;s=$.aA){$.bw=null r=s.b -$.aq=r -if(r==null)$.bg=null +$.aA=r +if(r==null)$.bv=null s.a.$0()}}, -hu(){$.dv=!0 -try{A.hm()}finally{$.bh=null -$.dv=!1 -if($.aq!=null)$.dN().$1(A.eB())}}, -ez(a){var s=new A.bU(a),r=$.bg -if(r==null){$.aq=$.bg=s -if(!$.dv)$.dN().$1(A.eB())}else $.bg=r.b=s}, -hr(a){var s,r,q,p=$.aq -if(p==null){A.ez(a) -$.bh=$.bg -return}s=new A.bU(a) -r=$.bh +i_(){$.e1=!0 +try{A.hT()}finally{$.bw=null +$.e1=!1 +if($.aA!=null)$.ef().$1(A.f4())}}, +f2(a){var s=new A.cd(a),r=$.bv +if(r==null){$.aA=$.bv=s +if(!$.e1)$.ef().$1(A.f4())}else $.bv=r.b=s}, +hX(a){var s,r,q,p=$.aA +if(p==null){A.f2(a) +$.bw=$.bv +return}s=new A.cd(a) +r=$.bw if(r==null){s.b=p -$.aq=$.bh=s}else{q=r.b +$.aA=$.bw=s}else{q=r.b s.b=q -$.bh=r.b=s -if(q==null)$.bg=s}}, -i1(a,b){A.cX(a,"stream",t.K) -return new A.bZ(b.h("bZ<0>"))}, -dx(a,b){A.hr(new A.cU(a,b))}, -ex(a,b,c,d,e){var s,r=$.o +$.bw=r.b=s +if(q==null)$.bv=s}}, +iA(a,b){A.dr(a,"stream",t.K) +return new A.ci(b.h("ci<0>"))}, +fT(a,b){var s=$.n +if(s===B.b)return A.ey(a,t.d.a(b)) +return A.ey(a,t.d.a(s.aH(b,t.p)))}, +dm(a,b){A.hX(new A.dn(a,b))}, +f_(a,b,c,d,e){var s,r=$.n if(r===c)return d.$0() -$.o=c +$.n=c s=r try{r=d.$0() -return r}finally{$.o=s}}, -hq(a,b,c,d,e,f,g){var s,r=$.o +return r}finally{$.n=s}}, +f0(a,b,c,d,e,f,g){var s,r=$.n if(r===c)return d.$1(e) -$.o=c +$.n=c s=r try{r=d.$1(e) -return r}finally{$.o=s}}, -hp(a,b,c,d,e,f,g,h,i){var s,r=$.o +return r}finally{$.n=s}}, +hW(a,b,c,d,e,f,g,h,i){var s,r=$.n if(r===c)return d.$2(e,f) -$.o=c +$.n=c s=r try{r=d.$2(e,f) -return r}finally{$.o=s}}, -c0(a,b,c,d){t.M.a(d) -if(B.b!==c){d=c.ar(d) -d=d}A.ez(d)}, -cr:function cr(a){this.a=a}, -cq:function cq(a,b,c){this.a=a +return r}finally{$.n=s}}, +cm(a,b,c,d){t.M.a(d) +if(B.b!==c){d=c.aG(d) +d=d}A.f2(d)}, +cS:function cS(a){this.a=a}, +cR:function cR(a,b,c){this.a=a this.b=b this.c=c}, -cs:function cs(a){this.a=a}, -ct:function ct(a){this.a=a}, -cI:function cI(){}, -cJ:function cJ(a,b){this.a=a +cT:function cT(a){this.a=a}, +cU:function cU(a){this.a=a}, +bo:function bo(a){this.a=a +this.b=null +this.c=0}, +da:function da(a,b){this.a=a this.b=b}, -bT:function bT(a,b){this.a=a +d9:function d9(a,b,c,d){var _=this +_.a=a +_.b=b +_.c=c +_.d=d}, +cc:function cc(a,b){this.a=a this.b=!1 this.$ti=b}, -cQ:function cQ(a){this.a=a}, -cR:function cR(a){this.a=a}, -cW:function cW(a){this.a=a}, -C:function C(a,b){this.a=a +di:function di(a){this.a=a}, +dj:function dj(a){this.a=a}, +dq:function dq(a){this.a=a}, +bn:function bn(a,b){var _=this +_.a=a +_.e=_.d=_.c=_.b=null +_.$ti=b}, +aw:function aw(a,b){this.a=a +this.$ti=b}, +H:function H(a,b){this.a=a this.b=b}, -bV:function bV(){}, -aY:function aY(a,b){this.a=a +ce:function ce(){}, +b9:function b9(a,b){this.a=a this.$ti=b}, -a5:function a5(a,b,c,d,e){var _=this +a8:function a8(a,b,c,d,e){var _=this _.a=null _.b=a _.c=b _.d=c _.e=d _.$ti=e}, -q:function q(a,b){var _=this +v:function v(a,b){var _=this _.a=0 _.b=a _.c=null _.$ti=b}, -cv:function cv(a,b){this.a=a +cW:function cW(a,b){this.a=a this.b=b}, -cz:function cz(a,b){this.a=a +d_:function d_(a,b){this.a=a this.b=b}, -cy:function cy(a,b){this.a=a +cZ:function cZ(a,b){this.a=a this.b=b}, -cx:function cx(a,b){this.a=a +cY:function cY(a,b){this.a=a this.b=b}, -cw:function cw(a,b){this.a=a +cX:function cX(a,b){this.a=a this.b=b}, -cC:function cC(a,b,c){this.a=a +d2:function d2(a,b,c){this.a=a this.b=b this.c=c}, -cD:function cD(a,b){this.a=a +d3:function d3(a,b){this.a=a this.b=b}, -cE:function cE(a){this.a=a}, -cB:function cB(a,b){this.a=a +d4:function d4(a){this.a=a}, +d1:function d1(a,b){this.a=a this.b=b}, -cA:function cA(a,b){this.a=a +d0:function d0(a,b){this.a=a this.b=b}, -bU:function bU(a){this.a=a +cd:function cd(a){this.a=a this.b=null}, -bZ:function bZ(a){this.$ti=a}, -be:function be(){}, -cU:function cU(a,b){this.a=a +ci:function ci(a){this.$ti=a}, +bu:function bu(){}, +dn:function dn(a,b){this.a=a this.b=b}, -bY:function bY(){}, -cH:function cH(a,b){this.a=a +ch:function ch(){}, +d7:function d7(a,b){this.a=a this.b=b}, -ea(a,b){var s=a[b] +d8:function d8(a,b,c){this.a=a +this.b=b +this.c=c}, +eE(a,b){var s=a[b] return s===a?null:s}, -dq(a,b,c){if(c==null)a[b]=a +dX(a,b,c){if(c==null)a[b]=a else a[b]=c}, -dp(){var s=Object.create(null) -A.dq(s,"",s) +dW(){var s=Object.create(null) +A.dX(s,"",s) delete s[""] return s}, -di(a,b,c){return b.h("@<0>").j(c).h("dX<1,2>").a(A.hH(a,new A.a2(b.h("@<0>").j(c).h("a2<1,2>"))))}, -dh(a,b){return new A.a2(a.h("@<0>").j(b).h("a2<1,2>"))}, -dY(a){var s,r -if(A.dG(a))return"{...}" -s=new A.bN("") +C(a,b,c){return b.h("@<0>").k(c).h("eq<1,2>").a(A.id(a,new A.a6(b.h("@<0>").k(c).h("a6<1,2>"))))}, +dO(a,b){return new A.a6(a.h("@<0>").k(b).h("a6<1,2>"))}, +dP(a){var s,r +if(A.ea(a))return"{...}" +s=new A.c5("") try{r={} -B.a.u($.B,a) +B.a.u($.G,a) s.a+="{" r.a=!0 -a.E(0,new A.cd(r,s)) -s.a+="}"}finally{if(0>=$.B.length)return A.x($.B,-1) -$.B.pop()}r=s.a +a.E(0,new A.cA(r,s)) +s.a+="}"}finally{if(0>=$.G.length)return A.y($.G,-1) +$.G.pop()}r=s.a return r.charCodeAt(0)==0?r:r}, -b_:function b_(){}, -al:function al(a){var _=this +bb:function bb(){}, +at:function at(a){var _=this _.a=0 _.e=_.d=_.c=_.b=null _.$ti=a}, -b0:function b0(a,b){this.a=a +bc:function bc(a,b){this.a=a this.$ti=b}, -b1:function b1(a,b,c){var _=this +bd:function bd(a,b,c){var _=this _.a=a _.b=b _.c=0 _.d=null _.$ti=c}, +f:function f(){}, k:function k(){}, -e:function e(){}, -cc:function cc(a){this.a=a}, -cd:function cd(a,b){this.a=a +cz:function cz(a){this.a=a}, +cA:function cA(a,b){this.a=a this.b=b}, -f5(a,b){a=A.r(a,new Error()) -if(a==null)a=A.bf(a) +fz(a,b){a=A.w(a,new Error()) +if(a==null)a=A.ay(a) a.stack=b.i(0) throw a}, -fe(a,b,c,d){var s,r=c?J.fa(a,d):J.f9(a,d) +fH(a,b,c,d){var s,r=c?J.fE(a,d):J.fD(a,d) if(a!==0&&b!=null)for(s=0;s")) -for(s=a.length,r=0;r")) +for(s=a.length,r=0;r")) -for(s=a.gp(a);s.l();)B.a.u(r,s.gm()) +fG(a,b){var s,r=A.K([],b.h("x<0>")) +for(s=a.gp(a);s.m();)B.a.u(r,s.gn()) return r}, -e4(a,b,c){var s=J.eV(b) -if(!s.l())return a -if(c.length===0){do a+=A.n(s.gm()) -while(s.l())}else{a+=A.n(s.gm()) -while(s.l())a=a+c+A.n(s.gm())}return a}, -fp(){return A.at(new Error())}, -f4(a){var s=Math.abs(a),r=a<0?"-":"" +ex(a,b,c){var s=J.dH(b) +if(!s.m())return a +if(c.length===0){do a+=A.m(s.gn()) +while(s.m())}else{a+=A.m(s.gn()) +while(s.m())a=a+c+A.m(s.gn())}return a}, +fS(){return A.ag(new Error())}, +fy(a){var s=Math.abs(a),r=a<0?"-":"" if(s>=1000)return""+a if(s>=100)return r+"0"+s if(s>=10)return r+"00"+s return r+"000"+s}, -dV(a){if(a>=100)return""+a +en(a){if(a>=100)return""+a if(a>=10)return"0"+a return"00"+a}, -bp(a){if(a>=10)return""+a +bF(a){if(a>=10)return""+a return"0"+a}, -c4(a){if(typeof a=="number"||A.cS(a)||a==null)return J.ax(a) +cr(a){if(typeof a=="number"||A.dk(a)||a==null)return J.aH(a) if(typeof a=="string")return JSON.stringify(a) -return A.e_(a)}, -f6(a,b){A.cX(a,"error",t.K) -A.cX(b,"stackTrace",t.l) -A.f5(a,b)}, -bk(a){return new A.bj(a)}, -ay(a,b){return new A.N(!1,null,b,a)}, -dP(a,b,c){return new A.N(!0,a,b,c)}, -e1(a,b,c,d,e){return new A.aT(b,c,!0,a,d,"Invalid value")}, -f7(a,b,c,d){return new A.bq(b,!0,a,d,"Index out of range")}, -fq(a){return new A.aX(a)}, -e6(a){return new A.bP(a)}, -e3(a){return new A.bL(a)}, -af(a){return new A.bn(a)}, -f8(a,b,c){var s,r -if(A.dG(a)){if(b==="("&&c===")")return"(...)" -return b+"..."+c}s=A.H([],t.s) -B.a.u($.B,a) -try{A.hl(a,s)}finally{if(0>=$.B.length)return A.x($.B,-1) -$.B.pop()}r=A.e4(b,t.R.a(s),", ")+c +return A.et(a)}, +fA(a,b){A.dr(a,"error",t.K) +A.dr(b,"stackTrace",t.l) +A.fz(a,b)}, +bA(a){return new A.bz(a)}, +ak(a,b){return new A.Q(!1,null,b,a)}, +eh(a,b,c){return new A.Q(!0,a,b,c)}, +ev(a,b,c,d,e){return new A.b3(b,c,!0,a,d,"Invalid value")}, +fB(a,b,c,d){return new A.bH(b,!0,a,d,"Index out of range")}, +cK(a){return new A.b8(a)}, +eA(a){return new A.c8(a)}, +dT(a){return new A.c3(a)}, +am(a){return new A.bD(a)}, +fC(a,b,c){var s,r +if(A.ea(a)){if(b==="("&&c===")")return"(...)" +return b+"..."+c}s=A.K([],t.s) +B.a.u($.G,a) +try{A.hS(a,s)}finally{if(0>=$.G.length)return A.y($.G,-1) +$.G.pop()}r=A.ex(b,t.R.a(s),", ")+c return r.charCodeAt(0)==0?r:r}, -dW(a,b,c){var s,r -if(A.dG(a))return b+"..."+c -s=new A.bN(b) -B.a.u($.B,a) +eo(a,b,c){var s,r +if(A.ea(a))return b+"..."+c +s=new A.c5(b) +B.a.u($.G,a) try{r=s -r.a=A.e4(r.a,a,", ")}finally{if(0>=$.B.length)return A.x($.B,-1) -$.B.pop()}s.a+=c +r.a=A.ex(r.a,a,", ")}finally{if(0>=$.G.length)return A.y($.G,-1) +$.G.pop()}s.a+=c r=s.a return r.charCodeAt(0)==0?r:r}, -hl(a,b){var s,r,q,p,o,n,m,l=a.gp(a),k=0,j=0 +hS(a,b){var s,r,q,p,o,n,m,l=a.gp(a),k=0,j=0 for(;;){if(!(k<80||j<3))break -if(!l.l())return -s=A.n(l.gm()) +if(!l.m())return +s=A.m(l.gn()) B.a.u(b,s) -k+=s.length+2;++j}if(!l.l()){if(j<=5)return -if(0>=b.length)return A.x(b,-1) +k+=s.length+2;++j}if(!l.m()){if(j<=5)return +if(0>=b.length)return A.y(b,-1) r=b.pop() -if(0>=b.length)return A.x(b,-1) -q=b.pop()}else{p=l.gm();++j -if(!l.l()){if(j<=4){B.a.u(b,A.n(p)) -return}r=A.n(p) -if(0>=b.length)return A.x(b,-1) +if(0>=b.length)return A.y(b,-1) +q=b.pop()}else{p=l.gn();++j +if(!l.m()){if(j<=4){B.a.u(b,A.m(p)) +return}r=A.m(p) +if(0>=b.length)return A.y(b,-1) q=b.pop() -k+=r.length+2}else{o=l.gm();++j -for(;l.l();p=o,o=n){n=l.gm();++j +k+=r.length+2}else{o=l.gn();++j +for(;l.m();p=o,o=n){n=l.gn();++j if(j>100){for(;;){if(!(k>75&&j>3))break -if(0>=b.length)return A.x(b,-1) +if(0>=b.length)return A.y(b,-1) k-=b.pop().length+2;--j}B.a.u(b,"...") -return}}q=A.n(p) -r=A.n(o) +return}}q=A.m(p) +r=A.m(o) k+=r.length+q.length+4}}if(j>b.length+2){k+=5 m="..."}else m=null for(;;){if(!(k>80&&b.length>3))break -if(0>=b.length)return A.x(b,-1) +if(0>=b.length)return A.y(b,-1) k-=b.pop().length+2 if(m==null){k+=5 m="..."}}if(m!=null)B.a.u(b,m) B.a.u(b,q) B.a.u(b,r)}, -dk(a,b,c,d){var s -if(B.c===c){s=B.e.gn(a) -b=J.M(b) -return A.dm(A.W(A.W($.d9(),s),b))}if(B.c===d){s=B.e.gn(a) -b=J.M(b) -c=J.M(c) -return A.dm(A.W(A.W(A.W($.d9(),s),b),c))}s=B.e.gn(a) -b=J.M(b) -c=J.M(c) -d=J.M(d) -d=A.dm(A.W(A.W(A.W(A.W($.d9(),s),b),c),d)) +er(a,b,c,d,e){return new A.a4(a,b.h("@<0>").k(c).k(d).k(e).h("a4<1,2,3,4>"))}, +dR(a,b,c,d){var s +if(B.d===c){s=B.c.gq(a) +b=J.W(b) +return A.dU(A.a_(A.a_($.dG(),s),b))}if(B.d===d){s=B.c.gq(a) +b=J.W(b) +c=J.W(c) +return A.dU(A.a_(A.a_(A.a_($.dG(),s),b),c))}s=B.c.gq(a) +b=J.W(b) +c=J.W(c) +d=J.W(d) +d=A.dU(A.a_(A.a_(A.a_(A.a_($.dG(),s),b),c),d)) return d}, -bo:function bo(a,b,c){this.a=a +bE:function bE(a,b,c){this.a=a this.b=b this.c=c}, +bG:function bG(a){this.a=a}, l:function l(){}, -bj:function bj(a){this.a=a}, -Q:function Q(){}, -N:function N(a,b,c,d){var _=this +bz:function bz(a){this.a=a}, +T:function T(){}, +Q:function Q(a,b,c,d){var _=this _.a=a _.b=b _.c=c _.d=d}, -aT:function aT(a,b,c,d,e,f){var _=this +b3:function b3(a,b,c,d,e,f){var _=this _.e=a _.f=b _.a=c _.b=d _.c=e _.d=f}, -bq:function bq(a,b,c,d,e){var _=this +bH:function bH(a,b,c,d,e){var _=this _.f=a _.a=b _.b=c _.c=d _.d=e}, -aX:function aX(a){this.a=a}, -bP:function bP(a){this.a=a}, -bL:function bL(a){this.a=a}, -bn:function bn(a){this.a=a}, -aV:function aV(){}, -cu:function cu(a){this.a=a}, +b8:function b8(a){this.a=a}, +c8:function c8(a){this.a=a}, +c3:function c3(a){this.a=a}, +bD:function bD(a){this.a=a}, +bZ:function bZ(){}, +b5:function b5(){}, +cV:function cV(a){this.a=a}, b:function b(){}, -u:function u(a,b,c){this.a=a +p:function p(a,b,c){this.a=a this.b=b this.$ti=c}, -w:function w(){}, +q:function q(){}, d:function d(){}, -c_:function c_(){}, -bN:function bN(a){this.a=a}, -ce:function ce(a){this.a=a}, -fZ(a,b,c){t.Z.a(a) -if(A.a7(c)>=1)return a.$1(b) +cj:function cj(){}, +c5:function c5(a){this.a=a}, +cB:function cB(a){this.a=a}, +hu(a,b,c){t.Z.a(a) +if(A.a1(c)>=1)return a.$1(b) return a.$0()}, -h_(a,b,c,d,e){t.Z.a(a) -A.a7(e) +hv(a,b,c,d,e){t.Z.a(a) +A.a1(e) if(e>=3)return a.$3(b,c,d) if(e===2)return a.$2(b,c) if(e===1)return a.$1(b) return a.$0()}, -ew(a){return a==null||A.cS(a)||typeof a=="number"||typeof a=="string"||t.U.b(a)||t.E.b(a)||t.x.b(a)||t.W.b(a)||t.D.b(a)||t.k.b(a)||t.w.b(a)||t.B.b(a)||t.q.b(a)||t.J.b(a)||t.Y.b(a)}, -dH(a){if(A.ew(a))return a -return new A.d3(new A.al(t.A)).$1(a)}, -hU(a,b){var s=new A.q($.o,b.h("q<0>")),r=new A.aY(s,b.h("aY<0>")) -a.then(A.bi(new A.d6(r,b),1),A.bi(new A.d7(r),1)) +eY(a){return a==null||A.dk(a)||typeof a=="number"||typeof a=="string"||t.D.b(a)||t.bX.b(a)||t.ca.b(a)||t.W.b(a)||t.a.b(a)||t.k.b(a)||t.x.b(a)||t.B.b(a)||t.q.b(a)||t.J.b(a)||t.Y.b(a)}, +by(a){if(A.eY(a))return a +return new A.dB(new A.at(t.A)).$1(a)}, +f9(a,b){var s=new A.v($.n,b.h("v<0>")),r=new A.b9(s,b.h("b9<0>")) +a.then(A.aD(new A.dE(r,b),1),A.aD(new A.dF(r),1)) return s}, -ev(a){return a==null||typeof a==="boolean"||typeof a==="number"||typeof a==="string"||a instanceof Int8Array||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array||a instanceof ArrayBuffer||a instanceof DataView}, -dA(a){if(A.ev(a))return a -return new A.cY(new A.al(t.A)).$1(a)}, -d3:function d3(a){this.a=a}, -d6:function d6(a,b){this.a=a +eX(a){return a==null||typeof a==="boolean"||typeof a==="number"||typeof a==="string"||a instanceof Int8Array||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array||a instanceof ArrayBuffer||a instanceof DataView}, +e6(a){if(A.eX(a))return a +return new A.ds(new A.at(t.A)).$1(a)}, +dB:function dB(a){this.a=a}, +dE:function dE(a,b){this.a=a +this.b=b}, +dF:function dF(a){this.a=a}, +ds:function ds(a){this.a=a}, +iw(){var s=$.aG() +s.a=t.e.a(A.i7()) +s.saM(A.i8())}, +ij(a){var s,r,q,p,o,n=null,m="threshold" +if(!t.f.b(a))return +switch(a.j(0,"op")){case"watch":s=A.cl(a.j(0,"ticker")) +r=s==null?n:s.toLowerCase() +if(r==null)r="btc" +q=A.ck(a.j(0,m)) +if(q==null)q=n +s=$.bx +if(s!=null)s.Y() +A.ab(A.C(["kind","watching","ticker",r,"threshold",q],t.N,t.X)) +A.eZ(r,q) +$.bx=A.fT(B.r,new A.dw(r,q)) +break +case"stop":s=$.bx +if(s!=null)s.Y() +$.bx=null +A.ab(A.C(["kind","stopped"],t.N,t.X)) +break +case"check":s=A.cl(a.j(0,"ticker")) +r=s==null?n:s.toLowerCase() +if(r==null)r="btc" +q=A.ck(a.j(0,m)) +if(q==null)q=n +s=t.N +p=t.X +A.ab(A.C(["kind","task-start","ticker",r],s,p)) +o=A.e3(r) +A.ab(A.C(["kind","task-done","ticker",r,"price",o,"below",q!=null&&o")),r=r.h("f.E"),q=0;s.m();){p=s.d +if(p==null)p=r.a(p) +q=q*31+p&2147483647}return q}, +e8(a,b){return A.ii(a,t.h.a(b))}, +ii(a,b){var s=0,r=A.dl(t.y),q,p,o,n,m,l,k,j +var $async$e8=A.dp(function(c,d){if(c===1)return A.df(d,r) +for(;;)switch(s){case 0:j=b==null +if(!j&&J.P(b.j(0,"fail"),!0)){q=!1 +s=1 +break}p=A.cl(j?null:b.j(0,"ticker")) +o=p==null?null:p.toLowerCase() +if(o==null)o="btc" +n=A.ck(j?null:b.j(0,"threshold")) +if(n==null)n=null +for(m=0,l=0;l<2e6;++l)m+=l +j=t.N +p=t.X +A.ab(A.C(["kind","task-start","ticker",o,"threshold",n],j,p)) +k=A.e3(o) +A.ab(A.C(["kind","task-done","ticker",o,"price",k,"below",n!=null&&k").a(b) -a.$flags&1&&A.dK(a,"addAll",2) -for(s=b.gp(b);s.l();)a.push(s.gm())}, -K(a,b,c){var s=A.ao(a) -return new A.P(a,s.j(c).h("1(2)").a(b),s.h("@<1>").j(c).h("P<1,2>"))}, -J(a,b){if(!(b").a(b) +a.$flags&1&&A.ec(a,"addAll",2) +for(s=b.gp(b);s.m();)a.push(s.gn())}, +L(a,b,c){var s=A.ax(a) +return new A.S(a,s.k(c).h("1(2)").a(b),s.h("@<1>").k(c).h("S<1,2>"))}, +K(a,b){if(!(b"))}, -gn(a){return A.bI(a)}, -gk(a){return a.length}, -v(a,b,c){A.ao(a).c.a(c) -a.$flags&2&&A.dK(a) -if(!(b>=0&&b"))}, +gq(a){return A.c0(a)}, +gl(a){return a.length}, +j(a,b){if(!(b>=0&&b=0&&b=p){r.d=null return!1}r.d=q[s] r.c=s+1 return!0}, -$iD:1} -J.bv.prototype={ +$iz:1} +J.bM.prototype={ i(a){if(a===0&&1/a<0)return"-0.0" else return""+a}, -gn(a){var s,r,q,p,o=a|0 +gq(a){var s,r,q,p,o=a|0 if(a===o)return o&536870911 s=Math.abs(a) r=Math.log(s)/0.6931471805599453|0 q=Math.pow(2,r) p=s<1?s/q:q/s return((p*9007199254740992|0)+(p*3542243181176521|0))*599197+r*1259&536870911}, -ap(a,b){var s -if(a>0)s=this.ao(a,b) +al(a,b){var s=a%b +if(s===0)return 0 +if(s>0)return s +return s+b}, +ao(a,b){if((a|0)===a)if(b>=1)return a/b|0 +return this.ae(a,b)}, +X(a,b){return(a|0)===a?a/b|0:this.ae(a,b)}, +ae(a,b){var s=a/b +if(s>=-2147483648&&s<=2147483647)return s|0 +if(s>0){if(s!==1/0)return Math.floor(s)}else if(s>-1/0)return Math.ceil(s) +throw A.e(A.cK("Result of truncating division is "+A.m(s)+": "+A.m(a)+" ~/ "+b))}, +aE(a,b){var s +if(a>0)s=this.aD(a,b) else{s=b>31?31:b s=a>>s>>>0}return s}, -ao(a,b){return b>31?0:a>>>b}, -gq(a){return A.aa(t.o)}, -$if:1, -$iad:1} -J.aD.prototype={ -gq(a){return A.aa(t.S)}, +aD(a,b){return b>31?0:a>>>b}, +gt(a){return A.ae(t.o)}, $ih:1, +$iai:1} +J.aP.prototype={ +gt(a){return A.ae(t.S)}, +$ij:1, $ia:1} -J.bu.prototype={ -gq(a){return A.aa(t.i)}, -$ih:1} -J.aF.prototype={ +J.bL.prototype={ +gt(a){return A.ae(t.i)}, +$ij:1} +J.an.prototype={ +am(a,b){var s,r +if(0>=b)return"" +if(b===1||a.length===0)return a +if(b!==b>>>0)throw A.e(B.q) +for(s=a,r="";;){if((b&1)===1)r=s+r +b=b>>>1 +if(b===0)break +s+=s}return r}, +aP(a,b,c){var s=b-a.length +if(s<=0)return a +return this.am(c,s)+a}, i(a){return a}, -gn(a){var s,r,q +gq(a){var s,r,q for(s=a.length,r=0,q=0;q>6}r=r+((r&67108863)<<3)&536870911 r^=r>>11 return r+((r&16383)<<15)&536870911}, -gq(a){return A.aa(t.N)}, -gk(a){return a.length}, -$ih:1, -$iv:1} -A.aj.prototype={ +gt(a){return A.ae(t.N)}, +gl(a){return a.length}, +$ij:1, +$iu:1} +A.ar.prototype={ gp(a){var s=this.a -return new A.aA(s.gp(s),A.G(this).h("aA<1,2>"))}, -gk(a){var s=this.a -return s.gk(s)}, +return new A.aJ(s.gp(s),A.r(this).h("aJ<1,2>"))}, +gl(a){var s=this.a +return s.gl(s)}, i(a){return this.a.i(0)}} -A.aA.prototype={ -l(){return this.a.l()}, -gm(){return this.$ti.y[1].a(this.a.gm())}, -$iD:1} -A.a_.prototype={} -A.aZ.prototype={$ic:1} -A.a0.prototype={ -a9(a,b,c){return new A.a0(this.a,this.$ti.h("@<1,2>").j(b).j(c).h("a0<1,2,3,4>"))}, -t(a,b){return this.$ti.h("4?").a(this.a.t(0,b))}, -E(a,b){this.a.E(0,new A.c3(this,this.$ti.h("~(3,4)").a(b)))}, -gC(){var s=this.$ti -return A.eZ(this.a.gC(),s.c,s.y[2])}, -gk(a){var s=this.a -return s.gk(s)}, -gD(){var s=this.a.gD(),r=this.$ti.h("u<3,4>"),q=A.G(s) -return A.dj(s,q.j(r).h("1(b.E)").a(new A.c2(this)),q.h("b.E"),r)}} -A.c3.prototype={ +A.aJ.prototype={ +m(){return this.a.m()}, +gn(){return this.$ti.y[1].a(this.a.gn())}, +$iz:1} +A.a3.prototype={} +A.ba.prototype={$ic:1} +A.a4.prototype={ +Z(a,b,c){return new A.a4(this.a,this.$ti.h("@<1,2>").k(b).k(c).h("a4<1,2,3,4>"))}, +j(a,b){return this.$ti.h("4?").a(this.a.j(0,b))}, +E(a,b){this.a.E(0,new A.cq(this,this.$ti.h("~(3,4)").a(b)))}, +gB(){var s=this.$ti +return A.fs(this.a.gB(),s.c,s.y[2])}, +gl(a){var s=this.a +return s.gl(s)}, +gD(){var s=this.a.gD(),r=this.$ti.h("p<3,4>"),q=A.r(s) +return A.dQ(s,q.k(r).h("1(b.E)").a(new A.cp(this)),q.h("b.E"),r)}} +A.cq.prototype={ $2(a,b){var s=this.a.$ti s.c.a(a) s.y[1].a(b) this.b.$2(s.y[2].a(a),s.y[3].a(b))}, $S(){return this.a.$ti.h("~(1,2)")}} -A.c2.prototype={ +A.cp.prototype={ $1(a){var s=this.a.$ti -s.h("u<1,2>").a(a) -return new A.u(s.y[2].a(a.a),s.y[3].a(a.b),s.h("u<3,4>"))}, -$S(){return this.a.$ti.h("u<3,4>(u<1,2>)")}} -A.bx.prototype={ +s.h("p<1,2>").a(a) +return new A.p(s.y[2].a(a.a),s.y[3].a(a.b),s.h("p<3,4>"))}, +$S(){return this.a.$ti.h("p<3,4>(p<1,2>)")}} +A.bP.prototype={ i(a){return"LateInitializationError: "+this.a}} -A.cg.prototype={} +A.aK.prototype={ +gl(a){return this.a.length}, +j(a,b){var s=this.a +if(!(b>=0&&b"))}, -K(a,b,c){var s=this.$ti -return new A.P(this,s.j(c).h("1(L.E)").a(b),s.h("@").j(c).h("P<1,2>"))}} -A.a3.prototype={ -gm(){var s=this.d +A.O.prototype={ +gp(a){return new A.R(this,this.gl(0),this.$ti.h("R"))}, +L(a,b,c){var s=this.$ti +return new A.S(this,s.k(c).h("1(O.E)").a(b),s.h("@").k(c).h("S<1,2>"))}} +A.R.prototype={ +gn(){var s=this.d return s==null?this.$ti.c.a(s):s}, -l(){var s,r=this,q=r.a,p=J.eE(q),o=p.gk(q) -if(r.b!==o)throw A.i(A.af(q)) +m(){var s,r=this,q=r.a,p=J.f6(q),o=p.gl(q) +if(r.b!==o)throw A.e(A.am(q)) s=r.c if(s>=o){r.d=null -return!1}r.d=p.J(q,s);++r.c +return!1}r.d=p.K(q,s);++r.c return!0}, -$iD:1} -A.a4.prototype={ +$iz:1} +A.a7.prototype={ gp(a){var s=this.a -return new A.aN(s.gp(s),this.b,A.G(this).h("aN<1,2>"))}, -gk(a){var s=this.a -return s.gk(s)}} -A.aB.prototype={$ic:1} -A.aN.prototype={ -l(){var s=this,r=s.b -if(r.l()){s.a=s.c.$1(r.gm()) +return new A.aY(s.gp(s),this.b,A.r(this).h("aY<1,2>"))}, +gl(a){var s=this.a +return s.gl(s)}} +A.aN.prototype={$ic:1} +A.aY.prototype={ +m(){var s=this,r=s.b +if(r.m()){s.a=s.c.$1(r.gn()) return!0}s.a=null return!1}, -gm(){var s=this.a +gn(){var s=this.a return s==null?this.$ti.y[1].a(s):s}, +$iz:1} +A.S.prototype={ +gl(a){return J.dI(this.a)}, +K(a,b){return this.b.$1(J.fo(this.a,b))}} +A.A.prototype={} +A.b7.prototype={} +A.aq.prototype={} +A.bk.prototype={$r:"+(1,2)",$s:1} +A.bl.prototype={$r:"+inputData,requestId,taskName(1,2,3)",$s:2} +A.aL.prototype={ +Z(a,b,c){var s=A.r(this) +return A.er(this,s.c,s.y[1],b,c)}, +i(a){return A.dP(this)}, +gD(){return new A.aw(this.aI(),A.r(this).h("aw>"))}, +aI(){var s=this +return function(){var r=0,q=1,p=[],o,n,m,l,k +return function $async$gD(a,b,c){if(b===1){p.push(c) +r=q}for(;;)switch(r){case 0:o=s.gB(),o=o.gp(o),n=A.r(s),m=n.y[1],n=n.h("p<1,2>") +case 2:if(!o.m()){r=3 +break}l=o.gn() +k=s.j(0,l) +r=4 +return a.b=new A.p(l,k==null?m.a(k):k,n),1 +case 4:r=2 +break +case 3:return 0 +case 1:return a.c=p.at(-1),3}}}}, $iD:1} -A.P.prototype={ -gk(a){return J.da(this.a)}, -J(a,b){return this.b.$1(J.eU(this.a,b))}} -A.y.prototype={} -A.b6.prototype={$r:"+(1,2)",$s:1} -A.b7.prototype={$r:"+inputData,requestId,taskName(1,2,3)",$s:2} -A.aU.prototype={} -A.ch.prototype={ +A.aM.prototype={ +gl(a){return this.b.length}, +gac(){var s=this.$keys +if(s==null){s=Object.keys(this.a) +this.$keys=s}return s}, +J(a){if(typeof a!="string")return!1 +if("__proto__"===a)return!1 +return this.a.hasOwnProperty(a)}, +j(a,b){if(!this.J(b))return null +return this.b[this.a[b]]}, +E(a,b){var s,r,q,p +this.$ti.h("~(1,2)").a(b) +s=this.gac() +r=this.b +for(q=s.length,p=0;p"))}} +A.be.prototype={ +gl(a){return this.a.length}, +gp(a){var s=this.a +return new A.bf(s,s.length,this.$ti.h("bf<1>"))}} +A.bf.prototype={ +gn(){var s=this.d +return s==null?this.$ti.c.a(s):s}, +m(){var s=this,r=s.c +if(r>=s.b){s.d=null +return!1}s.d=s.a[r] +s.c=r+1 +return!0}, +$iz:1} +A.b4.prototype={} +A.cE.prototype={ A(a){var s,r,q=this,p=new RegExp(q.a).exec(a) if(p==null)return null s=Object.create(null) @@ -2042,56 +2233,56 @@ if(r!==-1)s.method=p[r+1] r=q.f if(r!==-1)s.receiver=p[r+1] return s}} -A.aS.prototype={ +A.b2.prototype={ i(a){return"Null check operator used on a null value"}} -A.bw.prototype={ +A.bO.prototype={ i(a){var s,r=this,q="NoSuchMethodError: method not found: '",p=r.b if(p==null)return"NoSuchMethodError: "+r.a s=r.c if(s==null)return q+p+"' ("+r.a+")" return q+p+"' on '"+s+"' ("+r.a+")"}} -A.bQ.prototype={ +A.c9.prototype={ i(a){var s=this.a return s.length===0?"Error":"Error: "+s}} -A.cf.prototype={ +A.cC.prototype={ i(a){return"Throw of null ('"+(this.a===null?"null":"undefined")+"' from JavaScript)"}} -A.aC.prototype={} -A.b8.prototype={ +A.aO.prototype={} +A.bm.prototype={ i(a){var s,r=this.b if(r!=null)return r r=this.a s=r!==null&&typeof r==="object"?r.stack:null return this.b=s==null?"":s}, -$iV:1} -A.T.prototype={ +$iZ:1} +A.X.prototype={ i(a){var s=this.constructor,r=s==null?null:s.name -return"Closure '"+A.eI(r==null?"unknown":r)+"'"}, -$ia1:1, -gaF(){return this}, +return"Closure '"+A.fc(r==null?"unknown":r)+"'"}, +$ia5:1, +gaW(){return this}, $C:"$1", $R:1, $D:null} -A.bl.prototype={$C:"$0",$R:0} -A.bm.prototype={$C:"$2",$R:2} -A.bO.prototype={} -A.bM.prototype={ +A.bB.prototype={$C:"$0",$R:0} +A.bC.prototype={$C:"$2",$R:2} +A.c6.prototype={} +A.c4.prototype={ i(a){var s=this.$static_name if(s==null)return"Closure of unknown static method" -return"Closure '"+A.eI(s)+"'"}} -A.ae.prototype={ -B(a,b){if(b==null)return!1 +return"Closure '"+A.fc(s)+"'"}} +A.al.prototype={ +C(a,b){if(b==null)return!1 if(this===b)return!0 -if(!(b instanceof A.ae))return!1 +if(!(b instanceof A.al))return!1 return this.$_target===b.$_target&&this.a===b.a}, -gn(a){return(A.d5(this.a)^A.bI(this.$_target))>>>0}, -i(a){return"Closure '"+this.$_name+"' of "+("Instance of '"+A.bJ(this.a)+"'")}} -A.bK.prototype={ +gq(a){return(A.dD(this.a)^A.c0(this.$_target))>>>0}, +i(a){return"Closure '"+this.$_name+"' of "+("Instance of '"+A.c1(this.a)+"'")}} +A.c2.prototype={ i(a){return"RuntimeError: "+this.a}} -A.a2.prototype={ -gk(a){return this.a}, -gC(){return new A.aM(this,this.$ti.h("aM<1>"))}, -gD(){return new A.aJ(this,this.$ti.h("aJ<1,2>"))}, -t(a,b){var s,r,q,p,o=null +A.a6.prototype={ +gl(a){return this.a}, +gB(){return new A.aX(this,A.r(this).h("aX<1>"))}, +gD(){return new A.aU(this,A.r(this).h("aU<1,2>"))}, +j(a,b){var s,r,q,p,o=null if(typeof b=="string"){s=this.b if(s==null)return o r=s[b] @@ -2100,286 +2291,372 @@ return q}else if(typeof b=="number"&&(b&0x3fffffff)===b){p=this.c if(p==null)return o r=p[b] q=r==null?o:r.b -return q}else return this.av(b)}, -av(a){var s,r,q=this.d +return q}else return this.aK(b)}, +aK(a){var s,r,q=this.d if(q==null)return null -s=q[J.M(a)&1073741823] -r=this.ac(s,a) +s=q[this.ai(a)] +r=this.aj(s,a) if(r<0)return null return s[r].b}, -v(a,b,c){var s,r,q,p,o,n,m=this,l=m.$ti +v(a,b,c){var s,r,q,p,o,n,m=this,l=A.r(m) l.c.a(b) l.y[1].a(c) if(typeof b=="string"){s=m.b -m.a_(s==null?m.b=m.U():s,b,c)}else if(typeof b=="number"&&(b&0x3fffffff)===b){r=m.c -m.a_(r==null?m.c=m.U():r,b,c)}else{q=m.d -if(q==null)q=m.d=m.U() -p=J.M(b)&1073741823 +m.a5(s==null?m.b=m.V():s,b,c)}else if(typeof b=="number"&&(b&0x3fffffff)===b){r=m.c +m.a5(r==null?m.c=m.V():r,b,c)}else{q=m.d +if(q==null)q=m.d=m.V() +p=m.ai(b) o=q[p] -if(o==null)q[p]=[m.V(b,c)] -else{n=m.ac(o,b) +if(o==null)q[p]=[m.W(b,c)] +else{n=m.aj(o,b) if(n>=0)o[n].b=c -else o.push(m.V(b,c))}}}, +else o.push(m.W(b,c))}}}, E(a,b){var s,r,q=this -q.$ti.h("~(1,2)").a(b) +A.r(q).h("~(1,2)").a(b) s=q.e r=q.r while(s!=null){b.$2(s.a,s.b) -if(r!==q.r)throw A.i(A.af(q)) +if(r!==q.r)throw A.e(A.am(q)) s=s.c}}, -a_(a,b,c){var s,r=this.$ti +a5(a,b,c){var s,r=A.r(this) r.c.a(b) r.y[1].a(c) s=a[b] -if(s==null)a[b]=this.V(b,c) +if(s==null)a[b]=this.W(b,c) else s.b=c}, -V(a,b){var s=this,r=s.$ti,q=new A.cb(r.c.a(a),r.y[1].a(b)) +W(a,b){var s=this,r=A.r(s),q=new A.cy(r.c.a(a),r.y[1].a(b)) if(s.e==null)s.e=s.f=q else s.f=s.f.c=q;++s.a s.r=s.r+1&1073741823 return q}, -ac(a,b){var s,r +ai(a){return J.W(a)&1073741823}, +aj(a,b){var s,r if(a==null)return-1 s=a.length -for(r=0;r"]=s delete s[""] return s}, -$idX:1} -A.cb.prototype={} -A.aM.prototype={ -gk(a){return this.a.a}, +$ieq:1} +A.cy.prototype={} +A.aX.prototype={ +gl(a){return this.a.a}, gp(a){var s=this.a -return new A.aL(s,s.r,s.e,this.$ti.h("aL<1>"))}} -A.aL.prototype={ -gm(){return this.d}, -l(){var s,r=this,q=r.a -if(r.b!==q.r)throw A.i(A.af(q)) +return new A.aW(s,s.r,s.e,this.$ti.h("aW<1>"))}} +A.aW.prototype={ +gn(){return this.d}, +m(){var s,r=this,q=r.a +if(r.b!==q.r)throw A.e(A.am(q)) s=r.c if(s==null){r.d=null return!1}else{r.d=s.a r.c=s.c return!0}}, -$iD:1} -A.aJ.prototype={ -gk(a){return this.a.a}, +$iz:1} +A.aU.prototype={ +gl(a){return this.a.a}, gp(a){var s=this.a -return new A.aK(s,s.r,s.e,this.$ti.h("aK<1,2>"))}} -A.aK.prototype={ -gm(){var s=this.d +return new A.aV(s,s.r,s.e,this.$ti.h("aV<1,2>"))}} +A.aV.prototype={ +gn(){var s=this.d s.toString return s}, -l(){var s,r=this,q=r.a -if(r.b!==q.r)throw A.i(A.af(q)) +m(){var s,r=this,q=r.a +if(r.b!==q.r)throw A.e(A.am(q)) s=r.c if(s==null){r.d=null -return!1}else{r.d=new A.u(s.a,s.b,r.$ti.h("u<1,2>")) +return!1}else{r.d=new A.p(s.a,s.b,r.$ti.h("p<1,2>")) r.c=s.c return!0}}, -$iD:1} -A.d_.prototype={ +$iz:1} +A.dx.prototype={ $1(a){return this.a(a)}, -$S:6} -A.d0.prototype={ -$2(a,b){return this.a(a,b)}, $S:7} -A.d1.prototype={ -$1(a){return this.a(A.ap(a))}, +A.dy.prototype={ +$2(a,b){return this.a(a,b)}, $S:8} -A.S.prototype={ -i(a){return this.a8(!1)}, -a8(a){var s,r,q,p,o,n=this.al(),m=this.T(),l=(a?"Record ":"")+"(" +A.dz.prototype={ +$1(a){return this.a(A.az(a))}, +$S:9} +A.V.prototype={ +i(a){return this.ag(!1)}, +ag(a){var s,r,q,p,o,n=this.az(),m=this.U(),l=(a?"Record ":"")+"(" for(s=n.length,r="",q=0;q0;){--q;--s -B.a.v(k,q,r[s])}}k=A.ff(k,!1,t.K) +B.a.v(k,q,r[s])}}k=A.fI(k,!1,t.K) k.$flags=3 return k}} -A.am.prototype={ -T(){return[this.a,this.b]}, -B(a,b){if(b==null)return!1 -return b instanceof A.am&&this.$s===b.$s&&J.Z(this.a,b.a)&&J.Z(this.b,b.b)}, -gn(a){return A.dk(this.$s,this.a,this.b,B.c)}} -A.an.prototype={ -T(){return[this.a,this.b,this.c]}, -B(a,b){var s=this +A.au.prototype={ +U(){return[this.a,this.b]}, +C(a,b){if(b==null)return!1 +return b instanceof A.au&&this.$s===b.$s&&J.P(this.a,b.a)&&J.P(this.b,b.b)}, +gq(a){return A.dR(this.$s,this.a,this.b,B.d)}} +A.av.prototype={ +U(){return[this.a,this.b,this.c]}, +C(a,b){var s=this if(b==null)return!1 -return b instanceof A.an&&s.$s===b.$s&&J.Z(s.a,b.a)&&J.Z(s.b,b.b)&&J.Z(s.c,b.c)}, -gn(a){var s=this -return A.dk(s.$s,s.a,s.b,s.c)}} -A.ag.prototype={ -gq(a){return B.u}, -$ih:1, -$idc:1} -A.aQ.prototype={} -A.by.prototype={ -gq(a){return B.v}, -$ih:1, -$idd:1} -A.ah.prototype={ -gk(a){return a.length}, -$iz:1} -A.aO.prototype={$ic:1,$ib:1,$ij:1} -A.aP.prototype={$ic:1,$ib:1,$ij:1} -A.bz.prototype={ -gq(a){return B.w}, -$ih:1, -$ic5:1} -A.bA.prototype={ -gq(a){return B.x}, -$ih:1, -$ic6:1} -A.bB.prototype={ -gq(a){return B.y}, -$ih:1, -$ic7:1} -A.bC.prototype={ -gq(a){return B.z}, -$ih:1, -$ic8:1} -A.bD.prototype={ -gq(a){return B.A}, -$ih:1, -$ic9:1} -A.bE.prototype={ -gq(a){return B.C}, -$ih:1, -$icj:1} -A.bF.prototype={ -gq(a){return B.D}, -$ih:1, -$ick:1} -A.aR.prototype={ -gq(a){return B.E}, -gk(a){return a.length}, -$ih:1, -$icl:1} -A.bG.prototype={ -gq(a){return B.F}, -gk(a){return a.length}, -$ih:1, -$icm:1} -A.b2.prototype={} -A.b3.prototype={} -A.b4.prototype={} -A.b5.prototype={} -A.F.prototype={ -h(a){return A.bd(v.typeUniverse,this,a)}, -j(a){return A.ek(v.typeUniverse,this,a)}} -A.bX.prototype={} -A.cK.prototype={ -i(a){return A.A(this.a,null)}} +return b instanceof A.av&&s.$s===b.$s&&J.P(s.a,b.a)&&J.P(s.b,b.b)&&J.P(s.c,b.c)}, +gq(a){var s=this +return A.dR(s.$s,s.a,s.b,s.c)}} +A.ao.prototype={ +gt(a){return B.z}, +$ij:1, +$idK:1} +A.b0.prototype={} +A.bQ.prototype={ +gt(a){return B.A}, +$ij:1, +$idL:1} +A.ap.prototype={ +gl(a){return a.length}, +$iB:1} +A.aZ.prototype={ +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ic:1, +$ib:1, +$ii:1} +A.b_.prototype={$ic:1,$ib:1,$ii:1} +A.bR.prototype={ +gt(a){return B.B}, +$ij:1, +$ics:1} +A.bS.prototype={ +gt(a){return B.C}, +$ij:1, +$ict:1} +A.bT.prototype={ +gt(a){return B.D}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icu:1} +A.bU.prototype={ +gt(a){return B.E}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icv:1} +A.bV.prototype={ +gt(a){return B.F}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icw:1} A.bW.prototype={ +gt(a){return B.H}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icG:1} +A.bX.prototype={ +gt(a){return B.I}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icH:1} +A.b1.prototype={ +gt(a){return B.J}, +gl(a){return a.length}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icI:1} +A.bY.prototype={ +gt(a){return B.K}, +gl(a){return a.length}, +j(a,b){A.aa(b,a,a.length) +return a[b]}, +$ij:1, +$icJ:1} +A.bg.prototype={} +A.bh.prototype={} +A.bi.prototype={} +A.bj.prototype={} +A.J.prototype={ +h(a){return A.bt(v.typeUniverse,this,a)}, +k(a){return A.eP(v.typeUniverse,this,a)}} +A.cg.prototype={} +A.db.prototype={ +i(a){return A.F(this.a,null)}} +A.cf.prototype={ i(a){return this.a}} -A.b9.prototype={$iQ:1} -A.cr.prototype={ +A.bp.prototype={$iT:1} +A.cS.prototype={ $1(a){var s=this.a,r=s.a s.a=null r.$0()}, -$S:4} -A.cq.prototype={ +$S:6} +A.cR.prototype={ $1(a){var s,r this.a.a=t.M.a(a) s=this.b r=this.c s.firstChild?s.removeChild(r):s.appendChild(r)}, -$S:9} -A.cs.prototype={ +$S:10} +A.cT.prototype={ $0(){this.a.$0()}, -$S:5} -A.ct.prototype={ +$S:1} +A.cU.prototype={ $0(){this.a.$0()}, -$S:5} -A.cI.prototype={ -ag(a,b){if(self.setTimeout!=null)self.setTimeout(A.bi(new A.cJ(this,b),0),a) -else throw A.i(A.fq("`setTimeout()` not found."))}} -A.cJ.prototype={ -$0(){this.b.$0()}, +$S:1} +A.bo.prototype={ +ap(a,b){if(self.setTimeout!=null)this.b=self.setTimeout(A.aD(new A.da(this,b),0),a) +else throw A.e(A.cK("`setTimeout()` not found."))}, +aq(a,b){if(self.setTimeout!=null)this.b=self.setInterval(A.aD(new A.d9(this,a,Date.now(),b),0),a) +else throw A.e(A.cK("Periodic timer."))}, +Y(){if(self.setTimeout!=null){var s=this.b +if(s==null)return +if(this.a)self.clearTimeout(s) +else self.clearInterval(s) +this.b=null}else throw A.e(A.cK("Canceling a timer."))}, +$ic7:1} +A.da.prototype={ +$0(){var s=this.a +s.b=null +s.c=1 +this.b.$0()}, $S:0} -A.bT.prototype={ -W(a){var s,r=this,q=r.$ti +A.d9.prototype={ +$0(){var s,r=this,q=r.a,p=q.c+1,o=r.b +if(o>0){s=Date.now()-r.c +if(s>(p+1)*o)p=B.c.ao(s,o)}q.c=p +r.d.$1(q)}, +$S:1} +A.cc.prototype={ +a_(a){var s,r=this,q=r.$ti q.h("1/?").a(a) if(a==null)a=q.c.a(a) -if(!r.b)r.a.a0(a) +if(!r.b)r.a.a6(a) else{s=r.a -if(q.h("J<1>").b(a))s.a1(a) -else s.a3(a)}}, -X(a,b){var s=this.a -if(this.b)s.O(new A.C(a,b)) -else s.N(new A.C(a,b))}} -A.cQ.prototype={ +if(q.h("M<1>").b(a))s.a7(a) +else s.a9(a)}}, +a0(a,b){var s=this.a +if(this.b)s.P(new A.H(a,b)) +else s.O(new A.H(a,b))}} +A.di.prototype={ $1(a){return this.a.$2(0,a)}, -$S:1} -A.cR.prototype={ -$2(a,b){this.a.$2(1,new A.aC(a,t.l.a(b)))}, -$S:10} -A.cW.prototype={ -$2(a,b){this.a(A.a7(a),b)}, +$S:2} +A.dj.prototype={ +$2(a,b){this.a.$2(1,new A.aO(a,t.l.a(b)))}, $S:11} -A.C.prototype={ -i(a){return A.n(this.a)}, +A.dq.prototype={ +$2(a,b){this.a(A.a1(a),b)}, +$S:12} +A.bn.prototype={ +gn(){var s=this.b +return s==null?this.$ti.c.a(s):s}, +aB(a,b){var s,r,q +a=A.a1(a) +b=b +s=this.a +for(;;)try{r=s(this,a,b) +return r}catch(q){b=q +a=1}}, +m(){var s,r,q,p,o=this,n=null,m=0 +for(;;){s=o.d +if(s!=null)try{if(s.m()){o.b=s.gn() +return!0}else o.d=null}catch(r){n=r +m=1 +o.d=null}q=o.aB(m,n) +if(1===q)return!0 +if(0===q){o.b=null +p=o.e +if(p==null||p.length===0){o.a=A.eK +return!1}if(0>=p.length)return A.y(p,-1) +o.a=p.pop() +m=0 +n=null +continue}if(2===q){m=0 +n=null +continue}if(3===q){n=o.c +o.c=null +p=o.e +if(p==null||p.length===0){o.b=null +o.a=A.eK +throw n +return!1}if(0>=p.length)return A.y(p,-1) +o.a=p.pop() +m=1 +continue}throw A.e(A.dT("sync*"))}return!1}, +aX(a){var s,r,q=this +if(a instanceof A.aw){s=a.a() +r=q.e +if(r==null)r=q.e=[] +B.a.u(r,q.a) +q.a=s +return 2}else{q.d=J.dH(a) +return 2}}, +$iz:1} +A.aw.prototype={ +gp(a){return new A.bn(this.a(),this.$ti.h("bn<1>"))}} +A.H.prototype={ +i(a){return A.m(this.a)}, $il:1, gF(){return this.b}} -A.bV.prototype={ -X(a,b){var s=this.a -if((s.a&30)!==0)throw A.i(A.e3("Future already completed")) -s.N(A.h9(a,b))}, -aa(a){return this.X(a,null)}} -A.aY.prototype={ -W(a){var s,r=this.$ti +A.ce.prototype={ +a0(a,b){var s=this.a +if((s.a&30)!==0)throw A.e(A.dT("Future already completed")) +s.O(A.hG(a,b))}, +ah(a){return this.a0(a,null)}} +A.b9.prototype={ +a_(a){var s,r=this.$ti r.h("1/?").a(a) s=this.a -if((s.a&30)!==0)throw A.i(A.e3("Future already completed")) -s.a0(r.h("1/").a(a))}} -A.a5.prototype={ -aw(a){if((this.c&15)!==6)return!0 -return this.b.b.Z(t.V.a(this.d),a.a,t.y,t.K)}, -au(a){var s,r=this,q=r.e,p=null,o=t.z,n=t.K,m=a.a,l=r.b.b -if(t.Q.b(q))p=l.aC(q,m,a.b,o,n,t.l) -else p=l.Z(t.v.a(q),m,o,n) +if((s.a&30)!==0)throw A.e(A.dT("Future already completed")) +s.a6(r.h("1/").a(a))}} +A.a8.prototype={ +aL(a){if((this.c&15)!==6)return!0 +return this.b.b.a2(t.bG.a(this.d),a.a,t.y,t.K)}, +aJ(a){var s,r=this,q=r.e,p=null,o=t.z,n=t.K,m=a.a,l=r.b.b +if(t.Q.b(q))p=l.aR(q,m,a.b,o,n,t.l) +else p=l.a2(t.v.a(q),m,o,n) try{o=r.$ti.h("2/").a(p) -return o}catch(s){if(t.c.b(A.aw(s))){if((r.c&1)!==0)throw A.i(A.ay("The error handler of Future.then must return a value of the returned future's type","onError")) -throw A.i(A.ay("The error handler of Future.catchError must return a value of the future's type","onError"))}else throw s}}} -A.q.prototype={ -ae(a,b,c){var s,r,q=this.$ti -q.j(c).h("1/(2)").a(a) -s=$.o -if(s===B.b){if(!t.Q.b(b)&&!t.v.b(b))throw A.i(A.dP(b,"onError",u.c))}else{c.h("@<0/>").j(q.c).h("1(2)").a(a) -b=A.ho(b,s)}r=new A.q(s,c.h("q<0>")) -this.M(new A.a5(r,3,a,b,q.h("@<1>").j(c).h("a5<1,2>"))) +return o}catch(s){if(t.c.b(A.aj(s))){if((r.c&1)!==0)throw A.e(A.ak("The error handler of Future.then must return a value of the returned future's type","onError")) +throw A.e(A.ak("The error handler of Future.catchError must return a value of the future's type","onError"))}else throw s}}} +A.v.prototype={ +a3(a,b,c){var s,r,q,p=this.$ti +p.k(c).h("1/(2)").a(a) +s=$.n +if(s===B.b){if(b!=null&&!t.Q.b(b)&&!t.v.b(b))throw A.e(A.eh(b,"onError",u.c))}else{c.h("@<0/>").k(p.c).h("1(2)").a(a) +if(b!=null)b=A.hV(b,s)}r=new A.v(s,c.h("v<0>")) +q=b==null?1:3 +this.N(new A.a8(r,q,a,b,p.h("@<1>").k(c).h("a8<1,2>"))) return r}, -a7(a,b,c){var s,r=this.$ti -r.j(c).h("1/(2)").a(a) -s=new A.q($.o,c.h("q<0>")) -this.M(new A.a5(s,19,a,b,r.h("@<1>").j(c).h("a5<1,2>"))) +aU(a,b){return this.a3(a,null,b)}, +af(a,b,c){var s,r=this.$ti +r.k(c).h("1/(2)").a(a) +s=new A.v($.n,c.h("v<0>")) +this.N(new A.a8(s,19,a,b,r.h("@<1>").k(c).h("a8<1,2>"))) return s}, -an(a){this.a=this.a&1|16 +aC(a){this.a=this.a&1|16 this.c=a}, G(a){this.a=a.a&30|this.a&1 this.c=a.c}, -M(a){var s,r=this,q=r.a +N(a){var s,r=this,q=r.a if(q<=3){a.a=t.F.a(r.c) r.c=a}else{if((q&4)!==0){s=t._.a(r.c) -if((s.a&24)===0){s.M(a) -return}r.G(s)}A.c0(null,null,r.b,t.M.a(new A.cv(r,a)))}}, -a6(a){var s,r,q,p,o,n,m=this,l={} +if((s.a&24)===0){s.N(a) +return}r.G(s)}A.cm(null,null,r.b,t.M.a(new A.cW(r,a)))}}, +ad(a){var s,r,q,p,o,n,m=this,l={} l.a=a if(a==null)return s=m.a @@ -2388,197 +2665,209 @@ m.c=a if(r!=null){q=a.a for(p=a;q!=null;p=q,q=o)o=q.a p.a=r}}else{if((s&4)!==0){n=t._.a(m.c) -if((n.a&24)===0){n.a6(a) +if((n.a&24)===0){n.ad(a) return}m.G(n)}l.a=m.I(a) -A.c0(null,null,m.b,t.M.a(new A.cz(l,m)))}}, +A.cm(null,null,m.b,t.M.a(new A.d_(l,m)))}}, H(){var s=t.F.a(this.c) this.c=null return this.I(s)}, I(a){var s,r,q for(s=a,r=null;s!=null;r=s,s=q){q=s.a s.a=r}return r}, -a3(a){var s,r=this +a9(a){var s,r=this r.$ti.c.a(a) s=r.H() r.a=8 r.c=a -A.ak(r,s)}, -ai(a){var s,r,q=this +A.as(r,s)}, +au(a){var s,r,q=this if((a.a&16)!==0){s=q.b===a.b s=!(s||s)}else s=!1 if(s)return r=q.H() q.G(a) -A.ak(q,r)}, -O(a){var s=this.H() -this.an(a) -A.ak(this,s)}, -a0(a){var s=this.$ti +A.as(q,r)}, +P(a){var s=this.H() +this.aC(a) +A.as(this,s)}, +a6(a){var s=this.$ti s.h("1/").a(a) -if(s.h("J<1>").b(a)){this.a1(a) -return}this.ah(a)}, -ah(a){var s=this +if(s.h("M<1>").b(a)){this.a7(a) +return}this.ar(a)}, +ar(a){var s=this s.$ti.c.a(a) s.a^=2 -A.c0(null,null,s.b,t.M.a(new A.cx(s,a)))}, -a1(a){A.dn(this.$ti.h("J<1>").a(a),this,!1) +A.cm(null,null,s.b,t.M.a(new A.cY(s,a)))}, +a7(a){A.dV(this.$ti.h("M<1>").a(a),this,!1) return}, -N(a){this.a^=2 -A.c0(null,null,this.b,t.M.a(new A.cw(this,a)))}, -$iJ:1} -A.cv.prototype={ -$0(){A.ak(this.a,this.b)}, +O(a){this.a^=2 +A.cm(null,null,this.b,t.M.a(new A.cX(this,a)))}, +$iM:1} +A.cW.prototype={ +$0(){A.as(this.a,this.b)}, $S:0} -A.cz.prototype={ -$0(){A.ak(this.b,this.a.a)}, +A.d_.prototype={ +$0(){A.as(this.b,this.a.a)}, $S:0} -A.cy.prototype={ -$0(){A.dn(this.a.a,this.b,!0)}, +A.cZ.prototype={ +$0(){A.dV(this.a.a,this.b,!0)}, $S:0} -A.cx.prototype={ -$0(){this.a.a3(this.b)}, +A.cY.prototype={ +$0(){this.a.a9(this.b)}, $S:0} -A.cw.prototype={ -$0(){this.a.O(this.b)}, +A.cX.prototype={ +$0(){this.a.P(this.b)}, $S:0} -A.cC.prototype={ +A.d2.prototype={ $0(){var s,r,q,p,o,n,m,l,k=this,j=null try{q=k.a.a -j=q.b.b.aB(t.a.a(q.d),t.z)}catch(p){s=A.aw(p) -r=A.at(p) +j=q.b.b.aQ(t.bd.a(q.d),t.z)}catch(p){s=A.aj(p) +r=A.ag(p) if(k.c&&t.n.a(k.b.a.c).a===s){q=k.a q.c=t.n.a(k.b.a.c)}else{q=s o=r -if(o==null)o=A.db(q) +if(o==null)o=A.dJ(q) n=k.a -n.c=new A.C(q,o) +n.c=new A.H(q,o) q=n}q.b=!0 -return}if(j instanceof A.q&&(j.a&24)!==0){if((j.a&16)!==0){q=k.a +return}if(j instanceof A.v&&(j.a&24)!==0){if((j.a&16)!==0){q=k.a q.c=t.n.a(j.c) -q.b=!0}return}if(j instanceof A.q){m=k.b.a -l=new A.q(m.b,m.$ti) -j.ae(new A.cD(l,m),new A.cE(l),t.H) +q.b=!0}return}if(j instanceof A.v){m=k.b.a +l=new A.v(m.b,m.$ti) +j.a3(new A.d3(l,m),new A.d4(l),t.H) q=k.a q.c=l q.b=!1}}, $S:0} -A.cD.prototype={ -$1(a){this.a.ai(this.b)}, -$S:4} -A.cE.prototype={ -$2(a,b){A.bf(a) +A.d3.prototype={ +$1(a){this.a.au(this.b)}, +$S:6} +A.d4.prototype={ +$2(a,b){A.ay(a) t.l.a(b) -this.a.O(new A.C(a,b))}, -$S:12} -A.cB.prototype={ +this.a.P(new A.H(a,b))}, +$S:13} +A.d1.prototype={ $0(){var s,r,q,p,o,n,m,l try{q=this.a p=q.a o=p.$ti n=o.c m=n.a(this.b) -q.c=p.b.b.Z(o.h("2/(1)").a(p.d),m,o.h("2/"),n)}catch(l){s=A.aw(l) -r=A.at(l) +q.c=p.b.b.a2(o.h("2/(1)").a(p.d),m,o.h("2/"),n)}catch(l){s=A.aj(l) +r=A.ag(l) q=s p=r -if(p==null)p=A.db(q) +if(p==null)p=A.dJ(q) o=this.a -o.c=new A.C(q,p) +o.c=new A.H(q,p) o.b=!0}}, $S:0} -A.cA.prototype={ +A.d0.prototype={ $0(){var s,r,q,p,o,n,m,l=this try{s=t.n.a(l.a.a.c) p=l.b -if(p.a.aw(s)&&p.a.e!=null){p.c=p.a.au(s) -p.b=!1}}catch(o){r=A.aw(o) -q=A.at(o) +if(p.a.aL(s)&&p.a.e!=null){p.c=p.a.aJ(s) +p.b=!1}}catch(o){r=A.aj(o) +q=A.ag(o) p=t.n.a(l.a.a.c) if(p.a===r){n=l.b n.c=p p=n}else{p=r n=q -if(n==null)n=A.db(p) +if(n==null)n=A.dJ(p) m=l.b -m.c=new A.C(p,n) +m.c=new A.H(p,n) p=m}p.b=!0}}, $S:0} -A.bU.prototype={} -A.bZ.prototype={} -A.be.prototype={$ie8:1} -A.cU.prototype={ -$0(){A.f6(this.a,this.b)}, +A.cd.prototype={} +A.ci.prototype={} +A.bu.prototype={$ieC:1} +A.dn.prototype={ +$0(){A.fA(this.a,this.b)}, $S:0} -A.bY.prototype={ -aD(a){var s,r,q +A.ch.prototype={ +aS(a){var s,r,q t.M.a(a) -try{if(B.b===$.o){a.$0() -return}A.ex(null,null,this,a,t.H)}catch(q){s=A.aw(q) -r=A.at(q) -A.dx(A.bf(s),t.l.a(r))}}, -ar(a){return new A.cH(this,t.M.a(a))}, -aB(a,b){b.h("0()").a(a) -if($.o===B.b)return a.$0() -return A.ex(null,null,this,a,b)}, -Z(a,b,c,d){c.h("@<0>").j(d).h("1(2)").a(a) +try{if(B.b===$.n){a.$0() +return}A.f_(null,null,this,a,t.H)}catch(q){s=A.aj(q) +r=A.ag(q) +A.dm(A.ay(s),t.l.a(r))}}, +aT(a,b,c){var s,r,q +c.h("~(0)").a(a) +c.a(b) +try{if(B.b===$.n){a.$1(b) +return}A.f0(null,null,this,a,b,t.H,c)}catch(q){s=A.aj(q) +r=A.ag(q) +A.dm(A.ay(s),t.l.a(r))}}, +aG(a){return new A.d7(this,t.M.a(a))}, +aH(a,b){return new A.d8(this,b.h("~(0)").a(a),b)}, +aQ(a,b){b.h("0()").a(a) +if($.n===B.b)return a.$0() +return A.f_(null,null,this,a,b)}, +a2(a,b,c,d){c.h("@<0>").k(d).h("1(2)").a(a) d.a(b) -if($.o===B.b)return a.$1(b) -return A.hq(null,null,this,a,b,c,d)}, -aC(a,b,c,d,e,f){d.h("@<0>").j(e).j(f).h("1(2,3)").a(a) +if($.n===B.b)return a.$1(b) +return A.f0(null,null,this,a,b,c,d)}, +aR(a,b,c,d,e,f){d.h("@<0>").k(e).k(f).h("1(2,3)").a(a) e.a(b) f.a(c) -if($.o===B.b)return a.$2(b,c) -return A.hp(null,null,this,a,b,c,d,e,f)}, -ad(a,b,c,d){return b.h("@<0>").j(c).j(d).h("1(2,3)").a(a)}} -A.cH.prototype={ -$0(){return this.a.aD(this.b)}, +if($.n===B.b)return a.$2(b,c) +return A.hW(null,null,this,a,b,c,d,e,f)}, +ak(a,b,c,d){return b.h("@<0>").k(c).k(d).h("1(2,3)").a(a)}} +A.d7.prototype={ +$0(){return this.a.aS(this.b)}, $S:0} -A.b_.prototype={ -gk(a){return this.a}, -gC(){return new A.b0(this,this.$ti.h("b0<1>"))}, -ab(a){var s,r +A.d8.prototype={ +$1(a){var s=this.c +return this.a.aT(this.b,s.a(a),s)}, +$S(){return this.c.h("~(0)")}} +A.bb.prototype={ +gl(a){return this.a}, +gB(){return new A.bc(this,this.$ti.h("bc<1>"))}, +J(a){var s,r if(typeof a=="string"&&a!=="__proto__"){s=this.b return s==null?!1:s[a]!=null}else if(typeof a=="number"&&(a&1073741823)===a){r=this.c -return r==null?!1:r[a]!=null}else return this.ak(a)}, -ak(a){var s=this.d +return r==null?!1:r[a]!=null}else return this.aw(a)}, +aw(a){var s=this.d if(s==null)return!1 -return this.S(this.a5(s,a),a)>=0}, -t(a,b){var s,r,q +return this.T(this.ab(s,a),a)>=0}, +j(a,b){var s,r,q if(typeof b=="string"&&b!=="__proto__"){s=this.b -r=s==null?null:A.ea(s,b) +r=s==null?null:A.eE(s,b) return r}else if(typeof b=="number"&&(b&1073741823)===b){q=this.c -r=q==null?null:A.ea(q,b) -return r}else return this.am(b)}, -am(a){var s,r,q=this.d +r=q==null?null:A.eE(q,b) +return r}else return this.aA(b)}, +aA(a){var s,r,q=this.d if(q==null)return null -s=this.a5(q,a) -r=this.S(s,a) +s=this.ab(q,a) +r=this.T(s,a) return r<0?null:s[r+1]}, v(a,b,c){var s,r,q,p,o,n,m=this,l=m.$ti l.c.a(b) l.y[1].a(c) if(typeof b=="string"&&b!=="__proto__"){s=m.b -m.a2(s==null?m.b=A.dp():s,b,c)}else if(typeof b=="number"&&(b&1073741823)===b){r=m.c -m.a2(r==null?m.c=A.dp():r,b,c)}else{q=m.d -if(q==null)q=m.d=A.dp() -p=A.d5(b)&1073741823 +m.a8(s==null?m.b=A.dW():s,b,c)}else if(typeof b=="number"&&(b&1073741823)===b){r=m.c +m.a8(r==null?m.c=A.dW():r,b,c)}else{q=m.d +if(q==null)q=m.d=A.dW() +p=A.dD(b)&1073741823 o=q[p] -if(o==null){A.dq(q,p,[b,c]);++m.a -m.e=null}else{n=m.S(o,b) +if(o==null){A.dX(q,p,[b,c]);++m.a +m.e=null}else{n=m.T(o,b) if(n>=0)o[n+1]=c else{o.push(b,c);++m.a m.e=null}}}}, E(a,b){var s,r,q,p,o,n,m=this,l=m.$ti l.h("~(1,2)").a(b) -s=m.a4() +s=m.aa() for(r=s.length,q=l.c,l=l.y[1],p=0;p"))}} -A.b1.prototype={ -gm(){var s=this.d +return new A.bd(s,s.aa(),this.$ti.h("bd<1>"))}} +A.bd.prototype={ +gn(){var s=this.d return s==null?this.$ti.c.a(s):s}, -l(){var s=this,r=s.b,q=s.c,p=s.a -if(r!==p.e)throw A.i(A.af(p)) +m(){var s=this,r=s.b,q=s.c,p=s.a +if(r!==p.e)throw A.e(A.am(p)) else if(q>=r.length){s.d=null return!1}else{s.d=r[q] s.c=q+1 return!0}}, -$iD:1} +$iz:1} +A.f.prototype={ +gp(a){return new A.R(a,this.gl(a),A.aE(a).h("R"))}, +K(a,b){return this.j(a,b)}, +L(a,b,c){var s=A.aE(a) +return new A.S(a,s.k(c).h("1(f.E)").a(b),s.h("@").k(c).h("S<1,2>"))}, +i(a){return A.eo(a,"[","]")}, +$ic:1, +$ib:1, +$ii:1} A.k.prototype={ -gp(a){return new A.a3(a,a.length,A.au(a).h("a3"))}, -J(a,b){if(!(b").j(c).h("P<1,2>"))}, -i(a){return A.dW(a,"[","]")}} -A.e.prototype={ -a9(a,b,c){return new A.a0(this,A.G(this).h("@").j(b).j(c).h("a0<1,2,3,4>"))}, -E(a,b){var s,r,q,p=A.G(this) -p.h("~(e.K,e.V)").a(b) -for(s=this.gC(),s=s.gp(s),p=p.h("e.V");s.l();){r=s.gm() -q=this.t(0,r) +Z(a,b,c){var s=A.r(this) +return A.er(this,s.h("k.K"),s.h("k.V"),b,c)}, +E(a,b){var s,r,q,p=A.r(this) +p.h("~(k.K,k.V)").a(b) +for(s=this.gB(),s=s.gp(s),p=p.h("k.V");s.m();){r=s.gn() +q=this.j(0,r) b.$2(r,q==null?p.a(q):q)}}, -gD(){var s=this.gC(),r=A.G(this).h("u"),q=A.G(s) -return A.dj(s,q.j(r).h("1(b.E)").a(new A.cc(this)),q.h("b.E"),r)}, -gk(a){var s=this.gC() -return s.gk(s)}, -i(a){return A.dY(this)}, -$iO:1} -A.cc.prototype={ -$1(a){var s=this.a,r=A.G(s) -r.h("e.K").a(a) -s=s.t(0,a) -if(s==null)s=r.h("e.V").a(s) -return new A.u(a,s,r.h("u"))}, -$S(){return A.G(this.a).h("u(e.K)")}} -A.cd.prototype={ +gD(){var s=this.gB(),r=A.r(this).h("p"),q=A.r(s) +return A.dQ(s,q.k(r).h("1(b.E)").a(new A.cz(this)),q.h("b.E"),r)}, +gl(a){var s=this.gB() +return s.gl(s)}, +i(a){return A.dP(this)}, +$iD:1} +A.cz.prototype={ +$1(a){var s=this.a,r=A.r(s) +r.h("k.K").a(a) +s=s.j(0,a) +if(s==null)s=r.h("k.V").a(s) +return new A.p(a,s,r.h("p"))}, +$S(){return A.r(this.a).h("p(k.K)")}} +A.cA.prototype={ $2(a,b){var s,r=this.a if(!r.a)this.b.a+=", " r.a=!1 r=this.b -s=A.n(a) +s=A.m(a) r.a=(r.a+=s)+": " -s=A.n(b) +s=A.m(b) r.a+=s}, -$S:13} -A.bo.prototype={ -B(a,b){var s -if(b==null)return!1 -s=!1 -if(b instanceof A.bo)if(this.a===b.a)s=this.b===b.b -return s}, -gn(a){return A.dk(this.a,this.b,B.c,B.c)}, -i(a){var s=this,r=A.f4(A.fn(s)),q=A.bp(A.fl(s)),p=A.bp(A.fh(s)),o=A.bp(A.fi(s)),n=A.bp(A.fk(s)),m=A.bp(A.fm(s)),l=A.dV(A.fj(s)),k=s.b,j=k===0?"":A.dV(k) -return r+"-"+q+"-"+p+" "+o+":"+n+":"+m+"."+l+j+"Z"}} +$S:14} +A.bE.prototype={ +C(a,b){if(b==null)return!1 +return b instanceof A.bE&&this.a===b.a&&this.b===b.b&&this.c===b.c}, +gq(a){return A.dR(this.a,this.b,B.d,B.d)}, +i(a){var s=this,r=A.fy(A.fQ(s)),q=A.bF(A.fO(s)),p=A.bF(A.fK(s)),o=A.bF(A.fL(s)),n=A.bF(A.fN(s)),m=A.bF(A.fP(s)),l=A.en(A.fM(s)),k=s.b,j=k===0?"":A.en(k) +k=r+"-"+q +if(s.c)return k+"-"+p+" "+o+":"+n+":"+m+"."+l+j+"Z" +else return k+"-"+p+" "+o+":"+n+":"+m+"."+l+j}} +A.bG.prototype={ +C(a,b){if(b==null)return!1 +return b instanceof A.bG&&this.a===b.a}, +gq(a){return B.c.gq(this.a)}, +i(a){var s,r,q,p=this.a,o=p%36e8,n=B.c.X(o,6e7) +o%=6e7 +s=n<10?"0":"" +r=B.c.X(o,1e6) +q=r<10?"0":"" +return""+(p/36e8|0)+":"+s+n+":"+q+r+"."+B.u.aP(B.c.i(o%1e6),6,"0")}} A.l.prototype={ -gF(){return A.fg(this)}} -A.bj.prototype={ +gF(){return A.fJ(this)}} +A.bz.prototype={ i(a){var s=this.a -if(s!=null)return"Assertion failed: "+A.c4(s) +if(s!=null)return"Assertion failed: "+A.cr(s) return"Assertion failed"}} -A.Q.prototype={} -A.N.prototype={ -gR(){return"Invalid argument"+(!this.a?"(s)":"")}, -gP(){return""}, -i(a){var s=this,r=s.c,q=r==null?"":" ("+r+")",p=s.d,o=p==null?"":": "+p,n=s.gR()+q+o +A.T.prototype={} +A.Q.prototype={ +gS(){return"Invalid argument"+(!this.a?"(s)":"")}, +gR(){return""}, +i(a){var s=this,r=s.c,q=r==null?"":" ("+r+")",p=s.d,o=p==null?"":": "+p,n=s.gS()+q+o if(!s.a)return n -return n+s.gP()+": "+A.c4(s.gY())}, -gY(){return this.b}} -A.aT.prototype={ -gY(){return A.eo(this.b)}, -gR(){return"RangeError"}, -gP(){var s,r=this.e,q=this.f -if(r==null)s=q!=null?": Not less than or equal to "+A.n(q):"" -else if(q==null)s=": Not greater than or equal to "+A.n(r) -else if(q>r)s=": Not in inclusive range "+A.n(r)+".."+A.n(q) -else s=qr)s=": Not in inclusive range "+A.m(r)+".."+A.m(q) +else s=q864e13)A.c1(A.e1(r,-864e13,864e13,"millisecondsSinceEpoch",null)) -A.cX(!0,"isUtc",t.y) -return new A.bo(r,0,!0)}if(a instanceof RegExp)throw A.i(A.ay("structured clone of RegExp",null)) -if(a instanceof Promise)return A.hU(a,t.X) +if(r<-864e13||r>864e13)A.co(A.ev(r,-864e13,864e13,"millisecondsSinceEpoch",null)) +A.dr(!0,"isUtc",t.y) +return new A.bE(r,0,!0)}if(a instanceof RegExp)throw A.e(A.ak("structured clone of RegExp",null)) +if(a instanceof Promise)return A.f9(a,t.X) q=Object.getPrototypeOf(a) if(q===Object.prototype||q===null){p=t.X -o=A.dh(p,p) +o=A.dO(p,p) s.v(0,a,o) n=Object.keys(a) m=[] -for(s=n.length,l=0;l(v,O?)"],interceptorsByTag:null,leafTags:null,arrayRti:Symbol("$ti"),rttc:{"2;":(a,b)=>c=>c instanceof A.b6&&a.b(c.a)&&b.b(c.b),"3;inputData,requestId,taskName":(a,b,c)=>d=>d instanceof A.b7&&a.b(d.a)&&b.b(d.b)&&c.b(d.c)}} -A.fN(v.typeUniverse,JSON.parse('{"K":"U","bH":"U","aW":"U","i_":"ag","bt":{"a9":[],"h":[]},"aE":{"h":[]},"aH":{"m":[]},"U":{"m":[]},"t":{"j":["1"],"c":["1"],"m":[],"b":["1"]},"bs":{"aU":[]},"ca":{"t":["1"],"j":["1"],"c":["1"],"m":[],"b":["1"]},"az":{"D":["1"]},"bv":{"f":[],"ad":[]},"aD":{"f":[],"a":[],"ad":[],"h":[]},"bu":{"f":[],"ad":[],"h":[]},"aF":{"v":[],"h":[]},"aj":{"b":["2"]},"aA":{"D":["2"]},"a_":{"aj":["1","2"],"b":["2"],"b.E":"2"},"aZ":{"a_":["1","2"],"aj":["1","2"],"c":["2"],"b":["2"],"b.E":"2"},"a0":{"e":["3","4"],"O":["3","4"],"e.K":"3","e.V":"4"},"bx":{"l":[]},"c":{"b":["1"]},"L":{"c":["1"],"b":["1"]},"a3":{"D":["1"]},"a4":{"b":["2"],"b.E":"2"},"aB":{"a4":["1","2"],"c":["2"],"b":["2"],"b.E":"2"},"aN":{"D":["2"]},"P":{"L":["2"],"c":["2"],"b":["2"],"L.E":"2","b.E":"2"},"b6":{"am":[],"S":[]},"b7":{"an":[],"S":[]},"aS":{"Q":[],"l":[]},"bw":{"l":[]},"bQ":{"l":[]},"b8":{"V":[]},"T":{"a1":[]},"bl":{"a1":[]},"bm":{"a1":[]},"bO":{"a1":[]},"bM":{"a1":[]},"ae":{"a1":[]},"bK":{"l":[]},"a2":{"e":["1","2"],"dX":["1","2"],"O":["1","2"],"e.K":"1","e.V":"2"},"aM":{"c":["1"],"b":["1"],"b.E":"1"},"aL":{"D":["1"]},"aJ":{"c":["u<1,2>"],"b":["u<1,2>"],"b.E":"u<1,2>"},"aK":{"D":["u<1,2>"]},"am":{"S":[]},"an":{"S":[]},"ag":{"m":[],"dc":[],"h":[]},"aQ":{"m":[]},"by":{"dd":[],"m":[],"h":[]},"ah":{"z":["1"],"m":[]},"aO":{"k":["f"],"j":["f"],"z":["f"],"c":["f"],"m":[],"b":["f"],"y":["f"]},"aP":{"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"]},"bz":{"c5":[],"k":["f"],"j":["f"],"z":["f"],"c":["f"],"m":[],"b":["f"],"y":["f"],"h":[],"k.E":"f"},"bA":{"c6":[],"k":["f"],"j":["f"],"z":["f"],"c":["f"],"m":[],"b":["f"],"y":["f"],"h":[],"k.E":"f"},"bB":{"c7":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"bC":{"c8":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"bD":{"c9":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"bE":{"cj":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"bF":{"ck":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"aR":{"cl":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"bG":{"cm":[],"k":["a"],"j":["a"],"z":["a"],"c":["a"],"m":[],"b":["a"],"y":["a"],"h":[],"k.E":"a"},"bW":{"l":[]},"b9":{"Q":[],"l":[]},"C":{"l":[]},"aY":{"bV":["1"]},"q":{"J":["1"]},"be":{"e8":[]},"bY":{"be":[],"e8":[]},"b_":{"e":["1","2"],"O":["1","2"]},"al":{"b_":["1","2"],"e":["1","2"],"O":["1","2"],"e.K":"1","e.V":"2"},"b0":{"c":["1"],"b":["1"],"b.E":"1"},"b1":{"D":["1"]},"e":{"O":["1","2"]},"f":{"ad":[]},"a":{"ad":[]},"j":{"c":["1"],"b":["1"]},"bj":{"l":[]},"Q":{"l":[]},"N":{"l":[]},"aT":{"l":[]},"bq":{"l":[]},"aX":{"l":[]},"bP":{"l":[]},"bL":{"l":[]},"bn":{"l":[]},"aV":{"l":[]},"c_":{"V":[]},"c9":{"j":["a"],"c":["a"],"b":["a"]},"cm":{"j":["a"],"c":["a"],"b":["a"]},"cl":{"j":["a"],"c":["a"],"b":["a"]},"c7":{"j":["a"],"c":["a"],"b":["a"]},"cj":{"j":["a"],"c":["a"],"b":["a"]},"c8":{"j":["a"],"c":["a"],"b":["a"]},"ck":{"j":["a"],"c":["a"],"b":["a"]},"c5":{"j":["f"],"c":["f"],"b":["f"]},"c6":{"j":["f"],"c":["f"],"b":["f"]}}')) -A.fM(v.typeUniverse,JSON.parse('{"ah":1}')) +q(A.d,[A.dM,J.bI,A.b4,J.aI,A.b,A.aJ,A.k,A.X,A.l,A.f,A.cD,A.R,A.aY,A.A,A.b7,A.V,A.aL,A.bf,A.cE,A.cC,A.aO,A.bm,A.cy,A.aW,A.aV,A.J,A.cg,A.db,A.bo,A.cc,A.bn,A.H,A.ce,A.a8,A.v,A.cd,A.ci,A.bu,A.bd,A.bE,A.bG,A.bZ,A.b5,A.cV,A.p,A.q,A.cj,A.c5,A.cB,A.ca]) +q(J.bI,[J.bK,J.aQ,J.aS,J.aR,J.aT,J.bM,J.an]) +q(J.aS,[J.Y,J.x,A.ao,A.b0]) +q(J.Y,[J.c_,J.b6,J.N]) +r(J.bJ,A.b4) +r(J.cx,J.x) +q(J.bM,[J.aP,J.bL]) +q(A.b,[A.ar,A.c,A.a7,A.be,A.aw]) +r(A.a3,A.ar) +r(A.ba,A.a3) +q(A.k,[A.a4,A.a6,A.bb]) +q(A.X,[A.bC,A.cp,A.bB,A.c6,A.dx,A.dz,A.cS,A.cR,A.di,A.d3,A.d8,A.cz,A.dB,A.dE,A.dF,A.ds,A.dw,A.cQ,A.cO,A.cN,A.cP]) +q(A.bC,[A.cq,A.dy,A.dj,A.dq,A.d4,A.cA]) +q(A.l,[A.bP,A.T,A.bO,A.c9,A.c2,A.cf,A.bz,A.Q,A.b8,A.c8,A.c3,A.bD]) +r(A.aq,A.f) +r(A.aK,A.aq) +q(A.c,[A.O,A.aX,A.aU,A.bc]) +r(A.aN,A.a7) +r(A.S,A.O) +q(A.V,[A.au,A.av]) +r(A.bk,A.au) +r(A.bl,A.av) +r(A.aM,A.aL) +r(A.b2,A.T) +q(A.c6,[A.c4,A.al]) +q(A.b0,[A.bQ,A.ap]) +q(A.ap,[A.bg,A.bi]) +r(A.bh,A.bg) +r(A.aZ,A.bh) +r(A.bj,A.bi) +r(A.b_,A.bj) +q(A.aZ,[A.bR,A.bS]) +q(A.b_,[A.bT,A.bU,A.bV,A.bW,A.bX,A.b1,A.bY]) +r(A.bp,A.cf) +q(A.bB,[A.cT,A.cU,A.da,A.d9,A.cW,A.d_,A.cZ,A.cY,A.cX,A.d2,A.d1,A.d0,A.dn,A.d7]) +r(A.b9,A.ce) +r(A.ch,A.bu) +r(A.at,A.bb) +q(A.Q,[A.b3,A.bH]) +s(A.aq,A.b7) +s(A.bg,A.f) +s(A.bh,A.A) +s(A.bi,A.f) +s(A.bj,A.A)})() +var v={G:typeof self!="undefined"?self:globalThis,typeUniverse:{eC:new Map(),tR:{},eT:{},tPV:{},sEA:[]},mangledGlobalNames:{a:"int",h:"double",ai:"num",u:"String",ad:"bool",q:"Null",i:"List",d:"Object",D:"Map",o:"JSObject"},mangledNames:{},types:["~()","q()","~(@)","d?(d?)","~(d?)","~(~())","q(@)","@(@)","@(@,u)","@(u)","q(~())","q(@,Z)","~(a,@)","q(d,Z)","~(d?,d?)","~(c7)","q(o)","q(d?)","M(u,D?)","~(u,d?,N)"],interceptorsByTag:null,leafTags:null,arrayRti:Symbol("$ti"),rttc:{"2;":(a,b)=>c=>c instanceof A.bk&&a.b(c.a)&&b.b(c.b),"3;inputData,requestId,taskName":(a,b,c)=>d=>d instanceof A.bl&&a.b(d.a)&&b.b(d.b)&&c.b(d.c)}} +A.hi(v.typeUniverse,JSON.parse('{"N":"Y","c_":"Y","b6":"Y","iy":"ao","bK":{"ad":[],"j":[]},"aQ":{"q":[],"j":[]},"aS":{"o":[]},"Y":{"o":[]},"x":{"i":["1"],"c":["1"],"o":[],"b":["1"]},"bJ":{"b4":[]},"cx":{"x":["1"],"i":["1"],"c":["1"],"o":[],"b":["1"]},"aI":{"z":["1"]},"bM":{"h":[],"ai":[]},"aP":{"h":[],"a":[],"ai":[],"j":[]},"bL":{"h":[],"ai":[],"j":[]},"an":{"u":[],"j":[]},"ar":{"b":["2"]},"aJ":{"z":["2"]},"a3":{"ar":["1","2"],"b":["2"],"b.E":"2"},"ba":{"a3":["1","2"],"ar":["1","2"],"c":["2"],"b":["2"],"b.E":"2"},"a4":{"k":["3","4"],"D":["3","4"],"k.K":"3","k.V":"4"},"bP":{"l":[]},"aK":{"f":["a"],"b7":["a"],"i":["a"],"c":["a"],"b":["a"],"f.E":"a"},"c":{"b":["1"]},"O":{"c":["1"],"b":["1"]},"R":{"z":["1"]},"a7":{"b":["2"],"b.E":"2"},"aN":{"a7":["1","2"],"c":["2"],"b":["2"],"b.E":"2"},"aY":{"z":["2"]},"S":{"O":["2"],"c":["2"],"b":["2"],"b.E":"2","O.E":"2"},"aq":{"f":["1"],"b7":["1"],"i":["1"],"c":["1"],"b":["1"]},"bk":{"au":[],"V":[]},"bl":{"av":[],"V":[]},"aL":{"D":["1","2"]},"aM":{"aL":["1","2"],"D":["1","2"]},"be":{"b":["1"],"b.E":"1"},"bf":{"z":["1"]},"b2":{"T":[],"l":[]},"bO":{"l":[]},"c9":{"l":[]},"bm":{"Z":[]},"X":{"a5":[]},"bB":{"a5":[]},"bC":{"a5":[]},"c6":{"a5":[]},"c4":{"a5":[]},"al":{"a5":[]},"c2":{"l":[]},"a6":{"k":["1","2"],"eq":["1","2"],"D":["1","2"],"k.K":"1","k.V":"2"},"aX":{"c":["1"],"b":["1"],"b.E":"1"},"aW":{"z":["1"]},"aU":{"c":["p<1,2>"],"b":["p<1,2>"],"b.E":"p<1,2>"},"aV":{"z":["p<1,2>"]},"au":{"V":[]},"av":{"V":[]},"ao":{"o":[],"dK":[],"j":[]},"b0":{"o":[]},"bQ":{"dL":[],"o":[],"j":[]},"ap":{"B":["1"],"o":[]},"aZ":{"f":["h"],"i":["h"],"B":["h"],"c":["h"],"o":[],"b":["h"],"A":["h"]},"b_":{"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"]},"bR":{"cs":[],"f":["h"],"i":["h"],"B":["h"],"c":["h"],"o":[],"b":["h"],"A":["h"],"j":[],"f.E":"h"},"bS":{"ct":[],"f":["h"],"i":["h"],"B":["h"],"c":["h"],"o":[],"b":["h"],"A":["h"],"j":[],"f.E":"h"},"bT":{"cu":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"bU":{"cv":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"bV":{"cw":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"bW":{"cG":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"bX":{"cH":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"b1":{"cI":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"bY":{"cJ":[],"f":["a"],"i":["a"],"B":["a"],"c":["a"],"o":[],"b":["a"],"A":["a"],"j":[],"f.E":"a"},"cf":{"l":[]},"bp":{"T":[],"l":[]},"bo":{"c7":[]},"bn":{"z":["1"]},"aw":{"b":["1"],"b.E":"1"},"H":{"l":[]},"b9":{"ce":["1"]},"v":{"M":["1"]},"bu":{"eC":[]},"ch":{"bu":[],"eC":[]},"bb":{"k":["1","2"],"D":["1","2"]},"at":{"bb":["1","2"],"k":["1","2"],"D":["1","2"],"k.K":"1","k.V":"2"},"bc":{"c":["1"],"b":["1"],"b.E":"1"},"bd":{"z":["1"]},"f":{"i":["1"],"c":["1"],"b":["1"]},"k":{"D":["1","2"]},"h":{"ai":[]},"a":{"ai":[]},"i":{"c":["1"],"b":["1"]},"bz":{"l":[]},"T":{"l":[]},"Q":{"l":[]},"b3":{"l":[]},"bH":{"l":[]},"b8":{"l":[]},"c8":{"l":[]},"c3":{"l":[]},"bD":{"l":[]},"bZ":{"l":[]},"b5":{"l":[]},"cj":{"Z":[]},"cw":{"i":["a"],"c":["a"],"b":["a"]},"cJ":{"i":["a"],"c":["a"],"b":["a"]},"cI":{"i":["a"],"c":["a"],"b":["a"]},"cu":{"i":["a"],"c":["a"],"b":["a"]},"cG":{"i":["a"],"c":["a"],"b":["a"]},"cv":{"i":["a"],"c":["a"],"b":["a"]},"cH":{"i":["a"],"c":["a"],"b":["a"]},"cs":{"i":["h"],"c":["h"],"b":["h"]},"ct":{"i":["h"],"c":["h"],"b":["h"]}}')) +A.hh(v.typeUniverse,JSON.parse('{"aq":1,"ap":1}')) var u={c:"Error handler must accept one Object or one Object and a StackTrace as arguments, and return a value of the returned future's type"} -var t=(function rtii(){var s=A.dB -return{n:s("C"),J:s("dc"),Y:s("dd"),O:s("c<@>"),C:s("l"),B:s("c5"),q:s("c6"),Z:s("a1"),d:s("J(v,O?)"),W:s("c7"),k:s("c8"),U:s("c9"),R:s("b<@>"),f:s("t"),s:s("t"),b:s("t<@>"),T:s("aE"),m:s("m"),g:s("K"),p:s("z<@>"),j:s("j<@>"),P:s("w"),K:s("d"),L:s("i0"),e:s("+()"),r:s("+(d?,v?)"),l:s("V"),N:s("v"),t:s("h"),c:s("Q"),D:s("cj"),w:s("ck"),x:s("cl"),E:s("cm"),G:s("aW"),_:s("q<@>"),A:s("al"),y:s("a9"),V:s("a9(d)"),i:s("f"),z:s("@"),a:s("@()"),v:s("@(d)"),Q:s("@(d,V)"),S:s("a"),bc:s("J?"),aQ:s("m?"),h:s("O?"),X:s("d?"),aD:s("v?"),F:s("a5<@,@>?"),u:s("a9?"),I:s("f?"),a3:s("a?"),ae:s("ad?"),o:s("ad"),H:s("~"),M:s("~()")}})();(function constants(){B.q=J.br.prototype -B.a=J.t.prototype -B.e=J.aD.prototype -B.r=J.K.prototype -B.t=J.aH.prototype -B.j=J.bH.prototype -B.f=J.aW.prototype +var t=(function rtii(){var s=A.dv +return{n:s("H"),J:s("dK"),Y:s("dL"),V:s("aK"),O:s("c<@>"),C:s("l"),B:s("cs"),q:s("ct"),Z:s("a5"),e:s("M(u,D?)"),W:s("cu"),k:s("cv"),D:s("cw"),R:s("b<@>"),G:s("x"),s:s("x"),b:s("x<@>"),T:s("aQ"),m:s("o"),g:s("N"),E:s("B<@>"),j:s("i<@>"),f:s("D<@,@>"),P:s("q"),K:s("d"),L:s("iz"),r:s("+()"),t:s("+(d?,u?)"),l:s("Z"),N:s("u"),p:s("c7"),w:s("j"),c:s("T"),a:s("cG"),x:s("cH"),ca:s("cI"),bX:s("cJ"),cr:s("b6"),_:s("v<@>"),A:s("at"),y:s("ad"),bG:s("ad(d)"),i:s("h"),z:s("@"),bd:s("@()"),v:s("@(d)"),Q:s("@(d,Z)"),S:s("a"),bc:s("M?"),aQ:s("o?"),h:s("D?"),X:s("d?"),aD:s("u?"),F:s("a8<@,@>?"),u:s("ad?"),I:s("h?"),a3:s("a?"),ae:s("ai?"),U:s("~(d?)?"),o:s("ai"),H:s("~"),M:s("~()"),d:s("~(c7)")}})();(function constants(){B.t=J.bI.prototype +B.a=J.x.prototype +B.c=J.aP.prototype +B.u=J.an.prototype +B.v=J.N.prototype +B.w=J.aS.prototype +B.j=J.c_.prototype +B.f=J.b6.prototype B.h=function getTagFallback(o) { var s = Object.prototype.toString.call(o); return s.substring(8, s.length - 1); @@ -2992,57 +3323,62 @@ B.m=function(hooks) { } B.i=function(hooks) { return hooks; } -B.c=new A.cg() -B.b=new A.bY() -B.d=new A.c_() -B.u=A.I("dc") -B.v=A.I("dd") -B.w=A.I("c5") -B.x=A.I("c6") -B.y=A.I("c7") -B.z=A.I("c8") -B.A=A.I("c9") -B.B=A.I("d") -B.C=A.I("cj") -B.D=A.I("ck") -B.E=A.I("cl") -B.F=A.I("cm")})();(function staticFields(){$.cF=null -$.B=A.H([],t.f) -$.dZ=null -$.dS=null -$.dR=null -$.eF=null -$.eA=null -$.eH=null -$.cZ=null -$.d2=null -$.dF=null -$.cG=A.H([],A.dB("t?>")) -$.aq=null -$.bg=null -$.bh=null -$.dv=!1 -$.o=B.b -$.e7=!1})();(function lazyInitializers(){var s=hunkHelpers.lazyFinal -s($,"hZ","dM",()=>A.hI("_$dart_dartClosure")) -s($,"ig","eT",()=>A.H([new J.bs()],A.dB("t"))) -s($,"i2","eJ",()=>A.R(A.ci({ +B.q=new A.bZ() +B.d=new A.cD() +B.b=new A.ch() +B.e=new A.cj() +B.r=new A.bG(3e6) +B.y={btc:0,eth:1,ada:2} +B.x=new A.aM(B.y,[6e4,2500,0.6],A.dv("aM")) +B.z=A.L("dK") +B.A=A.L("dL") +B.B=A.L("cs") +B.C=A.L("ct") +B.D=A.L("cu") +B.E=A.L("cv") +B.F=A.L("cw") +B.G=A.L("d") +B.H=A.L("cG") +B.I=A.L("cH") +B.J=A.L("cI") +B.K=A.L("cJ")})();(function staticFields(){$.d5=null +$.G=A.K([],t.G) +$.es=null +$.ek=null +$.ej=null +$.f7=null +$.f3=null +$.fa=null +$.du=null +$.dA=null +$.e9=null +$.d6=A.K([],A.dv("x?>")) +$.aA=null +$.bv=null +$.bw=null +$.e1=!1 +$.n=B.b +$.bx=null +$.eB=!1})();(function lazyInitializers(){var s=hunkHelpers.lazyFinal +s($,"ix","ee",()=>A.ie("_$dart_dartClosure")) +s($,"iO","fn",()=>A.K([new J.bJ()],A.dv("x"))) +s($,"iB","fd",()=>A.U(A.cF({ toString:function(){return"$receiver$"}}))) -s($,"i3","eK",()=>A.R(A.ci({$method$:null, +s($,"iC","fe",()=>A.U(A.cF({$method$:null, toString:function(){return"$receiver$"}}))) -s($,"i4","eL",()=>A.R(A.ci(null))) -s($,"i5","eM",()=>A.R(function(){var $argumentsExpr$="$arguments$" +s($,"iD","ff",()=>A.U(A.cF(null))) +s($,"iE","fg",()=>A.U(function(){var $argumentsExpr$="$arguments$" try{null.$method$($argumentsExpr$)}catch(r){return r.message}}())) -s($,"i8","eP",()=>A.R(A.ci(void 0))) -s($,"i9","eQ",()=>A.R(function(){var $argumentsExpr$="$arguments$" +s($,"iH","fj",()=>A.U(A.cF(void 0))) +s($,"iI","fk",()=>A.U(function(){var $argumentsExpr$="$arguments$" try{(void 0).$method$($argumentsExpr$)}catch(r){return r.message}}())) -s($,"i7","eO",()=>A.R(A.e5(null))) -s($,"i6","eN",()=>A.R(function(){try{null.$method$}catch(r){return r.message}}())) -s($,"ib","eS",()=>A.R(A.e5(void 0))) -s($,"ia","eR",()=>A.R(function(){try{(void 0).$method$}catch(r){return r.message}}())) -s($,"id","dN",()=>A.fw()) -s($,"ie","d9",()=>A.d5(B.B)) -s($,"ic","d8",()=>new A.bR())})();(function nativeSupport(){!function(){var s=function(a){var m={} +s($,"iG","fi",()=>A.U(A.ez(null))) +s($,"iF","fh",()=>A.U(function(){try{null.$method$}catch(r){return r.message}}())) +s($,"iK","fm",()=>A.U(A.ez(void 0))) +s($,"iJ","fl",()=>A.U(function(){try{(void 0).$method$}catch(r){return r.message}}())) +s($,"iM","ef",()=>A.h0()) +s($,"iN","dG",()=>A.dD(B.G)) +s($,"iL","aG",()=>new A.ca())})();(function nativeSupport(){!function(){var s=function(a){var m={} m[a]=1 return Object.keys(hunkHelpers.convertToFastObject(m))[0]} v.getIsolateTag=function(a){return s("___dart_"+a+v.isolateTag)} @@ -3053,15 +3389,15 @@ for(var o=0;;o++){var n=s(p+"_"+o+"_") if(!(n in q)){q[n]=1 v.isolateTag=n break}}v.dispatchPropertyName=v.getIsolateTag("dispatch_record")}() -hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer:A.ag,SharedArrayBuffer:A.ag,ArrayBufferView:A.aQ,DataView:A.by,Float32Array:A.bz,Float64Array:A.bA,Int16Array:A.bB,Int32Array:A.bC,Int8Array:A.bD,Uint16Array:A.bE,Uint32Array:A.bF,Uint8ClampedArray:A.aR,CanvasPixelArray:A.aR,Uint8Array:A.bG}) +hunkHelpers.setOrUpdateInterceptorsByTag({ArrayBuffer:A.ao,SharedArrayBuffer:A.ao,ArrayBufferView:A.b0,DataView:A.bQ,Float32Array:A.bR,Float64Array:A.bS,Int16Array:A.bT,Int32Array:A.bU,Int8Array:A.bV,Uint16Array:A.bW,Uint32Array:A.bX,Uint8ClampedArray:A.b1,CanvasPixelArray:A.b1,Uint8Array:A.bY}) hunkHelpers.setOrUpdateLeafTags({ArrayBuffer:true,SharedArrayBuffer:true,ArrayBufferView:false,DataView:true,Float32Array:true,Float64Array:true,Int16Array:true,Int32Array:true,Int8Array:true,Uint16Array:true,Uint32Array:true,Uint8ClampedArray:true,CanvasPixelArray:true,Uint8Array:false}) -A.ah.$nativeSuperclassTag="ArrayBufferView" -A.b2.$nativeSuperclassTag="ArrayBufferView" -A.b3.$nativeSuperclassTag="ArrayBufferView" -A.aO.$nativeSuperclassTag="ArrayBufferView" -A.b4.$nativeSuperclassTag="ArrayBufferView" -A.b5.$nativeSuperclassTag="ArrayBufferView" -A.aP.$nativeSuperclassTag="ArrayBufferView"})() +A.ap.$nativeSuperclassTag="ArrayBufferView" +A.bg.$nativeSuperclassTag="ArrayBufferView" +A.bh.$nativeSuperclassTag="ArrayBufferView" +A.aZ.$nativeSuperclassTag="ArrayBufferView" +A.bi.$nativeSuperclassTag="ArrayBufferView" +A.bj.$nativeSuperclassTag="ArrayBufferView" +A.b_.$nativeSuperclassTag="ArrayBufferView"})() Function.prototype.$1=function(a){return this(a)} Function.prototype.$2=function(a,b){return this(a,b)} Function.prototype.$0=function(){return this()} @@ -3074,5 +3410,5 @@ convertToFastObject($);(function(a){if(typeof document==="undefined"){a(null) return}if(typeof document.currentScript!="undefined"){a(document.currentScript) return}var s=document.scripts function onLoad(b){for(var q=0;q worker message contract (unit-tested) + worker_protocol.dart # page <-> worker message contract incl. chat messages (unit-tested) browser_glue_*.dart # js_interop bindings (web) + VM-safe stubs web/ workmanager_service_worker.js # the Service Worker (copy into your app) diff --git a/workmanager_web/lib/execution.dart b/workmanager_web/lib/execution.dart index feb4b550..982a7d4c 100644 --- a/workmanager_web/lib/execution.dart +++ b/workmanager_web/lib/execution.dart @@ -31,6 +31,21 @@ typedef BackgroundTaskHandler = Future Function( Map? inputData, ); +/// Signature of the handler invoked when the page sends a free-form message +/// to the background worker (see `WorkmanagerWeb.sendMessageToWorker`). +/// +/// The handler runs in the same context as the task handler (Web Worker, +/// Service Worker or in-page fallback), so it must stay Flutter-free too. +typedef WorkerMessageHandler = void Function(Object? payload); + +/// Signature used by dispatcher code to push a free-form message back to the +/// page while a task or message handler is running. +/// +/// The page receives it on `WorkmanagerWeb.workerMessages`. In the Service +/// Worker context the message is delivered to open pages via +/// `clients.postMessage`; when no page is open it is dropped. +typedef PageMessageSender = void Function(Object? payload); + /// Shared registry that holds the currently registered background task /// handler. /// @@ -46,6 +61,21 @@ class WorkmanagerExecution { /// The handler registered by the most recent [executeTask] call. BackgroundTaskHandler? taskHandler; + /// The handler invoked when the page sends a message to the worker. + /// + /// Registered by the callback dispatcher (mirrors [executeTask]); the Web + /// Worker and Service Worker runtimes route page messages here. + WorkerMessageHandler? messageHandler; + + /// Sends a message back to the page, when a page is reachable. + /// + /// Wired by the runtime: the compiled worker bundle sets it to post to the + /// owning page (or to open pages via `clients.postMessage` in the Service + /// Worker context); the page sets it for the in-page fallback path. Dispatcher + /// code can call this at any time; the page observes the message on + /// `WorkmanagerWeb.workerMessages`. + PageMessageSender? sendToPage; + /// The callback dispatcher passed to `WorkmanagerWeb().initialize(...)`. /// /// Kept so the page can run the dispatcher itself when no Web Worker is diff --git a/workmanager_web/lib/src/worker_protocol.dart b/workmanager_web/lib/src/worker_protocol.dart index 95f587c7..b420341d 100644 --- a/workmanager_web/lib/src/worker_protocol.dart +++ b/workmanager_web/lib/src/worker_protocol.dart @@ -18,7 +18,16 @@ abstract final class WorkerProtocol { /// Worker -> page: task finished (or failed). static const String typeResult = 'result'; + /// Page -> worker: a free-form message for the dispatcher's message + /// handler (`WorkmanagerExecution.messageHandler`). + static const String typeMessage = 'message'; + + /// Worker -> page: a free-form message sent by the dispatcher via + /// `WorkmanagerExecution.sendToPage`. + static const String typeWorkerMessage = 'workerMessage'; + static const String fieldRequestId = 'requestId'; + static const String fieldPayload = 'payload'; static const String fieldTaskName = 'taskName'; static const String fieldInputData = 'inputData'; static const String fieldResult = 'result'; @@ -71,6 +80,40 @@ abstract final class WorkerProtocol { }; } + /// Builds a page -> worker `message` message. + static Map encodeMessage(Object? payload) { + return { + 'type': typeMessage, + fieldPayload: payload, + }; + } + + /// Parses a page -> worker `message` message. Returns `null` when [raw] is + /// not of that type. + static Object? decodeMessage(Map raw) { + if (raw['type'] != typeMessage) { + return null; + } + return raw[fieldPayload]; + } + + /// Builds a worker -> page `workerMessage` message. + static Map encodeWorkerMessage(Object? payload) { + return { + 'type': typeWorkerMessage, + fieldPayload: payload, + }; + } + + /// Parses a worker -> page `workerMessage` message. Returns `null` when + /// [raw] is not of that type. + static Object? decodeWorkerMessage(Map raw) { + if (raw['type'] != typeWorkerMessage) { + return null; + } + return raw[fieldPayload]; + } + /// Parses a `result` message. Returns `null` when [raw] is malformed. static ({int requestId, Object? result, String? error})? decodeResult( Map raw) { diff --git a/workmanager_web/lib/src/worker_runtime_web.dart b/workmanager_web/lib/src/worker_runtime_web.dart index 34b36a59..f06ef97e 100644 --- a/workmanager_web/lib/src/worker_runtime_web.dart +++ b/workmanager_web/lib/src/worker_runtime_web.dart @@ -46,6 +46,7 @@ class WorkmanagerWebWorker { } }).toJS, ); + _wirePageMessaging(); // The page waits for this message before routing work to the worker. It // is a harmless no-op inside a Service Worker global. self.callMethod( @@ -54,7 +55,61 @@ class WorkmanagerWebWorker { ); } + /// Wires `WorkmanagerExecution.sendToPage` so dispatcher code can push + /// messages back to the page from either execution context: + /// + /// * **Dedicated Web Worker**: `self.postMessage` delivers directly to the + /// page that spawned the worker. + /// * **Service Worker global**: there is no `postMessage` on the SW global; + /// messages are delivered to every open page via `clients.postMessage`. + /// When no page is open they are dropped (persistent results still flow + /// through the IndexedDB event log). + static void _wirePageMessaging() { + final self = globalContext; + final execution = WorkmanagerExecution.instance; + if (self.has('clients')) { + execution.sendToPage = (Object? payload) { + final message = WorkerProtocol.encodeWorkerMessage(payload).jsify(); + final clients = self['clients'] as JSObject; + final promise = clients.callMethod( + 'matchAll'.toJS, + { + 'type': 'window'.toJS, + 'includeUncontrolled': true, + }.jsify(), + ) as JSPromise; + promise.toDart.then((Object? result) { + if (result is! List) { + return; + } + for (final client in result) { + if (client is JSObject) { + client.callMethod('postMessage'.toJS, message); + } + } + }); + }; + } else { + execution.sendToPage = (Object? payload) { + self.callMethod( + 'postMessage'.toJS, + WorkerProtocol.encodeWorkerMessage(payload).jsify(), + ); + }; + } + } + static void _handleMessage(Map raw) { + // Free-form page -> worker messages go to the dispatcher's message + // handler (when one is registered). + final message = WorkerProtocol.decodeMessage(raw); + if (message != null || raw['type'] == WorkerProtocol.typeMessage) { + final handler = WorkmanagerExecution.instance.messageHandler; + if (handler != null) { + handler(message); + } + return; + } final request = WorkerProtocol.decodeExecuteTask(raw); if (request == null) { return; diff --git a/workmanager_web/lib/workmanager_web.dart b/workmanager_web/lib/workmanager_web.dart index 992011fa..15655f92 100644 --- a/workmanager_web/lib/workmanager_web.dart +++ b/workmanager_web/lib/workmanager_web.dart @@ -146,6 +146,8 @@ class WorkmanagerWeb extends WorkmanagerPlatform { final StreamController _events = StreamController.broadcast(); + final StreamController _workerMessages = + StreamController.broadcast(); final Map _tasks = {}; final Map _oneOffTimers = {}; final Map> _pendingWorkerRequests = @@ -162,6 +164,16 @@ class WorkmanagerWeb extends WorkmanagerPlatform { /// from the Service Worker after the page was closed. Stream get backgroundEvents => _events.stream; + /// Live stream of free-form messages pushed by the background worker (or, + /// on the in-page fallback path, by the dispatcher running in the page). + /// + /// Dispatcher code sends messages via + /// `WorkmanagerExecution.instance.sendToPage`. Messages from a Service + /// Worker execution are delivered to open pages via `clients.postMessage`; + /// when no page is open they are dropped (persistent task results still + /// arrive through [backgroundEvents] on the next load). + Stream get workerMessages => _workerMessages.stream; + @override Future initialize( Function callbackDispatcher, { @@ -211,6 +223,15 @@ class WorkmanagerWeb extends WorkmanagerPlatform { _initializeWebWorker(resolvedDispatcherUrl); } + // In-page fallback path: when no Web Worker is available the dispatcher + // runs inside the page itself, so its `sendToPage` calls must surface on + // the page's [workerMessages] stream instead of posting to a worker. + WorkmanagerExecution.instance.sendToPage = (Object? payload) { + if (!_workerMessages.isClosed) { + _workerMessages.add(payload); + } + }; + await _syncTasksToServiceWorker(); } @@ -395,6 +416,25 @@ class WorkmanagerWeb extends WorkmanagerPlatform { await _runTask(taskName, inputData, 'trigger'); } + /// Sends a free-form message to the background worker's dispatcher. + /// + /// The message is delivered to the handler registered with + /// `WorkmanagerExecution.instance.messageHandler` in the compiled dispatcher + /// bundle. When no Web Worker is available the message is delivered + /// directly to the in-page dispatcher instead. The call never throws for + /// missing handlers — it is fire-and-forget, like `postMessage`. + void sendMessageToWorker(Object? payload) { + _checkInitialized(); + if (_worker != null && !_workerFailed) { + BrowserGlue.workerPostMessage( + _worker, + WorkerProtocol.encodeMessage(payload), + ); + return; + } + WorkmanagerExecution.instance.messageHandler?.call(payload); + } + Future _initializeServiceWorker( String serviceWorkerUrl, String dispatcherUrl, @@ -610,7 +650,15 @@ class WorkmanagerWeb extends WorkmanagerPlatform { if (raw is! Map) { return; } - final result = WorkerProtocol.decodeResult(raw.cast()); + final map = raw.cast(); + final message = WorkerProtocol.decodeWorkerMessage(map); + if (message != null || map['type'] == WorkerProtocol.typeWorkerMessage) { + if (!_workerMessages.isClosed) { + _workerMessages.add(message); + } + return; + } + final result = WorkerProtocol.decodeResult(map); if (result == null) { return; } @@ -671,6 +719,13 @@ class WorkmanagerWeb extends WorkmanagerPlatform { if (event is Map) { _emitEventFromMap(event.cast()); } + case 'workerMessage': + // Free-form message pushed by the dispatcher bundle while running in + // the Service Worker global (delivered via clients.postMessage). + final payload = map['payload']; + if (!_workerMessages.isClosed) { + _workerMessages.add(payload); + } } } diff --git a/workmanager_web/test/execution_test.dart b/workmanager_web/test/execution_test.dart index 18e0f831..43cc40bb 100644 --- a/workmanager_web/test/execution_test.dart +++ b/workmanager_web/test/execution_test.dart @@ -54,5 +54,25 @@ void main() { ); expect(execution.normalizeInputData(null), isNull); }); + + test('messageHandler receives messages sent to the worker', () { + final execution = WorkmanagerExecution.instance; + Object? received; + execution.messageHandler = (Object? payload) { + received = payload; + }; + execution.messageHandler?.call({'op': 'watch'}); + expect(received, {'op': 'watch'}); + }); + + test('sendToPage delivers messages back to the page', () { + final execution = WorkmanagerExecution.instance; + Object? delivered; + execution.sendToPage = (Object? payload) { + delivered = payload; + }; + execution.sendToPage?.call({'kind': 'tick'}); + expect(delivered, {'kind': 'tick'}); + }); }); } diff --git a/workmanager_web/test/web_worker_integration_test.dart b/workmanager_web/test/web_worker_integration_test.dart index ca040d3b..0ad02993 100644 --- a/workmanager_web/test/web_worker_integration_test.dart +++ b/workmanager_web/test/web_worker_integration_test.dart @@ -48,6 +48,38 @@ self.onmessage = (event) => { expect(decoded.error, isNull); expect(decoded.result, 'ok:demoTask:{"a":1,"b":"two"}'); }); + + test('free-form messages round-trip in a real Web Worker', () async { + final workerUrl = _createBlobWorkerUrl(''' +self.onmessage = (event) => { + const data = event.data || {}; + if (data.type === 'message') { + self.postMessage({ + type: 'workerMessage', + payload: { kind: 'echo', text: data.payload.text }, + }); + } +}; +'''); + final worker = _createWorker(workerUrl); + addTearDown(() => worker.callMethod('terminate'.toJS)); + + final reply = await _postAndAwait( + worker, + WorkerProtocol.encodeMessage({ + 'text': 'hello worker', + }), + ); + + expect(reply, isA()); + final decoded = WorkerProtocol.decodeWorkerMessage( + (reply! as Map).cast(), + ); + expect( + decoded, + {'kind': 'echo', 'text': 'hello worker'}, + ); + }); } String _createBlobWorkerUrl(String code) { diff --git a/workmanager_web/test/worker_protocol_test.dart b/workmanager_web/test/worker_protocol_test.dart index 9c042741..58580caa 100644 --- a/workmanager_web/test/worker_protocol_test.dart +++ b/workmanager_web/test/worker_protocol_test.dart @@ -68,5 +68,60 @@ void main() { ); expect(decoded!.error, 'boom'); }); + + test('message encodes and decodes round-trip', () { + final encoded = WorkerProtocol.encodeMessage({ + 'op': 'watch', + 'ticker': 'btc', + }); + expect(encoded['type'], WorkerProtocol.typeMessage); + final decoded = WorkerProtocol.decodeMessage( + encoded.cast(), + ); + expect( + decoded, + {'op': 'watch', 'ticker': 'btc'}, + ); + }); + + test('message round-trips a null payload', () { + final encoded = WorkerProtocol.encodeMessage(null); + final decoded = WorkerProtocol.decodeMessage( + encoded.cast(), + ); + expect(decoded, isNull); + // The type is still recognisable even when the payload is null. + expect(encoded['type'], WorkerProtocol.typeMessage); + }); + + test('workerMessage encodes and decodes round-trip', () { + final encoded = WorkerProtocol.encodeWorkerMessage({ + 'kind': 'tick', + 'price': 59123.45, + }); + expect(encoded['type'], WorkerProtocol.typeWorkerMessage); + final decoded = WorkerProtocol.decodeWorkerMessage( + encoded.cast(), + ); + expect( + decoded, + {'kind': 'tick', 'price': 59123.45}, + ); + }); + + test('decodeMessage and decodeWorkerMessage reject other types', () { + expect( + WorkerProtocol.decodeMessage({ + 'type': WorkerProtocol.typeResult, + }), + isNull, + ); + expect( + WorkerProtocol.decodeWorkerMessage({ + 'type': WorkerProtocol.typeExecuteTask, + }), + isNull, + ); + }); }); } From fe912cd15cc6d44ceb9419a48ff5cf3276298740 Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Sun, 2 Aug 2026 23:11:48 +0100 Subject: [PATCH 2/3] =?UTF-8?q?refactor(example):=20simplify=20web=20demo?= =?UTF-8?q?=20UI=20=E2=80=94=20tabs,=20auto-registered=20task,=20fewer=20b?= =?UTF-8?q?uttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The web demo had five action buttons plus four chips stacked with the chat and the event log. Rework it around two tabs: - Worker chat: conversation + message input + three action chips - Task log: single 'Run check now' action + event list The periodic price-check task is now registered automatically on startup so the demo works with zero setup; cancel moved to the app bar menu. Status is a single line instead of a paragraph. --- example/lib/web/web_demo_page.dart | 327 ++++++++++++++++------------- 1 file changed, 178 insertions(+), 149 deletions(-) diff --git a/example/lib/web/web_demo_page.dart b/example/lib/web/web_demo_page.dart index d36ab1b1..1ddb4c4b 100644 --- a/example/lib/web/web_demo_page.dart +++ b/example/lib/web/web_demo_page.dart @@ -12,10 +12,9 @@ const String _oneOffTask = 'dev.fluttercommunity.workmanagerExample.webOneOff'; const String _periodicTask = 'dev.fluttercommunity.workmanagerExample.webPeriodic'; -/// Web-only demo: registers tasks through [WorkmanagerWeb], shows a live -/// background-execution log and a two-way "worker chat" (page <-> background -/// worker via postMessage), and offers a PWA install button so Periodic -/// Background Sync can be tested. +/// Web-only demo: registers tasks through [WorkmanagerWeb], shows a two-way +/// "worker chat" (page <-> background worker via postMessage) and a task log +/// with background-execution events (incl. Service Worker replay). class WebDemoApp extends StatelessWidget { const WebDemoApp({super.key}); @@ -40,6 +39,7 @@ class _WebDemoPageState extends State { final List<_ChatLine> _chat = <_ChatLine>[]; final TextEditingController _messageController = TextEditingController(); bool _initializing = true; + bool _periodicRegistered = false; @override void initState() { @@ -61,8 +61,20 @@ class _WebDemoPageState extends State { webCallbackDispatcher, dispatcherUrl: WorkmanagerWeb.defaultDispatcherUrl, ); + // Register the demo task automatically so the demo works with zero + // setup; use DevTools -> Application -> Periodic Background Sync to + // trigger it while the page is closed. + await WorkmanagerWeb().registerPeriodicTask( + _periodicTask, + _periodicTask, + inputData: {'ticker': 'eth', 'threshold': 2400}, + frequency: const Duration(minutes: 15), + ); if (mounted) { - setState(() => _initializing = false); + setState(() { + _initializing = false; + _periodicRegistered = true; + }); } } @@ -100,165 +112,139 @@ class _WebDemoPageState extends State { _sendToWorker({'op': 'text', 'text': trimmed}); } - Future _registerOneOff() async { - await WorkmanagerWeb().registerOneOffTask( - _oneOffTask, - _oneOffTask, - inputData: { - 'via': 'oneOff', - 'ticker': 'btc', - 'threshold': 58000, - }, - initialDelay: const Duration(seconds: 5), - ); - } - - Future _registerPeriodic() async { - await WorkmanagerWeb().registerPeriodicTask( - _periodicTask, - _periodicTask, - inputData: { - 'via': 'periodic', - 'ticker': 'eth', - 'threshold': 2400, - }, - frequency: const Duration(minutes: 15), - ); - } - - Future _triggerNow() async { + Future _runCheckNow() async { await WorkmanagerWeb().triggerTask( _oneOffTask, - inputData: { - 'via': 'manual trigger', - 'ticker': 'btc', - 'threshold': 60000, - }, + inputData: {'ticker': 'btc', 'threshold': 60000}, ); } Future _cancelAll() async { await WorkmanagerWeb().cancelAll(); + if (mounted) { + setState(() => _periodicRegistered = false); + } } @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Workmanager Web (experimental)'), - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - ), - body: Column( - children: [ - Padding( - padding: const EdgeInsets.all(12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - _initializing - ? 'Initializing…' - : 'Tasks run in a Web Worker (page open) or the Service ' - 'Worker (page closed, via Periodic Sync / Push) and ' - 'results are replayed from IndexedDB on load. The ' - 'chat below talks to the worker over postMessage. ' - 'Install the PWA for real background sync.', - style: Theme.of(context).textTheme.bodySmall, - ), - const SizedBox(height: 8), - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - FilledButton( - onPressed: _initializing ? null : _registerOneOff, - child: const Text('One-off (5 s)'), - ), - FilledButton( - onPressed: _initializing ? null : _registerPeriodic, - child: const Text('Periodic (15 min)'), - ), - FilledButton.tonal( - onPressed: _initializing ? null : _triggerNow, - child: const Text('Run now'), - ), - OutlinedButton( - onPressed: _initializing ? null : _cancelAll, - child: const Text('Cancel all'), - ), - if (InstallGlue.canPrompt) - FilledButton.icon( - onPressed: InstallGlue.promptInstall, - icon: const Icon(Icons.download), - label: const Text('Install PWA'), - ), - ], + return DefaultTabController( + length: 2, + child: Scaffold( + appBar: AppBar( + title: const Text('Workmanager Web Demo'), + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + bottom: const TabBar( + tabs: [ + Tab(icon: Icon(Icons.chat_bubble_outline), text: 'Worker chat'), + Tab(icon: Icon(Icons.receipt_long_outlined), text: 'Task log'), + ], + ), + actions: [ + PopupMenuButton( + enabled: !_initializing, + onSelected: (String value) { + if (value == 'cancel') { + _cancelAll(); + } + }, + itemBuilder: (BuildContext context) => >[ + const PopupMenuItem( + value: 'cancel', + child: Text('Cancel all tasks'), ), ], ), + ], + ), + body: Column( + children: [ + _buildStatusStrip(context), + const Divider(height: 1), + Expanded( + child: TabBarView( + children: [ + _buildChatTab(context), + _buildTaskLogTab(context), + ], + ), + ), + ], + ), + ), + ); + } + + Widget _buildStatusStrip(BuildContext context) { + final theme = Theme.of(context); + final ready = !_initializing && _periodicRegistered; + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Row( + children: [ + Icon( + ready ? Icons.check_circle : Icons.hourglass_top, + size: 16, + color: ready ? Colors.green : theme.colorScheme.outline, ), - const Divider(height: 1), - _buildChatPanel(context), - const Divider(height: 1), + const SizedBox(width: 6), Expanded( - child: _events.isEmpty - ? const Center( - child: Text( - 'No background events yet.\n' - 'Events executed by the Web Worker, the Service Worker ' - '(page closed) and replayed on load appear here.', - textAlign: TextAlign.center, - ), - ) - : ListView.builder( - itemCount: _events.length, - itemBuilder: (BuildContext context, int index) { - return _EventTile(event: _events[index]); - }, - ), + child: Text( + _initializing + ? 'Starting worker…' + : _periodicRegistered + ? 'Worker online · price check scheduled every 15 min ' + '(runs in the background via Service Worker)' + : 'Worker online · no tasks scheduled', + style: theme.textTheme.bodySmall, + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), ), ], ), ); } - Widget _buildChatPanel(BuildContext context) { + Widget _buildChatTab(BuildContext context) { final theme = Theme.of(context); return Padding( - padding: const EdgeInsets.fromLTRB(12, 8, 12, 8), + padding: const EdgeInsets.all(12), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Text( - 'Worker chat — page ↔ background worker (postMessage)', - style: theme.textTheme.titleSmall, + 'Talk to the worker — it replies from a separate thread ' + '(postMessage). Try a watch, or type anything.', + style: theme.textTheme.bodySmall, ), - const SizedBox(height: 6), - Container( - height: 170, - decoration: BoxDecoration( - border: Border.all(color: theme.colorScheme.outlineVariant), - borderRadius: BorderRadius.circular(8), - ), - child: _chat.isEmpty - ? const Center( - child: Text( - 'Send a message or tap a suggestion below.\n' - 'The worker replies from a separate thread.', - textAlign: TextAlign.center, - style: TextStyle(fontSize: 12), + const SizedBox(height: 8), + Expanded( + child: Container( + decoration: BoxDecoration( + border: Border.all(color: theme.colorScheme.outlineVariant), + borderRadius: BorderRadius.circular(8), + ), + child: _chat.isEmpty + ? const Center( + child: Text( + 'Messages appear here.\n' + 'Tap "Watch BTC" below to see live replies.', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 12), + ), + ) + : ListView.builder( + reverse: true, + padding: const EdgeInsets.all(6), + itemCount: _chat.length, + itemBuilder: (BuildContext context, int index) { + return _ChatBubble(line: _chat[index]); + }, ), - ) - : ListView.builder( - reverse: true, - padding: const EdgeInsets.all(6), - itemCount: _chat.length, - itemBuilder: (BuildContext context, int index) { - return _ChatBubble(line: _chat[index]); - }, - ), + ), ), - const SizedBox(height: 6), + const SizedBox(height: 8), Row( children: [ Expanded( @@ -267,7 +253,7 @@ class _WebDemoPageState extends State { onSubmitted: _sendFreeText, decoration: const InputDecoration( isDense: true, - hintText: 'Type a message for the worker…', + hintText: 'Message the worker…', border: OutlineInputBorder(), ), ), @@ -282,13 +268,14 @@ class _WebDemoPageState extends State { ), ], ), - const SizedBox(height: 6), + const SizedBox(height: 8), Wrap( spacing: 6, runSpacing: 6, children: [ ActionChip( - label: const Text('Watch BTC (<\$58k)'), + avatar: const Icon(Icons.trending_up, size: 16), + label: const Text('Watch BTC'), onPressed: _initializing ? null : () => _sendToWorker({ @@ -298,7 +285,8 @@ class _WebDemoPageState extends State { }), ), ActionChip( - label: const Text('Watch ETH (<\$2.5k)'), + avatar: const Icon(Icons.trending_up, size: 16), + label: const Text('Watch ETH'), onPressed: _initializing ? null : () => _sendToWorker({ @@ -308,20 +296,12 @@ class _WebDemoPageState extends State { }), ), ActionChip( - label: const Text('Stop watch'), + avatar: const Icon(Icons.stop, size: 16), + label: const Text('Stop'), onPressed: _initializing ? null : () => _sendToWorker({'op': 'stop'}), ), - ActionChip( - label: const Text('Background check (task)'), - onPressed: _initializing - ? null - : () => _sendToWorker({ - 'op': 'check', - 'ticker': 'ada', - }), - ), ], ), ], @@ -329,6 +309,57 @@ class _WebDemoPageState extends State { ); } + Widget _buildTaskLogTab(BuildContext context) { + final theme = Theme.of(context); + return Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Padding( + padding: const EdgeInsets.all(12), + child: Wrap( + spacing: 8, + runSpacing: 8, + children: [ + FilledButton.tonalIcon( + onPressed: _initializing ? null : _runCheckNow, + icon: const Icon(Icons.play_arrow), + label: const Text('Run check now'), + ), + if (InstallGlue.canPrompt) + FilledButton.icon( + onPressed: InstallGlue.promptInstall, + icon: const Icon(Icons.download), + label: const Text('Install app'), + ), + ], + ), + ), + const Divider(height: 1), + Expanded( + child: _events.isEmpty + ? Padding( + padding: const EdgeInsets.all(24), + child: Text( + 'No background events yet.\n\n' + 'Events executed by the Web Worker (page open) or the ' + 'Service Worker (page closed, via Periodic Background ' + 'Sync / Push) appear here, replayed from IndexedDB on ' + 'load.', + textAlign: TextAlign.center, + style: theme.textTheme.bodySmall, + ), + ) + : ListView.builder( + itemCount: _events.length, + itemBuilder: (BuildContext context, int index) { + return _EventTile(event: _events[index]); + }, + ), + ), + ], + ); + } + String _formatSentMessage(Map message) { final op = message['op']; switch (op) { @@ -340,8 +371,6 @@ class _WebDemoPageState extends State { return '📨 stop'; case 'text': return '📨 ${message['text']}'; - case 'check': - return '📨 background check ${message['ticker']}'; default: return '📨 $message'; } From 62e51739823663c456c237d8644de3cbc46396fd Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Mon, 3 Aug 2026 07:52:07 +0100 Subject: [PATCH 3/3] style: dart format web demo page --- example/lib/web/web_demo_page.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example/lib/web/web_demo_page.dart b/example/lib/web/web_demo_page.dart index 1ddb4c4b..de17691d 100644 --- a/example/lib/web/web_demo_page.dart +++ b/example/lib/web/web_demo_page.dart @@ -90,7 +90,8 @@ class _WebDemoPageState extends State { return; } setState(() { - _chat.add(_ChatLine(text: _formatWorkerMessage(payload), fromWorker: true)); + _chat.add( + _ChatLine(text: _formatWorkerMessage(payload), fromWorker: true)); }); } @@ -98,7 +99,8 @@ class _WebDemoPageState extends State { /// `handleWorkerMessage` in `background_tasks.dart`). void _sendToWorker(Map message) { setState(() { - _chat.add(_ChatLine(text: _formatSentMessage(message), fromWorker: false)); + _chat + .add(_ChatLine(text: _formatSentMessage(message), fromWorker: false)); }); WorkmanagerWeb().sendMessageToWorker(message); }