@platforma-sdk/block-tools 2.7.25 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./config-CZwHml_R.js`);let t=require(`@oclif/core`),n=require(`node:path`);n=e.Ct(n);let r=require(`node:fs`);r=e.Ct(r);let i=require(`@milaboratories/pl-model-middle-layer`),a=require(`@milaboratories/ts-helpers-oclif`),o=require(`yaml`);o=e.Ct(o);let s=require(`@platforma-sdk/blocks-deps-updater`);var c=class i extends t.Command{static description=`Extracts meta information from blocks package.json and outputs meta.json with embedded binary and textual information linked from the meta section.`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),destination:t.Flags.string({char:`o`,summary:`output meta.json file`,helpValue:`<path>`,required:!0})};async run(){let{flags:t}=await this.parse(i),a=n.default.resolve(t.modulePath),o=await e.Y(a),s=await e.st.parseAsync(e.ot(a).parse(o.meta));await r.default.promises.writeFile(n.default.resolve(t.destination),JSON.stringify(s))}};async function l(e){try{return await r.default.promises.readFile(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}}var u=class e extends t.Command{static description=`Extracts and outputs block model JSON from pre-built block model module`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),sourceBundle:t.Flags.string({char:`b`,summary:`bundled model code to embed into the model for callback-based rendering to work`,helpValue:`<path>`,default:`./dist/bundle.js`}),destination:t.Flags.string({char:`o`,summary:`output model file`,helpValue:`<path>`,default:`./dist/model.json`})};async run(){let{flags:t}=await this.parse(e),i=n.default.resolve(t.modulePath),{model:a,platforma:o}=require(i);if(a||=o,!a)throw Error(`"model" export not found`);let{config:s}=a;if(!s)throw Error(`Malformed "model" object, check it is created with "BlockModel" and ".done()" is executed as the call in the chain.`);if(!(`outputs`in s)||!(`sections`in s))throw Error(`"config" has unexpected structure`);let c=await l(t.sourceBundle);c!==void 0&&(s.code={type:`plain`,content:c}),await r.default.promises.writeFile(n.default.resolve(t.destination),JSON.stringify(s))}},d=class n extends t.Command{static description=`List all available global overview snapshots in the registry`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),json:t.Flags.boolean({summary:`output in JSON format`,default:!1})};async run(){let{flags:t}=await this.parse(n),r=await new e.b(e._(t.registry),new a.OclifLoggerAdapter(this)).listGlobalOverviewSnapshots();if(t.json)this.log(JSON.stringify(r,null,2));else if(r.length===0)this.log(`No snapshots found.`);else{this.log(`Found ${r.length} snapshot(s):\n`);for(let e of r)this.log(` ${e.timestamp}`),this.log(` Path: ${e.path}`),this.log(``)}}},f=class r extends t.Command{static description=`Mark target block stable`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),channel:t.Flags.string({char:`c`,hidden:!0,summary:`custom channel`,helpValue:`<channel name>`,default:i.StableChannel}),"version-override":t.Flags.file({char:`v`,summary:`override package version`}),registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),refresh:t.Flags.boolean({summary:`refresh repository after adding the package`,default:!0,allowNo:!0,env:`PL_REGISTRY_REFRESH`}),unmark:t.Flags.boolean({summary:`reverses meaning of this command, flag can be used to remove "stable" flag from the package`,default:!1})};async run(){let{flags:t}=await this.parse(r),o=await e.Y(n.default.resolve(t.modulePath));t[`version-override`]&&(o=(0,i.overrideDescriptionVersion)(o,t[`version-override`]));let s=new e.b(e._(t.registry),new a.OclifLoggerAdapter(this));t.unmark?await s.removePackageFromChannel(o.id,t.channel):await s.addPackageToChannel(o.id,t.channel),t.refresh&&await s.updateIfNeeded()}},p=class r extends t.Command{static description=`Builds block pack and outputs a block pack manifest consolidating all references assets into a single folder`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),destinationPath:t.Flags.string({char:`o`,summary:`output folder`,helpValue:`<path>`,default:`./block-pack`})};async run(){let{flags:t}=await this.parse(r);await e.Q(await e.J(n.default.resolve(t.modulePath)),n.default.resolve(t.destinationPath))}};function m(e,t){let n={...e};for(let e in t)t[e]&&typeof t[e]==`object`&&!Array.isArray(t[e])&&n[e]&&typeof n[e]==`object`&&!Array.isArray(n[e])?n[e]=m(n[e],t[e]):n[e]=t[e];return n}var h=class o extends t.Command{static description=`Publishes the block package and refreshes the registry (for v2 block-pack schema)`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),manifest:t.Flags.file({char:`m`,summary:`manifest file path`,exists:!0,default:`./block-pack/${e.F}`}),"version-override":t.Flags.file({char:`v`,summary:`override package version`}),refresh:t.Flags.boolean({summary:`refresh repository after adding the package`,default:!0,allowNo:!0,env:`PL_REGISTRY_REFRESH`}),unstable:t.Flags.boolean({summary:`do not add the published package to stable channel`,default:!1,env:`PL_PUBLISH_UNSTABLE`})};async run(){let{flags:t}=await this.parse(o),s=n.default.resolve(t.manifest),c=JSON.parse(await r.default.promises.readFile(s,{encoding:`utf-8`})),l=i.BlockPackManifest.parse(c);l=m(c,l);let u=n.default.dirname(s);this.log(`Manifest root = ${u}`),t[`version-override`]&&(l=(0,i.overrideManifestVersion)(l,t[`version-override`]));let d=new e.b(e._(t.registry),new a.OclifLoggerAdapter(this));await d.publishPackage(l,async e=>Buffer.from(await r.default.promises.readFile(n.default.resolve(u,e)))),t.unstable||(this.log(`Adding package to ${i.StableChannel} channel...`),await d.addPackageToChannel(l.description.id,i.StableChannel)),t.refresh&&await d.updateIfNeeded()}},g=class n extends t.Command{static description=`Refresh overview files based on published but not proecessed artefacts`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),mode:t.Flags.string({char:`m`,summary:`refresh mode (allowed valiues: "force", "normal", "dry-run")`,helpValue:`<mode>`,options:[`force`,`normal`,`dry-run`],env:`PL_REGISTRY_REFRESH_DRY_RUN`,default:`normal`})};async run(){let{flags:t}=await this.parse(n);await new e.b(e._(t.registry),new a.OclifLoggerAdapter(this)).updateIfNeeded(t.mode)}},_=class n extends t.Command{static description=`Restore global overview from a snapshot`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),snapshot:t.Flags.string({char:`s`,summary:`snapshot timestamp ID to restore from`,helpValue:`<timestamp>`,required:!0}),"skip-confirmation":t.Flags.boolean({summary:`skip confirmation prompt (use with caution)`,default:!1})};async run(){let{flags:t}=await this.parse(n),r=new e.b(e._(t.registry),new a.OclifLoggerAdapter(this)),i=await r.listGlobalOverviewSnapshots();if(i.find(e=>e.timestamp===t.snapshot)||this.error(`Snapshot '${t.snapshot}' not found. Available snapshots:\n${i.map(e=>` - ${e.timestamp}`).join(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./config-C8wPuCgh.js`);let t=require(`@oclif/core`),n=require(`node:path`);n=e.Ct(n);let r=require(`node:fs`);r=e.Ct(r);let i=require(`@milaboratories/pl-model-middle-layer`),a=require(`@milaboratories/ts-helpers-oclif`),o=require(`yaml`);o=e.Ct(o);let s=require(`@platforma-sdk/blocks-deps-updater`);var c=class i extends t.Command{static description=`Extracts meta information from blocks package.json and outputs meta.json with embedded binary and textual information linked from the meta section.`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),destination:t.Flags.string({char:`o`,summary:`output meta.json file`,helpValue:`<path>`,required:!0})};async run(){let{flags:t}=await this.parse(i),a=n.default.resolve(t.modulePath),o=await e.Y(a),s=await e.st.parseAsync(e.ot(a).parse(o.meta));await r.default.promises.writeFile(n.default.resolve(t.destination),JSON.stringify(s))}};async function l(e){try{return await r.default.promises.readFile(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}}var u=class e extends t.Command{static description=`Extracts and outputs block model JSON from pre-built block model module`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),sourceBundle:t.Flags.string({char:`b`,summary:`bundled model code to embed into the model for callback-based rendering to work`,helpValue:`<path>`,default:`./dist/bundle.js`}),destination:t.Flags.string({char:`o`,summary:`output model file`,helpValue:`<path>`,default:`./dist/model.json`})};async run(){let{flags:t}=await this.parse(e),i=n.default.resolve(t.modulePath),{model:a,platforma:o}=require(i);if(a||=o,!a)throw Error(`"model" export not found`);let{config:s}=a;if(!s)throw Error(`Malformed "model" object, check it is created with "BlockModel" and ".done()" is executed as the call in the chain.`);if(!(`outputs`in s)||!(`sections`in s))throw Error(`"config" has unexpected structure`);let c=await l(t.sourceBundle);c!==void 0&&(s.code={type:`plain`,content:c}),await r.default.promises.writeFile(n.default.resolve(t.destination),JSON.stringify(s))}},d=class n extends t.Command{static description=`List all available global overview snapshots in the registry`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),json:t.Flags.boolean({summary:`output in JSON format`,default:!1})};async run(){let{flags:t}=await this.parse(n),r=await new e.b(e._(t.registry),new a.OclifLoggerAdapter(this)).listGlobalOverviewSnapshots();if(t.json)this.log(JSON.stringify(r,null,2));else if(r.length===0)this.log(`No snapshots found.`);else{this.log(`Found ${r.length} snapshot(s):\n`);for(let e of r)this.log(` ${e.timestamp}`),this.log(` Path: ${e.path}`),this.log(``)}}},f=class r extends t.Command{static description=`Mark target block stable`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),channel:t.Flags.string({char:`c`,hidden:!0,summary:`custom channel`,helpValue:`<channel name>`,default:i.StableChannel}),"version-override":t.Flags.file({char:`v`,summary:`override package version`}),registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),refresh:t.Flags.boolean({summary:`refresh repository after adding the package`,default:!0,allowNo:!0,env:`PL_REGISTRY_REFRESH`}),unmark:t.Flags.boolean({summary:`reverses meaning of this command, flag can be used to remove "stable" flag from the package`,default:!1})};async run(){let{flags:t}=await this.parse(r),o=await e.Y(n.default.resolve(t.modulePath));t[`version-override`]&&(o=(0,i.overrideDescriptionVersion)(o,t[`version-override`]));let s=new e.b(e._(t.registry),new a.OclifLoggerAdapter(this));t.unmark?await s.removePackageFromChannel(o.id,t.channel):await s.addPackageToChannel(o.id,t.channel),t.refresh&&await s.updateIfNeeded()}},p=class r extends t.Command{static description=`Builds block pack and outputs a block pack manifest consolidating all references assets into a single folder`;static flags={modulePath:t.Flags.string({char:`i`,summary:`input module path`,helpValue:`<path>`,default:`.`}),destinationPath:t.Flags.string({char:`o`,summary:`output folder`,helpValue:`<path>`,default:`./block-pack`})};async run(){let{flags:t}=await this.parse(r);await e.Q(await e.J(n.default.resolve(t.modulePath)),n.default.resolve(t.destinationPath))}};function m(e,t){let n={...e};for(let e in t)t[e]&&typeof t[e]==`object`&&!Array.isArray(t[e])&&n[e]&&typeof n[e]==`object`&&!Array.isArray(n[e])?n[e]=m(n[e],t[e]):n[e]=t[e];return n}var h=class o extends t.Command{static description=`Publishes the block package and refreshes the registry (for v2 block-pack schema)`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),manifest:t.Flags.file({char:`m`,summary:`manifest file path`,exists:!0,default:`./block-pack/${e.F}`}),"version-override":t.Flags.file({char:`v`,summary:`override package version`}),refresh:t.Flags.boolean({summary:`refresh repository after adding the package`,default:!0,allowNo:!0,env:`PL_REGISTRY_REFRESH`}),unstable:t.Flags.boolean({summary:`do not add the published package to stable channel`,default:!1,env:`PL_PUBLISH_UNSTABLE`})};async run(){let{flags:t}=await this.parse(o),s=n.default.resolve(t.manifest),c=JSON.parse(await r.default.promises.readFile(s,{encoding:`utf-8`})),l=i.BlockPackManifest.parse(c);l=m(c,l);let u=n.default.dirname(s);this.log(`Manifest root = ${u}`),t[`version-override`]&&(l=(0,i.overrideManifestVersion)(l,t[`version-override`]));let d=new e.b(e._(t.registry),new a.OclifLoggerAdapter(this));await d.publishPackage(l,async e=>Buffer.from(await r.default.promises.readFile(n.default.resolve(u,e)))),t.unstable||(this.log(`Adding package to ${i.StableChannel} channel...`),await d.addPackageToChannel(l.description.id,i.StableChannel)),t.refresh&&await d.updateIfNeeded()}},g=class n extends t.Command{static description=`Refresh overview files based on published but not proecessed artefacts`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),mode:t.Flags.string({char:`m`,summary:`refresh mode (allowed valiues: "force", "normal", "dry-run")`,helpValue:`<mode>`,options:[`force`,`normal`,`dry-run`],env:`PL_REGISTRY_REFRESH_DRY_RUN`,default:`normal`})};async run(){let{flags:t}=await this.parse(n);await new e.b(e._(t.registry),new a.OclifLoggerAdapter(this)).updateIfNeeded(t.mode)}},_=class n extends t.Command{static description=`Restore global overview from a snapshot`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry`,helpValue:`<address>`,env:`PL_REGISTRY`,required:!0}),snapshot:t.Flags.string({char:`s`,summary:`snapshot timestamp ID to restore from`,helpValue:`<timestamp>`,required:!0}),"skip-confirmation":t.Flags.boolean({summary:`skip confirmation prompt (use with caution)`,default:!1})};async run(){let{flags:t}=await this.parse(n),r=new e.b(e._(t.registry),new a.OclifLoggerAdapter(this)),i=await r.listGlobalOverviewSnapshots();if(i.find(e=>e.timestamp===t.snapshot)||this.error(`Snapshot '${t.snapshot}' not found. Available snapshots:\n${i.map(e=>` - ${e.timestamp}`).join(`
2
2
  `)||` (none)`}`),!t[`skip-confirmation`]){let e=(await import(`node:readline`)).createInterface({input:process.stdin,output:process.stdout}),n=await new Promise(n=>{e.question(`⚠️ This will overwrite the current global overview with snapshot '${t.snapshot}'.\nAre you sure you want to continue? (y/N): `,n)});if(e.close(),n.toLowerCase()!==`y`&&n.toLowerCase()!==`yes`){this.log(`Restore cancelled.`);return}}try{await r.restoreGlobalOverviewFromSnapshot(t.snapshot),this.log(`✅ Successfully restored global overview from snapshot '${t.snapshot}'`)}catch(e){this.error(`Failed to restore from snapshot: ${String(e)}`)}}};function v(e){let t=e.match(/(?<destName>[^/\\]+)=(?<src>.*)/);if(t){let{src:e,destName:n}=t.groups;return{src:e,destName:n}}else return{src:e,destName:n.default.basename(e)}}var y=t.Flags.custom({summary:`target files to upload`,helpValue:`file_path | package_name=file_path`,parse:async e=>v(e)}),b=[`registry`,`organization`,`package`,`version`],x={"build-meta":c,"build-model":u,"list-overview-snapshots":d,"mark-stable":f,pack:p,publish:h,"refresh-registry":g,"restore-overview-from-snapshot":_,"upload-package-v1":class n extends t.Command{static description=`Uploads V1 package and refreshes the registry`;static flags={registry:t.Flags.string({char:`r`,summary:`full address of the registry or alias from .pl.reg`,helpValue:`<address|alias>`,env:`PL_REGISTRY`}),organization:t.Flags.string({char:`o`,summary:`target organisation`,env:`PL_PACKAGE_ORGANIZATION`}),package:t.Flags.string({char:`p`,summary:`target package`,env:`PL_PACKAGE_NAME`}),version:t.Flags.string({char:`v`,summary:`target version`,env:`PL_PACKAGE_VERSION`}),meta:t.Flags.file({char:`m`,summary:`json file containing meta information to associate with tha package`,exists:!0}),file:y({char:`f`,summary:`package files`,multiple:!0,default:[]}),refresh:t.Flags.boolean({summary:`refresh repository after adding the package`,default:!0,allowNo:!0,env:`PL_REGISTRY_REFRESH`})};async run(){let{flags:t}=await this.parse(n),i=e.p.parse({});for(let e of b)t[e]&&(i[e]=t[e]);t.meta&&(t.meta.endsWith(`.json`)?i.meta=JSON.parse(await r.default.promises.readFile(t.meta,{encoding:`utf-8`})):t.meta.endsWith(`.yaml`)&&(i.meta=o.default.parse(await r.default.promises.readFile(t.meta,{encoding:`utf-8`}))));for(let e of t.file)i.files[e.destName]=e.src;let s=await e.n(i);this.log(o.default.stringify(s.conf));let c=s.createRegistry(new a.OclifLoggerAdapter(this)),l=s.fullPackageName,u=c.constructNewPackage(l);for(let[e,t]of Object.entries(s.conf.files)){this.log(`Uploading ${t} -> ${e} ...`);let n=await r.default.promises.readFile(t);await u.addFile(e,n)}this.log(`Uploading meta information...`),await u.writeMeta(s.conf.meta),await u.finish(),t.refresh&&await c.updateIfNeeded()}},"update-deps":class extends t.Command{static description=`Updates @platforma-sdk and @milaboratories packages in pnpm-workspace.yaml catalog to their latest versions from npm registry.`;static examples=[`<%= config.bin %> <%= command.id %>`];async run(){await(0,s.updatePackages)()}}};exports.COMMANDS=x;
