@kontur.candy/generator 6.11.0-logistics-theme.0 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1437 -222
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48446,6 +48446,7 @@ let SubHeaderColors = /*#__PURE__*/function (SubHeaderColors) {
48446
48446
  "use strict";
48447
48447
  __webpack_require__.r(__webpack_exports__);
48448
48448
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
48449
+ /* harmony export */ ALL_FIAS_FIELDS: () => (/* binding */ ALL_FIAS_FIELDS),
48449
48450
  /* harmony export */ FiasDivision: () => (/* binding */ FiasDivision),
48450
48451
  /* harmony export */ FiasEstateStatuses: () => (/* binding */ FiasEstateStatuses),
48451
48452
  /* harmony export */ FiasExtraFields: () => (/* binding */ FiasExtraFields),
@@ -48562,6 +48563,7 @@ let FiasFields = /*#__PURE__*/function (FiasFields) {
48562
48563
  FiasFields["apartment"] = "apartment";
48563
48564
  return FiasFields;
48564
48565
  }({});
48566
+ const ALL_FIAS_FIELDS = [FiasFields.region, FiasFields.district, FiasFields.municipaldistrict, FiasFields.city, FiasFields.intracityarea, FiasFields.urbansettlement, FiasFields.settlement, FiasFields.planningstructure, FiasFields.street, FiasFields.stead, FiasFields.house, FiasFields.garhouse, FiasFields.room, FiasFields.apartment];
48565
48567
  let FiasExtraFields = /*#__PURE__*/function (FiasExtraFields) {
48566
48568
  FiasExtraFields["postalcode"] = "postalcode";
48567
48569
  return FiasExtraFields;
@@ -50377,7 +50379,7 @@ function getExternalPropertyValue(state, variableContext, path) {
50377
50379
  var _state$requisites$pat, _state$requisites2;
50378
50380
  return (_state$requisites$pat = state === null || state === void 0 || (_state$requisites2 = state.requisites) === null || _state$requisites2 === void 0 || (_state$requisites2 = _state$requisites2[path]) === null || _state$requisites2 === void 0 ? void 0 : _state$requisites2.value) !== null && _state$requisites$pat !== void 0 ? _state$requisites$pat : "";
50379
50381
  }
50380
- return "";
50382
+ return undefined;
50381
50383
  }
50382
50384
  function getValueByPath(state, selector, variableContext, path, name = "value") {
50383
50385
  var _value;
@@ -50824,37 +50826,54 @@ __webpack_require__.r(__webpack_exports__);
50824
50826
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
50825
50827
  /* harmony export */ extractSugarReferences: () => (/* binding */ extractSugarReferences)
50826
50828
  /* harmony export */ });
50827
- /* harmony import */ var _generators_markupGenerator_ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../generators/markupGenerator/ElementProcessors/Layout/Img/ImgConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/Layout/Img/ImgConverter.ts");
50828
- /* harmony import */ var _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SugarPathUtils */ "./Generator/src/common/SugarPathUtils.ts");
50829
- /* harmony import */ var _XmlParser_NodeTraversal_TraverseXmlNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./XmlParser/NodeTraversal/TraverseXmlNode */ "./Generator/src/common/XmlParser/NodeTraversal/TraverseXmlNode.ts");
50830
- /* harmony import */ var _XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./XmlParser/XmlParser */ "./Generator/src/common/XmlParser/XmlParser.ts");
50829
+ /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:path */ "node:path");
50830
+ /* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_0__);
50831
+ /* harmony import */ var _generators_markupGenerator_ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../generators/markupGenerator/ElementProcessors/Layout/Img/ImgConverter */ "./Generator/src/generators/markupGenerator/ElementProcessors/Layout/Img/ImgConverter.ts");
50832
+ /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Common/Errors */ "./Common/Errors.ts");
50833
+ /* harmony import */ var _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SugarPathUtils */ "./Generator/src/common/SugarPathUtils.ts");
50834
+ /* harmony import */ var _XmlParser_NodeTraversal_TraverseXmlNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./XmlParser/NodeTraversal/TraverseXmlNode */ "./Generator/src/common/XmlParser/NodeTraversal/TraverseXmlNode.ts");
50835
+ /* harmony import */ var _XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./XmlParser/XmlParser */ "./Generator/src/common/XmlParser/XmlParser.ts");
50836
+
50837
+
50831
50838
 
50832
50839
 
50833
50840
 
50834
50841
 
50835
50842
  class ExtractSugarReferencesVisitor {
50836
- constructor(sugarFiles, fetchFunctionFiles, resourceFiles) {
50843
+ constructor(sugarFiles, fetchFunctionFiles, resourceFiles, kclangFetchFunctionFiles) {
50837
50844
  this.sugarFiles = void 0;
50838
50845
  this.fetchFunctionFiles = void 0;
50839
50846
  this.resourceFiles = void 0;
50847
+ this.kclangFetchFunctionFiles = void 0;
50840
50848
  this.sugarFiles = sugarFiles;
50841
50849
  this.fetchFunctionFiles = fetchFunctionFiles;
50842
50850
  this.resourceFiles = resourceFiles;
50851
+ this.kclangFetchFunctionFiles = kclangFetchFunctionFiles;
50843
50852
  }
50844
50853
  visitXmlNode(node) {
50845
50854
  if (node.name === "fetchfunctions") {
50846
50855
  const fetchFunctionReference = node.attrAsStringStrict("importFrom");
50847
- if (_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.isAbsoluteIncludePath(fetchFunctionReference)) {
50848
- throw new Error(`Reference path must be relative: e.g ${_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(fetchFunctionReference)}`);
50856
+ if (_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.isAbsoluteIncludePath(fetchFunctionReference)) {
50857
+ throw new Error(`Reference path must be relative: e.g ${_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(fetchFunctionReference)}`);
50858
+ }
50859
+ const extension = node_path__WEBPACK_IMPORTED_MODULE_0___default().extname(fetchFunctionReference);
50860
+ switch (extension) {
50861
+ case ".js":
50862
+ this.fetchFunctionFiles.push(fetchFunctionReference);
50863
+ break;
50864
+ case ".kclang":
50865
+ this.kclangFetchFunctionFiles.push(fetchFunctionReference);
50866
+ break;
50867
+ default:
50868
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_2__.NotSupportedError(`Reference path "${fetchFunctionReference}" has not supported file type (${node_path__WEBPACK_IMPORTED_MODULE_0___default().extname(fetchFunctionReference)})!`);
50849
50869
  }
50850
- this.fetchFunctionFiles.push(fetchFunctionReference);
50851
50870
  } else if (node.name === "img") {
50852
- this.resourceFiles.push(..._generators_markupGenerator_ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_0__.ImgConverter.extractReferencesFromNode(node).map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(x)));
50871
+ this.resourceFiles.push(..._generators_markupGenerator_ElementProcessors_Layout_Img_ImgConverter__WEBPACK_IMPORTED_MODULE_1__.ImgConverter.extractReferencesFromNode(node).map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(x)));
50853
50872
  } else {
50854
50873
  const referencePath = this.getSugarIncludePathOrUndefined(node);
50855
50874
  if (referencePath != undefined) {
50856
- const relativeFilePath = _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(referencePath);
50857
- this.sugarFiles.push(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(relativeFilePath));
50875
+ const relativeFilePath = _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(referencePath);
50876
+ this.sugarFiles.push(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(relativeFilePath));
50858
50877
  }
50859
50878
  }
50860
50879
  return node;
@@ -50867,33 +50886,38 @@ class ExtractSugarReferencesVisitor {
50867
50886
  }
50868
50887
  }
50869
50888
  async function extractSugarReferences(rootSugarContent, onReadFile) {
50870
- const rootXmlNode = (0,_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_3__.parseXml)(rootSugarContent);
50889
+ const rootXmlNode = (0,_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_5__.parseXml)(rootSugarContent);
50871
50890
  const allSugarFiles = [];
50872
50891
  const allFetchFunctionsReferences = [];
50892
+ const allKCLangFetchFunctionsReferences = [];
50873
50893
  const allResourceFileReferences = [];
50874
50894
  const sugarFileReferences = [];
50875
50895
  const fetchFunctionsReferences = [];
50876
50896
  const resourceFileReferences = [];
50877
- (0,_XmlParser_NodeTraversal_TraverseXmlNode__WEBPACK_IMPORTED_MODULE_2__.traverseXmlNode)(rootXmlNode, new ExtractSugarReferencesVisitor(sugarFileReferences, fetchFunctionsReferences, resourceFileReferences));
50897
+ const kclangFetchFunctionsReferences = [];
50898
+ (0,_XmlParser_NodeTraversal_TraverseXmlNode__WEBPACK_IMPORTED_MODULE_4__.traverseXmlNode)(rootXmlNode, new ExtractSugarReferencesVisitor(sugarFileReferences, fetchFunctionsReferences, resourceFileReferences, kclangFetchFunctionsReferences));
50878
50899
  allSugarFiles.push(...sugarFileReferences);
50879
50900
  allFetchFunctionsReferences.push(...fetchFunctionsReferences);
50880
50901
  allResourceFileReferences.push(...resourceFileReferences);
50902
+ allKCLangFetchFunctionsReferences.push(...kclangFetchFunctionsReferences);
50881
50903
  for (const referencedPath of sugarFileReferences) {
50882
50904
  const referencedFilePath = referencedPath + ".sugar.xml";
50883
50905
  const referencedContent = await onReadFile(referencedFilePath);
50884
- const referencedDirName = _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.dirname(referencedPath);
50885
- const transitiveReferences = await extractSugarReferences(referencedContent, relativeOfReferencedPath => onReadFile(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.join(referencedDirName, relativeOfReferencedPath)))));
50886
- transitiveReferences.sugarFiles = transitiveReferences.sugarFiles.map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.join(referencedDirName, x))));
50887
- transitiveReferences.fetchFunctionFiles = transitiveReferences.fetchFunctionFiles.map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.join(referencedDirName, x))));
50888
- transitiveReferences.resourceFiles = transitiveReferences.resourceFiles.map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_1__.SugarPathUtils.join(referencedDirName, x))));
50906
+ const referencedDirName = _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.dirname(referencedPath);
50907
+ const transitiveReferences = await extractSugarReferences(referencedContent, relativeOfReferencedPath => onReadFile(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.join(referencedDirName, relativeOfReferencedPath)))));
50908
+ transitiveReferences.sugarFiles = transitiveReferences.sugarFiles.map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.join(referencedDirName, x))));
50909
+ transitiveReferences.fetchFunctionFiles = transitiveReferences.fetchFunctionFiles.map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.join(referencedDirName, x))));
50910
+ transitiveReferences.resourceFiles = transitiveReferences.resourceFiles.map(x => _SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.appendLeadingDotIfNeed(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.normalize(_SugarPathUtils__WEBPACK_IMPORTED_MODULE_3__.SugarPathUtils.join(referencedDirName, x))));
50889
50911
  allSugarFiles.push(...transitiveReferences.sugarFiles);
50890
50912
  allFetchFunctionsReferences.push(...transitiveReferences.fetchFunctionFiles);
50891
50913
  allResourceFileReferences.push(...transitiveReferences.resourceFiles);
50914
+ allKCLangFetchFunctionsReferences.push(...transitiveReferences.kcLangFetchFunctionFiles);
50892
50915
  }
50893
50916
  return {
50894
50917
  sugarFiles: allSugarFiles,
50895
50918
  fetchFunctionFiles: allFetchFunctionsReferences,
50896
- resourceFiles: allResourceFileReferences
50919
+ resourceFiles: allResourceFileReferences,
50920
+ kcLangFetchFunctionFiles: allKCLangFetchFunctionsReferences
50897
50921
  };
50898
50922
  }
50899
50923
 
@@ -60938,84 +60962,84 @@ const getPropertyKCLangFunction = params => {
60938
60962
  return new _CodeDom_Functions_GetPropertyFunctionCall__WEBPACK_IMPORTED_MODULE_29__.GetPropertyFunctionCall(propertyNameParam);
60939
60963
  };
60940
60964
  const isEqualToAutoCalculatedKCLangFunction = params => {
60941
- var _params$45;
60965
+ var _safeCast3, _params$45, _params$46;
60942
60966
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
60943
60967
  if (errors.length > 0) {
60944
60968
  return errors;
60945
60969
  }
60946
- const argumentExpr = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$45 = params[0]) === null || _params$45 === void 0 ? void 0 : _params$45.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
60970
+ const argumentExpr = (_safeCast3 = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$45 = params[0]) === null || _params$45 === void 0 ? void 0 : _params$45.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression)) !== null && _safeCast3 !== void 0 ? _safeCast3 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$46 = params[0]) === null || _params$46 === void 0 ? void 0 : _params$46.argument, _CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_57__.CastExpression);
60947
60971
  if (argumentExpr == undefined) {
60948
60972
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
60949
60973
  }
60950
60974
  return new _CodeDom_Functions_IsEqualToAutoCalculatedFunctionCall__WEBPACK_IMPORTED_MODULE_30__.IsEqualToAutoCalculatedFunctionCall(argumentExpr);
60951
60975
  };
60952
60976
  const joinKCLangFunction = params => {
60953
- var _params$46;
60977
+ var _params$47;
60954
60978
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
60955
60979
  if (errors.length > 0) {
60956
60980
  return errors;
60957
60981
  }
60958
- const arrayParam = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$46 = params[0]) === null || _params$46 === void 0 ? void 0 : _params$46.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringArrayType.default);
60982
+ const arrayParam = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$47 = params[0]) === null || _params$47 === void 0 ? void 0 : _params$47.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringArrayType.default);
60959
60983
  if (arrayParam == undefined) {
60960
60984
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
60961
60985
  }
60962
60986
  return new _CodeDom_Functions_JoinFunctionCall__WEBPACK_IMPORTED_MODULE_31__.JoinFunctionCall(arrayParam);
60963
60987
  };
60964
60988
  const isRegNumSfrKCLangFunction = params => {
60965
- var _params$47;
60989
+ var _params$48;
60966
60990
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
60967
60991
  if (errors.length > 0) {
60968
60992
  return errors;
60969
60993
  }
60970
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$47 = params[0]) === null || _params$47 === void 0 ? void 0 : _params$47.argument);
60994
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$48 = params[0]) === null || _params$48 === void 0 ? void 0 : _params$48.argument);
60971
60995
  if (argumentExpr == undefined) {
60972
60996
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
60973
60997
  }
60974
60998
  return new _CodeDom_Functions_IsRegNumSfrFunctionCall__WEBPACK_IMPORTED_MODULE_33__.IsRegNumSfrFunctionCall(argumentExpr);
60975
60999
  };
60976
61000
  const isOgrnKCLangFunction = params => {
60977
- var _params$48;
61001
+ var _params$49;
60978
61002
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
60979
61003
  if (errors.length > 0) {
60980
61004
  return errors;
60981
61005
  }
60982
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$48 = params[0]) === null || _params$48 === void 0 ? void 0 : _params$48.argument);
61006
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$49 = params[0]) === null || _params$49 === void 0 ? void 0 : _params$49.argument);
60983
61007
  if (argumentExpr == undefined) {
60984
61008
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
60985
61009
  }
60986
61010
  return new _CodeDom_Functions_IsOgrnFunctionCall__WEBPACK_IMPORTED_MODULE_34__.IsOgrnFunctionCall(argumentExpr);
60987
61011
  };
60988
61012
  const firstOrDefaultKCLangFunction = params => {
60989
- var _params$49;
61013
+ var _params$50;
60990
61014
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
60991
61015
  if (errors.length > 0) {
60992
61016
  return errors;
60993
61017
  }
60994
- const argumentExpr = (_params$49 = params[0]) === null || _params$49 === void 0 ? void 0 : _params$49.argument;
61018
+ const argumentExpr = (_params$50 = params[0]) === null || _params$50 === void 0 ? void 0 : _params$50.argument;
60995
61019
  if (argumentExpr == undefined) {
60996
61020
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
60997
61021
  }
60998
61022
  return new _CodeDom_Functions_FirstOrDefaultFunctionCall__WEBPACK_IMPORTED_MODULE_35__.FirstOrDefaultFunctionCall(argumentExpr);
60999
61023
  };
61000
61024
  const nodepsKCLangFunction = params => {
61001
- var _params$50;
61025
+ var _params$51;
61002
61026
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61003
61027
  if (errors.length > 0) {
61004
61028
  return errors;
61005
61029
  }
61006
- const argumentExpr = (_params$50 = params[0]) === null || _params$50 === void 0 ? void 0 : _params$50.argument;
61030
+ const argumentExpr = (_params$51 = params[0]) === null || _params$51 === void 0 ? void 0 : _params$51.argument;
61007
61031
  if (argumentExpr == undefined) {
61008
61032
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61009
61033
  }
61010
61034
  return new _CodeDom_Functions_NodepsFunctionCall__WEBPACK_IMPORTED_MODULE_36__.NodepsFunctionCall(argumentExpr);
61011
61035
  };
61012
61036
  const hashSetKCLangFunction = params => {
61013
- var _ref6, _safeCastExprToTypeOr5, _params$51, _params$52, _params$53;
61037
+ var _ref6, _safeCastExprToTypeOr5, _params$52, _params$53, _params$54;
61014
61038
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61015
61039
  if (errors.length > 0) {
61016
61040
  return errors;
61017
61041
  }
61018
- const argumentExpr = (_ref6 = (_safeCastExprToTypeOr5 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$51 = params[0]) === null || _params$51 === void 0 ? void 0 : _params$51.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringArrayType.default)) !== null && _safeCastExprToTypeOr5 !== void 0 ? _safeCastExprToTypeOr5 : (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$52 = params[0]) === null || _params$52 === void 0 ? void 0 : _params$52.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringType.default)) !== null && _ref6 !== void 0 ? _ref6 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$53 = params[0]) === null || _params$53 === void 0 ? void 0 : _params$53.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61042
+ const argumentExpr = (_ref6 = (_safeCastExprToTypeOr5 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$52 = params[0]) === null || _params$52 === void 0 ? void 0 : _params$52.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringArrayType.default)) !== null && _safeCastExprToTypeOr5 !== void 0 ? _safeCastExprToTypeOr5 : (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$53 = params[0]) === null || _params$53 === void 0 ? void 0 : _params$53.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringType.default)) !== null && _ref6 !== void 0 ? _ref6 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$54 = params[0]) === null || _params$54 === void 0 ? void 0 : _params$54.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61019
61043
  if (argumentExpr == undefined) {
61020
61044
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61021
61045
  }
@@ -61040,225 +61064,225 @@ const arrayKCLangFunction = params => {
61040
61064
  return new _CodeDom_Functions_ArrayFunctionCall__WEBPACK_IMPORTED_MODULE_38__.ArrayFunctionCall(...expressions.filter(expr => expr != undefined));
61041
61065
  };
61042
61066
  const instanceCountKCLangFunction = params => {
61043
- var _params$54;
61067
+ var _params$55;
61044
61068
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61045
61069
  if (errors.length > 0) {
61046
61070
  return errors;
61047
61071
  }
61048
- const argumentExpr = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$54 = params[0]) === null || _params$54 === void 0 ? void 0 : _params$54.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61072
+ const argumentExpr = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$55 = params[0]) === null || _params$55 === void 0 ? void 0 : _params$55.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61049
61073
  if (argumentExpr == undefined) {
61050
61074
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61051
61075
  }
61052
61076
  return new _CodeDom_Functions_InstanceCountFunctionCall__WEBPACK_IMPORTED_MODULE_39__.InstanceCountFunctionCall(argumentExpr);
61053
61077
  };
61054
61078
  const getDaysInMonthKCLangFunction = params => {
61055
- var _safeCastExprToTypeOr6, _params$55, _params$56;
61079
+ var _safeCastExprToTypeOr6, _params$56, _params$57;
61056
61080
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61057
61081
  if (errors.length > 0) {
61058
61082
  return errors;
61059
61083
  }
61060
- const argumentExpr = (_safeCastExprToTypeOr6 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$55 = params[0]) === null || _params$55 === void 0 ? void 0 : _params$55.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default)) !== null && _safeCastExprToTypeOr6 !== void 0 ? _safeCastExprToTypeOr6 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$56 = params[0]) === null || _params$56 === void 0 ? void 0 : _params$56.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61084
+ const argumentExpr = (_safeCastExprToTypeOr6 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$56 = params[0]) === null || _params$56 === void 0 ? void 0 : _params$56.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default)) !== null && _safeCastExprToTypeOr6 !== void 0 ? _safeCastExprToTypeOr6 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$57 = params[0]) === null || _params$57 === void 0 ? void 0 : _params$57.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61061
61085
  if (argumentExpr == undefined) {
61062
61086
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61063
61087
  }
61064
61088
  return new _CodeDom_Functions_GetDaysInMonthFunctionCall__WEBPACK_IMPORTED_MODULE_40__.GetDaysInMonthFunctionCall(argumentExpr);
61065
61089
  };
61066
61090
  const getDayKCLangFunction = params => {
61067
- var _params$57;
61091
+ var _params$58;
61068
61092
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61069
61093
  if (errors.length > 0) {
61070
61094
  return errors;
61071
61095
  }
61072
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$57 = params[0]) === null || _params$57 === void 0 ? void 0 : _params$57.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61096
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$58 = params[0]) === null || _params$58 === void 0 ? void 0 : _params$58.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61073
61097
  if (argumentExpr == undefined) {
61074
61098
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61075
61099
  }
61076
61100
  return new _CodeDom_Functions_GetDayFunctionCall__WEBPACK_IMPORTED_MODULE_41__.GetDayFunctionCall(argumentExpr);
61077
61101
  };
61078
61102
  const getMonthKCLangFunction = params => {
61079
- var _params$58;
61103
+ var _params$59;
61080
61104
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61081
61105
  if (errors.length > 0) {
61082
61106
  return errors;
61083
61107
  }
61084
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$58 = params[0]) === null || _params$58 === void 0 ? void 0 : _params$58.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61108
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$59 = params[0]) === null || _params$59 === void 0 ? void 0 : _params$59.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61085
61109
  if (argumentExpr == undefined) {
61086
61110
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61087
61111
  }
61088
61112
  return new _CodeDom_Functions_GetMonthFunctionCall__WEBPACK_IMPORTED_MODULE_42__.GetMonthFunctionCall(argumentExpr);
61089
61113
  };
61090
61114
  const getYearKCLangFunction = params => {
61091
- var _params$59;
61115
+ var _params$60;
61092
61116
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61093
61117
  if (errors.length > 0) {
61094
61118
  return errors;
61095
61119
  }
61096
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$59 = params[0]) === null || _params$59 === void 0 ? void 0 : _params$59.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61120
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$60 = params[0]) === null || _params$60 === void 0 ? void 0 : _params$60.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61097
61121
  if (argumentExpr == undefined) {
61098
61122
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61099
61123
  }
61100
61124
  return new _CodeDom_Functions_GetYearFunctionCall__WEBPACK_IMPORTED_MODULE_43__.GetYearFunctionCall(argumentExpr);
61101
61125
  };
61102
61126
  const isDateKCLangFunction = params => {
61103
- var _params$60;
61127
+ var _params$61;
61104
61128
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61105
61129
  if (errors.length > 0) {
61106
61130
  return errors;
61107
61131
  }
61108
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$60 = params[0]) === null || _params$60 === void 0 ? void 0 : _params$60.argument);
61132
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$61 = params[0]) === null || _params$61 === void 0 ? void 0 : _params$61.argument);
61109
61133
  if (argumentExpr == undefined) {
61110
61134
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61111
61135
  }
61112
61136
  return new _CodeDom_Functions_IsDateFunctionCall__WEBPACK_IMPORTED_MODULE_44__.IsDateFunctionCall(argumentExpr);
61113
61137
  };
61114
61138
  const differenceInMonthsKCLangFunction = params => {
61115
- var _params$61, _params$62;
61139
+ var _params$62, _params$63;
61116
61140
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61117
61141
  if (errors.length > 0) {
61118
61142
  return errors;
61119
61143
  }
61120
- const startDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$61 = params[0]) === null || _params$61 === void 0 ? void 0 : _params$61.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61121
- const endDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$62 = params[1]) === null || _params$62 === void 0 ? void 0 : _params$62.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61144
+ const startDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$62 = params[0]) === null || _params$62 === void 0 ? void 0 : _params$62.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61145
+ const endDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$63 = params[1]) === null || _params$63 === void 0 ? void 0 : _params$63.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61122
61146
  if (startDateExpr == undefined || endDateExpr == undefined) {
61123
61147
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61124
61148
  }
61125
61149
  return new _CodeDom_Functions_DifferenceInMonthsFunctionCall__WEBPACK_IMPORTED_MODULE_45__.DifferenceInMonthsFunctionCall(startDateExpr, endDateExpr);
61126
61150
  };
61127
61151
  const differenceInDaysKCLangFunction = params => {
61128
- var _safeCastExprToTypeOr7, _params$63, _params$64, _safeCastExprToTypeOr8, _params$65, _params$66;
61152
+ var _safeCastExprToTypeOr7, _params$64, _params$65, _safeCastExprToTypeOr8, _params$66, _params$67;
61129
61153
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61130
61154
  if (errors.length > 0) {
61131
61155
  return errors;
61132
61156
  }
61133
- const startDateExpr = (_safeCastExprToTypeOr7 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$63 = params[0]) === null || _params$63 === void 0 ? void 0 : _params$63.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default)) !== null && _safeCastExprToTypeOr7 !== void 0 ? _safeCastExprToTypeOr7 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$64 = params[0]) === null || _params$64 === void 0 ? void 0 : _params$64.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61134
- const endDateExpr = (_safeCastExprToTypeOr8 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$65 = params[1]) === null || _params$65 === void 0 ? void 0 : _params$65.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default)) !== null && _safeCastExprToTypeOr8 !== void 0 ? _safeCastExprToTypeOr8 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$66 = params[1]) === null || _params$66 === void 0 ? void 0 : _params$66.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61157
+ const startDateExpr = (_safeCastExprToTypeOr7 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$64 = params[0]) === null || _params$64 === void 0 ? void 0 : _params$64.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default)) !== null && _safeCastExprToTypeOr7 !== void 0 ? _safeCastExprToTypeOr7 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$65 = params[0]) === null || _params$65 === void 0 ? void 0 : _params$65.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61158
+ const endDateExpr = (_safeCastExprToTypeOr8 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$66 = params[1]) === null || _params$66 === void 0 ? void 0 : _params$66.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default)) !== null && _safeCastExprToTypeOr8 !== void 0 ? _safeCastExprToTypeOr8 : (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$67 = params[1]) === null || _params$67 === void 0 ? void 0 : _params$67.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61135
61159
  if (startDateExpr == undefined || endDateExpr == undefined) {
61136
61160
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61137
61161
  }
61138
61162
  return new _CodeDom_Functions_DifferenceInDaysFunctionCall__WEBPACK_IMPORTED_MODULE_46__.DifferenceInDaysFunctionCall(startDateExpr, endDateExpr);
61139
61163
  };
61140
61164
  const sumOfDayWeightsKCLangFunction = params => {
61141
- var _params$67, _params$68;
61165
+ var _params$68, _params$69;
61142
61166
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61143
61167
  if (errors.length > 0) {
61144
61168
  return errors;
61145
61169
  }
61146
- const startDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$67 = params[0]) === null || _params$67 === void 0 ? void 0 : _params$67.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61147
- const endDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$68 = params[1]) === null || _params$68 === void 0 ? void 0 : _params$68.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61170
+ const startDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$68 = params[0]) === null || _params$68 === void 0 ? void 0 : _params$68.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61171
+ const endDateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$69 = params[1]) === null || _params$69 === void 0 ? void 0 : _params$69.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61148
61172
  if (startDateExpr == undefined || endDateExpr == undefined) {
61149
61173
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61150
61174
  }
61151
61175
  return new _CodeDom_Functions_SumOfDayWeightsFunctionCall__WEBPACK_IMPORTED_MODULE_47__.SumOfDayWeightsFunctionCall(startDateExpr, endDateExpr);
61152
61176
  };
