@cmflow/cli 3.4.0 → 3.6.0

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.
Files changed (44) hide show
  1. package/dist/bin/cm.mjs +16 -8699
  2. package/dist/bin/cmrelease.mjs +0 -8676
  3. package/dist/common-51c2M9y0.mjs +4 -0
  4. package/dist/common-51c2M9y0.mjs.map +1 -0
  5. package/dist/{compile-packages-CPkDuiiR.mjs → compile-packages-BbF1save.mjs} +2 -2
  6. package/dist/{compile-packages-CPkDuiiR.mjs.map → compile-packages-BbF1save.mjs.map} +1 -1
  7. package/dist/{docker-CwPUDL7v.mjs → docker-DXhAJ3ii.mjs} +2 -2
  8. package/dist/{docker-CwPUDL7v.mjs.map → docker-DXhAJ3ii.mjs.map} +1 -1
  9. package/dist/{docker-clean-tags-4Z1VHhE4.mjs → docker-clean-tags-CGWL7cFn.mjs} +2 -2
  10. package/dist/{docker-clean-tags-4Z1VHhE4.mjs.map → docker-clean-tags-CGWL7cFn.mjs.map} +1 -1
  11. package/dist/{docker-publish-BFuDmUA1.mjs → docker-publish-YJqQd34C.mjs} +2 -2
  12. package/dist/{docker-publish-BFuDmUA1.mjs.map → docker-publish-YJqQd34C.mjs.map} +1 -1
  13. package/dist/{find-packages-C6Y7bRd0.mjs → find-packages-CG9LQebY.mjs} +2 -2
  14. package/dist/{find-packages-C6Y7bRd0.mjs.map → find-packages-CG9LQebY.mjs.map} +1 -1
  15. package/dist/get-config-m5362szF.mjs +42 -0
  16. package/dist/get-config-m5362szF.mjs.map +1 -0
  17. package/dist/index.d.mts +0 -350
  18. package/dist/index.mjs +15 -15
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/{npm-CN1gb9zd.mjs → npm-DPLnAVRR.mjs} +2 -2
  21. package/dist/{npm-CN1gb9zd.mjs.map → npm-DPLnAVRR.mjs.map} +1 -1
  22. package/dist/semantic/core/analyze-commits.mjs +1 -1
  23. package/dist/semantic/core/conditional.mjs +1 -1
  24. package/dist/semantic/core/exit.mjs +1 -1
  25. package/dist/semantic/core/prepare/artifacts.mjs +1 -1
  26. package/dist/semantic/core/prepare/bump-version.mjs +1 -1
  27. package/dist/semantic/core/prepare/commit.mjs +1 -1
  28. package/dist/semantic/core/publish-packages.mjs +1 -1
  29. package/dist/semantic/core/push-release.mjs +1 -1
  30. package/dist/semantic/core/run.mjs +1 -1
  31. package/dist/semantic/core/sync-repository.mjs +1 -1
  32. package/dist/semantic/core/verify-conditions.mjs +1 -1
  33. package/dist/semantic/core/verify-release.mjs +1 -1
  34. package/dist/semantic/docker/publish.mjs +1 -1
  35. package/dist/semantic/docker/success.mjs +1 -1
  36. package/dist/{source-DKfioGh_.mjs → source-CehOU1XK.mjs} +2 -2
  37. package/dist/{source-DKfioGh_.mjs.map → source-CehOU1XK.mjs.map} +1 -1
  38. package/dist/{write-packages-BuxaZvCH.mjs → write-packages-CfzjR7WR.mjs} +2 -2
  39. package/dist/{write-packages-BuxaZvCH.mjs.map → write-packages-CfzjR7WR.mjs.map} +1 -1
  40. package/package.json +3 -4
  41. package/dist/common-Dk_Pm7J8.mjs +0 -4
  42. package/dist/common-Dk_Pm7J8.mjs.map +0 -1
  43. package/dist/get-config-DvDR_kk5.mjs +0 -44
  44. package/dist/get-config-DvDR_kk5.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,38 +1,38 @@
1
1
  import { fileURLToPath as __cliFileURLToPath } from "node:url";
2
2
  const __filename = __cliFileURLToPath(import.meta.url);
