@flatjs/evolve 1.2.85 → 1.2.89
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/index.js +2 -2
- package/index.d.ts +7 -2
- package/package.json +6 -6
- package/templates/html-plugin/index-dev.html +12 -0
- package/templates/html-plugin/index-inte.html +12 -0
- package/templates/html-plugin/index-inte2.html +80 -0
- package/templates/html-plugin/index-inte3.html +80 -0
- package/templates/html-plugin/index-inte4.html +80 -0
- package/templates/html-plugin/index-me.html +12 -0
- package/templates/html-plugin/index-prod.html +12 -0
- package/templates/html-plugin/index-rc.html +13 -0
- package/templates/html-plugin/index-uat.html +12 -0
- package/templates/module.html +12 -0
package/cjs/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*! @flatjs/forge MIT https://github.com/flatjs */
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("@flatjs/common");var t=require("lodash");var
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("@flatjs/common");var t=require("lodash");var r=require("@flatjs/mock");var n=require("babel-merge");var o=require("path");var s=require("@flatjs/forge-plugin-postcss-pixel");var a=require("cssnano");var i=require("webpack");var l=require("terser-webpack-plugin");var c=require("mini-css-extract-plugin");var u=require("case-sensitive-paths-webpack-plugin");var p=require("webpack-bundle-analyzer");var d=require("webpack-sources");var f=require("webpack/lib/util/extractUrlAndGlobal");var v=require("html-webpack-plugin");var h=require("os");var m=require("webpack-dev-server");var g=require("express");var b=require("https");var y=require("fs");var w=require("better-opn");function j(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var k=j(n);var C=j(a);var O=j(i);var x=j(l);var M=j(c);var S=j(u);var P=j(f);var A=j(v);var E=j(h);var R=j(m);var B=j(g);var $=j(b);var T=j(w);function q(e){let t;const r=process.env.NODE_ENV==="FLATJS_CORE";switch(e){case"@flatjs/evolve-preset-babel":t=require.resolve(r?"../../../evolve-preset-babel/src/index":e);break}return t}const _=(e,t=false)=>{if(!t){return require(e)}else{return r.loadModule(e)}};const F=({usePreset:t,...r}={usePreset:"react"},n=[])=>{const o=n.map((e=>[require.resolve("babel-plugin-import"),{transformToDefaultImport:false,libraryDirectory:"esm",style:()=>false,...e},e.libraryName]));const{reactBabelPreset:s,infernoBabelPreset:a,vueBabelPreset:i}=_(q("@flatjs/evolve-preset-babel"));const l=t==="react"?s():t==="vue"?i():a();let c={};try{c=k["default"](l,r);if(c.plugins){c.plugins.unshift(...o)}else{c.plugins=o}}catch(t){e.printError(t)}return Object.assign({babelrc:false},c)};const D=[`https://polyfill.io/v3/polyfill.min.js?features=Array.from%2CArray.isArray%2CArray.of%2CArray.prototype.entries%2CArray.prototype.every%2CArray.prototype.fill%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.flat%2CArray.prototype.forEach%2CArray.prototype.flatMap%2CArray.prototype.keys%2CArray.prototype.indexOf%2CArray.prototype.includes%2CArray.prototype.lastIndexOf%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.reduceRight%2CArray.prototype.some%2CArray.prototype.sort%2CArray.prototype.values%2CArrayBuffer%2CBlob%2CDataView%2CDate.now%2CObject.assign%2CObject.create%2CObject.defineProperties%2CObject.defineProperty%2CObject.entries%2CObject.freeze%2CObject.fromEntries%2CObject.getOwnPropertySymbols%2CObject.getOwnPropertyNames%2CObject.getOwnPropertyDescriptors%2CObject.getOwnPropertyDescriptor%2CObject.getPrototypeOf%2CObject.is%2CObject.isExtensible%2CObject.isFrozen%2CObject.isSealed%2CObject.keys%2CObject.values%2CObject.setPrototypeOf%2CPromise%2CPromise.prototype.finally%2CReflect%2CReflect.apply%2CReflect.construct%2CReflect.defineProperty%2CReflect.deleteProperty%2CReflect.getPrototypeOf%2CReflect.getOwnPropertyDescriptor%2CReflect.get%2CReflect.ownKeys%2CReflect.isExtensible%2CReflect.has%2CReflect.preventExtensions%2CReflect.set%2CReflect.setPrototypeOf%2CSet%2CString.prototype.trimStart%2CString.prototype.trimEnd%2CString.prototype.trim%2CString.prototype.startsWith%2CString.prototype.repeat%2CString.prototype.replaceAll%2CString.prototype.padStart%2CString.prototype.padEnd%2CMap%2CObject.seal%2Cconsole.groupEnd%2Cconsole.group`];const I={reactDev:[`https://unpkg.com/react@17.0.2/umd/react.development.js`,`https://unpkg.com/history@5.1.0/umd/history.development.js`,`https://unpkg.com/react-dom@17.0.2/umd/react-dom.development.js`,`https://unpkg.com/react-router@6.0.2/umd/react-router.development.js`,`https://unpkg.com/react-router-dom@6.0.2/umd/react-router-dom.development.js`],reactProd:[`https://unpkg.com/react@17.0.2/umd/react.production.min.js`,`https://unpkg.com/history@5.1.0/umd/history.production.min.js`,`https://unpkg.com/react-dom@17.0.2/umd/react-dom.production.min.js`,`https://unpkg.com/react-router@6.0.2/umd/react-router.production.min.js`,`https://unpkg.com/react-router-dom@6.0.2/umd/react-router-dom.production.min.js`]};const N={reactDev:[`https://cdn.jsdelivr.net/npm/react@17.0.2/umd/react.development.js`,`https://cdn.jsdelivr.net/npm/history@5.1.0/umd/history.development.js`,`https://cdn.jsdelivr.net/npm/react-dom@17.0.2/umd/react-dom.development.js`,`https://cdn.jsdelivr.net/npm/react-router@6.0.2/umd/react-router.development.js`,`https://cdn.jsdelivr.net/npm/react-router-dom@6.0.2/umd/react-router-dom.development.js`],reactProd:[`https://cdn.jsdelivr.net/npm/react@17.0.2/umd/react.production.min.js`,`https://cdn.jsdelivr.net/npm/history@5.1.0/umd/history.production.min.js`,`https://cdn.jsdelivr.net/npm/react-dom@17.0.2/umd/react-dom.production.min.js`,`https://cdn.jsdelivr.net/npm/react-router@6.0.2/umd/react-router.production.min.js`,`https://cdn.jsdelivr.net/npm/react-router-dom@6.0.2/umd/react-router-dom.production.min.js`]};const W={reactDev:[`//cdn.bootcss.com/react/17.0.2/umd/react.development.js`,`//cdn.bootcss.com/history/5.1.0/umd/history.development.js`,`//cdn.bootcss.com/react-dom/17.0.2/umd/react-dom.development.js`,`//cdn.bootcss.com/react-router/6.0.2/umd/react-router.development.js`,`//cdn.bootcss.com/react-router-dom/6.0.2/react-router-dom.development.js`],reactProd:[`//cdn.bootcss.com/react/17.0.2/umd/react.production.min.js`,`//cdn.bootcss.com/history/5.1.0/umd/history.production.min.js`,`//cdn.bootcss.com/react-dom/17.0.2/umd/react-dom.production.min.js`,`//cdn.bootcss.com/react-router/6.0.2/umd/react-router.production.min.js`,`//cdn.bootcss.com/react-router-dom/6.0.2/react-router-dom.production.min.js`]};const z={flatjsEvolve:{projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",forBuild:{rejectWarnings:false},forServe:{pageMiddlewares:[],defaultServeGlobalData:()=>({})},target:["web","es5"],liveReload:true,minimizeTerserOptions:{},multiHtmlCdn:{},watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},pluginLoaderOptions:{babelOptions:{usePreset:"react"},lessOptions:{},pixelOptions:{enabled:true,rootValue:{px:100,rpx:1},outputUnit:"rem"},enableBundleHashName:true,modularImports:[]}}};const L=(e={},t)=>{var r;const n=t[1];const o={vue:"Vue",react:"React","react-dom":"ReactDOM","react-router":"ReactRouter","react-router-dom":"ReactRouterDOM"};return Object.assign({},o,e,((r=n.options)==null?void 0:r.externals)||{})};const U=`(function(d){var j;var b=1;var i=1;var h=750;var c=100;function e(s,o){var q=d.document;var l=q.documentElement;var k=navigator.userAgent;var m=k.toLowerCase().indexOf("android")>-1;i=d.devicePixelRatio||1;if(i>3){i=3}if(m){i=1}console.log("current devicePixelRatio:",i);l.setAttribute("data-dpr",i.toString());var p=q.querySelector('meta[name="viewport"]');if(!p){b=1/i;p=q.createElement("meta");p.setAttribute("name","viewport");q.head.appendChild(p);p.setAttribute(["content","width=device-width,user-scalable=no,initial-scale=",b,",maximum-scale=",b,",minimum-scale=",b].join(""))}function n(){var t=document.documentElement.clientWidth;j=t/o*(s/i)*i;q.documentElement.style.fontSize=String(j)+"px"}var r;d.addEventListener("resize",function(){clearTimeout(r);r=setTimeout(n,300)},false);d.addEventListener("onload",n,false);n()}e(c,h);window.fabricViewport={currRem:j,currDpr:i,currScale:b,dpiPX2px:function f(k){return parseFloat(k.toString())/j*100+"px"},px2DPIpx:function a(k){return parseFloat(k.toString())/100*j+"px"},px2rem:function g(k){return parseFloat(k.toString())/100+"rem"}}})(window);`;const G={title:"",favicon:"",inlineScripts:()=>[],headBeforeStyles:()=>[],headBeforeScripts:e=>[...D,...e==="development"?W.reactDev:W.reactProd],bodyAfterScripts:()=>[],viewport:U,excludeCdnEnvs:["me","dev","ntv"],minify:true,template:o.join(e.getPackageDirSync(__dirname,""),"templates/html-plugin/index-{0}.html")};const H=(e,r,n)=>{let o;if(n){o=typeof n==="function"?n(r):n}if(t.isUndefined(o)){const t=G[e];return typeof t==="function"?t(r):t}return o};const V=(e,t)=>Object.assign({sourceMap:e,javascriptEnabled:true},t);const J=(e,t={})=>{const r=[C["default"]({preset:["default",{discardComments:{removeAll:!e},reduceInitial:false,normalizeWhitespace:!e}]})];if(t.enabled!==false){r.push(s.forgePluginPostcssPixel(t))}return{plugins:r}};const Y=(e,t={})=>{const r={hints:e?false:"warning"};return Object.assign(r,t)};const K=(e={})=>({parallel:true,
|
3
3
|
// Disable Extract all or some (use /^\**!|@preserve|@license|@cc_on/i RegExp) comments.
|
4
|
-
extractComments:false,terserOptions:t.merge({ecma:undefined,parse:{},compress:{},mangle:true,module:false,output:null,toplevel:false,nameCache:null,ie8:false,keep_classnames:undefined,keep_fnames:false,safari10:false},e)});const Z=(n=process.cwd(),r)=>{const o=e.loadFlatjsConfig(n,"flatjsEvolve","flatjs.evolve.js");return t.merge({},z.flatjsEvolve,o.flatjsEvolve,r,{projectCwd:n})};const ee=e=>{try{F["default"](e)}catch(e){console.warn(`Unable to open browser. If you are running in a headless environment\n`)}};function te(e="",t=""){return e.replace(/\/$/,"")+"/"+t.replace(/^\//,"")}function ne(e){const t=new RegExp("[?&]env(=([^&#]*)|&|#|$)");const n=t.exec(window.location.href);const r=n&&n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"prod";const o=e[r]||e["prod"]||[];const s=o[Math.floor(Math.random()*o.length)];return s.replace(/\/$/,"")+"/"}function re(e={},t="prod"){const n=e[t]||e["prod"]||[];return n[Math.floor(Math.random()*n.length)]}function oe(e){return`window.evolveFetchMicroWidgets = function () {\n var cdnConfig = ${JSON.stringify(e)};\n var cdnFinder = ${ne.toString()};\n return (cdnFinder(cdnConfig) || '').replace(/\\/$/, '');\n }`}function se(e,n){const r=[];for(const[t,n]of Object.entries(e)){r.push({[t]:n.entry})}return r.map((e=>t.merge({},n,{name:Object.keys(e)[0],entry:e})))}const ae=(e,n)=>{var r,o;const s=t.merge({},n.pluginLoaderOptions);if((r=e.options)!=null&&r.allowPx2rem){t.set(s,"pixelOptions.enabled",e.options.allowPx2rem)}if((o=e.options)!=null&&o.enableBundleHashName){t.set(s,"enableBundleHashName",e.options.enableBundleHashName)}const a={...n,pluginLoaderOptions:s};return a};const ie=(e,t)=>{var n,r,o;const s=(n=e.pluginLoaderOptions)==null?void 0:(r=n.pixelOptions)==null?void 0:r.enabled;const a=(o=t==null?void 0:t.allowPx2rem)!=null?o:s;return!!a};const le=e=>{if(Object.keys(e).length>1){throw new Error(`Only single one entry map support now while "serve", "build" process!`)}let t=undefined;for(const[n,r]of Object.entries(e)){t=[n,r];break}if(!t){throw new Error(`No entry map found while "serve", "build" process!`)}return t};const ce=()=>Date.now().toString();const ue=(e,t,n=true)=>{const r=e==="js"?".js":".css";if(t){return`bundle${r}`}if(n){return`bundle[contenthash]${r}`}return`bundle${r}?${ce()}`};const pe=/icons\//;const de=/\.(jpe?g|png|gif|svg)$/;const fe=/\.(ttf|eot|woff|woff2)(\?.+)?$/;const he=({projectCwd:e,projectVirtualPath:t},n,[r,s])=>{let a=o.dirname(o.join(t,n.replace(/^src/,"")));const i=s.entry.map((t=>o.dirname(o.join(e,t))));const l=o.resolve(e,n);const c=i.find((e=>l.startsWith(e)));if(c){a=o.dirname(o.join(r,o.relative(c,l)))}return`${a}/[name]-[contenthash:8][ext]`};const me=(e,t)=>{const n={test(e){return fe.test(e)||de.test(e)&&!pe.test(e)},type:"asset",generator:{filename({filename:n}){return he(e,n,t)}},parser:{dataUrlCondition:{maxSize:4*1024}}};return n};const ge=()=>{const e={test(e){return pe.test(e)&&e.endsWith(".svg")},use:[{loader:require.resolve("./loader-icon"),options:{svgo:{plugins:[{name:"removeTitle"},{name:"removeDimensions"}]}}}]};return e};const be=(e={},t=[])=>{const n={test:/\.(tsx|ts|js|jsx)$/,use:[{loader:"babel-loader",options:D(e,t)}]};return n};const ve=(e,t={})=>{const n={test:/\.css$/i,use:[{loader:P["default"].loader,options:{esModule:true}},{loader:"css-loader",options:{sourceMap:e}}]};if(Array.isArray(n.use)){n.use.push({loader:"postcss-loader",options:{postcssOptions:K(e,t),sourceMap:e}})}return n};const ye=(e,t={},n={})=>{const r=ve(e,n);r.test=/\.less$/i;if(Array.isArray(r.use)){r.use.push({loader:"less-loader",options:{sourceMap:e,lessOptions:Y(e,t)}})}return r};const we=(e,t,n,r={})=>{const o=[ge(),me(t,n),ve(e,r.pixelOptions),ye(e,r.lessOptions,r.pixelOptions),be(r.babelOptions,r.modularImports)];return o};class je{constructor(e={}){this.verbose=void 0;this.cleanStaleWebpackAssets=void 0;this.protectWebpackAssets=void 0;this.cleanAfterEveryBuildPatterns=void 0;this.cleanOnceBeforeBuildPatterns=void 0;this.currentAssets=void 0;this.initialClean=void 0;this.outputPath=void 0;this.verbose=e.verbose===true||false;this.cleanStaleWebpackAssets=e.cleanStaleWebpackAssets===true||e.cleanStaleWebpackAssets===false?e.cleanStaleWebpackAssets:true;this.protectWebpackAssets=e.protectWebpackAssets===true||e.protectWebpackAssets===false?e.protectWebpackAssets:true;this.cleanAfterEveryBuildPatterns=Array.isArray(e.cleanAfterEveryBuildPatterns)?e.cleanAfterEveryBuildPatterns:[];this.cleanOnceBeforeBuildPatterns=Array.isArray(e.cleanOnceBeforeBuildPatterns)?e.cleanOnceBeforeBuildPatterns:["**/*"];this.currentAssets=[];this.initialClean=false;this.outputPath="";this.apply=this.apply.bind(this);this.handleInitial=this.handleInitial.bind(this);this.handleDone=this.handleDone.bind(this);this.removeFiles=this.removeFiles.bind(this)}apply(e){if(!e.options.output||!e.options.output.path){console.warn("clean-webpack-plugin: options.output.path not defined. Plugin disabled...");return}this.outputPath=e.options.output.path;const t=e.hooks;if(this.cleanOnceBeforeBuildPatterns.length!==0){t.emit.tap("clean-webpack-plugin",(e=>{this.handleInitial(e)}))}t.done.tap("clean-webpack-plugin",(e=>{this.handleDone(e)}))}handleInitial(e){if(this.initialClean){return}const t=e.getStats();if(t.hasErrors()){return}this.initialClean=true;this.removeFiles(this.cleanOnceBeforeBuildPatterns)}handleDone(e){if(e.hasErrors()){if(this.verbose){console.warn("clean-webpack-plugin: pausing due to webpack errors")}return}const t=e.toJson({assets:true}).assets||[];const n=t.map((e=>e.name));const r=this.currentAssets.filter((e=>{const t=n.includes(e)===false;return t}));this.currentAssets=n.sort();const o=[];if(this.cleanStaleWebpackAssets===true&&r.length!==0){o.push(...r)}if(this.cleanAfterEveryBuildPatterns.length!==0){o.push(...this.cleanAfterEveryBuildPatterns)}if(o.length!==0){this.removeFiles(o)}}removeFiles(t){try{const n=e.delFilesSync(t,{cwd:this.outputPath,dot:true,ignore:this.protectWebpackAssets?this.currentAssets:[]});if(this.verbose){n.forEach((e=>{const t=o.relative(process.cwd(),e);const n="removed";console.warn(`clean-webpack-plugin: ${n} ${t}`)}))}}catch(e){const t=/Cannot delete files\/folders outside the current working directory\./.test(e.message);if(t){const e="clean-webpack-plugin: Cannot delete files/folders outside the current working directory. Can be overridden with the `dangerouslyAllowCleanPatternsOutsideProject` option.";throw new Error(e)}throw e}}}const ke=t=>new je({verbose:true,cleanOnceBeforeBuildPatterns:[`${o.join(e.ensureSlash(t[0],true),"**/*")}`]});const Ce=(e,t)=>new P["default"]({filename:`[name]/${ue("css",e,t==null?void 0:t.enableBundleHashName)}`,chunkFilename:"[id].[contenthash].css"});const Oe="ExternalTemplateRemotesPlugin";const xe=e=>e.constructor.name==="ExternalModule";class Me{apply(e){e.hooks.make.tap(Oe,(e=>{const t=[];e.hooks.buildModule.tap(Oe,(e=>{if(xe(e)&&e.externalType==="script"){t.push(e)}}));e.hooks.afterCodeGeneration.tap(Oe,(()=>{t.map((t=>{const n=A["default"](t.request)[0];const r=Pe(n);const o=e.codeGenerationResults.get(t,undefined).sources;const s=o.get("javascript");if(s){const e=new d.RawSource(s.source().toString().replace(`"${n}"`,r));o.set("javascript",e)}}))}))}))}}function Pe(e){const t=[];const n=[];let r=false;let o=false;for(const s of e){if(s==="["){if(r){o=true;break}r=true;if(n.length){t.push(`"${n.join("")}"`);n.length=0}}else if(s==="]"){if(!r){o=true;break}r=false;if(n.length){t.push(`${n.join("")}`);n.length=0}n.length=0}else{n.push(s)}}if(r||o){throw new Error(`Invalid template URL "${e}"`)}if(n.length){t.push(`"${n.join("")}"`)}return t.join(" + ")}const Se=`HtmlInjectScriptPlugin`;class Ae{constructor(e){this.scripts=void 0;this.scripts=e||[]}processScripts(){return this.scripts.filter(Boolean).map((e=>({tagName:"script",innerHTML:e,voidTag:false,attributes:{},meta:{plugin:"html-inject-script-webpack-plugin"}})))}apply(e){e.hooks.compilation.tap(`${Se}_compilation`,(e=>{const t=E["default"].getHooks(e);t.alterAssetTags.tap(`${Se}_alterAssetTags`,(e=>{e.assetTags.scripts.unshift(...this.processScripts());return e}))}))}}const Ee=(e="")=>e.replace(/[\/-]/gi,"_").toLowerCase();const Be=e=>o.join(e,`micro-remote-module.js`);const Re=(t,[n,r],o)=>{var s;const a=(s=r.options)==null?void 0:s.moduleFederation;const l=[];if(a){const{remotes:r,...s}=a;const c=Be(n);const u=Ee(n);const p=(r||[]).map((({name:t,endpoint:n})=>{const r=Ee(t);const o=Be(t);const s=n?e.ensureSlash(n(t),false):`[window.evolveFetchMicroWidgets()]`;return{[r]:`${r}@${s}/${o}`}}));l.push(new i.container.ModuleFederationPlugin({name:u,filename:c,remotes:p,...s}),new Me);if(!t){l.unshift(new Ae([oe(o)]))}}return l};const $e={minifyJS:true,removeComments:true,collapseWhitespace:true,collapseBooleanAttributes:false};const Te=(e,t,[n,r],o)=>{const s=[];const{options:a}=r;const i=e?"development":"production";for(const e of o){s.push(new E["default"]({inject:"body",title:V("title",i,a==null?void 0:a.title),chunks:[n],minify:(a==null?void 0:a.minify)===false?false:["me","dev"].includes(e)?false:$e,filename:`${n}/index${e==="prod"?"":`-${e}`}.html`,template:V("template",i,a==null?void 0:a.template).replace(`{0}`,e),templateParameters:{title:V("title",i,a==null?void 0:a.title),favicon:V("favicon",i,a==null?void 0:a.favicon),headBeforeStyles:V("headBeforeStyles",i,a==null?void 0:a.headBeforeStyles),headBeforeScripts:V("headBeforeScripts",i,a==null?void 0:a.headBeforeScripts),bodyAfterScripts:V("bodyAfterScripts",i,a==null?void 0:a.bodyAfterScripts),viewport:ie(t,a)?V("viewport",i,a==null?void 0:a.viewport):""},multiCdn:{env:e,disabled:((a==null?void 0:a.excludeCdnEnvs)||["me","dev","ntv"]).includes(e)}}))}return s};class qe{constructor(e){var t;this.config=e;this.pluginName="FlatEvolveMultiCdnPlugin";this.requireFn=i.RuntimeGlobals.publicPath;if(!((t=this.config)!=null&&t.prod)){throw new Error("We must setup `prod` for each CDN config node!")}}apply(e){e.hooks.thisCompilation.tap(this.pluginName,(e=>{e.mainTemplate.hooks.requireExtensions.tap(this.pluginName,((t,n)=>{var r;const o=[];o.push("// Dynamic assets path override(`@flatjs/evolve`) plugin-multi-html-cdn`)");const s=(r=e.chunkGraph)==null?void 0:r.getTreeRuntimeRequirements(n);if(s&&s.has(i.RuntimeGlobals.requireScope)){o.push("(function () {");o.push(i.Template.indent(`var flatjsMultiCdn = {`));o.push(i.Template.indent(i.Template.indent([`cdnConfig: ${JSON.stringify(this.config||{})},`])));o.push(i.Template.indent(i.Template.indent([`cdnFinder: ${ne.toString()}`])));o.push(i.Template.indent(`};`));o.push(i.Template.indent(`${this.requireFn} = flatjsMultiCdn.cdnFinder(flatjsMultiCdn.cdnConfig) || ${this.requireFn};`));o.push("})();")}return i.Template.asString(o)}))}));e.hooks.compilation.tap(this.pluginName,(e=>{E["default"].getHooks(e).beforeAssetTagGeneration.tap(this.pluginName,(e=>{const{assets:t}=e;const{userOptions:n}=e.plugin;const r=n.multiCdn;const s=t.publicPath;const a=t.js.map((e=>{if(r.disabled){return o.basename(e)}const t=re(this.config,r.env);return te(t,e.replace(s,""))}));const i=t.css.map((e=>{if(r.disabled){return o.basename(e)}const t=re(this.config,r.env);return te(t,e.replace(s,""))}));e.assets.js=a;e.assets.css=i;return e}))}))}}const Fe=(e,t,n)=>{const r=[new S["default"]];if(n.analyzer){r.push(new p.BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...n.analyzer}))}r.push(Ce(e,n.pluginLoaderOptions));r.push(...Re(e,t,n.multiHtmlCdn));if(!e){r.push(ke(t));const o=Object.keys(n.multiHtmlCdn);r.push(...Te(e,n,t,o));r.push(new qe(n.multiHtmlCdn))}return r};const Ie=(t,n,r,s)=>{n=e.ensureSlash(n,true);const a=t==="development";const i=s.projectCwd;const l=s.pluginLoaderOptions;const c=s.watchOptions;const u=le(r);const p=[...we(a,s,u,l),...s.extraLoaders||[]];const d=[...Fe(a,u,s),...s.extraPlugins||[]];const f={mode:t,target:s.target,stats:{preset:"minimal"},infrastructureLogging:{level:"warn"},devtool:a?"eval-source-map":false,plugins:d,watchOptions:c,context:i,cache:{type:"memory"},resolve:{mainFields:["browser","module","main"],extensions:[".ts",".tsx",".js",".json",".vue"],alias:s.resolveAlias||{}},module:{rules:p},externals:H(s.externals,u),performance:X(a,s.performance),output:{devtoolModuleFilenameTemplate:({namespace:e,resourcePath:t})=>`webpack:///${o.join(e,t)}`,environment:{},pathinfo:false,path:o.join(i,"public"),publicPath:n,filename:`[name]/${ue("js",a,l==null?void 0:l.enableBundleHashName)}`,chunkFilename:`[id].[contenthash].js`},optimization:{nodeEnv:a?"development":"production",chunkIds:a?"named":"named",moduleIds:a?"named":"named",minimize:s.minimize===false?false:a?false:true,minimizer:[new M["default"](Q(s.minimizeTerserOptions))],splitChunks:{name:false,chunks:"all",minSize:25e5,cacheGroups:{default:false,defaultVendors:false}}}};return f};const _e=(e,t,n)=>{const r=Ie("production",t,e,n);const o=se(e,r);if(o.length>1){throw new Error("startSingleEntryBuild() only support `compiler` at a time")}const s=o[0];return new Promise(((e,t)=>{x["default"](s,((r,o)=>{var a,i;if(r){return t(r)}const l=o==null?void 0:o.toJson();if(l!=null&&(a=l.errors)!=null&&a.length){return t(l.errors)}if(n.forBuild.rejectWarnings&&l!=null&&(i=l.warnings)!=null&&i.length){return t(l.warnings)}e({name:s.name,warningStats:l==null?void 0:l.warnings})}))}))};const De=async(t,n)=>{var r;await e.keepPackageDepsUpToDateForNonMonoRepo({cwd:process.cwd(),autoUpgrade:true,needVerifyPackages:n.needVerifyPackages||{}});const o=((r=n.multiHtmlCdn)==null?void 0:r.prod)||[];const s=[];const a=e.ensureSlash(o[Math.floor(Math.random()*o.length)],true);for(const[e,r]of Object.entries(t)){const t=ae(r,n);const o={[e]:r};s.push(_e(o,a,t))}return Promise.all(s)};var Ne={exports:{}};var We={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Le=We;const Ue={};for(const e of Object.keys(Le)){Ue[Le[e]]=e}const ze={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var He=ze;for(const e of Object.keys(ze)){if(!("channels"in ze[e])){throw new Error("missing channels property: "+e)}if(!("labels"in ze[e])){throw new Error("missing channel labels property: "+e)}if(ze[e].labels.length!==ze[e].channels){throw new Error("channel and label counts mismatch: "+e)}const{channels:t,labels:n}=ze[e];delete ze[e].channels;delete ze[e].labels;Object.defineProperty(ze[e],"channels",{value:t});Object.defineProperty(ze[e],"labels",{value:n})}ze.rgb.hsl=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const o=Math.min(t,n,r);const s=Math.max(t,n,r);const a=s-o;let i;let l;if(s===o){i=0}else if(t===s){i=(n-r)/a}else if(n===s){i=2+(r-t)/a}else if(r===s){i=4+(t-n)/a}i=Math.min(i*60,360);if(i<0){i+=360}const c=(o+s)/2;if(s===o){l=0}else if(c<=.5){l=a/(s+o)}else{l=a/(2-s-o)}return[i,l*100,c*100]};ze.rgb.hsv=function(e){let t;let n;let r;let o;let s;const a=e[0]/255;const i=e[1]/255;const l=e[2]/255;const c=Math.max(a,i,l);const u=c-Math.min(a,i,l);const p=function(e){return(c-e)/6/u+1/2};if(u===0){o=0;s=0}else{s=u/c;t=p(a);n=p(i);r=p(l);if(a===c){o=r-n}else if(i===c){o=1/3+t-r}else if(l===c){o=2/3+n-t}if(o<0){o+=1}else if(o>1){o-=1}}return[o*360,s*100,c*100]};ze.rgb.hwb=function(e){const t=e[0];const n=e[1];let r=e[2];const o=ze.rgb.hsl(e)[0];const s=1/255*Math.min(t,Math.min(n,r));r=1-1/255*Math.max(t,Math.max(n,r));return[o,s*100,r*100]};ze.rgb.cmyk=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const o=Math.min(1-t,1-n,1-r);const s=(1-t-o)/(1-o)||0;const a=(1-n-o)/(1-o)||0;const i=(1-r-o)/(1-o)||0;return[s*100,a*100,i*100,o*100]};function Ge(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ze.rgb.keyword=function(e){const t=Ue[e];if(t){return t}let n=Infinity;let r;for(const t of Object.keys(Le)){const o=Le[t];const s=Ge(e,o);if(s<n){n=s;r=t}}return r};ze.keyword.rgb=function(e){return Le[e]};ze.rgb.xyz=function(e){let t=e[0]/255;let n=e[1]/255;let r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805;const s=t*.2126+n*.7152+r*.0722;const a=t*.0193+n*.1192+r*.9505;return[o*100,s*100,a*100]};ze.rgb.lab=function(e){const t=ze.rgb.xyz(e);let n=t[0];let r=t[1];let o=t[2];n/=95.047;r/=100;o/=108.883;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;o=o>.008856?o**(1/3):7.787*o+16/116;const s=116*r-16;const a=500*(n-r);const i=200*(r-o);return[s,a,i]};ze.hsl.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;let o;let s;let a;if(n===0){a=r*255;return[a,a,a]}if(r<.5){o=r*(1+n)}else{o=r+n-r*n}const i=2*r-o;const l=[0,0,0];for(let e=0;e<3;e++){s=t+1/3*-(e-1);if(s<0){s++}if(s>1){s--}if(6*s<1){a=i+(o-i)*6*s}else if(2*s<1){a=o}else if(3*s<2){a=i+(o-i)*(2/3-s)*6}else{a=i}l[e]=a*255}return l};ze.hsl.hsv=function(e){const t=e[0];let n=e[1]/100;let r=e[2]/100;let o=n;const s=Math.max(r,.01);r*=2;n*=r<=1?r:2-r;o*=s<=1?s:2-s;const a=(r+n)/2;const i=r===0?2*o/(s+o):2*n/(r+n);return[t,i*100,a*100]};ze.hsv.rgb=function(e){const t=e[0]/60;const n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6;const s=t-Math.floor(t);const a=255*r*(1-n);const i=255*r*(1-n*s);const l=255*r*(1-n*(1-s));r*=255;switch(o){case 0:return[r,l,a];case 1:return[i,r,a];case 2:return[a,r,l];case 3:return[a,i,r];case 4:return[l,a,r];case 5:return[r,a,i]}};ze.hsv.hsl=function(e){const t=e[0];const n=e[1]/100;const r=e[2]/100;const o=Math.max(r,.01);let s;let a;a=(2-n)*r;const i=(2-n)*o;s=n*o;s/=i<=1?i:2-i;s=s||0;a/=2;return[t,s*100,a*100]};ze.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100;let r=e[2]/100;const o=n+r;let s;if(o>1){n/=o;r/=o}const a=Math.floor(6*t);const i=1-r;s=6*t-a;if((a&1)!==0){s=1-s}const l=n+s*(i-n);let c;let u;let p;switch(a){default:case 6:case 0:c=i;u=l;p=n;break;case 1:c=l;u=i;p=n;break;case 2:c=n;u=i;p=l;break;case 3:c=n;u=l;p=i;break;case 4:c=l;u=n;p=i;break;case 5:c=i;u=n;p=l;break}return[c*255,u*255,p*255]};ze.cmyk.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;const o=e[3]/100;const s=1-Math.min(1,t*(1-o)+o);const a=1-Math.min(1,n*(1-o)+o);const i=1-Math.min(1,r*(1-o)+o);return[s*255,a*255,i*255]};ze.xyz.rgb=function(e){const t=e[0]/100;const n=e[1]/100;const r=e[2]/100;let o;let s;let a;o=t*3.2406+n*-1.5372+r*-.4986;s=t*-.9689+n*1.8758+r*.0415;a=t*.0557+n*-.204+r*1.057;o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92;s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92;a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92;o=Math.min(Math.max(0,o),1);s=Math.min(Math.max(0,s),1);a=Math.min(Math.max(0,a),1);return[o*255,s*255,a*255]};ze.xyz.lab=function(e){let t=e[0];let n=e[1];let r=e[2];t/=95.047;n/=100;r/=108.883;t=t>.008856?t**(1/3):7.787*t+16/116;n=n>.008856?n**(1/3):7.787*n+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16;const s=500*(t-n);const a=200*(n-r);return[o,s,a]};ze.lab.xyz=function(e){const t=e[0];const n=e[1];const r=e[2];let o;let s;let a;s=(t+16)/116;o=n/500+s;a=s-r/200;const i=s**3;const l=o**3;const c=a**3;s=i>.008856?i:(s-16/116)/7.787;o=l>.008856?l:(o-16/116)/7.787;a=c>.008856?c:(a-16/116)/7.787;o*=95.047;s*=100;a*=108.883;return[o,s,a]};ze.lab.lch=function(e){const t=e[0];const n=e[1];const r=e[2];let o;const s=Math.atan2(r,n);o=s*360/2/Math.PI;if(o<0){o+=360}const a=Math.sqrt(n*n+r*r);return[t,a,o]};ze.lch.lab=function(e){const t=e[0];const n=e[1];const r=e[2];const o=r/360*2*Math.PI;const s=n*Math.cos(o);const a=n*Math.sin(o);return[t,s,a]};ze.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let s=t===null?ze.rgb.hsv(e)[2]:t;s=Math.round(s/50);if(s===0){return 30}let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));if(s===2){a+=60}return a};ze.hsv.ansi16=function(e){return ze.rgb.ansi16(ze.hsv.rgb(e),e[2])};ze.rgb.ansi256=function(e){const t=e[0];const n=e[1];const r=e[2];if(t===n&&n===r){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}const o=16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5);return o};ze.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}const n=(~~(e>50)+1)*.5;const r=(t&1)*n*255;const o=(t>>1&1)*n*255;const s=(t>>2&1)*n*255;return[r,o,s]};ze.ansi256.rgb=function(e){if(e>=232){const t=(e-232)*10+8;return[t,t,t]}e-=16;let t;const n=Math.floor(e/36)/5*255;const r=Math.floor((t=e%36)/6)/5*255;const o=t%6/5*255;return[n,r,o]};ze.rgb.hex=function(e){const t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);const n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};ze.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}let n=t[0];if(t[0].length===3){n=n.split("").map((e=>e+e)).join("")}const r=parseInt(n,16);const o=r>>16&255;const s=r>>8&255;const a=r&255;return[o,s,a]};ze.rgb.hcg=function(e){const t=e[0]/255;const n=e[1]/255;const r=e[2]/255;const o=Math.max(Math.max(t,n),r);const s=Math.min(Math.min(t,n),r);const a=o-s;let i;let l;if(a<1){i=s/(1-a)}else{i=0}if(a<=0){l=0}else if(o===t){l=(n-r)/a%6}else if(o===n){l=2+(r-t)/a}else{l=4+(t-n)/a}l/=6;l%=1;return[l*360,a*100,i*100]};ze.hsl.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=n<.5?2*t*n:2*t*(1-n);let o=0;if(r<1){o=(n-.5*r)/(1-r)}return[e[0],r*100,o*100]};ze.hsv.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=t*n;let o=0;if(r<1){o=(n-r)/(1-r)}return[e[0],r*100,o*100]};ze.hcg.rgb=function(e){const t=e[0]/360;const n=e[1]/100;const r=e[2]/100;if(n===0){return[r*255,r*255,r*255]}const o=[0,0,0];const s=t%1*6;const a=s%1;const i=1-a;let l=0;switch(Math.floor(s)){case 0:o[0]=1;o[1]=a;o[2]=0;break;case 1:o[0]=i;o[1]=1;o[2]=0;break;case 2:o[0]=0;o[1]=1;o[2]=a;break;case 3:o[0]=0;o[1]=i;o[2]=1;break;case 4:o[0]=a;o[1]=0;o[2]=1;break;default:o[0]=1;o[1]=0;o[2]=i}l=(1-n)*r;return[(n*o[0]+l)*255,(n*o[1]+l)*255,(n*o[2]+l)*255]};ze.hcg.hsv=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);let o=0;if(r>0){o=t/r}return[e[0],o*100,r*100]};ze.hcg.hsl=function(e){const t=e[1]/100;const n=e[2]/100;const r=n*(1-t)+.5*t;let o=0;if(r>0&&r<.5){o=t/(2*r)}else if(r>=.5&&r<1){o=t/(2*(1-r))}return[e[0],o*100,r*100]};ze.hcg.hwb=function(e){const t=e[1]/100;const n=e[2]/100;const r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};ze.hwb.hcg=function(e){const t=e[1]/100;const n=e[2]/100;const r=1-n;const o=r-t;let s=0;if(o<1){s=(r-o)/(1-o)}return[e[0],o*100,s*100]};ze.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ze.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ze.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};ze.gray.hsl=function(e){return[0,0,e[0]]};ze.gray.hsv=ze.gray.hsl;ze.gray.hwb=function(e){return[0,100,e[0]]};ze.gray.cmyk=function(e){return[0,0,0,e[0]]};ze.gray.lab=function(e){return[e[0],0,0]};ze.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255;const n=(t<<16)+(t<<8)+t;const r=n.toString(16).toUpperCase();return"000000".substring(r.length)+r};ze.rgb.gray=function(e){const t=(e[0]+e[1]+e[2])/3;return[t/255*100]};const Je=He;function Ve(){const e={};const t=Object.keys(Je);for(let n=t.length,r=0;r<n;r++){e[t[r]]={distance:-1,parent:null}}return e}function Ye(e){const t=Ve();const n=[e];t[e].distance=0;while(n.length){const e=n.pop();const r=Object.keys(Je[e]);for(let o=r.length,s=0;s<o;s++){const o=r[s];const a=t[o];if(a.distance===-1){a.distance=t[e].distance+1;a.parent=e;n.unshift(o)}}}return t}function Ke(e,t){return function(n){return t(e(n))}}function Xe(e,t){const n=[t[e].parent,e];let r=Je[t[e].parent][e];let o=t[e].parent;while(t[o].parent){n.unshift(t[o].parent);r=Ke(Je[t[o].parent][o],r);o=t[o].parent}r.conversion=n;return r}var Qe=function(e){const t=Ye(e);const n={};const r=Object.keys(t);for(let e=r.length,o=0;o<e;o++){const e=r[o];const s=t[e];if(s.parent===null){continue}n[e]=Xe(e,t)}return n};const Ze=He;const et=Qe;const tt={};const nt=Object.keys(Ze);function rt(e){const t=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}return e(t)};if("conversion"in e){t.conversion=e.conversion}return t}function ot(e){const t=function(...t){const n=t[0];if(n===undefined||n===null){return n}if(n.length>1){t=n}const r=e(t);if(typeof r==="object"){for(let e=r.length,t=0;t<e;t++){r[t]=Math.round(r[t])}}return r};if("conversion"in e){t.conversion=e.conversion}return t}nt.forEach((e=>{tt[e]={};Object.defineProperty(tt[e],"channels",{value:Ze[e].channels});Object.defineProperty(tt[e],"labels",{value:Ze[e].labels});const t=et(e);const n=Object.keys(t);n.forEach((n=>{const r=t[n];tt[e][n]=ot(r);tt[e][n].raw=rt(r)}))}));var st=tt;(function(e){const t=(e,t)=>(...n)=>{const r=e(...n);return`[${r+t}m`};const n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`};const r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`};const o=e=>e;const s=(e,t,n)=>[e,t,n];const a=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true});return r},enumerable:true,configurable:true})};let i;const l=(e,t,n,r)=>{if(i===undefined){i=st}const o=r?10:0;const s={};for(const[r,a]of Object.entries(i)){const i=r==="ansi16"?"ansi":r;if(r===t){s[i]=e(n,o)}else if(typeof a==="object"){s[i]=e(a[t],o)}}return s};function c(){const e=new Map;const i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright;i.bgColor.bgGray=i.bgColor.bgBlackBright;i.color.grey=i.color.blackBright;i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(const[t,n]of Object.entries(i)){for(const[t,r]of Object.entries(n)){i[t]={open:`[${r[0]}m`,close:`[${r[1]}m`};n[t]=i[t];e.set(r[0],r[1])}Object.defineProperty(i,t,{value:n,enumerable:false})}Object.defineProperty(i,"codes",{value:e,enumerable:false});i.color.close="[39m";i.bgColor.close="[49m";a(i.color,"ansi",(()=>l(t,"ansi16",o,false)));a(i.color,"ansi256",(()=>l(n,"ansi256",o,false)));a(i.color,"ansi16m",(()=>l(r,"rgb",s,false)));a(i.bgColor,"ansi",(()=>l(t,"ansi16",o,true)));a(i.bgColor,"ansi256",(()=>l(n,"ansi256",o,true)));a(i.bgColor,"ansi16m",(()=>l(r,"rgb",s,true)));return i}Object.defineProperty(e,"exports",{enumerable:true,get:c})})(Ne);var at=(e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const r=t.indexOf(n+e);const o=t.indexOf("--");return r!==-1&&(o===-1||r<o)};const it=B["default"];const lt=R["default"];const ct=at;const{env:ut}=process;let pt;if(ct("no-color")||ct("no-colors")||ct("color=false")||ct("color=never")){pt=0}else if(ct("color")||ct("colors")||ct("color=true")||ct("color=always")){pt=1}if("FORCE_COLOR"in ut){if(ut.FORCE_COLOR==="true"){pt=1}else if(ut.FORCE_COLOR==="false"){pt=0}else{pt=ut.FORCE_COLOR.length===0?1:Math.min(parseInt(ut.FORCE_COLOR,10),3)}}function dt(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function ft(e,t){if(pt===0){return 0}if(ct("color=16m")||ct("color=full")||ct("color=truecolor")){return 3}if(ct("color=256")){return 2}if(e&&!t&&pt===undefined){return 0}const n=pt||0;if(ut.TERM==="dumb"){return n}if(process.platform==="win32"){const e=it.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in ut){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in ut))||ut.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in ut){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ut.TEAMCITY_VERSION)?1:0}if(ut.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in ut){const e=parseInt((ut.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ut.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ut.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ut.TERM)){return 1}if("COLORTERM"in ut){return 1}return n}function ht(e){const t=ft(e,e&&e.isTTY);return dt(t)}var mt={supportsColor:ht,stdout:dt(ft(true,lt.isatty(1))),stderr:dt(ft(true,lt.isatty(2)))};const gt=(e,t,n)=>{let r=e.indexOf(t);if(r===-1){return e}const o=t.length;let s=0;let a="";do{a+=e.substr(s,r-s)+t+n;s=r+o;r=e.indexOf(t,s)}while(r!==-1);a+=e.substr(s);return a};const bt=(e,t,n,r)=>{let o=0;let s="";do{const a=e[r-1]==="\r";s+=e.substr(o,(a?r-1:r)-o)+t+(a?"\r\n":"\n")+n;o=r+1;r=e.indexOf("\n",o)}while(r!==-1);s+=e.substr(o);return s};var vt={stringReplaceAll:gt,stringEncaseCRLFWithFirstIndex:bt};const yt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const wt=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const jt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const kt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const Ct=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function Ot(e){const t=e[0]==="u";const n=e[1]==="{";if(t&&!n&&e.length===5||e[0]==="x"&&e.length===3){return String.fromCharCode(parseInt(e.slice(1),16))}if(t&&n){return String.fromCodePoint(parseInt(e.slice(2,-1),16))}return Ct.get(e)||e}function xt(e,t){const n=[];const r=t.trim().split(/\s*,\s*/g);let o;for(const t of r){const r=Number(t);if(!Number.isNaN(r)){n.push(r)}else if(o=t.match(jt)){n.push(o[2].replace(kt,((e,t,n)=>t?Ot(t):n)))}else{throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}}return n}function Mt(e){wt.lastIndex=0;const t=[];let n;while((n=wt.exec(e))!==null){const e=n[1];if(n[2]){const r=xt(e,n[2]);t.push([e].concat(r))}else{t.push([e])}}return t}function Pt(e,t){const n={};for(const e of t){for(const t of e.styles){n[t[0]]=e.inverse?null:t.slice(1)}}let r=e;for(const[e,t]of Object.entries(n)){if(!Array.isArray(t)){continue}if(!(e in r)){throw new Error(`Unknown Chalk style: ${e}`)}r=t.length>0?r[e](...t):r[e]}return r}var St=(e,t)=>{const n=[];const r=[];let o=[];t.replace(yt,((t,s,a,i,l,c)=>{if(s){o.push(Ot(s))}else if(i){const t=o.join("");o=[];r.push(n.length===0?t:Pt(e,n)(t));n.push({inverse:a,styles:Mt(i)})}else if(l){if(n.length===0){throw new Error("Found extraneous } in Chalk template literal")}r.push(Pt(e,n)(o.join("")));o=[];n.pop()}else{o.push(c)}}));r.push(o.join(""));if(n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${n.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return r.join("")};const At=Ne.exports;const{stdout:Et,stderr:Bt}=mt;const{stringReplaceAll:Rt,stringEncaseCRLFWithFirstIndex:$t}=vt;const{isArray:Tt}=Array;const qt=["ansi","ansi","ansi256","ansi16m"];const Ft=Object.create(null);const It=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const n=Et?Et.level:0;e.level=t.level===undefined?n:t.level};class _t{constructor(e){return Dt(e)}}const Dt=e=>{const t={};It(t,e);t.template=(...e)=>Jt(t.template,...e);Object.setPrototypeOf(t,Nt.prototype);Object.setPrototypeOf(t.template,t);t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};t.template.Instance=_t;return t.template};function Nt(e){return Dt(e)}for(const[e,t]of Object.entries(At)){Ft[e]={get(){const n=zt(this,Ut(t.open,t.close,this._styler),this._isEmpty);Object.defineProperty(this,e,{value:n});return n}}}Ft.visible={get(){const e=zt(this,this._styler,true);Object.defineProperty(this,"visible",{value:e});return e}};const Wt=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of Wt){Ft[e]={get(){const{level:t}=this;return function(...n){const r=Ut(At.color[qt[t]][e](...n),At.color.close,this._styler);return zt(this,r,this._isEmpty)}}}}for(const e of Wt){const t="bg"+e[0].toUpperCase()+e.slice(1);Ft[t]={get(){const{level:t}=this;return function(...n){const r=Ut(At.bgColor[qt[t]][e](...n),At.bgColor.close,this._styler);return zt(this,r,this._isEmpty)}}}}const Lt=Object.defineProperties((()=>{}),{...Ft,level:{enumerable:true,get(){return this._generator.level},set(e){this._generator.level=e}}});const Ut=(e,t,n)=>{let r;let o;if(n===undefined){r=e;o=t}else{r=n.openAll+e;o=t+n.closeAll}return{open:e,close:t,openAll:r,closeAll:o,parent:n}};const zt=(e,t,n)=>{const r=(...e)=>{if(Tt(e[0])&&Tt(e[0].raw)){return Ht(r,Jt(r,...e))}return Ht(r,e.length===1?""+e[0]:e.join(" "))};Object.setPrototypeOf(r,Lt);r._generator=e;r._styler=t;r._isEmpty=n;return r};const Ht=(e,t)=>{if(e.level<=0||!t){return e._isEmpty?"":t}let n=e._styler;if(n===undefined){return t}const{openAll:r,closeAll:o}=n;if(t.indexOf("")!==-1){while(n!==undefined){t=Rt(t,n.close,n.open);n=n.parent}}const s=t.indexOf("\n");if(s!==-1){t=$t(t,o,r,s)}return r+t+o};let Gt;const Jt=(e,...t)=>{const[n]=t;if(!Tt(n)||!Tt(n.raw)){return t.join(" ")}const r=t.slice(1);const o=[n.raw[0]];for(let e=1;e<n.length;e++){o.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]))}if(Gt===undefined){Gt=St}return Gt(e,o.join(""))};Object.defineProperties(Nt.prototype,Ft);const Vt=Nt();Vt.supportsColor=Et;Vt.stderr=Nt({level:Bt?Bt.level:0});Vt.stderr.supportsColor=Bt;var Yt=Vt;const Kt=async(n,r,s)=>{const a=await e.getPackageDir(__dirname,process.cwd());const i=w.readFileSync(o.join(a,"./templates/main.html"),"utf-8");const l=[];for(const[t]of Object.entries(s.entryMap)){const o=Object.keys(n).includes(t);l.push({name:t,link:e.urlJoin(r,["pages",t],{env:"me"}),flagText:o?"serve":"static",isServed:o?1:0})}const c={title:"@flatjs/evolve",modules:l.sort(((e,t)=>t.isServed-e.isServed))};return t.template(i)(c)};const Xt=async(n,r,s,a,i)=>{const l=i.entryMap;const c=Object.keys(l).sort(((e,t)=>t.length-e.length));const u=await e.getPackageDir(__dirname,process.cwd());const p=c.find((t=>e.ensureSlash(s.path.replace(/^\//,""),true).startsWith(e.ensureSlash(t,true))));if(!p){const e=w.readFileSync(o.join(u,`./templates/module-404.html`),"utf-8");return t.template(e)({title:"404 Not Found",errorMeta:[{name:`@flatjs/evolve workspace`,value:u},{name:`served entry names`,value:JSON.stringify(c)},{name:`module path`,value:`${s.path}`}]})}const d=l[p];const f=d.options;const h=n[p];const m=(h==null?void 0:h.devServerHostUri)||a;const g=(f==null?void 0:f.serveModuleTemplate)||"./templates/module.html";const b=o.join(i.projectCwd,"./templates/module.html");const v=w.readFileSync(o.isAbsolute(g)?g:e.existsSync(b)?b:o.join(u,"./templates/module.html"),"utf-8");const y=i.forServe;const j=y.defaultServeGlobalData?y.defaultServeGlobalData(d,a):{};const k={title:V("title",r,f==null?void 0:f.title),favicon:V("favicon",r,f==null?void 0:f.favicon),viewport:ie(i,f)?V("viewport",r,f==null?void 0:f.viewport):"",headBeforeStyles:V("headBeforeStyles",r,f==null?void 0:f.headBeforeStyles),headBeforeScripts:V("headBeforeScripts",r,f==null?void 0:f.headBeforeScripts),bodyAfterScripts:V("bodyAfterScripts",r,f==null?void 0:f.bodyAfterScripts),moduleFederationScripts:oe({me:[e.urlJoin(a,["public"])]}),global:{hostUrl:a,apiBase:e.urlJoin(a,["api"]),routeBaseName:o.join(`/pages`,p),...j,...(f==null?void 0:f.serveGlobalData)||{}},styles:[e.urlJoin(m,[o.join("public",p,"bundle.css")])],scripts:[e.urlJoin(m,[o.join("public",p,"bundle.js")])]};return t.template(v)(k)};const Qt=(e,t,n,r)=>{const o=async(o,s)=>{let a;if(o.path==="/"){a=await Kt(n,t,r)}else{a=await Xt(n,e,o,t,r)}s.send(a)};return(r.forServe.pageMiddlewares||[]).concat(o)};const Zt=t=>async(n,r)=>{const s=n.baseUrl;if(!s.startsWith("/public")){r.redirect("/pages")}else{const n=await e.fileWalk(o.join("public/","**/*.{js,css}"),{cwd:t});const a=o.extname(s);const i=n.find((e=>o.extname(e)===a&&e.indexOf(s.replace(/\.(js|css)$/,""))!==-1));if(i){r.sendFile(i)}else{r.sendFile(o.join(t,s))}}};const en=(e,t="development",r,o,s,a,i)=>{const l=T["default"]();n.attachMockMiddlewares(l,i);l.set("hostUri",o);l.use("/pages",...Qt(t,o,s,a));l.use("*",Zt(e));return new Promise((e=>{const t=a.https?q["default"].createServer(a.https,l):l;t.listen(r,(()=>{e(true)}))}))};const tn=(e,t,n)=>{const{projectCwd:r,https:s,liveReload:a}=n;const i=new $["default"]({https:s,open:false,compress:true,port:t,hot:!a,liveReload:a,allowedHosts:"all",static:{directory:`${o.join(r,"/public")}`},headers:{"Access-Control-Allow-Origin":"*"},client:{progress:true,overlay:{errors:true,warnings:false}}},e);return new Promise(((e,t)=>{i.startCallback((n=>{if(n){return t(n)}e(true)}))}))};const nn=async(r,s,a,l)=>{await e.keepPackageDepsUpToDateForNonMonoRepo({cwd:process.cwd(),autoUpgrade:true,needVerifyPackages:a.needVerifyPackages||{}});if(a.https){l.https=a.https}const{mockPort:c,hostUri:u}=await n.prepareMockDomain(l);const p=e.urlJoin(u,["/pages"]);let d=c;const f=[];const h={};for(const[e]of Object.entries(s)){d=d+1;const{mockPort:r,hostUri:o}=await n.prepareMockDomain(t.merge({},l,{port:d}));h[e]={devServerPort:r,devServerHostUri:o}}for(const[t,n]of Object.entries(s)){var m,g;const s=((m=n.options)==null?void 0:(g=m.moduleFederation)==null?void 0:g.remotes)||[];s.forEach((t=>{t.endpoint=t=>{var n;return e.urlJoin(((n=h[t])==null?void 0:n.devServerHostUri)||u,["/public"])}}));const{devServerPort:l,devServerHostUri:c}=h[t];const d=e.urlJoin(c,["public"]);const b={[t]:n};const v=ae(n,a);const y=Ie("development",d,b,v);const w=i.webpack(se(b,y)[0]);f.push(tn(w,l,a));const j=Yt.bgBlack(`[${Yt.magenta("@flatjs")}:${Yt.bold(w.name||"")}]`);w.hooks.invalid.tap("fileChange",(e=>{console.log(j,`${"file change".padEnd(12," ")} ➩ ${Yt.cyan(o.relative(r,e||""))}`)}));w.hooks.done.tap("compileDone",(()=>{console.log(j,`${"serve page".padEnd(12," ")} ➩ ${Yt.cyan(p)}`)}))}await en(r,"development",c,u,h,a,l);ee(p);return Promise.all(f).then((()=>true)).catch((e=>{console.log("evolve serve err: ",e);return false}))};const rn=async(t,r,o)=>{if(r.https){o.https=r.https}const{mockPort:s,hostUri:a}=await n.prepareMockDomain(o);const i=e.urlJoin(a,["/pages"]);return en(t,"development",s,a,{},r,o).then((e=>{const t=Yt.bgBlack(`[${Yt.magenta("@flatjs")}:`);console.log(t,`${"serve page".padEnd(12," ")} ➩ ${Yt.cyan(i)}`);return e}))};const on=(e={},n={})=>{const r={};for(const[o,s]of Object.entries(n)){const n={options:{}};if(e[o]){r[o]=t.merge({},n,s,e[o])}t.merge(s,n)}return r};const sn=(e,t,n={})=>{const r=Z(e,n);const o=on(t,r.entryMap);return De(o,r)};const an=(e,t,r={},o={})=>{const s=Z(e,r);const a=n.loadMockConfiguration(e,o);const i=on(t,s.entryMap);return nn(e,i,s,a)};const ln=(e,t={},r={})=>{const o=Z(e,t);const s=n.loadMockConfiguration(e,r);return rn(e,o,s)};exports.cdnBoot=U;exports.cdnJsDelivr=L;exports.cdnUnpkg=W;exports.createPageMiddleware=Qt;exports.createPublicAssetsMiddleware=Zt;exports.defaultFlatjsConfig=z;exports.evolveBuild=sn;exports.evolveServe=an;exports.evolveStatic=ln;exports.flatBabelOptions=D;exports.flatExternalOptions=H;exports.flatLessLoaderOptions=Y;exports.flatPerformanceOptions=X;exports.flatPostcssLoaderOptions=K;exports.getHtmlPluginConfig=V;exports.loadEvolveConfiguration=Z;exports.loadModule=_;exports.normalizeEntries=on;exports.polyfill=N;exports.terserOptions=Q;exports.viewportScripts=G;
|
4
|
+
extractComments:false,terserOptions:t.merge({ecma:undefined,parse:{},compress:{},mangle:true,module:false,output:null,toplevel:false,nameCache:null,ie8:false,keep_classnames:undefined,keep_fnames:false,safari10:false},e)});const X=(r=process.cwd(),n)=>{const o=e.loadFlatjsConfig(r,"flatjsEvolve","flatjs.evolve.js");return t.merge({},z.flatjsEvolve,o.flatjsEvolve,n,{projectCwd:r})};const Q=e=>{try{T["default"](e)}catch(e){console.warn(`Unable to open browser. If you are running in a headless environment\n`)}};function Z(e="",t=""){return e.replace(/\/$/,"")+"/"+t.replace(/^\//,"")}function ee(e){const t=new RegExp("[?&]env(=([^&#]*)|&|#|$)");const r=t.exec(window.location.href);const n=r&&r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"prod";const o=e[n]||e["prod"]||[];const s=o[Math.floor(Math.random()*o.length)];return s.replace(/\/$/,"")+"/"}function te(e={},t="prod"){const r=e[t]||e["prod"]||[];return r[Math.floor(Math.random()*r.length)]}function re(e){return`window.evolveFetchMicroWidgets = function () {\n var cdnConfig = ${JSON.stringify(e)};\n var cdnFinder = ${ee.toString()};\n return (cdnFinder(cdnConfig) || '').replace(/\\/$/, '');\n }`}function ne(e,r){const n=[];for(const[t,r]of Object.entries(e)){n.push({[t]:r.entry})}return n.map((e=>t.merge({},r,{name:Object.keys(e)[0],entry:e})))}const oe=(e,r)=>{var n,o;const s=t.merge({},r.pluginLoaderOptions);if((n=e.options)!=null&&n.allowPx2rem){t.set(s,"pixelOptions.enabled",e.options.allowPx2rem)}if((o=e.options)!=null&&o.enableBundleHashName){t.set(s,"enableBundleHashName",e.options.enableBundleHashName)}const a={...r,pluginLoaderOptions:s};return a};const se=(e,t)=>{var r,n,o;const s=(r=e.pluginLoaderOptions)==null?void 0:(n=r.pixelOptions)==null?void 0:n.enabled;const a=(o=t==null?void 0:t.allowPx2rem)!=null?o:s;return!!a};const ae=e=>{if(Object.keys(e).length>1){throw new Error(`Only single one entry map support now while "serve", "build" process!`)}let t=undefined;for(const[r,n]of Object.entries(e)){t=[r,n];break}if(!t){throw new Error(`No entry map found while "serve", "build" process!`)}return t};const ie=()=>Date.now().toString();const le=(e,t,r=true)=>{const n=e==="js"?".js":".css";if(t){return`bundle${n}`}if(r){return`bundle[contenthash]${n}`}return`bundle${n}?${ie()}`};const ce=/icons\//;const ue=/\.(jpe?g|png|gif|svg)$/;const pe=/\.(ttf|eot|woff|woff2)(\?.+)?$/;const de=({projectCwd:e,projectVirtualPath:t},r,[n,s])=>{let a=o.dirname(o.join(t,r.replace(/^src/,"")));const i=s.entry.map((t=>o.dirname(o.join(e,t))));const l=o.resolve(e,r);const c=i.find((e=>l.startsWith(e)));if(c){a=o.dirname(o.join(n,o.relative(c,l)))}return`${a}/[name]-[contenthash:8][ext]`};const fe=(e,t)=>{const r={test(e){return pe.test(e)||ue.test(e)&&!ce.test(e)},type:"asset",generator:{filename({filename:r}){return de(e,r,t)}},parser:{dataUrlCondition:{maxSize:4*1024}}};return r};const ve=()=>{const e={test(e){return ce.test(e)&&e.endsWith(".svg")},use:[{loader:require.resolve("./loader-icon"),options:{svgo:{plugins:[{name:"removeTitle"},{name:"removeDimensions"}]}}}]};return e};const he=(e={},t=[])=>{const r={test:/\.(tsx|ts|js|jsx)$/,use:[{loader:"babel-loader",options:F(e,t)}]};return r};const me=(e,t={})=>{const r={test:/\.css$/i,use:[{loader:M["default"].loader,options:{esModule:true}},{loader:"css-loader",options:{sourceMap:e}}]};if(Array.isArray(r.use)){r.use.push({loader:"postcss-loader",options:{postcssOptions:J(e,t),sourceMap:e}})}return r};const ge=(e,t={},r={})=>{const n=me(e,r);n.test=/\.less$/i;if(Array.isArray(n.use)){n.use.push({loader:"less-loader",options:{sourceMap:e,lessOptions:V(e,t)}})}return n};const be=(e,t,r,n={})=>{const o=[ve(),fe(t,r),me(e,n.pixelOptions),ge(e,n.lessOptions,n.pixelOptions),he(n.babelOptions,n.modularImports)];return o};class ye{constructor(e={}){this.verbose=void 0;this.cleanStaleWebpackAssets=void 0;this.protectWebpackAssets=void 0;this.cleanAfterEveryBuildPatterns=void 0;this.cleanOnceBeforeBuildPatterns=void 0;this.currentAssets=void 0;this.initialClean=void 0;this.outputPath=void 0;this.verbose=e.verbose===true||false;this.cleanStaleWebpackAssets=e.cleanStaleWebpackAssets===true||e.cleanStaleWebpackAssets===false?e.cleanStaleWebpackAssets:true;this.protectWebpackAssets=e.protectWebpackAssets===true||e.protectWebpackAssets===false?e.protectWebpackAssets:true;this.cleanAfterEveryBuildPatterns=Array.isArray(e.cleanAfterEveryBuildPatterns)?e.cleanAfterEveryBuildPatterns:[];this.cleanOnceBeforeBuildPatterns=Array.isArray(e.cleanOnceBeforeBuildPatterns)?e.cleanOnceBeforeBuildPatterns:["**/*"];this.currentAssets=[];this.initialClean=false;this.outputPath="";this.apply=this.apply.bind(this);this.handleInitial=this.handleInitial.bind(this);this.handleDone=this.handleDone.bind(this);this.removeFiles=this.removeFiles.bind(this)}apply(e){if(!e.options.output||!e.options.output.path){console.warn("clean-webpack-plugin: options.output.path not defined. Plugin disabled...");return}this.outputPath=e.options.output.path;const t=e.hooks;if(this.cleanOnceBeforeBuildPatterns.length!==0){t.emit.tap("clean-webpack-plugin",(e=>{this.handleInitial(e)}))}t.done.tap("clean-webpack-plugin",(e=>{this.handleDone(e)}))}handleInitial(e){if(this.initialClean){return}const t=e.getStats();if(t.hasErrors()){return}this.initialClean=true;this.removeFiles(this.cleanOnceBeforeBuildPatterns)}handleDone(e){if(e.hasErrors()){if(this.verbose){console.warn("clean-webpack-plugin: pausing due to webpack errors")}return}const t=e.toJson({assets:true}).assets||[];const r=t.map((e=>e.name));const n=this.currentAssets.filter((e=>{const t=r.includes(e)===false;return t}));this.currentAssets=r.sort();const o=[];if(this.cleanStaleWebpackAssets===true&&n.length!==0){o.push(...n)}if(this.cleanAfterEveryBuildPatterns.length!==0){o.push(...this.cleanAfterEveryBuildPatterns)}if(o.length!==0){this.removeFiles(o)}}removeFiles(t){try{const r=e.delFilesSync(t,{cwd:this.outputPath,dot:true,ignore:this.protectWebpackAssets?this.currentAssets:[]});if(this.verbose){r.forEach((e=>{const t=o.relative(process.cwd(),e);const r="removed";console.warn(`clean-webpack-plugin: ${r} ${t}`)}))}}catch(e){const t=/Cannot delete files\/folders outside the current working directory\./.test(e.message);if(t){const e="clean-webpack-plugin: Cannot delete files/folders outside the current working directory. Can be overridden with the `dangerouslyAllowCleanPatternsOutsideProject` option.";throw new Error(e)}throw e}}}const we=t=>new ye({verbose:true,cleanOnceBeforeBuildPatterns:[`${o.join(e.ensureSlash(t[0],true),"**/*")}`]});const je=(e,t)=>new M["default"]({filename:`[name]/${le("css",e,t==null?void 0:t.enableBundleHashName)}`,chunkFilename:"[id].[contenthash].css"});const ke="ExternalTemplateRemotesPlugin";const Ce=e=>e.constructor.name==="ExternalModule";class Oe{apply(e){e.hooks.make.tap(ke,(e=>{const t=[];e.hooks.buildModule.tap(ke,(e=>{if(Ce(e)&&e.externalType==="script"){t.push(e)}}));e.hooks.afterCodeGeneration.tap(ke,(()=>{t.map((t=>{const r=P["default"](t.request)[0];const n=xe(r);const o=e.codeGenerationResults.get(t,undefined).sources;const s=o.get("javascript");if(s){const e=new d.RawSource(s.source().toString().replace(`"${r}"`,n));o.set("javascript",e)}}))}))}))}}function xe(e){const t=[];const r=[];let n=false;let o=false;for(const s of e){if(s==="["){if(n){o=true;break}n=true;if(r.length){t.push(`"${r.join("")}"`);r.length=0}}else if(s==="]"){if(!n){o=true;break}n=false;if(r.length){t.push(`${r.join("")}`);r.length=0}r.length=0}else{r.push(s)}}if(n||o){throw new Error(`Invalid template URL "${e}"`)}if(r.length){t.push(`"${r.join("")}"`)}return t.join(" + ")}const Me=`HtmlInjectScriptPlugin`;class Se{constructor(e){this.scripts=void 0;this.scripts=e||[]}processScripts(){return this.scripts.filter(Boolean).map((e=>({tagName:"script",innerHTML:e,voidTag:false,attributes:{},meta:{plugin:"html-inject-script-webpack-plugin"}})))}apply(e){e.hooks.compilation.tap(`${Me}_compilation`,(e=>{const t=A["default"].getHooks(e);t.alterAssetTags.tap(`${Me}_alterAssetTags`,(e=>{e.assetTags.scripts.unshift(...this.processScripts());return e}))}))}}const Pe=(e="")=>e.replace(/[\/-]/gi,"_").toLowerCase();const Ae=e=>o.join(e,`micro-remote-module.js`);const Ee=(t,[r,n],o)=>{var s;const a=(s=n.options)==null?void 0:s.moduleFederation;const l=[];if(a){const{remotes:n,...s}=a;const c=Ae(r);const u=Pe(r);const p=(n||[]).map((({name:t,endpoint:r})=>{const n=Pe(t);const o=Ae(t);const s=r?e.ensureSlash(r(t),false):`[window.evolveFetchMicroWidgets()]`;return{[n]:`${n}@${s}/${o}`}}));l.push(new i.container.ModuleFederationPlugin({name:u,filename:c,remotes:p,...s}),new Oe);if(!t){l.unshift(new Se([re(o)]))}}return l};const Re={minifyJS:true,removeComments:true,collapseWhitespace:true,collapseBooleanAttributes:false};const Be=(e,t,[r,n],o)=>{const s=[];const{options:a}=n;const i=e?"development":"production";for(const e of o){s.push(new A["default"]({inject:"body",title:H("title",i,a==null?void 0:a.title),chunks:[r],minify:(a==null?void 0:a.minify)===false?false:["me","dev"].includes(e)?false:Re,filename:`${r}/index${e==="prod"?"":`-${e}`}.html`,template:H("template",i,a==null?void 0:a.template).replace(`{0}`,e),templateParameters:{title:H("title",i,a==null?void 0:a.title),favicon:H("favicon",i,a==null?void 0:a.favicon),inlineScripts:H("inlineScripts",i,a==null?void 0:a.inlineScripts),headBeforeStyles:H("headBeforeStyles",i,a==null?void 0:a.headBeforeStyles),headBeforeScripts:H("headBeforeScripts",i,a==null?void 0:a.headBeforeScripts),bodyAfterScripts:H("bodyAfterScripts",i,a==null?void 0:a.bodyAfterScripts),viewport:se(t,a)?H("viewport",i,a==null?void 0:a.viewport):""},multiCdn:{env:e,disabled:((a==null?void 0:a.excludeCdnEnvs)||["me","dev","ntv"]).includes(e)}}))}return s};class $e{constructor(e){var t;this.config=e;this.pluginName="FlatEvolveMultiCdnPlugin";this.requireFn=i.RuntimeGlobals.publicPath;if(!((t=this.config)!=null&&t.prod)){throw new Error("We must setup `prod` for each CDN config node!")}}apply(e){e.hooks.thisCompilation.tap(this.pluginName,(e=>{e.mainTemplate.hooks.requireExtensions.tap(this.pluginName,((t,r)=>{var n;const o=[];o.push("// Dynamic assets path override(`@flatjs/evolve`) plugin-multi-html-cdn`)");const s=(n=e.chunkGraph)==null?void 0:n.getTreeRuntimeRequirements(r);if(s&&s.has(i.RuntimeGlobals.requireScope)){o.push("(function () {");o.push(i.Template.indent(`var flatjsMultiCdn = {`));o.push(i.Template.indent(i.Template.indent([`cdnConfig: ${JSON.stringify(this.config||{})},`])));o.push(i.Template.indent(i.Template.indent([`cdnFinder: ${ee.toString()}`])));o.push(i.Template.indent(`};`));o.push(i.Template.indent(`${this.requireFn} = flatjsMultiCdn.cdnFinder(flatjsMultiCdn.cdnConfig) || ${this.requireFn};`));o.push("})();")}return i.Template.asString(o)}))}));e.hooks.compilation.tap(this.pluginName,(e=>{A["default"].getHooks(e).beforeAssetTagGeneration.tap(this.pluginName,(e=>{const{assets:t}=e;const{userOptions:r}=e.plugin;const n=r.multiCdn;const s=t.publicPath;const a=t.js.map((e=>{if(n.disabled){return o.basename(e)}const t=te(this.config,n.env);return Z(t,e.replace(s,""))}));const i=t.css.map((e=>{if(n.disabled){return o.basename(e)}const t=te(this.config,n.env);return Z(t,e.replace(s,""))}));e.assets.js=a;e.assets.css=i;return e}))}))}}const Te=(e,t,r)=>{const n=[new S["default"]];if(r.analyzer){n.push(new p.BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...r.analyzer}))}n.push(je(e,r.pluginLoaderOptions));n.push(...Ee(e,t,r.multiHtmlCdn));if(!e){n.push(we(t));const o=Object.keys(r.multiHtmlCdn);n.push(...Be(e,r,t,o));n.push(new $e(r.multiHtmlCdn))}return n};const qe=(t,r,n,s)=>{process.env.NODE_ENV=t;r=e.ensureSlash(r,true);const a=t==="development";const i=s.projectCwd;const l=s.pluginLoaderOptions;const c=s.watchOptions;const u=ae(n);const p=[...be(a,s,u,l),...s.extraLoaders||[]];const d=[...Te(a,u,s),...s.extraPlugins||[]];const f={mode:t,target:s.target,stats:{preset:"minimal"},infrastructureLogging:{level:"warn"},devtool:a?"eval-source-map":false,plugins:d,watchOptions:c,context:i,cache:{type:"memory"},resolve:{mainFields:["browser","module","main"],extensions:[".ts",".tsx",".js",".json",".vue"],alias:s.resolveAlias||{}},module:{rules:p},externals:L(s.externals,u),performance:Y(a,s.performance),output:{devtoolModuleFilenameTemplate:({namespace:e,resourcePath:t})=>`webpack:///${o.join(e,t)}`,environment:{},pathinfo:false,path:o.join(i,"public"),publicPath:r,filename:`[name]/${le("js",a,l==null?void 0:l.enableBundleHashName)}`,chunkFilename:`[id].[contenthash].js`},optimization:{nodeEnv:a?"development":"production",chunkIds:a?"named":"named",moduleIds:a?"named":"named",minimize:s.minimize===false?false:a?false:true,minimizer:[new x["default"](K(s.minimizeTerserOptions))],splitChunks:{name:false,chunks:"all",minSize:25e5,cacheGroups:{default:false,defaultVendors:false}}}};return f};const _e=(e,t,r)=>{const n=qe("production",t,e,r);const o=ne(e,n);if(o.length>1){throw new Error("startSingleEntryBuild() only support `compiler` at a time")}const s=o[0];return new Promise(((e,t)=>{O["default"](s,((n,o)=>{var a,i;if(n){return t(n)}const l=o==null?void 0:o.toJson();if(l!=null&&(a=l.errors)!=null&&a.length){return t(l.errors)}if(r.forBuild.rejectWarnings&&l!=null&&(i=l.warnings)!=null&&i.length){return t(l.warnings)}e({name:s.name,warningStats:l==null?void 0:l.warnings})}))}))};const Fe=async(t,r)=>{var n;await e.keepPackageDepsUpToDateForNonMonoRepo({cwd:process.cwd(),autoUpgrade:true,needVerifyPackages:r.needVerifyPackages||{}});const o=((n=r.multiHtmlCdn)==null?void 0:n.prod)||[];const s=[];const a=e.ensureSlash(o[Math.floor(Math.random()*o.length)],true);for(const[e,n]of Object.entries(t)){const t=oe(n,r);const o={[e]:n};s.push(_e(o,a,t))}return Promise.all(s)};var De={exports:{}};var Ie=/[|\\{}()[\]^$+*?.]/g;var Ne=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(Ie,"\\$&")};var We={exports:{}};var ze={exports:{}};var Le={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Ue=Le;var Ge={};for(var He in Ue){if(Ue.hasOwnProperty(He)){Ge[Ue[He]]=He}}var Ve=ze.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var Je in Ve){if(Ve.hasOwnProperty(Je)){if(!("channels"in Ve[Je])){throw new Error("missing channels property: "+Je)}if(!("labels"in Ve[Je])){throw new Error("missing channel labels property: "+Je)}if(Ve[Je].labels.length!==Ve[Je].channels){throw new Error("channel and label counts mismatch: "+Je)}var Ye=Ve[Je].channels;var Ke=Ve[Je].labels;delete Ve[Je].channels;delete Ve[Je].labels;Object.defineProperty(Ve[Je],"channels",{value:Ye});Object.defineProperty(Ve[Je],"labels",{value:Ke})}}Ve.rgb.hsl=function(e){var t=e[0]/255;var r=e[1]/255;var n=e[2]/255;var o=Math.min(t,r,n);var s=Math.max(t,r,n);var a=s-o;var i;var l;var c;if(s===o){i=0}else if(t===s){i=(r-n)/a}else if(r===s){i=2+(n-t)/a}else if(n===s){i=4+(t-r)/a}i=Math.min(i*60,360);if(i<0){i+=360}c=(o+s)/2;if(s===o){l=0}else if(c<=.5){l=a/(s+o)}else{l=a/(2-s-o)}return[i,l*100,c*100]};Ve.rgb.hsv=function(e){var t;var r;var n;var o;var s;var a=e[0]/255;var i=e[1]/255;var l=e[2]/255;var c=Math.max(a,i,l);var u=c-Math.min(a,i,l);var p=function(e){return(c-e)/6/u+1/2};if(u===0){o=s=0}else{s=u/c;t=p(a);r=p(i);n=p(l);if(a===c){o=n-r}else if(i===c){o=1/3+t-n}else if(l===c){o=2/3+r-t}if(o<0){o+=1}else if(o>1){o-=1}}return[o*360,s*100,c*100]};Ve.rgb.hwb=function(e){var t=e[0];var r=e[1];var n=e[2];var o=Ve.rgb.hsl(e)[0];var s=1/255*Math.min(t,Math.min(r,n));n=1-1/255*Math.max(t,Math.max(r,n));return[o,s*100,n*100]};Ve.rgb.cmyk=function(e){var t=e[0]/255;var r=e[1]/255;var n=e[2]/255;var o;var s;var a;var i;i=Math.min(1-t,1-r,1-n);o=(1-t-i)/(1-i)||0;s=(1-r-i)/(1-i)||0;a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function Xe(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}Ve.rgb.keyword=function(e){var t=Ge[e];if(t){return t}var r=Infinity;var n;for(var o in Ue){if(Ue.hasOwnProperty(o)){var s=Ue[o];var a=Xe(e,s);if(a<r){r=a;n=o}}}return n};Ve.keyword.rgb=function(e){return Ue[e]};Ve.rgb.xyz=function(e){var t=e[0]/255;var r=e[1]/255;var n=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var o=t*.4124+r*.3576+n*.1805;var s=t*.2126+r*.7152+n*.0722;var a=t*.0193+r*.1192+n*.9505;return[o*100,s*100,a*100]};Ve.rgb.lab=function(e){var t=Ve.rgb.xyz(e);var r=t[0];var n=t[1];var o=t[2];var s;var a;var i;r/=95.047;n/=100;o/=108.883;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;o=o>.008856?Math.pow(o,1/3):7.787*o+16/116;s=116*n-16;a=500*(r-n);i=200*(n-o);return[s,a,i]};Ve.hsl.rgb=function(e){var t=e[0]/360;var r=e[1]/100;var n=e[2]/100;var o;var s;var a;var i;var l;if(r===0){l=n*255;return[l,l,l]}if(n<.5){s=n*(1+r)}else{s=n+r-n*r}o=2*n-s;i=[0,0,0];for(var c=0;c<3;c++){a=t+1/3*-(c-1);if(a<0){a++}if(a>1){a--}if(6*a<1){l=o+(s-o)*6*a}else if(2*a<1){l=s}else if(3*a<2){l=o+(s-o)*(2/3-a)*6}else{l=o}i[c]=l*255}return i};Ve.hsl.hsv=function(e){var t=e[0];var r=e[1]/100;var n=e[2]/100;var o=r;var s=Math.max(n,.01);var a;var i;n*=2;r*=n<=1?n:2-n;o*=s<=1?s:2-s;i=(n+r)/2;a=n===0?2*o/(s+o):2*r/(n+r);return[t,a*100,i*100]};Ve.hsv.rgb=function(e){var t=e[0]/60;var r=e[1]/100;var n=e[2]/100;var o=Math.floor(t)%6;var s=t-Math.floor(t);var a=255*n*(1-r);var i=255*n*(1-r*s);var l=255*n*(1-r*(1-s));n*=255;switch(o){case 0:return[n,l,a];case 1:return[i,n,a];case 2:return[a,n,l];case 3:return[a,i,n];case 4:return[l,a,n];case 5:return[n,a,i]}};Ve.hsv.hsl=function(e){var t=e[0];var r=e[1]/100;var n=e[2]/100;var o=Math.max(n,.01);var s;var a;var i;i=(2-r)*n;s=(2-r)*o;a=r*o;a/=s<=1?s:2-s;a=a||0;i/=2;return[t,a*100,i*100]};Ve.hwb.rgb=function(e){var t=e[0]/360;var r=e[1]/100;var n=e[2]/100;var o=r+n;var s;var a;var i;var l;if(o>1){r/=o;n/=o}s=Math.floor(6*t);a=1-n;i=6*t-s;if((s&1)!==0){i=1-i}l=r+i*(a-r);var c;var u;var p;switch(s){default:case 6:case 0:c=a;u=l;p=r;break;case 1:c=l;u=a;p=r;break;case 2:c=r;u=a;p=l;break;case 3:c=r;u=l;p=a;break;case 4:c=l;u=r;p=a;break;case 5:c=a;u=r;p=l;break}return[c*255,u*255,p*255]};Ve.cmyk.rgb=function(e){var t=e[0]/100;var r=e[1]/100;var n=e[2]/100;var o=e[3]/100;var s;var a;var i;s=1-Math.min(1,t*(1-o)+o);a=1-Math.min(1,r*(1-o)+o);i=1-Math.min(1,n*(1-o)+o);return[s*255,a*255,i*255]};Ve.xyz.rgb=function(e){var t=e[0]/100;var r=e[1]/100;var n=e[2]/100;var o;var s;var a;o=t*3.2406+r*-1.5372+n*-.4986;s=t*-.9689+r*1.8758+n*.0415;a=t*.0557+r*-.204+n*1.057;o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92;s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92;a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92;o=Math.min(Math.max(0,o),1);s=Math.min(Math.max(0,s),1);a=Math.min(Math.max(0,a),1);return[o*255,s*255,a*255]};Ve.xyz.lab=function(e){var t=e[0];var r=e[1];var n=e[2];var o;var s;var a;t/=95.047;r/=100;n/=108.883;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;o=116*r-16;s=500*(t-r);a=200*(r-n);return[o,s,a]};Ve.lab.xyz=function(e){var t=e[0];var r=e[1];var n=e[2];var o;var s;var a;s=(t+16)/116;o=r/500+s;a=s-n/200;var i=Math.pow(s,3);var l=Math.pow(o,3);var c=Math.pow(a,3);s=i>.008856?i:(s-16/116)/7.787;o=l>.008856?l:(o-16/116)/7.787;a=c>.008856?c:(a-16/116)/7.787;o*=95.047;s*=100;a*=108.883;return[o,s,a]};Ve.lab.lch=function(e){var t=e[0];var r=e[1];var n=e[2];var o;var s;var a;o=Math.atan2(n,r);s=o*360/2/Math.PI;if(s<0){s+=360}a=Math.sqrt(r*r+n*n);return[t,a,s]};Ve.lch.lab=function(e){var t=e[0];var r=e[1];var n=e[2];var o;var s;var a;a=n/360*2*Math.PI;o=r*Math.cos(a);s=r*Math.sin(a);return[t,o,s]};Ve.rgb.ansi16=function(e){var t=e[0];var r=e[1];var n=e[2];var o=1 in arguments?arguments[1]:Ve.rgb.hsv(e)[2];o=Math.round(o/50);if(o===0){return 30}var s=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255));if(o===2){s+=60}return s};Ve.hsv.ansi16=function(e){return Ve.rgb.ansi16(Ve.hsv.rgb(e),e[2])};Ve.rgb.ansi256=function(e){var t=e[0];var r=e[1];var n=e[2];if(t===r&&r===n){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}var o=16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5);return o};Ve.ansi16.rgb=function(e){var t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}var r=(~~(e>50)+1)*.5;var n=(t&1)*r*255;var o=(t>>1&1)*r*255;var s=(t>>2&1)*r*255;return[n,o,s]};Ve.ansi256.rgb=function(e){if(e>=232){var t=(e-232)*10+8;return[t,t,t]}e-=16;var r;var n=Math.floor(e/36)/5*255;var o=Math.floor((r=e%36)/6)/5*255;var s=r%6/5*255;return[n,o,s]};Ve.rgb.hex=function(e){var t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);var r=t.toString(16).toUpperCase();return"000000".substring(r.length)+r};Ve.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}var r=t[0];if(t[0].length===3){r=r.split("").map((function(e){return e+e})).join("")}var n=parseInt(r,16);var o=n>>16&255;var s=n>>8&255;var a=n&255;return[o,s,a]};Ve.rgb.hcg=function(e){var t=e[0]/255;var r=e[1]/255;var n=e[2]/255;var o=Math.max(Math.max(t,r),n);var s=Math.min(Math.min(t,r),n);var a=o-s;var i;var l;if(a<1){i=s/(1-a)}else{i=0}if(a<=0){l=0}else if(o===t){l=(r-n)/a%6}else if(o===r){l=2+(n-t)/a}else{l=4+(t-r)/a+4}l/=6;l%=1;return[l*360,a*100,i*100]};Ve.hsl.hcg=function(e){var t=e[1]/100;var r=e[2]/100;var n=1;var o=0;if(r<.5){n=2*t*r}else{n=2*t*(1-r)}if(n<1){o=(r-.5*n)/(1-n)}return[e[0],n*100,o*100]};Ve.hsv.hcg=function(e){var t=e[1]/100;var r=e[2]/100;var n=t*r;var o=0;if(n<1){o=(r-n)/(1-n)}return[e[0],n*100,o*100]};Ve.hcg.rgb=function(e){var t=e[0]/360;var r=e[1]/100;var n=e[2]/100;if(r===0){return[n*255,n*255,n*255]}var o=[0,0,0];var s=t%1*6;var a=s%1;var i=1-a;var l=0;switch(Math.floor(s)){case 0:o[0]=1;o[1]=a;o[2]=0;break;case 1:o[0]=i;o[1]=1;o[2]=0;break;case 2:o[0]=0;o[1]=1;o[2]=a;break;case 3:o[0]=0;o[1]=i;o[2]=1;break;case 4:o[0]=a;o[1]=0;o[2]=1;break;default:o[0]=1;o[1]=0;o[2]=i}l=(1-r)*n;return[(r*o[0]+l)*255,(r*o[1]+l)*255,(r*o[2]+l)*255]};Ve.hcg.hsv=function(e){var t=e[1]/100;var r=e[2]/100;var n=t+r*(1-t);var o=0;if(n>0){o=t/n}return[e[0],o*100,n*100]};Ve.hcg.hsl=function(e){var t=e[1]/100;var r=e[2]/100;var n=r*(1-t)+.5*t;var o=0;if(n>0&&n<.5){o=t/(2*n)}else if(n>=.5&&n<1){o=t/(2*(1-n))}return[e[0],o*100,n*100]};Ve.hcg.hwb=function(e){var t=e[1]/100;var r=e[2]/100;var n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};Ve.hwb.hcg=function(e){var t=e[1]/100;var r=e[2]/100;var n=1-r;var o=n-t;var s=0;if(o<1){s=(n-o)/(1-o)}return[e[0],o*100,s*100]};Ve.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};Ve.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};Ve.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};Ve.gray.hsl=Ve.gray.hsv=function(e){return[0,0,e[0]]};Ve.gray.hwb=function(e){return[0,100,e[0]]};Ve.gray.cmyk=function(e){return[0,0,0,e[0]]};Ve.gray.lab=function(e){return[e[0],0,0]};Ve.gray.hex=function(e){var t=Math.round(e[0]/100*255)&255;var r=(t<<16)+(t<<8)+t;var n=r.toString(16).toUpperCase();return"000000".substring(n.length)+n};Ve.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[t/255*100]};var Qe=ze.exports;function Ze(){var e={};var t=Object.keys(Qe);for(var r=t.length,n=0;n<r;n++){e[t[n]]={distance:-1,parent:null}}return e}function et(e){var t=Ze();var r=[e];t[e].distance=0;while(r.length){var n=r.pop();var o=Object.keys(Qe[n]);for(var s=o.length,a=0;a<s;a++){var i=o[a];var l=t[i];if(l.distance===-1){l.distance=t[n].distance+1;l.parent=n;r.unshift(i)}}}return t}function tt(e,t){return function(r){return t(e(r))}}function rt(e,t){var r=[t[e].parent,e];var n=Qe[t[e].parent][e];var o=t[e].parent;while(t[o].parent){r.unshift(t[o].parent);n=tt(Qe[t[o].parent][o],n);o=t[o].parent}n.conversion=r;return n}var nt=function(e){var t=et(e);var r={};var n=Object.keys(t);for(var o=n.length,s=0;s<o;s++){var a=n[s];var i=t[a];if(i.parent===null){continue}r[a]=rt(a,t)}return r};var ot=ze.exports;var st=nt;var at={};var it=Object.keys(ot);function lt(e){var t=function(t){if(t===undefined||t===null){return t}if(arguments.length>1){t=Array.prototype.slice.call(arguments)}return e(t)};if("conversion"in e){t.conversion=e.conversion}return t}function ct(e){var t=function(t){if(t===undefined||t===null){return t}if(arguments.length>1){t=Array.prototype.slice.call(arguments)}var r=e(t);if(typeof r==="object"){for(var n=r.length,o=0;o<n;o++){r[o]=Math.round(r[o])}}return r};if("conversion"in e){t.conversion=e.conversion}return t}it.forEach((function(e){at[e]={};Object.defineProperty(at[e],"channels",{value:ot[e].channels});Object.defineProperty(at[e],"labels",{value:ot[e].labels});var t=st(e);var r=Object.keys(t);r.forEach((function(r){var n=t[r];at[e][r]=ct(n);at[e][r].raw=lt(n)}))}));var ut=at;(function(e){const t=ut;const r=(e,r)=>function(){const n=e.apply(t,arguments);return`[${n+r}m`};const n=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};5;${n}m`};const o=(e,r)=>function(){const n=e.apply(t,arguments);return`[${38+r};2;${n[0]};${n[1]};${n[2]}m`};function s(){const e=new Map;const s={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};s.color.grey=s.color.gray;for(const t of Object.keys(s)){const r=s[t];for(const t of Object.keys(r)){const n=r[t];s[t]={open:`[${n[0]}m`,close:`[${n[1]}m`};r[t]=s[t];e.set(n[0],n[1])}Object.defineProperty(s,t,{value:r,enumerable:false});Object.defineProperty(s,"codes",{value:e,enumerable:false})}const a=e=>e;const i=(e,t,r)=>[e,t,r];s.color.close="[39m";s.bgColor.close="[49m";s.color.ansi={ansi:r(a,0)};s.color.ansi256={ansi256:n(a,0)};s.color.ansi16m={rgb:o(i,0)};s.bgColor.ansi={ansi:r(a,10)};s.bgColor.ansi256={ansi256:n(a,10)};s.bgColor.ansi16m={rgb:o(i,10)};for(let e of Object.keys(t)){if(typeof t[e]!=="object"){continue}const a=t[e];if(e==="ansi16"){e="ansi"}if("ansi16"in a){s.color.ansi[e]=r(a.ansi16,0);s.bgColor.ansi[e]=r(a.ansi16,10)}if("ansi256"in a){s.color.ansi256[e]=n(a.ansi256,0);s.bgColor.ansi256[e]=n(a.ansi256,10)}if("rgb"in a){s.color.ansi16m[e]=o(a.rgb,0);s.bgColor.ansi16m[e]=o(a.rgb,10)}}return s}Object.defineProperty(e,"exports",{enumerable:true,get:s})})(We);var pt=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const o=t.indexOf("--");return n!==-1&&(o===-1?true:n<o)};const dt=E["default"];const ft=pt;const vt=process.env;let ht;if(ft("no-color")||ft("no-colors")||ft("color=false")){ht=false}else if(ft("color")||ft("colors")||ft("color=true")||ft("color=always")){ht=true}if("FORCE_COLOR"in vt){ht=vt.FORCE_COLOR.length===0||parseInt(vt.FORCE_COLOR,10)!==0}function mt(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function gt(e){if(ht===false){return 0}if(ft("color=16m")||ft("color=full")||ft("color=truecolor")){return 3}if(ft("color=256")){return 2}if(e&&!e.isTTY&&ht!==true){return 0}const t=ht?1:0;if(process.platform==="win32"){const e=dt.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in vt){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in vt))||vt.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in vt){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(vt.TEAMCITY_VERSION)?1:0}if(vt.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in vt){const e=parseInt((vt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(vt.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(vt.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(vt.TERM)){return 1}if("COLORTERM"in vt){return 1}if(vt.TERM==="dumb"){return t}return t}function bt(e){const t=gt(e);return mt(t)}var yt={supportsColor:bt,stdout:bt(process.stdout),stderr:bt(process.stderr)};const wt=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const jt=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const kt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const Ct=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;const Ot=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function xt(e){if(e[0]==="u"&&e.length===5||e[0]==="x"&&e.length===3){return String.fromCharCode(parseInt(e.slice(1),16))}return Ot.get(e)||e}function Mt(e,t){const r=[];const n=t.trim().split(/\s*,\s*/g);let o;for(const t of n){if(!isNaN(t)){r.push(Number(t))}else if(o=t.match(kt)){r.push(o[2].replace(Ct,((e,t,r)=>t?xt(t):r)))}else{throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}}return r}function St(e){jt.lastIndex=0;const t=[];let r;while((r=jt.exec(e))!==null){const e=r[1];if(r[2]){const n=Mt(e,r[2]);t.push([e].concat(n))}else{t.push([e])}}return t}function Pt(e,t){const r={};for(const e of t){for(const t of e.styles){r[t[0]]=e.inverse?null:t.slice(1)}}let n=e;for(const e of Object.keys(r)){if(Array.isArray(r[e])){if(!(e in n)){throw new Error(`Unknown Chalk style: ${e}`)}if(r[e].length>0){n=n[e].apply(n,r[e])}else{n=n[e]}}}return n}var At=(e,t)=>{const r=[];const n=[];let o=[];t.replace(wt,((t,s,a,i,l,c)=>{if(s){o.push(xt(s))}else if(i){const t=o.join("");o=[];n.push(r.length===0?t:Pt(e,r)(t));r.push({inverse:a,styles:St(i)})}else if(l){if(r.length===0){throw new Error("Found extraneous } in Chalk template literal")}n.push(Pt(e,r)(o.join("")));o=[];r.pop()}else{o.push(c)}}));n.push(o.join(""));if(r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")};(function(e){const t=Ne;const r=We.exports;const n=yt.stdout;const o=At;const s=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm");const a=["ansi","ansi","ansi256","ansi16m"];const i=new Set(["gray"]);const l=Object.create(null);function c(e,t){t=t||{};const r=n?n.level:0;e.level=t.level===undefined?r:t.level;e.enabled="enabled"in t?t.enabled:e.level>0}function u(e){if(!this||!(this instanceof u)||this.template){const t={};c(t,e);t.template=function(){const e=[].slice.call(arguments);return v.apply(null,[t.template].concat(e))};Object.setPrototypeOf(t,u.prototype);Object.setPrototypeOf(t.template,t);t.template.constructor=u;return t.template}c(this,e)}if(s){r.blue.open="[94m"}for(const e of Object.keys(r)){r[e].closeRe=new RegExp(t(r[e].close),"g");l[e]={get(){const t=r[e];return d.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}}}l.visible={get(){return d.call(this,this._styles||[],true,"visible")}};r.color.closeRe=new RegExp(t(r.color.close),"g");for(const e of Object.keys(r.color.ansi)){if(i.has(e)){continue}l[e]={get(){const t=this.level;return function(){const n=r.color[a[t]][e].apply(null,arguments);const o={open:n,close:r.color.close,closeRe:r.color.closeRe};return d.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}}}r.bgColor.closeRe=new RegExp(t(r.bgColor.close),"g");for(const e of Object.keys(r.bgColor.ansi)){if(i.has(e)){continue}const t="bg"+e[0].toUpperCase()+e.slice(1);l[t]={get(){const t=this.level;return function(){const n=r.bgColor[a[t]][e].apply(null,arguments);const o={open:n,close:r.bgColor.close,closeRe:r.bgColor.closeRe};return d.call(this,this._styles?this._styles.concat(o):[o],this._empty,e)}}}}const p=Object.defineProperties((()=>{}),l);function d(e,t,r){const n=function(){return f.apply(n,arguments)};n._styles=e;n._empty=t;const o=this;Object.defineProperty(n,"level",{enumerable:true,get(){return o.level},set(e){o.level=e}});Object.defineProperty(n,"enabled",{enumerable:true,get(){return o.enabled},set(e){o.enabled=e}});n.hasGrey=this.hasGrey||r==="gray"||r==="grey";n.__proto__=p;return n}function f(){const e=arguments;const t=e.length;let n=String(arguments[0]);if(t===0){return""}if(t>1){for(let r=1;r<t;r++){n+=" "+e[r]}}if(!this.enabled||this.level<=0||!n){return this._empty?"":n}const o=r.dim.open;if(s&&this.hasGrey){r.dim.open=""}for(const e of this._styles.slice().reverse()){n=e.open+n.replace(e.closeRe,e.open)+e.close;n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`)}r.dim.open=o;return n}function v(e,t){if(!Array.isArray(t)){return[].slice.call(arguments,1).join(" ")}const r=[].slice.call(arguments,2);const n=[t.raw[0]];for(let e=1;e<t.length;e++){n.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"));n.push(String(t.raw[e]))}return o(e,n.join(""))}Object.defineProperties(u.prototype,l);e.exports=u();e.exports.supportsColor=n;e.exports.default=e.exports})(De);var Et=De.exports;const Rt=async(r,n,s)=>{const a=await e.getPackageDir(__dirname,process.cwd());const i=y.readFileSync(o.join(a,"./templates/main.html"),"utf-8");const l=[];for(const[t]of Object.entries(s.entryMap)){const o=Object.keys(r).includes(t);l.push({name:t,link:e.urlJoin(n,["pages",t],{env:"me"}),flagText:o?"serve":"static",isServed:o?1:0})}const c={title:"@flatjs/evolve",modules:l.sort(((e,t)=>t.isServed-e.isServed))};return t.template(i)(c)};const Bt=async(r,n,s,a,i)=>{const l=i.entryMap;const c=Object.keys(l).sort(((e,t)=>t.length-e.length));const u=await e.getPackageDir(__dirname,process.cwd());const p=c.find((t=>e.ensureSlash(s.path.replace(/^\//,""),true).startsWith(e.ensureSlash(t,true))));if(!p){const e=y.readFileSync(o.join(u,`./templates/module-404.html`),"utf-8");return t.template(e)({title:"404 Not Found",errorMeta:[{name:`@flatjs/evolve workspace`,value:u},{name:`served entry names`,value:JSON.stringify(c)},{name:`module path`,value:`${s.path}`}]})}const d=l[p];const f=d.options;const v=r[p];const h=(v==null?void 0:v.devServerHostUri)||a;const m=(f==null?void 0:f.serveModuleTemplate)||"./templates/module.html";const g=o.join(i.projectCwd,"./templates/module.html");const b=y.readFileSync(o.isAbsolute(m)?m:e.existsSync(g)?g:o.join(u,"./templates/module.html"),"utf-8");const w=i.forServe;const j=w.defaultServeGlobalData?w.defaultServeGlobalData(d,a):{};const k={title:H("title",n,f==null?void 0:f.title),favicon:H("favicon",n,f==null?void 0:f.favicon),viewport:se(i,f)?H("viewport",n,f==null?void 0:f.viewport):"",inlineScripts:H("inlineScripts",n,f==null?void 0:f.inlineScripts),headBeforeStyles:H("headBeforeStyles",n,f==null?void 0:f.headBeforeStyles),headBeforeScripts:H("headBeforeScripts",n,f==null?void 0:f.headBeforeScripts),bodyAfterScripts:H("bodyAfterScripts",n,f==null?void 0:f.bodyAfterScripts),moduleFederationScripts:re({me:[e.urlJoin(a,["public"])]}),global:{hostUrl:a,apiBase:e.urlJoin(a,["api"]),routeBaseName:o.join(`/pages`,p),...j,...(f==null?void 0:f.serveGlobalData)||{}},styles:[e.urlJoin(h,[o.join("public",p,"bundle.css")])],scripts:[e.urlJoin(h,[o.join("public",p,"bundle.js")])]};return t.template(b)(k)};const $t=(e,t,r,n)=>{const o=async(o,s)=>{let a;if(o.path==="/"){a=await Rt(r,t,n)}else{a=await Bt(r,e,o,t,n)}s.send(a)};return(n.forServe.pageMiddlewares||[]).concat(o)};const Tt=t=>async(r,n)=>{const s=r.baseUrl;if(!s.startsWith("/public")){n.redirect("/pages")}else{const r=await e.fileWalk(o.join("public/","**/*.{js,css}"),{cwd:t});const a=o.extname(s);const i=r.find((e=>o.extname(e)===a&&e.indexOf(s.replace(/\.(js|css)$/,""))!==-1));if(i){n.sendFile(i)}else{n.sendFile(o.join(t,s))}}};const qt=(e,t="development",n,o,s,a,i)=>{const l=B["default"]();r.attachMockMiddlewares(l,i);l.set("hostUri",o);l.use("/pages",...$t(t,o,s,a));l.use("*",Tt(e));return new Promise((e=>{const t=a.https?$["default"].createServer(a.https,l):l;t.listen(n,(()=>{e(true)}))}))};const _t=(e,t,r)=>{const{projectCwd:n,https:s,liveReload:a}=r;const i=new R["default"]({server:{type:s?"https":"http",options:{...s}},open:false,compress:true,port:t,hot:!a,liveReload:a,allowedHosts:"all",static:{directory:`${o.join(n,"/public")}`},headers:{"Access-Control-Allow-Origin":"*"},client:{progress:true,overlay:{errors:true,warnings:false}}},e);return new Promise(((e,t)=>{i.startCallback((r=>{if(r){return t(r)}e(true)}))}))};const Ft=async(n,s,a,l)=>{await e.keepPackageDepsUpToDateForNonMonoRepo({cwd:process.cwd(),autoUpgrade:true,needVerifyPackages:a.needVerifyPackages||{}});if(a.https){l.https=a.https}const{mockPort:c,hostUri:u}=await r.prepareMockDomain(l);const p=e.urlJoin(u,["/pages"]);let d=c;const f=[];const v={};for(const[e]of Object.entries(s)){d=d+1;const{mockPort:n,hostUri:o}=await r.prepareMockDomain(t.merge({},l,{port:d}));v[e]={devServerPort:n,devServerHostUri:o}}for(const[t,r]of Object.entries(s)){var h,m;const s=((h=r.options)==null?void 0:(m=h.moduleFederation)==null?void 0:m.remotes)||[];s.forEach((t=>{t.endpoint=t=>{var r;return e.urlJoin(((r=v[t])==null?void 0:r.devServerHostUri)||u,["/public"])}}));const{devServerPort:l,devServerHostUri:c}=v[t];const d=e.urlJoin(c,["public"]);const g={[t]:r};const b=oe(r,a);const y=qe("development",d,g,b);const w=i.webpack(ne(g,y)[0]);f.push(_t(w,l,a));const j=Et.bgBlack(`[${Et.magenta("@flatjs")}:${Et.bold(w.name||"")}]`);w.hooks.invalid.tap("fileChange",(e=>{console.log(j,`${"file change".padEnd(12," ")} ➩ ${Et.cyan(o.relative(n,e||""))}`)}));w.hooks.done.tap("compileDone",(()=>{console.log(j,`${"serve page".padEnd(12," ")} ➩ ${Et.cyan(p)}`)}))}await qt(n,"development",c,u,v,a,l);Q(p);return Promise.all(f).then((()=>true)).catch((e=>{console.log("evolve serve err: ",e);return false}))};const Dt=async(t,n,o)=>{if(n.https){o.https=n.https}const{mockPort:s,hostUri:a}=await r.prepareMockDomain(o);const i=e.urlJoin(a,["/pages"]);return qt(t,"development",s,a,{},n,o).then((e=>{const t=Et.bgBlack(`[${Et.magenta("@flatjs")}:`);console.log(t,`${"serve page".padEnd(12," ")} ➩ ${Et.cyan(i)}`);return e}))};const It=(e={},r={})=>{const n={};for(const[o,s]of Object.entries(r)){const r={options:{}};if(e[o]){n[o]=t.merge({},r,s,e[o])}t.merge(s,r)}return n};const Nt=(e,t,r={})=>{const n=X(e,r);const o=It(t,n.entryMap);return Fe(o,n)};const Wt=(e,t,n={},o={})=>{const s=X(e,n);const a=r.loadMockConfiguration(e,o);const i=It(t,s.entryMap);return Ft(e,i,s,a)};const zt=(e,t={},n={})=>{const o=X(e,t);const s=r.loadMockConfiguration(e,n);return Dt(e,o,s)};exports.cdnBoot=W;exports.cdnJsDelivr=N;exports.cdnUnpkg=I;exports.createPageMiddleware=$t;exports.createPublicAssetsMiddleware=Tt;exports.defaultFlatjsConfig=z;exports.evolveBuild=Nt;exports.evolveServe=Wt;exports.evolveStatic=zt;exports.flatBabelOptions=F;exports.flatExternalOptions=L;exports.flatLessLoaderOptions=V;exports.flatPerformanceOptions=Y;exports.flatPostcssLoaderOptions=J;exports.getHtmlPluginConfig=H;exports.loadEvolveConfiguration=X;exports.loadModule=_;exports.normalizeEntries=It;exports.polyfill=D;exports.terserOptions=K;exports.viewportScripts=U;
|
package/index.d.ts
CHANGED
@@ -110,7 +110,7 @@ export interface WebpackEntryObject {
|
|
110
110
|
...string[]
|
111
111
|
];
|
112
112
|
}
|
113
|
-
export declare type MultiCdnEnvType = "me" | "dev" | "uat" | "inte" | "rc" | "prod" | "ntv";
|
113
|
+
export declare type MultiCdnEnvType = "me" | "dev" | "uat" | "inte" | "inte2" | "inte3" | "inte4" | "rc" | "prod" | "ntv";
|
114
114
|
export declare type FlatMultiCDNConfig = {
|
115
115
|
[key in MultiCdnEnvType]?: string[];
|
116
116
|
};
|
@@ -144,6 +144,11 @@ export declare type MultiHtmlCDNEntryItem = {
|
|
144
144
|
* @default ''
|
145
145
|
*/
|
146
146
|
viewport?: string;
|
147
|
+
/**
|
148
|
+
* Allow us customized inline scripts into compiled html template.
|
149
|
+
* @default []
|
150
|
+
*/
|
151
|
+
inlineScripts?: (mode: "development" | "production") => string[];
|
147
152
|
/**
|
148
153
|
* The ordered styles will be injected start of html head.
|
149
154
|
* @default []
|
@@ -238,7 +243,7 @@ export declare type BuiltinBabelOptions = Partial<Record<"presets" | "plugins",
|
|
238
243
|
/**
|
239
244
|
* @default `react`
|
240
245
|
*/
|
241
|
-
usePreset?: "react" | "vue";
|
246
|
+
usePreset?: "react" | "vue" | "inferno";
|
242
247
|
};
|
243
248
|
/**
|
244
249
|
* Buildin plugin `babel-plugin-import` configurations
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.89",
|
4
4
|
"description": "the webpack based tools `evolve` of @flatjs",
|
5
5
|
"sideEffects": false,
|
6
6
|
"main": "index.js",
|
@@ -26,10 +26,10 @@
|
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
28
|
"@babel/core": "^7.16.0",
|
29
|
-
"@flatjs/common": "^1.2.
|
30
|
-
"@flatjs/evolve-preset-babel": "^1.2.
|
29
|
+
"@flatjs/common": "^1.2.88",
|
30
|
+
"@flatjs/evolve-preset-babel": "^1.2.87",
|
31
31
|
"@flatjs/forge-plugin-postcss-pixel": "^1.2.97",
|
32
|
-
"@flatjs/mock": "^1.2.
|
32
|
+
"@flatjs/mock": "^1.2.88",
|
33
33
|
"babel-loader": "^8.2.3",
|
34
34
|
"babel-merge": "^3.0.0",
|
35
35
|
"babel-plugin-import": "^1.13.3",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"postcss-loader": "^6.2.0",
|
48
48
|
"svgo": "^2.8.0",
|
49
49
|
"terser-webpack-plugin": "^5.2.5",
|
50
|
-
"webpack": "^5.64.
|
50
|
+
"webpack": "^5.64.2",
|
51
51
|
"webpack-bundle-analyzer": "^4.5.0",
|
52
52
|
"webpack-dev-server": "4.5.0",
|
53
53
|
"webpack-sources": "^3.2.2"
|
@@ -61,5 +61,5 @@
|
|
61
61
|
"publishConfig": {
|
62
62
|
"access": "public"
|
63
63
|
},
|
64
|
-
"gitHead": "
|
64
|
+
"gitHead": "7cd710cae9298cac212e0bca622024228f2025f6"
|
65
65
|
}
|
@@ -16,6 +16,18 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
19
31
|
<% if (viewport) { %>
|
20
32
|
<!-- / -->
|
21
33
|
<script>
|
@@ -16,6 +16,18 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
19
31
|
<% if (viewport) { %>
|
20
32
|
<!-- / -->
|
21
33
|
<script>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
6
|
+
<meta http-equiv="Expires" content="0" />
|
7
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
8
|
+
<meta http-equiv="Cache-control" content="no-cache" />
|
9
|
+
<meta http-equiv="Cache" content="no-cache" />
|
10
|
+
<meta name="format-detection" content="telephone=no,email=no" />
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
12
|
+
<meta name="apple-touch-fullscreen" content="yes" />
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
14
|
+
<meta
|
15
|
+
name="viewport"
|
16
|
+
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
|
+
/>
|
18
|
+
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
31
|
+
<% if (viewport) { %>
|
32
|
+
<!-- / -->
|
33
|
+
<script>
|
34
|
+
<%= viewport %>
|
35
|
+
</script>
|
36
|
+
<!-- / -->
|
37
|
+
<% } %>
|
38
|
+
|
39
|
+
<!-- / -->
|
40
|
+
<% if (favicon) { %>
|
41
|
+
<!-- / -->
|
42
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
43
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
44
|
+
<!-- / -->
|
45
|
+
<% } %>
|
46
|
+
|
47
|
+
<!-- / -->
|
48
|
+
<% if (headBeforeStyles) { %>
|
49
|
+
<!-- / -->
|
50
|
+
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
51
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
52
|
+
<% } %>
|
53
|
+
<!-- / -->
|
54
|
+
<% } %>
|
55
|
+
<!-- / -->
|
56
|
+
|
57
|
+
<!-- / -->
|
58
|
+
<% if (headBeforeScripts) { %>
|
59
|
+
<!-- / -->
|
60
|
+
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
61
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
62
|
+
<% } %>
|
63
|
+
<!-- / -->
|
64
|
+
<% } %>
|
65
|
+
<!-- / -->
|
66
|
+
</head>
|
67
|
+
|
68
|
+
<body>
|
69
|
+
<div id="app"></div>
|
70
|
+
<!-- / -->
|
71
|
+
<% if (bodyAfterScripts) { %>
|
72
|
+
<!-- / -->
|
73
|
+
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
74
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
75
|
+
<% } %>
|
76
|
+
<!-- / -->
|
77
|
+
<% } %>
|
78
|
+
<!-- / -->
|
79
|
+
</body>
|
80
|
+
</html>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
6
|
+
<meta http-equiv="Expires" content="0" />
|
7
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
8
|
+
<meta http-equiv="Cache-control" content="no-cache" />
|
9
|
+
<meta http-equiv="Cache" content="no-cache" />
|
10
|
+
<meta name="format-detection" content="telephone=no,email=no" />
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
12
|
+
<meta name="apple-touch-fullscreen" content="yes" />
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
14
|
+
<meta
|
15
|
+
name="viewport"
|
16
|
+
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
|
+
/>
|
18
|
+
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
31
|
+
<% if (viewport) { %>
|
32
|
+
<!-- / -->
|
33
|
+
<script>
|
34
|
+
<%= viewport %>
|
35
|
+
</script>
|
36
|
+
<!-- / -->
|
37
|
+
<% } %>
|
38
|
+
|
39
|
+
<!-- / -->
|
40
|
+
<% if (favicon) { %>
|
41
|
+
<!-- / -->
|
42
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
43
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
44
|
+
<!-- / -->
|
45
|
+
<% } %>
|
46
|
+
|
47
|
+
<!-- / -->
|
48
|
+
<% if (headBeforeStyles) { %>
|
49
|
+
<!-- / -->
|
50
|
+
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
51
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
52
|
+
<% } %>
|
53
|
+
<!-- / -->
|
54
|
+
<% } %>
|
55
|
+
<!-- / -->
|
56
|
+
|
57
|
+
<!-- / -->
|
58
|
+
<% if (headBeforeScripts) { %>
|
59
|
+
<!-- / -->
|
60
|
+
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
61
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
62
|
+
<% } %>
|
63
|
+
<!-- / -->
|
64
|
+
<% } %>
|
65
|
+
<!-- / -->
|
66
|
+
</head>
|
67
|
+
|
68
|
+
<body>
|
69
|
+
<div id="app"></div>
|
70
|
+
<!-- / -->
|
71
|
+
<% if (bodyAfterScripts) { %>
|
72
|
+
<!-- / -->
|
73
|
+
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
74
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
75
|
+
<% } %>
|
76
|
+
<!-- / -->
|
77
|
+
<% } %>
|
78
|
+
<!-- / -->
|
79
|
+
</body>
|
80
|
+
</html>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
6
|
+
<meta http-equiv="Expires" content="0" />
|
7
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
8
|
+
<meta http-equiv="Cache-control" content="no-cache" />
|
9
|
+
<meta http-equiv="Cache" content="no-cache" />
|
10
|
+
<meta name="format-detection" content="telephone=no,email=no" />
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
12
|
+
<meta name="apple-touch-fullscreen" content="yes" />
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
14
|
+
<meta
|
15
|
+
name="viewport"
|
16
|
+
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
|
+
/>
|
18
|
+
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
31
|
+
<% if (viewport) { %>
|
32
|
+
<!-- / -->
|
33
|
+
<script>
|
34
|
+
<%= viewport %>
|
35
|
+
</script>
|
36
|
+
<!-- / -->
|
37
|
+
<% } %>
|
38
|
+
|
39
|
+
<!-- / -->
|
40
|
+
<% if (favicon) { %>
|
41
|
+
<!-- / -->
|
42
|
+
<link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
|
43
|
+
<link rel="icon" href="<%= favicon %>" type="image/x-icon" />
|
44
|
+
<!-- / -->
|
45
|
+
<% } %>
|
46
|
+
|
47
|
+
<!-- / -->
|
48
|
+
<% if (headBeforeStyles) { %>
|
49
|
+
<!-- / -->
|
50
|
+
<% for (let index = 0; index < headBeforeStyles.length; index++) { %>
|
51
|
+
<link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
|
52
|
+
<% } %>
|
53
|
+
<!-- / -->
|
54
|
+
<% } %>
|
55
|
+
<!-- / -->
|
56
|
+
|
57
|
+
<!-- / -->
|
58
|
+
<% if (headBeforeScripts) { %>
|
59
|
+
<!-- / -->
|
60
|
+
<% for (let index = 0; index < headBeforeScripts.length; index++) { %>
|
61
|
+
<script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
|
62
|
+
<% } %>
|
63
|
+
<!-- / -->
|
64
|
+
<% } %>
|
65
|
+
<!-- / -->
|
66
|
+
</head>
|
67
|
+
|
68
|
+
<body>
|
69
|
+
<div id="app"></div>
|
70
|
+
<!-- / -->
|
71
|
+
<% if (bodyAfterScripts) { %>
|
72
|
+
<!-- / -->
|
73
|
+
<% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
|
74
|
+
<script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
|
75
|
+
<% } %>
|
76
|
+
<!-- / -->
|
77
|
+
<% } %>
|
78
|
+
<!-- / -->
|
79
|
+
</body>
|
80
|
+
</html>
|
@@ -16,6 +16,18 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
19
31
|
<% if (viewport) { %>
|
20
32
|
<!-- / -->
|
21
33
|
<script>
|
@@ -16,6 +16,18 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
19
31
|
<% if (viewport) { %>
|
20
32
|
<!-- / -->
|
21
33
|
<script>
|
@@ -16,6 +16,19 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
|
20
|
+
<!-- / -->
|
21
|
+
<% if (inlineScripts) { %>
|
22
|
+
<!-- / -->
|
23
|
+
<script>
|
24
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
25
|
+
<%= inlineScripts[index]%>
|
26
|
+
<% } %>
|
27
|
+
</script>
|
28
|
+
<!-- / -->
|
29
|
+
<% } %>
|
30
|
+
<!-- / -->
|
31
|
+
|
19
32
|
<% if (viewport) { %>
|
20
33
|
<!-- / -->
|
21
34
|
<script>
|
@@ -16,6 +16,18 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
<!-- / -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
19
31
|
<% if (viewport) { %>
|
20
32
|
<!-- / -->
|
21
33
|
<script>
|
package/templates/module.html
CHANGED
@@ -16,6 +16,18 @@
|
|
16
16
|
content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover"
|
17
17
|
/>
|
18
18
|
<title><%= title %></title>
|
19
|
+
<!-- inlineScripts -->
|
20
|
+
<% if (inlineScripts) { %>
|
21
|
+
<!-- / -->
|
22
|
+
<script>
|
23
|
+
<% for (let index = 0; index < inlineScripts.length; index++) { %>
|
24
|
+
<%= inlineScripts[index]%>
|
25
|
+
<% } %>
|
26
|
+
</script>
|
27
|
+
<!-- / -->
|
28
|
+
<% } %>
|
29
|
+
<!-- / -->
|
30
|
+
|
19
31
|
<!-- header viewport -->
|
20
32
|
<% if (viewport) { %>
|
21
33
|
<script>
|