61153
61177
  const addDaysKCLangFunction = params => {
61154
- var _params$69, _params$70;
61178
+ var _params$70, _params$71;
61155
61179
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61156
61180
  if (errors.length > 0) {
61157
61181
  return errors;
61158
61182
  }
61159
- const dateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$69 = params[0]) === null || _params$69 === void 0 ? void 0 : _params$69.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61160
- const daysExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$70 = params[1]) === null || _params$70 === void 0 ? void 0 : _params$70.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61183
+ const dateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$70 = params[0]) === null || _params$70 === void 0 ? void 0 : _params$70.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61184
+ const daysExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$71 = params[1]) === null || _params$71 === void 0 ? void 0 : _params$71.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61161
61185
  if (dateExpr == undefined || daysExpr == undefined) {
61162
61186
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61163
61187
  }
61164
61188
  return new _CodeDom_Functions_AddDaysFunctionCall__WEBPACK_IMPORTED_MODULE_48__.AddDaysFunctionCall(dateExpr, daysExpr);
61165
61189
  };
61166
61190
  const addMonthsKCLangFunction = params => {
61167
- var _params$71, _params$72;
61191
+ var _params$72, _params$73;
61168
61192
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61169
61193
  if (errors.length > 0) {
61170
61194
  return errors;
61171
61195
  }
61172
- const dateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$71 = params[0]) === null || _params$71 === void 0 ? void 0 : _params$71.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61173
- const monthsExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$72 = params[1]) === null || _params$72 === void 0 ? void 0 : _params$72.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61196
+ const dateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$72 = params[0]) === null || _params$72 === void 0 ? void 0 : _params$72.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61197
+ const monthsExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$73 = params[1]) === null || _params$73 === void 0 ? void 0 : _params$73.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61174
61198
  if (dateExpr == undefined || monthsExpr == undefined) {
61175
61199
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61176
61200
  }
61177
61201
  return new _CodeDom_Functions_AddMonthsFunctionCall__WEBPACK_IMPORTED_MODULE_49__.AddMonthsFunctionCall(dateExpr, monthsExpr);
61178
61202
  };
61179
61203
  const addYearsKCLangFunction = params => {
61180
- var _params$73, _params$74;
61204
+ var _params$74, _params$75;
61181
61205
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61182
61206
  if (errors.length > 0) {
61183
61207
  return errors;
61184
61208
  }
61185
- const dateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$73 = params[0]) === null || _params$73 === void 0 ? void 0 : _params$73.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61186
- const yearsExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$74 = params[1]) === null || _params$74 === void 0 ? void 0 : _params$74.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61209
+ const dateExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$74 = params[0]) === null || _params$74 === void 0 ? void 0 : _params$74.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61210
+ const yearsExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$75 = params[1]) === null || _params$75 === void 0 ? void 0 : _params$75.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61187
61211
  if (dateExpr == undefined || yearsExpr == undefined) {
61188
61212
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61189
61213
  }
61190
61214
  return new _CodeDom_Functions_AddYearsFunctionCall__WEBPACK_IMPORTED_MODULE_50__.AddYearsFunctionCall(dateExpr, yearsExpr);
61191
61215
  };
61192
61216
  const dateToStringKCLangFunction = params => {
61193
- var _params$75, _params$76;
61217
+ var _params$76, _params$77;
61194
61218
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1, 1));
61195
61219
  if (errors.length > 0) {
61196
61220
  return errors;
61197
61221
  }
61198
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$75 = params[0]) === null || _params$75 === void 0 ? void 0 : _params$75.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61199
- const format = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$76 = params[1]) === null || _params$76 === void 0 ? void 0 : _params$76.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringType.default);
61222
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$76 = params[0]) === null || _params$76 === void 0 ? void 0 : _params$76.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DateType.default);
61223
+ const format = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$77 = params[1]) === null || _params$77 === void 0 ? void 0 : _params$77.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringType.default);
61200
61224
  if (argumentExpr == undefined) {
61201
61225
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61202
61226
  }
61203
61227
  return new _CodeDom_Functions_DateToStringFunctionCall__WEBPACK_IMPORTED_MODULE_51__.DateToStringFunctionCall(argumentExpr, format);
61204
61228
  };
61205
61229
  const hasAutoFlagKCLangFunction = params => {
61206
- var _params$77;
61230
+ var _params$78;
61207
61231
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61208
61232
  if (errors.length > 0) {
61209
61233
  return errors;
61210
61234
  }
61211
- const argumentExpr = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$77 = params[0]) === null || _params$77 === void 0 ? void 0 : _params$77.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61235
+ const argumentExpr = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$78 = params[0]) === null || _params$78 === void 0 ? void 0 : _params$78.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61212
61236
  if (argumentExpr == undefined) {
61213
61237
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61214
61238
  }
61215
61239
  return new _CodeDom_Functions_HasAutoFlagFunctionCall__WEBPACK_IMPORTED_MODULE_52__.HasAutoFlagFunctionCall(argumentExpr);
61216
61240
  };
61217
61241
  const makeDictKCLangFunction = params => {
61218
- var _params$78, _params$79;
61242
+ var _params$79, _params$80;
61219
61243
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61220
61244
  if (errors.length > 0) {
61221
61245
  return errors;
61222
61246
  }
61223
- const sourceKeyPath = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$78 = params[0]) === null || _params$78 === void 0 ? void 0 : _params$78.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61224
- const sourceValuePath = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$79 = params[1]) === null || _params$79 === void 0 ? void 0 : _params$79.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61247
+ const sourceKeyPath = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$79 = params[0]) === null || _params$79 === void 0 ? void 0 : _params$79.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61248
+ const sourceValuePath = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$80 = params[1]) === null || _params$80 === void 0 ? void 0 : _params$80.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.DecimalType.default);
61225
61249
  if (sourceKeyPath == undefined || sourceValuePath == undefined) {
61226
61250
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61227
61251
  }
61228
61252
  return new _CodeDom_Functions_MakeDictFunctionCall__WEBPACK_IMPORTED_MODULE_53__.MakeDictFunctionCall(sourceKeyPath, sourceValuePath);
61229
61253
  };
61230
61254
  const getSumByKeysKCLangFunction = params => {
61231
- var _params$80, _params$81;
61255
+ var _params$81, _params$82;
61232
61256
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 2));
61233
61257
  if (errors.length > 0) {
61234
61258
  return errors;
61235
61259
  }
61236
- const dictPath = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$80 = params[0]) === null || _params$80 === void 0 ? void 0 : _params$80.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61237
- const targetKeys = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$81 = params[1]) === null || _params$81 === void 0 ? void 0 : _params$81.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringArrayType.default);
61260
+ const dictPath = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_10__.safeCast)((_params$81 = params[0]) === null || _params$81 === void 0 ? void 0 : _params$81.argument, _CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_11__.ValueReferenceExpression);
61261
+ const targetKeys = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastExprToTypeOrConvertValueRef)((_params$82 = params[1]) === null || _params$82 === void 0 ? void 0 : _params$82.argument, _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_0__.StringArrayType.default);
61238
61262
  if (dictPath == undefined || targetKeys == undefined) {
61239
61263
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61240
61264
  }
61241
61265
  return new _CodeDom_Functions_GetSumByKeysFunctionCall__WEBPACK_IMPORTED_MODULE_54__.GetSumByKeysFunctionCall(dictPath, targetKeys);
61242
61266
  };
61243
61267
  const numeratorKCLangFunction = params => {
61244
- var _params$82;
61268
+ var _params$83;
61245
61269
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61246
61270
  if (errors.length > 0) {
61247
61271
  return errors;
61248
61272
  }
61249
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$82 = params[0]) === null || _params$82 === void 0 ? void 0 : _params$82.argument);
61273
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$83 = params[0]) === null || _params$83 === void 0 ? void 0 : _params$83.argument);
61250
61274
  if (argumentExpr == undefined) {
61251
61275
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61252
61276
  }
61253
61277
  return new _CodeDom_Functions_NumeratorFunctionCall__WEBPACK_IMPORTED_MODULE_55__.NumeratorFunctionCall(argumentExpr);
61254
61278
  };
61255
61279
  const denominatorKCLangFunction = params => {
61256
- var _params$83;
61280
+ var _params$84;
61257
61281
  const errors = Array.from((0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.validateParams)(params, 1));
61258
61282
  if (errors.length > 0) {
61259
61283
  return errors;
61260
61284
  }
61261
- const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$83 = params[0]) === null || _params$83 === void 0 ? void 0 : _params$83.argument);
61285
+ const argumentExpr = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.safeCastToStringFromExprOrValueRef)((_params$84 = params[0]) === null || _params$84 === void 0 ? void 0 : _params$84.argument);
61262
61286
  if (argumentExpr == undefined) {
61263
61287
  return (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_23__.defaultArgumentErrors)();
61264
61288
  }
@@ -61944,15 +61968,15 @@ class KCLangMainVisitor {
61944
61968
  return result;
61945
61969
  }
61946
61970
  visitFunctionDefinition(ctx) {
61947
- var _ctx$functionArgument, _strictCastExpression6, _strictCast8;
61971
+ var _ctx$functionArgument, _strictCast8, _strictCastExpression6;
61948
61972
  const args = (_ctx$functionArgument = ctx.functionArguments()) === null || _ctx$functionArgument === void 0 ? void 0 : _ctx$functionArgument.accept(this);
61949
61973
  const argsAsArray = args != undefined ? (0,_CastUtils__WEBPACK_IMPORTED_MODULE_8__.strictCast)(args, Array) : [];
61950
61974
  const typedArgs = argsAsArray.map(x => {
61951
61975
  var _strictCast7;
61952
61976
  return (_strictCast7 = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_8__.strictCast)(x, _CodeDom_FunctionDefinition__WEBPACK_IMPORTED_MODULE_44__.FunctionArgument)) !== null && _strictCast7 !== void 0 ? _strictCast7 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
61953
61977
  });
61954
- const body = (_strictCastExpression6 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_9__.strictCastExpression)(ctx.returnStatement().accept(this), _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_6__.KCLangType.default)) !== null && _strictCastExpression6 !== void 0 ? _strictCastExpression6 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
61955
61978
  const type = (_strictCast8 = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_8__.strictCast)(ctx.type().accept(this), _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_6__.KCLangType)) !== null && _strictCast8 !== void 0 ? _strictCast8 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
61979
+ const body = (_strictCastExpression6 = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_9__.strictCastExpression)(ctx.returnStatement().accept(this), type)) !== null && _strictCastExpression6 !== void 0 ? _strictCastExpression6 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
61956
61980
  return new _CodeDom_FunctionDefinition__WEBPACK_IMPORTED_MODULE_44__.FunctionDefinition(ctx.NAME().text, type, typedArgs, body);
61957
61981
  }
61958
61982
  visitFunctionArguments(ctx) {
@@ -62064,7 +62088,7 @@ class KCLangParser {
62064
62088
  const result = (0,_CastUtils__WEBPACK_IMPORTED_MODULE_4__.strictCast)(tree.accept(visitor), _CodeDom_Program__WEBPACK_IMPORTED_MODULE_5__.Program);
62065
62089
  return result;
62066
62090
  }
62067
- parseExpression(code) {
62091
+ parseExpression(code, additionalBuilders = {}) {
62068
62092
  const {
62069
62093
  parser,
62070
62094
  errorListener
@@ -62074,7 +62098,10 @@ class KCLangParser {
62074
62098
  throw new _KclangParsingError__WEBPACK_IMPORTED_MODULE_11__.KclangParsingError(errorListener.errorMessages);
62075
62099
  }
62076
62100
  const visitor = new _KCLangMainVisitor__WEBPACK_IMPORTED_MODULE_8__.KCLangMainVisitor({
62077
- functionBuilders: defaultFunctionBuilders,
62101
+ functionBuilders: {
62102
+ ...defaultFunctionBuilders,
62103
+ ...additionalBuilders
62104
+ },
62078
62105
  allowAutoCastToString: true
62079
62106
  });
62080
62107
  const result = (0,_CodeDom_KCLangUtils__WEBPACK_IMPORTED_MODULE_6__.strictCastExpression)(tree.accept(visitor), _CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.KCLangType.default);
@@ -63149,6 +63176,8 @@ __webpack_require__.r(__webpack_exports__);
63149
63176
  class GetExternalInfoFunctionalCall extends _FunctionCall__WEBPACK_IMPORTED_MODULE_0__.FunctionCall {
63150
63177
  constructor(key) {
63151
63178
  super("getExternalInfo", [key], _KCLangType__WEBPACK_IMPORTED_MODULE_1__.StringType.default);
63179
+ this.key = void 0;
63180
+ this.key = key;
63152
63181
  }
63153
63182
  }
63154
63183
 
@@ -64183,6 +64212,31 @@ class KCLangExpression extends _KCLangBase__WEBPACK_IMPORTED_MODULE_0__.KCLangBa
64183
64212
 
64184
64213
  /***/ }),
64185
64214
 
64215
+ /***/ "./Generator/src/common/KCLang/CodeDom/KCLangExpressionVisitor.ts":
64216
+ /*!************************************************************************!*\
64217
+ !*** ./Generator/src/common/KCLang/CodeDom/KCLangExpressionVisitor.ts ***!
64218
+ \************************************************************************/
64219
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
64220
+
64221
+ "use strict";
64222
+ __webpack_require__.r(__webpack_exports__);
64223
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
64224
+ /* harmony export */ KCLangExpressionVisitor: () => (/* binding */ KCLangExpressionVisitor)
64225
+ /* harmony export */ });
64226
+ class KCLangExpressionVisitor {
64227
+ visit(expression, context) {
64228
+ const className = expression.constructor.name;
64229
+ const methodName = `visit${className}`;
64230
+ const method = this[methodName];
64231
+ if (method && typeof method === "function") {
64232
+ return method.call(this, expression, context);
64233
+ }
64234
+ throw new Error(`Unknown expression type: ${className}. Check if method '${methodName}' exists in visitor!`);
64235
+ }
64236
+ }
64237
+
64238
+ /***/ }),
64239
+
64186
64240
  /***/ "./Generator/src/common/KCLang/CodeDom/KCLangPath.ts":
64187
64241
  /*!***********************************************************!*\
64188
64242
  !*** ./Generator/src/common/KCLang/CodeDom/KCLangPath.ts ***!
@@ -66446,6 +66500,79 @@ function ensureKCLangConditionParsed(kcLangCondition) {
66446
66500
 
66447
66501
  /***/ }),
66448
66502
 
66503
+ /***/ "./Generator/src/common/KCLangAndJSFetchFunctions.ts":
66504
+ /*!***********************************************************!*\
66505
+ !*** ./Generator/src/common/KCLangAndJSFetchFunctions.ts ***!
66506
+ \***********************************************************/
66507
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
66508
+
66509
+ "use strict";
66510
+ __webpack_require__.r(__webpack_exports__);
66511
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
66512
+ /* harmony export */ KCLangAndJSFetchFunctions: () => (/* binding */ KCLangAndJSFetchFunctions)
66513
+ /* harmony export */ });
66514
+ /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
66515
+ /* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
66516
+ /* harmony import */ var _generators_KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../generators/KCXmlGenerator/KCXmlGeneratorBase */ "./Generator/src/generators/KCXmlGenerator/KCXmlGeneratorBase.ts");
66517
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
66518
+
66519
+
66520
+
66521
+
66522
+ class KCLangAndJSFetchFunctions {
66523
+ constructor(kclangSource, jsSource, jsVersionPreferred) {
66524
+ this.jsSource = void 0;
66525
+ this.kclangSource = void 0;
66526
+ this.jsVersionPrioritized = void 0;
66527
+ this.jsVersionPrioritized = jsVersionPreferred;
66528
+ this.jsSource = jsSource;
66529
+ this.kclangSource = kclangSource;
66530
+ }
66531
+ getFetchFunction(fetchFnName, propName) {
66532
+ const fetchDescriptor = propName == undefined ? this.getFetchDescriptor(fetchFnName) : this.getFetchDescriptor(fetchFnName, propName);
66533
+ // @ts-ignore
66534
+ const fetchFunction = (fetchDescriptor || {}).fn || fetchDescriptor;
66535
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
66536
+ return fetchFunction || null;
66537
+ }
66538
+ getFetchDescriptor(fetchFnName, propName) {
66539
+ var _Iterator$from$map$fi;
66540
+ if (typeof fetchFnName !== "string" || propName != undefined && typeof propName !== "string" || (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNullOrEmpty)(fetchFnName)) {
66541
+ return null;
66542
+ }
66543
+ const getByJsFunc = () => this.getJsFunctionIfExists(fetchFnName, propName);
66544
+ const getByKClangFunc = () => this.getKClangFunctionIfExists(fetchFnName, propName);
66545
+ const getterFuncList = this.jsVersionPrioritized ? [getByJsFunc, getByKClangFunc] : [getByKClangFunc, getByJsFunc];
66546
+ const result = (_Iterator$from$map$fi = Iterator.from(getterFuncList).map(func => func()).find(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined)) !== null && _Iterator$from$map$fi !== void 0 ? _Iterator$from$map$fi : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.reject)(`Fetch function "${fetchFnName}" not defined`);
66547
+ return result;
66548
+ }
66549
+ getJsFunctionIfExists(fetchFnName, propName) {
66550
+ try {
66551
+ return propName != undefined ? this.jsSource.getFetchDescriptor(fetchFnName, propName) : this.jsSource.getFetchDescriptor(fetchFnName);
66552
+ } catch {
66553
+ return undefined;
66554
+ }
66555
+ }
66556
+ getKClangFunctionIfExists(fetchFnName, propName) {
66557
+ const funcFromKCLangResult = this.kclangSource.getJsExpressionByFunction(fetchFnName, (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.emptyAbsoluteModelPath)(), new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_1__.AbsoluteModelFieldPath((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.emptyAbsoluteModelPath)(), "value"), propName !== null && propName !== void 0 ? propName : "value");
66558
+ if (funcFromKCLangResult != undefined) {
66559
+ const requisitesList = new Set(funcFromKCLangResult.dependencies.map(dep => dep instanceof _generators_KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_2__.ExternalInfoDependency ? dep.dependencyKey : undefined).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined).filter(depKey => !depKey.startsWith("@settings/") && !depKey.startsWith("@featureFlags/")));
66560
+ const finalExpression = `(((expression, ap, each, current) => ${funcFromKCLangResult.jsExpressionText})(this.expressionRuntime, this.ap, this.each, this.current))`;
66561
+ const fetchFunc = eval(`(function () {
66562
+ return function () { return ${finalExpression}; };
66563
+ })()`);
66564
+ const result = {
66565
+ requisites: [...requisitesList],
66566
+ fn: fetchFunc
66567
+ };
66568
+ return result;
66569
+ }
66570
+ return undefined;
66571
+ }
66572
+ }
66573
+
66574
+ /***/ }),
66575
+
66449
66576
  /***/ "./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts":
66450
66577
  /*!*********************************************************************************!*\
66451
66578
  !*** ./Generator/src/common/RequireContext/LoadDocumentationFileFormContext.ts ***!
@@ -71393,7 +71520,7 @@ class AutoCalculationsCalculator2Generator extends _KCXmlGenerator_KCXmlGenerato
71393
71520
  const optional = this.dataDeclarationHelper.isNodeOptionalBySchemaOrSugar(target);
71394
71521
  const forceAutoValue = this.dataDeclarationHelper.isNodeHasForcedAutoValueEntry(target);
71395
71522
  const compiledTarget = this.modelPathInstance(target);
71396
- const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.distinctBy(dependencies.map(x => ({
71523
+ const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_2__.IterUtils.distinctBy(dependencies.filter(x => (0,_KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_1__.isIDependency)(x)).map(x => ({
71397
71524
  path: x.asDependencyModelPath(),
71398
71525
  isIgnoreForChecks: (0,_KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_1__.isDependencyWithoutChecks)(x),
71399
71526
  pathString: (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromTokens)(x.asDependencyModelPath().getPathPartsAsArray().map(token => token === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.current ? "!" : token)).toLegacyPath()
@@ -75814,6 +75941,482 @@ const statementsToCode = statements => {
75814
75941
 
75815
75942
  /***/ }),
75816
75943
 
