Files
prestashop/modules/psshipping/views/templates/dist/assets/index-CchQJcQ6.js

3 lines
1023 B
JavaScript
Raw Normal View History

import{aH as v,aI as w,aT as g,aK as M,aJ as N}from"./globals-BVeJWRKG.js";function j(s,p,h){var i;return v(this,void 0,void 0,function(){var o,c,l,d,a,b=this;return w(this,function(u){switch(u.label){case 0:return g()?[2,[]]:(o=M(),c=(i=p.enabledMiddleware)!==null&&i!==void 0?i:{},l=Object.entries(c).filter(function(r){r[0];var e=r[1];return e}).map(function(r){var e=r[0];return e}),d=l.map(function(r){return v(b,void 0,void 0,function(){var e,n,m,f;return w(this,function(t){switch(t.label){case 0:e=r.replace("@segment/",""),n=e,h&&(n=btoa(e).replace(/=/g,"")),m="".concat(o,"/middleware/").concat(n,"/latest/").concat(n,".js.gz"),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,N(m)];case 2:return t.sent(),[2,window["".concat(e,"Middleware")]];case 3:return f=t.sent(),s.log("error",f),s.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}})})}),[4,Promise.all(d)]);case 1:return a=u.sent(),a=a.filter(Boolean),[2,a]}})})}export{j as remoteMiddlewares};
//# sourceMappingURL=index-CchQJcQ6.js.map