Studying all day long)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
2.4 KiB

{"version":3,"file":"transform.min.js","sources":["../../src/extras/transform.js","../../src/err-msg.js"],"sourcesContent":["import { errMsg } from '../err-msg.js';\n\n/*\n * Support for a \"transform\" loader interface\n *\n * Note: This extra is deprecated and will be removed in the next major.\n */\n(function (global) {\n var systemJSPrototype = global.System.constructor.prototype;\n\n var instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function (url, parent) {\n if (url.slice(-5) === '.wasm')\n return instantiate.call(this, url, parent);\n\n var loader = this;\n return fetch(url, { credentials: 'same-origin' })\n .then(function (res) {\n if (!res.ok)\n throw Error(errMsg(7, process.env.SYSTEM_PRODUCTION ? [res.status, res.statusText, parent].join(', ') : 'Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : '')));\n return res.text();\n })\n .then(function (source) {\n return loader.transform.call(this, url, source);\n })\n .then(function (source) {\n (0, eval)(source + '\\n//# sourceURL=' + url);\n return loader.getRegister(url);\n });\n };\n\n // Hookable transform function!\n systemJSPrototype.transform = function (_id, source) {\n return source;\n };\n})(typeof self !== 'undefined' ? self : global);\n","export function errMsg(errCode, msg) {\n if (process.env.SYSTEM_PRODUCTION)\n return (msg || \"\") + \" (SystemJS https://git.io/JvFET#\" + errCode + \")\";\n else\n return (msg || \"\") + \" (SystemJS Error#\" + errCode + \" \" + \"https://git.io/JvFET#\" + errCode + \")\";\n}"],"names":["global","systemJSPrototype","System","constructor","prototype","instantiate","url","parent","slice","call","this","loader","fetch","credentials","then","res","ok","Error","status","statusText","join","text","source","transform","eval","getRegister","_id","self"],"mappings":"CAOA,SAAWA,GACT,IAAIC,EAAoBD,EAAOE,OAAOC,YAAYC,UAE9CC,EAAcJ,EAAkBI,YACpCJ,EAAkBI,YAAc,SAAUC,EAAKC,GAC7C,GAAsB,UAAlBD,EAAIE,OAAO,GACb,OAAOH,EAAYI,KAAKC,KAAMJ,EAAKC,GAErC,IAAII,EAASD,KACb,OAAOE,MAAMN,EAAK,CAAEO,YAAa,gBAChCC,MAAK,SAAUC,GACd,IAAKA,EAAIC,GACP,MAAMC,OAAa,GAAmC,CAACF,EAAIG,OAAQH,EAAII,WAAYZ,GAAQa,KAAK,OCjBrF,IAAR,uCDkBL,OAAOL,EAAIM,UAEZP,MAAK,SAAUQ,GACd,OAAOX,EAAOY,UAAUd,KAAKC,KAAMJ,EAAKgB,MAEzCR,MAAK,SAAUQ,GAEd,OADA,EAAIE,MAAMF,EAAS,mBAAqBhB,GACjCK,EAAOc,YAAYnB,OAK9BL,EAAkBsB,UAAY,SAAUG,EAAKJ,GAC3C,OAAOA,GA1BX,CA4BmB,oBAATK,KAAuBA,KAAO3B"}