75944
+ /***/ "./Generator/src/generators/KCLangToJsGenerator/KCLangExpressionToJsExpressionConverter.ts":
75945
+ /*!*************************************************************************************************!*\
75946
+ !*** ./Generator/src/generators/KCLangToJsGenerator/KCLangExpressionToJsExpressionConverter.ts ***!
75947
+ \*************************************************************************************************/
75948
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
75949
+
75950
+ "use strict";
75951
+ __webpack_require__.r(__webpack_exports__);
75952
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
75953
+ /* harmony export */ KCLangExpressionToJsExpressionConverter: () => (/* binding */ KCLangExpressionToJsExpressionConverter)
75954
+ /* harmony export */ });
75955
+ /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
75956
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
75957
+ /* harmony import */ var _markupGenerator_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../markupGenerator/ComponentMarkupBuilder/PathHelper */ "./Generator/src/generators/markupGenerator/ComponentMarkupBuilder/PathHelper.ts");
75958
+ /* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
75959
+ /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
75960
+ /* harmony import */ var _KCXmlGenerator_KCGeneratorUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../KCXmlGenerator/KCGeneratorUtils */ "./Generator/src/generators/KCXmlGenerator/KCGeneratorUtils.ts");
75961
+ /* harmony import */ var _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../KCXmlGenerator/KCXmlGeneratorBase */ "./Generator/src/generators/KCXmlGenerator/KCXmlGeneratorBase.ts");
75962
+ /* harmony import */ var _common_KCLang_CodeDom_KCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/KCLangExpressionVisitor */ "./Generator/src/common/KCLang/CodeDom/KCLangExpressionVisitor.ts");
75963
+ /* harmony import */ var _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/CastExpression */ "./Generator/src/common/KCLang/CodeDom/CastExpression.ts");
75964
+ /* harmony import */ var _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/StringConstExpression */ "./Generator/src/common/KCLang/CodeDom/StringConstExpression.ts");
75965
+ /* harmony import */ var _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/ValueReferenceExpression */ "./Generator/src/common/KCLang/CodeDom/ValueReferenceExpression.ts");
75966
+ /* harmony import */ var _common_CastUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/CastUtils */ "./Generator/src/common/CastUtils.ts");
75967
+
75968
+
75969
+
75970
+
75971
+
75972
+
75973
+
75974
+
75975
+
75976
+
75977
+
75978
+
75979
+ /* eslint-disable @typescript-eslint/unbound-method */
75980
+ class KCLangExpressionToJsExpressionConverter extends _common_KCLang_CodeDom_KCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_7__.KCLangExpressionVisitor {
75981
+ constructor(adjustPathMultiplicityFunc, options) {
75982
+ super();
75983
+ this.adjustPathMultiplicityFunc = void 0;
75984
+ this.options = void 0;
75985
+ this.options = options;
75986
+ this.adjustPathMultiplicityFunc = adjustPathMultiplicityFunc;
75987
+ }
75988
+ compileExpression(expression, prefix, targetFullPath, addDep) {
75989
+ const result = this.visit(expression, {
75990
+ prefix: prefix,
75991
+ targetFullPath: targetFullPath,
75992
+ addDep: addDep
75993
+ });
75994
+ return result;
75995
+ }
75996
+ skipGetPicklistValues() {
75997
+ return true;
75998
+ }
75999
+ gcf(functionSelector, ...args) {
76000
+ const funcName = (0,_markupGenerator_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_2__.extractPath)(functionSelector.toString());
76001
+ return `expression.${funcName}(${args.join(", ")})`;
76002
+ }
76003
+ agcf(functionSelector, ...args) {
76004
+ const funcName = (0,_markupGenerator_ComponentMarkupBuilder_PathHelper__WEBPACK_IMPORTED_MODULE_2__.extractPath)(functionSelector.toString());
76005
+ return `await expression.${funcName}(${args.join(", ")})`;
76006
+ }
76007
+ isAsync(compiledBody) {
76008
+ return compiledBody.includes("await ");
76009
+ }
76010
+ removeAttributePrefix(path) {
76011
+ return path.replace(/\@/g, "");
76012
+ }
76013
+ removeMultiplicity(path) {
76014
+ return path.replace(/\/\*/g, "");
76015
+ }
76016
+ getModelPath(prefix, path) {
76017
+ return this.adjustPathMultiplicityFunc(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createFromMask)(this.removeAttributePrefix(this.removeMultiplicity(path)), false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each)).normalize());
76018
+ }
76019
+ getArgumentDeps(targetFullPath, selectFullPath, aggregationType) {
76020
+ const pathDiffInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_3__.getMatchedAndDifferentModelPaths)(targetFullPath, selectFullPath);
76021
+ const restPath = pathDiffInfo.differentPath;
76022
+ return !restPath.isContainIteration() ? new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.RegularDependency(selectFullPath) : new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.AggregationDependencyModelPath(aggregationType, pathDiffInfo.matchedPath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([...restPath.getPathPartsAsArray().filter(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isSimpleToken(x)), aggregationType])), pathDiffInfo.matchedPath, restPath);
76023
+ }
76024
+ prepareModelPath(prefix, rawPath) {
76025
+ return this.adjustPathMultiplicityFunc(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createFromMask)(this.removeMultiplicity(this.removeAttributePrefix(rawPath)), "auto", _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each)).normalize());
76026
+ }
76027
+ calculatedGroupSumDependencyForSourcePath(targetKeyPath, sourcePath) {
76028
+ const diffPaths = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_3__.getMatchedAndDifferentModelPaths)(targetKeyPath, sourcePath);
76029
+ if (targetKeyPath.getIterationRank() > diffPaths.matchedPath.getIterationRank()) {
76030
+ return {
76031
+ currentDepsPath: diffPaths.matchedPath,
76032
+ eachDepsPath: diffPaths.differentPath
76033
+ };
76034
+ }
76035
+ const targetPathParts = diffPaths.matchedPath.getPathPartsAsArray();
76036
+ const lastStarIndex = targetPathParts.lastIndexOf(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.each);
76037
+ const currentDepsPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromTokens)(targetPathParts.slice(0, lastStarIndex));
76038
+ let eachDepsPath;
76039
+ if (lastStarIndex === -1) {
76040
+ eachDepsPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([...diffPaths.matchedPath.getPathParts(), ...diffPaths.differentPath.getPathParts()]);
76041
+ } else {
76042
+ var _targetPathParts$last;
76043
+ eachDepsPath = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createRelativeFromTokens)([(_targetPathParts$last = targetPathParts[lastStarIndex]) !== null && _targetPathParts$last !== void 0 ? _targetPathParts$last : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)("path in groupSum is incorrect. Cannot create DepsPath for " + targetPathParts.join("/")), ...targetPathParts.slice(lastStarIndex + 1), ...diffPaths.differentPath.getPathParts()]);
76044
+ }
76045
+ return {
76046
+ currentDepsPath: currentDepsPath,
76047
+ eachDepsPath: eachDepsPath
76048
+ };
76049
+ }
76050
+ visitValueReferenceExpression(expression, context) {
76051
+ var _this$options;
76052
+ if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.replaceNullPathGetterWithNullConstant && expression.path.toString() == "null") {
76053
+ return this.gcf(x => x.const, `null`);
76054
+ }
76055
+ const modelPath = this.prepareModelPath(context.prefix, expression.path.toString());
76056
+ const argumentDependency = this.getArgumentDeps(context.targetFullPath, modelPath, "Sum");
76057
+ context.addDep(argumentDependency);
76058
+ const finalPath = argumentDependency.asDependencyModelPath();
76059
+ return this.gcf(x => x.argument, _KCXmlGenerator_KCGeneratorUtils__WEBPACK_IMPORTED_MODULE_5__.KCGeneratorUtils.modelPathInstance(finalPath));
76060
+ }
76061
+ visitSumFunctionCall(expression, context) {
76062
+ const modelPath = this.prepareModelPath(context.prefix, expression.expr.path.toString());
76063
+ const argumentDependency = this.getArgumentDeps(context.targetFullPath, modelPath, "Sum");
76064
+ context.addDep(argumentDependency);
76065
+ const finalPath = argumentDependency.asDependencyModelPath();
76066
+ return this.gcf(x => x.argument, _KCXmlGenerator_KCGeneratorUtils__WEBPACK_IMPORTED_MODULE_5__.KCGeneratorUtils.modelPathInstance(finalPath));
76067
+ }
76068
+ visitCountFunctionCall(expression, context) {
76069
+ const modelPath = this.prepareModelPath(context.prefix, expression.expr.path.toString());
76070
+ let finalPath = modelPath;
76071
+ if (context.targetFullPath.isContainIteration()) {
76072
+ const argumentDependency = this.getArgumentDeps(context.targetFullPath, modelPath, "Count");
76073
+ context.addDep(argumentDependency);
76074
+ finalPath = argumentDependency.asDependencyModelPath();
76075
+ } else {
76076
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.RegularDependency(modelPath.trimLastStarIfLastToken()));
76077
+ }
76078
+ return this.gcf(x => x.count, _KCXmlGenerator_KCGeneratorUtils__WEBPACK_IMPORTED_MODULE_5__.KCGeneratorUtils.modelPathInstance(finalPath), `"${false}"`);
76079
+ }
76080
+ visitInstanceCountFunctionCall(expression, context) {
76081
+ const modelPath = this.prepareModelPath(context.prefix, expression.expr.path.toString());
76082
+ const finalPath = modelPath.trimLastStarIfLastToken();
76083
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.DependencyWithoutChecks(finalPath));
76084
+ return this.gcf(x => x.instanceCount, `"${finalPath.toLegacyPath()}"`);
76085
+ }
76086
+ visitExistsFunctionCall(expression, context) {
76087
+ const modelPath = this.prepareModelPath(context.prefix, expression.argument.path.toString());
76088
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.RegularDependency(modelPath));
76089
+ return this.gcf(x => x.exists, _KCXmlGenerator_KCGeneratorUtils__WEBPACK_IMPORTED_MODULE_5__.KCGeneratorUtils.modelPathInstance(modelPath));
76090
+ }
76091
+ visitIsEqualToAutoCalculatedFunctionCall(expression, context) {
76092
+ const path = expression.expr instanceof _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression ? expression.expr.path : expression.expr instanceof _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_8__.CastExpression && expression.expr.operand instanceof _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression ? expression.expr.operand.path : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)("IsEqualToAutoCalculatedFunctionCall: unsupported argument");
76093
+ const modelPath = this.prepareModelPath(context.prefix, path.toString());
76094
+ const finalPath = modelPath.trimLastStarIfLastToken();
76095
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.DependencyWithoutChecks(finalPath));
76096
+ return this.gcf(x => x.isValueEqlAutoValue, `"${finalPath.toLegacyPath()}"`);
76097
+ }
76098
+ visitConditionalExpression(expression, context) {
76099
+ const compiledCondition = this.visit(expression.condition, context);
76100
+ const compiledThen = this.visit(expression.trueResult, context);
76101
+ const compiledElse = this.visit(expression.elseResult, context);
76102
+ if (this.isAsync(compiledThen) || this.isAsync(compiledElse)) {
76103
+ return this.gcf(x => x.choose, compiledCondition, `async () => ${compiledThen}`, `async () => ${compiledElse}`);
76104
+ }
76105
+ return this.gcf(x => x.choose, compiledCondition, `() => ${compiledThen}`, `() => ${compiledElse}`);
76106
+ }
76107
+ visitNullCoalesceExpression(expression, context) {
76108
+ const left = this.visit(expression.left, context);
76109
+ const right = this.visit(expression.right, context);
76110
+ const nullCheck = this.gcf(x => x.eq, left, this.gcf(x => x.const, "null"));
76111
+ return this.gcf(x => x.choose, nullCheck, `() => ${right}`, `() => ${left}`);
76112
+ }
76113
+ visitOrExpression(expression, context) {
76114
+ const left = this.visit(expression.left, context);
76115
+ const right = this.visit(expression.right, context);
76116
+ return this.gcf(x => x.or, `[${left},${right}]`);
76117
+ }
76118
+ visitAndExpression(expression, context) {
76119
+ const left = this.visit(expression.left, context);
76120
+ const right = this.visit(expression.right, context);
76121
+ return this.gcf(x => x.and, `[${left},${right}]`);
76122
+ }
76123
+ visitNotExpression(expression, context) {
76124
+ return this.gcf(x => x.not, this.visit(expression.expression, context));
76125
+ }
76126
+ visitEqExpression(expression, context) {
76127
+ return this.gcf(x => x.eq, this.visit(expression.left, context), this.visit(expression.right, context));
76128
+ }
76129
+ visitNotEqExpression(expression, context) {
76130
+ return this.gcf(x => x.not, this.gcf(x => x.eq, this.visit(expression.left, context), this.visit(expression.right, context)));
76131
+ }
76132
+ visitGtExpression(expression, context) {
76133
+ return this.gcf(x => x.gt, this.visit(expression.left, context), this.visit(expression.right, context));
76134
+ }
76135
+ visitGeExpression(expression, context) {
76136
+ return this.gcf(x => x.ge, this.visit(expression.left, context), this.visit(expression.right, context));
76137
+ }
76138
+ visitLtExpression(expression, context) {
76139
+ return this.gcf(x => x.lt, this.visit(expression.left, context), this.visit(expression.right, context));
76140
+ }
76141
+ visitLeExpression(expression, context) {
76142
+ return this.gcf(x => x.le, this.visit(expression.left, context), this.visit(expression.right, context));
76143
+ }
76144
+ visitOneOfExpression(expression, context) {
76145
+ const arg = this.visit(expression.expression, context);
76146
+ const items = expression.inExpressions.map(item => this.visit(item, context)).join(",");
76147
+ return this.gcf(x => x.oneOf, arg, `[${items}]`);
76148
+ }
76149
+ visitSumExpression(expression, context) {
76150
+ const left = this.visit(expression.left, context);
76151
+ const right = this.visit(expression.right, context);
76152
+ return this.gcf(x => x.sum, `[${left},${right}]`);
76153
+ }
76154
+ visitMinusExpression(expression, context) {
76155
+ const left = this.visit(expression.left, context);
76156
+ const right = this.visit(expression.right, context);
76157
+ return this.gcf(x => x.sum, `[${left},${this.gcf(x => x.minus, right)}]`);
76158
+ }
76159
+ visitMultiplyExpression(expression, context) {
76160
+ const left = this.visit(expression.left, context);
76161
+ const right = this.visit(expression.right, context);
76162
+ return this.gcf(x => x.multiply, `[${left},${right}]`);
76163
+ }
76164
+ visitDivExpression(expression, context) {
76165
+ const left = this.visit(expression.left, context);
76166
+ const right = this.visit(expression.right, context);
76167
+ return this.gcf(x => x.division, `[${left},${right}]`);
76168
+ }
76169
+ visitUnaryMinusExpression(expression, context) {
76170
+ return this.gcf(x => x.minus, this.visit(expression.expr, context));
76171
+ }
76172
+ visitDecimalConstExpression(expression, _context) {
76173
+ return this.gcf(x => x.const, expression.originalString);
76174
+ }
76175
+ visitStringConstExpression(expression, _context) {
76176
+ return this.gcf(x => x.const, JSON.stringify(expression.value));
76177
+ }
76178
+ visitBoolConstExpression(expression, _context) {
76179
+ return this.gcf(x => x.const, JSON.stringify(String(expression.value)));
76180
+ }
76181
+ visitStringArrayConstExpression(expression, context) {
76182
+ const items = expression.expressions.map(item => this.visit(item, context)).join(", ");
76183
+ return `JSON.stringify([${items}])`;
76184
+ }
76185
+ visitLengthFunctionCall(expression, context) {
76186
+ return this.gcf(x => x.length, this.visit(expression.argument, context));
76187
+ }
76188
+ visitRegexMatchFunctionCall(expression, context) {
76189
+ return this.gcf(x => x.regexMatch, this.visit(expression.argument, context), this.visit(expression.patternExpression, context));
76190
+ }
76191
+ visitSubstringFunctionCall(expression, context) {
76192
+ const value = this.visit(expression.argument, context);
76193
+ const start = this.visit(expression.start, context);
76194
+ const length = expression.length ? this.visit(expression.length, context) : `"0"`;
76195
+ return `expression.substring(${value}, ${start}, ${length})`;
76196
+ }
76197
+ visitConcatFunctionCall(expression, context) {
76198
+ const compiledExpressions = expression.arguments.map(arg => this.visit(arg, context)).join(",");
76199
+ return this.gcf(x => x.concat, `[${compiledExpressions}]`);
76200
+ }
76201
+ visitNewlineFunctionCall(_expression, _context) {
76202
+ return this.gcf(x => x.const, `"\\r\\n"`);
76203
+ }
76204
+ visitJoinFunctionCall(expression, context) {
76205
+ return this.gcf(x => x.join, this.visit(expression.expr, context));
76206
+ }
76207
+ visitGetPropertyFunctionCall(expression, context) {
76208
+ return this.gcf(x => x.getProperty, this.visit(expression.expr, context));
76209
+ }
76210
+ visitFloorFunctionCall(expression, context) {
76211
+ return this.gcf(x => x.floor, this.visit(expression.argument, context));
76212
+ }
76213
+ visitAbsFunctionCall(expression, context) {
76214
+ return this.gcf(x => x.abs, this.visit(expression.argument, context));
76215
+ }
76216
+ visitXabsFunctionCall(expression, context) {
76217
+ return this.gcf(x => x.xabs, this.visit(expression.argument, context));
76218
+ }
76219
+ visitRoundFunctionCall(expression, context) {
76220
+ const value = this.visit(expression.argument, context);
76221
+ const digits = expression.fractionalDigits ? this.visit(expression.fractionalDigits, context) : "0";
76222
+ return this.gcf(x => x.round, value, digits);
76223
+ }
76224
+ visitDateNowFunctionCall(_expression, _context) {
76225
+ return this.gcf(x => x.dateNow);
76226
+ }
76227
+ visitDateTimeFunctionCall(expression, context) {
76228
+ return this.gcf(x => x.dateTime, this.visit(expression.argument, context));
76229
+ }
76230
+ visitGetDaysInMonthFunctionCall(expression, context) {
76231
+ return this.gcf(x => x.getDaysInMonth, this.visit(expression.dateExpr, context));
76232
+ }
76233
+ visitGetDayFunctionCall(expression, context) {
76234
+ return this.gcf(x => x.getDay, this.visit(expression.dateExpr, context));
76235
+ }
76236
+ visitGetMonthFunctionCall(expression, context) {
76237
+ return this.gcf(x => x.getMonth, this.visit(expression.dateExpr, context));
76238
+ }
76239
+ visitGetYearFunctionCall(expression, context) {
76240
+ return this.gcf(x => x.getYear, this.visit(expression.dateExpr, context));
76241
+ }
76242
+ visitIsDateFunctionCall(expression, context) {
76243
+ return this.gcf(x => x.isDate, this.visit(expression.expr, context));
76244
+ }
76245
+ visitDifferenceInMonthsFunctionCall(expression, context) {
76246
+ return this.gcf(x => x.differenceInMonths, `[${this.visit(expression.startDate, context)},${this.visit(expression.endDate, context)}]`);
76247
+ }
76248
+ visitDifferenceInDaysFunctionCall(expression, context) {
76249
+ return this.gcf(x => x.differenceInDays, `[${this.visit(expression.startDate, context)},${this.visit(expression.endDate, context)}]`);
76250
+ }
76251
+ visitAddDaysFunctionCall(expression, context) {
76252
+ return this.gcf(x => x.addDays, `${this.visit(expression.dateExpression, context)}, ${this.visit(expression.daysExpression, context)}`);
76253
+ }
76254
+ visitAddMonthsFunctionCall(expression, context) {
76255
+ return this.gcf(x => x.addMonths, `${this.visit(expression.dateExpression, context)}, ${this.visit(expression.monthsExpression, context)}`);
76256
+ }
76257
+ visitAddYearsFunctionCall(expression, context) {
76258
+ return this.gcf(x => x.addYears, `${this.visit(expression.dateExpression, context)}, ${this.visit(expression.yearsExpression, context)}`);
76259
+ }
76260
+ visitDateToStringFunctionCall(expression, context) {
76261
+ const date = this.visit(expression.dateExpression, context);
76262
+ const format = expression.format ? this.visit(expression.format, context) : `"dd.MM.yyyy"`;
76263
+ return this.gcf(x => x.dateToString, `${date}, ${format}`);
76264
+ }
76265
+ visitIsInnFunctionCall(expression, context) {
76266
+ return this.gcf(x => x.isInn, this.visit(expression.argument, context));
76267
+ }
76268
+ visitIsSnilsFunctionCall(expression, context) {
76269
+ return this.gcf(x => x.isSnils, this.visit(expression.argument, context));
76270
+ }
76271
+ visitIsRegNumSfrFunctionCall(expression, context) {
76272
+ return this.gcf(x => x.isRegNumSfr, this.visit(expression.argument, context));
76273
+ }
76274
+ visitIsOgrnFunctionCall(expression, context) {
76275
+ return this.gcf(x => x.isOgrn, this.visit(expression.argument, context));
76276
+ }
76277
+ visitIsValidMirCardNumberFunctionCall(expression, context) {
76278
+ return this.gcf(x => x.isValidMirCardNumber, this.visit(expression.expr, context));
76279
+ }
76280
+ visitIsValidAccountNumberFunctionCall(expression, context) {
76281
+ return this.gcf(x => x.isValidAccountNumber, this.visit(expression.bik, context), this.visit(expression.account, context));
76282
+ }
76283
+ visitIsNullFunctionCall(expression, context) {
76284
+ const nullCheck = this.gcf(x => x.eq, this.visit(expression.argument, context), this.gcf(x => x.const, "null"));
76285
+ const undefinedCheck = this.gcf(x => x.eq, this.visit(expression.argument, context), this.gcf(x => x.const, "undefined"));
76286
+ return this.gcf(x => x.or, `[${nullCheck}, ${undefinedCheck}]`);
76287
+ }
76288
+ visitGroupSumFunctionCall(expression, context) {
76289
+ const targetKeys = this.visit(expression.targetKeyOrKeys, context);
76290
+ const sourceKeyPath = this.getModelPath(context.prefix, expression.sourceKey.path.toString());
76291
+ const sourceKeyDeps = this.calculatedGroupSumDependencyForSourcePath(context.targetFullPath, sourceKeyPath);
76292
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.DependencyWithoutChecks(sourceKeyDeps.currentDepsPath, sourceKeyDeps.eachDepsPath));
76293
+ const sourceValuePath = this.getModelPath(context.prefix, expression.sourceValue.path.toString());
76294
+ const sourceValueDeps = this.calculatedGroupSumDependencyForSourcePath(context.targetFullPath, sourceValuePath);
76295
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.DependencyWithoutChecks(sourceValueDeps.currentDepsPath, sourceValueDeps.eachDepsPath));
76296
+ return this.gcf(x => x.groupSum, `${targetKeys}, "${sourceKeyPath}", "${sourceValuePath}"`);
76297
+ }
76298
+ visitGroupCountFunctionCall(expression, context) {
76299
+ const targetKeys = this.visit(expression.targetKeyOrKeys, context);
76300
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.DependencyWithoutChecks(context.targetFullPath));
76301
+ const sourceKeyPath = this.getModelPath(context.prefix, expression.sourceKey.path.toString());
76302
+ const sourceKeyDeps = this.calculatedGroupSumDependencyForSourcePath(context.targetFullPath, sourceKeyPath);
76303
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.DependencyWithoutChecks(sourceKeyDeps.currentDepsPath, sourceKeyDeps.eachDepsPath));
76304
+ return this.gcf(x => x.groupCount, `${targetKeys}, "${sourceKeyPath}"`);
76305
+ }
76306
+ visitArrayExpression(expression, context) {
76307
+ const items = expression.expressions.map(x => this.visit(x, context)).join(", ");
76308
+ return `JSON.stringify([${items}])`;
76309
+ }
76310
+ visitArrayFunctionCall(expression, context) {
76311
+ const items = expression.expressions.map(arg => this.visit(arg, context)).join(", ");
76312
+ return `JSON.stringify([${items}])`;
76313
+ }
76314
+ visitCastExpression(expression, context) {
76315
+ return this.visit(expression.operand, context);
76316
+ }
76317
+ visitGetPicklistValuesFunctionCall(expression, context) {
76318
+ if (this.skipGetPicklistValues()) {
76319
+ return "null";
76320
+ }
76321
+ return this.agcf(x => x.getPicklistValues, this.visit(expression.gId, context), this.visit(expression.filterColumns, context), this.visit(expression.filterValues, context), this.visit(expression.resultColumn, context));
76322
+ }
76323
+ visitFirstOrDefaultFunctionCall(_expression, _context) {
76324
+ return "null";
76325
+ }
76326
+ visitHashSetFunctionCall(_expression, _context) {
76327
+ return "null";
76328
+ }
76329
+ visitNodepsFunctionCall(_expression, _context) {
76330
+ return "null";
76331
+ }
76332
+ visitHasAutoFlagFunctionCall(_expression, _context) {
76333
+ return "null";
76334
+ }
76335
+ visitSumOfDayWeightsFunctionCall(_expression, _context) {
76336
+ return "null";
76337
+ }
76338
+ visitGetDateTimeTicksFunctionCall(_expression, _context) {
76339
+ return "null";
76340
+ }
76341
+ visitKCLangRawStringExpression(_expression, _context) {
76342
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("KCLangRawStringExpression is not supported");
76343
+ }
76344
+ visitQuotedExpression(_expression, _context) {
76345
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("QuotedExpression is not supported");
76346
+ }
76347
+ visitVariableExpression(_expression, _context) {
76348
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("VariableExpression is not supported");
76349
+ }
76350
+ visitGetExternalInfoFunctionalCall(expression, context) {
76351
+ const keyAsStringConst = (0,_common_CastUtils__WEBPACK_IMPORTED_MODULE_11__.safeCast)(expression.key, _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_9__.StringConstExpression);
76352
+ const dependencyKey = keyAsStringConst != undefined ? keyAsStringConst.value : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_1__.reject)("visitGetExternalInfoFunctionalCall: Supported only constant value for key");
76353
+ context.addDep(new _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_6__.ExternalInfoDependency(dependencyKey));
76354
+ return this.gcf(x => x.getProperty, `"${dependencyKey.replace(/^\@/, "")}"`, `() => undefined`);
76355
+ }
76356
+ visitGetSumByKeysFunctionCall(_expression, _context) {
76357
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("GetSumByKeysFunctionCall is not supported");
76358
+ }
76359
+ visitNumeratorFunctionCall(expression, context) {
76360
+ return this.gcf(x => x.numerator, this.visit(expression.argument, context));
76361
+ }
76362
+ visitDenominatorFunctionCall(expression, context) {
76363
+ return this.gcf(x => x.denominator, this.visit(expression.argument, context));
76364
+ }
76365
+ visitMakeDictFunctionCall(_expression, _context) {
76366
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("MakeDictFunctionCall is not supported");
76367
+ }
76368
+ visitUserDefinedFunctionCall(_expression, _context) {
76369
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_4__.NotSupportedError("UserDefinedFunctionCall is not supported");
76370
+ }
76371
+ }
76372
+
76373
+ /***/ }),
76374
+
76375
+ /***/ "./Generator/src/generators/KCLangToJsGenerator/KClangUserDefinedFunctionsForJSRegistry.ts":
76376
+ /*!*************************************************************************************************!*\
76377
+ !*** ./Generator/src/generators/KCLangToJsGenerator/KClangUserDefinedFunctionsForJSRegistry.ts ***!
76378
+ \*************************************************************************************************/
76379
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
76380
+
76381
+ "use strict";
76382
+ __webpack_require__.r(__webpack_exports__);
76383
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
76384
+ /* harmony export */ KClangUserDefinedFunctionsForJSRegistry: () => (/* binding */ KClangUserDefinedFunctionsForJSRegistry)
76385
+ /* harmony export */ });
76386
+ /* harmony import */ var _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../KCXmlGenerator/KCXmlGeneratorBase */ "./Generator/src/generators/KCXmlGenerator/KCXmlGeneratorBase.ts");
76387
+ /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
76388
+
76389
+
76390
+ class KClangUserDefinedFunctionsForJSRegistry {
76391
+ constructor(converter, funcDefinitions) {
76392
+ this.funcDefinitions = void 0;
76393
+ this.converter = void 0;
76394
+ this.converter = converter;
76395
+ this.funcDefinitions = funcDefinitions;
76396
+ }
76397
+ getDefinition(name) {
76398
+ return this.funcDefinitions[name];
76399
+ }
76400
+ getJsExpressionByFunction(name, prefix, target, fieldName) {
76401
+ const funcDefinition = this.funcDefinitions[name + "_" + (fieldName !== null && fieldName !== void 0 ? fieldName : "value")];
76402
+ if (funcDefinition === undefined) {
76403
+ return undefined;
76404
+ }
76405
+ const deps = [];
76406
+ const conversionResult = this.converter.compileExpression(funcDefinition.body, prefix, target.path, dep => deps.push(dep));
76407
+ const hasUnsupportedDeps = deps.some(dep => dep instanceof _KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_0__.AggregationDependencyModelPath);
76408
+ if (hasUnsupportedDeps) {
76409
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_1__.NotSupportedError(`Complex paths is not supported for fetch functions (FetchFn: ${name}, ${fieldName !== null && fieldName !== void 0 ? fieldName : "value"})`);
76410
+ }
76411
+ return {
76412
+ jsExpressionText: conversionResult,
76413
+ dependencies: deps
76414
+ };
76415
+ }
76416
+ }
76417
+
76418
+ /***/ }),
76419
+
75817
76420
  /***/ "./Generator/src/generators/KCXmlGenerator/KCGeneratorUtils.ts":
75818
76421
  /*!*********************************************************************!*\
75819
76422
  !*** ./Generator/src/generators/KCXmlGenerator/KCGeneratorUtils.ts ***!
@@ -75874,10 +76477,12 @@ __webpack_require__.r(__webpack_exports__);
75874
76477
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
75875
76478
  /* harmony export */ AggregationDependencyModelPath: () => (/* binding */ AggregationDependencyModelPath),
75876
76479
  /* harmony export */ DependencyWithoutChecks: () => (/* binding */ DependencyWithoutChecks),
76480
+ /* harmony export */ ExternalInfoDependency: () => (/* binding */ ExternalInfoDependency),
75877
76481
  /* harmony export */ KCXmlGeneratorBase: () => (/* binding */ KCXmlGeneratorBase),
75878
76482
  /* harmony export */ RegularDependency: () => (/* binding */ RegularDependency),
75879
76483
  /* harmony export */ isAggregationDependencyModelPath: () => (/* binding */ isAggregationDependencyModelPath),
75880
- /* harmony export */ isDependencyWithoutChecks: () => (/* binding */ isDependencyWithoutChecks)
76484
+ /* harmony export */ isDependencyWithoutChecks: () => (/* binding */ isDependencyWithoutChecks),
76485
+ /* harmony export */ isIDependency: () => (/* binding */ isIDependency)
75881
76486
  /* harmony export */ });
75882
76487
  /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
75883
76488
  /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_Formula__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/Formula.ts");
@@ -75925,6 +76530,15 @@ class AggregationDependencyModelPath {
75925
76530
  }
75926
76531
  }
75927
76532
  class DependencyWithoutChecks extends RegularDependency {}
76533
+ class ExternalInfoDependency {
76534
+ constructor(dependencyKey) {
76535
+ this.dependencyKey = void 0;
76536
+ this.dependencyKey = dependencyKey;
76537
+ }
76538
+ }
76539
+ function isIDependency(dep) {
76540
+ return "asDependencyModelPath" in dep && typeof dep.asDependencyModelPath === "function";
76541
+ }
75928
76542
  function isAggregationDependencyModelPath(path) {
75929
76543
  return path instanceof AggregationDependencyModelPath;
75930
76544
  }
@@ -76389,7 +77003,7 @@ class KCXmlGeneratorBase {
76389
77003
  return compiledBody.includes("await ");
76390
77004
  }
