(function(){var LiferayAUI=Liferay.AUI;var combine=LiferayAUI.getCombine();window.__CONFIG__={basePath:"",combine:combine,reportMismatchedAnonymousModules:"warn",url:combine?LiferayAUI.getComboPath():Liferay.ThemeDisplay.getCDNBaseURL()};if(!combine)__CONFIG__.defaultURLParams={languageId:themeDisplay.getLanguageId()};__CONFIG__.maps=Liferay.MAPS;__CONFIG__.modules=Liferay.MODULES;__CONFIG__.paths=Liferay.PATHS;__CONFIG__.resolvePath=Liferay.RESOLVE_PATH;__CONFIG__.namespace="Liferay";__CONFIG__.explainResolutions=
Liferay.EXPLAIN_RESOLUTIONS;__CONFIG__.exposeGlobal=Liferay.EXPOSE_GLOBAL;__CONFIG__.logLevel=Liferay.LOG_LEVEL;__CONFIG__.waitTimeout=Liferay.WAIT_TIMEOUT})();
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&
e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e){e.exports=JSON.parse('{"author":{"name":"Liferay Frontend Infrastructure Team \x3cpt-frontend-infrastructure@liferay.com\x3e"},"bugs":{"url":"https://github.com/liferay/liferay-frontend-projects/issues?q\x3dis%3Aissue+is%3Aopen+label%3Aamd-loader"},"description":"AMD Loader with support for combo URL and conditional loading","files":["README.md","bin","build","package.json","src","webpack.config.js"],"homepage":"https://github.com/liferay/liferay-frontend-projects/tree/master/projects/amd-loader","keywords":["Liferay","AMD","ES6","Loader"],"license":"LGPL-3.0","name":"@liferay/amd-loader","repository":{"directory":"projects/amd-loader","type":"git","url":"https://github.com/liferay/liferay-frontend-projects.git"},"scripts":{"build":"yarn build:loader \x26\x26 yarn build:demo","build:demo":"node bin/build-demo.js","build:loader":"node bin/build-loader.js","ci":"cd ../.. \x26\x26 yarn ci","clean":"rm -rf build","demo":"node bin/run-demo.js","format":"cd ../.. \x26\x26 yarn format","format:check":"cd ../.. \x26\x26 yarn format:check","lint":"cd ../.. \x26\x26 yarn lint","lint:fix":"cd ../.. \x26\x26 yarn lint:fix","postversion":"node ../npm-tools/packages/js-publish/bin/liferay-js-publish.js","prepublishOnly":"yarn build","preversion":"yarn ci","proxyPortal":"webpack-dev-server --config webpack.proxyPortal.js","test":"cd ../.. \x26\x26 yarn test"},"version":"4.3.1"}')},
function(e,t,n){n.r(t);var r=n(0);var o=function e(){throw function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),new Error("Don't construct ResolvablePromise objects directly: rely on ResolvablePromise.new() instead");};function i(e){if(e.fulfilled)throw new Error("Promise already fulfilled");}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,
r)}}o.new=function(){var e={},t=new Promise(function(t,n){e._resolve=t,e._reject=n});return Object.assign(t,e,{fulfilled:!1,rejected:!1,rejection:void 0,resolution:void 0,resolved:!1}),t.resolve=function(e){return function(e,t){i(e),e.fulfilled=!0,e.resolved=!0,e.resolution=t,e._resolve(t)}(t,e)},t.reject=function(e){return function(e,t){i(e),e.fulfilled=!0,e.rejected=!0,e.rejection=t,e._reject(t)}(t,e)},"undefined"!=typeof jest&&t.catch(function(){}),t};var l=function(){function e(t){!function(e,
t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this._name=t,this._dependencies=void 0,this._factory=void 0,this._implementation={},this._map=void 0,this._state={_define:o.new(),_fetch:o.new(),_implement:o.new()}}var t,n,r;return t=e,(n=[{key:"name",get:function(){return this._name},set:function(e){throw new Error("Name of module ".concat(this.name," is read-only"));}},{key:"dependencies",get:function(){return this._dependencies},set:function(e){if(this._dependencies)throw new Error("Dependencies of module ".concat(this.name,
" already set"));this._dependencies=e}},{key:"factory",get:function(){return this._factory},set:function(e){if(this._factory)throw new Error("Factory of module ".concat(this.name," already set"));this._factory=e}},{key:"implementation",get:function(){return this._implementation},set:function(e){this._implementation=e}},{key:"map",get:function(){return this._map},set:function(e){if(this._map)throw new Error("Local module map of module ".concat(this.name," already set"));this._map=e}},{key:"esModule",
get:function(){return this._implementation.__esModule},set:function(e){Object.defineProperty(this._implementation,"__esModule",{configurable:!0,value:e,writable:!0})}},{key:"fetch",get:function(){return this._state._fetch}},{key:"fetched",get:function(){return this.fetch.resolved}},{key:"define",get:function(){return this._state._define}},{key:"defined",get:function(){return this.define.resolved}},{key:"implement",get:function(){return this._state._implement}},{key:"implemented",get:function(){return this.implement.resolved}}])&&
a(t.prototype,n),r&&a(t,r),e}();function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&
(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i;}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e),this._modules={},this._maps=
{},this._paths={},this._config={maps:{},paths:{}},this._parse(t,"defaultURLParams",{}),this._parse(t,"explainResolutions",!1),this._parse(t,"showWarnings",!1),this._parse(t,"waitTimeout",7E3),this._parse(t,"basePath","/"),this._parse(t,"resolvePath","/o/js_resolve_modules"),this._parse(t,"combine",!1),this._parse(t,"url",""),this._parse(t,"urlMaxLength",2E3),this._parse(t,"logLevel","error")}var t,n,r;return t=e,(n=[{key:"addModule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?
arguments[1]:{};if(this._modules[e])throw new Error("Module is already registered: ".concat(e));var n=new l(e);return Object.entries(t).forEach(function(e){var t=s(e,2),r=t[0],o=t[1];n[r]=o}),this._modules[e]=n,n}},{key:"addMappings",value:function(e){Object.assign(this._maps,e)}},{key:"addPaths",value:function(e){Object.assign(this._paths,e)}},{key:"getModules",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return void 0===t?Object.values(this._modules):
t.map(function(t){return e.getModule(t)})}},{key:"getModule",value:function(e){var t=this._modules[e];if(!t){var n=this._mapModule(e);t=this._modules[n]}return t}},{key:"getDependency",value:function(e,t){var n=this.getModule(e),r=this._modules[t];if(!r){var o=this._mapModule(t,n.map);r=this._modules[o]}return r}},{key:"_parse",value:function(e,t,n){this._config[t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:n}},{key:"_mapModule",value:function(e,t){return t&&(e=this._mapMatches(e,t)),Object.keys(this._maps).length>
0&&(e=this._mapMatches(e,this._maps)),e}},{key:"_mapMatches",value:function(e,t){var n=t[e];return n?"object"===u(n)?n.value:n:((n=this._mapExactMatch(e,t))||(n=this._mapPartialMatch(e,t)),n||(n=this._mapWildcardMatch(e,t)),n||e)}},{key:"_mapExactMatch",value:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];if(r.value&&r.exactMatch&&e===n)return r.value}}},{key:"_mapPartialMatch",value:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=
t[n];if(!r.exactMatch&&(r.value&&(r=r.value),e===n||0===e.indexOf(n+"/")))return r+e.substring(n.length)}}},{key:"_mapWildcardMatch",value:function(e,t){if("function"==typeof t["*"])return t["*"](e)}},{key:"explainResolutions",get:function(){return this._config.explainResolutions}},{key:"showWarnings",get:function(){return this._config.showWarnings}},{key:"waitTimeout",get:function(){return this._config.waitTimeout}},{key:"basePath",get:function(){return this._config.basePath}},{key:"resolvePath",
get:function(){return this._config.resolvePath}},{key:"combine",get:function(){return this._config.combine}},{key:"url",get:function(){return this._config.url}},{key:"urlMaxLength",get:function(){return this._config.urlMaxLength}},{key:"logLevel",get:function(){return this._config.logLevel}},{key:"defaultURLParams",get:function(){return this._config.defaultURLParams}},{key:"paths",get:function(){return this._paths}}])&&d(t.prototype,n),r&&d(t,r),e}();function m(e,t){for(var n=0;n<t.length;n++){var r=
t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this._config=t,this._cachedResolutions={}}var t,n,r;return t=e,(n=[{key:"resolve",value:function(e){var t=this;if(void 0===e||0==e.length)throw new Error("Argument 'modules' cannot be undefined or empty");var n=this._config;return new Promise(function(r,
o){var i=t._cachedResolutions[e];if(i)r(i);else{var a="modules\x3d".concat(encodeURIComponent(e)),l="".concat(n.resolvePath,"?").concat(a),u={};l.length>n.urlMaxLength&&(l=n.resolvePath,u={body:a,method:"POST"}),fetch(l,u).then(function(e){return e.text()}).then(function(n){var o=JSON.parse(n);t._cachedResolutions[e]=o,r(o)}).catch(o)}})}}])&&m(t.prototype,n),r&&m(t,r),e}();function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=
!0),Object.defineProperty(e,r.key,r)}}var y={off:0,error:1,warn:2,info:3,debug:4},v="liferay-amd-loader |",_=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this._config=t}var t,n,r;return t=e,(n=[{key:"error",value:function(){var e;if(this._applies("error")){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[v].concat(n))}}},{key:"warn",value:function(){var e;if(this._applies("warn")){for(var t=
arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).warn.apply(e,[v].concat(n))}}},{key:"info",value:function(){var e;if(this._applies("info")){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).info.apply(e,[v].concat(n))}}},{key:"debug",value:function(){var e;if(this._applies("debug")){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).debug.apply(e,[v].concat(n))}}},{key:"resolution",value:function(){var e;
if(this._config.explainResolutions){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,[v].concat(n))}}},{key:"_applies",value:function(e){var t=y[this._config.logLevel];return y[e]<=t}}])&&g(t.prototype,n),r&&g(t,r),e}();function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var w=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");
}(this,e),this._config=t}var t,n,r;return t=e,(n=[{key:"build",value:function(e){var t=this,n=this._config,r=[],o=[],i=[],a=n.basePath;return a.length&&"/"!==a.charAt(a.length-1)&&(a+="/"),e.forEach(function(e){var l=n.getModule(e),u=t._getModulePath(l);n.combine?(r.push(u),o.push(l.name)):i.push({modules:[l.name],url:t._getURLWithParams(n.url+a+u)})}),r.length&&(i=i.concat(this._generateBufferURLs(o,r,{basePath:a,url:n.url,urlMaxLength:n.urlMaxLength})),r.length=0),i}},{key:"_generateBufferURLs",
value:function(e,t,n){for(var r=n.basePath,o=[],i=n.urlMaxLength,a={modules:[e[0]],url:n.url+r+t[0]},l=1;l<t.length;l++){var u=e[l],s=t[l];a.url.length+r.length+s.length+1<i?(a.modules.push(u),a.url+="\x26"+r+s):(o.push(a),a={modules:[u],url:n.url+r+s})}return a.url=this._getURLWithParams(a.url),o.push(a),o}},{key:"_getModulePath",value:function(e){var t=this._config.paths,n=e.name;return Object.keys(t).forEach(function(e){n!==e&&0!==n.indexOf(e+"/")||(n=t[e]+n.substring(e.length))}),n.lastIndexOf(".js")!==
n.length-3&&(n+=".js"),n}},{key:"_getURLWithParams",value:function(e){var t=this._config.defaultURLParams||{},n=Object.keys(t);if(!n.length)return e;var r=n.map(function(e){return e+"\x3d"+t[e]}).join("\x26");return e+(e.indexOf("?")>-1?"\x26":"?")+r}}])&&b(t.prototype,n),r&&b(t,r),e}();function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var M=function(){function e(t,n,r){!function(e,
t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this._document=t,this._config=n,this._log=r,this._urlBuilder=new w(n),this._injectedScripts={}}var t,n,r;return t=e,(n=[{key:"loadModules",value:function(e){var t=this,n=this._urlBuilder;if(0==e.length)return Promise.resolve();var r=n.build(e).map(function(e){return t._loadScript(e)});return Promise.all(r)}},{key:"_loadScript",value:function(e){var t=this,n=this._config.getModules(e.modules),r=this._injectedScripts[e.url];
return r||((r=this._document.createElement("script")).src=e.url,r.async=!1,r.onload=r.onreadystatechange=function(){t.readyState&&"complete"!==t.readyState&&"load"!==t.readyState||(r.onload=r.onreadystatechange=null,r.onerror=null,n.forEach(function(e){e.fetch.fulfilled?t._log.warn("Module '".concat(e.name,"' is being fetched from\n"),r.src,"but was already fetched from\n",e.fetch.resolved?e.fetch.resolution.src:e.fetch.rejection.script.src):e.fetch.resolve(r)}))},r.onerror=function(){r.onload=r.onreadystatechange=
null,r.onerror=null;var t=Object.assign(new Error("Unable to load script from URL ".concat(e.url)),{modules:e.modules,script:r,url:e.url});n.forEach(function(e){return e.fetch.reject(t)})},this._injectedScripts[e.url]=r,this._document.head.appendChild(r)),Promise.all(n.map(function(e){return e.fetch}))}}])&&k(t.prototype,n),r&&k(t,r),e}();function j(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||
function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}()}function P(e,t){(null==t||t>
e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var L=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;O(this,
e),this._config=new h(t||window.__CONFIG__),this._log=new _(this._config),this._dependencyResolver=new p(this._config),this._urlBuilder=new w(this._config),this._scriptLoader=new M(n||window.document,this._config,this._log),this._requireCallId=0}var t,n,o;return t=e,(n=[{key:"version",value:function(){return r.version}},{key:"define",value:function(){for(var e=this._config,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=e.getModule(o);if(i&&i.defined)this._log.warn("Module '".concat(o,
"' is being redefined. Only the first"),"definition will be used");else{var a=n[1],l=n[2];if(2==n.length&&(l=a,a=["require","exports","module"]),"function"!=typeof l){var u=l;l=function(){return u}}if(!(i=e.getModule(o)))throw new Error("Trying to define a module that was not registered: ".concat(o,"\n")+"This usually means that someone is calling define() for a module that has not been previously required.");if(i.defined)throw new Error("Trying to define a module more than once: ".concat(o,"\n")+
"This usually means that someone is calling define() more than once for the same module, which can lead to unexpected results.");this._log.resolution("Defining",i.name),i.factory=l,i.dependencies=a,i.define.resolve(n)}}},{key:"require",value:function(){for(var e,t,n,r,o,i,a=this,l=this._scriptLoader,u=this._config,s=this._requireCallId++,c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];if(1==f.length)e=f[0],t=void 0,n=void 0;else if(2==f.length){var h=f[f.length-1];"function"==typeof h?
(e=f[0],t=h,n=void 0):null==h?(e=f[0],t=void 0,n=void 0):(e=f,t=void 0,n=void 0)}else{var m=f[f.length-1],p=!1;if("function"!=typeof m&&null!=m||(p=!0),p){var g=f[f.length-2],y=!1;"function"!=typeof g&&null!=g||(y=!0),y?(e=f.slice(0,f.length-2),t=g,n=m):(e=f.slice(0,f.length-1),t=m,n=void 0)}else e=f,t=void 0,n=void 0}if("string"==typeof e)e=[e];else if(1==e.length&&Array.isArray(e[0])){var v;e=(v=[]).concat.apply(v,j(e))}if(void 0===t&&(t=function(){}),void 0===n){var _=new Error("");n=function(t){var n=
"(n/a)";_.stack&&(n=_.stack.split("\n").map(function(e){return"        ".concat(e)}).join("\n"),n="\n".concat(n)),a._log.error("\n","A require() call has failed but no failure handler was","provided.\n","Note that even if the call stack of this error trace","looks like coming from the Liferay AMD Loader, it is not","an error in the Loader what has caused it, but an error","caused by the require() call.\n","The reason why the Loader is in the stack trace is","because it is printing the error so that it doesn't get",
"lost.\n","However, we recommend providing a failure handler in all","require() calls to be able to recover from errors better","and to avoid the appearance of this message.\n","\n","Some information about the require() call follows:\n","  \u00b7 Require call id:",s,"\n","  \u00b7 Required modules:",e,"\n","  \u00b7 Missing modules:",t.missingModules?t.missingModules:"(n/a)","\n","  \u00b7 Stack trace of the require() call:","".concat(n),"\n",t)}}t=this._interceptHandler(t,"success",s),n=this._interceptHandler(n,
"failure",s);var b=!1;this._dependencyResolver.resolve(e).then(function(t){if(a._log.resolution("Require call",s,"resolved modules",e,"to",t),a._throwOnLegacyProtocolResolutionErrors(t),a._logServerMessages(e,t),t.errors&&t.errors.length>1)throw Object.assign(new Error("The server generated some errors while resolving modules"),{resolutionErrors:t.errors});return u.addMappings(t.configMap),u.addPaths(t.pathMap),r=t.resolvedModules,(o=a._getUnregisteredModuleNames(r)).forEach(function(e){var n={map:t.moduleMap[e]},
r=t.moduleFlags?t.moduleFlags[e]:{};(r=r||{}).esModule&&(n.esModule=!0),u.addModule(e,n)}),i=a._setRejectTimeout(e,t,function(){b=!0,n.apply(void 0,arguments)}),a._log.resolution("Fetching",o,"from require call",s),l.loadModules(o)}).then(function(){if(!b)return a._waitForModuleDefinitions(r)}).then(function(){if(!b){clearTimeout(i),a._setModuleImplementations(s,r);var n=a._getModuleImplementations(e);t.apply(void 0,j(n))}}).catch(function(e){b||(i&&clearTimeout(i),n(e))})}},{key:"_interceptHandler",
value:function(e,t,n){var r=this;return function(){r._log.resolution("Invoking",t,"handler for","require call",n);try{e.apply(void 0,arguments)}catch(e){r._log.error("\n","A require() call",t,"handler has thrown an error.\n","Note that even if the call stack of this error trace","looks like coming from the Liferay AMD Loader, it is not","an error in the Loader what has caused it, but an error","in the handler's code.\n","The reason why the Loader is in the stack trace is","because it is printing the error on behalf of the handler",
"so that it doesn't get lost.\n","However, we recommend wrapping all handler code inside a","try/catch to be able to recover from errors better and to","avoid the appearance of this message.\n","\n",e)}}}},{key:"_getUnregisteredModuleNames",value:function(e){var t=this._config;return e.filter(function(e){return!t.getModule(e)})}},{key:"_logServerMessages",value:function(e,t){t.errors&&t.errors.length>0&&this._log.error("Errors returned from server for require(",e,"):",t.errors),t.warnings&&t.warnings.length>
0&&this._log.warn("Warnings returned from server for require(",e,"):",t.warnings)}},{key:"_setRejectTimeout",value:function(e,t,n){var r=this._config;if(0!==r.waitTimeout)return setTimeout(function(){var o=t.resolvedModules.filter(function(e){var t=r.getModule(e);return!t||!t.implemented}),i=Object.assign(new Error("Load timeout for modules: "+e),{missingModules:o,modules:e,resolution:t});n(i)},r.waitTimeout)}},{key:"_throwOnLegacyProtocolResolutionErrors",value:function(e){var t=e.resolvedModules.filter(function(e){return 0===
e.indexOf(":ERROR:")}).map(function(e){return e.substr(7)});if(t.length>0)throw Object.assign(new Error("The following problems where detected while resolving modules:\n"+t.map(function(e){return"    \u00b7 ".concat(e)}).join("\n")),{resolutionErrors:t});}},{key:"_waitForModuleDefinitions",value:function(e){var t=this._config;return Promise.all(t.getModules(e).map(function(e){return e.define}))}},{key:"_waitForModuleImplementations",value:function(e){var t=this._config;return Promise.all(t.getModules(e).map(function(e){return e.implement}))}},
{key:"_setModuleImplementations",value:function(e,t){var n=this,r=this._config;r.getModules(t).forEach(function(t){if(!t.implemented){if(t.implement.rejected)throw t.implement.rejection;n._log.resolution("Implementing",t.name,"from require call",e);try{var o={get exports(){return t.implementation},set exports(e){t.implementation=e}},i=t.dependencies.map(function(e){if("exports"===e)return o.exports;if("module"===e)return o;if("require"===e)return n._createLocalRequire(t);var i=r.getDependency(t.name,
e);if(!i)throw new Error("Unsatisfied dependency: ".concat(e," ")+"found in module ".concat(t.name));if(!i.implementation&&!i.implemented)throw new Error('Module "'+i.name+'" has not been loaded yet for context: '+t.name);return i.implementation}),a=t.factory.apply(t,j(i));void 0!==a&&(t.implementation=a),t.implement.resolve(t.implementation)}catch(e){throw t.implement.fulfilled||t.implement.reject(e),e;}}})}},{key:"_createLocalRequire",value:function(e){var t=this,n=this._config,r=function(r){for(var o=
arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(i.length>0)return t.require.apply(t,[r].concat(i));var l=n.getDependency(e.name,r);if(!l||!("implementation"in l))throw new Error('Module "'+r+'" has not been loaded yet for context: '+e.name);return l.implementation};return r.toUrl=function(e){return t._urlBuilder.build([e])[0].url},r}},{key:"_getModuleImplementations",value:function(e){return this._config.getModules(e).map(function(e){return e.implementation})}}])&&E(t.prototype,
n),o&&E(t,o),e}();L.prototype.define.amd={};var x=window.__CONFIG__||{},S="string"==typeof x.namespace?x.namespace:void 0,R=void 0===x.exposeGlobal||x.exposeGlobal,A=new L(x);if(S){var T=window[S]?window[S]:{};T.Loader=A,window[S]=T}else window.Loader=A;R&&(window.Loader=A,window.require=L.prototype.require.bind(A),window.define=L.prototype.define.bind(A),window.define.amd={})}]);


































