@formfeed/mcp 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.md +1 -1
- package/bin/formfeed-mcp.mjs +351 -217
- package/package.json +1 -1
package/THIRD_PARTY_LICENSES.md
CHANGED
package/bin/formfeed-mcp.mjs
CHANGED
|
@@ -4601,9 +4601,9 @@ var require_lib = __commonJS({
|
|
|
4601
4601
|
}
|
|
4602
4602
|
});
|
|
4603
4603
|
|
|
4604
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4604
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/utils.js
|
|
4605
4605
|
var require_utils3 = __commonJS({
|
|
4606
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4606
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/utils.js"(exports) {
|
|
4607
4607
|
"use strict";
|
|
4608
4608
|
exports.__esModule = true;
|
|
4609
4609
|
exports.extend = extend;
|
|
@@ -4662,7 +4662,7 @@ var require_utils3 = __commonJS({
|
|
|
4662
4662
|
}
|
|
4663
4663
|
function escapeExpression(string) {
|
|
4664
4664
|
if (typeof string !== "string") {
|
|
4665
|
-
if (string && string.toHTML) {
|
|
4665
|
+
if (string && typeof string.toHTML === "function") {
|
|
4666
4666
|
return string.toHTML();
|
|
4667
4667
|
} else if (string == null) {
|
|
4668
4668
|
return "";
|
|
@@ -4700,19 +4700,21 @@ var require_utils3 = __commonJS({
|
|
|
4700
4700
|
}
|
|
4701
4701
|
});
|
|
4702
4702
|
|
|
4703
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4703
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/exception.js
|
|
4704
4704
|
var require_exception = __commonJS({
|
|
4705
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4705
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/exception.js"(exports, module) {
|
|
4706
4706
|
"use strict";
|
|
4707
4707
|
exports.__esModule = true;
|
|
4708
4708
|
var errorProps = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"];
|
|
4709
4709
|
function Exception(message2, node) {
|
|
4710
4710
|
var loc = node && node.loc, line2 = void 0, endLineNumber = void 0, column = void 0, endColumn = void 0;
|
|
4711
|
-
if (loc) {
|
|
4711
|
+
if (loc && loc.start) {
|
|
4712
4712
|
line2 = loc.start.line;
|
|
4713
|
-
endLineNumber = loc.end.line;
|
|
4714
4713
|
column = loc.start.column;
|
|
4715
|
-
|
|
4714
|
+
if (loc.end) {
|
|
4715
|
+
endLineNumber = loc.end.line;
|
|
4716
|
+
endColumn = loc.end.column;
|
|
4717
|
+
}
|
|
4716
4718
|
message2 += " - " + line2 + ":" + column;
|
|
4717
4719
|
}
|
|
4718
4720
|
var tmp = Error.prototype.constructor.call(this, message2);
|
|
@@ -4749,9 +4751,9 @@ var require_exception = __commonJS({
|
|
|
4749
4751
|
}
|
|
4750
4752
|
});
|
|
4751
4753
|
|
|
4752
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4754
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js
|
|
4753
4755
|
var require_block_helper_missing = __commonJS({
|
|
4754
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4756
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js"(exports, module) {
|
|
4755
4757
|
"use strict";
|
|
4756
4758
|
exports.__esModule = true;
|
|
4757
4759
|
var _utils = require_utils3();
|
|
@@ -4785,9 +4787,9 @@ var require_block_helper_missing = __commonJS({
|
|
|
4785
4787
|
}
|
|
4786
4788
|
});
|
|
4787
4789
|
|
|
4788
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4790
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js
|
|
4789
4791
|
var require_each = __commonJS({
|
|
4790
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4792
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js"(exports, module) {
|
|
4791
4793
|
"use strict";
|
|
4792
4794
|
exports.__esModule = true;
|
|
4793
4795
|
function _interopRequireDefault(obj) {
|
|
@@ -4796,6 +4798,15 @@ var require_each = __commonJS({
|
|
|
4796
4798
|
var _utils = require_utils3();
|
|
4797
4799
|
var _exception = require_exception();
|
|
4798
4800
|
var _exception2 = _interopRequireDefault(_exception);
|
|
4801
|
+
function closeIterator(iterator) {
|
|
4802
|
+
try {
|
|
4803
|
+
var _close = iterator["return"];
|
|
4804
|
+
if (_utils.isFunction(_close)) {
|
|
4805
|
+
_close.call(iterator);
|
|
4806
|
+
}
|
|
4807
|
+
} catch (closeError) {
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4799
4810
|
exports["default"] = function(instance) {
|
|
4800
4811
|
instance.registerHelper("each", function(context, options) {
|
|
4801
4812
|
if (!options) {
|
|
@@ -4811,7 +4822,7 @@ var require_each = __commonJS({
|
|
|
4811
4822
|
if (options.data) {
|
|
4812
4823
|
data = _utils.createFrame(options.data);
|
|
4813
4824
|
}
|
|
4814
|
-
function execIteration(field, index, last) {
|
|
4825
|
+
function execIteration(field, index, last, value) {
|
|
4815
4826
|
if (data) {
|
|
4816
4827
|
data.key = field;
|
|
4817
4828
|
data.index = index;
|
|
@@ -4821,40 +4832,46 @@ var require_each = __commonJS({
|
|
|
4821
4832
|
data.contextPath = contextPath + field;
|
|
4822
4833
|
}
|
|
4823
4834
|
}
|
|
4824
|
-
ret = ret + fn(
|
|
4835
|
+
ret = ret + fn(value, {
|
|
4825
4836
|
data,
|
|
4826
|
-
blockParams: _utils.blockParams([
|
|
4837
|
+
blockParams: _utils.blockParams([value, field], [contextPath + field, null])
|
|
4827
4838
|
});
|
|
4828
4839
|
}
|
|
4829
4840
|
if (context && typeof context === "object") {
|
|
4830
4841
|
if (_utils.isArray(context)) {
|
|
4831
4842
|
for (var j2 = context.length; i < j2; i++) {
|
|
4832
4843
|
if (i in context) {
|
|
4833
|
-
execIteration(i, i, i === context.length - 1);
|
|
4844
|
+
execIteration(i, i, i === context.length - 1, context[i]);
|
|
4834
4845
|
}
|
|
4835
4846
|
}
|
|
4836
4847
|
} else if (typeof Symbol === "function" && context[Symbol.iterator]) {
|
|
4837
|
-
var newContext = [];
|
|
4838
4848
|
var iterator = context[Symbol.iterator]();
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4849
|
+
var current = iterator.next();
|
|
4850
|
+
while (!current.done) {
|
|
4851
|
+
var next = iterator.next();
|
|
4852
|
+
try {
|
|
4853
|
+
execIteration(i, i, next.done, current.value);
|
|
4854
|
+
} catch (e) {
|
|
4855
|
+
if (!next.done) {
|
|
4856
|
+
closeIterator(iterator);
|
|
4857
|
+
}
|
|
4858
|
+
throw e;
|
|
4859
|
+
}
|
|
4860
|
+
current = next;
|
|
4861
|
+
i++;
|
|
4845
4862
|
}
|
|
4846
4863
|
} else {
|
|
4847
4864
|
(function() {
|
|
4848
4865
|
var priorKey = void 0;
|
|
4849
4866
|
Object.keys(context).forEach(function(key) {
|
|
4850
4867
|
if (priorKey !== void 0) {
|
|
4851
|
-
execIteration(priorKey, i - 1);
|
|
4868
|
+
execIteration(priorKey, i - 1, false, context[priorKey]);
|
|
4852
4869
|
}
|
|
4853
4870
|
priorKey = key;
|
|
4854
4871
|
i++;
|
|
4855
4872
|
});
|
|
4856
4873
|
if (priorKey !== void 0) {
|
|
4857
|
-
execIteration(priorKey, i - 1, true);
|
|
4874
|
+
execIteration(priorKey, i - 1, true, context[priorKey]);
|
|
4858
4875
|
}
|
|
4859
4876
|
})();
|
|
4860
4877
|
}
|
|
@@ -4869,9 +4886,9 @@ var require_each = __commonJS({
|
|
|
4869
4886
|
}
|
|
4870
4887
|
});
|
|
4871
4888
|
|
|
4872
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4889
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js
|
|
4873
4890
|
var require_helper_missing = __commonJS({
|
|
4874
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4891
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js"(exports, module) {
|
|
4875
4892
|
"use strict";
|
|
4876
4893
|
exports.__esModule = true;
|
|
4877
4894
|
function _interopRequireDefault(obj) {
|
|
@@ -4892,9 +4909,9 @@ var require_helper_missing = __commonJS({
|
|
|
4892
4909
|
}
|
|
4893
4910
|
});
|
|
4894
4911
|
|
|
4895
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4912
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js
|
|
4896
4913
|
var require_if = __commonJS({
|
|
4897
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4914
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js"(exports, module) {
|
|
4898
4915
|
"use strict";
|
|
4899
4916
|
exports.__esModule = true;
|
|
4900
4917
|
function _interopRequireDefault(obj) {
|
|
@@ -4932,9 +4949,9 @@ var require_if = __commonJS({
|
|
|
4932
4949
|
}
|
|
4933
4950
|
});
|
|
4934
4951
|
|
|
4935
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4952
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js
|
|
4936
4953
|
var require_log = __commonJS({
|
|
4937
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4954
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js"(exports, module) {
|
|
4938
4955
|
"use strict";
|
|
4939
4956
|
exports.__esModule = true;
|
|
4940
4957
|
exports["default"] = function(instance) {
|
|
@@ -4957,9 +4974,9 @@ var require_log = __commonJS({
|
|
|
4957
4974
|
}
|
|
4958
4975
|
});
|
|
4959
4976
|
|
|
4960
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4977
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js
|
|
4961
4978
|
var require_lookup = __commonJS({
|
|
4962
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4979
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js"(exports, module) {
|
|
4963
4980
|
"use strict";
|
|
4964
4981
|
exports.__esModule = true;
|
|
4965
4982
|
exports["default"] = function(instance) {
|
|
@@ -4974,9 +4991,9 @@ var require_lookup = __commonJS({
|
|
|
4974
4991
|
}
|
|
4975
4992
|
});
|
|
4976
4993
|
|
|
4977
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
4994
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js
|
|
4978
4995
|
var require_with = __commonJS({
|
|
4979
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
4996
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js"(exports, module) {
|
|
4980
4997
|
"use strict";
|
|
4981
4998
|
exports.__esModule = true;
|
|
4982
4999
|
function _interopRequireDefault(obj) {
|
|
@@ -5013,9 +5030,9 @@ var require_with = __commonJS({
|
|
|
5013
5030
|
}
|
|
5014
5031
|
});
|
|
5015
5032
|
|
|
5016
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5033
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers.js
|
|
5017
5034
|
var require_helpers = __commonJS({
|
|
5018
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5035
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/helpers.js"(exports) {
|
|
5019
5036
|
"use strict";
|
|
5020
5037
|
exports.__esModule = true;
|
|
5021
5038
|
exports.registerDefaultHelpers = registerDefaultHelpers;
|
|
@@ -5057,9 +5074,9 @@ var require_helpers = __commonJS({
|
|
|
5057
5074
|
}
|
|
5058
5075
|
});
|
|
5059
5076
|
|
|
5060
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5077
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js
|
|
5061
5078
|
var require_inline = __commonJS({
|
|
5062
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5079
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js"(exports, module) {
|
|
5063
5080
|
"use strict";
|
|
5064
5081
|
exports.__esModule = true;
|
|
5065
5082
|
var _utils = require_utils3();
|
|
@@ -5084,9 +5101,9 @@ var require_inline = __commonJS({
|
|
|
5084
5101
|
}
|
|
5085
5102
|
});
|
|
5086
5103
|
|
|
5087
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5104
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/decorators.js
|
|
5088
5105
|
var require_decorators = __commonJS({
|
|
5089
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5106
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/decorators.js"(exports) {
|
|
5090
5107
|
"use strict";
|
|
5091
5108
|
exports.__esModule = true;
|
|
5092
5109
|
exports.registerDefaultDecorators = registerDefaultDecorators;
|
|
@@ -5101,9 +5118,9 @@ var require_decorators = __commonJS({
|
|
|
5101
5118
|
}
|
|
5102
5119
|
});
|
|
5103
5120
|
|
|
5104
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5121
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/logger.js
|
|
5105
5122
|
var require_logger = __commonJS({
|
|
5106
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5123
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/logger.js"(exports, module) {
|
|
5107
5124
|
"use strict";
|
|
5108
5125
|
exports.__esModule = true;
|
|
5109
5126
|
var _utils = require_utils3();
|
|
@@ -5142,13 +5159,14 @@ var require_logger = __commonJS({
|
|
|
5142
5159
|
}
|
|
5143
5160
|
});
|
|
5144
5161
|
|
|
5145
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5162
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
|
|
5146
5163
|
var require_proto_access = __commonJS({
|
|
5147
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5164
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports) {
|
|
5148
5165
|
"use strict";
|
|
5149
5166
|
exports.__esModule = true;
|
|
5150
5167
|
exports.createProtoAccessControl = createProtoAccessControl;
|
|
5151
5168
|
exports.resultIsAllowed = resultIsAllowed;
|
|
5169
|
+
exports.isPrototypeConstructor = isPrototypeConstructor;
|
|
5152
5170
|
exports.resetLoggedProperties = resetLoggedProperties;
|
|
5153
5171
|
function _interopRequireDefault(obj) {
|
|
5154
5172
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
@@ -5186,6 +5204,9 @@ var require_proto_access = __commonJS({
|
|
|
5186
5204
|
return checkWhiteList(protoAccessControl.properties, propertyName);
|
|
5187
5205
|
}
|
|
5188
5206
|
}
|
|
5207
|
+
function isPrototypeConstructor(parent, propertyName, result) {
|
|
5208
|
+
return propertyName === "constructor" && typeof result === "function" && parent === result.prototype;
|
|
5209
|
+
}
|
|
5189
5210
|
function checkWhiteList(protoAccessControlForType, propertyName) {
|
|
5190
5211
|
if (protoAccessControlForType.whitelist[propertyName] !== void 0) {
|
|
5191
5212
|
return protoAccessControlForType.whitelist[propertyName] === true;
|
|
@@ -5210,9 +5231,9 @@ var require_proto_access = __commonJS({
|
|
|
5210
5231
|
}
|
|
5211
5232
|
});
|
|
5212
5233
|
|
|
5213
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5234
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/base.js
|
|
5214
5235
|
var require_base = __commonJS({
|
|
5215
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5236
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/base.js"(exports) {
|
|
5216
5237
|
"use strict";
|
|
5217
5238
|
exports.__esModule = true;
|
|
5218
5239
|
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
|
@@ -5227,7 +5248,7 @@ var require_base = __commonJS({
|
|
|
5227
5248
|
var _logger = require_logger();
|
|
5228
5249
|
var _logger2 = _interopRequireDefault(_logger);
|
|
5229
5250
|
var _internalProtoAccess = require_proto_access();
|
|
5230
|
-
var VERSION = "4.7.
|
|
5251
|
+
var VERSION = "4.7.10";
|
|
5231
5252
|
exports.VERSION = VERSION;
|
|
5232
5253
|
var COMPILER_REVISION = 8;
|
|
5233
5254
|
exports.COMPILER_REVISION = COMPILER_REVISION;
|
|
@@ -5311,9 +5332,9 @@ var require_base = __commonJS({
|
|
|
5311
5332
|
}
|
|
5312
5333
|
});
|
|
5313
5334
|
|
|
5314
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5335
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/safe-string.js
|
|
5315
5336
|
var require_safe_string = __commonJS({
|
|
5316
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5337
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/safe-string.js"(exports, module) {
|
|
5317
5338
|
"use strict";
|
|
5318
5339
|
exports.__esModule = true;
|
|
5319
5340
|
function SafeString(string) {
|
|
@@ -5327,9 +5348,9 @@ var require_safe_string = __commonJS({
|
|
|
5327
5348
|
}
|
|
5328
5349
|
});
|
|
5329
5350
|
|
|
5330
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5351
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js
|
|
5331
5352
|
var require_wrapHelper = __commonJS({
|
|
5332
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5353
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js"(exports) {
|
|
5333
5354
|
"use strict";
|
|
5334
5355
|
exports.__esModule = true;
|
|
5335
5356
|
exports.wrapHelper = wrapHelper;
|
|
@@ -5347,9 +5368,9 @@ var require_wrapHelper = __commonJS({
|
|
|
5347
5368
|
}
|
|
5348
5369
|
});
|
|
5349
5370
|
|
|
5350
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5371
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/runtime.js
|
|
5351
5372
|
var require_runtime = __commonJS({
|
|
5352
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5373
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/runtime.js"(exports) {
|
|
5353
5374
|
"use strict";
|
|
5354
5375
|
exports.__esModule = true;
|
|
5355
5376
|
exports.checkRevision = checkRevision;
|
|
@@ -5416,7 +5437,13 @@ var require_runtime = __commonJS({
|
|
|
5416
5437
|
options.hooks = this.hooks;
|
|
5417
5438
|
options.protoAccessControl = this.protoAccessControl;
|
|
5418
5439
|
var result = env.VM.invokePartial.call(this, partial, context, options);
|
|
5440
|
+
if (result == null && Utils.isFunction(partial)) {
|
|
5441
|
+
throw new _exception2["default"]("The partial " + options.name + " returned no output: partials must return a string");
|
|
5442
|
+
}
|
|
5419
5443
|
if (result == null && env.compile) {
|
|
5444
|
+
if (typeof partial !== "string") {
|
|
5445
|
+
throw new _exception2["default"]("The partial " + options.name + " could not be compiled: partials must be strings or functions returning strings");
|
|
5446
|
+
}
|
|
5420
5447
|
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
|
5421
5448
|
result = options.partials[options.name](context, options);
|
|
5422
5449
|
}
|
|
@@ -5450,7 +5477,7 @@ var require_runtime = __commonJS({
|
|
|
5450
5477
|
if (result == null) {
|
|
5451
5478
|
return result;
|
|
5452
5479
|
}
|
|
5453
|
-
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
5480
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName) && !_internalProtoAccess.isPrototypeConstructor(parent, propertyName, result)) {
|
|
5454
5481
|
return result;
|
|
5455
5482
|
}
|
|
5456
5483
|
if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
|
|
@@ -5585,7 +5612,7 @@ var require_runtime = __commonJS({
|
|
|
5585
5612
|
} else {
|
|
5586
5613
|
partial = lookupOwnProperty(options.partials, options.name);
|
|
5587
5614
|
}
|
|
5588
|
-
} else if (
|
|
5615
|
+
} else if (typeof partial !== "function" && !options.name) {
|
|
5589
5616
|
options.name = partial;
|
|
5590
5617
|
partial = lookupOwnProperty(options.partials, partial);
|
|
5591
5618
|
}
|
|
@@ -5662,9 +5689,9 @@ var require_runtime = __commonJS({
|
|
|
5662
5689
|
}
|
|
5663
5690
|
});
|
|
5664
5691
|
|
|
5665
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5692
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js
|
|
5666
5693
|
var require_no_conflict = __commonJS({
|
|
5667
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5694
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js"(exports, module) {
|
|
5668
5695
|
"use strict";
|
|
5669
5696
|
exports.__esModule = true;
|
|
5670
5697
|
exports["default"] = function(Handlebars2) {
|
|
@@ -5688,9 +5715,9 @@ var require_no_conflict = __commonJS({
|
|
|
5688
5715
|
}
|
|
5689
5716
|
});
|
|
5690
5717
|
|
|
5691
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5718
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars.runtime.js
|
|
5692
5719
|
var require_handlebars_runtime = __commonJS({
|
|
5693
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5720
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars.runtime.js"(exports, module) {
|
|
5694
5721
|
"use strict";
|
|
5695
5722
|
exports.__esModule = true;
|
|
5696
5723
|
function _interopRequireDefault(obj) {
|
|
@@ -5744,9 +5771,9 @@ var require_handlebars_runtime = __commonJS({
|
|
|
5744
5771
|
}
|
|
5745
5772
|
});
|
|
5746
5773
|
|
|
5747
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5774
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js
|
|
5748
5775
|
var require_ast = __commonJS({
|
|
5749
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5776
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js"(exports, module) {
|
|
5750
5777
|
"use strict";
|
|
5751
5778
|
exports.__esModule = true;
|
|
5752
5779
|
var AST = {
|
|
@@ -5773,9 +5800,9 @@ var require_ast = __commonJS({
|
|
|
5773
5800
|
}
|
|
5774
5801
|
});
|
|
5775
5802
|
|
|
5776
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
5803
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js
|
|
5777
5804
|
var require_parser2 = __commonJS({
|
|
5778
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
5805
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js"(exports, module) {
|
|
5779
5806
|
"use strict";
|
|
5780
5807
|
exports.__esModule = true;
|
|
5781
5808
|
var handlebars = (function() {
|
|
@@ -6483,9 +6510,19 @@ var require_parser2 = __commonJS({
|
|
|
6483
6510
|
}
|
|
6484
6511
|
});
|
|
6485
6512
|
|
|
6486
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
6513
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/node-types.js
|
|
6514
|
+
var require_node_types = __commonJS({
|
|
6515
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/node-types.js"(exports) {
|
|
6516
|
+
"use strict";
|
|
6517
|
+
exports.__esModule = true;
|
|
6518
|
+
var NODE_TYPES = ["Program", "BlockStatement", "DecoratorBlock", "PartialStatement", "PartialBlockStatement", "Decorator", "MustacheStatement", "ContentStatement", "CommentStatement", "SubExpression", "PathExpression", "StringLiteral", "NumberLiteral", "BooleanLiteral", "UndefinedLiteral", "NullLiteral", "Hash", "HashPair"];
|
|
6519
|
+
exports.NODE_TYPES = NODE_TYPES;
|
|
6520
|
+
}
|
|
6521
|
+
});
|
|
6522
|
+
|
|
6523
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js
|
|
6487
6524
|
var require_visitor = __commonJS({
|
|
6488
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
6525
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js"(exports, module) {
|
|
6489
6526
|
"use strict";
|
|
6490
6527
|
exports.__esModule = true;
|
|
6491
6528
|
function _interopRequireDefault(obj) {
|
|
@@ -6493,9 +6530,14 @@ var require_visitor = __commonJS({
|
|
|
6493
6530
|
}
|
|
6494
6531
|
var _exception = require_exception();
|
|
6495
6532
|
var _exception2 = _interopRequireDefault(_exception);
|
|
6533
|
+
var _utils = require_utils3();
|
|
6534
|
+
var _nodeTypes = require_node_types();
|
|
6496
6535
|
function Visitor() {
|
|
6497
6536
|
this.parents = [];
|
|
6498
6537
|
}
|
|
6538
|
+
function isDispatchable(visitor, type) {
|
|
6539
|
+
return _utils.indexOf(_nodeTypes.NODE_TYPES, type) !== -1 || !(type in Visitor.prototype) && typeof visitor[type] === "function";
|
|
6540
|
+
}
|
|
6499
6541
|
Visitor.prototype = {
|
|
6500
6542
|
constructor: Visitor,
|
|
6501
6543
|
mutating: false,
|
|
@@ -6503,7 +6545,7 @@ var require_visitor = __commonJS({
|
|
|
6503
6545
|
acceptKey: function acceptKey(node, name) {
|
|
6504
6546
|
var value = this.accept(node[name]);
|
|
6505
6547
|
if (this.mutating) {
|
|
6506
|
-
if (value && !
|
|
6548
|
+
if (value && !isDispatchable(this, value.type)) {
|
|
6507
6549
|
throw new _exception2["default"]('Unexpected node type "' + value.type + '" found when accepting ' + name + " on " + node.type);
|
|
6508
6550
|
}
|
|
6509
6551
|
node[name] = value;
|
|
@@ -6533,7 +6575,7 @@ var require_visitor = __commonJS({
|
|
|
6533
6575
|
if (!object) {
|
|
6534
6576
|
return;
|
|
6535
6577
|
}
|
|
6536
|
-
if (!this[object.type]) {
|
|
6578
|
+
if (!isDispatchable(this, object.type) || !this[object.type]) {
|
|
6537
6579
|
throw new _exception2["default"]("Unknown type: " + object.type, object);
|
|
6538
6580
|
}
|
|
6539
6581
|
if (this.current) {
|
|
@@ -6604,9 +6646,9 @@ var require_visitor = __commonJS({
|
|
|
6604
6646
|
}
|
|
6605
6647
|
});
|
|
6606
6648
|
|
|
6607
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
6649
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js
|
|
6608
6650
|
var require_whitespace_control = __commonJS({
|
|
6609
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
6651
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js"(exports, module) {
|
|
6610
6652
|
"use strict";
|
|
6611
6653
|
exports.__esModule = true;
|
|
6612
6654
|
function _interopRequireDefault(obj) {
|
|
@@ -6640,7 +6682,7 @@ var require_whitespace_control = __commonJS({
|
|
|
6640
6682
|
omitRight(body, i);
|
|
6641
6683
|
if (omitLeft(body, i)) {
|
|
6642
6684
|
if (current.type === "PartialStatement") {
|
|
6643
|
-
current.indent = /([ \t]
|
|
6685
|
+
current.indent = /(?:^|[^ \t])([ \t]+)$/.exec(body[i - 1].original)[1];
|
|
6644
6686
|
}
|
|
6645
6687
|
}
|
|
6646
6688
|
}
|
|
@@ -6716,7 +6758,7 @@ var require_whitespace_control = __commonJS({
|
|
|
6716
6758
|
return isRoot;
|
|
6717
6759
|
}
|
|
6718
6760
|
if (prev.type === "ContentStatement") {
|
|
6719
|
-
return (sibling || !isRoot ?
|
|
6761
|
+
return (sibling || !isRoot ? /(?:^|\S)[^\S\n]*\n\s*$/ : /^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(prev.original);
|
|
6720
6762
|
}
|
|
6721
6763
|
}
|
|
6722
6764
|
function isNextWhitespace(body, i, isRoot) {
|
|
@@ -6746,7 +6788,7 @@ var require_whitespace_control = __commonJS({
|
|
|
6746
6788
|
return;
|
|
6747
6789
|
}
|
|
6748
6790
|
var original = current.value;
|
|
6749
|
-
current.value = current.value.replace(multiple ?
|
|
6791
|
+
current.value = current.value.replace(multiple ? /(^|\S)\s+$/ : /(^|[^ \t])[ \t]+$/, "$1");
|
|
6750
6792
|
current.leftStripped = current.value !== original;
|
|
6751
6793
|
return current.leftStripped;
|
|
6752
6794
|
}
|
|
@@ -6755,9 +6797,9 @@ var require_whitespace_control = __commonJS({
|
|
|
6755
6797
|
}
|
|
6756
6798
|
});
|
|
6757
6799
|
|
|
6758
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
6800
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js
|
|
6759
6801
|
var require_helpers2 = __commonJS({
|
|
6760
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
6802
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js"(exports) {
|
|
6761
6803
|
"use strict";
|
|
6762
6804
|
exports.__esModule = true;
|
|
6763
6805
|
exports.SourceLocation = SourceLocation;
|
|
@@ -6943,9 +6985,9 @@ var require_helpers2 = __commonJS({
|
|
|
6943
6985
|
}
|
|
6944
6986
|
});
|
|
6945
6987
|
|
|
6946
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
6988
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js
|
|
6947
6989
|
var require_base2 = __commonJS({
|
|
6948
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
6990
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js"(exports) {
|
|
6949
6991
|
"use strict";
|
|
6950
6992
|
exports.__esModule = true;
|
|
6951
6993
|
exports.parseWithoutProcessing = parseWithoutProcessing;
|
|
@@ -6973,15 +7015,12 @@ var require_base2 = __commonJS({
|
|
|
6973
7015
|
var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
|
6974
7016
|
var _helpers = require_helpers2();
|
|
6975
7017
|
var Helpers = _interopRequireWildcard(_helpers);
|
|
6976
|
-
var _exception = require_exception();
|
|
6977
|
-
var _exception2 = _interopRequireDefault(_exception);
|
|
6978
7018
|
var _utils = require_utils3();
|
|
6979
7019
|
exports.parser = _parser2["default"];
|
|
6980
7020
|
var yy = {};
|
|
6981
7021
|
_utils.extend(yy, Helpers);
|
|
6982
7022
|
function parseWithoutProcessing(input, options) {
|
|
6983
7023
|
if (input.type === "Program") {
|
|
6984
|
-
validateInputAst(input);
|
|
6985
7024
|
return input;
|
|
6986
7025
|
}
|
|
6987
7026
|
_parser2["default"].yy = yy;
|
|
@@ -6996,57 +7035,12 @@ var require_base2 = __commonJS({
|
|
|
6996
7035
|
var strip = new _whitespaceControl2["default"](options);
|
|
6997
7036
|
return strip.accept(ast);
|
|
6998
7037
|
}
|
|
6999
|
-
function validateInputAst(ast) {
|
|
7000
|
-
validateAstNode(ast);
|
|
7001
|
-
}
|
|
7002
|
-
function validateAstNode(node) {
|
|
7003
|
-
if (node == null) {
|
|
7004
|
-
return;
|
|
7005
|
-
}
|
|
7006
|
-
if (Array.isArray(node)) {
|
|
7007
|
-
node.forEach(validateAstNode);
|
|
7008
|
-
return;
|
|
7009
|
-
}
|
|
7010
|
-
if (typeof node !== "object") {
|
|
7011
|
-
return;
|
|
7012
|
-
}
|
|
7013
|
-
if (node.type === "PathExpression") {
|
|
7014
|
-
if (!isValidDepth(node.depth)) {
|
|
7015
|
-
throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
|
|
7016
|
-
}
|
|
7017
|
-
if (!Array.isArray(node.parts)) {
|
|
7018
|
-
throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
|
|
7019
|
-
}
|
|
7020
|
-
for (var i = 0; i < node.parts.length; i++) {
|
|
7021
|
-
if (typeof node.parts[i] !== "string") {
|
|
7022
|
-
throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
|
|
7023
|
-
}
|
|
7024
|
-
}
|
|
7025
|
-
} else if (node.type === "NumberLiteral") {
|
|
7026
|
-
if (typeof node.value !== "number" || !isFinite(node.value)) {
|
|
7027
|
-
throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
|
|
7028
|
-
}
|
|
7029
|
-
} else if (node.type === "BooleanLiteral") {
|
|
7030
|
-
if (typeof node.value !== "boolean") {
|
|
7031
|
-
throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
|
|
7032
|
-
}
|
|
7033
|
-
}
|
|
7034
|
-
Object.keys(node).forEach(function(propertyName) {
|
|
7035
|
-
if (propertyName === "loc") {
|
|
7036
|
-
return;
|
|
7037
|
-
}
|
|
7038
|
-
validateAstNode(node[propertyName]);
|
|
7039
|
-
});
|
|
7040
|
-
}
|
|
7041
|
-
function isValidDepth(depth) {
|
|
7042
|
-
return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
|
|
7043
|
-
}
|
|
7044
7038
|
}
|
|
7045
7039
|
});
|
|
7046
7040
|
|
|
7047
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
7041
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js
|
|
7048
7042
|
var require_compiler = __commonJS({
|
|
7049
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
7043
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js"(exports) {
|
|
7050
7044
|
"use strict";
|
|
7051
7045
|
exports.__esModule = true;
|
|
7052
7046
|
exports.Compiler = Compiler;
|
|
@@ -7060,6 +7054,7 @@ var require_compiler = __commonJS({
|
|
|
7060
7054
|
var _utils = require_utils3();
|
|
7061
7055
|
var _ast = require_ast();
|
|
7062
7056
|
var _ast2 = _interopRequireDefault(_ast);
|
|
7057
|
+
var _nodeTypes = require_node_types();
|
|
7063
7058
|
var slice = [].slice;
|
|
7064
7059
|
function Compiler() {
|
|
7065
7060
|
}
|
|
@@ -7113,7 +7108,7 @@ var require_compiler = __commonJS({
|
|
|
7113
7108
|
return guid;
|
|
7114
7109
|
},
|
|
7115
7110
|
accept: function accept(node) {
|
|
7116
|
-
if (!this[node.type]) {
|
|
7111
|
+
if (_utils.indexOf(_nodeTypes.NODE_TYPES, node.type) === -1 || !this[node.type]) {
|
|
7117
7112
|
throw new _exception2["default"]("Unknown type: " + node.type, node);
|
|
7118
7113
|
}
|
|
7119
7114
|
this.sourceNode.unshift(node);
|
|
@@ -7122,6 +7117,7 @@ var require_compiler = __commonJS({
|
|
|
7122
7117
|
return ret;
|
|
7123
7118
|
},
|
|
7124
7119
|
Program: function Program(program) {
|
|
7120
|
+
validateBlockParams(program);
|
|
7125
7121
|
this.options.blockParams.unshift(program.blockParams);
|
|
7126
7122
|
var body = program.body, bodyLength = body.length;
|
|
7127
7123
|
for (var i = 0; i < bodyLength; i++) {
|
|
@@ -7205,6 +7201,9 @@ var require_compiler = __commonJS({
|
|
|
7205
7201
|
this.DecoratorBlock(decorator);
|
|
7206
7202
|
},
|
|
7207
7203
|
ContentStatement: function ContentStatement(content) {
|
|
7204
|
+
if (content.value != null && typeof content.value !== "string") {
|
|
7205
|
+
throw invalidAst(content, "value must be a string");
|
|
7206
|
+
}
|
|
7208
7207
|
if (content.value) {
|
|
7209
7208
|
this.opcode("appendContent", content.value);
|
|
7210
7209
|
}
|
|
@@ -7224,7 +7223,7 @@ var require_compiler = __commonJS({
|
|
|
7224
7223
|
},
|
|
7225
7224
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
|
7226
7225
|
var path = sexpr.path, name = path.parts[0], isBlock = program != null || inverse != null;
|
|
7227
|
-
this.opcode("getContext", path
|
|
7226
|
+
this.opcode("getContext", validateDepth(path));
|
|
7228
7227
|
this.opcode("pushProgram", program);
|
|
7229
7228
|
this.opcode("pushProgram", inverse);
|
|
7230
7229
|
path.strict = true;
|
|
@@ -7251,27 +7250,32 @@ var require_compiler = __commonJS({
|
|
|
7251
7250
|
}
|
|
7252
7251
|
},
|
|
7253
7252
|
PathExpression: function PathExpression(path) {
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7253
|
+
var depth = validateDepth(path);
|
|
7254
|
+
var parts = validateParts(path);
|
|
7255
|
+
this.addDepth(depth);
|
|
7256
|
+
this.opcode("getContext", depth);
|
|
7257
|
+
var name = parts[0], scoped = _ast2["default"].helpers.scopedId(path), blockParamId = !depth && !scoped && this.blockParamIndex(name);
|
|
7257
7258
|
if (blockParamId) {
|
|
7258
|
-
this.opcode("lookupBlockParam", blockParamId,
|
|
7259
|
+
this.opcode("lookupBlockParam", blockParamId, parts);
|
|
7259
7260
|
} else if (!name) {
|
|
7260
7261
|
this.opcode("pushContext");
|
|
7261
7262
|
} else if (path.data) {
|
|
7262
7263
|
this.options.data = true;
|
|
7263
|
-
this.opcode("lookupData",
|
|
7264
|
+
this.opcode("lookupData", depth, parts, path.strict);
|
|
7264
7265
|
} else {
|
|
7265
|
-
this.opcode("lookupOnContext",
|
|
7266
|
+
this.opcode("lookupOnContext", parts, path.falsy, path.strict, scoped);
|
|
7266
7267
|
}
|
|
7267
7268
|
},
|
|
7268
7269
|
StringLiteral: function StringLiteral(string) {
|
|
7270
|
+
validateLiteral(string);
|
|
7269
7271
|
this.opcode("pushString", string.value);
|
|
7270
7272
|
},
|
|
7271
7273
|
NumberLiteral: function NumberLiteral(number) {
|
|
7274
|
+
validateLiteral(number);
|
|
7272
7275
|
this.opcode("pushLiteral", number.value);
|
|
7273
7276
|
},
|
|
7274
7277
|
BooleanLiteral: function BooleanLiteral(bool) {
|
|
7278
|
+
validateLiteral(bool);
|
|
7275
7279
|
this.opcode("pushLiteral", bool.value);
|
|
7276
7280
|
},
|
|
7277
7281
|
UndefinedLiteral: function UndefinedLiteral() {
|
|
@@ -7281,7 +7285,16 @@ var require_compiler = __commonJS({
|
|
|
7281
7285
|
this.opcode("pushLiteral", "null");
|
|
7282
7286
|
},
|
|
7283
7287
|
Hash: function Hash(hash) {
|
|
7284
|
-
var pairs = hash.pairs, i = 0, l3 =
|
|
7288
|
+
var pairs = hash.pairs, i = 0, l3 = void 0;
|
|
7289
|
+
if (!_utils.isArray(pairs)) {
|
|
7290
|
+
throw invalidAst(hash, "pairs must be an array");
|
|
7291
|
+
}
|
|
7292
|
+
l3 = pairs.length;
|
|
7293
|
+
for (var j2 = 0; j2 < l3; j2++) {
|
|
7294
|
+
if (!pairs[j2] || typeof pairs[j2].key !== "string") {
|
|
7295
|
+
throw invalidAst(hash, "pair keys must be strings");
|
|
7296
|
+
}
|
|
7297
|
+
}
|
|
7285
7298
|
this.opcode("pushHash");
|
|
7286
7299
|
for (; i < l3; i++) {
|
|
7287
7300
|
this.pushParam(pairs[i].value);
|
|
@@ -7306,6 +7319,7 @@ var require_compiler = __commonJS({
|
|
|
7306
7319
|
this.useDepths = true;
|
|
7307
7320
|
},
|
|
7308
7321
|
classifySexpr: function classifySexpr(sexpr) {
|
|
7322
|
+
validateParts(sexpr.path);
|
|
7309
7323
|
var isSimple = _ast2["default"].helpers.simpleId(sexpr.path);
|
|
7310
7324
|
var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
|
|
7311
7325
|
var isHelper = !isBlockParam && _ast2["default"].helpers.helperExpression(sexpr);
|
|
@@ -7332,15 +7346,20 @@ var require_compiler = __commonJS({
|
|
|
7332
7346
|
}
|
|
7333
7347
|
},
|
|
7334
7348
|
pushParam: function pushParam(val2) {
|
|
7349
|
+
validateLiteral(val2);
|
|
7335
7350
|
var value = val2.value != null ? val2.value : val2.original || "";
|
|
7351
|
+
var depth = validateDepth(val2);
|
|
7336
7352
|
if (this.stringParams) {
|
|
7353
|
+
if (typeof value !== "number" && typeof value !== "boolean") {
|
|
7354
|
+
value = String(value);
|
|
7355
|
+
}
|
|
7337
7356
|
if (value.replace) {
|
|
7338
7357
|
value = value.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".");
|
|
7339
7358
|
}
|
|
7340
|
-
if (
|
|
7341
|
-
this.addDepth(
|
|
7359
|
+
if (depth) {
|
|
7360
|
+
this.addDepth(depth);
|
|
7342
7361
|
}
|
|
7343
|
-
this.opcode("getContext",
|
|
7362
|
+
this.opcode("getContext", depth);
|
|
7344
7363
|
this.opcode("pushStringParam", value, val2.type);
|
|
7345
7364
|
if (val2.type === "SubExpression") {
|
|
7346
7365
|
this.accept(val2);
|
|
@@ -7348,8 +7367,8 @@ var require_compiler = __commonJS({
|
|
|
7348
7367
|
} else {
|
|
7349
7368
|
if (this.trackIds) {
|
|
7350
7369
|
var blockParamIndex = void 0;
|
|
7351
|
-
if (val2.parts && !_ast2["default"].helpers.scopedId(val2) && !
|
|
7352
|
-
blockParamIndex = this.blockParamIndex(val2
|
|
7370
|
+
if (val2.parts && !_ast2["default"].helpers.scopedId(val2) && !depth) {
|
|
7371
|
+
blockParamIndex = this.blockParamIndex(validateParts(val2)[0]);
|
|
7353
7372
|
}
|
|
7354
7373
|
if (blockParamIndex) {
|
|
7355
7374
|
var blockParamChild = val2.parts.slice(1).join(".");
|
|
@@ -7437,6 +7456,48 @@ var require_compiler = __commonJS({
|
|
|
7437
7456
|
};
|
|
7438
7457
|
return ret;
|
|
7439
7458
|
}
|
|
7459
|
+
function invalidAst(node, message2) {
|
|
7460
|
+
return new _exception2["default"]("Invalid AST: " + node.type + " " + message2, node);
|
|
7461
|
+
}
|
|
7462
|
+
function validateDepth(node) {
|
|
7463
|
+
var depth = node.depth;
|
|
7464
|
+
if (depth == null) {
|
|
7465
|
+
return 0;
|
|
7466
|
+
}
|
|
7467
|
+
if (typeof depth !== "number" || !isFinite(depth) || Math.floor(depth) !== depth || depth < 0) {
|
|
7468
|
+
throw invalidAst(node, "depth must be a non-negative integer");
|
|
7469
|
+
}
|
|
7470
|
+
return depth;
|
|
7471
|
+
}
|
|
7472
|
+
function validateLiteral(node) {
|
|
7473
|
+
var value = node.value;
|
|
7474
|
+
if (node.type === "StringLiteral" && typeof value !== "string") {
|
|
7475
|
+
throw invalidAst(node, "value must be a string");
|
|
7476
|
+
} else if (node.type === "NumberLiteral" && typeof value !== "number") {
|
|
7477
|
+
throw invalidAst(node, "value must be a number");
|
|
7478
|
+
} else if (node.type === "BooleanLiteral" && typeof value !== "boolean") {
|
|
7479
|
+
throw invalidAst(node, "value must be a boolean");
|
|
7480
|
+
}
|
|
7481
|
+
}
|
|
7482
|
+
function validateStringArray(node, value, name) {
|
|
7483
|
+
if (!_utils.isArray(value)) {
|
|
7484
|
+
throw invalidAst(node, name + " must be an array");
|
|
7485
|
+
}
|
|
7486
|
+
for (var i = 0; i < value.length; i++) {
|
|
7487
|
+
if (typeof value[i] !== "string") {
|
|
7488
|
+
throw invalidAst(node, name + " must only contain strings");
|
|
7489
|
+
}
|
|
7490
|
+
}
|
|
7491
|
+
return value;
|
|
7492
|
+
}
|
|
7493
|
+
function validateParts(path) {
|
|
7494
|
+
return validateStringArray(path, path.parts, "parts");
|
|
7495
|
+
}
|
|
7496
|
+
function validateBlockParams(program) {
|
|
7497
|
+
if (program.blockParams != null) {
|
|
7498
|
+
validateStringArray(program, program.blockParams, "blockParams");
|
|
7499
|
+
}
|
|
7500
|
+
}
|
|
7440
7501
|
function argEquals(a, b2) {
|
|
7441
7502
|
if (a === b2) {
|
|
7442
7503
|
return true;
|
|
@@ -9224,12 +9285,24 @@ var require_source_map = __commonJS({
|
|
|
9224
9285
|
}
|
|
9225
9286
|
});
|
|
9226
9287
|
|
|
9227
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
9288
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js
|
|
9228
9289
|
var require_code_gen = __commonJS({
|
|
9229
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
9290
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js"(exports) {
|
|
9230
9291
|
"use strict";
|
|
9231
9292
|
exports.__esModule = true;
|
|
9293
|
+
exports.safeJsonLiteral = safeJsonLiteral;
|
|
9232
9294
|
var _utils = require_utils3();
|
|
9295
|
+
var NEEDS_ESCAPING = /[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/;
|
|
9296
|
+
var SCRIPT_DELIMITERS = /<(?=!--|\/?script)/gi;
|
|
9297
|
+
function escapeScriptDelimiters(code) {
|
|
9298
|
+
return code.replace(SCRIPT_DELIMITERS, "\\u003C");
|
|
9299
|
+
}
|
|
9300
|
+
function escapeSurrogate(surrogate) {
|
|
9301
|
+
return "\\u" + surrogate.charCodeAt(0).toString(16);
|
|
9302
|
+
}
|
|
9303
|
+
function safeJsonLiteral(value) {
|
|
9304
|
+
return escapeScriptDelimiters(JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/[\ud800-\udfff]/g, escapeSurrogate));
|
|
9305
|
+
}
|
|
9233
9306
|
var SourceNode = void 0;
|
|
9234
9307
|
try {
|
|
9235
9308
|
if (typeof define !== "function" || !define.amd) {
|
|
@@ -9322,7 +9395,11 @@ var require_code_gen = __commonJS({
|
|
|
9322
9395
|
return this.wrap([fn, type ? "." + type + "(" : "(", params, ")"]);
|
|
9323
9396
|
},
|
|
9324
9397
|
quotedString: function quotedString(str2) {
|
|
9325
|
-
|
|
9398
|
+
str2 = str2 + "";
|
|
9399
|
+
if (!NEEDS_ESCAPING.test(str2)) {
|
|
9400
|
+
return '"' + str2 + '"';
|
|
9401
|
+
}
|
|
9402
|
+
return safeJsonLiteral(str2);
|
|
9326
9403
|
},
|
|
9327
9404
|
objectLiteral: function objectLiteral(obj) {
|
|
9328
9405
|
var _this = this;
|
|
@@ -9356,13 +9433,12 @@ var require_code_gen = __commonJS({
|
|
|
9356
9433
|
}
|
|
9357
9434
|
};
|
|
9358
9435
|
exports["default"] = CodeGen;
|
|
9359
|
-
module.exports = exports["default"];
|
|
9360
9436
|
}
|
|
9361
9437
|
});
|
|
9362
9438
|
|
|
9363
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
9439
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js
|
|
9364
9440
|
var require_javascript_compiler = __commonJS({
|
|
9365
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
9441
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js"(exports, module) {
|
|
9366
9442
|
"use strict";
|
|
9367
9443
|
exports.__esModule = true;
|
|
9368
9444
|
function _interopRequireDefault(obj) {
|
|
@@ -9386,7 +9462,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
9386
9462
|
return this.internalNameLookup(parent, name);
|
|
9387
9463
|
},
|
|
9388
9464
|
depthedLookup: function depthedLookup(name) {
|
|
9389
|
-
return [this.aliasable("container.lookup"), "(depths, ",
|
|
9465
|
+
return [this.aliasable("container.lookup"), "(depths, ", this.quotedString(name), ")"];
|
|
9390
9466
|
},
|
|
9391
9467
|
compilerInfo: function compilerInfo() {
|
|
9392
9468
|
var revision = _base.COMPILER_REVISION, versions = _base.REVISION_CHANGES[revision];
|
|
@@ -9412,7 +9488,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
9412
9488
|
// END PUBLIC API
|
|
9413
9489
|
internalNameLookup: function internalNameLookup(parent, name) {
|
|
9414
9490
|
this.lookupPropertyFunctionIsUsed = true;
|
|
9415
|
-
return ["lookupProperty(", parent, ",",
|
|
9491
|
+
return ["lookupProperty(", parent, ",", this.quotedString(name), ")"];
|
|
9416
9492
|
},
|
|
9417
9493
|
lookupPropertyFunctionIsUsed: false,
|
|
9418
9494
|
compile: function compile(environment, options, context, asObject2) {
|
|
@@ -9951,7 +10027,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
9951
10027
|
delete options.name;
|
|
9952
10028
|
}
|
|
9953
10029
|
if (indent) {
|
|
9954
|
-
options.indent =
|
|
10030
|
+
options.indent = this.quotedString(indent);
|
|
9955
10031
|
}
|
|
9956
10032
|
options.helpers = "helpers";
|
|
9957
10033
|
options.partials = "partials";
|
|
@@ -9997,7 +10073,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
9997
10073
|
},
|
|
9998
10074
|
pushId: function pushId(type, name, child) {
|
|
9999
10075
|
if (type === "BlockParam") {
|
|
10000
|
-
this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " +
|
|
10076
|
+
this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " + this.quotedString("." + child) : ""));
|
|
10001
10077
|
} else if (type === "PathExpression") {
|
|
10002
10078
|
this.pushString(name);
|
|
10003
10079
|
} else if (type === "SubExpression") {
|
|
@@ -10235,7 +10311,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
10235
10311
|
},
|
|
10236
10312
|
setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
|
|
10237
10313
|
var options = this.setupParams(helper, paramSize, params);
|
|
10238
|
-
options.loc =
|
|
10314
|
+
options.loc = locationLiteral(this);
|
|
10239
10315
|
options = this.objectLiteral(options);
|
|
10240
10316
|
if (useRegister) {
|
|
10241
10317
|
this.useRegister("options");
|
|
@@ -10259,6 +10335,10 @@ var require_javascript_compiler = __commonJS({
|
|
|
10259
10335
|
JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
|
|
10260
10336
|
return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
|
10261
10337
|
};
|
|
10338
|
+
function locationLiteral(compiler) {
|
|
10339
|
+
var loc = compiler.source.currentLocation;
|
|
10340
|
+
return loc ? _codeGen.safeJsonLiteral(loc) : "undefined";
|
|
10341
|
+
}
|
|
10262
10342
|
function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
|
|
10263
10343
|
var stack = compiler.popStack(), len = parts.length;
|
|
10264
10344
|
if (requireTerminal) {
|
|
@@ -10268,7 +10348,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
10268
10348
|
stack = compiler.nameLookup(stack, parts[i], type);
|
|
10269
10349
|
}
|
|
10270
10350
|
if (requireTerminal) {
|
|
10271
|
-
return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ",
|
|
10351
|
+
return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", locationLiteral(compiler), " )"];
|
|
10272
10352
|
} else {
|
|
10273
10353
|
return stack;
|
|
10274
10354
|
}
|
|
@@ -10278,9 +10358,9 @@ var require_javascript_compiler = __commonJS({
|
|
|
10278
10358
|
}
|
|
10279
10359
|
});
|
|
10280
10360
|
|
|
10281
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
10361
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars.js
|
|
10282
10362
|
var require_handlebars = __commonJS({
|
|
10283
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
10363
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars.js"(exports, module) {
|
|
10284
10364
|
"use strict";
|
|
10285
10365
|
exports.__esModule = true;
|
|
10286
10366
|
function _interopRequireDefault(obj) {
|
|
@@ -10325,9 +10405,9 @@ var require_handlebars = __commonJS({
|
|
|
10325
10405
|
}
|
|
10326
10406
|
});
|
|
10327
10407
|
|
|
10328
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
10408
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js
|
|
10329
10409
|
var require_printer = __commonJS({
|
|
10330
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
10410
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js"(exports) {
|
|
10331
10411
|
"use strict";
|
|
10332
10412
|
exports.__esModule = true;
|
|
10333
10413
|
exports.print = print;
|
|
@@ -10471,9 +10551,9 @@ var require_printer = __commonJS({
|
|
|
10471
10551
|
}
|
|
10472
10552
|
});
|
|
10473
10553
|
|
|
10474
|
-
// node_modules/.pnpm/handlebars@4.7.
|
|
10554
|
+
// node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/lib/index.js
|
|
10475
10555
|
var require_lib2 = __commonJS({
|
|
10476
|
-
"node_modules/.pnpm/handlebars@4.7.
|
|
10556
|
+
"node_modules/.pnpm/handlebars@4.7.10/node_modules/handlebars/lib/index.js"(exports, module) {
|
|
10477
10557
|
"use strict";
|
|
10478
10558
|
var handlebars = require_handlebars()["default"];
|
|
10479
10559
|
var printer = require_printer();
|
|
@@ -21429,6 +21509,15 @@ var EngineSyntaxError = class extends Error {
|
|
|
21429
21509
|
return { line: this.line, column: this.column };
|
|
21430
21510
|
}
|
|
21431
21511
|
};
|
|
21512
|
+
function notText(engine, source) {
|
|
21513
|
+
const kind = source === null || source === void 0 ? String(source) : Array.isArray(source) ? "an array" : typeof source === "object" ? "an object" : `a ${typeof source}`;
|
|
21514
|
+
return new EngineSyntaxError(
|
|
21515
|
+
engine,
|
|
21516
|
+
`A template must be text, not ${kind}`,
|
|
21517
|
+
1,
|
|
21518
|
+
1
|
|
21519
|
+
);
|
|
21520
|
+
}
|
|
21432
21521
|
var RenderLimitError = class extends Error {
|
|
21433
21522
|
constructor(limit, message2) {
|
|
21434
21523
|
super(message2);
|
|
@@ -78886,7 +78975,8 @@ var builtinRoots = /* @__PURE__ */ new Set([
|
|
|
78886
78975
|
]);
|
|
78887
78976
|
function withBrand(data, ctx) {
|
|
78888
78977
|
const root = data ?? {};
|
|
78889
|
-
if (!ctx.brand || typeof root !== "object" || Array.isArray(root))
|
|
78978
|
+
if (!ctx.brand || typeof root !== "object" || Array.isArray(root))
|
|
78979
|
+
return root;
|
|
78890
78980
|
return { brand: ctx.brand, ...root };
|
|
78891
78981
|
}
|
|
78892
78982
|
function createInstance(ctx) {
|
|
@@ -79185,6 +79275,11 @@ var HandlebarsCompiled = class {
|
|
|
79185
79275
|
}
|
|
79186
79276
|
const src = ctx.partials(inc.name);
|
|
79187
79277
|
if (src === void 0) continue;
|
|
79278
|
+
if (typeof src !== "string")
|
|
79279
|
+
throw new RenderError(
|
|
79280
|
+
"handlebars",
|
|
79281
|
+
`Partial "${inc.name}" is not text`
|
|
79282
|
+
);
|
|
79188
79283
|
partials[inc.name] = src;
|
|
79189
79284
|
collect(src, depth + 1);
|
|
79190
79285
|
}
|
|
@@ -79212,6 +79307,7 @@ var HandlebarsCompiled = class {
|
|
|
79212
79307
|
var handlebarsEngine = {
|
|
79213
79308
|
id: "handlebars",
|
|
79214
79309
|
compile(source, opts = {}) {
|
|
79310
|
+
if (typeof source !== "string") throw notText("handlebars", source);
|
|
79215
79311
|
const name = opts.name ?? "template";
|
|
79216
79312
|
try {
|
|
79217
79313
|
createInstance(validationContext).precompile(source, { strict: false });
|
|
@@ -79480,7 +79576,8 @@ var stringMethods = {
|
|
|
79480
79576
|
};
|
|
79481
79577
|
function keywordArgs(args2) {
|
|
79482
79578
|
const last = args2.at(-1);
|
|
79483
|
-
if (!last || typeof last !== "object" || !Object.prototype.hasOwnProperty.call(last, "__keywords"))
|
|
79579
|
+
if (!last || typeof last !== "object" || !Object.prototype.hasOwnProperty.call(last, "__keywords"))
|
|
79580
|
+
return void 0;
|
|
79484
79581
|
const { __keywords: _marker, ...named } = last;
|
|
79485
79582
|
return named;
|
|
79486
79583
|
}
|
|
@@ -79494,11 +79591,15 @@ function namespace(...args2) {
|
|
|
79494
79591
|
return ns;
|
|
79495
79592
|
}
|
|
79496
79593
|
function setNamespaceAttribute(target, key, value) {
|
|
79497
|
-
if (!(target instanceof JinjaNamespace))
|
|
79594
|
+
if (!(target instanceof JinjaNamespace))
|
|
79595
|
+
throw new Error("Cannot assign attribute on non-namespace object");
|
|
79498
79596
|
target[String(key)] = value;
|
|
79499
79597
|
}
|
|
79500
79598
|
var toList = (v2) => Array.isArray(v2) ? v2 : v2 === void 0 || v2 === null ? [] : typeof v2 === "string" ? [...v2] : [v2];
|
|
79501
|
-
var attributeOf = (item, path) => String(path ?? "").split(".").reduce(
|
|
79599
|
+
var attributeOf = (item, path) => String(path ?? "").split(".").reduce(
|
|
79600
|
+
(acc, key) => acc !== null && typeof acc === "object" ? acc[key] : void 0,
|
|
79601
|
+
item
|
|
79602
|
+
);
|
|
79502
79603
|
var jinjaTests = {
|
|
79503
79604
|
none: (v2) => v2 === null,
|
|
79504
79605
|
true: (v2) => v2 === true,
|
|
@@ -79519,50 +79620,65 @@ function runTest(self2, name, value, arg) {
|
|
|
79519
79620
|
function installJinjaFilters(env) {
|
|
79520
79621
|
const lookup = env;
|
|
79521
79622
|
const helperTruncate = lookup.getFilter("truncate");
|
|
79522
|
-
lookup.addFilter(
|
|
79523
|
-
|
|
79524
|
-
|
|
79525
|
-
|
|
79526
|
-
|
|
79527
|
-
|
|
79528
|
-
|
|
79529
|
-
|
|
79530
|
-
|
|
79531
|
-
|
|
79532
|
-
|
|
79533
|
-
|
|
79534
|
-
|
|
79535
|
-
|
|
79536
|
-
|
|
79623
|
+
lookup.addFilter(
|
|
79624
|
+
"truncate",
|
|
79625
|
+
function(value, ...args2) {
|
|
79626
|
+
const named = keywordArgs(args2);
|
|
79627
|
+
const p = named ? args2.slice(0, -1) : args2;
|
|
79628
|
+
if (!named && typeof p[1] !== "boolean" && p.length < 3)
|
|
79629
|
+
return helperTruncate.call(this, value, ...args2);
|
|
79630
|
+
const s = String(value ?? "");
|
|
79631
|
+
const length = Number(p[0] ?? named?.["length"] ?? 255);
|
|
79632
|
+
const killwords = Boolean(p[1] ?? named?.["killwords"] ?? false);
|
|
79633
|
+
const end = String(p[2] ?? named?.["end"] ?? "...");
|
|
79634
|
+
const leeway = Number(p[3] ?? named?.["leeway"] ?? 5);
|
|
79635
|
+
if (s.length <= length + leeway) return s;
|
|
79636
|
+
const cut = s.slice(0, Math.max(0, length - end.length));
|
|
79637
|
+
if (killwords) return cut + end;
|
|
79638
|
+
const space = cut.lastIndexOf(" ");
|
|
79639
|
+
return (space >= 0 ? cut.slice(0, space) : cut) + end;
|
|
79640
|
+
}
|
|
79641
|
+
);
|
|
79537
79642
|
const helperSum = lookup.getFilter("sum");
|
|
79538
|
-
lookup.addFilter(
|
|
79539
|
-
|
|
79540
|
-
|
|
79541
|
-
|
|
79542
|
-
|
|
79543
|
-
|
|
79544
|
-
|
|
79643
|
+
lookup.addFilter(
|
|
79644
|
+
"sum",
|
|
79645
|
+
function(value, ...args2) {
|
|
79646
|
+
const named = keywordArgs(args2);
|
|
79647
|
+
if (!named) return helperSum.call(this, value, ...args2);
|
|
79648
|
+
const p = args2.slice(0, -1);
|
|
79649
|
+
const total = helperSum.call(
|
|
79650
|
+
this,
|
|
79651
|
+
value,
|
|
79652
|
+
p[0] ?? named["attribute"]
|
|
79653
|
+
);
|
|
79654
|
+
return total + Number(p[1] ?? named["start"] ?? 0);
|
|
79655
|
+
}
|
|
79656
|
+
);
|
|
79545
79657
|
const helperMap = lookup.getFilter("map");
|
|
79546
|
-
lookup.addFilter(
|
|
79547
|
-
|
|
79548
|
-
|
|
79549
|
-
|
|
79550
|
-
|
|
79551
|
-
|
|
79552
|
-
return
|
|
79553
|
-
|
|
79554
|
-
|
|
79555
|
-
|
|
79556
|
-
|
|
79557
|
-
|
|
79558
|
-
filter
|
|
79559
|
-
|
|
79560
|
-
|
|
79658
|
+
lookup.addFilter(
|
|
79659
|
+
"map",
|
|
79660
|
+
function(value, ...args2) {
|
|
79661
|
+
const named = keywordArgs(args2);
|
|
79662
|
+
const p = named ? args2.slice(0, -1) : args2;
|
|
79663
|
+
if (named && "attribute" in named)
|
|
79664
|
+
return toList(value).map((item) => {
|
|
79665
|
+
const v2 = attributeOf(item, named["attribute"]);
|
|
79666
|
+
return v2 === void 0 && "default" in named ? named["default"] : v2;
|
|
79667
|
+
});
|
|
79668
|
+
const items = toList(value);
|
|
79669
|
+
if (typeof p[0] === "string" && !items.some((item) => item !== null && typeof item === "object")) {
|
|
79670
|
+
let filter;
|
|
79671
|
+
try {
|
|
79672
|
+
filter = lookup.getFilter(p[0]);
|
|
79673
|
+
} catch {
|
|
79674
|
+
filter = void 0;
|
|
79675
|
+
}
|
|
79676
|
+
if (filter)
|
|
79677
|
+
return items.map((item) => filter.call(this, item, ...p.slice(1)));
|
|
79561
79678
|
}
|
|
79562
|
-
|
|
79679
|
+
return helperMap.call(this, value, ...args2);
|
|
79563
79680
|
}
|
|
79564
|
-
|
|
79565
|
-
});
|
|
79681
|
+
);
|
|
79566
79682
|
const byAttribute = (keep) => function(value, attribute, test, arg) {
|
|
79567
79683
|
return toList(value).filter((item) => {
|
|
79568
79684
|
const v2 = attributeOf(item, attribute);
|
|
@@ -79591,14 +79707,16 @@ function pythonRepr(v2) {
|
|
|
79591
79707
|
if (v2 === null || v2 === void 0) return "None";
|
|
79592
79708
|
if (v2 === true) return "True";
|
|
79593
79709
|
if (v2 === false) return "False";
|
|
79594
|
-
if (typeof v2 === "number")
|
|
79710
|
+
if (typeof v2 === "number")
|
|
79711
|
+
return Number.isNaN(v2) ? "nan" : Number.isFinite(v2) ? String(v2) : v2 > 0 ? "inf" : "-inf";
|
|
79595
79712
|
if (typeof v2 === "string") {
|
|
79596
79713
|
const quote = v2.includes("'") && !v2.includes('"') ? '"' : "'";
|
|
79597
79714
|
const escaped = v2.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t");
|
|
79598
79715
|
return quote + (quote === "'" ? escaped.replace(/'/g, "\\'") : escaped) + quote;
|
|
79599
79716
|
}
|
|
79600
79717
|
if (Array.isArray(v2)) return `[${v2.map(pythonRepr).join(", ")}]`;
|
|
79601
|
-
if (isPlainObject2(v2))
|
|
79718
|
+
if (isPlainObject2(v2))
|
|
79719
|
+
return `{${Object.entries(v2).map(([k2, item]) => `${pythonRepr(k2)}: ${pythonRepr(item)}`).join(", ")}}`;
|
|
79602
79720
|
return String(v2);
|
|
79603
79721
|
}
|
|
79604
79722
|
var compatInstalled = false;
|
|
@@ -79615,7 +79733,8 @@ function installCompat() {
|
|
|
79615
79733
|
import_nunjucks.default.runtime["formfeedSetAttribute"] = setNamespaceAttribute;
|
|
79616
79734
|
import_nunjucks.default.compiler.Compiler.prototype.compileSet = function(node, frame) {
|
|
79617
79735
|
const [target, ...more] = node.targets;
|
|
79618
|
-
if (!target || more.length || target.typename !== "LookupVal")
|
|
79736
|
+
if (!target || more.length || target.typename !== "LookupVal")
|
|
79737
|
+
return compileSet.call(this, node, frame);
|
|
79619
79738
|
this._emit("runtime.formfeedSetAttribute(");
|
|
79620
79739
|
this._compileExpression(target["target"], frame);
|
|
79621
79740
|
this._emit(", ");
|
|
@@ -79626,7 +79745,10 @@ function installCompat() {
|
|
|
79626
79745
|
this._emitLine(");");
|
|
79627
79746
|
};
|
|
79628
79747
|
const suppressValue = import_nunjucks.default.runtime.suppressValue;
|
|
79629
|
-
import_nunjucks.default.runtime.suppressValue = (val2, autoescape) => suppressValue(
|
|
79748
|
+
import_nunjucks.default.runtime.suppressValue = (val2, autoescape) => suppressValue(
|
|
79749
|
+
Array.isArray(val2) || isPlainObject2(val2) ? pythonRepr(val2) : val2,
|
|
79750
|
+
autoescape
|
|
79751
|
+
);
|
|
79630
79752
|
const original = import_nunjucks.default.runtime.memberLookup;
|
|
79631
79753
|
import_nunjucks.default.runtime.memberLookup = (obj, val2, ...rest) => {
|
|
79632
79754
|
if (typeof obj === "string" && typeof val2 === "string" && Object.prototype.hasOwnProperty.call(stringMethods, val2)) {
|
|
@@ -79730,7 +79852,8 @@ function walk2(node, w) {
|
|
|
79730
79852
|
case "Symbol":
|
|
79731
79853
|
case "LookupVal": {
|
|
79732
79854
|
const p = pathOf(node);
|
|
79733
|
-
if (node.typename === "Symbol" && jinjaLiterals.has(String(node.value)))
|
|
79855
|
+
if (node.typename === "Symbol" && jinjaLiterals.has(String(node.value)))
|
|
79856
|
+
return;
|
|
79734
79857
|
if (p) {
|
|
79735
79858
|
const root = p.path[0] ?? "";
|
|
79736
79859
|
const bound = inScope(w, root);
|
|
@@ -79785,7 +79908,9 @@ function walk2(node, w) {
|
|
|
79785
79908
|
const nameNode = node["name"];
|
|
79786
79909
|
const names = nameNode.typename === "Array" ? nameNode.children ?? [] : [nameNode];
|
|
79787
79910
|
const root = source?.path[0] ?? "";
|
|
79788
|
-
const items = !source ? null : inScope(w, root) ? ((s) => s ? [...s, ...source.path.slice(1)] : null)(
|
|
79911
|
+
const items = !source ? null : inScope(w, root) ? ((s) => s ? [...s, ...source.path.slice(1)] : null)(
|
|
79912
|
+
sourceOf(w, root)
|
|
79913
|
+
) : source.path;
|
|
79789
79914
|
const scope = /* @__PURE__ */ new Map();
|
|
79790
79915
|
for (const n of names) {
|
|
79791
79916
|
const name = String(n.value);
|
|
@@ -79813,7 +79938,8 @@ function walk2(node, w) {
|
|
|
79813
79938
|
range: nodeRange(p.root, p.path.join(".").length),
|
|
79814
79939
|
kind: "assigned"
|
|
79815
79940
|
});
|
|
79816
|
-
if (p.path.length === 1 || !inScope(w, p.path[0] ?? ""))
|
|
79941
|
+
if (p.path.length === 1 || !inScope(w, p.path[0] ?? ""))
|
|
79942
|
+
w.scopes[0]?.set(p.path[0] ?? "", null);
|
|
79817
79943
|
}
|
|
79818
79944
|
}
|
|
79819
79945
|
walk2(node["value"], w);
|
|
@@ -80004,6 +80130,7 @@ var Jinja2Template = class {
|
|
|
80004
80130
|
var jinja2Engine = {
|
|
80005
80131
|
id: "jinja2",
|
|
80006
80132
|
compile(source, opts = {}) {
|
|
80133
|
+
if (typeof source !== "string") throw notText("jinja2", source);
|
|
80007
80134
|
const name = opts.name ?? "template";
|
|
80008
80135
|
try {
|
|
80009
80136
|
installCompat();
|
|
@@ -80173,12 +80300,18 @@ function createLiquid(ctx) {
|
|
|
80173
80300
|
parseLimit: 2e6
|
|
80174
80301
|
});
|
|
80175
80302
|
for (const [name, { fn }] of ctx.helpers.bind(ctx))
|
|
80176
|
-
liquid.registerFilter(
|
|
80177
|
-
|
|
80178
|
-
|
|
80179
|
-
|
|
80180
|
-
|
|
80181
|
-
|
|
80303
|
+
liquid.registerFilter(
|
|
80304
|
+
name,
|
|
80305
|
+
function(input, ...argv) {
|
|
80306
|
+
const tokens = this.token?.args ?? [];
|
|
80307
|
+
return fn(
|
|
80308
|
+
...collectKeywordArgs(
|
|
80309
|
+
[input, ...argv],
|
|
80310
|
+
(i) => i > 0 && Array.isArray(tokens[i - 1])
|
|
80311
|
+
)
|
|
80312
|
+
);
|
|
80313
|
+
}
|
|
80314
|
+
);
|
|
80182
80315
|
return liquid;
|
|
80183
80316
|
}
|
|
80184
80317
|
var validationContext3 = {
|
|
@@ -80412,6 +80545,7 @@ var LiquidCompiled = class {
|
|
|
80412
80545
|
var liquidEngine = {
|
|
80413
80546
|
id: "liquid",
|
|
80414
80547
|
compile(source, opts = {}) {
|
|
80548
|
+
if (typeof source !== "string") throw notText("liquid", source);
|
|
80415
80549
|
const name = opts.name ?? "template";
|
|
80416
80550
|
try {
|
|
80417
80551
|
createLiquid(validationContext3).parse(source, name);
|
|
@@ -82569,7 +82703,7 @@ var encoder2 = new TextEncoder();
|
|
|
82569
82703
|
// packages/mcp/src/lib/server.ts
|
|
82570
82704
|
import { z as z3 } from "zod";
|
|
82571
82705
|
var CONVERT_LIMIT_BYTES = 20 * 1024 * 1024;
|
|
82572
|
-
var SERVER_INFO = { name: "formfeed", version: "0.3.
|
|
82706
|
+
var SERVER_INFO = { name: "formfeed", version: "0.3.15" };
|
|
82573
82707
|
var READS = {
|
|
82574
82708
|
readOnlyHint: true,
|
|
82575
82709
|
destructiveHint: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formfeed/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"mcpName": "io.github.formfeed-dev/formfeed",
|
|
5
5
|
"description": "Model Context Protocol server for Formfeed: list templates, read data schemas, validate and render documents from AI agents.",
|
|
6
6
|
"license": "MIT",
|