76391
77005
  compilePathVariables(compilations, indentLine) {
76392
- const paths = compilations.map(x => x.dependencies.map(dep => dep.asDependencyModelPath())).flat().map(path => {
77006
+ const paths = compilations.map(x => x.dependencies.filter(dep => isIDependency(dep)).map(dep => dep.asDependencyModelPath())).flat().map(path => {
76393
77007
  const nextPath = (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_7__.adjustPathMultiplicity)(this.schema, this.extendedSchemaInfo, (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.createAbsoluteFromTokens)(path.getPathPartsAsArray().filter(_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_0__.PathTokens.isSimpleToken)));
76394
77008
  return nextPath.isContainIteration() ? [path, nextPath] : [path];
76395
77009
  }).flat();
@@ -76489,7 +77103,7 @@ class KCXmlValidationGenerator extends _KCXmlGenerator_KCXmlGeneratorBase__WEBPA
76489
77103
  }
76490
77104
  const compiledDescription = this.compileExpression(prefix, target, concatDescription, deps);
76491
77105
  const compiledTarget = this.modelPathInstance(target);
76492
- const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.distinctBy(deps.map(x => ({
77106
+ const dependencyModelPaths = Array.from(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_3__.IterUtils.distinctBy(deps.filter(x => (0,_KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_9__.isIDependency)(x)).map(x => ({
76493
77107
  path: x.asDependencyModelPath(),
76494
77108
  isIgnoreForChecks: (0,_KCXmlGenerator_KCXmlGeneratorBase__WEBPACK_IMPORTED_MODULE_9__.isDependencyWithoutChecks)(x),
76495
77109
  pathString: (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createAbsoluteFromTokens)(x.asDependencyModelPath().getPathPartsAsArray().map(token => token === _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.current ? "!" : token)).toLegacyPath()
@@ -76685,6 +77299,7 @@ __webpack_require__.r(__webpack_exports__);
76685
77299
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
76686
77300
  /* harmony export */ createLazyLoadingKCLangRules: () => (/* binding */ createLazyLoadingKCLangRules),
76687
77301
  /* harmony export */ extractKCLangFromSugar: () => (/* binding */ extractKCLangFromSugar),
77302
+ /* harmony export */ getReferencedFetchFunctions: () => (/* binding */ getReferencedFetchFunctions),
76688
77303
  /* harmony export */ processSugar: () => (/* binding */ processSugar)
76689
77304
  /* harmony export */ });
76690
77305
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
@@ -76708,53 +77323,67 @@ __webpack_require__.r(__webpack_exports__);
76708
77323
  /* harmony import */ var _common_KCLang_CodeDom_DecimalConstExpression__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../common/KCLang/CodeDom/DecimalConstExpression */ "./Generator/src/common/KCLang/CodeDom/DecimalConstExpression.ts");
76709
77324
  /* harmony import */ var _common_KCLang_CodeDom_ConditionalExpression__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../common/KCLang/CodeDom/ConditionalExpression */ "./Generator/src/common/KCLang/CodeDom/ConditionalExpression.ts");
76710
77325
  /* harmony import */ var _common_KCLang_CodeDom_StringConstExpression__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../common/KCLang/CodeDom/StringConstExpression */ "./Generator/src/common/KCLang/CodeDom/StringConstExpression.ts");
76711
- /* harmony import */ var _localization_localization__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./localization/localization */ "./Generator/src/generators/localization/localization.ts");
76712
- /* harmony import */ var _markupGenerator_controlCustomization_ControlCustomizationContextBuilder__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./markupGenerator/controlCustomization/ControlCustomizationContextBuilder */ "./Generator/src/generators/markupGenerator/controlCustomization/ControlCustomizationContextBuilder.ts");
76713
- /* harmony import */ var _markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./markupGenerator/getSettings */ "./Generator/src/generators/markupGenerator/getSettings.ts");
76714
- /* harmony import */ var _markupGenerator_IFarmFileSystem__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./markupGenerator/IFarmFileSystem */ "./Generator/src/generators/markupGenerator/IFarmFileSystem.ts");
76715
- /* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./markupGenerator/ElementProcessors/FormParts/Form/FormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormNode.ts");
76716
- /* harmony import */ var _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./markupGenerator/MarkupGenerator */ "./Generator/src/generators/markupGenerator/MarkupGenerator.ts");
76717
- /* harmony import */ var _markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./markupGenerator/SugarNodes/DefaultSugarSerializer */ "./Generator/src/generators/markupGenerator/SugarNodes/DefaultSugarSerializer.ts");
76718
- /* harmony import */ var _markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./markupGenerator/SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
76719
- /* harmony import */ var _validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./validationGenerator/TypesRegistry */ "./Generator/src/generators/validationGenerator/TypesRegistry.ts");
76720
- /* harmony import */ var _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./validationGenerator/ValidationGenerator */ "./Generator/src/generators/validationGenerator/ValidationGenerator.ts");
76721
- /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader.ts");
76722
- /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./AutoCalculationsGenerator/AutoCalculationsGenerator */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsGenerator.ts");
76723
- /* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationGenerator */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerator.ts");
76724
- /* harmony import */ var _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory.ts");
76725
- /* harmony import */ var _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./FormSourcesBuilder/FormSourcesBuilder */ "./Generator/src/generators/FormSourcesBuilder/FormSourcesBuilder.ts");
76726
- /* harmony import */ var _HelperFunctionsGenerator_HelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./HelperFunctionsGenerator/HelperFunctionsGenerator */ "./Generator/src/generators/HelperFunctionsGenerator/HelperFunctionsGenerator.ts");
76727
- /* harmony import */ var _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./KCXmlValidationGenerator/KCXmlValidationGenerator */ "./Generator/src/generators/KCXmlValidationGenerator/KCXmlValidationGenerator.ts");
76728
- /* harmony import */ var _RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./RequisiteLIst/requisiteList */ "./Generator/src/generators/RequisiteLIst/requisiteList.ts");
76729
- /* harmony import */ var _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/NormalizationRulesGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/NormalizationRulesGenerator.ts");
76730
- /* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationGenerationTimeHelper */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationTimeHelper.ts");
76731
- /* harmony import */ var _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./AttachmentPaths/AttachmentPathsGenerator */ "./Generator/src/generators/AttachmentPaths/AttachmentPathsGenerator.ts");
76732
- /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_Calculator2_AutoCalculationsCalculator2Generator__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./AutoCalculationsGenerator/AutoCalculationsFromFormulas/Calculator2/AutoCalculationsCalculator2Generator */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/Calculator2/AutoCalculationsCalculator2Generator.ts");
76733
- /* harmony import */ var _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./LazyLoadDeclarationGenerator/LazyLoadDeclarationGenerator */ "./Generator/src/generators/LazyLoadDeclarationGenerator/LazyLoadDeclarationGenerator.ts");
76734
- /* harmony import */ var _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/FormulaOnlyNormalizationRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/FormulaOnlyNormalizationRuleGenerator.ts");
76735
- /* harmony import */ var _HelperFunctionsGenerator_CommonHelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./HelperFunctionsGenerator/CommonHelperFunctionsGenerator */ "./Generator/src/generators/HelperFunctionsGenerator/CommonHelperFunctionsGenerator.ts");
76736
- /* harmony import */ var _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./ServerSideFLangNormalization/AdditionalNormalizerFile */ "./Generator/src/generators/ServerSideFLangNormalization/AdditionalNormalizerFile.ts");
76737
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/OptionalSectionRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/OptionalSectionRulesBuilder.ts");
76738
- /* harmony import */ var _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./ServerSideFLangNormalization/FormulaExpressionToFlangExpressionConverter */ "./Generator/src/generators/ServerSideFLangNormalization/FormulaExpressionToFlangExpressionConverter.ts");
76739
- /* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
76740
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/FormulaRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/FormulaRulesBuilder.ts");
76741
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/InitializationRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/InitializationRulesBuilder.ts");
76742
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/LazyLoadingRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/LazyLoadingRulesBuilder.ts");
76743
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/SugarRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/SugarRulesBuilder.ts");
76744
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/ValidationRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/ValidationRulesBuilder.ts");
76745
- /* harmony import */ var _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/FormulaAndInitOnlyNormalizationRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/FormulaAndInitOnlyNormalizationRuleGenerator.ts");
76746
- /* harmony import */ var _ServerSideFLangNormalization_CustomKCLangToFlangRuleGenerator__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./ServerSideFLangNormalization/CustomKCLangToFlangRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/CustomKCLangToFlangRuleGenerator.ts");
76747
- /* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
76748
- /* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
76749
- /* harmony import */ var _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/AutoValueForValueByDefaultNormalizationRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/AutoValueForValueByDefaultNormalizationRuleGenerator.ts");
76750
- /* harmony import */ var _markupGenerator_KCLangCalculationsBuildContext__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./markupGenerator/KCLangCalculationsBuildContext */ "./Generator/src/generators/markupGenerator/KCLangCalculationsBuildContext.ts");
76751
- /* harmony import */ var _ServerSideFLangNormalization_NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./ServerSideFLangNormalization/NodeTypeInfoHelper */ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts");
76752
- /* harmony import */ var _ExtendedSchema_ExtendedSchemaInfoUtils__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./ExtendedSchema/ExtendedSchemaInfoUtils */ "./Generator/src/generators/ExtendedSchema/ExtendedSchemaInfoUtils.ts");
76753
- /* harmony import */ var _markupGenerator_ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./markupGenerator/ElementProcessors/Commons/NodePathsContext */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/NodePathsContext.ts");
76754
- /* harmony import */ var _markupGenerator_IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./markupGenerator/IMarkupBuildingContext */ "./Generator/src/generators/markupGenerator/IMarkupBuildingContext.ts");
76755
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_OptionalElementsRulesBuilder__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/OptionalElementsRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/OptionalElementsRulesBuilder.ts");
76756
- /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_OptionalBlocksRulesBuilder__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/OptionalBlocksRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/OptionalBlocksRulesBuilder.ts");
76757
- /* harmony import */ var _markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./markupGenerator/getRootPath */ "./Generator/src/generators/markupGenerator/getRootPath.ts");
77326
+ /* harmony import */ var _common_CastUtils__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../common/CastUtils */ "./Generator/src/common/CastUtils.ts");
77327
+ /* harmony import */ var _common_KCLang_CodeDom_FunctionDefinition__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../common/KCLang/CodeDom/FunctionDefinition */ "./Generator/src/common/KCLang/CodeDom/FunctionDefinition.ts");
77328
+ /* harmony import */ var _common_KCLangAndJSFetchFunctions__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../common/KCLangAndJSFetchFunctions */ "./Generator/src/common/KCLangAndJSFetchFunctions.ts");
77329
+ /* harmony import */ var _localization_localization__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./localization/localization */ "./Generator/src/generators/localization/localization.ts");
77330
+ /* harmony import */ var _markupGenerator_controlCustomization_ControlCustomizationContextBuilder__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./markupGenerator/controlCustomization/ControlCustomizationContextBuilder */ "./Generator/src/generators/markupGenerator/controlCustomization/ControlCustomizationContextBuilder.ts");
77331
+ /* harmony import */ var _markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./markupGenerator/getSettings */ "./Generator/src/generators/markupGenerator/getSettings.ts");
77332
+ /* harmony import */ var _markupGenerator_IFarmFileSystem__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./markupGenerator/IFarmFileSystem */ "./Generator/src/generators/markupGenerator/IFarmFileSystem.ts");
77333
+ /* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./markupGenerator/ElementProcessors/FormParts/Form/FormNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Form/FormNode.ts");
77334
+ /* harmony import */ var _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./markupGenerator/MarkupGenerator */ "./Generator/src/generators/markupGenerator/MarkupGenerator.ts");
77335
+ /* harmony import */ var _markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./markupGenerator/SugarNodes/DefaultSugarSerializer */ "./Generator/src/generators/markupGenerator/SugarNodes/DefaultSugarSerializer.ts");
77336
+ /* harmony import */ var _markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./markupGenerator/SugarNodes/SugarNodeUtils */ "./Generator/src/generators/markupGenerator/SugarNodes/SugarNodeUtils.ts");
77337
+ /* harmony import */ var _validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./validationGenerator/TypesRegistry */ "./Generator/src/generators/validationGenerator/TypesRegistry.ts");
77338
+ /* harmony import */ var _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./validationGenerator/ValidationGenerator */ "./Generator/src/generators/validationGenerator/ValidationGenerator.ts");
77339
+ /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/KCXmlContract/FormulaReader.ts");
77340
+ /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./AutoCalculationsGenerator/AutoCalculationsGenerator */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsGenerator.ts");
77341
+ /* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationGenerator */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerator.ts");
77342
+ /* harmony import */ var _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationInitSourceSequenceFactory.ts");
77343
+ /* harmony import */ var _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./FormSourcesBuilder/FormSourcesBuilder */ "./Generator/src/generators/FormSourcesBuilder/FormSourcesBuilder.ts");
77344
+ /* harmony import */ var _HelperFunctionsGenerator_HelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./HelperFunctionsGenerator/HelperFunctionsGenerator */ "./Generator/src/generators/HelperFunctionsGenerator/HelperFunctionsGenerator.ts");
77345
+ /* harmony import */ var _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./KCXmlValidationGenerator/KCXmlValidationGenerator */ "./Generator/src/generators/KCXmlValidationGenerator/KCXmlValidationGenerator.ts");
77346
+ /* harmony import */ var _RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./RequisiteLIst/requisiteList */ "./Generator/src/generators/RequisiteLIst/requisiteList.ts");
77347
+ /* harmony import */ var _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/NormalizationRulesGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/NormalizationRulesGenerator.ts");
77348
+ /* harmony import */ var _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./DataDeclarationGenerator/DataDeclarationGenerationTimeHelper */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclarationGenerationTimeHelper.ts");
77349
+ /* harmony import */ var _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./AttachmentPaths/AttachmentPathsGenerator */ "./Generator/src/generators/AttachmentPaths/AttachmentPathsGenerator.ts");
77350
+ /* harmony import */ var _AutoCalculationsGenerator_AutoCalculationsFromFormulas_Calculator2_AutoCalculationsCalculator2Generator__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./AutoCalculationsGenerator/AutoCalculationsFromFormulas/Calculator2/AutoCalculationsCalculator2Generator */ "./Generator/src/generators/AutoCalculationsGenerator/AutoCalculationsFromFormulas/Calculator2/AutoCalculationsCalculator2Generator.ts");
77351
+ /* harmony import */ var _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./LazyLoadDeclarationGenerator/LazyLoadDeclarationGenerator */ "./Generator/src/generators/LazyLoadDeclarationGenerator/LazyLoadDeclarationGenerator.ts");
77352
+ /* harmony import */ var _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/FormulaOnlyNormalizationRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/FormulaOnlyNormalizationRuleGenerator.ts");
77353
+ /* harmony import */ var _HelperFunctionsGenerator_CommonHelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./HelperFunctionsGenerator/CommonHelperFunctionsGenerator */ "./Generator/src/generators/HelperFunctionsGenerator/CommonHelperFunctionsGenerator.ts");
77354
+ /* harmony import */ var _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./ServerSideFLangNormalization/AdditionalNormalizerFile */ "./Generator/src/generators/ServerSideFLangNormalization/AdditionalNormalizerFile.ts");
77355
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/OptionalSectionRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/OptionalSectionRulesBuilder.ts");
77356
+ /* harmony import */ var _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./ServerSideFLangNormalization/FormulaExpressionToFlangExpressionConverter */ "./Generator/src/generators/ServerSideFLangNormalization/FormulaExpressionToFlangExpressionConverter.ts");
77357
+ /* harmony import */ var _DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./DataSchema/DataSchemaUtils */ "./Generator/src/generators/DataSchema/DataSchemaUtils.ts");
77358
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/FormulaRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/FormulaRulesBuilder.ts");
77359
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/InitializationRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/InitializationRulesBuilder.ts");
77360
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/LazyLoadingRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/LazyLoadingRulesBuilder.ts");
77361
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/SugarRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/SugarRulesBuilder.ts");
77362
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/ValidationRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/ValidationRulesBuilder.ts");
77363
+ /* harmony import */ var _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/FormulaAndInitOnlyNormalizationRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/FormulaAndInitOnlyNormalizationRuleGenerator.ts");
77364
+ /* harmony import */ var _ServerSideFLangNormalization_CustomKCLangToFlangRuleGenerator__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./ServerSideFLangNormalization/CustomKCLangToFlangRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/CustomKCLangToFlangRuleGenerator.ts");
77365
+ /* harmony import */ var _markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./markupGenerator/Serializer/SugarSerializer */ "./Generator/src/generators/markupGenerator/Serializer/SugarSerializer.ts");
77366
+ /* harmony import */ var _markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./markupGenerator/AllConverters */ "./Generator/src/generators/markupGenerator/AllConverters.ts");
77367
+ /* harmony import */ var _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./ServerSideFLangNormalization/Normalizers/AutoValueForValueByDefaultNormalizationRuleGenerator */ "./Generator/src/generators/ServerSideFLangNormalization/Normalizers/AutoValueForValueByDefaultNormalizationRuleGenerator.ts");
77368
+ /* harmony import */ var _markupGenerator_KCLangCalculationsBuildContext__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./markupGenerator/KCLangCalculationsBuildContext */ "./Generator/src/generators/markupGenerator/KCLangCalculationsBuildContext.ts");
77369
+ /* harmony import */ var _ServerSideFLangNormalization_NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./ServerSideFLangNormalization/NodeTypeInfoHelper */ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts");
77370
+ /* harmony import */ var _ExtendedSchema_ExtendedSchemaInfoUtils__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./ExtendedSchema/ExtendedSchemaInfoUtils */ "./Generator/src/generators/ExtendedSchema/ExtendedSchemaInfoUtils.ts");
77371
+ /* harmony import */ var _markupGenerator_ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./markupGenerator/ElementProcessors/Commons/NodePathsContext */ "./Generator/src/generators/markupGenerator/ElementProcessors/Commons/NodePathsContext.ts");
77372
+ /* harmony import */ var _markupGenerator_IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./markupGenerator/IMarkupBuildingContext */ "./Generator/src/generators/markupGenerator/IMarkupBuildingContext.ts");
77373
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_OptionalElementsRulesBuilder__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/OptionalElementsRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/OptionalElementsRulesBuilder.ts");
77374
+ /* harmony import */ var _ServerSideFLangNormalization_RuleBuilders_OptionalBlocksRulesBuilder__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./ServerSideFLangNormalization/RuleBuilders/OptionalBlocksRulesBuilder */ "./Generator/src/generators/ServerSideFLangNormalization/RuleBuilders/OptionalBlocksRulesBuilder.ts");
77375
+ /* harmony import */ var _markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./markupGenerator/getRootPath */ "./Generator/src/generators/markupGenerator/getRootPath.ts");
77376
+ /* harmony import */ var _ServerSideFLangNormalization_KCLangExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ServerSideFLangNormalization/KCLangExpressionToFlangExpressionConverter */ "./Generator/src/generators/ServerSideFLangNormalization/KCLangExpressionToFlangExpressionConverter.ts");
77377
+ /* harmony import */ var _ServerSideFLangNormalization_KClangUserDefinedFunctionsForFlangRegistry__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./ServerSideFLangNormalization/KClangUserDefinedFunctionsForFlangRegistry */ "./Generator/src/generators/ServerSideFLangNormalization/KClangUserDefinedFunctionsForFlangRegistry.ts");
77378
+ /* harmony import */ var _KCLangToJsGenerator_KClangUserDefinedFunctionsForJSRegistry__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./KCLangToJsGenerator/KClangUserDefinedFunctionsForJSRegistry */ "./Generator/src/generators/KCLangToJsGenerator/KClangUserDefinedFunctionsForJSRegistry.ts");
77379
+ /* harmony import */ var _KCLangToJsGenerator_KCLangExpressionToJsExpressionConverter__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./KCLangToJsGenerator/KCLangExpressionToJsExpressionConverter */ "./Generator/src/generators/KCLangToJsGenerator/KCLangExpressionToJsExpressionConverter.ts");
77380
+
77381
+
77382
+
77383
+
77384
+
77385
+
77386
+
76758
77387
 
76759
77388
 
76760
77389
 
@@ -76826,21 +77455,21 @@ __webpack_require__.r(__webpack_exports__);
76826
77455
 
76827
77456
  function processSugar(formSugarContent, additionalContent, generationOptions) {
76828
77457
  try {
76829
- var _sugarRoot$schemaVali, _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _mathContainerFromSug, _mathContainerFromSug2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _Iterator$from$map$fl, _mathContainerFromSug3, _mathContainerFromSug4, _generationOptions$in, _generationOptions$in2, _additionalContent$fo5, _generationOptions$re, _additionalContent$fo6, _additionalContent$fo7, _additionalContent$fo8, _additionalContent$fo9, _additionalContent$fo10, _additionalContent$fo11, _additionalContent$fo12, _additionalContent$fo13;
77458
+ var _sugarRoot$schemaVali, _kxXmlMathContainer$f, _kxXmlMathContainer$f2, _kcLangMathContainer$, _kcLangMathContainer$2, _mathContainerFromSug, _mathContainerFromSug2, _additionalContent$fo, _additionalContent$fo2, _additionalContent$fo3, _additionalContent$fo4, _Iterator$from$map$fl, _mathContainerFromSug3, _mathContainerFromSug4, _generationOptions$in, _generationOptions$in2, _additionalContent$fo5, _additionalContent$fo6, _generationOptions$re, _additionalContent$fo7, _additionalContent$fo8, _additionalContent$fo9, _additionalContent$fo10, _additionalContent$fo11, _additionalContent$fo12, _additionalContent$fo13, _additionalContent$fo14, _additionalContent$fo15, _additionalContent$fo16;
76830
77459
  const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
76831
- const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_27__.createDefaultSugarSerializer)();
76832
- const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_28__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_25__.FormNode);
77460
+ const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_30__.createDefaultSugarSerializer)();
77461
+ const sugarRoot = (0,_markupGenerator_SugarNodes_SugarNodeUtils__WEBPACK_IMPORTED_MODULE_31__.strictCastNode)(serializer.deserializeFromSugarXmlNode(sugarAst), _markupGenerator_ElementProcessors_FormParts_Form_FormNode__WEBPACK_IMPORTED_MODULE_28__.FormNode);
76833
77462
  const formSchemaRng = _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_3__.FormSchemaRng.createFromSchemaRng(additionalContent.schemaRngContent);
76834
- const typeRegistry = (0,_validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_29__.buildTypesRegistry)(sugarRoot);
77463
+ const typeRegistry = (0,_validationGenerator_TypesRegistry__WEBPACK_IMPORTED_MODULE_32__.buildTypesRegistry)(sugarRoot);
76835
77464
  const useSchemaValidations = (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : true;
76836
77465
  const enableNewKclangParserAsPreparser = false;
76837
77466
  const kclLangParser = new _common_KCLang_Antlr_Parser_KCLangParser__WEBPACK_IMPORTED_MODULE_8__.KCLangParser();
76838
77467
  const getKclangDom = () => kclLangParser.parseProgram(additionalContent.kcLangContent);
76839
- const formulaReader = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_31__.FormulaReader();
77468
+ const formulaReader = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_34__.FormulaReader();
76840
77469
  const kcLangMathContainer = formulaReader.readFormulas(_common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_6__.KCLangToXmlTranspiler.transpile(enableNewKclangParserAsPreparser ? getKclangDom().toString() : additionalContent.kcLangContent));
76841
- const kxXmlMathContainer = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_31__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
76842
- const kcLangFromSugar = extractKCLangFromSugar(sugarRoot, formSchemaRng, new _ServerSideFLangNormalization_NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_61__.NodeTypeInfoHelper(formSchemaRng, typeRegistry, useSchemaValidations)).map(x => x.toString()).join("\n");
76843
- const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_35__.FormSourcesBuilder(additionalContent.formSourcesPath);
77470
+ const kxXmlMathContainer = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_KCXmlContract_FormulaReader__WEBPACK_IMPORTED_MODULE_34__.FormulaReader().readFormulas(additionalContent.kcJsXmlContent);
77471
+ const kcLangFromSugar = extractKCLangFromSugar(sugarRoot, formSchemaRng, new _ServerSideFLangNormalization_NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_64__.NodeTypeInfoHelper(formSchemaRng, typeRegistry, useSchemaValidations)).map(x => x.toString()).join("\n");
77472
+ const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_38__.FormSourcesBuilder(additionalContent.formSourcesPath);
76844
77473
  const mathContainerFromSugar = _common_KCLang_KCLangToXmlTranspiler__WEBPACK_IMPORTED_MODULE_6__.KCLangToXmlTranspiler.transpileAsMathContainer(kcLangFromSugar);
76845
77474
  const formulas = ((_kxXmlMathContainer$f = kxXmlMathContainer === null || kxXmlMathContainer === void 0 || (_kxXmlMathContainer$f2 = kxXmlMathContainer.formulas) === null || _kxXmlMathContainer$f2 === void 0 ? void 0 : _kxXmlMathContainer$f2.items) !== null && _kxXmlMathContainer$f !== void 0 ? _kxXmlMathContainer$f : []).concat((_kcLangMathContainer$ = kcLangMathContainer === null || kcLangMathContainer === void 0 || (_kcLangMathContainer$2 = kcLangMathContainer.formulas) === null || _kcLangMathContainer$2 === void 0 ? void 0 : _kcLangMathContainer$2.items) !== null && _kcLangMathContainer$ !== void 0 ? _kcLangMathContainer$ : []).concat((_mathContainerFromSug = mathContainerFromSugar === null || mathContainerFromSugar === void 0 || (_mathContainerFromSug2 = mathContainerFromSugar.formulas) === null || _mathContainerFromSug2 === void 0 ? void 0 : _mathContainerFromSug2.items) !== null && _mathContainerFromSug !== void 0 ? _mathContainerFromSug : []);
76846
77475
  const useServerCalculations = (_additionalContent$fo = (_additionalContent$fo2 = additionalContent.formJsonSettings) === null || _additionalContent$fo2 === void 0 ? void 0 : _additionalContent$fo2.useServerSideCalculations) !== null && _additionalContent$fo !== void 0 ? _additionalContent$fo : false;
@@ -76852,87 +77481,94 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
76852
77481
  return (_container$conditions = (_container$conditions2 = container.conditions) === null || _container$conditions2 === void 0 ? void 0 : _container$conditions2.items) !== null && _container$conditions !== void 0 ? _container$conditions : [];
76853
77482
  }).flatMap(x => x).toArray()) !== null && _Iterator$from$map$fl !== void 0 ? _Iterator$from$map$fl : []).concat((_mathContainerFromSug3 = (_mathContainerFromSug4 = mathContainerFromSugar.conditions) === null || _mathContainerFromSug4 === void 0 ? void 0 : _mathContainerFromSug4.items) !== null && _mathContainerFromSug3 !== void 0 ? _mathContainerFromSug3 : []);
76854
77483
  const schemaRng = (0,_common_XmlParser_XmlParser__WEBPACK_IMPORTED_MODULE_5__.parseXml)(additionalContent.schemaRngContent);
76855
- const farmFileSystem = (_generationOptions$in = generationOptions === null || generationOptions === void 0 || (_generationOptions$in2 = generationOptions.internalOptions) === null || _generationOptions$in2 === void 0 ? void 0 : _generationOptions$in2.fileSystem) !== null && _generationOptions$in !== void 0 ? _generationOptions$in : new _markupGenerator_IFarmFileSystem__WEBPACK_IMPORTED_MODULE_24__.NativeFarmFileSystem();
76856
- const controlCustomizationContext = (0,_markupGenerator_controlCustomization_ControlCustomizationContextBuilder__WEBPACK_IMPORTED_MODULE_22__.buildControlCustomizationContext)(sugarRoot, additionalContent.formSourcesPath, farmFileSystem);
77484
+ const farmFileSystem = (_generationOptions$in = generationOptions === null || generationOptions === void 0 || (_generationOptions$in2 = generationOptions.internalOptions) === null || _generationOptions$in2 === void 0 ? void 0 : _generationOptions$in2.fileSystem) !== null && _generationOptions$in !== void 0 ? _generationOptions$in : new _markupGenerator_IFarmFileSystem__WEBPACK_IMPORTED_MODULE_27__.NativeFarmFileSystem();
77485
+ const controlCustomizationContext = (0,_markupGenerator_controlCustomization_ControlCustomizationContextBuilder__WEBPACK_IMPORTED_MODULE_25__.buildControlCustomizationContext)(sugarRoot, additionalContent.formSourcesPath, farmFileSystem);
76857
77486
  const referencedFetchFunctions = additionalContent.fetchFunctionSources != undefined ? getReferencedFetchFunctions(additionalContent.fetchFunctionSources) : {};
76858
- const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions);
77487
+ const referencedKCLangFetchFunctions = getReferencedKclangFetchFunctions(additionalContent);
77488
+ const kclangAndJsFetchFunctions = new _common_KCLangAndJSFetchFunctions__WEBPACK_IMPORTED_MODULE_23__.KCLangAndJSFetchFunctions(new _KCLangToJsGenerator_KClangUserDefinedFunctionsForJSRegistry__WEBPACK_IMPORTED_MODULE_73__.KClangUserDefinedFunctionsForJSRegistry(new _KCLangToJsGenerator_KCLangExpressionToJsExpressionConverter__WEBPACK_IMPORTED_MODULE_74__.KCLangExpressionToJsExpressionConverter(path => path, {
77489
+ replaceNullPathGetterWithNullConstant: true
77490
+ }), referencedKCLangFetchFunctions), new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions), ((_additionalContent$fo5 = additionalContent.formJsonSettings) === null || _additionalContent$fo5 === void 0 ? void 0 : _additionalContent$fo5.useServerSideCalculations) != true);
76859
77491
  const additionalSettings = typeof additionalContent.additionalSettings === "string" ? JSON.parse(additionalContent.additionalSettings || "{}") : additionalContent.additionalSettings;
76860
- const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_33__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_34__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry, formSchemaRng, useSchemaValidations);
77492
+ const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_36__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_37__.DataDeclarationInitSourceSequenceFactory(kclangAndJsFetchFunctions), controlCustomizationContext, typeRegistry, formSchemaRng, useSchemaValidations);
76861
77493
  const {
76862
77494
  dataDeclarationContent,
76863
77495
  dataDeclaration
76864
77496
  } = dataDeclarationGenerator.generate();
76865
- const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_40__.DataDeclarationGenerationTimeHelper(dataDeclaration, formSchemaRng);
76866
- const extendedSchemaInfo = (0,_ExtendedSchema_ExtendedSchemaInfoUtils__WEBPACK_IMPORTED_MODULE_62__.buildExtendedSchemaInfo)(dataDeclarationHelper);
76867
- const markupBuilderContext = new _markupGenerator_IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_64__.MarkupBuildingContext(new _markupGenerator_ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_63__.NodePathsContext(), additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, useSchemaValidations);
76868
- const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_30__.ValidationGenerator(sugarRoot, typeRegistry, markupBuilderContext, controlCustomizationContext, formSchemaRng, useSchemaValidations, additionalContent.validationsContent, additionalContent.formJsonSettings);
76869
- const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_43__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
77497
+ const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_43__.DataDeclarationGenerationTimeHelper(dataDeclaration, formSchemaRng);
77498
+ const extendedSchemaInfo = (0,_ExtendedSchema_ExtendedSchemaInfoUtils__WEBPACK_IMPORTED_MODULE_65__.buildExtendedSchemaInfo)(dataDeclarationHelper);
77499
+ const markupBuilderContext = new _markupGenerator_IMarkupBuildingContext__WEBPACK_IMPORTED_MODULE_67__.MarkupBuildingContext(new _markupGenerator_ElementProcessors_Commons_NodePathsContext__WEBPACK_IMPORTED_MODULE_66__.NodePathsContext(), additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, useSchemaValidations);
77500
+ const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_33__.ValidationGenerator(sugarRoot, typeRegistry, markupBuilderContext, controlCustomizationContext, formSchemaRng, useSchemaValidations, additionalContent.validationsContent, additionalContent.formJsonSettings);
77501
+ const lazyLoadGenerator = new _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_46__.LazyLoadDeclarationGenerator(sugarRoot, formSchemaRng);
76870
77502
  const lazyLoadGeneratorResult = lazyLoadGenerator.generate();
