blink 1.1.20 → 1.1.22

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 (122) hide show
  1. package/dist/browser/agent/client/index.cjs +7 -7
  2. package/dist/browser/agent/client/index.js +6 -6
  3. package/dist/cli/{auth-CoJASYGP.js → auth-DbpOUCTO.js} +2 -2
  4. package/dist/cli/{chat-BDAEIrJW.js → chat-CAtArOPl.js} +1 -1
  5. package/dist/cli/chat-manager-GWR_v50X.js +21 -0
  6. package/dist/cli/connect-DWScpJzS.js +1 -0
  7. package/dist/cli/{dev-C5PZ-A_f.js → dev-BSh59jdn.js} +211 -181
  8. package/dist/cli/execAsync-Dwktgsum.js +1 -0
  9. package/dist/cli/execAsync-qNF4iDpO.js +1 -0
  10. package/dist/cli/{getMachineId-bsd-BQaAhwjO.js → getMachineId-bsd-0cOO_RKK.js} +1 -1
  11. package/dist/cli/{getMachineId-bsd-Cw8CWhxJ.js → getMachineId-bsd-BDrKPt3B.js} +1 -1
  12. package/dist/cli/{getMachineId-bsd-DcR5dlLj.js → getMachineId-bsd-BJ3yH7j4.js} +1 -1
  13. package/dist/{node/getMachineId-bsd-BxqlJcyA.js → cli/getMachineId-bsd-BpxYEV3F.js} +1 -1
  14. package/dist/cli/getMachineId-bsd-BrJwIGYU.js +1 -0
  15. package/dist/cli/getMachineId-bsd-C6osJ6-S.js +1 -0
  16. package/dist/cli/{getMachineId-bsd-CbeuYR7X.js → getMachineId-bsd-CHVQhSq2.js} +1 -1
  17. package/dist/cli/getMachineId-bsd-DeIJ5F9l.js +1 -0
  18. package/dist/cli/{getMachineId-darwin-D7CuR-jd.js → getMachineId-darwin-0AdOS_kz.js} +1 -1
  19. package/dist/cli/{getMachineId-darwin-DJ-H8l7s.js → getMachineId-darwin-BaA8JJgE.js} +1 -1
  20. package/dist/cli/{getMachineId-darwin-DYCKXuZX.js → getMachineId-darwin-BeAdNwpL.js} +1 -1
  21. package/dist/cli/{getMachineId-darwin-DyN_uugK.js → getMachineId-darwin-C8-xkmnZ.js} +1 -1
  22. package/dist/{node/getMachineId-darwin-Bf4P0U5b.js → cli/getMachineId-darwin-CJ2gOzlU.js} +1 -1
  23. package/dist/cli/getMachineId-darwin-CYvRIQbp.js +2 -0
  24. package/dist/cli/getMachineId-darwin-DWSKszGZ.js +2 -0
  25. package/dist/cli/getMachineId-darwin-wYLDmdQt.js +2 -0
  26. package/dist/cli/getMachineId-linux-D0cDy6Ik.js +1 -0
  27. package/dist/cli/getMachineId-linux-DgyKUIyK.js +1 -0
  28. package/dist/cli/getMachineId-linux-DnzutOBC.js +1 -0
  29. package/dist/cli/getMachineId-linux-nBO1QX9q.js +1 -0
  30. package/dist/cli/getMachineId-unsupported-DQBLgw4s.js +1 -0
  31. package/dist/cli/getMachineId-unsupported-DTFeADdG.js +1 -0
  32. package/dist/cli/getMachineId-unsupported-DgVzHx1H.js +1 -0
  33. package/dist/cli/getMachineId-unsupported-TE5qi9PD.js +1 -0
  34. package/dist/cli/{getMachineId-win-BB1s3SWz.js → getMachineId-win-4Psd7Tlr.js} +1 -1
  35. package/dist/cli/{getMachineId-win-BrQ4d5bO.js → getMachineId-win-BA0Li8oF.js} +1 -1
  36. package/dist/cli/{getMachineId-win-CgPYGelR.js → getMachineId-win-BvGLfEpq.js} +1 -1
  37. package/dist/cli/getMachineId-win-BzRwVWue.js +1 -0
  38. package/dist/cli/{getMachineId-win-B7f9VGFu.js → getMachineId-win-C4wjvjxC.js} +1 -1
  39. package/dist/cli/getMachineId-win-DXCyELQJ.js +1 -0
  40. package/dist/cli/getMachineId-win-hHwtD9GX.js +1 -0
  41. package/dist/cli/getMachineId-win-lhgCxX3y.js +1 -0
  42. package/dist/cli/index.js +8 -8
  43. package/dist/cli/init-Ciwa_eM0.js +23 -0
  44. package/dist/cli/{init-templates-CB4tNZfU.js → init-templates-By3gx42M.js} +33 -23
  45. package/dist/cli/login-BDP8JC4X.js +1 -0
  46. package/dist/cli/{run-bKDX6K46.js → run-CZZ6WAdr.js} +1 -1
  47. package/dist/cli/setup-slack-app-DagQxNol.js +1 -0
  48. package/dist/cli/{token-DNRiDJM-.js → token-BdYp2nw_.js} +1 -1
  49. package/dist/cli/token-util-C9doIH9w.js +1 -0
  50. package/dist/cli/{token-util-IqDtKhK6.js → token-util-KdD-UX1l.js} +1 -1
  51. package/dist/cli/undici-Bm_EanIy.js +1 -0
  52. package/dist/cli/util-CUfifM0g.js +5 -0
  53. package/dist/cli/{util-DDB5k1Go.js → util-k3x8m_i5.js} +9 -9
  54. package/dist/node/agent/index.node.cjs +1 -1
  55. package/dist/node/agent/index.node.d.ts +1 -1
  56. package/dist/node/agent/index.node.js +1 -1
  57. package/dist/node/build/index.d.ts +1 -1
  58. package/dist/node/execAsync-CY8juV7n.js +1 -0
  59. package/dist/node/{getMachineId-bsd-C10eVJgT.js → getMachineId-bsd-Ckr9jSoT.js} +1 -1
  60. package/dist/node/{getMachineId-bsd-B84ixt26.cjs → getMachineId-bsd-O0bNSuuh.cjs} +1 -1
  61. package/dist/node/{getMachineId-darwin-JB29MQsG.js → getMachineId-darwin-36SFRv2R.js} +1 -1
  62. package/dist/node/{getMachineId-darwin-Cyng5kFG.cjs → getMachineId-darwin-DivkCgLG.cjs} +1 -1
  63. package/dist/node/{getMachineId-win-CjJkZMZe.cjs → getMachineId-win-B_okYUv6.cjs} +1 -1
  64. package/dist/node/{getMachineId-win-C4G-fkEF.js → getMachineId-win-CGqZ4f4O.js} +1 -1
  65. package/dist/node/index.node-Bvp48I1R.cjs +50 -0
  66. package/dist/node/index.node-ppzOWVGE.js +50 -0
  67. package/dist/node/react/index.node.cjs +130 -121
  68. package/dist/node/react/index.node.d.cts +9 -2
  69. package/dist/node/react/index.node.d.ts +11 -4
  70. package/dist/node/react/index.node.js +84 -75
  71. package/dist/node/{token-DOfE6QlD.js → token-CI2_C_5D.js} +1 -1
  72. package/dist/node/{token-BBGr-czK.cjs → token-D4jFpAk0.cjs} +1 -1
  73. package/dist/node/token-util-BENsR1Bn.cjs +1 -0
  74. package/dist/node/{token-util-C_uzN2q9.js → token-util-idU3T5iM.js} +1 -1
  75. package/package.json +19 -1
  76. package/dist/cli/chat-manager-BRchJngj.js +0 -21
  77. package/dist/cli/connect-WyCmuQHj.js +0 -1
  78. package/dist/cli/init-CFrylDAP.js +0 -25
  79. package/dist/cli/login-DZFx5155.js +0 -1
  80. package/dist/cli/setup-slack-app-D_iwQuzr.js +0 -1
  81. package/dist/cli/token-util-C6Xu44iO.js +0 -1
  82. package/dist/cli/undici-L5V8WBce.js +0 -1
  83. package/dist/cli/util-BgbIWOFE.js +0 -6
  84. package/dist/node/execAsync-pJEPzmP4.cjs +0 -1
  85. package/dist/node/getMachineId-bsd-BudRe7J9.cjs +0 -1
  86. package/dist/node/getMachineId-darwin-ZVi3EKE3.cjs +0 -2
  87. package/dist/node/getMachineId-linux-CJXPQ8U5.cjs +0 -1
  88. package/dist/node/getMachineId-linux-CmMSYp7C.js +0 -1
  89. package/dist/node/getMachineId-unsupported-DM7fz1pP.cjs +0 -1
  90. package/dist/node/getMachineId-unsupported-Dtt3HTNZ.js +0 -1
  91. package/dist/node/getMachineId-win-D1szVnqR.js +0 -1
  92. package/dist/node/getMachineId-win-DDz2FyEp.cjs +0 -1
  93. package/dist/node/index.node-B6JXREDl.js +0 -55
  94. package/dist/node/index.node-BrLfthBj.cjs +0 -55
  95. package/dist/node/token-util-D9kCwzE6.cjs +0 -1
  96. /package/dist/cli/{connect-CQUVd44y.js → connect-BCK40kvG.js} +0 -0
  97. /package/dist/cli/{devtools-DvNholmW.js → devtools-DsAYEmyP.js} +0 -0
  98. /package/dist/cli/{execAsync-Bhq3YKvl.js → execAsync-BOPj9Mml.js} +0 -0
  99. /package/dist/cli/{execAsync-BnYBiViJ.js → execAsync-Bv4jTnD3.js} +0 -0
  100. /package/dist/cli/{execAsync-Djebuxfm.js → execAsync-CyP3Ojec.js} +0 -0
  101. /package/dist/cli/{execAsync-_tP2SNTy.js → execAsync-DHh3DKKp.js} +0 -0
  102. /package/dist/{node/execAsync-DzxhVi7q.js → cli/execAsync-DdLzES9n.js} +0 -0
  103. /package/dist/{node/execAsync-epR2wT1r.js → cli/execAsync-Dv6XOE2I.js} +0 -0
  104. /package/dist/cli/{getMachineId-linux-BCOAWAJr.js → getMachineId-linux-BQISLgy5.js} +0 -0
  105. /package/dist/cli/{getMachineId-linux-CBDQri3D.js → getMachineId-linux-Bg5YnekM.js} +0 -0
  106. /package/dist/cli/{getMachineId-linux-EqaaEzYC.js → getMachineId-linux-Boq-GGfA.js} +0 -0
  107. /package/dist/cli/{getMachineId-linux-QFNGh16E.js → getMachineId-linux-C9BHlxRm.js} +0 -0
  108. /package/dist/cli/{getMachineId-unsupported-BLalsIU8.js → getMachineId-unsupported-4qhSqb7w.js} +0 -0
  109. /package/dist/cli/{getMachineId-unsupported-CNgpP2gn.js → getMachineId-unsupported-BsEK_LG9.js} +0 -0
  110. /package/dist/cli/{getMachineId-unsupported-CQrnjCuH.js → getMachineId-unsupported-C6cVb167.js} +0 -0
  111. /package/dist/cli/{getMachineId-unsupported-CcRcqdy3.js → getMachineId-unsupported-CqJy0sqq.js} +0 -0
  112. /package/dist/cli/{token-error-DVSfBVaT.js → token-error-COQY18OP.js} +0 -0
  113. /package/dist/cli/{undici-BUZTy5qm.js → undici-CRntNDHY.js} +0 -0
  114. /package/dist/node/{execAsync-C9Unrkco.cjs → execAsync-BMxJf0Eg.cjs} +0 -0
  115. /package/dist/node/{getMachineId-linux-B-CtXK0L.cjs → getMachineId-linux-C8A0ak4z.cjs} +0 -0
  116. /package/dist/node/{getMachineId-linux-BPnkHJah.js → getMachineId-linux-ZoT5w75D.js} +0 -0
  117. /package/dist/node/{getMachineId-unsupported--0R36RP6.cjs → getMachineId-unsupported-DSRCXJha.cjs} +0 -0
  118. /package/dist/node/{getMachineId-unsupported-C_4fnT4Z.js → getMachineId-unsupported-XVp8oFCM.js} +0 -0
  119. /package/dist/node/{index-CnBfy-54.d.ts → index-B4OXlWm3.d.ts} +0 -0
  120. /package/dist/node/{index.node-Dvc-cHCZ.d.ts → index.node-D5_czyKY.d.ts} +0 -0
  121. /package/dist/node/{token-util-BOoyY0PX.cjs → token-util-BxSJFXkT.cjs} +0 -0
  122. /package/dist/node/{token-util-_pz5CtFI.js → token-util-ChGcRyiF.js} +0 -0
