{"version":3,"sources":["webpack:///scripts/module.loader--0df774006d2e890672b0.js","webpack:///./client/src/scripts/module.loader.js","webpack:///(webpack)/buildin/global.js"],"names":["webpackJsonp","/opt/atlassian/pipelines/agent/build/node_modules/babel-loader/lib/index.js??ref--23-0!/opt/atlassian/pipelines/agent/build/node_modules/eslint-loader/index.js!/opt/atlassian/pipelines/agent/build/client/src/scripts/module.loader.js","module","exports","__webpack_require__","global","_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","_console","console","log","AmdModuleLoader","this","listeners","resolves","options","baseUrl","value","properties","keys","forEach","property","listener","name","includes","push","require","split","loader","libListeners","deps","definition","values","loaded","addLoadListener","bind","indexOf","apply","args","resolve","element","document","createElement","head","appendChild","Loader","window","RemoteUrlPattern","define","fileName","match","addElement","src","check","styleSheets","sheet","href","setTimeout","rel","onload","toLoad","body","getAttribute","Date","call","/opt/atlassian/pipelines/agent/build/node_modules/babel-loader/lib/index.js??ref--23-0!/opt/atlassian/pipelines/agent/build/node_modules/eslint-loader/index.js!/opt/atlassian/pipelines/agent/build/node_modules/webpack/buildin/global.js","g","_typeof","Symbol","iterator","obj","constructor","Function","eval","e","multi /opt/atlassian/pipelines/agent/build/client/src/scripts/module.loader.js"],"mappings":"AAAAA,cAAc,kBAERC,2OACA,SAAUC,EAAQC,EAASC,GAEjC,cAC4B,SAASC,GAIrC,QAASC,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAFhH,GAAIC,GAAe,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMC,OAAOC,eAAeT,EAAQI,EAAWM,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kC,WAAWZ,EAAOnB,QAAQS,KAAKU,EAAQe,EAAOjC,MAAM,KAAMoC,MAjJjD,MDiLgBC,KAAK/E,EAASC,EAAoB,iPAIzD+E,8OACA,SAAUjF,EAAQC,EAASC,GAEjC,YAGA,IE7LIgF,GF6LAC,EAA4B,kBAAXC,SAAoD,gBAApBA,QAAOC,SAAwB,SAAUC,GAAO,aAAcA,IAAS,SAAUA,GAAO,MAAOA,IAAyB,kBAAXF,SAAyBE,EAAIC,cAAgBH,QAAUE,IAAQF,OAAO7D,UAAY,eAAkB+D,GE1LtQJ,GAAK,WACJ,MAAOtD,QAGR,KAECsD,EAAIA,GAAKM,SAAS,mBAAoB,EAAGC,MAAM,QAC9C,MAAMC,GAEc,YAAlB,mBAAO5B,QAAP,cAAOA,WACToB,EAAIpB,QAON9D,EAAOC,QAAUiF,GFkMXS,iFACA,SAAU3F,EAAQC,EAASC,GAEjCF,EAAOC,QAAUC,EAAoB,+OAKlC","file":"scripts/module.loader--0df774006d2e890672b0.js","sourcesContent":["webpackJsonp([\"module.loader\"],{\n\n/***/ \"/opt/atlassian/pipelines/agent/build/node_modules/babel-loader/lib/index.js??ref--23-0!/opt/atlassian/pipelines/agent/build/node_modules/eslint-loader/index.js!/opt/atlassian/pipelines/agent/build/client/src/scripts/module.loader.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _console = console,\n log = _console.log;\n\n\nvar ZERO = 0;\nvar ONE = 1;\nvar FIFTY = 50;\nvar STYLESHEET_CHECK_TIMEOUT = FIFTY;\nvar MINUS_ONE = -1;\n\nvar AmdModuleLoader = function () {\n function AmdModuleLoader() {\n _classCallCheck(this, AmdModuleLoader);\n\n this.listeners = {};\n this.resolves = {};\n this.options = {\n baseUrl: ''\n };\n }\n\n _createClass(AmdModuleLoader, [{\n key: 'config',\n value: function config(properties) {\n var _this = this;\n\n Object.keys(properties).forEach(function (property) {\n _this.options[property] = properties[property];\n });\n }\n }, {\n key: 'addLoadListener',\n value: function addLoadListener(listener, name) {\n log('addLoadListener', name);\n if (Object.keys(this.resolves).includes(name)) {\n // value is already loaded, call listener immediately\n listener(name, this.resolves[name]);\n } else if (this.listeners[name]) {\n this.listeners[name].push(listener);\n } else {\n this.listeners[name] = [listener];\n // first time this dependency is requested\n // get the loader name from string before ! character\n this.require(['js!' + name.split('!')[0]], function (loader) {\n loader(name);\n });\n }\n }\n }, {\n key: 'resolve',\n value: function resolve(name, value) {\n log('resolve', name);\n this.resolves[name] = value;\n var libListeners = this.listeners[name];\n if (libListeners) {\n libListeners.forEach(function (listener) {\n listener(name, value);\n });\n // remove listeners (delete listeners[name] is longer)\n this.listeners[name] = ZERO;\n }\n }\n }, {\n key: 'require',\n value: function require(deps, definition) {\n log('require', deps);\n var length = deps.length;\n if (length) {\n if (typeof deps === 'string') {\n deps = deps.split(' ');\n }\n // we need to wait for all dependencies to load\n var values = [];\n var loaded = ZERO;\n\n deps.forEach(this.addLoadListener.bind(this, function (name, value) {\n values[deps.indexOf(name)] = value;\n loaded = loaded + ONE;\n\n if (loaded += ONE >= length) {\n definition.apply(definition, values);\n }\n }));\n } else {\n // no dependencies, run definition now\n definition();\n }\n }\n }, {\n key: 'define',\n value: function define(name, deps, definition) {\n var _this2 = this;\n\n log('define', name);\n if (definition) {\n // asynchronous define with dependencies\n this.require(deps, function () {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.resolve(name, definition.apply(definition, args));\n });\n } else {\n // just two arguments - bind name to value (deps) now\n this.resolve(name, deps);\n }\n }\n }, {\n key: 'addElement',\n value: function addElement(name, properties) {\n log('addElement', name);\n var element = document.createElement(name);\n Object.keys(properties).forEach(function (property) {\n element[property] = properties[property];\n });\n document.head.appendChild(element);\n }\n }]);\n\n return AmdModuleLoader;\n}();\n\nvar Loader = window.Loader = global.Loader = new AmdModuleLoader();\nvar RemoteUrlPattern = /(http\\:)?\\/\\//;\n\nLoader.define('js!js', function (name) {\n log('jsPlugin', name);\n var fileName = name.split('!')[ONE];\n if (!fileName.match(RemoteUrlPattern)) {\n fileName = '' + Loader.options.baseUrl + fileName;\n log('jsPlugin.isLocal', fileName);\n }\n Loader.addElement('SCRIPT', {\n src: fileName\n });\n});\n\nLoader.define('js!css', function (name) {\n log('cssPlugin', name);\n var fileName = name.split('!')[ONE];\n function check() {\n document.styleSheets.forEach(function (sheet) {\n if (sheet.href && sheet.href.indexOf(fileName) > MINUS_ONE) {\n return Loader.define(name);\n }\n\n return name;\n });\n // style is loaded but not being applied yet\n setTimeout(check, STYLESHEET_CHECK_TIMEOUT);\n }\n Loader.addElement('LINK', {\n href: fileName,\n rel: 'stylesheet',\n onload: check\n });\n});\n\nwindow.Loader = Loader;\n\nvar toLoad = document.body.getAttribute('data-load');\nif (toLoad && toLoad.length > ZERO) {\n log('initBodyLoad', name);\n // require dependencies specified in {\n this.options[property] = properties[property];\n });\n }\n\n addLoadListener (listener, name) {\n log('addLoadListener', name);\n if (Object.keys(this.resolves).includes(name)) {\n // value is already loaded, call listener immediately\n listener(name, this.resolves[name]);\n } else if (this.listeners[name]) {\n this.listeners[name].push(listener);\n } else {\n this.listeners[name] = [listener];\n // first time this dependency is requested\n // get the loader name from string before ! character\n this.require(['js!' + name.split('!')[0] ], (loader) => {\n loader(name);\n });\n }\n }\n\n resolve (name, value) {\n log('resolve', name);\n this.resolves[name] = value;\n const libListeners = this.listeners[name];\n if (libListeners) {\n libListeners.forEach((listener) => {\n listener(name, value);\n });\n // remove listeners (delete listeners[name] is longer)\n this.listeners[name] = ZERO;\n }\n }\n\n require (deps, definition) {\n log('require', deps);\n const length = deps.length;\n if (length) {\n if (typeof deps === 'string') {\n deps = deps.split(' ');\n }\n // we need to wait for all dependencies to load\n const values = [];\n let loaded = ZERO;\n\n deps.forEach(this.addLoadListener.bind(this, (name, value) => {\n values[deps.indexOf(name)] = value;\n loaded = loaded + ONE;\n\n if (loaded+=ONE >= length) {\n definition.apply(definition, values);\n }\n }));\n } else {\n // no dependencies, run definition now\n definition();\n }\n }\n\n define (name, deps, definition) {\n log('define', name);\n if (definition) {\n // asynchronous define with dependencies\n this.require(deps, (...args) => {\n this.resolve(name, definition.apply(definition, args));\n });\n } else {\n // just two arguments - bind name to value (deps) now\n this.resolve(name, deps);\n }\n }\n\n addElement (name, properties) {\n log('addElement', name);\n const element = document.createElement(name);\n Object.keys(properties).forEach((property) => {\n element[property] = properties[property];\n });\n document.head.appendChild(element);\n }\n\n}\n\nconst Loader = window.Loader = global.Loader = new AmdModuleLoader();\nconst RemoteUrlPattern = /(http\\:)?\\/\\//;\n\nLoader.define('js!js', (name) => {\n log('jsPlugin', name);\n let fileName = name.split('!')[ONE];\n if (!fileName.match(RemoteUrlPattern)) {\n fileName = `${Loader.options.baseUrl}${fileName}`;\n log('jsPlugin.isLocal', fileName);\n }\n Loader.addElement('SCRIPT', {\n src: fileName\n });\n});\n\nLoader.define('js!css', (name) => {\n log('cssPlugin', name);\n const fileName = name.split('!')[ONE];\n function check () {\n document.styleSheets.forEach((sheet) => {\n if (sheet.href && sheet.href.indexOf(fileName) > MINUS_ONE) {\n return Loader.define(name);\n }\n\n return name;\n });\n // style is loaded but not being applied yet\n setTimeout(check, STYLESHEET_CHECK_TIMEOUT);\n }\n Loader.addElement('LINK', {\n href: fileName,\n rel: 'stylesheet',\n onload: check\n });\n});\n\nwindow.Loader = Loader;\n\n\nconst toLoad = document.body.getAttribute('data-load');\nif (toLoad && toLoad.length > ZERO) {\n log('initBodyLoad', name);\n // require dependencies specified in