76871
- if ((_additionalContent$fo5 = additionalContent.formJsonSettings) !== null && _additionalContent$fo5 !== void 0 && _additionalContent$fo5.useServerSideFLangNormalization) {
77503
+ if ((_additionalContent$fo6 = additionalContent.formJsonSettings) !== null && _additionalContent$fo6 !== void 0 && _additionalContent$fo6.useServerSideFLangNormalization) {
76872
77504
  var _additionalContent$fe;
76873
77505
  const kclangValidatios = Iterator.from(getImportedKclangValidations(sugarRoot, additionalContent)).toArray().join("\n");
76874
77506
  const fetchFunctionsKClangContent = (_additionalContent$fe = additionalContent.fetchFunctionKClangSources) === null || _additionalContent$fe === void 0 ? void 0 : _additionalContent$fe.join("\n\n");
76875
- const lazyLoadingStatements = [...createLazyLoadingKCLangRules((0,_markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_67__.getRootPath)(sugarRoot), lazyLoadGeneratorResult.declaration)].join("\n");
77507
+ const lazyLoadingStatements = [...createLazyLoadingKCLangRules((0,_markupGenerator_getRootPath__WEBPACK_IMPORTED_MODULE_70__.getRootPath)(sugarRoot), lazyLoadGeneratorResult.declaration)].join("\n");
76876
77508
  const fullKcLangContent = ["// KCLang Fetch Functions\n\n", fetchFunctionsKClangContent, "// KCLang User Formulas\n\n", additionalContent.kcLangContent, "// KCLang User Validations\n\n", kclangValidatios, "// KCLang Generated Sugar Rules\n\n", kcLangFromSugar, "// KCLang Generated Extra Rules\n\n", lazyLoadingStatements].join("\n");
76877
77509
  builder.addServerSideResource("All.kclang", fullKcLangContent);
76878
77510
  builder.addServerSideResource("extendedSchema.json", JSON.stringify(extendedSchemaInfo, _Common_SerializationUtils__WEBPACK_IMPORTED_MODULE_7__.excludeUndefinedOrEmptyObjectJsonReplacer));
76879
77511
  }
76880
77512
  const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
76881
- const formulaExprConverter = new _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_48__.FormulaExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_49__.adjustPathMultiplicityComplex)(path, dataDeclarationHelper), {
76882
- enableGroupSumAutoConversion: (_additionalContent$fo6 = (_additionalContent$fo7 = additionalContent.formJsonSettings) === null || _additionalContent$fo7 === void 0 ? void 0 : _additionalContent$fo7.useServerSideCalculations) !== null && _additionalContent$fo6 !== void 0 ? _additionalContent$fo6 : false
77513
+ const kclangCodeDomExprToFlangConverter = new _ServerSideFLangNormalization_KCLangExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_71__.KCLangExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_52__.adjustPathMultiplicityComplex)(path, dataDeclarationHelper), {
77514
+ enableGroupSumAutoConversion: (_additionalContent$fo7 = (_additionalContent$fo8 = additionalContent.formJsonSettings) === null || _additionalContent$fo8 === void 0 ? void 0 : _additionalContent$fo8.useServerSideCalculations) !== null && _additionalContent$fo7 !== void 0 ? _additionalContent$fo7 : false
77515
+ });
77516
+ const kclangUserDefinedFuncFlangRegistry = new _ServerSideFLangNormalization_KClangUserDefinedFunctionsForFlangRegistry__WEBPACK_IMPORTED_MODULE_72__.KClangUserDefinedFunctionsForFlangRegistry(kclangCodeDomExprToFlangConverter, referencedKCLangFetchFunctions);
77517
+ const formulaExprConverter = new _ServerSideFLangNormalization_FormulaExpressionToFlangExpressionConverter__WEBPACK_IMPORTED_MODULE_51__.FormulaExpressionToFlangExpressionConverter(path => (0,_DataSchema_DataSchemaUtils__WEBPACK_IMPORTED_MODULE_52__.adjustPathMultiplicityComplex)(path, dataDeclarationHelper), {
77518
+ enableGroupSumAutoConversion: (_additionalContent$fo9 = (_additionalContent$fo10 = additionalContent.formJsonSettings) === null || _additionalContent$fo10 === void 0 ? void 0 : _additionalContent$fo10.useServerSideCalculations) !== null && _additionalContent$fo9 !== void 0 ? _additionalContent$fo9 : false
76883
77519
  });
76884
- const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_50__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter, {
76885
- enableTypedFlang: (_additionalContent$fo8 = (_additionalContent$fo9 = additionalContent.formJsonSettings) === null || _additionalContent$fo9 === void 0 ? void 0 : _additionalContent$fo9.useServerSideCalculations) !== null && _additionalContent$fo8 !== void 0 ? _additionalContent$fo8 : false
77520
+ const formulaRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_FormulaRulesBuilder__WEBPACK_IMPORTED_MODULE_53__.FormulaRulesBuilder(formSchemaRng, formulas, dataDeclarationHelper, formulaExprConverter, {
77521
+ enableTypedFlang: (_additionalContent$fo11 = (_additionalContent$fo12 = additionalContent.formJsonSettings) === null || _additionalContent$fo12 === void 0 ? void 0 : _additionalContent$fo12.useServerSideCalculations) !== null && _additionalContent$fo11 !== void 0 ? _additionalContent$fo11 : false
76886
77522
  });
76887
- const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_51__.InitializationRulesBuilder(sugarRoot, resourcesHash);
76888
- const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_52__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
76889
- const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_53__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, useSchemaValidations);
76890
- const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_54__.ValidationRulesBuilder(dataDeclarationHelper, formulaExprConverter, kcXmlConditions);
76891
- const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_47__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
76892
- const optionalElementsRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalElementsRulesBuilder__WEBPACK_IMPORTED_MODULE_65__.OptionalElementsRulesBuilder(formSchemaRng, dataDeclarationHelper);
76893
- const optionalBlocksRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalBlocksRulesBuilder__WEBPACK_IMPORTED_MODULE_66__.OptionalBlocksRulesBuilder(dataDeclarationHelper);
76894
- const normalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_39__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, optionalElementsRulesBuilder, optionalBlocksRulesBuilder, false);
76895
- const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_44__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder, optionalElementsRulesBuilder, optionalBlocksRulesBuilder, {
76896
- enableTypedFlang: (_additionalContent$fo10 = (_additionalContent$fo11 = additionalContent.formJsonSettings) === null || _additionalContent$fo11 === void 0 ? void 0 : _additionalContent$fo11.useServerSideCalculations) !== null && _additionalContent$fo10 !== void 0 ? _additionalContent$fo10 : false
77523
+ const initializationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_InitializationRulesBuilder__WEBPACK_IMPORTED_MODULE_54__.InitializationRulesBuilder(sugarRoot, resourcesHash);
77524
+ const lazyLoadingRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_LazyLoadingRulesBuilder__WEBPACK_IMPORTED_MODULE_55__.LazyLoadingRulesBuilder(sugarRoot, lazyLoadGeneratorResult.declaration);
77525
+ const sugarRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_SugarRulesBuilder__WEBPACK_IMPORTED_MODULE_56__.SugarRulesBuilder(sugarRoot, formSchemaRng, controlCustomizationContext, kclangAndJsFetchFunctions, kclangUserDefinedFuncFlangRegistry, dataDeclarationHelper, typeRegistry, useSchemaValidations);
77526
+ const validationRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_ValidationRulesBuilder__WEBPACK_IMPORTED_MODULE_57__.ValidationRulesBuilder(dataDeclarationHelper, formulaExprConverter, kcXmlConditions);
77527
+ const optionalSectionRuleBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalSectionRulesBuilder__WEBPACK_IMPORTED_MODULE_50__.OptionalSectionRulesBuilder(sugarRoot, dataDeclarationHelper);
77528
+ const optionalElementsRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalElementsRulesBuilder__WEBPACK_IMPORTED_MODULE_68__.OptionalElementsRulesBuilder(formSchemaRng, dataDeclarationHelper);
77529
+ const optionalBlocksRulesBuilder = new _ServerSideFLangNormalization_RuleBuilders_OptionalBlocksRulesBuilder__WEBPACK_IMPORTED_MODULE_69__.OptionalBlocksRulesBuilder(dataDeclarationHelper);
77530
+ const normalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_42__.NormalizationRulesGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, optionalElementsRulesBuilder, optionalBlocksRulesBuilder, false);
77531
+ const formulaOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_47__.FormulaOnlyNormalizationRuleGenerator(dataDeclarationHelper, formSchemaRng, formulas, optionalSectionRuleBuilder, formulaExprConverter, validationRulesBuilder, optionalElementsRulesBuilder, optionalBlocksRulesBuilder, {
77532
+ enableTypedFlang: (_additionalContent$fo13 = (_additionalContent$fo14 = additionalContent.formJsonSettings) === null || _additionalContent$fo14 === void 0 ? void 0 : _additionalContent$fo14.useServerSideCalculations) !== null && _additionalContent$fo13 !== void 0 ? _additionalContent$fo13 : false
76897
77533
  });
76898
- const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_55__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, formSchemaRng, optionalSectionRuleBuilder, optionalElementsRulesBuilder, optionalBlocksRulesBuilder);
76899
- const autoValueForValueByDefaultNormalizationRuleGenerator = new _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_59__.AutoValueForValueByDefaultNormalizationRuleGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, optionalElementsRulesBuilder, optionalBlocksRulesBuilder, dataDeclarationHelper);
76900
- const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_26__.MarkupGenerator(markupBuilderContext);
77534
+ const formulaAndInitOnlyNormalizationRulesGenerator = new _ServerSideFLangNormalization_Normalizers_FormulaAndInitOnlyNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_58__.FormulaAndInitOnlyNormalizationRuleGenerator(sugarRulesBuilder, formulaRulesBuilder, formSchemaRng, optionalSectionRuleBuilder, optionalElementsRulesBuilder, optionalBlocksRulesBuilder);
77535
+ const autoValueForValueByDefaultNormalizationRuleGenerator = new _ServerSideFLangNormalization_Normalizers_AutoValueForValueByDefaultNormalizationRuleGenerator__WEBPACK_IMPORTED_MODULE_62__.AutoValueForValueByDefaultNormalizationRuleGenerator(optionalSectionRuleBuilder, validationRulesBuilder, lazyLoadingRulesBuilder, sugarRulesBuilder, initializationRulesBuilder, formulaRulesBuilder, formSchemaRng, optionalElementsRulesBuilder, optionalBlocksRulesBuilder, dataDeclarationHelper);
77536
+ const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_29__.MarkupGenerator(markupBuilderContext);
76901
77537
  markupGenerator.generate(sugarRoot, builder);
76902
- builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_23__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
76903
- builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_38__.getRequisiteList)(sugarRoot, fetchFunctions));
76904
- const autocalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_32__.AutoCalculationsGenerator(dataDeclarationHelper, schemaRng);
77538
+ builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_26__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings, additionalContent.formJsonSettings));
77539
+ builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_41__.getRequisiteList)(sugarRoot, kclangAndJsFetchFunctions));
77540
+ const autocalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsGenerator__WEBPACK_IMPORTED_MODULE_35__.AutoCalculationsGenerator(dataDeclarationHelper, schemaRng);
76905
77541
  const formulasForCalculator = useOldCalculator ? formulas : [];
76906
77542
  builder.addResource("calculationFunctions.js", autocalcGenerator.generate(sugarRoot, additionalContent.autocalcsContent, formulasForCalculator));
76907
77543
  builder.addResource("dataDeclaration.js", dataDeclarationContent);
76908
77544
  let finalLazyLoadDeclaration = lazyLoadGeneratorResult.declaration;
