@jsenv/core 24.4.8 → 24.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/build_manifest.js +4 -4
  2. package/dist/compile_proxy/asset-manifest.json +1 -2
  3. package/dist/compile_proxy/{compile_proxy-e666f204.html → compile_proxy-1dfca609.html} +254 -218
  4. package/dist/redirector/asset-manifest.json +1 -2
  5. package/dist/redirector/{redirector-bee67b92.html → redirector-d1316407.html} +254 -218
  6. package/dist/toolbar/asset-manifest.json +1 -2
  7. package/dist/toolbar/{toolbar-d13f2c3c.html → toolbar-afb71355.html} +261 -221
  8. package/dist/toolbar/{toolbar.main-320b0544.js.map → toolbar.main-feac7fa3.js.map} +2 -2
  9. package/dist/toolbar_injector/asset-manifest.json +1 -1
  10. package/dist/toolbar_injector/{toolbar_injector-828ec83b.js → toolbar_injector-445d3ea0.js} +2 -2
  11. package/dist/toolbar_injector/{toolbar_injector-828ec83b.js.map → toolbar_injector-445d3ea0.js.map} +2 -2
  12. package/package.json +1 -1
  13. package/src/buildProject.js +2 -0
  14. package/src/internal/building/buildUsingRollup.js +16 -28
  15. package/src/internal/building/{bundleWorker.js → js/babel_plugin_inline_worker_imports.js} +25 -61
  16. package/src/internal/building/js/parseJsRessource.js +13 -14
  17. package/src/internal/building/js/transform_worker.js +55 -0
  18. package/src/internal/building/resolve_import_url_helper.js +2 -1
  19. package/src/internal/building/ressource_builder.js +59 -15
  20. package/src/internal/building/{createJsenvRollupPlugin.js → rollup_plugin_jsenv.js} +81 -9
  21. package/src/internal/building/url_loader.js +0 -2
  22. package/src/internal/compiling/createCompiledFileService.js +3 -3
  23. package/src/internal/dev_server/toolbar/toolbar.html +1 -1
  24. package/src/internal/dev_server/toolbar/toolbar.main.js +4 -0
  25. package/src/jsenvServiceWorkerFinalizer.js +19 -2
  26. package/dist/compile_proxy/assets/s.js-fcba0e35.map +0 -246
  27. package/dist/redirector/assets/s.js-fcba0e35.map +0 -246
  28. package/dist/toolbar/assets/s.js-fcba0e35.map +0 -246
  29. package/src/internal/building/buildServiceWorker.js +0 -75
@@ -796,6 +796,7 @@ html[data-toolbar-visible] #toolbar-trigger {
796
796
  * Minimal SystemJS Build
797
797
  */
798
798
  (function () {
799
+
799
800
  function errMsg(errCode, msg) {
800
801
  return (msg || "") + " (SystemJS https://git.io/JvFET#" + errCode + ")";
801
802
  }
@@ -803,58 +804,68 @@ html[data-toolbar-visible] #toolbar-trigger {
803
804
  var hasSymbol = typeof Symbol !== 'undefined';
804
805
  var hasSelf = typeof self !== 'undefined';
805
806
  var hasDocument = typeof document !== 'undefined';
807
+
806
808
  var envGlobal = hasSelf ? self : global;
809
+
807
810
  var baseUrl;
808
811
 
809
812
  if (hasDocument) {
810
813
  var baseEl = document.querySelector('base[href]');
811
- if (baseEl) baseUrl = baseEl.href;
814
+ if (baseEl)
815
+ baseUrl = baseEl.href;
812
816
  }
813
817
 
814
818
  if (!baseUrl && typeof location !== 'undefined') {
815
819
  baseUrl = location.href.split('#')[0].split('?')[0];
816
820
  var lastSepIndex = baseUrl.lastIndexOf('/');
817
- if (lastSepIndex !== -1) baseUrl = baseUrl.slice(0, lastSepIndex + 1);
821
+ if (lastSepIndex !== -1)
822
+ baseUrl = baseUrl.slice(0, lastSepIndex + 1);
818
823
  }
819
824
 
820
825
  var backslashRegEx = /\\/g;
821
-
822
- function resolveIfNotPlainOrUrl(relUrl, parentUrl) {
823
- if (relUrl.indexOf('\\') !== -1) relUrl = relUrl.replace(backslashRegEx, '/'); // protocol-relative
824
-
826
+ function resolveIfNotPlainOrUrl (relUrl, parentUrl) {
827
+ if (relUrl.indexOf('\\') !== -1)
828
+ relUrl = relUrl.replace(backslashRegEx, '/');
829
+ // protocol-relative
825
830
  if (relUrl[0] === '/' && relUrl[1] === '/') {
826
831
  return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;
827
- } // relative-url
828
- else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) || relUrl.length === 1 && (relUrl += '/')) || relUrl[0] === '/') {
829
- var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1); // Disabled, but these cases will give inconsistent results for deep backtracking
832
+ }
833
+ // relative-url
834
+ else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||
835
+ relUrl.length === 1 && (relUrl += '/')) ||
836
+ relUrl[0] === '/') {
837
+ var parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);
838
+ // Disabled, but these cases will give inconsistent results for deep backtracking
830
839
  //if (parentUrl[parentProtocol.length] !== '/')
831
840
  // throw Error('Cannot resolve');
832
841
  // read pathname from parent URL
833
842
  // pathname taken to be part after leading "/"
834
-
835
843
  var pathname;
