f_0000c4 19.8 KB
Newer Older
Luca Braun's avatar
Luca Braun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
define(['dart_sdk', 'packages/flutter/src/widgets/widget_span.dart', 'packages/flutter/src/rendering/flex.dart', 'packages/flutter/src/painting/strut_style.dart', 'packages/flutter/src/material/colors.dart', 'packages/dashboard/trustcolorcalculator.dart', 'packages/apex_flutter_sdk/components/basic/hover_tooltip.dart', 'packages/flutter/src/material/circle_avatar.dart', 'packages/flutter/src/painting/image_resolution.dart', 'packages/flutter/src/painting/edge_insets.dart', 'packages/flutter/src/painting/box_decoration.dart', 'packages/flutter/src/painting/border_radius.dart', 'packages/flutter/src/painting/box_shadow.dart'], (function load__packages__dashboard__usernode_dart(dart_sdk, packages__flutter__src__widgets__widget_span$46dart, packages__flutter__src__rendering__flex$46dart, packages__flutter__src__painting__strut_style$46dart, packages__flutter__src__material__colors$46dart, packages__dashboard__trustcolorcalculator$46dart, packages__apex_flutter_sdk__components__basic__hover_tooltip$46dart, packages__flutter__src__material__circle_avatar$46dart, packages__flutter__src__painting__image_resolution$46dart, packages__flutter__src__painting__edge_insets$46dart, packages__flutter__src__painting__box_decoration$46dart, packages__flutter__src__painting__border_radius$46dart, packages__flutter__src__painting__box_shadow$46dart) {
  'use strict';
  const core = dart_sdk.core;
  const _interceptors = dart_sdk._interceptors;
  const ui = dart_sdk.ui;
  const dart = dart_sdk.dart;
  const dartx = dart_sdk.dartx;
  const framework = packages__flutter__src__widgets__widget_span$46dart.src__widgets__framework;
  const basic = packages__flutter__src__widgets__widget_span$46dart.src__widgets__basic;
  const text = packages__flutter__src__widgets__widget_span$46dart.src__widgets__text;
  const widget_inspector = packages__flutter__src__widgets__widget_span$46dart.src__widgets__widget_inspector;
  const container = packages__flutter__src__widgets__widget_span$46dart.src__widgets__container;
  const flex = packages__flutter__src__rendering__flex$46dart.src__rendering__flex;
  const text_style = packages__flutter__src__painting__strut_style$46dart.src__painting__text_style;
  const colors = packages__flutter__src__material__colors$46dart.src__material__colors;
  const trustcolorcalculator = packages__dashboard__trustcolorcalculator$46dart.trustcolorcalculator;
  const hover_tooltip = packages__apex_flutter_sdk__components__basic__hover_tooltip$46dart.components__basic__hover_tooltip;
  const circle_avatar = packages__flutter__src__material__circle_avatar$46dart.src__material__circle_avatar;
  const image_resolution = packages__flutter__src__painting__image_resolution$46dart.src__painting__image_resolution;
  const edge_insets = packages__flutter__src__painting__edge_insets$46dart.src__painting__edge_insets;
  const box_decoration = packages__flutter__src__painting__box_decoration$46dart.src__painting__box_decoration;
  const border_radius = packages__flutter__src__painting__border_radius$46dart.src__painting__border_radius;
  const box_shadow = packages__flutter__src__painting__box_shadow$46dart.src__painting__box_shadow;
  var usernode = Object.create(dart.library);
  var $toString = dartx.toString;
  var $add = dartx.add;
  var $forEach = dartx.forEach;
  dart._checkModuleNullSafetyMode(false);
  var T = {
    WidgetL: () => (T.WidgetL = dart.constFn(dart.legacy(framework.Widget)))(),
    JSArrayOfWidgetL: () => (T.JSArrayOfWidgetL = dart.constFn(_interceptors.JSArray$(T.WidgetL())))(),
    _LocationL: () => (T._LocationL = dart.constFn(dart.legacy(widget_inspector._Location)))(),
    doubleL: () => (T.doubleL = dart.constFn(dart.legacy(core.double)))(),
    StringL: () => (T.StringL = dart.constFn(dart.legacy(core.String)))(),
    StringLAnddynamicToNull: () => (T.StringLAnddynamicToNull = dart.constFn(dart.fnType(core.Null, [T.StringL(), dart.dynamic])))(),
    BoxShadowL: () => (T.BoxShadowL = dart.constFn(dart.legacy(box_shadow.BoxShadow)))(),
    JSArrayOfBoxShadowL: () => (T.JSArrayOfBoxShadowL = dart.constFn(_interceptors.JSArray$(T.BoxShadowL())))()
  };
  var T$Eval = Object.assign({
    _: () => T$Eval
  }, T);
  var S = {
    _: () => S
  };
  var S$Eval = Object.assign({
    _: () => S$Eval
  }, S);
  const CT = Object.create({
    _: () => (C, CT)
  });
  dart.defineLazy(CT, {
    get C2() {
      return C[2] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "data",
        [_Location_column]: 13,
        [_Location_line]: 16,
        [_Location_file]: null
      });
    },
    get C3() {
      return C[3] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "textAlign",
        [_Location_column]: 13,
        [_Location_line]: 17,
        [_Location_file]: null
      });
    },
    get C4() {
      return C[4] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "style",
        [_Location_column]: 13,
        [_Location_line]: 18,
        [_Location_file]: null
      });
    },
    get C1() {
      return C[1] = dart.constList([C[2] || CT.C2, C[3] || CT.C3, C[4] || CT.C4], T._LocationL());
    },
    get C0() {
      return C[0] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[1] || CT.C1,
        [_Location_name]: null,
        [_Location_column]: 11,
        [_Location_line]: 15,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C7() {
      return C[7] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "data",
        [_Location_column]: 41,
        [_Location_line]: 20,
        [_Location_file]: null
      });
    },
    get C8() {
      return C[8] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "textAlign",
        [_Location_column]: 15,
        [_Location_line]: 21,
        [_Location_file]: null
      });
    },
    get C9() {
      return C[9] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "style",
        [_Location_column]: 15,
        [_Location_line]: 22,
        [_Location_file]: null
      });
    },
    get C6() {
      return C[6] = dart.constList([C[7] || CT.C7, C[8] || CT.C8, C[9] || CT.C9], T._LocationL());
    },
    get C5() {
      return C[5] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[6] || CT.C6,
        [_Location_name]: null,
        [_Location_column]: 11,
        [_Location_line]: 20,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C12() {
      return C[12] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "mainAxisAlignment",
        [_Location_column]: 9,
        [_Location_line]: 13,
        [_Location_file]: null
      });
    },
    get C13() {
      return C[13] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "children",
        [_Location_column]: 9,
        [_Location_line]: 14,
        [_Location_file]: null
      });
    },
    get C11() {
      return C[11] = dart.constList([C[12] || CT.C12, C[13] || CT.C13], T._LocationL());
    },
    get C10() {
      return C[10] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[11] || CT.C11,
        [_Location_name]: null,
        [_Location_column]: 23,
        [_Location_line]: 12,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C16() {
      return C[16] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "backgroundImage",
        [_Location_column]: 9,
        [_Location_line]: 32,
        [_Location_file]: null
      });
    },
    get C17() {
      return C[17] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "radius",
        [_Location_column]: 9,
        [_Location_line]: 33,
        [_Location_file]: null
      });
    },
    get C15() {
      return C[15] = dart.constList([C[16] || CT.C16, C[17] || CT.C17], T._LocationL());
    },
    get C14() {
      return C[14] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[15] || CT.C15,
        [_Location_name]: null,
        [_Location_column]: 14,
        [_Location_line]: 31,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C20() {
      return C[20] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "communities",
        [_Location_column]: 33,
        [_Location_line]: 35,
        [_Location_file]: null
      });
    },
    get C19() {
      return C[19] = dart.constList([C[20] || CT.C20], T._LocationL());
    },
    get C18() {
      return C[18] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[19] || CT.C19,
        [_Location_name]: null,
        [_Location_column]: 16,
        [_Location_line]: 35,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C23() {
      return C[23] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "child",
        [_Location_column]: 7,
        [_Location_line]: 31,
        [_Location_file]: null
      });
    },
    get C24() {
      return C[24] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "tooltip",
        [_Location_column]: 7,
        [_Location_line]: 35,
        [_Location_file]: null
      });
    },
    get C22() {
      return C[22] = dart.constList([C[23] || CT.C23, C[24] || CT.C24], T._LocationL());
    },
    get C21() {
      return C[21] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[22] || CT.C22,
        [_Location_name]: null,
        [_Location_column]: 12,
        [_Location_line]: 30,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C27() {
      return C[27] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "children",
        [_Location_column]: 11,
        [_Location_line]: 54,
        [_Location_file]: null
      });
    },
    get C26() {
      return C[26] = dart.constList([C[27] || CT.C27], T._LocationL());
    },
    get C25() {
      return C[25] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[26] || CT.C26,
        [_Location_name]: null,
        [_Location_column]: 16,
        [_Location_line]: 53,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    },
    get C30() {
      return C[30] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "padding",
        [_Location_column]: 9,
        [_Location_line]: 45,
        [_Location_file]: null
      });
    },
    get C31() {
      return C[31] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "width",
        [_Location_column]: 9,
        [_Location_line]: 46,
        [_Location_file]: null
      });
    },
    get C32() {
      return C[32] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "decoration",
        [_Location_column]: 9,
        [_Location_line]: 47,
        [_Location_file]: null
      });
    },
    get C33() {
      return C[33] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: null,
        [_Location_name]: "child",
        [_Location_column]: 9,
        [_Location_line]: 53,
        [_Location_file]: null
      });
    },
    get C29() {
      return C[29] = dart.constList([C[30] || CT.C30, C[31] || CT.C31, C[32] || CT.C32, C[33] || CT.C33], T._LocationL());
    },
    get C28() {
      return C[28] = dart.const({
        __proto__: widget_inspector._Location.prototype,
        [_Location_parameterLocations]: C[29] || CT.C29,
        [_Location_name]: null,
        [_Location_column]: 12,
        [_Location_line]: 44,
        [_Location_file]: "file:///C:/Users/Luca/Documents/GitProjects/smart/src/dashboard/lib/usernode.dart"
      });
    }
  }, false);
  var C = Array(34).fill(void 0);
  var I = ["package:dashboard/usernode.dart"];
  var communities = dart.privateName(usernode, "UserNode.communities");
  var trustScores$ = dart.privateName(usernode, "UserNode.trustScores");
  var _Location_parameterLocations = dart.privateName(widget_inspector, "_Location.parameterLocations");
  var _Location_name = dart.privateName(widget_inspector, "_Location.name");
  var _Location_column = dart.privateName(widget_inspector, "_Location.column");
  var _Location_line = dart.privateName(widget_inspector, "_Location.line");
  var _Location_file = dart.privateName(widget_inspector, "_Location.file");
  usernode.UserNode = class UserNode extends framework.StatelessWidget {
    get communities() {
      return this[communities];
    }
    set communities(value) {
      this[communities] = value;
    }
    get trustScores() {
      return this[trustScores$];
    }
    set trustScores(value) {
      super.trustScores = value;
    }
    build(context) {
      this.trustScores[$forEach](dart.fn((community, trust) => {
        this.communities[$add](new basic.Row.new({mainAxisAlignment: flex.MainAxisAlignment.spaceBetween, children: T.JSArrayOfWidgetL().of([new text.Text.new(community, {textAlign: ui.TextAlign.left, style: new text_style.TextStyle.new({color: colors.Colors.black}), $creationLocationd_0dea112b090073317d4: C[0] || CT.C0}), new text.Text.new(dart.notNull(dart.toString(dart.dsend(trust, '*', [100]))) + "%", {textAlign: ui.TextAlign.right, style: new text_style.TextStyle.new({color: trustcolorcalculator.TrustColorCalculator.calculateTrustColor(T.doubleL().as(trust)), fontWeight: ui.FontWeight.bold}), $creationLocationd_0dea112b090073317d4: C[5] || CT.C5})]), $creationLocationd_0dea112b090073317d4: C[10] || CT.C10}));
      }, T.StringLAnddynamicToNull()));
      return new hover_tooltip.HoverTooltip.new({child: new circle_avatar.CircleAvatar.new({backgroundImage: new image_resolution.AssetImage.new("assets/user.png"), radius: 30.0, $creationLocationd_0dea112b090073317d4: C[14] || CT.C14}), tooltip: new usernode.UserTooltip.new(this.communities, {$creationLocationd_0dea112b090073317d4: C[18] || CT.C18}), $creationLocationd_0dea112b090073317d4: C[21] || CT.C21});
    }
  };
  (usernode.UserNode.new = function(trustScores, opts) {
    let $36creationLocationd_0dea112b090073317d4 = opts && '$creationLocationd_0dea112b090073317d4' in opts ? opts.$creationLocationd_0dea112b090073317d4 : null;
    this[communities] = T.JSArrayOfWidgetL().of([]);
    this[trustScores$] = trustScores;
    usernode.UserNode.__proto__.new.call(this, {$creationLocationd_0dea112b090073317d4: $36creationLocationd_0dea112b090073317d4});
    ;
  }).prototype = usernode.UserNode.prototype;
  dart.addTypeTests(usernode.UserNode);
  dart.addTypeCaches(usernode.UserNode);
  dart.setMethodSignature(usernode.UserNode, () => ({
    __proto__: dart.getMethods(usernode.UserNode.__proto__),
    build: dart.fnType(dart.legacy(framework.Widget), [dart.legacy(framework.BuildContext)])
  }));
  dart.setLibraryUri(usernode.UserNode, I[0]);
  dart.setFieldSignature(usernode.UserNode, () => ({
    __proto__: dart.getFields(usernode.UserNode.__proto__),
    communities: dart.fieldType(dart.legacy(core.List$(dart.legacy(framework.Widget)))),
    trustScores: dart.finalFieldType(dart.legacy(core.Map$(dart.legacy(core.String), dart.dynamic)))
  }));
  var communities$ = dart.privateName(usernode, "UserTooltip.communities");
  usernode.UserTooltip = class UserTooltip extends framework.StatelessWidget {
    get communities() {
      return this[communities$];
    }
    set communities(value) {
      super.communities = value;
    }
    build(context) {
      let t0;
      return new container.Container.new({padding: new edge_insets.EdgeInsets.fromLTRB(12.0, 8.0, 12.0, 8.0), width: 300.0, decoration: new box_decoration.BoxDecoration.new({borderRadius: new border_radius.BorderRadius.circular(4.0), boxShadow: T.JSArrayOfBoxShadowL().of([new box_shadow.BoxShadow.new({color: (t0 = colors.Colors.grey._get(100), t0 == null ? colors.Colors.grey : t0), spreadRadius: 1.0})])}), child: new basic.Column.new({children: this.communities, $creationLocationd_0dea112b090073317d4: C[25] || CT.C25}), $creationLocationd_0dea112b090073317d4: C[28] || CT.C28});
    }
  };
  (usernode.UserTooltip.new = function(communities, opts) {
    let $36creationLocationd_0dea112b090073317d4 = opts && '$creationLocationd_0dea112b090073317d4' in opts ? opts.$creationLocationd_0dea112b090073317d4 : null;
    this[communities$] = communities;
    usernode.UserTooltip.__proto__.new.call(this, {$creationLocationd_0dea112b090073317d4: $36creationLocationd_0dea112b090073317d4});
    ;
  }).prototype = usernode.UserTooltip.prototype;
  dart.addTypeTests(usernode.UserTooltip);
  dart.addTypeCaches(usernode.UserTooltip);
  dart.setMethodSignature(usernode.UserTooltip, () => ({
    __proto__: dart.getMethods(usernode.UserTooltip.__proto__),
    build: dart.fnType(dart.legacy(framework.Widget), [dart.legacy(framework.BuildContext)])
  }));
  dart.setLibraryUri(usernode.UserTooltip, I[0]);
  dart.setFieldSignature(usernode.UserTooltip, () => ({
    __proto__: dart.getFields(usernode.UserTooltip.__proto__),
    communities: dart.finalFieldType(dart.legacy(core.List$(dart.legacy(framework.Widget))))
  }));
  dart.trackLibraries("packages/dashboard/usernode.dart", {
    "package:dashboard/usernode.dart": usernode
  }, {
  }, '{"version":3,"sourceRoot":"","sources":["usernode.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKe;;;;;;IACc;;;;;;UAGD;AAkBtB,MAjBF,AAAY,2BAAQ,SAAC,WAAW;AAgB5B,QAfF,AAAY,uBAAI,sCACuB,+CAC3B,yBACR,kBACE,SAAS,cACY,0BACd,qCAAwB,gFAEjC,kBAA8B,aAAX,cAAP,WAAN,KAAK,QAAG,UAAkB,iBACP,2BACd,qCACuB,6EAAoB,KAAK,gBAC9B;;AAMnC,YAAO,4CACE,qDACY,oCAAW,4BACpB,0EAED,6BAAiB;IAE9B;;oCA7Bc;;IAFD,oBAAc;IAEb;AAAd;;EAA0B;;;;;;;;;;;;;;;IAkCP;;;;;;UACO;;AACxB,YAAO,uCACiB,oCAAS,MAAI,KAAG,MAAI,aACjC,mBACK,oDACiB,wCAAS,iBACzB,4BACT,sCAAkC,KAAV,AAAI,wBAAC,MAAD,aAAgB,wCAAoB,kBAG7D,gCACK;IAElB;;uCAfiB;;;AAAjB;;EAA6B","file":"../../../../../../../../packages/dashboard/usernode.dart.lib.js"}');
  // Exports:
  return {
    usernode: usernode
  };
}));

//# sourceMappingURL=usernode.dart.lib.js.map