76909
- if ((_additionalContent$fo12 = (_additionalContent$fo13 = additionalContent.formJsonSettings) === null || _additionalContent$fo13 === void 0 ? void 0 : _additionalContent$fo13.useServerSideFLangNormalization) !== null && _additionalContent$fo12 !== void 0 ? _additionalContent$fo12 : false) {
76910
- var _additionalContent$fo14, _additionalContent$fo15, _additionalContent$fo16;
77545
+ if ((_additionalContent$fo15 = (_additionalContent$fo16 = additionalContent.formJsonSettings) === null || _additionalContent$fo16 === void 0 ? void 0 : _additionalContent$fo16.useServerSideFLangNormalization) !== null && _additionalContent$fo15 !== void 0 ? _additionalContent$fo15 : false) {
77546
+ var _additionalContent$fo17, _additionalContent$fo18, _additionalContent$fo19;
76911
77547
  const defaultNormalizationRules = normalizationRulesGenerator.generateRules();
76912
77548
  finalLazyLoadDeclaration = mixLazyLoadingDeclarationWithServerOnlyPaths(lazyLoadGeneratorResult.declaration, defaultNormalizationRules.serverOnlyPaths);
76913
77549
  const customNormalizers = [{
76914
77550
  normalizerId: "formulas",
76915
- content: (_additionalContent$fo14 = additionalContent.formJsonSettings) !== null && _additionalContent$fo14 !== void 0 && _additionalContent$fo14.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
77551
+ content: (_additionalContent$fo17 = additionalContent.formJsonSettings) !== null && _additionalContent$fo17 !== void 0 && _additionalContent$fo17.disableFlangRulesForEnableAutoFieldFeature ? "" : formulaOnlyNormalizationRulesGenerator.generateRules()
76916
77552
  }, {
76917
77553
  normalizerId: "formulasWithInitializers",
76918
- content: (_additionalContent$fo15 = additionalContent.formJsonSettings) !== null && _additionalContent$fo15 !== void 0 && _additionalContent$fo15.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.generateRules()
77554
+ content: (_additionalContent$fo18 = additionalContent.formJsonSettings) !== null && _additionalContent$fo18 !== void 0 && _additionalContent$fo18.disableFlangRulesForFormulaAndInitNormalizer ? "" : formulaAndInitOnlyNormalizationRulesGenerator.generateRules()
76919
77555
  }, {
76920
77556
  normalizerId: "autoValueForValueByDefault",
76921
- content: (_additionalContent$fo16 = additionalContent.formJsonSettings) !== null && _additionalContent$fo16 !== void 0 && _additionalContent$fo16.enableFlangRulesForAutoValueForValueByDefaultNormalizer ? autoValueForValueByDefaultNormalizationRuleGenerator.generateRules() : ""
77557
+ content: (_additionalContent$fo19 = additionalContent.formJsonSettings) !== null && _additionalContent$fo19 !== void 0 && _additionalContent$fo19.enableFlangRulesForAutoValueForValueByDefaultNormalizer ? autoValueForValueByDefaultNormalizationRuleGenerator.generateRules() : ""
76922
77558
  }].filter(x => (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrEmpty)(x.content));
76923
77559
  const additionalNormalizationRules = additionalContent.additionalNormalizers ? additionalContent.additionalNormalizers.map(additionalNormalizer => {
76924
77560
  switch (additionalNormalizer.extension) {
76925
- case _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_46__.NormalizerFileExtension.FLANG:
77561
+ case _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_49__.NormalizerFileExtension.FLANG:
76926
77562
  {
76927
- const isDefault = additionalNormalizer.filename.toLowerCase() === _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_46__.defaultNormalizerFilename.toLowerCase();
77563
+ const isDefault = additionalNormalizer.filename.toLowerCase() === _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_49__.defaultNormalizerFilename.toLowerCase();
76928
77564
  return {
76929
77565
  content: additionalNormalizer.content,
76930
77566
  normalizerId: isDefault ? undefined : additionalNormalizer.filename
76931
77567
  };
76932
77568
  }
76933
- case _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_46__.NormalizerFileExtension.KCLANG:
77569
+ case _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_49__.NormalizerFileExtension.KCLANG:
76934
77570
  {
76935
- const customNormalizationRules = new _ServerSideFLangNormalization_CustomKCLangToFlangRuleGenerator__WEBPACK_IMPORTED_MODULE_56__.CustomKCLangToFlangRuleGenerator(additionalNormalizer.content, formulaReader, dataDeclarationHelper, formSchemaRng, formulaExprConverter);
77571
+ const customNormalizationRules = new _ServerSideFLangNormalization_CustomKCLangToFlangRuleGenerator__WEBPACK_IMPORTED_MODULE_59__.CustomKCLangToFlangRuleGenerator(additionalNormalizer.content, formulaReader, dataDeclarationHelper, formSchemaRng, formulaExprConverter);
76936
77572
  return {
76937
77573
  content: customNormalizationRules.generateRules(),
76938
77574
  normalizerId: additionalNormalizer.filename
@@ -76946,11 +77582,11 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
76946
77582
  builder.addServerSideResource("ServerSide.normalize", resultRules);
76947
77583
  for (const normalizerInfo of additionalNormalizationRules) {
76948
77584
  var _normalizerInfo$norma;
76949
- builder.addServerSideResource(`${(_normalizerInfo$norma = normalizerInfo.normalizerId) !== null && _normalizerInfo$norma !== void 0 ? _normalizerInfo$norma : _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_46__.defaultNormalizerFilename}.flang`, normalizerInfo.content);
77585
+ builder.addServerSideResource(`${(_normalizerInfo$norma = normalizerInfo.normalizerId) !== null && _normalizerInfo$norma !== void 0 ? _normalizerInfo$norma : _ServerSideFLangNormalization_AdditionalNormalizerFile__WEBPACK_IMPORTED_MODULE_49__.defaultNormalizerFilename}.flang`, normalizerInfo.content);
76950
77586
  }
76951
77587
  }
76952
- builder.addResource("lazyLoadDeclaration.js", _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_43__.LazyLoadDeclarationGenerator.convertDeclarationToContent(finalLazyLoadDeclaration));
76953
- const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_41__.AttachmentPathsGenerator(markupBuilderContext);
77588
+ builder.addResource("lazyLoadDeclaration.js", _LazyLoadDeclarationGenerator_LazyLoadDeclarationGenerator__WEBPACK_IMPORTED_MODULE_46__.LazyLoadDeclarationGenerator.convertDeclarationToContent(finalLazyLoadDeclaration));
77589
+ const attachmentPathsGenerator = new _AttachmentPaths_AttachmentPathsGenerator__WEBPACK_IMPORTED_MODULE_44__.AttachmentPathsGenerator(markupBuilderContext);
76954
77590
  const attachmentPaths = attachmentPathsGenerator.generate(sugarRoot);
76955
77591
  builder.addServerSideResource(`AttachmentPaths.json`, JSON.stringify(attachmentPaths));
76956
77592
  const attachmentPathsWithGfvs = attachmentPathsGenerator.generateWithGfvs(sugarRoot);
@@ -76962,11 +77598,11 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
76962
77598
  const rngSchemaValidationConfigurator = validationGenerator.generateRngSchemaValidationConfigurator();
76963
77599
  builder.addResource("rngSchemaValidationConfigurator.js", rngSchemaValidationConfigurator);
76964
77600
  const formulasForCalculator2 = useCalculator2 ? formulas : [];
76965
- const kcXmlAutoCalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_Calculator2_AutoCalculationsCalculator2Generator__WEBPACK_IMPORTED_MODULE_42__.AutoCalculationsCalculator2Generator(formSchemaRng, dataDeclarationHelper, extendedSchemaInfo);
77601
+ const kcXmlAutoCalcGenerator = new _AutoCalculationsGenerator_AutoCalculationsFromFormulas_Calculator2_AutoCalculationsCalculator2Generator__WEBPACK_IMPORTED_MODULE_45__.AutoCalculationsCalculator2Generator(formSchemaRng, dataDeclarationHelper, extendedSchemaInfo);
76966
77602
  builder.addResource("kcXmlAutoCalculationConfigurator.js", kcXmlAutoCalcGenerator.generate(formulasForCalculator2, {
76967
77603
  skipNotSupportedFunction: useServerCalculations
76968
77604
  }));
76969
- const kcXmlValidationGenerator = new _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_37__.KCXmlValidationGenerator(formSchemaRng, extendedSchemaInfo);
77605
+ const kcXmlValidationGenerator = new _KCXmlValidationGenerator_KCXmlValidationGenerator__WEBPACK_IMPORTED_MODULE_40__.KCXmlValidationGenerator(formSchemaRng, extendedSchemaInfo);
76970
77606
  const kcXmlConditionsForCalculator2 = kcXmlConditions;
76971
77607
  const content = kcXmlValidationGenerator.generate(kcXmlConditionsForCalculator2, {
76972
77608
  skipNotSupportedFunction: useServerCalculations
@@ -76975,14 +77611,14 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
76975
77611
  // const importedAutoCalculations = getImportedAutoCalculations(sugarRoot);
76976
77612
  builder.addResource("autocalculationConfigurators.js", `export default []`);
76977
77613
  builder.addResource("FakeStyles.less", `// empty styles to enforce style files`);
76978
- const localizationResources = (0,_localization_localization__WEBPACK_IMPORTED_MODULE_21__.generateLocalizationResources)(additionalContent.localization);
77614
+ const localizationResources = (0,_localization_localization__WEBPACK_IMPORTED_MODULE_24__.generateLocalizationResources)(additionalContent.localization);
76979
77615
  if (localizationResources) {
76980
77616
  builder.addResource("localizationDictionary.js", localizationResources);
76981
77617
  }
76982
- const helperFunctionsContent = new _HelperFunctionsGenerator_HelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_36__.HelperFunctionsGenerator().generate(additionalContent.helpersContent);
77618
+ const helperFunctionsContent = new _HelperFunctionsGenerator_HelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_39__.HelperFunctionsGenerator().generate(additionalContent.helpersContent);
76983
77619
  if (helperFunctionsContent) {
76984
77620
  builder.addResource("helperFunctions.js", helperFunctionsContent);
76985
- const commonHelperFunctionsContent = new _HelperFunctionsGenerator_CommonHelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_45__.CommonHelperFunctionsGenerator().generate(additionalContent.commonHelpersContent);
77621
+ const commonHelperFunctionsContent = new _HelperFunctionsGenerator_CommonHelperFunctionsGenerator__WEBPACK_IMPORTED_MODULE_48__.CommonHelperFunctionsGenerator().generate(additionalContent.commonHelpersContent);
76986
77622
  if (commonHelperFunctionsContent) {
76987
77623
  builder.addResource("commonHelperFunctions.js", commonHelperFunctionsContent);
76988
77624
  }
@@ -77033,6 +77669,18 @@ function mergeFetchFunctionRegistries(registries) {
77033
77669
  return Object.assign({}, ...registries);
77034
77670
  }
77035
77671
  const kclangExtensionRegex = /\.kclang$/;
77672
+ function getReferencedKclangFetchFunctions(additionalContent) {
77673
+ var _additionalContent$fe2;
77674
+ const kclLangParser = new _common_KCLang_Antlr_Parser_KCLangParser__WEBPACK_IMPORTED_MODULE_8__.KCLangParser();
77675
+ const kclangFetchFunctions = ((_additionalContent$fe2 = additionalContent.fetchFunctionKClangSources) !== null && _additionalContent$fe2 !== void 0 ? _additionalContent$fe2 : []).map(source => {
77676
+ const result = kclLangParser.parseProgram(source);
77677
+ return result;
77678
+ }).flatMap(x => x.statements.map(statement => (0,_common_CastUtils__WEBPACK_IMPORTED_MODULE_21__.safeCast)(statement, _common_KCLang_CodeDom_FunctionDefinition__WEBPACK_IMPORTED_MODULE_22__.FunctionDefinition)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.isNotNullOrUndefined)).reduce((result, current) => {
77679
+ result[current.name] = current;
77680
+ return result;
77681
+ }, {});
77682
+ return kclangFetchFunctions;
77683
+ }
77036
77684
  function getKcXmlByKclangOrKcXml(fileName, content, enableNewKclangParserAsPreparser) {
77037
77685
  const parseKcLang = () => {
77038
77686
  const kclLangParser = new _common_KCLang_Antlr_Parser_KCLangParser__WEBPACK_IMPORTED_MODULE_8__.KCLangParser();
@@ -77060,10 +77708,10 @@ function* getImportedKclangValidations(formNode, additionalContent) {
77060
77708
  }
77061
77709
  }
77062
77710
  function extractKCLangFromSugar(sugarRoot, formSchemaRng, nodeTypeInfoHelper) {
77063
- const controlConverterClass = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_58__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_57__.getNodeClass)(sugarRoot));
77711
+ const controlConverterClass = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_61__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_60__.getNodeClass)(sugarRoot));
77064
77712
  if (controlConverterClass != undefined) {
77065
77713
  const converter = new controlConverterClass(sugarRoot);
77066
- const result = converter.buildSugarKCLangCalculations(new _markupGenerator_KCLangCalculationsBuildContext__WEBPACK_IMPORTED_MODULE_60__.KCLangCalculationsBuildContext(formSchemaRng, nodeTypeInfoHelper), formSchemaRng, (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_9__.emptyAbsoluteModelPath)());
77714
+ const result = converter.buildSugarKCLangCalculations(new _markupGenerator_KCLangCalculationsBuildContext__WEBPACK_IMPORTED_MODULE_63__.KCLangCalculationsBuildContext(formSchemaRng, nodeTypeInfoHelper), formSchemaRng, (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_9__.emptyAbsoluteModelPath)());
77067
77715
  return Iterator.from(result).toArray();
77068
77716
  }
77069
77717
  return [];
@@ -77163,7 +77811,7 @@ async function readFormSources(formSourcesPath, farmDirectory) {
77163
77811
  console.warn(chalk__WEBPACK_IMPORTED_MODULE_4___default().yellow(`[WARN] Форма не содержит ссылок на fetch-функции. Будут автоматически подключены функции из каталога legacyfetchfuctions и kclangfetchfunctions\n` + `[WARN] В будущем необходимо явно прописывать ссылки на используемые fetch-функции`));
77164
77812
  sugarReferences.fetchFunctionFiles = await getLegacyFetchFunctionsFiles(farmDirectory);
77165
77813
  }
77166
- const kclangFetchFunctionFiles = await getKclangFetchFunctionsFiles(farmDirectory);
77814
+ const kclangFetchFunctionFiles = (await getKclangFetchFunctionsFiles(farmDirectory)).concat(...sugarReferences.kcLangFetchFunctionFiles);
77167
77815
  const additionalNormalizers = await readAdditionalNormalizersFiles(formSourcesPath);
77168
77816
  const formJsonSettings = (_JSON$parse$settings = JSON.parse(await readFileSource(formSourcesPath, "form.json", "{}"))["settings"]) !== null && _JSON$parse$settings !== void 0 ? _JSON$parse$settings : {};
77169
77817
  if (additionalNormalizers.length > 0 && !formJsonSettings.useServerSideFLangNormalization) {
@@ -78062,16 +78710,16 @@ class GetExternalInfoExpression extends FLangExpression {
78062
78710
  constructor(valueKey) {
78063
78711
  super();
78064
78712
  this.valueKey = void 0;
78065
- this.valueKey = valueKey;
78713
+ this.valueKey = typeof valueKey === "string" ? new StringLiteralExpression(valueKey) : valueKey;
78066
78714
  }
78067
78715
  getType() {
78068
78716
  return BuildInTypeExpression.string;
78069
78717
  }
78070
78718
  getChildNodes() {
78071
- return [];
78719
+ return [this.valueKey];
78072
78720
  }
78073
78721
  convertToString() {
78074
- return `getExternalInfo("${this.valueKey}")`;
78722
+ return `getExternalInfo(${this.valueKey.convertToString()})`;
78075
78723
  }
78076
78724
  }
78077
78725
  class CallExpression extends FLangExpression {
@@ -80260,6 +80908,546 @@ class FormulaExpressionToFlangExpressionConverter {
80260
80908
 
80261
80909
  /***/ }),
80262
80910
 
80911
+ /***/ "./Generator/src/generators/ServerSideFLangNormalization/KCLangExpressionToFlangExpressionConverter.ts":
80912
+ /*!*************************************************************************************************************!*\
80913
+ !*** ./Generator/src/generators/ServerSideFLangNormalization/KCLangExpressionToFlangExpressionConverter.ts ***!
80914
+ \*************************************************************************************************************/
80915
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
80916
+
80917
+ "use strict";
80918
+ __webpack_require__.r(__webpack_exports__);
80919
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
80920
+ /* harmony export */ KCLangExpressionToFlangExpressionConverter: () => (/* binding */ KCLangExpressionToFlangExpressionConverter)
80921
+ /* harmony export */ });
80922
+ /* harmony import */ var _common_KCLang_CodeDom_KCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/KCLangExpressionVisitor */ "./Generator/src/common/KCLang/CodeDom/KCLangExpressionVisitor.ts");
80923
+ /* harmony import */ var _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/KCLangType */ "./Generator/src/common/KCLang/CodeDom/KCLangType.ts");
80924
+ /* harmony import */ var _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/CastExpression */ "./Generator/src/common/KCLang/CodeDom/CastExpression.ts");
80925
+ /* harmony import */ var _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/KCLang/CodeDom/ValueReferenceExpression */ "./Generator/src/common/KCLang/CodeDom/ValueReferenceExpression.ts");
80926
+ /* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
80927
+ /* harmony import */ var _Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/ModelPath/PathSplitHelper */ "./Common/ModelPath/PathSplitHelper.ts");
80928
+ /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
80929
+ /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
80930
+ /* harmony import */ var _Common_IterableUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../Common/IterableUtils */ "./Common/IterableUtils.ts");
80931
+ /* harmony import */ var _Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../Common/ModelPath/BuildIterationSequence */ "./Common/ModelPath/BuildIterationSequence.ts");
80932
+ /* harmony import */ var _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./FLang/FLangCodeDom */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FLangCodeDom.ts");
80933
+ /* harmony import */ var _FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
80934
+
80935
+
80936
+
80937
+
80938
+
80939
+
80940
+
80941
+
80942
+
80943
+
80944
+
80945
+
80946
+ class KCLangExpressionToFlangExpressionConverter extends _common_KCLang_CodeDom_KCLangExpressionVisitor__WEBPACK_IMPORTED_MODULE_0__.KCLangExpressionVisitor {
80947
+ constructor(adjustPathMultiplicityFunc, options) {
80948
+ super();
80949
+ this.adjustPathMultiplicity = void 0;
80950
+ // @ts-ignore
80951
+ this.options = void 0;
80952
+ this.options = options;
80953
+ this.adjustPathMultiplicity = adjustPathMultiplicityFunc;
80954
+ }
80955
+ compileExpressionToFlangExpression(expression, prefix, target, addPrecalculationRule) {
80956
+ const context = {
80957
+ prefix: prefix,
80958
+ target: target,
80959
+ addPrecalculationRule: addPrecalculationRule
80960
+ };
80961
+ const resultExpr = this.visit(expression, context);
80962
+
80963
+ // Если выражение это только прямое обращение к значению, то трактовать его как строку
80964
+ if (resultExpr instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && resultExpr.targetType === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal && resultExpr.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
80965
+ return resultExpr.targetExpression;
80966
+ }
80967
+ return resultExpr;
80968
+ }
80969
+ visitUserDefinedFunctionCall(_expression, _context) {
80970
+ throw new Error("Method not implemented.");
80971
+ }
80972
+ visitArrayExpression(expression, context) {
80973
+ const items = expression.expressions.map(item => this.visit(item, context));
80974
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArrayExpression(items);
80975
+ }
80976
+ visitBoolConstExpression(expression, _context) {
80977
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(expression.value);
80978
+ }
80979
+ visitCastExpression(expression, context) {
80980
+ if (expression.operand instanceof _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression) {
80981
+ return this.compiledArgumentExpression(context, expression.operand.path, expression.type);
80982
+ }
80983
+ const targetExpr = this.visit(expression.operand, context);
80984
+ const targetType = this.convertKCLangTypeToFLangType(expression.type);
80985
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandIfNeed)(targetExpr, targetType);
80986
+ }
80987
+ visitConditionalExpression(expression, context) {
80988
+ const condExpr = this.visit(expression.condition, context);
80989
+ const thenExpr = this.visit(expression.trueResult, context);
80990
+ const elseExpr = this.visit(expression.elseResult, context);
80991
+ const castToStringRequired = thenExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string || elseExpr.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string;
80992
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(condExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(thenExpr) : thenExpr, castToStringRequired ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(elseExpr) : elseExpr);
80993
+ }
80994
+ visitDecimalConstExpression(expression, _context) {
80995
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(expression.value.toFixed());
80996
+ }
80997
+ visitKCLangRawStringExpression(_expression, _context) {
80998
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.NotSupportedError();
80999
+ }
81000
+ visitNotExpression(expression, context) {
81001
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NegateUnaryExpression(this.visit(expression.expression, context));
81002
+ }
81003
+ visitNullCoalesceExpression(expression, context) {
81004
+ const left = this.visit(expression.left, context);
81005
+ const right = this.visit(expression.right, context);
81006
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(left, right);
81007
+ }
81008
+ visitOneOfExpression(expression, context) {
81009
+ const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(this.visit(expression.expression, context));
81010
+ const items = expression.inExpressions.map(item => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(this.visit(item, context)));
81011
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OneOfExpression(arg, items);
81012
+ }
81013
+ visitQuotedExpression(_expression, _context) {
81014
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.NotSupportedError();
81015
+ }
81016
+ visitStringArrayConstExpression(expression, context) {
81017
+ const items = expression.expressions.map(value => this.visit(value, context));
81018
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArrayExpression(items);
81019
+ }
81020
+ visitStringConstExpression(expression, _context) {
81021
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(expression.value);
81022
+ }
81023
+ visitUnaryMinusExpression(expression, context) {
81024
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusUnaryExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.expr, context)));
81025
+ }
81026
+ visitValueReferenceExpression(expression, context) {
81027
+ return this.compiledArgumentExpression(context, expression.path, expression.getType());
81028
+ }
81029
+ visitVariableExpression(_expression, _context) {
81030
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.NotImplementedError();
81031
+ }
81032
+ visitAndExpression(expression, context) {
81033
+ const left = this.visit(expression.left, context);
81034
+ const right = this.visit(expression.right, context);
81035
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AndBinaryExpression(left, right);
81036
+ }
81037
+ visitDivExpression(expression, context) {
81038
+ const left = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.left, context));
81039
+ const right = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.right, context));
81040
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(right, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DivisionBinaryExpression(left, right), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression());
81041
+ }
81042
+ visitEqExpression(expression, context) {
81043
+ const left = this.visit(expression.left, context);
81044
+ const right = this.visit(expression.right, context);
81045
+
81046
+ // Handle decimal vs string comparison like in original converter
81047
+ if (left.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal && right.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string && left instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && left.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
81048
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(left.targetExpression), right);
81049
+ }
81050
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(left), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(right));
81051
+ }
81052
+ visitGeExpression(expression, context) {
81053
+ const left = this.castOperandForComparisonExpression(this.visit(expression.left, context));
81054
+ const right = this.castOperandForComparisonExpression(this.visit(expression.right, context));
81055
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GeExpression(left, right);
81056
+ }
81057
+ visitGtExpression(expression, context) {
81058
+ const left = this.castOperandForComparisonExpression(this.visit(expression.left, context));
81059
+ const right = this.castOperandForComparisonExpression(this.visit(expression.right, context));
81060
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GtExpression(left, right);
81061
+ }
81062
+ visitLeExpression(expression, context) {
81063
+ const left = this.castOperandForComparisonExpression(this.visit(expression.left, context));
81064
+ const right = this.castOperandForComparisonExpression(this.visit(expression.right, context));
81065
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LeExpression(left, right);
81066
+ }
81067
+ visitLtExpression(expression, context) {
81068
+ const left = this.castOperandForComparisonExpression(this.visit(expression.left, context));
81069
+ const right = this.castOperandForComparisonExpression(this.visit(expression.right, context));
81070
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LtExpression(left, right);
81071
+ }
81072
+ visitMinusExpression(expression, context) {
81073
+ const left = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.left, context));
81074
+ const right = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.right, context));
81075
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusBinaryExpression(left, right);
81076
+ }
81077
+ visitMultiplyExpression(expression, context) {
81078
+ const left = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.left, context));
81079
+ const right = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.right, context));
81080
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MultiplyBinaryExpression(left, right);
81081
+ }
81082
+ visitNotEqExpression(expression, context) {
81083
+ const left = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.left, context));
81084
+ const right = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.right, context));
81085
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(left, right);
81086
+ }
81087
+ visitOrExpression(expression, context) {
81088
+ const left = this.visit(expression.left, context);
81089
+ const right = this.visit(expression.right, context);
81090
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(left, right);
81091
+ }
81092
+ visitSumExpression(expression, context) {
81093
+ const left = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.left, context));
81094
+ const right = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.right, context));
81095
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumBinaryExpression(left, right);
81096
+ }
81097
+ visitFloorFunctionCall(expression, context) {
81098
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.FloorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.argument, context)));
81099
+ }
81100
+ visitAbsFunctionCall(expression, context) {
81101
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AbsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.argument, context)));
81102
+ }
81103
+ visitConcatFunctionCall(expression, context) {
81104
+ const result = expression.arguments.reduce((acc, curr) => {
81105
+ const currExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(curr, context));
81106
+ return acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConcatStringsExpression(acc, currExpr) : currExpr;
81107
+ }, undefined);
81108
+ if (result == undefined) {
81109
+ throw new Error("ConcatFunctionCall requires at least one argument");
81110
+ }
81111
+ return result;
81112
+ }
81113
+ visitCountFunctionCall(expression, context) {
81114
+ return this.compiledArgumentExpression(context, expression.expr.path, expression.expr.getType(), "Count");
81115
+ }
81116
+ visitDateNowFunctionCall(_expression, _context) {
81117
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DateNowExpression();
81118
+ }
81119
+ visitDateTimeFunctionCall(expression, context) {
81120
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(this.visit(expression.argument, context), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dateTime);
81121
+ }
81122
+ visitExistsFunctionCall(expression, context) {
81123
+ const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractValueReferenceFromCast)(this.visit(expression.argument, context));
81124
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ExistsExpression(arg);
81125
+ }
81126
+ visitGetDateTimeTicksFunctionCall(expression, context) {
81127
+ const arg = this.visit(expression.argument, context);
81128
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetDateTimeTicksExpression(arg);
81129
+ }
81130
+ visitGetExternalInfoFunctionalCall(expression, context) {
81131
+ const keyExpr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.key, context));
81132
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetExternalInfoExpression(keyExpr);
81133
+ }
81134
+ visitGetPicklistValuesFunctionCall(expression, context) {
81135
+ const filterValues = this.visit(expression.filterValues, context);
81136
+ const gIdExpr = this.visit(expression.gId, context);
81137
+ const filterColumns = this.visit(expression.filterColumns, context);
81138
+ const resultColumn = this.visit(expression.resultColumn, context);
81139
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetPicklistValuesExpression(gIdExpr, filterColumns, filterValues, resultColumn);
81140
+ }
81141
+ visitGetPropertyFunctionCall(_expression, _context) {
81142
+ // Property access - return empty string for now
81143
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("");
81144
+ }
81145
+ visitGroupCountFunctionCall(_expression, _context) {
81146
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.NotImplementedError();
81147
+ }
81148
+ visitGroupSumFunctionCall(_expression, _context) {
81149
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.NotImplementedError();
81150
+ }
81151
+ visitIsEqualToAutoCalculatedFunctionCall(expression, context) {
81152
+ const type = expression.expr.getType();
81153
+ const path = expression.expr instanceof _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression ? expression.expr.path : expression.expr instanceof _common_KCLang_CodeDom_CastExpression__WEBPACK_IMPORTED_MODULE_2__.CastExpression && expression.expr.operand instanceof _common_KCLang_CodeDom_ValueReferenceExpression__WEBPACK_IMPORTED_MODULE_3__.ValueReferenceExpression ? expression.expr.operand.path : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)("IsEqualToAutoCalculatedFunctionCall: unsupported argument");
81154
+ return this.compileIsEqualToAutoCalculatedExpression(context, path, type);
81155
+ }
81156
+ visitIsInnFunctionCall(expression, context) {
81157
+ const arg = this.visit(expression.argument, context);
81158
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsInnExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(arg));
81159
+ }
81160
+ visitIsNullFunctionCall(expression, context) {
81161
+ const arg = this.visit(expression.argument, context);
81162
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression(arg, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression());
81163
+ }
81164
+ visitIsSnilsFunctionCall(expression, context) {
81165
+ const arg = this.visit(expression.argument, context);
81166
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsSnilsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(arg));
81167
+ }
81168
+ visitIsValidAccountNumberFunctionCall(expression, context) {
81169
+ const bik = this.visit(expression.bik, context);
81170
+ const account = this.visit(expression.account, context);
81171
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsValidAccountNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(bik), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(account));
81172
+ }
81173
+ visitIsValidMirCardNumberFunctionCall(expression, context) {
81174
+ const arg = this.visit(expression.expr, context);
81175
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsValidMirCardNumberExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(arg));
81176
+ }
81177
+ visitJoinFunctionCall(expression, context) {
81178
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.JoinExpression(this.visit(expression.expr, context), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(""));
81179
+ }
81180
+ visitLengthFunctionCall(expression, context) {
81181
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.argument, context)));
81182
+ }
81183
+ visitNewlineFunctionCall(_expression, _context) {
81184
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("\\r\\n");
81185
+ }
81186
+ visitRegexMatchFunctionCall(expression, context) {
81187
+ const arg = this.visit(expression.argument, context);
81188
+ const correctedArg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.tryExtractValueReferenceAsStringFromDecimal)(arg);
81189
+ const pattern = this.visit(expression.patternExpression, context);
81190
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.RegexMatchExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(correctedArg), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(pattern));
81191
+ }
81192
+ visitRoundFunctionCall(expression, context) {
81193
+ const fractionalDigitsValue = expression.fractionalDigits ? this.visit(expression.fractionalDigits, context) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0);
81194
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.RoundExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.argument, context)), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(fractionalDigitsValue));
81195
+ }
81196
+ visitSubstringFunctionCall(expression, context) {
81197
+ const arg = this.visit(expression.argument, context);
81198
+ const argAsString = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(arg, arg.getType() === _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal ? "G29" : undefined);
81199
+ const startValue = this.visit(expression.start, context);
81200
+ const lengthValue = expression.length ? this.visit(expression.length, context) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0);
81201
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SubstringExpression(argAsString, (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(startValue), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(lengthValue));
81202
+ }
81203
+ visitSumFunctionCall(expression, context) {
81204
+ return this.compiledArgumentExpression(context, expression.expr.path, expression.expr.getType(), "Sum");
81205
+ }
81206
+ visitXabsFunctionCall(expression, context) {
81207
+ const expr = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.argument, context));
81208
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.LtExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(expr), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AbsExpression(expr));
81209
+ }
81210
+ visitIsRegNumSfrFunctionCall(expression, context) {
81211
+ const arg = this.visit(expression.argument, context);
81212
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsRegNumSfrExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(arg));
81213
+ }
81214
+ visitIsOgrnFunctionCall(expression, context) {
81215
+ const arg = this.visit(expression.argument, context);
81216
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsOgrnExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.extractOriginalStringValueOrCastToStringIfNeeded)(arg));
81217
+ }
81218
+ visitFirstOrDefaultFunctionCall(expression, context) {
81219
+ const firstOrDefaultExpression = this.visit(expression.expr, context);
81220
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.FirstOrDefaultExpression(firstOrDefaultExpression);
81221
+ }
81222
+ visitNodepsFunctionCall(expression, context) {
81223
+ const noDepsExpression = this.visit(expression.expr, context);
81224
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeNoDeps)(noDepsExpression);
81225
+ }
81226
+ visitHashSetFunctionCall(expression, context) {
81227
+ const hashSetExpression = this.visit(expression.expr, context);
81228
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.HashSetExpression(hashSetExpression);
81229
+ }
81230
+ visitArrayFunctionCall(expression, context) {
81231
+ const items = expression.expressions.map(arg => this.visit(arg, context));
81232
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArrayExpression(items);
81233
+ }
81234
+ visitInstanceCountFunctionCall(expression, context) {
81235
+ const selectPath = expression.expr.path.toString();
81236
+ const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(context.prefix, selectPath).trimLastStarIfLastToken();
81237
+ const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(context.target.path, adjustedSelectPath);
81238
+ if (!splitInfo.differentPath.isContainIteration()) {
81239
+ const countOfChildTarget = adjustedSelectPath.joinWith("InstanceCount");
81240
+ const countOfChildTargetValueRef = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(countOfChildTarget, "value");
81241
+ const countOfChildExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArrayLengthExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DeserializeEnumerationExpression([(0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "children")], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BoolLiteralExpression(true))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)));
81242
+ const requiredStatement = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SetStatement(countOfChildTargetValueRef, countOfChildExpression);
81243
+ context.addPrecalculationRule(requiredStatement);
81244
+ const resultExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(countOfChildTarget.toCurrentIteration(), "value"));
81245
+ return resultExpression;
81246
+ } else {
81247
+ throw new Error(`Instance count with nested multiplicity is not supported: target: ${context.target.path}, select path: ${selectPath}}`);
81248
+ }
81249
+ }
81250
+ visitGetDaysInMonthFunctionCall(expression, context) {
81251
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetDaysInMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpr, context)));
81252
+ }
81253
+ visitGetDayFunctionCall(expression, context) {
81254
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetDayExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpr, context)));
81255
+ }
81256
+ visitGetMonthFunctionCall(expression, context) {
81257
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetMonthExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpr, context)));
81258
+ }
81259
+ visitGetYearFunctionCall(expression, context) {
81260
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetYearExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpr, context)));
81261
+ }
81262
+ visitIsDateFunctionCall(expression, context) {
81263
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IsDateExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.expr, context)));
81264
+ }
81265
+ visitDifferenceInMonthsFunctionCall(expression, context) {
81266
+ const expressions = [expression.startDate, expression.endDate].map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(x, context)));
81267
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DifferenceInMonthsExpression(expressions);
81268
+ }
81269
+ visitDifferenceInDaysFunctionCall(expression, context) {
81270
+ const expressions = [expression.startDate, expression.endDate].map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(x, context)));
81271
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DifferenceInDaysExpression(expressions);
81272
+ }
81273
+ visitSumOfDayWeightsFunctionCall(expression, context) {
81274
+ const expressions = [expression.startDate, expression.endDate].map(x => (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(x, context)));
81275
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumOfDayWeightsExpression(expressions);
81276
+ }
81277
+ visitAddDaysFunctionCall(expression, context) {
81278
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddDaysExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpression, context)), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.daysExpression, context)));
81279
+ }
81280
+ visitAddMonthsFunctionCall(expression, context) {
81281
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddMonthsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpression, context)), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.monthsExpression, context)));
81282
+ }
81283
+ visitAddYearsFunctionCall(expression, context) {
81284
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AddYearsExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpression, context)), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(this.visit(expression.yearsExpression, context)));
81285
+ }
81286
+ visitDateToStringFunctionCall(expression, context) {
81287
+ const formatValue = expression.format ? this.visit(expression.format, context) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("dd.MM.yyyy");
81288
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DateToStringExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDateTimeIfNeed)(this.visit(expression.dateExpression, context)), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(formatValue));
81289
+ }
81290
+ visitHasAutoFlagFunctionCall(expression, context) {
81291
+ const arg = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.expr, context));
81292
+ const getValueReferenceExpression = () => {
81293
+ if (arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
81294
+ return arg;
81295
+ }
81296
+ if (arg instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression && arg.targetExpression instanceof _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression) {
81297
+ return arg.targetExpression;
81298
+ }
81299
+ return (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)("hasAutoFlag supports only Argument expression (ValueReferenceExpression) as parameter.");
81300
+ };
81301
+ const valueRefExpression = getValueReferenceExpression();
81302
+ const expr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeNoDeps)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(valueRefExpression.modePath, "value")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(valueRefExpression.modePath, "autoFlag")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("true")));
81303
+ return expr;
81304
+ }
81305
+ visitMakeDictFunctionCall(_expression, _context) {
81306
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_7__.NotImplementedError();
81307
+ }
81308
+ visitGetSumByKeysFunctionCall(expression, context) {
81309
+ const dictPath = this.preparePathAndAdjustMultiplicity(context.prefix, expression.dictPath.path.toString());
81310
+ const targetKeysExpression = this.visit(expression.targetKeys, context);
81311
+ return this.compileGetSumByKeysExpressionImpl(dictPath, targetKeysExpression);
81312
+ }
81313
+ visitNumeratorFunctionCall(expression, context) {
81314
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NumerationExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.argument, context)));
81315
+ }
81316
+ visitDenominatorFunctionCall(expression, context) {
81317
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DenominatorExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(this.visit(expression.argument, context)));
81318
+ }
81319
+ convertKCLangTypeToFLangType(type) {
81320
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.DecimalType) {
81321
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal;
81322
+ }
81323
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.StringType) {
81324
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string;
81325
+ }
81326
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.BoolType) {
81327
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.bool;
81328
+ }
81329
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.DateType) {
81330
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dateTime;
81331
+ }
81332
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.ArrayType) {
81333
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.array;
81334
+ }
81335
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.StringArrayType) {
81336
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.array;
81337
+ }
81338
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.StringHashSetType) {
81339
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.hashSet;
81340
+ }
81341
+ if (type instanceof _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.StringDictType) {
81342
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.dict;
81343
+ }
81344
+ return _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string;
81345
+ }
81346
+ castOperandForComparisonExpression(flangExpression) {
81347
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(flangExpression);
81348
+ }
81349
+ preparePathAndAdjustMultiplicity(prefix, path) {
81350
+ const resultPath = this.adjustPathMultiplicity(prefix.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createModelPath)(path.replace(/\\@/g, ""), "auto")).normalize());
81351
+ return resultPath;
81352
+ }
81353
+ compileGetSumByKeysExpressionImpl(dictPath, targetKeys) {
81354
+ const finalValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.GetSumByKeysExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DictLiteralExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(dictPath, "value")), targetKeys);
81355
+ return finalValueExpression;
81356
+ }
81357
+ compiledArgumentExpression(context, selectPath, selectType, aggregationFunction = "Sum") {
81358
+ const prefix = context.prefix;
81359
+ const target = context.target;
81360
+ const addPrecalculationRule = context.addPrecalculationRule;
81361
+ const builtInType = this.convertKCLangTypeToFLangType(selectType !== null && selectType !== void 0 ? selectType : "string");
81362
+ const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath.toString());
81363
+ const isSelectEqualsTarget = target.path.isEquals(adjustedSelectPath);
81364
+ const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
81365
+ const baseSelectPath = splitInfo.matchedPath;
81366
+ if (!splitInfo.differentPath.isContainIteration()) {
81367
+ const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
81368
+ const finalValue = isSelectEqualsTarget && target.field === "value" ? (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeNoDeps)(valueRefExpression) : valueRefExpression;
81369
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandIfNeed)(finalValue, builtInType);
81370
+ } else {
81371
+ var _countValueExpression;
81372
+ let resultValueExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(adjustedSelectPath.toCurrentIteration().normalize(), "value");
81373
+ let countValueExpression = undefined;
81374
+ const iterationEntries = [...(0,_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_8__.reverseArray)((0,_Common_ModelPath_BuildIterationSequence__WEBPACK_IMPORTED_MODULE_9__.buildIterationSequence)(splitInfo.differentPath))];
81375
+ for (const iterationEntry of iterationEntries) {
81376
+ const iterablePath = baseSelectPath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createRelativeFromTokens)(iterationEntry.iterable.getPathPartsAsArray()));
81377
+ const suffixWithoutMultiple = iterationEntry.suffix.getPathPartsAsArray().filter(x => _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.PathTokens.isSimpleToken(x));
81378
+ const nextResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").normalize(), "value");
81379
+ const currentSumExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Sum").toCurrentIteration().normalize(), "value");
81380
+ const countResultValueExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").normalize(), "value");
81381
+ const currenCountExpression = (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(iterablePath.joinWith((0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_4__.createRelativeFromTokens)(suffixWithoutMultiple)).joinWith("Count").toCurrentIteration().normalize(), "value");
81382
+ const sumReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.OrBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression()), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(resultValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeGetOld)(resultValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(nextResultValueExpression.modePath.toCurrentIteration(), nextResultValueExpression.valueName))), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())));
81383
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SetStatement(nextResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(sumReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("G29")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression(""))));
81384
+ const countReduceExpr = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ReduceCallExpression(iterablePath.toCurrentIteration(), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AnonymousFunctionDeclarationExpression(_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentDeclarationExpression("result", _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal)], new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SumBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullCoalesceExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ArgumentReferenceExpression("result"), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression(resultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(countValueExpression, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), countValueExpression == undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeGetOld)(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("")), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NotEqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeGetOld)(resultValueExpression), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.NullLiteralExpression())), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(1), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)) : new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeGetOld)(countValueExpression), _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.decimal, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ConditionalExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.IncrementalFlagExpression(), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeNoDeps)((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.makeStringValueReference)(countResultValueExpression.modePath.toCurrentIteration(), countResultValueExpression.valueName))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.DecimalLiteralExpression(0)));
81385
+ addPrecalculationRule(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.SetStatement(countResultValueExpression, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.CastExpression(countReduceExpr, _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.BuildInTypeExpression.string, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.StringLiteralExpression("G29"))));
81386
+ resultValueExpression = currentSumExpression;
81387
+ countValueExpression = currenCountExpression;
81388
+ }
81389
+ const finalValue = aggregationFunction === "Sum" ? resultValueExpression : (_countValueExpression = countValueExpression) !== null && _countValueExpression !== void 0 ? _countValueExpression : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.reject)();
81390
+ return (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandIfNeed)(finalValue, builtInType);
81391
+ }
81392
+ }
81393
+ compileIsEqualToAutoCalculatedExpression(context, selectPath, selectType) {
81394
+ const prefix = context.prefix;
81395
+ const target = context.target;
81396
+ const adjustedSelectPath = this.preparePathAndAdjustMultiplicity(prefix, selectPath.toString());
81397
+ const splitInfo = (0,_Common_ModelPath_PathSplitHelper__WEBPACK_IMPORTED_MODULE_5__.getMatchedAndDifferentModelPaths)(target.path, adjustedSelectPath);
81398
+ if (!splitInfo.differentPath.isContainIteration()) {
81399
+ const valueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "value");
81400
+ const autoValueRefExpression = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.ValueReferenceExpression(adjustedSelectPath.toCurrentIteration().normalize(), "autoValue");
81401
+ if (selectType == _common_KCLang_CodeDom_KCLangType__WEBPACK_IMPORTED_MODULE_1__.StringType.default) {
81402
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(valueRefExpression), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToStringIfNeed)(autoValueRefExpression));
81403
+ } else {
81404
+ return new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_10__.EqExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(valueRefExpression), (0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_11__.castOperandToDecimalIfNeed)(autoValueRefExpression));
81405
+ }
81406
+ } else {
81407
+ throw new Error(`IsEqualToAutoCalculated with nested multiplicity is not supported: target: ${target.path}, select path: ${selectPath}}`);
81408
+ }
81409
+ }
81410
+ }
81411
+
81412
+ /***/ }),
81413
+
81414
+ /***/ "./Generator/src/generators/ServerSideFLangNormalization/KClangUserDefinedFunctionsForFlangRegistry.ts":
81415
+ /*!*************************************************************************************************************!*\
81416
+ !*** ./Generator/src/generators/ServerSideFLangNormalization/KClangUserDefinedFunctionsForFlangRegistry.ts ***!
81417
+ \*************************************************************************************************************/
81418
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
81419
+
81420
+ "use strict";
81421
+ __webpack_require__.r(__webpack_exports__);
81422
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
81423
+ /* harmony export */ KClangUserDefinedFunctionsForFlangRegistry: () => (/* binding */ KClangUserDefinedFunctionsForFlangRegistry)
81424
+ /* harmony export */ });
81425
+ /* harmony import */ var _Common_Errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Common/Errors */ "./Common/Errors.ts");
81426
+
81427
+ class KClangUserDefinedFunctionsForFlangRegistry {
81428
+ constructor(converter, funcDefinitions) {
81429
+ this.funcDefinitions = void 0;
81430
+ this.converter = void 0;
81431
+ this.converter = converter;
81432
+ this.funcDefinitions = funcDefinitions;
81433
+ }
81434
+ getDefinition(name) {
81435
+ return this.funcDefinitions[name];
81436
+ }
81437
+ getFlangExpressionByFunction(name, prefix, target, fieldName) {
81438
+ const funcDefinition = this.funcDefinitions[name + "_" + (fieldName !== null && fieldName !== void 0 ? fieldName : "value")];
81439
+ if (funcDefinition === undefined) {
81440
+ return undefined;
81441
+ }
81442
+ const conversionResult = this.converter.compileExpressionToFlangExpression(funcDefinition.body, prefix, target, _ => {
81443
+ throw new _Common_Errors__WEBPACK_IMPORTED_MODULE_0__.NotSupportedError("Fetch-function does not support multiplicity access and aggretion is not supported!");
81444
+ });
81445
+ return conversionResult;
81446
+ }
81447
+ }
81448
+
81449
+ /***/ }),
81450
+
80263
81451
  /***/ "./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts":