@@ -0,0 +1,23 @@
1
+ import{__commonJSMin as e,__require as t,__toESM as n}from"./chunk-D9KrCrVq.js";import{Ie as r,M as i,Se as a,he as o,pD as s,ve as c,xe as l,ye as u}from"./dist-Ceoe3h7v.js";import"./util-CUfifM0g.js";import"./create-slack-app-CyVPwWsG.js";import{setupSlackApp as d}from"./setup-slack-app-DagQxNol.js";import{templates as f}from"./init-templates-By3gx42M.js";import{basename as p,join as m}from"path";import{readFile as h,readdir as g,writeFile as _}from"fs/promises";import{spawn as v}from"child_process";var y=e((e=>{e.__esModule=!0,e.extend=a,e.indexOf=l,e.escapeExpression=u,e.isEmpty=d,e.createFrame=f,e.blockParams=p,e.appendContextPath=m;var t={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#x27;`,"`":`&#x60;`,"=":`&#x3D;`},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function i(e){return t[e]}function a(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var o=Object.prototype.toString;e.toString=o;var s=function(e){return typeof e==`function`};s(/x/)&&(e.isFunction=s=function(e){return typeof e==`function`&&o.call(e)===`[object Function]`}),e.isFunction=s;var c=Array.isArray||function(e){return e&&typeof e==`object`?o.call(e)===`[object Array]`:!1};e.isArray=c;function l(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function u(e){if(typeof e!=`string`){if(e&&e.toHTML)return e.toHTML();if(e==null)return``;if(!e)return e+``;e=``+e}return r.test(e)?e.replace(n,i):e}function d(e){return!e&&e!==0?!0:!!(c(e)&&e.length===0)}function f(e){var t=a({},e);return t._parent=e,t}function p(e,t){return e.path=t,e}function m(e,t){return(e?e+`.`:``)+t}})),b=e(((e,t)=>{e.__esModule=!0;var n=[`description`,`fileName`,`lineNumber`,`endLineNumber`,`message`,`name`,`number`,`stack`];function r(e,t){var i=t&&t.loc,a=void 0,o=void 0,s=void 0,c=void 0;i&&(a=i.start.line,o=i.end.line,s=i.start.column,c=i.end.column,e+=` - `+a+`:`+s);for(var l=Error.prototype.constructor.call(this,e),u=0;u<n.length;u++)this[n[u]]=l[n[u]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{i&&(this.lineNumber=a,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,`column`,{value:s,enumerable:!0}),Object.defineProperty(this,`endColumn`,{value:c,enumerable:!0})):(this.column=s,this.endColumn=c))}catch{}}r.prototype=Error(),e.default=r,t.exports=e.default})),x=e(((e,t)=>{e.__esModule=!0;var n=y();e.default=function(e){e.registerHelper(`blockHelperMissing`,function(t,r){var i=r.inverse,a=r.fn;if(t===!0)return a(this);if(t===!1||t==null)return i(this);if(n.isArray(t))return t.length>0?(r.ids&&=[r.name],e.helpers.each(t,r)):i(this);if(r.data&&r.ids){var o=n.createFrame(r.data);o.contextPath=n.appendContextPath(r.data.contextPath,r.name),r={data:o}}return a(t,r)})},t.exports=e.default})),S=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=y(),i=b(),a=n(i);e.default=function(e){e.registerHelper(`each`,function(e,t){if(!t)throw new a.default(`Must pass iterator to #each`);var n=t.fn,i=t.inverse,o=0,s=``,c=void 0,l=void 0;t.data&&t.ids&&(l=r.appendContextPath(t.data.contextPath,t.ids[0])+`.`),r.isFunction(e)&&(e=e.call(this)),t.data&&(c=r.createFrame(t.data));function u(t,i,a){c&&(c.key=t,c.index=i,c.first=i===0,c.last=!!a,l&&(c.contextPath=l+t)),s+=n(e[t],{data:c,blockParams:r.blockParams([e[t],t],[l+t,null])})}if(e&&typeof e==`object`)if(r.isArray(e))for(var d=e.length;o<d;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol==`function`&&e[Symbol.iterator]){for(var f=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())f.push(m.value);e=f;for(var d=e.length;o<d;o++)u(o,o,o===e.length-1)}else (function(){var t=void 0;Object.keys(e).forEach(function(e){t!==void 0&&u(t,o-1),t=e,o++}),t!==void 0&&u(t,o-1,!0)})();return o===0&&(s=i(this)),s})},t.exports=e.default})),C=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=b(),i=n(r);e.default=function(e){e.registerHelper(`helperMissing`,function(){if(arguments.length!==1)throw new i.default(`Missing helper: "`+arguments[arguments.length-1].name+`"`)})},t.exports=e.default})),w=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=y(),i=b(),a=n(i);e.default=function(e){e.registerHelper(`if`,function(e,t){if(arguments.length!=2)throw new a.default(`#if requires exactly one argument`);return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper(`unless`,function(t,n){if(arguments.length!=2)throw new a.default(`#unless requires exactly one argument`);return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},t.exports=e.default})),T=e(((e,t)=>{e.__esModule=!0,e.default=function(e){e.registerHelper(`log`,function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var i=1;n.hash.level==null?n.data&&n.data.level!=null&&(i=n.data.level):i=n.hash.level,t[0]=i,e.log.apply(e,t)})},t.exports=e.default})),E=e(((e,t)=>{e.__esModule=!0,e.default=function(e){e.registerHelper(`lookup`,function(e,t,n){return e&&n.lookupProperty(e,t)})},t.exports=e.default})),D=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=y(),i=b(),a=n(i);e.default=function(e){e.registerHelper(`with`,function(e,t){if(arguments.length!=2)throw new a.default(`#with requires exactly one argument`);r.isFunction(e)&&(e=e.call(this));var n=t.fn;if(r.isEmpty(e))return t.inverse(this);var i=t.data;return t.data&&t.ids&&(i=r.createFrame(t.data),i.contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:i,blockParams:r.blockParams([e],[i&&i.contextPath])})})},t.exports=e.default})),O=e((e=>{e.__esModule=!0,e.registerDefaultHelpers=g,e.moveHelperToHooks=_;function t(e){return e&&e.__esModule?e:{default:e}}var n=x(),r=t(n),i=S(),a=t(i),o=C(),s=t(o),c=w(),l=t(c),u=T(),d=t(u),f=E(),p=t(f),m=D(),h=t(m);function g(e){r.default(e),a.default(e),s.default(e),l.default(e),d.default(e),p.default(e),h.default(e)}function _(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])}})),k=e(((e,t)=>{e.__esModule=!0;var n=y();e.default=function(e){e.registerDecorator(`inline`,function(e,t,r,i){var a=e;return t.partials||(t.partials={},a=function(i,a){var o=r.partials;r.partials=n.extend({},o,t.partials);var s=e(i,a);return r.partials=o,s}),t.partials[i.args[0]]=i.fn,a})},t.exports=e.default})),ee=e((e=>{e.__esModule=!0,e.registerDefaultDecorators=i;function t(e){return e&&e.__esModule?e:{default:e}}var n=k(),r=t(n);function i(e){r.default(e)}})),A=e(((e,t)=>{e.__esModule=!0;var n=y(),r={methodMap:[`debug`,`info`,`warn`,`error`],level:`info`,lookupLevel:function(e){if(typeof e==`string`){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),typeof console<`u`&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t=`log`);var n=[...arguments].slice(1);console[t].apply(console,n)}}};e.default=r,t.exports=e.default})),j=e((e=>{e.__esModule=!0,e.createNewLookupObject=n;var t=y();function n(){var e=[...arguments];return t.extend.apply(void 0,[Object.create(null)].concat(e))}})),M=e((e=>{e.__esModule=!0,e.createProtoAccessControl=o,e.resultIsAllowed=s,e.resetLoggedProperties=u;function t(e){return e&&e.__esModule?e:{default:e}}var n=j(),r=A(),i=t(r),a=Object.create(null);function o(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:n.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function s(e,t,n){return c(typeof e==`function`?t.methods:t.properties,n)}function c(e,t){return e.whitelist[t]===void 0?e.defaultValue===void 0?(l(t),!1):e.defaultValue:e.whitelist[t]===!0}function l(e){a[e]!==!0&&(a[e]=!0,i.default.log(`error`,`Handlebars: Access has been denied to resolve the property "`+e+`" because it is not an "own property" of its parent.
2
+ You can add a runtime option to disable the check or this warning:
3
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function u(){Object.keys(a).forEach(function(e){delete a[e]})}})),N=e((e=>{e.__esModule=!0,e.HandlebarsEnvironment=d;function t(e){return e&&e.__esModule?e:{default:e}}var n=y(),r=b(),i=t(r),a=O(),o=ee(),s=A(),c=t(s),l=M();e.VERSION=`4.7.8`,e.COMPILER_REVISION=8,e.LAST_COMPATIBLE_COMPILER_REVISION=7,e.REVISION_CHANGES={1:`<= 1.0.rc.2`,2:`== 1.0.0-rc.3`,3:`== 1.0.0-rc.4`,4:`== 1.x.x`,5:`== 2.0.0-alpha.x`,6:`>= 2.0.0-beta.1`,7:`>= 4.0.0 <4.3.0`,8:`>= 4.3.0`};var u=`[object Object]`;function d(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},a.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}d.prototype={constructor:d,logger:c.default,log:c.default.log,registerHelper:function(e,t){if(n.toString.call(e)===u){if(t)throw new i.default(`Arg not supported with multiple helpers`);n.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(n.toString.call(e)===u)n.extend(this.partials,e);else{if(t===void 0)throw new i.default(`Attempting to register a partial called "`+e+`" as undefined`);this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(n.toString.call(e)===u){if(t)throw new i.default(`Arg not supported with multiple decorators`);n.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){l.resetLoggedProperties()}},e.log=c.default.log,e.createFrame=n.createFrame,e.logger=c.default})),P=e(((e,t)=>{e.__esModule=!0;function n(e){this.string=e}n.prototype.toString=n.prototype.toHTML=function(){return``+this.string},e.default=n,t.exports=e.default})),F=e((e=>{e.__esModule=!0,e.wrapHelper=t;function t(e,t){return typeof e==`function`?function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=t(n),e.apply(this,arguments)}:e}})),I=e((e=>{e.__esModule=!0,e.checkRevision=d,e.template=f,e.wrapProgram=p,e.resolvePartial=m,e.invokePartial=h,e.noop=g;function t(e){return e&&e.__esModule?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var r=y(),i=n(r),a=b(),o=t(a),s=N(),c=O(),l=F(),u=M();function d(e){var t=e&&e[0]||1,n=s.COMPILER_REVISION;if(!(t>=s.LAST_COMPATIBLE_COMPILER_REVISION&&t<=s.COMPILER_REVISION))if(t<s.LAST_COMPATIBLE_COMPILER_REVISION){var r=s.REVISION_CHANGES[n],i=s.REVISION_CHANGES[t];throw new o.default(`Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (`+r+`) or downgrade your runtime to an older version (`+i+`).`)}else throw new o.default(`Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (`+e[1]+`).`)}function f(e,t){if(!t)throw new o.default(`No environment passed to template`);if(!e||!e.main)throw new o.default(`Unknown template object: `+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&e.compiler[0]===7;function r(n,r,a){a.hash&&(r=i.extend({},r,a.hash),a.ids&&(a.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,r,a);var s=i.extend({},a,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),c=t.VM.invokePartial.call(this,n,r,s);if(c==null&&t.compile&&(a.partials[a.name]=t.compile(n,e.compilerOptions,t),c=a.partials[a.name](r,s)),c!=null){if(a.indent){for(var l=c.split(`
4
+ `),u=0,d=l.length;u<d&&!(!l[u]&&u+1===d);u++)l[u]=a.indent+l[u];c=l.join(`
5
+ `)}return c}else throw new o.default(`The partial `+a.name+` could not be compiled when running in runtime-only mode`)}var a={strict:function(e,t,n){if(!e||!(t in e))throw new o.default(`"`+t+`" not defined in `+e,{loc:n});return a.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];if(n==null||Object.prototype.hasOwnProperty.call(e,t)||u.resultIsAllowed(n,a.protoAccessControl,t))return n},lookup:function(e,t){for(var n=e.length,r=0;r<n;r++)if((e[r]&&a.lookupProperty(e[r],t))!=null)return e[r][t]},lambda:function(e,t){return typeof e==`function`?e.call(t):e},escapeExpression:i.escapeExpression,invokePartial:r,fn:function(t){var n=e[t];return n.decorator=e[t+`_d`],n},programs:[],program:function(e,t,n,r,i){var a=this.programs[e],o=this.fn(e);return t||i||r||n?a=p(this,e,o,t,n,r,i):a||=this.programs[e]=p(this,e,o),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=i.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function s(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],r=n.data;s._setup(n),!n.partial&&e.useData&&(r=_(t,r));var i=void 0,o=e.useBlockParams?[]:void 0;e.useDepths&&(i=n.depths?t==n.depths[0]?n.depths:[t].concat(n.depths):[t]);function c(t){return``+e.main(a,t,a.helpers,a.partials,r,o,i)}return c=v(e.main,c,a,n.depths||[],r,o),c(t,n)}return s.isTop=!0,s._setup=function(r){if(r.partial)a.protoAccessControl=r.protoAccessControl,a.helpers=r.helpers,a.partials=r.partials,a.decorators=r.decorators,a.hooks=r.hooks;else{var o=i.extend({},t.helpers,r.helpers);x(o,a),a.helpers=o,e.usePartial&&(a.partials=a.mergeIfNeeded(r.partials,t.partials)),(e.usePartial||e.useDecorators)&&(a.decorators=i.extend({},t.decorators,r.decorators)),a.hooks={},a.protoAccessControl=u.createProtoAccessControl(r);var s=r.allowCallsToHelperMissing||n;c.moveHelperToHooks(a,`helperMissing`,s),c.moveHelperToHooks(a,`blockHelperMissing`,s)}},s._child=function(t,n,r,i){if(e.useBlockParams&&!r)throw new o.default(`must pass block params`);if(e.useDepths&&!i)throw new o.default(`must pass parent depths`);return p(a,t,e[t],n,0,r,i)},s}function p(e,t,n,r,i,a,o){function s(t){var i=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],s=o;return o&&t!=o[0]&&!(t===e.nullContext&&o[0]===null)&&(s=[t].concat(o)),n(e,t,e.helpers,e.partials,i.data||r,a&&[i.blockParams].concat(a),s)}return s=v(n,s,e,o,r,a),s.program=t,s.depth=o?o.length:0,s.blockParams=i||0,s}function m(e,t,n){return e?!e.call&&!n.name&&(n.name=e,e=n.partials[e]):e=n.name===`@partial-block`?n.data[`partial-block`]:n.partials[n.name],e}function h(e,t,n){var r=n.data&&n.data[`partial-block`];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var a=void 0;if(n.fn&&n.fn!==g&&(function(){n.data=s.createFrame(n.data);var e=n.fn;a=n.data[`partial-block`]=function(t){var n=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return n.data=s.createFrame(n.data),n.data[`partial-block`]=r,e(t,n)},e.partials&&(n.partials=i.extend({},n.partials,e.partials))})(),e===void 0&&a&&(e=a),e===void 0)throw new o.default(`The partial `+n.name+` could not be found`);if(e instanceof Function)return e(t,n)}function g(){return``}function _(e,t){return(!t||!(`root`in t))&&(t=t?s.createFrame(t):{},t.root=e),t}function v(e,t,n,r,a,o){if(e.decorator){var s={};t=e.decorator(t,s,n,r&&r[0],a,o,r),i.extend(t,s)}return t}function x(e,t){Object.keys(e).forEach(function(n){var r=e[n];e[n]=S(r,t)})}function S(e,t){var n=t.lookupProperty;return l.wrapHelper(e,function(e){return i.extend({lookupProperty:n},e)})}})),L=e(((e,t)=>{e.__esModule=!0,e.default=function(e){(function(){typeof globalThis!=`object`&&(Object.prototype.__defineGetter__(`__magic__`,function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}},t.exports=e.default})),te=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var i=N(),a=r(i),o=P(),s=n(o),c=b(),l=n(c),u=y(),d=r(u),f=I(),p=r(f),m=L(),h=n(m);function g(){var e=new a.HandlebarsEnvironment;return d.extend(e,a),e.SafeString=s.default,e.Exception=l.default,e.Utils=d,e.escapeExpression=d.escapeExpression,e.VM=p,e.template=function(t){return p.template(t,e)},e}var _=g();_.create=g,h.default(_),_.default=_,e.default=_,t.exports=e.default})),R=e(((e,t)=>{e.__esModule=!0;var n={helpers:{helperExpression:function(e){return e.type===`SubExpression`||(e.type===`MustacheStatement`||e.type===`BlockStatement`)&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!n.helpers.scopedId(e)&&!e.depth}}};e.default=n,t.exports=e.default})),ne=e(((e,t)=>{e.__esModule=!0,e.default=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:`error`,5:`EOF`,14:`COMMENT`,15:`CONTENT`,18:`END_RAW_BLOCK`,19:`OPEN_RAW_BLOCK`,23:`CLOSE_RAW_BLOCK`,29:`OPEN_BLOCK`,33:`CLOSE`,34:`OPEN_INVERSE`,39:`OPEN_INVERSE_CHAIN`,44:`INVERSE`,47:`OPEN_ENDBLOCK`,48:`OPEN`,51:`OPEN_UNESCAPED`,54:`CLOSE_UNESCAPED`,55:`OPEN_PARTIAL`,60:`OPEN_PARTIAL_BLOCK`,65:`OPEN_SEXPR`,68:`CLOSE_SEXPR`,72:`ID`,73:`EQUALS`,75:`OPEN_BLOCK_PARAMS`,77:`CLOSE_BLOCK_PARAMS`,80:`STRING`,81:`NUMBER`,82:`BOOLEAN`,83:`UNDEFINED`,84:`NULL`,85:`DATA`,87:`SEP`},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=r.prepareProgram(a[s]);break;case 3:this.$=a[s];break;case 4:this.$=a[s];break;case 5:this.$=a[s];break;case 6:this.$=a[s];break;case 7:this.$=a[s];break;case 8:this.$=a[s];break;case 9:this.$={type:`CommentStatement`,value:r.stripComment(a[s]),strip:r.stripFlags(a[s],a[s]),loc:r.locInfo(this._$)};break;case 10:this.$={type:`ContentStatement`,original:a[s],value:a[s],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(a[s-2],a[s-1],a[s],this._$);break;case 12:this.$={path:a[s-3],params:a[s-2],hash:a[s-1]};break;case 13:this.$=r.prepareBlock(a[s-3],a[s-2],a[s-1],a[s],!1,this._$);break;case 14:this.$=r.prepareBlock(a[s-3],a[s-2],a[s-1],a[s],!0,this._$);break;case 15:this.$={open:a[s-5],path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 16:this.$={path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 17:this.$={path:a[s-4],params:a[s-3],hash:a[s-2],blockParams:a[s-1],strip:r.stripFlags(a[s-5],a[s])};break;case 18:this.$={strip:r.stripFlags(a[s-1],a[s-1]),program:a[s]};break;case 19:var c=r.prepareBlock(a[s-2],a[s-1],a[s],a[s],!1,this._$),l=r.prepareProgram([c],a[s-1].loc);l.chained=!0,this.$={strip:a[s-2].strip,program:l,chain:!0};break;case 20:this.$=a[s];break;case 21:this.$={path:a[s-1],strip:r.stripFlags(a[s-2],a[s])};break;case 22:this.$=r.prepareMustache(a[s-3],a[s-2],a[s-1],a[s-4],r.stripFlags(a[s-4],a[s]),this._$);break;case 23:this.$=r.prepareMustache(a[s-3],a[s-2],a[s-1],a[s-4],r.stripFlags(a[s-4],a[s]),this._$);break;case 24:this.$={type:`PartialStatement`,name:a[s-3],params:a[s-2],hash:a[s-1],indent:``,strip:r.stripFlags(a[s-4],a[s]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(a[s-2],a[s-1],a[s],this._$);break;case 26:this.$={path:a[s-3],params:a[s-2],hash:a[s-1],strip:r.stripFlags(a[s-4],a[s])};break;case 27:this.$=a[s];break;case 28:this.$=a[s];break;case 29:this.$={type:`SubExpression`,path:a[s-3],params:a[s-2],hash:a[s-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:`Hash`,pairs:a[s],loc:r.locInfo(this._$)};break;case 31:this.$={type:`HashPair`,key:r.id(a[s-2]),value:a[s],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(a[s-1]);break;case 33:this.$=a[s];break;case 34:this.$=a[s];break;case 35:this.$={type:`StringLiteral`,value:a[s],original:a[s],loc:r.locInfo(this._$)};break;case 36:this.$={type:`NumberLiteral`,value:Number(a[s]),original:Number(a[s]),loc:r.locInfo(this._$)};break;case 37:this.$={type:`BooleanLiteral`,value:a[s]===`true`,original:a[s]===`true`,loc:r.locInfo(this._$)};break;case 38:this.$={type:`UndefinedLiteral`,original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:`NullLiteral`,original:null,value:null,loc:r.locInfo(this._$)};break;case 40:this.$=a[s];break;case 41:this.$=a[s];break;case 42:this.$=r.preparePath(!0,a[s],this._$);break;case 43:this.$=r.preparePath(!1,a[s],this._$);break;case 44:a[s-2].push({part:r.id(a[s]),original:a[s],separator:a[s-1]}),this.$=a[s-2];break;case 45:this.$=[{part:r.id(a[s]),original:a[s]}];break;case 46:this.$=[];break;case 47:a[s-1].push(a[s]);break;case 48:this.$=[];break;case 49:a[s-1].push(a[s]);break;case 50:this.$=[];break;case 51:a[s-1].push(a[s]);break;case 58:this.$=[];break;case 59:a[s-1].push(a[s]);break;case 64:this.$=[];break;case 65:a[s-1].push(a[s]);break;case 70:this.$=[];break;case 71:a[s-1].push(a[s]);break;case 78:this.$=[];break;case 79:a[s-1].push(a[s]);break;case 82:this.$=[];break;case 83:a[s-1].push(a[s]);break;case 86:this.$=[];break;case 87:a[s-1].push(a[s]);break;case 90:this.$=[];break;case 91:a[s-1].push(a[s]);break;case 94:this.$=[];break;case 95:a[s-1].push(a[s]);break;case 98:this.$=[a[s]];break;case 99:a[s-1].push(a[s]);break;case 100:this.$=[a[s]];break;case 101:a[s-1].push(a[s]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(e,t){throw Error(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],a=this.table,o=``,s=0,c=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,this.lexer.yylloc===void 0&&(this.lexer.yylloc={});var u=this.lexer.yylloc;i.push(u);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError==`function`&&(this.parseError=this.yy.parseError);function f(){var e=t.lexer.lex()||1;return typeof e!=`number`&&(e=t.symbols_[e]||e),e}for(var p,m,h,g,_,v={},y,b,x,S;;){if(h=n[n.length-1],this.defaultActions[h]?g=this.defaultActions[h]:(p??=f(),g=a[h]&&a[h][p]),g===void 0||!g.length||!g[0]){var C=``;if(!l){for(y in S=[],a[h])this.terminals_[y]&&y>2&&S.push(`'`+this.terminals_[y]+`'`);C=this.lexer.showPosition?`Parse error on line `+(s+1)+`:
6
+ `+this.lexer.showPosition()+`
7
+ Expecting `+S.join(`, `)+`, got '`+(this.terminals_[p]||p)+`'`:`Parse error on line `+(s+1)+`: Unexpected `+(p==1?`end of input`:`'`+(this.terminals_[p]||p)+`'`),this.parseError(C,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:u,expected:S})}}if(g[0]instanceof Array&&g.length>1)throw Error(`Parse Error: multiple actions possible at state: `+h+`, token: `+p);switch(g[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),p=null,m?(p=m,m=null):(c=this.lexer.yyleng,o=this.lexer.yytext,s=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(b=this.productions_[g[1]][1],v.$=r[r.length-b],v._$={first_line:i[i.length-(b||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(b||1)].first_column,last_column:i[i.length-1].last_column},d&&(v._$.range=[i[i.length-(b||1)].range[0],i[i.length-1].range[1]]),_=this.performAction.call(v,o,c,s,this.yy,g[1],r,i),_!==void 0)return _;b&&(n=n.slice(0,-1*b*2),r=r.slice(0,-1*b),i=i.slice(0,-1*b)),n.push(this.productions_[g[1]][0]),r.push(v.$),i.push(v._$),x=a[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0}};e.lexer=(function(){var e={EOF:1,parseError:function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this},more:function(){return this._more=!0,this},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},showPosition:function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
8
+ `+t+`^`},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r,i;this._more||(this.yytext=``,this.match=``);for(var a=this._currentRules(),o=0;o<a.length&&(n=this._input.match(this.rules[a[o]]),!(n&&(!t||n[0].length>t[0].length)&&(t=n,r=o,!this.options.flex)));o++);return t?(i=t[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,a[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
9
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},lex:function(){var e=this.next();return e===void 0?this.lex():e},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,n,r){function i(e,n){return t.yytext=t.yytext.substring(e,t.yyleng-n+e)}switch(n){case 0:if(t.yytext.slice(-2)===`\\\\`?(i(0,1),this.begin(`mu`)):t.yytext.slice(-1)===`\\`?(i(0,1),this.begin(`emu`)):this.begin(`mu`),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin(`raw`),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]===`raw`?15:(i(5,9),`END_RAW_BLOCK`);case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin(`raw`),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext),this.popState(),this.begin(`com`);break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=i(1,2).replace(/\\"/g,`"`),80;case 32:return t.yytext=i(1,2).replace(/\\'/g,`'`),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,`$1`),72;case 43:return`INVALID`;case 44:return 5}},e.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],e.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},e})();function t(){this.yy={}}return t.prototype=e,e.Parser=t,new t})(),t.exports=e.default})),z=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=b(),i=n(r);function a(){this.parents=[]}a.prototype={constructor:a,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!a.prototype[n.type])throw new i.default(`Unexpected node type "`+n.type+`" found when accepting `+t+` on `+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new i.default(e.type+` requires `+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new i.default(`Unknown type: `+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:o,Decorator:o,BlockStatement:s,DecoratorBlock:s,PartialStatement:c,PartialBlockStatement:function(e){c.call(this,e),this.acceptKey(e,`program`)},ContentStatement:function(){},CommentStatement:function(){},SubExpression:o,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,`value`)}};function o(e){this.acceptRequired(e,`path`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}function s(e){o.call(this,e),this.acceptKey(e,`program`),this.acceptKey(e,`inverse`)}function c(e){this.acceptRequired(e,`name`),this.acceptArray(e.params),this.acceptKey(e,`hash`)}e.default=a,t.exports=e.default})),B=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=z(),i=n(r);function a(){this.options=arguments.length<=0||arguments[0]===void 0?{}:arguments[0]}a.prototype=new i.default,a.prototype.Program=function(e){var t=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=e.body,i=0,a=r.length;i<a;i++){var u=r[i],d=this.accept(u);if(d){var f=o(r,i,n),p=s(r,i,n),m=d.openStandalone&&f,h=d.closeStandalone&&p,g=d.inlineStandalone&&f&&p;d.close&&c(r,i,!0),d.open&&l(r,i,!0),t&&g&&(c(r,i),l(r,i)&&u.type===`PartialStatement`&&(u.indent=/([ \t]+$)/.exec(r[i-1].original)[1])),t&&m&&(c((u.program||u.inverse).body),l(r,i)),t&&h&&(c(r,i),l((u.inverse||u.program).body))}}return e},a.prototype.BlockStatement=a.prototype.DecoratorBlock=a.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,n=e.program&&e.inverse,r=n,i=n;if(n&&n.chained)for(r=n.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var a={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:s(t.body),closeStandalone:o((r||t).body)};if(e.openStrip.close&&c(t.body,null,!0),n){var u=e.inverseStrip;u.open&&l(t.body,null,!0),u.close&&c(r.body,null,!0),e.closeStrip.open&&l(i.body,null,!0),!this.options.ignoreStandalone&&o(t.body)&&s(r.body)&&(l(t.body),c(r.body))}else e.closeStrip.open&&l(t.body,null,!0);return a},a.prototype.Decorator=a.prototype.MustacheStatement=function(e){return e.strip},a.prototype.PartialStatement=a.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function o(e,t,n){t===void 0&&(t=e.length);var r=e[t-1],i=e[t-2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original)}function s(e,t,n){t===void 0&&(t=-1);var r=e[t+1],i=e[t+2];if(!r)return n;if(r.type===`ContentStatement`)return(i||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function c(e,t,n){var r=e[t==null?0:t+1];if(!(!r||r.type!==`ContentStatement`||!n&&r.rightStripped)){var i=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,``),r.rightStripped=r.value!==i}}function l(e,t,n){var r=e[t==null?e.length-1:t-1];if(!(!r||r.type!==`ContentStatement`||!n&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,``),r.leftStripped=r.value!==i,r.leftStripped}}e.default=a,t.exports=e.default})),V=e((e=>{e.__esModule=!0,e.SourceLocation=a,e.id=o,e.stripFlags=s,e.stripComment=c,e.preparePath=l,e.prepareMustache=u,e.prepareRawBlock=d,e.prepareBlock=f,e.prepareProgram=p,e.preparePartialBlock=m;function t(e){return e&&e.__esModule?e:{default:e}}var n=b(),r=t(n);function i(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var n={loc:e.path.loc};throw new r.default(e.path.original+` doesn't match `+t,n)}}function a(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function o(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function s(e,t){return{open:e.charAt(2)===`~`,close:t.charAt(t.length-3)===`~`}}function c(e){return e.replace(/^\{\{~?!-?-?/,``).replace(/-?-?~?\}\}$/,``)}function l(e,t,n){n=this.locInfo(n);for(var i=e?`@`:``,a=[],o=0,s=0,c=t.length;s<c;s++){var l=t[s].part,u=t[s].original!==l;if(i+=(t[s].separator||``)+l,!u&&(l===`..`||l===`.`||l===`this`)){if(a.length>0)throw new r.default(`Invalid path: `+i,{loc:n});l===`..`&&o++}else a.push(l)}return{type:`PathExpression`,data:e,depth:o,parts:a,original:i,loc:n}}function u(e,t,n,r,i,a){var o=r.charAt(3)||r.charAt(2),s=o!==`{`&&o!==`&`;return{type:/\*/.test(r)?`Decorator`:`MustacheStatement`,path:e,params:t,hash:n,escaped:s,strip:i,loc:this.locInfo(a)}}function d(e,t,n,r){i(e,n),r=this.locInfo(r);var a={type:`Program`,body:t,strip:{},loc:r};return{type:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:a,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function f(e,t,n,a,o,s){a&&a.path&&i(e,a);var c=/\*/.test(e.open);t.blockParams=e.blockParams;var l=void 0,u=void 0;if(n){if(c)throw new r.default(`Unexpected inverse block on decorator`,n);n.chain&&(n.program.body[0].closeStrip=a.strip),u=n.strip,l=n.program}return o&&(o=l,l=t,t=o),{type:c?`DecoratorBlock`:`BlockStatement`,path:e.path,params:e.params,hash:e.hash,program:t,inverse:l,openStrip:e.strip,inverseStrip:u,closeStrip:a&&a.strip,loc:this.locInfo(s)}}function p(e,t){if(!t&&e.length){var n=e[0].loc,r=e[e.length-1].loc;n&&r&&(t={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:`Program`,body:e,strip:{},loc:t}}function m(e,t,n,r){return i(e,n),{type:`PartialBlockStatement`,name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}})),H=e((e=>{e.__esModule=!0,e.parseWithoutProcessing=d,e.parse=f;function t(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function n(e){return e&&e.__esModule?e:{default:e}}var r=ne(),i=n(r),a=B(),o=n(a),s=V(),c=t(s),l=y();e.parser=i.default;var u={};l.extend(u,c);function d(e,t){return e.type===`Program`?e:(i.default.yy=u,u.locInfo=function(e){return new u.SourceLocation(t&&t.srcName,e)},i.default.parse(e))}function f(e,t){var n=d(e,t);return new o.default(t).accept(n)}})),U=e((e=>{e.__esModule=!0,e.Compiler=c,e.precompile=l,e.compile=u;function t(e){return e&&e.__esModule?e:{default:e}}var n=b(),r=t(n),i=y(),a=R(),o=t(a),s=[].slice;function c(){}c.prototype={compiler:c,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],i=e.opcodes[n];if(r.opcode!==i.opcode||!d(r.args,i.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=i.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler().compile(e,this.options),n=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[n]=t,this.useDepths=this.useDepths||t.useDepths,n},accept:function(e){if(!this[e.type])throw new r.default(`Unknown type: `+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){f(e);var t=e.program,n=e.inverse;t&&=this.compileProgram(t),n&&=this.compileProgram(n);var r=this.classifySexpr(e);r===`helper`?this.helperSexpr(e,t,n):r===`simple`?(this.simpleSexpr(e),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`blockValue`,e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),this.opcode(`emptyHash`),this.opcode(`ambiguousBlockValue`)),this.opcode(`append`)},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode(`registerDecorator`,n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&=this.compileProgram(e.program);var n=e.params;if(n.length>1)throw new r.default(`Unsupported number of partial arguments: `+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode(`pushLiteral`,`undefined`):n.push({type:`PathExpression`,parts:[],depth:0}));var i=e.name.original,a=e.name.type===`SubExpression`;a&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||``;this.options.preventIndent&&o&&(this.opcode(`appendContent`,o),o=``),this.opcode(`invokePartial`,a,i,o),this.opcode(`append`)},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode(`appendEscaped`):this.opcode(`append`)},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode(`appendContent`,e.value)},CommentStatement:function(){},SubExpression:function(e){f(e);var t=this.classifySexpr(e);t===`simple`?this.simpleSexpr(e):t===`helper`?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,i=r.parts[0],a=t!=null||n!=null;this.opcode(`getContext`,r.depth),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),r.strict=!0,this.accept(r),this.opcode(`invokeAmbiguous`,i,a)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode(`resolvePossibleLambda`)},helperSexpr:function(e,t,n){var i=this.setupFullMustacheParams(e,t,n),a=e.path,s=a.parts[0];if(this.options.knownHelpers[s])this.opcode(`invokeKnownHelper`,i.length,s);else if(this.options.knownHelpersOnly)throw new r.default(`You specified knownHelpersOnly, but used the unknown helper `+s,e);else a.strict=!0,a.falsy=!0,this.accept(a),this.opcode(`invokeHelper`,i.length,a.original,o.default.helpers.simpleId(a))},PathExpression:function(e){this.addDepth(e.depth),this.opcode(`getContext`,e.depth);var t=e.parts[0],n=o.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode(`lookupBlockParam`,r,e.parts):t?e.data?(this.options.data=!0,this.opcode(`lookupData`,e.depth,e.parts,e.strict)):this.opcode(`lookupOnContext`,e.parts,e.falsy,e.strict,n):this.opcode(`pushContext`)},StringLiteral:function(e){this.opcode(`pushString`,e.value)},NumberLiteral:function(e){this.opcode(`pushLiteral`,e.value)},BooleanLiteral:function(e){this.opcode(`pushLiteral`,e.value)},UndefinedLiteral:function(){this.opcode(`pushLiteral`,`undefined`)},NullLiteral:function(){this.opcode(`pushLiteral`,`null`)},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode(`pushHash`);n<r;n++)this.pushParam(t[n].value);for(;n--;)this.opcode(`assignToHash`,t[n].key);this.opcode(`popHash`)},opcode:function(e){this.opcodes.push({opcode:e,args:s.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=o.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&o.default.helpers.helperExpression(e),i=!n&&(r||t);if(i&&!r){var a=e.path.parts[0],s=this.options;s.knownHelpers[a]?r=!0:s.knownHelpersOnly&&(i=!1)}return r?`helper`:i?`ambiguous`:`simple`},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value==null?e.original||``:e.value;if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,``).replace(/\//g,`.`)),e.depth&&this.addDepth(e.depth),this.opcode(`getContext`,e.depth||0),this.opcode(`pushStringParam`,t,e.type),e.type===`SubExpression`&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!o.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(`.`);this.opcode(`pushId`,`BlockParam`,n,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,``).replace(/^\.\//,``).replace(/^\.$/,``)),this.opcode(`pushId`,e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var i=e.params;return this.pushParams(i),this.opcode(`pushProgram`,t),this.opcode(`pushProgram`,n),e.hash?this.accept(e.hash):this.opcode(`emptyHash`,r),i},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var r=this.options.blockParams[t],a=r&&i.indexOf(r,e);if(r&&a>=0)return[t,a]}}};function l(e,t,n){if(e==null||typeof e!=`string`&&e.type!==`Program`)throw new r.default(`You must pass a string or Handlebars AST to Handlebars.precompile. You passed `+e);t||={},`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=n.parse(e,t),a=new n.Compiler().compile(i,t);return new n.JavaScriptCompiler().compile(a,t)}function u(e,t,n){if(t===void 0&&(t={}),e==null||typeof e!=`string`&&e.type!==`Program`)throw new r.default(`You must pass a string or Handlebars AST to Handlebars.compile. You passed `+e);t=i.extend({},t),`data`in t||(t.data=!0),t.compat&&(t.useDepths=!0);var a=void 0;function o(){var r=n.parse(e,t),i=new n.Compiler().compile(r,t),a=new n.JavaScriptCompiler().compile(i,t,void 0,!0);return n.template(a)}function s(e,t){return a||=o(),a.call(this,e,t)}return s._setup=function(e){return a||=o(),a._setup(e)},s._child=function(e,t,n,r){return a||=o(),a._child(e,t,n,r)},s}function d(e,t){if(e===t)return!0;if(i.isArray(e)&&i.isArray(t)&&e.length===t.length){for(var n=0;n<e.length;n++)if(!d(e[n],t[n]))return!1;return!0}}function f(e){if(!e.path.parts){var t=e.path;e.path={type:`PathExpression`,data:!1,depth:0,parts:[t.original+``],original:t.original+``,loc:t.loc}}}})),W=e((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}})),G=e((e=>{var t=W(),n=5,r=1<<n,i=r-1,a=r;function o(e){return e<0?(-e<<1)+1:(e<<1)+0}function s(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var r=``,s,c=o(e);do s=c&i,c>>>=n,c>0&&(s|=a),r+=t.encode(s);while(c>0);return r},e.decode=function(e,r,o){var c=e.length,l=0,u=0,d,f;do{if(r>=c)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=t.decode(e.charCodeAt(r++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(r-1));d=!!(f&a),f&=i,l+=f<<u,u+=n}while(d);o.value=s(l),o.rest=r}})),K=e((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;function o(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=n.split(/\/+/),c,l=0,u=s.length-1;u>=0;u--)c=s[u],c===`.`?s.splice(u,1):c===`..`?l++:l>0&&(c===``?(s.splice(u+1,l),l=0):(s.splice(u,2),l--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n}e.normalize=o;function s(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),s=i(e);if(s&&(e=s.path||`/`),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c=t.charAt(0)===`/`?t:o(e.replace(/\/+$/,``)+`/`+t);return s?(s.path=c,a(s)):c}e.join=s,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function c(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=c;var l=function(){return!(`__proto__`in Object.create(null))}();function u(e){return e}function d(e){return p(e)?`$`+e:e}e.toSetString=l?u:d;function f(e){return p(e)?e.slice(1):e}e.fromSetString=l?u:f;function p(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function m(e,t,n){var r=g(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:g(e.name,t.name)}e.compareByOriginalPositions=m;function h(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=g(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:g(e.name,t.name)}e.compareByGeneratedPositionsDeflated=h;function g(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=g(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:g(e.name,t.name)}e.compareByGeneratedPositionsInflated=_;function v(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=v;function y(e,t,n){if(t||=``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var c=r.path.lastIndexOf(`/`);c>=0&&(r.path=r.path.substring(0,c+1))}t=s(a(r),t)}return o(t)}e.computeSourceURL=y})),q=e((e=>{var t=K(),n=Object.prototype.hasOwnProperty,r=typeof Map<`u`;function i(){this._array=[],this._set=r?new Map:Object.create(null)}i.fromArray=function(e,t){for(var n=new i,r=0,a=e.length;r<a;r++)n.add(e[r],t);return n},i.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(e,i){var a=r?e:t.toSetString(e),o=r?this.has(e):n.call(this._set,a),s=this._array.length;(!o||i)&&this._array.push(e),o||(r?this._set.set(e,s):this._set[a]=s)},i.prototype.has=function(e){if(r)return this._set.has(e);var i=t.toSetString(e);return n.call(this._set,i)},i.prototype.indexOf=function(e){if(r){var i=this._set.get(e);if(i>=0)return i}else{var a=t.toSetString(e);if(n.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},i.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),J=e((e=>{var t=K();function n(e,n){var r=e.generatedLine,i=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return i>r||i==r&&o>=a||t.compareByGeneratedPositionsInflated(e,n)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||=(this._array.sort(t.compareByGeneratedPositionsInflated),!0),this._array},e.MappingList=r})),Y=e((e=>{var t=G(),n=K(),r=q().ArraySet,i=J().MappingList;function a(e){e||={},this._file=n.getArg(e,`file`,null),this._sourceRoot=n.getArg(e,`sourceRoot`,null),this._skipValidation=n.getArg(e,`skipValidation`,!1),this._sources=new r,this._names=new r,this._mappings=new i,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,r=new a({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var i={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(i.source=e.source,t!=null&&(i.source=n.relative(t,i.source)),i.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(i.name=e.name)),r.addMapping(i)}),e.sources.forEach(function(i){var a=i;t!==null&&(a=n.relative(t,i)),r._sources.has(a)||r._sources.add(a);var o=e.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r},a.prototype.addMapping=function(e){var t=n.getArg(e,`generated`),r=n.getArg(e,`original`,null),i=n.getArg(e,`source`,null),a=n.getArg(e,`name`,null);this._skipValidation||this._validateMapping(t,r,i,a),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:a})},a.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=n.relative(this._sourceRoot,r)),t==null?this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||=Object.create(null),this._sourcesContents[n.toSetString(r)]=t)},a.prototype.applySourceMap=function(e,t,i){var a=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);a=e.file}var o=this._sourceRoot;o!=null&&(a=n.relative(o,a));var s=new r,c=new r;this._mappings.unsortedForEach(function(t){if(t.source===a&&t.originalLine!=null){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});r.source!=null&&(t.source=r.source,i!=null&&(t.source=n.join(i,t.source)),o!=null&&(t.source=n.relative(o,t.source)),t.originalLine=r.line,t.originalColumn=r.column,r.name!=null&&(t.name=r.name))}var l=t.source;l!=null&&!s.has(l)&&s.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=s,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(i!=null&&(t=n.join(i,t)),o!=null&&(t=n.relative(o,t)),this.setSourceContent(t,r))},this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`)throw Error(`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`);if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw Error(`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,a=0,o=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=`;`,r++;else if(m>0){if(!n.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=t.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=t.encode(f-s),s=f,l+=t.encode(u.originalLine-1-a),a=u.originalLine-1,l+=t.encode(u.originalColumn-i),i=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=t.encode(d-o),o=d)),c+=l}return c},a.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=a})),X=e((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}})),re=e((e=>{function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}e.quickSort=function(e,t){r(e,t,0,e.length-1)}})),ie=e((e=>{var t=K(),n=X(),r=q().ArraySet,i=G(),a=re().quickSort;function o(e,n){var r=e;return typeof e==`string`&&(r=t.parseSourceMapInput(e)),r.sections==null?new s(r,n):new l(r,n)}o.fromSourceMap=function(e,t){return s.fromSourceMap(e,t)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,`_generatedMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,`_originalMappings`,{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},o.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(e,n,r){var i=n||null,a=r||o.GENERATED_ORDER,s;switch(a){case o.GENERATED_ORDER:s=this._generatedMappings;break;case o.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}var c=this.sourceRoot;s.map(function(e){var n=e.source===null?null:this._sources.at(e.source);return n=t.computeSourceURL(c,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,i)},o.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,`line`),i={source:t.getArg(e,`source`),originalLine:r,originalColumn:t.getArg(e,`column`,0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],o=this._findMapping(i,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,n.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var c=s.originalLine;s&&s.originalLine===c;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)a.push({line:t.getArg(s,`generatedLine`,null),column:t.getArg(s,`generatedColumn`,null),lastColumn:t.getArg(s,`lastGeneratedColumn`,null)}),s=this._originalMappings[++o]}return a},e.SourceMapConsumer=o;function s(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),o=t.getArg(i,`sources`),s=t.getArg(i,`names`,[]),c=t.getArg(i,`sourceRoot`,null),l=t.getArg(i,`sourcesContent`,null),u=t.getArg(i,`mappings`),d=t.getArg(i,`file`,null);if(a!=this._version)throw Error(`Unsupported version: `+a);c&&=t.normalize(c),o=o.map(String).map(t.normalize).map(function(e){return c&&t.isAbsolute(c)&&t.isAbsolute(e)?t.relative(c,e):e}),this._names=r.fromArray(s.map(String),!0),this._sources=r.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(c,e,n)}),this.sourceRoot=c,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=n,this.file=d}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.prototype._findSourceIndex=function(e){var n=e;if(this.sourceRoot!=null&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},s.fromSourceMap=function(e,n){var i=Object.create(s.prototype),o=i._names=r.fromArray(e._names.toArray(),!0),l=i._sources=r.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=n,i._absoluteSources=i._sources.toArray().map(function(e){return t.computeSourceURL(i.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),d=i.__generatedMappings=[],f=i.__originalMappings=[],p=0,m=u.length;p<m;p++){var h=u[p],g=new c;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=l.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),f.push(g)),d.push(g)}return a(i.__originalMappings,t.compareByOriginalPositions),i},s.prototype._version=3,Object.defineProperty(s.prototype,`sources`,{get:function(){return this._absoluteSources.slice()}});function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(e,n){for(var r=1,o=0,s=0,l=0,u=0,d=0,f=e.length,p=0,m={},h={},g=[],_=[],v,y,b,x,S;p<f;)if(e.charAt(p)===`;`)r++,p++,o=0;else if(e.charAt(p)===`,`)p++;else{for(v=new c,v.generatedLine=r,x=p;x<f&&!this._charIsMappingSeparator(e,x);x++);if(y=e.slice(p,x),b=m[y],b)p+=y.length;else{for(b=[];p<x;)i.decode(e,p,h),S=h.value,p=h.rest,b.push(S);if(b.length===2)throw Error(`Found a source, but no line and column`);if(b.length===3)throw Error(`Found a source and line, but no column`);m[y]=b}v.generatedColumn=o+b[0],o=v.generatedColumn,b.length>1&&(v.source=u+b[1],u+=b[1],v.originalLine=s+b[2],s=v.originalLine,v.originalLine+=1,v.originalColumn=l+b[3],l=v.originalColumn,b.length>4&&(v.name=d+b[4],d+=b[4])),_.push(v),typeof v.originalLine==`number`&&g.push(v)}a(_,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,a(g,t.compareByOriginalPositions),this.__originalMappings=g},s.prototype._findMapping=function(e,t,r,i,a,o){if(e[r]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[r]);if(e[i]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[i]);return n.search(e,t,a,o)},s.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},r=this._findMapping(n,this._generatedMappings,`generatedLine`,`generatedColumn`,t.compareByGeneratedPositionsDeflated,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===n.generatedLine){var a=t.getArg(i,`source`,null);a!==null&&(a=this._sources.at(a),a=t.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var s=t.getArg(i,`name`,null);return s!==null&&(s=this._names.at(s)),{source:a,line:t.getArg(i,`originalLine`,null),column:t.getArg(i,`originalColumn`,null),name:s}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},s.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=t.relative(this.sourceRoot,i));var a;if(this.sourceRoot!=null&&(a=t.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,``);if(a.scheme==`file`&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!a.path||a.path==`/`)&&this._sources.has(`/`+i))return this.sourcesContent[this._sources.indexOf(`/`+i)]}if(n)return null;throw Error(`"`+i+`" is not in the SourceMap.`)},s.prototype.generatedPositionFor=function(e){var n=t.getArg(e,`source`);if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:t.getArg(e,`line`),originalColumn:t.getArg(e,`column`)},i=this._findMapping(r,this._originalMappings,`originalLine`,`originalColumn`,t.compareByOriginalPositions,t.getArg(e,`bias`,o.GREATEST_LOWER_BOUND));if(i>=0){var a=this._originalMappings[i];if(a.source===r.source)return{line:t.getArg(a,`generatedLine`,null),column:t.getArg(a,`generatedColumn`,null),lastColumn:t.getArg(a,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=s;function l(e,n){var i=e;typeof e==`string`&&(i=t.parseSourceMapInput(e));var a=t.getArg(i,`version`),s=t.getArg(i,`sections`);if(a!=this._version)throw Error(`Unsupported version: `+a);this._sources=new r,this._names=new r;var c={line:-1,column:0};this._sections=s.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var r=t.getArg(e,`offset`),i=t.getArg(r,`line`),a=t.getArg(r,`column`);if(i<c.line||i===c.line&&a<c.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return c=r,{generatedOffset:{generatedLine:i+1,generatedColumn:a+1},consumer:new o(t.getArg(e,`map`),n)}})}l.prototype=Object.create(o.prototype),l.prototype.constructor=o,l.prototype._version=3,Object.defineProperty(l.prototype,`sources`,{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),l.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,`line`),generatedColumn:t.getArg(e,`column`)},i=n.search(r,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:r.generatedLine-(a.generatedOffset.generatedLine-1),column:r.generatedColumn-(a.generatedOffset.generatedLine===r.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},l.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(t.getArg(e,`source`))!==-1){var i=r.consumer.generatedPositionFor(e);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},l.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var c=o[s],l=i.consumer._sources.at(c.source);l=t.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;c.name&&(u=i.consumer._names.at(c.name),this._names.add(u),u=this._names.indexOf(u));var d={source:l,generatedLine:c.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:c.generatedColumn+(i.generatedOffset.generatedLine===c.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:c.originalLine,originalColumn:c.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}a(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),a(this.__originalMappings,t.compareByOriginalPositions)},e.IndexedSourceMapConsumer=l})),ae=e((e=>{var t=Y().SourceMapGenerator,n=K(),r=/(\r?\n)/,i=10,a=`$$$isSourceNode$$$`;function o(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[a]=!0,r!=null&&this.add(r)}o.fromStringWithSourceMap=function(e,t,i){var a=new o,s=e.split(r),c=0,l=function(){var e=n(),t=n()||``;return e+t;function n(){return c<s.length?s[c++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null)if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=s[c]||``,n=t.substr(0,e.generatedColumn-d);s[c]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}for(;u<e.generatedLine;)a.add(l()),u++;if(d<e.generatedColumn){var t=s[c]||``;a.add(t.substr(0,e.generatedColumn)),s[c]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),c<s.length&&(f&&p(f,l()),a.add(s.splice(c).join(``))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);r!=null&&(i!=null&&(e=n.join(i,e)),a.setSourceContent(e,r))}),a;function p(e,t){if(e===null||e.source===void 0)a.add(t);else{var r=i?n.join(i,e.source):e.source;a.add(new o(e.originalLine,e.originalColumn,r,t,e.name))}}},o.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[a]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},o.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[a]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},o.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},o.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},o.prototype.setSourceContent=function(e,t){this.sourceContents[n.toSetString(e)]=t},o.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(n.fromSetString(i[t]),this.sourceContents[i[t]])},o.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},o.prototype.toStringWithSourceMap=function(e){var n={code:``,line:1,column:0},r=new t(e),a=!1,o=null,s=null,c=null,l=null;return this.walk(function(e,t){n.code+=e,t.source!==null&&t.line!==null&&t.column!==null?((o!==t.source||s!==t.line||c!==t.column||l!==t.name)&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),o=t.source,s=t.line,c=t.column,l=t.name,a=!0):a&&=(r.addMapping({generated:{line:n.line,column:n.column}}),o=null,!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===i?(n.line++,n.column=0,u+1===d?(o=null,a=!1):a&&r.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:n.code,map:r}},e.SourceNode=o})),oe=e((e=>{e.SourceMapGenerator=Y().SourceMapGenerator,e.SourceMapConsumer=ie().SourceMapConsumer,e.SourceNode=ae().SourceNode})),se=e(((e,t)=>{e.__esModule=!0;var n=y(),r=void 0;try{(typeof define!=`function`||!define.amd)&&(r=oe().SourceNode)}catch{}r||(r=function(e,t,n,r){this.src=``,r&&this.add(r)},r.prototype={add:function(e){n.isArray(e)&&(e=e.join(``)),this.src+=e},prepend:function(e){n.isArray(e)&&(e=e.join(``)),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function i(e,t,r){if(n.isArray(e)){for(var i=[],a=0,o=e.length;a<o;a++)i.push(t.wrap(e[a],r));return i}else if(typeof e==`boolean`||typeof e==`number`)return e+``;return e}function a(e){this.srcFile=e,this.source=[]}a.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([` `,t,`
10
+ `])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new r(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof r?e:(e=i(e,this,t),new r(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?`.`+t+`(`:`(`,n,`)`])},quotedString:function(e){return`"`+(e+``).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)+`"`},objectLiteral:function(e){var t=this,n=[];Object.keys(e).forEach(function(r){var a=i(e[r],t);a!==`undefined`&&n.push([t.quotedString(r),`:`,a])});var r=this.generateList(n);return r.prepend(`{`),r.add(`}`),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(`,`),t.add(i(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend(`[`),t.add(`]`),t}},e.default=a,t.exports=e.default})),ce=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=N(),i=b(),a=n(i),o=y(),s=se(),c=n(s);function l(e){this.value=e}function u(){}u.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable(`container.lookup`),`(depths, `,JSON.stringify(e),`)`]},compilerInfo:function(){var e=r.COMPILER_REVISION,t=r.REVISION_CHANGES[e];return[e,t]},appendToBuffer:function(e,t,n){return o.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?[`return `,e,`;`]:n?[`buffer += `,e,`;`]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString(``)},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,[`lookupProperty(`,e,`,`,JSON.stringify(t),`)`]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var i=e.opcodes,o=void 0,s=void 0,c=void 0,l=void 0;for(c=0,l=i.length;c<l;c++)o=i[c],this.source.currentLocation=o.loc,s||=o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=s,this.pushSource(``),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new a.default(`Compile completed with content left on stack`);this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend([`var decorators = container.decorators, `,this.lookupPropertyFunctionVarDeclaration(),`;
11
+ `]),this.decorators.push(`return fn;`),r?this.decorators=Function.apply(this,[`fn`,`props`,`container`,`depth0`,`data`,`blockParams`,`depths`,this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
12
+ `),this.decorators.push(`}
13
+ `),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(r);if(this.isChild)return u;var d={compiler:this.compilerInfo(),main:u};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var f=this.context,p=f.programs,m=f.decorators;for(c=0,l=p.length;c<l;c++)p[c]&&(d[c]=p[c],m[c]&&(d[c+`_d`]=m[c],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),r?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),t.srcName?(d=d.toStringWithSourceMap({file:t.destName}),d.map=d.map&&d.map.toString()):d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new c.default(this.options.srcName),this.decorators=new c.default(this.options.srcName)},createFunctionContext:function(e){var t=this,n=``,r=this.stackVars.concat(this.registers.list);r.length>0&&(n+=`, `+r.join(`, `));var i=0;Object.keys(this.aliases).forEach(function(e){var r=t.aliases[e];r.children&&r.referenceCount>1&&(n+=`, alias`+ ++i+`=`+e,r.children[0]=`alias`+i)}),this.lookupPropertyFunctionIsUsed&&(n+=`, `+this.lookupPropertyFunctionVarDeclaration());var a=[`container`,`depth0`,`helpers`,`partials`,`data`];(this.useBlockParams||this.useDepths)&&a.push(`blockParams`),this.useDepths&&a.push(`depths`);var o=this.mergeSource(n);return e?(a.push(o),Function.apply(this,a)):this.source.wrap([`function(`,a.join(`,`),`) {
14
+ `,o,`}`])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,i=void 0,a=void 0,o=void 0;return this.source.each(function(e){e.appendToBuffer?(a?e.prepend(` + `):a=e,o=e):(a&&=(i?a.prepend(`buffer += `):r=!0,o.add(`;`),o=void 0),i=!0,t||(n=!1))}),n?a?(a.prepend(`return `),o.add(`;`)):i||this.source.push(`return "";`):(e+=`, buffer = `+(r?``:this.initializeBuffer()),a?(a.prepend(`return buffer + `),o.add(`;`)):this.source.push(`return buffer;`)),e&&this.source.prepend(`var `+e.substring(2)+(r?``:`;
15
+ `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`lookupProperty = container.lookupProperty || function(parent, propertyName) {
16
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
17
+ return parent[propertyName];
18
+ }
19
+ return undefined
20
+ }`},blockValue:function(e){var t=this.aliasable(`container.hooks.blockHelperMissing`),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,`call`,n))},ambiguousBlockValue:function(){var e=this.aliasable(`container.hooks.blockHelperMissing`),t=[this.contextName(0)];this.setupHelperArgs(``,0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource([`if (!`,this.lastHelper,`) { `,n,` = `,this.source.functionCall(e,`call`,t),`}`])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(e){return[` != null ? `,e,` : ""`]}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource([`if (`,e,` != null) { `,this.appendToBuffer(e,void 0,!0),` }`]),this.environment.isSimple&&this.pushSource([`else { `,this.appendToBuffer(`''`,void 0,!0),` }`])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable(`container.escapeExpression`),`(`,this.popStack(),`)`]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var i=0;!r&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath(`context`,e,i,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push([`blockParams[`,e[0],`][`,e[1],`]`]),this.resolvePath(`context`,t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral(`container.data(data, `+e+`)`):this.pushStackLiteral(`data`),this.resolvePath(`data`,t,0,!0,n)},resolvePath:function(e,t,n,r,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(d(this.options.strict&&i,this,t,n,e));return}for(var o=t.length;n<o;n++)this.replaceStack(function(i){var o=a.nameLookup(i,t[n],e);return r?[` && `,o]:[` != null ? `,o,` : `,i]})},resolvePossibleLambda:function(){this.push([this.aliasable(`container.lambda`),`(`,this.popStack(),`, `,this.contextName(0),`)`])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!==`SubExpression`&&(typeof e==`string`?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push(`{}`),this.stringParams&&(this.push(`{}`),this.push(`{}`)),this.pushStackLiteral(e?`undefined`:`{}`)},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e==null?this.pushStackLiteral(null):this.pushStackLiteral(this.programExpression(e))},registerDecorator:function(e,t){var n=this.nameLookup(`decorators`,t,`decorator`),r=this.setupHelperArgs(t,e);this.decorators.push([`fn = `,this.decorators.functionCall(n,``,[`fn`,`props`,`container`,r]),` || fn;`])},invokeHelper:function(e,t,n){var r=this.popStack(),i=this.setupHelper(e,t),a=[];n&&a.push(i.name),a.push(r),this.options.strict||a.push(this.aliasable(`container.hooks.helperMissing`));var o=[`(`,this.itemsSeparatedBy(a,`||`),`)`],s=this.source.functionCall(o,`call`,i.callParams);this.push(s)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,`call`,n.callParams))},invokeAmbiguous:function(e,t){this.useRegister(`helper`);var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),i=[`(`,`(helper = `,this.lastHelper=this.nameLookup(`helpers`,e,`helper`),` || `,n,`)`];this.options.strict||(i[0]=`(helper = `,i.push(` != null ? helper : `,this.aliasable(`container.hooks.helperMissing`))),this.push([`(`,i,r.paramsInit?[`),(`,r.paramsInit]:[],`),`,`(typeof helper === `,this.aliasable(`"function"`),` ? `,this.source.functionCall(`helper`,`call`,r.callParams),` : helper))`])},invokePartial:function(e,t,n){var r=[],i=this.setupParams(t,1,r);e&&(t=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers=`helpers`,i.partials=`partials`,i.decorators=`container.decorators`,e?r.unshift(t):r.unshift(this.nameLookup(`partials`,t,`partial`)),this.options.compat&&(i.depths=`depths`),i=this.objectLiteral(i),r.push(i),this.push(this.source.functionCall(`container.invokePartial`,``,r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var a=this.hash;n&&(a.contexts[e]=n),r&&(a.types[e]=r),i&&(a.ids[e]=i),a.values[e]=t},pushId:function(e,t,n){e===`BlockParam`?this.pushStackLiteral(`blockParams[`+t[0]+`].path[`+t[1]+`]`+(n?` + `+JSON.stringify(`.`+n):``)):e===`PathExpression`?this.pushString(t):e===`SubExpression`?this.pushStackLiteral(`true`):this.pushStackLiteral(`null`)},compiler:u,compileChildren:function(e,t){for(var n=e.children,r=void 0,i=void 0,a=0,o=n.length;a<o;a++){r=n[a],i=new this.compiler;var s=this.matchExistingProgram(r);if(s==null){this.context.programs.push(``);var c=this.context.programs.length;r.index=c,r.name=`program`+c,this.context.programs[c]=i.compile(r,t,this.context,!this.precompile),this.context.decorators[c]=i.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=s.index,r.name=`program`+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,`data`,t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push(`blockParams`),this.useDepths&&n.push(`depths`),`container.program(`+n.join(`, `)+`)`},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof l||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new l(e))},pushSource:function(e){this.pendingContent&&=(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),void 0),e&&this.source.push(e)},replaceStack:function(e){var t=[`(`],n=void 0,r=void 0,i=void 0;if(!this.isInline())throw new a.default(`replaceStack on non-inline`);var o=this.popStack(!0);if(o instanceof l)n=[o.value],t=[`(`,n],i=!0;else{r=!0;var s=this.incrStack();t=[`((`,this.push(s),` = `,o,`)`],n=this.topStack()}var c=e.call(this,n);i||this.popStack(),r&&this.stackSlot--,this.push(t.concat(c,`)`))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push(`stack`+this.stackSlot),this.topStackName()},topStackName:function(){return`stack`+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r instanceof l)this.compileStack.push(r);else{var i=this.incrStack();this.pushSource([i,` = `,r,`;`]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof l)return n.value;if(!t){if(!this.stackSlot)throw new a.default(`Invalid stack pop`);this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof l?t.value:t},contextName:function(e){return this.useDepths&&e?`depths[`+e+`]`:`depth`+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[],i=this.setupHelperArgs(t,e,r,n),a=this.nameLookup(`helpers`,t,`helper`),o=this.aliasable(this.contextName(0)+` != null ? `+this.contextName(0)+` : (container.nullContext || {})`);return{params:r,paramsInit:i,name:a,callParams:[o].concat(r)}},setupParams:function(e,t,n){var r={},i=[],a=[],o=[],s=!n,c=void 0;s&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var l=this.popStack(),u=this.popStack();(u||l)&&(r.fn=u||`container.noop`,r.inverse=l||`container.noop`);for(var d=t;d--;)c=this.popStack(),n[d]=c,this.trackIds&&(o[d]=this.popStack()),this.stringParams&&(a[d]=this.popStack(),i[d]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(o)),this.stringParams&&(r.types=this.source.generateArray(a),r.contexts=this.source.generateArray(i)),this.options.data&&(r.data=`data`),this.useBlockParams&&(r.blockParams=`blockParams`),r},setupHelperArgs:function(e,t,n,r){var i=this.setupParams(e,t,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),r?(this.useRegister(`options`),n.push(`options`),[`options=`,i]):n?(n.push(i),``):i}},(function(){for(var e=`break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false`.split(` `),t=u.RESERVED_WORDS={},n=0,r=e.length;n<r;n++)t[e[n]]=!0})(),u.isValidJavaScriptVariableName=function(e){return!u.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function d(e,t,n,r,i){var a=t.popStack(),o=n.length;for(e&&o--;r<o;r++)a=t.nameLookup(a,n[r],i);return e?[t.aliasable(`container.strict`),`(`,a,`, `,t.quotedString(n[r]),`, `,JSON.stringify(t.source.currentLocation),` )`]:a}e.default=u,t.exports=e.default})),Z=e(((e,t)=>{e.__esModule=!0;function n(e){return e&&e.__esModule?e:{default:e}}var r=te(),i=n(r),a=R(),o=n(a),s=H(),c=U(),l=ce(),u=n(l),d=z(),f=n(d),p=L(),m=n(p),h=i.default.create;function g(){var e=h();return e.compile=function(t,n){return c.compile(t,n,e)},e.precompile=function(t,n){return c.precompile(t,n,e)},e.AST=o.default,e.Compiler=c.Compiler,e.JavaScriptCompiler=u.default,e.Parser=s.parser,e.parse=s.parse,e.parseWithoutProcessing=s.parseWithoutProcessing,e}var _=g();_.create=g,m.default(_),_.Visitor=f.default,_.default=_,e.default=_,t.exports=e.default})),le=e((e=>{e.__esModule=!0,e.print=i,e.PrintVisitor=a;function t(e){return e&&e.__esModule?e:{default:e}}var n=z(),r=t(n);function i(e){return new a().accept(e)}function a(){this.padding=0}a.prototype=new r.default,a.prototype.pad=function(e){for(var t=``,n=0,r=this.padding;n<r;n++)t+=` `;return t+=e+`
21
+ `,t},a.prototype.Program=function(e){var t=``,n=e.body,r=void 0,i=void 0;if(e.blockParams){var a=`BLOCK PARAMS: [`;for(r=0,i=e.blockParams.length;r<i;r++)a+=` `+e.blockParams[r];a+=` ]`,t+=this.pad(a)}for(r=0,i=n.length;r<i;r++)t+=this.accept(n[r]);return this.padding--,t},a.prototype.MustacheStatement=function(e){return this.pad(`{{ `+this.SubExpression(e)+` }}`)},a.prototype.Decorator=function(e){return this.pad(`{{ DIRECTIVE `+this.SubExpression(e)+` }}`)},a.prototype.BlockStatement=a.prototype.DecoratorBlock=function(e){var t=``;return t+=this.pad((e.type===`DecoratorBlock`?`DIRECTIVE `:``)+`BLOCK:`),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad(`PROGRAM:`),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad(`{{^}}`),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t},a.prototype.PartialStatement=function(e){var t=`PARTIAL:`+e.name.original;return e.params[0]&&(t+=` `+this.accept(e.params[0])),e.hash&&(t+=` `+this.accept(e.hash)),this.pad(`{{> `+t+` }}`)},a.prototype.PartialBlockStatement=function(e){var t=`PARTIAL BLOCK:`+e.name.original;return e.params[0]&&(t+=` `+this.accept(e.params[0])),e.hash&&(t+=` `+this.accept(e.hash)),t+=` `+this.pad(`PROGRAM:`),this.padding++,t+=this.accept(e.program),this.padding--,this.pad(`{{> `+t+` }}`)},a.prototype.ContentStatement=function(e){return this.pad(`CONTENT[ '`+e.value+`' ]`)},a.prototype.CommentStatement=function(e){return this.pad(`{{! '`+e.value+`' }}`)},a.prototype.SubExpression=function(e){for(var t=e.params,n=[],r=void 0,i=0,a=t.length;i<a;i++)n.push(this.accept(t[i]));return t=`[`+n.join(`, `)+`]`,r=e.hash?` `+this.accept(e.hash):``,this.accept(e.path)+` `+t+r},a.prototype.PathExpression=function(e){var t=e.parts.join(`/`);return(e.data?`@`:``)+`PATH:`+t},a.prototype.StringLiteral=function(e){return`"`+e.value+`"`},a.prototype.NumberLiteral=function(e){return`NUMBER{`+e.value+`}`},a.prototype.BooleanLiteral=function(e){return`BOOLEAN{`+e.value+`}`},a.prototype.UndefinedLiteral=function(){return`UNDEFINED`},a.prototype.NullLiteral=function(){return`NULL`},a.prototype.Hash=function(e){for(var t=e.pairs,n=[],r=0,i=t.length;r<i;r++)n.push(this.accept(t[r]));return`HASH{`+n.join(`, `)+`}`},a.prototype.HashPair=function(e){return e.key+`=`+this.accept(e.value)}})),Q=n(e(((e,n)=>{var r=Z().default,i=le();r.PrintVisitor=i.PrintVisitor,r.print=i.print,n.exports=r;function a(e,n){var i=t(`fs`).readFileSync(n,`utf8`);e.exports=r.compile(i)}t!==void 0&&t.extensions&&(t.extensions[`.handlebars`]=a,t.extensions[`.hbs`]=a)}))(),1);function $(e,t){let n=f[e],r={};Q.default.registerHelper(`eq`,(e,t)=>e===t),Q.default.registerHelper(`hasEnvVar`,(e,t)=>e.some(e=>e[0]===t)),Q.default.registerHelper(`hasAnyEnvVar`,(e,...t)=>t.slice(0,-1).some(t=>e.some(e=>e[0]===t)));for(let[e,i]of Object.entries(n)){let n=e,a=i;e.endsWith(`.hbs`)&&(n=e.slice(0,-4),a=Q.default.compile(i)(t)),r[n]=a}return r}async function ue(e){if(e||=process.cwd(),r(`Initializing a new Blink Agent`),(await g(e)).length>0){let e=await u({message:`Directory is not empty. Initialize anyway?`});(e===!1||s(e))&&(l(`Initialization cancelled.`),process.exit(1))}let t=await c({options:[{label:`Slack Bot`,value:`slack-bot`,hint:`Pre-configured Slack bot`},{label:`Scratch`,value:`scratch`,hint:`Basic agent with example tool`}],message:`Which template do you want to use?`});s(t)&&(l(`Initialization cancelled.`),process.exit(1));let n=t,f={openai:{envVar:`OPENAI_API_KEY`,label:`OpenAI`},anthropic:{envVar:`ANTHROPIC_API_KEY`,label:`Anthropic`},vercel:{envVar:`AI_GATEWAY_API_KEY`,label:`Vercel AI Gateway`}},h=await c({options:[{label:f.openai.label,value:`openai`},{label:f.anthropic.label,value:`anthropic`},{label:f.vercel.label,value:`vercel`}],message:`Which AI provider do you want to use?`});s(h)&&(l(`Initialization cancelled.`),process.exit(1));let y=f[h].envVar,b=await o({message:`Enter your ${f[h].label} API key:`,placeholder:`Leave empty if you'd like to supply the key yourself later`});s(b)&&(l(`Initialization cancelled.`),process.exit(1));let x=p(e).replace(/[^a-zA-Z0-9]/g,`-`),S;if(process.env.npm_config_user_agent?.includes(`bun/`)?S=`bun`:process.env.npm_config_user_agent?.includes(`pnpm/`)?S=`pnpm`:process.env.npm_config_user_agent?.includes(`yarn/`)?S=`yarn`:process.env.npm_config_user_agent?.includes(`npm/`)&&(S=`npm`),!S){let e=await c({options:[{label:`Bun`,value:`bun`},{label:`NPM`,value:`npm`},{label:`PNPM`,value:`pnpm`},{label:`Yarn`,value:`yarn`}],message:`What package manager do you want to use?`});s(e)&&process.exit(0),S=e}i.info(`Using ${S} as the package manager.`);let C=[];b&&b.trim()!==``&&C.push([y,b]);let w=$(n,{packageName:x,aiProvider:h,envLocal:C});await Promise.all(Object.entries(w).map(async([t,n])=>{await _(m(e,t),n)})),b&&b.trim()!==``&&i.success(`API key saved to .env.local`),console.log(``);let T=v(S,[`install`],{stdio:`inherit`,cwd:e});await new Promise((e,t)=>{T.on(`close`,t=>{t===0&&e(void 0)}),T.on(`error`,e=>{t(e)})}),console.log(``);let E=!1;if(n===`slack-bot`){let t=await u({message:`Would you like to set up your Slack app now?`,initialValue:!0});s(t)||!t?(i.info(`You can set up your Slack app later by running:`),i.info(` blink setup slack-app`)):(await d(e,{name:x,packageManager:S}),E=!0),console.log(``)}let D={bun:`bun run dev`,npm:`npm run dev`,pnpm:`pnpm run dev`,yarn:`yarn dev`}[S];i.success(`To get started, run:
22
+
23
+ ${D??`blink dev`}`),a(`Edit agent.ts to hot-reload your agent.`),E&&process.exit(0)}export{ue as default,$ as getFilesForTemplate};
@@ -1,10 +1,17 @@
1
- const e={scratch:{".env.local":`
2
- # Store local environment variables here.
1
+ const e={scratch:{".env.local.hbs":`# Store local environment variables here.
3
2
  # They will be used by blink dev for development.
4
- # EXTERNAL_SERVICE_API_KEY=
5
- `,".env.production":`# Store production environment variables here.
3
+ {{#each envLocal}}
4
+ {{this.[0]}}={{this.[1]}}
5
+ {{/each}}
6
+ {{#unless (hasAnyEnvVar envLocal "OPENAI_API_KEY" "ANTHROPIC_API_KEY" "AI_GATEWAY_API_KEY")}}
7
+ # OPENAI_API_KEY=
8
+ # ANTHROPIC_API_KEY=
9
+ # AI_GATEWAY_API_KEY=
10
+ {{/unless}}`,".env.production":`# Store production environment variables here.
6
11
  # They will be upserted as secrets on blink deploy.
7
- # EXTERNAL_SERVICE_API_KEY=
12
+ # OPENAI_API_KEY=
13
+ # ANTHROPIC_API_KEY=
14
+ # AI_GATEWAY_API_KEY=
8
15
  `,".gitignore":`# dependencies
9
16
  node_modules
10
17
 
@@ -241,13 +248,15 @@ import { openai } from "@ai-sdk/openai";
241
248
  model: anthropic("claude-sonnet-4.5", {
242
249
  apiKey: process.env.ANTHROPIC_API_KEY,
243
250
  });
244
- model: openai("gpt-5", { apiKey: process.env.OPENAI_API_KEY });
251
+ // Use chat API for OpenAI models - it's more reliable than the responses API
252
+ model: openai.chat("gpt-5", { apiKey: process.env.OPENAI_API_KEY });
245
253
  \`\`\`
246
254
 
247
255
  **Note about Edit Mode:** Edit mode (this agent) automatically selects models in this priority:
248
256
 
249
257
  1. If \`ANTHROPIC_API_KEY\` is set: uses \`claude-sonnet-4.5\` via \`@ai-sdk/anthropic\`
250
258
  2. If \`OPENAI_API_KEY\` is set: uses \`gpt-5\` via \`@ai-sdk/openai\`
259
+ 3. If \`AI_GATEWAY_API_KEY\` is set: uses \`anthropic/claude-sonnet-4-5\` via the Vercel AI Gateway
251
260
 
252
261
  Available SDKs:
253
262
 
@@ -450,12 +459,7 @@ agent.on("chat", async ({ messages }) => {
450
459
  {{#if (eq aiProvider "anthropic")}}
451
460
  model: anthropic("claude-sonnet-4-5"),
452
461
  {{else if (eq aiProvider "openai")}}
453
- model: openai("gpt-5-codex"),
454
- providerOptions: {
455
- openai: {
456
- reasoningSummary: "detailed",
457
- },
458
- },
462
+ model: openai.chat("gpt-5"),
459
463
  {{else if (eq aiProvider "vercel")}}
460
464
  model: "anthropic/claude-sonnet-4.5",
461
465
  {{else}}
@@ -529,15 +533,25 @@ agent.serve();
529
533
  "types": ["node"]
530
534
  }
531
535
  }
532
- `},"slack-bot":{".env.local":`
533
- # Store local environment variables here.
536
+ `},"slack-bot":{".env.local.hbs":`# Store local environment variables here.
534
537
  # They will be used by blink dev for development.
538
+ {{#each envLocal}}
539
+ {{this.[0]}}={{this.[1]}}
540
+ {{/each}}
541
+ {{#unless (hasAnyEnvVar envLocal "OPENAI_API_KEY" "ANTHROPIC_API_KEY" "AI_GATEWAY_API_KEY")}}
542
+ # OPENAI_API_KEY=
543
+ # ANTHROPIC_API_KEY=
544
+ # AI_GATEWAY_API_KEY=
545
+ {{/unless}}
535
546
  SLACK_BOT_TOKEN=xoxb-your-token-here
536
547
  SLACK_SIGNING_SECRET=your-signing-secret-here
537
548
  `,".env.production":`# Store production environment variables here.
538
549
  # They will be upserted as secrets on blink deploy.
539
- # EXTERNAL_SERVICE_API_KEY=
540
- `,".gitignore":`# dependencies
550
+ # SLACK_BOT_TOKEN=
551
+ # SLACK_SIGNING_SECRET=
552
+ # OPENAI_API_KEY=
553
+ # ANTHROPIC_API_KEY=
554
+ # AI_GATEWAY_API_KEY=`,".gitignore":`# dependencies
541
555
  node_modules
542
556
 
543
557
  # config and build
@@ -773,7 +787,8 @@ import { openai } from "@ai-sdk/openai";
773
787
  model: anthropic("claude-sonnet-4.5", {
774
788
  apiKey: process.env.ANTHROPIC_API_KEY,
775
789
  });
776
- model: openai("gpt-5", { apiKey: process.env.OPENAI_API_KEY });
790
+ // Use chat API for OpenAI models - it's more reliable than the responses API
791
+ model: openai.chat("gpt-5", { apiKey: process.env.OPENAI_API_KEY });
777
792
  \`\`\`
778
793
 
779
794
  **Note about Edit Mode:** Edit mode (this agent) automatically selects models in this priority:
@@ -1058,12 +1073,7 @@ agent.on("chat", async ({ messages }) => {
1058
1073
  {{#if (eq aiProvider "anthropic")}}
1059
1074
  model: anthropic("claude-sonnet-4-5"),
1060
1075
  {{else if (eq aiProvider "openai")}}
1061
- model: openai("gpt-5-codex"),
1062
- providerOptions: {
1063
- openai: {
1064
- reasoningSummary: "detailed",
1065
- },
1066
- },
1076
+ model: openai.chat("gpt-5"),
1067
1077
  {{else if (eq aiProvider "vercel")}}
1068
1078
  model: "anthropic/claude-sonnet-4.5",
1069
1079
  {{else}}
@@ -0,0 +1 @@
1
+ import"./dist-Ceoe3h7v.js";import{login as e}from"./auth-DbpOUCTO.js";import"./util-CUfifM0g.js";async function t(){await e()}export{t as default};
@@ -1 +1 @@
1
- import{__toESM as e}from"./chunk-D9KrCrVq.js";import{findNearestEntry as t,migrateDataToBlink as n,require_main as r,resolveConfig as i}from"./util-DDB5k1Go.js";import"./dist-Ceoe3h7v.js";import{getAuthToken as a}from"./auth-CoJASYGP.js";import"./util-BgbIWOFE.js";import{ChatManager as o,Client as s}from"./chat-manager-BRchJngj.js";import{spawn as c}from"node:child_process";import{join as l,resolve as u}from"node:path";import{existsSync as d}from"node:fs";import{readFile as f}from"node:fs/promises";import{createServer as p}from"node:net";async function m(e){let t=e.env?.PORT??await h(),n=e.env?.HOST??`127.0.0.1`,r=`http://${n}:${t}`,i={...e.env??process.env,PORT:t.toString(),HOST:n},a=c(e.command,e.args,{stdio:`pipe`,env:i});e.signal?.addEventListener(`abort`,()=>{try{a.kill()}catch{}},{once:!0});let o=new AbortController,l=[o.signal];e.signal&&l.push(e.signal);let u=AbortSignal.any(l);a.stdout.on(`data`,t=>{e.onStdout?.(Buffer.from(t).toString(`utf-8`))});let d=``;a.stderr.on(`data`,t=>{o.signal.aborted||(d+=Buffer.from(t).toString(`utf-8`)),e.onStderr?.(Buffer.from(t).toString(`utf-8`))}),a.on(`error`,e=>{o.abort(e)}),a.on(`exit`,(t,n)=>{o.signal.aborted?e.onExit?.(t,n):o.abort()});let f=new s({baseUrl:r}),p=0;for(;!u.aborted;){try{await f.health();break}catch{}if(await new Promise(e=>setTimeout(e,p*5)),p++,p>100)throw Error(`Health endpoint timed out`)}if(u.aborted)throw u.reason;return o.abort(),{client:f,dispose:()=>{a.kill()}}}async function h(){let e=p();return new Promise((t,n)=>{e.listen(0,()=>{let n=e.address().port;t(n)}).on(`error`,e=>{n(e)})}).finally(()=>{e.close()})}var g=e(r(),1);async function _(e,r={}){if(!r.directory){let e=process.cwd();try{i(e),r.directory=e}catch{let n=await t(e,`.blink`);n&&d(l(n,`build`))&&(n=void 0),n?r.directory=n:r.directory=e}}await n(r.directory);let s=i(r.directory),c={};try{c=(0,g.parse)(await f(l(r.directory,`.env.local`),`utf-8`))}catch{}let p=await a(),h=await m({command:`node`,args:[`--experimental-strip-types`,`--no-deprecation`,s.entry],env:{...process.env,...c,BLINK_TOKEN:p}});console.log(`Agent spawned`);let _=u(r?.directory??process.cwd(),`.blink`,`chats`),v=new o({chatId:r?.chat,chatsDirectory:_});v.setAgent(h.client);try{let t=new Promise(e=>{let t=v.subscribe(n=>{(n.status===`idle`||n.status===`error`)&&(t(),e())})});await v.sendMessages([{id:crypto.randomUUID(),created_at:new Date().toISOString(),metadata:void 0,parts:[{type:`text`,text:e.join(` `)}],role:`user`,mode:`run`}]),await t;let n=v.getState();n.error&&console.error(`Error:`,n.error),console.log(`Final state:`,n.messages.pop())}finally{v.dispose(),h.dispose()}}export{_ as default};
1
+ import{__toESM as e}from"./chunk-D9KrCrVq.js";import{findNearestEntry as t,migrateDataToBlink as n,require_main as r,resolveConfig as i}from"./util-k3x8m_i5.js";import"./dist-Ceoe3h7v.js";import{getAuthToken as a}from"./auth-DbpOUCTO.js";import"./util-CUfifM0g.js";import{ChatManager as o,Client as s}from"./chat-manager-GWR_v50X.js";import{spawn as c}from"node:child_process";import{join as l,resolve as u}from"node:path";import{existsSync as d}from"node:fs";import{readFile as f}from"node:fs/promises";import{createServer as p}from"node:net";async function m(e){let t=e.env?.PORT??await h(),n=e.env?.HOST??`127.0.0.1`,r=`http://${n}:${t}`,i={...e.env??process.env,PORT:t.toString(),HOST:n},a=c(e.command,e.args,{stdio:`pipe`,env:i});e.signal?.addEventListener(`abort`,()=>{try{a.kill()}catch{}},{once:!0});let o=new AbortController,l=[o.signal];e.signal&&l.push(e.signal);let u=AbortSignal.any(l);a.stdout.on(`data`,t=>{e.onStdout?.(Buffer.from(t).toString(`utf-8`))});let d=``;a.stderr.on(`data`,t=>{o.signal.aborted||(d+=Buffer.from(t).toString(`utf-8`)),e.onStderr?.(Buffer.from(t).toString(`utf-8`))}),a.on(`error`,e=>{o.abort(e)}),a.on(`exit`,(t,n)=>{o.signal.aborted?e.onExit?.(t,n):o.abort()});let f=new s({baseUrl:r}),p=0;for(;!u.aborted;){try{await f.health();break}catch{}if(await new Promise(e=>setTimeout(e,p*5)),p++,p>100)throw Error(`Health endpoint timed out`)}if(u.aborted)throw u.reason;return o.abort(),{client:f,dispose:()=>{a.kill()}}}async function h(){let e=p();return new Promise((t,n)=>{e.listen(0,()=>{let n=e.address().port;t(n)}).on(`error`,e=>{n(e)})}).finally(()=>{e.close()})}var g=e(r(),1);async function _(e,r={}){if(!r.directory){let e=process.cwd();try{i(e),r.directory=e}catch{let n=await t(e,`.blink`);n&&d(l(n,`build`))&&(n=void 0),n?r.directory=n:r.directory=e}}await n(r.directory);let s=i(r.directory),c={};try{c=(0,g.parse)(await f(l(r.directory,`.env.local`),`utf-8`))}catch{}let p=await a(),h=await m({command:`node`,args:[`--experimental-strip-types`,`--no-deprecation`,s.entry],env:{...process.env,...c,BLINK_TOKEN:p}});console.log(`Agent spawned`);let _=u(r?.directory??process.cwd(),`.blink`,`chats`),v=new o({chatId:r?.chat,chatsDirectory:_,onError:e=>{console.error(`Error:`,e)}});v.setAgent(h.client);try{let t=new Promise(e=>{let t=v.subscribe(n=>{(n.status===`idle`||n.status===`error`)&&(t(),e())})});await v.sendMessages([{id:crypto.randomUUID(),created_at:new Date().toISOString(),metadata:void 0,parts:[{type:`text`,text:e.join(` `)}],role:`user`,mode:`run`}]),await t;let n=v.getState();console.log(`Final state:`,n.messages.pop())}finally{v.dispose(),h.dispose()}}export{_ as default};
@@ -0,0 +1 @@
1
+ import{Client as e,Ie as t,M as n,Se as r,Y as i,ge as a,he as o,pD as s,ye as c}from"./dist-Ceoe3h7v.js";import{openUrl as l,source_default as u}from"./util-CUfifM0g.js";import{createDevhookID as d,createSlackApp as f,getDevhookID as p,hasDevhook as m}from"./create-slack-app-CyVPwWsG.js";import h from"crypto";import{basename as g,join as _}from"path";import{access as v,readFile as y,readdir as b,writeFile as x}from"fs/promises";import S from"node:util";function C(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}async function w(e){try{let t=await(await fetch(`https://slack.com/api/auth.test`,{method:`POST`,headers:{Authorization:`Bearer ${e}`,"Content-Type":`application/json`}})).json();return t.ok?{valid:!0,botName:t.user}:{valid:!1,error:t.error||`Invalid bot token`}}catch(e){return{valid:!1,error:`Failed to verify credentials: ${e}`}}}function T(e,t,n,r){let i=Math.floor(Date.now()/1e3),a=parseInt(t,10);if(Math.abs(i-a)>300)return!1;let o=h.createHmac(`sha256`,e),s=`v0:${t}:${n}`;o.update(s);let c=`v0=${o.digest(`hex`)}`;return h.timingSafeEqual(Buffer.from(c),Buffer.from(r))}const E=e=>{if(!(typeof e==`object`&&e))throw Error(`Unable to make value disposable, it's not an object`);if(Symbol.dispose in e)return e;if(`dispose`in e&&typeof e.dispose==`function`)return e[Symbol.dispose]=()=>e.dispose(),e;throw Error(`Unable to make value disposable`)};async function D(e,t,n){let r=await y(e,`utf-8`);t&&(r=r.replace(/SLACK_BOT_TOKEN=.*/,`SLACK_BOT_TOKEN=${t}`)),n&&(r=r.replace(/SLACK_SIGNING_SECRET=.*/,`SLACK_SIGNING_SECRET=${n}`)),await x(e,r)}async function O(e){let t=await b(e);for(let[e,n]of[[`bun`,`bun.lock`],[`npm`,`package-lock.json`],[`pnpm`,`pnpm-lock.yaml`],[`yarn`,`yarn.lock`]])for(let r of t)if(r.includes(n))return e;return`npm`}async function k(t,h){try{var y=C();let b=h?.name||g(t).replace(/[^a-zA-Z0-9]/g,`-`),x=h?.packageManager||await O(t),k=_(t,`.env.local`);try{await v(k)}catch{n.error(`No .env.local file found in this directory. Please run this command from a Blink agent directory.`),r(`Slack app setup cancelled`);return}let A=await o({message:`What should your Slack app be called? This will be the name displayed in Slack. You can change it later.`,placeholder:b,defaultValue:b,validate:e=>{if(!e||e.trim().length===0)return`App name cannot be empty`}});if(s(A))return;let j=m(t)?p(t):d(t),M=`https://${j}.blink.host`;if(!j)throw Error(`Failed to obtain devhook ID`);n.info(`Starting webhook listener...`);let N=``,P=``,F=!1,I=``,L=``,R=!1,z,B=new e({baseURL:`https://blink.so`}),V=()=>{},H=e=>{},U=new Promise((e,t)=>{V=e,H=t}),W=B.devhook.listen({id:j,onRequest:async e=>{let t=await e.text(),r;try{r=JSON.parse(t)}catch{return new Response(`Invalid JSON`,{status:400})}if(r.type===`url_verification`)return n.info(`✓ Webhook challenge received`),new Response(JSON.stringify({challenge:r.challenge}),{headers:{"Content-Type":`application/json`}});if(N){let n=e.headers.get(`x-slack-signature`),i=e.headers.get(`x-slack-request-timestamp`);if(!n||!i)return new Response(`Missing signature`,{status:401});if(!T(N,i,t,n))return R=!0,r.event?.type===`message`&&r.event.channel_type===`im`&&!r.event.bot_id&&(z=r.event.channel),new Response(`Invalid signature`,{status:401})}return r.event?.type===`message`&&r.event.channel_type===`im`&&!r.event.bot_id&&(F=!0,I=r.event.channel,L=r.event.ts),new Response(`OK`)},onConnect:()=>{V()},onDisconnect:()=>{},onError:e=>{H(e)}});y.u(E(W));let G={display_information:{name:A.toString(),description:`A Blink agent for Slack`,background_color:`#4A154B`},features:{bot_user:{display_name:A.toString(),always_online:!0},app_home:{home_tab_enabled:!1,messages_tab_enabled:!0,messages_tab_read_only_enabled:!1},assistant_view:{assistant_description:`A helpful assistant powered by Blink`}},oauth_config:{scopes:{bot:[`app_mentions:read`,`assistant:write`,`reactions:write`,`reactions:read`,`channels:history`,`chat:write`,`groups:history`,`groups:read`,`files:read`,`im:history`,`im:read`,`im:write`,`mpim:history`,`mpim:read`,`users:read`,`links:read`,`commands`]}},settings:{event_subscriptions:{request_url:M,bot_events:[`app_mention`,`message.channels`,`message.groups`,`message.im`,`reaction_added`,`reaction_removed`,`assistant_thread_started`,`member_joined_channel`]},interactivity:{is_enabled:!0,request_url:M},token_rotation_enabled:!1,org_deploy_enabled:!1,socket_mode_enabled:!1}},K=f(G);n.info(`Please visit this URL to create your Slack app and return here after finishing:\n\n${u.gray(K)}\n`);let q=await c({message:`Open this URL in your browser automatically?`,initialValue:!0});if(s(q)){n.warn(`Skipping Slack app setup`);return}q&&await l(K,`Could not open the browser. Please visit the URL manually.`);let J=await o({message:`After creating the app, paste the App ID from the "Basic Information" page:`,placeholder:`A01234567AB`,validate:e=>{if(!e||e.trim().length===0)return`App ID is required`}});if(s(J)){n.warn(`Skipping Slack app setup`);return}if(N=await a({message:`Paste your Signing Secret from the same page:`,validate:e=>{if(!e||e.trim().length===0)return`Signing secret is required`}}),s(N)){n.warn(`Skipping Slack app setup`);return}let Y=!1;for(;!Y;){if(P=await a({message:`Install your app and paste your Bot Token from ${u.cyan(`https://api.slack.com/apps/${J}/install-on-team`)}`,validate:e=>{if(!e||e.trim().length===0)return`Bot token is required`}}),s(P)){n.warn(`Skipping Slack app setup`);return}let e=i();e.start(`Verifying bot token...`);let t=await w(P);if(t.valid)e.stop(`✓ Bot token verified!`),Y=!0;else{e.stop(`✗ Failed to verify bot token: ${t.error}`);let r=await c({message:`Would you like to try again?`,initialValue:!0});if(s(r)||!r){n.warn(`Skipping Slack app setup`);return}}}await D(k,P,N),n.success(`Credentials saved to .env.local`),await U;let X=i();X.start(`Try sending a DM to the bot on Slack - it's ${u.bold(u.cyan(A))} in the search bar.`);let Z={bun:`bun run dev`,npm:`npm run dev`,pnpm:`pnpm run dev`,yarn:`yarn dev`}[x];for(;!F;){if(R){if(X.stop(`✗ Invalid signing secret detected`),z&&P)try{await fetch(`https://slack.com/api/chat.postMessage`,{method:`POST`,headers:{Authorization:`Bearer ${P}`,"Content-Type":`application/json`},body:JSON.stringify({channel:z,text:`⚠️ There seems to be a problem with the signing secret. Please check the CLI for instructions on how to fix it.`})})}catch{}let e=await a({message:`The signing secret appears to be incorrect. Please paste the correct Signing Secret from ${u.cyan(`https://api.slack.com/apps/${J}/general`)}`,validate:e=>{if(!e||e.trim().length===0)return`Signing secret is required`}});if(s(e)){n.warn(`Skipping Slack app setup`);return}N=e,R=!1,z=void 0,await D(k,void 0,N),X.start(`Please try sending a DM to the bot again on Slack...`)}await new Promise(e=>setTimeout(e,500))}X.stop(u.green(`✓ DM received!`));try{await fetch(`https://slack.com/api/chat.postMessage`,{method:`POST`,headers:{Authorization:`Bearer ${P}`,"Content-Type":`application/json`},body:JSON.stringify({channel:I,thread_ts:L,text:`Congrats, your app is now installed and ready to use! Run \`${Z}\` to use your agent.`})})}catch(e){n.warn(`Could not send message to Slack: ${S.inspect(e)}`)}n.success(`Slack app setup complete!`)}catch(e){y.e=e}finally{y.d()}}async function A(e){e||=process.cwd(),t(`Setting up Slack app`),await k(e),process.exit(0)}export{k as setupSlackApp,A as setupSlackAppCommand};
@@ -1 +1 @@
1
- import{__commonJSMin as e}from"./chunk-D9KrCrVq.js";import{require_token_error as t}from"./token-error-DVSfBVaT.js";import{require_token_util as n}from"./token-util-IqDtKhK6.js";var r=e(((e,r)=>{var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of o(t))!s.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=a(t,c))||r.enumerable});return e},u=e=>l(i({},`__esModule`,{value:!0}),e),d={};c(d,{refreshToken:()=>m}),r.exports=u(d);var f=t(),p=n();async function m(){let{projectId:e,teamId:t}=(0,p.findProjectInfo)(),n=(0,p.loadToken)(e);if(!n||(0,p.isExpired)((0,p.getTokenPayload)(n.token))){let r=(0,p.getVercelCliToken)();if(!r)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: login to vercel cli`);if(!e)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: project id not found`);if(n=await(0,p.getVercelOidcToken)(r,e,t),!n)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`);(0,p.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token}}));export default r();export{};
1
+ import{__commonJSMin as e}from"./chunk-D9KrCrVq.js";import{require_token_error as t}from"./token-error-COQY18OP.js";import{require_token_util as n}from"./token-util-KdD-UX1l.js";var r=e(((e,r)=>{var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of o(t))!s.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=a(t,c))||r.enumerable});return e},u=e=>l(i({},`__esModule`,{value:!0}),e),d={};c(d,{refreshToken:()=>m}),r.exports=u(d);var f=t(),p=n();async function m(){let{projectId:e,teamId:t}=(0,p.findProjectInfo)(),n=(0,p.loadToken)(e);if(!n||(0,p.isExpired)((0,p.getTokenPayload)(n.token))){let r=(0,p.getVercelCliToken)();if(!r)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: login to vercel cli`);if(!e)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token: project id not found`);if(n=await(0,p.getVercelOidcToken)(r,e,t),!n)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`);(0,p.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token}}));export default r();export{};
@@ -0,0 +1 @@
1
+ import"./token-error-COQY18OP.js";import{require_token_util as e}from"./token-util-KdD-UX1l.js";export default e();export{};
@@ -1 +1 @@
1
- import{__commonJSMin as e,__require as t}from"./chunk-D9KrCrVq.js";import{require_token_error as n}from"./token-error-DVSfBVaT.js";var r=e(((e,r)=>{var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of s(t))!l.call(e,i)&&i!==n&&a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(a({},`__esModule`,{value:!0}),e),m={};u(m,{findRootDir:()=>y,getUserDataDir:()=>b}),r.exports=p(m);var h=f(t(`path`)),g=f(t(`fs`)),_=f(t(`os`)),v=n();function y(){try{let e=process.cwd();for(;e!==h.default.dirname(e);){let t=h.default.join(e,`.vercel`);if(g.default.existsSync(t))return e;e=h.default.dirname(e)}}catch{throw new v.VercelOidcTokenError(`Token refresh only supported in node server environments`)}throw new v.VercelOidcTokenError(`Unable to find root directory`)}function b(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(_.default.platform()){case`darwin`:return h.default.join(_.default.homedir(),`Library/Application Support`);case`linux`:return h.default.join(_.default.homedir(),`.local/share`);case`win32`:return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}})),i=e(((e,i)=>{var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of c(t))!u.call(e,i)&&i!==n&&o(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:a(l(e)),f(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e)),m=e=>f(o({},`__esModule`,{value:!0}),e),h={};d(h,{assertVercelOidcTokenResponse:()=>C,findProjectInfo:()=>w,getTokenPayload:()=>D,getVercelCliToken:()=>x,getVercelDataDir:()=>b,getVercelOidcToken:()=>S,isExpired:()=>O,loadToken:()=>E,saveToken:()=>T}),i.exports=m(h);var g=p(t(`path`)),_=p(t(`fs`)),v=n(),y=r();function b(){let e=(0,y.getUserDataDir)();return e?g.join(e,`com.vercel.cli`):null}function x(){let e=b();if(!e)return null;let t=g.join(e,`auth.json`);if(!_.existsSync(t))return null;let n=_.readFileSync(t,`utf8`);return n?JSON.parse(n).token:null}async function S(e,t,n){try{let r=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n?`&teamId=${n}`:``}`,i=await fetch(r,{method:`POST`,headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw new v.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`);let a=await i.json();return C(a),a}catch(e){throw new v.VercelOidcTokenError(`Failed to refresh OIDC token`,e)}}function C(e){if(!e||typeof e!=`object`)throw TypeError(`Expected an object`);if(!(`token`in e)||typeof e.token!=`string`)throw TypeError(`Expected a string-valued token property`)}function w(){let e=(0,y.findRootDir)();if(!e)throw new v.VercelOidcTokenError(`Unable to find root directory`);try{let t=g.join(e,`.vercel`,`project.json`);if(!_.existsSync(t))throw new v.VercelOidcTokenError(`project.json not found`);let n=JSON.parse(_.readFileSync(t,`utf8`));if(typeof n.projectId!=`string`&&typeof n.orgId!=`string`)throw TypeError(`Expected a string-valued projectId property`);return{projectId:n.projectId,teamId:n.orgId}}catch(e){throw new v.VercelOidcTokenError(`Unable to find project ID`,e)}}function T(e,t){try{let n=(0,y.getUserDataDir)();if(!n)throw new v.VercelOidcTokenError(`Unable to find user data directory`);let r=g.join(n,`com.vercel.token`,`${t}.json`),i=JSON.stringify(e);_.mkdirSync(g.dirname(r),{mode:432,recursive:!0}),_.writeFileSync(r,i),_.chmodSync(r,432);return}catch(e){throw new v.VercelOidcTokenError(`Failed to save token`,e)}}function E(e){try{let t=(0,y.getUserDataDir)();if(!t)return null;let n=g.join(t,`com.vercel.token`,`${e}.json`);if(!_.existsSync(n))return null;let r=JSON.parse(_.readFileSync(n,`utf8`));return C(r),r}catch(e){throw new v.VercelOidcTokenError(`Failed to load token`,e)}}function D(e){let t=e.split(`.`);if(t.length!==3)throw new v.VercelOidcTokenError(`Invalid token`);let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(n.length+(4-n.length%4)%4,`=`);return JSON.parse(Buffer.from(r,`base64`).toString(`utf8`))}function O(e){return e.exp*1e3<Date.now()+9e5}}));export{i as require_token_util};
1
+ import{__commonJSMin as e,__require as t}from"./chunk-D9KrCrVq.js";import{require_token_error as n}from"./token-error-COQY18OP.js";var r=e(((e,r)=>{var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of s(t))!l.call(e,i)&&i!==n&&a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(a({},`__esModule`,{value:!0}),e),m={};u(m,{findRootDir:()=>y,getUserDataDir:()=>b}),r.exports=p(m);var h=f(t(`path`)),g=f(t(`fs`)),_=f(t(`os`)),v=n();function y(){try{let e=process.cwd();for(;e!==h.default.dirname(e);){let t=h.default.join(e,`.vercel`);if(g.default.existsSync(t))return e;e=h.default.dirname(e)}}catch{throw new v.VercelOidcTokenError(`Token refresh only supported in node server environments`)}throw new v.VercelOidcTokenError(`Unable to find root directory`)}function b(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(_.default.platform()){case`darwin`:return h.default.join(_.default.homedir(),`Library/Application Support`);case`linux`:return h.default.join(_.default.homedir(),`.local/share`);case`win32`:return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}})),i=e(((e,i)=>{var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of c(t))!u.call(e,i)&&i!==n&&o(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:a(l(e)),f(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e)),m=e=>f(o({},`__esModule`,{value:!0}),e),h={};d(h,{assertVercelOidcTokenResponse:()=>C,findProjectInfo:()=>w,getTokenPayload:()=>D,getVercelCliToken:()=>x,getVercelDataDir:()=>b,getVercelOidcToken:()=>S,isExpired:()=>O,loadToken:()=>E,saveToken:()=>T}),i.exports=m(h);var g=p(t(`path`)),_=p(t(`fs`)),v=n(),y=r();function b(){let e=(0,y.getUserDataDir)();return e?g.join(e,`com.vercel.cli`):null}function x(){let e=b();if(!e)return null;let t=g.join(e,`auth.json`);if(!_.existsSync(t))return null;let n=_.readFileSync(t,`utf8`);return n?JSON.parse(n).token:null}async function S(e,t,n){try{let r=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n?`&teamId=${n}`:``}`,i=await fetch(r,{method:`POST`,headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw new v.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`);let a=await i.json();return C(a),a}catch(e){throw new v.VercelOidcTokenError(`Failed to refresh OIDC token`,e)}}function C(e){if(!e||typeof e!=`object`)throw TypeError(`Expected an object`);if(!(`token`in e)||typeof e.token!=`string`)throw TypeError(`Expected a string-valued token property`)}function w(){let e=(0,y.findRootDir)();if(!e)throw new v.VercelOidcTokenError(`Unable to find root directory`);try{let t=g.join(e,`.vercel`,`project.json`);if(!_.existsSync(t))throw new v.VercelOidcTokenError(`project.json not found`);let n=JSON.parse(_.readFileSync(t,`utf8`));if(typeof n.projectId!=`string`&&typeof n.orgId!=`string`)throw TypeError(`Expected a string-valued projectId property`);return{projectId:n.projectId,teamId:n.orgId}}catch(e){throw new v.VercelOidcTokenError(`Unable to find project ID`,e)}}function T(e,t){try{let n=(0,y.getUserDataDir)();if(!n)throw new v.VercelOidcTokenError(`Unable to find user data directory`);let r=g.join(n,`com.vercel.token`,`${t}.json`),i=JSON.stringify(e);_.mkdirSync(g.dirname(r),{mode:432,recursive:!0}),_.writeFileSync(r,i),_.chmodSync(r,432);return}catch(e){throw new v.VercelOidcTokenError(`Failed to save token`,e)}}function E(e){try{let t=(0,y.getUserDataDir)();if(!t)return null;let n=g.join(t,`com.vercel.token`,`${e}.json`);if(!_.existsSync(n))return null;let r=JSON.parse(_.readFileSync(n,`utf8`));return C(r),r}catch(e){throw new v.VercelOidcTokenError(`Failed to load token`,e)}}function D(e){let t=e.split(`.`);if(t.length!==3)throw new v.VercelOidcTokenError(`Invalid token`);let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(n.length+(4-n.length%4)%4,`=`);return JSON.parse(Buffer.from(r,`base64`).toString(`utf8`))}function O(e){return e.exp*1e3<Date.now()+9e5}}));export{i as require_token_util};
@@ -0,0 +1 @@
1
+ import{require_undici as e}from"./undici-CRntNDHY.js";export default e();export{};
@@ -0,0 +1,5 @@
1
+ import e,{execFile as t}from"node:child_process";import n from"node:path";import r from"node:fs";import i from"node:process";import a,{constants as o}from"node:fs/promises";import s from"node:os";import c from"node:tty";import{promisify as l}from"node:util";import{Buffer as u}from"node:buffer";import{fileURLToPath as d}from"node:url";const f=(e=0)=>t=>`\u001B[${t+e}m`,p=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,m=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,h={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(h.modifier);const ee=Object.keys(h.color),te=Object.keys(h.bgColor);[...ee,...te];function g(){let e=new Map;for(let[t,n]of Object.entries(h)){for(let[t,r]of Object.entries(n))h[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=h[t],e.set(r[0],r[1]);Object.defineProperty(h,t,{value:n,enumerable:!1})}return Object.defineProperty(h,`codes`,{value:e,enumerable:!1}),h.color.close=`\x1B[39m`,h.bgColor.close=`\x1B[49m`,h.color.ansi=f(),h.color.ansi256=p(),h.color.ansi16m=m(),h.bgColor.ansi=f(10),h.bgColor.ansi256=p(10),h.bgColor.ansi16m=m(10),Object.defineProperties(h,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>h.rgbToAnsi256(...h.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>h.ansi256ToAnsi(h.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>h.ansi256ToAnsi(h.hexToAnsi256(e)),enumerable:!1}}),h}var _=g();function v(e,t=globalThis.Deno?globalThis.Deno.args:i.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),a=t.indexOf(`--`);return r!==-1&&(a===-1||r<a)}const{env:y}=i;let b;v(`no-color`)||v(`no-colors`)||v(`color=false`)||v(`color=never`)?b=0:(v(`color`)||v(`colors`)||v(`color=true`)||v(`color=always`))&&(b=1);function ne(){if(`FORCE_COLOR`in y)return y.FORCE_COLOR===`true`?1:y.FORCE_COLOR===`false`?0:y.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(y.FORCE_COLOR,10),3)}function re(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ie(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=ne();r!==void 0&&(b=r);let a=n?b:r;if(a===0)return 0;if(n){if(v(`color=16m`)||v(`color=full`)||v(`color=truecolor`))return 3;if(v(`color=256`))return 2}if(`TF_BUILD`in y&&`AGENT_NAME`in y)return 1;if(e&&!t&&a===void 0)return 0;let o=a||0;if(y.TERM===`dumb`)return o;if(i.platform===`win32`){let e=s.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in y)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in y)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in y)||y.CI_NAME===`codeship`?1:o;if(`TEAMCITY_VERSION`in y)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y.TEAMCITY_VERSION)?1:0;if(y.COLORTERM===`truecolor`||y.TERM===`xterm-kitty`||y.TERM===`xterm-ghostty`||y.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in y){let e=Number.parseInt((y.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(y.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(y.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(y.TERM)||`COLORTERM`in y?1:o}function x(e,t={}){let n=ie(e,{streamIsTTY:e&&e.isTTY,...t});return re(n)}var ae={stdout:x({isTTY:c.isatty(1)}),stderr:x({isTTY:c.isatty(2)})};function oe(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function se(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
2
+ `:`
3
+ `)+n,i=r+1,r=e.indexOf(`
4
+ `,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:S,stderr:C}=ae,w=Symbol(`GENERATOR`),T=Symbol(`STYLER`),E=Symbol(`IS_EMPTY`),D=[`ansi`,`ansi`,`ansi256`,`ansi16m`],O=Object.create(null),ce=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=S?S.level:0;e.level=t.level===void 0?n:t.level},le=e=>{let t=(...e)=>e.join(` `);return ce(t,e),Object.setPrototypeOf(t,k.prototype),t};function k(e){return le(e)}Object.setPrototypeOf(k.prototype,Function.prototype);for(let[e,t]of Object.entries(_))O[e]={get(){let n=N(this,M(t.open,t.close,this[T]),this[E]);return Object.defineProperty(this,e,{value:n}),n}};O.visible={get(){let e=N(this,this[T],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const A=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?_[n].ansi16m(...r):t===`ansi256`?_[n].ansi256(_.rgbToAnsi256(...r)):_[n].ansi(_.rgbToAnsi(...r)):e===`hex`?A(`rgb`,t,n,..._.hexToRgb(...r)):_[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){O[e]={get(){let{level:t}=this;return function(...n){let r=M(A(e,D[t],`color`,...n),_.color.close,this[T]);return N(this,r,this[E])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);O[t]={get(){let{level:t}=this;return function(...n){let r=M(A(e,D[t],`bgColor`,...n),_.bgColor.close,this[T]);return N(this,r,this[E])}}}}const j=Object.defineProperties(()=>{},{...O,level:{enumerable:!0,get(){return this[w].level},set(e){this[w].level=e}}}),M=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},N=(e,t,n)=>{let r=(...e)=>ue(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,j),r[w]=e,r[T]=t,r[E]=n,r},ue=(e,t)=>{if(e.level<=0||!t)return e[E]?``:t;let n=e[T];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=oe(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
5
+ `);return a!==-1&&(t=se(t,i,r,a)),r+t+i};Object.defineProperties(k.prototype,O);const de=k();k({level:C?C.level:0});var P=de;let F;function fe(){try{return r.statSync(`/.dockerenv`),!0}catch{return!1}}function pe(){try{return r.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}function me(){return F===void 0&&(F=fe()||pe()),F}let I;const he=()=>{try{return r.statSync(`/run/.containerenv`),!0}catch{return!1}};function L(){return I===void 0&&(I=he()||me()),I}const R=()=>{if(i.platform!==`linux`)return!1;if(s.release().toLowerCase().includes(`microsoft`))return!L();try{return r.readFileSync(`/proc/version`,`utf8`).toLowerCase().includes(`microsoft`)?!L():!1}catch{return!1}};var z=i.env.__IS_WSL_TEST__?R:R();const B=(()=>{let e=`/mnt/`,t;return async function(){if(t)return t;let n=`/etc/wsl.conf`,r=!1;try{await a.access(n,o.F_OK),r=!0}catch{}if(!r)return e;let i=await a.readFile(n,{encoding:`utf8`}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(t=s.groups.mountPoint.trim(),t=t.endsWith(`/`)?t:`${t}/`,t):e}})(),ge=async()=>`${await B()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,V=async()=>z?ge():`${i.env.SYSTEMROOT||i.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;function H(e,t,n){let r=n=>Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let e=n();return r(e),e},set(e){r(e)}}),e}const _e=l(t);async function ve(){if(i.platform!==`darwin`)throw Error(`macOS only`);let{stdout:e}=await _e(`defaults`,[`read`,`com.apple.LaunchServices/com.apple.launchservices.secure`,`LSHandlers`]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??`com.apple.Safari`}const ye=l(t);async function be(e,{humanReadableOutput:t=!0,signal:n}={}){if(i.platform!==`darwin`)throw Error(`macOS only`);let r=t?[]:[`-ss`],a={};n&&(a.signal=n);let{stdout:o}=await ye(`osascript`,[`-e`,e,r],a);return o.trim()}async function xe(e){return be(`tell application "Finder" to set app_path to application file id "${e}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}const Se=l(t),Ce={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:`Edge`,id:`com.microsoft.edge.old`},MSEdgeDHTML:{name:`Edge`,id:`com.microsoft.edge`},MSEdgeHTM:{name:`Edge`,id:`com.microsoft.edge`},"IE.HTTP":{name:`Internet Explorer`,id:`com.microsoft.ie`},FirefoxURL:{name:`Firefox`,id:`org.mozilla.firefox`},ChromeHTML:{name:`Chrome`,id:`com.google.chrome`},BraveHTML:{name:`Brave`,id:`com.brave.Browser`},BraveBHTML:{name:`Brave Beta`,id:`com.brave.Browser.beta`},BraveSSHTM:{name:`Brave Nightly`,id:`com.brave.Browser.nightly`}};var U=class extends Error{};async function we(e=Se){let{stdout:t}=await e(`reg`,[`QUERY`,` HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice`,`/v`,`ProgId`]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new U(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,i=Ce[r];if(!i)throw new U(`Unknown browser ID: ${r}`);return i}const Te=l(t),Ee=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase());async function De(){if(i.platform===`darwin`){let e=await ve();return{name:await xe(e),id:e}}if(i.platform===`linux`){let{stdout:e}=await Te(`xdg-mime`,[`query`,`default`,`x-scheme-handler/http`]),t=e.trim();return{name:Ee(t.replace(/.desktop$/,``).replace(`-`,` `)),id:t}}if(i.platform===`win32`)return we();throw Error(`Only macOS, Linux, and Windows are supported`)}const Oe=l(e.execFile),W=n.dirname(d(import.meta.url)),G=n.join(W,`xdg-open`),{platform:K,arch:q}=i;async function ke(){let e=await V(),t=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,n=u.from(t,`utf16le`).toString(`base64`),{stdout:r}=await Oe(e,[`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`,n],{encoding:`utf8`}),i=r.trim(),a={ChromeHTML:`com.google.chrome`,BraveHTML:`com.brave.Browser`,MSEdgeHTM:`com.microsoft.edge`,FirefoxURL:`org.mozilla.firefox`};return a[i]?{id:a[i]}:{}}const J=async(e,t)=>{let n;for(let r of e)try{return await t(r)}catch(e){n=e}throw n},Y=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return J(t.app,e=>Y({...t,app:e}));let{name:n,arguments:r=[]}=t.app??{};if(r=[...r],Array.isArray(n))return J(n,e=>Y({...t,app:{name:e,arguments:r}}));if(n===`browser`||n===`browserPrivate`){let e={"com.google.chrome":`chrome`,"google-chrome.desktop":`chrome`,"com.brave.Browser":`brave`,"org.mozilla.firefox":`firefox`,"firefox.desktop":`firefox`,"com.microsoft.msedge":`edge`,"com.microsoft.edge":`edge`,"com.microsoft.edgemac":`edge`,"microsoft-edge.desktop":`edge`},i={chrome:`--incognito`,brave:`--incognito`,firefox:`--private-window`,edge:`--inPrivate`},a=z?await ke():await De();if(a.id in e){let o=e[a.id];return n===`browserPrivate`&&r.push(i[o]),Y({...t,app:{name:Q[o],arguments:r}})}throw Error(`${a.name} is not supported as a default browser`)}let s,c=[],l={};if(K===`darwin`)s=`open`,t.wait&&c.push(`--wait-apps`),t.background&&c.push(`--background`),t.newInstance&&c.push(`--new`),n&&c.push(`-a`,n);else if(K===`win32`||z&&!L()&&!n){s=await V(),c.push(`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`),z||(l.windowsVerbatimArguments=!0);let e=[`Start`];t.wait&&e.push(`-Wait`),n?(e.push(`"\`"${n}\`""`),t.target&&r.push(t.target)):t.target&&e.push(`"${t.target}"`),r.length>0&&(r=r.map(e=>`"\`"${e}\`""`),e.push(`-ArgumentList`,r.join(`,`))),t.target=u.from(e.join(` `),`utf16le`).toString(`base64`)}else{if(n)s=n;else{let e=!W||W===`/`,t=!1;try{await a.access(G,o.X_OK),t=!0}catch{}s=i.versions.electron??(K===`android`||e||!t)?`xdg-open`:G}r.length>0&&c.push(...r),t.wait||(l.stdio=`ignore`,l.detached=!0)}K===`darwin`&&r.length>0&&c.push(`--args`,...r),t.target&&c.push(t.target);let d=e.spawn(s,c,l);return t.wait?new Promise((e,n)=>{d.once(`error`,n),d.once(`close`,r=>{if(!t.allowNonzeroExitCode&&r>0){n(Error(`Exited with code ${r}`));return}e(d)})}):(d.unref(),d)},Ae=(e,t)=>{if(typeof e!=`string`)throw TypeError("Expected a `target`");return Y({...t,target:e})};function X(e){if(typeof e==`string`||Array.isArray(e))return e;let{[q]:t}=e;if(!t)throw Error(`${q} is not supported`);return t}function Z({[K]:e},{wsl:t}){if(t&&z)return X(t);if(!e)throw Error(`${K} is not supported`);return X(e)}const Q={};H(Q,`chrome`,()=>Z({darwin:`google chrome`,win32:`chrome`,linux:[`google-chrome`,`google-chrome-stable`,`chromium`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`,x64:[`/mnt/c/Program Files/Google/Chrome/Application/chrome.exe`,`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`]}})),H(Q,`brave`,()=>Z({darwin:`brave browser`,win32:`brave`,linux:[`brave-browser`,`brave`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`,x64:[`/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe`,`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`]}})),H(Q,`firefox`,()=>Z({darwin:`firefox`,win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:`firefox`},{wsl:`/mnt/c/Program Files/Mozilla Firefox/firefox.exe`})),H(Q,`edge`,()=>Z({darwin:`microsoft edge`,win32:`msedge`,linux:[`microsoft-edge`,`microsoft-edge-dev`]},{wsl:`/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`})),H(Q,`browser`,()=>`browser`),H(Q,`browserPrivate`,()=>`browserPrivate`);var $=Ae;async function je(e,t=void 0){try{(await $(e)).once(`error`,n=>{console.log(P.yellow(t??`Could not open the browser. Please visit the URL manually: ${e}`))})}catch{console.log(P.yellow(t??`Could not open the browser. Please visit the URL manually: ${e}`))}}export{je as openUrl,$ as open_default,P as source_default};
@@ -1,4 +1,4 @@
1
- import{__commonJSMin as e,__require as t,__toESM as n}from"./chunk-D9KrCrVq.js";import{require_source as r}from"./util-BgbIWOFE.js";import i,{dirname as a,join as o}from"path";import{existsSync as s,readFileSync as c,readdirSync as l,writeFileSync as u}from"fs";import{builtinModules as d}from"module";import{mkdir as f,rename as p,rm as m,stat as h,writeFile as g}from"fs/promises";const _=`ai-telemetry-wrapper`;function v(e={}){let{functions:t=[`streamText`,`generateText`,`generateObject`,`streamObject`,`embed`,`embedMany`],telemetryConfig:n={isEnabled:!0}}=e;return{name:`ai-telemetry`,setup(e){e.onResolve({filter:/^ai$/},e=>{if(e.namespace!==_)return{path:`ai`,namespace:_,pluginData:{resolveDir:e.resolveDir}}}),e.onLoad({filter:/^ai$/,namespace:_},e=>{let r=JSON.stringify(n),i=e.pluginData;return{contents:`
1
+ import{__commonJSMin as e,__require as t}from"./chunk-D9KrCrVq.js";import{source_default as n}from"./util-CUfifM0g.js";import r,{dirname as i,join as a}from"path";import{existsSync as o,readFileSync as s,readdirSync as c,writeFileSync as l}from"fs";import{builtinModules as u}from"module";import{mkdir as d,rename as f,rm as p,stat as m,writeFile as h}from"fs/promises";const g=`ai-telemetry-wrapper`;function _(e={}){let{functions:t=[`streamText`,`generateText`,`generateObject`,`streamObject`,`embed`,`embedMany`],telemetryConfig:n={isEnabled:!0}}=e;return{name:`ai-telemetry`,setup(e){e.onResolve({filter:/^ai$/},e=>{if(e.namespace!==g)return{path:`ai`,namespace:g,pluginData:{resolveDir:e.resolveDir}}}),e.onLoad({filter:/^ai$/,namespace:g},e=>{let r=JSON.stringify(n),i=e.pluginData;return{contents:`
2
2
  // Import everything from the original 'ai' package
3
3
  import * as aiOriginal from 'ai';
4
4
 
@@ -19,15 +19,15 @@ export function ${e}(options) {
19
19
  return aiOriginal.${e}(options);
20
20
  }
21
21
  `).join(``)}
22
- `,loader:`js`,resolveDir:i?.resolveDir}})}}}function y(e){return async t=>{let n=await(await import(`esbuild`)).context({entryPoints:[t.entry],outdir:t.outdir,bundle:!0,write:!1,logLevel:`silent`,format:`esm`,platform:`node`,target:`node22`,sourcemap:!1,mainFields:[`module`,`main`],conditions:[`import`,`module`],plugins:[{name:`blink-esm-require-to-import`,setup(e){e.onEnd(t=>{e.initialOptions.format!==`esm`||e.initialOptions.platform!==`node`||t.outputFiles?.forEach(e=>{if(e.path.endsWith(`.js`)||e.path.endsWith(`.mjs`)){let t=Buffer.from(e.contents).toString(`utf-8`),n=new Map,r=RegExp(`\\b__require\\("(node:)?(${d.join(`|`)})(/[^"]+)?"\\)`,`gm`);t=t.replace(r,(e,t,r,i=``)=>{let a=r+i,o=`__import_${a.toUpperCase().replace(/[/-]/g,`_`)}`,s=`node:${a}`;return n.set(o,s),o}),n.size>0&&(t=Array.from(n.entries()).map(([e,t])=>`import ${e} from "${t}";`).join(`
22
+ `,loader:`js`,resolveDir:i?.resolveDir}})}}}function v(e){return async t=>{let n=await(await import(`esbuild`)).context({entryPoints:[t.entry],outdir:t.outdir,bundle:!0,write:!1,logLevel:`silent`,format:`esm`,platform:`node`,target:`node22`,sourcemap:!1,mainFields:[`module`,`main`],conditions:[`import`,`module`],plugins:[{name:`blink-esm-require-to-import`,setup(e){e.onEnd(t=>{e.initialOptions.format!==`esm`||e.initialOptions.platform!==`node`||t.outputFiles?.forEach(e=>{if(e.path.endsWith(`.js`)||e.path.endsWith(`.mjs`)){let t=Buffer.from(e.contents).toString(`utf-8`),n=new Map,r=RegExp(`\\b__require\\("(node:)?(${u.join(`|`)})(/[^"]+)?"\\)`,`gm`);t=t.replace(r,(e,t,r,i=``)=>{let a=r+i,o=`__import_${a.toUpperCase().replace(/[/-]/g,`_`)}`,s=`node:${a}`;return n.set(o,s),o}),n.size>0&&(t=Array.from(n.entries()).map(([e,t])=>`import ${e} from "${t}";`).join(`
23
23
  `)+`
24
24
 
25
- `+t),e.contents=Buffer.from(t,`utf-8`)}})})}},{name:`blink-dev-server`,setup(e){let r;e.onStart(()=>{t.onStart(),r=performance.now()}),e.onEnd(async e=>{await m(t.outdir,{recursive:!0,force:!0}),await f(t.outdir,{recursive:!0});let a=e.outputFiles?.map(e=>({path:e.path,contents:e.contents}))??[];a.push({path:i.resolve(t.outdir,`package.json`),contents:Buffer.from(JSON.stringify({type:`module`},null,2),`utf-8`)});for(let e of a)await g(e.path,e.contents);e.errors.length>0?t.onResult({error:{message:e.errors.map(e=>`${e.text} (${e.location?.file})`).join(`
26
- `)}}):t.onResult({entry:i.resolve(t.outdir,i.basename(t.entry).replace(`.ts`,`.js`)),duration:performance.now()-r,outdir:t.outdir,warnings:e.warnings.map(e=>({message:e.text,file:e.location?.file}))}),t.watch||(n.dispose(),n.cancel())})}},v()],...e});await n.watch()}}function b(e){let n=[`blink.config.ts`],r;for(let a of n){let n=i.resolve(e,a);if(s(n)){let e=t(n);if(e.default){r={...e.default};break}}}if(r||={},!r.entry){for(let t of[`src/agent.ts`,`src/agent.js`,`agent.ts`,`agent.js`]){let n=i.resolve(e,t);if(s(n)){r.entry=n;break}}if(!r.entry)throw Error(`Agent entrypoint not found.
25
+ `+t),e.contents=Buffer.from(t,`utf-8`)}})})}},{name:`blink-dev-server`,setup(e){let i;e.onStart(()=>{t.onStart(),i=performance.now()}),e.onEnd(async e=>{await p(t.outdir,{recursive:!0,force:!0}),await d(t.outdir,{recursive:!0});let a=e.outputFiles?.map(e=>({path:e.path,contents:e.contents}))??[];a.push({path:r.resolve(t.outdir,`package.json`),contents:Buffer.from(JSON.stringify({type:`module`},null,2),`utf-8`)});for(let e of a)await h(e.path,e.contents);e.errors.length>0?t.onResult({error:{message:e.errors.map(e=>`${e.text} (${e.location?.file})`).join(`
26
+ `)}}):t.onResult({entry:r.resolve(t.outdir,r.basename(t.entry).replace(`.ts`,`.js`)),duration:performance.now()-i,outdir:t.outdir,warnings:e.warnings.map(e=>({message:e.text,file:e.location?.file}))}),t.watch||(n.dispose(),n.cancel())})}},_()],...e});await n.watch()}}function y(e){let n=[`blink.config.ts`],i;for(let a of n){let n=r.resolve(e,a);if(o(n)){let e=t(n);if(e.default){i={...e.default};break}}}if(i||={},!i.entry){for(let t of[`src/agent.ts`,`src/agent.js`,`agent.ts`,`agent.js`]){let n=r.resolve(e,t);if(o(n)){i.entry=n;break}}if(!i.entry)throw Error(`Agent entrypoint not found.
27
27
 
28
- Try creating "agent.ts" or specify "entry" in a blink.config.ts file.`)}return r.outdir||=i.resolve(e,`.blink/build`),r.build||=y(),r}var x=n(r(),1);async function S(e){let t=o(e,`data`),n=o(e,`.blink`);if(!s(t)||s(n)||!(s(o(t,`chats`))||s(o(t,`storage.json`))||s(o(t,`config.json`))||s(o(t,`devhook.txt`))||s(o(t,`devhook`))||s(o(t,`.first-run`))))return;console.log(x.default.yellow(`Migrating data/ to .blink/...`)),await p(t,n);let r=o(e,`.gitignore`);if(s(r)){let e=c(r,`utf-8`);if(e.includes(`data`)&&!e.includes(`.blink`)){let t=e.split(`
29
- `),n=t.findIndex(e=>e.trim().match(/^data\s*$/));n===-1?(e.endsWith(`
30
- `)||t.push(``),t.push(`# data has migrated to .blink/`),t.push(`.blink`)):(t[n]=`.blink`,(n===0||!t[n-1]?.trim().startsWith(`#`))&&t.splice(n,0,`# data has migrated to .blink/`)),u(r,t.join(`
31
- `)),console.log(x.default.green(`Updated .gitignore`))}}console.log(x.default.green(`Migration complete!`))}var C=e(((e,t)=>{t.exports={name:`dotenv`,version:`17.2.3`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,pretest:`npm run lint && npm run dts-check`,test:`tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000`,"test:coverage":`tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},homepage:`https://github.com/motdotla/dotenv#readme`,funding:`https://dotenvx.com`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@types/node":`^18.11.3`,decache:`^4.6.2`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-version":`^9.5.0`,tap:`^19.2.0`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),w=e(((e,n)=>{let r=t(`fs`),i=t(`path`),a=t(`os`),o=t(`crypto`),s=C().version,c=[`🔐 encrypt with Dotenvx: https://dotenvx.com`,`🔐 prevent committing .env to code: https://dotenvx.com/precommit`,`🔐 prevent building .env in docker: https://dotenvx.com/prebuild`,`📡 add observability to secrets: https://dotenvx.com/ops`,`👥 sync secrets across teammates & machines: https://dotenvx.com/ops`,`🗂️ backup and recover secrets: https://dotenvx.com/ops`,`✅ audit secrets and track compliance: https://dotenvx.com/ops`,`🔄 add secrets lifecycle management: https://dotenvx.com/ops`,`🔑 add access controls to secrets: https://dotenvx.com/ops`,"🛠️ run anywhere with `dotenvx run -- yourcommand`",`⚙️ specify custom .env file path with { path: '/custom/path/.env' }`,`⚙️ enable debug logging with { debug: true }`,`⚙️ override existing env vars with { override: true }`,`⚙️ suppress all logs with { quiet: true }`,`⚙️ write to custom object with { processEnv: myObject }`,`⚙️ load multiple .env files with { path: ['.env.local', '.env'] }`];function l(){return c[Math.floor(Math.random()*c.length)]}function u(e){return typeof e==`string`?![`false`,`0`,`no`,`off`,``].includes(e.toLowerCase()):!!e}function d(){return process.stdout.isTTY}function f(e){return d()?`\x1b[2m${e}\x1b[0m`:e}let p=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function m(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
28
+ Try creating "agent.ts" or specify "entry" in a blink.config.ts file.`)}return i.outdir||=r.resolve(e,`.blink/build`),i.build||=v(),i}async function b(e){let t=a(e,`data`),r=a(e,`.blink`);if(!o(t)||o(r)||!(o(a(t,`chats`))||o(a(t,`storage.json`))||o(a(t,`config.json`))||o(a(t,`devhook.txt`))||o(a(t,`devhook`))||o(a(t,`.first-run`))))return;console.log(n.yellow(`Migrating data/ to .blink/...`)),await f(t,r);let i=a(e,`.gitignore`);if(o(i)){let e=s(i,`utf-8`);if(e.includes(`data`)&&!e.includes(`.blink`)){let t=e.split(`
29
+ `),r=t.findIndex(e=>e.trim().match(/^data\s*$/));r===-1?(e.endsWith(`
30
+ `)||t.push(``),t.push(`# data has migrated to .blink/`),t.push(`.blink`)):(t[r]=`.blink`,(r===0||!t[r-1]?.trim().startsWith(`#`))&&t.splice(r,0,`# data has migrated to .blink/`)),l(i,t.join(`
31
+ `)),console.log(n.green(`Updated .gitignore`))}}console.log(n.green(`Migration complete!`))}var x=e(((e,t)=>{t.exports={name:`dotenv`,version:`17.2.3`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,pretest:`npm run lint && npm run dts-check`,test:`tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000`,"test:coverage":`tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},homepage:`https://github.com/motdotla/dotenv#readme`,funding:`https://dotenvx.com`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@types/node":`^18.11.3`,decache:`^4.6.2`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-version":`^9.5.0`,tap:`^19.2.0`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),S=e(((e,n)=>{let r=t(`fs`),i=t(`path`),a=t(`os`),o=t(`crypto`),s=x().version,c=[`🔐 encrypt with Dotenvx: https://dotenvx.com`,`🔐 prevent committing .env to code: https://dotenvx.com/precommit`,`🔐 prevent building .env in docker: https://dotenvx.com/prebuild`,`📡 add observability to secrets: https://dotenvx.com/ops`,`👥 sync secrets across teammates & machines: https://dotenvx.com/ops`,`🗂️ backup and recover secrets: https://dotenvx.com/ops`,`✅ audit secrets and track compliance: https://dotenvx.com/ops`,`🔄 add secrets lifecycle management: https://dotenvx.com/ops`,`🔑 add access controls to secrets: https://dotenvx.com/ops`,"🛠️ run anywhere with `dotenvx run -- yourcommand`",`⚙️ specify custom .env file path with { path: '/custom/path/.env' }`,`⚙️ enable debug logging with { debug: true }`,`⚙️ override existing env vars with { override: true }`,`⚙️ suppress all logs with { quiet: true }`,`⚙️ write to custom object with { processEnv: myObject }`,`⚙️ load multiple .env files with { path: ['.env.local', '.env'] }`];function l(){return c[Math.floor(Math.random()*c.length)]}function u(e){return typeof e==`string`?![`false`,`0`,`no`,`off`,``].includes(e.toLowerCase()):!!e}function d(){return process.stdout.isTTY}function f(e){return d()?`\x1b[2m${e}\x1b[0m`:e}let p=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function m(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
32
32
  `);let r;for(;(r=p.exec(n))!=null;){let e=r[1],n=r[2]||``;n=n.trim();let i=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,`$2`),i===`"`&&(n=n.replace(/\\n/g,`
33
- `),n=n.replace(/\\r/g,`\r`)),t[e]=n}return t}function h(e){e||={};let t=x(e);e.path=t;let n=k.configDotenv(e);if(!n.parsed){let e=Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code=`MISSING_DATA`,e}let r=y(e).split(`,`),i=r.length,a;for(let e=0;e<i;e++)try{let t=r[e].trim(),i=b(n,t);a=k.decrypt(i.ciphertext,i.key);break}catch(t){if(e+1>=i)throw t}return k.parse(a)}function g(e){console.error(`[dotenv@${s}][WARN] ${e}`)}function _(e){console.log(`[dotenv@${s}][DEBUG] ${e}`)}function v(e){console.log(`[dotenv@${s}] ${e}`)}function y(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:``}function b(e,t){let n;try{n=new URL(t)}catch(e){if(e.code===`ERR_INVALID_URL`){let e=Error(`INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development`);throw e.code=`INVALID_DOTENV_KEY`,e}throw e}let r=n.password;if(!r){let e=Error(`INVALID_DOTENV_KEY: Missing key part`);throw e.code=`INVALID_DOTENV_KEY`,e}let i=n.searchParams.get(`environment`);if(!i){let e=Error(`INVALID_DOTENV_KEY: Missing environment part`);throw e.code=`INVALID_DOTENV_KEY`,e}let a=`DOTENV_VAULT_${i.toUpperCase()}`,o=e.parsed[a];if(!o){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);throw e.code=`NOT_FOUND_DOTENV_ENVIRONMENT`,e}return{ciphertext:o,key:r}}function x(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let n of e.path)r.existsSync(n)&&(t=n.endsWith(`.vault`)?n:`${n}.vault`);else t=e.path.endsWith(`.vault`)?e.path:`${e.path}.vault`;else t=i.resolve(process.cwd(),`.env.vault`);return r.existsSync(t)?t:null}function S(e){return e[0]===`~`?i.join(a.homedir(),e.slice(1)):e}function w(e){let t=u(process.env.DOTENV_CONFIG_DEBUG||e&&e.debug),n=u(process.env.DOTENV_CONFIG_QUIET||e&&e.quiet);(t||!n)&&v(`Loading env from encrypted .env.vault`);let r=k._parseVault(e),i=process.env;return e&&e.processEnv!=null&&(i=e.processEnv),k.populate(i,r,e),{parsed:r}}function T(e){let t=i.resolve(process.cwd(),`.env`),n=`utf8`,a=process.env;e&&e.processEnv!=null&&(a=e.processEnv);let o=u(a.DOTENV_CONFIG_DEBUG||e&&e.debug),s=u(a.DOTENV_CONFIG_QUIET||e&&e.quiet);e&&e.encoding?n=e.encoding:o&&_(`No encoding is specified. UTF-8 is used by default`);let c=[t];if(e&&e.path)if(!Array.isArray(e.path))c=[S(e.path)];else{c=[];for(let t of e.path)c.push(S(t))}let d,p={};for(let t of c)try{let i=k.parse(r.readFileSync(t,{encoding:n}));k.populate(p,i,e)}catch(e){o&&_(`Failed to load ${t} ${e.message}`),d=e}let m=k.populate(a,p,e);if(o=u(a.DOTENV_CONFIG_DEBUG||o),s=u(a.DOTENV_CONFIG_QUIET||s),o||!s){let e=Object.keys(m).length,t=[];for(let e of c)try{let n=i.relative(process.cwd(),e);t.push(n)}catch(t){o&&_(`Failed to load ${e} ${t.message}`),d=t}v(`injecting env (${e}) from ${t.join(`,`)} ${f(`-- tip: ${l()}`)}`)}return d?{parsed:p,error:d}:{parsed:p}}function E(e){if(y(e).length===0)return k.configDotenv(e);let t=x(e);return t?k._configVault(e):(g(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),k.configDotenv(e))}function D(e,t){let n=Buffer.from(t.slice(-64),`hex`),r=Buffer.from(e,`base64`),i=r.subarray(0,12),a=r.subarray(-16);r=r.subarray(12,-16);try{let e=o.createDecipheriv(`aes-256-gcm`,n,i);return e.setAuthTag(a),`${e.update(r)}${e.final()}`}catch(e){let t=e instanceof RangeError,n=e.message===`Invalid key length`,r=e.message===`Unsupported state or unable to authenticate data`;if(t||n){let e=Error(`INVALID_DOTENV_KEY: It must be 64 characters long (or more)`);throw e.code=`INVALID_DOTENV_KEY`,e}else if(r){let e=Error(`DECRYPTION_FAILED: Please check your DOTENV_KEY`);throw e.code=`DECRYPTION_FAILED`,e}else throw e}}function O(e,t,n={}){let r=!!(n&&n.debug),i=!!(n&&n.override),a={};if(typeof t!=`object`){let e=Error(`OBJECT_REQUIRED: Please check the processEnv argument being passed to populate`);throw e.code=`OBJECT_REQUIRED`,e}for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(i===!0&&(e[n]=t[n],a[n]=t[n]),r&&_(i===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):(e[n]=t[n],a[n]=t[n]);return a}let k={configDotenv:T,_configVault:w,_parseVault:h,config:E,decrypt:D,parse:m,populate:O};n.exports.configDotenv=k.configDotenv,n.exports._configVault=k._configVault,n.exports._parseVault=k._parseVault,n.exports.config=k.config,n.exports.decrypt=k.decrypt,n.exports.parse=k.parse,n.exports.populate=k.populate,n.exports=k}));async function T(e,t){let n=e;for(;n!==a(n);){let e=o(n,t);try{return await h(e),e}catch{}n=a(n)}}export{T as findNearestEntry,S as migrateDataToBlink,w as require_main,b as resolveConfig};
33
+ `),n=n.replace(/\\r/g,`\r`)),t[e]=n}return t}function h(e){e||={};let t=S(e);e.path=t;let n=k.configDotenv(e);if(!n.parsed){let e=Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code=`MISSING_DATA`,e}let r=y(e).split(`,`),i=r.length,a;for(let e=0;e<i;e++)try{let t=r[e].trim(),i=b(n,t);a=k.decrypt(i.ciphertext,i.key);break}catch(t){if(e+1>=i)throw t}return k.parse(a)}function g(e){console.error(`[dotenv@${s}][WARN] ${e}`)}function _(e){console.log(`[dotenv@${s}][DEBUG] ${e}`)}function v(e){console.log(`[dotenv@${s}] ${e}`)}function y(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:``}function b(e,t){let n;try{n=new URL(t)}catch(e){if(e.code===`ERR_INVALID_URL`){let e=Error(`INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development`);throw e.code=`INVALID_DOTENV_KEY`,e}throw e}let r=n.password;if(!r){let e=Error(`INVALID_DOTENV_KEY: Missing key part`);throw e.code=`INVALID_DOTENV_KEY`,e}let i=n.searchParams.get(`environment`);if(!i){let e=Error(`INVALID_DOTENV_KEY: Missing environment part`);throw e.code=`INVALID_DOTENV_KEY`,e}let a=`DOTENV_VAULT_${i.toUpperCase()}`,o=e.parsed[a];if(!o){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);throw e.code=`NOT_FOUND_DOTENV_ENVIRONMENT`,e}return{ciphertext:o,key:r}}function S(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let n of e.path)r.existsSync(n)&&(t=n.endsWith(`.vault`)?n:`${n}.vault`);else t=e.path.endsWith(`.vault`)?e.path:`${e.path}.vault`;else t=i.resolve(process.cwd(),`.env.vault`);return r.existsSync(t)?t:null}function C(e){return e[0]===`~`?i.join(a.homedir(),e.slice(1)):e}function w(e){let t=u(process.env.DOTENV_CONFIG_DEBUG||e&&e.debug),n=u(process.env.DOTENV_CONFIG_QUIET||e&&e.quiet);(t||!n)&&v(`Loading env from encrypted .env.vault`);let r=k._parseVault(e),i=process.env;return e&&e.processEnv!=null&&(i=e.processEnv),k.populate(i,r,e),{parsed:r}}function T(e){let t=i.resolve(process.cwd(),`.env`),n=`utf8`,a=process.env;e&&e.processEnv!=null&&(a=e.processEnv);let o=u(a.DOTENV_CONFIG_DEBUG||e&&e.debug),s=u(a.DOTENV_CONFIG_QUIET||e&&e.quiet);e&&e.encoding?n=e.encoding:o&&_(`No encoding is specified. UTF-8 is used by default`);let c=[t];if(e&&e.path)if(!Array.isArray(e.path))c=[C(e.path)];else{c=[];for(let t of e.path)c.push(C(t))}let d,p={};for(let t of c)try{let i=k.parse(r.readFileSync(t,{encoding:n}));k.populate(p,i,e)}catch(e){o&&_(`Failed to load ${t} ${e.message}`),d=e}let m=k.populate(a,p,e);if(o=u(a.DOTENV_CONFIG_DEBUG||o),s=u(a.DOTENV_CONFIG_QUIET||s),o||!s){let e=Object.keys(m).length,t=[];for(let e of c)try{let n=i.relative(process.cwd(),e);t.push(n)}catch(t){o&&_(`Failed to load ${e} ${t.message}`),d=t}v(`injecting env (${e}) from ${t.join(`,`)} ${f(`-- tip: ${l()}`)}`)}return d?{parsed:p,error:d}:{parsed:p}}function E(e){if(y(e).length===0)return k.configDotenv(e);let t=S(e);return t?k._configVault(e):(g(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),k.configDotenv(e))}function D(e,t){let n=Buffer.from(t.slice(-64),`hex`),r=Buffer.from(e,`base64`),i=r.subarray(0,12),a=r.subarray(-16);r=r.subarray(12,-16);try{let e=o.createDecipheriv(`aes-256-gcm`,n,i);return e.setAuthTag(a),`${e.update(r)}${e.final()}`}catch(e){let t=e instanceof RangeError,n=e.message===`Invalid key length`,r=e.message===`Unsupported state or unable to authenticate data`;if(t||n){let e=Error(`INVALID_DOTENV_KEY: It must be 64 characters long (or more)`);throw e.code=`INVALID_DOTENV_KEY`,e}else if(r){let e=Error(`DECRYPTION_FAILED: Please check your DOTENV_KEY`);throw e.code=`DECRYPTION_FAILED`,e}else throw e}}function O(e,t,n={}){let r=!!(n&&n.debug),i=!!(n&&n.override),a={};if(typeof t!=`object`){let e=Error(`OBJECT_REQUIRED: Please check the processEnv argument being passed to populate`);throw e.code=`OBJECT_REQUIRED`,e}for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(i===!0&&(e[n]=t[n],a[n]=t[n]),r&&_(i===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):(e[n]=t[n],a[n]=t[n]);return a}let k={configDotenv:T,_configVault:w,_parseVault:h,config:E,decrypt:D,parse:m,populate:O};n.exports.configDotenv=k.configDotenv,n.exports._configVault=k._configVault,n.exports._parseVault=k._parseVault,n.exports.config=k.config,n.exports.decrypt=k.decrypt,n.exports.parse=k.parse,n.exports.populate=k.populate,n.exports=k}));async function C(e,t){let n=e;for(;n!==i(n);){let e=a(n,t);try{return await m(e),e}catch{}n=i(n)}}export{C as findNearestEntry,b as migrateDataToBlink,S as require_main,y as resolveConfig};