836
-
837
844
  if (parentUrl[parentProtocol.length + 1] === '/') {
838
845
  // resolving to a :// so we need to read out the auth and host
839
846
  if (parentProtocol !== 'file:') {
840
847
  pathname = parentUrl.slice(parentProtocol.length + 2);
841
848
  pathname = pathname.slice(pathname.indexOf('/') + 1);
842
- } else {
849
+ }
850
+ else {
843
851
  pathname = parentUrl.slice(8);
844
852
  }
845
- } else {
853
+ }
854
+ else {
846
855
  // resolving to :/ so pathname is the /... part
847
856
  pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));
848
857
  }
849
858
 
850
- if (relUrl[0] === '/') return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl; // join together and split for removal of .. and . segments
859
+ if (relUrl[0] === '/')
860
+ return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;
861
+
862
+ // join together and split for removal of .. and . segments
851
863
  // looping the string instead of anything fancy for perf reasons
852
864
  // '../../../../../z' resolved to 'x/y' is just 'z'
853
-
854
865
  var segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;
866
+
855
867
  var output = [];
856
868
  var segmentIndex = -1;
857
-
858
869
  for (var i = 0; i < segmented.length; i++) {
859
870
  // busy reading a segment - only terminate on '/'
860
871
  if (segmentIndex !== -1) {
@@ -862,30 +873,36 @@ html[data-toolbar-visible] #toolbar-trigger {
862
873
  output.push(segmented.slice(segmentIndex, i + 1));
863
874
  segmentIndex = -1;
864
875
  }
865
- } // new segment - check if it is relative
876
+ }
877
+
878
+ // new segment - check if it is relative
866
879
  else if (segmented[i] === '.') {
867
880
  // ../ segment
868
881
  if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {
869
882
  output.pop();
870
883
  i += 2;
871
- } // ./ segment
884
+ }
885
+ // ./ segment
872
886
  else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {
873
887
  i += 1;
874
- } else {
888
+ }
889
+ else {
875
890
  // the start of a new segment as below
876
891
  segmentIndex = i;
877
892
  }
878
- } // it is the start of a new segment
893
+ }
894
+ // it is the start of a new segment
879
895
  else {
880
896
  segmentIndex = i;
881
897
  }
882
- } // finish reading out the last segment
883
-
884
-
885
- if (segmentIndex !== -1) output.push(segmented.slice(segmentIndex));
898
+ }
899
+ // finish reading out the last segment
900
+ if (segmentIndex !== -1)
901
+ output.push(segmented.slice(segmentIndex));
886
902
  return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');
887
903
  }
888
904
  }
905
+
889
906
  /*
890
907
  * Import maps implementation
891
908
  *
@@ -894,78 +911,83 @@ html[data-toolbar-visible] #toolbar-trigger {
894
911
  *
895
912
  */
896
913
 
897
-
898
- function resolveUrl(relUrl, parentUrl) {
914
+ function resolveUrl (relUrl, parentUrl) {
899
915
  return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));
900
916
  }
901
917
 
902
- function resolveAndComposePackages(packages, outPackages, baseUrl, parentMap, parentUrl) {
918
+ function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) {
903
919
  for (var p in packages) {
904
920
  var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;
905
- var rhs = packages[p]; // package fallbacks not currently supported
906
-
907
- if (typeof rhs !== 'string') continue;
921
+ var rhs = packages[p];
922
+ // package fallbacks not currently supported
923
+ if (typeof rhs !== 'string')
924
+ continue;
908
925
  var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl);
909
-
910
926
  if (!mapped) {
911
927
  targetWarning('W1', p, rhs);
912
- } else outPackages[resolvedLhs] = mapped;
928
+ }
929
+ else
930
+ outPackages[resolvedLhs] = mapped;
913
931
  }
914
932
  }
915
933
 
916
- function resolveAndComposeImportMap(json, baseUrl, outMap) {
917
- if (json.imports) resolveAndComposePackages(json.imports, outMap.imports, baseUrl, outMap, null);
918
- var u;
934
+ function resolveAndComposeImportMap (json, baseUrl, outMap) {
935
+ if (json.imports)
936
+ resolveAndComposePackages(json.imports, outMap.imports, baseUrl, outMap, null);
919
937
 
938
+ var u;
920
939
  for (u in json.scopes || {}) {
921
940
  var resolvedScope = resolveUrl(u, baseUrl);
922
941
  resolveAndComposePackages(json.scopes[u], outMap.scopes[resolvedScope] || (outMap.scopes[resolvedScope] = {}), baseUrl, outMap, resolvedScope);
923
942
  }
924
943
 
925
- for (u in json.depcache || {}) outMap.depcache[resolveUrl(u, baseUrl)] = json.depcache[u];
944
+ for (u in json.depcache || {})
945
+ outMap.depcache[resolveUrl(u, baseUrl)] = json.depcache[u];
926
946
 
927
- for (u in json.integrity || {}) outMap.integrity[resolveUrl(u, baseUrl)] = json.integrity[u];
947
+ for (u in json.integrity || {})
948
+ outMap.integrity[resolveUrl(u, baseUrl)] = json.integrity[u];
928
949
  }
929
950
 
930
- function getMatch(path, matchObj) {
931
- if (matchObj[path]) return path;
951
+ function getMatch (path, matchObj) {
952
+ if (matchObj[path])
953
+ return path;
932
954
  var sepIndex = path.length;
933
-
934
955
  do {
935
956
  var segment = path.slice(0, sepIndex + 1);
936
- if (segment in matchObj) return segment;
937
- } while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1);
957
+ if (segment in matchObj)
958
+ return segment;
959
+ } while ((sepIndex = path.lastIndexOf('/', sepIndex - 1)) !== -1)
938
960
  }
939
961
 