3
- import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-DQqWX4ve.mjs";import{D as i,E as a,S as o,_ as s,a as c,b as l,c as u,d,f,g as p,h as m,i as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w,v as T,w as E,x as D,y as O}from"./get-config-DvDR_kk5.mjs";import{a as k,i as ee,n as A,o as j,r as te,s as ne,t as re}from"./common-Dk_Pm7J8.mjs";import{n as M,r as ie,t as ae}from"./docker-CwPUDL7v.mjs";import{t as oe}from"./npm-CN1gb9zd.mjs";import{t as N}from"./source-DKfioGh_.mjs";import{t as P}from"./docker-clean-tags-4Z1VHhE4.mjs";import{t as se}from"./docker-publish-BFuDmUA1.mjs";import{t as ce}from"./semver-BEj6Vrs4.mjs";import{n as le,t as ue}from"./compile-packages-CPkDuiiR.mjs";import{n as de,t as fe}from"./write-packages-BuxaZvCH.mjs";import pe from"node:child_process";import{stripVTControlCharacters as me}from"node:util";import F from"node:process";import he from"node:path";import{EventEmitter as ge}from"node:events";import _e from"node:fs";import{isCancel as ve,select as I,text as ye}from"@clack/prompts";import be from"semantic-release";var xe=i();function Se(e){let{output:t=[]}=e;return{title:`Refresh local repository`,task:()=>[{title:`Git fetch`,task:()=>o.fetch(`--prune`).toObservable().pipe((0,xe.tap)(e=>t.push(e)),(0,xe.catchError)(e=>(t.push(e),xe.EMPTY)))}]}}var Ce=class{mapContext(e,t){return{...t,output:[]}}getTasks(e){return[Se(e)]}success(){let e=o.branchesInfos(`-r`);for(let{branch:t,date:n,creation:r,author:i}of e)console.log(`${n}\t${r}\t${i}\t${t}`)}},L=e(N(),1),R=class{mapContext(e,t){return{...t}}getTasks(e){return[{title:`Clean docker tags`,task:()=>P(e)}]}success(){console.log(L.default.green(a.tick),`Docker tags cleaned`)}},we=class{mapContext(e,t){return{...t,config:v()}}getTasks(e){return[{title:`Configure workspace`,task:()=>te(e)}]}},Te=class{mapContext(e,t){return{...t,target:e.target,config:v()}}getTasks(e){return[{title:`Deploy on docker`,task:()=>se(e)}]}success(){console.log(L.default.green(a.tick),`Docker image deployed`)}},Ee=class{mapContext(e,t){return{...t,output:[]}}getTasks(e){return[Se(e)]}success(e){let t=e.output??[];console.log(t.filter(e=>!e.match(`Fetching`)).join(`
4
- `))}};const z=({config:{E2E_CMD:e,PACKAGE_MANAGER:t},skipTest:n,skipUnit:r,skipE2E:i})=>[{title:`Unit test`,skip:()=>!!(n||r),task:()=>A(t).run(`test`)},{title:`E2E test`,skip:()=>!!(n||i),task:()=>A(t).run(e||`test_e2e`)},{title:`Reset changes`,skip:()=>!!n,task:()=>o.reset(`--hard`)}];async function De({featureBranch:e,origin:t,force:n}){if(o.branchExists(e,t)&&!n&&o.checkBranchRemoteStatus(e))throw Error(`Remote branch changed, check diff before continue`)}const Oe=e=>{let{origin:t,fromBranch:n,checkStatus:r=!0,rebase:i=!0}=e;return{title:`Rebase branch`,task:()=>[{title:`Check status`,enabled:()=>r,task:()=>De(e)},{title:`Rebase from ${t}/${L.default.green(n)}`,enabled:()=>i,task:()=>o.rebase(`${t}/${n}`).toObservable()}]}};var ke=r(((e,t)=>{var n=w();function r(){this.__data__=new n,this.size=0}t.exports=r})),Ae=r(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),je=r(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),Me=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Ne=r(((e,t)=>{var n=w(),r=g(),i=u(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),Pe=r(((e,t)=>{var n=w(),r=ke(),i=Ae(),a=je(),o=Me(),s=Ne();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Fe=r(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),Ie=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Le=r(((e,t)=>{var n=u(),r=Fe(),i=Ie();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Re=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),ze=r(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Be=r(((e,t)=>{var n=Le(),r=Re(),i=ze(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),B=r(((e,t)=>{t.exports=O().Uint8Array})),Ve=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),He=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Ue=r(((e,t)=>{var n=T(),r=B(),i=d(),a=Be(),o=Ve(),s=He(),c=1,l=2,u=`[object Boolean]`,f=`[object Date]`,p=`[object Error]`,m=`[object Map]`,h=`[object Number]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object Symbol]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=n?n.prototype:void 0,C=S?S.valueOf:void 0;function w(e,t,n,d,S,w,T){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case f:case h:return i(+e,+t);case p:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+``;case m:var E=o;case _:var D=d&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;d|=l,T.set(e,t);var k=a(E(e),E(t),d,S,w,T);return T.delete(e),k;case y:if(C)return C.call(e)==C.call(t)}return!1}t.exports=w})),V=r(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),H=r(((e,t)=>{var n=V(),r=D();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),We=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),U=r(((e,t)=>{function n(){return[]}t.exports=n})),Ge=r(((e,t)=>{var n=We(),r=U(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Ke=r(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),qe=r(((e,t)=>{var n=s(),r=p(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),W=r(((e,t)=>{var n=qe(),r=p(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Je=r(((e,t)=>{function n(){return!1}t.exports=n})),G=r(((e,t)=>{var n=O(),r=Je(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),K=r(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),q=r(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Ye=r(((e,t)=>{var n=s(),r=q(),i=p(),a=`[object Arguments]`,o=`[object Array]`,c=`[object Boolean]`,l=`[object Date]`,u=`[object Error]`,d=`[object Function]`,f=`[object Map]`,m=`[object Number]`,h=`[object Object]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object WeakMap]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=`[object Float32Array]`,C=`[object Float64Array]`,w=`[object Int8Array]`,T=`[object Int16Array]`,E=`[object Int32Array]`,D=`[object Uint8Array]`,O=`[object Uint8ClampedArray]`,k=`[object Uint16Array]`,ee=`[object Uint32Array]`,A={};A[S]=A[C]=A[w]=A[T]=A[E]=A[D]=A[O]=A[k]=A[ee]=!0,A[a]=A[o]=A[b]=A[c]=A[x]=A[l]=A[u]=A[d]=A[f]=A[m]=A[h]=A[g]=A[_]=A[v]=A[y]=!1;function j(e){return i(e)&&r(e.length)&&!!A[n(e)]}t.exports=j})),Xe=r(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Ze=r(((e,t)=>{var n=l(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Qe=r(((e,t)=>{var n=Ye(),r=Xe(),i=Ze(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),$e=r(((e,t)=>{var n=Ke(),r=W(),i=D(),a=G(),o=K(),s=Qe(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),et=r(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),tt=r(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),nt=r(((e,t)=>{t.exports=tt()(Object.keys,Object)})),rt=r(((e,t)=>{var n=et(),r=nt(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),it=r(((e,t)=>{var n=_(),r=q();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),at=r(((e,t)=>{var n=$e(),r=rt(),i=it();function a(e){return i(e)?n(e):r(e)}t.exports=a})),ot=r(((e,t)=>{var n=H(),r=Ge(),i=at();function a(e){return n(e,i,r)}t.exports=a})),st=r(((e,t)=>{var n=ot(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),J=r(((e,t)=>{t.exports=f()(O(),`DataView`)})),ct=r(((e,t)=>{t.exports=f()(O(),`Promise`)})),lt=r(((e,t)=>{t.exports=f()(O(),`Set`)})),ut=r(((e,t)=>{t.exports=f()(O(),`WeakMap`)})),dt=r(((e,t)=>{var n=J(),r=g(),i=ct(),a=lt(),o=ut(),c=s(),l=b(),u=`[object Map]`,d=`[object Object]`,f=`[object Promise]`,p=`[object Set]`,m=`[object WeakMap]`,h=`[object DataView]`,_=l(n),v=l(r),y=l(i),x=l(a),S=l(o),C=c;(n&&C(new n(new ArrayBuffer(1)))!=h||r&&C(new r)!=u||i&&C(i.resolve())!=f||a&&C(new a)!=p||o&&C(new o)!=m)&&(C=function(e){var t=c(e),n=t==d?e.constructor:void 0,r=n?l(n):``;if(r)switch(r){case _:return h;case v:return u;case y:return f;case x:return p;case S:return m}return t}),t.exports=C})),ft=r(((e,t)=>{var n=Pe(),r=Be(),i=Ue(),a=st(),o=dt(),s=D(),c=G(),l=Qe(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),pt=r(((e,t)=>{var n=ft(),r=p();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),mt=e(r(((e,t)=>{var n=pt();function r(e,t){return n(e,t)}t.exports=r}))(),1);function ht(){let e=x();return{dependencies:e.dependencies,devDependencies:e.devDependencies}}function gt(){return Buffer.from(JSON.stringify(ht())).toString(`base64`)}function _t(){try{return JSON.parse(Buffer.from(o.config(`--local`,`npm.hash`),`base64`).toString(`utf8`))}catch{return``}}function vt(){return!(0,mt.default)(ht(),_t())}function yt(){o.config(`--local`,`npm.hash`,`${gt()}`)}const bt=({config:{PACKAGE_MANAGER:e}})=>{let t=vt();return{title:`Install`,enabled:()=>t,task:()=>[{title:`Restore dependencies using ${e.toUpperCase()}`,task:()=>A(e).restore().toObservable().pipe((0,xe.catchError)(t=>{throw e===`yarn`&&t.stderr.startsWith(`error Your lockfile needs to be updated`)?Error(`yarn.lock file is outdated. Run yarn, commit the updated lockfile and try again.`):t}))},{title:`Refresh metadata`,task:()=>yt()}]}};var xt=class extends Ee{mapContext(e,t){return{...t,origin:t.ORIGIN,featureBranch:o.getBranchName(),fromBranch:t.PRODUCTION_BRANCH,checkStatus:e.force===void 0||!!e.force,rebase:!0,skipTest:!e.cucumber&&!e.unitTest,skipUnit:!e.unitTest,skipE2E:!t.HAS_E2E||!e.cucumber}}getTasks(e){return[...super.getTasks(e),Oe(e),bt(e),...z(e)]}success(e){console.log(L.default.green(a.tick),`Branch ${L.default.green(e.featureBranch)} rebased from ${L.default.green(e.fromBranch)} HEAD`)}};function St({origin:e=`origin`,featureBranch:t,upstream:n=!0,noVerify:r=!0}){if(!t)throw Error(`A feature branch is required before pushing.`);return{title:`Push ${t}`,task:()=>o.push(...[n?`-u`:``,`-f`,e,t,r?`--no-verify`:``].filter(Boolean)).toObservable()}}var Ct=class extends xt{mapContext(e,t){return{...super.mapContext(e,t),checkStatus:!0,force:!0}}verifyConditions(e){e.featureBranch===e.fromBranch&&(console.error(L.default.red(`${a.cross} ${e.fromBranch} cannot be finished`)),process.exit(1))}getTasks(e){return[...super.getTasks(e),{title:`Add ${e.RELEASE_CANDIDATE_TAG} on last commit`,task(){let t=`${o.getLastCommitMsg()} ${e.config.RELEASE_CANDIDATE_TAG}`;return o.commit(`--amend`,`-m`,t).toObservable()}},St(e)]}success(e){console.log(L.default.green(a.tick),`Branch`,L.default.green(e.featureBranch),`is finished`)}},wt=r(((e,t)=>{
3
+ import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-DQqWX4ve.mjs";import{E as i,S as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E,y as D}from"./get-config-m5362szF.mjs";import{a as ee,i as O,n as te,o as k,r as A,s as ne,t as re}from"./common-51c2M9y0.mjs";import{n as ie,r as j,t as ae}from"./docker-DXhAJ3ii.mjs";import{t as oe}from"./npm-DPLnAVRR.mjs";import{t as se}from"./source-CehOU1XK.mjs";import{t as M}from"./docker-clean-tags-CGWL7cFn.mjs";import{t as N}from"./docker-publish-YJqQd34C.mjs";import{t as ce}from"./semver-BEj6Vrs4.mjs";import{n as le,t as ue}from"./compile-packages-BbF1save.mjs";import{n as de,t as fe}from"./write-packages-CfzjR7WR.mjs";import pe from"node:child_process";import{stripVTControlCharacters as me}from"node:util";import P from"node:process";import he from"node:path";import{EventEmitter as ge}from"node:events";import _e from"node:fs";import{isCancel as ve,select as ye,text as F}from"@clack/prompts";import be from"semantic-release";function I(e){let{output:t=[]}=e;return{title:`Refresh local repository`,task:()=>[{title:`Git fetch`,task:()=>a.fetch(`--prune`).catch(e=>{t.push(e)})}]}}var xe=class{mapContext(e,t){return{...t,output:[]}}getTasks(e){return[I(e)]}success(){let e=a.branchesInfos(`-r`);for(let{branch:t,date:n,creation:r,author:i}of e)console.log(`${n}\t${r}\t${i}\t${t}`)}},L=e(se(),1),Se=class{mapContext(e,t){return{...t}}getTasks(e){return[{title:`Clean docker tags`,task:()=>M(e)}]}success(){console.log(L.default.green(i.tick),`Docker tags cleaned`)}},Ce=class{mapContext(e,t){return{...t,config:_()}}getTasks(e){return[{title:`Configure workspace`,task:()=>A(e)}]}},R=class{mapContext(e,t){return{...t,target:e.target,config:_()}}getTasks(e){return[{title:`Deploy on docker`,task:()=>N(e)}]}success(){console.log(L.default.green(i.tick),`Docker image deployed`)}},we=class{mapContext(e,t){return{...t,output:[]}}getTasks(e){return[I(e)]}success(e){let t=e.output??[];console.log(t.filter(e=>!e.match(`Fetching`)).join(`
4
+ `))}};const Te=({config:{E2E_CMD:e,PACKAGE_MANAGER:t},skipTest:n,skipUnit:r,skipE2E:i})=>[{title:`Unit test`,skip:()=>!!(n||r),task:()=>te(t).run(`test`)},{title:`E2E test`,skip:()=>!!(n||i),task:()=>te(t).run(e||`test_e2e`)},{title:`Reset changes`,skip:()=>!!n,task:()=>a.reset(`--hard`)}];async function Ee({featureBranch:e,origin:t,force:n}){if(a.branchExists(e,t)&&!n&&a.checkBranchRemoteStatus(e))throw Error(`Remote branch changed, check diff before continue`)}const z=e=>{let{origin:t,fromBranch:n,checkStatus:r=!0,rebase:i=!0}=e;return{title:`Rebase branch`,task:()=>[{title:`Check status`,enabled:()=>r,task:()=>Ee(e)},{title:`Rebase from ${t}/${L.default.green(n)}`,enabled:()=>i,task:()=>a.rebase(`${t}/${n}`)}]}};var De=r(((e,t)=>{var n=C();function r(){this.__data__=new n,this.size=0}t.exports=r})),Oe=r(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),ke=r(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),Ae=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),je=r(((e,t)=>{var n=C(),r=h(),i=l(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),Me=r(((e,t)=>{var n=C(),r=De(),i=Oe(),a=ke(),o=Ae(),s=je();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Ne=r(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),Pe=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Fe=r(((e,t)=>{var n=l(),r=Ne(),i=Pe();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Ie=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),Le=r(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Re=r(((e,t)=>{var n=Fe(),r=Ie(),i=Le(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),ze=r(((e,t)=>{t.exports=D().Uint8Array})),Be=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),B=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Ve=r(((e,t)=>{var n=w(),r=ze(),i=u(),a=Re(),o=Be(),s=B(),c=1,l=2,d=`[object Boolean]`,f=`[object Date]`,p=`[object Error]`,m=`[object Map]`,h=`[object Number]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object Symbol]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=n?n.prototype:void 0,C=S?S.valueOf:void 0;function T(e,t,n,u,S,w,T){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case d:case f:case h:return i(+e,+t);case p:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+``;case m:var E=o;case _:var D=u&c;if(E||=s,e.size!=t.size&&!D)return!1;var ee=T.get(e);if(ee)return ee==t;u|=l,T.set(e,t);var O=a(E(e),E(t),u,S,w,T);return T.delete(e),O;case y:if(C)return C.call(e)==C.call(t)}return!1}t.exports=T})),He=r(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),Ue=r(((e,t)=>{var n=He(),r=E();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),V=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),H=r(((e,t)=>{function n(){return[]}t.exports=n})),We=r(((e,t)=>{var n=V(),r=H(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),U=r(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Ge=r(((e,t)=>{var n=o(),r=f(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),Ke=r(((e,t)=>{var n=Ge(),r=f(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),qe=r(((e,t)=>{function n(){return!1}t.exports=n})),W=r(((e,t)=>{var n=D(),r=qe(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Je=r(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Ye=r(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),G=r(((e,t)=>{var n=o(),r=Ye(),i=f(),a=`[object Arguments]`,s=`[object Array]`,c=`[object Boolean]`,l=`[object Date]`,u=`[object Error]`,d=`[object Function]`,p=`[object Map]`,m=`[object Number]`,h=`[object Object]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object WeakMap]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=`[object Float32Array]`,C=`[object Float64Array]`,w=`[object Int8Array]`,T=`[object Int16Array]`,E=`[object Int32Array]`,D=`[object Uint8Array]`,ee=`[object Uint8ClampedArray]`,O=`[object Uint16Array]`,te=`[object Uint32Array]`,k={};k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[ee]=k[O]=k[te]=!0,k[a]=k[s]=k[b]=k[c]=k[x]=k[l]=k[u]=k[d]=k[p]=k[m]=k[h]=k[g]=k[_]=k[v]=k[y]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),K=r(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Xe=r(((e,t)=>{var n=c(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Ze=r(((e,t)=>{var n=G(),r=K(),i=Xe(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Qe=r(((e,t)=>{var n=U(),r=Ke(),i=E(),a=W(),o=Je(),s=Ze(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),$e=r(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),et=r(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),tt=r(((e,t)=>{t.exports=et()(Object.keys,Object)})),nt=r(((e,t)=>{var n=$e(),r=tt(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),rt=r(((e,t)=>{var n=g(),r=Ye();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),it=r(((e,t)=>{var n=Qe(),r=nt(),i=rt();function a(e){return i(e)?n(e):r(e)}t.exports=a})),at=r(((e,t)=>{var n=Ue(),r=We(),i=it();function a(e){return n(e,i,r)}t.exports=a})),ot=r(((e,t)=>{var n=at(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),st=r(((e,t)=>{t.exports=d()(D(),`DataView`)})),ct=r(((e,t)=>{t.exports=d()(D(),`Promise`)})),q=r(((e,t)=>{t.exports=d()(D(),`Set`)})),lt=r(((e,t)=>{t.exports=d()(D(),`WeakMap`)})),ut=r(((e,t)=>{var n=st(),r=h(),i=ct(),a=q(),s=lt(),c=o(),l=y(),u=`[object Map]`,d=`[object Object]`,f=`[object Promise]`,p=`[object Set]`,m=`[object WeakMap]`,g=`[object DataView]`,_=l(n),v=l(r),b=l(i),x=l(a),S=l(s),C=c;(n&&C(new n(new ArrayBuffer(1)))!=g||r&&C(new r)!=u||i&&C(i.resolve())!=f||a&&C(new a)!=p||s&&C(new s)!=m)&&(C=function(e){var t=c(e),n=t==d?e.constructor:void 0,r=n?l(n):``;if(r)switch(r){case _:return g;case v:return u;case b:return f;case x:return p;case S:return m}return t}),t.exports=C})),dt=r(((e,t)=>{var n=Me(),r=Re(),i=Ve(),a=ot(),o=ut(),s=E(),c=W(),l=Ze(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var ee=E?e.value():e,O=D?t.value():t;return v||=new n,_(ee,O,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),ft=r(((e,t)=>{var n=dt(),r=f();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),pt=e(r(((e,t)=>{var n=ft();function r(e,t){return n(e,t)}t.exports=r}))(),1);function mt(){let e=b();return{dependencies:e.dependencies,devDependencies:e.devDependencies}}function ht(){return Buffer.from(JSON.stringify(mt())).toString(`base64`)}function gt(){try{return JSON.parse(Buffer.from(a.config(`--local`,`npm.hash`),`base64`).toString(`utf8`))}catch{return``}}function _t(){return!(0,pt.default)(mt(),gt())}function vt(){a.config(`--local`,`npm.hash`,`${ht()}`)}const yt=({config:{PACKAGE_MANAGER:e}})=>{let t=_t();return{title:`Install`,enabled:()=>t,task:()=>[{title:`Restore dependencies using ${e.toUpperCase()}`,task:()=>te(e).restore().catch(t=>{throw e===`yarn`&&t.stderr?.startsWith(`error Your lockfile needs to be updated`)?Error(`yarn.lock file is outdated. Run yarn, commit the updated lockfile and try again.`):t})},{title:`Refresh metadata`,task:()=>vt()}]}};var bt=class extends we{mapContext(e,t){return{...t,origin:t.ORIGIN,featureBranch:a.getBranchName(),fromBranch:t.PRODUCTION_BRANCH,checkStatus:e.force===void 0||!!e.force,rebase:!0,skipTest:!e.cucumber&&!e.unitTest,skipUnit:!e.unitTest,skipE2E:!t.HAS_E2E||!e.cucumber}}getTasks(e){return[...super.getTasks(e),z(e),yt(e),...Te(e)]}success(e){console.log(L.default.green(i.tick),`Branch ${L.default.green(e.featureBranch)} rebased from ${L.default.green(e.fromBranch)} HEAD`)}};function xt({origin:e=`origin`,featureBranch:t,upstream:n=!0,noVerify:r=!0}){if(!t)throw Error(`A feature branch is required before pushing.`);return{title:`Push ${t}`,task:()=>a.push(...[n?`-u`:``,`-f`,e,t,r?`--no-verify`:``].filter(Boolean))}}var St=class extends bt{mapContext(e,t){return{...super.mapContext(e,t),checkStatus:!0,force:!0}}verifyConditions(e){e.featureBranch===e.fromBranch&&(console.error(L.default.red(`${i.cross} ${e.fromBranch} cannot be finished`)),process.exit(1))}getTasks(e){return[...super.getTasks(e),{title:`Add ${e.RELEASE_CANDIDATE_TAG} on last commit`,task(){let t=`${a.getLastCommitMsg()} ${e.config.RELEASE_CANDIDATE_TAG}`;return a.commit(`--amend`,`-m`,t)}},xt(e)]}success(e){console.log(L.default.green(i.tick),`Branch`,L.default.green(e.featureBranch),`is finished`)}},Ct=r(((e,t)=>{
5
5
  //! moment.js
6
6
  //! version : 2.30.1
7
7
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
8
8
  //! license : MIT
9
9
  //! momentjs.com
10
- (function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.moment=r()})(e,(function(){var e;function r(){return e.apply(null,arguments)}function i(t){e=t}function a(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function o(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(s(e,t))return!1;return!0}function l(e){return e===void 0}function u(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function d(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function f(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,`toString`)&&(e.toString=t.toString),s(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return $n(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return e._pf??=h(),e._pf}var _=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function v(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=g(e),n=_.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function y(e){var t=m(NaN);return e==null?g(t).userInvalidated=!0:p(g(t),e),t}var b=r.momentProperties=[],x=!1;function S(e,t){var n,r,i,a=b.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=b[n],i=t[r],l(i)||(e[r]=i);return e}function C(e){S(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),x===!1&&(x=!0,r.updateOffset(this),x=!1)}function w(e){return e instanceof C||e!=null&&e._isAMomentObject!=null}function T(e){r.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function E(e,t){var n=!0;return p(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,e),n){var i=[],a,o,c,l=arguments.length;for(o=0;o<l;o++){if(a=``,typeof arguments[o]==`object`){for(c in a+=`
10
+ (function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.moment=r()})(e,(function(){var e;function r(){return e.apply(null,arguments)}function i(t){e=t}function a(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function o(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(s(e,t))return!1;return!0}function l(e){return e===void 0}function u(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function d(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function f(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,`toString`)&&(e.toString=t.toString),s(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return er(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return e._pf??=h(),e._pf}var _=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function v(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=g(e),n=_.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function y(e){var t=m(NaN);return e==null?g(t).userInvalidated=!0:p(g(t),e),t}var b=r.momentProperties=[],x=!1;function S(e,t){var n,r,i,a=b.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=b[n],i=t[r],l(i)||(e[r]=i);return e}function C(e){S(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),x===!1&&(x=!0,r.updateOffset(this),x=!1)}function w(e){return e instanceof C||e!=null&&e._isAMomentObject!=null}function T(e){r.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function E(e,t){var n=!0;return p(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,e),n){var i=[],a,o,c,l=arguments.length;for(o=0;o<l;o++){if(a=``,typeof arguments[o]==`object`){for(c in a+=`
11
11
  [`+o+`] `,arguments[0])s(arguments[0],c)&&(a+=c+`: `+arguments[0][c]+`, `);a=a.slice(0,-2)}else a=arguments[o];i.push(a)}T(e+`
12
12
  Arguments: `+Array.prototype.slice.call(i).join(``)+`
13
- `+Error().stack),n=!1}return t.apply(this,arguments)},t)}var D={};function O(e,t){r.deprecationHandler!=null&&r.deprecationHandler(e,t),D[e]||(T(t),D[e]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function k(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function ee(e){var t,n;for(n in e)s(e,n)&&(t=e[n],k(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function A(e,t){var n=p({},e),r;for(r in t)s(t,r)&&(o(e[r])&&o(t[r])?(n[r]={},p(n[r],e[r]),p(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)s(e,r)&&!s(t,r)&&o(e[r])&&(n[r]=p({},n[r]));return n}function j(e){e!=null&&this.set(e)}var te=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n},ne={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function re(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return k(r)?r.call(t,n):r}function M(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var ie=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,oe={},N={};function P(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(N[e]=i),t&&(N[t[0]]=function(){return M(i.apply(this,arguments),t[1],t[2])}),n&&(N[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function se(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function ce(e){var t=e.match(ie),n,r;for(n=0,r=t.length;n<r;n++)N[t[n]]?t[n]=N[t[n]]:t[n]=se(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=k(t[a])?t[a].call(n,e):t[a];return i}}function le(e,t){return e.isValid()?(t=ue(t,e.localeData()),oe[t]=oe[t]||ce(t),oe[t](e)):e.localeData().invalidDate()}function ue(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(ae.lastIndex=0;n>=0&&ae.test(e);)e=e.replace(ae,r),ae.lastIndex=0,--n;return e}var de={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function fe(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ie).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var pe=`Invalid date`;function me(){return this._invalidDate}var F=`%d`,he=/\d{1,2}/;function ge(e){return this._ordinal.replace(`%d`,e)}var _e={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function ve(e,t,n,r){var i=this._relativeTime[n];return k(i)?i(e,t,n,r):i.replace(/%d/i,e)}function I(e,t){var n=this._relativeTime[e>0?`future`:`past`];return k(n)?n(t):n.replace(/%s/i,t)}var ye={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function be(e){return typeof e==`string`?ye[e]||ye[e.toLowerCase()]:void 0}function xe(e){var t={},n,r;for(r in e)s(e,r)&&(n=be(r),n&&(t[n]=e[r]));return t}var Se={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ce(e){var t=[],n;for(n in e)s(e,n)&&t.push({unit:n,priority:Se[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var L=/\d/,R=/\d\d/,we=/\d{3}/,Te=/\d{4}/,Ee=/[+-]?\d{6}/,z=/\d\d?/,De=/\d\d\d\d?/,Oe=/\d\d\d\d\d\d?/,ke=/\d{1,3}/,Ae=/\d{1,4}/,je=/[+-]?\d{1,6}/,Me=/\d+/,Ne=/[+-]?\d+/,Pe=/Z|[+-]\d\d:?\d\d/gi,Fe=/Z|[+-]\d\d(?::?\d\d)?/gi,Ie=/[+-]?\d+(\.\d{1,3})?/,Le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Re=/^[1-9]\d?/,ze=/^([1-9]\d|\d)/,Be={};function B(e,t,n){Be[e]=k(t)?t:function(e,r){return e&&n?n:t}}function Ve(e,t){return s(Be,e)?Be[e](t._strict,t._locale):new RegExp(He(e))}function He(e){return Ue(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function Ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function V(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function H(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=V(t)),n}var We={};function U(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),u(t)&&(r=function(e,n){n[t]=H(e)}),i=e.length,n=0;n<i;n++)We[e[n]]=r}function Ge(e,t){U(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function Ke(e,t,n){t!=null&&s(We,e)&&We[e](t,n._a,n,e)}function qe(e){return e%4==0&&e%100!=0||e%400==0}var W=0,Je=1,G=2,K=3,q=4,Ye=5,Xe=6,Ze=7,Qe=8;P(`Y`,0,0,function(){var e=this.year();return e<=9999?M(e,4):`+`+e}),P(0,[`YY`,2],0,function(){return this.year()%100}),P(0,[`YYYY`,4],0,`year`),P(0,[`YYYYY`,5],0,`year`),P(0,[`YYYYYY`,6,!0],0,`year`),B(`Y`,Ne),B(`YY`,z,R),B(`YYYY`,Ae,Te),B(`YYYYY`,je,Ee),B(`YYYYYY`,je,Ee),U([`YYYYY`,`YYYYYY`],W),U(`YYYY`,function(e,t){t[W]=e.length===2?r.parseTwoDigitYear(e):H(e)}),U(`YY`,function(e,t){t[W]=r.parseTwoDigitYear(e)}),U(`Y`,function(e,t){t[W]=parseInt(e,10)});function $e(e){return qe(e)?366:365}r.parseTwoDigitYear=function(e){return H(e)+(H(e)>68?1900:2e3)};var et=nt(`FullYear`,!0);function tt(){return qe(this.year())}function nt(e,t){return function(n){return n==null?rt(this,e):(it(this,e,n),r.updateOffset(this,t),this)}}function rt(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function it(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!qe(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function at(e){return e=be(e),k(this[e])?this[e]():this}function ot(e,t){if(typeof e==`object`){e=xe(e);var n=Ce(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=be(e),k(this[e]))return this[e](t);return this}function st(e,t){return(e%t+t)%t}var J=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function ct(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=st(t,12);return e+=(t-n)/12,n===1?qe(e)?29:28:31-n%7%2}P(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),P(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),P(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),B(`M`,z,Re),B(`MM`,z,R),B(`MMM`,function(e,t){return t.monthsShortRegex(e)}),B(`MMMM`,function(e,t){return t.monthsRegex(e)}),U([`M`,`MM`],function(e,t){t[Je]=H(e)-1}),U([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?g(n).invalidMonth=e:t[Je]=i});var lt=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ut=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),dt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ft=Le,pt=Le;function mt(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||dt).test(t)?`format`:`standalone`][e.month()]:a(this._months)?this._months:this._months.standalone}function ht(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[dt.test(t)?`format`:`standalone`][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function gt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=J.call(this._shortMonthsParse,o),i===-1?null:i):(i=J.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=J.call(this._shortMonthsParse,o),i===-1?(i=J.call(this._longMonthsParse,o),i===-1?null:i):i):(i=J.call(this._longMonthsParse,o),i===-1?(i=J.call(this._shortMonthsParse,o),i===-1?null:i):i)}function _t(e,t,n){var r,i,a;if(this._monthsParseExact)return gt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function vt(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=H(t);else if(t=e.localeData().monthsParse(t),!u(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,ct(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function yt(e){return e==null?rt(this,`Month`):(vt(this,e),r.updateOffset(this,!0),this)}function bt(){return ct(this.year(),this.month())}function xt(e){return this._monthsParseExact?(s(this,`_monthsRegex`)||Ct.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,`_monthsShortRegex`)||(this._monthsShortRegex=ft),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function St(e){return this._monthsParseExact?(s(this,`_monthsRegex`)||Ct.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,`_monthsRegex`)||(this._monthsRegex=pt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ct(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=m([2e3,i]),o=Ue(this.monthsShort(a,``)),s=Ue(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function wt(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function Tt(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Et(e,t,n){var r=7+t-n;return-((7+Tt(e,0,r).getUTCDay()-t)%7)+r-1}function Dt(e,t,n,r,i){var a=(7+n-r)%7,o=Et(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=$e(c)+s):s>$e(e)?(c=e+1,l=s-$e(e)):(c=e,l=s),{year:c,dayOfYear:l}}function Ot(e,t,n){var r=Et(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+kt(o,t,n)):i>kt(e.year(),t,n)?(a=i-kt(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function kt(e,t,n){var r=Et(e,t,n),i=Et(e+1,t,n);return($e(e)-r+i)/7}P(`w`,[`ww`,2],`wo`,`week`),P(`W`,[`WW`,2],`Wo`,`isoWeek`),B(`w`,z,Re),B(`ww`,z,R),B(`W`,z,Re),B(`WW`,z,R),Ge([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=H(e)});function At(e){return Ot(e,this._week.dow,this._week.doy).week}var jt={dow:0,doy:6};function Mt(){return this._week.dow}function Nt(){return this._week.doy}function Pt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function Ft(e){var t=Ot(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}P(`d`,0,`do`,`day`),P(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),P(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),P(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),P(`e`,0,0,`weekday`),P(`E`,0,0,`isoWeekday`),B(`d`,z),B(`e`,z),B(`E`,z),B(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),B(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),B(`dddd`,function(e,t){return t.weekdaysRegex(e)}),Ge([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?g(n).invalidWeekday=e:t.d=i}),Ge([`d`,`e`,`E`],function(e,t,n,r){t[r]=H(e)});function It(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function Lt(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var zt=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),Bt=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),Vt=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),Ht=Le,Ut=Le,Wt=Le;function Gt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?Rt(n,this._week.dow):e?n[e.day()]:n}function Kt(e){return e===!0?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function qt(e){return e===!0?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Jt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=J.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=J.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=J.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=J.call(this._weekdaysParse,o),i!==-1||(i=J.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=J.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=J.call(this._shortWeekdaysParse,o),i!==-1||(i=J.call(this._weekdaysParse,o),i!==-1)?i:(i=J.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=J.call(this._minWeekdaysParse,o),i!==-1||(i=J.call(this._weekdaysParse,o),i!==-1)?i:(i=J.call(this._shortWeekdaysParse,o),i===-1?null:i))}function Yt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Jt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function Xt(e){if(!this.isValid())return e==null?NaN:this;var t=rt(this,`Day`);return e==null?t:(e=It(e,this.localeData()),this.add(e-t,`d`))}function Zt(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function Qt(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=Lt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||nn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,`_weekdaysRegex`)||(this._weekdaysRegex=Ht),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function en(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||nn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function tn(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||nn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=Wt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function nn(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=m([2e3,1]).day(a),s=Ue(this.weekdaysMin(o,``)),c=Ue(this.weekdaysShort(o,``)),l=Ue(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function rn(){return this.hours()%12||12}function an(){return this.hours()||24}P(`H`,[`HH`,2],0,`hour`),P(`h`,[`hh`,2],0,rn),P(`k`,[`kk`,2],0,an),P(`hmm`,0,0,function(){return``+rn.apply(this)+M(this.minutes(),2)}),P(`hmmss`,0,0,function(){return``+rn.apply(this)+M(this.minutes(),2)+M(this.seconds(),2)}),P(`Hmm`,0,0,function(){return``+this.hours()+M(this.minutes(),2)}),P(`Hmmss`,0,0,function(){return``+this.hours()+M(this.minutes(),2)+M(this.seconds(),2)});function on(e,t){P(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}on(`a`,!0),on(`A`,!1);function sn(e,t){return t._meridiemParse}B(`a`,sn),B(`A`,sn),B(`H`,z,ze),B(`h`,z,Re),B(`k`,z,Re),B(`HH`,z,R),B(`hh`,z,R),B(`kk`,z,R),B(`hmm`,De),B(`hmmss`,Oe),B(`Hmm`,De),B(`Hmmss`,Oe),U([`H`,`HH`],K),U([`k`,`kk`],function(e,t,n){var r=H(e);t[K]=r===24?0:r}),U([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),U([`h`,`hh`],function(e,t,n){t[K]=H(e),g(n).bigHour=!0}),U(`hmm`,function(e,t,n){var r=e.length-2;t[K]=H(e.substr(0,r)),t[q]=H(e.substr(r)),g(n).bigHour=!0}),U(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[K]=H(e.substr(0,r)),t[q]=H(e.substr(r,2)),t[Ye]=H(e.substr(i)),g(n).bigHour=!0}),U(`Hmm`,function(e,t,n){var r=e.length-2;t[K]=H(e.substr(0,r)),t[q]=H(e.substr(r))}),U(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[K]=H(e.substr(0,r)),t[q]=H(e.substr(r,2)),t[Ye]=H(e.substr(i))});function cn(e){return(e+``).toLowerCase().charAt(0)===`p`}var ln=/[ap]\.?m?\.?/i,un=nt(`Hours`,!0);function dn(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var fn={calendar:ne,longDateFormat:de,invalidDate:pe,ordinal:F,dayOfMonthOrdinalParse:he,relativeTime:_e,months:lt,monthsShort:ut,week:jt,weekdays:zt,weekdaysMin:Vt,weekdaysShort:Bt,meridiemParse:ln},Y={},pn={},mn;function hn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function gn(e){return e&&e.toLowerCase().replace(`_`,`-`)}function _n(e){for(var t=0,n,r,i,a;t<e.length;){for(a=gn(e[t]).split(`-`),n=a.length,r=gn(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=yn(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&hn(a,r)>=n-1)break;n--}t++}return mn}function vn(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function yn(e){var r=null,i;if(Y[e]===void 0&&t!==void 0&&t&&t.exports&&vn(e))try{r=mn._abbr,i=n,i(`./locale/`+e),bn(r)}catch{Y[e]=null}return Y[e]}function bn(e,t){var n;return e&&(n=l(t)?Cn(e):xn(e,t),n?mn=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),mn._abbr}function xn(e,t){if(t!==null){var n,r=fn;if(t.abbr=e,Y[e]!=null)O(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=Y[e]._config;else if(t.parentLocale!=null){if(Y[t.parentLocale]!=null)r=Y[t.parentLocale]._config;else if(n=yn(t.parentLocale),n!=null)r=n._config;else return pn[t.parentLocale]||(pn[t.parentLocale]=[]),pn[t.parentLocale].push({name:e,config:t}),null}return Y[e]=new j(A(r,t)),pn[e]&&pn[e].forEach(function(e){xn(e.name,e.config)}),bn(e),Y[e]}return delete Y[e],null}function Sn(e,t){if(t!=null){var n,r,i=fn;Y[e]!=null&&Y[e].parentLocale!=null?Y[e].set(A(Y[e]._config,t)):(r=yn(e),r!=null&&(i=r._config),t=A(i,t),r??(t.abbr=e),n=new j(t),n.parentLocale=Y[e],Y[e]=n),bn(e)}else Y[e]!=null&&(Y[e].parentLocale==null?Y[e]!=null&&delete Y[e]:(Y[e]=Y[e].parentLocale,e===bn()&&bn(e)));return Y[e]}function Cn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return mn;if(!a(e)){if(t=yn(e),t)return t;e=[e]}return _n(e)}function wn(){return te(Y)}function Tn(e){var t,n=e._a;return n&&g(e).overflow===-2&&(t=n[Je]<0||n[Je]>11?Je:n[G]<1||n[G]>ct(n[W],n[Je])?G:n[K]<0||n[K]>24||n[K]===24&&(n[q]!==0||n[Ye]!==0||n[Xe]!==0)?K:n[q]<0||n[q]>59?q:n[Ye]<0||n[Ye]>59?Ye:n[Xe]<0||n[Xe]>999?Xe:-1,g(e)._overflowDayOfYear&&(t<W||t>G)&&(t=G),g(e)._overflowWeeks&&t===-1&&(t=Ze),g(e)._overflowWeekday&&t===-1&&(t=Qe),g(e).overflow=t),e}var En=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,On=/Z|[+-]\d\d(?::?\d\d)?/,kn=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],An=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],jn=/^\/?Date\((-?\d+)/i,Mn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Nn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pn(e){var t,n,r=e._i,i=En.exec(r)||Dn.exec(r),a,o,s,c,l=kn.length,u=An.length;if(i){for(g(e).iso=!0,t=0,n=l;t<n;t++)if(kn[t][1].exec(i[1])){o=kn[t][0],a=kn[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(An[t][1].exec(i[3])){s=(i[2]||` `)+An[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4]){if(On.exec(i[4]))c=`Z`;else{e._isValid=!1;return}}e._f=o+(s||``)+(c||``),Kn(e)}else e._isValid=!1}function Fn(e,t,n,r,i,a){var o=[In(e),ut.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function In(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ln(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function Rn(e,t,n){return e&&Bt.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(g(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function zn(e,t,n){if(e)return Nn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Bn(e){var t=Mn.exec(Ln(e._i)),n;if(t){if(n=Fn(t[4],t[3],t[2],t[5],t[6],t[7]),!Rn(t[1],n,e))return;e._a=n,e._tzm=zn(t[8],t[9],t[10]),e._d=Tt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Vn(e){var t=jn.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Pn(e),e._isValid===!1)delete e._isValid;else return;if(Bn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:r.createFromInputFallback(e)}r.createFromInputFallback=E(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function Hn(e,t,n){return e??t??n}function Un(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Wn(e){var t,n,r=[],i,a,o;if(!e._d){for(i=Un(e),e._w&&e._a[G]==null&&e._a[Je]==null&&Gn(e),e._dayOfYear!=null&&(o=Hn(e._a[W],i[W]),(e._dayOfYear>$e(o)||e._dayOfYear===0)&&(g(e)._overflowDayOfYear=!0),n=Tt(o,0,e._dayOfYear),e._a[Je]=n.getUTCMonth(),e._a[G]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?+(t===2):e._a[t];e._a[K]===24&&e._a[q]===0&&e._a[Ye]===0&&e._a[Xe]===0&&(e._nextDay=!0,e._a[K]=0),e._d=(e._useUTC?Tt:wt).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[K]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(g(e).weekdayMismatch=!0)}}function Gn(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=Hn(t.GG,e._a[W],Ot(X(),1,4).year),r=Hn(t.W,1),i=Hn(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=Ot(X(),a,o),n=Hn(t.gg,e._a[W],l.year),r=Hn(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>kt(n,a,o)?g(e)._overflowWeeks=!0:c==null?(s=Dt(n,r,i,a,o),e._a[W]=s.year,e._dayOfYear=s.dayOfYear):g(e)._overflowWeekday=!0}r.ISO_8601=function(){},r.RFC_2822=function(){};function Kn(e){if(e._f===r.ISO_8601){Pn(e);return}if(e._f===r.RFC_2822){Bn(e);return}e._a=[],g(e).empty=!0;var t=``+e._i,n,i,a,o,s,c=t.length,l=0,u,d;for(a=ue(e._f,e._locale).match(ie)||[],d=a.length,n=0;n<d;n++)o=a[n],i=(t.match(Ve(o,e))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&g(e).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),l+=i.length),N[o]?(i?g(e).empty=!1:g(e).unusedTokens.push(o),Ke(o,i,e)):e._strict&&!i&&g(e).unusedTokens.push(o);g(e).charsLeftOver=c-l,t.length>0&&g(e).unusedInput.push(t),e._a[K]<=12&&g(e).bigHour===!0&&e._a[K]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[K]=qn(e._locale,e._a[K],e._meridiem),u=g(e).era,u!==null&&(e._a[W]=e._locale.erasConvertYear(u,e._a[W])),Wn(e),Tn(e)}function qn(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function Jn(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){g(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Kn(t),v(t)&&(o=!0),a+=g(t).charsLeftOver,a+=g(t).unusedTokens.length*10,g(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));p(e,n||t)}function Yn(e){if(!e._d){var t=xe(e._i),n=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Wn(e)}}function Xn(e){var t=new C(Tn(Zn(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function Zn(e){var t=e._i,n=e._f;return e._locale=e._locale||Cn(e._l),t===null||n===void 0&&t===``?y({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),w(t)?new C(Tn(t)):(d(t)?e._d=t:a(n)?Jn(e):n?Kn(e):Qn(e),v(e)||(e._d=null),e))}function Qn(e){var t=e._i;l(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):typeof t==`string`?Vn(e):a(t)?(e._a=f(t.slice(0),function(e){return parseInt(e,10)}),Wn(e)):o(t)?Yn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function $n(e,t,n,r,i){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(o(e)&&c(e)||a(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Xn(s)}function X(e,t,n,r){return $n(e,t,n,r,!1)}var er=E(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=X.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),tr=E(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=X.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function nr(e,t){var n,r;if(t.length===1&&a(t[0])&&(t=t[0]),!t.length)return X();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function rr(){return nr(`isBefore`,[].slice.call(arguments,0))}function ir(){return nr(`isAfter`,[].slice.call(arguments,0))}var ar=function(){return Date.now?Date.now():+new Date},or=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function sr(e){var t,n=!1,r,i=or.length;for(t in e)if(s(e,t)&&!(J.call(or,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[or[r]]){if(n)return!1;parseFloat(e[or[r]])!==H(e[or[r]])&&(n=!0)}return!0}function cr(){return this._isValid}function lr(){return Mr(NaN)}function ur(e){var t=xe(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=sr(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=Cn(),this._bubble()}function dr(e){return e instanceof ur}function fr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function pr(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&H(e[o])!==H(t[o]))&&a++;return a+i}function mr(e,t){P(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+M(~~(e/60),2)+t+M(~~e%60,2)})}mr(`Z`,`:`),mr(`ZZ`,``),B(`Z`,Fe),B(`ZZ`,Fe),U([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=gr(Fe,e)});var hr=/([\+\-]|\d\d)/gi;function gr(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(hr)||[`-`,0,0],a=+(i[1]*60)+H(i[2]),a===0?0:i[0]===`+`?a:-a)}function _r(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(w(e)||d(e)?e.valueOf():X(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):X(e).local()}function vr(e){return-Math.round(e._d.getTimezoneOffset())}r.updateOffset=function(){};function yr(e,t,n){var i=this._offset||0,a;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=gr(Fe,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=vr(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,`m`),i!==e&&(!t||this._changeInProgress?Lr(this,Mr(e-i,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,r.updateOffset(this,!0),null)),this}return this._isUTC?i:vr(this)}function br(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function xr(e){return this.utcOffset(0,e)}function Sr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(vr(this),`m`)),this}function Cr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=gr(Pe,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function wr(e){return this.isValid()?(e=e?X(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function Tr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Er(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=Zn(e),e._a?(t=e._isUTC?m(e._a):X(e._a),this._isDSTShifted=this.isValid()&&pr(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Dr(){return this.isValid()?!this._isUTC:!1}function Or(){return this.isValid()?this._isUTC:!1}function kr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Ar=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mr(e,t){var n=e,r=null,i,a,o;return dr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=Ar.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:H(r[G])*i,h:H(r[K])*i,m:H(r[q])*i,s:H(r[Ye])*i,ms:H(fr(r[Xe]*1e3))*i}):(r=jr.exec(e))?(i=r[1]===`-`?-1:1,n={y:Nr(r[2],i),M:Nr(r[3],i),w:Nr(r[4],i),d:Nr(r[5],i),h:Nr(r[6],i),m:Nr(r[7],i),s:Nr(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=Fr(X(n.from),X(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new ur(n),dr(e)&&s(e,`_locale`)&&(a._locale=e._locale),dr(e)&&s(e,`_isValid`)&&(a._isValid=e._isValid),a}Mr.fn=ur.prototype,Mr.invalid=lr;function Nr(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function Pr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function Fr(e,t){var n;return e.isValid()&&t.isValid()?(t=_r(t,e),e.isBefore(t)?n=Pr(e,t):(n=Pr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ir(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(O(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=Mr(n,r),Lr(this,i,e),this}}function Lr(e,t,n,i){var a=t._milliseconds,o=fr(t._days),s=fr(t._months);e.isValid()&&(i??=!0,s&&vt(e,rt(e,`Month`)+s*n),o&&it(e,`Date`,rt(e,`Date`)+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&r.updateOffset(e,o||s))}var Rr=Ir(1,`add`),zr=Ir(-1,`subtract`);function Br(e){return typeof e==`string`||e instanceof String}function Vr(e){return w(e)||d(e)||Br(e)||u(e)||Ur(e)||Hr(e)||e==null}function Hr(e){var t=o(e)&&!c(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,l=r.length;for(i=0;i<l;i+=1)a=r[i],n||=s(e,a);return t&&n}function Ur(e){var t=a(e),n=!1;return t&&(n=e.filter(function(t){return!u(t)&&Br(e)}).length===0),t&&n}function Wr(e){var t=o(e)&&!c(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=s(e,a);return t&&n}function Gr(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function Kr(e,t){arguments.length===1&&(arguments[0]?Vr(arguments[0])?(e=arguments[0],t=void 0):Wr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||X(),i=_r(n,this).startOf(`day`),a=r.calendarFormat(this,i)||`sameElse`,o=t&&(k(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,X(n)))}function qr(){return new C(this)}function Jr(e,t){var n=w(e)?e:X(e);return this.isValid()&&n.isValid()?(t=be(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Yr(e,t){var n=w(e)?e:X(e);return this.isValid()&&n.isValid()?(t=be(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Xr(e,t,n,r){var i=w(e)?e:X(e),a=w(t)?t:X(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Zr(e,t){var n=w(e)?e:X(e),r;return this.isValid()&&n.isValid()?(t=be(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function $r(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function ei(e,t,n){var r,i,a;if(!this.isValid()||(r=_r(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=be(t),t){case`year`:a=ti(this,r)/12;break;case`month`:a=ti(this,r);break;case`quarter`:a=ti(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:V(a)}function ti(e,t){if(e.date()<t.date())return-ti(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}r.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,r.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function ni(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function ri(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?le(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,le(n,`Z`)):le(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function ii(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function ai(e){e||=this.isUtc()?r.defaultFormatUtc:r.defaultFormat;var t=le(this,e);return this.localeData().postformat(t)}function oi(e,t){return this.isValid()&&(w(e)&&e.isValid()||X(e).isValid())?Mr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(X(),e)}function ci(e,t){return this.isValid()&&(w(e)&&e.isValid()||X(e).isValid())?Mr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function li(e){return this.to(X(),e)}function ui(e){var t;return e===void 0?this._locale._abbr:(t=Cn(e),t!=null&&(this._locale=t),this)}var di=E(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function fi(){return this._locale}var pi=1e3,mi=60*pi,hi=60*mi,gi=3506328*hi;function _i(e,t){return(e%t+t)%t}function vi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-gi:new Date(e,t,n).valueOf()}function yi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-gi:Date.UTC(e,t,n)}function bi(e){var t,n;if(e=be(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?yi:vi,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=_i(t+(this._isUTC?0:this.utcOffset()*mi),hi);break;case`minute`:t=this._d.valueOf(),t-=_i(t,mi);break;case`second`:t=this._d.valueOf(),t-=_i(t,pi)}return this._d.setTime(t),r.updateOffset(this,!0),this}function xi(e){var t,n;if(e=be(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?yi:vi,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=hi-_i(t+(this._isUTC?0:this.utcOffset()*mi),hi)-1;break;case`minute`:t=this._d.valueOf(),t+=mi-_i(t,mi)-1;break;case`second`:t=this._d.valueOf(),t+=pi-_i(t,pi)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function Si(){return this._d.valueOf()-(this._offset||0)*6e4}function Ci(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Ti(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ei(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Di(){return this.isValid()?this.toISOString():null}function Oi(){return v(this)}function ki(){return p({},g(this))}function Ai(){return g(this).overflow}function ji(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}P(`N`,0,0,`eraAbbr`),P(`NN`,0,0,`eraAbbr`),P(`NNN`,0,0,`eraAbbr`),P(`NNNN`,0,0,`eraName`),P(`NNNNN`,0,0,`eraNarrow`),P(`y`,[`y`,1],`yo`,`eraYear`),P(`y`,[`yy`,2],0,`eraYear`),P(`y`,[`yyy`,3],0,`eraYear`),P(`y`,[`yyyy`,4],0,`eraYear`),B(`N`,Hi),B(`NN`,Hi),B(`NNN`,Hi),B(`NNNN`,Ui),B(`NNNNN`,Wi),U([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e}),B(`y`,Me),B(`yy`,Me),B(`yyy`,Me),B(`yyyy`,Me),B(`yo`,Gi),U([`y`,`yy`,`yyy`,`yyyy`],W),U([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[W]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)});function Mi(e,t){var n,i,a,o=this._eras||Cn(`en`)._eras;for(n=0,i=o.length;n<i;++n)switch(typeof o[n].since==`string`&&(a=r(o[n].since).startOf(`day`),o[n].since=a.valueOf()),typeof o[n].until){case`undefined`:o[n].until=1/0;break;case`string`:a=r(o[n].until).startOf(`day`).valueOf(),o[n].until=a.valueOf()}return o}function Ni(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r]}else if([o,s,c].indexOf(e)>=0)return a[r]}function Pi(e,t){var n=e.since<=e.until?1:-1;return t===void 0?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Fi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function Li(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function Ri(){var e,t,n,i,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,i=this.clone().startOf(`day`).valueOf(),a[e].since<=i&&i<=a[e].until||a[e].until<=i&&i<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function zi(e){return s(this,`_erasNameRegex`)||Ki.call(this),e?this._erasNameRegex:this._erasRegex}function Bi(e){return s(this,`_erasAbbrRegex`)||Ki.call(this),e?this._erasAbbrRegex:this._erasRegex}function Vi(e){return s(this,`_erasNarrowRegex`)||Ki.call(this),e?this._erasNarrowRegex:this._erasRegex}function Hi(e,t){return t.erasAbbrRegex(e)}function Ui(e,t){return t.erasNameRegex(e)}function Wi(e,t){return t.erasNarrowRegex(e)}function Gi(e,t){return t._eraYearOrdinalRegex||Me}function Ki(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=Ue(l[i].name),s=Ue(l[i].abbr),c=Ue(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}P(0,[`gg`,2],0,function(){return this.weekYear()%100}),P(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function qi(e,t){P(0,[e,e.length],0,t)}qi(`gggg`,`weekYear`),qi(`ggggg`,`weekYear`),qi(`GGGG`,`isoWeekYear`),qi(`GGGGG`,`isoWeekYear`),B(`G`,Ne),B(`g`,Ne),B(`GG`,z,R),B(`gg`,z,R),B(`GGGG`,Ae,Te),B(`gggg`,Ae,Te),B(`GGGGG`,je,Ee),B(`ggggg`,je,Ee),Ge([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=H(e)}),Ge([`gg`,`GG`],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)});function Ji(e){return ea.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Yi(e){return ea.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Xi(){return kt(this.year(),1,4)}function Zi(){return kt(this.isoWeekYear(),1,4)}function Qi(){var e=this.localeData()._week;return kt(this.year(),e.dow,e.doy)}function $i(){var e=this.localeData()._week;return kt(this.weekYear(),e.dow,e.doy)}function ea(e,t,n,r,i){var a;return e==null?Ot(this,r,i).year:(a=kt(e,r,i),t>a&&(t=a),ta.call(this,e,t,n,r,i))}function ta(e,t,n,r,i){var a=Dt(e,t,n,r,i),o=Tt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}P(`Q`,0,`Qo`,`quarter`),B(`Q`,L),U(`Q`,function(e,t){t[Je]=(H(e)-1)*3});function na(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}P(`D`,[`DD`,2],`Do`,`date`),B(`D`,z,Re),B(`DD`,z,R),B(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),U([`D`,`DD`],G),U(`Do`,function(e,t){t[G]=H(e.match(z)[0])});var ra=nt(`Date`,!0);P(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),B(`DDD`,ke),B(`DDDD`,we),U([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=H(e)});function ia(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}P(`m`,[`mm`,2],0,`minute`),B(`m`,z,ze),B(`mm`,z,R),U([`m`,`mm`],q);var aa=nt(`Minutes`,!1);P(`s`,[`ss`,2],0,`second`),B(`s`,z,ze),B(`ss`,z,R),U([`s`,`ss`],Ye);var oa=nt(`Seconds`,!1);P(`S`,0,0,function(){return~~(this.millisecond()/100)}),P(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),P(0,[`SSS`,3],0,`millisecond`),P(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),P(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),P(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),P(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),P(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),P(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),B(`S`,ke,L),B(`SS`,ke,R),B(`SSS`,ke,we);var sa,ca;for(sa=`SSSS`;sa.length<=9;sa+=`S`)B(sa,Me);function la(e,t){t[Xe]=H((`0.`+e)*1e3)}for(sa=`S`;sa.length<=9;sa+=`S`)U(sa,la);ca=nt(`Milliseconds`,!1),P(`z`,0,0,`zoneAbbr`),P(`zz`,0,0,`zoneName`);function ua(){return this._isUTC?`UTC`:``}function da(){return this._isUTC?`Coordinated Universal Time`:``}var Z=C.prototype;Z.add=Rr,Z.calendar=Kr,Z.clone=qr,Z.diff=ei,Z.endOf=xi,Z.format=ai,Z.from=oi,Z.fromNow=si,Z.to=ci,Z.toNow=li,Z.get=at,Z.invalidAt=Ai,Z.isAfter=Jr,Z.isBefore=Yr,Z.isBetween=Xr,Z.isSame=Zr,Z.isSameOrAfter=Qr,Z.isSameOrBefore=$r,Z.isValid=Oi,Z.lang=di,Z.locale=ui,Z.localeData=fi,Z.max=tr,Z.min=er,Z.parsingFlags=ki,Z.set=ot,Z.startOf=bi,Z.subtract=zr,Z.toArray=Ti,Z.toObject=Ei,Z.toDate=wi,Z.toISOString=ri,Z.inspect=ii,typeof Symbol<`u`&&Symbol.for!=null&&(Z[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),Z.toJSON=Di,Z.toString=ni,Z.unix=Ci,Z.valueOf=Si,Z.creationData=ji,Z.eraName=Fi,Z.eraNarrow=Ii,Z.eraAbbr=Li,Z.eraYear=Ri,Z.year=et,Z.isLeapYear=tt,Z.weekYear=Ji,Z.isoWeekYear=Yi,Z.quarter=Z.quarters=na,Z.month=yt,Z.daysInMonth=bt,Z.week=Z.weeks=Pt,Z.isoWeek=Z.isoWeeks=Ft,Z.weeksInYear=Qi,Z.weeksInWeekYear=$i,Z.isoWeeksInYear=Xi,Z.isoWeeksInISOWeekYear=Zi,Z.date=ra,Z.day=Z.days=Xt,Z.weekday=Zt,Z.isoWeekday=Qt,Z.dayOfYear=ia,Z.hour=Z.hours=un,Z.minute=Z.minutes=aa,Z.second=Z.seconds=oa,Z.millisecond=Z.milliseconds=ca,Z.utcOffset=yr,Z.utc=xr,Z.local=Sr,Z.parseZone=Cr,Z.hasAlignedHourOffset=wr,Z.isDST=Tr,Z.isLocal=Dr,Z.isUtcOffset=Or,Z.isUtc=kr,Z.isUTC=kr,Z.zoneAbbr=ua,Z.zoneName=da,Z.dates=E(`dates accessor is deprecated. Use date instead.`,ra),Z.months=E(`months accessor is deprecated. Use month instead`,yt),Z.years=E(`years accessor is deprecated. Use year instead`,et),Z.zone=E(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,br),Z.isDSTShifted=E(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,Er);function fa(e){return X(e*1e3)}function pa(){return X.apply(null,arguments).parseZone()}function ma(e){return e}var Q=j.prototype;Q.calendar=re,Q.longDateFormat=fe,Q.invalidDate=me,Q.ordinal=ge,Q.preparse=ma,Q.postformat=ma,Q.relativeTime=ve,Q.pastFuture=I,Q.set=ee,Q.eras=Mi,Q.erasParse=Ni,Q.erasConvertYear=Pi,Q.erasAbbrRegex=Bi,Q.erasNameRegex=zi,Q.erasNarrowRegex=Vi,Q.months=mt,Q.monthsShort=ht,Q.monthsParse=_t,Q.monthsRegex=St,Q.monthsShortRegex=xt,Q.week=At,Q.firstDayOfYear=Nt,Q.firstDayOfWeek=Mt,Q.weekdays=Gt,Q.weekdaysMin=qt,Q.weekdaysShort=Kt,Q.weekdaysParse=Yt,Q.weekdaysRegex=$t,Q.weekdaysShortRegex=en,Q.weekdaysMinRegex=tn,Q.isPM=cn,Q.meridiem=dn;function ha(e,t,n,r){var i=Cn(),a=m().set(r,t);return i[n](a,e)}function ga(e,t,n){if(u(e)&&(t=e,e=void 0),e||=``,t!=null)return ha(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=ha(e,r,n,`month`);return i}function _a(e,t,n,r){typeof e==`boolean`?(u(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,u(t)&&(n=t,t=void 0),t||=``);var i=Cn(),a=e?i._week.dow:0,o,s=[];if(n!=null)return ha(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=ha(t,(o+a)%7,r,`day`);return s}function va(e,t){return ga(e,t,`months`)}function ya(e,t){return ga(e,t,`monthsShort`)}function ba(e,t,n){return _a(e,t,n,`weekdays`)}function xa(e,t,n){return _a(e,t,n,`weekdaysShort`)}function Sa(e,t,n){return _a(e,t,n,`weekdaysMin`)}bn(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(H(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),r.lang=E(`moment.lang is deprecated. Use moment.locale instead.`,bn),r.langData=E(`moment.langData is deprecated. Use moment.localeData instead.`,Cn);var Ca=Math.abs;function wa(){var e=this._data;return this._milliseconds=Ca(this._milliseconds),this._days=Ca(this._days),this._months=Ca(this._months),e.milliseconds=Ca(e.milliseconds),e.seconds=Ca(e.seconds),e.minutes=Ca(e.minutes),e.hours=Ca(e.hours),e.months=Ca(e.months),e.years=Ca(e.years),this}function Ta(e,t,n,r){var i=Mr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ea(e,t){return Ta(this,e,t,1)}function Da(e,t){return Ta(this,e,t,-1)}function Oa(e){return e<0?Math.floor(e):Math.ceil(e)}function ka(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Oa(ja(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=V(e/1e3),r.seconds=i%60,a=V(i/60),r.minutes=a%60,o=V(a/60),r.hours=o%24,t+=V(o/24),c=V(Aa(t)),n+=c,t-=Oa(ja(c)),s=V(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function Aa(e){return e*4800/146097}function ja(e){return e*146097/4800}function Ma(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=be(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+Aa(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(ja(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function Na(e){return function(){return this.as(e)}}var Pa=Na(`ms`),Fa=Na(`s`),Ia=Na(`m`),La=Na(`h`),Ra=Na(`d`),za=Na(`w`),Ba=Na(`M`),Va=Na(`Q`),Ha=Na(`y`),Ua=Pa;function Wa(){return Mr(this)}function Ga(e){return e=be(e),this.isValid()?this[e+`s`]():NaN}function Ka(e){return function(){return this.isValid()?this._data[e]:NaN}}var qa=Ka(`milliseconds`),Ja=Ka(`seconds`),Ya=Ka(`minutes`),Xa=Ka(`hours`),Za=Ka(`days`),Qa=Ka(`months`),$a=Ka(`years`);function eo(){return V(this.days()/7)}var to=Math.round,no={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ro(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function io(e,t,n,r){var i=Mr(e).abs(),a=to(i.as(`s`)),o=to(i.as(`m`)),s=to(i.as(`h`)),c=to(i.as(`d`)),l=to(i.as(`M`)),u=to(i.as(`w`)),d=to(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,ro.apply(null,f)}function ao(e){return e===void 0?to:typeof e==`function`&&(to=e,!0)}function oo(e,t){return no[e]===void 0?!1:t===void 0?no[e]:(no[e]=t,e===`s`&&(no.ss=t-1),!0)}function so(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=no,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},no,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=io(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var co=Math.abs;function lo(e){return(e>0)-(e<0)||+e}function uo(){if(!this.isValid())return this.localeData().invalidDate();var e=co(this._milliseconds)/1e3,t=co(this._days),n=co(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=V(e/60),i=V(r/60),e%=60,r%=60,a=V(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=lo(this._months)===lo(s)?``:`-`,u=lo(this._days)===lo(s)?``:`-`,d=lo(this._milliseconds)===lo(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var $=ur.prototype
13
+ `+Error().stack),n=!1}return t.apply(this,arguments)},t)}var D={};function ee(e,t){r.deprecationHandler!=null&&r.deprecationHandler(e,t),D[e]||(T(t),D[e]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function O(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function te(e){var t,n;for(n in e)s(e,n)&&(t=e[n],O(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function k(e,t){var n=p({},e),r;for(r in t)s(t,r)&&(o(e[r])&&o(t[r])?(n[r]={},p(n[r],e[r]),p(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)s(e,r)&&!s(t,r)&&o(e[r])&&(n[r]=p({},n[r]));return n}function A(e){e!=null&&this.set(e)}var ne=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n},re={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function ie(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r}function j(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var ae=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},M={};function N(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(M[e]=i),t&&(M[t[0]]=function(){return j(i.apply(this,arguments),t[1],t[2])}),n&&(M[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function ce(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function le(e){var t=e.match(ae),n,r;for(n=0,r=t.length;n<r;n++)M[t[n]]?t[n]=M[t[n]]:t[n]=ce(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=O(t[a])?t[a].call(n,e):t[a];return i}}function ue(e,t){return e.isValid()?(t=de(t,e.localeData()),se[t]=se[t]||le(t),se[t](e)):e.localeData().invalidDate()}function de(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(oe.lastIndex=0;n>=0&&oe.test(e);)e=e.replace(oe,r),oe.lastIndex=0,--n;return e}var fe={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function pe(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ae).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var me=`Invalid date`;function P(){return this._invalidDate}var he=`%d`,ge=/\d{1,2}/;function _e(e){return this._ordinal.replace(`%d`,e)}var ve={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function ye(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)}function F(e,t){var n=this._relativeTime[e>0?`future`:`past`];return O(n)?n(t):n.replace(/%s/i,t)}var be={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function I(e){return typeof e==`string`?be[e]||be[e.toLowerCase()]:void 0}function xe(e){var t={},n,r;for(r in e)s(e,r)&&(n=I(r),n&&(t[n]=e[r]));return t}var L={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Se(e){var t=[],n;for(n in e)s(e,n)&&t.push({unit:n,priority:L[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var Ce=/\d/,R=/\d\d/,we=/\d{3}/,Te=/\d{4}/,Ee=/[+-]?\d{6}/,z=/\d\d?/,De=/\d\d\d\d?/,Oe=/\d\d\d\d\d\d?/,ke=/\d{1,3}/,Ae=/\d{1,4}/,je=/[+-]?\d{1,6}/,Me=/\d+/,Ne=/[+-]?\d+/,Pe=/Z|[+-]\d\d:?\d\d/gi,Fe=/Z|[+-]\d\d(?::?\d\d)?/gi,Ie=/[+-]?\d+(\.\d{1,3})?/,Le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Re=/^[1-9]\d?/,ze=/^([1-9]\d|\d)/,Be={};function B(e,t,n){Be[e]=O(t)?t:function(e,r){return e&&n?n:t}}function Ve(e,t){return s(Be,e)?Be[e](t._strict,t._locale):new RegExp(He(e))}function He(e){return Ue(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function Ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function V(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function H(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=V(t)),n}var We={};function U(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),u(t)&&(r=function(e,n){n[t]=H(e)}),i=e.length,n=0;n<i;n++)We[e[n]]=r}function Ge(e,t){U(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function Ke(e,t,n){t!=null&&s(We,e)&&We[e](t,n._a,n,e)}function qe(e){return e%4==0&&e%100!=0||e%400==0}var W=0,Je=1,Ye=2,G=3,K=4,Xe=5,Ze=6,Qe=7,$e=8;N(`Y`,0,0,function(){var e=this.year();return e<=9999?j(e,4):`+`+e}),N(0,[`YY`,2],0,function(){return this.year()%100}),N(0,[`YYYY`,4],0,`year`),N(0,[`YYYYY`,5],0,`year`),N(0,[`YYYYYY`,6,!0],0,`year`),B(`Y`,Ne),B(`YY`,z,R),B(`YYYY`,Ae,Te),B(`YYYYY`,je,Ee),B(`YYYYYY`,je,Ee),U([`YYYYY`,`YYYYYY`],W),U(`YYYY`,function(e,t){t[W]=e.length===2?r.parseTwoDigitYear(e):H(e)}),U(`YY`,function(e,t){t[W]=r.parseTwoDigitYear(e)}),U(`Y`,function(e,t){t[W]=parseInt(e,10)});function et(e){return qe(e)?366:365}r.parseTwoDigitYear=function(e){return H(e)+(H(e)>68?1900:2e3)};var tt=rt(`FullYear`,!0);function nt(){return qe(this.year())}function rt(e,t){return function(n){return n==null?it(this,e):(at(this,e,n),r.updateOffset(this,t),this)}}function it(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function at(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!qe(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function ot(e){return e=I(e),O(this[e])?this[e]():this}function st(e,t){if(typeof e==`object`){e=xe(e);var n=Se(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=I(e),O(this[e]))return this[e](t);return this}function ct(e,t){return(e%t+t)%t}var q=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function lt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=ct(t,12);return e+=(t-n)/12,n===1?qe(e)?29:28:31-n%7%2}N(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),N(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),N(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),B(`M`,z,Re),B(`MM`,z,R),B(`MMM`,function(e,t){return t.monthsShortRegex(e)}),B(`MMMM`,function(e,t){return t.monthsRegex(e)}),U([`M`,`MM`],function(e,t){t[Je]=H(e)-1}),U([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?g(n).invalidMonth=e:t[Je]=i});var ut=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),dt=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),ft=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,pt=Le,mt=Le;function ht(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ft).test(t)?`format`:`standalone`][e.month()]:a(this._months)?this._months:this._months.standalone}function gt(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ft.test(t)?`format`:`standalone`][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _t(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=q.call(this._shortMonthsParse,o),i===-1?null:i):(i=q.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=q.call(this._shortMonthsParse,o),i===-1?(i=q.call(this._longMonthsParse,o),i===-1?null:i):i):(i=q.call(this._longMonthsParse,o),i===-1?(i=q.call(this._shortMonthsParse,o),i===-1?null:i):i)}function vt(e,t,n){var r,i,a;if(this._monthsParseExact)return _t.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function yt(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=H(t);else if(t=e.localeData().monthsParse(t),!u(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,lt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function bt(e){return e==null?it(this,`Month`):(yt(this,e),r.updateOffset(this,!0),this)}function xt(){return lt(this.year(),this.month())}function St(e){return this._monthsParseExact?(s(this,`_monthsRegex`)||wt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,`_monthsShortRegex`)||(this._monthsShortRegex=pt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ct(e){return this._monthsParseExact?(s(this,`_monthsRegex`)||wt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,`_monthsRegex`)||(this._monthsRegex=mt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function wt(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=m([2e3,i]),o=Ue(this.monthsShort(a,``)),s=Ue(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function Tt(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function Et(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Dt(e,t,n){var r=7+t-n;return-((7+Et(e,0,r).getUTCDay()-t)%7)+r-1}function Ot(e,t,n,r,i){var a=(7+n-r)%7,o=Dt(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=et(c)+s):s>et(e)?(c=e+1,l=s-et(e)):(c=e,l=s),{year:c,dayOfYear:l}}function kt(e,t,n){var r=Dt(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+At(o,t,n)):i>At(e.year(),t,n)?(a=i-At(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function At(e,t,n){var r=Dt(e,t,n),i=Dt(e+1,t,n);return(et(e)-r+i)/7}N(`w`,[`ww`,2],`wo`,`week`),N(`W`,[`WW`,2],`Wo`,`isoWeek`),B(`w`,z,Re),B(`ww`,z,R),B(`W`,z,Re),B(`WW`,z,R),Ge([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=H(e)});function jt(e){return kt(e,this._week.dow,this._week.doy).week}var Mt={dow:0,doy:6};function Nt(){return this._week.dow}function Pt(){return this._week.doy}function Ft(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function It(e){var t=kt(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}N(`d`,0,`do`,`day`),N(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),N(`e`,0,0,`weekday`),N(`E`,0,0,`isoWeekday`),B(`d`,z),B(`e`,z),B(`E`,z),B(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),B(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),B(`dddd`,function(e,t){return t.weekdaysRegex(e)}),Ge([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?g(n).invalidWeekday=e:t.d=i}),Ge([`d`,`e`,`E`],function(e,t,n,r){t[r]=H(e)});function Lt(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function Rt(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function zt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Bt=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),Vt=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),Ht=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),Ut=Le,Wt=Le,Gt=Le;function Kt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?zt(n,this._week.dow):e?n[e.day()]:n}function qt(e){return e===!0?zt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Jt(e){return e===!0?zt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=q.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=q.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=q.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=q.call(this._weekdaysParse,o),i!==-1||(i=q.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=q.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=q.call(this._shortWeekdaysParse,o),i!==-1||(i=q.call(this._weekdaysParse,o),i!==-1)?i:(i=q.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=q.call(this._minWeekdaysParse,o),i!==-1||(i=q.call(this._weekdaysParse,o),i!==-1)?i:(i=q.call(this._shortWeekdaysParse,o),i===-1?null:i))}function Xt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Yt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function Zt(e){if(!this.isValid())return e==null?NaN:this;var t=it(this,`Day`);return e==null?t:(e=Lt(e,this.localeData()),this.add(e-t,`d`))}function Qt(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function $t(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=Rt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function en(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||rn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,`_weekdaysRegex`)||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function tn(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||rn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=Wt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function nn(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||rn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=Gt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function rn(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=m([2e3,1]).day(a),s=Ue(this.weekdaysMin(o,``)),c=Ue(this.weekdaysShort(o,``)),l=Ue(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function an(){return this.hours()%12||12}function on(){return this.hours()||24}N(`H`,[`HH`,2],0,`hour`),N(`h`,[`hh`,2],0,an),N(`k`,[`kk`,2],0,on),N(`hmm`,0,0,function(){return``+an.apply(this)+j(this.minutes(),2)}),N(`hmmss`,0,0,function(){return``+an.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),N(`Hmm`,0,0,function(){return``+this.hours()+j(this.minutes(),2)}),N(`Hmmss`,0,0,function(){return``+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)});function sn(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}sn(`a`,!0),sn(`A`,!1);function cn(e,t){return t._meridiemParse}B(`a`,cn),B(`A`,cn),B(`H`,z,ze),B(`h`,z,Re),B(`k`,z,Re),B(`HH`,z,R),B(`hh`,z,R),B(`kk`,z,R),B(`hmm`,De),B(`hmmss`,Oe),B(`Hmm`,De),B(`Hmmss`,Oe),U([`H`,`HH`],G),U([`k`,`kk`],function(e,t,n){var r=H(e);t[G]=r===24?0:r}),U([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),U([`h`,`hh`],function(e,t,n){t[G]=H(e),g(n).bigHour=!0}),U(`hmm`,function(e,t,n){var r=e.length-2;t[G]=H(e.substr(0,r)),t[K]=H(e.substr(r)),g(n).bigHour=!0}),U(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[G]=H(e.substr(0,r)),t[K]=H(e.substr(r,2)),t[Xe]=H(e.substr(i)),g(n).bigHour=!0}),U(`Hmm`,function(e,t,n){var r=e.length-2;t[G]=H(e.substr(0,r)),t[K]=H(e.substr(r))}),U(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[G]=H(e.substr(0,r)),t[K]=H(e.substr(r,2)),t[Xe]=H(e.substr(i))});function ln(e){return(e+``).toLowerCase().charAt(0)===`p`}var un=/[ap]\.?m?\.?/i,dn=rt(`Hours`,!0);function fn(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var pn={calendar:re,longDateFormat:fe,invalidDate:me,ordinal:he,dayOfMonthOrdinalParse:ge,relativeTime:ve,months:ut,monthsShort:dt,week:Mt,weekdays:Bt,weekdaysMin:Ht,weekdaysShort:Vt,meridiemParse:un},J={},mn={},hn;function gn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function _n(e){return e&&e.toLowerCase().replace(`_`,`-`)}function vn(e){for(var t=0,n,r,i,a;t<e.length;){for(a=_n(e[t]).split(`-`),n=a.length,r=_n(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=bn(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&gn(a,r)>=n-1)break;n--}t++}return hn}function yn(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function bn(e){var r=null,i;if(J[e]===void 0&&t!==void 0&&t&&t.exports&&yn(e))try{r=hn._abbr,i=n,i(`./locale/`+e),xn(r)}catch{J[e]=null}return J[e]}function xn(e,t){var n;return e&&(n=l(t)?wn(e):Sn(e,t),n?hn=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),hn._abbr}function Sn(e,t){if(t!==null){var n,r=pn;if(t.abbr=e,J[e]!=null)ee(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=J[e]._config;else if(t.parentLocale!=null){if(J[t.parentLocale]!=null)r=J[t.parentLocale]._config;else if(n=bn(t.parentLocale),n!=null)r=n._config;else return mn[t.parentLocale]||(mn[t.parentLocale]=[]),mn[t.parentLocale].push({name:e,config:t}),null}return J[e]=new A(k(r,t)),mn[e]&&mn[e].forEach(function(e){Sn(e.name,e.config)}),xn(e),J[e]}return delete J[e],null}function Cn(e,t){if(t!=null){var n,r,i=pn;J[e]!=null&&J[e].parentLocale!=null?J[e].set(k(J[e]._config,t)):(r=bn(e),r!=null&&(i=r._config),t=k(i,t),r??(t.abbr=e),n=new A(t),n.parentLocale=J[e],J[e]=n),xn(e)}else J[e]!=null&&(J[e].parentLocale==null?J[e]!=null&&delete J[e]:(J[e]=J[e].parentLocale,e===xn()&&xn(e)));return J[e]}function wn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return hn;if(!a(e)){if(t=bn(e),t)return t;e=[e]}return vn(e)}function Tn(){return ne(J)}function En(e){var t,n=e._a;return n&&g(e).overflow===-2&&(t=n[Je]<0||n[Je]>11?Je:n[Ye]<1||n[Ye]>lt(n[W],n[Je])?Ye:n[G]<0||n[G]>24||n[G]===24&&(n[K]!==0||n[Xe]!==0||n[Ze]!==0)?G:n[K]<0||n[K]>59?K:n[Xe]<0||n[Xe]>59?Xe:n[Ze]<0||n[Ze]>999?Ze:-1,g(e)._overflowDayOfYear&&(t<W||t>Ye)&&(t=Ye),g(e)._overflowWeeks&&t===-1&&(t=Qe),g(e)._overflowWeekday&&t===-1&&(t=$e),g(e).overflow=t),e}var Dn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,On=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kn=/Z|[+-]\d\d(?::?\d\d)?/,An=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],jn=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],Mn=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Pn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Fn(e){var t,n,r=e._i,i=Dn.exec(r)||On.exec(r),a,o,s,c,l=An.length,u=jn.length;if(i){for(g(e).iso=!0,t=0,n=l;t<n;t++)if(An[t][1].exec(i[1])){o=An[t][0],a=An[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(jn[t][1].exec(i[3])){s=(i[2]||` `)+jn[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4]){if(kn.exec(i[4]))c=`Z`;else{e._isValid=!1;return}}e._f=o+(s||``)+(c||``),qn(e)}else e._isValid=!1}function In(e,t,n,r,i,a){var o=[Ln(e),dt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function Ln(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rn(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function zn(e,t,n){return e&&Vt.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(g(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function Bn(e,t,n){if(e)return Pn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Vn(e){var t=Nn.exec(Rn(e._i)),n;if(t){if(n=In(t[4],t[3],t[2],t[5],t[6],t[7]),!zn(t[1],n,e))return;e._a=n,e._tzm=Bn(t[8],t[9],t[10]),e._d=Et.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Hn(e){var t=Mn.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Fn(e),e._isValid===!1)delete e._isValid;else return;if(Vn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:r.createFromInputFallback(e)}r.createFromInputFallback=E(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function Un(e,t,n){return e??t??n}function Wn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Gn(e){var t,n,r=[],i,a,o;if(!e._d){for(i=Wn(e),e._w&&e._a[Ye]==null&&e._a[Je]==null&&Kn(e),e._dayOfYear!=null&&(o=Un(e._a[W],i[W]),(e._dayOfYear>et(o)||e._dayOfYear===0)&&(g(e)._overflowDayOfYear=!0),n=Et(o,0,e._dayOfYear),e._a[Je]=n.getUTCMonth(),e._a[Ye]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?+(t===2):e._a[t];e._a[G]===24&&e._a[K]===0&&e._a[Xe]===0&&e._a[Ze]===0&&(e._nextDay=!0,e._a[G]=0),e._d=(e._useUTC?Et:Tt).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[G]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(g(e).weekdayMismatch=!0)}}function Kn(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=Un(t.GG,e._a[W],kt(Y(),1,4).year),r=Un(t.W,1),i=Un(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=kt(Y(),a,o),n=Un(t.gg,e._a[W],l.year),r=Un(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>At(n,a,o)?g(e)._overflowWeeks=!0:c==null?(s=Ot(n,r,i,a,o),e._a[W]=s.year,e._dayOfYear=s.dayOfYear):g(e)._overflowWeekday=!0}r.ISO_8601=function(){},r.RFC_2822=function(){};function qn(e){if(e._f===r.ISO_8601){Fn(e);return}if(e._f===r.RFC_2822){Vn(e);return}e._a=[],g(e).empty=!0;var t=``+e._i,n,i,a,o,s,c=t.length,l=0,u,d;for(a=de(e._f,e._locale).match(ae)||[],d=a.length,n=0;n<d;n++)o=a[n],i=(t.match(Ve(o,e))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&g(e).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),l+=i.length),M[o]?(i?g(e).empty=!1:g(e).unusedTokens.push(o),Ke(o,i,e)):e._strict&&!i&&g(e).unusedTokens.push(o);g(e).charsLeftOver=c-l,t.length>0&&g(e).unusedInput.push(t),e._a[G]<=12&&g(e).bigHour===!0&&e._a[G]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[G]=Jn(e._locale,e._a[G],e._meridiem),u=g(e).era,u!==null&&(e._a[W]=e._locale.erasConvertYear(u,e._a[W])),Gn(e),En(e)}function Jn(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function Yn(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){g(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],qn(t),v(t)&&(o=!0),a+=g(t).charsLeftOver,a+=g(t).unusedTokens.length*10,g(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));p(e,n||t)}function Xn(e){if(!e._d){var t=xe(e._i),n=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Gn(e)}}function Zn(e){var t=new C(En(Qn(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function Qn(e){var t=e._i,n=e._f;return e._locale=e._locale||wn(e._l),t===null||n===void 0&&t===``?y({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),w(t)?new C(En(t)):(d(t)?e._d=t:a(n)?Yn(e):n?qn(e):$n(e),v(e)||(e._d=null),e))}function $n(e){var t=e._i;l(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):typeof t==`string`?Hn(e):a(t)?(e._a=f(t.slice(0),function(e){return parseInt(e,10)}),Gn(e)):o(t)?Xn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function er(e,t,n,r,i){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(o(e)&&c(e)||a(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Zn(s)}function Y(e,t,n,r){return er(e,t,n,r,!1)}var tr=E(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=Y.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),nr=E(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=Y.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function rr(e,t){var n,r;if(t.length===1&&a(t[0])&&(t=t[0]),!t.length)return Y();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function ir(){return rr(`isBefore`,[].slice.call(arguments,0))}function ar(){return rr(`isAfter`,[].slice.call(arguments,0))}var or=function(){return Date.now?Date.now():+new Date},sr=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function cr(e){var t,n=!1,r,i=sr.length;for(t in e)if(s(e,t)&&!(q.call(sr,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[sr[r]]){if(n)return!1;parseFloat(e[sr[r]])!==H(e[sr[r]])&&(n=!0)}return!0}function lr(){return this._isValid}function ur(){return X(NaN)}function dr(e){var t=xe(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=cr(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=wn(),this._bubble()}function fr(e){return e instanceof dr}function pr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function mr(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&H(e[o])!==H(t[o]))&&a++;return a+i}function hr(e,t){N(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+j(~~(e/60),2)+t+j(~~e%60,2)})}hr(`Z`,`:`),hr(`ZZ`,``),B(`Z`,Fe),B(`ZZ`,Fe),U([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=_r(Fe,e)});var gr=/([\+\-]|\d\d)/gi;function _r(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(gr)||[`-`,0,0],a=+(i[1]*60)+H(i[2]),a===0?0:i[0]===`+`?a:-a)}function vr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(w(e)||d(e)?e.valueOf():Y(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Y(e).local()}function yr(e){return-Math.round(e._d.getTimezoneOffset())}r.updateOffset=function(){};function br(e,t,n){var i=this._offset||0,a;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=_r(Fe,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=yr(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,`m`),i!==e&&(!t||this._changeInProgress?Lr(this,X(e-i,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,r.updateOffset(this,!0),null)),this}return this._isUTC?i:yr(this)}function xr(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function Sr(e){return this.utcOffset(0,e)}function Cr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(yr(this),`m`)),this}function wr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=_r(Pe,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function Tr(e){return this.isValid()?(e=e?Y(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function Er(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dr(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=Qn(e),e._a?(t=e._isUTC?m(e._a):Y(e._a),this._isDSTShifted=this.isValid()&&mr(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Or(){return this.isValid()?!this._isUTC:!1}function kr(){return this.isValid()?this._isUTC:!1}function Ar(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Mr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function X(e,t){var n=e,r=null,i,a,o;return fr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=jr.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:H(r[Ye])*i,h:H(r[G])*i,m:H(r[K])*i,s:H(r[Xe])*i,ms:H(pr(r[Ze]*1e3))*i}):(r=Mr.exec(e))?(i=r[1]===`-`?-1:1,n={y:Nr(r[2],i),M:Nr(r[3],i),w:Nr(r[4],i),d:Nr(r[5],i),h:Nr(r[6],i),m:Nr(r[7],i),s:Nr(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=Fr(Y(n.from),Y(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new dr(n),fr(e)&&s(e,`_locale`)&&(a._locale=e._locale),fr(e)&&s(e,`_isValid`)&&(a._isValid=e._isValid),a}X.fn=dr.prototype,X.invalid=ur;function Nr(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function Pr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function Fr(e,t){var n;return e.isValid()&&t.isValid()?(t=vr(t,e),e.isBefore(t)?n=Pr(e,t):(n=Pr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ir(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(ee(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=X(n,r),Lr(this,i,e),this}}function Lr(e,t,n,i){var a=t._milliseconds,o=pr(t._days),s=pr(t._months);e.isValid()&&(i??=!0,s&&yt(e,it(e,`Month`)+s*n),o&&at(e,`Date`,it(e,`Date`)+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&r.updateOffset(e,o||s))}var Rr=Ir(1,`add`),zr=Ir(-1,`subtract`);function Br(e){return typeof e==`string`||e instanceof String}function Vr(e){return w(e)||d(e)||Br(e)||u(e)||Ur(e)||Hr(e)||e==null}function Hr(e){var t=o(e)&&!c(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,l=r.length;for(i=0;i<l;i+=1)a=r[i],n||=s(e,a);return t&&n}function Ur(e){var t=a(e),n=!1;return t&&(n=e.filter(function(t){return!u(t)&&Br(e)}).length===0),t&&n}function Wr(e){var t=o(e)&&!c(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=s(e,a);return t&&n}function Gr(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function Kr(e,t){arguments.length===1&&(arguments[0]?Vr(arguments[0])?(e=arguments[0],t=void 0):Wr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Y(),i=vr(n,this).startOf(`day`),a=r.calendarFormat(this,i)||`sameElse`,o=t&&(O(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,Y(n)))}function qr(){return new C(this)}function Jr(e,t){var n=w(e)?e:Y(e);return this.isValid()&&n.isValid()?(t=I(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Yr(e,t){var n=w(e)?e:Y(e);return this.isValid()&&n.isValid()?(t=I(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Xr(e,t,n,r){var i=w(e)?e:Y(e),a=w(t)?t:Y(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Zr(e,t){var n=w(e)?e:Y(e),r;return this.isValid()&&n.isValid()?(t=I(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function $r(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function ei(e,t,n){var r,i,a;if(!this.isValid()||(r=vr(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=I(t),t){case`year`:a=ti(this,r)/12;break;case`month`:a=ti(this,r);break;case`quarter`:a=ti(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:V(a)}function ti(e,t){if(e.date()<t.date())return-ti(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}r.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,r.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function ni(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function ri(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?ue(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,ue(n,`Z`)):ue(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function ii(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function ai(e){e||=this.isUtc()?r.defaultFormatUtc:r.defaultFormat;var t=ue(this,e);return this.localeData().postformat(t)}function oi(e,t){return this.isValid()&&(w(e)&&e.isValid()||Y(e).isValid())?X({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(Y(),e)}function ci(e,t){return this.isValid()&&(w(e)&&e.isValid()||Y(e).isValid())?X({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function li(e){return this.to(Y(),e)}function ui(e){var t;return e===void 0?this._locale._abbr:(t=wn(e),t!=null&&(this._locale=t),this)}var di=E(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function fi(){return this._locale}var pi=1e3,mi=60*pi,hi=60*mi,gi=3506328*hi;function _i(e,t){return(e%t+t)%t}function vi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-gi:new Date(e,t,n).valueOf()}function yi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-gi:Date.UTC(e,t,n)}function bi(e){var t,n;if(e=I(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?yi:vi,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=_i(t+(this._isUTC?0:this.utcOffset()*mi),hi);break;case`minute`:t=this._d.valueOf(),t-=_i(t,mi);break;case`second`:t=this._d.valueOf(),t-=_i(t,pi)}return this._d.setTime(t),r.updateOffset(this,!0),this}function xi(e){var t,n;if(e=I(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?yi:vi,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=hi-_i(t+(this._isUTC?0:this.utcOffset()*mi),hi)-1;break;case`minute`:t=this._d.valueOf(),t+=mi-_i(t,mi)-1;break;case`second`:t=this._d.valueOf(),t+=pi-_i(t,pi)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function Si(){return this._d.valueOf()-(this._offset||0)*6e4}function Ci(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Ti(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ei(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Di(){return this.isValid()?this.toISOString():null}function Oi(){return v(this)}function ki(){return p({},g(this))}function Ai(){return g(this).overflow}function ji(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}N(`N`,0,0,`eraAbbr`),N(`NN`,0,0,`eraAbbr`),N(`NNN`,0,0,`eraAbbr`),N(`NNNN`,0,0,`eraName`),N(`NNNNN`,0,0,`eraNarrow`),N(`y`,[`y`,1],`yo`,`eraYear`),N(`y`,[`yy`,2],0,`eraYear`),N(`y`,[`yyy`,3],0,`eraYear`),N(`y`,[`yyyy`,4],0,`eraYear`),B(`N`,Hi),B(`NN`,Hi),B(`NNN`,Hi),B(`NNNN`,Ui),B(`NNNNN`,Wi),U([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e}),B(`y`,Me),B(`yy`,Me),B(`yyy`,Me),B(`yyyy`,Me),B(`yo`,Gi),U([`y`,`yy`,`yyy`,`yyyy`],W),U([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[W]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)});function Mi(e,t){var n,i,a,o=this._eras||wn(`en`)._eras;for(n=0,i=o.length;n<i;++n)switch(typeof o[n].since==`string`&&(a=r(o[n].since).startOf(`day`),o[n].since=a.valueOf()),typeof o[n].until){case`undefined`:o[n].until=1/0;break;case`string`:a=r(o[n].until).startOf(`day`).valueOf(),o[n].until=a.valueOf()}return o}function Ni(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r]}else if([o,s,c].indexOf(e)>=0)return a[r]}function Pi(e,t){var n=e.since<=e.until?1:-1;return t===void 0?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Fi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function Li(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function Ri(){var e,t,n,i,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,i=this.clone().startOf(`day`).valueOf(),a[e].since<=i&&i<=a[e].until||a[e].until<=i&&i<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function zi(e){return s(this,`_erasNameRegex`)||Ki.call(this),e?this._erasNameRegex:this._erasRegex}function Bi(e){return s(this,`_erasAbbrRegex`)||Ki.call(this),e?this._erasAbbrRegex:this._erasRegex}function Vi(e){return s(this,`_erasNarrowRegex`)||Ki.call(this),e?this._erasNarrowRegex:this._erasRegex}function Hi(e,t){return t.erasAbbrRegex(e)}function Ui(e,t){return t.erasNameRegex(e)}function Wi(e,t){return t.erasNarrowRegex(e)}function Gi(e,t){return t._eraYearOrdinalRegex||Me}function Ki(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=Ue(l[i].name),s=Ue(l[i].abbr),c=Ue(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}N(0,[`gg`,2],0,function(){return this.weekYear()%100}),N(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function qi(e,t){N(0,[e,e.length],0,t)}qi(`gggg`,`weekYear`),qi(`ggggg`,`weekYear`),qi(`GGGG`,`isoWeekYear`),qi(`GGGGG`,`isoWeekYear`),B(`G`,Ne),B(`g`,Ne),B(`GG`,z,R),B(`gg`,z,R),B(`GGGG`,Ae,Te),B(`gggg`,Ae,Te),B(`GGGGG`,je,Ee),B(`ggggg`,je,Ee),Ge([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=H(e)}),Ge([`gg`,`GG`],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)});function Ji(e){return ea.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Yi(e){return ea.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Xi(){return At(this.year(),1,4)}function Zi(){return At(this.isoWeekYear(),1,4)}function Qi(){var e=this.localeData()._week;return At(this.year(),e.dow,e.doy)}function $i(){var e=this.localeData()._week;return At(this.weekYear(),e.dow,e.doy)}function ea(e,t,n,r,i){var a;return e==null?kt(this,r,i).year:(a=At(e,r,i),t>a&&(t=a),ta.call(this,e,t,n,r,i))}function ta(e,t,n,r,i){var a=Ot(e,t,n,r,i),o=Et(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}N(`Q`,0,`Qo`,`quarter`),B(`Q`,Ce),U(`Q`,function(e,t){t[Je]=(H(e)-1)*3});function na(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}N(`D`,[`DD`,2],`Do`,`date`),B(`D`,z,Re),B(`DD`,z,R),B(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),U([`D`,`DD`],Ye),U(`Do`,function(e,t){t[Ye]=H(e.match(z)[0])});var ra=rt(`Date`,!0);N(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),B(`DDD`,ke),B(`DDDD`,we),U([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=H(e)});function ia(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}N(`m`,[`mm`,2],0,`minute`),B(`m`,z,ze),B(`mm`,z,R),U([`m`,`mm`],K);var aa=rt(`Minutes`,!1);N(`s`,[`ss`,2],0,`second`),B(`s`,z,ze),B(`ss`,z,R),U([`s`,`ss`],Xe);var oa=rt(`Seconds`,!1);N(`S`,0,0,function(){return~~(this.millisecond()/100)}),N(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),N(0,[`SSS`,3],0,`millisecond`),N(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),N(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),N(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),N(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),N(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),N(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),B(`S`,ke,Ce),B(`SS`,ke,R),B(`SSS`,ke,we);var sa,ca;for(sa=`SSSS`;sa.length<=9;sa+=`S`)B(sa,Me);function la(e,t){t[Ze]=H((`0.`+e)*1e3)}for(sa=`S`;sa.length<=9;sa+=`S`)U(sa,la);ca=rt(`Milliseconds`,!1),N(`z`,0,0,`zoneAbbr`),N(`zz`,0,0,`zoneName`);function ua(){return this._isUTC?`UTC`:``}function da(){return this._isUTC?`Coordinated Universal Time`:``}var Z=C.prototype;Z.add=Rr,Z.calendar=Kr,Z.clone=qr,Z.diff=ei,Z.endOf=xi,Z.format=ai,Z.from=oi,Z.fromNow=si,Z.to=ci,Z.toNow=li,Z.get=ot,Z.invalidAt=Ai,Z.isAfter=Jr,Z.isBefore=Yr,Z.isBetween=Xr,Z.isSame=Zr,Z.isSameOrAfter=Qr,Z.isSameOrBefore=$r,Z.isValid=Oi,Z.lang=di,Z.locale=ui,Z.localeData=fi,Z.max=nr,Z.min=tr,Z.parsingFlags=ki,Z.set=st,Z.startOf=bi,Z.subtract=zr,Z.toArray=Ti,Z.toObject=Ei,Z.toDate=wi,Z.toISOString=ri,Z.inspect=ii,typeof Symbol<`u`&&Symbol.for!=null&&(Z[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),Z.toJSON=Di,Z.toString=ni,Z.unix=Ci,Z.valueOf=Si,Z.creationData=ji,Z.eraName=Fi,Z.eraNarrow=Ii,Z.eraAbbr=Li,Z.eraYear=Ri,Z.year=tt,Z.isLeapYear=nt,Z.weekYear=Ji,Z.isoWeekYear=Yi,Z.quarter=Z.quarters=na,Z.month=bt,Z.daysInMonth=xt,Z.week=Z.weeks=Ft,Z.isoWeek=Z.isoWeeks=It,Z.weeksInYear=Qi,Z.weeksInWeekYear=$i,Z.isoWeeksInYear=Xi,Z.isoWeeksInISOWeekYear=Zi,Z.date=ra,Z.day=Z.days=Zt,Z.weekday=Qt,Z.isoWeekday=$t,Z.dayOfYear=ia,Z.hour=Z.hours=dn,Z.minute=Z.minutes=aa,Z.second=Z.seconds=oa,Z.millisecond=Z.milliseconds=ca,Z.utcOffset=br,Z.utc=Sr,Z.local=Cr,Z.parseZone=wr,Z.hasAlignedHourOffset=Tr,Z.isDST=Er,Z.isLocal=Or,Z.isUtcOffset=kr,Z.isUtc=Ar,Z.isUTC=Ar,Z.zoneAbbr=ua,Z.zoneName=da,Z.dates=E(`dates accessor is deprecated. Use date instead.`,ra),Z.months=E(`months accessor is deprecated. Use month instead`,bt),Z.years=E(`years accessor is deprecated. Use year instead`,tt),Z.zone=E(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,xr),Z.isDSTShifted=E(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,Dr);function fa(e){return Y(e*1e3)}function pa(){return Y.apply(null,arguments).parseZone()}function ma(e){return e}var Q=A.prototype;Q.calendar=ie,Q.longDateFormat=pe,Q.invalidDate=P,Q.ordinal=_e,Q.preparse=ma,Q.postformat=ma,Q.relativeTime=ye,Q.pastFuture=F,Q.set=te,Q.eras=Mi,Q.erasParse=Ni,Q.erasConvertYear=Pi,Q.erasAbbrRegex=Bi,Q.erasNameRegex=zi,Q.erasNarrowRegex=Vi,Q.months=ht,Q.monthsShort=gt,Q.monthsParse=vt,Q.monthsRegex=Ct,Q.monthsShortRegex=St,Q.week=jt,Q.firstDayOfYear=Pt,Q.firstDayOfWeek=Nt,Q.weekdays=Kt,Q.weekdaysMin=Jt,Q.weekdaysShort=qt,Q.weekdaysParse=Xt,Q.weekdaysRegex=en,Q.weekdaysShortRegex=tn,Q.weekdaysMinRegex=nn,Q.isPM=ln,Q.meridiem=fn;function ha(e,t,n,r){var i=wn(),a=m().set(r,t);return i[n](a,e)}function ga(e,t,n){if(u(e)&&(t=e,e=void 0),e||=``,t!=null)return ha(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=ha(e,r,n,`month`);return i}function _a(e,t,n,r){typeof e==`boolean`?(u(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,u(t)&&(n=t,t=void 0),t||=``);var i=wn(),a=e?i._week.dow:0,o,s=[];if(n!=null)return ha(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=ha(t,(o+a)%7,r,`day`);return s}function va(e,t){return ga(e,t,`months`)}function ya(e,t){return ga(e,t,`monthsShort`)}function ba(e,t,n){return _a(e,t,n,`weekdays`)}function xa(e,t,n){return _a(e,t,n,`weekdaysShort`)}function Sa(e,t,n){return _a(e,t,n,`weekdaysMin`)}xn(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(H(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),r.lang=E(`moment.lang is deprecated. Use moment.locale instead.`,xn),r.langData=E(`moment.langData is deprecated. Use moment.localeData instead.`,wn);var Ca=Math.abs;function wa(){var e=this._data;return this._milliseconds=Ca(this._milliseconds),this._days=Ca(this._days),this._months=Ca(this._months),e.milliseconds=Ca(e.milliseconds),e.seconds=Ca(e.seconds),e.minutes=Ca(e.minutes),e.hours=Ca(e.hours),e.months=Ca(e.months),e.years=Ca(e.years),this}function Ta(e,t,n,r){var i=X(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ea(e,t){return Ta(this,e,t,1)}function Da(e,t){return Ta(this,e,t,-1)}function Oa(e){return e<0?Math.floor(e):Math.ceil(e)}function ka(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Oa(ja(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=V(e/1e3),r.seconds=i%60,a=V(i/60),r.minutes=a%60,o=V(a/60),r.hours=o%24,t+=V(o/24),c=V(Aa(t)),n+=c,t-=Oa(ja(c)),s=V(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function Aa(e){return e*4800/146097}function ja(e){return e*146097/4800}function Ma(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=I(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+Aa(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(ja(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function Na(e){return function(){return this.as(e)}}var Pa=Na(`ms`),Fa=Na(`s`),Ia=Na(`m`),La=Na(`h`),Ra=Na(`d`),za=Na(`w`),Ba=Na(`M`),Va=Na(`Q`),Ha=Na(`y`),Ua=Pa;function Wa(){return X(this)}function Ga(e){return e=I(e),this.isValid()?this[e+`s`]():NaN}function Ka(e){return function(){return this.isValid()?this._data[e]:NaN}}var qa=Ka(`milliseconds`),Ja=Ka(`seconds`),Ya=Ka(`minutes`),Xa=Ka(`hours`),Za=Ka(`days`),Qa=Ka(`months`),$a=Ka(`years`);function eo(){return V(this.days()/7)}var to=Math.round,no={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ro(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function io(e,t,n,r){var i=X(e).abs(),a=to(i.as(`s`)),o=to(i.as(`m`)),s=to(i.as(`h`)),c=to(i.as(`d`)),l=to(i.as(`M`)),u=to(i.as(`w`)),d=to(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,ro.apply(null,f)}function ao(e){return e===void 0?to:typeof e==`function`&&(to=e,!0)}function oo(e,t){return no[e]===void 0?!1:t===void 0?no[e]:(no[e]=t,e===`s`&&(no.ss=t-1),!0)}function so(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=no,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},no,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=io(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var co=Math.abs;function lo(e){return(e>0)-(e<0)||+e}function uo(){if(!this.isValid())return this.localeData().invalidDate();var e=co(this._milliseconds)/1e3,t=co(this._days),n=co(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=V(e/60),i=V(r/60),e%=60,r%=60,a=V(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=lo(this._months)===lo(s)?``:`-`,u=lo(this._days)===lo(s)?``:`-`,d=lo(this._milliseconds)===lo(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var $=dr.prototype
14
14
  //! moment.js
15
- ;return $.isValid=cr,$.abs=wa,$.add=Ea,$.subtract=Da,$.as=Ma,$.asMilliseconds=Pa,$.asSeconds=Fa,$.asMinutes=Ia,$.asHours=La,$.asDays=Ra,$.asWeeks=za,$.asMonths=Ba,$.asQuarters=Va,$.asYears=Ha,$.valueOf=Ua,$._bubble=ka,$.clone=Wa,$.get=Ga,$.milliseconds=qa,$.seconds=Ja,$.minutes=Ya,$.hours=Xa,$.days=Za,$.weeks=eo,$.months=Qa,$.years=$a,$.humanize=so,$.toISOString=uo,$.toString=uo,$.toJSON=uo,$.locale=ui,$.localeData=fi,$.toIsoString=E(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,uo),$.lang=di,P(`X`,0,0,`unix`),P(`x`,0,0,`valueOf`),B(`x`,Ne),B(`X`,Ie),U(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),U(`x`,function(e,t,n){n._d=new Date(H(e))}),r.version=`2.30.1`,i(X),r.fn=Z,r.min=rr,r.max=ir,r.now=ar,r.utc=m,r.unix=fa,r.months=va,r.isDate=d,r.locale=bn,r.invalid=y,r.duration=Mr,r.isMoment=w,r.weekdays=ba,r.parseZone=pa,r.localeData=Cn,r.isDuration=dr,r.monthsShort=ya,r.weekdaysMin=Sa,r.defineLocale=xn,r.updateLocale=Sn,r.locales=wn,r.weekdaysShort=xa,r.normalizeUnits=be,r.relativeTimeRounding=ao,r.relativeTimeThreshold=oo,r.calendarFormat=Gr,r.prototype=Z,r.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`},r}))})),Tt=r(((e,t)=>{let n=new Set(`ENOTFOUND.ENETUNREACH.UNABLE_TO_GET_ISSUER_CERT.UNABLE_TO_GET_CRL.UNABLE_TO_DECRYPT_CERT_SIGNATURE.UNABLE_TO_DECRYPT_CRL_SIGNATURE.UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.CERT_SIGNATURE_FAILURE.CRL_SIGNATURE_FAILURE.CERT_NOT_YET_VALID.CERT_HAS_EXPIRED.CRL_NOT_YET_VALID.CRL_HAS_EXPIRED.ERROR_IN_CERT_NOT_BEFORE_FIELD.ERROR_IN_CERT_NOT_AFTER_FIELD.ERROR_IN_CRL_LAST_UPDATE_FIELD.ERROR_IN_CRL_NEXT_UPDATE_FIELD.OUT_OF_MEM.DEPTH_ZERO_SELF_SIGNED_CERT.SELF_SIGNED_CERT_IN_CHAIN.UNABLE_TO_GET_ISSUER_CERT_LOCALLY.UNABLE_TO_VERIFY_LEAF_SIGNATURE.CERT_CHAIN_TOO_LONG.CERT_REVOKED.INVALID_CA.PATH_LENGTH_EXCEEDED.INVALID_PURPOSE.CERT_UNTRUSTED.CERT_REJECTED.HOSTNAME_MISMATCH`.split(`.`));t.exports=e=>!n.has(e&&e.code)})),Et=e(wt(),1),Dt=e(Tt());const Ot=`axios-retry`;function kt(e){return e.response||!e.code||[`ERR_CANCELED`,`ECONNABORTED`].includes(e.code)?!1:(0,Dt.default)(e)}const At=[`get`,`head`,`options`],jt=At.concat([`put`,`delete`]);function Mt(e){return e.code!==`ECONNABORTED`&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function Nt(e){return e.config?.method?Mt(e)&&At.indexOf(e.config.method)!==-1:!1}function Pt(e){return e.config?.method?Mt(e)&&jt.indexOf(e.config.method)!==-1:!1}function Ft(e){return kt(e)||Pt(e)}function It(e=void 0){let t=e?.response?.headers[`retry-after`];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function Lt(e=0,t=void 0){return Math.max(0,It(t))}function Rt(e=0,t=void 0,n=100){let r=2**e*n,i=Math.max(r,It(t));return i+i*.2*Math.random()}function zt(e=100){return(t=0,n=void 0)=>{let r=t*e;return Math.max(r,It(n))}}const Bt={retries:3,retryCondition:Ft,retryDelay:Lt,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Vt(e,t){return{...Bt,...t,...e[Ot]}}function Ht(e,t,n=!1){let r=Vt(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Ot]=r,r}function Ut(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function Wt(e,t){let{retries:n,retryCondition:r}=e,i=(e.retryCount||0)<n&&r(t);if(typeof i==`object`)try{return await i!==!1}catch{return!1}return i}async function Gt(e,t,n,r){t.retryCount+=1;let{retryDelay:i,shouldResetTimeout:a,onRetry:o}=t,s=i(t.retryCount,n);if(Ut(e,r),!a&&r.timeout&&t.lastRequestTime){let e=Date.now()-t.lastRequestTime,i=r.timeout-e-s;if(i<=0)return Promise.reject(n);r.timeout=i}return r.transformRequest=[e=>e],await o(t.retryCount,n,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(t=>{let n=()=>{clearTimeout(i),t(e(r))},i=setTimeout(()=>{t(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener(`abort`,n)},s);r.signal?.addEventListener&&r.signal.addEventListener(`abort`,n,{once:!0})})}async function Kt(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const qt=(e,t)=>({requestInterceptorId:e.interceptors.request.use(e=>(Ht(e,t,!0),e[`axios-retry`]?.validateResponse&&(e.validateStatus=()=>!1),e)),responseInterceptorId:e.interceptors.response.use(null,async n=>{let{config:r}=n;if(!r)return Promise.reject(n);let i=Ht(r,t);return n.response&&i.validateResponse?.(n.response)?n.response:await Wt(i,n)?Gt(e,i,n,r):(await Kt(i,n),Promise.reject(n))})});qt.isNetworkError=kt,qt.isSafeRequestError=Nt,qt.isIdempotentRequestError=Pt,qt.isNetworkOrIdempotentRequestError=Ft,qt.exponentialDelay=Rt,qt.linearDelay=zt,qt.isRetryableError=Mt;var Jt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.json=e.toBuffer=void 0;let a=i(n(`http`)),o=i(n(`https`));async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}e.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}e.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}e.req=l})),Yt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;let o=i(n(`net`)),s=i(n(`http`)),c=n(`https`);a(Jt(),e);let l=Symbol(`AgentBaseInternalState`);e.Agent=class extends s.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`&&t.split(`
16
- `).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new o.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?c.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof s.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[l].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[l]&&(this[l].protocol=e)}}})),Xt=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;let n=(0,t(ie()).default)(`https-proxy-agent:parse-proxy-response`);function r(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),n(`onend`),r(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),n(`onerror %o`,e),r(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r
15
+ ;return $.isValid=lr,$.abs=wa,$.add=Ea,$.subtract=Da,$.as=Ma,$.asMilliseconds=Pa,$.asSeconds=Fa,$.asMinutes=Ia,$.asHours=La,$.asDays=Ra,$.asWeeks=za,$.asMonths=Ba,$.asQuarters=Va,$.asYears=Ha,$.valueOf=Ua,$._bubble=ka,$.clone=Wa,$.get=Ga,$.milliseconds=qa,$.seconds=Ja,$.minutes=Ya,$.hours=Xa,$.days=Za,$.weeks=eo,$.months=Qa,$.years=$a,$.humanize=so,$.toISOString=uo,$.toString=uo,$.toJSON=uo,$.locale=ui,$.localeData=fi,$.toIsoString=E(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,uo),$.lang=di,N(`X`,0,0,`unix`),N(`x`,0,0,`valueOf`),B(`x`,Ne),B(`X`,Ie),U(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),U(`x`,function(e,t,n){n._d=new Date(H(e))}),r.version=`2.30.1`,i(Y),r.fn=Z,r.min=ir,r.max=ar,r.now=or,r.utc=m,r.unix=fa,r.months=va,r.isDate=d,r.locale=xn,r.invalid=y,r.duration=X,r.isMoment=w,r.weekdays=ba,r.parseZone=pa,r.localeData=wn,r.isDuration=fr,r.monthsShort=ya,r.weekdaysMin=Sa,r.defineLocale=Sn,r.updateLocale=Cn,r.locales=Tn,r.weekdaysShort=xa,r.normalizeUnits=I,r.relativeTimeRounding=ao,r.relativeTimeThreshold=oo,r.calendarFormat=Gr,r.prototype=Z,r.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`},r}))})),wt=r(((e,t)=>{let n=new Set(`ENOTFOUND.ENETUNREACH.UNABLE_TO_GET_ISSUER_CERT.UNABLE_TO_GET_CRL.UNABLE_TO_DECRYPT_CERT_SIGNATURE.UNABLE_TO_DECRYPT_CRL_SIGNATURE.UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.CERT_SIGNATURE_FAILURE.CRL_SIGNATURE_FAILURE.CERT_NOT_YET_VALID.CERT_HAS_EXPIRED.CRL_NOT_YET_VALID.CRL_HAS_EXPIRED.ERROR_IN_CERT_NOT_BEFORE_FIELD.ERROR_IN_CERT_NOT_AFTER_FIELD.ERROR_IN_CRL_LAST_UPDATE_FIELD.ERROR_IN_CRL_NEXT_UPDATE_FIELD.OUT_OF_MEM.DEPTH_ZERO_SELF_SIGNED_CERT.SELF_SIGNED_CERT_IN_CHAIN.UNABLE_TO_GET_ISSUER_CERT_LOCALLY.UNABLE_TO_VERIFY_LEAF_SIGNATURE.CERT_CHAIN_TOO_LONG.CERT_REVOKED.INVALID_CA.PATH_LENGTH_EXCEEDED.INVALID_PURPOSE.CERT_UNTRUSTED.CERT_REJECTED.HOSTNAME_MISMATCH`.split(`.`));t.exports=e=>!n.has(e&&e.code)})),Tt=e(Ct(),1),Et=e(wt());const Dt=`axios-retry`;function Ot(e){return e.response||!e.code||[`ERR_CANCELED`,`ECONNABORTED`].includes(e.code)?!1:(0,Et.default)(e)}const kt=[`get`,`head`,`options`],At=kt.concat([`put`,`delete`]);function jt(e){return e.code!==`ECONNABORTED`&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function Mt(e){return e.config?.method?jt(e)&&kt.indexOf(e.config.method)!==-1:!1}function Nt(e){return e.config?.method?jt(e)&&At.indexOf(e.config.method)!==-1:!1}function Pt(e){return Ot(e)||Nt(e)}function Ft(e=void 0){let t=e?.response?.headers[`retry-after`];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function It(e=0,t=void 0){return Math.max(0,Ft(t))}function Lt(e=0,t=void 0,n=100){let r=2**e*n,i=Math.max(r,Ft(t));return i+i*.2*Math.random()}function Rt(e=100){return(t=0,n=void 0)=>{let r=t*e;return Math.max(r,Ft(n))}}const zt={retries:3,retryCondition:Pt,retryDelay:It,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Bt(e,t){return{...zt,...t,...e[Dt]}}function Vt(e,t,n=!1){let r=Bt(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Dt]=r,r}function Ht(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function Ut(e,t){let{retries:n,retryCondition:r}=e,i=(e.retryCount||0)<n&&r(t);if(typeof i==`object`)try{return await i!==!1}catch{return!1}return i}async function Wt(e,t,n,r){t.retryCount+=1;let{retryDelay:i,shouldResetTimeout:a,onRetry:o}=t,s=i(t.retryCount,n);if(Ht(e,r),!a&&r.timeout&&t.lastRequestTime){let e=Date.now()-t.lastRequestTime,i=r.timeout-e-s;if(i<=0)return Promise.reject(n);r.timeout=i}return r.transformRequest=[e=>e],await o(t.retryCount,n,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(t=>{let n=()=>{clearTimeout(i),t(e(r))},i=setTimeout(()=>{t(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener(`abort`,n)},s);r.signal?.addEventListener&&r.signal.addEventListener(`abort`,n,{once:!0})})}async function Gt(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const Kt=(e,t)=>({requestInterceptorId:e.interceptors.request.use(e=>(Vt(e,t,!0),e[`axios-retry`]?.validateResponse&&(e.validateStatus=()=>!1),e)),responseInterceptorId:e.interceptors.response.use(null,async n=>{let{config:r}=n;if(!r)return Promise.reject(n);let i=Vt(r,t);return n.response&&i.validateResponse?.(n.response)?n.response:await Ut(i,n)?Wt(e,i,n,r):(await Gt(i,n),Promise.reject(n))})});Kt.isNetworkError=Ot,Kt.isSafeRequestError=Mt,Kt.isIdempotentRequestError=Nt,Kt.isNetworkOrIdempotentRequestError=Pt,Kt.exponentialDelay=Lt,Kt.linearDelay=Rt,Kt.isRetryableError=jt;var qt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.json=e.toBuffer=void 0;let a=i(n(`http`)),o=i(n(`https`));async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}e.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}e.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}e.req=l})),Jt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;let o=i(n(`net`)),s=i(n(`http`)),c=n(`https`);a(qt(),e);let l=Symbol(`AgentBaseInternalState`);e.Agent=class extends s.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`&&t.split(`
16
+ `).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new o.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?c.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof s.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[l].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[l]&&(this[l].protocol=e)}}})),Yt=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;let n=(0,t(j()).default)(`https-proxy-agent:parse-proxy-response`);function r(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),n(`onend`),r(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),n(`onerror %o`,e),r(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r
17
17
  \r
18
18
  `);if(u===-1){n(`have not received end of HTTP headers yet...`),o();return}let d=l.slice(0,u).toString(`ascii`).split(`\r
19
- `),f=d.shift();if(!f)return e.destroy(),r(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let n=t.indexOf(`:`);if(n===-1)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,n).toLowerCase(),a=t.slice(n+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}n(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=r})),Zt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpsProxyAgent=void 0;let o=i(n(`net`)),s=i(n(`tls`)),c=a(n(`assert`)),l=a(ie()),u=Yt(),d=n(`url`),f=Xt(),p=(0,l.default)(`https-proxy-agent`),m=e=>e.servername===void 0&&e.host&&!o.isIP(e.host)?{...e,servername:e.host}:e;var h=class extends u.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},p(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?_(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(p("Creating `tls.Socket`: %o",this.connectOpts),r=s.connect(m(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),r=o.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=o.isIPv6(t.host)?`[${t.host}]`:t.host,l=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let e of Object.keys(i))l+=`${e}: ${i[e]}\r\n`;let u=(0,f.parseProxyResponse)(r);r.write(`${l}\r\n`);let{connect:d,buffered:h}=await u;if(e.emit(`proxyConnect`,d),this.emit(`proxyConnect`,d,e),d.statusCode===200)return e.once(`socket`,g),t.secureEndpoint?(p(`Upgrading socket connection to TLS`),s.connect({..._(m(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let v=new o.Socket({writable:!1});return v.readable=!0,e.once(`socket`,e=>{p(`Replaying proxy buffer for failed request`),(0,c.default)(e.listenerCount(`data`)>0),e.push(h),e.push(null)}),v}};h.protocols=[`http`,`https`],e.HttpsProxyAgent=h;function g(e){e.resume()}function _(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}}))();const{HTTPS_PROXY:Qt}=v(),$t=e=>{if(Qt)return console.debug({message:`Using proxy agent for ${e.callee} requests`,value:Qt}),new Zt.HttpsProxyAgent(Qt,e)};async function en(e,t={}){let{callee:n,headers:r,method:i=`get`,params:a={},rejectUnauthorized:o,...s}=t,c=$t({rejectUnauthorized:o,callee:n}),l=M.create();qt(l,t);try{let t=await l({url:e,method:i,params:a,headers:{...r,"Content-Type":`application/json`},httpsAgent:c,...s});return console.info({message:`Successfully retrieved data from ${n}`,url:e,method:i.toUpperCase(),status:t.status}),t.data}catch(r){let a=r,o=a.response?.status,s=a.response?.data;throw console.error({...t,message:`Fail to retrieved data from ${n}`,url:e,method:i.toUpperCase(),status:o,response:s}),Error(`HTTP error! status: ${o}`)}}async function tn(e,t,n={}){let{DIRECTUS_URL:r,DIRECTUS_FLOW_ID:i,DIRECTUS_ACCESS_TOKEN:a}=v(),o=`${r}/flows/trigger/${i}`,s={method:`post`,callee:`DIRECTUS`,headers:{Authorization:`Bearer ${a}`,"Content-Type":`application/json`},data:{projectId:e,versions:t},retries:3,retryDelay:qt.exponentialDelay,...n};return s.data&&s.headers?.[`Content-Type`]===`application/json`&&(s.data=JSON.stringify(s.data)),en(o,s)}var nn=e(ce(),1);async function rn(e,t={}){let{JIRA_API:n,JIRA_TOKEN:r,JIRA_EMAIL:i}=v(),a=`${n}${e}`,o=Buffer.from(`${i}:${r}`).toString(`base64`);return en(a,{...t,callee:`JIRA`,headers:{...t.headers,Authorization:`Basic ${o}`},retries:3,retryDelay:qt.exponentialDelay})}async function an(e){let t=await rn(`/rest/api/3/project/${e}/versions?expand`);return!t||!Array.isArray(t)?[]:t}async function on(e){let t=`/rest/api/3/version/${e.id}`;try{await rn(t,{method:`put`,headers:{"Content-Type":`application/json`,Accept:`application/json`},data:{id:e.id,description:e.description,name:e.name,archived:e.archived,released:e.released,projectId:e.projectId,releaseDate:e.releaseDate}})}catch(t){console.log(`Error while updating jira release ${e.id}`,t)}}async function sn(e,t,n){let r=(await an(e)).filter(e=>{e.version=e.name.replace(t+`-`,``).replace(`version-`,``).replace(`v`,``);try{return nn.default.lte(e.version,n)}catch{return!1}}).sort((e,t)=>nn.default.rcompare(e.version,t.version)),[i,...a]=await Promise.all(r);return[i,...a.filter(e=>!e?.released)].filter(e=>!!e).reverse()}var cn=class{mapContext(e,t){return{...t,projectId:e.projectId,update:e.update,component:e.component,tag:e.tag?.replace(/^version-/,``).replace(/^v/,``)}}getTasks(e){return e.tag?[{title:`List all releases under ${e.tag} for ${e.component} component and ${e.projectId} project`,task:async()=>{e.releases=(await sn(e.projectId??``,e.component??``,e.tag??``)).filter(Boolean).filter(e=>e.released===!1)}},{title:`Update ${e.tag} on ${e.component} component`,skip:()=>!e.update||(e.releases?.length??0)===0,task:async()=>{for(let t of e.releases??[])t.released=!0,t.releaseDate=(0,Et.default)().format(`YYYY-MM-DD`),await on(t)}},{title:`Trigger CMS API Workflow`,skip:()=>!v().CAN_TRIGGER_WORKFLOW||(e.releases?.length??0)===0,task:()=>tn(e.projectId??``,(e.releases??[]).map(({version:e})=>e))}]:(console.log(L.default.red(a.cross),`Missing tag version. Skipping release notes generation`),[])}};function ln(e){let{logger:t,config:{SCM_TOKEN:n,REPOSITORY_URL:r,ORIGIN:i}}=e;if(n){let e=(r||``).replace(`https://`,``);t.info(`Configure remote repository ${e}`),o.remote(`remove`,i).sync(),o.remote(`add`,i,`https://${n}@${e}`).sync()}}async function un(e){let{logger:t,branch:n,config:{PRODUCTION_BRANCH:r,ORIGIN:i}}=e;t.info(`Branch ${n.name} is candidate to MEP`),o.reset(`--hard`),o.clean(`-f`,`-d`).sync(),t.info(`Checkout production branch`),o.config(`--replace-all`,`remote.origin.fetch`,`+refs/heads/*:refs/remotes/origin/*`),o.fetch().sync(),o.fetch(`--tags`).sync(),o.checkout(`-qf`,r).sync(),t.info(`Current branch: ${r}`);let a=o.getLastCommitMsg();t.info(`Last commit message on production`,a),t.info(`Merge ${n.name} into ${r} branch`),o.merge(`--no-ff`,`-m`,`${n.name}`,n.name),t.info(`${n.name} merged into ${r} branch`),ln(e),t.info(`Push ${r} branch`),await o.push(i,r),t.info(`${r} branch pushed`),t.info(`Remove ${i}/${n.name} branch`),await o.push(i,`:`+n.name),t.info(`${i}/${n.name} branch correctly removed`)}function dn(e){let{BRANCH_NAME:t,PRODUCTION_BRANCH:n}=e.config;return{title:`Merge ${t} into ${n}`,task:async()=>{await un(e)}}}var fn=class{constructor(){this.lastCommitMessage=``}getTasks(e){let{RELEASE_CANDIDATE_TAG:t}=e;return this.lastCommitMessage=o.getLastCommitMsg(),this.lastCommitMessage.includes(t)?[dn(e)]:[]}success(e){let{RELEASE_CANDIDATE_TAG:t}=e;this.lastCommitMessage.includes(t)?e.logger.info(L.default.green(a.tick),`Branch`,L.default.green(e.BRANCH_NAME),`merged into ${e.PRODUCTION_BRANCH}`):(e.logger.info(L.default.green(a.tick),`Merge branch`,L.default.green(e.BRANCH_NAME),`into ${e.PRODUCTION_BRANCH} not required`),e.logger.info(L.default.green(a.tick),`Last commit message:`,L.default.green(this.lastCommitMessage),`does not contain ${t}`))}},Y=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},pn=class extends Y{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},mn=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new pn(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function hn(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}var gn=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(e=>hn(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(t?` `+t:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
19
+ `),f=d.shift();if(!f)return e.destroy(),r(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let n=t.indexOf(`:`);if(n===-1)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,n).toLowerCase(),a=t.slice(n+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}n(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=r})),Xt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpsProxyAgent=void 0;let o=i(n(`net`)),s=i(n(`tls`)),c=a(n(`assert`)),l=a(j()),u=Jt(),d=n(`url`),f=Yt(),p=(0,l.default)(`https-proxy-agent`),m=e=>e.servername===void 0&&e.host&&!o.isIP(e.host)?{...e,servername:e.host}:e;var h=class extends u.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},p(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?_(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(p("Creating `tls.Socket`: %o",this.connectOpts),r=s.connect(m(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),r=o.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=o.isIPv6(t.host)?`[${t.host}]`:t.host,l=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let e of Object.keys(i))l+=`${e}: ${i[e]}\r\n`;let u=(0,f.parseProxyResponse)(r);r.write(`${l}\r\n`);let{connect:d,buffered:h}=await u;if(e.emit(`proxyConnect`,d),this.emit(`proxyConnect`,d,e),d.statusCode===200)return e.once(`socket`,g),t.secureEndpoint?(p(`Upgrading socket connection to TLS`),s.connect({..._(m(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let v=new o.Socket({writable:!1});return v.readable=!0,e.once(`socket`,e=>{p(`Replaying proxy buffer for failed request`),(0,c.default)(e.listenerCount(`data`)>0),e.push(h),e.push(null)}),v}};h.protocols=[`http`,`https`],e.HttpsProxyAgent=h;function g(e){e.resume()}function _(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}}))();const{HTTPS_PROXY:Zt}=_(),Qt=e=>{if(Zt)return console.debug({message:`Using proxy agent for ${e.callee} requests`,value:Zt}),new Xt.HttpsProxyAgent(Zt,e)};async function $t(e,t={}){let{callee:n,headers:r,method:i=`get`,params:a={},rejectUnauthorized:o,...s}=t,c=Qt({rejectUnauthorized:o,callee:n}),l=ie.create();Kt(l,t);try{let t=await l({url:e,method:i,params:a,headers:{...r,"Content-Type":`application/json`},httpsAgent:c,...s});return console.info({message:`Successfully retrieved data from ${n}`,url:e,method:i.toUpperCase(),status:t.status}),t.data}catch(r){let a=r,o=a.response?.status,s=a.response?.data;throw console.error({...t,message:`Fail to retrieved data from ${n}`,url:e,method:i.toUpperCase(),status:o,response:s}),Error(`HTTP error! status: ${o}`)}}async function en(e,t,n={}){let{DIRECTUS_URL:r,DIRECTUS_FLOW_ID:i,DIRECTUS_ACCESS_TOKEN:a}=_(),o=`${r}/flows/trigger/${i}`,s={method:`post`,callee:`DIRECTUS`,headers:{Authorization:`Bearer ${a}`,"Content-Type":`application/json`},data:{projectId:e,versions:t},retries:3,retryDelay:Kt.exponentialDelay,...n};return s.data&&s.headers?.[`Content-Type`]===`application/json`&&(s.data=JSON.stringify(s.data)),$t(o,s)}var tn=e(ce(),1);async function nn(e,t={}){let{JIRA_API:n,JIRA_TOKEN:r,JIRA_EMAIL:i}=_(),a=`${n}${e}`,o=Buffer.from(`${i}:${r}`).toString(`base64`);return $t(a,{...t,callee:`JIRA`,headers:{...t.headers,Authorization:`Basic ${o}`},retries:3,retryDelay:Kt.exponentialDelay})}async function rn(e){let t=await nn(`/rest/api/3/project/${e}/versions?expand`);return!t||!Array.isArray(t)?[]:t}async function an(e){let t=`/rest/api/3/version/${e.id}`;try{await nn(t,{method:`put`,headers:{"Content-Type":`application/json`,Accept:`application/json`},data:{id:e.id,description:e.description,name:e.name,archived:e.archived,released:e.released,projectId:e.projectId,releaseDate:e.releaseDate}})}catch(t){console.log(`Error while updating jira release ${e.id}`,t)}}async function on(e,t,n){let r=(await rn(e)).filter(e=>{e.version=e.name.replace(t+`-`,``).replace(`version-`,``).replace(`v`,``);try{return tn.default.lte(e.version,n)}catch{return!1}}).sort((e,t)=>tn.default.rcompare(e.version,t.version)),[i,...a]=await Promise.all(r);return[i,...a.filter(e=>!e?.released)].filter(e=>!!e).reverse()}var sn=class{mapContext(e,t){return{...t,projectId:e.projectId,update:e.update,component:e.component,tag:e.tag?.replace(/^version-/,``).replace(/^v/,``)}}getTasks(e){return e.tag?[{title:`List all releases under ${e.tag} for ${e.component} component and ${e.projectId} project`,task:async()=>{e.releases=(await on(e.projectId??``,e.component??``,e.tag??``)).filter(Boolean).filter(e=>e.released===!1)}},{title:`Update ${e.tag} on ${e.component} component`,skip:()=>!e.update||(e.releases?.length??0)===0,task:async()=>{for(let t of e.releases??[])t.released=!0,t.releaseDate=(0,Tt.default)().format(`YYYY-MM-DD`),await an(t)}},{title:`Trigger CMS API Workflow`,skip:()=>!_().CAN_TRIGGER_WORKFLOW||(e.releases?.length??0)===0,task:()=>en(e.projectId??``,(e.releases??[]).map(({version:e})=>e))}]:(console.log(L.default.red(i.cross),`Missing tag version. Skipping release notes generation`),[])}};function cn(e){let{logger:t,config:{SCM_TOKEN:n,REPOSITORY_URL:r,ORIGIN:i}}=e;if(n){let e=(r||``).replace(`https://`,``);t.info(`Configure remote repository ${e}`),a.remote(`remove`,i).sync(),a.remote(`add`,i,`https://${n}@${e}`).sync()}}async function ln(e){let{logger:t,branch:n,config:{PRODUCTION_BRANCH:r,ORIGIN:i}}=e;t.info(`Branch ${n.name} is candidate to MEP`),a.reset(`--hard`),a.clean(`-f`,`-d`).sync(),t.info(`Checkout production branch`),a.config(`--replace-all`,`remote.origin.fetch`,`+refs/heads/*:refs/remotes/origin/*`),a.fetch().sync(),a.fetch(`--tags`).sync(),a.checkout(`-qf`,r).sync(),t.info(`Current branch: ${r}`);let o=a.getLastCommitMsg();t.info(`Last commit message on production`,o),t.info(`Merge ${n.name} into ${r} branch`),a.merge(`--no-ff`,`-m`,`${n.name}`,n.name),t.info(`${n.name} merged into ${r} branch`),cn(e),t.info(`Push ${r} branch`),await a.push(i,r),t.info(`${r} branch pushed`),t.info(`Remove ${i}/${n.name} branch`),await a.push(i,`:`+n.name),t.info(`${i}/${n.name} branch correctly removed`)}function un(e){let{BRANCH_NAME:t,PRODUCTION_BRANCH:n}=e.config;return{title:`Merge ${t} into ${n}`,task:async()=>{await ln(e)}}}var dn=class{constructor(){this.lastCommitMessage=``}getTasks(e){let{RELEASE_CANDIDATE_TAG:t}=e;return this.lastCommitMessage=a.getLastCommitMsg(),this.lastCommitMessage.includes(t)?[un(e)]:[]}success(e){let{RELEASE_CANDIDATE_TAG:t}=e;this.lastCommitMessage.includes(t)?e.logger.info(L.default.green(i.tick),`Branch`,L.default.green(e.BRANCH_NAME),`merged into ${e.PRODUCTION_BRANCH}`):(e.logger.info(L.default.green(i.tick),`Merge branch`,L.default.green(e.BRANCH_NAME),`into ${e.PRODUCTION_BRANCH} not required`),e.logger.info(L.default.green(i.tick),`Last commit message:`,L.default.green(this.lastCommitMessage),`does not contain ${t}`))}},fn=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},pn=class extends fn{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}},J=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new pn(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function mn(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}var hn=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(e=>mn(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(t?` `+t:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
20
20
  `)}displayWidth(e){return me(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
21
21
  `+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
22
- `)}},_n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=bn(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new pn(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?yn(this.name().replace(/^no-/,``)):yn(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},vn=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r!==void 0&&r;return t.negate===(i===e)}};function yn(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function bn(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
22
+ `)}},gn=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=yn(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new pn(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?vn(this.name().replace(/^no-/,``)):vn(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},_n=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r!==void 0&&r;return t.negate===(i===e)}};function vn(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function yn(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
23
23
  - a short flag is a single dash and a single character
24
24
  - either use a single dash and a single character (for a short flag)
25
25
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(t)?Error(`${n}
26
26
  - too many short flags`):i.test(t)?Error(`${n}
27
27
  - too many long flags`):Error(`${n}
28
- - unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}function xn(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function Sn(e,t){if(!t||t.length===0)return``;t=Array.from(new Set(t));let n=e.startsWith(`--`);n&&(e=e.slice(2),t=t.map(e=>e.slice(2)));let r=[],i=3;return t.forEach(t=>{if(t.length<=1)return;let n=xn(e,t),a=Math.max(e.length,t.length);(a-n)/a>.4&&(n<i?(i=n,r=[t]):n===i&&r.push(t))}),r.sort((e,t)=>e.localeCompare(t)),n&&(r=r.map(e=>`--${e}`)),r.length>1?`\n(Did you mean one of ${r.join(`, `)}?)`:r.length===1?`\n(Did you mean ${r[0]}?)`:``}var Cn=class e extends ge{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>F.stdout.write(e),writeErr:e=>F.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>F.stdout.isTTY?F.stdout.columns:void 0,getErrHelpWidth:()=>F.stderr.isTTY?F.stderr.columns:void 0,getOutHasColors:()=>Tn()??(F.stdout.isTTY&&F.stdout.hasColors?.()),getErrHasColors:()=>Tn()??(F.stderr.isTTY&&F.stderr.hasColors?.()),stripColor:e=>me(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new gn,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
29
- - specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new mn(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
30
- Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new Y(e,t,n)),F.exit(e)}action(e){let t=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return r[n]=this._storeOptionsAsProperties?this:this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new _n(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
31
- - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{let n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{let n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof _n)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){F.versions?.electron&&(t.from=`electron`);let e=F.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=F.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:F.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(e.attributeName(),!0,`default`)}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
28
+ - unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}function bn(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function xn(e,t){if(!t||t.length===0)return``;t=Array.from(new Set(t));let n=e.startsWith(`--`);n&&(e=e.slice(2),t=t.map(e=>e.slice(2)));let r=[],i=3;return t.forEach(t=>{if(t.length<=1)return;let n=bn(e,t),a=Math.max(e.length,t.length);(a-n)/a>.4&&(n<i?(i=n,r=[t]):n===i&&r.push(t))}),r.sort((e,t)=>e.localeCompare(t)),n&&(r=r.map(e=>`--${e}`)),r.length>1?`\n(Did you mean one of ${r.join(`, `)}?)`:r.length===1?`\n(Did you mean ${r[0]}?)`:``}var Sn=class e extends ge{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>P.stdout.write(e),writeErr:e=>P.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>P.stdout.isTTY?P.stdout.columns:void 0,getErrHelpWidth:()=>P.stderr.isTTY?P.stderr.columns:void 0,getOutHasColors:()=>wn()??(P.stdout.isTTY&&P.stdout.hasColors?.()),getErrHasColors:()=>wn()??(P.stderr.isTTY&&P.stderr.hasColors?.()),stripColor:e=>me(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new hn,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
29
+ - specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new J(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
30
+ Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new fn(e,t,n)),P.exit(e)}action(e){let t=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return r[n]=this._storeOptionsAsProperties?this:this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new gn(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
31
+ - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{let n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{let n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof gn)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){P.versions?.electron&&(t.from=`electron`);let e=P.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=P.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:P.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?(this.options.filter(e=>e.negate&&e.defaultValue===void 0&&this.getOptionValue(e.attributeName())===void 0).forEach(e=>{let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(e.attributeName(),!0,`default`)}),this.saveStateBeforeParse()):this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
32
32
  - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(_e.existsSync(e))return;let r=`'${e}' does not exist
33
33
  - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
34
34
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
35
- - ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let n=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function r(e,t){let r=he.resolve(e,t);if(_e.existsSync(r))return r;if(n.includes(he.extname(t)))return;let i=n.find(e=>_e.existsSync(`${r}${e}`));if(i)return`${r}${i}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||``;if(this._scriptPath){let e;try{e=_e.realpathSync(this._scriptPath)}catch{e=this._scriptPath}a=he.resolve(he.dirname(e),a)}if(a){let t=r(a,i);if(!t&&!e._executableFile&&this._scriptPath){let n=he.basename(this._scriptPath,he.extname(this._scriptPath));n!==this._name&&(t=r(a,`${n}-${e._name}`))}i=t||i}let o=n.includes(he.extname(i)),s;F.platform===`win32`?(this._checkForMissingExecutable(i,a,e._name),t.unshift(i),t=wn(F.execArgv).concat(t),s=pe.spawn(F.execPath,t,{stdio:`inherit`})):o?(t.unshift(i),t=wn(F.execArgv).concat(t),s=pe.spawn(F.argv[0],t,{stdio:`inherit`})):s=pe.spawn(i,t,{stdio:`inherit`}),s.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{F.on(e,()=>{s.killed===!1&&s.exitCode===null&&s.kill(e)})});let c=this._exitCallback;s.on(`close`,e=>{e??=1,c?c(new Y(e,`commander.executeSubCommandAsync`,`(close)`)):F.exit(e)}),s.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(i,a,e._name);else if(t.code===`EACCES`)throw Error(`'${i}' not executable`);if(!c)F.exit(1);else{let e=new Y(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,c(e)}}),this.runningCommand=s}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)!==void 0&&this.getOptionValueSource(t)!=="default"});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
36
- `),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in F.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,F.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new vn(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=Sn(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=e.length,i=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${r}: ${e.join(`, `)}.`;this.error(i,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=Sn(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>hn(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=he.basename(e,he.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(F.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
37
- Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function wn(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function Tn(){if(F.env.NO_COLOR||F.env.FORCE_COLOR===`0`||F.env.FORCE_COLOR===`false`)return!1;if(F.env.FORCE_COLOR||F.env.CLICOLOR_FORCE!==void 0)return!0}new Cn;var En=class{mapContext(e,t){return{...t,version:e.version}}getTasks(e){return[{title:`Clean workspace`,task:()=>le(e)},{title:`Compile packages`,task:()=>ue(e)},{title:`Copy packages`,task:()=>de(e)},{title:`Write package.json`,task:()=>{let t=e.version??e.config.pkg.version;if(!t)throw Error(`No package version is available to prepare artifacts.`);return fe({...e,version:t,dependencies:new Map})}}]}},Dn=class{mapContext(e,t){return{...t,targetBranch:e.branch}}getTasks(e){let{targetBranch:t}=e;return[{title:`Git fetch`,task:()=>o.fetch(`--all`,`--prune`,`--tags`)},{title:`Delete local branch ${t}`,task:()=>o.branch(`-D`,t).catch(()=>{})},{title:`Checkout origin/${t}`,task:()=>o.checkout(`origin/${t}`,`--track`)}]}success(e){console.log(`BRANCH ${e.targetBranch} RETRIEVE DONE`)}},On=class extends xt{mapContext(e,t){return{...super.mapContext(e,t),force:!!e.force,checkStatus:!0}}getTasks(e){return[...super.getTasks(e),St(e)]}success(e){console.log(L.default.green(a.tick),`Branch`,L.default.green(e.featureBranch),`rebased and pushed.`)}};const kn=e=>void e.command(`publish`).description(`Alias of push: rebase and push current branch`).option(`-t, --unit-test`,`Run unit test`,(e,t)=>t+1,0).option(`-c, --cucumber`,`Run cucumber`,(e,t)=>t+1,0).option(`-f, --force`,`Force push`,(e,t)=>t+1,0).option(`-v, --verbose`,`Enable verbose log`,(e,t)=>t+1,0).action(e=>re(On,e));function An(e){let{origin:t=`origin`,upstream:n=!0,noVerify:r=!0}=e;return{title:`Rebase all branches`,task:async()=>{let i=o.branches(`-r`).filter(t=>!RegExp(`${e.config.PRODUCTION_BRANCH}|${e.config.DEVELOP_BRANCH}`).test(t));for(let a of i){let i=a.split(`/`)[1];try{await o.branch(`-D`,i)}catch{}try{await o.checkout(`--track`,a),await o.rebase(`${t}/${e.config.PRODUCTION_BRANCH}`),await o.push(...[n?`-u`:``,`-f`,t,i,r?`--no-verify`:``].filter(Boolean))}catch{try{await o.rebase(`--abort`),await o.reset(`--hard`)}catch{}}}}}}var jn=class extends Ee{mapContext(e,t){return{...super.mapContext(e,t)}}getTasks(e){return[...super.getTasks(e),An(e)]}success(){console.log(L.default.green(a.tick),`All branches rebased and pushed.`)}};const Mn=[{type:`feat`,label:`Features`,release:`minor`},{type:`fix`,label:`Bug Fixes`,release:`patch`},{type:`chore`,label:`Chores`,release:!1},{type:`ci`,label:`CI`,release:!1},{type:`docs`,label:`Documentation`,release:`patch`},{type:`tech`,label:`Technical Improvements`,release:`patch`},{type:`refactor`,label:`Technical Improvements`,release:`patch`},{type:`default`,label:`Miscellaneous`,release:!1}];function Nn(e,t){return e=e.replace(`${t}/`,``),`${t}/${e}`}function Pn({origin:e,PRODUCTION_BRANCH:t,DEVELOP_BRANCH:n}){let r=o.getBranchName(),i=`${e}/${n}`,a=`${e}/${t}`,s=[a];s.indexOf(Nn(r,e))===-1&&o.branchExists(r,e)&&(s=s.concat(Nn(r,e)));let c=o.branchesInfos(`-r`).map(e=>e.branch).filter(e=>!s.includes(e)&&![i,a].includes(e));return c.length&&(s=s.concat(c)),s}function Fn(e){return e.replace(/[/\\_|. ]/gi,`-`).split(`-`).filter(Boolean).join(`-`)}var In=class extends Ee{mapContext(e,t){let n=e.branchName??``,r=Mn.map(({type:e})=>e).find(e=>n.startsWith(`${e}-`)),i=e.jiraId??(n.startsWith(`CMAB-`)?`CMAB-${n.split(`-`)[1]}`:void 0),a=n.startsWith(`CMAB-`)?n.split(`-`).slice(2).join(`-`):n;return{...t,origin:t.ORIGIN,jiraId:i,branchName:a,dryRun:e.dryRun,type:r}}async prompt(e){let t={};if(!e.jiraId){let n=await ye({message:`What is the Jira ID? (leave blank to skip)`,initialValue:e.jiraId});if(ve(n))return n;t.jiraId=n}if(!e.type&&!e.jiraId){let n=await I({message:`Choose the type of your branch:`,initialValue:e.type,options:[`fix`,`feat`,`chore`,`docs`,`tech`].map(e=>({value:e,label:e}))});if(ve(n))return n;t.type=n}if(!e.branchName){let n=await ye({message:`What is the branch name?`,validate(t){if(!t?.length)return`Branch name is required`;if(o.branchExists(t,e.origin))return`${t} already exists`}});if(ve(n))return n;t.branchName=n}let n=o.getBranchName();if(!e.fromBranch||n!==e.DEVELOP_BRANCH){let n=Pn({origin:e.origin,PRODUCTION_BRANCH:e.PRODUCTION_BRANCH,DEVELOP_BRANCH:e.DEVELOP_BRANCH}),r=await I({message:`Start your branch from:`,initialValue:e.fromBranch??`${e.origin}/${e.PRODUCTION_BRANCH}`,options:n.map(e=>({value:e,label:e}))});if(ve(r))return r;t.fromBranch=r}return t}getTasks(e){return e.branchName=Fn(e.branchName??``),e.featureBranch=e.jiraId?`${e.jiraId}-${e.branchName}`:e.branchName.includes((e.type??``)+`-`)?e.branchName:`${e.type}-${e.branchName}`,e.fromBranch=e.fromBranch??e.config.PRODUCTION_BRANCH,[...super.getTasks(e),{title:`Create branch from ${L.default.green(e.fromBranch)}`,task:()=>o.checkout(`--no-track`,`-b`,e.featureBranch,e.fromBranch).toObservable()},bt(e)]}success(e){if(e.dryRun){console.log(`Dry run complete: no branch or dependency was modified.`);return}console.log(L.default.green(a.tick),`New branch ${L.default.green(e.featureBranch)} created from ${L.default.green(e.fromBranch)} HEAD`)}},Ln=t({Checkfeatures:()=>Ce,Clean:()=>R,Config:()=>we,Deploy:()=>Te,Fetch:()=>Ee,Finish:()=>Ct,JiraReleases:()=>cn,Merge:()=>fn,Packages:()=>En,Pull:()=>Dn,Push:()=>On,Rebase:()=>xt,Republish:()=>jn,Start:()=>In,publish:()=>kn});delete process.env.CIRCLE_PR_NUMBER,delete process.env.CIRCLE_PULL_REQUEST,delete process.env.CI_PULL_REQUEST;function Rn(e={}){be({dryRun:process.argv.includes(`--dry-run`),ci:!1,noCi:!0,...e}).then(()=>{process.exitCode=0}).catch(e=>{console.log(`Error while releasing`,e),process.exitCode=1})}var zn=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),Bn=r(((e,t)=>{var n=f();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Vn=r(((e,t)=>{var n=Bn();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Hn=r(((e,t)=>{var n=Vn(),r=d(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),Un=r(((e,t)=>{var n=Hn(),r=Vn();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),Wn=r(((e,t)=>{var n=Un(),r=at();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Gn=r(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),Kn=r(((e,t)=>{var n=m(),r=et(),i=Gn(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),qn=r(((e,t)=>{var n=$e(),r=Kn(),i=it();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),Jn=r(((e,t)=>{var n=Un(),r=qn();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Yn=r(((e,t)=>{var n=O(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),Xn=r(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Zn=r(((e,t)=>{var n=Un(),r=Ge();function i(e,t){return n(e,r(e),t)}t.exports=i})),Qn=r(((e,t)=>{t.exports=tt()(Object.getPrototypeOf,Object)})),$n=r(((e,t)=>{var n=V(),r=Qn(),i=Ge(),a=U();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),X=r(((e,t)=>{var n=Un(),r=$n();function i(e,t){return n(e,r(e),t)}t.exports=i})),er=r(((e,t)=>{var n=H(),r=$n(),i=qn();function a(e){return n(e,i,r)}t.exports=a})),tr=r(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),nr=r(((e,t)=>{var n=B();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),rr=r(((e,t)=>{var n=nr();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),ir=r(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),ar=r(((e,t)=>{var n=T(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),or=r(((e,t)=>{var n=nr();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),sr=r(((e,t)=>{var n=nr(),r=rr(),i=ir(),a=ar(),o=or(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),cr=r(((e,t)=>{var n=m(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),lr=r(((e,t)=>{var n=cr(),r=Qn(),i=et();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),ur=r(((e,t)=>{var n=dt(),r=p(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),dr=r(((e,t)=>{var n=ur(),r=Xe(),i=Ze(),a=i&&i.isMap;t.exports=a?r(a):n})),fr=r(((e,t)=>{var n=dt(),r=p(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),pr=r(((e,t)=>{var n=fr(),r=Xe(),i=Ze(),a=i&&i.isSet;t.exports=a?r(a):n})),mr=r(((e,t)=>{var n=Pe(),r=zn(),i=Hn(),a=Wn(),o=Jn(),s=Yn(),c=Xn(),l=Zn(),u=X(),d=ot(),f=er(),p=dt(),h=tr(),g=sr(),_=lr(),v=D(),y=G(),b=dr(),x=m(),S=pr(),C=at(),w=qn(),T=1,E=2,O=4,k=`[object Arguments]`,ee=`[object Array]`,A=`[object Boolean]`,j=`[object Date]`,te=`[object Error]`,ne=`[object Function]`,re=`[object GeneratorFunction]`,M=`[object Map]`,ie=`[object Number]`,ae=`[object Object]`,oe=`[object RegExp]`,N=`[object Set]`,P=`[object String]`,se=`[object Symbol]`,ce=`[object WeakMap]`,le=`[object ArrayBuffer]`,ue=`[object DataView]`,de=`[object Float32Array]`,fe=`[object Float64Array]`,pe=`[object Int8Array]`,me=`[object Int16Array]`,F=`[object Int32Array]`,he=`[object Uint8Array]`,ge=`[object Uint8ClampedArray]`,_e=`[object Uint16Array]`,ve=`[object Uint32Array]`,I={};I[k]=I[ee]=I[le]=I[ue]=I[A]=I[j]=I[de]=I[fe]=I[pe]=I[me]=I[F]=I[M]=I[ie]=I[ae]=I[oe]=I[N]=I[P]=I[se]=I[he]=I[ge]=I[_e]=I[ve]=!0,I[te]=I[ne]=I[ce]=!1;function ye(e,t,m,D,ee,A){var j,te=t&T,M=t&E,ie=t&O;if(m&&(j=ee?m(e,D,ee,A):m(e)),j!==void 0)return j;if(!x(e))return e;var oe=v(e);if(oe){if(j=h(e),!te)return c(e,j)}else{var N=p(e),P=N==ne||N==re;if(y(e))return s(e,te);if(N==ae||N==k||P&&!ee){if(j=M||P?{}:_(e),!te)return M?u(e,o(j,e)):l(e,a(j,e))}else{if(!I[N])return ee?e:{};j=g(e,N,te)}}A||=new n;var se=A.get(e);if(se)return se;A.set(e,j),S(e)?e.forEach(function(n){j.add(ye(n,t,m,n,e,A))}):b(e)&&e.forEach(function(n,r){j.set(r,ye(n,t,m,r,e,A))});var ce=oe?void 0:(ie?M?f:d:M?w:C)(e);return r(ce||e,function(n,r){ce&&(r=n,n=e[r]),i(j,r,ye(n,t,m,r,e,A))}),j}t.exports=ye})),hr=r(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n})),gr=r(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),_r=r(((e,t)=>{var n=h(),r=gr();function i(e,t){return t.length<2?e:n(e,r(t,0,-1))}t.exports=i})),vr=r(((e,t)=>{var n=y(),r=hr(),i=_r(),a=c();function o(e,t){return t=n(t,e),e=i(e,t),e==null||delete e[a(r(t))]}t.exports=o})),yr=r(((e,t)=>{var n=s(),r=Qn(),i=p(),a=`[object Object]`,o=Function.prototype,c=Object.prototype,l=o.toString,u=c.hasOwnProperty,d=l.call(Object);function f(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=u.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&l.call(o)==d}t.exports=f})),br=r(((e,t)=>{var n=yr();function r(e){return n(e)?void 0:e}t.exports=r})),xr=r(((e,t)=>{var n=T(),r=W(),i=D(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Sr=r(((e,t)=>{var n=V(),r=xr();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),Cr=r(((e,t)=>{var n=Sr();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),wr=r(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),Tr=r(((e,t)=>{var n=wr(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),Er=r(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),Dr=r(((e,t)=>{function n(e){return e}t.exports=n})),Or=r(((e,t)=>{var n=Er(),r=Bn(),i=Dr();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),kr=r(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),Ar=r(((e,t)=>{var n=Or();t.exports=kr()(n)})),jr=r(((e,t)=>{var n=Cr(),r=Tr(),i=Ar();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),Mr=e(r(((e,t)=>{var n=S(),r=mr(),i=vr(),a=y(),o=Un(),s=br(),c=jr(),l=er(),u=1,d=2,f=4;t.exports=c(function(e,t){var c={};if(e==null)return c;var p=!1;t=n(t,function(t){return t=a(t,e),p||=t.length>1,t}),o(e,l(e),c),p&&(c=r(c,u|d|f,s));for(var m=t.length;m--;)i(c,t[m]);return c})}))(),1);const Nr=[{breaking:!0,release:`major`},{revert:!0,release:`patch`},...Mn.map(e=>(0,Mr.default)(e,[`label`]))],Pr=Mn.reduce((e,{type:t,label:n})=>({...e,[t]:n}),{}),Fr=e=>Pr[e.type]?Pr[e.type]:Pr.default??e.type;function Ir(e,t){e={...e};let n=[];if(e.notes.forEach(e=>{e.title=`BREAKING CHANGES`}),e.type=Fr(e),!(e.message&&e.message.match(/^[\w-]+$/i))){if(e.subject&&(e.subject=e.subject.replace(`[MEP]`,``)),e.scope===`*`&&(e.scope=``),typeof e.hash==`string`&&(e.shortHash=e.hash.substring(0,7)),typeof e.subject==`string`){let r=t.repository?`${t.host}/${t.owner}/${t.repository}`:t.repoUrl;r&&(r=`${r}/issues/`,e.subject=e.subject.replace(/#([0-9]+)/g,(e,t)=>(n.push(t),`[#${t}](${r}${t})`))),t.host&&(e.subject=e.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g,(e,n)=>n.includes(`/`)?`@${n}`:`[@${n}](${t.host}/${n})`))}return e.references=e.references.filter(e=>n.indexOf(e.issue)===-1),e}}function Lr(e={}){let{PRODUCTION_BRANCH:t,BRANCH_NAME:n}=v(),r=n??t;return{noCi:t!==r||void 0,branches:[{name:t,channel:`release`},{name:r,channel:`prerelease`,prerelease:!0}],verifyConditions:[`@cmflow/cli/semantic/verify-conditions`],analyzeCommits:[`@cmflow/cli/semantic/analyze-commits`],verifyRelease:[`@cmflow/cli/semantic/verify-release`],generateNotes:[`@cmflow/cli/semantic/generate-notes`],prepare:[`@cmflow/cli/semantic/prepare/bump-version`,`@cmflow/cli/semantif/prepare/post`],releaseRules:Nr,parserOpts:{noteKeywords:[`BREAKING CHANGE`,`BREAKING CHANGES`]},writerOpts:{transform:Ir},...e}}export{E as Cli,Mn as WORKFLOW_CONFIGURATION,ne as bun,Ln as commands,te as configureGitWorkspace,Lr as defineConfig,ae as docker,C as getCI,v as getConfig,x as getPackageJson,A as getPackageManager,o as git,j as lerna,oe as npm,k as pnpm,Rn as release,Nr as releaseRules,re as runCommand,Ir as transformWriter,ee as yarn};
35
+ - ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let n=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function r(e,t){let r=he.resolve(e,t);if(_e.existsSync(r))return r;if(n.includes(he.extname(t)))return;let i=n.find(e=>_e.existsSync(`${r}${e}`));if(i)return`${r}${i}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||``;if(this._scriptPath){let e;try{e=_e.realpathSync(this._scriptPath)}catch{e=this._scriptPath}a=he.resolve(he.dirname(e),a)}if(a){let t=r(a,i);if(!t&&!e._executableFile&&this._scriptPath){let n=he.basename(this._scriptPath,he.extname(this._scriptPath));n!==this._name&&(t=r(a,`${n}-${e._name}`))}i=t||i}let o=n.includes(he.extname(i)),s;P.platform===`win32`?(this._checkForMissingExecutable(i,a,e._name),t.unshift(i),t=Cn(P.execArgv).concat(t),s=pe.spawn(P.execPath,t,{stdio:`inherit`})):o?(t.unshift(i),t=Cn(P.execArgv).concat(t),s=pe.spawn(P.argv[0],t,{stdio:`inherit`})):s=pe.spawn(i,t,{stdio:`inherit`}),s.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{P.on(e,()=>{s.killed===!1&&s.exitCode===null&&s.kill(e)})});let c=this._exitCallback;s.on(`close`,e=>{e??=1,c?c(new fn(e,`commander.executeSubCommandAsync`,`(close)`)):P.exit(e)}),s.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(i,a,e._name);else if(t.code===`EACCES`)throw Error(`'${i}' not executable`);if(!c)P.exit(1);else{let e=new fn(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,c(e)}}),this.runningCommand=s}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)!==void 0&&this.getOptionValueSource(t)!=="default"});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
36
+ `),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in P.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,P.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new _n(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=xn(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=e.length,i=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${r}: ${e.join(`, `)}.`;this.error(i,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=xn(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>mn(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=he.basename(e,he.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(P.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
37
+ Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function Cn(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function wn(){if(P.env.NO_COLOR||P.env.FORCE_COLOR===`0`||P.env.FORCE_COLOR===`false`)return!1;if(P.env.FORCE_COLOR||P.env.CLICOLOR_FORCE!==void 0)return!0}new Sn;var Tn=class{mapContext(e,t){return{...t,version:e.version}}getTasks(e){return[{title:`Clean workspace`,task:()=>le(e)},{title:`Compile packages`,task:()=>ue(e)},{title:`Copy packages`,task:()=>de(e)},{title:`Write package.json`,task:()=>{let t=e.version??e.config.pkg.version;if(!t)throw Error(`No package version is available to prepare artifacts.`);return fe({...e,version:t,dependencies:new Map})}}]}},En=class{mapContext(e,t){return{...t,targetBranch:e.branch}}getTasks(e){let{targetBranch:t}=e;return[{title:`Git fetch`,task:()=>a.fetch(`--all`,`--prune`,`--tags`)},{title:`Delete local branch ${t}`,task:()=>a.branch(`-D`,t).catch(()=>{})},{title:`Checkout origin/${t}`,task:()=>a.checkout(`origin/${t}`,`--track`)}]}success(e){console.log(`BRANCH ${e.targetBranch} RETRIEVE DONE`)}},Dn=class extends bt{mapContext(e,t){return{...super.mapContext(e,t),force:!!e.force,checkStatus:!0}}getTasks(e){return[...super.getTasks(e),xt(e)]}success(e){console.log(L.default.green(i.tick),`Branch`,L.default.green(e.featureBranch),`rebased and pushed.`)}};const On=e=>void e.command(`publish`).description(`Alias of push: rebase and push current branch`).option(`-t, --unit-test`,`Run unit test`,(e,t)=>t+1,0).option(`-c, --cucumber`,`Run cucumber`,(e,t)=>t+1,0).option(`-f, --force`,`Force push`,(e,t)=>t+1,0).option(`-v, --verbose`,`Enable verbose log`,(e,t)=>t+1,0).action(e=>re(Dn,e));function kn(e){let{origin:t=`origin`,upstream:n=!0,noVerify:r=!0}=e;return{title:`Rebase all branches`,task:async()=>{let i=a.branches(`-r`).filter(t=>!RegExp(`${e.config.PRODUCTION_BRANCH}|${e.config.DEVELOP_BRANCH}`).test(t));for(let o of i){let i=o.split(`/`)[1];try{await a.branch(`-D`,i)}catch{}try{await a.checkout(`--track`,o),await a.rebase(`${t}/${e.config.PRODUCTION_BRANCH}`),await a.push(...[n?`-u`:``,`-f`,t,i,r?`--no-verify`:``].filter(Boolean))}catch{try{await a.rebase(`--abort`),await a.reset(`--hard`)}catch{}}}}}}var An=class extends we{mapContext(e,t){return{...super.mapContext(e,t)}}getTasks(e){return[...super.getTasks(e),kn(e)]}success(){console.log(L.default.green(i.tick),`All branches rebased and pushed.`)}};const jn=[{type:`feat`,label:`Features`,release:`minor`},{type:`fix`,label:`Bug Fixes`,release:`patch`},{type:`chore`,label:`Chores`,release:!1},{type:`ci`,label:`CI`,release:!1},{type:`docs`,label:`Documentation`,release:`patch`},{type:`tech`,label:`Technical Improvements`,release:`patch`},{type:`refactor`,label:`Technical Improvements`,release:`patch`},{type:`default`,label:`Miscellaneous`,release:!1}];function Mn(e,t){return e=e.replace(`${t}/`,``),`${t}/${e}`}function Nn({origin:e,PRODUCTION_BRANCH:t,DEVELOP_BRANCH:n}){let r=a.getBranchName(),i=`${e}/${n}`,o=`${e}/${t}`,s=[o];s.indexOf(Mn(r,e))===-1&&a.branchExists(r,e)&&(s=s.concat(Mn(r,e)));let c=a.branchesInfos(`-r`).map(e=>e.branch).filter(e=>!s.includes(e)&&![i,o].includes(e));return c.length&&(s=s.concat(c)),s}function Pn(e){return e.replace(/[/\\_|. ]/gi,`-`).split(`-`).filter(Boolean).join(`-`)}var Fn=class extends we{mapContext(e,t){let n=e.branchName??``,r=jn.map(({type:e})=>e).find(e=>n.startsWith(`${e}-`)),i=e.jiraId??(n.startsWith(`CMAB-`)?`CMAB-${n.split(`-`)[1]}`:void 0),a=n.startsWith(`CMAB-`)?n.split(`-`).slice(2).join(`-`):n;return{...t,origin:t.ORIGIN,jiraId:i,branchName:a,dryRun:e.dryRun,type:r}}async prompt(e){let t={};if(!e.jiraId){let n=await F({message:`What is the Jira ID? (leave blank to skip)`,initialValue:e.jiraId});if(ve(n))return n;t.jiraId=n}if(!e.type&&!e.jiraId){let n=await ye({message:`Choose the type of your branch:`,initialValue:e.type,options:[`fix`,`feat`,`chore`,`docs`,`tech`].map(e=>({value:e,label:e}))});if(ve(n))return n;t.type=n}if(!e.branchName){let n=await F({message:`What is the branch name?`,validate(t){if(!t?.length)return`Branch name is required`;if(a.branchExists(t,e.origin))return`${t} already exists`}});if(ve(n))return n;t.branchName=n}let n=a.getBranchName();if(!e.fromBranch||n!==e.DEVELOP_BRANCH){let n=Nn({origin:e.origin,PRODUCTION_BRANCH:e.PRODUCTION_BRANCH,DEVELOP_BRANCH:e.DEVELOP_BRANCH}),r=await ye({message:`Start your branch from:`,initialValue:e.fromBranch??`${e.origin}/${e.PRODUCTION_BRANCH}`,options:n.map(e=>({value:e,label:e}))});if(ve(r))return r;t.fromBranch=r}return t}getTasks(e){return e.branchName=Pn(e.branchName??``),e.featureBranch=e.jiraId?`${e.jiraId}-${e.branchName}`:e.branchName.includes((e.type??``)+`-`)?e.branchName:`${e.type}-${e.branchName}`,e.fromBranch=e.fromBranch??e.config.PRODUCTION_BRANCH,[...super.getTasks(e),{title:`Create branch from ${L.default.green(e.fromBranch)}`,task:()=>a.checkout(`--no-track`,`-b`,e.featureBranch,e.fromBranch)},yt(e)]}success(e){if(e.dryRun){console.log(`Dry run complete: no branch or dependency was modified.`);return}console.log(L.default.green(i.tick),`New branch ${L.default.green(e.featureBranch)} created from ${L.default.green(e.fromBranch)} HEAD`)}},In=t({Checkfeatures:()=>xe,Clean:()=>Se,Config:()=>Ce,Deploy:()=>R,Fetch:()=>we,Finish:()=>St,JiraReleases:()=>sn,Merge:()=>dn,Packages:()=>Tn,Pull:()=>En,Push:()=>Dn,Rebase:()=>bt,Republish:()=>An,Start:()=>Fn,publish:()=>On});delete process.env.CIRCLE_PR_NUMBER,delete process.env.CIRCLE_PULL_REQUEST,delete process.env.CI_PULL_REQUEST;function Ln(e={}){be({dryRun:process.argv.includes(`--dry-run`),ci:!1,noCi:!0,...e}).then(()=>{process.exitCode=0}).catch(e=>{console.log(`Error while releasing`,e),process.exitCode=1})}var Rn=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),zn=r(((e,t)=>{var n=d();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Bn=r(((e,t)=>{var n=zn();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Vn=r(((e,t)=>{var n=Bn(),r=u(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),Hn=r(((e,t)=>{var n=Vn(),r=Bn();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),Un=r(((e,t)=>{var n=Hn(),r=it();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Wn=r(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),Gn=r(((e,t)=>{var n=p(),r=$e(),i=Wn(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),Kn=r(((e,t)=>{var n=Qe(),r=Gn(),i=rt();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),qn=r(((e,t)=>{var n=Hn(),r=Kn();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Jn=r(((e,t)=>{var n=D(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),Yn=r(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Xn=r(((e,t)=>{var n=Hn(),r=We();function i(e,t){return n(e,r(e),t)}t.exports=i})),Zn=r(((e,t)=>{t.exports=et()(Object.getPrototypeOf,Object)})),Qn=r(((e,t)=>{var n=He(),r=Zn(),i=We(),a=H();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),$n=r(((e,t)=>{var n=Hn(),r=Qn();function i(e,t){return n(e,r(e),t)}t.exports=i})),er=r(((e,t)=>{var n=Ue(),r=Qn(),i=Kn();function a(e){return n(e,i,r)}t.exports=a})),Y=r(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),tr=r(((e,t)=>{var n=ze();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),nr=r(((e,t)=>{var n=tr();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),rr=r(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),ir=r(((e,t)=>{var n=w(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),ar=r(((e,t)=>{var n=tr();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),or=r(((e,t)=>{var n=tr(),r=nr(),i=rr(),a=ir(),o=ar(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),sr=r(((e,t)=>{var n=p(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),cr=r(((e,t)=>{var n=sr(),r=Zn(),i=$e();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),lr=r(((e,t)=>{var n=ut(),r=f(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),ur=r(((e,t)=>{var n=lr(),r=K(),i=Xe(),a=i&&i.isMap;t.exports=a?r(a):n})),dr=r(((e,t)=>{var n=ut(),r=f(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),fr=r(((e,t)=>{var n=dr(),r=K(),i=Xe(),a=i&&i.isSet;t.exports=a?r(a):n})),pr=r(((e,t)=>{var n=Me(),r=Rn(),i=Vn(),a=Un(),o=qn(),s=Jn(),c=Yn(),l=Xn(),u=$n(),d=at(),f=er(),m=ut(),h=Y(),g=or(),_=cr(),v=E(),y=W(),b=ur(),x=p(),S=fr(),C=it(),w=Kn(),T=1,D=2,ee=4,O=`[object Arguments]`,te=`[object Array]`,k=`[object Boolean]`,A=`[object Date]`,ne=`[object Error]`,re=`[object Function]`,ie=`[object GeneratorFunction]`,j=`[object Map]`,ae=`[object Number]`,oe=`[object Object]`,se=`[object RegExp]`,M=`[object Set]`,N=`[object String]`,ce=`[object Symbol]`,le=`[object WeakMap]`,ue=`[object ArrayBuffer]`,de=`[object DataView]`,fe=`[object Float32Array]`,pe=`[object Float64Array]`,me=`[object Int8Array]`,P=`[object Int16Array]`,he=`[object Int32Array]`,ge=`[object Uint8Array]`,_e=`[object Uint8ClampedArray]`,ve=`[object Uint16Array]`,ye=`[object Uint32Array]`,F={};F[O]=F[te]=F[ue]=F[de]=F[k]=F[A]=F[fe]=F[pe]=F[me]=F[P]=F[he]=F[j]=F[ae]=F[oe]=F[se]=F[M]=F[N]=F[ce]=F[ge]=F[_e]=F[ve]=F[ye]=!0,F[ne]=F[re]=F[le]=!1;function be(e,t,p,E,te,k){var A,ne=t&T,j=t&D,ae=t&ee;if(p&&(A=te?p(e,E,te,k):p(e)),A!==void 0)return A;if(!x(e))return e;var se=v(e);if(se){if(A=h(e),!ne)return c(e,A)}else{var M=m(e),N=M==re||M==ie;if(y(e))return s(e,ne);if(M==oe||M==O||N&&!te){if(A=j||N?{}:_(e),!ne)return j?u(e,o(A,e)):l(e,a(A,e))}else{if(!F[M])return te?e:{};A=g(e,M,ne)}}k||=new n;var ce=k.get(e);if(ce)return ce;k.set(e,A),S(e)?e.forEach(function(n){A.add(be(n,t,p,n,e,k))}):b(e)&&e.forEach(function(n,r){A.set(r,be(n,t,p,r,e,k))});var le=se?void 0:(ae?j?f:d:j?w:C)(e);return r(le||e,function(n,r){le&&(r=n,n=e[r]),i(A,r,be(n,t,p,r,e,k))}),A}t.exports=be})),mr=r(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n})),hr=r(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),gr=r(((e,t)=>{var n=m(),r=hr();function i(e,t){return t.length<2?e:n(e,r(t,0,-1))}t.exports=i})),_r=r(((e,t)=>{var n=v(),r=mr(),i=gr(),a=s();function o(e,t){return t=n(t,e),e=i(e,t),e==null||delete e[a(r(t))]}t.exports=o})),vr=r(((e,t)=>{var n=o(),r=Zn(),i=f(),a=`[object Object]`,s=Function.prototype,c=Object.prototype,l=s.toString,u=c.hasOwnProperty,d=l.call(Object);function p(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=u.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&l.call(o)==d}t.exports=p})),yr=r(((e,t)=>{var n=vr();function r(e){return n(e)?void 0:e}t.exports=r})),br=r(((e,t)=>{var n=w(),r=Ke(),i=E(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),xr=r(((e,t)=>{var n=He(),r=br();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),Sr=r(((e,t)=>{var n=xr();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),Cr=r(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),wr=r(((e,t)=>{var n=Cr(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),Tr=r(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),Er=r(((e,t)=>{function n(e){return e}t.exports=n})),Dr=r(((e,t)=>{var n=Tr(),r=zn(),i=Er();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),Or=r(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),kr=r(((e,t)=>{var n=Dr();t.exports=Or()(n)})),Ar=r(((e,t)=>{var n=Sr(),r=wr(),i=kr();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),jr=e(r(((e,t)=>{var n=x(),r=pr(),i=_r(),a=v(),o=Hn(),s=yr(),c=Ar(),l=er(),u=1,d=2,f=4;t.exports=c(function(e,t){var c={};if(e==null)return c;var p=!1;t=n(t,function(t){return t=a(t,e),p||=t.length>1,t}),o(e,l(e),c),p&&(c=r(c,u|d|f,s));for(var m=t.length;m--;)i(c,t[m]);return c})}))(),1);const Mr=[{breaking:!0,release:`major`},{revert:!0,release:`patch`},...jn.map(e=>(0,jr.default)(e,[`label`]))],X=jn.reduce((e,{type:t,label:n})=>({...e,[t]:n}),{}),Nr=e=>X[e.type]?X[e.type]:X.default??e.type;function Pr(e,t){e={...e};let n=[];if(e.notes.forEach(e=>{e.title=`BREAKING CHANGES`}),e.type=Nr(e),!(e.message&&e.message.match(/^[\w-]+$/i))){if(e.subject&&(e.subject=e.subject.replace(`[MEP]`,``)),e.scope===`*`&&(e.scope=``),typeof e.hash==`string`&&(e.shortHash=e.hash.substring(0,7)),typeof e.subject==`string`){let r=t.repository?`${t.host}/${t.owner}/${t.repository}`:t.repoUrl;r&&(r=`${r}/issues/`,e.subject=e.subject.replace(/#([0-9]+)/g,(e,t)=>(n.push(t),`[#${t}](${r}${t})`))),t.host&&(e.subject=e.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g,(e,n)=>n.includes(`/`)?`@${n}`:`[@${n}](${t.host}/${n})`))}return e.references=e.references.filter(e=>n.indexOf(e.issue)===-1),e}}function Fr(e={}){let{PRODUCTION_BRANCH:t,BRANCH_NAME:n}=_(),r=n??t;return{noCi:t!==r||void 0,branches:[{name:t,channel:`release`},{name:r,channel:`prerelease`,prerelease:!0}],verifyConditions:[`@cmflow/cli/semantic/verify-conditions`],analyzeCommits:[`@cmflow/cli/semantic/analyze-commits`],verifyRelease:[`@cmflow/cli/semantic/verify-release`],generateNotes:[`@cmflow/cli/semantic/generate-notes`],prepare:[`@cmflow/cli/semantic/prepare/bump-version`,`@cmflow/cli/semantif/prepare/post`],releaseRules:Mr,parserOpts:{noteKeywords:[`BREAKING CHANGE`,`BREAKING CHANGES`]},writerOpts:{transform:Pr},...e}}export{T as Cli,jn as WORKFLOW_CONFIGURATION,ne as bun,In as commands,A as configureGitWorkspace,Fr as defineConfig,ae as docker,S as getCI,_ as getConfig,b as getPackageJson,te as getPackageManager,a as git,k as lerna,oe as npm,ee as pnpm,Ln as release,Mr as releaseRules,re as runCommand,Pr as transformWriter,O as yarn};
38
38
  //# sourceMappingURL=index.mjs.map