80264
81452
  /*!*************************************************************************************!*\
80265
81453
  !*** ./Generator/src/generators/ServerSideFLangNormalization/NodeTypeInfoHelper.ts ***!
@@ -81429,7 +82617,7 @@ __webpack_require__.r(__webpack_exports__);
81429
82617
 
81430
82618
 
81431
82619
  class SugarRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__.BaseRuleBuilder {
81432
- constructor(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, dataDeclarationHelper, typeRegistry, useSchemaValidations) {
82620
+ constructor(sugarRoot, formSchemaRng, controlCustomizationContext, fetchFunctions, kclangFetchFuncRegistry, dataDeclarationHelper, typeRegistry, useSchemaValidations) {
81433
82621
  super();
81434
82622
  this.sugarRoot = void 0;
81435
82623
  this.controlCustomizationContext = void 0;
@@ -81438,6 +82626,8 @@ class SugarRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__.Ba
81438
82626
  this.dataDeclarationHelper = void 0;
81439
82627
  this.useSchemaValidations = void 0;
81440
82628
  this.typeRegistry = void 0;
82629
+ this.kclangFetchFuncRegistry = void 0;
82630
+ this.kclangFetchFuncRegistry = kclangFetchFuncRegistry;
81441
82631
  this.useSchemaValidations = useSchemaValidations;
81442
82632
  this.typeRegistry = typeRegistry;
81443
82633
  this.dataDeclarationHelper = dataDeclarationHelper;
@@ -81448,7 +82638,7 @@ class SugarRulesBuilder extends _BaseRuleBuilder__WEBPACK_IMPORTED_MODULE_4__.Ba
81448
82638
  }
81449
82639
  buildRulesInternal() {
81450
82640
  const converter = new _markupGenerator_ElementProcessors_FormParts_Form_FormConverter__WEBPACK_IMPORTED_MODULE_0__.FormConverter(this.sugarRoot);
81451
- const builder = new _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_1__.FLangNormalizationRulesBuilder(this.controlCustomizationContext, this.fetchFunctions, new _FetchFunctionToFlangConverter__WEBPACK_IMPORTED_MODULE_2__.FetchFunctionToFlangConverter(), this.dataDeclarationHelper, this.formSchemaRng, new _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_3__.NodeTypeInfoHelper(this.formSchemaRng, this.typeRegistry, this.useSchemaValidations));
82641
+ const builder = new _markupGenerator_FLangNormalizationRulesBuilder__WEBPACK_IMPORTED_MODULE_1__.FLangNormalizationRulesBuilder(this.controlCustomizationContext, this.fetchFunctions, new _FetchFunctionToFlangConverter__WEBPACK_IMPORTED_MODULE_2__.FetchFunctionToFlangConverter(), this.kclangFetchFuncRegistry, this.dataDeclarationHelper, this.formSchemaRng, new _NodeTypeInfoHelper__WEBPACK_IMPORTED_MODULE_3__.NodeTypeInfoHelper(this.formSchemaRng, this.typeRegistry, this.useSchemaValidations));
81452
82642
  return converter.buildNormalizeRules(builder, this.formSchemaRng);
81453
82643
  }
81454
82644
  }
@@ -102954,11 +104144,12 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
102954
104144
  *doTraverseChildren() {
102955
104145
  // no children
102956
104146
  }
102957
- doConvert() {
104147
+ doConvert(context) {
102958
104148
  var _node$title, _node$withSteads, _node$division, _node$searchToAddress;
102959
104149
  const node = this.getCurrentNodeAs(_FiasNode__WEBPACK_IMPORTED_MODULE_6__.FiasNode);
102960
104150
  const markupBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_1__.componentMarkupBuilder)("Fias");
102961
- markupBuilder.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_0__.getNewBindingPathExpression)(node));
104151
+ const bindingPath = (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_0__.getNewBindingPathExpression)(node);
104152
+ markupBuilder.prop(x => x.bindingPath).set(bindingPath);
102962
104153
  markupBuilder.prop(x => x.hasOwnBindingPath).set(node.getOwnPathForKCLang() != undefined);
102963
104154
  markupBuilder.prop(x => x.title).set((_node$title = node.title) !== null && _node$title !== void 0 ? _node$title : "Адрес регистрации");
102964
104155
  markupBuilder.prop(x => x.withSteads).set((_node$withSteads = node.withSteads) !== null && _node$withSteads !== void 0 ? _node$withSteads : false);
@@ -102983,6 +104174,7 @@ class FiasConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
102983
104174
  markupBuilder.prop(x => x.mvdOptions).set(mvdOptions);
102984
104175
  }
102985
104176
  if (node.adrgaroptions) {
104177
+ context.addPathsToContext([bindingPath]);
102986
104178
  const adrGarOptions = this.extractAdrGarOptions(node.adrgaroptions);
102987
104179
  markupBuilder.prop(x => x.adrGarOptions).set(adrGarOptions);
102988
104180
  }
@@ -103105,7 +104297,7 @@ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _des
103105
104297
 
103106
104298
 
103107
104299
 
103108
- let FiasValueSource = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("valuesource", "Описание дополнительных полей для фиаса"), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("convertationMethod", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum(_Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getFlatTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getFlatTypeLongName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getRoomTypeLongName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getRoomTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getHouseTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getHouseTypeLongName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getHouseTypeObjectID, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getFlatTypeObjectID, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getMunicipalDistrictTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getMunicipalDistrictTypeCode, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getUrbanSettlementTypeCode, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getUrbanSettlementTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.extractRegionCode, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.extractOKTMO8Symbols, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.convertAbbreviationToShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.convertAbbreviationToFullName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getMunicipalDistrictTypeCodeWithFT), `Методы для конвертации полученных значений от api фиаса в модель`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("fiasApiPath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Путь до значения, полученного от api фиаса`), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("autoValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Значение, которое поставится по дефолту`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("postfix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Постфикс, если есть значение`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Префикс, если есть значение`), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("onValueDontExist", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Значение, которое засетиться, если fiasApiPath отсутствует`), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("ifFiasApiDependExist", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Значение засетиться, если значение по пути fiasApiPath существует`), _dec(_class = (_class2 = class FiasValueSource extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
104300
+ let FiasValueSource = (_dec = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("valuesource", "Описание дополнительных полей для фиаса"), _dec2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("convertationMethod", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum(_Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getFlatTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getFlatTypeLongName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getRoomTypeLongName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getRoomTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getHouseTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getHouseTypeLongName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getHouseTypeObjectID, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getFlatTypeObjectID, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getMunicipalDistrictTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getMunicipalDistrictTypeCode, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getUrbanSettlementTypeCode, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getUrbanSettlementTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.extractRegionCode, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.extractOKTMO8Symbols, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.convertAbbreviationToShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.convertAbbreviationToFullName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationMethods.getMunicipalDistrictTypeCodeWithFT), `Методы для конвертации полученных значений от api фиаса в модель`), _dec3 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("fiasApiPath", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Путь до значения, полученного от api фиаса`), _dec4 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("autoValue", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Значение, которое поставится по дефолту`), _dec5 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("postfix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Постфикс, если есть значение`), _dec6 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Префикс, если есть значение`), _dec7 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("onValueDontExist", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Значение, которое засетится, если fiasApiPath отсутствует`), _dec8 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("ifFiasApiDependExist", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Значение засетится, если значение по пути fiasApiPath существует`), _dec(_class = (_class2 = class FiasValueSource extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
103109
104301
  constructor(...args) {
103110
104302
  super(...args);
103111
104303
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "convertationMethod", _descriptor, this);
@@ -103169,7 +104361,7 @@ let FiasValueSources = (_dec9 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED
103169
104361
  writable: true,
103170
104362
  initializer: null
103171
104363
  }), _class4)) || _class3);
103172
- let FiasExtendedField = (_dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fiasfield", "Описание дополнительных полей для фиаса"), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString.required, `По этому пути в иннер будет сетится полученное значение`), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("type", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("string", "guid", "kladr", "index", "countryCode", "foreignAddress"), `Тип для поля, string - строка значение из ответа фиаса, guid, kladr - уникальный адресный идентификатор`), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("description", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString.default(""), `Описание поля - будет выводиться на полях "Заполнить вручную"`), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("display", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Будет ли пользователю выводиться эта строчка при просмотре адреса`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("skipDefaultValidation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Не запускать стандартную валидацию (сейчас работает только для индексов)`), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("setToModel", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Будет ли это поле сетиться в иннер. По умолчанию: true"`), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("showInModal", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Будет ли значение показываться в модальном окне ручного ввода. По умолчанию: true`), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("optional", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Опциональность элемента, работает для индекса в ФСС`), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Префикс для значения из иннера. Если значение есть - применяется префикс`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.singleChild)("valuesources", [FiasValueSources]), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("parentGuid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("region", "district", "city", "street", "garhouse", "room"), `Выгрузка родительского элемента GUID-a, применимо только к полям c type: guid`), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("convertToShow", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum(_Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationToShowMethods.getMunicipalDistrictTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationToShowMethods.getUrbanSettlementTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationToShowMethods.getRegionNameByCode), `Метода для конвертации данных из модели для отображения пользователю`), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("child", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Является ли данный path - частью children`), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("clearSubstring", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, "Подстрока, которую нужно удалить перед показом пользователю"), _dec12(_class5 = (_class6 = class FiasExtendedField extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
104364
+ let FiasExtendedField = (_dec12 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.sugarNode)("fiasfield", "Описание дополнительных полей для фиаса"), _dec13 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("path", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString.required, `По этому пути в иннер будет сетится полученное значение`), _dec14 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("type", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("string", "guid", "kladr", "index"), `Тип для поля, string - строка значение из ответа фиаса, guid, kladr - уникальный адресный идентификатор`), _dec15 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("description", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString.default(""), `Описание поля - будет выводиться на полях "Заполнить вручную"`), _dec16 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("display", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Будет ли пользователю выводиться эта строчка при просмотре адреса`), _dec17 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("skipDefaultValidation", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Не запускать стандартную валидацию (сейчас работает только для индексов)`), _dec18 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("setToModel", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Будет ли это поле сетиться в иннер. По умолчанию: true"`), _dec19 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("showInModal", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Будет ли значение показываться в модальном окне ручного ввода. По умолчанию: true`), _dec20 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("optional", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Опциональность элемента, работает для индекса в ФСС`), _dec21 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("prefix", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, `Префикс для значения из иннера. Если значение есть - применяется префикс`), _dec22 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.singleChild)("valuesources", [FiasValueSources]), _dec23 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("parentGuid", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum("region", "district", "city", "street", "garhouse", "room"), `Выгрузка родительского элемента GUID-a, применимо только к полям c type: guid`), _dec24 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("convertToShow", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.enum(_Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationToShowMethods.getMunicipalDistrictTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationToShowMethods.getUrbanSettlementTypeShortName, _Engine_src_Controls_ValueEditors_Fias_FiasInput_Utils_Convertations_Types__WEBPACK_IMPORTED_MODULE_7__.fiasConvertationToShowMethods.getRegionNameByCode), `Метода для конвертации данных из модели для отображения пользователю`), _dec25 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("child", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.boolean, `Является ли данный path - частью children`), _dec26 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attr)("clearSubstring", _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.attrType.localizedString, "Подстрока, которую нужно удалить перед показом пользователю"), _dec12(_class5 = (_class6 = class FiasExtendedField extends _Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_4__.SugarNodeBase {
103173
104365
  constructor(...args) {
103174
104366
  super(...args);
103175
104367
  _babel_runtime_helpers_initializerDefineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", _descriptor10, this);
@@ -109551,8 +110743,10 @@ __webpack_require__.r(__webpack_exports__);
109551
110743
  /* harmony import */ var _Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../Common/TypingUtils */ "./Common/TypingUtils.ts");
109552
110744
  /* harmony import */ var _ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ServerSideFLangNormalization/FLang/FlangUtils */ "./Generator/src/generators/ServerSideFLangNormalization/FLang/FlangUtils.ts");
109553
110745
  /* harmony import */ var _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DataDeclarationGenerator/DataDeclaration */ "./Generator/src/generators/DataDeclarationGenerator/DataDeclaration.ts");
109554
- /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
109555
- /* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
110746
+ /* harmony import */ var _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../Common/ModelPath/AbsoluteModelFieldPath */ "./Common/ModelPath/AbsoluteModelFieldPath.ts");
110747
+ /* harmony import */ var _getBindingPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
110748
+ /* harmony import */ var _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ElementProcessors/CommonNodeProperties/ValidationInfoNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/CommonNodeProperties/ValidationInfoNode.ts");
110749
+
109556
110750
 
109557
110751
 
109558
110752
 
@@ -109561,13 +110755,15 @@ __webpack_require__.r(__webpack_exports__);
109561
110755
 
109562
110756
 
109563
110757
  class FLangNormalizationRulesBuilder {
109564
- constructor(controlCustomizationContext, fetchFunctions, fetchFuncToFlangConverter, dataDeclarationHelper, schemaRng, nodeTypeInfoHelper) {
110758
+ constructor(controlCustomizationContext, fetchFunctions, fetchFuncToFlangConverter, kclangFetchFuncRegistry, dataDeclarationHelper, schemaRng, nodeTypeInfoHelper) {
109565
110759
  this.controlCustomizationContext = void 0;
109566
110760
  this.fetchFunctions = void 0;
109567
110761
  this.schemaRng = void 0;
109568
110762
  this.nodeTypeInfoHelper = void 0;
109569
110763
  this.fetchFuncToFlangConverter = void 0;
109570
110764
  this.dataDeclarationHelper = void 0;
110765
+ this.kclangFetchFuncRegistry = void 0;
110766
+ this.kclangFetchFuncRegistry = kclangFetchFuncRegistry;
109571
110767
  this.dataDeclarationHelper = dataDeclarationHelper;
109572
110768
  this.nodeTypeInfoHelper = nodeTypeInfoHelper;
109573
110769
  this.schemaRng = schemaRng;
@@ -109576,7 +110772,7 @@ class FLangNormalizationRulesBuilder {
109576
110772
  this.controlCustomizationContext = controlCustomizationContext;
109577
110773
  }
109578
110774
  *childrenInitializer(node, optional, defaultChildren) {
109579
- const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
110775
+ const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each);
109580
110776
  yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "children"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.IsEqualsBinaryExpression((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(JSON.stringify(defaultChildren !== null && defaultChildren !== void 0 ? defaultChildren : optional ? [] : ["0"])), (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "children"))));
109581
110777
  }
109582
110778
  *childrenInitializerForPicklist(node, optional, defaultChildren) {
@@ -109585,24 +110781,18 @@ class FLangNormalizationRulesBuilder {
109585
110781
  }
109586
110782
  valueInitializer(node, dataBinding, disabled, pathSuffix, fetchFunctionSuffix, customDefaultValue) {
109587
110783
  var _ref;
109588
- const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
110784
+ const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
109589
110785
  const originalValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
109590
110786
  const sourceValueReference = this.getSourceValueReferenceWithCorrection(node, targetPathReference);
109591
110787
  const defaultValue = (_ref = customDefaultValue !== null && customDefaultValue !== void 0 ? customDefaultValue : dataBinding.defaultValue) !== null && _ref !== void 0 ? _ref : "";
109592
110788
  const sourceSequenceType = node.sourceXmlNode.attributes.settings ? _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.SETTINGS : disabled ? _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.DISABLED : _DataDeclarationGenerator_DataDeclaration__WEBPACK_IMPORTED_MODULE_4__.DataDeclarationInitSourceValueSequence.DEFAULT;
109593
110789
  if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(dataBinding.fetchfn)) {
109594
- try {
109595
- var _this$fetchFunctions$, _this$fetchFunctions$2;
109596
- const fetchFnText = (_this$fetchFunctions$ = (_this$fetchFunctions$2 = this.fetchFunctions.getFetchFunction(dataBinding.fetchfn + (fetchFunctionSuffix !== null && fetchFunctionSuffix !== void 0 ? fetchFunctionSuffix : ""))) === null || _this$fetchFunctions$2 === void 0 ? void 0 : _this$fetchFunctions$2.toString()) !== null && _this$fetchFunctions$ !== void 0 ? _this$fetchFunctions$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)();
109597
- const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
109598
- return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GetExternalInfoExpression("@settings/isReadOnly"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(disabled ? flangExpression : new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), sourceValueReference, flangExpression), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))), sourceSequenceType);
109599
- } catch (e) {
109600
- // eslint-disable-next-line no-console
109601
- console.error(`fetchfn = "${dataBinding.fetchfn}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
109602
- // eslint-disable-next-line no-console
109603
- console.error(e instanceof Error ? e.message : e);
109604
- return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference, sourceSequenceType);
109605
- }
110790
+ var _getConvertedExprFrom;
110791
+ const fetchFnName = dataBinding.fetchfn + (fetchFunctionSuffix !== null && fetchFunctionSuffix !== void 0 ? fetchFunctionSuffix : "");
110792
+ const getConvertedExprFromKClang = () => this.kclangFetchFuncRegistry.getFlangExpressionByFunction(fetchFnName, (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyAbsoluteModelPath)(), new _Common_ModelPath_AbsoluteModelFieldPath__WEBPACK_IMPORTED_MODULE_5__.AbsoluteModelFieldPath(targetPathReference, "value"));
110793
+ const getConvertedExprFromJs = () => this.tryConvertJavaScriptFetchFunction(fetchFnName);
110794
+ const flangExpression = (_getConvertedExprFrom = getConvertedExprFromKClang()) !== null && _getConvertedExprFrom !== void 0 ? _getConvertedExprFrom : getConvertedExprFromJs();
110795
+ return flangExpression != undefined ? new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.GetExternalInfoExpression("@settings/isReadOnly"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true")), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(disabled ? flangExpression : new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ConditionalExpression(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NotEqExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullLiteralExpression()), sourceValueReference, flangExpression), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue)), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.NullCoalesceExpression(originalValueReference, new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue))), sourceSequenceType) : new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), sourceValueReference, sourceSequenceType);
109606
110796
  }
109607
110797
  let valueExpression = new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression(defaultValue);
109608
110798
  if (dataBinding.settings || !disabled && !dataBinding.settings) {
@@ -109612,11 +110802,25 @@ class FLangNormalizationRulesBuilder {
109612
110802
  return new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "value"), finalExpression, sourceSequenceType);
109613
110803
  }
109614
110804
  *specialFieldsInitializer(node, options) {
109615
- const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_5__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
110805
+ const targetPathReference = (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_6__.getResolvedBindingPath)(node), true, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each).joinWith((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.isNotNullOrEmpty)(options.pathSuffix) ? (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.createFromMask)(options.pathSuffix, false, _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.PathTokens.each) : (0,_Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_1__.emptyModelPath)());
109616
110806
  if (options.disabled) {
109617
110807
  yield new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.SetStatement(new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.ValueReferenceExpression(targetPathReference, "disabled"), new _ServerSideFLangNormalization_FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_0__.StringLiteralExpression("true"));
109618
110808
  }
109619
110809
  }
110810
+ tryConvertJavaScriptFetchFunction(fetchFnName) {
110811
+ try {
110812
+ var _this$fetchFunctions$, _this$fetchFunctions$2;
110813
+ const fetchFnText = (_this$fetchFunctions$ = (_this$fetchFunctions$2 = this.fetchFunctions.getFetchFunction(fetchFnName)) === null || _this$fetchFunctions$2 === void 0 ? void 0 : _this$fetchFunctions$2.toString()) !== null && _this$fetchFunctions$ !== void 0 ? _this$fetchFunctions$ : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.reject)();
110814
+ const flangExpression = this.fetchFuncToFlangConverter.convert(`const x = ${fetchFnText}`);
110815
+ return flangExpression;
110816
+ } catch (e) {
110817
+ // eslint-disable-next-line no-console
110818
+ console.error(`fetchfn = "${fetchFnName}". Не удалось преобразовать fetch-функцию во FLANG-выражение!`);
110819
+ // eslint-disable-next-line no-console
110820
+ console.error(e instanceof Error ? e.message : e);
110821
+ return undefined;
110822
+ }
110823
+ }
109620
110824
  wrapExpressionWithCorrectionExpression(baseType, expr) {
109621
110825
  switch (baseType) {
109622
110826
  case "decimal":
@@ -109630,7 +110834,7 @@ class FLangNormalizationRulesBuilder {
109630
110834
  var _typeNode$base, _this$schemaRng$getTy;
109631
110835
  // eslint-disable-next-line
109632
110836
  const validationInfoSource = node === null || node === void 0 ? void 0 : node.validationInfo;
109633
- const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_6__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
110837
+ const typeNode = validationInfoSource instanceof _ElementProcessors_CommonNodeProperties_ValidationInfoNode__WEBPACK_IMPORTED_MODULE_7__.ValidationInfoNode ? this.nodeTypeInfoHelper.getTypeNode(validationInfoSource) : undefined;
109634
110838
  const baseType = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : (_this$schemaRng$getTy = this.schemaRng.getTypeNodeByPath(targetPathReference)) === null || _this$schemaRng$getTy === void 0 ? void 0 : _this$schemaRng$getTy.baseType;
109635
110839
  const sourceValueReference = (0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeNoDeps)((0,_ServerSideFLangNormalization_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_3__.makeStringValueReference)(targetPathReference.toCurrentIteration(), "value"));
109636
110840
  return baseType != undefined ? this.wrapExpressionWithCorrectionExpression(baseType, sourceValueReference) : sourceValueReference;
@@ -159811,7 +161015,7 @@ module.exports = "<h4>Атрибут emptyValueFilter</h4>\nЕсли нет вв
159811
161015
  \*****************************************************************************************************/
159812
161016
  /***/ ((module) => {
159813
161017
 
159814
- module.exports = "Теги: #ФИАС #справочник #адресов #fias\n\nКонтрол нужен для отображения [справочника адресов ФИАС](https://www.nalog.gov.ru/rn77/service/fias/).\nПоддерживает **муниципальное и административно-территориальное деление** (подробнее о структуре адресов можно узнать на [сайте ФИАС](https://fias.nalog.ru/)).\n\n**Структура справочника** в общем виде выглядит следующим образом:\n\n```xml\n<fias\n path=\"АнкетныеДанные/АдресРегистрации\"\n title=\"Адрес регистрации\"\n searchToAddressLevel=\"room\">\n <fiasfield\n path=\"Регион/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\" Регион географическое название\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"region.name\" />\n </valuesources>\n </fiasfield>\n ...\n <fiasfield path=\"Индекс\" type=\"string\" display=\"false\" description=\"Индекс\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.postalCode\" />\n </valuesources>\n </fiasfield>\n</fias>\n```\n\n### Настройка полей справочника\n\nВ справочнике ФИАС можно настроить поля, которые будут выгружаться в иннер после заполнения справочника, а также отображаться в модалке редактирования адреса.\nКаждое поле задается тегом **< fiasfield >**, внутри которого прописываются источники данных.\nВ качестве атрибутов-настроек поля можно задать:\n\n- **path** - относительный путь в иннере, по которому будет выгружаться значение поля. Например, path=\"Регион/ГеографическоеНазвание\" или path=\"Регион/Сокращение\";\n- **type** - тип данных;\n- **display** - если true, то данное поле будет показано в модалке редактирования адреса;\n- **description** - название поля, которое отображается в модалке.\n\nИсточники данных задаются тегом **< valuesources >**. Внутри перечисляются источники, каждый из которых задается отдельным тегом <valuesource>, внутри которого атрибутами указываются:\n\n- fiasApiPath - это название поля в апи [сервиса ФИАСа](https://api.testkontur.ru/fias/v1.2/addresses/), из которого нужно тянуть данные. [Документация](https://wiki.skbkontur.ru/pages/viewpage.action?pageId=186435051) по сервису ФИАС.\n- convertationMethod:\n - getHouseTypeShortName - получает сокращенное наименование здания,\n - getFlatTypeShortName - получает сокращенное наименование помещения,\n - getRoomTypeShortName - получает сокращенное наименование комнаты,\n - extractRegionCode - получает код региона,\n - getMunicipalDistrictTypeCode - получает код типа муниципального района,\n - getUrbanSettlementTypeCode - получает код типа для поселения,\n - convertAbbreviationToFullName - конвертирует аббревиатуру в адресе в полное наименование,\n - getHouseTypeLongName - получает полное наименование типа здания,\n - getFlatTypeLongName - получает полное наименование типа помещения,\n - getRoomTypeLongName - получает полное наименование типа комнаты,\n - extractOKTMO8Symbols - получает ОКТМО в 8-значном формате.\n- endComma - задается внутри valuesources, если true, то запятая проставляется после значения поля, иначе без запятой, по умолчанию true. Например, \"Республика Татарстан, улица Ленина\" - для поля \"Регион/Сокращение\" = \"Республика\" endComma должно быть равно false, для \"Регион/Наименование\" = \"Татарстан\" должно быть true или не задано.\n\nПример поля в ФИАСе:\n\n```\n<fiasfield path=\"Корпус/Номер\" type=\"string\" display=\"true\" description=\"Корпус номер\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.addNum1\" />\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"addType2.addType2\" />\n <valuesource fiasApiPath=\"garhouse.addNum2\" />\n </valuesources>\n</fiasfield>\n```\n\n### Настройки справочника\n\n**division:** значение настройки может быть municipal или administrative, меняет отображение адресов в справочнике в соответствии с территориальным делением: муниципальное, административное.\nПо умолчанию municipal.\n\n**searchToAddressLevel:** уровень, до которого ищутся адресные объекты.\nНапример, если задан уровень до комнаты searchToAddressLevel=room, тогда в результатах поиска у найденных адресов будут отображаться все части адреса до комнаты, если searchToAddressLevel=street, то в адресе будет отображаться улица и всё, что выше неё.\nВ выбранном значении в инпуте тоже будут отображаться только те части адреса, которые соответствуют выбранному уровню.\n\n**withSteads:** включает показ земельных участков в справочнике.\nЕсли значение настройки true, то в справочнике при поиске в списке адресов показываются адреса с зем. участками. Выгрузку в иннер зем. участков и отображение в модалке нужно настраивать отдельно.\n\n**onlyInput:** без этой настройки, если поле со справочником не заполнено, то оно отображается в виде обычного инпута, а когда заполнено, в виде текста со ссылкой \"Редактировать\".\nИногда бывает нужно отображать контрол всегда в состоянии инпута, например, внутри таблицы. Для этого нужно установить onlyInput=true.\n\n### Модальная форма редактирования адреса\n\nВ настоящее время есть 2 реализации данного контрола: с настраиваемой модалкой редактирования адреса и ненастраиваемой модалкой.\n\n#### ФИАС с настраиваемой модалкой\n\nПолностью настраиваемый справочник, где можно конфигурировать поля в иннере и модалке ресурсами.\nПо умолчанию справочник является настраиваемым, т.е. если в ФИАСе не указан тег **< fnsoptions >**/**< mvdoptions >**, то это настраиваемый справочник.\n\nПример настраиваемого справочника:\n\n```xml\n\n<fias\n path=\"АнкетныеДанные/АдресРегистрации\"\n title=\"Адрес регистрации\"\n searchToAddressLevel=\"room\"\n division=\"administrative\"\n pathToFullAddress=\"fullAddress\">\n <fiasfield\n path=\"Регион/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\" Регион географическое название\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"region.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Регион/Сокращение\" type=\"string\" display=\"true\" description=\"Регион сокращение\">\n <valuesources>\n <valuesource fiasApiPath=\"region.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Район/Сокращение\" type=\"string\" display=\"true\" description=\"Район сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"district.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Район/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Район географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"district.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Город/Сокращение\" type=\"string\" display=\"true\" description=\"Город сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"city.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Город/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Город географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"city.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"НаселенныйПункт/Сокращение\"\n type=\"string\"\n display=\"true\"\n description=\"Населенный пункт сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"settlement.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"НаселенныйПункт/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Населенный пункт географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"settlement.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Улица/Сокращение\"\n type=\"string\"\n display=\"true\"\n description=\"Улица сокращение\"\n showInModal=\"false\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"planningstructure.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Улица/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Улица географическое название\"\n showInModal=\"false\">\n <valuesources>\n <valuesource fiasApiPath=\"planningstructure.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Улица/Сокращение\" type=\"string\" display=\"true\" description=\"Улица сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"street.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Улица/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Улица географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"street.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Дом/Сокращение\" type=\"string\" display=\"true\" description=\"Дом сокращение\">\n <valuesources endComma=\"false\">\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"garhouse.houseType\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Дом/Номер\" type=\"string\" display=\"true\" description=\"Дом номер\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.houseNum\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Корпус/Сокращение\" type=\"string\" display=\"true\" description=\"Корпус сокращение\">\n <valuesources endComma=\"false\">\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"garhouse.addType1\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Корпус/Номер\" type=\"string\" display=\"true\" description=\"Корпус номер\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.addNum1\" />\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"addType2.addType2\" />\n <valuesource fiasApiPath=\"garhouse.addNum2\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Квартира/Сокращение\" type=\"string\" display=\"true\" description=\"Квартира сокращение\">\n <valuesources endComma=\"false\">\n <valuesource convertationMethod=\"getFlatTypeShortName\" fiasApiPath=\"room.flatType\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Квартира/Номер\" type=\"string\" display=\"true\" description=\"Квартира номер\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"room.flatNumber\" />\n <valuesource convertationMethod=\"getRoomTypeShortName\" fiasApiPath=\"room.roomType\" />\n <valuesource fiasApiPath=\"room.roomNumber\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Индекс\" type=\"string\" display=\"false\" description=\"Индекс\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.postalCode\" />\n </valuesources>\n </fiasfield>\n</fias>\n\n```\n\n#### ФИАС с НЕнастраиваемой модалкой\n\n- подходит для большинства форм ФНС;\n- в модальной форме редактирования адреса набор полей неизменен (его нельзя настроить ресурсами);\n- некоторые поля реализованы в виде выпадающих справочников, набор значений которых также нельзя настроить в ресурсах;\n- количество полей модалки НЕ настраивается, нет возможности задать неограниченное добавление полей. Количество полей фиксированное и соответствует количеству полей, возвращаемых ФИАСом.\n- есть возможность заполнения адреса по введенному guid-у адреса.\n\nДля включения такой модалки внутри ФИАСа должен быть указан тег **< fnsoptions >**/**< mvdoptions >**.\n\nПодробнее про [fnsoptions](https://candy.gitlab-pages.kontur.host/docs/docs/%D0%9A%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8B/fnsoptions) и [mvdoptions](https://candy.gitlab-pages.kontur.host/docs/docs/%D0%9A%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8B/mvdoptions)\n\n\n```xml\n<fias path=\"АдрОбъектРФ\" title=\"Адрес\" searchToAddressLevel=\"room\" division=\"municipal\" withSteads=\"true\">\n <fnsoptions abbreviationSize=\"long\" />\n ...\n</fias>\n```\n\nСписок полей в ненастраиваемой модалке:\n\n- Индекс (опциональный)\n- Регион\n- Муниципальный район / округ (Вид + Наименование)\n- Поселение (Вид + Наименование)\n- Населенный пункт (Тип + Наименование)\n- Элемент планировочной структуры (Тип + Наименование)\n- Элемент улично-дорожной сети (Тип + Наименование)\n- Номер земельного участка\n- Номер здания / сооружения (Тип + Наименование): 3 пары Вид+Наименование - Дом, Корпус, Строение\n- Номер помещения / квартиры / машино-места (Тип + Наименование)\n- Помещение в пределах квартиры (Тип + Наименование)\n- Уникальный идентификатор адресного объекта в ГАР\n\nФормат полей и ограничения на ввод данных указаны в [wiki](https://wiki.skbkontur.ru/pages/viewpage.action?pageId=430311482).\n\nДля ФИАСа с НЕнастраиваемой модалкой есть свои настройки:\n\n**withIndex:** включает отображение поля с почтовым индексом. По умолчанию выключен.\n\n**withSteads:** включает показ земельных участков в справочнике.\nЕсли значение настройки true, то:\n\n- в справочнике при поиске в списке адресов показываются адреса с зем. участками;\n- в модалке редактирования адреса появляется поле \"Земельный участок\";\n- значение зем. участка, выбранного в справочнике, засетится по указанному в поле ФИАСа пути.\n По умолчанию показ зем. участков выключен.\n\n**abbreviationSize:** short или long (по умолчанию long). Если short, то аббревиатуры в адресе выгружаются в сокращенном виде. Например, \"ул. Ленина\". При значении long - в не сокращенном, например, \"улица Ленина\".\nНастройка указывается атрибутом в теге fnsoptions/mvdoptions.\nНастройку можно указать только общую для всех полей: нельзя настроить разный вид аббревиатур для каждого поля в отдельности.\n\n**pathToFullAddress:** задает путь, по которому засетится полный адрес (строится как конкатенация значений всех полей ФИАСа).\n\nОстальные настройки такие же, как в настраиваемом ФИАСе.\n\nПример ФИАСа с ненастраиваемой модалкой:\n\n```xml\n<fias path=\"АдрОбъектРФ\" title=\"Адрес\" searchToAddressLevel=\"room\" division=\"municipal\" withSteads=\"true\">\n <childrenoptions childrenInStack=\"2\" path=\"Здание\" />\n <fnsoptions abbreviationSize=\"long\" />\n <fiasfield\n path=\"Регион\"\n type=\"string\"\n display=\"true\"\n description=\"Адрес\"\n convertToShow=\"getRegionNameByCode\">\n <valuesources>\n <valuesource convertationMethod=\"extractRegionCode\" fiasApiPath=\"region.code\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"МуниципРайон/ВидКод\"\n type=\"string\"\n display=\"true\"\n description=\"Адрес\"\n convertToShow=\"getMunicipalDistrictTypeShortName\">\n <valuesources endComma=\"false\">\n <valuesource\n convertationMethod=\"getMunicipalDistrictTypeCode\"\n fiasApiPath=\"municipaldistrict.abbreviation\"\n />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"МуниципРайон/Наим\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources>\n <valuesource fiasApiPath=\"municipaldistrict.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"ГородСелПоселен/ВидКод\"\n type=\"string\"\n display=\"true\"\n description=\"Адрес\"\n convertToShow=\"getUrbanSettlementTypeShortName\">\n <valuesources endComma=\"false\">\n <valuesource\n convertationMethod=\"getUrbanSettlementTypeCode\"\n fiasApiPath=\"urbansettlement.abbreviation\"\n />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"ГородСелПоселен/Наим\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources>\n <valuesource fiasApiPath=\"urbansettlement.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"НаселенПункт/Вид\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources endComma=\"false\">\n <valuesource\n convertationMethod=\"convertAbbreviationToFullName\"\n fiasApiPath=\"district.abbreviation\"\n />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"НаселенПункт/Наим\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources>\n <valuesource fiasApiPath=\"district.name\" />\n </valuesources>\n </fiasfield>\n ...\n <fiasfield path=\"ИдНом\" type=\"guid\" display=\"true\" description=\"\">\n <valuesources>\n <valuesource />\n </valuesources>\n </fiasfield>\n</fias>\n```\n\n### Валидации в ФИАСе\n\n- справочник ФИАС поддерживает только условные валидации типа error и warning;\n- валидации срабатывают только на основной инпут, появляется красная или оранжевая рамка в соответствии с уровнем ошибки;\n- валидации на полях внутри модальной формы не реализованы и работать не будут.\n\n### Апи ФИАСа\n\nЕсть возможность обращаться к методам и полям справочника ФИАС напрямую, например, из хэлпера или хуков. Это может понадобиться для реализации какого-либо функционала, отсутствующего в контроле.\nДля этого из publicForm нужно вызвать createFiasApiClient.\n\nКакие методы для работы с ФИАСом есть в FiasApi:\n\n- fetchSteadsByTextAndParentFiasId(text: string, parentFiasId: string) - асинхронный, возвращает массив найденных зем. участков - FiasStead[];\n- fetchSuggestAddressesByText(text: string) - асинхронный, возвращает массив найденных адресов со всеми полями - FiasAddressFields[];\n- fetchFullAddressesByFiasId(fiasId: string) - асинхронный, ищет адреса по id, возвращает FiasAddressFields;\n- fetchFlatByParentFiasId(parentFiasId: string, number: string) - асинхронный, для поиска квартир, возвращает FiasFlatRoom;\n- fetchCountriesByName(countryName: string) - асинхронный, находит список стран по имени - FiasCountry[];\n- fetchRegions() - асинхронный, возвращает список регионов - RegionsType\n\nПример:\n```js\nexport default async function ({ publicForm }) {\nconst fiasApi = publicForm.createFiasApiClient();\nconst suggestedAddresses = await fiasApi.fetchSuggestAddressesByText(\"Свердловская обл, г Екатеринбург, ул Малопрудная, д 5\");\n}\n```\nЗдесь вызывается метод fetchSuggestAddressesByText, который по строке адреса возвращает suggestedAddresses - подходящие адреса из апи ФИАСа. Возвращаемое значение - массив адресов, а каждый адрес - структура, содержащая все поля адреса, возвращаемые апи (регион, район и т.д.).\n\n## Отображение виджета\n\nМожно переключить контрол в режим рендера внешнего виджета вместо контрола из движка. Этот кейс нужен Диадоку, но может быть еще где-то пригодится.\n\nЧтобы переключить в режим виджета, нужно добавить ноду:\n```xml\n<adrgaroptions />\n```\nУ нее есть свои настройки, которые влияют на поведение и отображение виджета, см. сгенеренную доку по ноде.\n\nВ режиме виджета поведение контрола может отличаться от стандартного. Например, настройки полей стали лаконичнее:\n```xml\n<fiasfield path=\"Регион\" type=\"string\">\n <valuesources>\n <valuesource convertationMethod=\"extractRegionCode\" fiasApiPath=\"region.data.code\" />\n </valuesources>\n</fiasfield>\n```\nВесь используемый набор атрибутов в примере выше. Остальные настройки игнорируются.\n\nВажный момент с `type=\"guid\"` и `type=\"index\"`. Эти настройки отвечают за валидное сохранение почтового индекса адреса и `fiasId`.\n\n### Валидация\n\nПоскольку на виджете у нас нет возможности добраться до валидации внутри модалки, нужно навешивать ошибки валидации на корневой элемент.\n";
161018
+ module.exports = "Теги: #ФИАС #справочник #адресов #fias\n\nКонтрол нужен для отображения [справочника адресов ФИАС](https://www.nalog.gov.ru/rn77/service/fias/).\nПоддерживает **муниципальное и административно-территориальное деление** (подробнее о структуре адресов можно узнать на [сайте ФИАС](https://fias.nalog.ru/)).\n\n**Структура справочника** в общем виде выглядит следующим образом:\n\n```xml\n<fias\n path=\"АнкетныеДанные/АдресРегистрации\"\n title=\"Адрес регистрации\"\n searchToAddressLevel=\"room\">\n <fiasfield\n path=\"Регион/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\" Регион географическое название\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"region.name\" />\n </valuesources>\n </fiasfield>\n ...\n <fiasfield path=\"Индекс\" type=\"string\" display=\"false\" description=\"Индекс\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.postalCode\" />\n </valuesources>\n </fiasfield>\n</fias>\n```\n\n### Настройка полей справочника\n\nВ справочнике ФИАС можно настроить поля, которые будут выгружаться в иннер после заполнения справочника, а также отображаться в модалке редактирования адреса.\nКаждое поле задается тегом **< fiasfield >**, внутри которого прописываются источники данных.\nВ качестве атрибутов-настроек поля можно задать:\n\n- **path** - относительный путь в иннере, по которому будет выгружаться значение поля. Например, path=\"Регион/ГеографическоеНазвание\" или path=\"Регион/Сокращение\";\n- **type** - тип данных;\n- **display** - если true, то данное поле будет показано в модалке редактирования адреса;\n- **description** - название поля, которое отображается в модалке.\n\nИсточники данных задаются тегом **< valuesources >**. Внутри перечисляются источники, каждый из которых задается отдельным тегом <valuesource>, внутри которого атрибутами указываются:\n\n- fiasApiPath - это название поля в апи [сервиса ФИАСа](https://api.testkontur.ru/fias/v1.2/addresses/), из которого нужно тянуть данные. [Документация](https://wiki.skbkontur.ru/pages/viewpage.action?pageId=186435051) по сервису ФИАС.\n- convertationMethod:\n - getHouseTypeShortName - получает сокращенное наименование здания,\n - getFlatTypeShortName - получает сокращенное наименование помещения,\n - getRoomTypeShortName - получает сокращенное наименование комнаты,\n - extractRegionCode - получает код региона,\n - getMunicipalDistrictTypeCode - получает код типа муниципального района,\n - getUrbanSettlementTypeCode - получает код типа для поселения,\n - convertAbbreviationToFullName - конвертирует аббревиатуру в адресе в полное наименование,\n - getHouseTypeLongName - получает полное наименование типа здания,\n - getFlatTypeLongName - получает полное наименование типа помещения,\n - getRoomTypeLongName - получает полное наименование типа комнаты,\n - extractOKTMO8Symbols - получает ОКТМО в 8-значном формате.\n- endComma - задается внутри valuesources, если true, то запятая проставляется после значения поля, иначе без запятой, по умолчанию true. Например, \"Республика Татарстан, улица Ленина\" - для поля \"Регион/Сокращение\" = \"Республика\" endComma должно быть равно false, для \"Регион/Наименование\" = \"Татарстан\" должно быть true или не задано.\n\nПример поля в ФИАСе:\n\n```\n<fiasfield path=\"Корпус/Номер\" type=\"string\" display=\"true\" description=\"Корпус номер\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.addNum1\" />\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"addType2.addType2\" />\n <valuesource fiasApiPath=\"garhouse.addNum2\" />\n </valuesources>\n</fiasfield>\n```\n\n### Настройки справочника\n\n**division:** значение настройки может быть municipal или administrative, меняет отображение адресов в справочнике в соответствии с территориальным делением: муниципальное, административное.\nПо умолчанию municipal.\n\n**searchToAddressLevel:** уровень, до которого ищутся адресные объекты.\nНапример, если задан уровень до комнаты searchToAddressLevel=room, тогда в результатах поиска у найденных адресов будут отображаться все части адреса до комнаты, если searchToAddressLevel=street, то в адресе будет отображаться улица и всё, что выше неё.\nВ выбранном значении в инпуте тоже будут отображаться только те части адреса, которые соответствуют выбранному уровню.\n\n**withSteads:** включает показ земельных участков в справочнике.\nЕсли значение настройки true, то в справочнике при поиске в списке адресов показываются адреса с зем. участками. Выгрузку в иннер зем. участков и отображение в модалке нужно настраивать отдельно.\n\n**onlyInput:** без этой настройки, если поле со справочником не заполнено, то оно отображается в виде обычного инпута, а когда заполнено, в виде текста со ссылкой \"Редактировать\".\nИногда бывает нужно отображать контрол всегда в состоянии инпута, например, внутри таблицы. Для этого нужно установить onlyInput=true.\n\n### Модальная форма редактирования адреса\n\nВ настоящее время есть 2 реализации данного контрола: с настраиваемой модалкой редактирования адреса и ненастраиваемой модалкой.\n\n#### ФИАС с настраиваемой модалкой\n\nПолностью настраиваемый справочник, где можно конфигурировать поля в иннере и модалке ресурсами.\nПо умолчанию справочник является настраиваемым, т.е. если в ФИАСе не указан тег **< fnsoptions >**/**< mvdoptions >**, то это настраиваемый справочник.\n\nПример настраиваемого справочника:\n\n```xml\n\n<fias\n path=\"АнкетныеДанные/АдресРегистрации\"\n title=\"Адрес регистрации\"\n searchToAddressLevel=\"room\"\n division=\"administrative\"\n pathToFullAddress=\"fullAddress\">\n <fiasfield\n path=\"Регион/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\" Регион географическое название\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"region.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Регион/Сокращение\" type=\"string\" display=\"true\" description=\"Регион сокращение\">\n <valuesources>\n <valuesource fiasApiPath=\"region.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Район/Сокращение\" type=\"string\" display=\"true\" description=\"Район сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"district.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Район/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Район географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"district.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Город/Сокращение\" type=\"string\" display=\"true\" description=\"Город сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"city.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Город/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Город географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"city.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"НаселенныйПункт/Сокращение\"\n type=\"string\"\n display=\"true\"\n description=\"Населенный пункт сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"settlement.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"НаселенныйПункт/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Населенный пункт географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"settlement.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Улица/Сокращение\"\n type=\"string\"\n display=\"true\"\n description=\"Улица сокращение\"\n showInModal=\"false\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"planningstructure.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Улица/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Улица географическое название\"\n showInModal=\"false\">\n <valuesources>\n <valuesource fiasApiPath=\"planningstructure.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Улица/Сокращение\" type=\"string\" display=\"true\" description=\"Улица сокращение\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"street.abbreviation\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"Улица/ГеографическоеНазвание\"\n type=\"string\"\n display=\"true\"\n description=\"Улица географическое название\">\n <valuesources>\n <valuesource fiasApiPath=\"street.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Дом/Сокращение\" type=\"string\" display=\"true\" description=\"Дом сокращение\">\n <valuesources endComma=\"false\">\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"garhouse.houseType\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Дом/Номер\" type=\"string\" display=\"true\" description=\"Дом номер\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.houseNum\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Корпус/Сокращение\" type=\"string\" display=\"true\" description=\"Корпус сокращение\">\n <valuesources endComma=\"false\">\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"garhouse.addType1\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Корпус/Номер\" type=\"string\" display=\"true\" description=\"Корпус номер\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.addNum1\" />\n <valuesource convertationMethod=\"getHouseTypeShortName\" fiasApiPath=\"addType2.addType2\" />\n <valuesource fiasApiPath=\"garhouse.addNum2\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Квартира/Сокращение\" type=\"string\" display=\"true\" description=\"Квартира сокращение\">\n <valuesources endComma=\"false\">\n <valuesource convertationMethod=\"getFlatTypeShortName\" fiasApiPath=\"room.flatType\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Квартира/Номер\" type=\"string\" display=\"true\" description=\"Квартира номер\">\n <valuesources endComma=\"false\">\n <valuesource fiasApiPath=\"room.flatNumber\" />\n <valuesource convertationMethod=\"getRoomTypeShortName\" fiasApiPath=\"room.roomType\" />\n <valuesource fiasApiPath=\"room.roomNumber\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"Индекс\" type=\"string\" display=\"false\" description=\"Индекс\">\n <valuesources>\n <valuesource fiasApiPath=\"garhouse.postalCode\" />\n </valuesources>\n </fiasfield>\n</fias>\n\n```\n\n#### ФИАС с НЕнастраиваемой модалкой\n\n- подходит для большинства форм ФНС;\n- в модальной форме редактирования адреса набор полей неизменен (его нельзя настроить ресурсами);\n- некоторые поля реализованы в виде выпадающих справочников, набор значений которых также нельзя настроить в ресурсах;\n- количество полей модалки НЕ настраивается, нет возможности задать неограниченное добавление полей. Количество полей фиксированное и соответствует количеству полей, возвращаемых ФИАСом.\n- есть возможность заполнения адреса по введенному guid-у адреса.\n\nДля включения такой модалки внутри ФИАСа должен быть указан тег **< fnsoptions >**/**< mvdoptions >**.\n\nПодробнее про [fnsoptions](https://candy.gitlab-pages.kontur.host/docs/docs/%D0%9A%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8B/fnsoptions) и [mvdoptions](https://candy.gitlab-pages.kontur.host/docs/docs/%D0%9A%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D1%8B/mvdoptions)\n\n\n```xml\n<fias path=\"АдрОбъектРФ\" title=\"Адрес\" searchToAddressLevel=\"room\" division=\"municipal\" withSteads=\"true\">\n <fnsoptions abbreviationSize=\"long\" />\n ...\n</fias>\n```\n\nСписок полей в ненастраиваемой модалке:\n\n- Индекс (опциональный)\n- Регион\n- Муниципальный район / округ (Вид + Наименование)\n- Поселение (Вид + Наименование)\n- Населенный пункт (Тип + Наименование)\n- Элемент планировочной структуры (Тип + Наименование)\n- Элемент улично-дорожной сети (Тип + Наименование)\n- Номер земельного участка\n- Номер здания / сооружения (Тип + Наименование): 3 пары Вид+Наименование - Дом, Корпус, Строение\n- Номер помещения / квартиры / машино-места (Тип + Наименование)\n- Помещение в пределах квартиры (Тип + Наименование)\n- Уникальный идентификатор адресного объекта в ГАР\n\nФормат полей и ограничения на ввод данных указаны в [wiki](https://wiki.skbkontur.ru/pages/viewpage.action?pageId=430311482).\n\nДля ФИАСа с НЕнастраиваемой модалкой есть свои настройки:\n\n**withIndex:** включает отображение поля с почтовым индексом. По умолчанию выключен.\n\n**withSteads:** включает показ земельных участков в справочнике.\nЕсли значение настройки true, то:\n\n- в справочнике при поиске в списке адресов показываются адреса с зем. участками;\n- в модалке редактирования адреса появляется поле \"Земельный участок\";\n- значение зем. участка, выбранного в справочнике, засетится по указанному в поле ФИАСа пути.\n По умолчанию показ зем. участков выключен.\n\n**abbreviationSize:** short или long (по умолчанию long). Если short, то аббревиатуры в адресе выгружаются в сокращенном виде. Например, \"ул. Ленина\". При значении long - в не сокращенном, например, \"улица Ленина\".\nНастройка указывается атрибутом в теге fnsoptions/mvdoptions.\nНастройку можно указать только общую для всех полей: нельзя настроить разный вид аббревиатур для каждого поля в отдельности.\n\n**pathToFullAddress:** задает путь, по которому засетится полный адрес (строится как конкатенация значений всех полей ФИАСа).\n\nОстальные настройки такие же, как в настраиваемом ФИАСе.\n\nПример ФИАСа с ненастраиваемой модалкой:\n\n```xml\n<fias path=\"АдрОбъектРФ\" title=\"Адрес\" searchToAddressLevel=\"room\" division=\"municipal\" withSteads=\"true\">\n <childrenoptions childrenInStack=\"2\" path=\"Здание\" />\n <fnsoptions abbreviationSize=\"long\" />\n <fiasfield\n path=\"Регион\"\n type=\"string\"\n display=\"true\"\n description=\"Адрес\"\n convertToShow=\"getRegionNameByCode\">\n <valuesources>\n <valuesource convertationMethod=\"extractRegionCode\" fiasApiPath=\"region.code\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"МуниципРайон/ВидКод\"\n type=\"string\"\n display=\"true\"\n description=\"Адрес\"\n convertToShow=\"getMunicipalDistrictTypeShortName\">\n <valuesources endComma=\"false\">\n <valuesource\n convertationMethod=\"getMunicipalDistrictTypeCode\"\n fiasApiPath=\"municipaldistrict.abbreviation\"\n />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"МуниципРайон/Наим\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources>\n <valuesource fiasApiPath=\"municipaldistrict.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield\n path=\"ГородСелПоселен/ВидКод\"\n type=\"string\"\n display=\"true\"\n description=\"Адрес\"\n convertToShow=\"getUrbanSettlementTypeShortName\">\n <valuesources endComma=\"false\">\n <valuesource\n convertationMethod=\"getUrbanSettlementTypeCode\"\n fiasApiPath=\"urbansettlement.abbreviation\"\n />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"ГородСелПоселен/Наим\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources>\n <valuesource fiasApiPath=\"urbansettlement.name\" />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"НаселенПункт/Вид\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources endComma=\"false\">\n <valuesource\n convertationMethod=\"convertAbbreviationToFullName\"\n fiasApiPath=\"district.abbreviation\"\n />\n </valuesources>\n </fiasfield>\n <fiasfield path=\"НаселенПункт/Наим\" type=\"string\" display=\"true\" description=\"Адрес\">\n <valuesources>\n <valuesource fiasApiPath=\"district.name\" />\n </valuesources>\n </fiasfield>\n ...\n <fiasfield path=\"ИдНом\" type=\"guid\" display=\"true\" description=\"\">\n <valuesources>\n <valuesource />\n </valuesources>\n </fiasfield>\n</fias>\n```\n\n### Валидации в ФИАСе\n\n- справочник ФИАС поддерживает только условные валидации типа error и warning;\n- валидации срабатывают только на основной инпут, появляется красная или оранжевая рамка в соответствии с уровнем ошибки;\n- валидации на полях внутри модальной формы не реализованы и работать не будут.\n\n### Апи ФИАСа\n\nЕсть возможность обращаться к методам и полям справочника ФИАС напрямую, например, из хэлпера или хуков. Это может понадобиться для реализации какого-либо функционала, отсутствующего в контроле.\nДля этого из publicForm нужно вызвать createFiasApiClient.\n\nКакие методы для работы с ФИАСом есть в FiasApi:\n\n- fetchSteadsByTextAndParentFiasId(text: string, parentFiasId: string) - асинхронный, возвращает массив найденных зем. участков - FiasStead[];\n- fetchSuggestAddressesByText(text: string) - асинхронный, возвращает массив найденных адресов со всеми полями - FiasAddressFields[];\n- fetchFullAddressesByFiasId(fiasId: string) - асинхронный, ищет адреса по id, возвращает FiasAddressFields;\n- fetchFlatByParentFiasId(parentFiasId: string, number: string) - асинхронный, для поиска квартир, возвращает FiasFlatRoom;\n- fetchCountriesByName(countryName: string) - асинхронный, находит список стран по имени - FiasCountry[];\n- fetchRegions() - асинхронный, возвращает список регионов - RegionsType\n\nПример:\n```js\nexport default async function ({ publicForm }) {\nconst fiasApi = publicForm.createFiasApiClient();\nconst suggestedAddresses = await fiasApi.fetchSuggestAddressesByText(\"Свердловская обл, г Екатеринбург, ул Малопрудная, д 5\");\n}\n```\nЗдесь вызывается метод fetchSuggestAddressesByText, который по строке адреса возвращает suggestedAddresses - подходящие адреса из апи ФИАСа. Возвращаемое значение - массив адресов, а каждый адрес - структура, содержащая все поля адреса, возвращаемые апи (регион, район и т.д.).\n\n## Отображение виджета\n\nМожно переключить контрол в режим рендера внешнего виджета вместо контрола из движка. Этот кейс нужен Диадоку, но может быть еще где-то пригодится.\n\nЧтобы переключить в режим виджета, нужно добавить ноду:\n```xml\n<adrgaroptions />\n```\nУ нее есть свои настройки, которые влияют на поведение и отображение виджета, см. сгенеренную доку по ноде.\n\nВ режиме виджета поведение контрола может отличаться от стандартного. Например, настройки полей стали лаконичнее:\n```xml\n<fiasfield path=\"Регион\" type=\"string\">\n <valuesources>\n <valuesource convertationMethod=\"extractRegionCode\" fiasApiPath=\"region.data.code\" />\n </valuesources>\n</fiasfield>\n```\nВесь используемый набор атрибутов в примере выше. Остальные настройки игнорируются.\n\nВажный момент с `type=\"guid\"` и `type=\"index\"`. Эти настройки отвечают за валидное сохранение почтового индекса адреса и `fiasId`.\n\n`fiasApiPath` оброс логикой. Теперь там можно указывать путь как относительно поля address, так и относительно корня [модели ответа от виджета](https://git.skbkontur.ru/platform/widgets/addresses.widget/-/blob/7d9e458973b217c6b85cbc8ffed862328f0d3682/npm-loader/common.ts#L47).\nНапример, `region.data.code` будет доставаться из `address.region.data.code` (можно и полностью указать `address.region.data.code`).\nА вот `country.code` уже будет из корня модели. Аналогичным образом из корня доступны и другие поля.\n\n### Валидация\n\nПоскольку на виджете у нас нет возможности добраться до валидации внутри модалки, нужно навешивать ошибки валидации на корневой элемент.\n";
159815
161019
 
159816
161020
  /***/ }),
159817
161021
 
@@ -178273,6 +179477,17 @@ module.exports = require("module");
178273
179477
 
178274
179478
  /***/ }),
178275
179479
 
179480
+ /***/ "node:path":
179481
+ /*!****************************!*\
179482
+ !*** external "node:path" ***!
179483
+ \****************************/
179484
+ /***/ ((module) => {
179485
+
179486
+ "use strict";
179487
+ module.exports = require("node:path");
179488
+
179489
+ /***/ }),
179490
+
178276
179491
  /***/ "os":
178277
179492
  /*!*********************!*\
178278
179493
  !*** external "os" ***!