3
3
  //# sourceMappingURL=cli.js.map
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Ct as e, F as t, J as n, Q as r, Y as i, _ as a, b as o, n as s, ot as c, p as l, st as u } from "./config-C-EJTl6j.mjs";
1
+ import { Ct as e, F as t, J as n, Q as r, Y as i, _ as a, b as o, n as s, ot as c, p as l, st as u } from "./config-CzNlwcwn.mjs";
2
2
  import { Command as d, Flags as f } from "@oclif/core";
3
3
  import p from "node:path";
4
4
  import m from "node:fs";
@@ -0,0 +1,3 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require(`node:path`);u=l(u);let d=require(`node:fs`);d=l(d);let f=require(`zod`),p=require(`node:fs/promises`);p=l(p);let m=require(`mime-types`);m=l(m);let h=require(`tar`);h=l(h);let g=require(`@milaboratories/resolve-helper`),_=require(`@milaboratories/pl-model-middle-layer`),v=require(`@milaboratories/pl-model-common`),y=require(`node:zlib`),b=require(`node:crypto`),x=require(`@milaboratories/ts-helpers`),ee=require(`node:util`),S=require(`canonicalize`);S=l(S);let te=require(`lru-cache`),C=require(`node:path/posix`);C=l(C);let ne=require(`@aws-sdk/client-s3`),re=require(`undici`),ie=require(`@milaboratories/pl-http`),w=require(`yaml`);w=l(w);let T=require(`node:os`);T=l(T);function ae(e){return f.z.string().transform((t,n)=>{let r=(0,g.tryResolve)(e,t);return r===void 0?(n.addIssue({code:f.z.ZodIssueCode.custom,message:`Can't resolve ${t} against ${e}`}),f.z.NEVER):{type:`absolute-file`,file:r}})}function oe(e,...t){return f.z.string().transform((n,r)=>{let i=n.endsWith(`/`)?n:`${n}/`;for(let n of t){let t=(0,g.tryResolve)(e,i+n);if(t!==void 0){if(!t.endsWith(n))throw Error(`Unexpected resolve result ${t} with index file ${n}`);return{type:`absolute-folder`,folder:t.slice(0,t.length-n.length)}}}return r.addIssue({code:f.z.ZodIssueCode.custom,message:`Can't resolve ${n} folder against ${e}, no index file found (${t.join(`, `)})`}),f.z.NEVER})}function se(e){return t=>t.type===`relative`?{type:`absolute-file`,file:u.default.resolve(e,t.path)}:t}function ce(){return async e=>e.type===`absolute-file`?await p.default.readFile(e.file,{encoding:`utf-8`}):e.content}function le(){return async e=>{if(e.type===`absolute-file`){let t=m.lookup(e.file);if(!t)throw Error(`Can't recognize mime type of the file: ${e.file}.`);return{type:`explicit-base64`,mimeType:t,content:await p.default.readFile(e.file,{encoding:`base64`})}}else return e}}function ue(){return async e=>{if(e.type===`absolute-file`){let t=m.lookup(e.file);if(!t)throw Error(`Can't recognize mime type of the file: ${e.file}.`);return{type:`explicit-bytes`,mimeType:t,content:Buffer.from(await p.default.readFile(e.file))}}else if(e.type===`explicit-base64`)return{type:`explicit-bytes`,mimeType:e.mimeType,content:Buffer.from(e.content,`base64`)};else return e}}function E(e,t){return async n=>{if(n.type===`absolute-file`){let r=u.default.basename(n.file),i=u.default.resolve(e,r);return t?.push(r),await p.default.cp(n.file,i),{type:`relative`,path:r}}else return n}}function de(e,t,n){if(!t.endsWith(`.tgz`))throw Error(`Unexpected tgz file name: ${t}`);return async r=>{let i=u.default.resolve(e,t);return await h.create({gzip:!0,file:i,cwd:r.folder},[`.`]),n?.push(t),{type:`relative`,path:t}}}function D(e){return async t=>t.type===`explicit-string`?t:{type:`explicit-string`,content:(await e(t.path)).toString(`utf8`)}}function fe(e){return async t=>t.type===`explicit-string`?t.content:(await e(t.path)).toString(`utf8`)}function pe(e){return async t=>{if(t.type===`explicit-base64`)return t;let n=m.lookup(t.path);if(!n)throw Error(`Can't recognize mime type of the file: ${t.path}.`);return{type:`explicit-base64`,mimeType:n,content:(await e(t.path)).toString(`base64`)}}}function O(e){return async t=>{if(t.type===`explicit-base64`)return{type:`explicit-bytes`,mimeType:t.mimeType,content:new Uint8Array(Buffer.from(t.content,`base64`))};let n=m.lookup(t.path);if(!n)throw Error(`Can't recognize mime type of the file: ${t.path}.`);return{type:`explicit-bytes`,mimeType:n,content:new Uint8Array(await e(t.path))}}}function me(e){return(0,_.BlockPackMeta)(_.DescriptionContentText.transform(se(e)),_.DescriptionContentBinary.transform(se(e)))}function he(e,t){return(0,_.BlockPackMeta)(_.ContentAbsoluteTextLocal.transform(E(e,t)),_.ContentAbsoluteBinaryLocal.transform(E(e,t)))}var ge=(0,_.BlockPackMeta)(_.ContentAbsoluteTextLocal.transform(ce()),_.ContentAbsoluteBinaryLocal.transform(le())).pipe(_.BlockPackMetaEmbeddedBase64),_e=(0,_.BlockPackMeta)(_.ContentAbsoluteTextLocal.transform(ce()),_.ContentAbsoluteBinaryLocal.transform(ue())).pipe(_.BlockPackMetaEmbeddedBytes);function ve(e){return(0,_.BlockPackMeta)(_.ContentRelativeText.transform(fe(e)),_.ContentRelativeBinary.transform(O(e))).pipe(_.BlockPackMetaEmbeddedBytes)}function ye(e){return(0,_.BlockComponents)(ae(e),oe(e,`index.html`))}function be(e,t){return(0,_.BlockComponents)(_.ContentAbsoluteBinaryLocal.transform(E(e,t)),_.ContentAbsoluteFolder.transform(de(e,`ui.tgz`,t))).pipe(_.BlockComponentsManifest)}function xe(e){return(0,_.BlockComponents)(_.ContentRelative.transform((0,_.mapRemoteToAbsolute)(e)),_.ContentRelative.transform((0,_.mapRemoteToAbsolute)(e)))}function Se(e){return(0,_.CreateBlockPackDescriptionSchema)(ye(e),me(e)).transform(async(e,t)=>{let n=(0,v.extractConfigGeneric)(JSON.parse(await p.default.readFile(e.components.model.file,`utf-8`))).featureFlags;return{...e,featureFlags:n}})}function Ce(e,t){return(0,_.CreateBlockPackDescriptionSchema)(be(e,t),he(e,t)).pipe(_.BlockPackDescriptionManifest)}function we(e){let t=(0,_.addPrefixToRelative)(e);return _.BlockPackDescriptionManifest.pipe((0,_.CreateBlockPackDescriptionSchema)((0,_.BlockComponents)(_.ContentRelative.transform(t),_.ContentRelative.transform(t)),(0,_.BlockPackMeta)(_.ContentRelativeText.transform(t),_.ContentRelativeBinary.transform(t)))).pipe(_.BlockPackDescriptionManifest)}async function Te(e,t){try{return t(await p.default.readFile(e))}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}}function k(e){return Promise.resolve((0,b.createHash)(`sha256`).update(ArrayBuffer.isView(e)?e:Buffer.from(e)).digest(`hex`).toUpperCase())}async function Ee(e,t){let n=e.components.workflow.main,r=await p.default.readFile(u.default.resolve(t,n.path)),i;try{let e=(0,y.gunzipSync)(r).toString(`utf-8`);i=JSON.parse(e)}catch{return}let a=i;if(!(a.type!==`pl.tengo-template.v3`||!a.template))return a.template.requiredCapabilities}async function De(e,t){await p.default.mkdir(t,{recursive:!0});let n=[],r=await Ce(t,n).parseAsync(e),i=await Ee(r,t);i&&i.length>0&&(r.meta={...r.meta,requiredCapabilities:i});let a=await Promise.all(n.map(async e=>{let n=await p.default.readFile(u.default.resolve(t,e)),r=await k(n);return{name:e,size:n.length,sha256:r}})),o=_.BlockPackManifest.parse({schema:`v2`,description:{...r},files:a,timestamp:Date.now()});return await p.default.writeFile(u.default.resolve(t,_.BlockPackManifestFile),JSON.stringify(o)),o}var A=`block`,Oe=/(?:@[a-zA-Z0-9-.]+\/)?(?<organization>[a-zA-Z0-9-]+)\.(?<name>[a-zA-Z0-9-]+)/;function ke(e){let t=e.match(Oe);if(!t)throw Error(`Malformed package name (${e}), can't infer organization and block pack name.`);let{name:n,organization:r}=t.groups;return{name:n,organization:r}}async function Ae(e,t){let n=u.default.resolve(e,`package.json`);try{let r=await Te(n,e=>JSON.parse(e.toString(`utf-8`)));if(r===void 0)return;let i=r[A];if(i===void 0)return;let a={..._.BlockPackDescriptionFromPackageJsonRaw.parse(i),id:{...ke((0,x.notEmpty)(r.name,`"name" not found in ${n}`)),version:_.SemVer.parse(r.version)}},o=await Se(e).safeParseAsync(a);if(o.success)return o.data;t?.warn(o.error);return}catch(e){t?.warn(e);return}}async function je(e){let t=u.default.resolve(e,`package.json`),n=JSON.parse(await p.default.readFile(t,{encoding:`utf-8`})),r=n[A];if(r===void 0)throw Error(`Block description (field ${A}) not found in ${t}.`);return{..._.BlockPackDescriptionFromPackageJsonRaw.parse(r),id:{...ke((0,x.notEmpty)(n.name,`"name" not found in ${t}`)),version:_.SemVer.parse(n.version)},featureFlags:{}}}async function Me(e){let t=await je(e);return await Se(e).parseAsync(t)}var j=o(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),M=o(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),N=o(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=j(),a=M();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),Ne=o(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),Pe=o(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),P=o(((e,t)=>{var n=M(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=j(),{safeRe:a,t:o}=N(),s=Ne(),{compareIdentifiers:c}=Pe();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),c(this.major,t.major)||c(this.minor,t.minor)||c(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),F=o(((e,t)=>{var n=P();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),Fe=o(((e,t)=>{var n=F();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),Ie=o(((e,t)=>{var n=F();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),Le=o(((e,t)=>{var n=P();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),Re=o(((e,t)=>{var n=F();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),ze=o(((e,t)=>{var n=P();t.exports=(e,t)=>new n(e,t).major})),Be=o(((e,t)=>{var n=P();t.exports=(e,t)=>new n(e,t).minor})),Ve=o(((e,t)=>{var n=P();t.exports=(e,t)=>new n(e,t).patch})),He=o(((e,t)=>{var n=F();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),I=o(((e,t)=>{var n=P();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),Ue=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(t,e,r)})),We=o(((e,t)=>{var n=I();t.exports=(e,t)=>n(e,t,!0)})),Ge=o(((e,t)=>{var n=P();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),Ke=o(((e,t)=>{var n=Ge();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),qe=o(((e,t)=>{var n=Ge();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),Je=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,r)>0})),Ye=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,r)<0})),Xe=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,r)===0})),Ze=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,r)!==0})),Qe=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,r)>=0})),$e=o(((e,t)=>{var n=I();t.exports=(e,t,r)=>n(e,t,r)<=0})),et=o(((e,t)=>{var n=Xe(),r=Ze(),i=Je(),a=Qe(),o=Ye(),s=$e();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),tt=o(((e,t)=>{var n=P(),r=F(),{safeRe:i,t:a}=N();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),nt=o(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),L=o(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,ie(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>re(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(w(this.set[t],e,this.options))return!0;return!1}};var r=new(nt()),i=Ne(),a=R(),o=M(),s=P(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=N(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=j(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(o(`comp`,e,t),e=ee(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=te(e,t),o(`xrange`,e),e=ne(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},ee=(e,t)=>e.trim().split(/\s+/).map(e=>S(e,t)).join(` `),S=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},te=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>C(e,t)).join(` `)),C=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},ne=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),re=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),ie=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),w=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),R=o(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=Ne(),{safeRe:i,t:a}=N(),o=et(),s=M(),c=P(),l=L()})),z=o(((e,t)=>{var n=L();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),rt=o(((e,t)=>{var n=L();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),it=o(((e,t)=>{var n=P(),r=L();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),at=o(((e,t)=>{var n=P(),r=L();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),ot=o(((e,t)=>{var n=P(),r=L(),i=Je();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),st=o(((e,t)=>{var n=L();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),ct=o(((e,t)=>{var n=P(),r=R(),{ANY:i}=r,a=L(),o=z(),s=Je(),c=Ye(),l=$e(),u=Qe();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),lt=o(((e,t)=>{var n=ct();t.exports=(e,t,r)=>n(e,t,`>`,r)})),ut=o(((e,t)=>{var n=ct();t.exports=(e,t,r)=>n(e,t,`<`,r)})),dt=o(((e,t)=>{var n=L();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),ft=o(((e,t)=>{var n=z(),r=I();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),pt=o(((e,t)=>{var n=L(),r=R(),{ANY:i}=r,a=z(),o=I(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),B=l(o(((e,t)=>{var n=N(),r=j(),i=P(),a=Pe();t.exports={parse:F(),valid:Fe(),clean:Ie(),inc:Le(),diff:Re(),major:ze(),minor:Be(),patch:Ve(),prerelease:He(),compare:I(),rcompare:Ue(),compareLoose:We(),compareBuild:Ge(),sort:Ke(),rsort:qe(),gt:Je(),lt:Ye(),eq:Xe(),neq:Ze(),gte:Qe(),lte:$e(),cmp:et(),coerce:tt(),Comparator:R(),Range:L(),satisfies:z(),toComparators:rt(),maxSatisfying:it(),minSatisfying:at(),minVersion:ot(),validRange:st(),outside:ct(),gtr:lt(),ltr:ut(),intersects:dt(),simplifyRange:ft(),subset:pt(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))()),mt=`_updates_v2/per_package_version/`;function ht(e,t){return`${mt}${e.organization}/${e.name}/${e.version}/${t}`}var gt=/(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<name>[^/]+))\/(?<version>[^/]+)\/(?<seed>[^/]+)$/,_t=`_updates_v2/_global_update_in`,vt=`_updates_v2/_global_update_out`,yt=`_overview_snapshots_v2/global/`,bt=`_overview_snapshots_v2/per_package/`,xt=/^(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}\.\d{3}Z-[a-z0-9]+)\.json\.gz$/;function St(e){return`${yt}${e}.json.gz`}function Ct(e,t){return`${bt}${e.organization}/${e.name}/${t}.json.gz`}var wt=`v2/`,Tt=`overview.json`,Et=`overview.json.gz`,Dt=`overview.json`,V=`manifest.json`,H=`channels`,U=/^[-a-z0-9]+$/;function W(e){return`${e.organization}/${e.name}/${e.version}`}function G(e){return`v2/${W(e)}`}var Ot=`/`+V,kt=f.z.object({description:_.BlockPackDescriptionManifest,channels:f.z.array(f.z.string()).default(()=>[]),manifestSha256:_.Sha256Schema}).passthrough(),K=f.z.object({schema:f.z.literal(`v2`),versions:f.z.array(kt)}).passthrough();function At(e){return`${e.organization}/${e.name}/${Dt}`}function jt(e){return`v2/${At(e)}`}function Mt(e){return`${W(e)}/${H}/`}function Nt(e){return`v2/${Mt(e)}`}var Pt=/(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<name>[^/]+))\/(?<version>[^/]+)\/manifest\.json$/,q=`v2/${Tt}`,Ft=`v2/${Et}`;function It(e){let t=f.z.object({id:_.BlockPackIdNoVersion,allVersions:f.z.array(f.z.string()).optional(),allVersionsWithChannels:f.z.array(_.VersionWithChannels).optional(),latest:e,latestManifestSha256:_.Sha256Schema,latestByChannel:f.z.record(f.z.string(),f.z.object({description:e,manifestSha256:_.Sha256Schema}).passthrough()).default({})}).passthrough();return t.transform(e=>e.allVersionsWithChannels?e:{...e,allVersionsWithChannels:e.allVersions.map(e=>({version:e,channels:[]}))}).transform(e=>e.latestByChannel[_.AnyChannel]?e:{...e,latestByChannel:{...e.latestByChannel,[_.AnyChannel]:{description:e.latest,manifestSha256:e.latestManifestSha256}}}).pipe(t.required({allVersionsWithChannels:!0}))}var Lt=It(_.BlockPackDescriptionManifest);function J(e){return f.z.object({schema:f.z.literal(`v2`),packages:f.z.array(It(e))}).passthrough()}var Y=J(_.BlockPackDescriptionManifest);function Rt(e){return(0,_.CreateBlockPackDescriptionSchema)(_.BlockComponentsManifest,(0,_.BlockPackMeta)(_.ContentRelativeText.transform(D(e)),_.ContentRelativeBinary.transform(O(e))))}function zt(e){return J((0,_.CreateBlockPackDescriptionSchema)(_.BlockComponentsManifest,(0,_.BlockPackMeta)(_.ContentRelativeText.transform(D(e)),_.ContentRelativeBinary.transform(O(e)))))}function Bt(e){return J((0,_.CreateBlockPackDescriptionSchema)(_.BlockComponentsManifest,(0,_.BlockPackMeta)(_.ContentRelativeText.transform(D(e)),_.ContentRelativeBinary.transform(O(e)))))}var Vt=class{gzipAsync=(0,ee.promisify)(y.gzip);gunzipAsync=(0,ee.promisify)(y.gunzip);constructor(e,t=new x.ConsoleLoggerAdapter,n={}){this.storage=e,this.logger=t,this.settings=n}generateTimestamp(){return`${new Date().toISOString().replace(/:/g,`-`).replace(/\.(\d{3})Z$/,`.$1Z`)}-${Math.random().toString(36).substring(2,6)}`}generatePreWriteTimestamp(){return`${new Date().toISOString().replace(/:/g,`-`).replace(/\.(\d{3})Z$/,`.$1Z`)}-prewrite-${Math.random().toString(36).substring(2,6)}`}async createGlobalOverviewSnapshot(e,t){if(!this.settings.skipSnapshotCreation)try{let n=await this.gzipAsync(e),r=St(t);await this.storage.putFile(r,Buffer.from(n)),this.logger.info(`Global overview snapshot created at ${r}`)}catch(e){this.logger.warn(`Failed to create global overview snapshot: ${String(e)}`)}}async createPackageOverviewSnapshot(e,t,n){if(!this.settings.skipSnapshotCreation)try{let r=JSON.stringify(t),i=await this.gzipAsync(r),a=Ct(e,n);await this.storage.putFile(a,Buffer.from(i)),this.logger.info(`Package overview snapshot created at ${a} for ${e.organization}:${e.name}`)}catch(t){this.logger.warn(`Failed to create package overview snapshot for ${e.organization}:${e.name}: ${String(t)}`)}}async updateRegistry(e=`normal`){this.logger.info(`Initiating registry refresh...`);let t=this.generateTimestamp(),n=new Map,r=[],i=await this.storage.listFiles(mt),a=({organization:e,name:t,version:r})=>{let i=`${e}:${t}`,a=n.get(i);return a?a.versions.has(r)?!1:(a.versions.add(r),!0):(n.set(i,{package:{organization:e,name:t},versions:new Set([r])}),!0)};this.logger.info(`Packages to be updated:`);for(let e of i){let t=e.match(gt);if(!t)continue;r.push(e);let{organization:n,name:i,version:o,seed:s}=t.groups,c=a({organization:n,name:i,version:o});this.logger.info(` - ${n}:${i}:${o} added:${c}`)}if(e===`force`){let e=await this.storage.listFiles(`v2/`);for(let t of e){let e=t.match(Pt);if(!e)continue;let{organization:n,name:r,version:i}=e.groups,o=a({organization:n,name:r,version:i});this.logger.info(` - ${n}:${r}:${i} force_added:${o}`)}}let o=await this.storage.getFile(q);if(e===`force`&&o!==void 0){let e=this.generatePreWriteTimestamp();await this.createGlobalOverviewSnapshot(o.toString(),e)}let s=(e===`force`||o===void 0?{schema:`v2`,packages:[]}:Y.parse(JSON.parse(o.toString()))).packages;this.logger.info(`Global overview ${e===`force`?`starting empty (force mode)`:`loaded`}, ${s.length} records`);for(let[,r]of n.entries()){let n=jt(r.package),i=await this.storage.getFile(n);if(e===`force`&&i!==void 0){let e=this.generatePreWriteTimestamp(),t=K.parse(JSON.parse(i.toString()));await this.createPackageOverviewSnapshot(r.package,t,e)}let a=e===`force`||i===void 0?{schema:`v2`,versions:[]}:K.parse(JSON.parse(i.toString()));this.logger.info(`Updating ${r.package.organization}:${r.package.name} overview${e===`force`?` (starting empty in force mode)`:``}, ${a.versions.length} records`);let o=a.versions.filter(e=>!r.versions.has(e.description.id.version));for(let[e]of r.versions.entries()){let t=e.toString(),n={...r.package,version:t},i=await this.storage.getFile(G(n)+Ot);if(!i)continue;let a=await k(i),s=(await this.storage.listFiles(Nt(n))).filter(e=>e.match(U)?!0:(this.logger.warn(`Unexpected channel in ${(0,_.blockPackIdToString)(n)}: ${e}`),!1));o.push({description:we(t).parse(_.BlockPackManifest.parse(JSON.parse(i.toString(`utf8`))).description),manifestSha256:a,channels:s})}o.sort((e,t)=>(0,B.compare)(t.description.id.version,e.description.id.version));let c={schema:`v2`,versions:o};e!==`dry-run`&&(await this.storage.putFile(n,Buffer.from(JSON.stringify(c))),await this.createPackageOverviewSnapshot(r.package,c,t)),this.logger.info(`Done (${o.length} records)`);let l=new Set;for(let e of o)for(let t of e.channels)l.add(t);s=s.filter(e=>e.id.organization!==r.package.organization||e.id.name!==r.package.name);let u=we(`${r.package.organization}/${r.package.name}`);s.push({id:{organization:r.package.organization,name:r.package.name},allVersions:o.map(e=>e.description.id.version).reverse(),allVersionsWithChannels:o.map(e=>({version:e.description.id.version,channels:e.channels})).reverse(),latest:u.parse(o[0].description),latestManifestSha256:o[0].manifestSha256,latestByChannel:Object.fromEntries([...l,_.AnyChannel].map(e=>{let t=o.find(t=>e===_.AnyChannel||t.channels.indexOf(e)!==-1);if(!t)throw Error(`Assertion error`);return[e,{description:u.parse(t.description),manifestSha256:t?.manifestSha256}]}))})}if(e!==`dry-run`){let e=JSON.stringify({schema:`v2`,packages:s}),n=Buffer.from(e);await this.storage.putFile(q,n);let r=await this.gzipAsync(e);await this.storage.putFile(Ft,Buffer.from(r)),await this.createGlobalOverviewSnapshot(e,t)}this.logger.info(`Global overview updated (${s.length} records)`),e!==`dry-run`&&await this.storage.deleteFiles(...r.map(e=>`${mt}${e}`)),this.logger.info(`Version update requests cleared`)}async updateIfNeeded(e=`normal`){this.logger.info(`Checking if registry requires refresh...`);let t=await this.storage.getFile(_t),n=await this.storage.getFile(vt);if(e!==`force`&&t===void 0&&n===void 0){this.logger.info(`No global seed files found, update not needed.`);return}if(e!==`force`&&t!==void 0&&n!==void 0&&t.equals(n)){this.logger.info(`Registry is up to date.`);return}await this.updateRegistry(e),t&&(e!==`dry-run`&&await this.storage.putFile(vt,t),this.logger.info(`Refresh finished.`))}async getPackageOverview(e){let t=await this.storage.getFile(jt(e));if(t!==void 0)return K.parse(JSON.parse(t.toString()))}async getGlobalOverview(){let e=await this.storage.getFile(q);if(e!==void 0)return Y.parse(JSON.parse(e.toString()))}async marchChanged(e){let t=(0,b.randomUUID)(),n=ht(e,t);this.logger.info(`Creating update seed at ${n} ...`),await this.storage.putFile(n,Buffer.from(t)),this.logger.info(`Touching global update seed ${_t} ...`),await this.storage.putFile(_t,Buffer.from(t))}async addPackageToChannel(e,t){if(!t.match(U))throw Error(`Illegal characters in channel name: ${t}`);let n=G(e);if(await this.storage.getFile(`${n}/manifest.json`)===void 0)throw Error(`Package ${(0,_.blockPackIdToString)(e)} not found in the registry.`);await this.storage.putFile(`${n}/${H}/${t}`,Buffer.from(t)),await this.marchChanged(e)}async removePackageFromChannel(e,t){if(!t.match(U))throw Error(`Illegal characters in channel name: ${t}`);let n=G(e);if(await this.storage.getFile(`${n}/manifest.json`)===void 0)throw Error(`Package ${(0,_.blockPackIdToString)(e)} not found in the registry.`);await this.storage.deleteFiles(`${n}/${H}/${t}`),await this.marchChanged(e)}async listGlobalOverviewSnapshots(){let e=await this.storage.listFiles(yt),t=[];for(let n of e){let e=n.indexOf(`/`)===-1?n:n.substring(n.lastIndexOf(`/`)+1),r=e.match(xt);r&&t.push({timestamp:r.groups.timestamp,path:yt+e})}return t.sort((e,t)=>t.timestamp.localeCompare(e.timestamp)),t}async restoreGlobalOverviewFromSnapshot(e){let t=St(e),n=await this.storage.getFile(t);if(!n)throw Error(`Snapshot ${e} not found at ${t}`);let r=(await this.gunzipAsync(n)).toString(`utf8`);try{Y.parse(JSON.parse(r))}catch(t){throw Error(`Invalid snapshot data in ${e}: ${String(t)}`)}let i=Buffer.from(r);await this.storage.putFile(q,i);let a=await this.gzipAsync(r);await this.storage.putFile(Ft,Buffer.from(a)),this.logger.info(`Global overview restored from snapshot ${e}`)}async publishPackage(e,t){let n=G(e.description.id);for(let r of e.files){let e=await t(r.name);if(e.length!==r.size)throw Error(`Actual file size don't match file size from the manifest file for ${r.name} (actual = ${e.length}; manifest = ${r.size})`);let i=await k(e);if(i!==r.sha256.toUpperCase())throw Error(`Actual file SHA-256 don't match the checksum from the manifest file for ${r.name} (actual = ${i}; manifest = ${r.sha256.toUpperCase()})`);let a=n+`/`+r.name;this.logger.info(`Uploading ${r.name} -> ${a} ...`),await this.storage.putFile(a,e)}let r=n+`/`+V;this.logger.info(`Uploading manifest to ${r} ...`),await this.storage.putFile(r,Buffer.from(JSON.stringify(e))),await this.marchChanged(e.description.id)}},Ht={cacheBlockListFor:45e3,keepStaleBlockListFor:3e5};function Ut(e,t){let n=B.inc(e,`minor`),r=B.inc(e,`major`),i=[],a=t.find(t=>B.gt(t,e)&&B.lt(t,n)),o=t.find(e=>B.gte(e,n)&&B.lt(e,r)),s=t.find(e=>B.gte(e,r));return a&&i.push({type:`patch`,update:a}),o&&i.push({type:`minor`,update:o}),s&&i.push({type:`major`,update:s}),i}var Wt=class{v2RootFolderReader;ops;constructor(e,t){this.registryReader=e,this.v2RootFolderReader=e.relativeReader(`v2/`),this.ops={...Ht,...t}}embeddedGlobalMetaCache=new te.LRUCache({max:500,fetchMethod:async(e,t,n)=>await(0,x.retry)(async()=>await ve(n.context.relativeTo===void 0?this.v2RootFolderReader.getContentReader():this.v2RootFolderReader.relativeReader(W(n.context.relativeTo)).getContentReader()).parseAsync(n.context.meta),x.Retry2TimesWithDelay)});async embedMetaContent(e,t,n,r){return await this.embeddedGlobalMetaCache.forceFetch((0,S.default)({id:e,sha256:t,absolutePath:n}),{context:{meta:r,relativeTo:n?void 0:e}})}listCacheTimestamp=0;listCache=void 0;async listBlockPacks(e){if(this.listCache!==void 0&&Date.now()-this.listCacheTimestamp<=this.ops.cacheBlockListFor)return this.listCache;try{return await(0,x.retry)(async()=>{let t=Y.parse(JSON.parse(Buffer.from(await this.v2RootFolderReader.readFile(Tt,{signal:e?.signal})).toString())),n=await Promise.all(t.packages.map(async e=>{let t=await Promise.all(Object.entries(e.latestByChannel).map(async([e,t])=>[e,{id:t.description.id,meta:await this.embedMetaContent(t.description.id,t.manifestSha256,!0,t.description.meta),featureFlags:t.description.featureFlags,spec:{type:`from-registry-v2`,id:t.description.id,registryUrl:this.registryReader.rootUrl.toString(),channel:e}}]));return{id:e.id,latestByChannel:Object.fromEntries(t),allVersions:e.allVersionsWithChannels}}));return this.listCache=n,this.listCacheTimestamp=Date.now(),n},x.Retry2TimesWithDelay)}catch(e){if(this.listCache!==void 0&&Date.now()-this.listCacheTimestamp<=this.ops.keepStaleBlockListFor)return this.listCache;throw e}}async getLatestOverview(e,t){let n=(await this.listBlockPacks()).find(t=>(0,_.blockPackIdNoVersionEquals)(e,t.id));if(n!==void 0)return n.latestByChannel[t]}async getUpdateSuggestions(e,t){let n=(await this.listBlockPacks()).find(t=>(0,_.blockPackIdNoVersionEquals)(e,t.id));if(n===void 0)return;let r=n.allVersions.filter(e=>t===_.AnyChannel||e.channels.indexOf(t)>=0).map(e=>e.version);return r.reverse(),Ut(e.version,r)}async getSpecificOverview(e,t){return await(0,x.retry)(async()=>{let n=await this.v2RootFolderReader.readFile(W(e)+Ot),r=_.BlockPackManifest.parse(JSON.parse(Buffer.from(n).toString()));return{id:e,meta:await this.embedMetaContent(e,await k(n),!1,r.description.meta),spec:{type:`from-registry-v2`,id:e,registryUrl:this.registryReader.rootUrl.toString(),channel:t}}},x.Retry2TimesWithDelay)}componentsCache=new te.LRUCache({max:500,fetchMethod:async(e,t,{context:n})=>await(0,x.retry)(async()=>{let e=this.v2RootFolderReader.relativeReader(W(n)),t=_.BlockPackManifest.parse(JSON.parse(Buffer.from(await e.readFile(V)).toString()));return xe(e.rootUrl.toString()).parse(t.description.components)},x.Retry2TimesWithDelay)});async getComponents(e){return await this.componentsCache.forceFetch((0,S.default)(e),{context:e})}},Gt=class{constructor(e,t,n){this.client=e,this.bucket=t,this.root=n}async getFile(e){try{return Buffer.from(await(await this.client.getObject({Bucket:this.bucket,Key:C.default.join(this.root,e)})).Body.transformToByteArray())}catch(e){if(e instanceof Error&&e.name===`NoSuchKey`)return;throw e}}async listFiles(e){let t=C.default.join(this.root,e),n=(0,ne.paginateListObjectsV2)({client:this.client},{Bucket:this.bucket,Prefix:t}),r=[];for await(let e of n)r.push(...(e.Contents??[]).map(e=>C.default.relative(t,e.Key)));return r}async putFile(e,t){await this.client.putObject({Bucket:this.bucket,Key:C.default.join(this.root,e),Body:t})}async deleteFiles(...e){let t=await this.client.deleteObjects({Bucket:this.bucket,Delete:{Objects:e.map(e=>({Key:C.default.join(this.root,e)}))}});if(t.Errors!==void 0&&t.Errors.length>0)throw Error(`Errors encountered while deleting files: ${t.Errors.map(e=>e.Message??e.Code??`Unknown error`).join(`
2
+ `)}`)}},Kt=class{root;constructor(e){this.root=u.default.resolve(e)}toAbsolutePath(e){if(C.default.isAbsolute(e))throw Error(`absolute path`);return u.default.resolve(this.root,e.split(C.default.sep).join(u.default.sep))}async getFile(e){try{return await d.promises.readFile(this.toAbsolutePath(e))}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}}async listFiles(e){try{let t=this.toAbsolutePath(e);return(await d.promises.readdir(t,{recursive:!0,withFileTypes:!0})).filter(e=>e.isFile()).map(e=>u.default.relative(t,u.default.resolve(e.parentPath,e.name)).split(u.default.sep).join(C.default.sep))}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return[];throw e}}async putFile(e,t){let n=this.toAbsolutePath(e);await d.promises.mkdir(u.default.dirname(n),{recursive:!0}),await d.promises.writeFile(n,t)}async deleteFiles(...e){for(let t of e)await d.promises.rm(this.toAbsolutePath(t))}};function qt(e){let t=new URL(e,`file:${u.default.resolve(`.`).split(u.default.sep).join(C.default.sep)}/`);switch(t.protocol){case`file:`:return new Kt(u.default.resolve(t.pathname));case`s3:`:{let e={},n=t.searchParams.get(`region`);n&&(e.region=n);let r=t.hostname;return new Gt(new ne.S3(e),r,t.pathname.replace(/^\//,``))}default:throw Error(`Unknown protocol: ${t.protocol}`)}}var Jt=class e{constructor(e,t){this.rootUrl=e,this.httpDispatcher=t}async readFile(e,t){let n=await(0,re.request)(new URL(e,this.rootUrl),{dispatcher:this.httpDispatcher,signal:t?.signal});return Buffer.from(await n.body.arrayBuffer())}relativeReader(t){return t.endsWith(`/`)||(t+=`/`),new e(new URL(t,this.rootUrl),this.httpDispatcher)}getContentReader(e){let t=e===void 0?this:this.relativeReader(e);return e=>t.readFile(e)}},Yt=class e{constructor(e,t){this.rootUrl=e,this.root=t}async readFile(e,t){let n=u.default.join(this.root,...e.split(C.default.sep));return await p.default.readFile(n,{signal:t?.signal})}relativeReader(t){return t.endsWith(`/`)||(t+=`/`),new e(new URL(t,this.rootUrl),u.default.join(this.root,...t.split(C.default.sep)))}getContentReader(e){let t=e===void 0?this:this.relativeReader(e);return e=>t.readFile(e)}};function Xt(e){return e.split(C.default.sep).join(u.default.sep)}function Zt(e){return e.split(u.default.sep).join(C.default.sep)}function Qt(e,t){e.endsWith(`/`)||(e+=`/`);let n=new URL(e,`file:${Zt(u.default.resolve(`.`))}/`);switch(n.protocol){case`file:`:return new Yt(n,Xt(n.pathname));case`https:`:case`http:`:return new Jt(n,t??(0,ie.defaultHttpDispatcher)());default:throw Error(`Unknown protocol: ${n.protocol}`)}}var $t=f.z.string().regex(/^(?:s3:|file:)/),en=f.z.object({organization:f.z.string(),package:f.z.string(),version:_.SemVer.optional(),files:f.z.record(f.z.string().regex(/^[^/]+$/),f.z.string()).default({}),meta:f.z.object({}).passthrough()}),tn=f.z.object({registries:f.z.record(f.z.string(),$t).default({}),registry:f.z.string().optional()}),nn=tn.merge(en).required({registry:!0,version:!0}),X=nn.partial().required({registries:!0,files:!0}),rn=`pl.package.json`,an=`pl.package.yaml`,Z=`v1/`;function on(e){return`${Z}${e.organization}/${e.package}/${e.version}`}function sn(e,t){return`${Z}${e.organization}/${e.package}/${e.version}/${t}`}function cn(e){return`${Z}${e.organization}/${e.package}/overview.json`}var Q=`${Z}overview.json`,ln=`meta.json`,un=`_updates_v1/per_package_version/`;function dn(e,t){return`${un}${e.organization}/${e.package}/${e.version}/${t}`}var fn=/(?<packageKeyWithoutVersion>(?<organization>[^/]+)\/(?<pkg>[^/]+))\/(?<version>[^/]+)\/(?<seed>[^/]+)$/,pn=`_updates_v1/_global_update_in`,mn=`_updates_v1/_global_update_out`,hn=class{constructor(e,t){this.storage=e,this.logger=t}constructNewPackage(e){return new gn(this.storage,e)}async updateRegistry(){this.logger?.info(`Initiating registry refresh...`);let e=new Map,t=[],n=await this.storage.listFiles(un);this.logger?.info(`Packages to be updated:`);for(let r of n){let n=r.match(fn);if(!n)continue;t.push(r);let{packageKeyWithoutVersion:i,organization:a,pkg:o,version:s,seed:c}=n.groups,l=e.get(i);l?l.versions.has(s)||l.versions.add(s):e.set(i,{package:{organization:a,package:o},versions:new Set([s])}),this.logger?.info(` - ${a}:${o}:${s}`)}let r=await this.storage.getFile(Q),i=r===void 0?[]:JSON.parse(r.toString());this.logger?.info(`Global overview loaded, ${i.length} records`);for(let[,t]of e.entries()){let e=cn(t.package),n=await this.storage.getFile(e),r=n===void 0?[]:JSON.parse(n.toString());this.logger?.info(`Updating ${t.package.organization}:${t.package.package} overview, ${r.length} records`),r=r.filter(e=>!t.versions.has(e.version));for(let[e]of t.versions.entries()){let n=e.toString(),i=await this.storage.getFile(sn({...t.package,version:n},ln));i&&r.push({version:n,meta:JSON.parse(i.toString())})}r.sort((e,t)=>B.compare(t.version,e.version)),await this.storage.putFile(e,Buffer.from(JSON.stringify(r))),this.logger?.info(`Done (${r.length} records)`),i=i.filter(e=>e.organization!==t.package.organization||e.package!==t.package.package),i.push({organization:t.package.organization,package:t.package.package,allVersions:r.map(e=>e.version).reverse(),latestVersion:r[0].version,latestMeta:r[0].meta})}await this.storage.putFile(Q,Buffer.from(JSON.stringify(i))),this.logger?.info(`Global overview updated (${i.length} records)`),await this.storage.deleteFiles(...t.map(e=>`${un}${e}`)),this.logger?.info(`Version update requests cleared`)}async updateIfNeeded(e=!1){this.logger?.info(`Checking if registry requires refresh...`);let t=await this.storage.getFile(pn),n=await this.storage.getFile(mn);!e&&t===void 0&&n===void 0||!e&&t!==void 0&&n!==void 0&&t.equals(n)||(await this.updateRegistry(),t&&(await this.storage.putFile(mn,t),this.logger?.info(`Refresh finished`)))}async getPackageOverview(e){let t=await this.storage.getFile(cn(e));if(t!==void 0)return JSON.parse(t.toString())}async getGlobalOverview(){let e=await this.storage.getFile(Q);if(e!==void 0)return JSON.parse(e.toString())}},gn=class{metaAdded=!1;seed=(0,b.randomUUID)();constructor(e,t){this.storage=e,this.name=t}async addFile(e,t){await this.storage.putFile(sn(this.name,e),t)}async writeMeta(e){await this.addFile(ln,Buffer.from(JSON.stringify(e))),this.metaAdded=!0}async finish(){if(!this.metaAdded)throw Error(`meta not added`);await this.storage.putFile(dn(this.name,this.seed),Buffer.of(0)),await this.storage.putFile(pn,Buffer.from(this.seed))}};function $(e,t){return t===void 0?e:{...e,...t,registries:{...e.registries,...t.registries},files:{...e.files,...t.files}}}async function _n(e){return Te(e,e=>X.parse(JSON.parse(e.toString())))}async function vn(e){return Te(e,e=>X.parse(w.default.parse(e.toString())))}async function yn(){let e=X.parse({});return e=$(e,await _n(`./.pl.reg.json`)),e=$(e,await vn(`./.pl.reg.yaml`)),e=$(e,await _n(`${T.homedir()}/.pl.reg.json`)),e=$(e,await vn(`${T.homedir()}/.pl.reg.yaml`)),e=$(e,await _n(rn)),e=$(e,await vn(an)),e}var bn=class{constructor(e){this.conf=e}createRegistry(e){let t=this.conf.registry;if(!t.startsWith(`file:`)&&!t.startsWith(`s3:`)){let e=this.conf.registries[t];if(!e)throw Error(`Registry with alias "${t}" not found`);t=e}return new hn(qt(t),e)}get fullPackageName(){return{organization:this.conf.organization,package:this.conf.package,version:this.conf.version}}};async function xn(e){let t=await yn();return new bn(nn.parse($(t,e)))}Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return ln}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return xn}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return sn}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return bn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Dt}});
3
+ //# sourceMappingURL=config-C8wPuCgh.js.map