upload build
This commit is contained in:
parent
ca2000affd
commit
50ab5b40c2
11 changed files with 1690 additions and 1892 deletions
1303
-/node.js
1303
-/node.js
|
|
@ -10442,6 +10442,162 @@ var $;
|
||||||
$.$hyoo_crus_app_node_ref = $hyoo_crus_app_node_ref;
|
$.$hyoo_crus_app_node_ref = $hyoo_crus_app_node_ref;
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $mol_fetch_response extends $mol_object2 {
|
||||||
|
native;
|
||||||
|
constructor(native) {
|
||||||
|
super();
|
||||||
|
this.native = native;
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
const types = ['unknown', 'inform', 'success', 'redirect', 'wrong', 'failed'];
|
||||||
|
return types[Math.floor(this.native.status / 100)];
|
||||||
|
}
|
||||||
|
code() {
|
||||||
|
return this.native.status;
|
||||||
|
}
|
||||||
|
message() {
|
||||||
|
return this.native.statusText || `HTTP Error ${this.code()}`;
|
||||||
|
}
|
||||||
|
headers() {
|
||||||
|
return this.native.headers;
|
||||||
|
}
|
||||||
|
mime() {
|
||||||
|
return this.headers().get('content-type');
|
||||||
|
}
|
||||||
|
stream() {
|
||||||
|
return this.native.body;
|
||||||
|
}
|
||||||
|
text() {
|
||||||
|
const buffer = this.buffer();
|
||||||
|
const native = this.native;
|
||||||
|
const mime = native.headers.get('content-type') || '';
|
||||||
|
const [, charset] = /charset=(.*)/.exec(mime) || [, 'utf-8'];
|
||||||
|
const decoder = new TextDecoder(charset);
|
||||||
|
return decoder.decode(buffer);
|
||||||
|
}
|
||||||
|
json() {
|
||||||
|
return $mol_wire_sync(this.native).json();
|
||||||
|
}
|
||||||
|
blob() {
|
||||||
|
return $mol_wire_sync(this.native).blob();
|
||||||
|
}
|
||||||
|
buffer() {
|
||||||
|
return $mol_wire_sync(this.native).arrayBuffer();
|
||||||
|
}
|
||||||
|
xml() {
|
||||||
|
return $mol_dom_parse(this.text(), 'application/xml');
|
||||||
|
}
|
||||||
|
xhtml() {
|
||||||
|
return $mol_dom_parse(this.text(), 'application/xhtml+xml');
|
||||||
|
}
|
||||||
|
html() {
|
||||||
|
return $mol_dom_parse(this.text(), 'text/html');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "stream", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "text", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "xml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "xhtml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "html", null);
|
||||||
|
$.$mol_fetch_response = $mol_fetch_response;
|
||||||
|
class $mol_fetch extends $mol_object2 {
|
||||||
|
static request(input, init = {}) {
|
||||||
|
const controller = new AbortController();
|
||||||
|
let done = false;
|
||||||
|
const promise = fetch(input, {
|
||||||
|
...init,
|
||||||
|
signal: controller.signal,
|
||||||
|
}).finally(() => {
|
||||||
|
done = true;
|
||||||
|
});
|
||||||
|
return Object.assign(promise, {
|
||||||
|
destructor: () => {
|
||||||
|
if (!done && !controller.signal.aborted)
|
||||||
|
controller.abort();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static response(input, init) {
|
||||||
|
return new $mol_fetch_response($mol_wire_sync(this).request(input, init));
|
||||||
|
}
|
||||||
|
static success(input, init) {
|
||||||
|
const response = this.response(input, init);
|
||||||
|
if (response.status() === 'success')
|
||||||
|
return response;
|
||||||
|
throw new Error(response.message(), { cause: response });
|
||||||
|
}
|
||||||
|
static stream(input, init) {
|
||||||
|
return this.success(input, init).stream();
|
||||||
|
}
|
||||||
|
static text(input, init) {
|
||||||
|
return this.success(input, init).text();
|
||||||
|
}
|
||||||
|
static json(input, init) {
|
||||||
|
return this.success(input, init).json();
|
||||||
|
}
|
||||||
|
static blob(input, init) {
|
||||||
|
return this.success(input, init).blob();
|
||||||
|
}
|
||||||
|
static buffer(input, init) {
|
||||||
|
return this.success(input, init).buffer();
|
||||||
|
}
|
||||||
|
static xml(input, init) {
|
||||||
|
return this.success(input, init).xml();
|
||||||
|
}
|
||||||
|
static xhtml(input, init) {
|
||||||
|
return this.success(input, init).xhtml();
|
||||||
|
}
|
||||||
|
static html(input, init) {
|
||||||
|
return this.success(input, init).html();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "response", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "success", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "stream", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "text", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "json", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "blob", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "buffer", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "xml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "xhtml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "html", null);
|
||||||
|
$.$mol_fetch = $mol_fetch;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
var $;
|
var $;
|
||||||
|
|
@ -15082,26 +15238,6 @@ var $;
|
||||||
($mol_mem(($.$hd_canary_app_profile.prototype), "Current_profile"));
|
($mol_mem(($.$hd_canary_app_profile.prototype), "Current_profile"));
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
async function $mol_crypto_sacred_pass(pass, salt) {
|
|
||||||
const raw = await $mol_crypto_native.subtle.importKey("raw", $mol_charset_encode(pass), "PBKDF2", false, ["deriveKey"]).catch($mol_crypto_restack);
|
|
||||||
const hard = await $mol_crypto_native.subtle.deriveKey({
|
|
||||||
name: "PBKDF2",
|
|
||||||
salt,
|
|
||||||
iterations: 10_000,
|
|
||||||
hash: "SHA-256",
|
|
||||||
}, raw, {
|
|
||||||
name: 'AES-CBC',
|
|
||||||
length: 128,
|
|
||||||
}, Boolean('extractable'), ['encrypt', 'decrypt']).catch($mol_crypto_restack);
|
|
||||||
return $mol_crypto_sacred.from_native(hard);
|
|
||||||
}
|
|
||||||
$.$mol_crypto_sacred_pass = $mol_crypto_sacred_pass;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
@ -15112,29 +15248,14 @@ var $;
|
||||||
var $$;
|
var $$;
|
||||||
(function ($$) {
|
(function ($$) {
|
||||||
class $hd_canary_app_profile extends $.$hd_canary_app_profile {
|
class $hd_canary_app_profile extends $.$hd_canary_app_profile {
|
||||||
content() {
|
|
||||||
return [
|
|
||||||
this.key_import()
|
|
||||||
? this.Import_block()
|
|
||||||
: this.Export_block()
|
|
||||||
];
|
|
||||||
}
|
|
||||||
auth_title() {
|
auth_title() {
|
||||||
return this.key_import()
|
return this.key_import()
|
||||||
? "Войти в профиль"
|
? "Войти в профиль"
|
||||||
: "Поделиться профилем";
|
: "Поделиться профилем";
|
||||||
}
|
}
|
||||||
export_link() {
|
|
||||||
return this.$.$mol_state_arg.link({
|
|
||||||
auth: this.key_export(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
key_import(next) {
|
key_import(next) {
|
||||||
return this.$.$mol_state_arg.value('auth', next) ?? null;
|
return this.$.$mol_state_arg.value('auth', next) ?? null;
|
||||||
}
|
}
|
||||||
peer_new() {
|
|
||||||
return $hyoo_crus_auth.from(this.key_new()).peer();
|
|
||||||
}
|
|
||||||
current_peer() {
|
current_peer() {
|
||||||
return this.$.$hyoo_crus_auth.current().peer();
|
return this.$.$hyoo_crus_auth.current().peer();
|
||||||
}
|
}
|
||||||
|
|
@ -15149,70 +15270,10 @@ var $;
|
||||||
profile_name(next) {
|
profile_name(next) {
|
||||||
return this.home().title(next);
|
return this.home().title(next);
|
||||||
}
|
}
|
||||||
import_switch() {
|
|
||||||
this.$.$hyoo_crus_auth.current($hyoo_crus_auth.from(this.key_new()));
|
|
||||||
this.password('');
|
|
||||||
this.key_import(null);
|
|
||||||
}
|
}
|
||||||
password_bid() {
|
|
||||||
const pass = this.password();
|
|
||||||
if (pass.length <= 7)
|
|
||||||
return this.bid_pass_long();
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
export_rows() {
|
|
||||||
return [
|
|
||||||
this.Expot_bid(),
|
|
||||||
this.Export_pass(),
|
|
||||||
...this.password_bid() ? [] : [this.Export_link()],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
import_rows() {
|
|
||||||
return [
|
|
||||||
this.Iport_descr(),
|
|
||||||
this.Import_pass(),
|
|
||||||
...this.key_new() ? [this.Import_switch()] : [],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
key_new() {
|
|
||||||
const serial = this.key_import();
|
|
||||||
if (!serial)
|
|
||||||
return null;
|
|
||||||
try {
|
|
||||||
const password = this.password();
|
|
||||||
const app = $mol_crypto_hash($mol_charset_encode("hd_canary"));
|
|
||||||
const secret = $mol_wire_sync($mol_crypto_sacred_pass)(password, app);
|
|
||||||
const data = $mol_base64_url_decode(serial);
|
|
||||||
const salt = $mol_crypto_hash(app).slice(0, 16);
|
|
||||||
const closed = $mol_wire_sync(secret).decrypt(data, salt);
|
|
||||||
return closed;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
$mol_fail_log(error);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key_export() {
|
|
||||||
const password = this.password();
|
|
||||||
const app = $mol_crypto_hash($mol_charset_encode("hd_canary"));
|
|
||||||
const secret = $mol_wire_sync($mol_crypto_sacred_pass)(password, app);
|
|
||||||
const salt = $mol_crypto_hash(app).slice(0, 16);
|
|
||||||
const closed = $mol_wire_sync(secret).encrypt(this.$.$hyoo_crus_auth.current(), salt);
|
|
||||||
return $mol_base64_url_encode(closed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "content", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "auth_title", null);
|
], $hd_canary_app_profile.prototype, "auth_title", null);
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "export_link", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "peer_new", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "current_peer", null);
|
], $hd_canary_app_profile.prototype, "current_peer", null);
|
||||||
|
|
@ -15225,19 +15286,6 @@ var $;
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "profile_name", null);
|
], $hd_canary_app_profile.prototype, "profile_name", null);
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $hd_canary_app_profile.prototype, "import_switch", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "password_bid", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "key_new", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action,
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "key_export", null);
|
|
||||||
$$.$hd_canary_app_profile = $hd_canary_app_profile;
|
$$.$hd_canary_app_profile = $hd_canary_app_profile;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
@ -15249,12 +15297,6 @@ var $;
|
||||||
var $$;
|
var $$;
|
||||||
(function ($$) {
|
(function ($$) {
|
||||||
const { rem } = $mol_style_unit;
|
const { rem } = $mol_style_unit;
|
||||||
$mol_style_define($hd_canary_app_profile, {
|
|
||||||
Current_peer_avatar: {
|
|
||||||
width: rem(2),
|
|
||||||
height: rem(2)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
|
@ -15323,561 +15365,6 @@ var $;
|
||||||
($mol_mem(($.$hd_canary_app.prototype), "Menu_logo"));
|
($mol_mem(($.$hd_canary_app.prototype), "Menu_logo"));
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_check_list) = class $mol_check_list extends ($.$mol_view) {
|
|
||||||
option_checked(id, next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
option_title(id){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
option_label(id){
|
|
||||||
return [(this.option_title(id))];
|
|
||||||
}
|
|
||||||
enabled(){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
option_enabled(id){
|
|
||||||
return (this.enabled());
|
|
||||||
}
|
|
||||||
option_hint(id){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
items(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
dictionary(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Option(id){
|
|
||||||
const obj = new this.$.$mol_check();
|
|
||||||
(obj.checked) = (next) => ((this.option_checked(id, next)));
|
|
||||||
(obj.label) = () => ((this.option_label(id)));
|
|
||||||
(obj.enabled) = () => ((this.option_enabled(id)));
|
|
||||||
(obj.hint) = () => ((this.option_hint(id)));
|
|
||||||
(obj.minimal_height) = () => (24);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
options(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
keys(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
sub(){
|
|
||||||
return (this.items());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem_key(($.$mol_check_list.prototype), "option_checked"));
|
|
||||||
($mol_mem_key(($.$mol_check_list.prototype), "Option"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_check_list extends $.$mol_check_list {
|
|
||||||
options() {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
dictionary(next) {
|
|
||||||
return next ?? {};
|
|
||||||
}
|
|
||||||
option_checked(id, next) {
|
|
||||||
const prev = this.dictionary();
|
|
||||||
if (next === undefined)
|
|
||||||
return prev[id] ?? null;
|
|
||||||
const next_rec = { ...prev, [id]: next };
|
|
||||||
if (next === null)
|
|
||||||
delete next_rec[id];
|
|
||||||
return this.dictionary(next_rec)[id] ?? null;
|
|
||||||
}
|
|
||||||
keys() {
|
|
||||||
return Object.keys(this.options());
|
|
||||||
}
|
|
||||||
items() {
|
|
||||||
return this.keys().map(key => this.Option(key));
|
|
||||||
}
|
|
||||||
option_title(key) {
|
|
||||||
return this.options()[key] || key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_check_list.prototype, "keys", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_check_list.prototype, "items", null);
|
|
||||||
$$.$mol_check_list = $mol_check_list;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
$mol_style_attach("mol/check/list/list.view.css", "[mol_check_list] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex: 1 1 auto;\n\tborder-radius: var(--mol_gap_round);\n\tgap: 1px;\n}\n\n[mol_check_list_option] {\n\tflex: 0 1 auto;\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"]) {\n\ttext-shadow: 0 0;\n\tcolor: var(--mol_theme_current);\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"][disabled]) {\n\tcolor: var(--mol_theme_text);\n}\n");
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_switch) = class $mol_switch extends ($.$mol_check_list) {
|
|
||||||
value(next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$mol_switch.prototype), "value"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $mol_state_session extends $mol_object {
|
|
||||||
static 'native()';
|
|
||||||
static native() {
|
|
||||||
if (this['native()'])
|
|
||||||
return this['native()'];
|
|
||||||
check: try {
|
|
||||||
const native = $mol_dom_context.sessionStorage;
|
|
||||||
if (!native)
|
|
||||||
break check;
|
|
||||||
native.setItem('', '');
|
|
||||||
native.removeItem('');
|
|
||||||
return this['native()'] = native;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
console.warn(error);
|
|
||||||
}
|
|
||||||
return this['native()'] = {
|
|
||||||
getItem(key) {
|
|
||||||
return this[':' + key];
|
|
||||||
},
|
|
||||||
setItem(key, value) {
|
|
||||||
this[':' + key] = value;
|
|
||||||
},
|
|
||||||
removeItem(key) {
|
|
||||||
this[':' + key] = void 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
static value(key, next) {
|
|
||||||
if (next === void 0)
|
|
||||||
return JSON.parse(this.native().getItem(key) || 'null');
|
|
||||||
if (next === null)
|
|
||||||
this.native().removeItem(key);
|
|
||||||
else
|
|
||||||
this.native().setItem(key, JSON.stringify(next));
|
|
||||||
return next;
|
|
||||||
}
|
|
||||||
prefix() { return ''; }
|
|
||||||
value(key, next) {
|
|
||||||
return $mol_state_session.value(this.prefix() + '.' + key, next);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem_key
|
|
||||||
], $mol_state_session, "value", null);
|
|
||||||
$.$mol_state_session = $mol_state_session;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_switch extends $.$mol_switch {
|
|
||||||
value(next) {
|
|
||||||
return $mol_state_session.value(`${this}.value()`, next) ?? '';
|
|
||||||
}
|
|
||||||
option_checked(key, next) {
|
|
||||||
if (next === undefined)
|
|
||||||
return this.value() == key;
|
|
||||||
this.value(next ? key : '');
|
|
||||||
return next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$$.$mol_switch = $mol_switch;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_deck) = class $mol_deck extends ($.$mol_list) {
|
|
||||||
current(next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return "0";
|
|
||||||
}
|
|
||||||
switch_options(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Switch(){
|
|
||||||
const obj = new this.$.$mol_switch();
|
|
||||||
(obj.value) = (next) => ((this.current(next)));
|
|
||||||
(obj.options) = () => ((this.switch_options()));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
Content(){
|
|
||||||
const obj = new this.$.$mol_view();
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
items(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
rows(){
|
|
||||||
return [(this.Switch()), (this.Content())];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "current"));
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "Switch"));
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "Content"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_deck extends $.$mol_deck {
|
|
||||||
current(next) {
|
|
||||||
return $mol_state_session.value(`${this}.current()`, next) || '0';
|
|
||||||
}
|
|
||||||
switch_options() {
|
|
||||||
let options = {};
|
|
||||||
this.items().forEach((item, index) => {
|
|
||||||
options[String(index)] = item.title();
|
|
||||||
});
|
|
||||||
return options;
|
|
||||||
}
|
|
||||||
Content() {
|
|
||||||
return this.items()[Number(this.current())];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_deck.prototype, "Content", null);
|
|
||||||
$$.$mol_deck = $mol_deck;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$hd_canary_app_bar) = class $hd_canary_app_bar extends ($.$mol_page) {
|
|
||||||
home(){
|
|
||||||
return (this.My_monitor().home());
|
|
||||||
}
|
|
||||||
My_monitor(){
|
|
||||||
const obj = new this.$.$hd_canary_app_monitor();
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
users(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Other_monitors(){
|
|
||||||
const obj = new this.$.$mol_book2_catalog();
|
|
||||||
(obj.head) = () => (null);
|
|
||||||
(obj.param) = () => ("user");
|
|
||||||
(obj.menu_title) = () => ("Расшаренные мне");
|
|
||||||
(obj.spreads) = () => ((this.users()));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
Info(){
|
|
||||||
const obj = new this.$.$mol_deck();
|
|
||||||
(obj.items) = () => ([(this.My_monitor()), (this.Other_monitors())]);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
panel_title(id){
|
|
||||||
return "diff";
|
|
||||||
}
|
|
||||||
Head(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
title(){
|
|
||||||
return (this.$.$mol_locale.text("$hd_canary_app_bar_title"));
|
|
||||||
}
|
|
||||||
body(){
|
|
||||||
return [(this.Info())];
|
|
||||||
}
|
|
||||||
Panel(id){
|
|
||||||
const obj = new this.$.$hd_canary_app_monitor();
|
|
||||||
(obj.title) = () => ((this.panel_title(id)));
|
|
||||||
(obj.home) = () => ((this.selected_home(id)));
|
|
||||||
(obj.Add) = () => (null);
|
|
||||||
(obj.Target_remove) = () => (null);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "My_monitor"));
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "Other_monitors"));
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "Info"));
|
|
||||||
($mol_mem_key(($.$hd_canary_app_bar.prototype), "Panel"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $hd_canary_app_bar extends $.$hd_canary_app_bar {
|
|
||||||
users() {
|
|
||||||
const presets = this.$.$hyoo_crus_glob.home($hd_canary_app_home).SharedPresets(null);
|
|
||||||
return presets.items().map(key => this.Panel(key));
|
|
||||||
}
|
|
||||||
selected_home(ref) {
|
|
||||||
return this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
|
||||||
}
|
|
||||||
panel_title(ref) {
|
|
||||||
if (this.selected_home(ref).title() != "")
|
|
||||||
return this.selected_home(ref).title();
|
|
||||||
return this.selected_home(ref).land_ref().description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$$.$hd_canary_app_bar = $hd_canary_app_bar;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $hd_canary_app extends $.$hd_canary_app {
|
|
||||||
share_link() {
|
|
||||||
return this.$.$mol_state_arg.link({
|
|
||||||
panel: this.$.$hyoo_crus_glob.home($hd_canary_app_home).land_ref().description,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app.prototype, "share_link", null);
|
|
||||||
$$.$hd_canary_app = $hd_canary_app;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $mol_fetch_response extends $mol_object2 {
|
|
||||||
native;
|
|
||||||
constructor(native) {
|
|
||||||
super();
|
|
||||||
this.native = native;
|
|
||||||
}
|
|
||||||
status() {
|
|
||||||
const types = ['unknown', 'inform', 'success', 'redirect', 'wrong', 'failed'];
|
|
||||||
return types[Math.floor(this.native.status / 100)];
|
|
||||||
}
|
|
||||||
code() {
|
|
||||||
return this.native.status;
|
|
||||||
}
|
|
||||||
message() {
|
|
||||||
return this.native.statusText || `HTTP Error ${this.code()}`;
|
|
||||||
}
|
|
||||||
headers() {
|
|
||||||
return this.native.headers;
|
|
||||||
}
|
|
||||||
mime() {
|
|
||||||
return this.headers().get('content-type');
|
|
||||||
}
|
|
||||||
stream() {
|
|
||||||
return this.native.body;
|
|
||||||
}
|
|
||||||
text() {
|
|
||||||
const buffer = this.buffer();
|
|
||||||
const native = this.native;
|
|
||||||
const mime = native.headers.get('content-type') || '';
|
|
||||||
const [, charset] = /charset=(.*)/.exec(mime) || [, 'utf-8'];
|
|
||||||
const decoder = new TextDecoder(charset);
|
|
||||||
return decoder.decode(buffer);
|
|
||||||
}
|
|
||||||
json() {
|
|
||||||
return $mol_wire_sync(this.native).json();
|
|
||||||
}
|
|
||||||
blob() {
|
|
||||||
return $mol_wire_sync(this.native).blob();
|
|
||||||
}
|
|
||||||
buffer() {
|
|
||||||
return $mol_wire_sync(this.native).arrayBuffer();
|
|
||||||
}
|
|
||||||
xml() {
|
|
||||||
return $mol_dom_parse(this.text(), 'application/xml');
|
|
||||||
}
|
|
||||||
xhtml() {
|
|
||||||
return $mol_dom_parse(this.text(), 'application/xhtml+xml');
|
|
||||||
}
|
|
||||||
html() {
|
|
||||||
return $mol_dom_parse(this.text(), 'text/html');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "stream", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "text", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "xml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "xhtml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "html", null);
|
|
||||||
$.$mol_fetch_response = $mol_fetch_response;
|
|
||||||
class $mol_fetch extends $mol_object2 {
|
|
||||||
static request(input, init = {}) {
|
|
||||||
const controller = new AbortController();
|
|
||||||
let done = false;
|
|
||||||
const promise = fetch(input, {
|
|
||||||
...init,
|
|
||||||
signal: controller.signal,
|
|
||||||
}).finally(() => {
|
|
||||||
done = true;
|
|
||||||
});
|
|
||||||
return Object.assign(promise, {
|
|
||||||
destructor: () => {
|
|
||||||
if (!done && !controller.signal.aborted)
|
|
||||||
controller.abort();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
static response(input, init) {
|
|
||||||
return new $mol_fetch_response($mol_wire_sync(this).request(input, init));
|
|
||||||
}
|
|
||||||
static success(input, init) {
|
|
||||||
const response = this.response(input, init);
|
|
||||||
if (response.status() === 'success')
|
|
||||||
return response;
|
|
||||||
throw new Error(response.message(), { cause: response });
|
|
||||||
}
|
|
||||||
static stream(input, init) {
|
|
||||||
return this.success(input, init).stream();
|
|
||||||
}
|
|
||||||
static text(input, init) {
|
|
||||||
return this.success(input, init).text();
|
|
||||||
}
|
|
||||||
static json(input, init) {
|
|
||||||
return this.success(input, init).json();
|
|
||||||
}
|
|
||||||
static blob(input, init) {
|
|
||||||
return this.success(input, init).blob();
|
|
||||||
}
|
|
||||||
static buffer(input, init) {
|
|
||||||
return this.success(input, init).buffer();
|
|
||||||
}
|
|
||||||
static xml(input, init) {
|
|
||||||
return this.success(input, init).xml();
|
|
||||||
}
|
|
||||||
static xhtml(input, init) {
|
|
||||||
return this.success(input, init).xhtml();
|
|
||||||
}
|
|
||||||
static html(input, init) {
|
|
||||||
return this.success(input, init).html();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "response", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "success", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "stream", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "text", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "json", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "blob", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "buffer", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "xml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "xhtml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "html", null);
|
|
||||||
$.$mol_fetch = $mol_fetch;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $hd_canary_app_server extends $hyoo_crus_dict.with({
|
|
||||||
Users: $hyoo_crus_list_ref_to(() => $hyoo_crus_atom_ref),
|
|
||||||
}) {
|
|
||||||
}
|
|
||||||
$.$hd_canary_app_server = $hd_canary_app_server;
|
|
||||||
class $hd_canary_app_home extends $hyoo_crus_home.with({
|
|
||||||
Sites: $hyoo_crus_list_ref_to(() => $hd_canary_app_home_site),
|
|
||||||
SharedPresets: $hyoo_crus_list_ref_to(() => $hyoo_crus_ref),
|
|
||||||
}) {
|
|
||||||
}
|
|
||||||
$.$hd_canary_app_home = $hd_canary_app_home;
|
|
||||||
class $hd_canary_app_home_site extends $hyoo_crus_dict.with({
|
|
||||||
url: $hyoo_crus_atom_str,
|
|
||||||
title: $hyoo_crus_atom_str,
|
|
||||||
last_ping_time: $hyoo_crus_atom_time,
|
|
||||||
last_ping_status: $hyoo_crus_atom_bool,
|
|
||||||
}) {
|
|
||||||
tick() {
|
|
||||||
this.$.$mol_state_time.now(5000);
|
|
||||||
this.$.$mol_log3_done({
|
|
||||||
place: this,
|
|
||||||
message: this.land().ref().description,
|
|
||||||
});
|
|
||||||
if (this.can_change()) {
|
|
||||||
const url = this.url().val();
|
|
||||||
const title = this.title().val();
|
|
||||||
this.$.$mol_log3_done({
|
|
||||||
place: this,
|
|
||||||
message: this.land().ref().description,
|
|
||||||
...{ action: "tick", url, title }
|
|
||||||
});
|
|
||||||
const request = $mol_fetch.response(url);
|
|
||||||
this.last_ping_status(null).val(request.code() == 200);
|
|
||||||
this.last_ping_time(null).val(new $mol_time_moment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_home_site.prototype, "tick", null);
|
|
||||||
$.$hd_canary_app_home_site = $hd_canary_app_home_site;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
($.$mol_chip) = class $mol_chip extends ($.$mol_view) {
|
($.$mol_chip) = class $mol_chip extends ($.$mol_view) {
|
||||||
hint(){
|
hint(){
|
||||||
|
|
@ -16150,6 +15637,10 @@ var $;
|
||||||
(obj.items) = () => ((this.target_list()));
|
(obj.items) = () => ((this.target_list()));
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
home(){
|
||||||
|
const obj = new this.$.$hd_canary_app_home();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
Home_button(){
|
Home_button(){
|
||||||
const obj = new this.$.$mol_button_minor();
|
const obj = new this.$.$mol_button_minor();
|
||||||
(obj.title) = () => ("Домой");
|
(obj.title) = () => ("Домой");
|
||||||
|
|
@ -16203,6 +15694,7 @@ var $;
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target_moment"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target_moment"));
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "Target_list"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "Target_list"));
|
||||||
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "home"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "Home_button"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "Home_button"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "targets"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "targets"));
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "target_result"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "target_result"));
|
||||||
|
|
@ -16434,6 +15926,410 @@ var $;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_check_list) = class $mol_check_list extends ($.$mol_view) {
|
||||||
|
option_checked(id, next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
option_title(id){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
option_label(id){
|
||||||
|
return [(this.option_title(id))];
|
||||||
|
}
|
||||||
|
enabled(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
option_enabled(id){
|
||||||
|
return (this.enabled());
|
||||||
|
}
|
||||||
|
option_hint(id){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
items(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
dictionary(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Option(id){
|
||||||
|
const obj = new this.$.$mol_check();
|
||||||
|
(obj.checked) = (next) => ((this.option_checked(id, next)));
|
||||||
|
(obj.label) = () => ((this.option_label(id)));
|
||||||
|
(obj.enabled) = () => ((this.option_enabled(id)));
|
||||||
|
(obj.hint) = () => ((this.option_hint(id)));
|
||||||
|
(obj.minimal_height) = () => (24);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
options(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
keys(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
sub(){
|
||||||
|
return (this.items());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem_key(($.$mol_check_list.prototype), "option_checked"));
|
||||||
|
($mol_mem_key(($.$mol_check_list.prototype), "Option"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_check_list extends $.$mol_check_list {
|
||||||
|
options() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
dictionary(next) {
|
||||||
|
return next ?? {};
|
||||||
|
}
|
||||||
|
option_checked(id, next) {
|
||||||
|
const prev = this.dictionary();
|
||||||
|
if (next === undefined)
|
||||||
|
return prev[id] ?? null;
|
||||||
|
const next_rec = { ...prev, [id]: next };
|
||||||
|
if (next === null)
|
||||||
|
delete next_rec[id];
|
||||||
|
return this.dictionary(next_rec)[id] ?? null;
|
||||||
|
}
|
||||||
|
keys() {
|
||||||
|
return Object.keys(this.options());
|
||||||
|
}
|
||||||
|
items() {
|
||||||
|
return this.keys().map(key => this.Option(key));
|
||||||
|
}
|
||||||
|
option_title(key) {
|
||||||
|
return this.options()[key] || key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_check_list.prototype, "keys", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_check_list.prototype, "items", null);
|
||||||
|
$$.$mol_check_list = $mol_check_list;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
$mol_style_attach("mol/check/list/list.view.css", "[mol_check_list] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex: 1 1 auto;\n\tborder-radius: var(--mol_gap_round);\n\tgap: 1px;\n}\n\n[mol_check_list_option] {\n\tflex: 0 1 auto;\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"]) {\n\ttext-shadow: 0 0;\n\tcolor: var(--mol_theme_current);\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"][disabled]) {\n\tcolor: var(--mol_theme_text);\n}\n");
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_switch) = class $mol_switch extends ($.$mol_check_list) {
|
||||||
|
value(next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$mol_switch.prototype), "value"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $mol_state_session extends $mol_object {
|
||||||
|
static 'native()';
|
||||||
|
static native() {
|
||||||
|
if (this['native()'])
|
||||||
|
return this['native()'];
|
||||||
|
check: try {
|
||||||
|
const native = $mol_dom_context.sessionStorage;
|
||||||
|
if (!native)
|
||||||
|
break check;
|
||||||
|
native.setItem('', '');
|
||||||
|
native.removeItem('');
|
||||||
|
return this['native()'] = native;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.warn(error);
|
||||||
|
}
|
||||||
|
return this['native()'] = {
|
||||||
|
getItem(key) {
|
||||||
|
return this[':' + key];
|
||||||
|
},
|
||||||
|
setItem(key, value) {
|
||||||
|
this[':' + key] = value;
|
||||||
|
},
|
||||||
|
removeItem(key) {
|
||||||
|
this[':' + key] = void 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
static value(key, next) {
|
||||||
|
if (next === void 0)
|
||||||
|
return JSON.parse(this.native().getItem(key) || 'null');
|
||||||
|
if (next === null)
|
||||||
|
this.native().removeItem(key);
|
||||||
|
else
|
||||||
|
this.native().setItem(key, JSON.stringify(next));
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
prefix() { return ''; }
|
||||||
|
value(key, next) {
|
||||||
|
return $mol_state_session.value(this.prefix() + '.' + key, next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem_key
|
||||||
|
], $mol_state_session, "value", null);
|
||||||
|
$.$mol_state_session = $mol_state_session;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_switch extends $.$mol_switch {
|
||||||
|
value(next) {
|
||||||
|
return $mol_state_session.value(`${this}.value()`, next) ?? '';
|
||||||
|
}
|
||||||
|
option_checked(key, next) {
|
||||||
|
if (next === undefined)
|
||||||
|
return this.value() == key;
|
||||||
|
this.value(next ? key : '');
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$$.$mol_switch = $mol_switch;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_deck) = class $mol_deck extends ($.$mol_list) {
|
||||||
|
current(next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
switch_options(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Switch(){
|
||||||
|
const obj = new this.$.$mol_switch();
|
||||||
|
(obj.value) = (next) => ((this.current(next)));
|
||||||
|
(obj.options) = () => ((this.switch_options()));
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Content(){
|
||||||
|
const obj = new this.$.$mol_view();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
items(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
rows(){
|
||||||
|
return [(this.Switch()), (this.Content())];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "current"));
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "Switch"));
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "Content"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_deck extends $.$mol_deck {
|
||||||
|
current(next) {
|
||||||
|
return $mol_state_session.value(`${this}.current()`, next) || '0';
|
||||||
|
}
|
||||||
|
switch_options() {
|
||||||
|
let options = {};
|
||||||
|
this.items().forEach((item, index) => {
|
||||||
|
options[String(index)] = item.title();
|
||||||
|
});
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
Content() {
|
||||||
|
return this.items()[Number(this.current())];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_deck.prototype, "Content", null);
|
||||||
|
$$.$mol_deck = $mol_deck;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$hd_canary_app_bar) = class $hd_canary_app_bar extends ($.$mol_page) {
|
||||||
|
home(){
|
||||||
|
return (this.My_monitor().home());
|
||||||
|
}
|
||||||
|
My_monitor(){
|
||||||
|
const obj = new this.$.$hd_canary_app_monitor();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
users(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Other_monitors(){
|
||||||
|
const obj = new this.$.$mol_book2_catalog();
|
||||||
|
(obj.param) = () => ("user");
|
||||||
|
(obj.menu_title) = () => ("Расшаренные мне");
|
||||||
|
(obj.spreads) = () => ((this.users()));
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Info(){
|
||||||
|
const obj = new this.$.$mol_deck();
|
||||||
|
(obj.items) = () => ([(this.My_monitor()), (this.Other_monitors())]);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
panel_title(id){
|
||||||
|
return "diff";
|
||||||
|
}
|
||||||
|
selected_home(id){
|
||||||
|
const obj = new this.$.$hd_canary_app_home();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Head(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
title(){
|
||||||
|
return (this.$.$mol_locale.text("$hd_canary_app_bar_title"));
|
||||||
|
}
|
||||||
|
body(){
|
||||||
|
return [(this.Info())];
|
||||||
|
}
|
||||||
|
Panel(id){
|
||||||
|
const obj = new this.$.$hd_canary_app_monitor();
|
||||||
|
(obj.title) = () => ((this.panel_title(id)));
|
||||||
|
(obj.home) = () => ((this.selected_home(id)));
|
||||||
|
(obj.Add) = () => (null);
|
||||||
|
(obj.Target_remove) = () => (null);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "My_monitor"));
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "Other_monitors"));
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "Info"));
|
||||||
|
($mol_mem_key(($.$hd_canary_app_bar.prototype), "selected_home"));
|
||||||
|
($mol_mem_key(($.$hd_canary_app_bar.prototype), "Panel"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $hd_canary_app_bar extends $.$hd_canary_app_bar {
|
||||||
|
users() {
|
||||||
|
const presets = this.$.$hyoo_crus_glob.home($hd_canary_app_home).SharedPresets(null);
|
||||||
|
return presets.items().map(key => this.Panel(key));
|
||||||
|
}
|
||||||
|
selected_home(ref) {
|
||||||
|
return this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
||||||
|
}
|
||||||
|
panel_title(ref) {
|
||||||
|
if (this.selected_home(ref).title() != "")
|
||||||
|
return this.selected_home(ref).title();
|
||||||
|
return this.selected_home(ref).land_ref().description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$$.$hd_canary_app_bar = $hd_canary_app_bar;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $hd_canary_app extends $.$hd_canary_app {
|
||||||
|
share_link() {
|
||||||
|
return this.$.$mol_state_arg.link({
|
||||||
|
panel: this.$.$hyoo_crus_glob.home($hd_canary_app_home).land_ref().description,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary_app.prototype, "share_link", null);
|
||||||
|
$$.$hd_canary_app = $hd_canary_app;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $hd_canary_app_server extends $hyoo_crus_dict.with({
|
||||||
|
Users: $hyoo_crus_list_ref_to(() => $hyoo_crus_atom_ref),
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
$.$hd_canary_app_server = $hd_canary_app_server;
|
||||||
|
class $hd_canary_app_home extends $hyoo_crus_home.with({
|
||||||
|
Sites: $hyoo_crus_list_ref_to(() => $hd_canary_app_home_site),
|
||||||
|
SharedPresets: $hyoo_crus_list_ref_to(() => $hyoo_crus_ref),
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
$.$hd_canary_app_home = $hd_canary_app_home;
|
||||||
|
class $hd_canary_app_home_site extends $hyoo_crus_dict.with({
|
||||||
|
url: $hyoo_crus_atom_str,
|
||||||
|
title: $hyoo_crus_atom_str,
|
||||||
|
last_ping_time: $hyoo_crus_atom_time,
|
||||||
|
last_ping_status: $hyoo_crus_atom_bool,
|
||||||
|
sended_alert: $hyoo_crus_atom_bool,
|
||||||
|
}) {
|
||||||
|
tick() {
|
||||||
|
this.$.$mol_state_time.now(5000);
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
});
|
||||||
|
if (this.can_change()) {
|
||||||
|
const url = this.url().val();
|
||||||
|
const title = this.title().val();
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
...{ action: "tick", url, title, last_ping_status: this.last_ping_status(null).val() }
|
||||||
|
});
|
||||||
|
const request = $mol_fetch.response(url);
|
||||||
|
this.last_ping_status(null).val(request.code() == 200);
|
||||||
|
this.last_ping_time(null).val(new $mol_time_moment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary_app_home_site.prototype, "tick", null);
|
||||||
|
$.$hd_canary_app_home_site = $hd_canary_app_home_site;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
var $;
|
var $;
|
||||||
|
|
@ -16442,12 +16338,69 @@ var $;
|
||||||
"http://localhost:9090/"
|
"http://localhost:9090/"
|
||||||
];
|
];
|
||||||
class $hd_canary extends $hyoo_crus_app_node {
|
class $hd_canary extends $hyoo_crus_app_node {
|
||||||
|
hd_canary_alert_to_telegram(message) {
|
||||||
|
const $hd_canary_telegram_token = $node.process.env.TELEGRAM_TOKEN ?? "";
|
||||||
|
if ($hd_canary_telegram_token == "")
|
||||||
|
return;
|
||||||
|
const chatId = '466661457';
|
||||||
|
const apiUrl = `https://api.telegram.org/bot${$hd_canary_telegram_token}/sendMessage`;
|
||||||
|
const params = {
|
||||||
|
chat_id: chatId,
|
||||||
|
text: message,
|
||||||
|
parse_mode: 'HTML'
|
||||||
|
};
|
||||||
|
return $mol_fetch.json(apiUrl, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
});
|
||||||
|
}
|
||||||
_stat_update() {
|
_stat_update() {
|
||||||
this.$.$mol_log3_done({
|
this.$.$mol_log3_done({
|
||||||
place: this,
|
place: this,
|
||||||
message: "_stat_update",
|
message: "_stat_update",
|
||||||
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
|
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
|
||||||
});
|
});
|
||||||
|
this.hd_canary_alert_to_telegram("restart node");
|
||||||
|
this.alerting();
|
||||||
|
this.ping_sites_loop();
|
||||||
|
}
|
||||||
|
alerting() {
|
||||||
|
const home_land = this.$.$hyoo_crus_glob.home().land();
|
||||||
|
const list = home_land.Node($hd_canary_app_server).Item('').Users(null);
|
||||||
|
for (const ref of list.items()) {
|
||||||
|
try {
|
||||||
|
const user = this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
||||||
|
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
||||||
|
if (site.last_ping_status(null).val() == false && (site.sended_alert(null).val() == false || site.sended_alert(null).val() == null)) {
|
||||||
|
this.hd_canary_alert_to_telegram(JSON.stringify({ action: "site_down", url: site.url(null).val() }));
|
||||||
|
this.$.$mol_log3_fail({
|
||||||
|
place: this,
|
||||||
|
message: "ALERT",
|
||||||
|
...{ action: "down_site", url: site.url(null).val() }
|
||||||
|
});
|
||||||
|
site.sended_alert(null).val(true);
|
||||||
|
}
|
||||||
|
if (site.last_ping_status(null).val() == true && site.sended_alert(null).val() == true) {
|
||||||
|
this.hd_canary_alert_to_telegram(JSON.stringify({ action: "site_up", url: site.url(null).val() }));
|
||||||
|
this.$.$mol_log3_fail({
|
||||||
|
place: this,
|
||||||
|
message: "ALERT",
|
||||||
|
...{ action: "down_up", url: site.url(null).val() }
|
||||||
|
});
|
||||||
|
site.sended_alert(null).val(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
$mol_fail_log(error);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ping_sites_loop() {
|
||||||
const home_land = this.$.$hyoo_crus_glob.home().land();
|
const home_land = this.$.$hyoo_crus_glob.home().land();
|
||||||
const list = home_land.Node($hd_canary_app_server).Item('').Users(null);
|
const list = home_land.Node($hd_canary_app_server).Item('').Users(null);
|
||||||
for (const ref of list.items()) {
|
for (const ref of list.items()) {
|
||||||
|
|
@ -16467,9 +16420,18 @@ var $;
|
||||||
return new $hd_canary_join;
|
return new $hd_canary_join;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $hd_canary.prototype, "hd_canary_alert_to_telegram", null);
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary.prototype, "_stat_update", null);
|
], $hd_canary.prototype, "_stat_update", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary.prototype, "alerting", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary.prototype, "ping_sites_loop", null);
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_memo.method
|
$mol_memo.method
|
||||||
], $hd_canary.prototype, "join", null);
|
], $hd_canary.prototype, "join", null);
|
||||||
|
|
@ -16499,6 +16461,9 @@ module.exports = {
|
||||||
cwd: "./-/",
|
cwd: "./-/",
|
||||||
args: "port=9090",
|
args: "port=9090",
|
||||||
autorestart: true,
|
autorestart: true,
|
||||||
|
env: {
|
||||||
|
"TELEGRAM_TOKEN": ""
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
1321
-/node.test.js
1321
-/node.test.js
|
|
@ -10433,6 +10433,162 @@ var $;
|
||||||
$.$hyoo_crus_app_node_ref = $hyoo_crus_app_node_ref;
|
$.$hyoo_crus_app_node_ref = $hyoo_crus_app_node_ref;
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $mol_fetch_response extends $mol_object2 {
|
||||||
|
native;
|
||||||
|
constructor(native) {
|
||||||
|
super();
|
||||||
|
this.native = native;
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
const types = ['unknown', 'inform', 'success', 'redirect', 'wrong', 'failed'];
|
||||||
|
return types[Math.floor(this.native.status / 100)];
|
||||||
|
}
|
||||||
|
code() {
|
||||||
|
return this.native.status;
|
||||||
|
}
|
||||||
|
message() {
|
||||||
|
return this.native.statusText || `HTTP Error ${this.code()}`;
|
||||||
|
}
|
||||||
|
headers() {
|
||||||
|
return this.native.headers;
|
||||||
|
}
|
||||||
|
mime() {
|
||||||
|
return this.headers().get('content-type');
|
||||||
|
}
|
||||||
|
stream() {
|
||||||
|
return this.native.body;
|
||||||
|
}
|
||||||
|
text() {
|
||||||
|
const buffer = this.buffer();
|
||||||
|
const native = this.native;
|
||||||
|
const mime = native.headers.get('content-type') || '';
|
||||||
|
const [, charset] = /charset=(.*)/.exec(mime) || [, 'utf-8'];
|
||||||
|
const decoder = new TextDecoder(charset);
|
||||||
|
return decoder.decode(buffer);
|
||||||
|
}
|
||||||
|
json() {
|
||||||
|
return $mol_wire_sync(this.native).json();
|
||||||
|
}
|
||||||
|
blob() {
|
||||||
|
return $mol_wire_sync(this.native).blob();
|
||||||
|
}
|
||||||
|
buffer() {
|
||||||
|
return $mol_wire_sync(this.native).arrayBuffer();
|
||||||
|
}
|
||||||
|
xml() {
|
||||||
|
return $mol_dom_parse(this.text(), 'application/xml');
|
||||||
|
}
|
||||||
|
xhtml() {
|
||||||
|
return $mol_dom_parse(this.text(), 'application/xhtml+xml');
|
||||||
|
}
|
||||||
|
html() {
|
||||||
|
return $mol_dom_parse(this.text(), 'text/html');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "stream", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "text", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "xml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "xhtml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch_response.prototype, "html", null);
|
||||||
|
$.$mol_fetch_response = $mol_fetch_response;
|
||||||
|
class $mol_fetch extends $mol_object2 {
|
||||||
|
static request(input, init = {}) {
|
||||||
|
const controller = new AbortController();
|
||||||
|
let done = false;
|
||||||
|
const promise = fetch(input, {
|
||||||
|
...init,
|
||||||
|
signal: controller.signal,
|
||||||
|
}).finally(() => {
|
||||||
|
done = true;
|
||||||
|
});
|
||||||
|
return Object.assign(promise, {
|
||||||
|
destructor: () => {
|
||||||
|
if (!done && !controller.signal.aborted)
|
||||||
|
controller.abort();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
static response(input, init) {
|
||||||
|
return new $mol_fetch_response($mol_wire_sync(this).request(input, init));
|
||||||
|
}
|
||||||
|
static success(input, init) {
|
||||||
|
const response = this.response(input, init);
|
||||||
|
if (response.status() === 'success')
|
||||||
|
return response;
|
||||||
|
throw new Error(response.message(), { cause: response });
|
||||||
|
}
|
||||||
|
static stream(input, init) {
|
||||||
|
return this.success(input, init).stream();
|
||||||
|
}
|
||||||
|
static text(input, init) {
|
||||||
|
return this.success(input, init).text();
|
||||||
|
}
|
||||||
|
static json(input, init) {
|
||||||
|
return this.success(input, init).json();
|
||||||
|
}
|
||||||
|
static blob(input, init) {
|
||||||
|
return this.success(input, init).blob();
|
||||||
|
}
|
||||||
|
static buffer(input, init) {
|
||||||
|
return this.success(input, init).buffer();
|
||||||
|
}
|
||||||
|
static xml(input, init) {
|
||||||
|
return this.success(input, init).xml();
|
||||||
|
}
|
||||||
|
static xhtml(input, init) {
|
||||||
|
return this.success(input, init).xhtml();
|
||||||
|
}
|
||||||
|
static html(input, init) {
|
||||||
|
return this.success(input, init).html();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "response", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "success", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "stream", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "text", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "json", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "blob", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "buffer", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "xml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "xhtml", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $mol_fetch, "html", null);
|
||||||
|
$.$mol_fetch = $mol_fetch;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
var $;
|
var $;
|
||||||
|
|
@ -15073,26 +15229,6 @@ var $;
|
||||||
($mol_mem(($.$hd_canary_app_profile.prototype), "Current_profile"));
|
($mol_mem(($.$hd_canary_app_profile.prototype), "Current_profile"));
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
async function $mol_crypto_sacred_pass(pass, salt) {
|
|
||||||
const raw = await $mol_crypto_native.subtle.importKey("raw", $mol_charset_encode(pass), "PBKDF2", false, ["deriveKey"]).catch($mol_crypto_restack);
|
|
||||||
const hard = await $mol_crypto_native.subtle.deriveKey({
|
|
||||||
name: "PBKDF2",
|
|
||||||
salt,
|
|
||||||
iterations: 10_000,
|
|
||||||
hash: "SHA-256",
|
|
||||||
}, raw, {
|
|
||||||
name: 'AES-CBC',
|
|
||||||
length: 128,
|
|
||||||
}, Boolean('extractable'), ['encrypt', 'decrypt']).catch($mol_crypto_restack);
|
|
||||||
return $mol_crypto_sacred.from_native(hard);
|
|
||||||
}
|
|
||||||
$.$mol_crypto_sacred_pass = $mol_crypto_sacred_pass;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
@ -15103,29 +15239,14 @@ var $;
|
||||||
var $$;
|
var $$;
|
||||||
(function ($$) {
|
(function ($$) {
|
||||||
class $hd_canary_app_profile extends $.$hd_canary_app_profile {
|
class $hd_canary_app_profile extends $.$hd_canary_app_profile {
|
||||||
content() {
|
|
||||||
return [
|
|
||||||
this.key_import()
|
|
||||||
? this.Import_block()
|
|
||||||
: this.Export_block()
|
|
||||||
];
|
|
||||||
}
|
|
||||||
auth_title() {
|
auth_title() {
|
||||||
return this.key_import()
|
return this.key_import()
|
||||||
? "Войти в профиль"
|
? "Войти в профиль"
|
||||||
: "Поделиться профилем";
|
: "Поделиться профилем";
|
||||||
}
|
}
|
||||||
export_link() {
|
|
||||||
return this.$.$mol_state_arg.link({
|
|
||||||
auth: this.key_export(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
key_import(next) {
|
key_import(next) {
|
||||||
return this.$.$mol_state_arg.value('auth', next) ?? null;
|
return this.$.$mol_state_arg.value('auth', next) ?? null;
|
||||||
}
|
}
|
||||||
peer_new() {
|
|
||||||
return $hyoo_crus_auth.from(this.key_new()).peer();
|
|
||||||
}
|
|
||||||
current_peer() {
|
current_peer() {
|
||||||
return this.$.$hyoo_crus_auth.current().peer();
|
return this.$.$hyoo_crus_auth.current().peer();
|
||||||
}
|
}
|
||||||
|
|
@ -15140,70 +15261,10 @@ var $;
|
||||||
profile_name(next) {
|
profile_name(next) {
|
||||||
return this.home().title(next);
|
return this.home().title(next);
|
||||||
}
|
}
|
||||||
import_switch() {
|
|
||||||
this.$.$hyoo_crus_auth.current($hyoo_crus_auth.from(this.key_new()));
|
|
||||||
this.password('');
|
|
||||||
this.key_import(null);
|
|
||||||
}
|
}
|
||||||
password_bid() {
|
|
||||||
const pass = this.password();
|
|
||||||
if (pass.length <= 7)
|
|
||||||
return this.bid_pass_long();
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
export_rows() {
|
|
||||||
return [
|
|
||||||
this.Expot_bid(),
|
|
||||||
this.Export_pass(),
|
|
||||||
...this.password_bid() ? [] : [this.Export_link()],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
import_rows() {
|
|
||||||
return [
|
|
||||||
this.Iport_descr(),
|
|
||||||
this.Import_pass(),
|
|
||||||
...this.key_new() ? [this.Import_switch()] : [],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
key_new() {
|
|
||||||
const serial = this.key_import();
|
|
||||||
if (!serial)
|
|
||||||
return null;
|
|
||||||
try {
|
|
||||||
const password = this.password();
|
|
||||||
const app = $mol_crypto_hash($mol_charset_encode("hd_canary"));
|
|
||||||
const secret = $mol_wire_sync($mol_crypto_sacred_pass)(password, app);
|
|
||||||
const data = $mol_base64_url_decode(serial);
|
|
||||||
const salt = $mol_crypto_hash(app).slice(0, 16);
|
|
||||||
const closed = $mol_wire_sync(secret).decrypt(data, salt);
|
|
||||||
return closed;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
$mol_fail_log(error);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key_export() {
|
|
||||||
const password = this.password();
|
|
||||||
const app = $mol_crypto_hash($mol_charset_encode("hd_canary"));
|
|
||||||
const secret = $mol_wire_sync($mol_crypto_sacred_pass)(password, app);
|
|
||||||
const salt = $mol_crypto_hash(app).slice(0, 16);
|
|
||||||
const closed = $mol_wire_sync(secret).encrypt(this.$.$hyoo_crus_auth.current(), salt);
|
|
||||||
return $mol_base64_url_encode(closed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "content", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "auth_title", null);
|
], $hd_canary_app_profile.prototype, "auth_title", null);
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "export_link", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "peer_new", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "current_peer", null);
|
], $hd_canary_app_profile.prototype, "current_peer", null);
|
||||||
|
|
@ -15216,19 +15277,6 @@ var $;
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "profile_name", null);
|
], $hd_canary_app_profile.prototype, "profile_name", null);
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $hd_canary_app_profile.prototype, "import_switch", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "password_bid", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "key_new", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action,
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "key_export", null);
|
|
||||||
$$.$hd_canary_app_profile = $hd_canary_app_profile;
|
$$.$hd_canary_app_profile = $hd_canary_app_profile;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
@ -15240,12 +15288,6 @@ var $;
|
||||||
var $$;
|
var $$;
|
||||||
(function ($$) {
|
(function ($$) {
|
||||||
const { rem } = $mol_style_unit;
|
const { rem } = $mol_style_unit;
|
||||||
$mol_style_define($hd_canary_app_profile, {
|
|
||||||
Current_peer_avatar: {
|
|
||||||
width: rem(2),
|
|
||||||
height: rem(2)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
|
@ -15314,561 +15356,6 @@ var $;
|
||||||
($mol_mem(($.$hd_canary_app.prototype), "Menu_logo"));
|
($mol_mem(($.$hd_canary_app.prototype), "Menu_logo"));
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_check_list) = class $mol_check_list extends ($.$mol_view) {
|
|
||||||
option_checked(id, next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
option_title(id){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
option_label(id){
|
|
||||||
return [(this.option_title(id))];
|
|
||||||
}
|
|
||||||
enabled(){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
option_enabled(id){
|
|
||||||
return (this.enabled());
|
|
||||||
}
|
|
||||||
option_hint(id){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
items(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
dictionary(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Option(id){
|
|
||||||
const obj = new this.$.$mol_check();
|
|
||||||
(obj.checked) = (next) => ((this.option_checked(id, next)));
|
|
||||||
(obj.label) = () => ((this.option_label(id)));
|
|
||||||
(obj.enabled) = () => ((this.option_enabled(id)));
|
|
||||||
(obj.hint) = () => ((this.option_hint(id)));
|
|
||||||
(obj.minimal_height) = () => (24);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
options(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
keys(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
sub(){
|
|
||||||
return (this.items());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem_key(($.$mol_check_list.prototype), "option_checked"));
|
|
||||||
($mol_mem_key(($.$mol_check_list.prototype), "Option"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_check_list extends $.$mol_check_list {
|
|
||||||
options() {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
dictionary(next) {
|
|
||||||
return next ?? {};
|
|
||||||
}
|
|
||||||
option_checked(id, next) {
|
|
||||||
const prev = this.dictionary();
|
|
||||||
if (next === undefined)
|
|
||||||
return prev[id] ?? null;
|
|
||||||
const next_rec = { ...prev, [id]: next };
|
|
||||||
if (next === null)
|
|
||||||
delete next_rec[id];
|
|
||||||
return this.dictionary(next_rec)[id] ?? null;
|
|
||||||
}
|
|
||||||
keys() {
|
|
||||||
return Object.keys(this.options());
|
|
||||||
}
|
|
||||||
items() {
|
|
||||||
return this.keys().map(key => this.Option(key));
|
|
||||||
}
|
|
||||||
option_title(key) {
|
|
||||||
return this.options()[key] || key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_check_list.prototype, "keys", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_check_list.prototype, "items", null);
|
|
||||||
$$.$mol_check_list = $mol_check_list;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
$mol_style_attach("mol/check/list/list.view.css", "[mol_check_list] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex: 1 1 auto;\n\tborder-radius: var(--mol_gap_round);\n\tgap: 1px;\n}\n\n[mol_check_list_option] {\n\tflex: 0 1 auto;\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"]) {\n\ttext-shadow: 0 0;\n\tcolor: var(--mol_theme_current);\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"][disabled]) {\n\tcolor: var(--mol_theme_text);\n}\n");
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_switch) = class $mol_switch extends ($.$mol_check_list) {
|
|
||||||
value(next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$mol_switch.prototype), "value"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $mol_state_session extends $mol_object {
|
|
||||||
static 'native()';
|
|
||||||
static native() {
|
|
||||||
if (this['native()'])
|
|
||||||
return this['native()'];
|
|
||||||
check: try {
|
|
||||||
const native = $mol_dom_context.sessionStorage;
|
|
||||||
if (!native)
|
|
||||||
break check;
|
|
||||||
native.setItem('', '');
|
|
||||||
native.removeItem('');
|
|
||||||
return this['native()'] = native;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
console.warn(error);
|
|
||||||
}
|
|
||||||
return this['native()'] = {
|
|
||||||
getItem(key) {
|
|
||||||
return this[':' + key];
|
|
||||||
},
|
|
||||||
setItem(key, value) {
|
|
||||||
this[':' + key] = value;
|
|
||||||
},
|
|
||||||
removeItem(key) {
|
|
||||||
this[':' + key] = void 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
static value(key, next) {
|
|
||||||
if (next === void 0)
|
|
||||||
return JSON.parse(this.native().getItem(key) || 'null');
|
|
||||||
if (next === null)
|
|
||||||
this.native().removeItem(key);
|
|
||||||
else
|
|
||||||
this.native().setItem(key, JSON.stringify(next));
|
|
||||||
return next;
|
|
||||||
}
|
|
||||||
prefix() { return ''; }
|
|
||||||
value(key, next) {
|
|
||||||
return $mol_state_session.value(this.prefix() + '.' + key, next);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem_key
|
|
||||||
], $mol_state_session, "value", null);
|
|
||||||
$.$mol_state_session = $mol_state_session;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_switch extends $.$mol_switch {
|
|
||||||
value(next) {
|
|
||||||
return $mol_state_session.value(`${this}.value()`, next) ?? '';
|
|
||||||
}
|
|
||||||
option_checked(key, next) {
|
|
||||||
if (next === undefined)
|
|
||||||
return this.value() == key;
|
|
||||||
this.value(next ? key : '');
|
|
||||||
return next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$$.$mol_switch = $mol_switch;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_deck) = class $mol_deck extends ($.$mol_list) {
|
|
||||||
current(next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return "0";
|
|
||||||
}
|
|
||||||
switch_options(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Switch(){
|
|
||||||
const obj = new this.$.$mol_switch();
|
|
||||||
(obj.value) = (next) => ((this.current(next)));
|
|
||||||
(obj.options) = () => ((this.switch_options()));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
Content(){
|
|
||||||
const obj = new this.$.$mol_view();
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
items(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
rows(){
|
|
||||||
return [(this.Switch()), (this.Content())];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "current"));
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "Switch"));
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "Content"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_deck extends $.$mol_deck {
|
|
||||||
current(next) {
|
|
||||||
return $mol_state_session.value(`${this}.current()`, next) || '0';
|
|
||||||
}
|
|
||||||
switch_options() {
|
|
||||||
let options = {};
|
|
||||||
this.items().forEach((item, index) => {
|
|
||||||
options[String(index)] = item.title();
|
|
||||||
});
|
|
||||||
return options;
|
|
||||||
}
|
|
||||||
Content() {
|
|
||||||
return this.items()[Number(this.current())];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_deck.prototype, "Content", null);
|
|
||||||
$$.$mol_deck = $mol_deck;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$hd_canary_app_bar) = class $hd_canary_app_bar extends ($.$mol_page) {
|
|
||||||
home(){
|
|
||||||
return (this.My_monitor().home());
|
|
||||||
}
|
|
||||||
My_monitor(){
|
|
||||||
const obj = new this.$.$hd_canary_app_monitor();
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
users(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Other_monitors(){
|
|
||||||
const obj = new this.$.$mol_book2_catalog();
|
|
||||||
(obj.head) = () => (null);
|
|
||||||
(obj.param) = () => ("user");
|
|
||||||
(obj.menu_title) = () => ("Расшаренные мне");
|
|
||||||
(obj.spreads) = () => ((this.users()));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
Info(){
|
|
||||||
const obj = new this.$.$mol_deck();
|
|
||||||
(obj.items) = () => ([(this.My_monitor()), (this.Other_monitors())]);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
panel_title(id){
|
|
||||||
return "diff";
|
|
||||||
}
|
|
||||||
Head(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
title(){
|
|
||||||
return (this.$.$mol_locale.text("$hd_canary_app_bar_title"));
|
|
||||||
}
|
|
||||||
body(){
|
|
||||||
return [(this.Info())];
|
|
||||||
}
|
|
||||||
Panel(id){
|
|
||||||
const obj = new this.$.$hd_canary_app_monitor();
|
|
||||||
(obj.title) = () => ((this.panel_title(id)));
|
|
||||||
(obj.home) = () => ((this.selected_home(id)));
|
|
||||||
(obj.Add) = () => (null);
|
|
||||||
(obj.Target_remove) = () => (null);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "My_monitor"));
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "Other_monitors"));
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "Info"));
|
|
||||||
($mol_mem_key(($.$hd_canary_app_bar.prototype), "Panel"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $hd_canary_app_bar extends $.$hd_canary_app_bar {
|
|
||||||
users() {
|
|
||||||
const presets = this.$.$hyoo_crus_glob.home($hd_canary_app_home).SharedPresets(null);
|
|
||||||
return presets.items().map(key => this.Panel(key));
|
|
||||||
}
|
|
||||||
selected_home(ref) {
|
|
||||||
return this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
|
||||||
}
|
|
||||||
panel_title(ref) {
|
|
||||||
if (this.selected_home(ref).title() != "")
|
|
||||||
return this.selected_home(ref).title();
|
|
||||||
return this.selected_home(ref).land_ref().description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$$.$hd_canary_app_bar = $hd_canary_app_bar;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $hd_canary_app extends $.$hd_canary_app {
|
|
||||||
share_link() {
|
|
||||||
return this.$.$mol_state_arg.link({
|
|
||||||
panel: this.$.$hyoo_crus_glob.home($hd_canary_app_home).land_ref().description,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app.prototype, "share_link", null);
|
|
||||||
$$.$hd_canary_app = $hd_canary_app;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $mol_fetch_response extends $mol_object2 {
|
|
||||||
native;
|
|
||||||
constructor(native) {
|
|
||||||
super();
|
|
||||||
this.native = native;
|
|
||||||
}
|
|
||||||
status() {
|
|
||||||
const types = ['unknown', 'inform', 'success', 'redirect', 'wrong', 'failed'];
|
|
||||||
return types[Math.floor(this.native.status / 100)];
|
|
||||||
}
|
|
||||||
code() {
|
|
||||||
return this.native.status;
|
|
||||||
}
|
|
||||||
message() {
|
|
||||||
return this.native.statusText || `HTTP Error ${this.code()}`;
|
|
||||||
}
|
|
||||||
headers() {
|
|
||||||
return this.native.headers;
|
|
||||||
}
|
|
||||||
mime() {
|
|
||||||
return this.headers().get('content-type');
|
|
||||||
}
|
|
||||||
stream() {
|
|
||||||
return this.native.body;
|
|
||||||
}
|
|
||||||
text() {
|
|
||||||
const buffer = this.buffer();
|
|
||||||
const native = this.native;
|
|
||||||
const mime = native.headers.get('content-type') || '';
|
|
||||||
const [, charset] = /charset=(.*)/.exec(mime) || [, 'utf-8'];
|
|
||||||
const decoder = new TextDecoder(charset);
|
|
||||||
return decoder.decode(buffer);
|
|
||||||
}
|
|
||||||
json() {
|
|
||||||
return $mol_wire_sync(this.native).json();
|
|
||||||
}
|
|
||||||
blob() {
|
|
||||||
return $mol_wire_sync(this.native).blob();
|
|
||||||
}
|
|
||||||
buffer() {
|
|
||||||
return $mol_wire_sync(this.native).arrayBuffer();
|
|
||||||
}
|
|
||||||
xml() {
|
|
||||||
return $mol_dom_parse(this.text(), 'application/xml');
|
|
||||||
}
|
|
||||||
xhtml() {
|
|
||||||
return $mol_dom_parse(this.text(), 'application/xhtml+xml');
|
|
||||||
}
|
|
||||||
html() {
|
|
||||||
return $mol_dom_parse(this.text(), 'text/html');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "stream", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "text", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "xml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "xhtml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch_response.prototype, "html", null);
|
|
||||||
$.$mol_fetch_response = $mol_fetch_response;
|
|
||||||
class $mol_fetch extends $mol_object2 {
|
|
||||||
static request(input, init = {}) {
|
|
||||||
const controller = new AbortController();
|
|
||||||
let done = false;
|
|
||||||
const promise = fetch(input, {
|
|
||||||
...init,
|
|
||||||
signal: controller.signal,
|
|
||||||
}).finally(() => {
|
|
||||||
done = true;
|
|
||||||
});
|
|
||||||
return Object.assign(promise, {
|
|
||||||
destructor: () => {
|
|
||||||
if (!done && !controller.signal.aborted)
|
|
||||||
controller.abort();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
static response(input, init) {
|
|
||||||
return new $mol_fetch_response($mol_wire_sync(this).request(input, init));
|
|
||||||
}
|
|
||||||
static success(input, init) {
|
|
||||||
const response = this.response(input, init);
|
|
||||||
if (response.status() === 'success')
|
|
||||||
return response;
|
|
||||||
throw new Error(response.message(), { cause: response });
|
|
||||||
}
|
|
||||||
static stream(input, init) {
|
|
||||||
return this.success(input, init).stream();
|
|
||||||
}
|
|
||||||
static text(input, init) {
|
|
||||||
return this.success(input, init).text();
|
|
||||||
}
|
|
||||||
static json(input, init) {
|
|
||||||
return this.success(input, init).json();
|
|
||||||
}
|
|
||||||
static blob(input, init) {
|
|
||||||
return this.success(input, init).blob();
|
|
||||||
}
|
|
||||||
static buffer(input, init) {
|
|
||||||
return this.success(input, init).buffer();
|
|
||||||
}
|
|
||||||
static xml(input, init) {
|
|
||||||
return this.success(input, init).xml();
|
|
||||||
}
|
|
||||||
static xhtml(input, init) {
|
|
||||||
return this.success(input, init).xhtml();
|
|
||||||
}
|
|
||||||
static html(input, init) {
|
|
||||||
return this.success(input, init).html();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "response", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "success", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "stream", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "text", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "json", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "blob", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "buffer", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "xml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "xhtml", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $mol_fetch, "html", null);
|
|
||||||
$.$mol_fetch = $mol_fetch;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $hd_canary_app_server extends $hyoo_crus_dict.with({
|
|
||||||
Users: $hyoo_crus_list_ref_to(() => $hyoo_crus_atom_ref),
|
|
||||||
}) {
|
|
||||||
}
|
|
||||||
$.$hd_canary_app_server = $hd_canary_app_server;
|
|
||||||
class $hd_canary_app_home extends $hyoo_crus_home.with({
|
|
||||||
Sites: $hyoo_crus_list_ref_to(() => $hd_canary_app_home_site),
|
|
||||||
SharedPresets: $hyoo_crus_list_ref_to(() => $hyoo_crus_ref),
|
|
||||||
}) {
|
|
||||||
}
|
|
||||||
$.$hd_canary_app_home = $hd_canary_app_home;
|
|
||||||
class $hd_canary_app_home_site extends $hyoo_crus_dict.with({
|
|
||||||
url: $hyoo_crus_atom_str,
|
|
||||||
title: $hyoo_crus_atom_str,
|
|
||||||
last_ping_time: $hyoo_crus_atom_time,
|
|
||||||
last_ping_status: $hyoo_crus_atom_bool,
|
|
||||||
}) {
|
|
||||||
tick() {
|
|
||||||
this.$.$mol_state_time.now(5000);
|
|
||||||
this.$.$mol_log3_done({
|
|
||||||
place: this,
|
|
||||||
message: this.land().ref().description,
|
|
||||||
});
|
|
||||||
if (this.can_change()) {
|
|
||||||
const url = this.url().val();
|
|
||||||
const title = this.title().val();
|
|
||||||
this.$.$mol_log3_done({
|
|
||||||
place: this,
|
|
||||||
message: this.land().ref().description,
|
|
||||||
...{ action: "tick", url, title }
|
|
||||||
});
|
|
||||||
const request = $mol_fetch.response(url);
|
|
||||||
this.last_ping_status(null).val(request.code() == 200);
|
|
||||||
this.last_ping_time(null).val(new $mol_time_moment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_home_site.prototype, "tick", null);
|
|
||||||
$.$hd_canary_app_home_site = $hd_canary_app_home_site;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
($.$mol_chip) = class $mol_chip extends ($.$mol_view) {
|
($.$mol_chip) = class $mol_chip extends ($.$mol_view) {
|
||||||
hint(){
|
hint(){
|
||||||
|
|
@ -16141,6 +15628,10 @@ var $;
|
||||||
(obj.items) = () => ((this.target_list()));
|
(obj.items) = () => ((this.target_list()));
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
home(){
|
||||||
|
const obj = new this.$.$hd_canary_app_home();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
Home_button(){
|
Home_button(){
|
||||||
const obj = new this.$.$mol_button_minor();
|
const obj = new this.$.$mol_button_minor();
|
||||||
(obj.title) = () => ("Домой");
|
(obj.title) = () => ("Домой");
|
||||||
|
|
@ -16194,6 +15685,7 @@ var $;
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target_moment"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target_moment"));
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "Target_list"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "Target_list"));
|
||||||
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "home"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "Home_button"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "Home_button"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "targets"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "targets"));
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "target_result"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "target_result"));
|
||||||
|
|
@ -16425,6 +15917,410 @@ var $;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_check_list) = class $mol_check_list extends ($.$mol_view) {
|
||||||
|
option_checked(id, next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
option_title(id){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
option_label(id){
|
||||||
|
return [(this.option_title(id))];
|
||||||
|
}
|
||||||
|
enabled(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
option_enabled(id){
|
||||||
|
return (this.enabled());
|
||||||
|
}
|
||||||
|
option_hint(id){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
items(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
dictionary(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Option(id){
|
||||||
|
const obj = new this.$.$mol_check();
|
||||||
|
(obj.checked) = (next) => ((this.option_checked(id, next)));
|
||||||
|
(obj.label) = () => ((this.option_label(id)));
|
||||||
|
(obj.enabled) = () => ((this.option_enabled(id)));
|
||||||
|
(obj.hint) = () => ((this.option_hint(id)));
|
||||||
|
(obj.minimal_height) = () => (24);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
options(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
keys(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
sub(){
|
||||||
|
return (this.items());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem_key(($.$mol_check_list.prototype), "option_checked"));
|
||||||
|
($mol_mem_key(($.$mol_check_list.prototype), "Option"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_check_list extends $.$mol_check_list {
|
||||||
|
options() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
dictionary(next) {
|
||||||
|
return next ?? {};
|
||||||
|
}
|
||||||
|
option_checked(id, next) {
|
||||||
|
const prev = this.dictionary();
|
||||||
|
if (next === undefined)
|
||||||
|
return prev[id] ?? null;
|
||||||
|
const next_rec = { ...prev, [id]: next };
|
||||||
|
if (next === null)
|
||||||
|
delete next_rec[id];
|
||||||
|
return this.dictionary(next_rec)[id] ?? null;
|
||||||
|
}
|
||||||
|
keys() {
|
||||||
|
return Object.keys(this.options());
|
||||||
|
}
|
||||||
|
items() {
|
||||||
|
return this.keys().map(key => this.Option(key));
|
||||||
|
}
|
||||||
|
option_title(key) {
|
||||||
|
return this.options()[key] || key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_check_list.prototype, "keys", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_check_list.prototype, "items", null);
|
||||||
|
$$.$mol_check_list = $mol_check_list;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
$mol_style_attach("mol/check/list/list.view.css", "[mol_check_list] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex: 1 1 auto;\n\tborder-radius: var(--mol_gap_round);\n\tgap: 1px;\n}\n\n[mol_check_list_option] {\n\tflex: 0 1 auto;\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"]) {\n\ttext-shadow: 0 0;\n\tcolor: var(--mol_theme_current);\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"][disabled]) {\n\tcolor: var(--mol_theme_text);\n}\n");
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_switch) = class $mol_switch extends ($.$mol_check_list) {
|
||||||
|
value(next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$mol_switch.prototype), "value"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $mol_state_session extends $mol_object {
|
||||||
|
static 'native()';
|
||||||
|
static native() {
|
||||||
|
if (this['native()'])
|
||||||
|
return this['native()'];
|
||||||
|
check: try {
|
||||||
|
const native = $mol_dom_context.sessionStorage;
|
||||||
|
if (!native)
|
||||||
|
break check;
|
||||||
|
native.setItem('', '');
|
||||||
|
native.removeItem('');
|
||||||
|
return this['native()'] = native;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.warn(error);
|
||||||
|
}
|
||||||
|
return this['native()'] = {
|
||||||
|
getItem(key) {
|
||||||
|
return this[':' + key];
|
||||||
|
},
|
||||||
|
setItem(key, value) {
|
||||||
|
this[':' + key] = value;
|
||||||
|
},
|
||||||
|
removeItem(key) {
|
||||||
|
this[':' + key] = void 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
static value(key, next) {
|
||||||
|
if (next === void 0)
|
||||||
|
return JSON.parse(this.native().getItem(key) || 'null');
|
||||||
|
if (next === null)
|
||||||
|
this.native().removeItem(key);
|
||||||
|
else
|
||||||
|
this.native().setItem(key, JSON.stringify(next));
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
prefix() { return ''; }
|
||||||
|
value(key, next) {
|
||||||
|
return $mol_state_session.value(this.prefix() + '.' + key, next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem_key
|
||||||
|
], $mol_state_session, "value", null);
|
||||||
|
$.$mol_state_session = $mol_state_session;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_switch extends $.$mol_switch {
|
||||||
|
value(next) {
|
||||||
|
return $mol_state_session.value(`${this}.value()`, next) ?? '';
|
||||||
|
}
|
||||||
|
option_checked(key, next) {
|
||||||
|
if (next === undefined)
|
||||||
|
return this.value() == key;
|
||||||
|
this.value(next ? key : '');
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$$.$mol_switch = $mol_switch;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_deck) = class $mol_deck extends ($.$mol_list) {
|
||||||
|
current(next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
switch_options(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Switch(){
|
||||||
|
const obj = new this.$.$mol_switch();
|
||||||
|
(obj.value) = (next) => ((this.current(next)));
|
||||||
|
(obj.options) = () => ((this.switch_options()));
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Content(){
|
||||||
|
const obj = new this.$.$mol_view();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
items(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
rows(){
|
||||||
|
return [(this.Switch()), (this.Content())];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "current"));
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "Switch"));
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "Content"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_deck extends $.$mol_deck {
|
||||||
|
current(next) {
|
||||||
|
return $mol_state_session.value(`${this}.current()`, next) || '0';
|
||||||
|
}
|
||||||
|
switch_options() {
|
||||||
|
let options = {};
|
||||||
|
this.items().forEach((item, index) => {
|
||||||
|
options[String(index)] = item.title();
|
||||||
|
});
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
Content() {
|
||||||
|
return this.items()[Number(this.current())];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_deck.prototype, "Content", null);
|
||||||
|
$$.$mol_deck = $mol_deck;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$hd_canary_app_bar) = class $hd_canary_app_bar extends ($.$mol_page) {
|
||||||
|
home(){
|
||||||
|
return (this.My_monitor().home());
|
||||||
|
}
|
||||||
|
My_monitor(){
|
||||||
|
const obj = new this.$.$hd_canary_app_monitor();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
users(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Other_monitors(){
|
||||||
|
const obj = new this.$.$mol_book2_catalog();
|
||||||
|
(obj.param) = () => ("user");
|
||||||
|
(obj.menu_title) = () => ("Расшаренные мне");
|
||||||
|
(obj.spreads) = () => ((this.users()));
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Info(){
|
||||||
|
const obj = new this.$.$mol_deck();
|
||||||
|
(obj.items) = () => ([(this.My_monitor()), (this.Other_monitors())]);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
panel_title(id){
|
||||||
|
return "diff";
|
||||||
|
}
|
||||||
|
selected_home(id){
|
||||||
|
const obj = new this.$.$hd_canary_app_home();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Head(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
title(){
|
||||||
|
return (this.$.$mol_locale.text("$hd_canary_app_bar_title"));
|
||||||
|
}
|
||||||
|
body(){
|
||||||
|
return [(this.Info())];
|
||||||
|
}
|
||||||
|
Panel(id){
|
||||||
|
const obj = new this.$.$hd_canary_app_monitor();
|
||||||
|
(obj.title) = () => ((this.panel_title(id)));
|
||||||
|
(obj.home) = () => ((this.selected_home(id)));
|
||||||
|
(obj.Add) = () => (null);
|
||||||
|
(obj.Target_remove) = () => (null);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "My_monitor"));
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "Other_monitors"));
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "Info"));
|
||||||
|
($mol_mem_key(($.$hd_canary_app_bar.prototype), "selected_home"));
|
||||||
|
($mol_mem_key(($.$hd_canary_app_bar.prototype), "Panel"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $hd_canary_app_bar extends $.$hd_canary_app_bar {
|
||||||
|
users() {
|
||||||
|
const presets = this.$.$hyoo_crus_glob.home($hd_canary_app_home).SharedPresets(null);
|
||||||
|
return presets.items().map(key => this.Panel(key));
|
||||||
|
}
|
||||||
|
selected_home(ref) {
|
||||||
|
return this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
||||||
|
}
|
||||||
|
panel_title(ref) {
|
||||||
|
if (this.selected_home(ref).title() != "")
|
||||||
|
return this.selected_home(ref).title();
|
||||||
|
return this.selected_home(ref).land_ref().description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$$.$hd_canary_app_bar = $hd_canary_app_bar;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $hd_canary_app extends $.$hd_canary_app {
|
||||||
|
share_link() {
|
||||||
|
return this.$.$mol_state_arg.link({
|
||||||
|
panel: this.$.$hyoo_crus_glob.home($hd_canary_app_home).land_ref().description,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary_app.prototype, "share_link", null);
|
||||||
|
$$.$hd_canary_app = $hd_canary_app;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $hd_canary_app_server extends $hyoo_crus_dict.with({
|
||||||
|
Users: $hyoo_crus_list_ref_to(() => $hyoo_crus_atom_ref),
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
$.$hd_canary_app_server = $hd_canary_app_server;
|
||||||
|
class $hd_canary_app_home extends $hyoo_crus_home.with({
|
||||||
|
Sites: $hyoo_crus_list_ref_to(() => $hd_canary_app_home_site),
|
||||||
|
SharedPresets: $hyoo_crus_list_ref_to(() => $hyoo_crus_ref),
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
$.$hd_canary_app_home = $hd_canary_app_home;
|
||||||
|
class $hd_canary_app_home_site extends $hyoo_crus_dict.with({
|
||||||
|
url: $hyoo_crus_atom_str,
|
||||||
|
title: $hyoo_crus_atom_str,
|
||||||
|
last_ping_time: $hyoo_crus_atom_time,
|
||||||
|
last_ping_status: $hyoo_crus_atom_bool,
|
||||||
|
sended_alert: $hyoo_crus_atom_bool,
|
||||||
|
}) {
|
||||||
|
tick() {
|
||||||
|
this.$.$mol_state_time.now(5000);
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
});
|
||||||
|
if (this.can_change()) {
|
||||||
|
const url = this.url().val();
|
||||||
|
const title = this.title().val();
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
...{ action: "tick", url, title, last_ping_status: this.last_ping_status(null).val() }
|
||||||
|
});
|
||||||
|
const request = $mol_fetch.response(url);
|
||||||
|
this.last_ping_status(null).val(request.code() == 200);
|
||||||
|
this.last_ping_time(null).val(new $mol_time_moment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary_app_home_site.prototype, "tick", null);
|
||||||
|
$.$hd_canary_app_home_site = $hd_canary_app_home_site;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
var $;
|
var $;
|
||||||
|
|
@ -16433,12 +16329,69 @@ var $;
|
||||||
"http://localhost:9090/"
|
"http://localhost:9090/"
|
||||||
];
|
];
|
||||||
class $hd_canary extends $hyoo_crus_app_node {
|
class $hd_canary extends $hyoo_crus_app_node {
|
||||||
|
hd_canary_alert_to_telegram(message) {
|
||||||
|
const $hd_canary_telegram_token = $node.process.env.TELEGRAM_TOKEN ?? "";
|
||||||
|
if ($hd_canary_telegram_token == "")
|
||||||
|
return;
|
||||||
|
const chatId = '466661457';
|
||||||
|
const apiUrl = `https://api.telegram.org/bot${$hd_canary_telegram_token}/sendMessage`;
|
||||||
|
const params = {
|
||||||
|
chat_id: chatId,
|
||||||
|
text: message,
|
||||||
|
parse_mode: 'HTML'
|
||||||
|
};
|
||||||
|
return $mol_fetch.json(apiUrl, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
});
|
||||||
|
}
|
||||||
_stat_update() {
|
_stat_update() {
|
||||||
this.$.$mol_log3_done({
|
this.$.$mol_log3_done({
|
||||||
place: this,
|
place: this,
|
||||||
message: "_stat_update",
|
message: "_stat_update",
|
||||||
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
|
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
|
||||||
});
|
});
|
||||||
|
this.hd_canary_alert_to_telegram("restart node");
|
||||||
|
this.alerting();
|
||||||
|
this.ping_sites_loop();
|
||||||
|
}
|
||||||
|
alerting() {
|
||||||
|
const home_land = this.$.$hyoo_crus_glob.home().land();
|
||||||
|
const list = home_land.Node($hd_canary_app_server).Item('').Users(null);
|
||||||
|
for (const ref of list.items()) {
|
||||||
|
try {
|
||||||
|
const user = this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
||||||
|
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
||||||
|
if (site.last_ping_status(null).val() == false && (site.sended_alert(null).val() == false || site.sended_alert(null).val() == null)) {
|
||||||
|
this.hd_canary_alert_to_telegram(JSON.stringify({ action: "site_down", url: site.url(null).val() }));
|
||||||
|
this.$.$mol_log3_fail({
|
||||||
|
place: this,
|
||||||
|
message: "ALERT",
|
||||||
|
...{ action: "down_site", url: site.url(null).val() }
|
||||||
|
});
|
||||||
|
site.sended_alert(null).val(true);
|
||||||
|
}
|
||||||
|
if (site.last_ping_status(null).val() == true && site.sended_alert(null).val() == true) {
|
||||||
|
this.hd_canary_alert_to_telegram(JSON.stringify({ action: "site_up", url: site.url(null).val() }));
|
||||||
|
this.$.$mol_log3_fail({
|
||||||
|
place: this,
|
||||||
|
message: "ALERT",
|
||||||
|
...{ action: "down_up", url: site.url(null).val() }
|
||||||
|
});
|
||||||
|
site.sended_alert(null).val(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
$mol_fail_log(error);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ping_sites_loop() {
|
||||||
const home_land = this.$.$hyoo_crus_glob.home().land();
|
const home_land = this.$.$hyoo_crus_glob.home().land();
|
||||||
const list = home_land.Node($hd_canary_app_server).Item('').Users(null);
|
const list = home_land.Node($hd_canary_app_server).Item('').Users(null);
|
||||||
for (const ref of list.items()) {
|
for (const ref of list.items()) {
|
||||||
|
|
@ -16458,9 +16411,18 @@ var $;
|
||||||
return new $hd_canary_join;
|
return new $hd_canary_join;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_action
|
||||||
|
], $hd_canary.prototype, "hd_canary_alert_to_telegram", null);
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary.prototype, "_stat_update", null);
|
], $hd_canary.prototype, "_stat_update", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary.prototype, "alerting", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary.prototype, "ping_sites_loop", null);
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_memo.method
|
$mol_memo.method
|
||||||
], $hd_canary.prototype, "join", null);
|
], $hd_canary.prototype, "join", null);
|
||||||
|
|
@ -16486,6 +16448,9 @@ module.exports = {
|
||||||
cwd: "./-/",
|
cwd: "./-/",
|
||||||
args: "port=9090",
|
args: "port=9090",
|
||||||
autorestart: true,
|
autorestart: true,
|
||||||
|
env: {
|
||||||
|
"TELEGRAM_TOKEN": ""
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
@ -22113,24 +22078,6 @@ var $;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
$mol_test({
|
|
||||||
async 'Derivation from password'() {
|
|
||||||
const data = new Uint8Array([1, 2, 3]);
|
|
||||||
const salt1 = $mol_crypto_salt();
|
|
||||||
const secret1 = await $mol_crypto_sacred_pass('hello', salt1);
|
|
||||||
const secret2 = await $mol_crypto_sacred_pass('hello', salt1);
|
|
||||||
const salt2 = $mol_crypto_salt();
|
|
||||||
const closed = await secret1.encrypt(data, salt2);
|
|
||||||
const opened = await secret2.decrypt(closed, salt2);
|
|
||||||
$mol_assert_equal(data, opened);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
var $;
|
var $;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,2 @@
|
||||||
console.error("Audit fail hd/canary\n mam.ts(8,23): error TS2417: Class static side 'typeof $$' incorrectly extends base class static side 'typeof $'.\n The types returned by '(new $hd_canary_app_bar()).panel_title(...)' are incompatible between these types.\n Type 'string | undefined' is not assignable to type 'string'.\n Type 'undefined' is not assignable to type 'string'.\n\n hd/canary/app/profile/profile.view.ts(125,26): error TS2339: Property 'password' does not exist on type '$hd_canary_app_profile'.\n\n hd/canary/app/profile/profile.view.css.ts(6,3): error TS2322: Type '{ width: `${number}rem`; height: `${number}rem`; }' is not assignable to type '$mol_type_error<\"Unknown CSS Property\", {}>'.\n Type '{ width: `${number}rem`; height: `${number}rem`; }' is not assignable to type '\"Unknown CSS Property\"'.\n\n hd/canary/app/-view.tree/bar.view.tree.d.ts(49,71): error TS2339: Property 'home' does not exist on type '$hd_canary_app_monitor'.\n\n hd/canary/app/bar.view.ts(14,3): error TS2416: Property 'panel_title' in type '$hd_canary_app_bar' is not assignable to the same property in base type '$hd_canary_app_bar'.\n Type '(ref: $mol_data_tagged_type<symbol, \"$hyoo_crus_ref\">) => string | undefined' is not assignable to type '(id: any) => string'.\n Type 'string | undefined' is not assignable to type 'string'.\n Type 'undefined' is not assignable to type 'string'.\n\n hd/canary/app/monitor/monitor.view.ts(64,3): error TS2416: Property 'Target_remove' in type '$hd_canary_app_monitor' is not assignable to the same property in base type '$hd_canary_app_monitor'.\n Type '(prop: $hd_canary_app_home_site) => $mol_button_minor | null' is not assignable to type '(id: any) => $mol_button_minor'.\n Type '$mol_button_minor | null' is not assignable to type '$mol_button_minor'.\n Type 'null' is not assignable to type '$mol_button_typed'.\n\n at | {} (#)\n at | Error: mam.ts(8,23): error TS2417: Class static side 'typeof $$' incorrectly extends base class static side 'typeof $'. (#)\n at | The types returned by '(new $hd_canary_app_bar()).panel_title(...)' are incompatible between these types. (#)\n at | Type 'string | undefined' is not assignable to type 'string'. (#)\n at | Type 'undefined' is not assignable to type 'string'. (#)\n at | (#)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:6439:29)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS<{\"path\":\"C:/dev/mam_prod/hd/canary\",\"exclude\":[\"node\",\"test\",\"dev\"],\"bundle\":\"web\"}>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:740:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundle<[\"C:/dev/mam_prod/hd/canary\",\"web.audit.js\"]>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1876:25)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:737:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1768:26)\n at generate (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:2002:37)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7318:27)\n at undefined.bound handleRequest<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:743:44)\n at undefined.bound handleRequest<#>.async_raw (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:811:22)\n at undefined.bound handleRequest<#>.async (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:826:34)\n at Object.apply (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1628:30)\n at bound handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7295:43)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at jsonParser (C:\\dev\\mam_prod\\node_modules\\body-parser\\lib\\types\\json.js:113:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at compression (C:\\dev\\mam_prod\\node_modules\\compression\\index.js:215:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:188:7)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:224:17\n at originCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:214:15)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:219:13\n at optionsCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:199:9)\n at corsMiddleware (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:204:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at expressInit (C:\\dev\\mam_prod\\node_modules\\express\\lib\\middleware\\init.js:40:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at | Error: hd/canary/app/profile/profile.view.ts(125,26): error TS2339: Property 'password' does not exist on type '$hd_canary_app_profile'. (#)\n at | (#)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:6439:29)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS<{\"path\":\"C:/dev/mam_prod/hd/canary\",\"exclude\":[\"node\",\"test\",\"dev\"],\"bundle\":\"web\"}>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:740:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundle<[\"C:/dev/mam_prod/hd/canary\",\"web.audit.js\"]>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1876:25)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:737:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1768:26)\n at generate (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:2002:37)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7318:27)\n at undefined.bound handleRequest<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:743:44)\n at undefined.bound handleRequest<#>.async_raw (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:811:22)\n at undefined.bound handleRequest<#>.async (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:826:34)\n at Object.apply (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1628:30)\n at bound handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7295:43)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at jsonParser (C:\\dev\\mam_prod\\node_modules\\body-parser\\lib\\types\\json.js:113:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at compression (C:\\dev\\mam_prod\\node_modules\\compression\\index.js:215:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:188:7)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:224:17\n at originCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:214:15)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:219:13\n at optionsCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:199:9)\n at corsMiddleware (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:204:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at expressInit (C:\\dev\\mam_prod\\node_modules\\express\\lib\\middleware\\init.js:40:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at | Error: hd/canary/app/profile/profile.view.css.ts(6,3): error TS2322: Type '{ width: `${number}rem`; height: `${number}rem`; }' is not assignable to type '$mol_type_error<\"Unknown CSS Property\", {}>'. (#)\n at | Type '{ width: `${number}rem`; height: `${number}rem`; }' is not assignable to type '\"Unknown CSS Property\"'. (#)\n at | (#)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:6439:29)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS<{\"path\":\"C:/dev/mam_prod/hd/canary\",\"exclude\":[\"node\",\"test\",\"dev\"],\"bundle\":\"web\"}>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:740:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundle<[\"C:/dev/mam_prod/hd/canary\",\"web.audit.js\"]>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1876:25)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:737:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1768:26)\n at generate (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:2002:37)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7318:27)\n at undefined.bound handleRequest<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:743:44)\n at undefined.bound handleRequest<#>.async_raw (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:811:22)\n at undefined.bound handleRequest<#>.async (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:826:34)\n at Object.apply (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1628:30)\n at bound handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7295:43)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at jsonParser (C:\\dev\\mam_prod\\node_modules\\body-parser\\lib\\types\\json.js:113:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at compression (C:\\dev\\mam_prod\\node_modules\\compression\\index.js:215:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:188:7)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:224:17\n at originCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:214:15)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:219:13\n at optionsCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:199:9)\n at corsMiddleware (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:204:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at expressInit (C:\\dev\\mam_prod\\node_modules\\express\\lib\\middleware\\init.js:40:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at | Error: hd/canary/app/-view.tree/bar.view.tree.d.ts(49,71): error TS2339: Property 'home' does not exist on type '$hd_canary_app_monitor'. (#)\n at | (#)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:6439:29)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS<{\"path\":\"C:/dev/mam_prod/hd/canary\",\"exclude\":[\"node\",\"test\",\"dev\"],\"bundle\":\"web\"}>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:740:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundle<[\"C:/dev/mam_prod/hd/canary\",\"web.audit.js\"]>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1876:25)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:737:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1768:26)\n at generate (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:2002:37)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7318:27)\n at undefined.bound handleRequest<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:743:44)\n at undefined.bound handleRequest<#>.async_raw (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:811:22)\n at undefined.bound handleRequest<#>.async (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:826:34)\n at Object.apply (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1628:30)\n at bound handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7295:43)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at jsonParser (C:\\dev\\mam_prod\\node_modules\\body-parser\\lib\\types\\json.js:113:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at compression (C:\\dev\\mam_prod\\node_modules\\compression\\index.js:215:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:188:7)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:224:17\n at originCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:214:15)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:219:13\n at optionsCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:199:9)\n at corsMiddleware (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:204:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at expressInit (C:\\dev\\mam_prod\\node_modules\\express\\lib\\middleware\\init.js:40:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at | Error: hd/canary/app/bar.view.ts(14,3): error TS2416: Property 'panel_title' in type '$hd_canary_app_bar' is not assignable to the same property in base type '$hd_canary_app_bar'. (#)\n at | Type '(ref: $mol_data_tagged_type<symbol, \"$hyoo_crus_ref\">) => string | undefined' is not assignable to type '(id: any) => string'. (#)\n at | Type 'string | undefined' is not assignable to type 'string'. (#)\n at | Type 'undefined' is not assignable to type 'string'. (#)\n at | (#)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:6439:29)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS<{\"path\":\"C:/dev/mam_prod/hd/canary\",\"exclude\":[\"node\",\"test\",\"dev\"],\"bundle\":\"web\"}>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:740:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundle<[\"C:/dev/mam_prod/hd/canary\",\"web.audit.js\"]>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1876:25)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:737:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1768:26)\n at generate (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:2002:37)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7318:27)\n at undefined.bound handleRequest<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:743:44)\n at undefined.bound handleRequest<#>.async_raw (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:811:22)\n at undefined.bound handleRequest<#>.async (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:826:34)\n at Object.apply (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1628:30)\n at bound handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7295:43)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at jsonParser (C:\\dev\\mam_prod\\node_modules\\body-parser\\lib\\types\\json.js:113:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at compression (C:\\dev\\mam_prod\\node_modules\\compression\\index.js:215:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:188:7)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:224:17\n at originCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:214:15)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:219:13\n at optionsCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:199:9)\n at corsMiddleware (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:204:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at expressInit (C:\\dev\\mam_prod\\node_modules\\express\\lib\\middleware\\init.js:40:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at | Error: hd/canary/app/monitor/monitor.view.ts(64,3): error TS2416: Property 'Target_remove' in type '$hd_canary_app_monitor' is not assignable to the same property in base type '$hd_canary_app_monitor'. (#)\n at | Type '(prop: $hd_canary_app_home_site) => $mol_button_minor | null' is not assignable to type '(id: any) => $mol_button_minor'. (#)\n at | Type '$mol_button_minor | null' is not assignable to type '$mol_button_minor'. (#)\n at | Type 'null' is not assignable to type '$mol_button_typed'. (#)\n at | (#)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:6439:29)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundleAuditJS<{\"path\":\"C:/dev/mam_prod/hd/canary\",\"exclude\":[\"node\",\"test\",\"dev\"],\"bundle\":\"web\"}>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:740:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.bundle<[\"C:/dev/mam_prod/hd/canary\",\"web.audit.js\"]>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:725:35)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1876:25)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:737:44)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.generate<'/hd/canary/-/web.audit.js'>.once<#>.sync (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:800:18)\n at once (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1768:26)\n at generate (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:2002:37)\n at $mol_build.root<[\"C:/dev/mam_prod\",[]]>.server<>.handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7318:27)\n at undefined.bound handleRequest<#>.fresh (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:743:44)\n at undefined.bound handleRequest<#>.async_raw (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:811:22)\n at undefined.bound handleRequest<#>.async (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:826:34)\n at Object.apply (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:1628:30)\n at bound handleRequest (C:\\dev\\mam_prod\\mol\\build\\-\\node.js:7295:43)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at jsonParser (C:\\dev\\mam_prod\\node_modules\\body-parser\\lib\\types\\json.js:113:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at compression (C:\\dev\\mam_prod\\node_modules\\compression\\index.js:215:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at cors (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:188:7)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:224:17\n at originCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:214:15)\n at C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:219:13\n at optionsCallback (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:199:9)\n at corsMiddleware (C:\\dev\\mam_prod\\node_modules\\cors\\lib\\index.js:204:7)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)\n at expressInit (C:\\dev\\mam_prod\\node_modules\\express\\lib\\middleware\\init.js:40:5)\n at Layer.handle [as handle_request] (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:328:13)\n at C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:286:9\n at Function.process_params (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:346:12)\n at next (C:\\dev\\mam_prod\\node_modules\\express\\lib\\router\\index.js:280:10)")
|
console.info( `%cplace: $mol_build
|
||||||
|
message: Audit passed`, 'color:forestgreen; font-weight:bolder' )
|
||||||
925
-/web.js
925
-/web.js
|
|
@ -14035,26 +14035,6 @@ var $;
|
||||||
$.$hyoo_crus_glob = $hyoo_crus_glob;
|
$.$hyoo_crus_glob = $hyoo_crus_glob;
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
async function $mol_crypto_sacred_pass(pass, salt) {
|
|
||||||
const raw = await $mol_crypto_native.subtle.importKey("raw", $mol_charset_encode(pass), "PBKDF2", false, ["deriveKey"]).catch($mol_crypto_restack);
|
|
||||||
const hard = await $mol_crypto_native.subtle.deriveKey({
|
|
||||||
name: "PBKDF2",
|
|
||||||
salt,
|
|
||||||
iterations: 10_000,
|
|
||||||
hash: "SHA-256",
|
|
||||||
}, raw, {
|
|
||||||
name: 'AES-CBC',
|
|
||||||
length: 128,
|
|
||||||
}, Boolean('extractable'), ['encrypt', 'decrypt']).catch($mol_crypto_restack);
|
|
||||||
return $mol_crypto_sacred.from_native(hard);
|
|
||||||
}
|
|
||||||
$.$mol_crypto_sacred_pass = $mol_crypto_sacred_pass;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
@ -14065,29 +14045,14 @@ var $;
|
||||||
var $$;
|
var $$;
|
||||||
(function ($$) {
|
(function ($$) {
|
||||||
class $hd_canary_app_profile extends $.$hd_canary_app_profile {
|
class $hd_canary_app_profile extends $.$hd_canary_app_profile {
|
||||||
content() {
|
|
||||||
return [
|
|
||||||
this.key_import()
|
|
||||||
? this.Import_block()
|
|
||||||
: this.Export_block()
|
|
||||||
];
|
|
||||||
}
|
|
||||||
auth_title() {
|
auth_title() {
|
||||||
return this.key_import()
|
return this.key_import()
|
||||||
? "Войти в профиль"
|
? "Войти в профиль"
|
||||||
: "Поделиться профилем";
|
: "Поделиться профилем";
|
||||||
}
|
}
|
||||||
export_link() {
|
|
||||||
return this.$.$mol_state_arg.link({
|
|
||||||
auth: this.key_export(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
key_import(next) {
|
key_import(next) {
|
||||||
return this.$.$mol_state_arg.value('auth', next) ?? null;
|
return this.$.$mol_state_arg.value('auth', next) ?? null;
|
||||||
}
|
}
|
||||||
peer_new() {
|
|
||||||
return $hyoo_crus_auth.from(this.key_new()).peer();
|
|
||||||
}
|
|
||||||
current_peer() {
|
current_peer() {
|
||||||
return this.$.$hyoo_crus_auth.current().peer();
|
return this.$.$hyoo_crus_auth.current().peer();
|
||||||
}
|
}
|
||||||
|
|
@ -14102,70 +14067,10 @@ var $;
|
||||||
profile_name(next) {
|
profile_name(next) {
|
||||||
return this.home().title(next);
|
return this.home().title(next);
|
||||||
}
|
}
|
||||||
import_switch() {
|
|
||||||
this.$.$hyoo_crus_auth.current($hyoo_crus_auth.from(this.key_new()));
|
|
||||||
this.password('');
|
|
||||||
this.key_import(null);
|
|
||||||
}
|
}
|
||||||
password_bid() {
|
|
||||||
const pass = this.password();
|
|
||||||
if (pass.length <= 7)
|
|
||||||
return this.bid_pass_long();
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
export_rows() {
|
|
||||||
return [
|
|
||||||
this.Expot_bid(),
|
|
||||||
this.Export_pass(),
|
|
||||||
...this.password_bid() ? [] : [this.Export_link()],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
import_rows() {
|
|
||||||
return [
|
|
||||||
this.Iport_descr(),
|
|
||||||
this.Import_pass(),
|
|
||||||
...this.key_new() ? [this.Import_switch()] : [],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
key_new() {
|
|
||||||
const serial = this.key_import();
|
|
||||||
if (!serial)
|
|
||||||
return null;
|
|
||||||
try {
|
|
||||||
const password = this.password();
|
|
||||||
const app = $mol_crypto_hash($mol_charset_encode("hd_canary"));
|
|
||||||
const secret = $mol_wire_sync($mol_crypto_sacred_pass)(password, app);
|
|
||||||
const data = $mol_base64_url_decode(serial);
|
|
||||||
const salt = $mol_crypto_hash(app).slice(0, 16);
|
|
||||||
const closed = $mol_wire_sync(secret).decrypt(data, salt);
|
|
||||||
return closed;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
$mol_fail_log(error);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
key_export() {
|
|
||||||
const password = this.password();
|
|
||||||
const app = $mol_crypto_hash($mol_charset_encode("hd_canary"));
|
|
||||||
const secret = $mol_wire_sync($mol_crypto_sacred_pass)(password, app);
|
|
||||||
const salt = $mol_crypto_hash(app).slice(0, 16);
|
|
||||||
const closed = $mol_wire_sync(secret).encrypt(this.$.$hyoo_crus_auth.current(), salt);
|
|
||||||
return $mol_base64_url_encode(closed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "content", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "auth_title", null);
|
], $hd_canary_app_profile.prototype, "auth_title", null);
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "export_link", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "peer_new", null);
|
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "current_peer", null);
|
], $hd_canary_app_profile.prototype, "current_peer", null);
|
||||||
|
|
@ -14178,19 +14083,6 @@ var $;
|
||||||
__decorate([
|
__decorate([
|
||||||
$mol_mem
|
$mol_mem
|
||||||
], $hd_canary_app_profile.prototype, "profile_name", null);
|
], $hd_canary_app_profile.prototype, "profile_name", null);
|
||||||
__decorate([
|
|
||||||
$mol_action
|
|
||||||
], $hd_canary_app_profile.prototype, "import_switch", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "password_bid", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "key_new", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_action,
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_profile.prototype, "key_export", null);
|
|
||||||
$$.$hd_canary_app_profile = $hd_canary_app_profile;
|
$$.$hd_canary_app_profile = $hd_canary_app_profile;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
@ -14202,12 +14094,6 @@ var $;
|
||||||
var $$;
|
var $$;
|
||||||
(function ($$) {
|
(function ($$) {
|
||||||
const { rem } = $mol_style_unit;
|
const { rem } = $mol_style_unit;
|
||||||
$mol_style_define($hd_canary_app_profile, {
|
|
||||||
Current_peer_avatar: {
|
|
||||||
width: rem(2),
|
|
||||||
height: rem(2)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
|
@ -14276,405 +14162,6 @@ var $;
|
||||||
($mol_mem(($.$hd_canary_app.prototype), "Menu_logo"));
|
($mol_mem(($.$hd_canary_app.prototype), "Menu_logo"));
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_check_list) = class $mol_check_list extends ($.$mol_view) {
|
|
||||||
option_checked(id, next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
option_title(id){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
option_label(id){
|
|
||||||
return [(this.option_title(id))];
|
|
||||||
}
|
|
||||||
enabled(){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
option_enabled(id){
|
|
||||||
return (this.enabled());
|
|
||||||
}
|
|
||||||
option_hint(id){
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
items(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
dictionary(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Option(id){
|
|
||||||
const obj = new this.$.$mol_check();
|
|
||||||
(obj.checked) = (next) => ((this.option_checked(id, next)));
|
|
||||||
(obj.label) = () => ((this.option_label(id)));
|
|
||||||
(obj.enabled) = () => ((this.option_enabled(id)));
|
|
||||||
(obj.hint) = () => ((this.option_hint(id)));
|
|
||||||
(obj.minimal_height) = () => (24);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
options(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
keys(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
sub(){
|
|
||||||
return (this.items());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem_key(($.$mol_check_list.prototype), "option_checked"));
|
|
||||||
($mol_mem_key(($.$mol_check_list.prototype), "Option"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_check_list extends $.$mol_check_list {
|
|
||||||
options() {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
dictionary(next) {
|
|
||||||
return next ?? {};
|
|
||||||
}
|
|
||||||
option_checked(id, next) {
|
|
||||||
const prev = this.dictionary();
|
|
||||||
if (next === undefined)
|
|
||||||
return prev[id] ?? null;
|
|
||||||
const next_rec = { ...prev, [id]: next };
|
|
||||||
if (next === null)
|
|
||||||
delete next_rec[id];
|
|
||||||
return this.dictionary(next_rec)[id] ?? null;
|
|
||||||
}
|
|
||||||
keys() {
|
|
||||||
return Object.keys(this.options());
|
|
||||||
}
|
|
||||||
items() {
|
|
||||||
return this.keys().map(key => this.Option(key));
|
|
||||||
}
|
|
||||||
option_title(key) {
|
|
||||||
return this.options()[key] || key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_check_list.prototype, "keys", null);
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_check_list.prototype, "items", null);
|
|
||||||
$$.$mol_check_list = $mol_check_list;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
$mol_style_attach("mol/check/list/list.view.css", "[mol_check_list] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex: 1 1 auto;\n\tborder-radius: var(--mol_gap_round);\n\tgap: 1px;\n}\n\n[mol_check_list_option] {\n\tflex: 0 1 auto;\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"]) {\n\ttext-shadow: 0 0;\n\tcolor: var(--mol_theme_current);\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"][disabled]) {\n\tcolor: var(--mol_theme_text);\n}\n");
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_switch) = class $mol_switch extends ($.$mol_check_list) {
|
|
||||||
value(next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$mol_switch.prototype), "value"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $mol_state_session extends $mol_object {
|
|
||||||
static 'native()';
|
|
||||||
static native() {
|
|
||||||
if (this['native()'])
|
|
||||||
return this['native()'];
|
|
||||||
check: try {
|
|
||||||
const native = $mol_dom_context.sessionStorage;
|
|
||||||
if (!native)
|
|
||||||
break check;
|
|
||||||
native.setItem('', '');
|
|
||||||
native.removeItem('');
|
|
||||||
return this['native()'] = native;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
console.warn(error);
|
|
||||||
}
|
|
||||||
return this['native()'] = {
|
|
||||||
getItem(key) {
|
|
||||||
return this[':' + key];
|
|
||||||
},
|
|
||||||
setItem(key, value) {
|
|
||||||
this[':' + key] = value;
|
|
||||||
},
|
|
||||||
removeItem(key) {
|
|
||||||
this[':' + key] = void 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
static value(key, next) {
|
|
||||||
if (next === void 0)
|
|
||||||
return JSON.parse(this.native().getItem(key) || 'null');
|
|
||||||
if (next === null)
|
|
||||||
this.native().removeItem(key);
|
|
||||||
else
|
|
||||||
this.native().setItem(key, JSON.stringify(next));
|
|
||||||
return next;
|
|
||||||
}
|
|
||||||
prefix() { return ''; }
|
|
||||||
value(key, next) {
|
|
||||||
return $mol_state_session.value(this.prefix() + '.' + key, next);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem_key
|
|
||||||
], $mol_state_session, "value", null);
|
|
||||||
$.$mol_state_session = $mol_state_session;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_switch extends $.$mol_switch {
|
|
||||||
value(next) {
|
|
||||||
return $mol_state_session.value(`${this}.value()`, next) ?? '';
|
|
||||||
}
|
|
||||||
option_checked(key, next) {
|
|
||||||
if (next === undefined)
|
|
||||||
return this.value() == key;
|
|
||||||
this.value(next ? key : '');
|
|
||||||
return next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$$.$mol_switch = $mol_switch;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$mol_deck) = class $mol_deck extends ($.$mol_list) {
|
|
||||||
current(next){
|
|
||||||
if(next !== undefined) return next;
|
|
||||||
return "0";
|
|
||||||
}
|
|
||||||
switch_options(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Switch(){
|
|
||||||
const obj = new this.$.$mol_switch();
|
|
||||||
(obj.value) = (next) => ((this.current(next)));
|
|
||||||
(obj.options) = () => ((this.switch_options()));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
Content(){
|
|
||||||
const obj = new this.$.$mol_view();
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
items(){
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
rows(){
|
|
||||||
return [(this.Switch()), (this.Content())];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "current"));
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "Switch"));
|
|
||||||
($mol_mem(($.$mol_deck.prototype), "Content"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $mol_deck extends $.$mol_deck {
|
|
||||||
current(next) {
|
|
||||||
return $mol_state_session.value(`${this}.current()`, next) || '0';
|
|
||||||
}
|
|
||||||
switch_options() {
|
|
||||||
let options = {};
|
|
||||||
this.items().forEach((item, index) => {
|
|
||||||
options[String(index)] = item.title();
|
|
||||||
});
|
|
||||||
return options;
|
|
||||||
}
|
|
||||||
Content() {
|
|
||||||
return this.items()[Number(this.current())];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $mol_deck.prototype, "Content", null);
|
|
||||||
$$.$mol_deck = $mol_deck;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
($.$hd_canary_app_bar) = class $hd_canary_app_bar extends ($.$mol_page) {
|
|
||||||
home(){
|
|
||||||
return (this.My_monitor().home());
|
|
||||||
}
|
|
||||||
My_monitor(){
|
|
||||||
const obj = new this.$.$hd_canary_app_monitor();
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
users(){
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
Other_monitors(){
|
|
||||||
const obj = new this.$.$mol_book2_catalog();
|
|
||||||
(obj.head) = () => (null);
|
|
||||||
(obj.param) = () => ("user");
|
|
||||||
(obj.menu_title) = () => ("Расшаренные мне");
|
|
||||||
(obj.spreads) = () => ((this.users()));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
Info(){
|
|
||||||
const obj = new this.$.$mol_deck();
|
|
||||||
(obj.items) = () => ([(this.My_monitor()), (this.Other_monitors())]);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
panel_title(id){
|
|
||||||
return "diff";
|
|
||||||
}
|
|
||||||
Head(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
title(){
|
|
||||||
return (this.$.$mol_locale.text("$hd_canary_app_bar_title"));
|
|
||||||
}
|
|
||||||
body(){
|
|
||||||
return [(this.Info())];
|
|
||||||
}
|
|
||||||
Panel(id){
|
|
||||||
const obj = new this.$.$hd_canary_app_monitor();
|
|
||||||
(obj.title) = () => ((this.panel_title(id)));
|
|
||||||
(obj.home) = () => ((this.selected_home(id)));
|
|
||||||
(obj.Add) = () => (null);
|
|
||||||
(obj.Target_remove) = () => (null);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "My_monitor"));
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "Other_monitors"));
|
|
||||||
($mol_mem(($.$hd_canary_app_bar.prototype), "Info"));
|
|
||||||
($mol_mem_key(($.$hd_canary_app_bar.prototype), "Panel"));
|
|
||||||
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $hd_canary_app_bar extends $.$hd_canary_app_bar {
|
|
||||||
users() {
|
|
||||||
const presets = this.$.$hyoo_crus_glob.home($hd_canary_app_home).SharedPresets(null);
|
|
||||||
return presets.items().map(key => this.Panel(key));
|
|
||||||
}
|
|
||||||
selected_home(ref) {
|
|
||||||
return this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
|
||||||
}
|
|
||||||
panel_title(ref) {
|
|
||||||
if (this.selected_home(ref).title() != "")
|
|
||||||
return this.selected_home(ref).title();
|
|
||||||
return this.selected_home(ref).land_ref().description;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$$.$hd_canary_app_bar = $hd_canary_app_bar;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
var $$;
|
|
||||||
(function ($$) {
|
|
||||||
class $hd_canary_app extends $.$hd_canary_app {
|
|
||||||
share_link() {
|
|
||||||
return this.$.$mol_state_arg.link({
|
|
||||||
panel: this.$.$hyoo_crus_glob.home($hd_canary_app_home).land_ref().description,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app.prototype, "share_link", null);
|
|
||||||
$$.$hd_canary_app = $hd_canary_app;
|
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
class $hd_canary_app_server extends $hyoo_crus_dict.with({
|
|
||||||
Users: $hyoo_crus_list_ref_to(() => $hyoo_crus_atom_ref),
|
|
||||||
}) {
|
|
||||||
}
|
|
||||||
$.$hd_canary_app_server = $hd_canary_app_server;
|
|
||||||
class $hd_canary_app_home extends $hyoo_crus_home.with({
|
|
||||||
Sites: $hyoo_crus_list_ref_to(() => $hd_canary_app_home_site),
|
|
||||||
SharedPresets: $hyoo_crus_list_ref_to(() => $hyoo_crus_ref),
|
|
||||||
}) {
|
|
||||||
}
|
|
||||||
$.$hd_canary_app_home = $hd_canary_app_home;
|
|
||||||
class $hd_canary_app_home_site extends $hyoo_crus_dict.with({
|
|
||||||
url: $hyoo_crus_atom_str,
|
|
||||||
title: $hyoo_crus_atom_str,
|
|
||||||
last_ping_time: $hyoo_crus_atom_time,
|
|
||||||
last_ping_status: $hyoo_crus_atom_bool,
|
|
||||||
}) {
|
|
||||||
tick() {
|
|
||||||
this.$.$mol_state_time.now(5000);
|
|
||||||
this.$.$mol_log3_done({
|
|
||||||
place: this,
|
|
||||||
message: this.land().ref().description,
|
|
||||||
});
|
|
||||||
if (this.can_change()) {
|
|
||||||
const url = this.url().val();
|
|
||||||
const title = this.title().val();
|
|
||||||
this.$.$mol_log3_done({
|
|
||||||
place: this,
|
|
||||||
message: this.land().ref().description,
|
|
||||||
...{ action: "tick", url, title }
|
|
||||||
});
|
|
||||||
const request = $mol_fetch.response(url);
|
|
||||||
this.last_ping_status(null).val(request.code() == 200);
|
|
||||||
this.last_ping_time(null).val(new $mol_time_moment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__decorate([
|
|
||||||
$mol_mem
|
|
||||||
], $hd_canary_app_home_site.prototype, "tick", null);
|
|
||||||
$.$hd_canary_app_home_site = $hd_canary_app_home_site;
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
($.$mol_chip) = class $mol_chip extends ($.$mol_view) {
|
($.$mol_chip) = class $mol_chip extends ($.$mol_view) {
|
||||||
hint(){
|
hint(){
|
||||||
|
|
@ -14947,6 +14434,10 @@ var $;
|
||||||
(obj.items) = () => ((this.target_list()));
|
(obj.items) = () => ((this.target_list()));
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
home(){
|
||||||
|
const obj = new this.$.$hd_canary_app_home();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
Home_button(){
|
Home_button(){
|
||||||
const obj = new this.$.$mol_button_minor();
|
const obj = new this.$.$mol_button_minor();
|
||||||
(obj.title) = () => ("Домой");
|
(obj.title) = () => ("Домой");
|
||||||
|
|
@ -15000,6 +14491,7 @@ var $;
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target_moment"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target_moment"));
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "Target"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "Target_list"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "Target_list"));
|
||||||
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "home"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "Home_button"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "Home_button"));
|
||||||
($mol_mem(($.$hd_canary_app_monitor.prototype), "targets"));
|
($mol_mem(($.$hd_canary_app_monitor.prototype), "targets"));
|
||||||
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "target_result"));
|
($mol_mem_key(($.$hd_canary_app_monitor.prototype), "target_result"));
|
||||||
|
|
@ -15231,6 +14723,410 @@ var $;
|
||||||
})($$ = $.$$ || ($.$$ = {}));
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_check_list) = class $mol_check_list extends ($.$mol_view) {
|
||||||
|
option_checked(id, next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
option_title(id){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
option_label(id){
|
||||||
|
return [(this.option_title(id))];
|
||||||
|
}
|
||||||
|
enabled(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
option_enabled(id){
|
||||||
|
return (this.enabled());
|
||||||
|
}
|
||||||
|
option_hint(id){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
items(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
dictionary(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Option(id){
|
||||||
|
const obj = new this.$.$mol_check();
|
||||||
|
(obj.checked) = (next) => ((this.option_checked(id, next)));
|
||||||
|
(obj.label) = () => ((this.option_label(id)));
|
||||||
|
(obj.enabled) = () => ((this.option_enabled(id)));
|
||||||
|
(obj.hint) = () => ((this.option_hint(id)));
|
||||||
|
(obj.minimal_height) = () => (24);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
options(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
keys(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
sub(){
|
||||||
|
return (this.items());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem_key(($.$mol_check_list.prototype), "option_checked"));
|
||||||
|
($mol_mem_key(($.$mol_check_list.prototype), "Option"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_check_list extends $.$mol_check_list {
|
||||||
|
options() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
dictionary(next) {
|
||||||
|
return next ?? {};
|
||||||
|
}
|
||||||
|
option_checked(id, next) {
|
||||||
|
const prev = this.dictionary();
|
||||||
|
if (next === undefined)
|
||||||
|
return prev[id] ?? null;
|
||||||
|
const next_rec = { ...prev, [id]: next };
|
||||||
|
if (next === null)
|
||||||
|
delete next_rec[id];
|
||||||
|
return this.dictionary(next_rec)[id] ?? null;
|
||||||
|
}
|
||||||
|
keys() {
|
||||||
|
return Object.keys(this.options());
|
||||||
|
}
|
||||||
|
items() {
|
||||||
|
return this.keys().map(key => this.Option(key));
|
||||||
|
}
|
||||||
|
option_title(key) {
|
||||||
|
return this.options()[key] || key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_check_list.prototype, "keys", null);
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_check_list.prototype, "items", null);
|
||||||
|
$$.$mol_check_list = $mol_check_list;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
$mol_style_attach("mol/check/list/list.view.css", "[mol_check_list] {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tflex: 1 1 auto;\n\tborder-radius: var(--mol_gap_round);\n\tgap: 1px;\n}\n\n[mol_check_list_option] {\n\tflex: 0 1 auto;\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"]) {\n\ttext-shadow: 0 0;\n\tcolor: var(--mol_theme_current);\n}\n\n[mol_check_list_option]:where([mol_check_checked=\"true\"][disabled]) {\n\tcolor: var(--mol_theme_text);\n}\n");
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_switch) = class $mol_switch extends ($.$mol_check_list) {
|
||||||
|
value(next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$mol_switch.prototype), "value"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $mol_state_session extends $mol_object {
|
||||||
|
static 'native()';
|
||||||
|
static native() {
|
||||||
|
if (this['native()'])
|
||||||
|
return this['native()'];
|
||||||
|
check: try {
|
||||||
|
const native = $mol_dom_context.sessionStorage;
|
||||||
|
if (!native)
|
||||||
|
break check;
|
||||||
|
native.setItem('', '');
|
||||||
|
native.removeItem('');
|
||||||
|
return this['native()'] = native;
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.warn(error);
|
||||||
|
}
|
||||||
|
return this['native()'] = {
|
||||||
|
getItem(key) {
|
||||||
|
return this[':' + key];
|
||||||
|
},
|
||||||
|
setItem(key, value) {
|
||||||
|
this[':' + key] = value;
|
||||||
|
},
|
||||||
|
removeItem(key) {
|
||||||
|
this[':' + key] = void 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
static value(key, next) {
|
||||||
|
if (next === void 0)
|
||||||
|
return JSON.parse(this.native().getItem(key) || 'null');
|
||||||
|
if (next === null)
|
||||||
|
this.native().removeItem(key);
|
||||||
|
else
|
||||||
|
this.native().setItem(key, JSON.stringify(next));
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
prefix() { return ''; }
|
||||||
|
value(key, next) {
|
||||||
|
return $mol_state_session.value(this.prefix() + '.' + key, next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem_key
|
||||||
|
], $mol_state_session, "value", null);
|
||||||
|
$.$mol_state_session = $mol_state_session;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_switch extends $.$mol_switch {
|
||||||
|
value(next) {
|
||||||
|
return $mol_state_session.value(`${this}.value()`, next) ?? '';
|
||||||
|
}
|
||||||
|
option_checked(key, next) {
|
||||||
|
if (next === undefined)
|
||||||
|
return this.value() == key;
|
||||||
|
this.value(next ? key : '');
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$$.$mol_switch = $mol_switch;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$mol_deck) = class $mol_deck extends ($.$mol_list) {
|
||||||
|
current(next){
|
||||||
|
if(next !== undefined) return next;
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
switch_options(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Switch(){
|
||||||
|
const obj = new this.$.$mol_switch();
|
||||||
|
(obj.value) = (next) => ((this.current(next)));
|
||||||
|
(obj.options) = () => ((this.switch_options()));
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Content(){
|
||||||
|
const obj = new this.$.$mol_view();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
items(){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
rows(){
|
||||||
|
return [(this.Switch()), (this.Content())];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "current"));
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "Switch"));
|
||||||
|
($mol_mem(($.$mol_deck.prototype), "Content"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $mol_deck extends $.$mol_deck {
|
||||||
|
current(next) {
|
||||||
|
return $mol_state_session.value(`${this}.current()`, next) || '0';
|
||||||
|
}
|
||||||
|
switch_options() {
|
||||||
|
let options = {};
|
||||||
|
this.items().forEach((item, index) => {
|
||||||
|
options[String(index)] = item.title();
|
||||||
|
});
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
Content() {
|
||||||
|
return this.items()[Number(this.current())];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $mol_deck.prototype, "Content", null);
|
||||||
|
$$.$mol_deck = $mol_deck;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
($.$hd_canary_app_bar) = class $hd_canary_app_bar extends ($.$mol_page) {
|
||||||
|
home(){
|
||||||
|
return (this.My_monitor().home());
|
||||||
|
}
|
||||||
|
My_monitor(){
|
||||||
|
const obj = new this.$.$hd_canary_app_monitor();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
users(){
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
Other_monitors(){
|
||||||
|
const obj = new this.$.$mol_book2_catalog();
|
||||||
|
(obj.param) = () => ("user");
|
||||||
|
(obj.menu_title) = () => ("Расшаренные мне");
|
||||||
|
(obj.spreads) = () => ((this.users()));
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Info(){
|
||||||
|
const obj = new this.$.$mol_deck();
|
||||||
|
(obj.items) = () => ([(this.My_monitor()), (this.Other_monitors())]);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
panel_title(id){
|
||||||
|
return "diff";
|
||||||
|
}
|
||||||
|
selected_home(id){
|
||||||
|
const obj = new this.$.$hd_canary_app_home();
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
Head(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
title(){
|
||||||
|
return (this.$.$mol_locale.text("$hd_canary_app_bar_title"));
|
||||||
|
}
|
||||||
|
body(){
|
||||||
|
return [(this.Info())];
|
||||||
|
}
|
||||||
|
Panel(id){
|
||||||
|
const obj = new this.$.$hd_canary_app_monitor();
|
||||||
|
(obj.title) = () => ((this.panel_title(id)));
|
||||||
|
(obj.home) = () => ((this.selected_home(id)));
|
||||||
|
(obj.Add) = () => (null);
|
||||||
|
(obj.Target_remove) = () => (null);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "My_monitor"));
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "Other_monitors"));
|
||||||
|
($mol_mem(($.$hd_canary_app_bar.prototype), "Info"));
|
||||||
|
($mol_mem_key(($.$hd_canary_app_bar.prototype), "selected_home"));
|
||||||
|
($mol_mem_key(($.$hd_canary_app_bar.prototype), "Panel"));
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $hd_canary_app_bar extends $.$hd_canary_app_bar {
|
||||||
|
users() {
|
||||||
|
const presets = this.$.$hyoo_crus_glob.home($hd_canary_app_home).SharedPresets(null);
|
||||||
|
return presets.items().map(key => this.Panel(key));
|
||||||
|
}
|
||||||
|
selected_home(ref) {
|
||||||
|
return this.$.$hyoo_crus_glob.Node(ref, $hd_canary_app_home);
|
||||||
|
}
|
||||||
|
panel_title(ref) {
|
||||||
|
if (this.selected_home(ref).title() != "")
|
||||||
|
return this.selected_home(ref).title();
|
||||||
|
return this.selected_home(ref).land_ref().description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$$.$hd_canary_app_bar = $hd_canary_app_bar;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
var $$;
|
||||||
|
(function ($$) {
|
||||||
|
class $hd_canary_app extends $.$hd_canary_app {
|
||||||
|
share_link() {
|
||||||
|
return this.$.$mol_state_arg.link({
|
||||||
|
panel: this.$.$hyoo_crus_glob.home($hd_canary_app_home).land_ref().description,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary_app.prototype, "share_link", null);
|
||||||
|
$$.$hd_canary_app = $hd_canary_app;
|
||||||
|
})($$ = $.$$ || ($.$$ = {}));
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
|
;
|
||||||
|
"use strict";
|
||||||
|
var $;
|
||||||
|
(function ($) {
|
||||||
|
class $hd_canary_app_server extends $hyoo_crus_dict.with({
|
||||||
|
Users: $hyoo_crus_list_ref_to(() => $hyoo_crus_atom_ref),
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
$.$hd_canary_app_server = $hd_canary_app_server;
|
||||||
|
class $hd_canary_app_home extends $hyoo_crus_home.with({
|
||||||
|
Sites: $hyoo_crus_list_ref_to(() => $hd_canary_app_home_site),
|
||||||
|
SharedPresets: $hyoo_crus_list_ref_to(() => $hyoo_crus_ref),
|
||||||
|
}) {
|
||||||
|
}
|
||||||
|
$.$hd_canary_app_home = $hd_canary_app_home;
|
||||||
|
class $hd_canary_app_home_site extends $hyoo_crus_dict.with({
|
||||||
|
url: $hyoo_crus_atom_str,
|
||||||
|
title: $hyoo_crus_atom_str,
|
||||||
|
last_ping_time: $hyoo_crus_atom_time,
|
||||||
|
last_ping_status: $hyoo_crus_atom_bool,
|
||||||
|
sended_alert: $hyoo_crus_atom_bool,
|
||||||
|
}) {
|
||||||
|
tick() {
|
||||||
|
this.$.$mol_state_time.now(5000);
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
});
|
||||||
|
if (this.can_change()) {
|
||||||
|
const url = this.url().val();
|
||||||
|
const title = this.title().val();
|
||||||
|
this.$.$mol_log3_done({
|
||||||
|
place: this,
|
||||||
|
message: this.land().ref().description,
|
||||||
|
...{ action: "tick", url, title, last_ping_status: this.last_ping_status(null).val() }
|
||||||
|
});
|
||||||
|
const request = $mol_fetch.response(url);
|
||||||
|
this.last_ping_status(null).val(request.code() == 200);
|
||||||
|
this.last_ping_time(null).val(new $mol_time_moment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
__decorate([
|
||||||
|
$mol_mem
|
||||||
|
], $hd_canary_app_home_site.prototype, "tick", null);
|
||||||
|
$.$hd_canary_app_home_site = $hd_canary_app_home_site;
|
||||||
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
var $node = $node || {}
|
var $node = $node || {}
|
||||||
|
|
@ -15244,6 +15140,9 @@ module.exports = {
|
||||||
cwd: "./-/",
|
cwd: "./-/",
|
||||||
args: "port=9090",
|
args: "port=9090",
|
||||||
autorestart: true,
|
autorestart: true,
|
||||||
|
env: {
|
||||||
|
"TELEGRAM_TOKEN": ""
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5863,24 +5863,6 @@ var $;
|
||||||
});
|
});
|
||||||
})($ || ($ = {}));
|
})($ || ($ = {}));
|
||||||
|
|
||||||
;
|
|
||||||
"use strict";
|
|
||||||
var $;
|
|
||||||
(function ($) {
|
|
||||||
$mol_test({
|
|
||||||
async 'Derivation from password'() {
|
|
||||||
const data = new Uint8Array([1, 2, 3]);
|
|
||||||
const salt1 = $mol_crypto_salt();
|
|
||||||
const secret1 = await $mol_crypto_sacred_pass('hello', salt1);
|
|
||||||
const secret2 = await $mol_crypto_sacred_pass('hello', salt1);
|
|
||||||
const salt2 = $mol_crypto_salt();
|
|
||||||
const closed = await secret1.encrypt(data, salt2);
|
|
||||||
const opened = await secret2.decrypt(closed, salt2);
|
|
||||||
$mol_assert_equal(data, opened);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
})($ || ($ = {}));
|
|
||||||
|
|
||||||
;
|
;
|
||||||
"use strict";
|
"use strict";
|
||||||
var $;
|
var $;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
1
-node/deps.d.ts
vendored
1
-node/deps.d.ts
vendored
|
|
@ -11,4 +11,5 @@ interface $node {
|
||||||
"stream" : typeof import( "stream" ) // mol/rest/server/server.node.ts
|
"stream" : typeof import( "stream" ) // mol/rest/server/server.node.ts
|
||||||
"http" : typeof import( "http" ) // mol/rest/server/server.node.ts
|
"http" : typeof import( "http" ) // mol/rest/server/server.node.ts
|
||||||
"dns" : typeof import( "dns" ) // hyoo/crus/app/home/home.node.ts
|
"dns" : typeof import( "dns" ) // hyoo/crus/app/home/home.node.ts
|
||||||
|
"process" : typeof import( "process" ) // hd/canary/canary.node.tsx
|
||||||
}
|
}
|
||||||
|
|
@ -6,6 +6,9 @@ module.exports = {
|
||||||
cwd: "./-/",
|
cwd: "./-/",
|
||||||
args: "port=9090",
|
args: "port=9090",
|
||||||
autorestart: true,
|
autorestart: true,
|
||||||
|
env: {
|
||||||
|
"TELEGRAM_TOKEN": ""
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue