Comparing version 0.21.0 to 0.21.1
/* | ||
* SystemJS v0.21.0 Production | ||
*/ | ||
!function(){"use strict";function e(e){return G?Symbol():"@@"+e}function t(e,t){J||(t=t.replace(Y?/file:\/\/\//g:/file:\/\//g,""));var r,n=(e.message||e)+"\n "+t;r=Q&&e.fileName?new Error(n,e.fileName,e.lineNumber):new Error(n);var o=e.originalErr?e.originalErr.stack:e.stack;return r.stack=X?n+"\n "+o:o,r.originalErr=e.originalErr||e,r}function r(e,t){throw new RangeError('Unable to resolve "'+e+'" to '+t)}function n(e,t){e=e.trim();var n=t&&t.substr(0,t.indexOf(":")+1),o=e[0],i=e[1];if("/"===o&&"/"===i)return n||r(e,t),n+e;if("."===o&&("/"===i||"."===i&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===o){var s,a=!n||"/"!==t[n.length];if(a?(void 0===t&&r(e,t),s=t):s="/"===t[n.length+1]?"file:"!==n?(s=t.substr(n.length+2)).substr(s.indexOf("/")+1):t.substr(8):t.substr(n.length+1),"/"===o){if(!a)return t.substr(0,t.length-s.length-1)+e;r(e,t)}for(var u=s.substr(0,s.lastIndexOf("/")+1)+e,c=[],l=-1,f=0;f<u.length;f++)if(-1===l)if("."!==u[f])l=f;else{if("."!==u[f+1]||"/"!==u[f+2]&&f+2!==u.length){if("/"!==u[f+1]&&f+1!==u.length){l=f;continue}f+=1}else c.pop(),f+=2;a&&0===c.length&&r(e,t)}else"/"===u[f]&&(c.push(u.substring(l,f+1)),l=-1);return-1!==l&&c.push(u.substr(l)),t.substr(0,t.length-s.length)+c.join("")}return-1!==e.indexOf(":")?X&&":"===e[1]&&"\\"===e[2]&&e[0].match(/[a-z]/i)?"file:///"+e.replace(/\\/g,"/"):e:void 0}function o(e){if(e.values)return e.values();if("undefined"==typeof Symbol||!Symbol.iterator)throw new Error("Symbol.iterator not supported in this browser");var t={};return t[Symbol.iterator]=function(){var t=Object.keys(e),r=0;return{next:function(){return r<t.length?{value:e[t[r++]],done:!1}:{value:void 0,done:!0}}}},t}function i(){this.registry=new u}function s(e){if(!(e instanceof c))throw new TypeError("Module instantiation did not return a valid namespace object.");return e}function a(e){if(void 0===e)throw new RangeError("No resolution found.");return e}function u(){this[re]={}}function c(e){Object.defineProperty(this,ne,{value:e}),Object.keys(e).forEach(l,this)}function l(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[ne][e]}})}function f(){i.call(this);var e=this.registry.delete;this.registry.delete=function(r){var n=e.call(this,r);return t.hasOwnProperty(r)&&!t[r].linkRecord&&(delete t[r],n=!0),n};var t={};this[oe]={lastRegister:void 0,records:t},this.trace=!1}function d(e,t,r){return e.records[t]={key:t,registration:r,module:void 0,importerSetters:void 0,loadError:void 0,evalError:void 0,linkRecord:{instantiatePromise:void 0,dependencies:void 0,execute:void 0,executingRequire:!1,moduleObj:void 0,setters:void 0,depsInstantiatePromise:void 0,dependencyInstantiations:void 0}}}function p(e,t,r,n,o){var i=n[t];if(i)return Promise.resolve(i);var s=o.records[t];return s&&!s.module?s.loadError?Promise.reject(s.loadError):v(e,s,s.linkRecord,n,o):e.resolve(t,r).then(function(t){if(i=n[t])return i;if((s=o.records[t])&&!s.module||(s=d(o,t,s&&s.registration)),s.loadError)return Promise.reject(s.loadError);var r=s.linkRecord;return r?v(e,s,r,n,o):s})}function h(e,t,r){return function(){var e=r.lastRegister;return e?(r.lastRegister=void 0,t.registration=e,!0):!!t.registration}}function v(e,r,n,o,i){return n.instantiatePromise||(n.instantiatePromise=(r.registration?Promise.resolve():Promise.resolve().then(function(){return i.lastRegister=void 0,e[ie](r.key,e[ie].length>1&&h(e,r,i))})).then(function(t){if(void 0!==t){if(!(t instanceof c))throw new TypeError("Instantiate did not return a valid Module object.");return delete i.records[r.key],e.trace&&m(e,r,n),o[r.key]=t}var s=r.registration;if(r.registration=void 0,!s)throw new TypeError("Module instantiation did not call an anonymous or correctly named System.register.");return n.dependencies=s[0],r.importerSetters=[],n.moduleObj={},s[2]?(n.moduleObj.default=n.moduleObj.__useDefault={},n.executingRequire=s[1],n.execute=s[2]):g(e,r,n,s[1]),r}).catch(function(e){throw r.linkRecord=void 0,r.loadError=r.loadError||t(e,"Instantiating "+r.key)}))}function y(e,t,r,n,o,i){return e.resolve(t,r).then(function(r){i&&(i[t]=r);var s=o.records[r],a=n[r];if(a&&(!s||s.module&&a!==s.module))return a;if(s&&s.loadError)throw s.loadError;(!s||!a&&s.module)&&(s=d(o,r,s&&s.registration));var u=s.linkRecord;return u?v(e,s,u,n,o):s})}function m(e,t,r){e.loads=e.loads||{},e.loads[t.key]={key:t.key,deps:r.dependencies,dynamicDeps:[],depMap:r.depMap||{}}}function g(e,t,r,n){var o=r.moduleObj,i=t.importerSetters,s=!1,a=n.call(Z,function(e,t){if("object"==typeof e){var r=!1;for(var n in e)t=e[n],"__useDefault"===n||n in o&&o[n]===t||(r=!0,o[n]=t);if(!1===r)return t}else{if((s||e in o)&&o[e]===t)return t;o[e]=t}for(var a=0;a<i.length;a++)i[a](o);return t},new O(e,t.key));r.setters=a.setters,r.execute=a.execute,a.exports&&(r.moduleObj=o=a.exports,s=!0)}function b(e,r,n,o,i){if(n.depsInstantiatePromise)return n.depsInstantiatePromise;for(var s=Array(n.dependencies.length),a=0;a<n.dependencies.length;a++)s[a]=y(e,n.dependencies[a],r.key,o,i,e.trace&&n.depMap||(n.depMap={}));var u=Promise.all(s).then(function(e){if(n.dependencyInstantiations=e,n.setters)for(var t=0;t<e.length;t++){var o=n.setters[t];if(o){var i=e[t];if(i instanceof c)o(i);else{if(i.loadError)throw i.loadError;o(i.module||i.linkRecord.moduleObj),i.importerSetters&&i.importerSetters.push(o)}}}return r});return e.trace&&(u=u.then(function(){return m(e,r,n),r})),(u=u.catch(function(e){throw n.depsInstantiatePromise=void 0,t(e,"Loading "+r.key)})).catch(function(){}),n.depsInstantiatePromise=u}function w(e,t,r,n,o){return new Promise(function(r,i){function s(t){var r=t.linkRecord;r&&-1===u.indexOf(t)&&(u.push(t),l++,b(e,t,r,n,o).then(a,i))}function a(e){l--;var t=e.linkRecord;if(t)for(var n=0;n<t.dependencies.length;n++){var o=t.dependencyInstantiations[n];o instanceof c||s(o)}0===l&&r()}var u=[],l=0;s(t)})}function O(e,t){this.loader=e,this.key=this.id=t,this.meta={url:t}}function E(e,t,r,n,o,i){if(t.module)return t.module;if(t.evalError)throw t.evalError;if(i&&-1!==i.indexOf(t))return t.linkRecord.moduleObj;var s=k(e,t,r,n,o,r.setters?[]:i||[]);if(s)throw s;return t.module}function S(e,t,r,n,o,i,s){return function(a){for(var u=0;u<r.length;u++)if(r[u]===a){var l,f=n[u];return"__useDefault"in(l=f instanceof c?f:E(e,f,f.linkRecord,o,i,s))?l.__useDefault:l}throw new Error("Module "+a+" not declared as a System.registerDynamic dependency of "+t)}}function k(e,r,n,o,i,s){s.push(r);var a;if(n.setters)for(var u,l,f=0;f<n.dependencies.length;f++)if(!((u=n.dependencyInstantiations[f])instanceof c)&&((l=u.linkRecord)&&-1===s.indexOf(u)&&(a=u.evalError?u.evalError:k(e,u,l,o,i,l.setters?s:[])),a))return r.linkRecord=void 0,r.evalError=t(a,"Evaluating "+r.key),r.evalError;if(n.execute)if(n.setters)a=j(n.execute);else{var d={id:r.key},p=n.moduleObj;Object.defineProperty(d,"exports",{configurable:!0,set:function(e){p.default=p.__useDefault=e},get:function(){return p.__useDefault}});var h=S(e,r.key,n.dependencies,n.dependencyInstantiations,o,i,s);if(!n.executingRequire)for(f=0;f<n.dependencies.length;f++)h(n.dependencies[f]);a=R(n.execute,h,p.default,d),d.exports!==p.__useDefault&&(p.default=p.__useDefault=d.exports);var v=p.default;if(v&&v.__esModule)for(var y in v)Object.hasOwnProperty.call(v,y)&&(p[y]=v[y])}if(r.linkRecord=void 0,a)return r.evalError=t(a,"Evaluating "+r.key);if(o[r.key]=r.module=new c(n.moduleObj),!n.setters){if(r.importerSetters)for(f=0;f<r.importerSetters.length;f++)r.importerSetters[f](r.module);r.importerSetters=void 0}}function j(e){try{e.call(se)}catch(e){return e}}function R(e,t,r,n){try{var o=e.call(Z,t,r,n);void 0!==o&&(n.exports=o)}catch(e){return e}}function x(){}function P(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function _(e){if(pe||he){var t=document.createElement("link");pe?(t.rel="preload",t.as="script"):t.rel="prefetch",t.href=e,document.head.appendChild(t)}else(new Image).src=e}function I(e,t,r){try{importScripts(e)}catch(e){r(e)}t()}function D(e,t,r,n,o){function i(){n(),a()}function s(t){a(),o(new Error("Fetching "+e))}function a(){u.removeEventListener("load",i,!1),u.removeEventListener("error",s,!1),document.head.removeChild(u)}if(e=e.replace(/#/g,"%23"),de)return I(e,n,o);var u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,t&&(u.crossOrigin=t),r&&(u.integrity=r),u.addEventListener("load",i,!1),u.addEventListener("error",s,!1),u.src=e,document.head.appendChild(u)}function L(e,t,r){var o=M(t,r);if(o){var i=t[o]+r.substr(o.length),s=n(i,$);return void 0!==s?s:e+i}return-1!==r.indexOf(":")?r:e+r}function U(e){var t=this.name;if(t.substr(0,e.length)===e&&(t.length===e.length||"/"===t[e.length]||"/"===e[e.length-1]||":"===e[e.length-1])){var r=e.split("/").length;r>this.len&&(this.match=e,this.len=r)}}function M(e,t){if(Object.hasOwnProperty.call(e,t))return t;var r={name:t,match:void 0,len:0};return Object.keys(e).forEach(U,r),r.match}function T(e){function t(r,n,o,i){if("object"==typeof r&&!(r instanceof Array))return t.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof r&&"function"==typeof n&&(r=[r]),!(r instanceof Array)){if("string"==typeof r){var s=e.decanonicalize(r,i),a=e.get(s);if(!a)throw new Error('Module not already loaded loading "'+r+'" as '+s+(i?' from "'+i+'".':"."));return"__useDefault"in a?a.__useDefault:a}throw new TypeError("Invalid require")}for(var u=[],c=0;c<r.length;c++)u.push(e.import(r[c],i));Promise.all(u).then(function(e){n&&n.apply(null,e)},o)}function r(r,n,o){function i(r,i,c){for(var l=[],f=0;f<n.length;f++)l.push(r(n[f]));if(c.uri=c.id,c.config=x,-1!==u&&l.splice(u,0,c),-1!==a&&l.splice(a,0,i),-1!==s){var d=function(n,o,i){return"string"==typeof n&&"function"!=typeof o?r(n):t.call(e,n,o,i,c.id)};d.toUrl=function(t){return e.normalizeSync(t,c.id)},l.splice(s,0,d)}var p=Z.require;Z.require=t;var h=o.apply(-1===a?Z:i,l);Z.require=p,void 0!==h&&(c.exports=h)}"string"!=typeof r&&(o=n,n=r,r=null),n instanceof Array||(n=["require","exports","module"].splice(0,(o=n).length)),"function"!=typeof o&&(o=function(e){return function(){return e}}(o)),r||me&&(n=n.concat(me),me=void 0);var s,a,u;-1!==(s=n.indexOf("require"))&&(n.splice(s,1),r||(n=n.concat(q(o.toString(),s)))),-1!==(a=n.indexOf("exports"))&&n.splice(a,1),-1!==(u=n.indexOf("module"))&&n.splice(u,1),r?(e.registerDynamic(r,n,!1,i),ye?(ye=void 0,je=!0):je||(ye=[n,i])):e.registerDynamic(n,!1,Re?z(i):i)}r.amd={},e.amdDefine=r,e.amdRequire=t}function C(e){if(-1===be.indexOf(e)){try{var t=Z[e]}catch(t){be.push(e)}this(e,t)}}function q(e,t){var r=((e=e.replace(ge,"")).match(Ee)[1].split(",")[t]||"require").replace(Se,""),n=ke[r]||(ke[r]=new RegExp(we+r+Oe,"g"));n.lastIndex=0;for(var o,i=[];o=n.exec(e);)i.push(o[2]||o[3]);return i}function z(e){return function(t,r,n){e(t,r,n),"object"!=typeof(r=n.exports)&&"function"!=typeof r||"__esModule"in r||Object.defineProperty(n.exports,"__esModule",{value:!0})}}function N(e){ye?e.registerDynamic(me?ye[0].concat(me):ye[0],!1,Re?z(ye[1]):ye[1]):je&&e.registerDynamic([],!1,x)}function A(){f.call(this),this[ce]={baseURL:$,paths:{},map:{},submap:{},depCache:{}},T(this),J&&(Z.define=this.amdDefine)}function F(e,t,r){return Pe={},Object.keys(Z).forEach(C,function(e,t){Pe[e]=t}),new Promise(function(n,o){return D(t,"anonymous",void 0,function(){var t=r();t||(N(e),(t=r())||(e.registerDynamic([],!1,function(){return B()}),r())),n()},o)})}function B(){var e,t={__esModule:!0},r=!1;return Object.keys(Z).forEach(C,function(n,o){Pe[n]!==o&&void 0!==o&&(t[n]=o,void 0!==e?r||e===o||(r=!0):e=o)}),Pe=void 0,r?t:e}var $,J="undefined"!=typeof window&&"undefined"!=typeof document,X="undefined"!=typeof process&&process.versions&&process.versions.node,Y="undefined"!=typeof process&&"string"==typeof process.platform&&process.platform.match(/^win/),Z="undefined"!=typeof self?self:global,G="undefined"!=typeof Symbol;if("undefined"!=typeof document&&document.getElementsByTagName){if(!($=document.baseURI)){var H=document.getElementsByTagName("base");$=H[0]&&H[0].href||window.location.href}}else"undefined"!=typeof location&&($=location.href);if($){var K=($=$.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==K&&($=$.substr(0,K+1))}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");$="file://"+(Y?"/":"")+process.cwd(),Y&&($=$.replace(/\\/g,"/"))}"/"!==$[$.length-1]&&($+="/");var Q="_"==new Error(0,"_").fileName,V=Promise.resolve();i.prototype.constructor=i,i.prototype.import=function(e,r){if("string"!=typeof e)throw new TypeError("Loader import method must be passed a module key string");var n=this;return V.then(function(){return n[ee](e,r)}).then(s).catch(function(n){throw t(n,"Loading "+e+(r?" from "+r:""))})};var W=i.resolve=e("resolve"),ee=i.resolveInstantiate=e("resolveInstantiate");i.prototype[ee]=function(e,t){var r=this;return r.resolve(e,t).then(function(e){return r.registry.get(e)})},i.prototype.resolve=function(e,r){var n=this;return V.then(function(){return n[W](e,r)}).then(a).catch(function(n){throw t(n,"Resolving "+e+(r?" to "+r:""))})};var te="undefined"!=typeof Symbol&&Symbol.iterator,re=e("registry");te&&(u.prototype[Symbol.iterator]=function(){return this.entries()[Symbol.iterator]()},u.prototype.entries=function(){var e=this[re];return o(Object.keys(e).map(function(t){return[t,e[t]]}))}),u.prototype.keys=function(){return o(Object.keys(this[re]))},u.prototype.values=function(){var e=this[re];return o(Object.keys(e).map(function(t){return e[t]}))},u.prototype.get=function(e){return this[re][e]},u.prototype.set=function(e,t){if(!(t instanceof c))throw new Error("Registry must be set with an instance of Module Namespace");return this[re][e]=t,this},u.prototype.has=function(e){return Object.hasOwnProperty.call(this[re],e)},u.prototype.delete=function(e){return!!Object.hasOwnProperty.call(this[re],e)&&(delete this[re][e],!0)};var ne=e("baseObject");c.prototype=Object.create(null),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(c.prototype,Symbol.toStringTag,{value:"Module"});var oe=e("register-internal");f.prototype=Object.create(i.prototype),f.prototype.constructor=f;var ie=f.instantiate=e("instantiate");f.prototype[f.resolve=i.resolve]=function(e,t){return n(e,t||$)},f.prototype[ie]=function(e,t){},f.prototype[i.resolveInstantiate]=function(e,t){var r=this,n=this[oe],o=this.registry[re];return p(r,e,t,o,n).then(function(e){if(e instanceof c)return e;var t=e.linkRecord;if(!t){if(e.module)return e.module;throw e.evalError}return w(r,e,0,o,n).then(function(){return E(r,e,t,o,n,void 0)})})},f.prototype.register=function(e,t,r){var n=this[oe];void 0===r?n.lastRegister=[e,t,void 0]:(n.records[e]||d(n,e,void 0)).registration=[t,r,void 0]},f.prototype.registerDynamic=function(e,t,r,n){var o=this[oe];"string"!=typeof e?o.lastRegister=[e,t,r]:(o.records[e]||d(o,e,void 0)).registration=[t,r,n]},O.prototype.import=function(e){return this.loader.trace&&this.loader.loads[this.key].dynamicDeps.push(e),this.loader.import(e,this.key)};var se={};Object.freeze&&Object.freeze(se);var ae,ue=Promise.resolve(),ce=(new c({}),e("loader-config")),le=e("plain-resolve"),fe=e("plain-resolve-sync"),de="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,pe=!1,he=!1;if(J&&function(){var e=document.createElement("link").relList;if(e&&e.supports){he=!0;try{pe=e.supports("preload")}catch(e){}}}(),J){var ve=window.onerror;window.onerror=function(e,t){ve&&ve.apply(this,arguments)}}"undefined"!=typeof window&&"undefined"!=typeof document&&window.location&&(location.protocol,location.hostname,location.port&&location.port);var ye,me,ge=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,be=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"],we="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",Oe="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",Ee=/\(([^\)]*)\)/,Se=/^\s+|\s+$/g,ke={},je=!1,Re=!1;A.plainResolve=le,A.plainResolveSync=fe;var xe=A.prototype=Object.create(f.prototype);xe.constructor=A,xe[A.resolve=f.resolve]=function(e,t){var r=n(e,t||$);if(void 0!==r)return Promise.resolve(r);var o=this;return ue.then(function(){return o[le](e,t)}).then(function(t){if(t=t||e,o.registry.has(t))return t;var r=o[ce];return L(r.baseURL,r.paths,t)})},xe.newModule=function(e){return new c(e)},xe.isModule=function(e){return void 0===ae&&(ae="undefined"!=typeof Symbol&&!!Symbol.toStringTag),e instanceof c||ae&&"[object Module]"==Object.prototype.toString.call(e)},xe.resolveSync=function(e,t){var r=n(e,t||$);if(void 0!==r)return r;if(r=this[fe](e,t)||e,this.registry.has(r))return r;var o=this[ce];return L(o.baseURL,o.paths,r)},xe[le]=xe[fe]=function(e,t){var r=this[ce];if(t){var o=M(r.submap,t),i=r.submap[o];if(a=i&&M(i,e))return n(u=i[a]+e.substr(a.length),o)||u}var s=r.map,a=M(s,e);if(a){var u=s[a]+e.substr(a.length);return n(u,t||r.baseURL)||u}},xe[A.instantiate=f.instantiate]=function(e,t){var r=this[ce].depCache[e];if(r)for(var n=0;n<r.length;n++)this.resolve(r[n],e).then(_);return F(this,e,t)},xe.config=function(e){var t=this[ce];if(e.baseURL&&(t.baseURL=n(e.baseURL,$)||n("./"+e.baseURL,$),"/"!==t.baseURL[t.baseURL.length-1]&&(t.baseURL+="/")),e.paths&&P(t.paths,e.paths),e.map){i=e.map;for(var r in i)if(Object.hasOwnProperty.call(i,r)){var o=i[r];if("string"==typeof o)t.map[r]=o;else{s=n(r,$)||L(t.baseURL,t.paths,r);P(t.submap[s]||(t.submap[s]={}),o)}}}for(var r in e)if(Object.hasOwnProperty.call(e,r)){var i=e[r];switch(r){case"baseURL":case"paths":case"map":break;case"depCache":for(var r in i)if(Object.hasOwnProperty.call(i,r)){var s=this.resolveSync(r,void 0);t.depCache[s]=(t.depCache[s]||[]).concat(i[r])}break;default:throw new TypeError('The SystemJS production build does not support the "'+r+'" configuration option.')}}},xe.getConfig=function(e){var t=this[ce],r={};P(r,t.map);for(var n in t.submap)Object.hasOwnProperty.call(t.submap,n)&&(r[n]=P({},t.submap[n]));var o={};for(var n in t.depCache)Object.hasOwnProperty.call(t.depCache,n)&&(o[n]=[].concat(t.depCache[n]));return{baseURL:t.baseURL,paths:P({},t.paths),depCache:o,map:r}},xe.register=function(e,t,r){return"string"==typeof e&&(e=this.resolveSync(e,void 0)),f.prototype.register.call(this,e,t,r)},xe.registerDynamic=function(e,t,r,n){return"string"==typeof e&&(e=this.resolveSync(e,void 0)),f.prototype.registerDynamic.call(this,e,t,r,n)};var Pe;A.prototype.version="0.21.0 Production";var _e=new A;if(J||de)if(Z.SystemJS=_e,Z.System){var Ie=Z.System.register;Z.System.register=function(){Ie&&Ie.apply(this,arguments),_e.register.apply(_e,arguments)}}else Z.System=_e;"undefined"!=typeof module&&module.exports&&(module.exports=_e)}(); | ||
* SystemJS v0.21.1 Production | ||
*/ | ||
!function(){"use strict";var isBrowser="undefined"!=typeof window&&"undefined"!=typeof document,isNode="undefined"!=typeof process&&process.versions&&process.versions.node,isWindows="undefined"!=typeof process&&"string"==typeof process.platform&&process.platform.match(/^win/),envGlobal="undefined"!=typeof self?self:global,hasSymbol="undefined"!=typeof Symbol,baseURI;function createSymbol(e){return hasSymbol?Symbol():"@@"+e}if("undefined"!=typeof document&&document.getElementsByTagName){if(baseURI=document.baseURI,!baseURI){var bases=document.getElementsByTagName("base");baseURI=bases[0]&&bases[0].href||window.location.href}}else"undefined"!=typeof location&&(baseURI=location.href);if(baseURI){baseURI=baseURI.split("#")[0].split("?")[0];var slashIndex=baseURI.lastIndexOf("/");-1!==slashIndex&&(baseURI=baseURI.substr(0,slashIndex+1))}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");baseURI="file://"+(isWindows?"/":"")+process.cwd(),isWindows&&(baseURI=baseURI.replace(/\\/g,"/"))}"/"!==baseURI[baseURI.length-1]&&(baseURI+="/");var errArgs="_"==new Error(0,"_").fileName;function LoaderError__Check_error_message_for_loader_stack(e,r){isBrowser||(r=r.replace(isWindows?/file:\/\/\//g:/file:\/\//g,""));var t,o=(e.message||e)+"\n "+r;t=errArgs&&e.fileName?new Error(o,e.fileName,e.lineNumber):new Error(o);var n=e.originalErr?e.originalErr.stack:e.stack;return t.stack=isNode?o+"\n "+n:n,t.originalErr=e.originalErr||e,t}function throwResolveError(e,r){throw new RangeError('Unable to resolve "'+e+'" to '+r)}function resolveIfNotPlain(e,r){e=e.trim();var t=r&&r.substr(0,r.indexOf(":")+1),o=e[0],n=e[1];if("/"===o&&"/"===n)return t||throwResolveError(e,r),t+e;if("."===o&&("/"===n||"."===n&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===o){var a,s=!t||"/"!==r[t.length];if(s?(void 0===r&&throwResolveError(e,r),a=r):a="/"===r[t.length+1]?"file:"!==t?(a=r.substr(t.length+2)).substr(a.indexOf("/")+1):r.substr(8):r.substr(t.length+1),"/"===o){if(!s)return r.substr(0,r.length-a.length-1)+e;throwResolveError(e,r)}for(var i=a.substr(0,a.lastIndexOf("/")+1)+e,l=[],c=-1,u=0;u<i.length;u++)if(-1===c)if("."!==i[u])c=u;else{if("."!==i[u+1]||"/"!==i[u+2]&&u+2!==i.length){if("/"!==i[u+1]&&u+1!==i.length){c=u;continue}u+=1}else l.pop(),u+=2;s&&0===l.length&&throwResolveError(e,r)}else"/"===i[u]&&(l.push(i.substring(c,u+1)),c=-1);return-1!==c&&l.push(i.substr(c)),r.substr(0,r.length-a.length)+l.join("")}return-1!==e.indexOf(":")?isNode&&":"===e[1]&&"\\"===e[2]&&e[0].match(/[a-z]/i)?"file:///"+e.replace(/\\/g,"/"):e:void 0}var resolvedPromise=Promise.resolve();function arrayValues(t){if(t.values)return t.values();if("undefined"==typeof Symbol||!Symbol.iterator)throw new Error("Symbol.iterator not supported in this browser");var e={};return e[Symbol.iterator]=function(){var e=Object.keys(t),r=0;return{next:function(){return r<e.length?{value:t[e[r++]],done:!1}:{value:void 0,done:!0}}}},e}function Loader(){this.registry=new Registry}function ensureInstantiated(e){if(!(e instanceof ModuleNamespace))throw new TypeError("Module instantiation did not return a valid namespace object.");return e}Loader.prototype.constructor=Loader,Loader.prototype.import=function(r,t){if("string"!=typeof r)throw new TypeError("Loader import method must be passed a module key string");var e=this;return resolvedPromise.then(function(){return e[RESOLVE_INSTANTIATE](r,t)}).then(ensureInstantiated).catch(function(e){throw LoaderError__Check_error_message_for_loader_stack(e,"Loading "+r+(t?" from "+t:""))})};var RESOLVE=Loader.resolve=createSymbol("resolve"),RESOLVE_INSTANTIATE=Loader.resolveInstantiate=createSymbol("resolveInstantiate");function ensureResolution(e){if(void 0===e)throw new RangeError("No resolution found.");return e}Loader.prototype[RESOLVE_INSTANTIATE]=function(e,r){var t=this;return t.resolve(e,r).then(function(e){return t.registry.get(e)})},Loader.prototype.resolve=function(r,t){var e=this;return resolvedPromise.then(function(){return e[RESOLVE](r,t)}).then(ensureResolution).catch(function(e){throw LoaderError__Check_error_message_for_loader_stack(e,"Resolving "+r+(t?" to "+t:""))})};var iteratorSupport="undefined"!=typeof Symbol&&Symbol.iterator,REGISTRY=createSymbol("registry");function Registry(){this[REGISTRY]={}}iteratorSupport&&(Registry.prototype[Symbol.iterator]=function(){return this.entries()[Symbol.iterator]()},Registry.prototype.entries=function(){var r=this[REGISTRY];return arrayValues(Object.keys(r).map(function(e){return[e,r[e]]}))}),Registry.prototype.keys=function(){return arrayValues(Object.keys(this[REGISTRY]))},Registry.prototype.values=function(){var r=this[REGISTRY];return arrayValues(Object.keys(r).map(function(e){return r[e]}))},Registry.prototype.get=function(e){return this[REGISTRY][e]},Registry.prototype.set=function(e,r){if(!(r instanceof ModuleNamespace))throw new Error("Registry must be set with an instance of Module Namespace");return this[REGISTRY][e]=r,this},Registry.prototype.has=function(e){return Object.hasOwnProperty.call(this[REGISTRY],e)},Registry.prototype.delete=function(e){return!!Object.hasOwnProperty.call(this[REGISTRY],e)&&(delete this[REGISTRY][e],!0)};var BASE_OBJECT=createSymbol("baseObject");function ModuleNamespace(e){Object.defineProperty(this,BASE_OBJECT,{value:e}),Object.keys(e).forEach(extendNamespace,this)}function extendNamespace(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[BASE_OBJECT][e]}})}ModuleNamespace.prototype=Object.create(null),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(ModuleNamespace.prototype,Symbol.toStringTag,{value:"Module"});var REGISTER_INTERNAL=createSymbol("register-internal");function RegisterLoader(){Loader.call(this);var t=this.registry.delete;this.registry.delete=function(e){var r=t.call(this,e);return o.hasOwnProperty(e)&&!o[e].linkRecord&&(delete o[e],r=!0),r};var o={};this[REGISTER_INTERNAL]={lastRegister:void 0,records:o},this.trace=!1}RegisterLoader.prototype=Object.create(Loader.prototype),RegisterLoader.prototype.constructor=RegisterLoader;var INSTANTIATE=RegisterLoader.instantiate=createSymbol("instantiate");function createLoadRecord(e,r,t){return e.records[r]={key:r,registration:t,module:void 0,importerSetters:void 0,loadError:void 0,evalError:void 0,linkRecord:{instantiatePromise:void 0,dependencies:void 0,execute:void 0,executingRequire:!1,moduleObj:void 0,setters:void 0,depsInstantiatePromise:void 0,dependencyInstantiations:void 0}}}function resolveInstantiate(t,e,r,o,n){var a=o[e];if(a)return Promise.resolve(a);var s=n.records[e];return s&&!s.module?s.loadError?Promise.reject(s.loadError):instantiate(t,s,s.linkRecord,o,n):t.resolve(e,r).then(function(e){if(a=o[e])return a;if((s=n.records[e])&&!s.module||(s=createLoadRecord(n,e,s&&s.registration)),s.loadError)return Promise.reject(s.loadError);var r=s.linkRecord;return r?instantiate(t,s,r,o,n):s})}function createProcessAnonRegister(e,r,t){return function(){var e=t.lastRegister;return e?(t.lastRegister=void 0,r.registration=e,!0):!!r.registration}}function instantiate(t,o,n,a,s){return n.instantiatePromise||(n.instantiatePromise=(o.registration?Promise.resolve():Promise.resolve().then(function(){return s.lastRegister=void 0,t[INSTANTIATE](o.key,1<t[INSTANTIATE].length&&createProcessAnonRegister(t,o,s))})).then(function(e){if(void 0!==e){if(!(e instanceof ModuleNamespace))throw new TypeError("Instantiate did not return a valid Module object.");return delete s.records[o.key],t.trace&&traceLoad(t,o,n),a[o.key]=e}var r=o.registration;if(o.registration=void 0,!r)throw new TypeError("Module instantiation did not call an anonymous or correctly named System.register.");return n.dependencies=r[0],o.importerSetters=[],n.moduleObj={},r[2]?(n.moduleObj.default=n.moduleObj.__useDefault={},n.executingRequire=r[1],n.execute=r[2]):registerDeclarative(t,o,n,r[1]),o}).catch(function(e){throw o.linkRecord=void 0,o.loadError=o.loadError||LoaderError__Check_error_message_for_loader_stack(e,"Instantiating "+o.key)}))}function resolveInstantiateDep(n,a,e,s,i,l){return n.resolve(a,e).then(function(e){l&&(l[a]=e);var r=i.records[e],t=s[e];if(t&&(!r||r.module&&t!==r.module))return t;if(r&&r.loadError)throw r.loadError;(!r||!t&&r.module)&&(r=createLoadRecord(i,e,r&&r.registration));var o=r.linkRecord;return o?instantiate(n,r,o,s,i):r})}function traceLoad(e,r,t){e.loads=e.loads||{},e.loads[r.key]={key:r.key,deps:t.dependencies,dynamicDeps:[],depMap:t.depMap||{}}}function registerDeclarative(e,r,t,o){var a=t.moduleObj,s=r.importerSetters,i=!1,n=o.call(envGlobal,function(e,r){if("object"==typeof e){var t=!1;for(var o in e)r=e[o],"__useDefault"===o||o in a&&a[o]===r||(t=!0,a[o]=r);if(!1===t)return r}else{if((i||e in a)&&a[e]===r)return r;a[e]=r}for(var n=0;n<s.length;n++)s[n](a);return r},new ContextualLoader(e,r.key));t.setters=n.setters,t.execute=n.execute,n.exports&&(t.moduleObj=a=n.exports,i=!0)}function instantiateDeps(e,n,a,r,t){if(a.depsInstantiatePromise)return a.depsInstantiatePromise;for(var o=Array(a.dependencies.length),s=0;s<a.dependencies.length;s++)o[s]=resolveInstantiateDep(e,a.dependencies[s],n.key,r,t,e.trace&&a.depMap||(a.depMap={}));var i=Promise.all(o).then(function(e){if(a.dependencyInstantiations=e,a.setters)for(var r=0;r<e.length;r++){var t=a.setters[r];if(t){var o=e[r];if(o instanceof ModuleNamespace)t(o);else{if(o.loadError)throw o.loadError;t(o.module||o.linkRecord.moduleObj),o.importerSetters&&o.importerSetters.push(t)}}}return n});return e.trace&&(i=i.then(function(){return traceLoad(e,n,a),n})),(i=i.catch(function(e){throw a.depsInstantiatePromise=void 0,LoaderError__Check_error_message_for_loader_stack(e,"Loading "+n.key)})).catch(function(){}),a.depsInstantiatePromise=i}function deepInstantiateDeps(l,e,r,c,u){return new Promise(function(n,t){var o=[],a=0;function s(e){var r=e.linkRecord;r&&-1===o.indexOf(e)&&(o.push(e),a++,instantiateDeps(l,e,r,c,u).then(i,t))}function i(e){a--;var r=e.linkRecord;if(r)for(var t=0;t<r.dependencies.length;t++){var o=r.dependencyInstantiations[t];o instanceof ModuleNamespace||s(o)}0===a&&n()}s(e)})}function ContextualLoader(e,r){this.loader=e,this.key=this.id=r,this.meta={url:r}}function ensureEvaluate(e,r,t,o,n,a){if(r.module)return r.module;if(r.evalError)throw r.evalError;if(a&&-1!==a.indexOf(r))return r.linkRecord.moduleObj;var s=doEvaluate(e,r,t,o,n,t.setters?[]:a||[]);if(s)throw s;return r.module}function makeDynamicRequire(n,a,s,i,l,c,u){return function(e){for(var r=0;r<s.length;r++)if(s[r]===e){var t,o=i[r];return"__useDefault"in(t=o instanceof ModuleNamespace?o:ensureEvaluate(n,o,o.linkRecord,l,c,u))?t.__useDefault:t}throw new Error("Module "+e+" not declared as a System.registerDynamic dependency of "+a)}}function doEvaluate(e,r,t,o,n,a){var s;if(a.push(r),t.setters)for(var i,l,c=0;c<t.dependencies.length;c++)if(!((i=t.dependencyInstantiations[c])instanceof ModuleNamespace)&&((l=i.linkRecord)&&-1===a.indexOf(i)&&(s=i.evalError?i.evalError:doEvaluate(e,i,l,o,n,l.setters?a:[])),s))return r.linkRecord=void 0,r.evalError=LoaderError__Check_error_message_for_loader_stack(s,"Evaluating "+r.key),r.evalError;if(t.execute)if(t.setters)s=declarativeExecute(t.execute);else{var u={id:r.key},d=t.moduleObj;Object.defineProperty(u,"exports",{configurable:!0,set:function(e){d.default=d.__useDefault=e},get:function(){return d.__useDefault}});var p=makeDynamicRequire(e,r.key,t.dependencies,t.dependencyInstantiations,o,n,a);if(!t.executingRequire)for(c=0;c<t.dependencies.length;c++)p(t.dependencies[c]);s=dynamicExecute(t.execute,p,d.default,u),u.exports!==d.__useDefault&&(d.default=d.__useDefault=u.exports);var f=d.default;if(f&&f.__esModule)for(var m in f)Object.hasOwnProperty.call(f,m)&&(d[m]=f[m])}if(r.linkRecord=void 0,s)return r.evalError=LoaderError__Check_error_message_for_loader_stack(s,"Evaluating "+r.key);if(o[r.key]=r.module=new ModuleNamespace(t.moduleObj),!t.setters){if(r.importerSetters)for(c=0;c<r.importerSetters.length;c++)r.importerSetters[c](r.module);r.importerSetters=void 0}}RegisterLoader.prototype[RegisterLoader.resolve=Loader.resolve]=function(e,r){return resolveIfNotPlain(e,r||baseURI)},RegisterLoader.prototype[INSTANTIATE]=function(e,r){},RegisterLoader.prototype[Loader.resolveInstantiate]=function(e,r){var t=this,o=this[REGISTER_INTERNAL],n=this.registry[REGISTRY];return resolveInstantiate(t,e,r,n,o).then(function(e){if(e instanceof ModuleNamespace)return e;var r=e.linkRecord;if(!r){if(e.module)return e.module;throw e.evalError}return deepInstantiateDeps(t,e,r,n,o).then(function(){return ensureEvaluate(t,e,r,n,o,void 0)})})},RegisterLoader.prototype.register=function(e,r,t){var o=this[REGISTER_INTERNAL];void 0===t?o.lastRegister=[e,r,void 0]:(o.records[e]||createLoadRecord(o,e,void 0)).registration=[r,t,void 0]},RegisterLoader.prototype.registerDynamic=function(e,r,t,o){var n=this[REGISTER_INTERNAL];"string"!=typeof e?n.lastRegister=[e,r,t]:(n.records[e]||createLoadRecord(n,e,void 0)).registration=[r,t,o]},ContextualLoader.prototype.import=function(e){return this.loader.trace&&this.loader.loads[this.key].dynamicDeps.push(e),this.loader.import(e,this.key)};var nullContext={};function declarativeExecute(e){try{e.call(nullContext)}catch(e){return e}}function dynamicExecute(e,r,t,o){try{var n=e.call(envGlobal,r,t,o);void 0!==n&&(o.exports=n)}catch(e){return e}}Object.freeze&&Object.freeze(nullContext);var resolvedPromise$1=Promise.resolve();function noop(){}var emptyModule=new ModuleNamespace({}),hasStringTag;function isModule(e){return void 0===hasStringTag&&(hasStringTag="undefined"!=typeof Symbol&&!!Symbol.toStringTag),e instanceof ModuleNamespace||hasStringTag&&"[object Module]"==Object.prototype.toString.call(e)}var CONFIG=createSymbol("loader-config"),PLAIN_RESOLVE=createSymbol("plain-resolve"),PLAIN_RESOLVE_SYNC=createSymbol("plain-resolve-sync"),isWorker="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts;function extend(e,r){for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e}var supportsPreload=!1,supportsPrefetch=!1,windowOrigin;function preloadScript(e){if(supportsPreload||supportsPrefetch){var r=document.createElement("link");supportsPreload?(r.rel="preload",r.as="script"):r.rel="prefetch",r.href=e,document.head.appendChild(r)}else{(new Image).src=e}}function workerImport(e,r,t){try{importScripts(e)}catch(e){t(e)}r()}if(isBrowser&&function(){var e=document.createElement("link").relList;if(e&&e.supports){supportsPrefetch=!0;try{supportsPreload=e.supports("preload")}catch(e){}}}(),isBrowser){var onerror=window.onerror;window.onerror=function(e,r){onerror&&onerror.apply(this,arguments)}}function scriptLoad(r,e,t,o,n){if(r=r.replace(/#/g,"%23"),isWorker)return workerImport(r,o,n);var a=document.createElement("script");function s(){o(),l()}function i(e){l(),n(new Error("Fetching "+r))}function l(){a.removeEventListener("load",s,!1),a.removeEventListener("error",i,!1),document.head.removeChild(a)}a.type="text/javascript",a.charset="utf-8",a.async=!0,e&&(a.crossOrigin=e),t&&(a.integrity=t),a.addEventListener("load",s,!1),a.addEventListener("error",i,!1),a.src=r,document.head.appendChild(a)}function applyPaths(e,r,t){var o=getMapMatch(r,t);if(o){var n=r[o]+t.substr(o.length),a=resolveIfNotPlain(n,baseURI);return void 0!==a?a:e+n}return-1!==t.indexOf(":")?t:e+t}function checkMap(e){var r=this.name;if(r.substr(0,e.length)===e&&(r.length===e.length||"/"===r[e.length]||"/"===e[e.length-1]||":"===e[e.length-1])){var t=e.split("/").length;t>this.len&&(this.match=e,this.len=t)}}function getMapMatch(e,r){if(Object.hasOwnProperty.call(e,r))return r;var t={name:r,match:void 0,len:0};return Object.keys(e).forEach(checkMap,t),t.match}function setAmdHelper(f){function m(e,r,t,o){if("object"==typeof e&&!(e instanceof Array))return m.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof r&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var n=f.decanonicalize(e,o),a=f.get(n);if(!a)throw new Error('Module not already loaded loading "'+e+'" as '+n+(o?' from "'+o+'".':"."));return"__useDefault"in a?a.__useDefault:a}throw new TypeError("Invalid require")}for(var s=[],i=0;i<e.length;i++)s.push(f.import(e[i],o));Promise.all(s).then(function(e){r&&r.apply(null,e)},t)}function e(e,l,c){var r,u,d,p;function t(o,e,n){for(var r=[],t=0;t<l.length;t++)r.push(o(l[t]));if(n.uri=n.id,n.config=noop,-1!==p&&r.splice(p,0,n),-1!==d&&r.splice(d,0,e),-1!==u){var a=function(e,r,t){return"string"==typeof e&&"function"!=typeof r?o(e):m.call(f,e,r,t,n.id)};a.toUrl=function(e){return f.normalizeSync(e,n.id)},r.splice(u,0,a)}var s=envGlobal.require;envGlobal.require=m;var i=c.apply(-1===d?envGlobal:e,r);envGlobal.require=s,void 0!==i&&(n.exports=i)}"string"!=typeof e&&(c=l,l=e,e=null),l instanceof Array||(l=["require","exports","module"].splice(0,(c=l).length)),"function"!=typeof c&&(r=c,c=function(){return r}),e||curMetaDeps&&(l=l.concat(curMetaDeps),curMetaDeps=void 0),-1!==(u=l.indexOf("require"))&&(l.splice(u,1),e||(l=l.concat(amdGetCJSDeps(c.toString(),u)))),-1!==(d=l.indexOf("exports"))&&l.splice(d,1),-1!==(p=l.indexOf("module"))&&l.splice(p,1),e?(f.registerDynamic(e,l,!1,t),lastNamedDefine?multipleNamedDefines=!(lastNamedDefine=void 0):multipleNamedDefines||(lastNamedDefine=[l,t])):f.registerDynamic(l,!1,curEsModule?wrapEsModuleExecute(t):t)}e.amd={},f.amdDefine=e,f.amdRequire=m}"undefined"!=typeof window&&"undefined"!=typeof document&&window.location&&(windowOrigin=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""));var commentRegEx=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,ignoredGlobalProps=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];function globalIterator(r){if(-1===ignoredGlobalProps.indexOf(r)){try{var e=envGlobal[r]}catch(e){ignoredGlobalProps.push(r)}this(r,e)}}var cjsRequirePre="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",cjsRequirePost="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",fnBracketRegEx=/\(([^\)]*)\)/,wsRegEx=/^\s+|\s+$/g,requireRegExs={};function amdGetCJSDeps(e,r){var t=((e=e.replace(commentRegEx,"")).match(fnBracketRegEx)[1].split(",")[r]||"require").replace(wsRegEx,""),o=requireRegExs[t]||(requireRegExs[t]=new RegExp(cjsRequirePre+t+cjsRequirePost,"g"));o.lastIndex=0;for(var n,a=[];n=o.exec(e);)a.push(n[2]||n[3]);return a}function wrapEsModuleExecute(o){return function(e,r,t){o(e,r,t),"object"!=typeof(r=t.exports)&&"function"!=typeof r||"__esModule"in r||Object.defineProperty(t.exports,"__esModule",{value:!0})}}var multipleNamedDefines=!1,lastNamedDefine,curMetaDeps,curEsModule=!1;function registerLastDefine(e){lastNamedDefine?e.registerDynamic(curMetaDeps?lastNamedDefine[0].concat(curMetaDeps):lastNamedDefine[0],!1,curEsModule?wrapEsModuleExecute(lastNamedDefine[1]):lastNamedDefine[1]):multipleNamedDefines&&e.registerDynamic([],!1,noop)}function SystemJSProductionLoader(){RegisterLoader.call(this),this[CONFIG]={baseURL:baseURI,paths:{},map:{},submap:{},depCache:{}},setAmdHelper(this),isBrowser&&(envGlobal.define=this.amdDefine)}SystemJSProductionLoader.plainResolve=PLAIN_RESOLVE,SystemJSProductionLoader.plainResolveSync=PLAIN_RESOLVE_SYNC;var systemJSPrototype=SystemJSProductionLoader.prototype=Object.create(RegisterLoader.prototype),globalSnapshot$1;function plainResolve(e,r){var t=this[CONFIG];if(r){var o=getMapMatch(t.submap,r),n=t.submap[o];if(a=n&&getMapMatch(n,e))return resolveIfNotPlain(s=n[a]+e.substr(a.length),o)||s}var a,s,i=t.map;if(a=getMapMatch(i,e))return resolveIfNotPlain(s=i[a]+e.substr(a.length),r||t.baseURL)||s}function instantiateWasm(e,r,a){return WebAssembly.compileStreaming(r).then(function(r){var t=[],o=[],n={};WebAssembly.Module.imports&&WebAssembly.Module.imports(r).forEach(function(e){var r=e.module;o.push(function(e){n[r]=e}),-1===t.indexOf(r)&&t.push(r)}),e.register(t,function(e){return{setters:o,execute:function(){e(new WebAssembly.Instance(r,n).exports)}}}),a()})}function doScriptLoad(t,o,n){return globalSnapshot$1={},Object.keys(envGlobal).forEach(globalIterator,function(e,r){globalSnapshot$1[e]=r}),new Promise(function(r,e){return scriptLoad(o,"anonymous",void 0,function(){var e=n();e||(registerLastDefine(t),(e=n())||(t.register([],function(){return{execute:retrieveGlobal}}),n())),r()},e)})}function doEvalLoad(loader,url,source,processAnonRegister){globalSnapshot$1={},Object.keys(envGlobal).forEach(globalIterator,function(e,r){globalSnapshot$1[e]=r}),eval(source+"\n//# sourceURL="+url);var registered=processAnonRegister();registered||(registerLastDefine(loader),registered=processAnonRegister(),registered||(loader.register([],function(){return{execute:retrieveGlobal}}),processAnonRegister()))}function retrieveGlobal(){var t,o={__esModule:!0},n=!1;return Object.keys(envGlobal).forEach(globalIterator,function(e,r){globalSnapshot$1[e]!==r&&void 0!==r&&(o[e]=r,void 0!==t?n||t===r||(n=!0):t=r)}),globalSnapshot$1=void 0,n?o:t}function coreInstantiate(r,t){var e=this[CONFIG],o=e.depCache[r];if(o)for(var n=0;n<o.length;n++)this.resolve(o[n],r).then(preloadScript);if(e.wasm){var a=this;return fetch(r).then(function(e){if(!e.ok)throw new Error("Fetch error: "+e.status+" "+e.statusText);return-1===e.headers.get("content-type").indexOf("application/wasm")?e.text().then(function(e){doEvalLoad(a,r,e,t)}):instantiateWasm(a,e,t)})}return doScriptLoad(this,r,t)}systemJSPrototype.constructor=SystemJSProductionLoader,systemJSPrototype[SystemJSProductionLoader.resolve=RegisterLoader.resolve]=function(t,e){var r=resolveIfNotPlain(t,e||baseURI);if(void 0!==r)return Promise.resolve(r);var o=this;return resolvedPromise$1.then(function(){return o[PLAIN_RESOLVE](t,e)}).then(function(e){if(e=e||t,o.registry.has(e))return e;var r=o[CONFIG];return applyPaths(r.baseURL,r.paths,e)})},systemJSPrototype.newModule=function(e){return new ModuleNamespace(e)},systemJSPrototype.isModule=isModule,systemJSPrototype.resolveSync=function(e,r){var t=resolveIfNotPlain(e,r||baseURI);if(void 0!==t)return t;if(t=this[PLAIN_RESOLVE_SYNC](e,r)||e,this.registry.has(t))return t;var o=this[CONFIG];return applyPaths(o.baseURL,o.paths,t)},systemJSPrototype[PLAIN_RESOLVE]=systemJSPrototype[PLAIN_RESOLVE_SYNC]=plainResolve,systemJSPrototype[SystemJSProductionLoader.instantiate=RegisterLoader.instantiate]=coreInstantiate,systemJSPrototype.config=function(e){var r=this[CONFIG];if(e.baseURL&&(r.baseURL=resolveIfNotPlain(e.baseURL,baseURI)||resolveIfNotPlain("./"+e.baseURL,baseURI),"/"!==r.baseURL[r.baseURL.length-1]&&(r.baseURL+="/")),e.paths&&extend(r.paths,e.paths),e.map){var t=e.map;for(var o in t)if(Object.hasOwnProperty.call(t,o)){var n=t[o];if("string"==typeof n)r.map[o]=n;else{var a=resolveIfNotPlain(o,baseURI)||applyPaths(r.baseURL,r.paths,o);extend(r.submap[a]||(r.submap[a]={}),n)}}}for(var o in r.wasm=!0===e.wasm,e)if(Object.hasOwnProperty.call(e,o)){t=e[o];switch(o){case"baseURL":case"paths":case"map":case"wasm":break;case"depCache":for(var o in t)if(Object.hasOwnProperty.call(t,o)){a=this.resolveSync(o,void 0);r.depCache[a]=(r.depCache[a]||[]).concat(t[o])}break;default:throw new TypeError('The SystemJS production build does not support the "'+o+'" configuration option.')}}},systemJSPrototype.getConfig=function(e){var r=this[CONFIG],t={};for(var o in extend(t,r.map),r.submap)Object.hasOwnProperty.call(r.submap,o)&&(t[o]=extend({},r.submap[o]));var n={};for(var o in r.depCache)Object.hasOwnProperty.call(r.depCache,o)&&(n[o]=[].concat(r.depCache[o]));return{baseURL:r.baseURL,paths:extend({},r.paths),depCache:n,map:t,wasm:!0===r.wasm}},systemJSPrototype.register=function(e,r,t){return"string"==typeof e&&(e=this.resolveSync(e,void 0)),RegisterLoader.prototype.register.call(this,e,r,t)},systemJSPrototype.registerDynamic=function(e,r,t,o){return"string"==typeof e&&(e=this.resolveSync(e,void 0)),RegisterLoader.prototype.registerDynamic.call(this,e,r,t,o)},SystemJSProductionLoader.prototype.version="0.21.1 Production";var System=new SystemJSProductionLoader;if(isBrowser||isWorker)if(envGlobal.SystemJS=System,envGlobal.System){var register=envGlobal.System.register;envGlobal.System.register=function(){register&®ister.apply(this,arguments),System.register.apply(System,arguments)}}else envGlobal.System=System;"undefined"!=typeof module&&module.exports&&(module.exports=System)}(); |
/* | ||
* SystemJS v0.21.0 Production | ||
*/ | ||
* SystemJS v0.21.1 Production | ||
*/ | ||
(function () { | ||
'use strict'; | ||
'use strict'; | ||
/* | ||
* Environment | ||
*/ | ||
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; | ||
var isNode = typeof process !== 'undefined' && process.versions && process.versions.node; | ||
var isWindows = typeof process !== 'undefined' && typeof process.platform === 'string' && process.platform.match(/^win/); | ||
/* | ||
* Environment | ||
*/ | ||
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; | ||
var isNode = typeof process !== 'undefined' && process.versions && process.versions.node; | ||
var isWindows = typeof process !== 'undefined' && typeof process.platform === 'string' && process.platform.match(/^win/); | ||
var envGlobal = typeof self !== 'undefined' ? self : global; | ||
/* | ||
* Simple Symbol() shim | ||
*/ | ||
var hasSymbol = typeof Symbol !== 'undefined'; | ||
function createSymbol (name) { | ||
return hasSymbol ? Symbol() : '@@' + name; | ||
} | ||
var envGlobal = typeof self !== 'undefined' ? self : global; | ||
/* | ||
* Simple Symbol() shim | ||
*/ | ||
var hasSymbol = typeof Symbol !== 'undefined'; | ||
function createSymbol (name) { | ||
return hasSymbol ? Symbol() : '@@' + name; | ||
} | ||
/* | ||
* Environment baseURI | ||
*/ | ||
var baseURI; | ||
// environent baseURI detection | ||
if (typeof document != 'undefined' && document.getElementsByTagName) { | ||
baseURI = document.baseURI; | ||
if (!baseURI) { | ||
var bases = document.getElementsByTagName('base'); | ||
baseURI = bases[0] && bases[0].href || window.location.href; | ||
} | ||
} | ||
else if (typeof location != 'undefined') { | ||
baseURI = location.href; | ||
} | ||
/* | ||
* Environment baseURI | ||
*/ | ||
var baseURI; | ||
// environent baseURI detection | ||
if (typeof document != 'undefined' && document.getElementsByTagName) { | ||
baseURI = document.baseURI; | ||
if (!baseURI) { | ||
var bases = document.getElementsByTagName('base'); | ||
baseURI = bases[0] && bases[0].href || window.location.href; | ||
// sanitize out the hash and querystring | ||
if (baseURI) { | ||
baseURI = baseURI.split('#')[0].split('?')[0]; | ||
var slashIndex = baseURI.lastIndexOf('/'); | ||
if (slashIndex !== -1) | ||
baseURI = baseURI.substr(0, slashIndex + 1); | ||
} | ||
} | ||
else if (typeof location != 'undefined') { | ||
baseURI = location.href; | ||
} | ||
else if (typeof process !== 'undefined' && process.cwd) { | ||
baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd(); | ||
if (isWindows) | ||
baseURI = baseURI.replace(/\\/g, '/'); | ||
} | ||
else { | ||
throw new TypeError('No environment baseURI'); | ||
} | ||
// sanitize out the hash and querystring | ||
if (baseURI) { | ||
baseURI = baseURI.split('#')[0].split('?')[0]; | ||
var slashIndex = baseURI.lastIndexOf('/'); | ||
if (slashIndex !== -1) | ||
baseURI = baseURI.substr(0, slashIndex + 1); | ||
} | ||
else if (typeof process !== 'undefined' && process.cwd) { | ||
baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd(); | ||
if (isWindows) | ||
baseURI = baseURI.replace(/\\/g, '/'); | ||
} | ||
else { | ||
throw new TypeError('No environment baseURI'); | ||
} | ||
// ensure baseURI has trailing "/" | ||
if (baseURI[baseURI.length - 1] !== '/') | ||
baseURI += '/'; | ||
// ensure baseURI has trailing "/" | ||
if (baseURI[baseURI.length - 1] !== '/') | ||
baseURI += '/'; | ||
/* | ||
* LoaderError with chaining for loader stacks | ||
*/ | ||
var errArgs = new Error(0, '_').fileName == '_'; | ||
function LoaderError__Check_error_message_for_loader_stack (childErr, newMessage) { | ||
// Convert file:/// URLs to paths in Node | ||
if (!isBrowser) | ||
newMessage = newMessage.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, ''); | ||
/* | ||
* LoaderError with chaining for loader stacks | ||
*/ | ||
var errArgs = new Error(0, '_').fileName == '_'; | ||
function LoaderError__Check_error_message_for_loader_stack (childErr, newMessage) { | ||
// Convert file:/// URLs to paths in Node | ||
if (!isBrowser) | ||
newMessage = newMessage.replace(isWindows ? /file:\/\/\//g : /file:\/\//g, ''); | ||
var message = (childErr.message || childErr) + '\n ' + newMessage; | ||
var message = (childErr.message || childErr) + '\n ' + newMessage; | ||
var err; | ||
if (errArgs && childErr.fileName) | ||
err = new Error(message, childErr.fileName, childErr.lineNumber); | ||
else | ||
err = new Error(message); | ||
var err; | ||
if (errArgs && childErr.fileName) | ||
err = new Error(message, childErr.fileName, childErr.lineNumber); | ||
else | ||
err = new Error(message); | ||
var stack = childErr.originalErr ? childErr.originalErr.stack : childErr.stack; | ||
var stack = childErr.originalErr ? childErr.originalErr.stack : childErr.stack; | ||
if (isNode) | ||
// node doesn't show the message otherwise | ||
err.stack = message + '\n ' + stack; | ||
else | ||
err.stack = stack; | ||
if (isNode) | ||
// node doesn't show the message otherwise | ||
err.stack = message + '\n ' + stack; | ||
else | ||
err.stack = stack; | ||
err.originalErr = childErr.originalErr || childErr; | ||
err.originalErr = childErr.originalErr || childErr; | ||
return err; | ||
} | ||
return err; | ||
} | ||
/* | ||
* Optimized URL normalization assuming a syntax-valid URL parent | ||
*/ | ||
function throwResolveError (relUrl, parentUrl) { | ||
throw new RangeError('Unable to resolve "' + relUrl + '" to ' + parentUrl); | ||
} | ||
function resolveIfNotPlain (relUrl, parentUrl) { | ||
relUrl = relUrl.trim(); | ||
var parentProtocol = parentUrl && parentUrl.substr(0, parentUrl.indexOf(':') + 1); | ||
/* | ||
* Optimized URL normalization assuming a syntax-valid URL parent | ||
*/ | ||
function throwResolveError (relUrl, parentUrl) { | ||
throw new RangeError('Unable to resolve "' + relUrl + '" to ' + parentUrl); | ||
} | ||
function resolveIfNotPlain (relUrl, parentUrl) { | ||
relUrl = relUrl.trim(); | ||
var parentProtocol = parentUrl && parentUrl.substr(0, parentUrl.indexOf(':') + 1); | ||
var firstChar = relUrl[0]; | ||
var secondChar = relUrl[1]; | ||
var firstChar = relUrl[0]; | ||
var secondChar = relUrl[1]; | ||
// protocol-relative | ||
if (firstChar === '/' && secondChar === '/') { | ||
if (!parentProtocol) | ||
throwResolveError(relUrl, parentUrl); | ||
return parentProtocol + relUrl; | ||
} | ||
// relative-url | ||
else if (firstChar === '.' && (secondChar === '/' || secondChar === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) || | ||
relUrl.length === 1 && (relUrl += '/')) || | ||
firstChar === '/') { | ||
var parentIsPlain = !parentProtocol || parentUrl[parentProtocol.length] !== '/'; | ||
// read pathname from parent if a URL | ||
// pathname taken to be part after leading "/" | ||
var pathname; | ||
if (parentIsPlain) { | ||
// resolving to a plain parent -> skip standard URL prefix, and treat entire parent as pathname | ||
if (parentUrl === undefined) | ||
// protocol-relative | ||
if (firstChar === '/' && secondChar === '/') { | ||
if (!parentProtocol) | ||
throwResolveError(relUrl, parentUrl); | ||
pathname = parentUrl; | ||
return parentProtocol + relUrl; | ||
} | ||
else if (parentUrl[parentProtocol.length + 1] === '/') { | ||
// resolving to a :// so we need to read out the auth and host | ||
if (parentProtocol !== 'file:') { | ||
pathname = parentUrl.substr(parentProtocol.length + 2); | ||
pathname = pathname.substr(pathname.indexOf('/') + 1); | ||
// relative-url | ||
else if (firstChar === '.' && (secondChar === '/' || secondChar === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) || | ||
relUrl.length === 1 && (relUrl += '/')) || | ||
firstChar === '/') { | ||
var parentIsPlain = !parentProtocol || parentUrl[parentProtocol.length] !== '/'; | ||
// read pathname from parent if a URL | ||
// pathname taken to be part after leading "/" | ||
var pathname; | ||
if (parentIsPlain) { | ||
// resolving to a plain parent -> skip standard URL prefix, and treat entire parent as pathname | ||
if (parentUrl === undefined) | ||
throwResolveError(relUrl, parentUrl); | ||
pathname = parentUrl; | ||
} | ||
else if (parentUrl[parentProtocol.length + 1] === '/') { | ||
// resolving to a :// so we need to read out the auth and host | ||
if (parentProtocol !== 'file:') { | ||
pathname = parentUrl.substr(parentProtocol.length + 2); | ||
pathname = pathname.substr(pathname.indexOf('/') + 1); | ||
} | ||
else { | ||
pathname = parentUrl.substr(8); | ||
} | ||
} | ||
else { | ||
pathname = parentUrl.substr(8); | ||
// resolving to :/ so pathname is the /... part | ||
pathname = parentUrl.substr(parentProtocol.length + 1); | ||
} | ||
} | ||
else { | ||
// resolving to :/ so pathname is the /... part | ||
pathname = parentUrl.substr(parentProtocol.length + 1); | ||
} | ||
if (firstChar === '/') { | ||
if (parentIsPlain) | ||
throwResolveError(relUrl, parentUrl); | ||
else | ||
return parentUrl.substr(0, parentUrl.length - pathname.length - 1) + relUrl; | ||
} | ||
if (firstChar === '/') { | ||
if (parentIsPlain) | ||
throwResolveError(relUrl, parentUrl); | ||
else | ||
return parentUrl.substr(0, parentUrl.length - pathname.length - 1) + relUrl; | ||
} | ||
// join together and split for removal of .. and . segments | ||
// looping the string instead of anything fancy for perf reasons | ||
// '../../../../../z' resolved to 'x/y' is just 'z' regardless of parentIsPlain | ||
var segmented = pathname.substr(0, pathname.lastIndexOf('/') + 1) + relUrl; | ||
// join together and split for removal of .. and . segments | ||
// looping the string instead of anything fancy for perf reasons | ||
// '../../../../../z' resolved to 'x/y' is just 'z' regardless of parentIsPlain | ||
var segmented = pathname.substr(0, pathname.lastIndexOf('/') + 1) + relUrl; | ||
var output = []; | ||
var segmentIndex = -1; | ||
var output = []; | ||
var segmentIndex = -1; | ||
for (var i = 0; i < segmented.length; i++) { | ||
// busy reading a segment - only terminate on '/' | ||
if (segmentIndex !== -1) { | ||
if (segmented[i] === '/') { | ||
output.push(segmented.substring(segmentIndex, i + 1)); | ||
segmentIndex = -1; | ||
for (var i = 0; i < segmented.length; i++) { | ||
// busy reading a segment - only terminate on '/' | ||
if (segmentIndex !== -1) { | ||
if (segmented[i] === '/') { | ||
output.push(segmented.substring(segmentIndex, i + 1)); | ||
segmentIndex = -1; | ||
} | ||
continue; | ||
} | ||
continue; | ||
} | ||
// new segment - check if it is relative | ||
if (segmented[i] === '.') { | ||
// ../ segment | ||
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) { | ||
output.pop(); | ||
i += 2; | ||
} | ||
// ./ segment | ||
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) { | ||
i += 1; | ||
} | ||
else { | ||
// the start of a new segment as below | ||
segmentIndex = i; | ||
// new segment - check if it is relative | ||
if (segmented[i] === '.') { | ||
// ../ segment | ||
if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) { | ||
output.pop(); | ||
i += 2; | ||
} | ||
// ./ segment | ||
else if (segmented[i + 1] === '/' || i + 1 === segmented.length) { | ||
i += 1; | ||
} | ||
else { | ||
// the start of a new segment as below | ||
segmentIndex = i; | ||
continue; | ||
} | ||
// this is the plain URI backtracking error (../, package:x -> error) | ||
if (parentIsPlain && output.length === 0) | ||
throwResolveError(relUrl, parentUrl); | ||
continue; | ||
} | ||
// this is the plain URI backtracking error (../, package:x -> error) | ||
if (parentIsPlain && output.length === 0) | ||
throwResolveError(relUrl, parentUrl); | ||
continue; | ||
// it is the start of a new segment | ||
segmentIndex = i; | ||
} | ||
// finish reading out the last segment | ||
if (segmentIndex !== -1) | ||
output.push(segmented.substr(segmentIndex)); | ||
// it is the start of a new segment | ||
segmentIndex = i; | ||
return parentUrl.substr(0, parentUrl.length - pathname.length) + output.join(''); | ||
} | ||
// finish reading out the last segment | ||
if (segmentIndex !== -1) | ||
output.push(segmented.substr(segmentIndex)); | ||
return parentUrl.substr(0, parentUrl.length - pathname.length) + output.join(''); | ||
} | ||
// sanitizes and verifies (by returning undefined if not a valid URL-like form) | ||
// Windows filepath compatibility is an added convenience here | ||
var protocolIndex = relUrl.indexOf(':'); | ||
if (protocolIndex !== -1) { | ||
if (isNode) { | ||
// C:\x becomes file:///c:/x (we don't support C|\x) | ||
if (relUrl[1] === ':' && relUrl[2] === '\\' && relUrl[0].match(/[a-z]/i)) | ||
return 'file:///' + relUrl.replace(/\\/g, '/'); | ||
// sanitizes and verifies (by returning undefined if not a valid URL-like form) | ||
// Windows filepath compatibility is an added convenience here | ||
var protocolIndex = relUrl.indexOf(':'); | ||
if (protocolIndex !== -1) { | ||
if (isNode) { | ||
// C:\x becomes file:///c:/x (we don't support C|\x) | ||
if (relUrl[1] === ':' && relUrl[2] === '\\' && relUrl[0].match(/[a-z]/i)) | ||
return 'file:///' + relUrl.replace(/\\/g, '/'); | ||
} | ||
return relUrl; | ||
} | ||
return relUrl; | ||
} | ||
} | ||
var resolvedPromise$1 = Promise.resolve(); | ||
var resolvedPromise = Promise.resolve(); | ||
/* | ||
* Simple Array values shim | ||
*/ | ||
function arrayValues (arr) { | ||
if (arr.values) | ||
return arr.values(); | ||
/* | ||
* Simple Array values shim | ||
*/ | ||
function arrayValues (arr) { | ||
if (arr.values) | ||
return arr.values(); | ||
if (typeof Symbol === 'undefined' || !Symbol.iterator) | ||
throw new Error('Symbol.iterator not supported in this browser'); | ||
if (typeof Symbol === 'undefined' || !Symbol.iterator) | ||
throw new Error('Symbol.iterator not supported in this browser'); | ||
var iterable = {}; | ||
iterable[Symbol.iterator] = function () { | ||
var keys = Object.keys(arr); | ||
var keyIndex = 0; | ||
return { | ||
next: function () { | ||
if (keyIndex < keys.length) | ||
return { | ||
value: arr[keys[keyIndex++]], | ||
done: false | ||
}; | ||
else | ||
return { | ||
value: undefined, | ||
done: true | ||
}; | ||
} | ||
var iterable = {}; | ||
iterable[Symbol.iterator] = function () { | ||
var keys = Object.keys(arr); | ||
var keyIndex = 0; | ||
return { | ||
next: function () { | ||
if (keyIndex < keys.length) | ||
return { | ||
value: arr[keys[keyIndex++]], | ||
done: false | ||
}; | ||
else | ||
return { | ||
value: undefined, | ||
done: true | ||
}; | ||
} | ||
}; | ||
}; | ||
return iterable; | ||
} | ||
/* | ||
* 3. Reflect.Loader | ||
* | ||
* We skip the entire native internal pipeline, just providing the bare API | ||
*/ | ||
// 3.1.1 | ||
function Loader () { | ||
this.registry = new Registry(); | ||
} | ||
// 3.3.1 | ||
Loader.prototype.constructor = Loader; | ||
function ensureInstantiated (module) { | ||
if (!(module instanceof ModuleNamespace)) | ||
throw new TypeError('Module instantiation did not return a valid namespace object.'); | ||
return module; | ||
} | ||
// 3.3.2 | ||
Loader.prototype.import = function (key, parent) { | ||
if (typeof key !== 'string') | ||
throw new TypeError('Loader import method must be passed a module key string'); | ||
// custom resolveInstantiate combined hook for better perf | ||
var loader = this; | ||
return resolvedPromise | ||
.then(function () { | ||
return loader[RESOLVE_INSTANTIATE](key, parent); | ||
}) | ||
.then(ensureInstantiated) | ||
//.then(Module.evaluate) | ||
.catch(function (err) { | ||
throw LoaderError__Check_error_message_for_loader_stack(err, 'Loading ' + key + (parent ? ' from ' + parent : '')); | ||
}); | ||
}; | ||
return iterable; | ||
} | ||
// 3.3.3 | ||
var RESOLVE = Loader.resolve = createSymbol('resolve'); | ||
/* | ||
* 3. Reflect.Loader | ||
* | ||
* We skip the entire native internal pipeline, just providing the bare API | ||
*/ | ||
// 3.1.1 | ||
function Loader () { | ||
this.registry = new Registry(); | ||
} | ||
// 3.3.1 | ||
Loader.prototype.constructor = Loader; | ||
/* | ||
* Combined resolve / instantiate hook | ||
* | ||
* Not in current reduced spec, but necessary to separate RESOLVE from RESOLVE + INSTANTIATE as described | ||
* in the spec notes of this repo to ensure that loader.resolve doesn't instantiate when not wanted. | ||
* | ||
* We implement RESOLVE_INSTANTIATE as a single hook instead of a separate INSTANTIATE in order to avoid | ||
* the need for double registry lookups as a performance optimization. | ||
*/ | ||
var RESOLVE_INSTANTIATE = Loader.resolveInstantiate = createSymbol('resolveInstantiate'); | ||
function ensureInstantiated (module) { | ||
if (!(module instanceof ModuleNamespace)) | ||
throw new TypeError('Module instantiation did not return a valid namespace object.'); | ||
return module; | ||
} | ||
// default resolveInstantiate is just to call resolve and then get from the registry | ||
// this provides compatibility for the resolveInstantiate optimization | ||
Loader.prototype[RESOLVE_INSTANTIATE] = function (key, parent) { | ||
var loader = this; | ||
return loader.resolve(key, parent) | ||
.then(function (resolved) { | ||
return loader.registry.get(resolved); | ||
}); | ||
}; | ||
// 3.3.2 | ||
Loader.prototype.import = function (key, parent) { | ||
if (typeof key !== 'string') | ||
throw new TypeError('Loader import method must be passed a module key string'); | ||
// custom resolveInstantiate combined hook for better perf | ||
var loader = this; | ||
return resolvedPromise$1 | ||
.then(function () { | ||
return loader[RESOLVE_INSTANTIATE](key, parent); | ||
}) | ||
.then(ensureInstantiated) | ||
//.then(Module.evaluate) | ||
.catch(function (err) { | ||
throw LoaderError__Check_error_message_for_loader_stack(err, 'Loading ' + key + (parent ? ' from ' + parent : '')); | ||
}); | ||
}; | ||
// 3.3.3 | ||
var RESOLVE = Loader.resolve = createSymbol('resolve'); | ||
function ensureResolution (resolvedKey) { | ||
if (resolvedKey === undefined) | ||
throw new RangeError('No resolution found.'); | ||
return resolvedKey; | ||
} | ||
/* | ||
* Combined resolve / instantiate hook | ||
* | ||
* Not in current reduced spec, but necessary to separate RESOLVE from RESOLVE + INSTANTIATE as described | ||
* in the spec notes of this repo to ensure that loader.resolve doesn't instantiate when not wanted. | ||
* | ||
* We implement RESOLVE_INSTANTIATE as a single hook instead of a separate INSTANTIATE in order to avoid | ||
* the need for double registry lookups as a performance optimization. | ||
*/ | ||
var RESOLVE_INSTANTIATE = Loader.resolveInstantiate = createSymbol('resolveInstantiate'); | ||
Loader.prototype.resolve = function (key, parent) { | ||
var loader = this; | ||
return resolvedPromise | ||
.then(function() { | ||
return loader[RESOLVE](key, parent); | ||
}) | ||
.then(ensureResolution) | ||
.catch(function (err) { | ||
throw LoaderError__Check_error_message_for_loader_stack(err, 'Resolving ' + key + (parent ? ' to ' + parent : '')); | ||
}); | ||
}; | ||
// default resolveInstantiate is just to call resolve and then get from the registry | ||
// this provides compatibility for the resolveInstantiate optimization | ||
Loader.prototype[RESOLVE_INSTANTIATE] = function (key, parent) { | ||
var loader = this; | ||
return loader.resolve(key, parent) | ||
.then(function (resolved) { | ||
return loader.registry.get(resolved); | ||
}); | ||
}; | ||
// 3.3.4 (import without evaluate) | ||
// this is not documented because the use of deferred evaluation as in Module.evaluate is not | ||
// documented, as it is not considered a stable feature to be encouraged | ||
// Loader.prototype.load may well be deprecated if this stays disabled | ||
/* Loader.prototype.load = function (key, parent) { | ||
return Promise.resolve(this[RESOLVE_INSTANTIATE](key, parent || this.key)) | ||
.catch(function (err) { | ||
throw addToError(err, 'Loading ' + key + (parent ? ' from ' + parent : '')); | ||
}); | ||
}; */ | ||
function ensureResolution (resolvedKey) { | ||
if (resolvedKey === undefined) | ||
throw new RangeError('No resolution found.'); | ||
return resolvedKey; | ||
} | ||
/* | ||
* 4. Registry | ||
* | ||
* Instead of structuring through a Map, just use a dictionary object | ||
* We throw for construction attempts so this doesn't affect the public API | ||
* | ||
* Registry has been adjusted to use Namespace objects over ModuleStatus objects | ||
* as part of simplifying loader API implementation | ||
*/ | ||
var iteratorSupport = typeof Symbol !== 'undefined' && Symbol.iterator; | ||
var REGISTRY = createSymbol('registry'); | ||
function Registry() { | ||
this[REGISTRY] = {}; | ||
} | ||
// 4.4.1 | ||
if (iteratorSupport) { | ||
// 4.4.2 | ||
Registry.prototype[Symbol.iterator] = function () { | ||
return this.entries()[Symbol.iterator](); | ||
}; | ||
Loader.prototype.resolve = function (key, parent) { | ||
var loader = this; | ||
return resolvedPromise$1 | ||
.then(function() { | ||
return loader[RESOLVE](key, parent); | ||
}) | ||
.then(ensureResolution) | ||
.catch(function (err) { | ||
throw LoaderError__Check_error_message_for_loader_stack(err, 'Resolving ' + key + (parent ? ' to ' + parent : '')); | ||
}); | ||
}; | ||
// 4.4.3 | ||
Registry.prototype.entries = function () { | ||
var registry = this[REGISTRY]; | ||
return arrayValues(Object.keys(registry).map(function (key) { | ||
return [key, registry[key]]; | ||
})); | ||
}; | ||
} | ||
// 3.3.4 (import without evaluate) | ||
// this is not documented because the use of deferred evaluation as in Module.evaluate is not | ||
// documented, as it is not considered a stable feature to be encouraged | ||
// Loader.prototype.load may well be deprecated if this stays disabled | ||
/* Loader.prototype.load = function (key, parent) { | ||
return Promise.resolve(this[RESOLVE_INSTANTIATE](key, parent || this.key)) | ||
.catch(function (err) { | ||
throw addToError(err, 'Loading ' + key + (parent ? ' from ' + parent : '')); | ||
}); | ||
}; */ | ||
/* | ||
* 4. Registry | ||
* | ||
* Instead of structuring through a Map, just use a dictionary object | ||
* We throw for construction attempts so this doesn't affect the public API | ||
* | ||
* Registry has been adjusted to use Namespace objects over ModuleStatus objects | ||
* as part of simplifying loader API implementation | ||
*/ | ||
var iteratorSupport = typeof Symbol !== 'undefined' && Symbol.iterator; | ||
var REGISTRY = createSymbol('registry'); | ||
function Registry() { | ||
this[REGISTRY] = {}; | ||
} | ||
// 4.4.1 | ||
if (iteratorSupport) { | ||
// 4.4.2 | ||
Registry.prototype[Symbol.iterator] = function () { | ||
return this.entries()[Symbol.iterator](); | ||
// 4.4.4 | ||
Registry.prototype.keys = function () { | ||
return arrayValues(Object.keys(this[REGISTRY])); | ||
}; | ||
// 4.4.3 | ||
Registry.prototype.entries = function () { | ||
// 4.4.5 | ||
Registry.prototype.values = function () { | ||
var registry = this[REGISTRY]; | ||
return arrayValues(Object.keys(registry).map(function (key) { | ||
return [key, registry[key]]; | ||
return registry[key]; | ||
})); | ||
}; | ||
} | ||
// 4.4.6 | ||
Registry.prototype.get = function (key) { | ||
return this[REGISTRY][key]; | ||
}; | ||
// 4.4.7 | ||
Registry.prototype.set = function (key, namespace) { | ||
if (!(namespace instanceof ModuleNamespace)) | ||
throw new Error('Registry must be set with an instance of Module Namespace'); | ||
this[REGISTRY][key] = namespace; | ||
return this; | ||
}; | ||
// 4.4.8 | ||
Registry.prototype.has = function (key) { | ||
return Object.hasOwnProperty.call(this[REGISTRY], key); | ||
}; | ||
// 4.4.9 | ||
Registry.prototype.delete = function (key) { | ||
if (Object.hasOwnProperty.call(this[REGISTRY], key)) { | ||
delete this[REGISTRY][key]; | ||
return true; | ||
} | ||
return false; | ||
}; | ||
// 4.4.4 | ||
Registry.prototype.keys = function () { | ||
return arrayValues(Object.keys(this[REGISTRY])); | ||
}; | ||
// 4.4.5 | ||
Registry.prototype.values = function () { | ||
var registry = this[REGISTRY]; | ||
return arrayValues(Object.keys(registry).map(function (key) { | ||
return registry[key]; | ||
})); | ||
}; | ||
// 4.4.6 | ||
Registry.prototype.get = function (key) { | ||
return this[REGISTRY][key]; | ||
}; | ||
// 4.4.7 | ||
Registry.prototype.set = function (key, namespace) { | ||
if (!(namespace instanceof ModuleNamespace)) | ||
throw new Error('Registry must be set with an instance of Module Namespace'); | ||
this[REGISTRY][key] = namespace; | ||
return this; | ||
}; | ||
// 4.4.8 | ||
Registry.prototype.has = function (key) { | ||
return Object.hasOwnProperty.call(this[REGISTRY], key); | ||
}; | ||
// 4.4.9 | ||
Registry.prototype.delete = function (key) { | ||
if (Object.hasOwnProperty.call(this[REGISTRY], key)) { | ||
delete this[REGISTRY][key]; | ||
return true; | ||
} | ||
return false; | ||
}; | ||
/* | ||
* Simple ModuleNamespace Exotic object based on a baseObject | ||
* We export this for allowing a fast-path for module namespace creation over Module descriptors | ||
*/ | ||
// var EVALUATE = createSymbol('evaluate'); | ||
var BASE_OBJECT = createSymbol('baseObject'); | ||
/* | ||
* Simple ModuleNamespace Exotic object based on a baseObject | ||
* We export this for allowing a fast-path for module namespace creation over Module descriptors | ||
*/ | ||
// var EVALUATE = createSymbol('evaluate'); | ||
var BASE_OBJECT = createSymbol('baseObject'); | ||
// 8.3.1 Reflect.Module | ||
/* | ||
* Best-effort simplified non-spec implementation based on | ||
* a baseObject referenced via getters. | ||
* | ||
* Allows: | ||
* | ||
* loader.registry.set('x', new Module({ default: 'x' })); | ||
* | ||
* Optional evaluation function provides experimental Module.evaluate | ||
* support for non-executed modules in registry. | ||
*/ | ||
function ModuleNamespace (baseObject/*, evaluate*/) { | ||
Object.defineProperty(this, BASE_OBJECT, { | ||
value: baseObject | ||
}); | ||
// 8.3.1 Reflect.Module | ||
/* | ||
* Best-effort simplified non-spec implementation based on | ||
* a baseObject referenced via getters. | ||
* | ||
* Allows: | ||
* | ||
* loader.registry.set('x', new Module({ default: 'x' })); | ||
* | ||
* Optional evaluation function provides experimental Module.evaluate | ||
* support for non-executed modules in registry. | ||
*/ | ||
function ModuleNamespace (baseObject/*, evaluate*/) { | ||
Object.defineProperty(this, BASE_OBJECT, { | ||
value: baseObject | ||
}); | ||
// evaluate defers namespace population | ||
/* if (evaluate) { | ||
Object.defineProperty(this, EVALUATE, { | ||
value: evaluate, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} | ||
else { */ | ||
Object.keys(baseObject).forEach(extendNamespace, this); | ||
//} | ||
}// 8.4.2 | ||
ModuleNamespace.prototype = Object.create(null); | ||
// evaluate defers namespace population | ||
/* if (evaluate) { | ||
Object.defineProperty(this, EVALUATE, { | ||
value: evaluate, | ||
configurable: true, | ||
writable: true | ||
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) | ||
Object.defineProperty(ModuleNamespace.prototype, Symbol.toStringTag, { | ||
value: 'Module' | ||
}); | ||
function extendNamespace (key) { | ||
Object.defineProperty(this, key, { | ||
enumerable: true, | ||
get: function () { | ||
return this[BASE_OBJECT][key]; | ||
} | ||
}); | ||
} | ||
else { */ | ||
Object.keys(baseObject).forEach(extendNamespace, this); | ||
//} | ||
} | ||
// 8.4.2 | ||
ModuleNamespace.prototype = Object.create(null); | ||
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) | ||
Object.defineProperty(ModuleNamespace.prototype, Symbol.toStringTag, { | ||
value: 'Module' | ||
}); | ||
function extendNamespace (key) { | ||
Object.defineProperty(this, key, { | ||
enumerable: true, | ||
get: function () { | ||
return this[BASE_OBJECT][key]; | ||
/* function doEvaluate (evaluate, context) { | ||
try { | ||
evaluate.call(context); | ||
} | ||
}); | ||
} | ||
/* function doEvaluate (evaluate, context) { | ||
try { | ||
evaluate.call(context); | ||
catch (e) { | ||
return e; | ||
} | ||
} | ||
catch (e) { | ||
return e; | ||
} | ||
} | ||
// 8.4.1 Module.evaluate... not documented or used because this is potentially unstable | ||
Module.evaluate = function (ns) { | ||
var evaluate = ns[EVALUATE]; | ||
if (evaluate) { | ||
ns[EVALUATE] = undefined; | ||
var err = doEvaluate(evaluate); | ||
if (err) { | ||
// cache the error | ||
ns[EVALUATE] = function () { | ||
// 8.4.1 Module.evaluate... not documented or used because this is potentially unstable | ||
Module.evaluate = function (ns) { | ||
var evaluate = ns[EVALUATE]; | ||
if (evaluate) { | ||
ns[EVALUATE] = undefined; | ||
var err = doEvaluate(evaluate); | ||
if (err) { | ||
// cache the error | ||
ns[EVALUATE] = function () { | ||
throw err; | ||
}; | ||
throw err; | ||
}; | ||
throw err; | ||
} | ||
Object.keys(ns[BASE_OBJECT]).forEach(extendNamespace, ns); | ||
} | ||
Object.keys(ns[BASE_OBJECT]).forEach(extendNamespace, ns); | ||
} | ||
// make chainable | ||
return ns; | ||
}; */ | ||
// make chainable | ||
return ns; | ||
}; */ | ||
/* | ||
* Register Loader | ||
* | ||
* Builds directly on top of loader polyfill to provide: | ||
* - loader.register support | ||
* - hookable higher-level resolve | ||
* - instantiate hook returning a ModuleNamespace or undefined for es module loading | ||
* - loader error behaviour as in HTML and loader specs, caching load and eval errors separately | ||
* - build tracing support by providing a .trace=true and .loads object format | ||
*/ | ||
/* | ||
* Register Loader | ||
* | ||
* Builds directly on top of loader polyfill to provide: | ||
* - loader.register support | ||
* - hookable higher-level resolve | ||
* - instantiate hook returning a ModuleNamespace or undefined for es module loading | ||
* - loader error behaviour as in HTML and loader specs, caching load and eval errors separately | ||
* - build tracing support by providing a .trace=true and .loads object format | ||
*/ | ||
var REGISTER_INTERNAL = createSymbol('register-internal'); | ||
var REGISTER_INTERNAL = createSymbol('register-internal'); | ||
function RegisterLoader$1 () { | ||
Loader.call(this); | ||
function RegisterLoader () { | ||
Loader.call(this); | ||
var registryDelete = this.registry.delete; | ||
this.registry.delete = function (key) { | ||
var deleted = registryDelete.call(this, key); | ||
var registryDelete = this.registry.delete; | ||
this.registry.delete = function (key) { | ||
var deleted = registryDelete.call(this, key); | ||
// also delete from register registry if linked | ||
if (records.hasOwnProperty(key) && !records[key].linkRecord) { | ||
delete records[key]; | ||
deleted = true; | ||
} | ||
// also delete from register registry if linked | ||
if (records.hasOwnProperty(key) && !records[key].linkRecord) { | ||
delete records[key]; | ||
deleted = true; | ||
} | ||
return deleted; | ||
}; | ||
return deleted; | ||
}; | ||
var records = {}; | ||
var records = {}; | ||
this[REGISTER_INTERNAL] = { | ||
// last anonymous System.register call | ||
lastRegister: undefined, | ||
// in-flight es module load records | ||
records: records | ||
}; | ||
this[REGISTER_INTERNAL] = { | ||
// last anonymous System.register call | ||
lastRegister: undefined, | ||
// in-flight es module load records | ||
records: records | ||
}; | ||
// tracing | ||
this.trace = false; | ||
} | ||
// tracing | ||
this.trace = false; | ||
} | ||
RegisterLoader$1.prototype = Object.create(Loader.prototype); | ||
RegisterLoader$1.prototype.constructor = RegisterLoader$1; | ||
RegisterLoader.prototype = Object.create(Loader.prototype); | ||
RegisterLoader.prototype.constructor = RegisterLoader; | ||
var INSTANTIATE = RegisterLoader$1.instantiate = createSymbol('instantiate'); | ||
var INSTANTIATE = RegisterLoader.instantiate = createSymbol('instantiate'); | ||
// default normalize is the WhatWG style normalizer | ||
RegisterLoader$1.prototype[RegisterLoader$1.resolve = Loader.resolve] = function (key, parentKey) { | ||
return resolveIfNotPlain(key, parentKey || baseURI); | ||
}; | ||
// default normalize is the WhatWG style normalizer | ||
RegisterLoader.prototype[RegisterLoader.resolve = Loader.resolve] = function (key, parentKey) { | ||
return resolveIfNotPlain(key, parentKey || baseURI); | ||
}; | ||
RegisterLoader$1.prototype[INSTANTIATE] = function (key, processAnonRegister) {}; | ||
RegisterLoader.prototype[INSTANTIATE] = function (key, processAnonRegister) {}; | ||
// once evaluated, the linkRecord is set to undefined leaving just the other load record properties | ||
// this allows tracking new binding listeners for es modules through importerSetters | ||
// for dynamic modules, the load record is removed entirely. | ||
function createLoadRecord (state, key, registration) { | ||
return state.records[key] = { | ||
key: key, | ||
// once evaluated, the linkRecord is set to undefined leaving just the other load record properties | ||
// this allows tracking new binding listeners for es modules through importerSetters | ||
// for dynamic modules, the load record is removed entirely. | ||
function createLoadRecord (state, key, registration) { | ||
return state.records[key] = { | ||
key: key, | ||
// defined System.register cache | ||
registration: registration, | ||
// defined System.register cache | ||
registration: registration, | ||
// module namespace object | ||
module: undefined, | ||
// module namespace object | ||
module: undefined, | ||
// es-only | ||
// this sticks around so new module loads can listen to binding changes | ||
// for already-loaded modules by adding themselves to their importerSetters | ||
importerSetters: undefined, | ||
// es-only | ||
// this sticks around so new module loads can listen to binding changes | ||
// for already-loaded modules by adding themselves to their importerSetters | ||
importerSetters: undefined, | ||
loadError: undefined, | ||
evalError: undefined, | ||
loadError: undefined, | ||
evalError: undefined, | ||
// in-flight linking record | ||
linkRecord: { | ||
// promise for instantiated | ||
instantiatePromise: undefined, | ||
dependencies: undefined, | ||
execute: undefined, | ||
executingRequire: false, | ||
// in-flight linking record | ||
linkRecord: { | ||
// promise for instantiated | ||
instantiatePromise: undefined, | ||
dependencies: undefined, | ||
execute: undefined, | ||
executingRequire: false, | ||
// underlying module object bindings | ||
moduleObj: undefined, | ||
// underlying module object bindings | ||
moduleObj: undefined, | ||
// es only, also indicates if es or not | ||
setters: undefined, | ||
// es only, also indicates if es or not | ||
setters: undefined, | ||
// promise for instantiated dependencies (dependencyInstantiations populated) | ||
depsInstantiatePromise: undefined, | ||
// will be the array of dependency load record or a module namespace | ||
dependencyInstantiations: undefined, | ||
// promise for instantiated dependencies (dependencyInstantiations populated) | ||
depsInstantiatePromise: undefined, | ||
// will be the array of dependency load record or a module namespace | ||
dependencyInstantiations: undefined, | ||
// NB optimization and way of ensuring module objects in setters | ||
// indicates setters which should run pre-execution of that dependency | ||
// setters is then just for completely executed module objects | ||
// alternatively we just pass the partially filled module objects as | ||
// arguments into the execute function | ||
// hoisted: undefined | ||
} | ||
}; | ||
} | ||
// NB optimization and way of ensuring module objects in setters | ||
// indicates setters which should run pre-execution of that dependency | ||
// setters is then just for completely executed module objects | ||
// alternatively we just pass the partially filled module objects as | ||
// arguments into the execute function | ||
// hoisted: undefined | ||
} | ||
}; | ||
} | ||
RegisterLoader$1.prototype[Loader.resolveInstantiate] = function (key, parentKey) { | ||
var loader = this; | ||
var state = this[REGISTER_INTERNAL]; | ||
var registry = this.registry[REGISTRY]; | ||
RegisterLoader.prototype[Loader.resolveInstantiate] = function (key, parentKey) { | ||
var loader = this; | ||
var state = this[REGISTER_INTERNAL]; | ||
var registry = this.registry[REGISTRY]; | ||
return resolveInstantiate(loader, key, parentKey, registry, state) | ||
.then(function (instantiated) { | ||
if (instantiated instanceof ModuleNamespace) | ||
return instantiated; | ||
return resolveInstantiate(loader, key, parentKey, registry, state) | ||
.then(function (instantiated) { | ||
if (instantiated instanceof ModuleNamespace) | ||
return instantiated; | ||
// resolveInstantiate always returns a load record with a link record and no module value | ||
var link = instantiated.linkRecord; | ||
// resolveInstantiate always returns a load record with a link record and no module value | ||
var link = instantiated.linkRecord; | ||
// if already beaten to done, return | ||
if (!link) { | ||
if (instantiated.module) | ||
return instantiated.module; | ||
throw instantiated.evalError; | ||
} | ||
// if already beaten to done, return | ||
if (!link) { | ||
if (instantiated.module) | ||
return instantiated.module; | ||
throw instantiated.evalError; | ||
} | ||
return deepInstantiateDeps(loader, instantiated, link, registry, state) | ||
.then(function () { | ||
return ensureEvaluate(loader, instantiated, link, registry, state, undefined); | ||
return deepInstantiateDeps(loader, instantiated, link, registry, state) | ||
.then(function () { | ||
return ensureEvaluate(loader, instantiated, link, registry, state, undefined); | ||
}); | ||
}); | ||
}); | ||
}; | ||
}; | ||
function resolveInstantiate (loader, key, parentKey, registry, state) { | ||
// normalization shortpath for already-normalized key | ||
// could add a plain name filter, but doesn't yet seem necessary for perf | ||
var module = registry[key]; | ||
if (module) | ||
return Promise.resolve(module); | ||
var load = state.records[key]; | ||
// already linked but not in main registry is ignored | ||
if (load && !load.module) { | ||
if (load.loadError) | ||
return Promise.reject(load.loadError); | ||
return instantiate(loader, load, load.linkRecord, registry, state); | ||
} | ||
return loader.resolve(key, parentKey) | ||
.then(function (resolvedKey) { | ||
// main loader registry always takes preference | ||
module = registry[resolvedKey]; | ||
function resolveInstantiate (loader, key, parentKey, registry, state) { | ||
// normalization shortpath for already-normalized key | ||
// could add a plain name filter, but doesn't yet seem necessary for perf | ||
var module = registry[key]; | ||
if (module) | ||
return module; | ||
return Promise.resolve(module); | ||
load = state.records[resolvedKey]; | ||
var load = state.records[key]; | ||
// already has a module value but not already in the registry (load.module) | ||
// means it was removed by registry.delete, so we should | ||
// disgard the current load record creating a new one over it | ||
// but keep any existing registration | ||
if (!load || load.module) | ||
load = createLoadRecord(state, resolvedKey, load && load.registration); | ||
// already linked but not in main registry is ignored | ||
if (load && !load.module) { | ||
if (load.loadError) | ||
return Promise.reject(load.loadError); | ||
return instantiate(loader, load, load.linkRecord, registry, state); | ||
} | ||
if (load.loadError) | ||
return Promise.reject(load.loadError); | ||
return loader.resolve(key, parentKey) | ||
.then(function (resolvedKey) { | ||
// main loader registry always takes preference | ||
module = registry[resolvedKey]; | ||
if (module) | ||
return module; | ||
var link = load.linkRecord; | ||
if (!link) | ||
return load; | ||
load = state.records[resolvedKey]; | ||
return instantiate(loader, load, link, registry, state); | ||
}); | ||
} | ||
// already has a module value but not already in the registry (load.module) | ||
// means it was removed by registry.delete, so we should | ||
// disgard the current load record creating a new one over it | ||
// but keep any existing registration | ||
if (!load || load.module) | ||
load = createLoadRecord(state, resolvedKey, load && load.registration); | ||
function createProcessAnonRegister (loader, load, state) { | ||
return function () { | ||
var lastRegister = state.lastRegister; | ||
if (load.loadError) | ||
return Promise.reject(load.loadError); | ||
if (!lastRegister) | ||
return !!load.registration; | ||
var link = load.linkRecord; | ||
if (!link) | ||
return load; | ||
state.lastRegister = undefined; | ||
load.registration = lastRegister; | ||
return instantiate(loader, load, link, registry, state); | ||
}); | ||
} | ||
return true; | ||
}; | ||
} | ||
function createProcessAnonRegister (loader, load, state) { | ||
return function () { | ||
var lastRegister = state.lastRegister; | ||
function instantiate (loader, load, link, registry, state) { | ||
return link.instantiatePromise || (link.instantiatePromise = | ||
// if there is already an existing registration, skip running instantiate | ||
(load.registration ? Promise.resolve() : Promise.resolve().then(function () { | ||
state.lastRegister = undefined; | ||
return loader[INSTANTIATE](load.key, loader[INSTANTIATE].length > 1 && createProcessAnonRegister(loader, load, state)); | ||
})) | ||
.then(function (instantiation) { | ||
// direct module return from instantiate -> we're done | ||
if (instantiation !== undefined) { | ||
if (!(instantiation instanceof ModuleNamespace)) | ||
throw new TypeError('Instantiate did not return a valid Module object.'); | ||
if (!lastRegister) | ||
return !!load.registration; | ||
delete state.records[load.key]; | ||
if (loader.trace) | ||
traceLoad(loader, load, link); | ||
return registry[load.key] = instantiation; | ||
} | ||
state.lastRegister = undefined; | ||
load.registration = lastRegister; | ||
// run the cached loader.register declaration if there is one | ||
var registration = load.registration; | ||
// clear to allow new registrations for future loads (combined with registry delete) | ||
load.registration = undefined; | ||
if (!registration) | ||
throw new TypeError('Module instantiation did not call an anonymous or correctly named System.register.'); | ||
return true; | ||
}; | ||
} | ||
link.dependencies = registration[0]; | ||
function instantiate (loader, load, link, registry, state) { | ||
return link.instantiatePromise || (link.instantiatePromise = | ||
// if there is already an existing registration, skip running instantiate | ||
(load.registration ? Promise.resolve() : Promise.resolve().then(function () { | ||
state.lastRegister = undefined; | ||
return loader[INSTANTIATE](load.key, loader[INSTANTIATE].length > 1 && createProcessAnonRegister(loader, load, state)); | ||
})) | ||
.then(function (instantiation) { | ||
// direct module return from instantiate -> we're done | ||
if (instantiation !== undefined) { | ||
if (!(instantiation instanceof ModuleNamespace)) | ||
throw new TypeError('Instantiate did not return a valid Module object.'); | ||
load.importerSetters = []; | ||
delete state.records[load.key]; | ||
if (loader.trace) | ||
traceLoad(loader, load, link); | ||
return registry[load.key] = instantiation; | ||
} | ||
link.moduleObj = {}; | ||
// run the cached loader.register declaration if there is one | ||
var registration = load.registration; | ||
// clear to allow new registrations for future loads (combined with registry delete) | ||
load.registration = undefined; | ||
if (!registration) | ||
throw new TypeError('Module instantiation did not call an anonymous or correctly named System.register.'); | ||
// process System.registerDynamic declaration | ||
if (registration[2]) { | ||
link.moduleObj.default = link.moduleObj.__useDefault = {}; | ||
link.executingRequire = registration[1]; | ||
link.execute = registration[2]; | ||
} | ||
link.dependencies = registration[0]; | ||
// process System.register declaration | ||
else { | ||
registerDeclarative(loader, load, link, registration[1]); | ||
} | ||
load.importerSetters = []; | ||
return load; | ||
}) | ||
.catch(function (err) { | ||
load.linkRecord = undefined; | ||
throw load.loadError = load.loadError || LoaderError__Check_error_message_for_loader_stack(err, 'Instantiating ' + load.key); | ||
})); | ||
} | ||
link.moduleObj = {}; | ||
// like resolveInstantiate, but returning load records for linking | ||
function resolveInstantiateDep (loader, key, parentKey, registry, state, traceDepMap) { | ||
// normalization shortpaths for already-normalized key | ||
// DISABLED to prioritise consistent resolver calls | ||
// could add a plain name filter, but doesn't yet seem necessary for perf | ||
/* var load = state.records[key]; | ||
var module = registry[key]; | ||
// process System.registerDynamic declaration | ||
if (registration[2]) { | ||
link.moduleObj.default = link.moduleObj.__useDefault = {}; | ||
link.executingRequire = registration[1]; | ||
link.execute = registration[2]; | ||
} | ||
if (module) { | ||
if (traceDepMap) | ||
traceDepMap[key] = key; | ||
// process System.register declaration | ||
else { | ||
registerDeclarative(loader, load, link, registration[1]); | ||
} | ||
// registry authority check in case module was deleted or replaced in main registry | ||
if (load && load.module && load.module === module) | ||
return load; | ||
else | ||
return module; | ||
}) | ||
.catch(function (err) { | ||
load.linkRecord = undefined; | ||
throw load.loadError = load.loadError || LoaderError__Check_error_message_for_loader_stack(err, 'Instantiating ' + load.key); | ||
})); | ||
} | ||
// already linked but not in main registry is ignored | ||
if (load && !load.module) { | ||
if (traceDepMap) | ||
traceDepMap[key] = key; | ||
return instantiate(loader, load, load.linkRecord, registry, state); | ||
} */ | ||
return loader.resolve(key, parentKey) | ||
.then(function (resolvedKey) { | ||
if (traceDepMap) | ||
traceDepMap[key] = resolvedKey; | ||
// like resolveInstantiate, but returning load records for linking | ||
function resolveInstantiateDep (loader, key, parentKey, registry, state, traceDepMap) { | ||
// normalization shortpaths for already-normalized key | ||
var load = state.records[resolvedKey]; | ||
var module = registry[resolvedKey]; | ||
// DISABLED to prioritise consistent resolver calls | ||
// could add a plain name filter, but doesn't yet seem necessary for perf | ||
/* var load = state.records[key]; | ||
var module = registry[key]; | ||
// main loader registry always takes preference | ||
if (module && (!load || load.module && module !== load.module)) | ||
return module; | ||
if (module) { | ||
if (traceDepMap) | ||
traceDepMap[key] = key; | ||
if (load && load.loadError) | ||
throw load.loadError; | ||
// registry authority check in case module was deleted or replaced in main registry | ||
if (load && load.module && load.module === module) | ||
return load; | ||
else | ||
return module; | ||
} | ||
// already has a module value but not already in the registry (load.module) | ||
// means it was removed by registry.delete, so we should | ||
// disgard the current load record creating a new one over it | ||
// but keep any existing registration | ||
if (!load || !module && load.module) | ||
load = createLoadRecord(state, resolvedKey, load && load.registration); | ||
// already linked but not in main registry is ignored | ||
if (load && !load.module) { | ||
if (traceDepMap) | ||
traceDepMap[key] = key; | ||
return instantiate(loader, load, load.linkRecord, registry, state); | ||
} */ | ||
return loader.resolve(key, parentKey) | ||
.then(function (resolvedKey) { | ||
if (traceDepMap) | ||
traceDepMap[key] = resolvedKey; | ||
var link = load.linkRecord; | ||
if (!link) | ||
return load; | ||
// normalization shortpaths for already-normalized key | ||
var load = state.records[resolvedKey]; | ||
var module = registry[resolvedKey]; | ||
return instantiate(loader, load, link, registry, state); | ||
}); | ||
} | ||
// main loader registry always takes preference | ||
if (module && (!load || load.module && module !== load.module)) | ||
return module; | ||
function traceLoad (loader, load, link) { | ||
loader.loads = loader.loads || {}; | ||
loader.loads[load.key] = { | ||
key: load.key, | ||
deps: link.dependencies, | ||
dynamicDeps: [], | ||
depMap: link.depMap || {} | ||
}; | ||
} | ||
if (load && load.loadError) | ||
throw load.loadError; | ||
/* | ||
* Convert a CJS module.exports into a valid object for new Module: | ||
* | ||
* new Module(getEsModule(module.exports)) | ||
* | ||
* Sets the default value to the module, while also reading off named exports carefully. | ||
*/ | ||
function registerDeclarative (loader, load, link, declare) { | ||
var moduleObj = link.moduleObj; | ||
var importerSetters = load.importerSetters; | ||
// already has a module value but not already in the registry (load.module) | ||
// means it was removed by registry.delete, so we should | ||
// disgard the current load record creating a new one over it | ||
// but keep any existing registration | ||
if (!load || !module && load.module) | ||
load = createLoadRecord(state, resolvedKey, load && load.registration); | ||
var definedExports = false; | ||
var link = load.linkRecord; | ||
if (!link) | ||
return load; | ||
// closure especially not based on link to allow link record disposal | ||
var declared = declare.call(envGlobal, function (name, value) { | ||
if (typeof name === 'object') { | ||
var changed = false; | ||
for (var p in name) { | ||
value = name[p]; | ||
if (p !== '__useDefault' && (!(p in moduleObj) || moduleObj[p] !== value)) { | ||
changed = true; | ||
moduleObj[p] = value; | ||
return instantiate(loader, load, link, registry, state); | ||
}); | ||
} | ||
function traceLoad (loader, load, link) { | ||
loader.loads = loader.loads || {}; | ||
loader.loads[load.key] = { | ||
key: load.key, | ||
deps: link.dependencies, | ||
dynamicDeps: [], | ||
depMap: link.depMap || {} | ||
}; | ||
} | ||
/* | ||
* Convert a CJS module.exports into a valid object for new Module: | ||
* | ||
* new Module(getEsModule(module.exports)) | ||
* | ||
* Sets the default value to the module, while also reading off named exports carefully. | ||
*/ | ||
function registerDeclarative (loader, load, link, declare) { | ||
var moduleObj = link.moduleObj; | ||
var importerSetters = load.importerSetters; | ||
var definedExports = false; | ||
// closure especially not based on link to allow link record disposal | ||
var declared = declare.call(envGlobal, function (name, value) { | ||
if (typeof name === 'object') { | ||
var changed = false; | ||
for (var p in name) { | ||
value = name[p]; | ||
if (p !== '__useDefault' && (!(p in moduleObj) || moduleObj[p] !== value)) { | ||
changed = true; | ||
moduleObj[p] = value; | ||
} | ||
} | ||
if (changed === false) | ||
return value; | ||
} | ||
if (changed === false) | ||
return value; | ||
} | ||
else { | ||
if ((definedExports || name in moduleObj) && moduleObj[name] === value) | ||
return value; | ||
moduleObj[name] = value; | ||
} | ||
else { | ||
if ((definedExports || name in moduleObj) && moduleObj[name] === value) | ||
return value; | ||
moduleObj[name] = value; | ||
} | ||
for (var i = 0; i < importerSetters.length; i++) | ||
importerSetters[i](moduleObj); | ||
for (var i = 0; i < importerSetters.length; i++) | ||
importerSetters[i](moduleObj); | ||
return value; | ||
}, new ContextualLoader(loader, load.key)); | ||
return value; | ||
}, new ContextualLoader(loader, load.key)); | ||
link.setters = declared.setters; | ||
link.execute = declared.execute; | ||
if (declared.exports) { | ||
link.moduleObj = moduleObj = declared.exports; | ||
definedExports = true; | ||
link.setters = declared.setters; | ||
link.execute = declared.execute; | ||
if (declared.exports) { | ||
link.moduleObj = moduleObj = declared.exports; | ||
definedExports = true; | ||
} | ||
} | ||
} | ||
function instantiateDeps (loader, load, link, registry, state) { | ||
if (link.depsInstantiatePromise) | ||
return link.depsInstantiatePromise; | ||
function instantiateDeps (loader, load, link, registry, state) { | ||
if (link.depsInstantiatePromise) | ||
return link.depsInstantiatePromise; | ||
var depsInstantiatePromises = Array(link.dependencies.length); | ||
var depsInstantiatePromises = Array(link.dependencies.length); | ||
for (var i = 0; i < link.dependencies.length; i++) | ||
depsInstantiatePromises[i] = resolveInstantiateDep(loader, link.dependencies[i], load.key, registry, state, loader.trace && link.depMap || (link.depMap = {})); | ||
for (var i = 0; i < link.dependencies.length; i++) | ||
depsInstantiatePromises[i] = resolveInstantiateDep(loader, link.dependencies[i], load.key, registry, state, loader.trace && link.depMap || (link.depMap = {})); | ||
var depsInstantiatePromise = Promise.all(depsInstantiatePromises) | ||
.then(function (dependencyInstantiations) { | ||
link.dependencyInstantiations = dependencyInstantiations; | ||
var depsInstantiatePromise = Promise.all(depsInstantiatePromises) | ||
.then(function (dependencyInstantiations) { | ||
link.dependencyInstantiations = dependencyInstantiations; | ||
// run setters to set up bindings to instantiated dependencies | ||
if (link.setters) { | ||
for (var i = 0; i < dependencyInstantiations.length; i++) { | ||
var setter = link.setters[i]; | ||
if (setter) { | ||
var instantiation = dependencyInstantiations[i]; | ||
// run setters to set up bindings to instantiated dependencies | ||
if (link.setters) { | ||
for (var i = 0; i < dependencyInstantiations.length; i++) { | ||
var setter = link.setters[i]; | ||
if (setter) { | ||
var instantiation = dependencyInstantiations[i]; | ||
if (instantiation instanceof ModuleNamespace) { | ||
setter(instantiation); | ||
if (instantiation instanceof ModuleNamespace) { | ||
setter(instantiation); | ||
} | ||
else { | ||
if (instantiation.loadError) | ||
throw instantiation.loadError; | ||
setter(instantiation.module || instantiation.linkRecord.moduleObj); | ||
// this applies to both es and dynamic registrations | ||
if (instantiation.importerSetters) | ||
instantiation.importerSetters.push(setter); | ||
} | ||
} | ||
else { | ||
if (instantiation.loadError) | ||
throw instantiation.loadError; | ||
setter(instantiation.module || instantiation.linkRecord.moduleObj); | ||
// this applies to both es and dynamic registrations | ||
if (instantiation.importerSetters) | ||
instantiation.importerSetters.push(setter); | ||
} | ||
} | ||
} | ||
} | ||
return load; | ||
}); | ||
if (loader.trace) | ||
depsInstantiatePromise = depsInstantiatePromise.then(function () { | ||
traceLoad(loader, load, link); | ||
return load; | ||
}); | ||
depsInstantiatePromise = depsInstantiatePromise.catch(function (err) { | ||
// throw up the instantiateDeps stack | ||
link.depsInstantiatePromise = undefined; | ||
throw LoaderError__Check_error_message_for_loader_stack(err, 'Loading ' + load.key); | ||
}); | ||
if (loader.trace) | ||
depsInstantiatePromise = depsInstantiatePromise.then(function () { | ||
traceLoad(loader, load, link); | ||
return load; | ||
}); | ||
depsInstantiatePromise.catch(function () {}); | ||
depsInstantiatePromise = depsInstantiatePromise.catch(function (err) { | ||
// throw up the instantiateDeps stack | ||
link.depsInstantiatePromise = undefined; | ||
throw LoaderError__Check_error_message_for_loader_stack(err, 'Loading ' + load.key); | ||
}); | ||
return link.depsInstantiatePromise = depsInstantiatePromise; | ||
} | ||
depsInstantiatePromise.catch(function () {}); | ||
function deepInstantiateDeps (loader, load, link, registry, state) { | ||
return new Promise(function (resolve, reject) { | ||
var seen = []; | ||
var loadCnt = 0; | ||
function queueLoad (load) { | ||
var link = load.linkRecord; | ||
if (!link) | ||
return; | ||
return link.depsInstantiatePromise = depsInstantiatePromise; | ||
} | ||
if (seen.indexOf(load) !== -1) | ||
return; | ||
seen.push(load); | ||
function deepInstantiateDeps (loader, load, link, registry, state) { | ||
return new Promise(function (resolve, reject) { | ||
var seen = []; | ||
var loadCnt = 0; | ||
function queueLoad (load) { | ||
var link = load.linkRecord; | ||
if (!link) | ||
return; | ||
loadCnt++; | ||
instantiateDeps(loader, load, link, registry, state) | ||
.then(processLoad, reject); | ||
} | ||
function processLoad (load) { | ||
loadCnt--; | ||
var link = load.linkRecord; | ||
if (link) { | ||
for (var i = 0; i < link.dependencies.length; i++) { | ||
var depLoad = link.dependencyInstantiations[i]; | ||
if (!(depLoad instanceof ModuleNamespace)) | ||
queueLoad(depLoad); | ||
if (seen.indexOf(load) !== -1) | ||
return; | ||
seen.push(load); | ||
loadCnt++; | ||
instantiateDeps(loader, load, link, registry, state) | ||
.then(processLoad, reject); | ||
} | ||
function processLoad (load) { | ||
loadCnt--; | ||
var link = load.linkRecord; | ||
if (link) { | ||
for (var i = 0; i < link.dependencies.length; i++) { | ||
var depLoad = link.dependencyInstantiations[i]; | ||
if (!(depLoad instanceof ModuleNamespace)) | ||
queueLoad(depLoad); | ||
} | ||
} | ||
if (loadCnt === 0) | ||
resolve(); | ||
} | ||
if (loadCnt === 0) | ||
resolve(); | ||
queueLoad(load); | ||
}); | ||
} | ||
/* | ||
* System.register | ||
*/ | ||
RegisterLoader.prototype.register = function (key, deps, declare) { | ||
var state = this[REGISTER_INTERNAL]; | ||
// anonymous modules get stored as lastAnon | ||
if (declare === undefined) { | ||
state.lastRegister = [key, deps, undefined]; | ||
} | ||
queueLoad(load); | ||
}); | ||
} | ||
/* | ||
* System.register | ||
*/ | ||
RegisterLoader$1.prototype.register = function (key, deps, declare) { | ||
var state = this[REGISTER_INTERNAL]; | ||
// everything else registers into the register cache | ||
else { | ||
var load = state.records[key] || createLoadRecord(state, key, undefined); | ||
load.registration = [deps, declare, undefined]; | ||
} | ||
}; | ||
// anonymous modules get stored as lastAnon | ||
if (declare === undefined) { | ||
state.lastRegister = [key, deps, undefined]; | ||
} | ||
/* | ||
* System.registerDyanmic | ||
*/ | ||
RegisterLoader.prototype.registerDynamic = function (key, deps, executingRequire, execute) { | ||
var state = this[REGISTER_INTERNAL]; | ||
// everything else registers into the register cache | ||
else { | ||
var load = state.records[key] || createLoadRecord(state, key, undefined); | ||
load.registration = [deps, declare, undefined]; | ||
} | ||
}; | ||
// anonymous modules get stored as lastAnon | ||
if (typeof key !== 'string') { | ||
state.lastRegister = [key, deps, executingRequire]; | ||
} | ||
/* | ||
* System.registerDyanmic | ||
*/ | ||
RegisterLoader$1.prototype.registerDynamic = function (key, deps, executingRequire, execute) { | ||
var state = this[REGISTER_INTERNAL]; | ||
// everything else registers into the register cache | ||
else { | ||
var load = state.records[key] || createLoadRecord(state, key, undefined); | ||
load.registration = [deps, executingRequire, execute]; | ||
} | ||
}; | ||
// anonymous modules get stored as lastAnon | ||
if (typeof key !== 'string') { | ||
state.lastRegister = [key, deps, executingRequire]; | ||
// ContextualLoader class | ||
// backwards-compatible with previous System.register context argument by exposing .id, .key | ||
function ContextualLoader (loader, key) { | ||
this.loader = loader; | ||
this.key = this.id = key; | ||
this.meta = { | ||
url: key | ||
// scriptElement: null | ||
}; | ||
} | ||
// everything else registers into the register cache | ||
else { | ||
var load = state.records[key] || createLoadRecord(state, key, undefined); | ||
load.registration = [deps, executingRequire, execute]; | ||
} | ||
}; | ||
// ContextualLoader class | ||
// backwards-compatible with previous System.register context argument by exposing .id, .key | ||
function ContextualLoader (loader, key) { | ||
this.loader = loader; | ||
this.key = this.id = key; | ||
this.meta = { | ||
url: key | ||
// scriptElement: null | ||
/*ContextualLoader.prototype.constructor = function () { | ||
throw new TypeError('Cannot subclass the contextual loader only Reflect.Loader.'); | ||
};*/ | ||
ContextualLoader.prototype.import = function (key) { | ||
if (this.loader.trace) | ||
this.loader.loads[this.key].dynamicDeps.push(key); | ||
return this.loader.import(key, this.key); | ||
}; | ||
} | ||
/*ContextualLoader.prototype.constructor = function () { | ||
throw new TypeError('Cannot subclass the contextual loader only Reflect.Loader.'); | ||
};*/ | ||
ContextualLoader.prototype.import = function (key) { | ||
if (this.loader.trace) | ||
this.loader.loads[this.key].dynamicDeps.push(key); | ||
return this.loader.import(key, this.key); | ||
}; | ||
/*ContextualLoader.prototype.resolve = function (key) { | ||
return this.loader.resolve(key, this.key); | ||
};*/ | ||
/*ContextualLoader.prototype.resolve = function (key) { | ||
return this.loader.resolve(key, this.key); | ||
};*/ | ||
// this is the execution function bound to the Module namespace record | ||
function ensureEvaluate (loader, load, link, registry, state, seen) { | ||
if (load.module) | ||
return load.module; | ||
// this is the execution function bound to the Module namespace record | ||
function ensureEvaluate (loader, load, link, registry, state, seen) { | ||
if (load.module) | ||
return load.module; | ||
if (load.evalError) | ||
throw load.evalError; | ||
if (load.evalError) | ||
throw load.evalError; | ||
if (seen && seen.indexOf(load) !== -1) | ||
return load.linkRecord.moduleObj; | ||
if (seen && seen.indexOf(load) !== -1) | ||
return load.linkRecord.moduleObj; | ||
// for ES loads we always run ensureEvaluate on top-level, so empty seen is passed regardless | ||
// for dynamic loads, we pass seen if also dynamic | ||
var err = doEvaluate(loader, load, link, registry, state, link.setters ? [] : seen || []); | ||
if (err) | ||
throw err; | ||
// for ES loads we always run ensureEvaluate on top-level, so empty seen is passed regardless | ||
// for dynamic loads, we pass seen if also dynamic | ||
var err = doEvaluate(loader, load, link, registry, state, link.setters ? [] : seen || []); | ||
if (err) | ||
throw err; | ||
return load.module; | ||
} | ||
return load.module; | ||
} | ||
function makeDynamicRequire (loader, key, dependencies, dependencyInstantiations, registry, state, seen) { | ||
// we can only require from already-known dependencies | ||
return function (name) { | ||
for (var i = 0; i < dependencies.length; i++) { | ||
if (dependencies[i] === name) { | ||
var depLoad = dependencyInstantiations[i]; | ||
var module; | ||
function makeDynamicRequire (loader, key, dependencies, dependencyInstantiations, registry, state, seen) { | ||
// we can only require from already-known dependencies | ||
return function (name) { | ||
for (var i = 0; i < dependencies.length; i++) { | ||
if (dependencies[i] === name) { | ||
var depLoad = dependencyInstantiations[i]; | ||
var module; | ||
if (depLoad instanceof ModuleNamespace) | ||
module = depLoad; | ||
else | ||
module = ensureEvaluate(loader, depLoad, depLoad.linkRecord, registry, state, seen); | ||
if (depLoad instanceof ModuleNamespace) | ||
module = depLoad; | ||
else | ||
module = ensureEvaluate(loader, depLoad, depLoad.linkRecord, registry, state, seen); | ||
return '__useDefault' in module ? module.__useDefault : module; | ||
return '__useDefault' in module ? module.__useDefault : module; | ||
} | ||
} | ||
} | ||
throw new Error('Module ' + name + ' not declared as a System.registerDynamic dependency of ' + key); | ||
}; | ||
} | ||
throw new Error('Module ' + name + ' not declared as a System.registerDynamic dependency of ' + key); | ||
}; | ||
} | ||
// ensures the given es load is evaluated | ||
// returns the error if any | ||
function doEvaluate (loader, load, link, registry, state, seen) { | ||
seen.push(load); | ||
// ensures the given es load is evaluated | ||
// returns the error if any | ||
function doEvaluate (loader, load, link, registry, state, seen) { | ||
seen.push(load); | ||
var err; | ||
var err; | ||
// es modules evaluate dependencies first | ||
// non es modules explicitly call moduleEvaluate through require | ||
if (link.setters) { | ||
var depLoad, depLink; | ||
for (var i = 0; i < link.dependencies.length; i++) { | ||
depLoad = link.dependencyInstantiations[i]; | ||
// es modules evaluate dependencies first | ||
// non es modules explicitly call moduleEvaluate through require | ||
if (link.setters) { | ||
var depLoad, depLink; | ||
for (var i = 0; i < link.dependencies.length; i++) { | ||
depLoad = link.dependencyInstantiations[i]; | ||
if (depLoad instanceof ModuleNamespace) | ||
continue; | ||
if (depLoad instanceof ModuleNamespace) | ||
continue; | ||
// custom Module returned from instantiate | ||
depLink = depLoad.linkRecord; | ||
if (depLink && seen.indexOf(depLoad) === -1) { | ||
if (depLoad.evalError) | ||
err = depLoad.evalError; | ||
else | ||
// dynamic / declarative boundaries clear the "seen" list | ||
// we just let cross format circular throw as would happen in real implementations | ||
err = doEvaluate(loader, depLoad, depLink, registry, state, depLink.setters ? seen : []); | ||
} | ||
// custom Module returned from instantiate | ||
depLink = depLoad.linkRecord; | ||
if (depLink && seen.indexOf(depLoad) === -1) { | ||
if (depLoad.evalError) | ||
err = depLoad.evalError; | ||
else | ||
// dynamic / declarative boundaries clear the "seen" list | ||
// we just let cross format circular throw as would happen in real implementations | ||
err = doEvaluate(loader, depLoad, depLink, registry, state, depLink.setters ? seen : []); | ||
} | ||
if (err) { | ||
load.linkRecord = undefined; | ||
load.evalError = LoaderError__Check_error_message_for_loader_stack(err, 'Evaluating ' + load.key); | ||
return load.evalError; | ||
if (err) { | ||
load.linkRecord = undefined; | ||
load.evalError = LoaderError__Check_error_message_for_loader_stack(err, 'Evaluating ' + load.key); | ||
return load.evalError; | ||
} | ||
} | ||
} | ||
} | ||
// link.execute won't exist for Module returns from instantiate on top-level load | ||
if (link.execute) { | ||
// ES System.register execute | ||
// "this" is null in ES | ||
if (link.setters) { | ||
err = declarativeExecute(link.execute); | ||
} | ||
// System.registerDynamic execute | ||
// "this" is "exports" in CJS | ||
else { | ||
var module = { id: load.key }; | ||
var moduleObj = link.moduleObj; | ||
Object.defineProperty(module, 'exports', { | ||
configurable: true, | ||
set: function (exports) { | ||
moduleObj.default = moduleObj.__useDefault = exports; | ||
}, | ||
get: function () { | ||
return moduleObj.__useDefault; | ||
} | ||
}); | ||
// link.execute won't exist for Module returns from instantiate on top-level load | ||
if (link.execute) { | ||
// ES System.register execute | ||
// "this" is null in ES | ||
if (link.setters) { | ||
err = declarativeExecute(link.execute); | ||
} | ||
// System.registerDynamic execute | ||
// "this" is "exports" in CJS | ||
else { | ||
var module = { id: load.key }; | ||
var moduleObj = link.moduleObj; | ||
Object.defineProperty(module, 'exports', { | ||
configurable: true, | ||
set: function (exports) { | ||
moduleObj.default = moduleObj.__useDefault = exports; | ||
}, | ||
get: function () { | ||
return moduleObj.__useDefault; | ||
} | ||
}); | ||
var require = makeDynamicRequire(loader, load.key, link.dependencies, link.dependencyInstantiations, registry, state, seen); | ||
var require = makeDynamicRequire(loader, load.key, link.dependencies, link.dependencyInstantiations, registry, state, seen); | ||
// evaluate deps first | ||
if (!link.executingRequire) | ||
for (var i = 0; i < link.dependencies.length; i++) | ||
require(link.dependencies[i]); | ||
// evaluate deps first | ||
if (!link.executingRequire) | ||
for (var i = 0; i < link.dependencies.length; i++) | ||
require(link.dependencies[i]); | ||
err = dynamicExecute(link.execute, require, moduleObj.default, module); | ||
err = dynamicExecute(link.execute, require, moduleObj.default, module); | ||
// pick up defineProperty calls to module.exports when we can | ||
if (module.exports !== moduleObj.__useDefault) | ||
moduleObj.default = moduleObj.__useDefault = module.exports; | ||
// pick up defineProperty calls to module.exports when we can | ||
if (module.exports !== moduleObj.__useDefault) | ||
moduleObj.default = moduleObj.__useDefault = module.exports; | ||
var moduleDefault = moduleObj.default; | ||
var moduleDefault = moduleObj.default; | ||
// __esModule flag extension support via lifting | ||
if (moduleDefault && moduleDefault.__esModule) { | ||
for (var p in moduleDefault) { | ||
if (Object.hasOwnProperty.call(moduleDefault, p)) | ||
moduleObj[p] = moduleDefault[p]; | ||
// __esModule flag extension support via lifting | ||
if (moduleDefault && moduleDefault.__esModule) { | ||
for (var p in moduleDefault) { | ||
if (Object.hasOwnProperty.call(moduleDefault, p)) | ||
moduleObj[p] = moduleDefault[p]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
// dispose link record | ||
load.linkRecord = undefined; | ||
// dispose link record | ||
load.linkRecord = undefined; | ||
if (err) | ||
return load.evalError = LoaderError__Check_error_message_for_loader_stack(err, 'Evaluating ' + load.key); | ||
if (err) | ||
return load.evalError = LoaderError__Check_error_message_for_loader_stack(err, 'Evaluating ' + load.key); | ||
registry[load.key] = load.module = new ModuleNamespace(link.moduleObj); | ||
registry[load.key] = load.module = new ModuleNamespace(link.moduleObj); | ||
// if not an esm module, run importer setters and clear them | ||
// this allows dynamic modules to update themselves into es modules | ||
// as soon as execution has completed | ||
if (!link.setters) { | ||
if (load.importerSetters) | ||
for (var i = 0; i < load.importerSetters.length; i++) | ||
load.importerSetters[i](load.module); | ||
load.importerSetters = undefined; | ||
// if not an esm module, run importer setters and clear them | ||
// this allows dynamic modules to update themselves into es modules | ||
// as soon as execution has completed | ||
if (!link.setters) { | ||
if (load.importerSetters) | ||
for (var i = 0; i < load.importerSetters.length; i++) | ||
load.importerSetters[i](load.module); | ||
load.importerSetters = undefined; | ||
} | ||
} | ||
} | ||
// {} is the closest we can get to call(undefined) | ||
var nullContext = {}; | ||
if (Object.freeze) | ||
Object.freeze(nullContext); | ||
// {} is the closest we can get to call(undefined) | ||
var nullContext = {}; | ||
if (Object.freeze) | ||
Object.freeze(nullContext); | ||
function declarativeExecute (execute) { | ||
try { | ||
execute.call(nullContext); | ||
function declarativeExecute (execute) { | ||
try { | ||
execute.call(nullContext); | ||
} | ||
catch (e) { | ||
return e; | ||
} | ||
} | ||
catch (e) { | ||
return e; | ||
} | ||
} | ||
function dynamicExecute (execute, require, exports, module) { | ||
try { | ||
var output = execute.call(envGlobal, require, exports, module); | ||
if (output !== undefined) | ||
module.exports = output; | ||
function dynamicExecute (execute, require, exports, module) { | ||
try { | ||
var output = execute.call(envGlobal, require, exports, module); | ||
if (output !== undefined) | ||
module.exports = output; | ||
} | ||
catch (e) { | ||
return e; | ||
} | ||
} | ||
catch (e) { | ||
return e; | ||
} | ||
} | ||
var resolvedPromise = Promise.resolve(); | ||
function noop () {} | ||
var resolvedPromise$1 = Promise.resolve(); | ||
function noop () {} | ||
var emptyModule = new ModuleNamespace({}); | ||
var emptyModule = new ModuleNamespace({}); | ||
var hasStringTag; | ||
function isModule (m) { | ||
if (hasStringTag === undefined) | ||
hasStringTag = typeof Symbol !== 'undefined' && !!Symbol.toStringTag; | ||
return m instanceof ModuleNamespace || hasStringTag && Object.prototype.toString.call(m) == '[object Module]'; | ||
} | ||
var CONFIG = createSymbol('loader-config'); | ||
var PLAIN_RESOLVE = createSymbol('plain-resolve'); | ||
var PLAIN_RESOLVE_SYNC = createSymbol('plain-resolve-sync'); | ||
var isWorker = typeof window === 'undefined' && typeof self !== 'undefined' && typeof importScripts !== 'undefined'; | ||
var hasStringTag; | ||
function isModule (m) { | ||
if (hasStringTag === undefined) | ||
hasStringTag = typeof Symbol !== 'undefined' && !!Symbol.toStringTag; | ||
return m instanceof ModuleNamespace || hasStringTag && Object.prototype.toString.call(m) == '[object Module]'; | ||
} | ||
var CONFIG = createSymbol('loader-config'); | ||
var PLAIN_RESOLVE = createSymbol('plain-resolve'); | ||
var PLAIN_RESOLVE_SYNC = createSymbol('plain-resolve-sync'); | ||
var isWorker = typeof window === 'undefined' && typeof self !== 'undefined' && typeof importScripts !== 'undefined'; | ||
function extend (a, b) { | ||
for (var p in b) { | ||
if (!Object.hasOwnProperty.call(b, p)) | ||
continue; | ||
a[p] = b[p]; | ||
function extend (a, b) { | ||
for (var p in b) { | ||
if (!Object.hasOwnProperty.call(b, p)) | ||
continue; | ||
a[p] = b[p]; | ||
} | ||
return a; | ||
} | ||
return a; | ||
} | ||
var supportsPreload = false, supportsPrefetch = false; | ||
if (isBrowser) | ||
(function () { | ||
var relList = document.createElement('link').relList; | ||
if (relList && relList.supports) { | ||
supportsPrefetch = true; | ||
try { | ||
supportsPreload = relList.supports('preload'); | ||
} | ||
catch (e) {} | ||
} | ||
})(); | ||
function preloadScript (url) { | ||
// fallback to old fashioned image technique which still works in safari | ||
if (!supportsPreload && !supportsPrefetch) { | ||
var preloadImage = new Image(); | ||
preloadImage.src = url; | ||
return; | ||
} | ||
// meta first-level extends where: | ||
// array + array appends | ||
// object + object extends | ||
// other properties replace | ||
var supportsPreload = false; | ||
var supportsPrefetch = false; | ||
if (isBrowser) | ||
(function () { | ||
var relList = document.createElement('link').relList; | ||
if (relList && relList.supports) { | ||
supportsPrefetch = true; | ||
try { | ||
supportsPreload = relList.supports('preload'); | ||
} | ||
catch (e) {} | ||
var link = document.createElement('link'); | ||
if (supportsPreload) { | ||
link.rel = 'preload'; | ||
link.as = 'script'; | ||
} | ||
})(); | ||
function preloadScript (url) { | ||
// fallback to old fashioned image technique which still works in safari | ||
if (!supportsPreload && !supportsPrefetch) { | ||
var preloadImage = new Image(); | ||
preloadImage.src = url; | ||
return; | ||
else { | ||
// this works for all except Safari (detected by relList.supports lacking) | ||
link.rel = 'prefetch'; | ||
} | ||
link.href = url; | ||
document.head.appendChild(link); | ||
} | ||
var link = document.createElement('link'); | ||
if (supportsPreload) { | ||
link.rel = 'preload'; | ||
link.as = 'script'; | ||
function workerImport (src, resolve, reject) { | ||
try { | ||
importScripts(src); | ||
} | ||
catch (e) { | ||
reject(e); | ||
} | ||
resolve(); | ||
} | ||
else { | ||
// this works for all except Safari (detected by relList.supports lacking) | ||
link.rel = 'prefetch'; | ||
} | ||
link.href = url; | ||
document.head.appendChild(link); | ||
} | ||
function workerImport (src, resolve, reject) { | ||
try { | ||
importScripts(src); | ||
if (isBrowser) { | ||
var onerror = window.onerror; | ||
window.onerror = function globalOnerror (msg, src) { | ||
if (onerror) | ||
onerror.apply(this, arguments); | ||
}; | ||
} | ||
catch (e) { | ||
reject(e); | ||
} | ||
resolve(); | ||
} | ||
if (isBrowser) { | ||
var onerror = window.onerror; | ||
window.onerror = function globalOnerror (msg, src) { | ||
if (onerror) | ||
onerror.apply(this, arguments); | ||
}; | ||
} | ||
function scriptLoad (src, crossOrigin, integrity, resolve, reject) { | ||
// percent encode just "#" for HTTP requests | ||
src = src.replace(/#/g, '%23'); | ||
function scriptLoad (src, crossOrigin, integrity, resolve, reject) { | ||
// percent encode just "#" for HTTP requests | ||
src = src.replace(/#/g, '%23'); | ||
// subresource integrity is not supported in web workers | ||
if (isWorker) | ||
return workerImport(src, resolve, reject); | ||
// subresource integrity is not supported in web workers | ||
if (isWorker) | ||
return workerImport(src, resolve, reject); | ||
var script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.charset = 'utf-8'; | ||
script.async = true; | ||
var script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.charset = 'utf-8'; | ||
script.async = true; | ||
if (crossOrigin) | ||
script.crossOrigin = crossOrigin; | ||
if (integrity) | ||
script.integrity = integrity; | ||
if (crossOrigin) | ||
script.crossOrigin = crossOrigin; | ||
if (integrity) | ||
script.integrity = integrity; | ||
script.addEventListener('load', load, false); | ||
script.addEventListener('error', error, false); | ||
script.addEventListener('load', load, false); | ||
script.addEventListener('error', error, false); | ||
script.src = src; | ||
document.head.appendChild(script); | ||
script.src = src; | ||
document.head.appendChild(script); | ||
function load () { | ||
resolve(); | ||
cleanup(); | ||
} | ||
function load () { | ||
resolve(); | ||
cleanup(); | ||
} | ||
// note this does not catch execution errors | ||
function error (err) { | ||
cleanup(); | ||
reject(new Error('Fetching ' + src)); | ||
} | ||
// note this does not catch execution errors | ||
function error (err) { | ||
cleanup(); | ||
reject(new Error('Fetching ' + src)); | ||
function cleanup () { | ||
script.removeEventListener('load', load, false); | ||
script.removeEventListener('error', error, false); | ||
document.head.removeChild(script); | ||
} | ||
} | ||
function cleanup () { | ||
script.removeEventListener('load', load, false); | ||
script.removeEventListener('error', error, false); | ||
document.head.removeChild(script); | ||
} | ||
} | ||
// separate out paths cache as a baseURL lock process | ||
function applyPaths (baseURL, paths, key) { | ||
var mapMatch = getMapMatch(paths, key); | ||
if (mapMatch) { | ||
var target = paths[mapMatch] + key.substr(mapMatch.length); | ||
var resolved = resolveIfNotPlain(target, baseURI); | ||
if (resolved !== undefined) | ||
return resolved; | ||
// separate out paths cache as a baseURL lock process | ||
function applyPaths (baseURL, paths, key) { | ||
var mapMatch = getMapMatch(paths, key); | ||
if (mapMatch) { | ||
var target = paths[mapMatch] + key.substr(mapMatch.length); | ||
var resolved = resolveIfNotPlain(target, baseURI); | ||
if (resolved !== undefined) | ||
return resolved; | ||
return baseURL + target; | ||
return baseURL + target; | ||
} | ||
else if (key.indexOf(':') !== -1) { | ||
return key; | ||
} | ||
else { | ||
return baseURL + key; | ||
} | ||
} | ||
else if (key.indexOf(':') !== -1) { | ||
return key; | ||
} | ||
else { | ||
return baseURL + key; | ||
} | ||
} | ||
function checkMap (p) { | ||
var name = this.name; | ||
// can add ':' here if we want paths to match the behaviour of map | ||
if (name.substr(0, p.length) === p && (name.length === p.length || name[p.length] === '/' || p[p.length - 1] === '/' || p[p.length - 1] === ':')) { | ||
var curLen = p.split('/').length; | ||
if (curLen > this.len) { | ||
this.match = p; | ||
this.len = curLen; | ||
function checkMap (p) { | ||
var name = this.name; | ||
// can add ':' here if we want paths to match the behaviour of map | ||
if (name.substr(0, p.length) === p && (name.length === p.length || name[p.length] === '/' || p[p.length - 1] === '/' || p[p.length - 1] === ':')) { | ||
var curLen = p.split('/').length; | ||
if (curLen > this.len) { | ||
this.match = p; | ||
this.len = curLen; | ||
} | ||
} | ||
} | ||
} | ||
function getMapMatch (map, name) { | ||
if (Object.hasOwnProperty.call(map, name)) | ||
return name; | ||
function getMapMatch (map, name) { | ||
if (Object.hasOwnProperty.call(map, name)) | ||
return name; | ||
var bestMatch = { | ||
name: name, | ||
match: undefined, | ||
len: 0 | ||
}; | ||
var bestMatch = { | ||
name: name, | ||
match: undefined, | ||
len: 0 | ||
}; | ||
Object.keys(map).forEach(checkMap, bestMatch); | ||
Object.keys(map).forEach(checkMap, bestMatch); | ||
return bestMatch.match; | ||
} | ||
return bestMatch.match; | ||
} | ||
// RegEx adjusted from https://github.com/jbrantly/yabble/blob/master/lib/yabble.js#L339 | ||
function setAmdHelper (loader) { | ||
function setAmdHelper (loader) { | ||
/* | ||
AMD-compatible require | ||
To copy RequireJS, set window.require = window.requirejs = loader.amdRequire | ||
*/ | ||
function require (names, callback, errback, referer) { | ||
// in amd, first arg can be a config object... we just ignore | ||
if (typeof names === 'object' && !(names instanceof Array)) | ||
return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1)); | ||
/* | ||
AMD-compatible require | ||
To copy RequireJS, set window.require = window.requirejs = loader.amdRequire | ||
*/ | ||
function require (names, callback, errback, referer) { | ||
// in amd, first arg can be a config object... we just ignore | ||
if (typeof names === 'object' && !(names instanceof Array)) | ||
return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1)); | ||
// amd require | ||
if (typeof names === 'string' && typeof callback === 'function') | ||
names = [names]; | ||
if (names instanceof Array) { | ||
var dynamicRequires = []; | ||
for (var i = 0; i < names.length; i++) | ||
dynamicRequires.push(loader.import(names[i], referer)); | ||
Promise.all(dynamicRequires).then(function (modules) { | ||
if (callback) | ||
callback.apply(null, modules); | ||
}, errback); | ||
} | ||
// amd require | ||
if (typeof names === 'string' && typeof callback === 'function') | ||
names = [names]; | ||
if (names instanceof Array) { | ||
var dynamicRequires = []; | ||
for (var i = 0; i < names.length; i++) | ||
dynamicRequires.push(loader.import(names[i], referer)); | ||
Promise.all(dynamicRequires).then(function (modules) { | ||
if (callback) | ||
callback.apply(null, modules); | ||
}, errback); | ||
} | ||
// commonjs require | ||
else if (typeof names === 'string') { | ||
var normalized = loader.decanonicalize(names, referer); | ||
var module = loader.get(normalized); | ||
if (!module) | ||
throw new Error('Module not already loaded loading "' + names + '" as ' + normalized + (referer ? ' from "' + referer + '".' : '.')); | ||
return '__useDefault' in module ? module.__useDefault : module; | ||
} | ||
// commonjs require | ||
else if (typeof names === 'string') { | ||
var normalized = loader.decanonicalize(names, referer); | ||
var module = loader.get(normalized); | ||
if (!module) | ||
throw new Error('Module not already loaded loading "' + names + '" as ' + normalized + (referer ? ' from "' + referer + '".' : '.')); | ||
return '__useDefault' in module ? module.__useDefault : module; | ||
else | ||
throw new TypeError('Invalid require'); | ||
} | ||
else | ||
throw new TypeError('Invalid require'); | ||
} | ||
function define (name, deps, factory) { | ||
if (typeof name !== 'string') { | ||
factory = deps; | ||
deps = name; | ||
name = null; | ||
} | ||
function define (name, deps, factory) { | ||
if (typeof name !== 'string') { | ||
factory = deps; | ||
deps = name; | ||
name = null; | ||
} | ||
if (!(deps instanceof Array)) { | ||
factory = deps; | ||
deps = ['require', 'exports', 'module'].splice(0, factory.length); | ||
} | ||
if (!(deps instanceof Array)) { | ||
factory = deps; | ||
deps = ['require', 'exports', 'module'].splice(0, factory.length); | ||
} | ||
if (typeof factory !== 'function') | ||
factory = (function (factory) { | ||
return function() { return factory; } | ||
})(factory); | ||
if (typeof factory !== 'function') | ||
factory = (function (factory) { | ||
return function() { return factory; } | ||
})(factory); | ||
if (!name) { | ||
if (curMetaDeps) { | ||
deps = deps.concat(curMetaDeps); | ||
curMetaDeps = undefined; | ||
if (!name) { | ||
if (curMetaDeps) { | ||
deps = deps.concat(curMetaDeps); | ||
curMetaDeps = undefined; | ||
} | ||
} | ||
} | ||
// remove system dependencies | ||
var requireIndex, exportsIndex, moduleIndex; | ||
// remove system dependencies | ||
var requireIndex, exportsIndex, moduleIndex; | ||
if ((requireIndex = deps.indexOf('require')) !== -1) { | ||
if ((requireIndex = deps.indexOf('require')) !== -1) { | ||
deps.splice(requireIndex, 1); | ||
deps.splice(requireIndex, 1); | ||
// only trace cjs requires for non-named | ||
// named defines assume the trace has already been done | ||
if (!name) | ||
deps = deps.concat(amdGetCJSDeps(factory.toString(), requireIndex)); | ||
} | ||
// only trace cjs requires for non-named | ||
// named defines assume the trace has already been done | ||
if (!name) | ||
deps = deps.concat(amdGetCJSDeps(factory.toString(), requireIndex)); | ||
} | ||
if ((exportsIndex = deps.indexOf('exports')) !== -1) | ||
deps.splice(exportsIndex, 1); | ||
if ((exportsIndex = deps.indexOf('exports')) !== -1) | ||
deps.splice(exportsIndex, 1); | ||
if ((moduleIndex = deps.indexOf('module')) !== -1) | ||
deps.splice(moduleIndex, 1); | ||
if ((moduleIndex = deps.indexOf('module')) !== -1) | ||
deps.splice(moduleIndex, 1); | ||
function execute (req, exports, module) { | ||
var depValues = []; | ||
for (var i = 0; i < deps.length; i++) | ||
depValues.push(req(deps[i])); | ||
function execute (req, exports, module) { | ||
var depValues = []; | ||
for (var i = 0; i < deps.length; i++) | ||
depValues.push(req(deps[i])); | ||
module.uri = module.id; | ||
module.uri = module.id; | ||
module.config = noop; | ||
module.config = noop; | ||
// add back in system dependencies | ||
if (moduleIndex !== -1) | ||
depValues.splice(moduleIndex, 0, module); | ||
// add back in system dependencies | ||
if (moduleIndex !== -1) | ||
depValues.splice(moduleIndex, 0, module); | ||
if (exportsIndex !== -1) | ||
depValues.splice(exportsIndex, 0, exports); | ||
if (exportsIndex !== -1) | ||
depValues.splice(exportsIndex, 0, exports); | ||
if (requireIndex !== -1) { | ||
var contextualRequire = function (names, callback, errback) { | ||
if (typeof names === 'string' && typeof callback !== 'function') | ||
return req(names); | ||
return require.call(loader, names, callback, errback, module.id); | ||
}; | ||
contextualRequire.toUrl = function (name) { | ||
return loader.normalizeSync(name, module.id); | ||
}; | ||
depValues.splice(requireIndex, 0, contextualRequire); | ||
} | ||
if (requireIndex !== -1) { | ||
var contextualRequire = function (names, callback, errback) { | ||
if (typeof names === 'string' && typeof callback !== 'function') | ||
return req(names); | ||
return require.call(loader, names, callback, errback, module.id); | ||
}; | ||
contextualRequire.toUrl = function (name) { | ||
return loader.normalizeSync(name, module.id); | ||
}; | ||
depValues.splice(requireIndex, 0, contextualRequire); | ||
} | ||
// set global require to AMD require | ||
var curRequire = envGlobal.require; | ||
envGlobal.require = require; | ||
// set global require to AMD require | ||
var curRequire = envGlobal.require; | ||
envGlobal.require = require; | ||
var output = factory.apply(exportsIndex === -1 ? envGlobal : exports, depValues); | ||
var output = factory.apply(exportsIndex === -1 ? envGlobal : exports, depValues); | ||
envGlobal.require = curRequire; | ||
envGlobal.require = curRequire; | ||
if (typeof output !== 'undefined') | ||
module.exports = output; | ||
} | ||
if (typeof output !== 'undefined') | ||
module.exports = output; | ||
} | ||
// anonymous define | ||
if (!name) { | ||
loader.registerDynamic(deps, false, curEsModule ? wrapEsModuleExecute(execute) : execute); | ||
} | ||
else { | ||
loader.registerDynamic(name, deps, false, execute); | ||
// anonymous define | ||
if (!name) { | ||
loader.registerDynamic(deps, false, curEsModule ? wrapEsModuleExecute(execute) : execute); | ||
} | ||
else { | ||
loader.registerDynamic(name, deps, false, execute); | ||
// if we don't have any other defines, | ||
// then let this be an anonymous define | ||
// this is just to support single modules of the form: | ||
// define('jquery') | ||
// still loading anonymously | ||
// because it is done widely enough to be useful | ||
// as soon as there is more than one define, this gets removed though | ||
if (lastNamedDefine) { | ||
lastNamedDefine = undefined; | ||
multipleNamedDefines = true; | ||
// if we don't have any other defines, | ||
// then let this be an anonymous define | ||
// this is just to support single modules of the form: | ||
// define('jquery') | ||
// still loading anonymously | ||
// because it is done widely enough to be useful | ||
// as soon as there is more than one define, this gets removed though | ||
if (lastNamedDefine) { | ||
lastNamedDefine = undefined; | ||
multipleNamedDefines = true; | ||
} | ||
else if (!multipleNamedDefines) { | ||
lastNamedDefine = [deps, execute]; | ||
} | ||
} | ||
else if (!multipleNamedDefines) { | ||
lastNamedDefine = [deps, execute]; | ||
} | ||
} | ||
define.amd = {}; | ||
loader.amdDefine = define; | ||
loader.amdRequire = require; | ||
} | ||
define.amd = {}; | ||
loader.amdDefine = define; | ||
loader.amdRequire = require; | ||
} | ||
// CJS | ||
var windowOrigin; | ||
if (typeof window !== 'undefined' && typeof document !== 'undefined' && window.location) | ||
windowOrigin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : ''); | ||
// CJS | ||
var windowOrigin; | ||
if (typeof window !== 'undefined' && typeof document !== 'undefined' && window.location) | ||
windowOrigin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : ''); | ||
var commentRegEx = /(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg; | ||
// Global | ||
// bare minimum ignores | ||
var ignoredGlobalProps = ['_g', 'sessionStorage', 'localStorage', 'clipboardData', 'frames', 'frameElement', 'external', | ||
'mozAnimationStartTime', 'webkitStorageInfo', 'webkitIndexedDB', 'mozInnerScreenY', 'mozInnerScreenX']; | ||
function globalIterator (globalName) { | ||
if (ignoredGlobalProps.indexOf(globalName) !== -1) | ||
return; | ||
try { | ||
var value = envGlobal[globalName]; | ||
} | ||
catch (e) { | ||
ignoredGlobalProps.push(globalName); | ||
} | ||
this(globalName, value); | ||
} | ||
// AMD | ||
var cjsRequirePre = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])"; | ||
var cjsRequirePost = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)"; | ||
var fnBracketRegEx = /\(([^\)]*)\)/; | ||
var wsRegEx = /^\s+|\s+$/g; | ||
var requireRegExs = {}; | ||
function amdGetCJSDeps(source, requireIndex) { | ||
var commentRegEx = /(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg; | ||
// extract CJS dependencies from source text via regex static analysis | ||
// read require('x') statements not in comments or strings | ||
// remove comments | ||
source = source.replace(commentRegEx, ''); | ||
// determine the require alias | ||
var params = source.match(fnBracketRegEx); | ||
var requireAlias = (params[1].split(',')[requireIndex] || 'require').replace(wsRegEx, ''); | ||
// Global | ||
// bare minimum ignores | ||
var ignoredGlobalProps = ['_g', 'sessionStorage', 'localStorage', 'clipboardData', 'frames', 'frameElement', 'external', | ||
'mozAnimationStartTime', 'webkitStorageInfo', 'webkitIndexedDB', 'mozInnerScreenY', 'mozInnerScreenX']; | ||
// find or generate the regex for this requireAlias | ||
var requireRegEx = requireRegExs[requireAlias] || (requireRegExs[requireAlias] = new RegExp(cjsRequirePre + requireAlias + cjsRequirePost, 'g')); | ||
function globalIterator (globalName) { | ||
if (ignoredGlobalProps.indexOf(globalName) !== -1) | ||
return; | ||
try { | ||
var value = envGlobal[globalName]; | ||
} | ||
catch (e) { | ||
ignoredGlobalProps.push(globalName); | ||
} | ||
this(globalName, value); | ||
} | ||
requireRegEx.lastIndex = 0; | ||
var deps = []; | ||
var match; | ||
while (match = requireRegEx.exec(source)) | ||
deps.push(match[2] || match[3]); | ||
return deps; | ||
} | ||
function wrapEsModuleExecute (execute) { | ||
return function (require, exports, module) { | ||
execute(require, exports, module); | ||
exports = module.exports; | ||
if ((typeof exports === 'object' || typeof exports === 'function') && !('__esModule' in exports)) | ||
Object.defineProperty(module.exports, '__esModule', { | ||
value: true | ||
}); | ||
}; | ||
} | ||
// AMD | ||
var cjsRequirePre = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])"; | ||
var cjsRequirePost = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)"; | ||
var fnBracketRegEx = /\(([^\)]*)\)/; | ||
var wsRegEx = /^\s+|\s+$/g; | ||
// generate anonymous define from singular named define | ||
var multipleNamedDefines = false; | ||
var lastNamedDefine; | ||
var curMetaDeps; | ||
var curEsModule = false; | ||
function registerLastDefine (loader) { | ||
if (lastNamedDefine) | ||
loader.registerDynamic(curMetaDeps ? lastNamedDefine[0].concat(curMetaDeps) : lastNamedDefine[0], | ||
false, curEsModule ? wrapEsModuleExecute(lastNamedDefine[1]) : lastNamedDefine[1]); | ||
var requireRegExs = {}; | ||
// bundles are an empty module | ||
else if (multipleNamedDefines) | ||
loader.registerDynamic([], false, noop); | ||
} | ||
function amdGetCJSDeps(source, requireIndex) { | ||
function SystemJSProductionLoader () { | ||
RegisterLoader.call(this); | ||
// remove comments | ||
source = source.replace(commentRegEx, ''); | ||
// internal configuration | ||
this[CONFIG] = { | ||
baseURL: baseURI, | ||
paths: {}, | ||
map: {}, | ||
submap: {}, | ||
depCache: {} | ||
}; | ||
// determine the require alias | ||
var params = source.match(fnBracketRegEx); | ||
var requireAlias = (params[1].split(',')[requireIndex] || 'require').replace(wsRegEx, ''); | ||
setAmdHelper(this); | ||
if (isBrowser) | ||
envGlobal.define = this.amdDefine; | ||
} | ||
// find or generate the regex for this requireAlias | ||
var requireRegEx = requireRegExs[requireAlias] || (requireRegExs[requireAlias] = new RegExp(cjsRequirePre + requireAlias + cjsRequirePost, 'g')); | ||
SystemJSProductionLoader.plainResolve = PLAIN_RESOLVE; | ||
SystemJSProductionLoader.plainResolveSync = PLAIN_RESOLVE_SYNC; | ||
requireRegEx.lastIndex = 0; | ||
var systemJSPrototype = SystemJSProductionLoader.prototype = Object.create(RegisterLoader.prototype); | ||
var deps = []; | ||
systemJSPrototype.constructor = SystemJSProductionLoader; | ||
var match; | ||
while (match = requireRegEx.exec(source)) | ||
deps.push(match[2] || match[3]); | ||
systemJSPrototype[SystemJSProductionLoader.resolve = RegisterLoader.resolve] = function (key, parentKey) { | ||
var resolved = resolveIfNotPlain(key, parentKey || baseURI); | ||
if (resolved !== undefined) | ||
return Promise.resolve(resolved); | ||
return deps; | ||
} | ||
// plain resolution | ||
var loader = this; | ||
return resolvedPromise$1 | ||
.then(function () { | ||
return loader[PLAIN_RESOLVE](key, parentKey); | ||
}) | ||
.then(function (resolved) { | ||
resolved = resolved || key; | ||
// if in the registry then we are done | ||
if (loader.registry.has(resolved)) | ||
return resolved; | ||
function wrapEsModuleExecute (execute) { | ||
return function (require, exports, module) { | ||
execute(require, exports, module); | ||
exports = module.exports; | ||
if ((typeof exports === 'object' || typeof exports === 'function') && !('__esModule' in exports)) | ||
Object.defineProperty(module.exports, '__esModule', { | ||
value: true | ||
}); | ||
// then apply paths | ||
// baseURL is fallback | ||
var config = loader[CONFIG]; | ||
return applyPaths(config.baseURL, config.paths, resolved); | ||
}); | ||
}; | ||
} | ||
// generate anonymous define from singular named define | ||
var multipleNamedDefines = false; | ||
var lastNamedDefine; | ||
var curMetaDeps; | ||
var curEsModule = false; | ||
function registerLastDefine (loader) { | ||
if (lastNamedDefine) | ||
loader.registerDynamic(curMetaDeps ? lastNamedDefine[0].concat(curMetaDeps) : lastNamedDefine[0], | ||
false, curEsModule ? wrapEsModuleExecute(lastNamedDefine[1]) : lastNamedDefine[1]); | ||
// bundles are an empty module | ||
else if (multipleNamedDefines) | ||
loader.registerDynamic([], false, noop); | ||
} | ||
function SystemJSProductionLoader$1 () { | ||
RegisterLoader$1.call(this); | ||
// internal configuration | ||
this[CONFIG] = { | ||
baseURL: baseURI, | ||
paths: {}, | ||
map: {}, | ||
submap: {}, | ||
depCache: {} | ||
systemJSPrototype.newModule = function (bindings) { | ||
return new ModuleNamespace(bindings); | ||
}; | ||
setAmdHelper(this); | ||
if (isBrowser) | ||
envGlobal.define = this.amdDefine; | ||
} | ||
systemJSPrototype.isModule = isModule; | ||
SystemJSProductionLoader$1.plainResolve = PLAIN_RESOLVE; | ||
SystemJSProductionLoader$1.plainResolveSync = PLAIN_RESOLVE_SYNC; | ||
systemJSPrototype.resolveSync = function (key, parentKey) { | ||
var resolved = resolveIfNotPlain(key, parentKey || baseURI); | ||
if (resolved !== undefined) | ||
return resolved; | ||
var systemJSPrototype = SystemJSProductionLoader$1.prototype = Object.create(RegisterLoader$1.prototype); | ||
// plain resolution | ||
resolved = this[PLAIN_RESOLVE_SYNC](key, parentKey) || key; | ||
systemJSPrototype.constructor = SystemJSProductionLoader$1; | ||
systemJSPrototype[SystemJSProductionLoader$1.resolve = RegisterLoader$1.resolve] = function (key, parentKey) { | ||
var resolved = resolveIfNotPlain(key, parentKey || baseURI); | ||
if (resolved !== undefined) | ||
return Promise.resolve(resolved); | ||
// plain resolution | ||
var loader = this; | ||
return resolvedPromise | ||
.then(function () { | ||
return loader[PLAIN_RESOLVE](key, parentKey); | ||
}) | ||
.then(function (resolved) { | ||
resolved = resolved || key; | ||
// if in the registry then we are done | ||
if (loader.registry.has(resolved)) | ||
if (this.registry.has(resolved)) | ||
return resolved; | ||
// then apply paths | ||
// baseURL is fallback | ||
var config = loader[CONFIG]; | ||
var config = this[CONFIG]; | ||
return applyPaths(config.baseURL, config.paths, resolved); | ||
}); | ||
}; | ||
}; | ||
systemJSPrototype.newModule = function (bindings) { | ||
return new ModuleNamespace(bindings); | ||
}; | ||
systemJSPrototype[PLAIN_RESOLVE] = systemJSPrototype[PLAIN_RESOLVE_SYNC] = plainResolve; | ||
systemJSPrototype.isModule = isModule; | ||
systemJSPrototype[SystemJSProductionLoader.instantiate = RegisterLoader.instantiate] = coreInstantiate; | ||
systemJSPrototype.resolveSync = function (key, parentKey) { | ||
var resolved = resolveIfNotPlain(key, parentKey || baseURI); | ||
if (resolved !== undefined) | ||
return resolved; | ||
systemJSPrototype.config = function (cfg) { | ||
var config = this[CONFIG]; | ||
// plain resolution | ||
resolved = this[PLAIN_RESOLVE_SYNC](key, parentKey) || key; | ||
if (cfg.baseURL) { | ||
config.baseURL = resolveIfNotPlain(cfg.baseURL, baseURI) || resolveIfNotPlain('./' + cfg.baseURL, baseURI); | ||
if (config.baseURL[config.baseURL.length - 1] !== '/') | ||
config.baseURL += '/'; | ||
} | ||
if (this.registry.has(resolved)) | ||
return resolved; | ||
if (cfg.paths) | ||
extend(config.paths, cfg.paths); | ||
// then apply paths | ||
var config = this[CONFIG]; | ||
return applyPaths(config.baseURL, config.paths, resolved); | ||
}; | ||
if (cfg.map) { | ||
var val = cfg.map; | ||
for (var p in val) { | ||
if (!Object.hasOwnProperty.call(val, p)) | ||
continue; | ||
systemJSPrototype[PLAIN_RESOLVE] = systemJSPrototype[PLAIN_RESOLVE_SYNC] = plainResolve; | ||
var v = val[p]; | ||
systemJSPrototype[SystemJSProductionLoader$1.instantiate = RegisterLoader$1.instantiate] = coreInstantiate; | ||
if (typeof v === 'string') { | ||
config.map[p] = v; | ||
} | ||
systemJSPrototype.config = function (cfg) { | ||
var config = this[CONFIG]; | ||
// object submap | ||
else { | ||
// normalize parent with URL and paths only | ||
var resolvedParent = resolveIfNotPlain(p, baseURI) || applyPaths(config.baseURL, config.paths, p); | ||
extend(config.submap[resolvedParent] || (config.submap[resolvedParent] = {}), v); | ||
} | ||
} | ||
} | ||
if (cfg.baseURL) { | ||
config.baseURL = resolveIfNotPlain(cfg.baseURL, baseURI) || resolveIfNotPlain('./' + cfg.baseURL, baseURI); | ||
if (config.baseURL[config.baseURL.length - 1] !== '/') | ||
config.baseURL += '/'; | ||
} | ||
config.wasm = cfg.wasm === true; | ||
if (cfg.paths) | ||
extend(config.paths, cfg.paths); | ||
if (cfg.map) { | ||
var val = cfg.map; | ||
for (var p in val) { | ||
if (!Object.hasOwnProperty.call(val, p)) | ||
for (var p in cfg) { | ||
if (!Object.hasOwnProperty.call(cfg, p)) | ||
continue; | ||
var v = val[p]; | ||
var val = cfg[p]; | ||
if (typeof v === 'string') { | ||
config.map[p] = v; | ||
} | ||
switch (p) { | ||
case 'baseURL': | ||
case 'paths': | ||
case 'map': | ||
case 'wasm': | ||
break; | ||
// object submap | ||
else { | ||
// normalize parent with URL and paths only | ||
var resolvedParent = resolveIfNotPlain(p, baseURI) || applyPaths(config.baseURL, config.paths, p); | ||
extend(config.submap[resolvedParent] || (config.submap[resolvedParent] = {}), v); | ||
case 'depCache': | ||
for (var p in val) { | ||
if (!Object.hasOwnProperty.call(val, p)) | ||
continue; | ||
var resolvedParent = this.resolveSync(p, undefined); | ||
config.depCache[resolvedParent] = (config.depCache[resolvedParent] || []).concat(val[p]); | ||
} | ||
break; | ||
default: | ||
throw new TypeError('The SystemJS production build does not support the "' + p + '" configuration option.'); | ||
} | ||
} | ||
} | ||
}; | ||
for (var p in cfg) { | ||
if (!Object.hasOwnProperty.call(cfg, p)) | ||
continue; | ||
// getConfig configuration cloning | ||
systemJSPrototype.getConfig = function (name) { | ||
var config = this[CONFIG]; | ||
var val = cfg[p]; | ||
var map = {}; | ||
extend(map, config.map); | ||
for (var p in config.submap) { | ||
if (!Object.hasOwnProperty.call(config.submap, p)) | ||
continue; | ||
map[p] = extend({}, config.submap[p]); | ||
} | ||
switch (p) { | ||
case 'baseURL': | ||
case 'paths': | ||
case 'map': | ||
break; | ||
case 'depCache': | ||
for (var p in val) { | ||
if (!Object.hasOwnProperty.call(val, p)) | ||
continue; | ||
var resolvedParent = this.resolveSync(p, undefined); | ||
config.depCache[resolvedParent] = (config.depCache[resolvedParent] || []).concat(val[p]); | ||
} | ||
break; | ||
default: | ||
throw new TypeError('The SystemJS production build does not support the "' + p + '" configuration option.'); | ||
var depCache = {}; | ||
for (var p in config.depCache) { | ||
if (!Object.hasOwnProperty.call(config.depCache, p)) | ||
continue; | ||
depCache[p] = [].concat(config.depCache[p]); | ||
} | ||
} | ||
}; | ||
// getConfig configuration cloning | ||
systemJSPrototype.getConfig = function (name) { | ||
var config = this[CONFIG]; | ||
return { | ||
baseURL: config.baseURL, | ||
paths: extend({}, config.paths), | ||
depCache: depCache, | ||
map: map, | ||
wasm: config.wasm === true | ||
}; | ||
}; | ||
var map = {}; | ||
extend(map, config.map); | ||
for (var p in config.submap) { | ||
if (!Object.hasOwnProperty.call(config.submap, p)) | ||
continue; | ||
map[p] = extend({}, config.submap[p]); | ||
} | ||
// ensure System.register and System.registerDynamic decanonicalize | ||
systemJSPrototype.register = function (key, deps, declare) { | ||
if (typeof key === 'string') | ||
key = this.resolveSync(key, undefined); | ||
return RegisterLoader.prototype.register.call(this, key, deps, declare); | ||
}; | ||
var depCache = {}; | ||
for (var p in config.depCache) { | ||
if (!Object.hasOwnProperty.call(config.depCache, p)) | ||
continue; | ||
depCache[p] = [].concat(config.depCache[p]); | ||
} | ||
return { | ||
baseURL: config.baseURL, | ||
paths: extend({}, config.paths), | ||
depCache: depCache, | ||
map: map | ||
systemJSPrototype.registerDynamic = function (key, deps, executingRequire, execute) { | ||
if (typeof key === 'string') | ||
key = this.resolveSync(key, undefined); | ||
return RegisterLoader.prototype.registerDynamic.call(this, key, deps, executingRequire, execute); | ||
}; | ||
}; | ||
// ensure System.register and System.registerDynamic decanonicalize | ||
systemJSPrototype.register = function (key, deps, declare) { | ||
if (typeof key === 'string') | ||
key = this.resolveSync(key, undefined); | ||
return RegisterLoader$1.prototype.register.call(this, key, deps, declare); | ||
}; | ||
function plainResolve (key, parentKey) { | ||
var config = this[CONFIG]; | ||
systemJSPrototype.registerDynamic = function (key, deps, executingRequire, execute) { | ||
if (typeof key === 'string') | ||
key = this.resolveSync(key, undefined); | ||
return RegisterLoader$1.prototype.registerDynamic.call(this, key, deps, executingRequire, execute); | ||
}; | ||
// Apply contextual submap | ||
if (parentKey) { | ||
var parent = getMapMatch(config.submap, parentKey); | ||
var submap = config.submap[parent]; | ||
var mapMatch = submap && getMapMatch(submap, key); | ||
function plainResolve (key, parentKey) { | ||
var config = this[CONFIG]; | ||
if (mapMatch) { | ||
var target = submap[mapMatch] + key.substr(mapMatch.length); | ||
return resolveIfNotPlain(target, parent) || target; | ||
} | ||
} | ||
// Apply contextual submap | ||
if (parentKey) { | ||
var parent = getMapMatch(config.submap, parentKey); | ||
var submap = config.submap[parent]; | ||
var mapMatch = submap && getMapMatch(submap, key); | ||
// Apply global map | ||
var map = config.map; | ||
var mapMatch = getMapMatch(map, key); | ||
if (mapMatch) { | ||
var target = submap[mapMatch] + key.substr(mapMatch.length); | ||
return resolveIfNotPlain(target, parent) || target; | ||
var target = map[mapMatch] + key.substr(mapMatch.length); | ||
return resolveIfNotPlain(target, parentKey || config.baseURL) || target; | ||
} | ||
} | ||
// Apply global map | ||
var map = config.map; | ||
var mapMatch = getMapMatch(map, key); | ||
function instantiateWasm (loader, response, processAnonRegister) { | ||
return WebAssembly.compileStreaming(response).then(function (module) { | ||
var deps = []; | ||
var setters = []; | ||
var importObj = {}; | ||
if (mapMatch) { | ||
var target = map[mapMatch] + key.substr(mapMatch.length); | ||
return resolveIfNotPlain(target, parentKey || config.baseURL) || target; | ||
// we can only set imports if supported (eg early Safari doesnt support) | ||
if (WebAssembly.Module.imports) | ||
WebAssembly.Module.imports(module).forEach(function (i) { | ||
var key = i.module; | ||
setters.push(function (m) { | ||
importObj[key] = m; | ||
}); | ||
if (deps.indexOf(key) === -1) | ||
deps.push(key); | ||
}); | ||
loader.register(deps, function (_export) { | ||
return { | ||
setters: setters, | ||
execute: function () { | ||
_export(new WebAssembly.Instance(module, importObj).exports); | ||
} | ||
}; | ||
}); | ||
processAnonRegister(); | ||
}); | ||
} | ||
} | ||
function doScriptLoad (loader, url, processAnonRegister) { | ||
function doScriptLoad (loader, url, processAnonRegister) { | ||
// store a global snapshot in case it turns out to be global | ||
globalSnapshot$1 = {}; | ||
Object.keys(envGlobal).forEach(globalIterator, function (name, value) { | ||
globalSnapshot$1[name] = value; | ||
}); | ||
// store a global snapshot in case it turns out to be global | ||
globalSnapshot = {}; | ||
Object.keys(envGlobal).forEach(globalIterator, function (name, value) { | ||
globalSnapshot[name] = value; | ||
}); | ||
return new Promise(function (resolve, reject) { | ||
return scriptLoad(url, 'anonymous', undefined, function () { | ||
return new Promise(function (resolve, reject) { | ||
return scriptLoad(url, 'anonymous', undefined, function () { | ||
// check for System.register call | ||
var registered = processAnonRegister(); | ||
if (!registered) { | ||
// no System.register -> support named AMD as anonymous | ||
registerLastDefine(loader); | ||
registered = processAnonRegister(); | ||
// check for System.register call | ||
var registered = processAnonRegister(); | ||
// still no registration -> attempt a global detection | ||
if (!registered) { | ||
loader.register([], function () { | ||
return { | ||
execute: retrieveGlobal | ||
}; | ||
}); | ||
processAnonRegister(); | ||
} | ||
} | ||
resolve(); | ||
}, reject); | ||
}); | ||
} | ||
function doEvalLoad (loader, url, source, processAnonRegister) { | ||
// store a global snapshot in case it turns out to be global | ||
globalSnapshot$1 = {}; | ||
Object.keys(envGlobal).forEach(globalIterator, function (name, value) { | ||
globalSnapshot$1[name] = value; | ||
}); | ||
(eval)(source + '\n//# sourceURL=' + url); | ||
// check for System.register call | ||
var registered = processAnonRegister(); | ||
if (!registered) { | ||
// no System.register -> support named AMD as anonymous | ||
registerLastDefine(loader); | ||
registered = processAnonRegister(); | ||
// still no registration -> attempt a global detection | ||
if (!registered) { | ||
// no System.register -> support named AMD as anonymous | ||
registerLastDefine(loader); | ||
registered = processAnonRegister(); | ||
// still no registration -> attempt a global detection | ||
if (!registered) { | ||
loader.registerDynamic([], false, function () { | ||
return retrieveGlobal(); | ||
}); | ||
processAnonRegister(); | ||
} | ||
loader.register([], function () { | ||
return { | ||
execute: retrieveGlobal | ||
}; | ||
}); | ||
processAnonRegister(); | ||
} | ||
} | ||
} | ||
resolve(); | ||
}, reject); | ||
}); | ||
} | ||
var globalSnapshot$1; | ||
function retrieveGlobal () { | ||
var globalValue = { __esModule: true }; | ||
var singleGlobal; | ||
var multipleExports = false; | ||
var globalSnapshot; | ||
function retrieveGlobal () { | ||
var globalValue = { __esModule: true }; | ||
var singleGlobal; | ||
var multipleExports = false; | ||
Object.keys(envGlobal).forEach(globalIterator, function (name, value) { | ||
if (globalSnapshot$1[name] === value) | ||
return; | ||
if (value === undefined) | ||
return; | ||
Object.keys(envGlobal).forEach(globalIterator, function (name, value) { | ||
if (globalSnapshot[name] === value) | ||
return; | ||
if (value === undefined) | ||
return; | ||
globalValue[name] = value; | ||
globalValue[name] = value; | ||
if (singleGlobal !== undefined) { | ||
if (!multipleExports && singleGlobal !== value) | ||
multipleExports = true; | ||
} | ||
else { | ||
singleGlobal = value; | ||
} | ||
}); | ||
if (singleGlobal !== undefined) { | ||
if (!multipleExports && singleGlobal !== value) | ||
multipleExports = true; | ||
} | ||
else { | ||
singleGlobal = value; | ||
} | ||
}); | ||
// clear global snapshot | ||
globalSnapshot$1 = undefined; | ||
// clear global snapshot | ||
globalSnapshot = undefined; | ||
return multipleExports ? globalValue : singleGlobal; | ||
} | ||
return multipleExports ? globalValue : singleGlobal; | ||
} | ||
function coreInstantiate (key, processAnonRegister) { | ||
var config = this[CONFIG]; | ||
function coreInstantiate (key, processAnonRegister) { | ||
var config = this[CONFIG]; | ||
var depCache = config.depCache[key]; | ||
if (depCache) { | ||
for (var i = 0; i < depCache.length; i++) | ||
this.resolve(depCache[i], key).then(preloadScript); | ||
} | ||
var depCache = config.depCache[key]; | ||
if (depCache) { | ||
for (var i = 0; i < depCache.length; i++) | ||
this.resolve(depCache[i], key).then(preloadScript); | ||
if (config.wasm) { | ||
var loader = this; | ||
return fetch(key) | ||
.then(function (res) { | ||
if (!res.ok) | ||
throw new Error('Fetch error: ' + res.status + ' ' + res.statusText); | ||
if (res.headers.get('content-type').indexOf('application/wasm') === -1) { | ||
return res.text() | ||
.then(function (source) { | ||
doEvalLoad(loader, key, source, processAnonRegister); | ||
}); | ||
} | ||
return instantiateWasm(loader, res, processAnonRegister); | ||
}); | ||
} | ||
return doScriptLoad(this, key, processAnonRegister); | ||
} | ||
return doScriptLoad(this, key, processAnonRegister); | ||
} | ||
SystemJSProductionLoader.prototype.version = "0.21.1 Production"; | ||
SystemJSProductionLoader$1.prototype.version = "0.21.0 Production"; | ||
var System = new SystemJSProductionLoader(); | ||
var System = new SystemJSProductionLoader$1(); | ||
// only set the global System on the global in browsers | ||
if (isBrowser || isWorker) { | ||
envGlobal.SystemJS = System; | ||
// only set the global System on the global in browsers | ||
if (isBrowser || isWorker) { | ||
envGlobal.SystemJS = System; | ||
// dont override an existing System global | ||
if (!envGlobal.System) { | ||
envGlobal.System = System; | ||
// dont override an existing System global | ||
if (!envGlobal.System) { | ||
envGlobal.System = System; | ||
} | ||
// rather just extend or set a System.register on the existing System global | ||
else { | ||
var register = envGlobal.System.register; | ||
envGlobal.System.register = function () { | ||
if (register) | ||
register.apply(this, arguments); | ||
System.register.apply(System, arguments); | ||
}; | ||
} | ||
} | ||
// rather just extend or set a System.register on the existing System global | ||
else { | ||
var register = envGlobal.System.register; | ||
envGlobal.System.register = function () { | ||
if (register) | ||
register.apply(this, arguments); | ||
System.register.apply(System, arguments); | ||
}; | ||
} | ||
} | ||
if (typeof module !== 'undefined' && module.exports) | ||
module.exports = System; | ||
if (typeof module !== 'undefined' && module.exports) | ||
module.exports = System; | ||
}()); | ||
//# sourceMappingURL=system-production.src.js.map |
/* | ||
* SystemJS v0.21.0 Dev | ||
*/ | ||
!function(){"use strict";function e(e){return rt?Symbol():"@@"+e}function t(e,t){Qe||(t=t.replace(et?/file:\/\/\//g:/file:\/\//g,""));var r,n=(e.message||e)+"\n "+t;r=it&&e.fileName?new Error(n,e.fileName,e.lineNumber):new Error(n);var o=e.originalErr?e.originalErr.stack:e.stack;return r.stack=Ve?n+"\n "+o:o,r.originalErr=e.originalErr||e,r}function r(e,t){throw new RangeError('Unable to resolve "'+e+'" to '+t)}function n(e,t){e=e.trim();var n=t&&t.substr(0,t.indexOf(":")+1),o=e[0],i=e[1];if("/"===o&&"/"===i)return n||r(e,t),n+e;if("."===o&&("/"===i||"."===i&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===o){var a,s=!n||"/"!==t[n.length];if(s?(void 0===t&&r(e,t),a=t):a="/"===t[n.length+1]?"file:"!==n?(a=t.substr(n.length+2)).substr(a.indexOf("/")+1):t.substr(8):t.substr(n.length+1),"/"===o){if(!s)return t.substr(0,t.length-a.length-1)+e;r(e,t)}for(var u=a.substr(0,a.lastIndexOf("/")+1)+e,l=[],c=-1,f=0;f<u.length;f++)if(-1===c)if("."!==u[f])c=f;else{if("."!==u[f+1]||"/"!==u[f+2]&&f+2!==u.length){if("/"!==u[f+1]&&f+1!==u.length){c=f;continue}f+=1}else l.pop(),f+=2;s&&0===l.length&&r(e,t)}else"/"===u[f]&&(l.push(u.substring(c,f+1)),c=-1);return-1!==c&&l.push(u.substr(c)),t.substr(0,t.length-a.length)+l.join("")}return-1!==e.indexOf(":")?Ve&&":"===e[1]&&"\\"===e[2]&&e[0].match(/[a-z]/i)?"file:///"+e.replace(/\\/g,"/"):e:void 0}function o(e){if(e.values)return e.values();if("undefined"==typeof Symbol||!Symbol.iterator)throw new Error("Symbol.iterator not supported in this browser");var t={};return t[Symbol.iterator]=function(){var t=Object.keys(e),r=0;return{next:function(){return r<t.length?{value:e[t[r++]],done:!1}:{value:void 0,done:!0}}}},t}function i(){this.registry=new u}function a(e){if(!(e instanceof l))throw new TypeError("Module instantiation did not return a valid namespace object.");return e}function s(e){if(void 0===e)throw new RangeError("No resolution found.");return e}function u(){this[ct]={}}function l(e){Object.defineProperty(this,ft,{value:e}),Object.keys(e).forEach(c,this)}function c(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[ft][e]}})}function f(){i.call(this);var e=this.registry.delete;this.registry.delete=function(r){var n=e.call(this,r);return t.hasOwnProperty(r)&&!t[r].linkRecord&&(delete t[r],n=!0),n};var t={};this[dt]={lastRegister:void 0,records:t},this.trace=!1}function d(e,t,r){return e.records[t]={key:t,registration:r,module:void 0,importerSetters:void 0,loadError:void 0,evalError:void 0,linkRecord:{instantiatePromise:void 0,dependencies:void 0,execute:void 0,executingRequire:!1,moduleObj:void 0,setters:void 0,depsInstantiatePromise:void 0,dependencyInstantiations:void 0}}}function p(e,t,r,n,o){var i=n[t];if(i)return Promise.resolve(i);var a=o.records[t];return a&&!a.module?a.loadError?Promise.reject(a.loadError):h(e,a,a.linkRecord,n,o):e.resolve(t,r).then(function(t){if(i=n[t])return i;if((a=o.records[t])&&!a.module||(a=d(o,t,a&&a.registration)),a.loadError)return Promise.reject(a.loadError);var r=a.linkRecord;return r?h(e,a,r,n,o):a})}function g(e,t,r){return function(){var e=r.lastRegister;return e?(r.lastRegister=void 0,t.registration=e,!0):!!t.registration}}function h(e,r,n,o,i){return n.instantiatePromise||(n.instantiatePromise=(r.registration?Promise.resolve():Promise.resolve().then(function(){return i.lastRegister=void 0,e[pt](r.key,e[pt].length>1&&g(e,r,i))})).then(function(t){if(void 0!==t){if(!(t instanceof l))throw new TypeError("Instantiate did not return a valid Module object.");return delete i.records[r.key],e.trace&&v(e,r,n),o[r.key]=t}var a=r.registration;if(r.registration=void 0,!a)throw new TypeError("Module instantiation did not call an anonymous or correctly named System.register.");return n.dependencies=a[0],r.importerSetters=[],n.moduleObj={},a[2]?(n.moduleObj.default=n.moduleObj.__useDefault={},n.executingRequire=a[1],n.execute=a[2]):y(e,r,n,a[1]),r}).catch(function(e){throw r.linkRecord=void 0,r.loadError=r.loadError||t(e,"Instantiating "+r.key)}))}function m(e,t,r,n,o,i){return e.resolve(t,r).then(function(r){i&&(i[t]=r);var a=o.records[r],s=n[r];if(s&&(!a||a.module&&s!==a.module))return s;if(a&&a.loadError)throw a.loadError;(!a||!s&&a.module)&&(a=d(o,r,a&&a.registration));var u=a.linkRecord;return u?h(e,a,u,n,o):a})}function v(e,t,r){e.loads=e.loads||{},e.loads[t.key]={key:t.key,deps:r.dependencies,dynamicDeps:[],depMap:r.depMap||{}}}function y(e,t,r,n){var o=r.moduleObj,i=t.importerSetters,a=!1,s=n.call(tt,function(e,t){if("object"==typeof e){var r=!1;for(var n in e)t=e[n],"__useDefault"===n||n in o&&o[n]===t||(r=!0,o[n]=t);if(!1===r)return t}else{if((a||e in o)&&o[e]===t)return t;o[e]=t}for(var s=0;s<i.length;s++)i[s](o);return t},new x(e,t.key));r.setters=s.setters,r.execute=s.execute,s.exports&&(r.moduleObj=o=s.exports,a=!0)}function b(e,r,n,o,i){if(n.depsInstantiatePromise)return n.depsInstantiatePromise;for(var a=Array(n.dependencies.length),s=0;s<n.dependencies.length;s++)a[s]=m(e,n.dependencies[s],r.key,o,i,e.trace&&n.depMap||(n.depMap={}));var u=Promise.all(a).then(function(e){if(n.dependencyInstantiations=e,n.setters)for(var t=0;t<e.length;t++){var o=n.setters[t];if(o){var i=e[t];if(i instanceof l)o(i);else{if(i.loadError)throw i.loadError;o(i.module||i.linkRecord.moduleObj),i.importerSetters&&i.importerSetters.push(o)}}}return r});return e.trace&&(u=u.then(function(){return v(e,r,n),r})),(u=u.catch(function(e){throw n.depsInstantiatePromise=void 0,t(e,"Loading "+r.key)})).catch(function(){}),n.depsInstantiatePromise=u}function w(e,t,r,n,o){return new Promise(function(r,i){function a(t){var r=t.linkRecord;r&&-1===u.indexOf(t)&&(u.push(t),c++,b(e,t,r,n,o).then(s,i))}function s(e){c--;var t=e.linkRecord;if(t)for(var n=0;n<t.dependencies.length;n++){var o=t.dependencyInstantiations[n];o instanceof l||a(o)}0===c&&r()}var u=[],c=0;a(t)})}function x(e,t){this.loader=e,this.key=this.id=t,this.meta={url:t}}function k(e,t,r,n,o,i){if(t.module)return t.module;if(t.evalError)throw t.evalError;if(i&&-1!==i.indexOf(t))return t.linkRecord.moduleObj;var a=O(e,t,r,n,o,r.setters?[]:i||[]);if(a)throw a;return t.module}function E(e,t,r,n,o,i,a){return function(s){for(var u=0;u<r.length;u++)if(r[u]===s){var c,f=n[u];return"__useDefault"in(c=f instanceof l?f:k(e,f,f.linkRecord,o,i,a))?c.__useDefault:c}throw new Error("Module "+s+" not declared as a System.registerDynamic dependency of "+t)}}function O(e,r,n,o,i,a){a.push(r);var s;if(n.setters)for(var u,c,f=0;f<n.dependencies.length;f++)if(!((u=n.dependencyInstantiations[f])instanceof l)&&((c=u.linkRecord)&&-1===a.indexOf(u)&&(s=u.evalError?u.evalError:O(e,u,c,o,i,c.setters?a:[])),s))return r.linkRecord=void 0,r.evalError=t(s,"Evaluating "+r.key),r.evalError;if(n.execute)if(n.setters)s=S(n.execute);else{var d={id:r.key},p=n.moduleObj;Object.defineProperty(d,"exports",{configurable:!0,set:function(e){p.default=p.__useDefault=e},get:function(){return p.__useDefault}});var g=E(e,r.key,n.dependencies,n.dependencyInstantiations,o,i,a);if(!n.executingRequire)for(f=0;f<n.dependencies.length;f++)g(n.dependencies[f]);s=j(n.execute,g,p.default,d),d.exports!==p.__useDefault&&(p.default=p.__useDefault=d.exports);var h=p.default;if(h&&h.__esModule)for(var m in h)Object.hasOwnProperty.call(h,m)&&(p[m]=h[m])}if(r.linkRecord=void 0,s)return r.evalError=t(s,"Evaluating "+r.key);if(o[r.key]=r.module=new l(n.moduleObj),!n.setters){if(r.importerSetters)for(f=0;f<r.importerSetters.length;f++)r.importerSetters[f](r.module);r.importerSetters=void 0}}function S(e){try{e.call(gt)}catch(e){return e}}function j(e,t,r,n){try{var o=e.call(tt,t,r,n);void 0!==o&&(n.exports=o)}catch(e){return e}}function _(){}function P(e){return e instanceof l?e:new l(e&&e.__esModule?e:{default:e,__useDefault:e})}function M(e,t){(t||this.warnings&&"undefined"!=typeof console&&console.warn)&&console.warn(e)}function R(e,t,r){var n=new Uint8Array(t);return 0===n[0]&&97===n[1]&&115===n[2]?WebAssembly.compile(t).then(function(t){var n=[],o=[],i={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(e){var t=e.module;o.push(function(e){i[t]=e}),-1===n.indexOf(t)&&n.push(t)}),e.register(n,function(e){return{setters:o,execute:function(){e(new WebAssembly.Instance(t,i).exports)}}}),r(),!0}):Promise.resolve(!1)}function C(e,t){if("."===e[0])throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!mt){var r=this._nodeRequire("module"),n=decodeURI(t.substr(et?8:7));(mt=new r(n)).paths=r._nodeModulePaths(n)}return mt.require(e)}function L(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function A(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&void 0===e[r]&&(e[r]=t[r]);return e}function I(e,t,r){for(var n in t)if(Object.hasOwnProperty.call(t,n)){var o=t[n];void 0===e[n]?e[n]=o:o instanceof Array&&e[n]instanceof Array?e[n]=[].concat(r?o:e[n]).concat(r?e[n]:o):"object"==typeof o&&null!==o&&"object"==typeof e[n]?e[n]=(r?A:L)(L({},e[n]),o):r||(e[n]=o)}}function F(e){if(kt||Et){var t=document.createElement("link");kt?(t.rel="preload",t.as="script"):t.rel="prefetch",t.href=e,document.head.appendChild(t)}else(new Image).src=e}function K(e,t,r){try{importScripts(e)}catch(e){r(e)}t()}function D(e,t,r,n,o){function i(){n(),s()}function a(t){s(),o(new Error("Fetching "+e))}function s(){u.removeEventListener("load",i,!1),u.removeEventListener("error",a,!1),document.head.removeChild(u)}if(e=e.replace(/#/g,"%23"),xt)return K(e,n,o);var u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,t&&(u.crossOrigin=t),r&&(u.integrity=r),u.addEventListener("load",i,!1),u.addEventListener("error",a,!1),u.src=e,document.head.appendChild(u)}function U(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function q(e,t,r){var o=z(t,r);if(o){var i=t[o]+r.substr(o.length),a=n(i,Ye);return void 0!==a?a:e+i}return-1!==r.indexOf(":")?r:e+r}function T(e){var t=this.name;if(t.substr(0,e.length)===e&&(t.length===e.length||"/"===t[e.length]||"/"===e[e.length-1]||":"===e[e.length-1])){var r=e.split("/").length;r>this.len&&(this.match=e,this.len=r)}}function z(e,t){if(Object.hasOwnProperty.call(e,t))return t;var r={name:t,match:void 0,len:0};return Object.keys(e).forEach(T,r),r.match}function N(e,t,r,n){return new Promise(function(r,o){function i(){r(n?s.response:s.responseText)}function a(){o(new Error("XHR error: "+(s.status?" ("+s.status+(s.statusText?" "+s.statusText:"")+")":"")+" loading "+e))}e=e.replace(/#/g,"%23");var s=new XMLHttpRequest;n&&(s.responseType="arraybuffer"),s.onreadystatechange=function(){4===s.readyState&&(0==s.status?s.response?i():(s.addEventListener("error",a),s.addEventListener("load",i)):200===s.status?i():a())},s.open("GET",e,!0),s.setRequestHeader&&(s.setRequestHeader("Accept","application/x-es-module, */*"),t&&("string"==typeof t&&s.setRequestHeader("Authorization",t),s.withCredentials=!0)),s.send(null)})}function J(){return{pluginKey:void 0,pluginArgument:void 0,pluginModule:void 0,packageKey:void 0,packageConfig:void 0,load:void 0}}function $(e,t,r){var n=J();if(r){var o;t.pluginFirst?-1!==(o=r.lastIndexOf("!"))&&(n.pluginArgument=n.pluginKey=r.substr(0,o)):-1!==(o=r.indexOf("!"))&&(n.pluginArgument=n.pluginKey=r.substr(o+1)),n.packageKey=z(t.packages,r),n.packageKey&&(n.packageConfig=t.packages[n.packageKey])}return n}function B(e,t){var r=Q(e.pluginFirst,t);if(r){var n=B.call(this,e,r.plugin);return V(e.pluginFirst,G.call(this,e,r.argument,void 0,!1,!1),n)}return G.call(this,e,t,void 0,!1,!1)}function W(e,t){var r=this[bt],n=J(),o=o||$(this,r,t),i=Q(r.pluginFirst,e);return i?(n.pluginKey=W.call(this,i.plugin,t),V(r.pluginFirst,H.call(this,r,i.argument,o.pluginArgument||t,n,o,!!n.pluginKey),n.pluginKey)):H.call(this,r,e,o.pluginArgument||t,n,o,!!n.pluginKey)}function G(e,t,r,o,i){var a=n(t,r||Ye);if(a)return q(e.baseURL,e.paths,a);if(o){var s=z(e.map,t);if(s&&(t=e.map[s]+t.substr(s.length),a=n(t,Ye)))return q(e.baseURL,e.paths,a)}if(this.registry.has(t))return t;if("@node/"===t.substr(0,6))return t;var u=i&&"/"!==t[t.length-1],l=q(e.baseURL,e.paths,u?t+"/":t);return u?l.substr(0,l.length-1):l}function H(e,t,r,n,o,i){if(o&&o.packageConfig&&"."!==t[0]){var a=o.packageConfig.map,s=a&&z(a,t);if(s&&"string"==typeof a[s]){var u=ne(this,e,o.packageConfig,o.packageKey,s,t,n,i);if(u)return u}}var l=G.call(this,e,t,r,!0,!0),c=se(e,l);if(n.packageKey=c&&c.packageKey||z(e.packages,l),!n.packageKey)return l;if(-1!==e.packageConfigKeys.indexOf(l))return n.packageKey=void 0,l;n.packageConfig=e.packages[n.packageKey]||(e.packages[n.packageKey]=me());var f=l.substr(n.packageKey.length+1);return te(this,e,n.packageConfig,n.packageKey,f,n,i)}function Z(e,t,r,n,o,i){var a=this;return vt.then(function(){if(o&&o.packageConfig&&"./"!==t.substr(0,2)){var r=o.packageConfig.map,s=r&&z(r,t);if(s)return ie(a,e,o.packageConfig,o.packageKey,s,t,n,i)}return vt}).then(function(o){if(o)return o;var s=G.call(a,e,t,r,!0,!0),u=se(e,s);return n.packageKey=u&&u.packageKey||z(e.packages,s),n.packageKey?-1!==e.packageConfigKeys.indexOf(s)?(n.packageKey=void 0,n.load=X(),n.load.format="json",n.load.loader="",Promise.resolve(s)):(n.packageConfig=e.packages[n.packageKey]||(e.packages[n.packageKey]=me()),(u&&!n.packageConfig.configured?ue(a,e,u.configPath,n):vt).then(function(){var t=s.substr(n.packageKey.length+1);return oe(a,e,n.packageConfig,n.packageKey,t,n,i)})):Promise.resolve(s)})}function X(){return{extension:"",deps:void 0,format:void 0,loader:void 0,scriptLoad:void 0,globals:void 0,nonce:void 0,integrity:void 0,sourceMap:void 0,exports:void 0,encapsulateGlobal:!1,crossOrigin:void 0,cjsRequireDetection:!0,cjsDeferDepsExecute:!1,esModule:!1}}function Y(e,t,r){r.load=r.load||X();var n,o=0;for(var i in e.meta)if(-1!==(n=i.indexOf("*"))&&i.substr(0,n)===t.substr(0,n)&&i.substr(n+1)===t.substr(t.length-i.length+n+1)){var a=i.split("/").length;a>o&&(o=a),I(r.load,e.meta[i],o!==a)}if(e.meta[t]&&I(r.load,e.meta[t],!1),r.packageKey){var s=t.substr(r.packageKey.length+1),u={};if(r.packageConfig.meta){o=0;le(r.packageConfig.meta,s,function(e,t,r){r>o&&(o=r),I(u,t,r&&o>r)}),I(r.load,u,!1)}!r.packageConfig.format||r.pluginKey||r.load.loader||(r.load.format=r.load.format||r.packageConfig.format)}}function Q(e,t){var r,n,o=e?t.indexOf("!"):t.lastIndexOf("!");if(-1!==o)return e?(r=t.substr(o+1),n=t.substr(0,o)):(r=t.substr(0,o),n=t.substr(o+1)||r.substr(r.lastIndexOf(".")+1)),{argument:r,plugin:n}}function V(e,t,r){return e?r+"!"+t:t+"!"+r}function ee(e,t,r,n,o){if(!n||!t.defaultExtension||"/"===n[n.length-1]||o)return n;var i=!1;if(t.meta&&le(t.meta,n,function(e,t,r){if(0===r||e.lastIndexOf("*")!==e.length-1)return i=!0}),!i&&e.meta&&le(e.meta,r+"/"+n,function(e,t,r){if(0===r||e.lastIndexOf("*")!==e.length-1)return i=!0}),i)return n;var a="."+t.defaultExtension;return n.substr(n.length-a.length)!==a?n+a:n}function te(e,t,r,n,o,i,a){if(!o){if(!r.main)return n;o="./"===r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+o,u=z(r.map,s);if(u||(s="./"+ee(t,r,n,o,a))!=="./"+o&&(u=z(r.map,s)),u){var l=ne(e,t,r,n,u,s,i,a);if(l)return l}}return n+"/"+ee(t,r,n,o,a)}function re(e,t,r){return!(t.substr(0,e.length)===e&&r.length>e.length)}function ne(e,t,r,n,o,i,a,s){"/"===i[i.length-1]&&(i=i.substr(0,i.length-1));var u=r.map[o];if("object"==typeof u)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+n);if(re(o,u,i)&&"string"==typeof u)return H.call(e,t,u+i.substr(o.length),n+"/",a,a,s)}function oe(e,t,r,n,o,i,a){if(!o){if(!r.main)return Promise.resolve(n);o="./"===r.main.substr(0,2)?r.main.substr(2):r.main}var s,u;return r.map&&(s="./"+o,(u=z(r.map,s))||(s="./"+ee(t,r,n,o,a))!=="./"+o&&(u=z(r.map,s))),(u?ie(e,t,r,n,u,s,i,a):vt).then(function(e){return e?Promise.resolve(e):Promise.resolve(n+"/"+ee(t,r,n,o,a))})}function ie(e,t,r,n,o,i,a,s){"/"===i[i.length-1]&&(i=i.substr(0,i.length-1));var u=r.map[o];if("string"==typeof u)return re(o,u,i)?Z.call(e,t,u+i.substr(o.length),n+"/",a,a,s).then(function(t){return de.call(e,t,n+"/",a)}):vt;var l=[],c=[];for(var d in u){var p=ce(d);c.push({condition:p,map:u[d]}),l.push(f.prototype.import.call(e,p.module,n))}return Promise.all(l).then(function(e){for(var t=0;t<c.length;t++){var r=c[t].condition,n=U(r.prop,"__useDefault"in e[t]?e[t].__useDefault:e[t]);if(!r.negate&&n||r.negate&&!n)return c[t].map}}).then(function(r){if(r)return re(o,r,i)?Z.call(e,t,r+i.substr(o.length),n+"/",a,a,s).then(function(t){return de.call(e,t,n+"/",a)}):vt})}function ae(e){var t=e.lastIndexOf("*"),r=Math.max(t+1,e.lastIndexOf("/"));return{length:r,regEx:new RegExp("^("+e.substr(0,r).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:-1!==t}}function se(e,t){for(var r,n,o=!1,i=0;i<e.packageConfigPaths.length;i++){var a=e.packageConfigPaths[i],s=Rt[a]||(Rt[a]=ae(a));if(!(t.length<s.length)){var u=t.match(s.regEx);!u||r&&(o&&s.wildcard||!(r.length<u[1].length))||(r=u[1],o=!s.wildcard,n=r+a.substr(s.length))}}if(r)return{packageKey:r,configPath:n}}function ue(e,r,n,o,i){var a=e.pluginLoader||e;return-1===r.packageConfigKeys.indexOf(n)&&r.packageConfigKeys.push(n),a.import(n).then(function(e){ve(o.packageConfig,e,o.packageKey,!0,r),o.packageConfig.configured=!0}).catch(function(e){throw t(e,"Unable to fetch package configuration file "+n)})}function le(e,t,r){var n;for(var o in e){var i="./"===o.substr(0,2)?"./":"";if(i&&(o=o.substr(2)),-1!==(n=o.indexOf("*"))&&o.substr(0,n)===t.substr(0,n)&&o.substr(n+1)===t.substr(t.length-o.length+n+1)&&r(o,e[i+o],o.split("/").length))return}var a=e[t]&&Object.hasOwnProperty.call(e,t)?e[t]:e["./"+t];a&&r(a,a,0)}function ce(e){var t,r,n,o=e.lastIndexOf("|");return-1!==o?(t=e.substr(o+1),r=e.substr(0,o),"~"===t[0]&&(n=!0,t=t.substr(1))):(n="~"===e[0],t="default",r=e.substr(n),-1!==Ct.indexOf(r)&&(t=r,r=null)),{module:r||"@system-env",prop:t,negate:n}}function fe(e,t,r){return f.prototype.import.call(this,e.module,t).then(function(t){var n=U(e.prop,t);if(r&&"boolean"!=typeof n)throw new TypeError("Condition did not resolve to a boolean.");return e.negate?!n:n})}function de(e,t,r){var n=e.match(Lt);if(!n)return Promise.resolve(e);var o=ce.call(this,n[0].substr(2,n[0].length-3));return fe.call(this,o,t,!1).then(function(r){if("string"!=typeof r)throw new TypeError("The condition value for "+e+" doesn't resolve to a string.");if(-1!==r.indexOf("/"))throw new TypeError("Unabled to interpolate conditional "+e+(t?" in "+t:"")+"\n\tThe condition value "+r+' cannot contain a "/" separator.');return e.replace(Lt,r)})}function pe(e,t,r){for(var n=0;n<At.length;n++){var o=At[n];t[o]&&hr[o.substr(0,o.length-6)]&&r(t[o])}}function ge(e,t){var r={};for(var n in e){var o=e[n];t>1?o instanceof Array?r[n]=[].concat(o):"object"==typeof o?r[n]=ge(o,t-1):"packageConfig"!==n&&(r[n]=o):r[n]=o}return r}function he(e,t){var r=e[t];return r instanceof Array?e[t].concat([]):"object"==typeof r?ge(r,3):e[t]}function me(){return{defaultExtension:void 0,main:void 0,format:void 0,meta:void 0,map:void 0,packageConfig:void 0,configured:!1}}function ve(e,t,r,n,o){for(var i in t)"main"===i||"format"===i||"defaultExtension"===i||"configured"===i?n&&void 0!==e[i]||(e[i]=t[i]):"map"===i?(n?A:L)(e.map=e.map||{},t.map):"meta"===i?(n?A:L)(e.meta=e.meta||{},t.meta):Object.hasOwnProperty.call(t,i)&&M.call(o,'"'+i+'" is not a valid package configuration option in package '+r);return void 0===e.defaultExtension&&(e.defaultExtension="js"),void 0===e.main&&e.map&&e.map["."]?(e.main=e.map["."],delete e.map["."]):"object"==typeof e.main&&(e.map=e.map||{},e.map["./@main"]=e.main,e.main.default=e.main.default||"./",e.main="@main"),e}function ye(e){return It?qt+new Buffer(e).toString("base64"):"undefined"!=typeof btoa?qt+btoa(unescape(encodeURIComponent(e))):""}function be(e,t,r,n){var o=e.lastIndexOf("\n");if(t){if("object"!=typeof t)throw new TypeError("load.metadata.sourceMap must be set to an object.");t=JSON.stringify(t)}return(n?"(function(System, SystemJS) {":"")+e+(n?"\n})(System, System);":"")+("\n//# sourceURL="!=e.substr(o,15)?"\n//# sourceURL="+r+(t?"!transpiled":""):"")+(t&&ye(t)||"")}function we(e,t,r,n,o){Ft||(Ft=document.head||document.body||document.documentElement);var i=document.createElement("script");i.text=be(t,r,n,!1);var a,s=window.onerror;if(window.onerror=function(e){a=addToError(e,"Evaluating "+n),s&&s.apply(this,arguments)},xe(e),o&&i.setAttribute("nonce",o),Ft.appendChild(i),Ft.removeChild(i),ke(),window.onerror=s,a)return a}function xe(e){0==Tt++&&(Ut=tt.System),tt.System=tt.SystemJS=e}function ke(){0==--Tt&&(tt.System=tt.SystemJS=Ut)}function Ee(e,t,r,n,o,i,a){if(t){if(i&&zt)return we(e,t,r,n,i);try{xe(e),!Kt&&e._nodeRequire&&(Kt=e._nodeRequire("vm"),Dt=Kt.runInThisContext("typeof System !== 'undefined' && System")===e),Dt?Kt.runInThisContext(be(t,r,n,!a),{filename:n+(r?"!transpiled":"")}):(0,eval)(be(t,r,n,!a)),ke()}catch(e){return ke(),e}}}function Oe(e){e.set("@@cjs-helpers",e.newModule({requireResolve:_e.bind(e),getPathVars:Pe})),e.set("@@global-helpers",e.newModule({prepareGlobal:Le}))}function Se(e){function t(r,n,o,i){if("object"==typeof r&&!(r instanceof Array))return t.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof r&&"function"==typeof n&&(r=[r]),!(r instanceof Array)){if("string"==typeof r){var a=e.decanonicalize(r,i),s=e.get(a);if(!s)throw new Error('Module not already loaded loading "'+r+'" as '+a+(i?' from "'+i+'".':"."));return"__useDefault"in s?s.__useDefault:s}throw new TypeError("Invalid require")}for(var u=[],l=0;l<r.length;l++)u.push(e.import(r[l],i));Promise.all(u).then(function(e){n&&n.apply(null,e)},o)}function r(r,n,o){function i(r,i,l){for(var c=[],f=0;f<n.length;f++)c.push(r(n[f]));if(l.uri=l.id,l.config=_,-1!==u&&c.splice(u,0,l),-1!==s&&c.splice(s,0,i),-1!==a){var d=function(n,o,i){return"string"==typeof n&&"function"!=typeof o?r(n):t.call(e,n,o,i,l.id)};d.toUrl=function(t){return e.normalizeSync(t,l.id)},c.splice(a,0,d)}var p=tt.require;tt.require=t;var g=o.apply(-1===s?tt:i,c);tt.require=p,void 0!==g&&(l.exports=g)}"string"!=typeof r&&(o=n,n=r,r=null),n instanceof Array||(n=["require","exports","module"].splice(0,(o=n).length)),"function"!=typeof o&&(o=function(e){return function(){return e}}(o)),r||Bt&&(n=n.concat(Bt),Bt=void 0);var a,s,u;-1!==(a=n.indexOf("require"))&&(n.splice(a,1),r||(n=n.concat(Ae(o.toString(),a)))),-1!==(s=n.indexOf("exports"))&&n.splice(s,1),-1!==(u=n.indexOf("module"))&&n.splice(u,1),r?(e.registerDynamic(r,n,!1,i),$t?($t=void 0,tr=!0):tr||($t=[n,i])):e.registerDynamic(n,!1,rr?Ie(i):i)}r.amd={},e.amdDefine=r,e.amdRequire=t}function je(e){return"file:///"===e.substr(0,8)?e.substr(7+!!et):Nt&&e.substr(0,Nt.length)===Nt?e.substr(Nt.length):e}function _e(e,t){return je(this.normalizeSync(e,t))}function Pe(e){var t,r=e.lastIndexOf("!"),n=(t=-1!==r?e.substr(0,r):e).split("/");return n.pop(),n=n.join("/"),{filename:je(t),dirname:je(n)}}function Me(e){function t(e,t){for(var r=0;r<e.length;r++)if(e[r][0]<t.index&&e[r][1]>t.index)return!0;return!1}_t.lastIndex=Gt.lastIndex=Ht.lastIndex=0;var r,n=[],o=[],i=[];if(e.length/e.split("\n").length<200){for(;r=Ht.exec(e);)o.push([r.index,r.index+r[0].length]);for(;r=Gt.exec(e);)t(o,r)||i.push([r.index+r[1].length,r.index+r[0].length-1])}for(;r=_t.exec(e);)if(!t(o,r)&&!t(i,r)){var a=r[1].substr(1,r[1].length-2);if(a.match(/"|'/))continue;n.push(a)}return n}function Re(e){if(-1===Zt.indexOf(e)){try{var t=tt[e]}catch(t){Zt.push(e)}this(e,t)}}function Ce(e){if("string"==typeof e)return U(e,tt);if(!(e instanceof Array))throw new Error("Global exports must be a string or array.");for(var t={},r=0;r<e.length;r++)t[e[r].split(".").pop()]=U(e[r],tt);return t}function Le(e,t,r,n){var o=tt.define;tt.define=void 0;var i;if(r){i={};for(var a in r)i[a]=tt[a],tt[a]=r[a]}return t||(Jt={},Object.keys(tt).forEach(Re,function(e,t){Jt[e]=t})),function(){var e,r=t?Ce(t):{},a=!!t;if(t&&!n||Object.keys(tt).forEach(Re,function(o,i){Jt[o]!==i&&void 0!==i&&(n&&(tt[o]=void 0),t||(r[o]=i,void 0!==e?a||e===i||(a=!0):e=i))}),r=a?r:e,i)for(var s in i)tt[s]=i[s];return tt.define=o,r}}function Ae(e,t){var r=((e=e.replace(Gt,"")).match(Qt)[1].split(",")[t]||"require").replace(Vt,""),n=er[r]||(er[r]=new RegExp(Xt+r+Yt,"g"));n.lastIndex=0;for(var o,i=[];o=n.exec(e);)i.push(o[2]||o[3]);return i}function Ie(e){return function(t,r,n){e(t,r,n),"object"!=typeof(r=n.exports)&&"function"!=typeof r||"__esModule"in r||Object.defineProperty(n.exports,"__esModule",{value:!0})}}function Fe(e,t){Bt=e,rr=t,$t=void 0,tr=!1}function Ke(e){$t?e.registerDynamic(Bt?$t[0].concat(Bt):$t[0],!1,rr?Ie($t[1]):$t[1]):tr&&e.registerDynamic([],!1,_)}function De(e,t){!e.load.esModule||"object"!=typeof t&&"function"!=typeof t||"__esModule"in t||Object.defineProperty(t,"__esModule",{value:!0})}function Ue(e,t,r){return r.pluginKey?e.import(r.pluginKey).then(function(e){r.pluginModule=e,r.pluginLoad={name:t,address:r.pluginArgument,source:void 0,metadata:r.load},r.load.deps=r.load.deps||[]}):vt}function qe(e,t,r){var n=e.depCache[r];if(n)for(a=0;a<n.length;a++)t.normalize(n[a],r).then(F);else{var o=!1;for(var i in e.bundles){for(var a=0;a<e.bundles[i].length;a++){var s=e.bundles[i][a];if(s===r){o=!0;break}if(-1!==s.indexOf("*")){var u=s.split("*");if(2!==u.length){e.bundles[i].splice(a--,1);continue}if(r.substr(0,u[0].length)===u[0]&&r.substr(r.length-u[1].length,u[1].length)===u[1]){o=!0;break}}}if(o)return t.import(i)}}}function Te(e,t,r,n,o){return r.load.exports&&!r.load.format&&(r.load.format="global"),vt.then(function(){if(r.pluginModule&&r.pluginModule.locate)return Promise.resolve(r.pluginModule.locate.call(e,r.pluginLoad)).then(function(e){e&&(r.pluginLoad.address=e)})}).then(function(){return r.pluginModule?(o=!1,r.pluginModule.fetch?r.pluginModule.fetch.call(e,r.pluginLoad,function(e){return Mt(e.address,r.load.authorization,r.load.integrity,!1)}):Mt(r.pluginLoad.address,r.load.authorization,r.load.integrity,!1)):Mt(t,r.load.authorization,r.load.integrity,o)}).then(function(i){return o&&"string"!=typeof i?R(e,i,n).then(function(o){if(!o){var a=Qe?new TextDecoder("utf-8").decode(new Uint8Array(i)):i.toString();return ze(e,t,a,r,n)}}):ze(e,t,i,r,n)})}function ze(e,t,r,n,o){return Promise.resolve(r).then(function(t){return"detect"===n.load.format&&(n.load.format=void 0),Ge(t,n),n.pluginModule?(n.pluginLoad.source=t,n.pluginModule.translate?Promise.resolve(n.pluginModule.translate.call(e,n.pluginLoad,n.traceOpts)).then(function(e){if(n.load.sourceMap){if("object"!=typeof n.load.sourceMap)throw new Error("metadata.load.sourceMap must be set to an object.");$e(n.pluginLoad.address,n.load.sourceMap)}return"string"==typeof e?e:n.pluginLoad.source}):t):t}).then(function(r){return n.load.format||'"bundle"'!==r.substring(0,8)?"register"===n.load.format||!n.load.format&&Ne(r)?(n.load.format="register",r):"esm"===n.load.format||!n.load.format&&r.match(ar)?(n.load.format="esm",Be(e,r,t,n,o)):r:(n.load.format="system",r)}).then(function(t){if("string"!=typeof t||!n.pluginModule||!n.pluginModule.instantiate)return t;var r=!1;return n.pluginLoad.source=t,Promise.resolve(n.pluginModule.instantiate.call(e,n.pluginLoad,function(e){if(t=e.source,n.load=e.metadata,r)throw new Error("Instantiate must only be called once.");r=!0})).then(function(e){return r?t:P(e)})}).then(function(r){if("string"!=typeof r)return r;n.load.format||(n.load.format=Je(r));var i=!1;switch(n.load.format){case"esm":case"register":case"system":if(u=Ee(e,r,n.load.sourceMap,t,n.load.integrity,n.load.nonce,!1))throw u;if(!o())return yt;return;case"json":var a=JSON.parse(r);return e.newModule({default:a,__useDefault:a});case"amd":var s=tt.define;tt.define=e.amdDefine,Fe(n.load.deps,n.load.esModule);var u=Ee(e,r,n.load.sourceMap,t,n.load.integrity,n.load.nonce,!1);if((i=o())||(Ke(e),i=o()),tt.define=s,u)throw u;break;case"cjs":var l=n.load.deps,c=(n.load.deps||[]).concat(n.load.cjsRequireDetection?Me(r):[]);for(var f in n.load.globals)n.load.globals[f]&&c.push(n.load.globals[f]);e.registerDynamic(c,!0,function(o,i,a){if(o.resolve=function(t){return _e.call(e,t,a.id)},a.paths=[],a.require=o,!n.load.cjsDeferDepsExecute&&l)for(var s=0;s<l.length;s++)o(l[s]);var u=Pe(a.id),c={exports:i,args:[o,i,a,u.filename,u.dirname,tt,tt]},f="(function (require, exports, module, __filename, __dirname, global, GLOBAL";if(n.load.globals)for(var d in n.load.globals)c.args.push(o(n.load.globals[d])),f+=", "+d;var p=tt.define;tt.define=void 0,tt.__cjsWrapper=c,r=f+") {"+r.replace(cr,"")+"\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);";var g=Ee(e,r,n.load.sourceMap,t,n.load.integrity,n.load.nonce,!1);if(g)throw g;De(n,i),tt.__cjsWrapper=void 0,tt.define=p}),i=o();break;case"global":c=n.load.deps||[];for(var f in n.load.globals){var d=n.load.globals[f];d&&c.push(d)}e.registerDynamic(c,!1,function(o,i,a){var s;if(n.load.globals){s={};for(var u in n.load.globals)n.load.globals[u]&&(s[u]=o(n.load.globals[u]))}var l=n.load.exports;l&&(r+="\n"+ir+'["'+l+'"] = '+l+";");var c=Le(a.id,l,s,n.load.encapsulateGlobal),f=Ee(e,r,n.load.sourceMap,t,n.load.integrity,n.load.nonce,!0);if(f)throw f;var d=c();return De(n,d),d}),i=o();break;default:throw new TypeError('Unknown module format "'+n.load.format+'" for "'+t+'".'+("es6"===n.load.format?' Use "esm" instead here.':""))}if(!i)throw new Error("Module "+t+" detected as "+n.load.format+" but didn't execute correctly.")})}function Ne(e){var t=e.match(sr);return t&&"System.register"===e.substr(t[0].length,15)}function Je(e){return e.match(ur)?"amd":(lr.lastIndex=0,_t.lastIndex=0,_t.exec(e)||lr.exec(e)?"cjs":"global")}function $e(e,t){var r=e.split("!")[0];t.file&&t.file!=e||(t.file=r+"!transpiled"),(!t.sources||t.sources.length<=1&&(!t.sources[0]||t.sources[0]===e))&&(t.sources=[r])}function Be(e,r,n,o,i){if(!e.transpiler)throw new TypeError("Unable to dynamically transpile ES module\n A loader plugin needs to be configured via `SystemJS.config({ transpiler: 'transpiler-module' })`.");if(o.load.deps){for(var a="",s=0;s<o.load.deps.length;s++)a+='import "'+o.load.deps[s]+'"; ';r=a+r}return e.import.call(e,e.transpiler).then(function(t){if(!(t=t.__useDefault||t).translate)throw new Error(e.transpiler+" is not a valid transpiler plugin.");return t===o.pluginModule?r:("string"==typeof o.load.sourceMap&&(o.load.sourceMap=JSON.parse(o.load.sourceMap)),o.pluginLoad=o.pluginLoad||{name:n,address:n,source:r,metadata:o.load},o.load.deps=o.load.deps||[],Promise.resolve(t.translate.call(e,o.pluginLoad,o.traceOpts)).then(function(e){var t=o.load.sourceMap;return t&&"object"==typeof t&&$e(n,t),"esm"===o.load.format&&Ne(e)&&(o.load.format="register"),e}))},function(e){throw t(e,"Unable to load transpiler to transpile "+n)})}function We(e,t,r){for(var n,o=t.split(".");o.length>1;)e=e[n=o.shift()]=e[n]||{};void 0===e[n=o.shift()]&&(e[n]=r)}function Ge(e,t){var r=e.match(fr);if(r)for(var n=r[0].match(dr),o=0;o<n.length;o++){var i=n[o],a=i.length,s=i.substr(0,1);if(";"==i.substr(a-1,1)&&a--,'"'==s||"'"==s){var u=i.substr(1,i.length-3),l=u.substr(0,u.indexOf(" "));if(l){var c=u.substr(l.length+1,u.length-l.length-1);"deps"===l&&(l="deps[]"),"[]"===l.substr(l.length-2,2)?(l=l.substr(0,l.length-2),t.load[l]=t.load[l]||[],t.load[l].push(c)):"use"!==l&&We(t.load,l,c)}else t.load[u]=!0}}}function He(){f.call(this),this._loader={},this[wt]={},this[bt]={baseURL:Ye,paths:{},packageConfigPaths:[],packageConfigKeys:[],map:{},packages:{},depCache:{},meta:{},bundles:{},production:!1,transpiler:void 0,loadedBundles:{},warnings:!1,pluginFirst:!1,wasm:!1},this.scriptSrc=or,this._nodeRequire=Wt,this.registry.set("@empty",yt),Ze.call(this,!1,!1),Oe(this),Se(this)}function Ze(e,t){this[bt].production=e,this.registry.set("@system-env",hr=this.newModule({browser:Qe,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}function Xe(e,t){M.call(e[bt],"SystemJS."+t+" is deprecated for SystemJS.registry."+t)}var Ye,Qe="undefined"!=typeof window&&"undefined"!=typeof document,Ve="undefined"!=typeof process&&process.versions&&process.versions.node,et="undefined"!=typeof process&&"string"==typeof process.platform&&process.platform.match(/^win/),tt="undefined"!=typeof self?self:global,rt="undefined"!=typeof Symbol;if("undefined"!=typeof document&&document.getElementsByTagName){if(!(Ye=document.baseURI)){var nt=document.getElementsByTagName("base");Ye=nt[0]&&nt[0].href||window.location.href}}else"undefined"!=typeof location&&(Ye=location.href);if(Ye){var ot=(Ye=Ye.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==ot&&(Ye=Ye.substr(0,ot+1))}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");Ye="file://"+(et?"/":"")+process.cwd(),et&&(Ye=Ye.replace(/\\/g,"/"))}"/"!==Ye[Ye.length-1]&&(Ye+="/");var it="_"==new Error(0,"_").fileName,at=Promise.resolve();i.prototype.constructor=i,i.prototype.import=function(e,r){if("string"!=typeof e)throw new TypeError("Loader import method must be passed a module key string");var n=this;return at.then(function(){return n[ut](e,r)}).then(a).catch(function(n){throw t(n,"Loading "+e+(r?" from "+r:""))})};var st=i.resolve=e("resolve"),ut=i.resolveInstantiate=e("resolveInstantiate");i.prototype[ut]=function(e,t){var r=this;return r.resolve(e,t).then(function(e){return r.registry.get(e)})},i.prototype.resolve=function(e,r){var n=this;return at.then(function(){return n[st](e,r)}).then(s).catch(function(n){throw t(n,"Resolving "+e+(r?" to "+r:""))})};var lt="undefined"!=typeof Symbol&&Symbol.iterator,ct=e("registry");lt&&(u.prototype[Symbol.iterator]=function(){return this.entries()[Symbol.iterator]()},u.prototype.entries=function(){var e=this[ct];return o(Object.keys(e).map(function(t){return[t,e[t]]}))}),u.prototype.keys=function(){return o(Object.keys(this[ct]))},u.prototype.values=function(){var e=this[ct];return o(Object.keys(e).map(function(t){return e[t]}))},u.prototype.get=function(e){return this[ct][e]},u.prototype.set=function(e,t){if(!(t instanceof l))throw new Error("Registry must be set with an instance of Module Namespace");return this[ct][e]=t,this},u.prototype.has=function(e){return Object.hasOwnProperty.call(this[ct],e)},u.prototype.delete=function(e){return!!Object.hasOwnProperty.call(this[ct],e)&&(delete this[ct][e],!0)};var ft=e("baseObject");l.prototype=Object.create(null),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(l.prototype,Symbol.toStringTag,{value:"Module"});var dt=e("register-internal");f.prototype=Object.create(i.prototype),f.prototype.constructor=f;var pt=f.instantiate=e("instantiate");f.prototype[f.resolve=i.resolve]=function(e,t){return n(e,t||Ye)},f.prototype[pt]=function(e,t){},f.prototype[i.resolveInstantiate]=function(e,t){var r=this,n=this[dt],o=this.registry[ct];return p(r,e,t,o,n).then(function(e){if(e instanceof l)return e;var t=e.linkRecord;if(!t){if(e.module)return e.module;throw e.evalError}return w(r,e,0,o,n).then(function(){return k(r,e,t,o,n,void 0)})})},f.prototype.register=function(e,t,r){var n=this[dt];void 0===r?n.lastRegister=[e,t,void 0]:(n.records[e]||d(n,e,void 0)).registration=[t,r,void 0]},f.prototype.registerDynamic=function(e,t,r,n){var o=this[dt];"string"!=typeof e?o.lastRegister=[e,t,r]:(o.records[e]||d(o,e,void 0)).registration=[t,r,n]},x.prototype.import=function(e){return this.loader.trace&&this.loader.loads[this.key].dynamicDeps.push(e),this.loader.import(e,this.key)};var gt={};Object.freeze&&Object.freeze(gt);var ht,mt,vt=Promise.resolve(),yt=new l({}),bt=e("loader-config"),wt=e("metadata"),xt="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,kt=!1,Et=!1;if(Qe&&function(){var e=document.createElement("link").relList;if(e&&e.supports){Et=!0;try{kt=e.supports("preload")}catch(e){}}}(),Qe){var Ot=window.onerror;window.onerror=function(e,t){Ot&&Ot.apply(this,arguments)}}var St,jt,_t=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*'|`[^`\\]*(?:\\.[^`\\]*)*`)\s*\)/g,Pt="undefined"!=typeof XMLHttpRequest,Mt=jt="undefined"!=typeof self&&void 0!==self.fetch?function(e,t,r,n){if("file:///"===e.substr(0,8)){if(Pt)return N(e,t,0,n);throw new Error("Unable to fetch file URLs in this environment.")}e=e.replace(/#/g,"%23");var o={headers:{Accept:"application/x-es-module, */*"}};return r&&(o.integrity=r),t&&("string"==typeof t&&(o.headers.Authorization=t),o.credentials="include"),fetch(e,o).then(function(e){if(e.ok)return n?e.arrayBuffer():e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)})}:Pt?N:"undefined"!=typeof require&&"undefined"!=typeof process?function(e,t,r,n){return"file:///"!=e.substr(0,8)?Promise.reject(new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// supported running in Node.')):(St=St||require("fs"),e=et?e.replace(/\//g,"\\").substr(8):e.substr(7),new Promise(function(t,r){St.readFile(e,function(e,o){if(e)return r(e);if(n)t(o);else{var i=o+"";"\ufeff"===i[0]&&(i=i.substr(1)),t(i)}})}))}:function(){throw new Error("No fetch method is defined for this environment.")},Rt={},Ct=["browser","node","dev","build","production","default"],Lt=/#\{[^\}]+\}/,At=["browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"],It="undefined"!=typeof Buffer;try{It&&"YQ=="!==new Buffer("a").toString("base64")&&(It=!1)}catch(e){It=!1}var Ft,Kt,Dt,Ut,qt="\n//# sourceMappingURL=data:application/json;base64,",Tt=0,zt=!1;Qe&&"undefined"!=typeof document&&document.getElementsByTagName&&(window.chrome&&window.chrome.extension||navigator.userAgent.match(/^Node\.js/)||(zt=!0));var Nt;"undefined"!=typeof window&&"undefined"!=typeof document&&window.location&&(Nt=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""));var Jt,$t,Bt,Wt,Gt=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,Ht=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,Zt=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"],Xt="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",Yt="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",Qt=/\(([^\)]*)\)/,Vt=/^\s+|\s+$/g,er={},tr=!1,rr=!1,nr=(Qe||xt)&&"undefined"!=typeof navigator&&navigator.userAgent&&!navigator.userAgent.match(/MSIE (9|10).0/);"undefined"==typeof require||"undefined"==typeof process||process.browser||(Wt=require);var or,ir="undefined"!=typeof self?"self":"global",ar=/(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?(?!type)([^"'\(\)\n; ]+)\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/,sr=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/,ur=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/,lr=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/,cr=/^\#\!.*/,fr=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,dr=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;if("undefined"==typeof Promise)throw new Error("SystemJS needs a Promise polyfill.");if("undefined"!=typeof document){var pr=document.getElementsByTagName("script"),gr=pr[pr.length-1];document.currentScript&&(gr.defer||gr.async)&&(gr=document.currentScript),or=gr&&gr.src}else if("undefined"!=typeof importScripts)try{throw new Error("_")}catch(e){e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){or=t})}else"undefined"!=typeof __filename&&(or=__filename);var hr;(He.prototype=Object.create(f.prototype)).constructor=He,He.prototype[He.resolve=f.resolve]=He.prototype.normalize=function(e,t){var r=this[bt],n=J(),o=$(this,r,t),i=this;return Promise.resolve().then(function(){var r=e.lastIndexOf("#?");if(-1===r)return Promise.resolve(e);var n=ce.call(i,e.substr(r+2));return fe.call(i,n,t,!0).then(function(t){return t?e.substr(0,r):"@empty"})}).then(function(e){var a=Q(r.pluginFirst,e);return a?(n.pluginKey=a.plugin,Promise.all([Z.call(i,r,a.argument,o&&o.pluginArgument||t,n,o,!0),i.resolve(a.plugin,t)]).then(function(e){if(n.pluginArgument=e[0],n.pluginKey=e[1],n.pluginArgument===n.pluginKey)throw new Error("Plugin "+n.pluginArgument+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");return V(r.pluginFirst,e[0],e[1])})):Z.call(i,r,e,o&&o.pluginArgument||t,n,o,!1)}).then(function(e){return de.call(i,e,t,o)}).then(function(e){return Y.call(i,r,e,n),n.pluginKey||!n.load.loader?e:i.resolve(n.load.loader,e).then(function(t){return n.pluginKey=t,n.pluginArgument=e,e})}).then(function(e){return i[wt][e]=n,e})},He.prototype.load=function(e,t){return M.call(this[bt],"System.load is deprecated."),this.import(e,t)},He.prototype.decanonicalize=He.prototype.normalizeSync=He.prototype.resolveSync=W,He.prototype[He.instantiate=f.instantiate]=function(e,t){var r=this,n=this[bt];return(qe(n,this,e)||vt).then(function(){if(!t()){var o=r[wt][e];if("@node/"===e.substr(0,6)){if(!r._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return r.registerDynamic([],!1,function(){return C.call(r,e.substr(6),r.baseURL)}),void t()}return o.load.scriptLoad?!o.load.pluginKey&&nr||(o.load.scriptLoad=!1,M.call(n,'scriptLoad not supported for "'+e+'"')):!1!==o.load.scriptLoad&&!o.load.pluginKey&&nr&&(o.load.deps||o.load.globals||!("system"===o.load.format||"register"===o.load.format||"global"===o.load.format&&o.load.exports)||(o.load.scriptLoad=!0)),o.load.scriptLoad?new Promise(function(n,i){if("amd"===o.load.format&&tt.define!==r.amdDefine)throw new Error("Loading AMD with scriptLoad requires setting the global `"+ir+".define = SystemJS.amdDefine`");D(e,o.load.crossOrigin,o.load.integrity,function(){if(!t()){o.load.format="global";var e=o.load.exports&&Ce(o.load.exports);r.registerDynamic([],!1,function(){return De(o,e),e}),t()}n()},i)}):Ue(r,e,o).then(function(){return Te(r,e,o,t,n.wasm)})}}).then(function(t){return delete r[wt][e],t})},He.prototype.config=function(e,t){var r=this,o=this[bt];if("warnings"in e&&(o.warnings=e.warnings),"wasm"in e&&(o.wasm="undefined"!=typeof WebAssembly&&e.wasm),("production"in e||"build"in e)&&Ze.call(r,!!e.production,!!(e.build||hr&&hr.build)),!t){var i;pe(r,e,function(e){i=i||e.baseURL}),(i=i||e.baseURL)&&(o.baseURL=n(i,Ye)||n("./"+i,Ye),"/"!==o.baseURL[o.baseURL.length-1]&&(o.baseURL+="/")),e.paths&&L(o.paths,e.paths),pe(r,e,function(e){e.paths&&L(o.paths,e.paths)});for(var a in o.paths)-1!==o.paths[a].indexOf("*")&&(M.call(o,"Path config "+a+" -> "+o.paths[a]+" is no longer supported as wildcards are deprecated."),delete o.paths[a])}if(e.defaultJSExtensions&&M.call(o,"The defaultJSExtensions configuration option is deprecated.\n Use packages defaultExtension instead.",!0),"boolean"==typeof e.pluginFirst&&(o.pluginFirst=e.pluginFirst),e.map)for(var a in e.map){var s=e.map[a];if("string"==typeof s){var u=G.call(r,o,s,void 0,!1,!1);"/"===u[u.length-1]&&":"!==a[a.length-1]&&"/"!==a[a.length-1]&&(u=u.substr(0,u.length-1)),o.map[a]=u}else{m=(m=G.call(r,o,"/"!==a[a.length-1]?a+"/":a,void 0,!0,!0)).substr(0,m.length-1);var l=o.packages[m];l||((l=o.packages[m]={defaultExtension:void 0,main:void 0,format:void 0,meta:void 0,map:void 0,packageConfig:void 0,configured:!1}).defaultExtension=""),ve(l,{map:s},m,!1,o)}}if(e.packageConfigPaths){for(var c=[],f=0;f<e.packageConfigPaths.length;f++){var d=e.packageConfigPaths[f],p=Math.max(d.lastIndexOf("*")+1,d.lastIndexOf("/")),g=G.call(r,o,d.substr(0,p),void 0,!1,!1);c[f]=g+d.substr(p)}o.packageConfigPaths=c}if(e.bundles)for(var a in e.bundles){for(var h=[],f=0;f<e.bundles[a].length;f++)h.push(r.normalizeSync(e.bundles[a][f]));o.bundles[a]=h}if(e.packages)for(var a in e.packages){if(a.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+a+'" is not a valid package name.');var m=G.call(r,o,"/"!==a[a.length-1]?a+"/":a,void 0,!0,!0);m=m.substr(0,m.length-1),ve(o.packages[m]=o.packages[m]||{defaultExtension:void 0,main:void 0,format:void 0,meta:void 0,map:void 0,packageConfig:void 0,configured:!1},e.packages[a],m,!1,o)}if(e.depCache)for(var a in e.depCache)o.depCache[r.normalizeSync(a)]=[].concat(e.depCache[a]);if(e.meta)for(var a in e.meta)if("*"===a[0])L(o.meta[a]=o.meta[a]||{},e.meta[a]);else{var v=G.call(r,o,a,void 0,!0,!0);L(o.meta[v]=o.meta[v]||{},e.meta[a])}"transpiler"in e&&(o.transpiler=e.transpiler);for(var y in e)-1===mr.indexOf(y)&&-1===At.indexOf(y)&&(r[y]=e[y]);pe(r,e,function(e){r.config(e,!0)})},He.prototype.getConfig=function(e){if(e){if(-1!==mr.indexOf(e))return he(this[bt],e);throw new Error('"'+e+'" is not a valid configuration name. Must be one of '+mr.join(", ")+".")}for(var t={},r=0;r<mr.length;r++){var n=mr[r],o=he(this[bt],n);void 0!==o&&(t[n]=o)}return t},He.prototype.global=tt,He.prototype.import=function(){return f.prototype.import.apply(this,arguments).then(function(e){return"__useDefault"in e?e.__useDefault:e})};for(var mr=["baseURL","map","paths","packages","packageConfigPaths","depCache","meta","bundles","transpiler","warnings","pluginFirst","production","wasm"],vr="undefined"!=typeof Proxy,yr=0;yr<mr.length;yr++)!function(e){Object.defineProperty(He.prototype,e,{get:function(){var t=he(this[bt],e);return vr&&"object"==typeof t&&(t=new Proxy(t,{set:function(t,r){throw new Error("Cannot set SystemJS."+e+'["'+r+'"] directly. Use SystemJS.config({ '+e+': { "'+r+'": ... } }) rather.')}})),t},set:function(t){throw new Error("Setting `SystemJS."+e+"` directly is no longer supported. Use `SystemJS.config({ "+e+": ... })`.")}})}(mr[yr]);He.prototype.delete=function(e){return Xe(this,"delete"),this.registry.delete(e)},He.prototype.get=function(e){return Xe(this,"get"),this.registry.get(e)},He.prototype.has=function(e){return Xe(this,"has"),this.registry.has(e)},He.prototype.set=function(e,t){return Xe(this,"set"),this.registry.set(e,t)},He.prototype.newModule=function(e){return new l(e)},He.prototype.isModule=function(e){return void 0===ht&&(ht="undefined"!=typeof Symbol&&!!Symbol.toStringTag),e instanceof l||ht&&"[object Module]"==Object.prototype.toString.call(e)},He.prototype.register=function(e,t,r){return"string"==typeof e&&(e=B.call(this,this[bt],e)),f.prototype.register.call(this,e,t,r)},He.prototype.registerDynamic=function(e,t,r,n){return"string"==typeof e&&(e=B.call(this,this[bt],e)),f.prototype.registerDynamic.call(this,e,t,r,n)},He.prototype.version="0.21.0 Dev";var br=new He;(Qe||xt)&&(tt.SystemJS=tt.System=br),"undefined"!=typeof module&&module.exports&&(module.exports=br)}(); | ||
* SystemJS v0.21.1 Dev | ||
*/ | ||
!function(){"use strict";var isBrowser="undefined"!=typeof window&&"undefined"!=typeof document,isNode="undefined"!=typeof process&&process.versions&&process.versions.node,isWindows="undefined"!=typeof process&&"string"==typeof process.platform&&process.platform.match(/^win/),envGlobal="undefined"!=typeof self?self:global,hasSymbol="undefined"!=typeof Symbol,baseURI;function createSymbol(e){return hasSymbol?Symbol():"@@"+e}if("undefined"!=typeof document&&document.getElementsByTagName){if(baseURI=document.baseURI,!baseURI){var bases=document.getElementsByTagName("base");baseURI=bases[0]&&bases[0].href||window.location.href}}else"undefined"!=typeof location&&(baseURI=location.href);if(baseURI){baseURI=baseURI.split("#")[0].split("?")[0];var slashIndex=baseURI.lastIndexOf("/");-1!==slashIndex&&(baseURI=baseURI.substr(0,slashIndex+1))}else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");baseURI="file://"+(isWindows?"/":"")+process.cwd(),isWindows&&(baseURI=baseURI.replace(/\\/g,"/"))}"/"!==baseURI[baseURI.length-1]&&(baseURI+="/");var errArgs="_"==new Error(0,"_").fileName;function LoaderError__Check_error_message_for_loader_stack(e,t){isBrowser||(t=t.replace(isWindows?/file:\/\/\//g:/file:\/\//g,""));var r,n=(e.message||e)+"\n "+t;r=errArgs&&e.fileName?new Error(n,e.fileName,e.lineNumber):new Error(n);var o=e.originalErr?e.originalErr.stack:e.stack;return r.stack=isNode?n+"\n "+o:o,r.originalErr=e.originalErr||e,r}function throwResolveError(e,t){throw new RangeError('Unable to resolve "'+e+'" to '+t)}function resolveIfNotPlain(e,t){e=e.trim();var r=t&&t.substr(0,t.indexOf(":")+1),n=e[0],o=e[1];if("/"===n&&"/"===o)return r||throwResolveError(e,t),r+e;if("."===n&&("/"===o||"."===o&&("/"===e[2]||2===e.length&&(e+="/"))||1===e.length&&(e+="/"))||"/"===n){var a,i=!r||"/"!==t[r.length];if(i?(void 0===t&&throwResolveError(e,t),a=t):a="/"===t[r.length+1]?"file:"!==r?(a=t.substr(r.length+2)).substr(a.indexOf("/")+1):t.substr(8):t.substr(r.length+1),"/"===n){if(!i)return t.substr(0,t.length-a.length-1)+e;throwResolveError(e,t)}for(var s=a.substr(0,a.lastIndexOf("/")+1)+e,l=[],u=-1,c=0;c<s.length;c++)if(-1===u)if("."!==s[c])u=c;else{if("."!==s[c+1]||"/"!==s[c+2]&&c+2!==s.length){if("/"!==s[c+1]&&c+1!==s.length){u=c;continue}c+=1}else l.pop(),c+=2;i&&0===l.length&&throwResolveError(e,t)}else"/"===s[c]&&(l.push(s.substring(u,c+1)),u=-1);return-1!==u&&l.push(s.substr(u)),t.substr(0,t.length-a.length)+l.join("")}return-1!==e.indexOf(":")?isNode&&":"===e[1]&&"\\"===e[2]&&e[0].match(/[a-z]/i)?"file:///"+e.replace(/\\/g,"/"):e:void 0}var resolvedPromise=Promise.resolve();function arrayValues(r){if(r.values)return r.values();if("undefined"==typeof Symbol||!Symbol.iterator)throw new Error("Symbol.iterator not supported in this browser");var e={};return e[Symbol.iterator]=function(){var e=Object.keys(r),t=0;return{next:function(){return t<e.length?{value:r[e[t++]],done:!1}:{value:void 0,done:!0}}}},e}function Loader(){this.registry=new Registry}function ensureInstantiated(e){if(!(e instanceof ModuleNamespace))throw new TypeError("Module instantiation did not return a valid namespace object.");return e}Loader.prototype.constructor=Loader,Loader.prototype.import=function(t,r){if("string"!=typeof t)throw new TypeError("Loader import method must be passed a module key string");var e=this;return resolvedPromise.then(function(){return e[RESOLVE_INSTANTIATE](t,r)}).then(ensureInstantiated).catch(function(e){throw LoaderError__Check_error_message_for_loader_stack(e,"Loading "+t+(r?" from "+r:""))})};var RESOLVE=Loader.resolve=createSymbol("resolve"),RESOLVE_INSTANTIATE=Loader.resolveInstantiate=createSymbol("resolveInstantiate");function ensureResolution(e){if(void 0===e)throw new RangeError("No resolution found.");return e}Loader.prototype[RESOLVE_INSTANTIATE]=function(e,t){var r=this;return r.resolve(e,t).then(function(e){return r.registry.get(e)})},Loader.prototype.resolve=function(t,r){var e=this;return resolvedPromise.then(function(){return e[RESOLVE](t,r)}).then(ensureResolution).catch(function(e){throw LoaderError__Check_error_message_for_loader_stack(e,"Resolving "+t+(r?" to "+r:""))})};var iteratorSupport="undefined"!=typeof Symbol&&Symbol.iterator,REGISTRY=createSymbol("registry");function Registry(){this[REGISTRY]={}}iteratorSupport&&(Registry.prototype[Symbol.iterator]=function(){return this.entries()[Symbol.iterator]()},Registry.prototype.entries=function(){var t=this[REGISTRY];return arrayValues(Object.keys(t).map(function(e){return[e,t[e]]}))}),Registry.prototype.keys=function(){return arrayValues(Object.keys(this[REGISTRY]))},Registry.prototype.values=function(){var t=this[REGISTRY];return arrayValues(Object.keys(t).map(function(e){return t[e]}))},Registry.prototype.get=function(e){return this[REGISTRY][e]},Registry.prototype.set=function(e,t){if(!(t instanceof ModuleNamespace))throw new Error("Registry must be set with an instance of Module Namespace");return this[REGISTRY][e]=t,this},Registry.prototype.has=function(e){return Object.hasOwnProperty.call(this[REGISTRY],e)},Registry.prototype.delete=function(e){return!!Object.hasOwnProperty.call(this[REGISTRY],e)&&(delete this[REGISTRY][e],!0)};var BASE_OBJECT=createSymbol("baseObject");function ModuleNamespace(e){Object.defineProperty(this,BASE_OBJECT,{value:e}),Object.keys(e).forEach(extendNamespace,this)}function extendNamespace(e){Object.defineProperty(this,e,{enumerable:!0,get:function(){return this[BASE_OBJECT][e]}})}ModuleNamespace.prototype=Object.create(null),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(ModuleNamespace.prototype,Symbol.toStringTag,{value:"Module"});var REGISTER_INTERNAL=createSymbol("register-internal");function RegisterLoader(){Loader.call(this);var r=this.registry.delete;this.registry.delete=function(e){var t=r.call(this,e);return n.hasOwnProperty(e)&&!n[e].linkRecord&&(delete n[e],t=!0),t};var n={};this[REGISTER_INTERNAL]={lastRegister:void 0,records:n},this.trace=!1}RegisterLoader.prototype=Object.create(Loader.prototype),RegisterLoader.prototype.constructor=RegisterLoader;var INSTANTIATE=RegisterLoader.instantiate=createSymbol("instantiate");function createLoadRecord(e,t,r){return e.records[t]={key:t,registration:r,module:void 0,importerSetters:void 0,loadError:void 0,evalError:void 0,linkRecord:{instantiatePromise:void 0,dependencies:void 0,execute:void 0,executingRequire:!1,moduleObj:void 0,setters:void 0,depsInstantiatePromise:void 0,dependencyInstantiations:void 0}}}function resolveInstantiate(r,e,t,n,o){var a=n[e];if(a)return Promise.resolve(a);var i=o.records[e];return i&&!i.module?i.loadError?Promise.reject(i.loadError):instantiate(r,i,i.linkRecord,n,o):r.resolve(e,t).then(function(e){if(a=n[e])return a;if((i=o.records[e])&&!i.module||(i=createLoadRecord(o,e,i&&i.registration)),i.loadError)return Promise.reject(i.loadError);var t=i.linkRecord;return t?instantiate(r,i,t,n,o):i})}function createProcessAnonRegister(e,t,r){return function(){var e=r.lastRegister;return e?(r.lastRegister=void 0,t.registration=e,!0):!!t.registration}}function instantiate(r,n,o,a,i){return o.instantiatePromise||(o.instantiatePromise=(n.registration?Promise.resolve():Promise.resolve().then(function(){return i.lastRegister=void 0,r[INSTANTIATE](n.key,1<r[INSTANTIATE].length&&createProcessAnonRegister(r,n,i))})).then(function(e){if(void 0!==e){if(!(e instanceof ModuleNamespace))throw new TypeError("Instantiate did not return a valid Module object.");return delete i.records[n.key],r.trace&&traceLoad(r,n,o),a[n.key]=e}var t=n.registration;if(n.registration=void 0,!t)throw new TypeError("Module instantiation did not call an anonymous or correctly named System.register.");return o.dependencies=t[0],n.importerSetters=[],o.moduleObj={},t[2]?(o.moduleObj.default=o.moduleObj.__useDefault={},o.executingRequire=t[1],o.execute=t[2]):registerDeclarative(r,n,o,t[1]),n}).catch(function(e){throw n.linkRecord=void 0,n.loadError=n.loadError||LoaderError__Check_error_message_for_loader_stack(e,"Instantiating "+n.key)}))}function resolveInstantiateDep(o,a,e,i,s,l){return o.resolve(a,e).then(function(e){l&&(l[a]=e);var t=s.records[e],r=i[e];if(r&&(!t||t.module&&r!==t.module))return r;if(t&&t.loadError)throw t.loadError;(!t||!r&&t.module)&&(t=createLoadRecord(s,e,t&&t.registration));var n=t.linkRecord;return n?instantiate(o,t,n,i,s):t})}function traceLoad(e,t,r){e.loads=e.loads||{},e.loads[t.key]={key:t.key,deps:r.dependencies,dynamicDeps:[],depMap:r.depMap||{}}}function registerDeclarative(e,t,r,n){var a=r.moduleObj,i=t.importerSetters,s=!1,o=n.call(envGlobal,function(e,t){if("object"==typeof e){var r=!1;for(var n in e)t=e[n],"__useDefault"===n||n in a&&a[n]===t||(r=!0,a[n]=t);if(!1===r)return t}else{if((s||e in a)&&a[e]===t)return t;a[e]=t}for(var o=0;o<i.length;o++)i[o](a);return t},new ContextualLoader(e,t.key));r.setters=o.setters,r.execute=o.execute,o.exports&&(r.moduleObj=a=o.exports,s=!0)}function instantiateDeps(e,o,a,t,r){if(a.depsInstantiatePromise)return a.depsInstantiatePromise;for(var n=Array(a.dependencies.length),i=0;i<a.dependencies.length;i++)n[i]=resolveInstantiateDep(e,a.dependencies[i],o.key,t,r,e.trace&&a.depMap||(a.depMap={}));var s=Promise.all(n).then(function(e){if(a.dependencyInstantiations=e,a.setters)for(var t=0;t<e.length;t++){var r=a.setters[t];if(r){var n=e[t];if(n instanceof ModuleNamespace)r(n);else{if(n.loadError)throw n.loadError;r(n.module||n.linkRecord.moduleObj),n.importerSetters&&n.importerSetters.push(r)}}}return o});return e.trace&&(s=s.then(function(){return traceLoad(e,o,a),o})),(s=s.catch(function(e){throw a.depsInstantiatePromise=void 0,LoaderError__Check_error_message_for_loader_stack(e,"Loading "+o.key)})).catch(function(){}),a.depsInstantiatePromise=s}function deepInstantiateDeps(l,e,t,u,c){return new Promise(function(o,r){var n=[],a=0;function i(e){var t=e.linkRecord;t&&-1===n.indexOf(e)&&(n.push(e),a++,instantiateDeps(l,e,t,u,c).then(s,r))}function s(e){a--;var t=e.linkRecord;if(t)for(var r=0;r<t.dependencies.length;r++){var n=t.dependencyInstantiations[r];n instanceof ModuleNamespace||i(n)}0===a&&o()}i(e)})}function ContextualLoader(e,t){this.loader=e,this.key=this.id=t,this.meta={url:t}}function ensureEvaluate(e,t,r,n,o,a){if(t.module)return t.module;if(t.evalError)throw t.evalError;if(a&&-1!==a.indexOf(t))return t.linkRecord.moduleObj;var i=doEvaluate(e,t,r,n,o,r.setters?[]:a||[]);if(i)throw i;return t.module}function makeDynamicRequire(o,a,i,s,l,u,c){return function(e){for(var t=0;t<i.length;t++)if(i[t]===e){var r,n=s[t];return"__useDefault"in(r=n instanceof ModuleNamespace?n:ensureEvaluate(o,n,n.linkRecord,l,u,c))?r.__useDefault:r}throw new Error("Module "+e+" not declared as a System.registerDynamic dependency of "+a)}}function doEvaluate(e,t,r,n,o,a){var i;if(a.push(t),r.setters)for(var s,l,u=0;u<r.dependencies.length;u++)if(!((s=r.dependencyInstantiations[u])instanceof ModuleNamespace)&&((l=s.linkRecord)&&-1===a.indexOf(s)&&(i=s.evalError?s.evalError:doEvaluate(e,s,l,n,o,l.setters?a:[])),i))return t.linkRecord=void 0,t.evalError=LoaderError__Check_error_message_for_loader_stack(i,"Evaluating "+t.key),t.evalError;if(r.execute)if(r.setters)i=declarativeExecute(r.execute);else{var c={id:t.key},d=r.moduleObj;Object.defineProperty(c,"exports",{configurable:!0,set:function(e){d.default=d.__useDefault=e},get:function(){return d.__useDefault}});var p=makeDynamicRequire(e,t.key,r.dependencies,r.dependencyInstantiations,n,o,a);if(!r.executingRequire)for(u=0;u<r.dependencies.length;u++)p(r.dependencies[u]);i=dynamicExecute(r.execute,p,d.default,c),c.exports!==d.__useDefault&&(d.default=d.__useDefault=c.exports);var f=d.default;if(f&&f.__esModule)for(var g in f)Object.hasOwnProperty.call(f,g)&&(d[g]=f[g])}if(t.linkRecord=void 0,i)return t.evalError=LoaderError__Check_error_message_for_loader_stack(i,"Evaluating "+t.key);if(n[t.key]=t.module=new ModuleNamespace(r.moduleObj),!r.setters){if(t.importerSetters)for(u=0;u<t.importerSetters.length;u++)t.importerSetters[u](t.module);t.importerSetters=void 0}}RegisterLoader.prototype[RegisterLoader.resolve=Loader.resolve]=function(e,t){return resolveIfNotPlain(e,t||baseURI)},RegisterLoader.prototype[INSTANTIATE]=function(e,t){},RegisterLoader.prototype[Loader.resolveInstantiate]=function(e,t){var r=this,n=this[REGISTER_INTERNAL],o=this.registry[REGISTRY];return resolveInstantiate(r,e,t,o,n).then(function(e){if(e instanceof ModuleNamespace)return e;var t=e.linkRecord;if(!t){if(e.module)return e.module;throw e.evalError}return deepInstantiateDeps(r,e,t,o,n).then(function(){return ensureEvaluate(r,e,t,o,n,void 0)})})},RegisterLoader.prototype.register=function(e,t,r){var n=this[REGISTER_INTERNAL];void 0===r?n.lastRegister=[e,t,void 0]:(n.records[e]||createLoadRecord(n,e,void 0)).registration=[t,r,void 0]},RegisterLoader.prototype.registerDynamic=function(e,t,r,n){var o=this[REGISTER_INTERNAL];"string"!=typeof e?o.lastRegister=[e,t,r]:(o.records[e]||createLoadRecord(o,e,void 0)).registration=[t,r,n]},ContextualLoader.prototype.import=function(e){return this.loader.trace&&this.loader.loads[this.key].dynamicDeps.push(e),this.loader.import(e,this.key)};var nullContext={};function declarativeExecute(e){try{e.call(nullContext)}catch(e){return e}}function dynamicExecute(e,t,r,n){try{var o=e.call(envGlobal,t,r,n);void 0!==o&&(n.exports=o)}catch(e){return e}}Object.freeze&&Object.freeze(nullContext);var resolvedPromise$1=Promise.resolve();function noop(){}var emptyModule=new ModuleNamespace({}),hasStringTag;function protectedCreateNamespace(e){return e instanceof ModuleNamespace?e:e&&e.__esModule?new ModuleNamespace(e):new ModuleNamespace({default:e,__useDefault:e})}function isModule(e){return void 0===hasStringTag&&(hasStringTag="undefined"!=typeof Symbol&&!!Symbol.toStringTag),e instanceof ModuleNamespace||hasStringTag&&"[object Module]"==Object.prototype.toString.call(e)}var CONFIG=createSymbol("loader-config"),METADATA=createSymbol("metadata"),isWorker="undefined"==typeof window&&"undefined"!=typeof self&&"undefined"!=typeof importScripts,parentModuleContext;function warn(e,t){(t||this.warnings&&"undefined"!=typeof console&&console.warn)&&console.warn(e)}function checkInstantiateWasm(e,t,a){var r=new Uint8Array(t);return 0===r[0]&&97===r[1]&&115===r[2]?WebAssembly.compile(t).then(function(t){var r=[],n=[],o={};return WebAssembly.Module.imports&&WebAssembly.Module.imports(t).forEach(function(e){var t=e.module;n.push(function(e){o[t]=e}),-1===r.indexOf(t)&&r.push(t)}),e.register(r,function(e){return{setters:n,execute:function(){e(new WebAssembly.Instance(t,o).exports)}}}),a(),!0}):Promise.resolve(!1)}function loadNodeModule(e,t){if("."===e[0])throw new Error("Node module "+e+" can't be loaded as it is not a package require.");if(!parentModuleContext){var r=this._nodeRequire("module"),n=decodeURI(t.substr(isWindows?8:7));(parentModuleContext=new r(n)).paths=r._nodeModulePaths(n)}return parentModuleContext.require(e)}function extend(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function prepend(e,t){for(var r in t)Object.hasOwnProperty.call(t,r)&&void 0===e[r]&&(e[r]=t[r]);return e}function extendMeta(e,t,r){for(var n in t)if(Object.hasOwnProperty.call(t,n)){var o=t[n];void 0===e[n]?e[n]=o:o instanceof Array&&e[n]instanceof Array?e[n]=[].concat(r?o:e[n]).concat(r?e[n]:o):"object"==typeof o&&null!==o&&"object"==typeof e[n]?e[n]=(r?prepend:extend)(extend({},e[n]),o):r||(e[n]=o)}}var supportsPreload=!1,supportsPrefetch=!1;function preloadScript(e){if(supportsPreload||supportsPrefetch){var t=document.createElement("link");supportsPreload?(t.rel="preload",t.as="script"):t.rel="prefetch",t.href=e,document.head.appendChild(t)}else{(new Image).src=e}}function workerImport(e,t,r){try{importScripts(e)}catch(e){r(e)}t()}if(isBrowser&&function(){var e=document.createElement("link").relList;if(e&&e.supports){supportsPrefetch=!0;try{supportsPreload=e.supports("preload")}catch(e){}}}(),isBrowser){var onerror=window.onerror;window.onerror=function(e,t){onerror&&onerror.apply(this,arguments)}}function scriptLoad(t,e,r,n,o){if(t=t.replace(/#/g,"%23"),isWorker)return workerImport(t,n,o);var a=document.createElement("script");function i(){n(),l()}function s(e){l(),o(new Error("Fetching "+t))}function l(){a.removeEventListener("load",i,!1),a.removeEventListener("error",s,!1),document.head.removeChild(a)}a.type="text/javascript",a.charset="utf-8",a.async=!0,e&&(a.crossOrigin=e),r&&(a.integrity=r),a.addEventListener("load",i,!1),a.addEventListener("error",s,!1),a.src=t,document.head.appendChild(a)}function readMemberExpression(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function applyPaths(e,t,r){var n=getMapMatch(t,r);if(n){var o=t[n]+r.substr(n.length),a=resolveIfNotPlain(o,baseURI);return void 0!==a?a:e+o}return-1!==r.indexOf(":")?r:e+r}function checkMap(e){var t=this.name;if(t.substr(0,e.length)===e&&(t.length===e.length||"/"===t[e.length]||"/"===e[e.length-1]||":"===e[e.length-1])){var r=e.split("/").length;r>this.len&&(this.match=e,this.len=r)}}function getMapMatch(e,t){if(Object.hasOwnProperty.call(e,t))return t;var r={name:t,match:void 0,len:0};return Object.keys(e).forEach(checkMap,r),r.match}var cjsRequireRegEx=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*'|`[^`\\]*(?:\\.[^`\\]*)*`)\s*\)/g,fs,fetchFunction;function fetchFetch(e,t,r,n){if("file:///"===e.substr(0,8)){if(hasXhr)return xhrFetch(e,t,r,n);throw new Error("Unable to fetch file URLs in this environment.")}e=e.replace(/#/g,"%23");var o={headers:{Accept:"application/x-es-module, */*"}};return r&&(o.integrity=r),t&&("string"==typeof t&&(o.headers.Authorization=t),o.credentials="include"),fetch(e,o).then(function(e){if(e.ok)return n?e.arrayBuffer():e.text();throw new Error("Fetch error: "+e.status+" "+e.statusText)})}function xhrFetch(a,i,e,s){return new Promise(function(e,t){a=a.replace(/#/g,"%23");var r=new XMLHttpRequest;function n(){e(s?r.response:r.responseText)}function o(){t(new Error("XHR error: "+(r.status?" ("+r.status+(r.statusText?" "+r.statusText:"")+")":"")+" loading "+a))}s&&(r.responseType="arraybuffer"),r.onreadystatechange=function(){4===r.readyState&&(0==r.status?r.response?n():(r.addEventListener("error",o),r.addEventListener("load",n)):200===r.status?n():o())},r.open("GET",a,!0),r.setRequestHeader&&(r.setRequestHeader("Accept","application/x-es-module, */*"),i&&("string"==typeof i&&r.setRequestHeader("Authorization",i),r.withCredentials=!0)),r.send(null)})}function nodeFetch(e,t,r,a){return"file:///"!=e.substr(0,8)?hasFetch?fetchFetch(e,t,r,a):Promise.reject(new Error('Unable to fetch "'+e+'". Only file URLs of the form file:/// supported running in Node without fetch.')):(fs=fs||require("fs"),e=isWindows?e.replace(/\//g,"\\").substr(8):e.substr(7),new Promise(function(n,o){fs.readFile(e,function(e,t){if(e)return o(e);if(a)n(t);else{var r=t+"";"\ufeff"===r[0]&&(r=r.substr(1)),n(r)}})}))}function noFetch(){throw new Error("No fetch method is defined for this environment.")}var hasXhr="undefined"!=typeof XMLHttpRequest,hasFetch="undefined"!=typeof fetch;fetchFunction="undefined"!=typeof self&&void 0!==self.fetch?fetchFetch:hasXhr?xhrFetch:"undefined"!=typeof require&&"undefined"!=typeof process?nodeFetch:noFetch;var fetch$1=fetchFunction;function createMetadata(){return{pluginKey:void 0,pluginArgument:void 0,pluginModule:void 0,packageKey:void 0,packageConfig:void 0,load:void 0}}function getParentMetadata(e,t,r){var n,o=createMetadata();r&&(t.pluginFirst?-1!==(n=r.lastIndexOf("!"))&&(o.pluginArgument=o.pluginKey=r.substr(0,n)):-1!==(n=r.indexOf("!"))&&(o.pluginArgument=o.pluginKey=r.substr(n+1)),o.packageKey=getMapMatch(t.packages,r),o.packageKey&&(o.packageConfig=t.packages[o.packageKey]));return o}function normalize(r,n){var o=this[CONFIG],a=createMetadata(),i=getParentMetadata(this,o,n),s=this;return Promise.resolve().then(function(){var t=r.lastIndexOf("#?");if(-1===t)return Promise.resolve(r);var e=parseCondition.call(s,r.substr(t+2));return resolveCondition.call(s,e,n,!0).then(function(e){return e?r.substr(0,t):"@empty"})}).then(function(e){var t=parsePlugin(o.pluginFirst,e);return t?(a.pluginKey=t.plugin,Promise.all([packageResolve.call(s,o,t.argument,i&&i.pluginArgument||n,a,i,!0),s.resolve(t.plugin,n)]).then(function(e){if(a.pluginArgument=e[0],a.pluginKey=e[1],a.pluginArgument===a.pluginKey)throw new Error("Plugin "+a.pluginArgument+" cannot load itself, make sure it is excluded from any wildcard meta configuration via a custom loader: false rule.");return combinePluginParts(o.pluginFirst,e[0],e[1])})):packageResolve.call(s,o,e,i&&i.pluginArgument||n,a,i,!1)}).then(function(e){return interpolateConditional.call(s,e,n,i)}).then(function(t){return setMeta.call(s,o,t,a),a.pluginKey||!a.load.loader?t:s.resolve(a.load.loader,t).then(function(e){return a.pluginKey=e,a.pluginArgument=t})}).then(function(e){return s[METADATA][e]=a,e})}function decanonicalize(e,t){var r=parsePlugin(e.pluginFirst,t);if(r){var n=decanonicalize.call(this,e,r.plugin);return combinePluginParts(e.pluginFirst,coreResolve.call(this,e,r.argument,void 0,!1,!1),n)}return coreResolve.call(this,e,t,void 0,!1,!1)}function normalizeSync(e,t){var r=this[CONFIG],n=createMetadata(),o=o||getParentMetadata(this,r,t),a=parsePlugin(r.pluginFirst,e);return a?(n.pluginKey=normalizeSync.call(this,a.plugin,t),combinePluginParts(r.pluginFirst,packageResolveSync.call(this,r,a.argument,o.pluginArgument||t,n,o,!!n.pluginKey),n.pluginKey)):packageResolveSync.call(this,r,e,o.pluginArgument||t,n,o,!!n.pluginKey)}function coreResolve(e,t,r,n,o){var a=resolveIfNotPlain(t,r||baseURI);if(a)return applyPaths(e.baseURL,e.paths,a);if(n){var i=getMapMatch(e.map,t);if(i&&(a=resolveIfNotPlain(t=e.map[i]+t.substr(i.length),baseURI)))return applyPaths(e.baseURL,e.paths,a)}if(this.registry.has(t))return t;if("@node/"===t.substr(0,6))return t;var s=o&&"/"!==t[t.length-1],l=applyPaths(e.baseURL,e.paths,s?t+"/":t);return s?l.substr(0,l.length-1):l}function packageResolveSync(e,t,r,n,o,a){if(o&&o.packageConfig&&"."!==t[0]){var i=o.packageConfig.map,s=i&&getMapMatch(i,t);if(s&&"string"==typeof i[s]){var l=doMapSync(this,e,o.packageConfig,o.packageKey,s,t,n,a);if(l)return l}}var u=coreResolve.call(this,e,t,r,!0,!0),c=getPackageConfigMatch(e,u);if(n.packageKey=c&&c.packageKey||getMapMatch(e.packages,u),!n.packageKey)return u;if(-1!==e.packageConfigKeys.indexOf(u))return n.packageKey=void 0,u;n.packageConfig=e.packages[n.packageKey]||(e.packages[n.packageKey]=createPackage());var d=u.substr(n.packageKey.length+1);return applyPackageConfigSync(this,e,n.packageConfig,n.packageKey,d,n,a)}function packageResolve(n,o,a,i,r,s){var l=this;return resolvedPromise$1.then(function(){if(r&&r.packageConfig&&"./"!==o.substr(0,2)){var e=r.packageConfig.map,t=e&&getMapMatch(e,o);if(t)return doMap(l,n,r.packageConfig,r.packageKey,t,o,i,s)}return resolvedPromise$1}).then(function(e){if(e)return e;var t=coreResolve.call(l,n,o,a,!0,!0),r=getPackageConfigMatch(n,t);return i.packageKey=r&&r.packageKey||getMapMatch(n.packages,t),i.packageKey?-1!==n.packageConfigKeys.indexOf(t)?(i.packageKey=void 0,i.load=createMeta(),i.load.format="json",i.load.loader="",Promise.resolve(t)):(i.packageConfig=n.packages[i.packageKey]||(n.packages[i.packageKey]=createPackage()),(r&&!i.packageConfig.configured?loadPackageConfigPath(l,n,r.configPath,i):resolvedPromise$1).then(function(){var e=t.substr(i.packageKey.length+1);return applyPackageConfig(l,n,i.packageConfig,i.packageKey,e,i,s)})):Promise.resolve(t)})}function createMeta(){return{extension:"",deps:void 0,format:void 0,loader:void 0,scriptLoad:void 0,globals:void 0,nonce:void 0,integrity:void 0,sourceMap:void 0,exports:void 0,encapsulateGlobal:!1,crossOrigin:void 0,cjsRequireDetection:!0,cjsDeferDepsExecute:!1,esModule:!1}}function setMeta(e,t,r){r.load=r.load||createMeta();var n,o=0;for(var a in e.meta)if(-1!==(n=a.indexOf("*"))&&a.substr(0,n)===t.substr(0,n)&&a.substr(n+1)===t.substr(t.length-a.length+n+1)){var i=a.split("/").length;o<i&&(o=i),extendMeta(r.load,e.meta[a],o!==i)}if(e.meta[t]&&extendMeta(r.load,e.meta[t],!1),r.packageKey){var s=t.substr(r.packageKey.length+1),l={};if(r.packageConfig.meta){o=0;getMetaMatches(r.packageConfig.meta,s,function(e,t,r){o<r&&(o=r),extendMeta(l,t,r&&r<o)}),extendMeta(r.load,l,!1)}!r.packageConfig.format||r.pluginKey||r.load.loader||(r.load.format=r.load.format||r.packageConfig.format)}}function parsePlugin(e,t){var r,n,o=e?t.indexOf("!"):t.lastIndexOf("!");if(-1!==o)return e?(r=t.substr(o+1),n=t.substr(0,o)):(r=t.substr(0,o),n=t.substr(o+1)||r.substr(r.lastIndexOf(".")+1)),{argument:r,plugin:n}}function combinePluginParts(e,t,r){return e?r+"!"+t:t+"!"+r}function addDefaultExtension(e,t,r,n,o){if(!n||!t.defaultExtension||"/"===n[n.length-1]||o)return n;var a=!1;if(t.meta&&getMetaMatches(t.meta,n,function(e,t,r){if(0===r||e.lastIndexOf("*")!==e.length-1)return a=!0}),!a&&e.meta&&getMetaMatches(e.meta,r+"/"+n,function(e,t,r){if(0===r||e.lastIndexOf("*")!==e.length-1)return a=!0}),a)return n;var i="."+t.defaultExtension;return n.substr(n.length-i.length)!==i?n+i:n}function applyPackageConfigSync(e,t,r,n,o,a,i){if(!o){if(!r.main)return n;o="./"===r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+o,l=getMapMatch(r.map,s);if(l||(s="./"+addDefaultExtension(t,r,n,o,i))!=="./"+o&&(l=getMapMatch(r.map,s)),l){var u=doMapSync(e,t,r,n,l,s,a,i);if(u)return u}}return n+"/"+addDefaultExtension(t,r,n,o,i)}function validMapping(e,t,r){return!(t.substr(0,e.length)===e&&r.length>e.length)}function doMapSync(e,t,r,n,o,a,i,s){"/"===a[a.length-1]&&(a=a.substr(0,a.length-1));var l=r.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+n);if(validMapping(o,l,a)&&"string"==typeof l)return packageResolveSync.call(e,t,l+a.substr(o.length),n+"/",i,i,s)}function applyPackageConfig(e,t,r,n,o,a,i){if(!o){if(!r.main)return Promise.resolve(n);o="./"===r.main.substr(0,2)?r.main.substr(2):r.main}var s,l;return r.map&&(s="./"+o,(l=getMapMatch(r.map,s))||(s="./"+addDefaultExtension(t,r,n,o,i))!=="./"+o&&(l=getMapMatch(r.map,s))),(l?doMap(e,t,r,n,l,s,a,i):resolvedPromise$1).then(function(e){return e?Promise.resolve(e):Promise.resolve(n+"/"+addDefaultExtension(t,r,n,o,i))})}function doMap(t,r,e,n,o,a,i,s){"/"===a[a.length-1]&&(a=a.substr(0,a.length-1));var l=e.map[o];if("string"==typeof l)return validMapping(o,l,a)?packageResolve.call(t,r,l+a.substr(o.length),n+"/",i,i,s).then(function(e){return interpolateConditional.call(t,e,n+"/",i)}):resolvedPromise$1;var u=[],c=[];for(var d in l){var p=parseCondition(d);c.push({condition:p,map:l[d]}),u.push(RegisterLoader.prototype.import.call(t,p.module,n))}return Promise.all(u).then(function(e){for(var t=0;t<c.length;t++){var r=c[t].condition,n=readMemberExpression(r.prop,"__useDefault"in e[t]?e[t].__useDefault:e[t]);if(!r.negate&&n||r.negate&&!n)return c[t].map}}).then(function(e){if(e)return validMapping(o,e,a)?packageResolve.call(t,r,e+a.substr(o.length),n+"/",i,i,s).then(function(e){return interpolateConditional.call(t,e,n+"/",i)}):resolvedPromise$1})}var packageConfigPaths={};function createPkgConfigPathObj(e){var t=e.lastIndexOf("*"),r=Math.max(t+1,e.lastIndexOf("/"));return{length:r,regEx:new RegExp("^("+e.substr(0,r).replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^\\/]+")+")(\\/|$)"),wildcard:-1!==t}}function getPackageConfigMatch(e,t){for(var r,n,o=!1,a=0;a<e.packageConfigPaths.length;a++){var i=e.packageConfigPaths[a],s=packageConfigPaths[i]||(packageConfigPaths[i]=createPkgConfigPathObj(i));if(!(t.length<s.length)){var l=t.match(s.regEx);!l||r&&(o&&s.wildcard||!(r.length<l[1].length))||(r=l[1],o=!s.wildcard,n=r+i.substr(s.length))}}if(r)return{packageKey:r,configPath:n}}function loadPackageConfigPath(e,t,r,n,o){var a=e.pluginLoader||e;return-1===t.packageConfigKeys.indexOf(r)&&t.packageConfigKeys.push(r),a.import(r).then(function(e){setPkgConfig(n.packageConfig,e,n.packageKey,!0,t),n.packageConfig.configured=!0}).catch(function(e){throw LoaderError__Check_error_message_for_loader_stack(e,"Unable to fetch package configuration file "+r)})}function getMetaMatches(e,t,r){var n;for(var o in e){var a="./"===o.substr(0,2)?"./":"";if(a&&(o=o.substr(2)),-1!==(n=o.indexOf("*"))&&o.substr(0,n)===t.substr(0,n)&&o.substr(n+1)===t.substr(t.length-o.length+n+1)&&r(o,e[a+o],o.split("/").length))return}var i=e[t]&&Object.hasOwnProperty.call(e,t)?e[t]:e["./"+t];i&&r(i,i,0)}var sysConditions=["browser","node","dev","build","production","default"];function parseCondition(e){var t,r,n,o=e.lastIndexOf("|");return-1!==o?(t=e.substr(o+1),r=e.substr(0,o),"~"===t[0]&&(n=!0,t=t.substr(1))):(n="~"===e[0],t="default",r=e.substr(n),-1!==sysConditions.indexOf(r)&&(t=r,r=null)),{module:r||"@system-env",prop:t,negate:n}}function resolveCondition(r,e,n){return RegisterLoader.prototype.import.call(this,r.module,e).then(function(e){var t=readMemberExpression(r.prop,e);if(n&&"boolean"!=typeof t)throw new TypeError("Condition did not resolve to a boolean.");return r.negate?!t:t})}var interpolationRegEx=/#\{[^\}]+\}/;function interpolateConditional(t,r,e){var n=t.match(interpolationRegEx);if(!n)return Promise.resolve(t);var o=parseCondition.call(this,n[0].substr(2,n[0].length-3));return resolveCondition.call(this,o,r,!1).then(function(e){if("string"!=typeof e)throw new TypeError("The condition value for "+t+" doesn't resolve to a string.");if(-1!==e.indexOf("/"))throw new TypeError("Unabled to interpolate conditional "+t+(r?" in "+r:"")+"\n\tThe condition value "+e+' cannot contain a "/" separator.');return t.replace(interpolationRegEx,e)})}var envConfigNames=["browserConfig","nodeConfig","devConfig","buildConfig","productionConfig"];function envSet(e,t,r){for(var n=0;n<envConfigNames.length;n++){var o=envConfigNames[n];t[o]&&envModule[o.substr(0,o.length-6)]&&r(t[o])}}function cloneObj(e,t){var r={};for(var n in e){var o=e[n];1<t?o instanceof Array?r[n]=[].concat(o):"object"==typeof o?r[n]=cloneObj(o,t-1):"packageConfig"!==n&&(r[n]=o):r[n]=o}return r}function getConfigItem(e,t){var r=e[t];return r instanceof Array?e[t].concat([]):"object"==typeof r?cloneObj(r,3):e[t]}function getConfig(e){if(e){if(-1!==configNames.indexOf(e))return getConfigItem(this[CONFIG],e);throw new Error('"'+e+'" is not a valid configuration name. Must be one of '+configNames.join(", ")+".")}for(var t={},r=0;r<configNames.length;r++){var n=configNames[r],o=getConfigItem(this[CONFIG],n);void 0!==o&&(t[n]=o)}return t}function setConfig(e,t){var r,n=this,o=this[CONFIG];if("warnings"in e&&(o.warnings=e.warnings),"wasm"in e&&(o.wasm="undefined"!=typeof WebAssembly&&e.wasm),("production"in e||"build"in e)&&setProduction.call(n,!!e.production,!!(e.build||envModule&&envModule.build)),!t)for(var a in envSet(n,e,function(e){r=r||e.baseURL}),(r=r||e.baseURL)&&(o.baseURL=resolveIfNotPlain(r,baseURI)||resolveIfNotPlain("./"+r,baseURI),"/"!==o.baseURL[o.baseURL.length-1]&&(o.baseURL+="/")),e.paths&&extend(o.paths,e.paths),envSet(n,e,function(e){e.paths&&extend(o.paths,e.paths)}),o.paths)-1!==o.paths[a].indexOf("*")&&(warn.call(o,"Path config "+a+" -> "+o.paths[a]+" is no longer supported as wildcards are deprecated."),delete o.paths[a]);if(e.defaultJSExtensions&&warn.call(o,"The defaultJSExtensions configuration option is deprecated.\n Use packages defaultExtension instead.",!0),"boolean"==typeof e.pluginFirst&&(o.pluginFirst=e.pluginFirst),e.map)for(var a in e.map){var i=e.map[a];if("string"==typeof i){var s=coreResolve.call(n,o,i,void 0,!1,!1);"/"===s[s.length-1]&&":"!==a[a.length-1]&&"/"!==a[a.length-1]&&(s=s.substr(0,s.length-1)),o.map[a]=s}else{m=(m=coreResolve.call(n,o,"/"!==a[a.length-1]?a+"/":a,void 0,!0,!0)).substr(0,m.length-1);var l=o.packages[m];l||((l=o.packages[m]=createPackage()).defaultExtension=""),setPkgConfig(l,{map:i},m,!1,o)}}if(e.packageConfigPaths){for(var u=[],c=0;c<e.packageConfigPaths.length;c++){var d=e.packageConfigPaths[c],p=Math.max(d.lastIndexOf("*")+1,d.lastIndexOf("/")),f=coreResolve.call(n,o,d.substr(0,p),void 0,!1,!1);u[c]=f+d.substr(p)}o.packageConfigPaths=u}if(e.bundles)for(var a in e.bundles){var g=[];for(c=0;c<e.bundles[a].length;c++)g.push(n.normalizeSync(e.bundles[a][c]));o.bundles[a]=g}if(e.packages)for(var a in e.packages){if(a.match(/^([^\/]+:)?\/\/$/))throw new TypeError('"'+a+'" is not a valid package name.');var m;m=(m=coreResolve.call(n,o,"/"!==a[a.length-1]?a+"/":a,void 0,!0,!0)).substr(0,m.length-1),setPkgConfig(o.packages[m]=o.packages[m]||createPackage(),e.packages[a],m,!1,o)}if(e.depCache)for(var a in e.depCache)o.depCache[n.normalizeSync(a)]=[].concat(e.depCache[a]);if(e.meta)for(var a in e.meta)if("*"===a[0])extend(o.meta[a]=o.meta[a]||{},e.meta[a]);else{var h=coreResolve.call(n,o,a,void 0,!0,!0);extend(o.meta[h]=o.meta[h]||{},e.meta[a])}for(var v in"transpiler"in e&&(o.transpiler=e.transpiler),e)-1===configNames.indexOf(v)&&-1===envConfigNames.indexOf(v)&&(n[v]=e[v]);envSet(n,e,function(e){n.config(e,!0)})}function createPackage(){return{defaultExtension:void 0,main:void 0,format:void 0,meta:void 0,map:void 0,packageConfig:void 0,configured:!1}}function setPkgConfig(e,t,r,n,o){for(var a in t)"main"===a||"format"===a||"defaultExtension"===a||"configured"===a?n&&void 0!==e[a]||(e[a]=t[a]):"map"===a?(n?prepend:extend)(e.map=e.map||{},t.map):"meta"===a?(n?prepend:extend)(e.meta=e.meta||{},t.meta):Object.hasOwnProperty.call(t,a)&&warn.call(o,'"'+a+'" is not a valid package configuration option in package '+r);return void 0===e.defaultExtension&&(e.defaultExtension="js"),void 0===e.main&&e.map&&e.map["."]?(e.main=e.map["."],delete e.map["."]):"object"==typeof e.main&&(e.map=e.map||{},e.map["./@main"]=e.main,e.main.default=e.main.default||"./",e.main="@main"),e}var hasBuffer="undefined"!=typeof Buffer;try{hasBuffer&&"YQ=="!==new Buffer("a").toString("base64")&&(hasBuffer=!1)}catch(e){hasBuffer=!1}var sourceMapPrefix="\n//# sourceMappingURL=data:application/json;base64,",head,vm,useVm,curSystem;function inlineSourceMap(e){return hasBuffer?sourceMapPrefix+new Buffer(e).toString("base64"):"undefined"!=typeof btoa?sourceMapPrefix+btoa(unescape(encodeURIComponent(e))):""}function getSource(e,t,r,n){var o=e.lastIndexOf("\n");if(t){if("object"!=typeof t)throw new TypeError("load.metadata.sourceMap must be set to an object.");t=JSON.stringify(t)}return(n?"(function(System, SystemJS) {":"")+e+(n?"\n})(System, System);":"")+("\n//# sourceURL="!=e.substr(o,15)?"\n//# sourceURL="+r+(t?"!transpiled":""):"")+(t&&inlineSourceMap(t)||"")}function scriptExec(e,t,r,n,o){head||(head=document.head||document.body||document.documentElement);var a=document.createElement("script");a.text=getSource(t,r,n,!1);var i,s=window.onerror;if(window.onerror=function(e){i=addToError(e,"Evaluating "+n),s&&s.apply(this,arguments)},preExec(e),o&&a.setAttribute("nonce",o),head.appendChild(a),head.removeChild(a),postExec(),window.onerror=s,i)return i}var callCounter=0;function preExec(e){0==callCounter++&&(curSystem=envGlobal.System),envGlobal.System=envGlobal.SystemJS=e}function postExec(){0==--callCounter&&(envGlobal.System=envGlobal.SystemJS=curSystem)}var supportsScriptExec=!1,windowOrigin;function evaluate(loader,source,sourceMap,address,integrity,nonce,noWrap){if(source){if(nonce&&supportsScriptExec)return scriptExec(loader,source,sourceMap,address,nonce);try{preExec(loader),!vm&&loader._nodeRequire&&(vm=loader._nodeRequire("vm"),useVm=vm.runInThisContext("typeof System !== 'undefined' && System")===loader),useVm?vm.runInThisContext(getSource(source,sourceMap,address,!noWrap),{filename:address+(sourceMap?"!transpiled":"")}):eval(getSource(source,sourceMap,address,!noWrap)),postExec()}catch(e){return postExec(),e}}}function setHelpers(e){e.set("@@cjs-helpers",e.newModule({requireResolve:requireResolve.bind(e),getPathVars:getPathVars})),e.set("@@global-helpers",e.newModule({prepareGlobal:prepareGlobal}))}function setAmdHelper(f){function g(e,t,r,n){if("object"==typeof e&&!(e instanceof Array))return g.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1));if("string"==typeof e&&"function"==typeof t&&(e=[e]),!(e instanceof Array)){if("string"==typeof e){var o=f.decanonicalize(e,n),a=f.get(o);if(!a)throw new Error('Module not already loaded loading "'+e+'" as '+o+(n?' from "'+n+'".':"."));return"__useDefault"in a?a.__useDefault:a}throw new TypeError("Invalid require")}for(var i=[],s=0;s<e.length;s++)i.push(f.import(e[s],n));Promise.all(i).then(function(e){t&&t.apply(null,e)},r)}function e(e,l,u){var t,c,d,p;function r(n,e,o){for(var t=[],r=0;r<l.length;r++)t.push(n(l[r]));if(o.uri=o.id,o.config=noop,-1!==p&&t.splice(p,0,o),-1!==d&&t.splice(d,0,e),-1!==c){var a=function(e,t,r){return"string"==typeof e&&"function"!=typeof t?n(e):g.call(f,e,t,r,o.id)};a.toUrl=function(e){return f.normalizeSync(e,o.id)},t.splice(c,0,a)}var i=envGlobal.require;envGlobal.require=g;var s=u.apply(-1===d?envGlobal:e,t);envGlobal.require=i,void 0!==s&&(o.exports=s)}"string"!=typeof e&&(u=l,l=e,e=null),l instanceof Array||(l=["require","exports","module"].splice(0,(u=l).length)),"function"!=typeof u&&(t=u,u=function(){return t}),e||curMetaDeps&&(l=l.concat(curMetaDeps),curMetaDeps=void 0),-1!==(c=l.indexOf("require"))&&(l.splice(c,1),e||(l=l.concat(amdGetCJSDeps(u.toString(),c)))),-1!==(d=l.indexOf("exports"))&&l.splice(d,1),-1!==(p=l.indexOf("module"))&&l.splice(p,1),e?(f.registerDynamic(e,l,!1,r),lastNamedDefine?multipleNamedDefines=!(lastNamedDefine=void 0):multipleNamedDefines||(lastNamedDefine=[l,r])):f.registerDynamic(l,!1,curEsModule?wrapEsModuleExecute(r):r)}e.amd={},f.amdDefine=e,f.amdRequire=g}function stripOrigin(e){return"file:///"===e.substr(0,8)?e.substr(7+!!isWindows):windowOrigin&&e.substr(0,windowOrigin.length)===windowOrigin?e.substr(windowOrigin.length):e}function requireResolve(e,t){return stripOrigin(this.normalizeSync(e,t))}function getPathVars(e){var t,r=e.lastIndexOf("!"),n=(t=-1!==r?e.substr(0,r):e).split("/");return n.pop(),n=n.join("/"),{filename:stripOrigin(t),dirname:stripOrigin(n)}}isBrowser&&"undefined"!=typeof document&&document.getElementsByTagName&&(window.chrome&&window.chrome.extension||navigator.userAgent.match(/^Node\.js/)||(supportsScriptExec=!0)),"undefined"!=typeof window&&"undefined"!=typeof document&&window.location&&(windowOrigin=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""));var commentRegEx=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,stringRegEx=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g;function getCJSDeps(e){cjsRequireRegEx.lastIndex=commentRegEx.lastIndex=stringRegEx.lastIndex=0;var t,r=[],n=[],o=[];function a(e,t){for(var r=0;r<e.length;r++)if(e[r][0]<t.index&&e[r][1]>t.index)return!0;return!1}if(e.length/e.split("\n").length<200){for(;t=stringRegEx.exec(e);)n.push([t.index,t.index+t[0].length]);for(;t=commentRegEx.exec(e);)a(n,t)||o.push([t.index+t[1].length,t.index+t[0].length-1])}for(;t=cjsRequireRegEx.exec(e);)if(!a(n,t)&&!a(o,t)){var i=t[1].substr(1,t[1].length-2);if(i.match(/"|'/))continue;r.push(i)}return r}var ignoredGlobalProps=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"],globalSnapshot;function globalIterator(t){if(-1===ignoredGlobalProps.indexOf(t)){try{var e=envGlobal[t]}catch(e){ignoredGlobalProps.push(t)}this(t,e)}}function getGlobalValue(e){if("string"==typeof e)return readMemberExpression(e,envGlobal);if(!(e instanceof Array))throw new Error("Global exports must be a string or array.");for(var t={},r=0;r<e.length;r++)t[e[r].split(".").pop()]=readMemberExpression(e[r],envGlobal);return t}function prepareGlobal(e,a,t,i){var s,l=envGlobal.define;if(envGlobal.define=void 0,t)for(var r in s={},t)s[r]=envGlobal[r],envGlobal[r]=t[r];return a||(globalSnapshot={},Object.keys(envGlobal).forEach(globalIterator,function(e,t){globalSnapshot[e]=t})),function(){var r,n=a?getGlobalValue(a):{},o=!!a;if(a&&!i||Object.keys(envGlobal).forEach(globalIterator,function(e,t){globalSnapshot[e]!==t&&void 0!==t&&(i&&(envGlobal[e]=void 0),a||(n[e]=t,void 0!==r?o||r===t||(o=!0):r=t))}),n=o?n:r,s)for(var e in s)envGlobal[e]=s[e];return envGlobal.define=l,n}}var cjsRequirePre="(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])",cjsRequirePost="\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)",fnBracketRegEx=/\(([^\)]*)\)/,wsRegEx=/^\s+|\s+$/g,requireRegExs={};function amdGetCJSDeps(e,t){var r=((e=e.replace(commentRegEx,"")).match(fnBracketRegEx)[1].split(",")[t]||"require").replace(wsRegEx,""),n=requireRegExs[r]||(requireRegExs[r]=new RegExp(cjsRequirePre+r+cjsRequirePost,"g"));n.lastIndex=0;for(var o,a=[];o=n.exec(e);)a.push(o[2]||o[3]);return a}function wrapEsModuleExecute(n){return function(e,t,r){n(e,t,r),"object"!=typeof(t=r.exports)&&"function"!=typeof t||"__esModule"in t||Object.defineProperty(r.exports,"__esModule",{value:!0})}}var multipleNamedDefines=!1,lastNamedDefine,curMetaDeps,curEsModule=!1;function clearLastDefine(e,t){curMetaDeps=e,curEsModule=t,lastNamedDefine=void 0,multipleNamedDefines=!1}function registerLastDefine(e){lastNamedDefine?e.registerDynamic(curMetaDeps?lastNamedDefine[0].concat(curMetaDeps):lastNamedDefine[0],!1,curEsModule?wrapEsModuleExecute(lastNamedDefine[1]):lastNamedDefine[1]):multipleNamedDefines&&e.registerDynamic([],!1,noop)}var supportsScriptLoad=(isBrowser||isWorker)&&"undefined"!=typeof navigator&&navigator.userAgent&&!navigator.userAgent.match(/MSIE (9|10).0/),nodeRequire;function setMetaEsModule(e,t){!e.load.esModule||"object"!=typeof t&&"function"!=typeof t||"__esModule"in t||Object.defineProperty(t,"__esModule",{value:!0})}function instantiate$1(n,o){var a=this,e=this[CONFIG];return(loadBundlesAndDepCache(e,this,n)||resolvedPromise$1).then(function(){if(!o()){var r=a[METADATA][n];if("@node/"===n.substr(0,6)){if(!a._nodeRequire)throw new TypeError("Error loading "+n+". Can only load node core modules in Node.");return a.registerDynamic([],!1,function(){return loadNodeModule.call(a,n.substr(6),a.baseURL)}),void o()}return r.load.scriptLoad?!r.load.pluginKey&&supportsScriptLoad||(r.load.scriptLoad=!1,warn.call(e,'scriptLoad not supported for "'+n+'"')):!1!==r.load.scriptLoad&&!r.load.pluginKey&&supportsScriptLoad&&(r.load.deps||r.load.globals||!("system"===r.load.format||"register"===r.load.format||"global"===r.load.format&&r.load.exports)||(r.load.scriptLoad=!0)),r.load.scriptLoad?new Promise(function(t,e){if("amd"===r.load.format&&envGlobal.define!==a.amdDefine)throw new Error("Loading AMD with scriptLoad requires setting the global `"+globalName+".define = SystemJS.amdDefine`");scriptLoad(n,r.load.crossOrigin,r.load.integrity,function(){if(!o()){r.load.format="global";var e=r.load.exports&&getGlobalValue(r.load.exports);a.registerDynamic([],!1,function(){return setMetaEsModule(r,e),e}),o()}t()},e)}):initializePlugin(a,n,r).then(function(){return runFetchPipeline(a,n,r,o,e.wasm)})}}).then(function(e){return delete a[METADATA][n],e})}function initializePlugin(e,t,r){return r.pluginKey?e.import(r.pluginKey).then(function(e){r.pluginModule=e,r.pluginLoad={name:t,address:r.pluginArgument,source:void 0,metadata:r.load},r.load.deps=r.load.deps||[]}):resolvedPromise$1}function loadBundlesAndDepCache(e,t,r){var n=e.depCache[r];if(n)for(var o=0;o<n.length;o++)t.normalize(n[o],r).then(preloadScript);else{var a=!1;for(var i in e.bundles){for(o=0;o<e.bundles[i].length;o++){var s=e.bundles[i][o];if(s===r){a=!0;break}if(-1!==s.indexOf("*")){var l=s.split("*");if(2!==l.length){e.bundles[i].splice(o--,1);continue}if(r.substr(0,l[0].length)===l[0]&&r.substr(r.length-l[1].length,l[1].length)===l[1]){a=!0;break}}}if(a)return t.import(i)}}}function runFetchPipeline(n,o,a,i,e){return a.load.exports&&!a.load.format&&(a.load.format="global"),resolvedPromise$1.then(function(){if(a.pluginModule&&a.pluginModule.locate)return Promise.resolve(a.pluginModule.locate.call(n,a.pluginLoad)).then(function(e){e&&(a.pluginLoad.address=e)})}).then(function(){return a.pluginModule?(e=!1,a.pluginModule.fetch?a.pluginModule.fetch.call(n,a.pluginLoad,function(e){return fetch$1(e.address,a.load.authorization,a.load.integrity,!1)}):fetch$1(a.pluginLoad.address,a.load.authorization,a.load.integrity,!1)):fetch$1(o,a.load.authorization,a.load.integrity,e)}).then(function(r){return e&&"string"!=typeof r?checkInstantiateWasm(n,r,i).then(function(e){if(!e){var t=isBrowser?new TextDecoder("utf-8").decode(new Uint8Array(r)):r.toString();return translateAndInstantiate(n,o,t,a,i)}}):translateAndInstantiate(n,o,r,a,i)})}function translateAndInstantiate(p,f,e,g,s){return Promise.resolve(e).then(function(e){return"detect"===g.load.format&&(g.load.format=void 0),readMetaSyntax(e,g),g.pluginModule?(g.pluginLoad.source=e,g.pluginModule.translate?Promise.resolve(g.pluginModule.translate.call(p,g.pluginLoad,g.traceOpts)).then(function(e){if(g.load.sourceMap){if("object"!=typeof g.load.sourceMap)throw new Error("metadata.load.sourceMap must be set to an object.");sanitizeSourceMap(g.pluginLoad.address,g.load.sourceMap)}return"string"==typeof e?e:g.pluginLoad.source}):e):e}).then(function(e){return g.load.format||'"bundle"'!==e.substring(0,8)?"register"===g.load.format||!g.load.format&&detectRegisterFormat(e)?(g.load.format="register",e):"esm"===g.load.format||!g.load.format&&e.match(esmRegEx)?(g.load.format="esm",transpile(p,e,f,g,s)):e:(g.load.format="system",e)}).then(function(t){if("string"!=typeof t||!g.pluginModule||!g.pluginModule.instantiate)return t;var r=!1;return g.pluginLoad.source=t,Promise.resolve(g.pluginModule.instantiate.call(p,g.pluginLoad,function(e){if(t=e.source,g.load=e.metadata,r)throw new Error("Instantiate must only be called once.");r=!0})).then(function(e){return r?t:protectedCreateNamespace(e)})}).then(function(c){if("string"!=typeof c)return c;g.load.format||(g.load.format=detectLegacyFormat(c));var e=!1;switch(g.load.format){case"esm":case"register":case"system":if(n=evaluate(p,c,g.load.sourceMap,f,g.load.integrity,g.load.nonce,!1))throw n;return s()?void 0:emptyModule;case"json":var t=JSON.parse(c);return p.newModule({default:t,__useDefault:t});case"amd":var r=envGlobal.define;envGlobal.define=p.amdDefine,clearLastDefine(g.load.deps,g.load.esModule);var n=evaluate(p,c,g.load.sourceMap,f,g.load.integrity,g.load.nonce,!1);if((e=s())||(registerLastDefine(p),e=s()),envGlobal.define=r,n)throw n;break;case"cjs":var d=g.load.deps,o=(g.load.deps||[]).concat(g.load.cjsRequireDetection?getCJSDeps(c):[]);for(var a in g.load.globals)g.load.globals[a]&&o.push(g.load.globals[a]);p.registerDynamic(o,!0,function(e,t,r){if(e.resolve=function(e){return requireResolve.call(p,e,r.id)},r.paths=[],r.require=e,!g.load.cjsDeferDepsExecute&&d)for(var n=0;n<d.length;n++)e(d[n]);var o=getPathVars(r.id),a={exports:t,args:[e,t,r,o.filename,o.dirname,envGlobal,envGlobal]},i="(function (require, exports, module, __filename, __dirname, global, GLOBAL";if(g.load.globals)for(var s in g.load.globals)a.args.push(e(g.load.globals[s])),i+=", "+s;var l=envGlobal.define;envGlobal.define=void 0,envGlobal.__cjsWrapper=a,c=i+") {"+c.replace(hashBangRegEx$1,"")+"\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);";var u=evaluate(p,c,g.load.sourceMap,f,g.load.integrity,g.load.nonce,!1);if(u)throw u;setMetaEsModule(g,t),envGlobal.__cjsWrapper=void 0,envGlobal.define=l}),e=s();break;case"global":o=g.load.deps||[];for(var a in g.load.globals){var i=g.load.globals[a];i&&o.push(i)}p.registerDynamic(o,!1,function(e,t,r){var n;if(g.load.globals)for(var o in n={},g.load.globals)g.load.globals[o]&&(n[o]=e(g.load.globals[o]));var a=g.load.exports;a&&(c+="\n"+globalName+'["'+a+'"] = '+a+";");var i=prepareGlobal(r.id,a,n,g.load.encapsulateGlobal),s=evaluate(p,c,g.load.sourceMap,f,g.load.integrity,g.load.nonce,!0);if(s)throw s;var l=i();return setMetaEsModule(g,l),l}),e=s();break;default:throw new TypeError('Unknown module format "'+g.load.format+'" for "'+f+'".'+("es6"===g.load.format?' Use "esm" instead here.':""))}if(!e)throw new Error("Module "+f+" detected as "+g.load.format+" but didn't execute correctly.")})}"undefined"==typeof require||"undefined"==typeof process||process.browser||(nodeRequire=require);var globalName="undefined"!=typeof self?"self":"global",esmRegEx=/(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?(?!type)([^"'\(\)\n; ]+)\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/,leadingCommentAndMetaRegEx=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;function detectRegisterFormat(e){var t=e.match(leadingCommentAndMetaRegEx);if(!t)return!1;var r=t[0].length;return e.startsWith("System.register",r)||e.startsWith("SystemJS.register",r)}var amdRegEx=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/,cjsExportsRegEx=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/,hashBangRegEx$1=/^\#\!.*/;function detectLegacyFormat(e){return e.match(amdRegEx)?"amd":(cjsExportsRegEx.lastIndex=0,cjsRequireRegEx.lastIndex=0,cjsRequireRegEx.exec(e)||cjsExportsRegEx.exec(e)?"cjs":"global")}function sanitizeSourceMap(e,t){var r=e.split("!")[0];t.file&&t.file!=e||(t.file=r+"!transpiled"),(!t.sources||t.sources.length<=1&&(!t.sources[0]||t.sources[0]===e))&&(t.sources=[r])}function transpile(t,r,n,o,e){if(!t.transpiler)throw new TypeError("Unable to dynamically transpile ES module\n A loader plugin needs to be configured via `SystemJS.config({ transpiler: 'transpiler-module' })`.");if(o.load.deps){for(var a="",i=0;i<o.load.deps.length;i++)a+='import "'+o.load.deps[i]+'"; ';r=a+r}return t.import.call(t,t.transpiler).then(function(e){if(!(e=e.__useDefault||e).translate)throw new Error(t.transpiler+" is not a valid transpiler plugin.");return e===o.pluginModule?r:("string"==typeof o.load.sourceMap&&(o.load.sourceMap=JSON.parse(o.load.sourceMap)),o.pluginLoad=o.pluginLoad||{name:n,address:n,source:r,metadata:o.load},o.load.deps=o.load.deps||[],Promise.resolve(e.translate.call(t,o.pluginLoad,o.traceOpts)).then(function(e){var t=o.load.sourceMap;return t&&"object"==typeof t&&sanitizeSourceMap(n,t),"esm"===o.load.format&&detectRegisterFormat(e)&&(o.load.format="register"),e}))},function(e){throw LoaderError__Check_error_message_for_loader_stack(e,"Unable to load transpiler to transpile "+n)})}var metaRegEx=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,metaPartRegEx=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g,scriptSrc,envModule;function setMetaProperty(e,t,r){for(var n,o=t.split(".");1<o.length;)e=e[n=o.shift()]=e[n]||{};void 0===e[n=o.shift()]&&(e[n]=r)}function readMetaSyntax(e,t){var r=e.match(metaRegEx);if(r)for(var n=r[0].match(metaPartRegEx),o=0;o<n.length;o++){var a=n[o],i=a.length,s=a.substr(0,1);if(";"==a.substr(i-1,1)&&i--,'"'==s||"'"==s){var l=a.substr(1,a.length-3),u=l.substr(0,l.indexOf(" "));if(u){var c=l.substr(u.length+1,l.length-u.length-1);"deps"===u&&(u="deps[]"),"[]"===u.substr(u.length-2,2)?(u=u.substr(0,u.length-2),t.load[u]=t.load[u]||[],t.load[u].push(c)):"use"!==u&&setMetaProperty(t.load,u,c)}else t.load[l]=!0}}}if("undefined"==typeof Promise)throw new Error("SystemJS needs a Promise polyfill.");if("undefined"!=typeof document){var scripts=document.getElementsByTagName("script"),curScript=scripts[scripts.length-1];document.currentScript&&(curScript.defer||curScript.async)&&(curScript=document.currentScript),scriptSrc=curScript&&curScript.src}else if("undefined"!=typeof importScripts)try{throw new Error("_")}catch(e){e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){scriptSrc=t})}else"undefined"!=typeof __filename&&(scriptSrc=__filename);function SystemJSLoader(){RegisterLoader.call(this),this._loader={},this[METADATA]={},this[CONFIG]={baseURL:baseURI,paths:{},packageConfigPaths:[],packageConfigKeys:[],map:{},packages:{},depCache:{},meta:{},bundles:{},production:!1,transpiler:void 0,loadedBundles:{},warnings:!1,pluginFirst:!1,wasm:!1},this.scriptSrc=scriptSrc,this._nodeRequire=nodeRequire,this.registry.set("@empty",emptyModule),setProduction.call(this,!1,!1),setHelpers(this),setAmdHelper(this)}function setProduction(e,t){this[CONFIG].production=e,this.registry.set("@system-env",envModule=this.newModule({browser:isBrowser,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,default:!0}))}SystemJSLoader.prototype=Object.create(RegisterLoader.prototype),SystemJSLoader.prototype.constructor=SystemJSLoader,SystemJSLoader.prototype[SystemJSLoader.resolve=RegisterLoader.resolve]=SystemJSLoader.prototype.normalize=normalize,SystemJSLoader.prototype.load=function(e,t){return warn.call(this[CONFIG],"System.load is deprecated."),this.import(e,t)},SystemJSLoader.prototype.decanonicalize=SystemJSLoader.prototype.normalizeSync=SystemJSLoader.prototype.resolveSync=normalizeSync,SystemJSLoader.prototype[SystemJSLoader.instantiate=RegisterLoader.instantiate]=instantiate$1,SystemJSLoader.prototype.config=setConfig,SystemJSLoader.prototype.getConfig=getConfig,SystemJSLoader.prototype.global=envGlobal,SystemJSLoader.prototype.import=function(){return RegisterLoader.prototype.import.apply(this,arguments).then(function(e){return"__useDefault"in e?e.__useDefault:e})};for(var configNames=["baseURL","map","paths","packages","packageConfigPaths","depCache","meta","bundles","transpiler","warnings","pluginFirst","production","wasm"],hasProxy="undefined"!=typeof Proxy,i=0;i<configNames.length;i++)!function(r){Object.defineProperty(SystemJSLoader.prototype,r,{get:function(){var e=getConfigItem(this[CONFIG],r);return hasProxy&&"object"==typeof e&&(e=new Proxy(e,{set:function(e,t){throw new Error("Cannot set SystemJS."+r+'["'+t+'"] directly. Use SystemJS.config({ '+r+': { "'+t+'": ... } }) rather.')}})),e},set:function(e){throw new Error("Setting `SystemJS."+r+"` directly is no longer supported. Use `SystemJS.config({ "+r+": ... })`.")}})}(configNames[i]);function registryWarn(e,t){warn.call(e[CONFIG],"SystemJS."+t+" is deprecated for SystemJS.registry."+t)}SystemJSLoader.prototype.delete=function(e){return registryWarn(this,"delete"),this.registry.delete(e)},SystemJSLoader.prototype.get=function(e){return registryWarn(this,"get"),this.registry.get(e)},SystemJSLoader.prototype.has=function(e){return registryWarn(this,"has"),this.registry.has(e)},SystemJSLoader.prototype.set=function(e,t){return registryWarn(this,"set"),this.registry.set(e,t)},SystemJSLoader.prototype.newModule=function(e){return new ModuleNamespace(e)},SystemJSLoader.prototype.isModule=isModule,SystemJSLoader.prototype.register=function(e,t,r){return"string"==typeof e&&(e=decanonicalize.call(this,this[CONFIG],e)),RegisterLoader.prototype.register.call(this,e,t,r)},SystemJSLoader.prototype.registerDynamic=function(e,t,r,n){return"string"==typeof e&&(e=decanonicalize.call(this,this[CONFIG],e)),RegisterLoader.prototype.registerDynamic.call(this,e,t,r,n)},SystemJSLoader.prototype.version="0.21.1 Dev";var System=new SystemJSLoader;(isBrowser||isWorker)&&(envGlobal.SystemJS=envGlobal.System=System),"undefined"!=typeof module&&module.exports&&(module.exports=System)}(); |
{ | ||
"name": "systemjs", | ||
"version": "0.21.0", | ||
"version": "0.21.1", | ||
"description": "Dynamic ES module loader", | ||
@@ -23,3 +23,3 @@ "repository": { | ||
"rimraf": "^2.6.1", | ||
"rollup": "^0.41.1", | ||
"rollup": "~0.57.1", | ||
"rollup-plugin-node-resolve": "^2.0.0", | ||
@@ -26,0 +26,0 @@ "rollup-plugin-replace": "^1.1.1", |
@@ -16,3 +16,3 @@ SystemJS | ||
* Loads ES modules compiled into the `System.register` module format for production with [exact circular reference and binding support](https://github.com/ModuleLoader/es6-module-loader/blob/v0.17.0/docs/circular-references-bindings.md) | ||
* Supports RequireJS-style [map](docs/getting-started.md#map-config), [paths](https://github.com/ModuleLoader/es6-module-loader/blob/master/docs/loader-config.md#paths-implementation), and [bundles](docs/production-workflows.md#bundle-extension) configuration. | ||
* Supports RequireJS-style [map](docs/getting-started.md#map-config), [paths](https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#paths), and [bundles](docs/production-workflows.md#bundle-extension) configuration. | ||
@@ -19,0 +19,0 @@ Built with the [ES Module Loader project](https://github.com/ModuleLoader/es-module-loader), which is based on principles and APIs from the WhatWG Loader specification, modules in HTML and NodeJS. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
980252
4959
9