940
- function applyPackages(id, packages) {
962
+ function applyPackages (id, packages) {
941
963
  var pkgName = getMatch(id, packages);
942
-
943
964
  if (pkgName) {
944
965
  var pkg = packages[pkgName];
945
966
  if (pkg === null) return;
946
-
947
967
  if (id.length > pkgName.length && pkg[pkg.length - 1] !== '/') {
948
968
  targetWarning('W2', pkgName, pkg);
949
- } else return pkg + id.slice(pkgName.length);
969
+ }
970
+ else
971
+ return pkg + id.slice(pkgName.length);
950
972
  }
951
973
  }
952
974
 
953
- function targetWarning(code, match, target, msg) {
954
- console.warn(errMsg(code, [target, match].join(', ')));
975
+ function targetWarning (code, match, target, msg) {
976
+ console.warn(errMsg(code, [target, match].join(', ') ));
955
977
  }
956
978
 
957
- function resolveImportMap(importMap, resolvedOrPlain, parentUrl) {
979
+ function resolveImportMap (importMap, resolvedOrPlain, parentUrl) {
958
980
  var scopes = importMap.scopes;
959
981
  var scopeUrl = parentUrl && getMatch(parentUrl, scopes);
960
-
961
982
  while (scopeUrl) {
962
983
  var packageResolution = applyPackages(resolvedOrPlain, scopes[scopeUrl]);
963
- if (packageResolution) return packageResolution;
984
+ if (packageResolution)
985
+ return packageResolution;
964
986
  scopeUrl = getMatch(scopeUrl.slice(0, scopeUrl.lastIndexOf('/')), scopes);
965
987
  }
966
-
967
988
  return applyPackages(resolvedOrPlain, importMap.imports) || resolvedOrPlain.indexOf(':') !== -1 && resolvedOrPlain;
968
989
  }
990
+
969
991
  /*
970
992
  * SystemJS Core
971
993
  *
@@ -983,11 +1005,10 @@ html[data-toolbar-visible] #toolbar-trigger {
983
1005
  * System.prototype.instantiate implementations
984
1006
  */
985
1007
 
986
-
987
1008
  var toStringTag = hasSymbol && Symbol.toStringTag;
988
1009
  var REGISTRY = hasSymbol ? Symbol() : '@';
989
1010
 
990
- function SystemJS() {
1011
+ function SystemJS () {
991
1012
  this[REGISTRY] = {};
992
1013
  }
993
1014
 
@@ -995,15 +1016,17 @@ html[data-toolbar-visible] #toolbar-trigger {
995
1016
 
996
1017
  systemJSPrototype.import = function (id, parentUrl) {
997
1018
  var loader = this;
998
- return Promise.resolve(loader.prepareImport()).then(function () {
1019
+ return Promise.resolve(loader.prepareImport())
1020
+ .then(function() {
999
1021
  return loader.resolve(id, parentUrl);
1000
- }).then(function (id) {
1022
+ })
1023
+ .then(function (id) {
1001
1024
  var load = getOrCreateLoad(loader, id);
1002
1025
  return load.C || topLevelLoad(loader, load);
1003
1026
  });
1004
- }; // Hookable createContext function -> allowing eg custom import meta
1005
-
1027
+ };
1006
1028
 
1029
+ // Hookable createContext function -> allowing eg custom import meta
1007
1030
  systemJSPrototype.createContext = function (parentId) {
1008
1031
  var loader = this;
1009
1032
  return {
@@ -1013,59 +1036,59 @@ html[data-toolbar-visible] #toolbar-trigger {
1013
1036
  }
1014
1037
  };
1015
1038
  };
1016
-
1017
- function loadToId(load) {
1039
+ function loadToId (load) {
1018
1040
  return load.id;
1019
1041
  }
1020
-
1021
- function triggerOnload(loader, load, err, isErrSource) {
1042
+ function triggerOnload (loader, load, err, isErrSource) {
1022
1043
  loader.onload(err, load.id, load.d && load.d.map(loadToId), !!isErrSource);
1023
- if (err) throw err;
1044
+ if (err)
1045
+ throw err;
1024
1046
  }
1025
1047
 
1026
1048
  var lastRegister;
1027
-
1028
1049
  systemJSPrototype.register = function (deps, declare) {
1029
1050
  lastRegister = [deps, declare];
1030
1051
  };
1052
+
1031
1053
  /*
1032
1054
  * getRegister provides the last anonymous System.register call
1033
1055
  */
1034
-
1035
-
1036
1056
  systemJSPrototype.getRegister = function () {
1037
1057
  var _lastRegister = lastRegister;
1038
1058
  lastRegister = undefined;
1039
1059
  return _lastRegister;
1040
1060
  };
1041
1061
 
1042
- function getOrCreateLoad(loader, id, firstParentUrl) {
1062
+ function getOrCreateLoad (loader, id, firstParentUrl) {
1043
1063
  var load = loader[REGISTRY][id];
1044
- if (load) return load;
1064
+ if (load)
1065
+ return load;
1066
+
1045
1067
  var importerSetters = [];
1046
1068
  var ns = Object.create(null);
1047
- if (toStringTag) Object.defineProperty(ns, toStringTag, {
1048
- value: 'Module'
1049
- });
1050
- var instantiatePromise = Promise.resolve().then(function () {
1051
- return loader.instantiate(id, firstParentUrl);
1052
- }).then(function (registration) {
1053
- if (!registration) throw Error(errMsg(2, id));
1069
+ if (toStringTag)
1070
+ Object.defineProperty(ns, toStringTag, { value: 'Module' });
1054
1071
 
1055
- function _export(name, value) {
1072
+ var instantiatePromise = Promise.resolve()
1073
+ .then(function () {
1074
+ return loader.instantiate(id, firstParentUrl);
1075
+ })
1076
+ .then(function (registration) {
1077
+ if (!registration)
1078
+ throw Error(errMsg(2, id ));
1079
+ function _export (name, value) {
1056
1080
  // note if we have hoisted exports (including reexports)
1057
1081
  load.h = true;
1058
1082
  var changed = false;
1059
-
1060
1083
  if (typeof name === 'string') {
1061
1084
  if (!(name in ns) || ns[name] !== value) {
1062
1085
  ns[name] = value;
1063
1086
  changed = true;
1064
1087
  }
1065
- } else {
1088
+ }
1089
+ else {
1066
1090
  for (var p in name) {
1067
1091
  var value = name[p];
1068
-
1069
1092
  if (!(p in ns) || ns[p] !== value) {
1070
1093
  ns[p] = value;
1071
1094
  changed = true;
@@ -1076,51 +1099,54 @@ html[data-toolbar-visible] #toolbar-trigger {
1076
1099
  ns.__esModule = name.__esModule;
1077
1100
  }
1078
1101
  }
1079
-
1080
- if (changed) for (var i = 0; i < importerSetters.length; i++) {
1081
- var setter = importerSetters[i];
1082
- if (setter) setter(ns);
1083
- }
1102
+ if (changed)
1103
+ for (var i = 0; i < importerSetters.length; i++) {
1104
+ var setter = importerSetters[i];
1105
+ if (setter) setter(ns);
1106
+ }
1084
1107
  return value;
1085
1108
  }
1086
-
1087
1109
  var declared = registration[1](_export, registration[1].length === 2 ? {
1088
1110
  import: function (importId) {
1089
1111
  return loader.import(importId, id);
1090
1112
  },
1091
1113
  meta: loader.createContext(id)
1092
1114
  } : undefined);
1093
-
1094
1115
  load.e = declared.execute || function () {};
1095
-
1096
1116
  return [registration[0], declared.setters || []];
1097
1117
  }, function (err) {
1098
1118
  load.e = null;
1099
1119
  load.er = err;
1100
1120
  throw err;
1101
1121
  });
1102
- var linkPromise = instantiatePromise.then(function (instantiation) {
1122
+
1123
+ var linkPromise = instantiatePromise
1124
+ .then(function (instantiation) {
1103
1125
  return Promise.all(instantiation[0].map(function (dep, i) {
1104
1126
  var setter = instantiation[1][i];
1105
- return Promise.resolve(loader.resolve(dep, id)).then(function (depId) {
1106
- var depLoad = getOrCreateLoad(loader, depId, id); // depLoad.I may be undefined for already-evaluated
1107
-
1108
- return Promise.resolve(depLoad.I).then(function () {
1127
+ return Promise.resolve(loader.resolve(dep, id))
1128
+ .then(function (depId) {
1129
+ var depLoad = getOrCreateLoad(loader, depId, id);
1130
+ // depLoad.I may be undefined for already-evaluated
1131
+ return Promise.resolve(depLoad.I)
1132
+ .then(function () {
1109
1133
  if (setter) {
1110
- depLoad.i.push(setter); // only run early setters when there are hoisted exports of that module
1134
+ depLoad.i.push(setter);
1135
+ // only run early setters when there are hoisted exports of that module
1111
1136
  // the timing works here as pending hoisted export calls will trigger through importerSetters
1112
-
1113
- if (depLoad.h || !depLoad.I) setter(depLoad.n);
1137
+ if (depLoad.h || !depLoad.I)
1138
+ setter(depLoad.n);
1114
1139
  }
1115
-
1116
1140
  return depLoad;
1117
1141
  });
1118
1142
  });
1119
- })).then(function (depLoads) {
1143
+ }))
1144
+ .then(function (depLoads) {
1120
1145
  load.d = depLoads;
1121
1146
  });
1122
- }); // Capital letter = a promise function
1147
+ });
1123
1148
 
1149
+ // Capital letter = a promise function
1124
1150
  return load = loader[REGISTRY][id] = {
1125
1151
  id: id,
1126
1152
  // importerSetters, the setters functions registered to this dependency
@@ -1128,93 +1154,111 @@ html[data-toolbar-visible] #toolbar-trigger {
1128
1154
  i: importerSetters,
1129
1155
  // module namespace object
1130
1156
  n: ns,
1157
+
1131
1158
  // instantiate
1132
1159
  I: instantiatePromise,
1133
1160
  // link
1134
1161
  L: linkPromise,
1135
1162
  // whether it has hoisted exports
1136
1163
  h: false,
1164
+
1137
1165
  // On instantiate completion we have populated:
1138
1166
  // dependency load records
1139
1167
  d: undefined,
1140
1168
  // execution function
1141
1169
  e: undefined,
1170
+
1142
1171
  // On execution we have populated:
1143
1172
  // the execution error if any
1144
1173
  er: undefined,
1145
1174
  // in the case of TLA, the execution promise
1146
1175
  E: undefined,
1176
+
1147
1177
  // On execution, L, I, E cleared
1178
+
1148
1179
  // Promise for top-level completion
1149
1180
  C: undefined,
1181
+
1150
1182
  // parent instantiator / executor
1151
1183
  p: undefined
1152
1184
  };
1153
1185
  }
1154
1186
 
1155
- function instantiateAll(loader, load, parent, loaded) {
1187
+ function instantiateAll (loader, load, parent, loaded) {
1156
1188
  if (!loaded[load.id]) {
1157
- loaded[load.id] = true; // load.L may be undefined for already-instantiated
1158
-
1159
- return Promise.resolve(load.L).then(function () {
1160
- if (!load.p || load.p.e === null) load.p = parent;
1189
+ loaded[load.id] = true;
1190
+ // load.L may be undefined for already-instantiated
1191
+ return Promise.resolve(load.L)
1192
+ .then(function () {
1193
+ if (!load.p || load.p.e === null)
1194
+ load.p = parent;
1161
1195
  return Promise.all(load.d.map(function (dep) {
1162
1196
  return instantiateAll(loader, dep, parent, loaded);
1163
1197
  }));
1164
- }).catch(function (err) {
1165
- if (load.er) throw err;
1198
+ })
1199
+ .catch(function (err) {
1200
+ if (load.er)
1201
+ throw err;
1166
1202
  load.e = null;
1167
1203
  throw err;
1168
1204
  });
1169
1205
  }
1170
1206
  }
1171
1207
 
1172
- function topLevelLoad(loader, load) {
1173
- return load.C = instantiateAll(loader, load, load, {}).then(function () {
1208
+ function topLevelLoad (loader, load) {
1209
+ return load.C = instantiateAll(loader, load, load, {})
1210
+ .then(function () {
1174
1211
  return postOrderExec(loader, load, {});
1175
- }).then(function () {
1212
+ })
1213
+ .then(function () {
1176
1214
  return load.n;
1177
1215
  });
1178
- } // the closest we can get to call(undefined)
1216
+ }
1179
1217
 
1218
+ // the closest we can get to call(undefined)
1219
+ var nullContext = Object.freeze(Object.create(null));
1180
1220
 
1181
- var nullContext = Object.freeze(Object.create(null)); // returns a promise if and only if a top-level await subgraph
1221
+ // returns a promise if and only if a top-level await subgraph
1182
1222
  // throws on sync errors
1183
-
1184
- function postOrderExec(loader, load, seen) {
1185
- if (seen[load.id]) return;
1223
+ function postOrderExec (loader, load, seen) {
1224
+ if (seen[load.id])
1225
+ return;
1186
1226
  seen[load.id] = true;
1187
1227
 
1188
1228
  if (!load.e) {
1189
- if (load.er) throw load.er;
1190
- if (load.E) return load.E;
1229
+ if (load.er)
1230
+ throw load.er;
1231
+ if (load.E)
1232
+ return load.E;
1191
1233
  return;
1192
- } // deps execute first, unless circular
1193
-
1234
+ }
1194
1235
 
1236
+ // deps execute first, unless circular
1195
1237
  var depLoadPromises;
1196
1238
  load.d.forEach(function (depLoad) {
1197
1239
  try {
1198
1240
  var depLoadPromise = postOrderExec(loader, depLoad, seen);
1199
- if (depLoadPromise) (depLoadPromises = depLoadPromises || []).push(depLoadPromise);
1200
- } catch (err) {
1241
+ if (depLoadPromise)
1242
+ (depLoadPromises = depLoadPromises || []).push(depLoadPromise);
1243
+ }
1244
+ catch (err) {
1201
1245
  load.e = null;
1202
1246
  load.er = err;
1203
1247
  throw err;
1204
1248
  }
1205
1249
  });
1206
- if (depLoadPromises) return Promise.all(depLoadPromises).then(doExec);
1250
+ if (depLoadPromises)
1251
+ return Promise.all(depLoadPromises).then(doExec);
1252
+
1207
1253
  return doExec();
1208
1254
 
1209
- function doExec() {
1255
+ function doExec () {
1210
1256
  try {
1211
1257
  var execPromise = load.e.call(nullContext);
1212
-
1213
1258
  if (execPromise) {
1214
1259
  execPromise = execPromise.then(function () {
1215
1260
  load.C = load.n;
1216
1261
  load.E = null; // indicates completion
1217
-
1218
1262
  if (!true) ;
1219
1263
  }, function (err) {
1220
1264
  load.er = err;
@@ -1223,59 +1267,55 @@ html[data-toolbar-visible] #toolbar-trigger {
1223
1267
  throw err;
1224
1268
  });
1225
1269
  return load.E = execPromise;
1226
- } // (should be a promise, but a minify optimization to leave out Promise.resolve)
1227
-
1228
-
1270
+ }
1271
+ // (should be a promise, but a minify optimization to leave out Promise.resolve)
1229
1272
  load.C = load.n;
1230
1273
  load.L = load.I = undefined;
1231
- } catch (err) {
1274
+ }
1275
+ catch (err) {
1232
1276
  load.er = err;
1233
1277
  throw err;
1234
- } finally {
1278
+ }
1279
+ finally {
1235
1280
  load.e = null;
1236
1281
  }
1237
1282
  }
1238
1283
  }
1239
1284
 
1240
1285
  envGlobal.System = new SystemJS();
1286
+
1241
1287
  /*
1242
1288
  * SystemJS browser attachments for script and import map processing
1243
1289
  */
1244
1290
 
1245
1291
  var importMapPromise = Promise.resolve();
1246
- var importMap = {
1247
- imports: {},
1248
- scopes: {},
1249
- depcache: {},
1250
- integrity: {}
1251
- }; // Scripts are processed immediately, on the first System.import, and on DOMReady.
1292
+ var importMap = { imports: {}, scopes: {}, depcache: {}, integrity: {} };
1293
+
1294
+ // Scripts are processed immediately, on the first System.import, and on DOMReady.
1252
1295
  // Import map scripts are processed only once (by being marked) and in order for each phase.
1253
1296
  // This is to avoid using DOM mutation observers in core, although that would be an alternative.
1254
-
1255
1297
  var processFirst = hasDocument;
1256
-
1257
1298
  systemJSPrototype.prepareImport = function (doProcessScripts) {
1258
1299
  if (processFirst || doProcessScripts) {
1259
1300
  processScripts();
1260
1301
  processFirst = false;
1261
1302
  }
1262
-
1263
1303
  return importMapPromise;
1264
1304
  };
1265
-
1266
1305
  if (hasDocument) {
1267
1306
  processScripts();
1268
1307
  window.addEventListener('DOMContentLoaded', processScripts);
1269
1308
  }
1270
1309
 
1271
- function processScripts() {
1310
+ function processScripts () {
1272
1311
  [].forEach.call(document.querySelectorAll('script'), function (script) {
1273
1312
  if (script.sp) // sp marker = systemjs processed
1274
- return; // TODO: deprecate systemjs-module in next major now that we have auto import
1275
-
1313
+ return;
1314
+ // TODO: deprecate systemjs-module in next major now that we have auto import
1276
1315
  if (script.type === 'systemjs-module') {
1277
1316
  script.sp = true;
1278
- if (!script.src) return;
1317
+ if (!script.src)
1318
+ return;
1279
1319
  System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl)).catch(function (e) {
1280
1320
  // if there is a script load error, dispatch an "error" event
1281
1321
  // on the script tag.
@@ -1284,24 +1324,21 @@ html[data-toolbar-visible] #toolbar-trigger {
1284
1324
  event.initEvent('error', false, false);
1285
1325
  script.dispatchEvent(event);
1286
1326
  }
1287
-
1288
1327
  return Promise.reject(e);
1289
1328
  });
1290
- } else if (script.type === 'systemjs-importmap') {
1329
+ }
1330
+ else if (script.type === 'systemjs-importmap') {
1291
1331
  script.sp = true;
1292
- var fetchPromise = script.src ? fetch(script.src, {
1293
- integrity: script.integrity
1294
- }).then(function (res) {
1295
- if (!res.ok) throw Error(res.status);
1332
+ var fetchPromise = script.src ? fetch(script.src, { integrity: script.integrity }).then(function (res) {
1333
+ if (!res.ok)
1334
+ throw Error( res.status );
1296
1335
  return res.text();
1297
1336
  }).catch(function (err) {
1298
- err.message = errMsg('W4', script.src) + '\n' + err.message;
1337
+ err.message = errMsg('W4', script.src ) + '\n' + err.message;
1299
1338
  console.warn(err);
1300
-
1301
1339
  if (typeof script.onerror === 'function') {
1302
- script.onerror();
1340
+ script.onerror();
1303
1341
  }
1304
-
1305
1342
  return '{}';
1306
1343
  }) : script.innerHTML;
1307
1344
  importMapPromise = importMapPromise.then(function () {
@@ -1313,22 +1350,20 @@ html[data-toolbar-visible] #toolbar-trigger {
1313
1350
  });
1314
1351
  }
1315
1352
 
1316
- function extendImportMap(importMap, newMapText, newMapUrl) {
1353
+ function extendImportMap (importMap, newMapText, newMapUrl) {
1317
1354
  var newMap = {};
1318
-
1319
1355
  try {
1320
1356
  newMap = JSON.parse(newMapText);
1321
1357
  } catch (err) {
1322
- console.warn(Error(errMsg('W5')));
1358
+ console.warn(Error(( errMsg('W5') )));
1323
1359
  }
1324
-
1325
1360
  resolveAndComposeImportMap(newMap, newMapUrl, importMap);
1326
1361
  }
1362
+
1327
1363
  /*
1328
1364
  * Script instantiation loading
1329
1365
  */
1330
1366
 
1331
-
1332
1367
  if (hasDocument) {
1333
1368
  window.addEventListener('error', function (evt) {
1334
1369
  lastWindowErrorUrl = evt.filename;
@@ -1339,79 +1374,79 @@ html[data-toolbar-visible] #toolbar-trigger {
1339
1374
 
1340
1375
  systemJSPrototype.createScript = function (url) {
1341
1376
  var script = document.createElement('script');
1342
- script.async = true; // Only add cross origin for actual cross origin
1377
+ script.async = true;
1378
+ // Only add cross origin for actual cross origin
1343
1379
  // this is because Safari triggers for all
1344
1380
  // - https://bugs.webkit.org/show_bug.cgi?id=171566
1345
-
1346
- if (url.indexOf(baseOrigin + '/')) script.crossOrigin = 'anonymous';
1381
+ if (url.indexOf(baseOrigin + '/'))
1382
+ script.crossOrigin = 'anonymous';
1347
1383
  var integrity = importMap.integrity[url];
1348
- if (integrity) script.integrity = integrity;
1384
+ if (integrity)
1385
+ script.integrity = integrity;
1349
1386
  script.src = url;
1350
1387
  return script;
1351
- }; // Auto imports -> script tags can be inlined directly for load phase
1352
-
1388
+ };
1353
1389
 
1390
+ // Auto imports -> script tags can be inlined directly for load phase
1354
1391
  var lastAutoImportDeps, lastAutoImportTimeout;
1355
1392
  var autoImportCandidates = {};
1356
1393
  var systemRegister = systemJSPrototype.register;
1357
1394
  var inlineScriptCount = 0;
1358
-
1359
1395
  systemJSPrototype.register = function (deps, declare, autoUrl) {
1360
1396
  if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {
1361
1397
  var scripts = document.querySelectorAll('script[src]');
1362
1398
  var lastScript = scripts[scripts.length - 1];
1363
- var lastAutoImportUrl;
1399
+ var lastAutoImportUrl
1364
1400
  lastAutoImportDeps = deps;
1365
-
1366
1401
  if (lastScript && lastScript.src) {
1367
1402
  lastAutoImportUrl = lastScript.src;
1368
- } else if (autoUrl) {
1369
- lastAutoImportUrl = autoUrl;
1370
- } else {
1371
- inlineScriptCount++;
1403
+ }
1404
+ else if (autoUrl) {
1405
+ lastAutoImportUrl = autoUrl
1406
+ }
1407
+ else {
1408
+ inlineScriptCount++
1372
1409
  lastAutoImportUrl = document.location.href + "__inline_script__" + inlineScriptCount;
1373
- } // if this is already a System load, then the instantiate has already begun
1410
+ }
1411
+ // if this is already a System load, then the instantiate has already begun
1374
1412
  // so this re-import has no consequence
1375
-
1376
-
1377
1413
  var loader = this;
1378
1414
  lastAutoImportTimeout = setTimeout(function () {
1379
1415
  autoImportCandidates[lastAutoImportUrl] = [deps, declare];
1380
1416
  loader.import(lastAutoImportUrl);
1381
1417
  });
1382
- } else {
1418
+ }
1419
+ else {
1383
1420
  lastAutoImportDeps = undefined;
1384
1421
  }
1385
-
1386
1422
  return systemRegister.call(this, deps, declare);
1387
1423
  };
1388
1424
 
1389
1425
  var lastWindowErrorUrl, lastWindowError;
1390
-
1391
1426
  systemJSPrototype.instantiate = function (url, firstParentUrl) {
1392
1427
  var autoImportRegistration = autoImportCandidates[url];
1393
-
1394
1428
  if (autoImportRegistration) {
1395
1429
  delete autoImportCandidates[url];
1396
1430
  return autoImportRegistration;
1397
1431
  }
1398
-
1399
1432
  var loader = this;
1400
1433
  return Promise.resolve(systemJSPrototype.createScript(url)).then(function (script) {
1401
1434
  return new Promise(function (resolve, reject) {
1402
1435
  script.addEventListener('error', function () {
1403
- reject(Error(errMsg(3, [url, firstParentUrl].join(', '))));
1436
+ reject(Error(errMsg(3, [url, firstParentUrl].join(', ') )));
1404
1437
  });
1405
1438
  script.addEventListener('load', function () {
1406
- document.head.removeChild(script); // Note that if an error occurs that isn't caught by this if statement,
1439
+ document.head.removeChild(script);
1440
+ // Note that if an error occurs that isn't caught by this if statement,
1407
1441
  // that getRegister will return null and a "did not instantiate" error will be thrown.
1408
-
1409
1442
  if (lastWindowErrorUrl === url) {
1410
1443
  reject(lastWindowError);
1411
- } else {
1412
- var register = loader.getRegister(url); // Clear any auto import registration for dynamic import scripts during load
1413
-
1414
- if (register && register[0] === lastAutoImportDeps) clearTimeout(lastAutoImportTimeout);
1444
+ }
1445
+ else {
1446
+ var register = loader.getRegister(url);
1447
+ // Clear any auto import registration for dynamic import scripts during load
1448
+ if (register && register[0] === lastAutoImportDeps)
1449
+ clearTimeout(lastAutoImportTimeout);
1415
1450
  resolve(register);
1416
1451
  }
1417
1452
  });
@@ -1419,31 +1454,35 @@ html[data-toolbar-visible] #toolbar-trigger {
1419
1454
  });
1420
1455
  });
1421
1456
  };
1457
+
1422
1458
  /*
1423
1459
  * Fetch loader, sets up shouldFetch and fetch hooks
1424
1460
  */
1425
-
1426
-
1427
1461
  systemJSPrototype.shouldFetch = function () {
1428
1462
  return false;
1429
1463
  };
1464
+ if (typeof fetch !== 'undefined')
1465
+ systemJSPrototype.fetch = fetch;
1430
1466
 
1431
- if (typeof fetch !== 'undefined') systemJSPrototype.fetch = fetch;
1432
1467
  var instantiate = systemJSPrototype.instantiate;
1433
1468
  var jsContentTypeRegEx = /^(text|application)\/(x-)?javascript(;|$)/;
1434
-
1435
1469
  systemJSPrototype.instantiate = function (url, parent) {
1436
1470
  var loader = this;
1437
- if (!this.shouldFetch(url)) return instantiate.apply(this, arguments);
1471
+ if (!this.shouldFetch(url))
1472
+ return instantiate.apply(this, arguments);
1438
1473
  return this.fetch(url, {
1439
1474
  credentials: 'same-origin',
1440
1475
  integrity: importMap.integrity[url]
1441
- }).then(function (res) {
1442
- if (!res.ok) throw Error(errMsg(7, [res.status, res.statusText, url, parent].join(', ')));
1476
+ })
1477
+ .then(function (res) {
1478
+ if (!res.ok)
1479
+ throw Error(errMsg(7, [res.status, res.statusText, url, parent].join(', ') ));
1443
1480
  var contentType = res.headers.get('content-type');
1444
- if (!contentType || !jsContentTypeRegEx.test(contentType)) throw Error(errMsg(4, contentType));
1481
+ if (!contentType || !jsContentTypeRegEx.test(contentType))
1482
+ throw Error(errMsg(4, contentType ));
1445
1483
  return res.text().then(function (source) {
1446
- if (source.indexOf('//# sourceURL=') < 0) source += '\n//# sourceURL=' + url;
1484
+ if (source.indexOf('//# sourceURL=') < 0)
1485
+ source += '\n//# sourceURL=' + url;
1447
1486
  (0, eval)(source);
1448
1487
  return loader.getRegister(url);
1449
1488
  });
@@ -1451,44 +1490,44 @@ html[data-toolbar-visible] #toolbar-trigger {
1451
1490
  };
1452
1491
 
1453
1492
  systemJSPrototype.resolve = function (id, parentUrl) {
1454
- parentUrl = parentUrl || !true || baseUrl;
1455
- return resolveImportMap(importMap, resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);
1493
+ parentUrl = parentUrl || !true || baseUrl;
1494
+ return resolveImportMap(( importMap), resolveIfNotPlainOrUrl(id, parentUrl) || id, parentUrl) || throwUnresolved(id, parentUrl);
1456
1495
  };
1457
1496
 
1458
- function throwUnresolved(id, parentUrl) {
1459
- throw Error(errMsg(8, [id, parentUrl].join(', ')));
1497
+ function throwUnresolved (id, parentUrl) {
1498
+ throw Error(errMsg(8, [id, parentUrl].join(', ') ));
1460
1499
  }
1461
1500
 
1462
1501
  var systemInstantiate = systemJSPrototype.instantiate;
1463
-
1464
1502
  systemJSPrototype.instantiate = function (url, firstParentUrl) {
1465
- var preloads = importMap.depcache[url];
1466
-
1503
+ var preloads = ( importMap).depcache[url];
1467
1504
  if (preloads) {
1468
- for (var i = 0; i < preloads.length; i++) getOrCreateLoad(this, this.resolve(preloads[i], url), url);
1505
+ for (var i = 0; i < preloads.length; i++)
1506
+ getOrCreateLoad(this, this.resolve(preloads[i], url), url);
1469
1507
  }
1470
-
1471
1508
  return systemInstantiate.call(this, url, firstParentUrl);
1472
1509
  };
1510
+
1473
1511
  /*
1474
1512
  * Supports loading System.register in workers
1475
1513
  */
1476
1514
 
1515
+ if (hasSelf && typeof importScripts === 'function')
1516
+ systemJSPrototype.instantiate = function (url) {
1517
+ var loader = this;
1518
+ return Promise.resolve().then(function () {
1519
+ importScripts(url);
1520
+ return loader.getRegister(url);
1521
+ });
1522
+ };
1477
1523
 
1478
- if (hasSelf && typeof importScripts === 'function') systemJSPrototype.instantiate = function (url) {
1479
- var loader = this;
1480
- return Promise.resolve().then(function () {
1481
- importScripts(url);
1482
- return loader.getRegister(url);
1483
- });
1484
- };
1485
- })();
1524
+ }());
1486
1525
 
1487
- (function () {
1526
+ (function(){
1488
1527
  var envGlobal = typeof self !== 'undefined' ? self : global;
1489
1528
  var System = envGlobal.System;
1490
1529
  var register = System.register;
1491
- var registerRegistry = Object.create(null);
1530
+ var registerRegistry = Object.create(null)
1492
1531
 
1493
1532
  System.register = function (name, deps, declare) {
1494
1533
  if (typeof name !== 'string') return register.apply(this, arguments);
@@ -1497,11 +1536,10 @@ html[data-toolbar-visible] #toolbar-trigger {
1497
1536
  var url = System.resolve(`./${name}`);
1498
1537
  registerRegistry[url] = define;
1499
1538
  return register.call(System, deps, declare, url);
1500
- });
1539
+ })
1501
1540
  };
1502
1541
 
1503
1542
  var instantiate = System.instantiate;
1504
-
1505
1543
  System.instantiate = function (url, firstParentUrl) {
1506
1544
  var result = registerRegistry[url];
1507
1545
 
@@ -1514,15 +1552,13 @@ html[data-toolbar-visible] #toolbar-trigger {
1514
1552
  };
1515
1553
 
1516
1554
  var getRegister = System.getRegister;
1517
-
1518
1555
  System.getRegister = function (url) {
1519
1556
  // Calling getRegister() because other extras need to know it was called so they can perform side effects
1520
1557
  var register = getRegister.call(this, url);
1521
1558
  var result = registerRegistry[url] || register;
1522
1559
  return result;
1523
1560
  };
1524
- })();
1525
- //# sourceMappingURL=assets/s.js-fcba0e35.map</script>
1561
+ }());</script>
1526
1562
  </head>
1527
1563
  <body>
1528
1564
  <div id="toolbar-overlay"></div>
@@ -1530,7 +1566,7 @@ html[data-toolbar-visible] #toolbar-trigger {
1530
1566
  <div id="toolbar">
1531
1567
  <div id="toolbar-wrapper">
1532
1568
  <section id="file-list-link" data-responsive-toolbar-element="">
1533
- <a class="toolbar-icon-wrapper" href="/">
1569
+ <a class="toolbar-icon-wrapper" href="javascript:void(0);">
1534
1570
  <svg id="fileIconSvg" class="iconToolbar" viewBox="0 0 24 24" width="35" height="35">
1535
1571
  <path d="M0 0h24v24H0V0z" fill="none"></path>
1536
1572
  <path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"></path>
@@ -1871,7 +1907,7 @@ html[data-toolbar-visible] #toolbar-trigger {
1871
1907
  <script type="systemjs-importmap">
1872
1908
  {
1873
1909
  "imports": {
1874
- "./toolbar.main.js": "./toolbar.main-320b0544.js"
1910
+ "./toolbar.main.js": "./toolbar.main-feac7fa3.js"
1875
1911
  }
1876
1912
  }</script>
1877
1913
  <script>
@@ -4624,6 +4660,10 @@ html[data-toolbar-visible] #toolbar-trigger {
4624
4660
  });
4625
4661
  }
4626
4662
 
4663
+ document.querySelector(".toolbar-icon-wrapper").onclick = function () {
4664
+ window.parent.location.href = "/";
4665
+ };
4666
+
4627
4667
  renderToolbarNotification();
4628
4668
  makeToolbarResponsive();
4629
4669
  renderToolbarSettings();
@@ -4819,7 +4859,7 @@ html[data-toolbar-visible] #toolbar-trigger {
4819
4859
  };
4820
4860
  }));
4821
4861
 
4822
- //# sourceMappingURL=toolbar.main-320b0544.js.map</script>
4862
+ //# sourceMappingURL=toolbar.main-feac7fa3.js.map</script>
4823
4863
 
4824
4864
 
4825
4865
  </body></html>