UNPKG

next-csrf

Version:

CSRF mitigation library for Next.js

1 lines 150 kB
module.exports=function(e,t){"use strict";var s={};function __webpack_require__(t){if(s[t]){return s[t].exports}var n=s[t]={i:t,l:false,exports:{}};e[t].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(330)}t(__webpack_require__);return startup()}({14:function(e,t,s){"use strict";const n=s(669).inspect.custom;class WebpackError extends Error{constructor(e){super(e);this.details=undefined;this.missing=undefined;this.origin=undefined;this.dependencies=undefined;this.module=undefined;Error.captureStackTrace(this,this.constructor)}[n](){return this.stack+(this.details?`\n${this.details}`:"")}}e.exports=WebpackError},22:function(e,t,s){"use strict";const n=s(14);const r=/at ([a-zA-Z0-9_.]*)/;function createMessage(e){return`Abstract method${e?" "+e:""}. Must be overridden.`}function Message(){this.stack=undefined;Error.captureStackTrace(this);const e=this.stack.split("\n")[3].match(r);this.message=e&&e[1]?createMessage(e[1]):createMessage()}class AbstractMethodError extends n{constructor(){super((new Message).message);this.name="AbstractMethodError"}}e.exports=AbstractMethodError},29:function(e,t,s){"use strict";const{Tapable:n,SyncWaterfallHook:r,SyncHook:o}=s(47);e.exports=class ModuleTemplate extends n{constructor(e,t){super();this.runtimeTemplate=e;this.type=t;this.hooks={content:new r(["source","module","options","dependencyTemplates"]),module:new r(["source","module","options","dependencyTemplates"]),render:new r(["source","module","options","dependencyTemplates"]),package:new r(["source","module","options","dependencyTemplates"]),hash:new o(["hash"])}}render(e,t,s){try{const n=e.source(t,this.runtimeTemplate,this.type);const r=this.hooks.content.call(n,e,s,t);const o=this.hooks.module.call(r,e,s,t);const i=this.hooks.render.call(o,e,s,t);return this.hooks.package.call(i,e,s,t)}catch(t){t.message=`${e.identifier()}\n${t.message}`;throw t}}updateHash(e){e.update("1");this.hooks.hash.call(e)}}},41:function(e,t){const s=(e,t)=>{if(e.pushChunk(t)){t.addGroup(e)}};const n=(e,t)=>{if(e.addChild(t)){t.addParent(e)}};const r=(e,t)=>{if(t.addChunk(e)){e.addModule(t)}};const o=(e,t)=>{e.removeModule(t);t.removeChunk(e)};const i=(e,t)=>{if(t.addBlock(e)){e.chunkGroup=t}};t.connectChunkGroupAndChunk=s;t.connectChunkGroupParentAndChild=n;t.connectChunkAndModule=r;t.disconnectChunkAndModule=o;t.connectDependenciesBlockAndChunkGroup=i},47:function(e,t,s){"use strict";t.__esModule=true;t.Tapable=s(408);t.SyncHook=s(470);t.SyncBailHook=s(947);t.SyncWaterfallHook=s(731);t.SyncLoopHook=s(681);t.AsyncParallelHook=s(110);t.AsyncParallelBailHook=s(977);t.AsyncSeriesHook=s(920);t.AsyncSeriesBailHook=s(996);t.AsyncSeriesWaterfallHook=s(606);t.HookMap=s(69);t.MultiHook=s(677)},54:function(e,t,s){"use strict";const n=s(995);const r=s(571);const o=s(284);const i=s(780);const a=s(121);const{LogType:l}=s(879);const u=(...e)=>{let t=[];t.push(...e);return t.find(e=>e!==undefined)};const c=(e,t)=>{if(typeof e!==typeof t){return typeof e<typeof t?-1:1}if(e<t)return-1;if(e>t)return 1;return 0};class Stats{constructor(e){this.compilation=e;this.hash=e.hash;this.startTime=undefined;this.endTime=undefined}static filterWarnings(e,t){if(!t){return e}const s=[].concat(t).map(e=>{if(typeof e==="string"){return t=>t.includes(e)}if(e instanceof RegExp){return t=>e.test(t)}if(typeof e==="function"){return e}throw new Error(`Can only filter warnings with Strings or RegExps. (Given: ${e})`)});return e.filter(e=>{return!s.some(t=>t(e))})}formatFilePath(e){const t=/^(\s|\S)*!/;return e.includes("!")?`${e.replace(t,"")} (${e})`:`${e}`}hasWarnings(){return this.compilation.warnings.length>0||this.compilation.children.some(e=>e.getStats().hasWarnings())}hasErrors(){return this.compilation.errors.length>0||this.compilation.children.some(e=>e.getStats().hasErrors())}normalizeFieldKey(e){if(e[0]==="!"){return e.substr(1)}return e}sortOrderRegular(e){if(e[0]==="!"){return false}return true}toJson(e,t){if(typeof e==="boolean"||typeof e==="string"){e=Stats.presetToOptions(e)}else if(!e){e={}}const r=(t,s)=>t!==undefined?t:e.all!==undefined?e.all:s;const d=e=>{if(typeof e==="string"){const t=new RegExp(`[\\\\/]${e.replace(/[-[\]{}()*+?.\\^$|]/g,"\\$&")}([\\\\/]|$|!|\\?)`);return e=>t.test(e)}if(e&&typeof e==="object"&&typeof e.test==="function"){return t=>e.test(t)}if(typeof e==="function"){return e}if(typeof e==="boolean"){return()=>e}};const h=this.compilation;const f=u(e.context,h.compiler.context);const p=h.compiler.context===f?h.requestShortener:new n(f);const m=r(e.performance,true);const g=r(e.hash,true);const y=r(e.env,false);const k=r(e.version,true);const b=r(e.timings,true);const w=r(e.builtAt,true);const _=r(e.assets,true);const v=r(e.entrypoints,true);const x=r(e.chunkGroups,!t);const $=r(e.chunks,!t);const E=r(e.chunkModules,true);const M=r(e.chunkOrigins,!t);const O=r(e.modules,true);const A=r(e.nestedModules,true);const S=r(e.moduleAssets,!t);const C=r(e.depth,!t);const j=r(e.cached,true);const T=r(e.cachedAssets,true);const I=r(e.reasons,!t);const D=r(e.usedExports,!t);const P=r(e.providedExports,!t);const R=r(e.optimizationBailout,!t);const H=r(e.children,true);const z=r(e.source,!t);const q=r(e.moduleTrace,true);const B=r(e.errors,true);const F=r(e.errorDetails,!t);const G=r(e.warnings,true);const N=u(e.warningsFilter,null);const W=r(e.publicPath,!t);const U=r(e.logging,t?"info":true);const L=r(e.loggingTrace,!t);const J=[].concat(u(e.loggingDebug,[])).map(d);const Z=[].concat(u(e.excludeModules,e.exclude,[])).map(d);const K=[].concat(u(e.excludeAssets,[])).map(d);const Q=u(e.maxModules,t?15:Infinity);const X=u(e.modulesSort,"id");const Y=u(e.chunksSort,"id");const V=u(e.assetsSort,"");const ee=r(e.outputPath,!t);if(!j){Z.push((e,t)=>!t.built)}const te=()=>{let e=0;return t=>{if(Z.length>0){const e=p.shorten(t.resource);const s=Z.some(s=>s(e,t));if(s)return false}const s=e<Q;e++;return s}};const se=()=>{return e=>{if(K.length>0){const t=e.name;const s=K.some(s=>s(t,e));if(s)return false}return T||e.emitted}};const ne=(e,t,s)=>{if(t[e]===null&&s[e]===null)return 0;if(t[e]===null)return 1;if(s[e]===null)return-1;if(t[e]===s[e])return 0;if(typeof t[e]!==typeof s[e])return typeof t[e]<typeof s[e]?-1:1;return t[e]<s[e]?-1:1};const re=(e,t)=>{const s=t.reduce((e,t,s)=>{e.set(t,s);return e},new Map);return(t,n)=>{if(e){const s=this.normalizeFieldKey(e);const r=this.sortOrderRegular(e);const o=ne(s,r?t:n,r?n:t);if(o)return o}return s.get(t)-s.get(n)}};const oe=e=>{let t="";if(typeof e==="string"){e={message:e}}if(e.chunk){t+=`chunk ${e.chunk.name||e.chunk.id}${e.chunk.hasRuntime()?" [entry]":e.chunk.canBeInitial()?" [initial]":""}\n`}if(e.file){t+=`${e.file}\n`}if(e.module&&e.module.readableIdentifier&&typeof e.module.readableIdentifier==="function"){t+=this.formatFilePath(e.module.readableIdentifier(p));if(typeof e.loc==="object"){const s=o(e.loc);if(s)t+=` ${s}`}t+="\n"}t+=e.message;if(F&&e.details){t+=`\n${e.details}`}if(F&&e.missing){t+=e.missing.map(e=>`\n[${e}]`).join("")}if(q&&e.origin){t+=`\n @ ${this.formatFilePath(e.origin.readableIdentifier(p))}`;if(typeof e.originLoc==="object"){const s=o(e.originLoc);if(s)t+=` ${s}`}if(e.dependencies){for(const s of e.dependencies){if(!s.loc)continue;if(typeof s.loc==="string")continue;const e=o(s.loc);if(!e)continue;t+=` ${e}`}}let s=e.origin;while(s.issuer){s=s.issuer;t+=`\n @ ${s.readableIdentifier(p)}`}}return t};const ie={errors:h.errors.map(oe),warnings:Stats.filterWarnings(h.warnings.map(oe),N)};Object.defineProperty(ie,"_showWarnings",{value:G,enumerable:false});Object.defineProperty(ie,"_showErrors",{value:B,enumerable:false});if(k){ie.version=s(836).version}if(g)ie.hash=this.hash;if(b&&this.startTime&&this.endTime){ie.time=this.endTime-this.startTime}if(w&&this.endTime){ie.builtAt=this.endTime}if(y&&e._env){ie.env=e._env}if(h.needAdditionalPass){ie.needAdditionalPass=true}if(W){ie.publicPath=this.compilation.mainTemplate.getPublicPath({hash:this.compilation.hash})}if(ee){ie.outputPath=this.compilation.mainTemplate.outputOptions.path}if(_){const e={};const t=h.getAssets().sort((e,t)=>e.name<t.name?-1:1);ie.assetsByChunkName={};ie.assets=t.map(({name:t,source:s,info:n})=>{const r={name:t,size:s.size(),chunks:[],chunkNames:[],info:n,emitted:s.emitted||h.emittedAssets.has(t)};if(m){r.isOverSizeLimit=s.isOverSizeLimit}e[t]=r;return r}).filter(se());ie.filteredAssets=t.length-ie.assets.length;for(const t of h.chunks){for(const s of t.files){if(e[s]){for(const n of t.ids){e[s].chunks.push(n)}if(t.name){e[s].chunkNames.push(t.name);if(ie.assetsByChunkName[t.name]){ie.assetsByChunkName[t.name]=[].concat(ie.assetsByChunkName[t.name]).concat([s])}else{ie.assetsByChunkName[t.name]=s}}}}}ie.assets.sort(re(V,ie.assets))}const ae=e=>{const t={};for(const s of e){const e=s[0];const n=s[1];const r=n.getChildrenByOrders();t[e]={chunks:n.chunks.map(e=>e.id),assets:n.chunks.reduce((e,t)=>e.concat(t.files||[]),[]),children:Object.keys(r).reduce((e,t)=>{const s=r[t];e[t]=s.map(e=>({name:e.name,chunks:e.chunks.map(e=>e.id),assets:e.chunks.reduce((e,t)=>e.concat(t.files||[]),[])}));return e},Object.create(null)),childAssets:Object.keys(r).reduce((e,t)=>{const s=r[t];e[t]=Array.from(s.reduce((e,t)=>{for(const s of t.chunks){for(const t of s.files){e.add(t)}}return e},new Set));return e},Object.create(null))};if(m){t[e].isOverSizeLimit=n.isOverSizeLimit}}return t};if(v){ie.entrypoints=ae(h.entrypoints)}if(x){ie.namedChunkGroups=ae(h.namedChunkGroups)}const le=e=>{const t=[];let s=e;while(s.issuer){t.push(s=s.issuer)}t.reverse();const n={id:e.id,identifier:e.identifier(),name:e.readableIdentifier(p),index:e.index,index2:e.index2,size:e.size(),cacheable:e.buildInfo.cacheable,built:!!e.built,optional:e.optional,prefetched:e.prefetched,chunks:Array.from(e.chunksIterable,e=>e.id),issuer:e.issuer&&e.issuer.identifier(),issuerId:e.issuer&&e.issuer.id,issuerName:e.issuer&&e.issuer.readableIdentifier(p),issuerPath:e.issuer&&t.map(e=>({id:e.id,identifier:e.identifier(),name:e.readableIdentifier(p),profile:e.profile})),profile:e.profile,failed:!!e.error,errors:e.errors?e.errors.length:0,warnings:e.warnings?e.warnings.length:0};if(S){n.assets=Object.keys(e.buildInfo.assets||{})}if(I){n.reasons=e.reasons.sort((e,t)=>{if(e.module&&!t.module)return-1;if(!e.module&&t.module)return 1;if(e.module&&t.module){const s=c(e.module.id,t.module.id);if(s)return s}if(e.dependency&&!t.dependency)return-1;if(!e.dependency&&t.dependency)return 1;if(e.dependency&&t.dependency){const s=a(e.dependency.loc,t.dependency.loc);if(s)return s;if(e.dependency.type<t.dependency.type)return-1;if(e.dependency.type>t.dependency.type)return 1}return 0}).map(e=>{const t={moduleId:e.module?e.module.id:null,moduleIdentifier:e.module?e.module.identifier():null,module:e.module?e.module.readableIdentifier(p):null,moduleName:e.module?e.module.readableIdentifier(p):null,type:e.dependency?e.dependency.type:null,explanation:e.explanation,userRequest:e.dependency?e.dependency.userRequest:null};if(e.dependency){const s=o(e.dependency.loc);if(s){t.loc=s}}return t})}if(D){if(e.used===true){n.usedExports=e.usedExports}else if(e.used===false){n.usedExports=false}}if(P){n.providedExports=Array.isArray(e.buildMeta.providedExports)?e.buildMeta.providedExports:null}if(R){n.optimizationBailout=e.optimizationBailout.map(e=>{if(typeof e==="function")return e(p);return e})}if(C){n.depth=e.depth}if(A){if(e.modules){const t=e.modules;n.modules=t.sort(re("depth",t)).filter(te()).map(le);n.filteredModules=t.length-n.modules.length;n.modules.sort(re(X,n.modules))}}if(z&&e._source){n.source=e._source.source()}return n};if($){ie.chunks=h.chunks.map(e=>{const t=new Set;const s=new Set;const n=new Set;const r=e.getChildIdsByOrders();for(const r of e.groupsIterable){for(const e of r.parentsIterable){for(const s of e.chunks){t.add(s.id)}}for(const e of r.childrenIterable){for(const t of e.chunks){s.add(t.id)}}for(const t of r.chunks){if(t!==e)n.add(t.id)}}const i={id:e.id,rendered:e.rendered,initial:e.canBeInitial(),entry:e.hasRuntime(),recorded:e.recorded,reason:e.chunkReason,size:e.modulesSize(),names:e.name?[e.name]:[],files:e.files.slice(),hash:e.renderedHash,siblings:Array.from(n).sort(c),parents:Array.from(t).sort(c),children:Array.from(s).sort(c),childrenByOrder:r};if(E){const t=e.getModules();i.modules=t.slice().sort(re("depth",t)).filter(te()).map(le);i.filteredModules=e.getNumberOfModules()-i.modules.length;i.modules.sort(re(X,i.modules))}if(M){i.origins=Array.from(e.groupsIterable,e=>e.origins).reduce((e,t)=>e.concat(t),[]).map(e=>({moduleId:e.module?e.module.id:undefined,module:e.module?e.module.identifier():"",moduleIdentifier:e.module?e.module.identifier():"",moduleName:e.module?e.module.readableIdentifier(p):"",loc:o(e.loc),request:e.request,reasons:e.reasons||[]})).sort((e,t)=>{const s=c(e.moduleId,t.moduleId);if(s)return s;const n=c(e.loc,t.loc);if(n)return n;const r=c(e.request,t.request);if(r)return r;return 0})}return i});ie.chunks.sort(re(Y,ie.chunks))}if(O){ie.modules=h.modules.slice().sort(re("depth",h.modules)).filter(te()).map(le);ie.filteredModules=h.modules.length-ie.modules.length;ie.modules.sort(re(X,ie.modules))}if(U){const e=s(669);ie.logging={};let t;let n=false;switch(U){case"none":t=new Set([]);break;case"error":t=new Set([l.error]);break;case"warn":t=new Set([l.error,l.warn]);break;case"info":t=new Set([l.error,l.warn,l.info]);break;case true:case"log":t=new Set([l.error,l.warn,l.info,l.log,l.group,l.groupEnd,l.groupCollapsed,l.clear]);break;case"verbose":t=new Set([l.error,l.warn,l.info,l.log,l.group,l.groupEnd,l.groupCollapsed,l.profile,l.profileEnd,l.time,l.status,l.clear]);n=true;break}for(const[s,r]of h.logging){const o=J.some(e=>e(s));let a=0;let u=r;if(!o){u=u.filter(e=>{if(!t.has(e.type))return false;if(!n){switch(e.type){case l.groupCollapsed:a++;return a===1;case l.group:if(a>0)a++;return a===0;case l.groupEnd:if(a>0){a--;return false}return true;default:return a===0}}return true})}u=u.map(t=>{let s=undefined;if(t.type===l.time){s=`${t.args[0]}: ${t.args[1]*1e3+t.args[2]/1e6}ms`}else if(t.args&&t.args.length>0){s=e.format(t.args[0],...t.args.slice(1))}return{type:(o||n)&&t.type===l.groupCollapsed?l.group:t.type,message:s,trace:L&&t.trace?t.trace:undefined}});let c=i.makePathsRelative(f,s,h.cache).replace(/\|/g," ");if(c in ie.logging){let e=1;while(`${c}#${e}`in ie.logging){e++}c=`${c}#${e}`}ie.logging[c]={entries:u,filteredEntries:r.length-u.length,debug:o}}}if(H){ie.children=h.children.map((s,n)=>{const r=Stats.getChildOptions(e,n);const o=new Stats(s).toJson(r,t);delete o.hash;delete o.version;if(s.name){o.name=i.makePathsRelative(f,s.name,h.cache)}return o})}return ie}toString(e){if(typeof e==="boolean"||typeof e==="string"){e=Stats.presetToOptions(e)}else if(!e){e={}}const t=u(e.colors,false);const s=this.toJson(e,true);return Stats.jsonToString(s,t)}static jsonToString(e,t){const s=[];const n={bold:"",yellow:"",red:"",green:"",cyan:"",magenta:""};const o=Object.keys(n).reduce((e,r)=>{e[r]=(e=>{if(t){s.push(t===true||t[r]===undefined?n[r]:t[r])}s.push(e);if(t){s.push("")}});return e},{normal:e=>s.push(e)});const i=t=>{let s=[800,400,200,100];if(e.time){s=[e.time/2,e.time/4,e.time/8,e.time/16]}if(t<s[3])o.normal(`${t}ms`);else if(t<s[2])o.bold(`${t}ms`);else if(t<s[1])o.green(`${t}ms`);else if(t<s[0])o.yellow(`${t}ms`);else o.red(`${t}ms`)};const a=()=>s.push("\n");const u=(e,t,s)=>{return e[t][s].value};const c=(e,t,s)=>{const n=e.length;const r=e[0].length;const i=new Array(r);for(let e=0;e<r;e++){i[e]=0}for(let t=0;t<n;t++){for(let s=0;s<r;s++){const n=`${u(e,t,s)}`;if(n.length>i[s]){i[s]=n.length}}}for(let l=0;l<n;l++){for(let n=0;n<r;n++){const a=e[l][n].color;const c=`${u(e,l,n)}`;let d=c.length;if(t[n]==="l"){a(c)}for(;d<i[n]&&n!==r-1;d++){o.normal(" ")}if(t[n]==="r"){a(c)}if(n+1<r&&i[n]!==0){o.normal(s||" ")}}a()}};const d=(e,t)=>{if(e.isOverSizeLimit){return o.yellow}return t};if(e.hash){o.normal("Hash: ");o.bold(e.hash);a()}if(e.version){o.normal("Version: webpack ");o.bold(e.version);a()}if(typeof e.time==="number"){o.normal("Time: ");o.bold(e.time);o.normal("ms");a()}if(typeof e.builtAt==="number"){const t=new Date(e.builtAt);let s=undefined;try{t.toLocaleTimeString()}catch(e){s="UTC"}o.normal("Built at: ");o.normal(t.toLocaleDateString(undefined,{day:"2-digit",month:"2-digit",year:"numeric",timeZone:s}));o.normal(" ");o.bold(t.toLocaleTimeString(undefined,{timeZone:s}));a()}if(e.env){o.normal("Environment (--env): ");o.bold(JSON.stringify(e.env,null,2));a()}if(e.publicPath){o.normal("PublicPath: ");o.bold(e.publicPath);a()}if(e.assets&&e.assets.length>0){const t=[[{value:"Asset",color:o.bold},{value:"Size",color:o.bold},{value:"Chunks",color:o.bold},{value:"",color:o.bold},{value:"",color:o.bold},{value:"Chunk Names",color:o.bold}]];for(const s of e.assets){t.push([{value:s.name,color:d(s,o.green)},{value:r.formatSize(s.size),color:d(s,o.normal)},{value:s.chunks.join(", "),color:o.bold},{value:[s.emitted&&"[emitted]",s.info.immutable&&"[immutable]",s.info.development&&"[dev]",s.info.hotModuleReplacement&&"[hmr]"].filter(Boolean).join(" "),color:o.green},{value:s.isOverSizeLimit?"[big]":"",color:d(s,o.normal)},{value:s.chunkNames.join(", "),color:o.normal}])}c(t,"rrrlll")}if(e.filteredAssets>0){o.normal(" ");if(e.assets.length>0)o.normal("+ ");o.normal(e.filteredAssets);if(e.assets.length>0)o.normal(" hidden");o.normal(e.filteredAssets!==1?" assets":" asset");a()}const h=(e,t)=>{for(const s of Object.keys(e)){const n=e[s];o.normal(`${t} `);o.bold(s);if(n.isOverSizeLimit){o.normal(" ");o.yellow("[big]")}o.normal(" =");for(const e of n.assets){o.normal(" ");o.green(e)}for(const e of Object.keys(n.childAssets)){const t=n.childAssets[e];if(t&&t.length>0){o.normal(" ");o.magenta(`(${e}:`);for(const e of t){o.normal(" ");o.green(e)}o.magenta(")")}}a()}};if(e.entrypoints){h(e.entrypoints,"Entrypoint")}if(e.namedChunkGroups){let t=e.namedChunkGroups;if(e.entrypoints){t=Object.keys(t).filter(t=>!e.entrypoints[t]).reduce((t,s)=>{t[s]=e.namedChunkGroups[s];return t},{})}h(t,"Chunk Group")}const f={};if(e.modules){for(const t of e.modules){f[`$${t.identifier}`]=t}}else if(e.chunks){for(const t of e.chunks){if(t.modules){for(const e of t.modules){f[`$${e.identifier}`]=e}}}}const p=e=>{o.normal(" ");o.normal(r.formatSize(e.size));if(e.chunks){for(const t of e.chunks){o.normal(" {");o.yellow(t);o.normal("}")}}if(typeof e.depth==="number"){o.normal(` [depth ${e.depth}]`)}if(e.cacheable===false){o.red(" [not cacheable]")}if(e.optional){o.yellow(" [optional]")}if(e.built){o.green(" [built]")}if(e.assets&&e.assets.length){o.magenta(` [${e.assets.length} asset${e.assets.length===1?"":"s"}]`)}if(e.prefetched){o.magenta(" [prefetched]")}if(e.failed)o.red(" [failed]");if(e.warnings){o.yellow(` [${e.warnings} warning${e.warnings===1?"":"s"}]`)}if(e.errors){o.red(` [${e.errors} error${e.errors===1?"":"s"}]`)}};const m=(e,t)=>{if(Array.isArray(e.providedExports)){o.normal(t);if(e.providedExports.length===0){o.cyan("[no exports]")}else{o.cyan(`[exports: ${e.providedExports.join(", ")}]`)}a()}if(e.usedExports!==undefined){if(e.usedExports!==true){o.normal(t);if(e.usedExports===null){o.cyan("[used exports unknown]")}else if(e.usedExports===false){o.cyan("[no exports used]")}else if(Array.isArray(e.usedExports)&&e.usedExports.length===0){o.cyan("[no exports used]")}else if(Array.isArray(e.usedExports)){const t=Array.isArray(e.providedExports)?e.providedExports.length:null;if(t!==null&&t===e.usedExports.length){o.cyan("[all exports used]")}else{o.cyan(`[only some exports used: ${e.usedExports.join(", ")}]`)}}a()}}if(Array.isArray(e.optimizationBailout)){for(const s of e.optimizationBailout){o.normal(t);o.yellow(s);a()}}if(e.reasons){for(const s of e.reasons){o.normal(t);if(s.type){o.normal(s.type);o.normal(" ")}if(s.userRequest){o.cyan(s.userRequest);o.normal(" ")}if(s.moduleId!==null){o.normal("[");o.normal(s.moduleId);o.normal("]")}if(s.module&&s.module!==s.moduleId){o.normal(" ");o.magenta(s.module)}if(s.loc){o.normal(" ");o.normal(s.loc)}if(s.explanation){o.normal(" ");o.cyan(s.explanation)}a()}}if(e.profile){o.normal(t);let s=0;if(e.issuerPath){for(const t of e.issuerPath){o.normal("[");o.normal(t.id);o.normal("] ");if(t.profile){const e=(t.profile.factory||0)+(t.profile.building||0);i(e);s+=e;o.normal(" ")}o.normal("-> ")}}for(const t of Object.keys(e.profile)){o.normal(`${t}:`);const n=e.profile[t];i(n);o.normal(" ");s+=n}o.normal("= ");i(s);a()}if(e.modules){g(e,t+"| ")}};const g=(e,t)=>{if(e.modules){let s=0;for(const t of e.modules){if(typeof t.id==="number"){if(s<t.id)s=t.id}}let n=t+" ";if(s>=10)n+=" ";if(s>=100)n+=" ";if(s>=1e3)n+=" ";for(const r of e.modules){o.normal(t);const e=r.name||r.identifier;if(typeof r.id==="string"||typeof r.id==="number"){if(typeof r.id==="number"){if(r.id<1e3&&s>=1e3)o.normal(" ");if(r.id<100&&s>=100)o.normal(" ");if(r.id<10&&s>=10)o.normal(" ")}else{if(s>=1e3)o.normal(" ");if(s>=100)o.normal(" ");if(s>=10)o.normal(" ")}if(e!==r.id){o.normal("[");o.normal(r.id);o.normal("]");o.normal(" ")}else{o.normal("[");o.bold(r.id);o.normal("]")}}if(e!==r.id){o.bold(e)}p(r);a();m(r,n)}if(e.filteredModules>0){o.normal(t);o.normal(" ");if(e.modules.length>0)o.normal(" + ");o.normal(e.filteredModules);if(e.modules.length>0)o.normal(" hidden");o.normal(e.filteredModules!==1?" modules":" module");a()}}};if(e.chunks){for(const t of e.chunks){o.normal("chunk ");if(t.id<1e3)o.normal(" ");if(t.id<100)o.normal(" ");if(t.id<10)o.normal(" ");o.normal("{");o.yellow(t.id);o.normal("} ");o.green(t.files.join(", "));if(t.names&&t.names.length>0){o.normal(" (");o.normal(t.names.join(", "));o.normal(")")}o.normal(" ");o.normal(r.formatSize(t.size));for(const e of t.parents){o.normal(" <{");o.yellow(e);o.normal("}>")}for(const e of t.siblings){o.normal(" ={");o.yellow(e);o.normal("}=")}for(const e of t.children){o.normal(" >{");o.yellow(e);o.normal("}<")}if(t.childrenByOrder){for(const e of Object.keys(t.childrenByOrder)){const s=t.childrenByOrder[e];o.normal(" ");o.magenta(`(${e}:`);for(const e of s){o.normal(" {");o.yellow(e);o.normal("}")}o.magenta(")")}}if(t.entry){o.yellow(" [entry]")}else if(t.initial){o.yellow(" [initial]")}if(t.rendered){o.green(" [rendered]")}if(t.recorded){o.green(" [recorded]")}if(t.reason){o.yellow(` ${t.reason}`)}a();if(t.origins){for(const e of t.origins){o.normal(" > ");if(e.reasons&&e.reasons.length){o.yellow(e.reasons.join(" "));o.normal(" ")}if(e.request){o.normal(e.request);o.normal(" ")}if(e.module){o.normal("[");o.normal(e.moduleId);o.normal("] ");const t=f[`$${e.module}`];if(t){o.bold(t.name);o.normal(" ")}}if(e.loc){o.normal(e.loc)}a()}}g(t," ")}}g(e,"");if(e.logging){for(const t of Object.keys(e.logging)){const s=e.logging[t];if(s.entries.length>0){a();if(s.debug){o.red("DEBUG ")}o.bold("LOG from "+t);a();let e="";for(const t of s.entries){let s=o.normal;let n=" ";switch(t.type){case l.clear:o.normal(`${e}-------`);a();continue;case l.error:s=o.red;n="<e> ";break;case l.warn:s=o.yellow;n="<w> ";break;case l.info:s=o.green;n="<i> ";break;case l.log:s=o.bold;break;case l.trace:case l.debug:s=o.normal;break;case l.status:s=o.magenta;n="<s> ";break;case l.profile:s=o.magenta;n="<p> ";break;case l.profileEnd:s=o.magenta;n="</p> ";break;case l.time:s=o.magenta;n="<t> ";break;case l.group:s=o.cyan;n="<-> ";break;case l.groupCollapsed:s=o.cyan;n="<+> ";break;case l.groupEnd:if(e.length>=2)e=e.slice(0,e.length-2);continue}if(t.message){for(const r of t.message.split("\n")){o.normal(`${e}${n}`);s(r);a()}}if(t.trace){for(const s of t.trace){o.normal(`${e}| ${s}`);a()}}switch(t.type){case l.group:e+=" ";break}}if(s.filteredEntries){o.normal(`+ ${s.filteredEntries} hidden lines`);a()}}}}if(e._showWarnings&&e.warnings){for(const t of e.warnings){a();o.yellow(`WARNING in ${t}`);a()}}if(e._showErrors&&e.errors){for(const t of e.errors){a();o.red(`ERROR in ${t}`);a()}}if(e.children){for(const n of e.children){const e=Stats.jsonToString(n,t);if(e){if(n.name){o.normal("Child ");o.bold(n.name);o.normal(":")}else{o.normal("Child")}a();s.push(" ");s.push(e.replace(/\n/g,"\n "));a()}}}if(e.needAdditionalPass){o.yellow("Compilation needs an additional pass and will compile again.")}while(s[s.length-1]==="\n"){s.pop()}return s.join("")}static presetToOptions(e){const t=typeof e==="string"&&e.toLowerCase()||e||"none";switch(t){case"none":return{all:false};case"verbose":return{entrypoints:true,chunkGroups:true,modules:false,chunks:true,chunkModules:true,chunkOrigins:true,depth:true,env:true,reasons:true,usedExports:true,providedExports:true,optimizationBailout:true,errorDetails:true,publicPath:true,logging:"verbose",exclude:false,maxModules:Infinity};case"detailed":return{entrypoints:true,chunkGroups:true,chunks:true,chunkModules:false,chunkOrigins:true,depth:true,usedExports:true,providedExports:true,optimizationBailout:true,errorDetails:true,publicPath:true,logging:true,exclude:false,maxModules:Infinity};case"minimal":return{all:false,modules:true,maxModules:0,errors:true,warnings:true,logging:"warn"};case"errors-only":return{all:false,errors:true,moduleTrace:true,logging:"error"};case"errors-warnings":return{all:false,errors:true,warnings:true,logging:"warn"};default:return{}}}static getChildOptions(e,t){let s;if(Array.isArray(e.children)){if(t<e.children.length){s=e.children[t]}}else if(typeof e.children==="object"&&e.children){s=e.children}if(typeof s==="boolean"||typeof s==="string"){s=Stats.presetToOptions(s)}if(!s){return e}const n=Object.assign({},e);delete n.children;return Object.assign(n,s)}}e.exports=Stats},67:function(e){"use strict";class DependencyReference{constructor(e,t,s=false,n=NaN){this.module=e;this.importedNames=t;this.weak=!!s;this.order=n}static sort(e){const t=new WeakMap;let s=0;for(const n of e){t.set(n,s++)}return e.sort((e,s)=>{const n=e.order;const r=s.order;if(isNaN(n)){if(!isNaN(r)){return 1}}else{if(isNaN(r)){return-1}if(n!==r){return n-r}}const o=t.get(e);const i=t.get(s);return o-i})}}e.exports=DependencyReference},69:function(e){"use strict";class HookMap{constructor(e){this._map=new Map;this._factory=e;this._interceptors=[]}get(e){return this._map.get(e)}for(e){const t=this.get(e);if(t!==undefined){return t}let s=this._factory(e);const n=this._interceptors;for(let t=0;t<n.length;t++){s=n[t].factory(e,s)}this._map.set(e,s);return s}intercept(e){this._interceptors.push(Object.assign({factory:(e,t)=>t},e))}tap(e,t,s){return this.for(e).tap(t,s)}tapAsync(e,t,s){return this.for(e).tapAsync(t,s)}tapPromise(e,t,s){return this.for(e).tapPromise(t,s)}}e.exports=HookMap},78:function(e){e.exports=require("webpack")},87:function(e){e.exports=require("os")},110:function(e,t,s){"use strict";const n=s(278);const r=s(268);class AsyncParallelHookCodeFactory extends r{content({onError:e,onDone:t}){return this.callTapsParallel({onError:(t,s,n,r)=>e(s)+r(true),onDone:t})}}const o=new AsyncParallelHookCodeFactory;class AsyncParallelHook extends n{compile(e){o.setup(this,e);return o.create(e)}}Object.defineProperties(AsyncParallelHook.prototype,{_call:{value:undefined,configurable:true,writable:true}});e.exports=AsyncParallelHook},114:function(e,t,s){"use strict";const n=s(14);class ChunkRenderError extends n{constructor(e,t,s){super();this.name="ChunkRenderError";this.error=s;this.message=s.message;this.details=s.stack;this.file=t;this.chunk=e;Error.captureStackTrace(this,this.constructor)}}e.exports=ChunkRenderError},121:function(e){"use strict";e.exports=((e,t)=>{if(typeof e==="string"){if(typeof t==="string"){if(e<t)return-1;if(e>t)return 1;return 0}else if(typeof t==="object"){return 1}else{return 0}}else if(typeof e==="object"){if(typeof t==="string"){return-1}else if(typeof t==="object"){if("start"in e&&"start"in t){const s=e.start;const n=t.start;if(s.line<n.line)return-1;if(s.line>n.line)return 1;if(s.column<n.column)return-1;if(s.column>n.column)return 1}if("name"in e&&"name"in t){if(e.name<t.name)return-1;if(e.name>t.name)return 1}if("index"in e&&"index"in t){if(e.index<t.index)return-1;if(e.index>t.index)return 1}return 0}else{return 0}}})},134:function(e){e.exports=require("schema-utils")},176:function(e,t,s){"use strict";const n=s(14);class ModuleNotFoundError extends n{constructor(e,t){super("Module not found: "+t);this.name="ModuleNotFoundError";this.details=t.details;this.missing=t.missing;this.module=e;this.error=t;Error.captureStackTrace(this,this.constructor)}}e.exports=ModuleNotFoundError},202:function(e){"use strict";class Semaphore{constructor(e){this.available=e;this.waiters=[];this._continue=this._continue.bind(this)}acquire(e){if(this.available>0){this.available--;e()}else{this.waiters.push(e)}}release(){this.available++;if(this.waiters.length>0){process.nextTick(this._continue)}}_continue(){if(this.available>0){if(this.waiters.length>0){this.available--;const e=this.waiters.pop();e()}}}}e.exports=Semaphore},211:function(e,t){"use strict";const s="LOADER_EXECUTION";const n="WEBPACK_OPTIONS";t.cutOffByFlag=((e,t)=>{e=e.split("\n");for(let s=0;s<e.length;s++){if(e[s].includes(t)){e.length=s}}return e.join("\n")});t.cutOffLoaderExecution=(e=>t.cutOffByFlag(e,s));t.cutOffWebpackOptions=(e=>t.cutOffByFlag(e,n));t.cutOffMultilineMessage=((e,t)=>{e=e.split("\n");t=t.split("\n");return e.reduce((e,s,n)=>s.includes(t[n])?e:e.concat(s),[]).join("\n")});t.cutOffMessage=((e,t)=>{const s=e.indexOf("\n");if(s===-1){return e===t?"":e}else{const n=e.substr(0,s);return n===t?e.substr(s+1):e}});t.cleanUp=((e,s)=>{e=t.cutOffLoaderExecution(e);e=t.cutOffMessage(e,s);return e});t.cleanUpWebpackOptions=((e,s)=>{e=t.cutOffWebpackOptions(e);e=t.cutOffMultilineMessage(e,s);return e})},240:function(e){e.exports=require("find-cache-dir")},241:function(e){e.exports=require("next/dist/compiled/source-map")},245:function(e,t,s){"use strict";const{ConcatSource:n,OriginalSource:r,PrefixSource:o,RawSource:i}=s(745);const{Tapable:a,SyncWaterfallHook:l,SyncHook:u,SyncBailHook:c}=s(47);const d=s(759);e.exports=class MainTemplate extends a{constructor(e){super();this.outputOptions=e||{};this.hooks={renderManifest:new l(["result","options"]),modules:new l(["modules","chunk","hash","moduleTemplate","dependencyTemplates"]),moduleObj:new l(["source","chunk","hash","moduleIdExpression"]),requireEnsure:new l(["source","chunk","hash","chunkIdExpression"]),bootstrap:new l(["source","chunk","hash","moduleTemplate","dependencyTemplates"]),localVars:new l(["source","chunk","hash"]),require:new l(["source","chunk","hash"]),requireExtensions:new l(["source","chunk","hash"]),beforeStartup:new l(["source","chunk","hash"]),startup:new l(["source","chunk","hash"]),afterStartup:new l(["source","chunk","hash"]),render:new l(["source","chunk","hash","moduleTemplate","dependencyTemplates"]),renderWithEntry:new l(["source","chunk","hash"]),moduleRequire:new l(["source","chunk","hash","moduleIdExpression"]),addModule:new l(["source","chunk","hash","moduleIdExpression","moduleExpression"]),currentHash:new l(["source","requestedLength"]),assetPath:new l(["path","options","assetInfo"]),hash:new u(["hash"]),hashForChunk:new u(["hash","chunk"]),globalHashPaths:new l(["paths"]),globalHash:new c(["chunk","paths"]),hotBootstrap:new l(["source","chunk","hash"])};this.hooks.startup.tap("MainTemplate",(e,t,s)=>{const n=[];if(t.entryModule){n.push("// Load entry module and return exports");n.push(`return ${this.renderRequireFunctionForModule(s,t,JSON.stringify(t.entryModule.id))}(${this.requireFn}.s = ${JSON.stringify(t.entryModule.id)});`)}return d.asString(n)});this.hooks.render.tap("MainTemplate",(e,t,s,r,a)=>{const l=new n;l.add("/******/ (function(modules) { // webpackBootstrap\n");l.add(new o("/******/",e));l.add("/******/ })\n");l.add("/************************************************************************/\n");l.add("/******/ (");l.add(this.hooks.modules.call(new i(""),t,s,r,a));l.add(")");return l});this.hooks.localVars.tap("MainTemplate",(e,t,s)=>{return d.asString([e,"// The module cache","var installedModules = {};"])});this.hooks.require.tap("MainTemplate",(t,s,n)=>{return d.asString([t,"// Check if module is in cache","if(installedModules[moduleId]) {",d.indent("return installedModules[moduleId].exports;"),"}","// Create a new module (and put it into the cache)","var module = installedModules[moduleId] = {",d.indent(this.hooks.moduleObj.call("",s,n,"moduleId")),"};","",d.asString(e.strictModuleExceptionHandling?["// Execute the module function","var threw = true;","try {",d.indent([`modules[moduleId].call(module.exports, module, module.exports, ${this.renderRequireFunctionForModule(n,s,"moduleId")});`,"threw = false;"]),"} finally {",d.indent(["if(threw) delete installedModules[moduleId];"]),"}"]:["// Execute the module function",`modules[moduleId].call(module.exports, module, module.exports, ${this.renderRequireFunctionForModule(n,s,"moduleId")});`]),"","// Flag the module as loaded","module.l = true;","","// Return the exports of the module","return module.exports;"])});this.hooks.moduleObj.tap("MainTemplate",(e,t,s,n)=>{return d.asString(["i: moduleId,","l: false,","exports: {}"])});this.hooks.requireExtensions.tap("MainTemplate",(e,t,s)=>{const n=[];const r=t.getChunkMaps();if(Object.keys(r.hash).length){n.push("// This file contains only the entry chunk.");n.push("// The chunk loading function for additional chunks");n.push(`${this.requireFn}.e = function requireEnsure(chunkId) {`);n.push(d.indent("var promises = [];"));n.push(d.indent(this.hooks.requireEnsure.call("",t,s,"chunkId")));n.push(d.indent("return Promise.all(promises);"));n.push("};")}else if(t.hasModuleInGraph(e=>e.blocks.some(e=>e.chunkGroup&&e.chunkGroup.chunks.length>0))){n.push("// The chunk loading function for additional chunks");n.push("// Since all referenced chunks are already included");n.push("// in this file, this function is empty here.");n.push(`${this.requireFn}.e = function requireEnsure() {`);n.push(d.indent("return Promise.resolve();"));n.push("};")}n.push("");n.push("// expose the modules object (__webpack_modules__)");n.push(`${this.requireFn}.m = modules;`);n.push("");n.push("// expose the module cache");n.push(`${this.requireFn}.c = installedModules;`);n.push("");n.push("// define getter function for harmony exports");n.push(`${this.requireFn}.d = function(exports, name, getter) {`);n.push(d.indent([`if(!${this.requireFn}.o(exports, name)) {`,d.indent(["Object.defineProperty(exports, name, { enumerable: true, get: getter });"]),"}"]));n.push("};");n.push("");n.push("// define __esModule on exports");n.push(`${this.requireFn}.r = function(exports) {`);n.push(d.indent(["if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {",d.indent(["Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });"]),"}","Object.defineProperty(exports, '__esModule', { value: true });"]));n.push("};");n.push("");n.push("// create a fake namespace object");n.push("// mode & 1: value is a module id, require it");n.push("// mode & 2: merge all properties of value into the ns");n.push("// mode & 4: return value when already ns object");n.push("// mode & 8|1: behave like require");n.push(`${this.requireFn}.t = function(value, mode) {`);n.push(d.indent([`if(mode & 1) value = ${this.requireFn}(value);`,`if(mode & 8) return value;`,"if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;","var ns = Object.create(null);",`${this.requireFn}.r(ns);`,"Object.defineProperty(ns, 'default', { enumerable: true, value: value });","if(mode & 2 && typeof value != 'string') for(var key in value) "+`${this.requireFn}.d(ns, key, function(key) { `+"return value[key]; "+"}.bind(null, key));","return ns;"]));n.push("};");n.push("");n.push("// getDefaultExport function for compatibility with non-harmony modules");n.push(this.requireFn+".n = function(module) {");n.push(d.indent(["var getter = module && module.__esModule ?",d.indent(["function getDefault() { return module['default']; } :","function getModuleExports() { return module; };"]),`${this.requireFn}.d(getter, 'a', getter);`,"return getter;"]));n.push("};");n.push("");n.push("// Object.prototype.hasOwnProperty.call");n.push(`${this.requireFn}.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };`);const o=this.getPublicPath({hash:s});n.push("");n.push("// __webpack_public_path__");n.push(`${this.requireFn}.p = ${JSON.stringify(o)};`);return d.asString(n)});this.requireFn="__webpack_require__"}getRenderManifest(e){const t=[];this.hooks.renderManifest.call(t,e);return t}renderBootstrap(e,t,s,n){const r=[];r.push(this.hooks.bootstrap.call("",t,e,s,n));r.push(this.hooks.localVars.call("",t,e));r.push("");r.push("// The require function");r.push(`function ${this.requireFn}(moduleId) {`);r.push(d.indent(this.hooks.require.call("",t,e)));r.push("}");r.push("");r.push(d.asString(this.hooks.requireExtensions.call("",t,e)));r.push("");r.push(d.asString(this.hooks.beforeStartup.call("",t,e)));const o=d.asString(this.hooks.afterStartup.call("",t,e));if(o){r.push("var startupResult = (function() {")}r.push(d.asString(this.hooks.startup.call("",t,e)));if(o){r.push("})();");r.push(o);r.push("return startupResult;")}return r}render(e,t,s,o){const i=this.renderBootstrap(e,t,s,o);let a=this.hooks.render.call(new r(d.prefix(i," \t")+"\n","webpack/bootstrap"),t,e,s,o);if(t.hasEntryModule()){a=this.hooks.renderWithEntry.call(a,t,e)}if(!a){throw new Error("Compiler error: MainTemplate plugin 'render' should return something")}t.rendered=true;return new n(a,";")}renderRequireFunctionForModule(e,t,s){return this.hooks.moduleRequire.call(this.requireFn,t,e,s)}renderAddModule(e,t,s,n){return this.hooks.addModule.call(`modules[${s}] = ${n};`,t,e,s,n)}renderCurrentHashCode(e,t){t=t||Infinity;return this.hooks.currentHash.call(JSON.stringify(e.substr(0,t)),t)}getPublicPath(e){return this.hooks.assetPath.call(this.outputOptions.publicPath||"",e)}getAssetPath(e,t){return this.hooks.assetPath.call(e,t)}getAssetPathWithInfo(e,t){const s={};const n=this.hooks.assetPath.call(e,t,s);return{path:n,info:s}}updateHash(e){e.update("maintemplate");e.update("3");this.hooks.hash.call(e)}updateHashForChunk(e,t,s,n){this.updateHash(e);this.hooks.hashForChunk.call(e,t);for(const r of this.renderBootstrap("0000",t,s,n)){e.update(r)}}useChunkHash(e){const t=this.hooks.globalHashPaths.call([]);return!this.hooks.globalHash.call(e,t)}}},253:function(e,t,s){"use strict";const n=s(14);class ModuleDependencyError extends n{constructor(e,t,s){super(t.message);this.name="ModuleDependencyError";this.details=t.stack.split("\n").slice(1).join("\n");this.module=e;this.loc=s;this.error=t;this.origin=e.issuer;Error.captureStackTrace(this,this.constructor)}}e.exports=ModuleDependencyError},268:function(e){"use strict";class HookCodeFactory{constructor(e){this.config=e;this.options=undefined;this._args=undefined}create(e){this.init(e);let t;switch(this.options.type){case"sync":t=new Function(this.args(),'"use strict";\n'+this.header()+this.content({onError:e=>`throw ${e};\n`,onResult:e=>`return ${e};\n`,resultReturns:true,onDone:()=>"",rethrowIfPossible:true}));break;case"async":t=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.content({onError:e=>`_callback(${e});\n`,onResult:e=>`_callback(null, ${e});\n`,onDone:()=>"_callback();\n"}));break;case"promise":let e=false;const s=this.content({onError:t=>{e=true;return`_error(${t});\n`},onResult:e=>`_resolve(${e});\n`,onDone:()=>"_resolve();\n"});let n="";n+='"use strict";\n';n+="return new Promise((_resolve, _reject) => {\n";if(e){n+="var _sync = true;\n";n+="function _error(_err) {\n";n+="if(_sync)\n";n+="_resolve(Promise.resolve().then(() => { throw _err; }));\n";n+="else\n";n+="_reject(_err);\n";n+="};\n"}n+=this.header();n+=s;if(e){n+="_sync = false;\n"}n+="});\n";t=new Function(this.args(),n);break}this.deinit();return t}setup(e,t){e._x=t.taps.map(e=>e.fn)}init(e){this.options=e;this._args=e.args.slice()}deinit(){this.options=undefined;this._args=undefined}header(){let e="";if(this.needContext()){e+="var _context = {};\n"}else{e+="var _context;\n"}e+="var _x = this._x;\n";if(this.options.interceptors.length>0){e+="var _taps = this.taps;\n";e+="var _interceptors = this.interceptors;\n"}for(let t=0;t<this.options.interceptors.length;t++){const s=this.options.interceptors[t];if(s.call){e+=`${this.getInterceptor(t)}.call(${this.args({before:s.context?"_context":undefined})});\n`}}return e}needContext(){for(const e of this.options.taps)if(e.context)return true;return false}callTap(e,{onError:t,onResult:s,onDone:n,rethrowIfPossible:r}){let o="";let i=false;for(let t=0;t<this.options.interceptors.length;t++){const s=this.options.interceptors[t];if(s.tap){if(!i){o+=`var _tap${e} = ${this.getTap(e)};\n`;i=true}o+=`${this.getInterceptor(t)}.tap(${s.context?"_context, ":""}_tap${e});\n`}}o+=`var _fn${e} = ${this.getTapFn(e)};\n`;const a=this.options.taps[e];switch(a.type){case"sync":if(!r){o+=`var _hasError${e} = false;\n`;o+="try {\n"}if(s){o+=`var _result${e} = _fn${e}(${this.args({before:a.context?"_context":undefined})});\n`}else{o+=`_fn${e}(${this.args({before:a.context?"_context":undefined})});\n`}if(!r){o+="} catch(_err) {\n";o+=`_hasError${e} = true;\n`;o+=t("_err");o+="}\n";o+=`if(!_hasError${e}) {\n`}if(s){o+=s(`_result${e}`)}if(n){o+=n()}if(!r){o+="}\n"}break;case"async":let i="";if(s)i+=`(_err${e}, _result${e}) => {\n`;else i+=`_err${e} => {\n`;i+=`if(_err${e}) {\n`;i+=t(`_err${e}`);i+="} else {\n";if(s){i+=s(`_result${e}`)}if(n){i+=n()}i+="}\n";i+="}";o+=`_fn${e}(${this.args({before:a.context?"_context":undefined,after:i})});\n`;break;case"promise":o+=`var _hasResult${e} = false;\n`;o+=`var _promise${e} = _fn${e}(${this.args({before:a.context?"_context":undefined})});\n`;o+=`if (!_promise${e} || !_promise${e}.then)\n`;o+=` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${e} + ')');\n`;o+=`_promise${e}.then(_result${e} => {\n`;o+=`_hasResult${e} = true;\n`;if(s){o+=s(`_result${e}`)}if(n){o+=n()}o+=`}, _err${e} => {\n`;o+=`if(_hasResult${e}) throw _err${e};\n`;o+=t(`_err${e}`);o+="});\n";break}return o}callTapsSeries({onError:e,onResult:t,resultReturns:s,onDone:n,doneReturns:r,rethrowIfPossible:o}){if(this.options.taps.length===0)return n();const i=this.options.taps.findIndex(e=>e.type!=="sync");const a=s||r||false;let l="";let u=n;for(let s=this.options.taps.length-1;s>=0;s--){const r=s;const c=u!==n&&this.options.taps[r].type!=="sync";if(c){l+=`function _next${r}() {\n`;l+=u();l+=`}\n`;u=(()=>`${a?"return ":""}_next${r}();\n`)}const d=u;const h=e=>{if(e)return"";return n()};const f=this.callTap(r,{onError:t=>e(r,t,d,h),onResult:t&&(e=>{return t(r,e,d,h)}),onDone:!t&&d,rethrowIfPossible:o&&(i<0||r<i)});u=(()=>f)}l+=u();return l}callTapsLooping({onError:e,onDone:t,rethrowIfPossible:s}){if(this.options.taps.length===0)return t();const n=this.options.taps.every(e=>e.type==="sync");let r="";if(!n){r+="var _looper = () => {\n";r+="var _loopAsync = false;\n"}r+="var _loop;\n";r+="do {\n";r+="_loop = false;\n";for(let e=0;e<this.options.interceptors.length;e++){const t=this.options.interceptors[e];if(t.loop){r+=`${this.getInterceptor(e)}.loop(${this.args({before:t.context?"_context":undefined})});\n`}}r+=this.callTapsSeries({onError:e,onResult:(e,t,s,r)=>{let o="";o+=`if(${t} !== undefined) {\n`;o+="_loop = true;\n";if(!n)o+="if(_loopAsync) _looper();\n";o+=r(true);o+=`} else {\n`;o+=s();o+=`}\n`;return o},onDone:t&&(()=>{let e="";e+="if(!_loop) {\n";e+=t();e+="}\n";return e}),rethrowIfPossible:s&&n});r+="} while(_loop);\n";if(!n){r+="_loopAsync = true;\n";r+="};\n";r+="_looper();\n"}return r}callTapsParallel({onError:e,onResult:t,onDone:s,rethrowIfPossible:n,onTap:r=((e,t)=>t())}){if(this.options.taps.length<=1){return this.callTapsSeries({onError:e,onResult:t,onDone:s,rethrowIfPossible:n})}let o="";o+="do {\n";o+=`var _counter = ${this.options.taps.length};\n`;if(s){o+="var _done = () => {\n";o+=s();o+="};\n"}for(let i=0;i<this.options.taps.length;i++){const a=()=>{if(s)return"if(--_counter === 0) _done();\n";else return"--_counter;"};const l=e=>{if(e||!s)return"_counter = 0;\n";else return"_counter = 0;\n_done();\n"};o+="if(_counter <= 0) break;\n";o+=r(i,()=>this.callTap(i,{onError:t=>{let s="";s+="if(_counter > 0) {\n";s+=e(i,t,a,l);s+="}\n";return s},onResult:t&&(e=>{let s="";s+="if(_counter > 0) {\n";s+=t(i,e,a,l);s+="}\n";return s}),onDone:!t&&(()=>{return a()}),rethrowIfPossible:n}),a,l)}o+="} while(false);\n";return o}args({before:e,after:t}={}){let s=this._args;if(e)s=[e].concat(s);if(t)s=s.concat(t);if(s.length===0){return""}else{return s.join(", ")}}getTapFn(e){return`_x[${e}]`}getTap(e){return`_taps[${e}]`}getInterceptor(e){return`_interceptors[${e}]`}}e.exports=HookCodeFactory},278:function(e){"use strict";class Hook{constructor(e){if(!Array.isArray(e))e=[];this._args=e;this.taps=[];this.interceptors=[];this.call=this._call;this.promise=this._promise;this.callAsync=this._callAsync;this._x=undefined}compile(e){throw new Error("Abstract: should be overriden")}_createCall(e){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:e})}tap(e,t){if(typeof e==="string")e={name:e};if(typeof e!=="object"||e===null)throw new Error("Invalid arguments to tap(options: Object, fn: function)");e=Object.assign({type:"sync",fn:t},e);if(typeof e.name!=="string"||e.name==="")throw new Error("Missing name for tap");e=this._runRegisterInterceptors(e);this._insert(e)}tapAsync(e,t){if(typeof e==="string")e={name:e};if(typeof e!=="object"||e===null)throw new Error("Invalid arguments to tapAsync(options: Object, fn: function)");e=Object.assign({type:"async",fn:t},e);if(typeof e.name!=="string"||e.name==="")throw new Error("Missing name for tapAsync");e=this._runRegisterInterceptors(e);this._insert(e)}tapPromise(e,t){if(typeof e==="string")e={name:e};if(typeof e!=="object"||e===null)throw new Error("Invalid arguments to tapPromise(options: Object, fn: function)");e=Object.assign({type:"promise",fn:t},e);if(typeof e.name!=="string"||e.name==="")throw new Error("Missing name for tapPromise");e=this._runRegisterInterceptors(e);this._insert(e)}_runRegisterInterceptors(e){for(const t of this.interceptors){if(t.register){const s=t.register(e);if(s!==undefined)e=s}}return e}withOptions(e){const t=t=>Object.assign({},e,typeof t==="string"?{name:t}:t);e=Object.assign({},e,this._withOptions);const s=this._withOptionsBase||this;const n=Object.create(s);n.tapAsync=((e,n)=>s.tapAsync(t(e),n)),n.tap=((e,n)=>s.tap(t(e),n));n.tapPromise=((e,n)=>s.tapPromise(t(e),n));n._withOptions=e;n._withOptionsBase=s;return n}isUsed(){return this.taps.length>0||this.interceptors.length>0}intercept(e){this._resetCompilation();this.interceptors.push(Object.assign({},e));if(e.register){for(let t=0;t<this.taps.length;t++)this.taps[t]=e.register(this.taps[t])}}_resetCompilation(){this.call=this._call;this.callAsync=this._callAsync;this.promise=this._promise}_insert(e){this._resetCompilation();let t;if(typeof e.before==="string")t=new Set([e.before]);else if(Array.isArray(e.before)){t=new Set(e.before)}let s=0;if(typeof e.stage==="number")s=e.stage;let n=this.taps.length;while(n>0){n--;const e=this.taps[n];this.taps[n+1]=e;const r=e.stage||0;if(t){if(t.has(e.name)){t.delete(e.name);continue}if(t.size>0){continue}}if(r>s){continue}n++;break}this.taps[n]=e}}function createCompileDelegate(e,t){return function lazyCompileHook(...s){this[e]=this._createCall(t);return this[e](...s)}}Object.defineProperties(Hook.prototype,{_call:{value:createCompileDelegate("call","sync"),configurable:true,writable:true},_promise:{value:createCompileDelegate("promise","promise"),configurable:true,writable:true},_callAsync:{value:createCompileDelegate("callAsync","async"),configurable:true,writable:true}});e.exports=Hook},284:function(e){"use strict";const t=e=>{if(e===null)return"";if(typeof e==="string")return e;if(typeof e==="number")return`${e}`;if(typeof e==="object"){if("line"in e&&"column"in e){return`${e.line}:${e.column}`}else if("line"in e){return`${e.line}:?`}else if("index"in e){return`+${e.index}`}else{return""}}return""};const s=e=>{if(e===null)return"";if(typeof e==="string")return e;if(typeof e==="number")return`${e}`;if(typeof e==="object"){if("start"in e&&e.start&&"end"in e&&e.end){if(typeof e.start==="object"&&typeof e.start.line==="number"&&typeof e.end==="object"&&typeof e.end.line==="number"&&typeof e.end.column==="number"&&e.start.line===e.end.line){return`${t(e.start)}-${e.end.column}`}else{return`${t(e.start)}-${t(e.end)}`}}if("start"in e&&e.start){return t(e.start)}if("name"in e&&"index"in e){return`${e.name}[${e.index}]`}if("name"in e){return e.name}return t(e)}return""};e.exports=s},305:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.default=void 0;var n=_interopRequireDefault(s(622));var r=_interopRequireDefault(s(87));var o=s(241);var i=s(745);var a=_interopRequireDefault(s(432));var l=s(78);var u=_interopRequireDefault(s(134));var c=_interopRequireDefault(s(946));var d=_interopRequireDefault(s(352));var h=_interopRequireDefault(s(499));var f=_interopRequireDefault(s(733));var p=_interopRequireDefault(s(825));var m=s(726);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}class TerserPlugin{constructor(e={}){(0,u.default)(p.default,e,{name:"Terser Plugin",baseDataPath:"options"});const{minify:t,terserOptions:s={},test:n=/\.m?js(\?.*)?$/i,extractComments:r=true,sourceMap:o,cache:i=true,cacheKeys:a=(e=>e),parallel:l=true,include:c,exclude:d}=e;this.options={test:n,extractComments:r,sourceMap:o,cache:i,cacheKeys:a,parallel:l,include:c,exclude:d,minify:t,terserOptions:s}}static isSourceMap(e){return Boolean(e&&e.version&&e.sources&&Array.isArray(e.sources)&&typeof e.mappings==="string")}static buildError(e,t,s,n){if(e.line){const r=s&&s.originalPositionFor({line:e.line,column:e.col});if(r&&r.source&&n){retur